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 |
---|---|---|---|---|---|---|
Sets new role id for administrator | public void setRoleId(String roleId) {
this.role_id = roleId;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"LoggedUser changeRole(String roleId) throws IOException;",
"public void setRole(String role)\n {\n _role=role;\n }",
"public void setRole() throws SQLException\r\n\t{\r\n\t\tString SQL_USER = \"UPDATE user SET role = 'Student' WHERE id=?;\";\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Prepare the statement\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\r\n\t\t\t//Bind the variables\r\n\t\t\tstatement.setInt(1, userId);\r\n\r\n\t\t\t//Execute the update\r\n\t\t\tstatement.executeUpdate();\r\n\r\n\t\t} catch (SQLException e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in SQL: Student->setRole()\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\t\r\n\t\t}\r\n\t\t\r\n\t\t//commit change\r\n\t\tDatabase.get().commit();\r\n\t}",
"public void setRoleId(Integer roleId) {\r\n this.roleId = roleId;\r\n }",
"public String getRoleId() {\n return roleId;\n }",
"public String getRoleId() {\n return roleId;\n }",
"public String getRoleId() {\n return roleId;\n }",
"public void setRoleid(Integer roleid) {\r\n this.roleid = roleid;\r\n }",
"public Long getRoleId() {\r\n return roleId;\r\n }",
"public String getRoleid() {\n return roleid;\n }",
"public String getRoleid() {\n return roleid;\n }",
"public String getRoleid() {\n return roleid;\n }",
"public Integer getRoleId() {\r\n return roleId;\r\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public void setRolesRolId(int row,int newValue) throws DataStoreException {\r\n setInt(row,ROLES_ROL_ID, newValue);\r\n }",
"@Override\r\n\tpublic int updRole(Role role) {\n\t\treturn 0;\r\n\t}",
"public void setRoleId(Integer roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Integer roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Integer roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Integer roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Integer roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Integer roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Integer roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Integer roleId) {\n this.roleId = roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public synchronized void setRole(final Role newValue) {\n checkWritePermission();\n role = newValue;\n }",
"public void setRoleId(Long roleId) {\r\n this.roleId = roleId;\r\n }",
"public String getRoleId()\r\n\t{\r\n\t\treturn roleId;\r\n\t}",
"@Override\r\n\tpublic Admin changeRole(Admin admin) {\n\t\treturn null;\r\n\t}",
"public void setRole(java.lang.String value) {\n this.role = value;\n }",
"public Long getRoleid() {\n return roleid;\n }",
"public int getRoleId() {\r\n\t\treturn roleId;\r\n\t}",
"void setRole(String roles);",
"public void setRoleId(DBSequence value) {\n setAttributeInternal(ROLEID, value);\n }",
"public Integer getRoleid() {\r\n return roleid;\r\n }",
"public Integer getIdRole() {\n\t\treturn idRole;\n\t}",
"@Override\n\tpublic void editRole(Role role) {\n\t\trd.editRole(role);\n\t}",
"public void setRoleId(Long roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Long roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Long roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Long roleId) {\n this.roleId = roleId;\n }",
"void addRoleToUser(int userID,int roleID);",
"@Override\n\tpublic void addRole(Role role) {\n\t\tSnowflakeIdWorker idWorker = new SnowflakeIdWorker(0, 0);\n\t\tlong id = idWorker.nextId();\n\t\trole.setRoleid(Long.toString(id));\n\t\troleMapper.addRole(role);\n\t}",
"void setRole(final SecurityRole role);",
"public Long getRoleId() {\n\t\treturn roleId;\n\t}",
"public abstract void setRoleManager(OwRoleManager roleManager_p);",
"public void setAdminRole(org.semanticwb.model.Role value)\r\n {\r\n if(value!=null)\r\n {\r\n getSemanticObject().setObjectProperty(swpres_adminRole, value.getSemanticObject());\r\n }else\r\n {\r\n removeAdminRole();\r\n }\r\n }",
"@Override\n\tpublic Integer updatemenuroleId(String roleId) {\n\t\tInteger updatemenuroleId = mapper.updatemenuroleId(roleId);\n\t\treturn updatemenuroleId;\n\t}",
"public void setRolesRolId(int newValue) throws DataStoreException {\r\n setInt(ROLES_ROL_ID, newValue);\r\n }",
"public Integer getRoleId() {\n\t\treturn roleId;\n\t}",
"public void setRoleId(int roleId) {\r\n\t\tthis.roleId = roleId;\r\n\t}",
"public void setRole(String role) {\r\n this.role = role;\r\n }",
"public void setRole(Integer role) {\n\t\tthis.role = role;\n\t}",
"public Long getAdminRoleId() {\n\t\treturn this.adminRoleId;\n\t}",
"public void setRole(Map<String, Object> role) {\n //First create a dummy Repo class object for customer.\n RoleRepository roleRepository = new RoleRepository();\n Role role1 = roleRepository.createObject(role);\n setRole(role1);\n }",
"@Override\r\n\tpublic void saveRole(Integer uid) {\n\t\tum.saveRole(uid);\r\n\t}",
"public void setRole(String role) {\r\n this.role = role;\r\n }",
"public void setRoleId(String roleId) {\n this.roleId = roleId;\n }",
"@Override\r\n\tpublic AdminRole getAdminRole(int roleid) {\n\t\treturn adminRoleDao.selectByPrimaryKey(roleid);\r\n\t}",
"public void setRoleid(Long roleid) {\n this.roleid = roleid;\n }",
"void changeRole(User user, Role role, String token) throws AuthenticationException;",
"@Override\r\n\tpublic void updateRole(Role role) {\n\t\troleDao.updateRole(role);\r\n\t}",
"public void setRole(HashMap<String, Object> role) {\n //First create a dummy Repo class object for customer.\n RoleRepository roleRepository = new RoleRepository();\n Role role1 = roleRepository.createObject(role);\n setRole(role1);\n }",
"public void setRoleId(Integer roleId) {\n\t\tthis.roleId = roleId;\n\t}",
"public void setRole(String role) {\n this.role = role;\n }",
"public void setRoleId(String roleId)\r\n\t{\r\n\t\tthis.roleId = roleId;\r\n\t}",
"@Override\n\tpublic Role update(RoleForm roleForm, long id) {\n\t\treturn null;\n\t}",
"public void setRole(APIRole role) {\n this.role = role;\n }",
"public void setRoleId(Long roleId) {\n\t\tthis.roleId = roleId;\n\t}",
"void setRoleDao(final RoleDao roleDao);",
"public void setRole(String strRole) {\n\t\tif (\"ADMIN\".equals(strRole)) {\n\t\t\tthis.setRole(userRole.ADMIN);\n\t\t}else if (\"DEVELOPER\".equals(strRole)) {\n\t\t\tthis.setRole(userRole.DEVELOPER);\n\t\t}else if (\"SUPPORT\".equals(strRole)) {\n\t\t\tthis.setRole(userRole.SUPPORT);\n\t\t}\n\t}",
"public void setRoleId(String roleId) {\n this.roleId = roleId == null ? null : roleId.trim();\n }",
"public void setRoleId(String roleId) {\n this.roleId = roleId == null ? null : roleId.trim();\n }",
"long addUserRole(UserRole userRole);",
"@Override\n public void setRole(String roleName) {\n this.role = roleName;\n }",
"@Override\n\tpublic void updateRole(Role role) {\n\t\tthis.roleMapper.updateByPrimaryKey(role);\n\t}",
"public BigDecimal getRoleId() {\r\n return roleId;\r\n }",
"public void saveRole(RoleMaster roleMaster) {\n\t\t\r\n\t}",
"public String getAdminRole() {\r\n\t\treturn adminRole;\r\n\t}",
"private void onAddRole() {\n\t\troleProxy.addRoleToUser(user, selectedRole);\n\t}",
"public void setRole(String role) {\r\n\t\tthis.role = role;\r\n\t}",
"public void setUsua_id(java.lang.Long newUsua_id);",
"@Override\r\n\tpublic int addRole(Role role) {\n\t\treturn 0;\r\n\t}",
"public void setRole(Byte role) {\n this.role = role;\n }",
"public void setRole( String role )\n {\n if ( roles == null )\n {\n roles = new TreeSet<>( String.CASE_INSENSITIVE_ORDER );\n }\n\n this.roles.add( role );\n }",
"public void setRoleName(String paramRole) {\n\tstrRoleName = paramRole;\n }",
"public ManageRoleManagedBean() {\r\n selectedRole = new RoleEntity();\r\n }",
"@Override\n\tpublic void addRole(Role r) {\n\t\t\n\t}",
"public void setRoleId(BigDecimal roleId) {\r\n this.roleId = roleId;\r\n }",
"@Override\r\n\tpublic int insertRole(AdminRole role) {\n\t\treturn adminRoleDao.insert(role);\r\n\t}"
] | [
"0.69627136",
"0.65204114",
"0.65182453",
"0.64615905",
"0.6397547",
"0.6397547",
"0.6397547",
"0.6385131",
"0.63722354",
"0.63547754",
"0.63547754",
"0.63547754",
"0.6354371",
"0.6348739",
"0.6348739",
"0.6348739",
"0.6348739",
"0.6345017",
"0.6339599",
"0.63390607",
"0.63390607",
"0.63390607",
"0.63390607",
"0.63390607",
"0.63390607",
"0.63390607",
"0.63390607",
"0.63375163",
"0.63375163",
"0.63375163",
"0.63375163",
"0.63375163",
"0.63375163",
"0.63375163",
"0.63375163",
"0.63364166",
"0.6334582",
"0.6325235",
"0.63178307",
"0.6294139",
"0.62922525",
"0.6278557",
"0.62494457",
"0.62386507",
"0.6233463",
"0.6224513",
"0.6218892",
"0.62098974",
"0.62098974",
"0.62098974",
"0.62098974",
"0.6207773",
"0.62075853",
"0.61869586",
"0.6175952",
"0.61701685",
"0.6162932",
"0.6151441",
"0.6149135",
"0.6147015",
"0.61211985",
"0.61166596",
"0.6106093",
"0.6101685",
"0.60847753",
"0.6049352",
"0.6039735",
"0.6039695",
"0.601195",
"0.5986659",
"0.5983366",
"0.59741884",
"0.59703356",
"0.5955966",
"0.59519637",
"0.5949526",
"0.58926845",
"0.58836454",
"0.58613276",
"0.5831857",
"0.5827278",
"0.58178276",
"0.58178276",
"0.5813196",
"0.5802578",
"0.5799074",
"0.5795983",
"0.5777458",
"0.5774138",
"0.5767491",
"0.57517093",
"0.5750071",
"0.57342315",
"0.5729635",
"0.57222104",
"0.5718975",
"0.57061553",
"0.57036644",
"0.56962764",
"0.5686012"
] | 0.56794643 | 100 |
TODO Autogenerated method stub | @Override
public String getText() {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
abstract method for shape area | public abstract double getArea(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract double area();",
"abstract double area();",
"abstract double area();",
"abstract double area();",
"public void claShapeArea(){\r\n\t\tshape.calArea();\r\n\t}",
"public abstract double calculateArea();",
"public abstract double calculateArea();",
"public abstract float area();",
"public abstract double computeArea();",
"public Shape getAreaColision();",
"public abstract float getArea();",
"public abstract float calArea();",
"@Override\r\n\tpublic void calcArea() {\n\t\t\r\n\t}",
"public abstract double calcBaseArea();",
"abstract void findArea();",
"abstract void findArea();",
"public double area();",
"@Override\r\n public double area() {\n return height*width;\r\n }",
"@Override\n\tpublic void calcularArea() {\n\t\t\n\t}",
"@Override\n\tpublic double area() {\n\t\treturn Shape.PI*radius*radius;\n\t}",
"public abstract int getArea();",
"double getArea();",
"double getArea();",
"public double getArea();",
"public double getArea();",
"public double getArea();",
"@Override\n public double area() {\n return width * length;\n }",
"@Override\n\tpublic double calculateArea() {\n\t\treturn Shape.PI * r*r;\n\t}",
"public double getArea(){\n return 3.14 * radius * radius;\n }",
"private static <T extends Shape> Double calcShapeArea(T shape){\r\n\t\tshapeContainer = new ShapeContainer<Shape>(shape);\r\n\t\ttry {\r\n\t\t\treturn shapeContainer.calculateArea();\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"double area();",
"public double calculateArea(){\r\n\t\treturn this.getSide()*this.getSide();\r\n}",
"protected double getArea()\r\n {\r\n return ( side * side ) / 2;\r\n }",
"@Override\n public double getArea() {\n return this.length*this.width; //To change body of generated methods, choose Tools | Templates.\n }",
"@Override\n public double getArea() {\n return width * width;\n }",
"double calculateArea();",
"@Override\n public double area()\n {\n\treturn (double) length * width;\n }",
"@Override\n public double getArea() {\n return (int) this.radiusX * (int) this.radiusY * Math.PI;\n }",
"@Override\r\n\tpublic double area() {\r\n\r\n\t\treturn this.sideA*this.sideB;\r\n\t}",
"@Override\n\tvoid findArea(double dim1) {\n\t\t\n\t}",
"public double getCircleArea();",
"double area() {\n System.out.println(\"Inside Area for Rectangle.\");\n return dim1 * dim2;\n }",
"@Override\n\tpublic double getArea() {\n\t\treturn height * width;\n\t}",
"@Override\r\n\tpublic double getArea() {\r\n\t\treturn width * height;\r\n\t}",
"@Override\r\n\tpublic double getArea() {\r\n\t\treturn width * height;\r\n\t}",
"double area() {\nSystem.out.println(\"Inside Area for Rectangle.\");\nreturn dim1 * dim2;\n }",
"@Override\r\n public double calculateArea() {\n double area = 0;\r\n return area;\r\n }",
"public abstract double getSurfacearea();",
"@Override\n\tpublic double area() {\n\t\treturn getBase()*getAltura();\n\t}",
"double getArea() {\n return width * height;\n }",
"@Override\n\tpublic double area() {\n\t\treturn edge*edge;\n\t}",
"double area() {\nSystem.out.println(\"Inside Area for Rectangle.\");\nreturn dim1 * dim2;\n}",
"@Override\n\tpublic double getArea() {\n\t\treturn width * length;\n\t}",
"@Override\n\tpublic double getArea() {\n\t\treturn (2 + 2 * (Math.sqrt(2))) * side * side; // JA\n\t}",
"@Override\r\n public double getArea() {\r\n return radius * radius * Math.PI;\r\n }",
"public abstract Area newArea();",
"@Override\n\tpublic double area() {\n\t\t// TODO Auto-generated method stub\n\t\treturn 0;\n\t}",
"static Double computeArea() {\n // Area is height x width\n Double area = height * width;\n return area;\n }",
"double getArea(){\n return height*width;\n }",
"double area() {\n System.out.println(\"Inside Area for Triangle.\");\n return dim1 * dim2 / 2;\n }",
"public int area() {\n \tarea = width()*height();\n }",
"@Override\r\n\tpublic double getArea() {\n\t\treturn (this.base * this.height)/2;\r\n\t}",
"@Override\n public double obtenerArea(){\n return c.obtenerArea() * 4;\n }",
"@Override\r\n\tpublic double getArea() {\n\t\tdouble Area1 = ((super.getLength() * height));\r\n\t\tdouble Area2 = ((super.getWidth() * height));\r\n\t\treturn (Area1 * 2 + Area2 * 2 + super.getArea() * 2);\r\n\t\t\r\n\t}",
"public double area(){\n return (base*height) / 2;\n }",
"@Override\n\tpublic void computeArea() {\n\t\tthis.area = length * length;\t\t\t\t\n\t}",
"public double area() { return Math.PI * radius * radius; }",
"@Override\n\tpublic double area() {\n\t\t\n\t\tdouble area = (Math.PI * Math.pow(radius, 2));\n\t\treturn area;\n\t\t\n\t}",
"public double getArea(){\n return radius * radius * Math.PI;\n }",
"@Override\r\n\tpublic double area() {\n\t\treturn pi*this.radi*this.radi;\r\n\t}",
"@Override\n\tpublic double getArea() {\n\t\treturn width*length;\n\t}",
"@Override\n\tpublic double getArea() {\n\t\treturn width*length;\n\t}",
"public double area() {\n\t\treturn width * height;\n\t}",
"public double area() \n {\n double area = 0;\n for (Line2D line : lines) \n {\n area += line.getP1().getX() * line.getP2().getY();\n area -= line.getP2().getX() * line.getP1().getY();\n }\n area /= 2.0;\n return Math.abs(area);\n }",
"@Override\n double areaFigure() {\n if (!isRealFigure()) {\n return -1;\n }\n //When the triangular prism is real\n double faceArea = (getA() + getB() + getC()) * getD();\n return faceArea + 2 * super.areaFigure();\n }",
"@Override\r\n public double getArea() {\r\n return (length * width);\r\n }",
"public double Area() {\n return OCCwrapJavaJNI.ShapeAnalysis_FreeBoundData_Area(swigCPtr, this);\n }",
"public double Area() {\r\n \treturn(getLength() * getWidth());\r\n }",
"public abstract float surfaceArea();",
"double area() {\nSystem.out.println(\"Inside Area for Triangle.\");\nreturn dim1 * dim2 / 2;\n}",
"@Override\n public double area() {\n double P = this.perimeter() / 2;\n double result = Math.sqrt(P * (P - side1) * (P - side2) * (P - side3));\n return result;\n }",
"@Override\n\tpublic double area() {\n\t\treturn l*b;\n\t}",
"@Override\n\tpublic double area() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic double area() {\n\t\treturn 0;\n\t}",
"public double calculateArea()\n {\n return (Math.PI * radius) * (Math.PI * radius);\n }",
"@Override\n\tpublic double getArea() {\n\t\treturn Math.pow(getSide(), 2) * this.N / 4 * (Math.tan(Math.toRadians(180 / this.N)));\n\t}",
"Double getAreaValue();",
"public interface Shape {\n\t/**\n\t * Calculates and returns the area of the object\n\t * @return\n\t */\n\tpublic abstract double getArea();\n\t\n\t/**\n\t * Returns the Color of the object.\n\t * @return\n\t */\n\tpublic abstract Color getColor();\n\t\n\t/**\n\t * Sets the Color of the object.\n\t * @param color\n\t */\n\tpublic abstract void setColor(Color color);\n\t\n\t/**\n\t * Returns true if the object is filled with color, otherwise false.\n\t * @return\n\t */\n\tpublic abstract boolean getFilled();\n\t\n\t/**\n\t * Sets the filled state of the object.\n\t * @param filled\n\t */\n\tpublic abstract void setFilled(boolean filled);\n\t\n\t/**\n\t * Moves the shape by the x and y amounts specified in the Point.\n\t * @param point\n\t */\n\tpublic abstract void move(Point point);\t\n}",
"@Override\n public double getArea() {\n double area = this.length*this.width;\n return area;\n }",
"public double calculateArea() {\r\n return PI * radius * radius;\r\n }",
"public double getArea() {\n\t\treturn 4.0 * Math.PI * this.radius * this.radius;\n\t}",
"public double area(){\r\n\t\treturn this.base()*this.altezza();\r\n\t}",
"public abstract int[] getShape();",
"public double area()\r\n {\r\n float dx = tr.getX() - bl.getX();\r\n float dy = tr.getY() - bl.getY();\r\n return dx*dy;\r\n }",
"@Override\r\n\t\tpublic int Area() {\n\t\t\treturn width*width\t;\r\n\t\t}",
"public double getArea()\r\n\t{\r\n\t\treturn(super.getHeight()*super.getWidth());\r\n\t}",
"@Override\r\n public double getArea() {\r\n return (0.5 * (base * height));\r\n }",
"public double area() {\n return (width * height);\n }"
] | [
"0.84824955",
"0.84824955",
"0.84824955",
"0.84824955",
"0.82689106",
"0.80023515",
"0.80023515",
"0.7935163",
"0.79263103",
"0.7913427",
"0.7815359",
"0.77630967",
"0.7608176",
"0.756257",
"0.7535872",
"0.7535872",
"0.7532897",
"0.7517579",
"0.74634916",
"0.7442525",
"0.7427919",
"0.74257153",
"0.74257153",
"0.74117076",
"0.74117076",
"0.74117076",
"0.7339086",
"0.7325839",
"0.7316459",
"0.731364",
"0.72841054",
"0.7250932",
"0.722437",
"0.72079706",
"0.7199213",
"0.7181599",
"0.71771866",
"0.7167402",
"0.7135207",
"0.7122951",
"0.71087575",
"0.7096014",
"0.70934844",
"0.70933264",
"0.70933264",
"0.70871973",
"0.7086821",
"0.7075117",
"0.70737",
"0.70569545",
"0.7047769",
"0.7047519",
"0.70401603",
"0.6991303",
"0.6990647",
"0.69787484",
"0.6975154",
"0.69656956",
"0.69566303",
"0.6953071",
"0.69495517",
"0.6936926",
"0.69294757",
"0.6929139",
"0.6919633",
"0.6917713",
"0.69050413",
"0.68976676",
"0.68925375",
"0.68774354",
"0.687223",
"0.687223",
"0.68664455",
"0.6863919",
"0.68607813",
"0.68526745",
"0.6848302",
"0.68453854",
"0.6841345",
"0.68318826",
"0.6826574",
"0.6819469",
"0.6814729",
"0.6814729",
"0.68096495",
"0.6807251",
"0.68004435",
"0.6791143",
"0.67886364",
"0.67813414",
"0.6777368",
"0.67611074",
"0.6745135",
"0.67426664",
"0.674093",
"0.67369574",
"0.67345434",
"0.67335033"
] | 0.8044055 | 6 |
override string method to return rectangle values | @Override
public String toString() {
return "Rectangle length: " + length + ", Rectangle width: " + width + ", Rectangle color: " + super.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override public String toString() {\n return String.format(\n \"Rectangle with bottom left corner at (%d, %d) and top \" +\n \"right corner at (%d, %d)\", this.x1, this.y1, this.x2, this.y2);\n }",
"@Override\n\tpublic String toString() {\n\t\treturn (\"rect(\" + corner.x + \", \" + corner.y + \", \" + size.x + \", \"\n\t\t\t\t+ size.y + \")\");\n\t}",
"private void rectangle(final Graphics2D theG2d, final double theX, \r\n final double theY, final double theWidth, \r\n final double theHeight, final String theString) { \r\n final Rectangle2D rect = \r\n new Rectangle2D.Double(theX, theY, theWidth, theHeight); \r\n if (DRAW.equals(theString)) { \r\n theG2d.draw(rect); \r\n } else { \r\n theG2d.fill(rect); \r\n } \r\n }",
"public abstract void drawString(String str, int x, int y);",
"public abstract double drawString(AEColor clr, double font_size, String str, double mid_x, double mid_y);",
"public String toString(){\n return (\"TextShape \"+x+\" \"+y+\" \"+col.getRed()+\" \"+col.getGreen()+\" \"+col.getBlue()+\" \"+str);\n }",
"public String toString(){\n\t\treturn \"(\" + width + \" , \" + height + \")\" ;\n\t}",
"@Override\n\tpublic Rectangle getBounds(String text) {\n\t\tint height = 0;\n\t\tint width = 0;\n\t\t//Initialize y to the maximum int\n\t\tint y = Integer.MAX_VALUE;\n\t\t\n\t\tchar[] chars = text.toCharArray();\n\t\t//First, find the lowest yoffset\n\t\tfor (char c : chars) {\n\t\t\tGlyph g = getGlyph(c);\n\t\t\tif (g != null) y = Math.min(g.getYOff(), y);\n\t\t}\n\t\tfor (char c : chars) {\n\t\t\tGlyph g = getGlyph(c);\n\t\t\tif (g != null) {\n\t\t\t\theight = Math.max(g.getHeight() + (g.getYOff() - y), height);\n\t\t\t\twidth += g.getXAdvance();\n\t\t\t}\n\t\t}\n\t\treturn new Rectangle(0, y, width, height);\n\t}",
"public String getRectangleBounds() {\n checkAvailable();\n return impl.getRectangle();\n }",
"@Override\n public String toString() \n\t{\n\t\t// This is just for the output format\n\t\tString sg = \"\";\n\t\tsg = sg + \"(\";\n\t\tsg = sg + x;\n\t\tsg = sg + \", \";\n\t\tsg = sg + y;\n\t\tsg = sg + \") \";\n\t\t\n\t\treturn sg;\n\n\t}",
"@Override\r\n\tpublic String toString() {\r\n\r\n\t\treturn \"My rectangle's Areas is \"+area();\r\n\t}",
"@Override\n\tpublic String getShape() {\n\t\treturn \"Rectangle\";\n\t}",
"public CustomRectangle(int x1, int y1, int x2, int y2) {\n this.x1 = Integer.toString(x1);\n this.y1 = Integer.toString(y1);\n this.x2 = Integer.toString(x2);\n this.y2 = Integer.toString(y2);\n }",
"public CustomRectangle(String x1, String y1, String x2, String y2) {\n this.x1 = x1;\n this.y1 = y1;\n this.x2 = x2;\n this.y2 = y2;\n }",
"public String toString()\n\t{\n\t\treturn \"x:\"+xPos+\" y:\"+yPos+\" width:\"+width+\" height:\"+height+\" color:\"+ color;\n\t}",
"@Override\n public String toString()\n {\n return \"[\" + getLowerLeftX() + \",\" + getLowerLeftY() + \",\" +\n getUpperRightX() + \",\" + getUpperRightY() +\"]\";\n }",
"public String toString() {\n return \"Name: \" + this.name + \"\\nType: Rectangle\" + \"\\nCenter: (\" + this.xPos + \",\"\n + this.yPos + \"), Width: \" + this.width + \", Height: \" + this.height + \", Color: (\"\n + this.color.getRed() + \",\" + this.color.getGreen() + \",\" + this.color.getBlue()\n + \")\\nAppears at t = \" + this.startTime + \"\\nDisappears at t = \" + this.endTime;\n }",
"@Override\n public String toString()\n {\n\treturn getClass().getSimpleName() + \" (\" + getLength() + \"x\" + getWidth() + \")\";\n }",
"protected String sizeString()\n {\n return (\" (\" + map.getSizeX() + \" x \" + map.getSizeY() + \")\");\n }",
"public Rectangle2D.Double getTextBounds() {\n\t\t\n\t\tdouble txtPinX = _parent.getTxtPinX();\n\t\tdouble txtPinY = _parent.getTxtPinY();\n\t\t\n\t\tdouble txtLocPinX = _parent.getTxtLocPinX();\n\t\tdouble txtLocPinY = _parent.getTxtLocPinY();\n\t\t\n\t\tdouble txtWidth = _parent.getTxtWidth();\n\t\tdouble txtHeight = _parent.getTxtHeight();\n\t\t\n\t\tdouble x = txtPinX - txtLocPinX;\n\t\tdouble y = txtPinY - txtLocPinY;\n\t\t\n\t\treturn new Rectangle2D.Double(x, y, txtWidth, txtHeight);\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn String.format(this.width+\"\"+this.height+\"\"+getPerimeter()+\"\"+getArea());\n\t}",
"public String toCodedString() {\n\t\t//System.out.println(toString());\n\t\treturn String.format(\"%s%s\", getColor().toInt(), getShape().toString());\n\t}",
"godot.wire.Wire.Rect2 getRect2Value();",
"public abstract String getArea();",
"public Rectangle call(String inputString) {\n\t\t\t\tString[] points = inputString.split(\",\");\n\t\t\t\t// Initialize the leftmost x and y coordinate\n\t\t\t\tDouble leftMostUpperXCoord = Math.min(Double.parseDouble(points[1]), Double.parseDouble(points[3]));\n\t\t\t\tDouble leftMostUpperYCoord = Math.max(Double.parseDouble(points[2]), Double.parseDouble(points[4]));\n\t\t\t\t// holds the upper left point for the rectangle\n\t\t\t\tPoint upperLeftPoint = new Point(leftMostUpperXCoord, leftMostUpperYCoord);\n\t\t\t\tDouble rightMostLowerXCoord = Math.max(Double.parseDouble(points[1]), Double.parseDouble(points[3]));\n\t\t\t\tDouble rightMostLowerYCoord = Math.min(Double.parseDouble(points[2]), Double.parseDouble(points[4]));\n\t\t\t\t// holds the lower right point for the rectangle\n\t\t\t\tPoint lowerRightPoint = new Point(rightMostLowerXCoord, rightMostLowerYCoord);\n\t\t\t\treturn new Rectangle(Integer.parseInt(points[0]), upperLeftPoint, lowerRightPoint);\n\t\t\t}",
"@Override\n public String toString() {\n return \"<\" + this.x + \",\" + this.y + \">\";\n }",
"Rectangle getRect(){\n \treturn new Rectangle(x,y,70,25);\n }",
"@Override\n public String getTextBaseline() {\n return graphicsEnvironmentImpl.getTextBaseline(canvas);\n }",
"@Override\n public String toString() {\n String s = \"(\" + this.getY() + \",\" + this.getX() + \")\";\n return s;\n }",
"public String toString()\n\t{\n\t\tString result = \"Highlighted region \"+getMinIndex()+\"-\"+getMaxIndex();\n\t\treturn result;\n\t}",
"public String getColorString();",
"public String toString(){\n\t\treturn topleft.x + \",\"+topleft.y+\",\"+bottomright.x+\",\"+bottomright.y;\n\t}",
"public String toString()\r\n\t{\r\n\t\tStringBuffer buffer = new StringBuffer(\"{X = \");\r\n\t\tbuffer.append(this.x);\r\n\t\tbuffer.append(\", Y = \");\r\n\t\tbuffer.append(this.y);\r\n\t\tbuffer.append('}');\r\n\t\treturn buffer.toString();\r\n\t}",
"static void testRectangle(Point a, Point b, Point c, Point d){\n Rectangle rect1 = new Rectangle(a,b,c,d);\n System.out.print(\"Perimeter of rectangle=\"+rect1.calculatePerimeter());\n System.out.printf(\"->%b\\n\", String.format(\"%.2f\", rect1.calculatePerimeter()).equals(\"16.00\"));\n System.out.print(\"Area of rectangle=\"+rect1.calculateArea());\n System.out.printf(\"->%b\\n\", String.format(\"%.2f\", rect1.calculateArea()).equals(\"16.00\"));\n System.out.println(rect1); //prints the return value from rect1.toString()\n }",
"@Override\n public String toString() {\n return String.format(\"(%d,%d)\", x, y);\n }",
"public Rectangle getRectangle(String key) {\n\t\tRectangle defaultValue = (Rectangle) getDefault(key);\n\t\tString sp = internal.getProperty(key);\n\t\tif (sp == null) {\n\t\t\treturn defaultValue;\n\t\t}\n\t\tRectangle result = new Rectangle();\n\t\ttry {\n\t\t\tint x, y, w, h;\n\t\t\tString token;\n\t\t\tStringTokenizer st = new StringTokenizer(sp, \" \", false);\n\t\t\tif (!st.hasMoreTokens()) {\n\t\t\t\t// the value is not correctly formated => remove it\n\t\t\t\tinternal.remove(key);\n\t\t\t\treturn defaultValue;\n\t\t\t}\n\t\t\ttoken = st.nextToken();\n\t\t\tx = Integer.parseInt(token);\n\t\t\tif (!st.hasMoreTokens()) {\n\t\t\t\tinternal.remove(key);\n\t\t\t\treturn defaultValue;\n\t\t\t}\n\t\t\ttoken = st.nextToken();\n\t\t\ty = Integer.parseInt(token);\n\t\t\tif (!st.hasMoreTokens()) {\n\t\t\t\tinternal.remove(key);\n\t\t\t\treturn defaultValue;\n\t\t\t}\n\t\t\ttoken = st.nextToken();\n\t\t\tw = Integer.parseInt(token);\n\t\t\tif (!st.hasMoreTokens()) {\n\t\t\t\tinternal.remove(key);\n\t\t\t\treturn defaultValue;\n\t\t\t}\n\t\t\ttoken = st.nextToken();\n\t\t\th = Integer.parseInt(token);\n\t\t\tresult.setBounds(x, y, w, h);\n\t\t\treturn result;\n\t\t} catch (NumberFormatException e) {\n\t\t\tinternal.remove(key);\n\t\t\treturn defaultValue;\n\t\t}\n\t}",
"String getPosY();",
"public Rectangle getRectangle();",
"@Override\r\n\tpublic String toString()\r\n\t{\r\n\t\treturn this.getIndentation() + \"(in-subrange \" + this.getPosition1().getCoordX() + \", \" + this.getPosition1().getCoordY() + \", \"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t + this.getPosition2().getCoordX() + \", \" + this.getPosition2().getCoordY() + \")\";\r\n\t}",
"@Override\n public String toString()\n {\n return TAG + \"[x:\" + x + \",y:\" + y + \"]\";\n }",
"public String toString() {\n // DecimalFormat class is used to format the output\n DecimalFormat df = new DecimalFormat(\".0\");\n return \"\\nCoordinates of Parallelogram are:\\n\"\n + super.toString()\n + \"\\nWidth is :\"\n + df.format(width)\n + \"\\nHeight is :\"\n + df.format(height)\n + \"\\nArea is :\"\n + df.format(area());\n }",
"protected abstract String format();",
"@Override\r\n\tprotected void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\r\n\t\tg.drawString(str, 10, 10);\r\n\t\tg.drawLine(10, 20, 110, 20);\r\n\t\tg.drawRect(pX, 30, 100, 100);\r\n\t\t\r\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn String.format(\"(%d, %d)\", x, y);\n\t}",
"public String toString(){\n return \"X = \" + xPosition + \", Y = \" + yPosition + \", width = \" + widthRadius + \", height = \" + \n heightRadius;\n }",
"@ApiModelProperty(value = \"Rectangle area where searched original text.\")\n public Rectangle getRect() {\n return rect;\n }",
"@Override\n public String toString() {\n return String.format(\"position X is='%s' ,position Y is='%s'\" , positionX , positionY);\n }",
"@Override\n\tpublic String toString() {\n\t\treturn \"(\" + x + \", \" + y + \")\";\n\t}",
"java.lang.String getY();",
"public String toString() {\n\t\treturn \"oval\" + \" \" + \"(\" + rb + \",\" + cb + \") \" + \"(\" + height + \",\" + width + \") \" + \"(\" + character + \")\";\n\t}",
"@Override\r\n\tpublic String toString() {\n\t\tString rtn=this.x+\".\"+this.y;\r\n\t\treturn rtn;\r\n\t}",
"public void fillString(float x, float y, String text);",
"public TextShape (String str, int x, int y, Color col){\n this.str = str;\n this.x = x;\n this.y = y;\n this.col = col;\n }",
"private static Rect readRect(String s) {\n\t\tScanner line = new Scanner(s);\n\n\t\tint x = line.nextInt();\n\t\tint y = line.nextInt();\n\t\tint vx = line.nextInt();\n\t\tint vy = line.nextInt();\n\t\tboolean isFilled = line.nextBoolean();\n\t\tint width = line.nextInt();\n\t\tint height = line.nextInt();\n\t\tColor colour = Color.rgb(line.nextInt(), line.nextInt(), line.nextInt());\n\t\tint insertionTime = line.nextInt();\n\t\tboolean willPulse = line.nextBoolean();\n\t\tline.close();\n\n\t\treturn new Rect(insertionTime, x, y, vx, vy, width, height, colour, isFilled, willPulse);\n\t}",
"public String toString()\n {\n return \"The tesseract's dimensions are \" + getLength() + \" X \" + getWidth() + \" X \" + getHeight() + \" X \" + getwDimension();\n }",
"private static void addRectangle(String[] input) throws NumberFormatException, IncorrectParametersException{\n if (input.length == 5){\n try{\n int x1 = Integer.parseInt(input[1]); \n int y1 = Integer.parseInt(input[2]);\n int x2 = Integer.parseInt(input[3]); \n int y2 = Integer.parseInt(input[4]);\n try{\n canvas.createRectangle(x1, y1, x2, y2);\n System.out.println(canvas.render());\n } catch (NullPointerException ex) {\n System.out.println(\"Initialise a new canvas first!\");\n }\n } catch (NumberFormatException ex) {\n System.out.println(\"HELP: to create a new rectangle enter `R x1 y1 x2 y2`, with (x1,y1) being the upper left corner and (x2,y2) the lower right one.\");\n }\n } else {\n System.out.println(\"HELP: to create a new rectangle enter `R x1 y1 x2 y2`, with (x1,y1) being the upper left corner and (x2,y2) the lower right one.\");\n throw new IncorrectParametersException(\"\");\n }\n }",
"@Test\n public void testToString() {\n assertEquals(r1.toString(), \"Rectangle\");\n assertEquals(r2.toString(), \"Rectangle\");\n }",
"public Rectangle(final String[] input) {\r\n this.startX = Integer.parseInt(input[INPUT1]);\r\n this.startY = Integer.parseInt(input[INPUT2]);\r\n this.height = Integer.parseInt(input[INPUT3]);\r\n this.width = Integer.parseInt(input[INPUT4]);\r\n super.setStrokeColor(Integer.parseInt(input[INPUT5].substring(1), HEX));\r\n super.setStrokeOpacity(Integer.parseInt(input[INPUT6]));\r\n super.setFillColor(Integer.parseInt(input[INPUT7].substring(1), HEX));\r\n super.setFillOpacity(Integer.parseInt(input[INPUT8]));\r\n }",
"@Override\n public String toString() {\n String[] output = new String[getHeight()];\n for (int row=0; row < getHeight(); row++) {\n StringBuilder builder = new StringBuilder();\n for (int col=0; col < getWidth(); col++) {\n Square current = getSquare(row, col);\n builder.append(getCharForSquare(current));\n }\n output[row] = builder.toString();\n }\n return String.join(\"\\n\", output);\n }",
"public String toString()\n\t{\n\t\treturn getX()+\" \"+getY();\n\t}",
"@Override\r\n\tpublic String toString(){\r\n\t\treturn \"[\" + this.getX()+ \" \" + this.getY()+ \"]\";\r\n\t}",
"public String toString(){\n return String.format(\n \"Width: %.2f\\nLength: %.2f\\nArea: %.2f\\nPerimeter: %.2f\\n\",\n getLength(), getWidth(), getArea(), getPerimeter());\n }",
"@Override\n\tpublic String toString() {\n\t\treturn \"(\" + X + \",\" + Y + \")\";\n\t}",
"public String toString(){\n return \"(\" + this.x + \",\" + this.y + \")\";\n }",
"public Rectangle(float w, float h, float x, float y, float r, float g, float b, String n, int s, int e) {\n super(x, y, r, g, b, n, s, e);\n this.width = w;\n this.height = h;\n }",
"public String toString() {\r\n \treturn new String(\"x: \" + x + \" y: \" + y);\r\n }",
"public String toString() {\r\n\t\treturn getx() + \" \" + gety() + \" \" + getWidth() + \" \" + getHeight() + \" \" + getColor() + \" \" + getXSpeed()+ \" \" + getYSpeed();\r\n\t}",
"public String toString() {\n\t return \"(\" + this.x + \",\" + this.y + \")\";\n\t }",
"public String toString()\n {\n return \"The square's dimensions are \" + getLength() + \" X \" + getWidth();\n }",
"@Override\n\tpublic String shape() {\n\t\treturn \"Text\";\n\t}",
"public String getExtent() {\n return Formatter.formatDoubleStr(minX, 4) + \" \" + Formatter.formatDoubleStr(minY, 4)\n + \" \" + Formatter.formatDoubleStr(maxX, 4) + \" \" + Formatter.formatDoubleStr(maxY, 4);\n }",
"private static Rect createRect(String[] input) {\r\n int px = Integer.parseInt(input[1]);\r\n int py = Integer.parseInt(input[2]);\r\n int vx = Integer.parseInt(input[3]);\r\n int vy = Integer.parseInt(input[4]);\r\n boolean isFilled = Boolean.parseBoolean(input[5]);\r\n int width = Integer.parseInt(input[6]);\r\n int height = Integer.parseInt(input[7]);\r\n float r = (float) Integer.parseInt(input[8]) / 255.0f;\r\n float g = (float) Integer.parseInt(input[9]) / 255.0f;\r\n float b = (float) Integer.parseInt(input[10]) / 255.0f;\r\n int insertionTime = Integer.parseInt(input[11]);\r\n boolean isFlashing = Boolean.parseBoolean(input[12]);\r\n float r1 = (float) Integer.parseInt(input[13]) / 255.0f;\r\n float g1 = (float) Integer.parseInt(input[14]) / 255.0f;\r\n float b1 = (float) Integer.parseInt(input[15]) / 255.0f;\r\n return new Rect(insertionTime, px, py, vx, vy, width, height, new Color(r, g, b, 1), isFilled,\r\n isFlashing, new Color(r1, g1, b1, 1));\r\n }",
"void createRectangles();",
"private RectHV rectLb() {\n\n if (!horizontal) {\n return new RectHV(\n rect.xmin(),\n rect.ymin(),\n p.x(),\n rect.ymax()\n );\n\n\n } else {\n return new RectHV(\n rect.xmin(),\n rect.ymin(),\n rect.xmax(),\n p.y()\n );\n }\n }",
"public String toString() {\n\t\treturn (\"The value of \\\"x\\\" is: \" + x + \"\\n\"\n\t\t\t + \"The value of \\\"y\\\" is: \" + y);\n\t}",
"public String toString() {\n\t\treturn \"(\" + x + \",\" + y + \")\";\n\t}",
"public String toString()\n\t{\n\t\treturn String.format(\"Square at x=%d, y=%d with sides %d\", anchor.x, anchor.y, oneside);\n\t}",
"abstract String getScoreString();",
"abstract String getColor();",
"public abstract String getFormattedContent();",
"public abstract String getPos();",
"String getWidth();",
"String getWidth();",
"public String toString(){\n return \"{\"+this.x+\", \"+this.y+\"}\";\n }",
"public StringDrawer(final Graphics2D g, final String str) {\n this.g = g;\n this.str = str;\n final FontMetrics fm = g.getFontMetrics();\n bbox = fm.getStringBounds(str, g);\n }",
"@Override public String toString() {\n\t\tif (this.valido == true) \t\n\t \t\treturn String.format(\"Il quadrato di vertici %s %s %s %s ha perimetro %.2f e area %.2f\", this.vertici[0].toString(),\n\t\t\tthis.vertici[1].toString(), this.vertici[2].toString(), this.vertici[3].toString(),this.calcolaPerimetro(),this.calcolaArea());\n\t\telse return (\"Quadrato non valido\");\n\t}",
"public void strokeString(float x, float y, String text);",
"public String toString()\n {\n return \"I am the nice \" + NAME + \", I am now standing on square \" + x + \" , \" + y + \".\";\n }",
"public String toString()\r\n {\r\n return \"(\" + this.x() + \", \" + this.y() + \")\";\r\n }",
"public Component getCorner(String paramString) {\n/* 1171 */ boolean bool = getComponentOrientation().isLeftToRight();\n/* 1172 */ if (paramString.equals(\"LOWER_LEADING_CORNER\")) {\n/* 1173 */ paramString = bool ? \"LOWER_LEFT_CORNER\" : \"LOWER_RIGHT_CORNER\";\n/* 1174 */ } else if (paramString.equals(\"LOWER_TRAILING_CORNER\")) {\n/* 1175 */ paramString = bool ? \"LOWER_RIGHT_CORNER\" : \"LOWER_LEFT_CORNER\";\n/* 1176 */ } else if (paramString.equals(\"UPPER_LEADING_CORNER\")) {\n/* 1177 */ paramString = bool ? \"UPPER_LEFT_CORNER\" : \"UPPER_RIGHT_CORNER\";\n/* 1178 */ } else if (paramString.equals(\"UPPER_TRAILING_CORNER\")) {\n/* 1179 */ paramString = bool ? \"UPPER_RIGHT_CORNER\" : \"UPPER_LEFT_CORNER\";\n/* */ } \n/* 1181 */ if (paramString.equals(\"LOWER_LEFT_CORNER\")) {\n/* 1182 */ return this.lowerLeft;\n/* */ }\n/* 1184 */ if (paramString.equals(\"LOWER_RIGHT_CORNER\")) {\n/* 1185 */ return this.lowerRight;\n/* */ }\n/* 1187 */ if (paramString.equals(\"UPPER_LEFT_CORNER\")) {\n/* 1188 */ return this.upperLeft;\n/* */ }\n/* 1190 */ if (paramString.equals(\"UPPER_RIGHT_CORNER\")) {\n/* 1191 */ return this.upperRight;\n/* */ }\n/* */ \n/* 1194 */ return null;\n/* */ }",
"@Override\n public String toString()\n {\n String temp = \"[\";\n String areaVal = String.format(\"%5.2f\", area);\n\n\n for(int i = 0; i < sides; i++)\n {\n temp += poly[i].toString();\n }\n\n temp += \"]: \"+ areaVal;\n this.print = temp;\n return temp;\n }",
"public abstract Rectangle getBounds();",
"public abstract Rectangle getBounds();",
"public abstract Rectangle getBounds();",
"private Bounds textWidth(double size, SensorValue sensorValue)\r\n\t{\n\t\t\r\n\t\tString showValue = sensorValue.getCurrentValue() + \" \" + sensorValue.getMeasurementUnit();\r\n\t\t\r\n\t\tif(fontBase == null)\r\n\t\t\tfontBase = new Font(\"Verdana\", 12);\r\n\t\tText text = new Text(showValue);\r\n\t\tFont font = Font.font(fontBase.getFamily(), size);\r\n text.setFont(font);\r\n return text.getBoundsInLocal();\r\n\t}",
"Rectangle getBoundingBox(Rectangle rect);",
"@Override\n\tpublic String getShapeType() {\n\t\treturn \"Rectangle\";\n\t}",
"@Override\r\n public String toString() { return new String( \"(\" + row + \", \" + col + \")\" ); }",
"org.chromium.components.paint_preview.common.proto.PaintPreview.RectProto getRect();",
"public String toString() {\n return \"(\"+this.x + \", \" + this.y+\")\";\n }"
] | [
"0.720774",
"0.68952274",
"0.6718305",
"0.6609133",
"0.65562814",
"0.6538155",
"0.64966136",
"0.6460355",
"0.6345515",
"0.63447934",
"0.63318974",
"0.6302864",
"0.62754256",
"0.612653",
"0.61034316",
"0.61033124",
"0.6092676",
"0.60907525",
"0.6042006",
"0.6034641",
"0.60263354",
"0.6025462",
"0.6014304",
"0.600518",
"0.5949439",
"0.59386986",
"0.59158444",
"0.5912188",
"0.5892082",
"0.58743703",
"0.58734626",
"0.5863545",
"0.58594817",
"0.58552665",
"0.58549553",
"0.5838175",
"0.58351916",
"0.5831869",
"0.5827616",
"0.5827348",
"0.5819445",
"0.5816777",
"0.57952297",
"0.5794305",
"0.57865804",
"0.5783977",
"0.57794654",
"0.577829",
"0.57736176",
"0.5762869",
"0.5755433",
"0.57321435",
"0.57307523",
"0.57275265",
"0.5726094",
"0.5723464",
"0.5710702",
"0.57096505",
"0.57054937",
"0.568419",
"0.56837255",
"0.56829923",
"0.56651765",
"0.5654414",
"0.56452966",
"0.5641743",
"0.5637171",
"0.56340975",
"0.56319726",
"0.5625366",
"0.56067944",
"0.5592043",
"0.55910367",
"0.5588763",
"0.5588508",
"0.5585867",
"0.5585032",
"0.5580804",
"0.5579348",
"0.5569088",
"0.5566301",
"0.5561486",
"0.5561486",
"0.5552131",
"0.5550717",
"0.5546539",
"0.5542725",
"0.55420595",
"0.5539185",
"0.5538032",
"0.5535051",
"0.55320114",
"0.55320114",
"0.55320114",
"0.5530435",
"0.55297565",
"0.5525148",
"0.55222344",
"0.5518999",
"0.5516763"
] | 0.6956574 | 1 |
Override inherited getArea() to provide implementation | @Override
public double getArea() {
return (length * width);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract int getArea();",
"public abstract double getArea();",
"public abstract double getArea();",
"public abstract double getArea();",
"public abstract String getArea();",
"public abstract float getArea();",
"@Override\r\n\tpublic double getArea() {\n\t\treturn (this.base * this.height)/2;\r\n\t}",
"@Override\r\n\tpublic double getArea() {\r\n\t\treturn width * height;\r\n\t}",
"@Override\r\n\tpublic double getArea() {\r\n\t\treturn width * height;\r\n\t}",
"@Override\n\tpublic double getArea() {\n\t\treturn height * width;\n\t}",
"@Override\n\tpublic double getArea() {\n\t\treturn (0.5*this.base*this.height);\n\t}",
"@Override\r\n\tpublic void calcArea() {\n\t\t\r\n\t}",
"@Override\n public double getArea() {\n return this.length*this.width; //To change body of generated methods, choose Tools | Templates.\n }",
"@Override\r\n public double getArea() {\r\n return (0.5 * (base * height));\r\n }",
"@Override\r\n\tpublic double getArea() {\n\t\tdouble Area1 = ((super.getLength() * height));\r\n\t\tdouble Area2 = ((super.getWidth() * height));\r\n\t\treturn (Area1 * 2 + Area2 * 2 + super.getArea() * 2);\r\n\t\t\r\n\t}",
"public double getArea() {\n\t\treturn super.getArea()*height;\r\n\t}",
"public double getArea();",
"public double getArea();",
"public double getArea();",
"@Override\r\n public double area() {\n return height*width;\r\n }",
"@Override\r\n\tpublic void getarea(int a) {\n\t\t\r\n\t}",
"@Override\n public double getArea() {\n return width * width;\n }",
"double getArea();",
"double getArea();",
"public double getArea()\r\n\t{\r\n\t\treturn(super.getHeight()*super.getWidth());\r\n\t}",
"public abstract float calArea();",
"public Rectangle getArea() {\n return area;\n }",
"abstract void findArea();",
"abstract void findArea();",
"@Override\n\tpublic void calcularArea() {\n\t\t\n\t}",
"public abstract Area newArea();",
"@Override\n\tpublic double getArea() {\n\t\treturn width * length;\n\t}",
"public int getArea() {\n\t\treturn this.height * this.width;\n\t}",
"@Override\n public double getArea() {\n double area = this.length*this.width;\n return area;\n }",
"@Override\r\n\t\tpublic int Area() {\n\t\t\treturn width*width\t;\r\n\t\t}",
"@Override\n\tpublic double area() {\n\t\treturn getBase()*getAltura();\n\t}",
"double getArea() {\n return width * height;\n }",
"public String getArea() {\n return this.area;\n }",
"@Override\n public double obtenerArea(){\n return c.obtenerArea() * 4;\n }",
"public abstract double calculateArea();",
"public abstract double calculateArea();",
"abstract double area();",
"abstract double area();",
"abstract double area();",
"abstract double area();",
"public abstract double calcBaseArea();",
"@Override\n\tpublic double getArea() {\n\t\treturn width*length;\n\t}",
"@Override\n\tpublic double getArea() {\n\t\treturn width*length;\n\t}",
"public int getArea() {\n\t\treturn area;\n\t}",
"@Override\r\n\tpublic Area getBoundsArea() {\n\t\treturn null;\r\n\t}",
"@Override\n public double getArea() {\n return (int) this.radiusX * (int) this.radiusY * Math.PI;\n }",
"public int getArea()\n {\n return area;\n }",
"@Override\r\n public double calculateArea() {\n double area = 0;\r\n return area;\r\n }",
"@Override\n\tpublic double getArea() {\n\t\treturn (2 + 2 * (Math.sqrt(2))) * side * side; // JA\n\t}",
"public double getArea()\n {\n return area;\n }",
"public abstract double computeArea();",
"public int area() {\n \tarea = width()*height();\n }",
"@Override\n public double getArea() {\n return 0;\n }",
"protected double getArea()\r\n {\r\n return ( side * side ) / 2;\r\n }",
"public String getArea() {\n return area;\n }",
"public int getArea() {\n return (getXLength() * getYWidth());\n }",
"public String getArea() {\n return area;\n }",
"public String getArea() {\n return area;\n }",
"public String getArea() {\n return area;\n }",
"int getAreaSize();",
"public double getArea() {\n\t\treturn this.area;\n\t}",
"public String getArea() {\n\t\treturn area;\n\t}",
"public abstract float area();",
"@Override\n\tpublic double area() {\n\t\t// TODO Auto-generated method stub\n\t\treturn 0;\n\t}",
"@Override\n public double area() {\n return width * length;\n }",
"public Integer getArea() {\n\t\treturn this.getX() * this.getY();\n\t}",
"public int getArea()\n {\n return this.length * this.width;\n }",
"@Override\n\tpublic void computeArea() {\n\t\tthis.area = length * length;\t\t\t\t\n\t}",
"@Override\n\tpublic double getArea() {\n\t\treturn Math.pow(getSide(), 2) * this.N / 4 * (Math.tan(Math.toRadians(180 / this.N)));\n\t}",
"public double get_Area() {\n return this.Area;\n }",
"public double area() {\n\t\treturn width * height;\n\t}",
"public float getArea() {\n return area;\n }",
"public double area(){\n return (base*height) / 2;\n }",
"double getArea(){\n return height*width;\n }",
"@Override\n\tpublic double getArea() {\n\t\treturn (this.getPerimetro()*Math.sqrt(Math.pow(getLongitudLado(), 2))-(Math.pow((getLongitudLado()/2), 2)))/2;\n\t}",
"@Override\r\n\tpublic double area() {\r\n\r\n\t\treturn this.sideA*this.sideB;\r\n\t}",
"public void claShapeArea(){\r\n\t\tshape.calArea();\r\n\t}",
"public double getArea() {\n\t\treturn height * length;\n\t}",
"public float getArea(){\n return area;\n\t}",
"Double getAreaValue();",
"AREA createAREA();",
"@Override\n\tpublic double getArea()\n\t{\n\t\treturn isAtivado() ? calculaArea(getDiametro()) : 0.0;\n\t}",
"public JQLayoutArea getArea()\n {\n return area;\n }",
"void calculateArea() {\n this.setArea(this.getArea()/2);\n }",
"@Override\n\tpublic double area() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic double area() {\n\t\treturn 0;\n\t}",
"public double getArea(){\n return 3.14 * radius * radius;\n }",
"public double getArea() {\n return this.length * this.width;\n }",
"public void setArea() {\n\t\tthis.area= height*width;\n\t}",
"@Override\r\n public double getArea() {\r\n double area=length*breadth;\r\n return area;\r\n }",
"public double getArea() {\n return ((this.xR - this.xL) * (this.yT - this.yD));\n }",
"@Override\n public double area()\n {\n\treturn (double) length * width;\n }",
"@Override\n\tpublic double computeArea()\n\t{\n\t\treturn\n\t\t\t\tthis.length * this.width;\n\t}",
"public double area() {\n return (width * height);\n }",
"public double getArea() {\n\t\treturn 4.0 * Math.PI * this.radius * this.radius;\n\t}"
] | [
"0.85952944",
"0.83387566",
"0.83387566",
"0.83387566",
"0.82352257",
"0.82212865",
"0.80684865",
"0.80120105",
"0.80120105",
"0.80044156",
"0.7993453",
"0.7989818",
"0.7964493",
"0.79349273",
"0.7866042",
"0.7866035",
"0.7807512",
"0.7807512",
"0.7807512",
"0.77984065",
"0.779658",
"0.7792583",
"0.77910775",
"0.77910775",
"0.7778384",
"0.7762876",
"0.77069616",
"0.7692204",
"0.7692204",
"0.76450676",
"0.76431483",
"0.76310676",
"0.76020944",
"0.75927305",
"0.7566492",
"0.75572765",
"0.75496006",
"0.7534931",
"0.75223297",
"0.7515895",
"0.7515895",
"0.7507882",
"0.7507882",
"0.7507882",
"0.7507882",
"0.7491816",
"0.748409",
"0.748409",
"0.7455166",
"0.74312603",
"0.74269265",
"0.74167603",
"0.74073136",
"0.7405513",
"0.7398653",
"0.7388986",
"0.738754",
"0.7385433",
"0.73796254",
"0.7377374",
"0.73608303",
"0.73418105",
"0.73418105",
"0.73418105",
"0.73411864",
"0.73387325",
"0.73271936",
"0.7315019",
"0.7266854",
"0.7251211",
"0.72372544",
"0.7236694",
"0.72228545",
"0.7217155",
"0.7210082",
"0.7174469",
"0.71708083",
"0.7160376",
"0.7147446",
"0.71261597",
"0.710598",
"0.7100026",
"0.70951134",
"0.708179",
"0.70755804",
"0.7070517",
"0.70695776",
"0.7063462",
"0.70587105",
"0.7057372",
"0.7057372",
"0.7053549",
"0.7052089",
"0.702933",
"0.70279056",
"0.6962315",
"0.69607717",
"0.69602144",
"0.6952613",
"0.69455624"
] | 0.7410624 | 52 |
override string method to return triangle values | @Override
public String toString() {
return "Triangle base: " + base + ", Triangle height: " + height + ", Triangle color: " + super.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String toString(){\n\t\treturn (\"this triangle has side 1 of length\"+side1+\"side 2 of length\"+side2+\"and side 3 of length\"+side3);\n\t}",
"public String toString(){\n return \"Triangle: side1 = \" + side1 + \" side2 = \" + side2 + \" side3 = \" + side3;\n }",
"@Override\n\tpublic String toString() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (int i = 0; i < 9; i += 1) {\n\t\t\tif (i % 3 == 0)\n\t\t\t\tsb.append(\"\\n\");\n\t\t\tsb.append(triangleCoords[i] + \" \");\n\t\t}\n\t\treturn sb.toString() + \"\\n\";\n\t}",
"public String toString() {\n\t\treturn \"Triangle with side1 = \" +side1+ \", side2 = \" +side2+ \", side3 = \" +side3;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn \"(Triangle \"+verts+\")\" ;\n\t}",
"public String toString() {\n\treturn triangles.toString(); \n }",
"@Override\n\tpublic String toString() {\n\t\treturn \"Triangulo [b_=\" + b_ + \", h_=\" + h_ + \", Area=\" + Area() +\n\t\t\", Diameter=\" + super.Perimeter() + \", Diagonals=\" + super.Diagonals() +\"]\";\n\t}",
"public Triangle(String stringTriangle) {\n setPointsAs0();\n setPoints(stringTriangle);\n setRibs();\n calculateBaseAndHeight();\n calculateS();\n }",
"public String printTriangle(int number){\n StringJoiner joiner = new StringJoiner(\"\\n\");\n\n for (int count = 1; count <= number; count++) {\n joiner.add(printAsteriskN(count));\n }\n return joiner.toString();\n }",
"@Override public String toString() {\n\t\tif (this.valido == true) \t\n\t \t\treturn String.format(\"Il quadrato di vertici %s %s %s %s ha perimetro %.2f e area %.2f\", this.vertici[0].toString(),\n\t\t\tthis.vertici[1].toString(), this.vertici[2].toString(), this.vertici[3].toString(),this.calcolaPerimetro(),this.calcolaArea());\n\t\telse return (\"Quadrato non valido\");\n\t}",
"public void triangulo() {\n fill(0);\n stroke(255);\n strokeWeight(5);\n triangle(width/2, 50, height+100, 650, 350, 650);\n //(width/2, height-100, 350, 150, 900, 150);\n }",
"public static void printTriangle(String word)\n\t{\n\t\tString current = word.substring(0,1);\n\t\tint amount = 1;\n\t\tfor(int i = 1; i <= word.length(); i++) \n\t\t{\n\t\t\tcurrent = word.substring(0, i);\n\t\t\tfor(int y = 0; y < amount; y++) {\n\t\t\t\tSystem.out.print(current);\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\");\n\t\t\tamount += 1;\n\t\t}\n\t\t\n\t}",
"public String tri4(int h){\n\t\tString S = \"\";\n\t\tint H = h;\n\t\tint HH = H;\n\t\tint Counter = 0;\n\t\tint UsingCounter = Counter;\n\n\t\twhile (H > 0){\n\t\t\tHH = H;\n\t\t\twhile (UsingCounter > 0){\n\t\t\t\tS = S + \" \";\n\t\t\t\tUsingCounter = UsingCounter - 1;}\n\t\t\twhile (HH > 0) {\n\t\t\t\tS = S + \"*\";\n\t\t\t\tHH = HH - 1;}\n\t\t\tCounter = Counter + 1;\n\t\t\tUsingCounter = Counter;\n\t\t\tS = S + \"\\n\";\n\t\t\tH = H - 1;}\n\n\t\treturn S; }",
"private void parseTriangle(String line) {\n String first_integer = line.substring(2);\n first_integer = first_integer.trim();\n int second_space_index = first_integer.indexOf(' ') + 1;\n String second_integer = first_integer.substring(second_space_index);\n second_integer = second_integer.trim();\n int third_space_index = second_integer.indexOf(' ') + 1;\n String third_integer = second_integer.substring(third_space_index);\n third_integer = third_integer.trim();\n\n parseTriplet(first_integer.substring(0, second_space_index - 1));\n parseTriplet(second_integer.substring(0, third_space_index - 1));\n parseTriplet(third_integer);\n }",
"public String generateString() {\n List<Trip<String, String, String>> sequence = super.generateSequence(startTrip, endTrip);\n sequence = sequence.subList(1, sequence.size()-1);\n String generated = \"\";\n for (int i = 0; i<sequence.size()-2; i++) generated += sequence.get(i).getThird() + \" \";\n return generated.substring(0, generated.length()-1);\n }",
"@Test\n\tpublic void whenDrawTriangle() {\n\t\tnew Paint().draw(new Triangle());\n\t\tStringBuilder expected = new StringBuilder()\n\t\t\t\t.append(\" +\")\n\t\t\t\t.append(System.lineSeparator())\n\t\t\t\t.append(\" +++\")\n\t\t\t\t.append(System.lineSeparator())\n\t\t\t\t.append(\" +++++\")\n\t\t\t\t.append(System.lineSeparator())\n\t\t\t\t.append(\"+++++++\")\n\t\t\t\t.append(System.lineSeparator());\n\t\tassertThat(new String(out.toByteArray()), is(expected.toString()));\n\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\tString newString = \"\";\r\n\r\n\t\tfor (int i = factors.length - 1; i > 0; i--) {\r\n\t\t\tnewString = newString + factors[i].toString() + \"*z^\" + i + \"+\";\r\n\t\t}\r\n\t\t// jos za nulu\r\n\t\treturn newString + factors[0].toString();\r\n\t}",
"public EquilateralTriangle( String name, double length) {\n super(name, 3, length);\n }",
"@Override\r\n\tpublic String toString() {\n\t\treturn \"(\" + Double.toString(x) + \", \" + Double.toString(y) + \", \" + Double.toString(z) + \")\";\r\n\t\t// String.format is cleaner, but Double.toString appears to have behavior closer to that of the old editor\r\n//\t\treturn String.format(\"(%f, %f, %f)\", x, y, z);\r\n\t}",
"public float triangle(int base, int height, String unit) {\r\n\t\tif(base<0 || height<0) {\r\n\t\t\treturn -1;//Negative values\r\n\t\t}\r\n\t\tif(unit.equals(\"cms\") || unit.equals(\"inches\")) {\r\n\t\t\treturn 0.5f*base*height;\r\n\t\t}else{\r\n\t\t\treturn -2; //Unit is neither cms nor inches\r\n\t\t}\r\n\t\t\r\n\t}",
"@Override\n public String toString(){\n return x+\"\\n\"+y+\"\\n\"+z;\n }",
"@Override\r\n public String toString() {\r\n return String.format(\"%s:\\n%s\", \"Coordinates of Quadrilateral are\", getCoordinatesAsString());\r\n }",
"@Override\n\tpublic String toString() {\n\t\treturn String.format(\"(%f, %f, %f)\", x, y, z);\n\t}",
"Triangle(){\n side1 = 1.0;\n side2 = 1.0;\n side3 = 1.0;\n }",
"private double triangleBase() {\n return cellWidth() / BASE_WIDTH;\n }",
"public Triangle( Point p1, Point p2, Point p3 ) {\n super(\"Triangle: \");\n this.setP1(p1);\n this.setP2(p2);\n this.setP3(p3);\n }",
"public int getTriangleCount();",
"@Override\n public String toString() \n\t{\n\t\t// This is just for the output format\n\t\tString sg = \"\";\n\t\tsg = sg + \"(\";\n\t\tsg = sg + x;\n\t\tsg = sg + \", \";\n\t\tsg = sg + y;\n\t\tsg = sg + \") \";\n\t\t\n\t\treturn sg;\n\n\t}",
"public Triangle(int x1, int y1, int x2, int y2, int x3, int y3, String name){\n this.x1 = x1;\n this.y1 = y1;\n this.x2 = x2;\n this.y2 = y2;\n this.x3 = x3;\n this.y3 = y3;\n this.name = name;\n \n \n }",
"public void afficheType() {\n\t\tint type=triangleType();\n\t\tif(type==2) {\n\t\t\tSystem.out.println(\"C'est un triangle isocèle equilatérale\");\n\t\t}else if(type==1){\n\t\t\tSystem.out.println(\"C'est un triangle isocèle\");\n\t\t}else {\n\t\t\tSystem.out.println(\"C'est un triangle quelconque\");\t\n\t\t}\n\t}",
"public String toString() {\r\n\t\tStringBuilder stringBuilder = new StringBuilder();\r\n stringBuilder\r\n .append(this.x).append(\" \")\r\n .append(this.y).append(\" \")\r\n .append(this.z);\r\n\t\treturn stringBuilder.toString();\r\n }",
"public Triangle (int x, int y, int z){ \r\n \r\n \r\n }",
"String toStringBackwards();",
"String toStringStartValues();",
"@Override\n\tpublic String toString()\n\t{\n\t\tString ppString = \"\";\n\t\tif(x >= 0)\n\t\t\tppString += \"+\";\n\t\telse\n\t\t\tppString += \"-\";\n\t\tif(x >= 10 || x <= -10)\n\t\t\tppString += Math.abs(x);\n\t\telse\n\t\t\tppString += \"0\" + Math.abs(x);\n\t\tif(y >= 0)\n\t\t\tppString += \"+\";\n\t\telse\n\t\t\tppString += \"-\";\n\t\tif(y >= 10 || y <= -10)\n\t\t\tppString += Math.abs(y);\n\t\telse\n\t\t\tppString += \"0\" + Math.abs(y);\n\t\treturn ppString;\n\t}",
"public String toString(){\n String string = new String();\n for(int i = 0; i < axis.length; i++){\n string += axis[i];\n if(i != (axis.length - 1)){\n string += \" / \";\n }\n }\n return string;\n }",
"private String getPoints(){\n\t\tString pu = \" punts.\";\n\t\tif(points == 1){\n\t\t\tpu = \" punt.\";\n\t\t}\n\t\treturn \"Puntuació de \" + points + pu;\n\t}",
"public String toString() {\n return (\"(\" + x + \", \" + y + \", \" + z + \")\");\n }",
"public Triangle() { \n super(\"Triangle: \");\n this.setP1(new Point());\n this.setP2(new Point());\n this.setP3(new Point());\n }",
"@Override\r\n\tpublic String toString() {\n\t\treturn \"\" + get3 + 'A';\r\n\t}",
"@Override\n public String toString()\n {\n String temp = \"[\";\n String areaVal = String.format(\"%5.2f\", area);\n\n\n for(int i = 0; i < sides; i++)\n {\n temp += poly[i].toString();\n }\n\n temp += \"]: \"+ areaVal;\n this.print = temp;\n return temp;\n }",
"public static Triangle getTriangle(String[] inputArgs) {\n\t\tif(inputArgs.length != 7)\n\t\t\tthrow new IllegalArgumentException();\n\t\treturn new Triangle(\n\t\t\t\t\t\t\tInteger.parseInt(inputArgs[1]),\n\t\t\t\t\t\t\tInteger.parseInt(inputArgs[2]),\n\t\t\t\t\t\t\tInteger.parseInt(inputArgs[3]),\n\t\t\t\t\t\t\tInteger.parseInt(inputArgs[4]),\n\t\t\t\t\t\t\tInteger.parseInt(inputArgs[5]),\n\t\t\t\t\t\t\tInteger.parseInt(inputArgs[6])\n\t\t\t\t\t\t\t);\n\t}",
"public String toString() {\r\n\t\treturn \"(\" + this.x + \",\" + this.y + \",\" + this.z + \")\";\r\n\t}",
"public String getVals(){\n return (\"a: \" + a + \"\\nr: \" + r + \"\\nb: \" + b + \"\\ng: \" + g);\n }",
"public Triangle(){\n\t\tside1=1.0;\n\t\tside2=1.0;\n\t\tside3=1.0;\n\t}",
"@Override\r\n public String toString(){\n return x + \", \" + y + \", \" + z ;\r\n }",
"Triangle (double side1, double side2, double side3){\n this.side1 = side1;\n this.side2 = side2;\n this.side3 = side3;\n }",
"public String toCodedString() {\n\t\t//System.out.println(toString());\n\t\treturn String.format(\"%s%s\", getColor().toInt(), getShape().toString());\n\t}",
"public EquilateralTriangle(double length) {\n super(\"Equilateral Triangle\", 3, length);\n }",
"public String toString() {\n StringBuilder s = new StringBuilder();\n String NEWLINE = System.getProperty(\"line.separator\");\n s.append(vertices + \" \" + NEWLINE);\n for (int v = 0; v < vertices; v++) {\n s.append(String.format(\"%d: \", v));\n for (Map.Entry<Integer, Integer> e : adjacent(v).entrySet()) {\n s.append(String.format(\"%d (%d) \", e.getKey(), e.getValue()));\n }\n s.append(NEWLINE);\n }\n return s.toString();\n }",
"public String toString(){\r\n String result = \"[ \";\r\n result = result + vertex + \" ]\";\r\n return result;\r\n }",
"public String toString() {\n\t\tString returnString=\"\";\n\t\t\n\t\tfor (int i=0; i<squares.length; i++) {\n\t\t\tfor (int j=0; j<squares.length; j++) {\n\t\t\t\treturnString+=Character.toString(squares[i][j].getValue());\n\t\t\t}\n\t\t\treturnString+=\"// \";\n\t\t}\n\t\t\n\t\treturn returnString;\n\t}",
"public String getRedArrows() {\n return \" \\n\" +\n \" \\n\" +\n \" RRRRRRRR \\n\" +\n \" RRRRRRRR \\n\" +\n \" RRRRRRRR \\n\" +\n \" RR RRRRRRRR RR \\n\" +\n \" RRRRRRRRRRRRRR \\n\" +\n \" RRRRRRRRRRRR \\n\" +\n \" RRRRRRRRRR \\n\" +\n \" RRRRRRRR \\n\" +\n \" RRRRRR \\n\" +\n \" RRRR \\n\";\n\n }",
"private String vertexNamesAndCoordsToString() {\n \n //make empty string\n String s = \"\";\n \n //add # of vertices & line break\n s += N + \"\\n\";\n \n //for loop to add names/coords to it\n for (int i = 0; i < arrayOfVertices.length; i++) {\n \n //add vertex name, xcoord, & ycoord separated by spaces \n s += arrayOfVertices[i].getName() + \" \" \n + arrayOfVertices[i].getX() + \" \" \n + arrayOfVertices[i].getY() + \"\\n\"; \n \n }\n \n //return the string\n return s;\n \n }",
"public String toString()\n\t{\t\n\t\tString a = \"\";\n\t\tint counter = 0; //counting how many points we have added to one line so far\n\t\tfor(int i = 0; i < hullVertices.length; i++) //iterate through the whole array\n\t\t{\n\t\t\tif(counter == 5) //go to a new line if you have added 5 points\n\t\t\t{\n\t\t\t\ta += \"\\n\";\n\t\t\t\tcounter = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//add point as a string and increment the counter\n\t\t\t\tString point = hullVertices[i].toString();\n\t\t\t\ta += point;\n\t\t\t\ta += \" \";\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t}\n\t\treturn a; \n\t}",
"public Triangle() {}",
"@Test(testName = \"VerificationCheckTriangleReturnedMessage\", dataProvider = \"verifyCheckTrianglePositiveTests\")\n public void verifyCheckTriangleReturnedMessage(ArrayList<Double> sides) {\n String excpected = \"\";\n Triangle triangle = new Triangle(sides.get(0), sides.get(1), sides.get(2));\n triangle.checkTriangle();\n assertEquals(triangle.getMessage(), excpected, \"method 'checkTriangle' returned wrong string message, sides: \" + sides);\n }",
"private String cacViTri(int i) {\n\t\tString gio = \"\";\n\t\tfor (int j = 0; j < arrInt.length; j++) {\n\t\t\tif (this.arrInt[j] == i) {\n\t\t\t\tgio += j + \" \";\n\t\t\t}\n\t\t}\n\t\treturn gio;\n\t}",
"@Override\n public String toString() {\n return this.area + \"/\" + this.aisle + \"/\" + this.x + \"/\" + this.y + \"/\" + this.z;\n }",
"@Override\n public String[] getStrings(){\n String[] scoreString = new String[2];\n if(scores[0] == 10){\n scoreString[0] = \"X\";\n scoreString[1] = \"\";\n }else if(scores[0] + scores[1] == 10){\n scoreString[0] = Integer.toString(scores[0]);\n scoreString[1] = \"/\";\n }else{\n scoreString[0] = Integer.toString(scores[0]);\n scoreString[1] = Integer.toString(scores[1]);\n }\n return scoreString;\n }",
"String getQudrant(String v, String h) {\n\r\n\t\tif (v == null || h == null) {\r\n\t\t\treturn \"0_0\";\r\n\t\t} else if ((Vertikal.indexOf(v) == -1) || (Horizontal.indexOf(h) == -1)) {\r\n\t\t\treturn \"0_0\";\r\n\t\t}\r\n\r\n\t\tint dlinaStoronaQuadrant = 64;\r\n\r\n\t\tint numQuadrantV = Vertikal.indexOf(v) * dlinaStoronaQuadrant;\r\n\t\tint numQuadrantH = Horizontal.indexOf(h) * dlinaStoronaQuadrant;\r\n\r\n\t\treturn Integer.toString(numQuadrantV) + \"_\"\r\n\t\t\t\t+ Integer.toString(numQuadrantH);\r\n\r\n\t}",
"public static String getQuestion() {\n\t\treturn \"3) A line in the xy-plane passes through the origin and has a slope of 1/7. Which of \\\\n\"+\"the following points lies on the line?\";\n\t}",
"public static String makeShapeA() {\n\tString result = \"\";\n\t\tfor (int i = 0; i < 8 ; i++) {\n\t\t\tresult+=printHash(i);\n\t\t\t\n\t\t}return result;\n\t\t\t//System.out.println(printHash(i));\n\t\t}",
"public Triangle(double s1, double s2, double s3){\n\t\tside1=s1;\n\t\tside2=s2;\n\t\tside3=s3;\n\t}",
"public String toString() {\n String result = super.toString() + \"\\n\";\n result += \"The side length is: \" + sideLength;\n return result;\n }",
"public String toString(){\n return (\"TextShape \"+x+\" \"+y+\" \"+col.getRed()+\" \"+col.getGreen()+\" \"+col.getBlue()+\" \"+str);\n }",
"@Override\n public String toString() {\n String r = \"\" + value[0];\n for (int i = 1; i < DIM; i++) {\n r += DELIMITER + value[i];\n }\n \n r += DELIMITER + count;\n\n return r;\n }",
"static void testTriangle(Point a, Point b, Point c){\n Triangle tri1 = new Triangle(a,b,c);\n System.out.printf(\"Perimeter of triangle=%.2f\",tri1.calculatePerimeter());\n System.out.printf(\"->%b\\n\", String.format(\"%.2f\", tri1.calculatePerimeter()).equals(\"13.66\"));\n System.out.printf(\"Area of triangle=%.2f\", tri1.calculateArea());\n System.out.printf(\"->%b\\n\", String.format(\"%.2f\", tri1.calculateArea()).equals(\"8.00\"));\n System.out.print(tri1); //prints the return value from tri1.toString()\n }",
"public Triangle() {\n\t\tsuper();\n\t\tthis.base = 0;\n\t\tthis.height = 0;\n\t\t\n\t}",
"public Polygon getTriangle() {\n\n Matrix4 normalProjection = new Matrix4().setToOrtho2D(0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());\n\n spriteDebugger.setProjectionMatrix(normalProjection);\n spriteDebugger.begin(ShapeRenderer.ShapeType.Line);\n spriteDebugger.polygon(getLine().getVertices());\n spriteDebugger.setColor(Color.PURPLE);\n spriteDebugger.end();\n\n spriteDebugger.end();\n return getLine();\n }",
"public Triangle( Triangle tri ) {\n super(\"Triangle: \");\n this.setP1( new Point( tri.getP1() ) );\n this.setP2( new Point( tri.getP2() ) );\n this.setP3( new Point( tri.getP3() ) );\n }",
"String toStringEndValues();",
"public Triangle() {\n\t\tsuper.addPoint(new java.awt.Point(0,1));\n\t\tsuper.addPoint(new java.awt.Point(1,0));\n\t\tsuper.addPoint(new java.awt.Point(2,1));\n\t}",
"public String toString() {\n\t\tString r = \"\";\n\t\tchar[][] a = toMatrix();\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tfor (int j = 0; j < 3; j++) {\n\t\t\t\tif (a[i][j] == '\\0')\n\t\t\t\t\tr += \"-\";\n\t\t\t\telse\n\t\t\t\t\tr += a[i][j];\n\t\t\t}\n\t\t\tr += \"\\n\";\n\t\t}\n\t\treturn r.substring(0, r.length() - 1);\n\t}",
"@Override\n public String toString(){\n return \"{@\" + vecOne.getSteps() + \"; @\" + vecTwo.getSteps() + \"}\";\n }",
"protected abstract String getZ();",
"public String getColorString() {\n return left.toString() + \", \" + right.toString();\n }",
"public String toString() {\n // DecimalFormat class is used to format the output\n DecimalFormat df = new DecimalFormat(\".0\");\n return \"\\nCoordinates of Parallelogram are:\\n\"\n + super.toString()\n + \"\\nWidth is :\"\n + df.format(width)\n + \"\\nHeight is :\"\n + df.format(height)\n + \"\\nArea is :\"\n + df.format(area());\n }",
"public Triangle() {\n setPointsAs0();\n S = 0;\n }",
"public static void PascalTriangle(int rowCount)\n {\n int num, r;\n\n for (int lineNumber =0; lineNumber<=rowCount; lineNumber++){\n String outputLine = \"\";\n\n num = 1;\n r = lineNumber + 1;\n for (int space = rowCount - lineNumber; space > 0; space--) {\n System.out.print(\" \");\n }\n for(int count =0; count<=lineNumber;count++)\n {\n if (count > 0) {\n num = num * (r - count) / count;\n }\n System.out.print(num + \" \");\n }\n\n System.out.println(outputLine);\n }\n }",
"public abstract double drawString(AEColor clr, double font_size, String str, double mid_x, double mid_y);",
"protected abstract String format();",
"protected String garments() {\n StringBuilder sb = new StringBuilder();\n System.out.println(\"Cuts Made:\");\n sb.append('[');\n coordinateToString(sb, 0);\n sb.deleteCharAt(sb.length() - 1);\n sb.deleteCharAt(sb.length() - 1);\n sb.append(']');\n return sb.toString();\n }",
"public String toMathString(){\n String string = \"{\\n\" + nrVertices + \",\\n{\\n\";\n boolean firstElem = true;\n for(DEdge edge : edges){\n if(!firstElem){\n string += \",\";\n }\n else{\n firstElem = false;\n }\n string += \"{\" + (edge.getVertex1()+1) + \",\" + (edge.getVertex2()+1) + \"},\" + (edge.getWeight());\n }\n string += \"\\n}\\n}\\n\";\n return string;\n }",
"public TriangleGizmo(String name, double x1, double y1) {\n\t\t\tdouble w = 20;\n\t\t\tdouble h = 20;\n\t\t\txpos1 = x1*20;\n\t\t\txpos2 = (x1*20) + w;\n\t\t\txpos3 = xpos2;\n\t\t\typos1 = y1*20;\n\t\t\typos2 = y1*20;\n\t\t\typos3 = ypos2 + h;\n\t\t\twidth = w;\n\t\t\theight = h;\n\t\t\tcolour = Color.WHITE;\n\t\t\tls1 = new LineSegment(x1*20, y1*20, xpos2, ypos2);\n\t\t\tls2 = new LineSegment(xpos2, ypos2, xpos3, ypos3);\n\t\t\tls3 = new LineSegment(x1*20, y1*20, xpos3, ypos3);\n\t\t\tsetName(name);\n\t\t}",
"public void triangle(){\n Shape triangle = new Shape();\n triangle.addPoint(new Point(0,0));\n triangle.addPoint(new Point(6,0));\n triangle.addPoint(new Point(3,6));\n for (Point p : triangle.getPoints()){\n System.out.println(p);\n }\n double peri = getPerimeter(triangle);\n System.out.println(\"perimeter = \"+peri);\n }",
"@Override\n public String toString() {\n String result = \"\";\n\n for (int position = 0; position < 64; position++) {\n if (position > 0) {\n if (position % 16 == 0) { // New level\n result += '|';\n } else if (position % 4 == 0) {\n result += ' '; // New row\n }\n }\n result += get(position);\n }\n return result;\n }",
"public String toString() {\n\t\treturn \"<\" + x + \", \" + y + \", \" + z + \">\";\n\t}",
"public String toString()\n {\n return (\"x,y\" + x + y);\n }",
"@Override\r\n\tpublic String getFormatedCoordinates() {\n\t\treturn \"Drone position: (\"+x+\",\"+y+\",\"+z+\")\";\r\n\t}",
"private String zxt (long inp, int length) {\n String result = Long.toString(inp);\n int dist = (length - result.length());\n for (int i = 0; i < dist; i++) {\n result = \"0\" + result;\n }\n return result;\n }",
"public PascalTriangleException(String message)\r\n {\r\n\tsuper(message);\r\n }",
"@Override\n public String toString() {\n if (isValid()) {\n return String.format(\n Locale.US,\n \"%+02f%+02f%s/\",\n coordinates.get(1), coordinates.get(0), coordinateSystem.toString());\n }\n return \"\";\n }",
"protected abstract Triangle makeTriangle(final Vector3d edge1, final Vector3d edge2,\n\t\t\tfinal Vector3d edge3);",
"public String toString() {\n\t\treturn \"LINE:(\"+startPoint.getX()+\"-\"+startPoint.getY() + \")->(\" + endPoint.getX()+\"-\"+endPoint.getY()+\")->\"+getColor().toString();\n\t}",
"public String toString()\n {\n return color.charAt(0) + \"Q\";\n }",
"@Override\n\tpublic String toString(){\n\t\tStringBuilder sb = new StringBuilder();\n\t\tString[] dimensions = {\"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\", \"r\", \"s\", \"t\", \"u\", \"v\", \"z\"};\n\t\t\n\t\tsb.append(\"V = \");\n\t\tsb.append(this.get(0));\n\t\tsb.append(dimensions[0]);\n\t\tfor(int i=1; i<this.getDimension(); i++){\n\t\t\tsb.append(\" + \");\n\t\t\tsb.append(this.get(i));\n\t\t\tsb.append(dimensions[i]);\n\t\t}\n\t\t\t\t\n\t\treturn sb.toString();\n\t}",
"@Override\n public String toString() {\n return String.format(\"(%d,%d)\", x, y);\n }",
"public String getColorString();",
"private void drawTriangle(double newVal) {\n\n triangle.getPoints().clear();\n triangle.getPoints().addAll(getEndX(), getEndY(), getEndX() - Point.RADIUS / 2.0,\n getEndY() + Point.RADIUS * 5 / 4.0 * (newVal) / (getAbsMax()), getEndX() + Point.RADIUS / 2.0,\n getEndY() + Point.RADIUS * 5 / 4.0 * (newVal) / getAbsMax());\n\n }"
] | [
"0.7280948",
"0.69401485",
"0.6915968",
"0.6899869",
"0.684195",
"0.6588906",
"0.6270934",
"0.62449336",
"0.62289697",
"0.60803026",
"0.6046326",
"0.59828097",
"0.59277385",
"0.5864218",
"0.5854696",
"0.5833157",
"0.5782576",
"0.5778642",
"0.5743682",
"0.5737757",
"0.5734051",
"0.5685049",
"0.5665267",
"0.56497246",
"0.5575685",
"0.5563285",
"0.5532909",
"0.55267936",
"0.551401",
"0.5490898",
"0.54887056",
"0.54752415",
"0.5467806",
"0.54574454",
"0.54559624",
"0.54508567",
"0.5446582",
"0.5444516",
"0.5422567",
"0.5414226",
"0.54090005",
"0.54040575",
"0.5401333",
"0.54001904",
"0.53969693",
"0.53948313",
"0.53794074",
"0.5357939",
"0.5348697",
"0.5343266",
"0.53402704",
"0.5332356",
"0.5332241",
"0.53184164",
"0.5305011",
"0.53036994",
"0.5296153",
"0.5291283",
"0.5285498",
"0.52823436",
"0.5279037",
"0.5277813",
"0.52751297",
"0.52716464",
"0.5271344",
"0.527079",
"0.52691585",
"0.52627194",
"0.5253419",
"0.52523464",
"0.5242024",
"0.5241846",
"0.5238039",
"0.5235541",
"0.5226802",
"0.521639",
"0.52130336",
"0.5210901",
"0.5210156",
"0.520958",
"0.520748",
"0.5203829",
"0.5200006",
"0.51920575",
"0.51839006",
"0.5177482",
"0.51722324",
"0.5170193",
"0.5167809",
"0.51512444",
"0.5148588",
"0.51480323",
"0.51471555",
"0.5147007",
"0.5146627",
"0.51430464",
"0.513647",
"0.5133436",
"0.5126359",
"0.51258856"
] | 0.6504503 | 6 |
Override inherited getArea() to provide implementation | @Override
public double getArea() {
return (0.5 * (base * height));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract int getArea();",
"public abstract double getArea();",
"public abstract double getArea();",
"public abstract double getArea();",
"public abstract String getArea();",
"public abstract float getArea();",
"@Override\r\n\tpublic double getArea() {\n\t\treturn (this.base * this.height)/2;\r\n\t}",
"@Override\r\n\tpublic double getArea() {\r\n\t\treturn width * height;\r\n\t}",
"@Override\r\n\tpublic double getArea() {\r\n\t\treturn width * height;\r\n\t}",
"@Override\n\tpublic double getArea() {\n\t\treturn height * width;\n\t}",
"@Override\n\tpublic double getArea() {\n\t\treturn (0.5*this.base*this.height);\n\t}",
"@Override\r\n\tpublic void calcArea() {\n\t\t\r\n\t}",
"@Override\n public double getArea() {\n return this.length*this.width; //To change body of generated methods, choose Tools | Templates.\n }",
"@Override\r\n\tpublic double getArea() {\n\t\tdouble Area1 = ((super.getLength() * height));\r\n\t\tdouble Area2 = ((super.getWidth() * height));\r\n\t\treturn (Area1 * 2 + Area2 * 2 + super.getArea() * 2);\r\n\t\t\r\n\t}",
"public double getArea() {\n\t\treturn super.getArea()*height;\r\n\t}",
"public double getArea();",
"public double getArea();",
"public double getArea();",
"@Override\r\n public double area() {\n return height*width;\r\n }",
"@Override\r\n\tpublic void getarea(int a) {\n\t\t\r\n\t}",
"@Override\n public double getArea() {\n return width * width;\n }",
"double getArea();",
"double getArea();",
"public double getArea()\r\n\t{\r\n\t\treturn(super.getHeight()*super.getWidth());\r\n\t}",
"public abstract float calArea();",
"public Rectangle getArea() {\n return area;\n }",
"abstract void findArea();",
"abstract void findArea();",
"@Override\n\tpublic void calcularArea() {\n\t\t\n\t}",
"public abstract Area newArea();",
"@Override\n\tpublic double getArea() {\n\t\treturn width * length;\n\t}",
"public int getArea() {\n\t\treturn this.height * this.width;\n\t}",
"@Override\n public double getArea() {\n double area = this.length*this.width;\n return area;\n }",
"@Override\r\n\t\tpublic int Area() {\n\t\t\treturn width*width\t;\r\n\t\t}",
"@Override\n\tpublic double area() {\n\t\treturn getBase()*getAltura();\n\t}",
"double getArea() {\n return width * height;\n }",
"public String getArea() {\n return this.area;\n }",
"@Override\n public double obtenerArea(){\n return c.obtenerArea() * 4;\n }",
"public abstract double calculateArea();",
"public abstract double calculateArea();",
"abstract double area();",
"abstract double area();",
"abstract double area();",
"abstract double area();",
"public abstract double calcBaseArea();",
"@Override\n\tpublic double getArea() {\n\t\treturn width*length;\n\t}",
"@Override\n\tpublic double getArea() {\n\t\treturn width*length;\n\t}",
"public int getArea() {\n\t\treturn area;\n\t}",
"@Override\r\n\tpublic Area getBoundsArea() {\n\t\treturn null;\r\n\t}",
"@Override\n public double getArea() {\n return (int) this.radiusX * (int) this.radiusY * Math.PI;\n }",
"public int getArea()\n {\n return area;\n }",
"@Override\r\n public double getArea() {\r\n return (length * width);\r\n }",
"@Override\r\n public double calculateArea() {\n double area = 0;\r\n return area;\r\n }",
"@Override\n\tpublic double getArea() {\n\t\treturn (2 + 2 * (Math.sqrt(2))) * side * side; // JA\n\t}",
"public double getArea()\n {\n return area;\n }",
"public abstract double computeArea();",
"public int area() {\n \tarea = width()*height();\n }",
"@Override\n public double getArea() {\n return 0;\n }",
"protected double getArea()\r\n {\r\n return ( side * side ) / 2;\r\n }",
"public String getArea() {\n return area;\n }",
"public int getArea() {\n return (getXLength() * getYWidth());\n }",
"public String getArea() {\n return area;\n }",
"public String getArea() {\n return area;\n }",
"public String getArea() {\n return area;\n }",
"int getAreaSize();",
"public double getArea() {\n\t\treturn this.area;\n\t}",
"public String getArea() {\n\t\treturn area;\n\t}",
"public abstract float area();",
"@Override\n\tpublic double area() {\n\t\t// TODO Auto-generated method stub\n\t\treturn 0;\n\t}",
"@Override\n public double area() {\n return width * length;\n }",
"public Integer getArea() {\n\t\treturn this.getX() * this.getY();\n\t}",
"public int getArea()\n {\n return this.length * this.width;\n }",
"@Override\n\tpublic void computeArea() {\n\t\tthis.area = length * length;\t\t\t\t\n\t}",
"@Override\n\tpublic double getArea() {\n\t\treturn Math.pow(getSide(), 2) * this.N / 4 * (Math.tan(Math.toRadians(180 / this.N)));\n\t}",
"public double get_Area() {\n return this.Area;\n }",
"public double area() {\n\t\treturn width * height;\n\t}",
"public float getArea() {\n return area;\n }",
"public double area(){\n return (base*height) / 2;\n }",
"double getArea(){\n return height*width;\n }",
"@Override\n\tpublic double getArea() {\n\t\treturn (this.getPerimetro()*Math.sqrt(Math.pow(getLongitudLado(), 2))-(Math.pow((getLongitudLado()/2), 2)))/2;\n\t}",
"@Override\r\n\tpublic double area() {\r\n\r\n\t\treturn this.sideA*this.sideB;\r\n\t}",
"public void claShapeArea(){\r\n\t\tshape.calArea();\r\n\t}",
"public double getArea() {\n\t\treturn height * length;\n\t}",
"public float getArea(){\n return area;\n\t}",
"Double getAreaValue();",
"AREA createAREA();",
"@Override\n\tpublic double getArea()\n\t{\n\t\treturn isAtivado() ? calculaArea(getDiametro()) : 0.0;\n\t}",
"public JQLayoutArea getArea()\n {\n return area;\n }",
"void calculateArea() {\n this.setArea(this.getArea()/2);\n }",
"@Override\n\tpublic double area() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic double area() {\n\t\treturn 0;\n\t}",
"public double getArea(){\n return 3.14 * radius * radius;\n }",
"public double getArea() {\n return this.length * this.width;\n }",
"public void setArea() {\n\t\tthis.area= height*width;\n\t}",
"@Override\r\n public double getArea() {\r\n double area=length*breadth;\r\n return area;\r\n }",
"public double getArea() {\n return ((this.xR - this.xL) * (this.yT - this.yD));\n }",
"@Override\n public double area()\n {\n\treturn (double) length * width;\n }",
"@Override\n\tpublic double computeArea()\n\t{\n\t\treturn\n\t\t\t\tthis.length * this.width;\n\t}",
"public double area() {\n return (width * height);\n }",
"public double getArea() {\n\t\treturn 4.0 * Math.PI * this.radius * this.radius;\n\t}"
] | [
"0.85952944",
"0.83387566",
"0.83387566",
"0.83387566",
"0.82352257",
"0.82212865",
"0.80684865",
"0.80120105",
"0.80120105",
"0.80044156",
"0.7993453",
"0.7989818",
"0.7964493",
"0.7866042",
"0.7866035",
"0.7807512",
"0.7807512",
"0.7807512",
"0.77984065",
"0.779658",
"0.7792583",
"0.77910775",
"0.77910775",
"0.7778384",
"0.7762876",
"0.77069616",
"0.7692204",
"0.7692204",
"0.76450676",
"0.76431483",
"0.76310676",
"0.76020944",
"0.75927305",
"0.7566492",
"0.75572765",
"0.75496006",
"0.7534931",
"0.75223297",
"0.7515895",
"0.7515895",
"0.7507882",
"0.7507882",
"0.7507882",
"0.7507882",
"0.7491816",
"0.748409",
"0.748409",
"0.7455166",
"0.74312603",
"0.74269265",
"0.74167603",
"0.7410624",
"0.74073136",
"0.7405513",
"0.7398653",
"0.7388986",
"0.738754",
"0.7385433",
"0.73796254",
"0.7377374",
"0.73608303",
"0.73418105",
"0.73418105",
"0.73418105",
"0.73411864",
"0.73387325",
"0.73271936",
"0.7315019",
"0.7266854",
"0.7251211",
"0.72372544",
"0.7236694",
"0.72228545",
"0.7217155",
"0.7210082",
"0.7174469",
"0.71708083",
"0.7160376",
"0.7147446",
"0.71261597",
"0.710598",
"0.7100026",
"0.70951134",
"0.708179",
"0.70755804",
"0.7070517",
"0.70695776",
"0.7063462",
"0.70587105",
"0.7057372",
"0.7057372",
"0.7053549",
"0.7052089",
"0.702933",
"0.70279056",
"0.6962315",
"0.69607717",
"0.69602144",
"0.6952613",
"0.69455624"
] | 0.79349273 | 13 |
/ access modifiers changed from: protected | public void onHandleIntent(Intent intent) {
if (intent != null) {
String action = intent.getAction();
d.b("ThumbDownloadService", "onHandleIntent, action: " + action);
if ("com.coloros.providers.sticker.download.category.thumbnail".equals(action)) {
a(this);
} else if ("com.coloros.providers.sticker.download.sticker.thumbnail".equals(action)) {
b(this);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected void prot() {\n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"private abstract void privateabstract();",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"public void smell() {\n\t\t\n\t}",
"public abstract Object mo26777y();",
"protected void h() {}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"protected abstract Set method_1559();",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"public abstract void mo70713b();",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"protected Doodler() {\n\t}",
"public abstract void mo27386d();",
"@Override\n\tprotected void getExras() {\n\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}",
"private PropertyAccess() {\n\t\tsuper();\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"public abstract void mo56925d();",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void init() {\n }",
"@Override\n protected void getExras() {\n }",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"public abstract void mo27385c();",
"@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\tpublic void dosomething() {\n\t\t\n\t}",
"protected boolean func_70814_o() { return true; }",
"private void someUtilityMethod() {\n }",
"private void someUtilityMethod() {\n }",
"public abstract void mo30696a();",
"abstract int pregnancy();",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"@Override\n public void init() {\n\n }",
"@Override\n void init() {\n }",
"@Override\n\tpublic void leti() \n\t{\n\t}",
"private TMCourse() {\n\t}",
"public abstract void mo35054b();",
"@Override\n public void init() {\n }",
"@Override\n\tpublic void buscar() {\n\t\t\n\t}",
"private Infer() {\n\n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tpublic void erstellen() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"public final void mo51373a() {\n }",
"protected void method_3848() {\r\n super.method_3848();\r\n }",
"protected FanisamBato(){\n\t}",
"public abstract Object mo1771a();",
"public abstract void m15813a();",
"public void gored() {\n\t\t\n\t}",
"@Override\n public void get() {}",
"@Override\n\tpublic void dibuja() {\n\t\t\n\t}",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"private Get() {}",
"private Get() {}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"public abstract void mo27464a();",
"public abstract String mo41079d();",
"@Override\n\tpublic void classroom() {\n\t\t\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\n\tpublic void verkaufen() {\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void logic() {\n\n\t}",
"public abstract void mo102899a();",
"@SuppressWarnings(\"unused\")\n private void _read() {\n }",
"public abstract void mo42329d();",
"@Override\r\n\t\t\tpublic void test() {\n\t\t\t}",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"public void method_4270() {}",
"public abstract void mo6549b();",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void function() {\n\t\t\n\t}",
"protected void init() {\n // to override and use this method\n }"
] | [
"0.7375736",
"0.7042321",
"0.6922649",
"0.6909494",
"0.68470824",
"0.6830288",
"0.68062353",
"0.6583185",
"0.6539446",
"0.65011257",
"0.64917654",
"0.64917654",
"0.64733833",
"0.6438831",
"0.64330196",
"0.64330196",
"0.64295477",
"0.6426414",
"0.6420484",
"0.64083177",
"0.6406691",
"0.6402136",
"0.6400287",
"0.63977665",
"0.63784796",
"0.6373787",
"0.63716805",
"0.63680965",
"0.6353791",
"0.63344383",
"0.6327005",
"0.6327005",
"0.63259363",
"0.63079315",
"0.6279023",
"0.6271251",
"0.62518364",
"0.62254924",
"0.62218183",
"0.6213994",
"0.6204108",
"0.6195944",
"0.61826825",
"0.617686",
"0.6158371",
"0.6138765",
"0.61224854",
"0.6119267",
"0.6119013",
"0.61006695",
"0.60922325",
"0.60922325",
"0.6086324",
"0.6083917",
"0.607071",
"0.6070383",
"0.6067458",
"0.60568124",
"0.6047576",
"0.6047091",
"0.60342956",
"0.6031699",
"0.6026248",
"0.6019563",
"0.60169774",
"0.6014913",
"0.6011912",
"0.59969044",
"0.59951806",
"0.5994921",
"0.599172",
"0.59913194",
"0.5985337",
"0.59844744",
"0.59678656",
"0.5966894",
"0.5966894",
"0.5966894",
"0.5966894",
"0.5966894",
"0.5966894",
"0.59647757",
"0.59647757",
"0.59616375",
"0.5956373",
"0.5952514",
"0.59497356",
"0.59454703",
"0.5941018",
"0.5934147",
"0.5933801",
"0.59318185",
"0.5931161",
"0.5929297",
"0.5926942",
"0.5925829",
"0.5924853",
"0.5923296",
"0.5922199",
"0.59202504",
"0.5918595"
] | 0.0 | -1 |
Computer Generation of Statistical Distributions by Richard Saucier ARLTR2168 March 2000 5.1.8 page 20 | public static double sample(double a, double b, Random random) {
assert (b > 0.0);
return a - b * Math.log(random.nextDouble());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main( String[] args ){\n\t\tDoubleGenerator g = gaussian();\n\t\t// DoubleGenerator g = power_law();\n\t\t// DoubleGenerator g = symmetric_power_law();\n\t\tint n = 10;\n\t\t// Generating an array of ten random values\n\t\tdouble[] x = g.generate(n);\n\t\tfor( int i=0; i<n; i++ ){\n\t\t\tSystem.out.println( x[i] );\n\t\t}\n\t\tSystem.out.println(\"****************\");\n\t\t// Generating ten random values\n\t\tfor( int i=0; i<n; i++ ){\n\t\t\tSystem.out.println(g.next());\n\t\t}\n\t}",
"AlgDistribution getDistribution();",
"public abstract ModuleDistributions distributions();",
"public static void main(String[] args) {\n\t\tint p_numbers = 3; // Partition Numbers\r\n\t int p_size = 5;\r\n\t int z_exponent = 1;\t \t \t \t \r\n\t int d = 0;\r\n\t int d_start = 0;\r\n\t int d_end = p_size;\r\n\t double mu = 0.0;\r\n\t double sigma = 1.0;\r\n\t double z, c, c_rand, n;\r\n\t\t\t \t \r\n\t ZipfDistribution zipf;\t// Parameters = Number of Elements, Exponent \t\t \t \t \t \t \t \r\n\t RandomDataGenerator randData = new RandomDataGenerator();\r\n\t RandomDataGenerator rand = new RandomDataGenerator();\r\n\t rand.reSeed(0);\r\n\t \r\n\t for(int p = 0; p < p_numbers; p++) {\r\n\t \tzipf = new ZipfDistribution(p_size, z_exponent); \r\n\t \tzipf.reseedRandomGenerator(p);\r\n\t \trandData.reSeed(p);\t\t \r\n\t \t\r\n\t \tfor(d = d_start; d < d_end; d++) {\r\n\t \t\tz = randData.nextZipf(p_size, z_exponent);\r\n\t \t\tz += d_start;\r\n\t \t\t\r\n\t \t\tif(z > d_end) z -= 1;\r\n\t \t\t\r\n\t \t\tc = zipf.cumulativeProbability((d - d_start));\r\n\t \t\tc_rand = zipf.cumulativeProbability(((int)z - d_start));\r\n\t \t\t\r\n\t \t\t//n = rand.nextGaussian(mu, sigma);\r\n\t \t\tn = rand.nextUniform(0.0, 1.0);\r\n\t\t \r\n\t\t \tSystem.out.println(p+\" \"+d+\" \"+c+\" \"+(int)z+\" \"+c_rand+\" \"+n);\r\n\t \t}\r\n\t \t\r\n\t \td_start = d_end;\r\n\t \td_end = (d + p_size);\t \t\r\n\t }\t \r\n\t}",
"public void probabiltDistribution() {\r\n\t\tfor (int k = 0; k < 1000; k++) {\r\n\t\t\tfor (int i = 0; i < 9; i++) {\r\n\t\t\t\tfor (int j = 0; j < 11; j++) {\r\n\t\t\t\t\trandomGrid[i][j] = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdeployComputerShips();\r\n\t\t\tfor (int i = 0; i < 9; i++) {\r\n\t\t\t\tfor (int j = 0; j < 11; j++) {\r\n\t\t\t\t\tprobabilityGrid[i][j] = probabilityGrid[i][j] + randomGrid[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n\t\tluanqibazao l = new luanqibazao();\r\n\t\tfor(double x=1;x<=10;x++){\r\n\t\t\tdouble r = l.normalDistribution(10, 10, x);\r\n\t\t\tSystem.out.println(r);\r\n\t\t}\r\n\t\t\r\n\t}",
"public double[] genDiscreteDistribution(int n) {\n\t\tRandom generator = null;\n\t\tgenerator = new Random();\n\t\tdouble[] res = allocateVector(n);\n\t\tdo {\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tres[i] = generator.nextDouble();\n\t\t\t}\n\t\t} while (sum(res) == 0);\n\t\tdivideAssign(res, sum(res));\n\t\treturn res;\n\t}",
"public HypergeometricDistribution(){\n\t\tthis(100, 50, 10);\n\t}",
"public static void main(String[] args) {\n\n\n\n int timeSteps = 2;\n int variables = 100;\n RandomGenerator rg = new RandomGenerator();\n rg.setSeed(System.currentTimeMillis());\n\n// Create many columns in a multidimensional array (2 rows by 100 columns),\n// where the next time step (row 2) copies the value of the column on the left\n// from the previous time step (row 1):\n int[][] twoDTimeSeries = new int[timeSteps][];\n twoDTimeSeries[0] = rg.generateRandomInts(variables, 2); //表示产生服从0-2均匀分布的100个随机数\n twoDTimeSeries[1] = new int[variables];\n twoDTimeSeries[1][0] = twoDTimeSeries[0][variables - 1];\n System.arraycopy(twoDTimeSeries[0], 0, twoDTimeSeries[1], 1, variables - 1);\n\n// Create a TE calculator and run it:\n TransferEntropyCalculatorDiscrete teCalc=\n new TransferEntropyCalculatorDiscrete(2, 1);\n teCalc.initialise();\n// Add observations of transfer across one cell to the right (j=1)\n// per time step:\n teCalc.addObservations(twoDTimeSeries, 1);\n\n double result2D = teCalc.computeAverageLocalOfObservations();\n System.out.printf(\"The result should be close to 1 bit here, \" +\n \"since we are executing copy operations of what is effectively \" +\n \"a random bit to each cell here: %.3f bits\\n\", result2D);\n\n }",
"private void distribute() {\n\t\t\tfor (Entry<String, List<String>> r : groups.entrySet()) {\n\t\t\t\tRandom random = new Random();\n\t\t\t\tint randomIndex = random.nextInt(r.getValue().size());\n\t\t\t\tdistribution.put(r.getKey(), r.getValue().get(randomIndex));\n\t\t\t}\n\t\t}",
"public static void main(String[] args)\r\n {\r\n //GammaDistribution gam = new GammaDistribution(10.0, 20.0);\r\n //double gamR = gam.sample();\r\n //System.out.println(gamR);\r\n \r\n for(String s : args)\r\n {\r\n System.out.println(s);\r\n }\r\n //if we run the code without any arguments then use default, else overwrite\r\n int lnth = args.length; \r\n if (lnth != 0 ) {\r\n int diff = 0;\r\n try {\r\n //totalT = Integer.valueOf(args[0+diff]);\r\n //totalY = Integer.valueOf(args[1+diff]);\r\n //totalYears = Integer.valueOf(args[2+diff]);\r\n dataSet = args[0+diff];\r\n yrs = Integer.valueOf(args[1+diff]);\r\n spreadYrs = Integer.valueOf(args[2+diff]);\r\n maxDepth = Integer.valueOf(args[3+diff]);\r\n popSize = Integer.valueOf(args[4+diff]);\r\n tournamentSize = (popSize / 100) - 1;\r\n mutProb = Double.valueOf(args[5+diff]);\r\n xoverProb = Double.valueOf(args[6+diff]); \r\n elitismPercentage = Double.valueOf(args[7+diff]);\r\n primProb = Double.valueOf(args[8+diff]);\r\n terminalNodeCrossBias = Double.valueOf(args[9+diff]);\r\n nGens = Integer.valueOf(args[10+diff]);\r\n lowerLowBound = Double.valueOf(args[11+diff]);\r\n lowerUpBound = Double.valueOf(args[12+diff]);\r\n upperLowBound = Double.valueOf(args[13+diff]);\r\n upperUpBound = Double.valueOf(args[14+diff]);\r\n movingAverage = Integer.valueOf(args[15+diff]);\r\n totalNumParams = 0;\r\n additionalParameters = 0;\r\n parameterIndex.add(0);\r\n for (int i = 16; i < args.length -1 + diff; i++) { // minus 1 as the last parameter is whether to use bound \r\n if (Integer.valueOf(args[i]) == 1) { \r\n totalNumParams++;\r\n parameterIndex.add(i-15); //parameterIndex starts from 1, becuase my pred value is in column 0\r\n if (i >= args.length -9 + diff) {//minus 1 to compensate for last value and minus 8 for the 9 parameters\r\n additionalParameters++;\r\n }\r\n } \r\n }\r\n lowerBound = Integer.valueOf(args[args.length - 1]); //last value is whether to use a lower bound\r\n } catch (ArrayIndexOutOfBoundsException t) {\r\n System.out.println(\"args not enough, please check\");\r\n }\r\n } else {\r\n for (int i = 0; i < totalNumParams; i++) {\r\n parameterIndex.add(i);\r\n }\r\n }\r\n FReader read = new FReader();\r\n header = read.readHeader(\"Data/header.txt\");\r\n parametersLength = header.length - 9; //take away the 9 parameters that will be calculated within GP\r\n \r\n Expr[] evolvedMethodParameters = new Expr[totalNumParams-1];\r\n eval = new PredictionEvaluatorTrue2(nRuns, contractLength, parameterIndex, parametersLength, additionalParameters);\r\n \r\n Function evolvedMethod = new Function(Double.TYPE, new Class[0]);\r\n TreeManager.evolvedMethod = evolvedMethod;\r\n \r\n \r\n for (int i=0; i<totalNumParams-1; i++) {\r\n \r\n evolvedMethodParameters[i] = new Parameter(i);\r\n } \r\n TreeManager.evolvedMethodParameters = evolvedMethodParameters;\r\n \r\n ArrayList methodSet = new ArrayList();\r\n methodSet.add(ADD);\r\n methodSet.add(SUB);\r\n methodSet.add(MUL);\r\n methodSet.add(DIV);\r\n methodSet.add(LOG);\r\n methodSet.add(SQRT);\r\n methodSet.add(POW);\r\n methodSet.add(MOD);\r\n //methodSet.add(SIN);\r\n //methodSet.add(COS);\r\n methodSet.add(EXP);\r\n\r\n\r\n Random r = new Random();\r\n ArrayList terminalSet = new ArrayList();\r\n// for (int i = 0; i < terminals; i++)\r\n// {\r\n// double rc = r.nextDouble();\r\n// terminalSet.add(new Constant(new Double(rc * 100.0D), Double.TYPE)); //Building in a function representing random numbers minimum and maximum, consider avearge\r\n// }\r\n// \r\n// //Add in numbers between 0 and 2 in blocks of 0.05 for the purpose of weights\r\n// \r\n// for (int i = 0; i < weights; i++)\r\n// {\r\n// double rc = (1 + i) * 0.05;\r\n// terminalSet.add(new Constant(new Double(rc), Double.TYPE));\r\n// }\r\n \r\n //terminalSet.add(new Constant(new Double(0.0D), Double.TYPE));\r\n //terminalSet.add(new Constant(new Double(3.141592653589793D), Double.TYPE));\r\n \r\n //For old data\r\n //Dynamically adds the number of parameters to be estimated, need to refer to data to input correct values\r\n //for (int i = 0; i < totalT; i++) {\r\n // terminalSet.add(new Parameter(i, Double.TYPE, Boolean.valueOf(true), \"Rain_t-\"+(i+1)));\r\n //}\r\n //for (int i = 0; i < totalY; i++) {\r\n // terminalSet.add(new Parameter(i+totalT, Double.TYPE, Boolean.valueOf(true), \"Year_t-\"+(i+1)));\r\n //}\r\n \r\n //For new data have headers read in and name accordingly.\r\n \r\n for (int i = 0; i < totalNumParams-1; i++) {\r\n terminalSet.add(new Parameter(i, Double.TYPE, Boolean.valueOf(true), header[parameterIndex.get(i)]));\r\n }\r\n \r\n \r\n //consider 3 ERC's one big range, 2 smaller ranges between -1 and 1\r\n terminalSet.add(new Constant(\"ERC\", Double.TYPE));\r\n terminalSet.add(new Constant(\"ERC2\", Double.TYPE));\r\n terminalSet.add(new Constant(\"ERC3\", Double.TYPE));\r\n \r\n double primProb = 0.6D;\r\n double terminalNodeCrossBias = 0.1D;\r\n TreeManager tm = new TreeManager(methodSet, terminalSet, primProb, maxInitialDepth, maxDepth, terminalNodeCrossBias);\r\n \r\n\r\n\r\n\r\n System.out.println(\"============= Experimental parameters =============\");\r\n System.out.println(\"Maximum initial depth: \" + maxInitialDepth);\r\n System.out.println(\"Maximum depth: \" + maxDepth);\r\n System.out.println(\"Primitive probability in Grow method: \" + primProb);\r\n System.out.println(\"Terminal node crossover bias: \" + terminalNodeCrossBias);\r\n System.out.println(\"No of generations: \" + nGens);\r\n System.out.println(\"Population size: \" + popSize);\r\n System.out.println(\"Tournament size: \" + tournamentSize);\r\n System.out.println(\"Crossover probability: \" + xoverProb);\r\n System.out.println(\"Reproduction probability: \" + (1.0D - xoverProb));\r\n System.out.println(\"Mutation probalitity: \" + mutProb);\r\n System.out.println(\"Elitism percentage: \" + elitismPercentage);\r\n System.out.println(\"===================================================\");\r\n \r\n \r\n \r\n \r\n \r\n StatisticalSummary.logExperimentSetup(methodSet, terminalSet, maxInitialDepth, maxDepth, primProb, terminalNodeCrossBias, nGens, popSize, tournamentSize, mutProb, xoverProb); \r\n \r\n StatisticalSummary stat = null;\r\n filenameS = \"Results/Results_\"+yrs+\"_\"+spreadYrs+\"_MA\"+movingAverage+\"_\"+contractLength;\r\n for (int i = 0; i < nRuns; i++)\r\n {\r\n System.out.println(\"========================== Experiment \" + i + \" ==================================\");\r\n File experiment = new File(filenameS + \"/Experiment \"+i);\r\n experiment.mkdirs();\r\n stat = new StatisticalSummary(nGens, popSize, i);\r\n alg = new GA(tm, eval, popSize, tournamentSize, stat, mutProb, elitismPercentage, xoverProb, nRuns);\r\n alg.evolve(nGens, i);\r\n System.out.println(\"===============================================================================\");\r\n }\r\n}",
"public static void main(String[] args) throws FileNotFoundException, IOException {\nfor (double b = 0.5; b < 0.51; b+=0.1) {\n for (double k = 4.40; k < 4.5; k+=0.5) {\n Machine.b = 0.5; //0.2 - ATCnon-delay\n Machine.k = 1.5; //1.4 - ATCnon delay\n int hits = 0;\n engineJob = new cern.jet.random.engine.MersenneTwister(99999);\n noise = new cern.jet.random.Normal(0, 1, engineJob);\n SmallStatistics[] result = new SmallStatistics[5];\n result[0] = new SmallStatistics();\n result[1] = new SmallStatistics();\n for (int ds = 0; ds < 2; ds++) {\n JSPFramework[] jspTesting = new JSPFramework[105];\n for (int i = 0; i < jspTesting.length; i++) {\n jspTesting[i] = new JSPFramework();\n jspTesting[i].getJSPdata(i*2 + 1);\n }\n //DMU - instances (1-80)//la - instances (81-120)\n //mt - instances (121/-123)//orb - instances (124-133)//ta -instances (134-173)\n //////////////////////////////////////////////\n for (int i = 0; i < jspTesting.length; i++) {\n double countEval = 0;\n double tempObj = Double.POSITIVE_INFINITY;\n double globalBest = Double.POSITIVE_INFINITY;\n boolean[] isApplied_Nk = new boolean[2]; //Arrays.fill(isApplied_Nk, Boolean.TRUE);\n int Nk = 0; // index of the Iterative dispatching rule to be used\n jspTesting[i].resetALL();\n boolean firstIteration = true;\n double countLargeStep = 0;\n do{\n countEval++;\n //start evaluate schedule\n jspTesting[i].reset();\n int N = jspTesting[i].getNumberofOperations();\n jspTesting[i].initilizeSchedule();\n int nScheduledOp = 0;\n\n //choose the next machine to be schedule\n while (nScheduledOp<N){\n\n Machine M = jspTesting[i].Machines[jspTesting[i].nextMachine()];\n\n jspTesting[i].setScheduleStrategy(Machine.scheduleStrategy.HYBRID );\n jspTesting[i].setPriorityType(Machine.priorityType.ATC);\n jspTesting[i].setNonDelayFactor(0.3);\n //*\n jspTesting[i].setInitalPriority(M);\n for (Job J:M.getQueue()) {\n double RJ = J.getReadyTime();\n double RO = J.getNumberRemainingOperations();\n double RT = J.getRemainingProcessingTime();\n double PR = J.getCurrentOperationProcessingTime();\n double W = J.getWeight();\n double DD = J.getDuedate();\n double RM = M.getReadyTime();\n double RWT = J.getCurrentOperationWaitingTime();\n double RFT = J.getFinishTime();\n double RNWT = J.getNextOperationWaitingTime();\n int nextMachine = J.getNextMachine();\n\n if (nextMachine==-1){\n RNWT=0;\n } else {\n RNWT = J.getNextOperationWaitingTime();\n if (RNWT == -1){\n RNWT = jspTesting[i].getMachines()[nextMachine].getQueueWorkload()/2.0;\n }\n }\n if (RWT == -1){\n RWT = M.getQueueWorkload()/2.0;\n }\n //J.addPriority((W/PR)*Math.exp(-maxPlus((DD-RM-PR-(RT-PR+J.getRemainingWaitingTime(M)))/(3*M.getQueueWorkload()/M.getNumberofJobInQueue())))); //iATC\n //J.addPriority((PR*PR*0.614577*(-RM-RM/W)-RT*PR*RT/W)\n // -(RT*PR/(W-0.5214191)-RM/W*PR*0.614577+RT*PR/(W-0.5214191)*2*RM/W));\n //J.addPriority(((W/PR)*((W/PR)/(RFT*RFT)))/(max(div((RFT-RT),(RWT/W)),IF(RFT/W-max(RFT-RT,DD),DD,RFT))+DD/RFT+RFT/W-max(RFT-RFT/W,DD))); //best TWT priorityIterative\n if (Nk==0)\n //J.addPriority(min(W/PR-RFT+min(RT,W/RFT),((min(RT,RNWT-RFT)/(RJ-min(RWT,RFT*0.067633785)))/(RJ-min(RWT,RFT*0.067633785))))/RFT);\n J.addPriority(min(W/PR-RFT+min(RT,W/RFT),((div(min(RT,RNWT-RFT),(RJ-min(RWT,RFT*0.067633785))))/(RJ-min(RWT,RFT*0.067633785))))/RFT);\n else\n J.addPriority(min((((W/PR)/RFT)/(2*RNWT+max(RO,RFT)))/(PR+RNWT+max(RO,RFT)),((W/PR)/RFT)/PR)/RFT);\n }\n //jspTesting[i].calculatePriority(M);\n jspTesting[i].sortJobInQueue(M);\n Job J = M.completeJob();\n if (!J.isCompleted()) jspTesting[i].Machines[J.getCurrentMachine()].joinQueue(J);\n nScheduledOp++;\n }\n double currentObj = -100;\n currentObj = jspTesting[i].getTotalWeightedTardiness();\n if (tempObj > currentObj){\n tempObj = currentObj;\n jspTesting[i].recordSchedule();\n Arrays.fill(isApplied_Nk, Boolean.FALSE);\n //System.out.println(\"Improved!!!\");\n }\n else {\n isApplied_Nk[Nk] = true;\n if (!isNextApplied(Nk, isApplied_Nk)) Nk = circleShift(Nk, isApplied_Nk.length);\n else {\n if (globalBest>tempObj) {\n globalBest = tempObj;\n jspTesting[i].storeBestRecordSchedule();\n } jspTesting[i].restoreBestRecordSchedule();\n if (countLargeStep<1) {\n tempObj = Double.POSITIVE_INFINITY;\n Arrays.fill(isApplied_Nk, Boolean.FALSE);\n jspTesting[i].shakeRecordSchedule(noise, engineJob, globalBest);\n countLargeStep++;\n }\n else break;\n }\n }\n firstIteration = false;\n \n } while(true);\n result[ds].add(jspTesting[i].getDevREFTotalWeightedTardiness(globalBest));\n if (jspTesting[i].getDevLBCmax()==0) hits++;\n System.out.println(jspTesting[i].instanceName + \" & \"+ globalBest + \" & \" + countEval);\n }\n }\n //jsp.schedule();\n //*\n System.out.println(\"*************************************************************************\");\n System.out.println(\"[ & \" + formatter.format(result[0].getMin()) + \" & \"\n + formatter.format(result[0].getAverage()) + \" & \" + formatter.format(result[0].getMax()) +\n \" & \" + formatter.format(result[1].getMin()) + \" & \"\n + formatter.format(result[1].getAverage()) + \" & \" + formatter.format(result[1].getMax()) + \"]\");\n //*/\n System.out.print(\"\"+formatter.format(result[0].getAverage()) + \" \");\n }\n System.out.println(\"\");\n}\n }",
"public ProbabilityDistribution() {\n\t\trandom_ = new Random();\n\t\titemProbs_ = new MutableKeyMap<T, Double>();\n\t}",
"private double randn(){\r\n\t\t//* http://www.mathworks.com/access/helpdesk/help/techdoc/matlab.html\r\n\t\t//RandomNumber rnd = new RandomNumber(System.currentTimeMillis());\r\n\t\t//return rnd.normal();\r\n\t\treturn rnd.nextGaussian();\r\n\t\t//return 0;\r\n\t}",
"public static void gbpusdDErand(String dir) {\n \n /**\n * Settings of the evolutionary algorithm - Differential Evolution\n */\n \n Algorithm de;\n int dimension = dim; //Length of an individual - when using functions in GFS with maximum number of required arguments max_arg = 2, 2/3 are designated for program, 1/3 for constant values - for 60 it is 40 and 20\n int NP = 75; //Size of the population - number of competitive solutions\n int generations = gen; //Stopping criterion - number of generations in evolution\n int MAXFES = generations * NP; //Number of fitness function evaluations\n double f = 0.5, cr = 0.8; //Scaling factor f and crossover rate cr\n AP.util.random.Random generator = new AP.util.random.UniformRandom(); //Random number generator\n \n /**\n * Symbolic regression part\n * \n * Settings of the dataset which is regressed\n * Example: Sextic problem\n */\n \n // 50 points from range <-1, 1>, another type of data providing is possible\n double[][] dataset_points = dataset;\n ArrayList<AP_object> GFS = new ArrayList<>();\n GFS.add(new AP_Plus()); //Addition\n GFS.add(new AP_Sub()); //Subtraction\n GFS.add(new AP_Multiply()); //Mulitplication\n GFS.add(new AP_Div()); //Divison\n GFS.add(new AP_Abs());\n GFS.add(new AP_Cos());\n GFS.add(new AP_Cubic());\n GFS.add(new AP_Exp());\n GFS.add(new AP_Ln());\n GFS.add(new AP_Log10());\n GFS.add(new AP_Mod());\n GFS.add(new AP_Quad());\n GFS.add(new AP_Sin());\n GFS.add(new AP_Sigmoid());\n GFS.add(new AP_Sqrt());\n GFS.add(new AP_Tan());\n GFS.add(new AP_aTOb());\n GFS.add(new AP_x1()); //Independent variable x1\n// GFS.add(new AP_Const_static()); //Constant object - value is evolved in the extension of the individuals\n //More functions and terminals for GFS can be found or added to model.ap.objects\n \n double const_min = -10; //Minimum value of constants\n double const_max = 10; //Maximum value of constants\n \n APtf tf = new APdataset(dataset_points, GFS, const_min, const_max); //Dataset constructor\n\n /**\n * Additional variables\n */\n \n int runs = run_count; //Number of runs of the regression\n \n double min; //Helping variable for best individual in terms of fitness function value\n double[] bestArray = new double[runs]; //Array for statistics\n int i, best; //Additional helping variables\n\n /**\n * Runs of the algorithm with statistical analysis\n */\n for (int k = 0; k < runs; k++) {\n\n best = 0;\n i = 0;\n min = Double.MAX_VALUE;\n \n de = new AP_DErand1bin(dimension, NP, MAXFES, tf, generator, f, cr);\n\n de.run();\n\n PrintWriter writer;\n \n try {\n writer = new PrintWriter(dir + tf.name() + \"-DErand\" + k + \".txt\", \"UTF-8\");\n\n writer.print(\"{\");\n \n for (int ii = 0; ii < ((AP_DErand1bin)de).getBestHistory().size(); ii++) {\n\n writer.print(String.format(Locale.US, \"%.10f\", ((AP_DErand1bin)de).getBestHistory().get(ii).fitness));\n\n if (ii != ((AP_DErand1bin)de).getBestHistory().size() - 1) {\n writer.print(\",\");\n }\n\n }\n\n writer.print(\"}\");\n\n writer.close();\n\n } catch (FileNotFoundException | UnsupportedEncodingException ex) {\n Logger.getLogger(AP_LSHADE.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n bestArray[k] = de.getBest().fitness - tf.optimum();\n\n /**\n * AP best result value and equation.\n */\n\n System.out.println(\"=================================\");\n System.out.println(\"Best obtained fitness function value: \\n\" + (de.getBest().fitness - tf.optimum()));\n System.out.println(\"Equation: \\n\" + ((AP_Individual) de.getBest()).equation);\n System.out.println(\"Vector: \\n\" + Arrays.toString(((AP_Individual) de.getBest()).vector));\n System.out.println(\"=================================\");\n \n for(AP_Individual ind : ((AP_DErand1bin)de).getBestHistory()){\n i++;\n if(ind.fitness < min){\n min = ind.fitness;\n best = i;\n }\n if(ind.fitness == 0){\n System.out.println(\"Solution found in \" + i + \" CFE\");\n break;\n }\n }\n System.out.println(\"Best solution found in \" + best + \" CFE\");\n \n System.out.println(\"\\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\\n\");\n \n \n }\n\n System.out.println(\"=================================\");\n System.out.println(\"Min: \" + DoubleStream.of(bestArray).min().getAsDouble());\n System.out.println(\"Max: \" + DoubleStream.of(bestArray).max().getAsDouble());\n System.out.println(\"Mean: \" + new Mean().evaluate(bestArray));\n System.out.println(\"Median: \" + new Median().evaluate(bestArray));\n System.out.println(\"Std. Dev.: \" + new StandardDeviation().evaluate(bestArray));\n System.out.println(\"=================================\");\n \n }",
"@Test\n public void testStationaryDistribution()\n {\n try\n {\n IDoubleArray T = Doubles.create.fromFile(inputT1);\n IDoubleArray expResult = Doubles.create.fromFile(inputT1_pi); \n IDoubleArray pi = MarkovModel.util.stationaryDistribution(T);\n assertEqual(pi, expResult, 1e-5);\n }\n catch(IOException e)\n {\n \n e.printStackTrace();\n }\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }",
"private double [] uniformDiscreteProbs(int numStates) \n {\n double [] uniformProbs = new double[2 * numStates];\n for(int i = 0; i < 2 * numStates; i++)\n uniformProbs[i] = (1.0 / (2 * numStates));\n return uniformProbs;\n }",
"public interface MultivariateDistribution extends Cloneable, Serializable {\n /**\n * Computes the log of the probability density function. If the probability of\n * the input is zero, the log of zero would be {@link Double#NEGATIVE_INFINITY}.\n * Instead, -{@link Double#MAX_VALUE} is returned.\n *\n * @param x the array for the vector the get the log probability of\n * @return the log of the probability.\n * @throws ArithmeticException if the vector is not the correct length, or the\n * distribution has not yet been set\n */\n default public double logPdf(double... x) {\n return logPdf(DenseVector.toDenseVec(x));\n }\n\n /**\n * Computes the log of the probability density function. If the probability of\n * the input is zero, the log of zero would be {@link Double#NEGATIVE_INFINITY}.\n * Instead, -{@link Double#MAX_VALUE} is returned.\n *\n * @param x the vector the get the log probability of\n * @return the log of the probability.\n * @throws ArithmeticException if the vector is not the correct length, or the\n * distribution has not yet been set\n */\n public double logPdf(Vec x);\n\n /**\n * Returns the probability of a given vector from this distribution. By\n * definition, the probability will always be in the range [0, 1].\n *\n * @param x the array of the vector the get the log probability of\n * @return the probability\n * @throws ArithmeticException if the vector is not the correct length, or the\n * distribution has not yet been set\n */\n default public double pdf(double... x) {\n return pdf(DenseVector.toDenseVec(x));\n }\n\n /**\n * Returns the probability of a given vector from this distribution. By\n * definition, the probability will always be in the range [0, 1].\n *\n * @param x the vector the get the log probability of\n * @return the probability\n * @throws ArithmeticException if the vector is not the correct length, or the\n * distribution has not yet been set\n */\n default public double pdf(Vec x) {\n return Math.exp(logPdf(x));\n }\n\n /**\n * Sets the parameters of the distribution to attempt to fit the given list of\n * vectors. All vectors are assumed to have the same weight.\n *\n * @param <V> the vector type\n * @param dataSet the list of data points\n * @return <tt>true</tt> if the distribution was fit to the data, or\n * <tt>false</tt> if the distribution could not be fit to the data set.\n */\n default public <V extends Vec> boolean setUsingData(List<V> dataSet) {\n return setUsingData(dataSet, false);\n }\n\n /**\n * Sets the parameters of the distribution to attempt to fit the given list of\n * vectors. All vectors are assumed to have the same weight.\n *\n * @param <V> the vector type\n * @param dataSet the list of data points\n * @param parallel {@code true} if the training should be done using\n * multiple-cores, {@code false} for single threaded.\n * @return <tt>true</tt> if the distribution was fit to the data, or\n * <tt>false</tt> if the distribution could not be fit to the data set.\n */\n public <V extends Vec> boolean setUsingData(List<V> dataSet, boolean parallel);\n\n /**\n * Sets the parameters of the distribution to attempt to fit the given list of\n * data points. The {@link DataPoint#getWeight() weights} of the data points\n * will be used.\n *\n * @param dataPoints the list of data points to use\n * @return <tt>true</tt> if the distribution was fit to the data, or\n * <tt>false</tt> if the distribution could not be fit to the data set.\n */\n default public boolean setUsingDataList(List<DataPoint> dataPoints) {\n return setUsingData(dataPoints.stream().map(d -> d.getNumericalValues()).collect(Collectors.toList()));\n }\n\n /**\n * Sets the parameters of the distribution to attempt to fit the given list of\n * data points. The {@link DataPoint#getWeight() weights} of the data points\n * will be used.\n *\n * @param dataSet the data set to use\n * @return <tt>true</tt> if the distribution was fit to the data, or\n * <tt>false</tt> if the distribution could not be fit to the data set.\n */\n default public boolean setUsingData(DataSet dataSet) {\n return setUsingData(dataSet, false);\n }\n\n /**\n * Sets the parameters of the distribution to attempt to fit the given list of\n * data points. The {@link DataPoint#getWeight() weights} of the data points\n * will be used.\n *\n * @param dataSet the data set to use\n * @param parallel the source of threads for computation\n * @return <tt>true</tt> if the distribution was fit to the data, or\n * <tt>false</tt> if the distribution could not be fit to the data set.\n */\n default public boolean setUsingData(DataSet dataSet, boolean parallel) {\n return setUsingData(dataSet.getDataVectors(), parallel);\n }\n\n public MultivariateDistribution clone();\n\n /**\n * Performs sampling on the current distribution.\n *\n * @param count the number of iid samples to draw\n * @param rand the source of randomness\n * @return a list of sample vectors from this distribution\n */\n public List<Vec> sample(int count, Random rand);\n}",
"public double Generate(double[] par);",
"WeightedRandomSampling(double[] w){\n int len = w.length;\n aggregatedW = new double[len];\n counts = new int[len];\n double temp = 0;\n\n for(int i=0; i<len; i++){\n aggregatedW[i] = temp;\n //System.out.println(aggregatedW[i]);\n temp+= w[i];\n }\n }",
"private void calculateDebtDistribution() {\n calculateDebtDistribution(false);\n }",
"public static void main(String[] args) {\n\t\tAggregateSummaryStatistics aggregate = new AggregateSummaryStatistics();\n\t\tSummaryStatistics setOneStats = aggregate.createContributingStatistics();\n\t\tSummaryStatistics setTwoStats = aggregate.createContributingStatistics();\n\n\t\t \n\t\tfor( int i = 1; i <= 10; i++) {\n\t\t\tsetOneStats.addValue(i);\n\t\t\tsetTwoStats.addValue(i);\n\t\t}\n\t\t\n\t\t// Full sample data is reported by the aggregate\n\t\tdouble totalSampleSum = aggregate.getSum();\n\t\tSystem.out.println(\"totalSampleSum=\"+totalSampleSum);\n\t\tSystem.out.println(\"Count=\"+aggregate.getN());\n\t\tSystem.out.println(\"mean=\"+aggregate.getMean());\n\t\tSystem.out.println(\"std=\"+aggregate.getStandardDeviation());\n\t\t\n\t}",
"private DataSet normalDataSet(){\n //create normal distribution with mean .05 and sd .05/3 so that 99.7% of events are < .1\n NormalDistribution normalDistribution = new NormalDistribution(TARGET_MEAN, TARGET_MEAN/3D);\n DataSet dataSet = new DataSet();\n Task[] tasks = new Task[NUM_DISTINCT_TASKS];\n //generate costs from sampling from normal distribution\n for(int i=0; i < NUM_DISTINCT_TASKS; i++){\n UUID uuid = UUID.randomUUID();\n Long cost = (long) Math.max(1, normalDistribution.sample()); //make sure no 0 cost events\n tasks[i] = new Task(cost, uuid);\n }\n //generate task multiplities from sampling from uniform distribution\n for(int i=0; i < NUM_TASKS; i++){\n dataSet.getTasks().add(tasks[random.nextInt(NUM_DISTINCT_TASKS)]);\n }\n return dataSet;\n }",
"@Test\r\n\tpublic void testPositiveGenerateSignedGaussians_2() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tHashMap<String, Object> o = roc.generateSignedGaussians(10, 3.41d, 2.1d, 4, userData);\r\n\t\t\t\t\r\n\t\t\t\tthis.signedValueTester(roc, i, o, double[].class, true);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n\t\tRandom rnd = new Random();\n\t\tint[]data = new int[1];\n\t\tint i=0;\n\t\tfor(i=0;i<1;i++){\n\t\t\tdata[i]=rnd.nextInt(1000)+1;\n\t\t\tSystem.out.println(data[i]);\n\t\t\t\tint v1 = data[i]/500;\n\t\t\t\tdata[i] = data[i]%500;\n\t\t\t\tif(v1!=0){\n\t\t\t\t\tSystem.out.println(\"共有\"+v1+\"個500元\");\n\t\t\t\t}\n\t\t\t\tint v2 = data[i]/100;\n\t\t\t\tdata[i] = data[i]%100;\n\t\t\t\tif(v2!=0){\n\t\t\t\t\tSystem.out.println(\"共有\"+v2+\"個100元\");\n\t\t\t\t}\n\t\t\t\tint v3 = data[i]/50;\n\t\t\t\tdata[i] = data[i]%50;\n\t\t\t\tif(v3!=0){\n\t\t\t\t\tSystem.out.println(\"共有\"+v3+\"個50元\"); \n\t\t\t\t}\n\t\t\t\tint v4 = data[i]/10;\n\t\t\t\tdata[i] = data[i]%10;\n\t\t\t\tif(v4!=0){\n\t\t\t\t\tSystem.out.println(\"共有\"+v4+\"個10元\");\n\t\t\t\t}\n\t\t\t\tint v5 = data[i]/5;\n\t\t\t\tdata[i] = data[i]%5;\n\t\t\t\tif(v5!=0){\n\t\t\t\t\tSystem.out.println(\"共有\"+v5+\"個5元\");\n\t\t\t\t}\n\t\t\t\n\t\t\t\tint v6 = data[i]/1;\n\t\t\t\tdata[i] = data[i]%1;\n\t\t\t\tif(v6!=0){\n\t\t\t\t\tSystem.out.println(\"共有\"+v6+\"個1元\");\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t \n\t\t\t\t \n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}",
"public static void main(String[] args){\n\t\tfor(int i=0; i<programRuns; i++){ //for loop to run gen numOfMutations creation \n\t\t\tnumOfMutations[i] = createnumOfMutationss(); //createnumOfMutationss returns number of total mutations\n\t\t}\n\t\n\t\tsort(numOfMutations); //sort array\n\t\tgetFreq(); //find the frequency of the number of mutations that occur\n\t\tgraph(); //create histogram of data\n\t\t\n\t}",
"public static void main(String[] args) throws Exception { \n \n int N = StdIn.readInt(); // lattice size\n // repeating this computation experiment T times\n int T = StdIn.readInt();\n \n PercolationStats percolationStats = new PercolationStats(N, T);\n \n StdOut.println(\"mean = \"\n + percolationStats.mean());\n StdOut.println(\"stddev = \"\n + percolationStats.stddev());\n StdOut.println(\"95% confidence interval= \"\n + percolationStats.confidenceLo()\n + \" \"\n + percolationStats.confidenceHi());\n }",
"void compute() {\n\n if (random.nextBoolean()) {\n value = value + random.nextInt(variation);\n ask = value + random.nextInt(variation / 2);\n bid = value + random.nextInt(variation / 2);\n } else {\n value = value - random.nextInt(variation);\n ask = value - random.nextInt(variation / 2);\n bid = value - random.nextInt(variation / 2);\n }\n\n if (value <= 0) {\n value = 1.0;\n }\n if (ask <= 0) {\n ask = 1.0;\n }\n if (bid <= 0) {\n bid = 1.0;\n }\n\n if (random.nextBoolean()) {\n // Adjust share\n int shareVariation = random.nextInt(100);\n if (shareVariation > 0 && share + shareVariation < stocks) {\n share += shareVariation;\n } else if (shareVariation < 0 && share + shareVariation > 0) {\n share += shareVariation;\n }\n }\n }",
"public static void main(String[] args) {\n\t\t\n\t\tArrayList<Double> results = new ArrayList<Double>();\n\t\tArrayList<Double> psoResults = new ArrayList<Double>(); \n\t\tint numTermites = 20;\n\t\tint iterations = 10;\n\t\t\n\t\tdouble pStrength = 5;\n\t\tint moves = numTermites;\n\t\tdouble pImportance = 0.01;\n\t\tdouble decayRate = 0.15;\n\t\tdouble globalStrength = 0.25;\n\t\tdouble localStrength = 0.25;\n\t\tdouble randomStrength = 0.15;\n\t\tint runs = 100;\n\t\tfor (int size = 10; size<20; size+=10) {\n\t\t\tmoves = size*2;\n\t\t\ttry\n\t\t\t{\n\t\t\t FileWriter writer = new FileWriter(\"C:\\\\Users\\\\postcn\\\\Documents\\\\size_\"+moves+\".csv\");\n\t\t \n\t\t\t writer.append(\"pImportance\");\n\t\t\t writer.append(',');\n\t\t\t writer.append(\"Result\");\n\t\t\t writer.append('\\n');\n\t\t\t \n\t\t\t for (int i=0; i<runs*5-1; i++) {\n\t\t\t\t\tdouble best = 0;\n\t\t\t\t\tpImportance += 0.01;\n\t\t\t\t\tfor(int j=0; j<runs; j++) {\n\t\t\t\t\t\tGrid g = new Grid();\n\t\t\t\t\t\tg.printGrid();\n\t\t\t\t\t\tg.setSize(size, size);\n\t\t\t\t\t\t//g.setRandomValues();\n\t\t\t\t\t\tg.setGradientValues(1);\n\t\t\t\t\t\tdouble test = randomSearch(numTermites, iterations, pStrength, moves, pImportance, g, decayRate);\n\t\t\t\t\t\tif (test > best) {\n\t\t\t\t\t\t\tbest = test;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\twriter.append(pImportance+\"\");\n\t\t\t\t\twriter.append(',');\n\t\t\t\t\twriter.append(best+\"\");\n\t\t\t\t\twriter.append(\"\\n\");\n\t\t\t\t\tSystem.out.println(\"pImportance: \"+ pImportance + \" :\"+best);\n//\t\t\t\t\tresults.add();\n//\t\t\t\t\tpsoResults.add(PSOSearch(iterations,numTermites, g,globalStrength,localStrength,randomStrength));\n\t\t\t\t}\n\t\t \n\t\t\t //generate whatever data you want\n\t\t \n\t\t\t writer.flush();\n\t\t\t writer.close();\n\t\t\t}\n\t\t\tcatch(IOException e)\n\t\t\t{\n\t\t\t e.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tdouble accuracy = 0;\n\t\tfor (Double d : results) {\n\t\t\taccuracy += d;\n\t\t}\n\t\taccuracy = accuracy / (double) results.size();\n\t\tSystem.out.println(\"Termites ran an average of \" + accuracy+\"% accuracy.\");\n\t\taccuracy = 0;\n\t\tfor (Double d : psoResults) {\n\t\t\taccuracy += d;\n\t\t}\n\t\taccuracy = accuracy / (double) results.size();\n\t\tSystem.out.println(\"PSO ran an average of \" + accuracy+\"% accuracy.\");\n\t}",
"public Distribution query(RandomVariable X, Assignment e, BayesianNetwork network);",
"@Test\r\n\tpublic void testPositiveGenerateSignedGaussians_1() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tHashMap<String, Object> o = roc.generateSignedGaussians(10, 3.41d, 2.1d, 4);\r\n\t\t\t\t\r\n\t\t\t\tthis.signedValueTester(roc, i, o, double[].class);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}",
"public void testTwoWayDistribution() {\n for(int p = 0; p < 20; p++) {\n int[] landings = new int[2];\n for(long in = 0; in < 100000; in++) {\n long longHash = FPGenerator.std64.fp(p+\"a\"+in);\n// long longHash = rand.nextLong();\n// long longHash = ArchiveUtils.doubleMurmur((p+\":\"+in).getBytes());\n landings[conhash.bucketFor(longHash, 2)]++;\n }\n// System.out.println(landings[0]+\",\"+landings[1]);\n assertTrue(\"excessive changes\",Math.abs(landings[0]-landings[1]) < 2000); \n }\n }",
"public static void main(String[] args) {\n\t\tRandom r=new Random();\t//实例化一个Random类\n\t\t//随机产生一个整数\n\t\tSystem.out.println(\"随机产生一个整数:\"+r.nextInt());\t\n\t\t//随机产生一个大于等于0小于10的整数\n\t\tSystem.out.println(\"随机产生一个大于等于0小于10的整数:\"+r.nextInt(10));\t\n\t\t//随机产生一个布尔类型的值\n\t\tSystem.out.println(\"随机产生一个布尔类型的值:\"+r.nextBoolean());\t\n\t\t//随机产生一个双精度类型的值\n\t\tSystem.out.println(\"随机产生一个双精度类型的值:\"+r.nextDouble());\t\n\t\t//随机产生一个浮点型的值\n\t\tSystem.out.println(\"随机产生一个浮点型的值:\"+r.nextFloat());\t\n\t\t//随机产生一个概率密度为高斯分布的双精度值\n\t\tSystem.out.println(\"随机产生一个概率密度为高斯分布的双精度值:\"+r.nextGaussian());\n\t}",
"public static void main(String[] args) {\n\t\tRandomDoubles rd=new RandomDoubles(){};\n\t\tfor(int i=0;i<7;i++)\n\t\t\tSystem.out.println(rd.next()+\" \");\n\t}",
"public abstract double getGen(int i);",
"public ProbabilityDistribution(Random random) {\n\t\trandom_ = random;\n\t\titemProbs_ = new MutableKeyMap<T, Double>();\n\t}",
"public int produce(int min, int max, int start, int subpopulation, Individual[] inds, ec.EvolutionState state, int thread)\n/* */ {\n/* 27 */ int n = this.sources[0].produce(min, max, start, subpopulation, inds, state, thread);\n/* */ \n/* */ \n/* */ \n/* 31 */ if (!state.random[thread].nextBoolean(this.likelihood)) {\n/* 32 */ return reproduce(n, start, subpopulation, inds, state, thread, false);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 38 */ if (!(this.sources[0] instanceof ec.BreedingPipeline)) {\n/* 39 */ for (int q = start; q < n + start; q++) {\n/* 40 */ inds[q] = ((Individual)inds[q].clone());\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 48 */ if (!(inds[start] instanceof TestCaseCandidate))\n/* 49 */ state.output.fatal(\"OurMutatorPipeline didn't get an Chromosome.The offending individual is in subpopulation \" + \n/* 50 */ subpopulation + \" and it's:\" + inds[start]);\n/* 51 */ ChromosomeSpecies species = (ChromosomeSpecies)inds[start].species;\n/* */ \n/* */ \n/* */ \n/* 55 */ for (int q = start; q < n + start; q++)\n/* */ {\n/* 57 */ TestCaseCandidate i = (TestCaseCandidate)inds[q];\n/* 58 */ double mutp = 1.0D / i.getGenes().size();\n/* */ \n/* 60 */ double[] propa = new double[i.getGenes().size()];\n/* 61 */ for (int x = 0; x < i.getGenes().size(); x++)\n/* 62 */ propa[x] = mutp;\n/* 63 */ for (int x = 0; x < i.getGenes().size(); x++) {\n/* 64 */ if (state.random[thread].nextBoolean(propa[x]))\n/* */ {\n/* */ \n/* 67 */ ((csbst.generators.AbsractGenerator)i.getGenes().get(x)).mutate();\n/* */ }\n/* */ }\n/* */ \n/* 71 */ i.evaluated = false;\n/* */ }\n/* */ \n/* 74 */ return n;\n/* */ }",
"public void calculateProbabilities(){\n\t}",
"@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }",
"private void generateData(){\n generateP50boys();\n generateP50girls();\n generateP97boys();\n generateP97girls();\n }",
"public static ArrayList<Double> generate(int n1, int n2, int ton, int phrase) throws MidiUnavailableException, InterruptedException, InvalidMidiDataException, IOException {\n Synthesizer synth = MidiSystem.getSynthesizer();\n synth.open();\n final MidiChannel[] channels = synth.getChannels();\n ArrayList<Double> normalizedResult=new ArrayList<>();\n\n int fn=n1,sn=n2,nn,tr;\n Sequence seq= new Sequence(Sequence.PPQ,10,2);\n Track track=seq.getTracks()[0];\n Track track2=seq.getTracks()[1];\n\n for(int i=0;i<phrase;i++)\n {\n nn=Weights.nextNote(fn,sn);\n\n channels[0].noteOn(nn+ton,127);\n //tr=nn+4;\n //if(Math.random()<0.5) channels[0].noteOn(tr+ton,127);\n //channels[0].noteOn(tr+3+ton,127);\n //if(Math.random()<0.2) channels[0].noteOn(tr+8+ton,127);\n\n ShortMessage sm=new ShortMessage();\n sm.setMessage(ShortMessage.NOTE_ON,nn,100);\n track.add(new MidiEvent(sm,i*4));sm=new ShortMessage();\n sm.setMessage(ShortMessage.NOTE_ON,nn+3,90);\n track.add(new MidiEvent(sm,i*4));\n\n\n\n if(i%2==0) {\n Thread.sleep(350);\n }\n else {\n Thread.sleep(150);\n }\n\n normalizedResult.add(1./nn);\n\n\n channels[0].noteOff(nn+ton);\n //channels[0].noteOff(tr+ton);\n //channels[0].noteOff(tr+3+ton);\n //channels[0].noteOff(tr+8+ton);\n fn=sn;\n sn=nn;\n }\n\n MidiSystem.write(seq, 1,new File(\"src/sample/result.mid\"));\n System.out.println(\"GG end\");\n return normalizedResult;\n }",
"public BernoulliDistribution(){\n\t\tthis(0.5);\n\t}",
"public static void main(String[] args) throws IOException {\n\t\tint numSets = 10000;//10000;//500\r\n\t\tint numElements = 1000;//1000; //50\r\n\t\t\r\n//\t\tint[] betas = {2, 4, 8, 16, 32};\r\n//\t\tString[] probfiles = {\"scpnrg1.txt\", \"scpnrg2.txt\", \"scpnrg5.txt\"};\r\n//\t\tString[] probfiles = {\"scpnrh1.txt\", \"scpnrh3.txt\", \"scpnrh5.txt\"};\r\n\t\tint[] betas = {5};\r\n\t\tString[] probfiles = {\"scpnrg1.txt\", \"scpnrg5.txt\"};\r\n\t\tint numTimesRun = 1;\r\n\t\tint runningTime = 10;\r\n\t\tPrintWriter printWriter = new PrintWriter(new File(\"tuning_testIII.csv\"));\r\n\t\tfor(String dataset: probfiles){\r\n\t\t\tStringBuilder stringBuilder = new StringBuilder();\r\n\t\t\tfor(int beta: betas){\r\n\t\t\t\tfor(int i =0 ; i<numTimesRun; i++){\r\n\t\t\t\tDataObject data = new DataObject((\"src/\" + dataset), numSets);\r\n\t\t\t\tGRASP1 grasp = new GRASP1(numElements, numSets, data.getSets());\r\n\t\t\t\tint solution = grasp.run(runningTime, beta);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tstringBuilder.append(\"Profiles: \" + \";\" + dataset + \";\");\r\n\t\t\t\tstringBuilder.append(\"The beta value: \" + \";\" + beta + \";\");\r\n\t\t\t\tstringBuilder.append(\"ItrationCount\" + \";\" + grasp.itrationCount + \";\");\r\n\t\t\t\tstringBuilder.append(\"Solution value: \" + \";\" + solution + \"\\n\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tprintWriter.write(stringBuilder.toString());\r\n\t\t}\r\n\t\tprintWriter.close();\r\n\t\tSystem.out.println(\"done!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\");\r\n\r\n\t}",
"public static void main(String[] args) {\n /* *************** */\n /* * QUESTION 7 * */\n /* *************** */\n /* *************** */\n\n for(double p=0; p<1; p+=0.1){\n for(double q=0; q<1; q+=0.1){\n int res_1 = 0;\n int res_2 = 0;\n for(int i=0; i<100; i++){\n Graph graph_1 = new Graph();\n graph_1.generate_full_symmetric(p, q, 100);\n //graph_2.setVertices(new ArrayList<>(graph_1.getVertices()));\n Graph graph_2 = (Graph) deepCopy(graph_1);\n res_1+=graph_1.resolve_heuristic_v1().size();\n res_2+=graph_2.resolve_heuristic_v2();\n }\n res_1/=100;\n System.out.format(\"V1 - f( %.1f ; %.1f) = %s \\n\", p, q, res_1);\n res_2/=100;\n System.out.format(\"V2 - f( %.1f ; %.1f) = %s \\n\", p, q, res_2);\n }\n }\n\n }",
"public static void main(String[] args) throws Exception {\n\t\tString matlabLocation = \"/usr/local/MATLAB/R2012a/bin/matlab\";\n\t\tMatlabProxyFactoryOptions options = new MatlabProxyFactoryOptions.Builder()\n\t\t\t\t.setProxyTimeout(30000L).setMatlabLocation(matlabLocation)\n\t\t\t\t.setHidden(true).build();\n\n\t\tMatlabProxyFactory factory = new MatlabProxyFactory(options);\n\t\tMatlabProxy proxy = factory.getProxy();\n\n\t\tSAXBuilder builder = new SAXBuilder();\n\t\tString inputCorpusDir = \"../data/ACL2015/testData\";\n\t\tDocument doc = builder.build(inputCorpusDir + \"/\"\n\t\t\t\t+ \"GuidedSumm_topics.xml\");\n\t\tElement root = doc.getRootElement();\n\t\tList<Element> corpusList = root.getChildren();\n\n\t\tString outputSummaryDir = \"../data/ACL2015/Output\";\n\t\tString confFilePath = \"../data/ACL2015/ROUGE/conf.xml\";\n\t\t\n\n\t\tint iterTime = 3;\n\t\t\t\t\n\t\t///////////////////////////////////////////////\t\n\t\t\n\t\tint[] numberClusters_DCNN = {7, 8};\n\t\t\n\n\t\t//////////////////////////////////////////////////////\n\t\tPrintWriter out_DCNN_Spe_H_Har_H_110 = FileOperation.getPrintWriter(new File(\n\t\t\t\toutputSummaryDir), \"experiment_result_DCNN_Spe_H_Har_H_110\");\n\t\tfor (int j = 0; j < numberClusters_DCNN.length; j++) {\n\t\t\tint numberCluster = numberClusters_DCNN[j];\n\t\t\tdouble averageMetric_1 = 0.0;\n\t\t\tdouble averageMetric_2 = 0.0;\n\t\t\tdouble averageMetric_SU4 = 0.0;\n\n\t\t\tfor (int k = 0; k < iterTime; k++) {\n\t\t\t\tfor (int i = 0; i < corpusList.size(); i++) {\n\t\t\t\t\tSystem.out.println(\"Corpus id is \" + i);\n\t\t\t\t\tElement topic = corpusList.get(i);\n\t\t\t\t\tList<Element> docSets = topic.getChildren();\n\t\t\t\t\tElement docSetA = docSets.get(1);\n\t\t\t\t\tString corpusName = docSetA.getAttributeValue(\"id\");\n\t\t\t\t\tAbstractiveGenerator sg = new AbstractiveGenerator();\n\t\t\t\t\tsg.DCNN_Spe_H_Har_H_110(inputCorpusDir + \"/\" +topic.getAttributeValue(\"id\"), outputSummaryDir, corpusName, numberCluster, proxy);\n\t\t\t\t\t \n\t\t\t\t}\n\n\t\t\t\tHashMap map_1 = RougeEvaluationWrapper.runRough(confFilePath,\n\t\t\t\t\t\t\"ROUGE-1\");\n\t\t\t\tDouble met_1 = (Double) map_1.get(\"ROUGE-1\");\n\t\t\t\tSystem.out.println(\"ROUGE-1\" + \" \" + numberCluster + \" \" + met_1);\n\t\t\t\taverageMetric_1 += met_1;\n\n\t\t\t\tHashMap map_2 = RougeEvaluationWrapper.runRough(confFilePath,\n\t\t\t\t\t\t\"ROUGE-2\");\n\t\t\t\tDouble met_2 = (Double) map_2.get(\"ROUGE-2\");\n\t\t\t\tSystem.out.println(\"ROUGE-2\" + \" \" + numberCluster + \" \" + met_2);\n\t\t\t\taverageMetric_2 += met_2;\n\n\t\t\t\tHashMap map_SU4 = RougeEvaluationWrapper.runRough(confFilePath,\n\t\t\t\t\t\t\"ROUGE-SU4\");\n\t\t\t\tDouble met_SU4 = (Double) map_SU4.get(\"ROUGE-SU4\");\n\t\t\t\tSystem.out.println(\"ROUGE-SU4\" + \" \" + numberCluster + \" \" + met_SU4);\n\t\t\t\taverageMetric_SU4 += met_SU4;\n\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Average ROUGE-1\" + \" \" + numberCluster + \" : \" + averageMetric_1\n\t\t\t\t\t/ iterTime);\n\t\t\tout_DCNN_Spe_H_Har_H_110.println(\"Average ROUGE-1\" + \" \" + numberCluster + \" : \" + averageMetric_1\n\t\t\t\t\t/ iterTime);\n\n\t\t\tSystem.out.println(\"Average ROUGE-2\" + \" \" + numberCluster + \" : \" + averageMetric_2\n\t\t\t\t\t/ iterTime);\n\t\t\tout_DCNN_Spe_H_Har_H_110.println(\"Average ROUGE-2\" + \" \" + numberCluster + \" : \" + averageMetric_2\n\t\t\t\t\t/ iterTime);\n\n\t\t\tSystem.out.println(\"Average ROUGE-SU4\" + \" \" + numberCluster + \" : \"\n\t\t\t\t\t+ averageMetric_SU4 / iterTime);\n\t\t\tout_DCNN_Spe_H_Har_H_110.println(\"Average ROUGE-SU4\" + \" \" + numberCluster + \" : \" + averageMetric_SU4\n\t\t\t\t\t/ iterTime);\n\t\t}\n\t\tout_DCNN_Spe_H_Har_H_110.close();\n\t\t\n\t\t/////////////////////////////////////////////\n\t\t\n\t\tPrintWriter out_DCNN_Spe_H_Har_C_110 = FileOperation.getPrintWriter(new File(\n\t\t\t\toutputSummaryDir), \"experiment_result_DCNN_Spe_H_Har_C_110\");\n\t\tfor (int j = 0; j < numberClusters_DCNN.length; j++) {\n\t\t\tint numberCluster = numberClusters_DCNN[j];\n\t\t\tdouble averageMetric_1 = 0.0;\n\t\t\tdouble averageMetric_2 = 0.0;\n\t\t\tdouble averageMetric_SU4 = 0.0;\n\n\t\t\tfor (int k = 0; k < iterTime; k++) {\n\t\t\t\tfor (int i = 0; i < corpusList.size(); i++) {\n\t\t\t\t\tSystem.out.println(\"Corpus id is \" + i);\n\t\t\t\t\tElement topic = corpusList.get(i);\n\t\t\t\t\tList<Element> docSets = topic.getChildren();\n\t\t\t\t\tElement docSetA = docSets.get(1);\n\t\t\t\t\tString corpusName = docSetA.getAttributeValue(\"id\");\n\t\t\t\t\tAbstractiveGenerator sg = new AbstractiveGenerator();\n\t\t\t\t\tsg.DCNN_Spe_H_Har_C_110(inputCorpusDir + \"/\" +topic.getAttributeValue(\"id\"), outputSummaryDir, corpusName, numberCluster, proxy);\n\t\t\t\t\t \n\t\t\t\t}\n\n\t\t\t\tHashMap map_1 = RougeEvaluationWrapper.runRough(confFilePath,\n\t\t\t\t\t\t\"ROUGE-1\");\n\t\t\t\tDouble met_1 = (Double) map_1.get(\"ROUGE-1\");\n\t\t\t\tSystem.out.println(\"ROUGE-1\" + \" \" + numberCluster + \" \" + met_1);\n\t\t\t\taverageMetric_1 += met_1;\n\n\t\t\t\tHashMap map_2 = RougeEvaluationWrapper.runRough(confFilePath,\n\t\t\t\t\t\t\"ROUGE-2\");\n\t\t\t\tDouble met_2 = (Double) map_2.get(\"ROUGE-2\");\n\t\t\t\tSystem.out.println(\"ROUGE-2\" + \" \" + numberCluster + \" \" + met_2);\n\t\t\t\taverageMetric_2 += met_2;\n\n\t\t\t\tHashMap map_SU4 = RougeEvaluationWrapper.runRough(confFilePath,\n\t\t\t\t\t\t\"ROUGE-SU4\");\n\t\t\t\tDouble met_SU4 = (Double) map_SU4.get(\"ROUGE-SU4\");\n\t\t\t\tSystem.out.println(\"ROUGE-SU4\" + \" \" + numberCluster + \" \" + met_SU4);\n\t\t\t\taverageMetric_SU4 += met_SU4;\n\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Average ROUGE-1\" + \" \" + numberCluster + \" : \" + averageMetric_1\n\t\t\t\t\t/ iterTime);\n\t\t\tout_DCNN_Spe_H_Har_C_110.println(\"Average ROUGE-1\" + \" \" + numberCluster + \" : \" + averageMetric_1\n\t\t\t\t\t/ iterTime);\n\n\t\t\tSystem.out.println(\"Average ROUGE-2\" + \" \" + numberCluster + \" : \" + averageMetric_2\n\t\t\t\t\t/ iterTime);\n\t\t\tout_DCNN_Spe_H_Har_C_110.println(\"Average ROUGE-2\" + \" \" + numberCluster + \" : \" + averageMetric_2\n\t\t\t\t\t/ iterTime);\n\n\t\t\tSystem.out.println(\"Average ROUGE-SU4\" + \" \" + numberCluster + \" : \"\n\t\t\t\t\t+ averageMetric_SU4 / iterTime);\n\t\t\tout_DCNN_Spe_H_Har_C_110.println(\"Average ROUGE-SU4\" + \" \" + numberCluster + \" : \" + averageMetric_SU4\n\t\t\t\t\t/ iterTime);\n\t\t}\n\t\tout_DCNN_Spe_H_Har_C_110.close();\n\t\t\n\t\t////////////////////////////////////\n\t\tPrintWriter out_DCNN_Spe_C_Gre_H_110 = FileOperation.getPrintWriter(new File(\n\t\t\t\toutputSummaryDir), \"experiment_result_DCNN_Spe_C_Gre_H_110\");\n\t\tfor (int j = 0; j < numberClusters_DCNN.length; j++) {\n\t\t\tint numberCluster = numberClusters_DCNN[j];\n\t\t\tdouble averageMetric_1 = 0.0;\n\t\t\tdouble averageMetric_2 = 0.0;\n\t\t\tdouble averageMetric_SU4 = 0.0;\n\n\t\t\tfor (int k = 0; k < iterTime; k++) {\n\t\t\t\tfor (int i = 0; i < corpusList.size(); i++) {\n\t\t\t\t\tSystem.out.println(\"Corpus id is \" + i);\n\t\t\t\t\tElement topic = corpusList.get(i);\n\t\t\t\t\tList<Element> docSets = topic.getChildren();\n\t\t\t\t\tElement docSetA = docSets.get(1);\n\t\t\t\t\tString corpusName = docSetA.getAttributeValue(\"id\");\n\t\t\t\t\tAbstractiveGenerator sg = new AbstractiveGenerator();\n\t\t\t\t\tsg.DCNN_Spe_C_Gre_H_110(inputCorpusDir + \"/\" +topic.getAttributeValue(\"id\"), outputSummaryDir, corpusName, numberCluster, proxy);\n\t\t\t\t\t \n\t\t\t\t}\n\n\t\t\t\tHashMap map_1 = RougeEvaluationWrapper.runRough(confFilePath,\n\t\t\t\t\t\t\"ROUGE-1\");\n\t\t\t\tDouble met_1 = (Double) map_1.get(\"ROUGE-1\");\n\t\t\t\tSystem.out.println(\"ROUGE-1\" + \" \" + numberCluster + \" \" + met_1);\n\t\t\t\taverageMetric_1 += met_1;\n\n\t\t\t\tHashMap map_2 = RougeEvaluationWrapper.runRough(confFilePath,\n\t\t\t\t\t\t\"ROUGE-2\");\n\t\t\t\tDouble met_2 = (Double) map_2.get(\"ROUGE-2\");\n\t\t\t\tSystem.out.println(\"ROUGE-2\" + \" \" + numberCluster + \" \" + met_2);\n\t\t\t\taverageMetric_2 += met_2;\n\n\t\t\t\tHashMap map_SU4 = RougeEvaluationWrapper.runRough(confFilePath,\n\t\t\t\t\t\t\"ROUGE-SU4\");\n\t\t\t\tDouble met_SU4 = (Double) map_SU4.get(\"ROUGE-SU4\");\n\t\t\t\tSystem.out.println(\"ROUGE-SU4\" + \" \" + numberCluster + \" \" + met_SU4);\n\t\t\t\taverageMetric_SU4 += met_SU4;\n\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Average ROUGE-1\" + \" \" + numberCluster + \" : \" + averageMetric_1\n\t\t\t\t\t/ iterTime);\n\t\t\tout_DCNN_Spe_C_Gre_H_110.println(\"Average ROUGE-1\" + \" \" + numberCluster + \" : \" + averageMetric_1\n\t\t\t\t\t/ iterTime);\n\n\t\t\tSystem.out.println(\"Average ROUGE-2\" + \" \" + numberCluster + \" : \" + averageMetric_2\n\t\t\t\t\t/ iterTime);\n\t\t\tout_DCNN_Spe_C_Gre_H_110.println(\"Average ROUGE-2\" + \" \" + numberCluster + \" : \" + averageMetric_2\n\t\t\t\t\t/ iterTime);\n\n\t\t\tSystem.out.println(\"Average ROUGE-SU4\" + \" \" + numberCluster + \" : \"\n\t\t\t\t\t+ averageMetric_SU4 / iterTime);\n\t\t\tout_DCNN_Spe_C_Gre_H_110.println(\"Average ROUGE-SU4\" + \" \" + numberCluster + \" : \" + averageMetric_SU4\n\t\t\t\t\t/ iterTime);\n\t\t}\n\t\tout_DCNN_Spe_C_Gre_H_110.close();\n\t\t\n\t\t//////////////////////////////\n\t\tPrintWriter out_DCNN_Spe_C_Gre_C_110 = FileOperation.getPrintWriter(new File(\n\t\t\t\toutputSummaryDir), \"experiment_result_DCNN_Spe_C_Gre_C_110\");\n\t\tfor (int j = 0; j < numberClusters_DCNN.length; j++) {\n\t\t\tint numberCluster = numberClusters_DCNN[j];\n\t\t\tdouble averageMetric_1 = 0.0;\n\t\t\tdouble averageMetric_2 = 0.0;\n\t\t\tdouble averageMetric_SU4 = 0.0;\n\n\t\t\tfor (int k = 0; k < iterTime; k++) {\n\t\t\t\tfor (int i = 0; i < corpusList.size(); i++) {\n\t\t\t\t\tSystem.out.println(\"Corpus id is \" + i);\n\t\t\t\t\tElement topic = corpusList.get(i);\n\t\t\t\t\tList<Element> docSets = topic.getChildren();\n\t\t\t\t\tElement docSetA = docSets.get(1);\n\t\t\t\t\tString corpusName = docSetA.getAttributeValue(\"id\");\n\t\t\t\t\tAbstractiveGenerator sg = new AbstractiveGenerator();\n\t\t\t\t\tsg.DCNN_Spe_C_Gre_C_110(inputCorpusDir + \"/\" +topic.getAttributeValue(\"id\"), outputSummaryDir, corpusName, numberCluster, proxy);\n\t\t\t\t\t \n\t\t\t\t}\n\n\t\t\t\tHashMap map_1 = RougeEvaluationWrapper.runRough(confFilePath,\n\t\t\t\t\t\t\"ROUGE-1\");\n\t\t\t\tDouble met_1 = (Double) map_1.get(\"ROUGE-1\");\n\t\t\t\tSystem.out.println(\"ROUGE-1\" + \" \" + numberCluster + \" \" + met_1);\n\t\t\t\taverageMetric_1 += met_1;\n\n\t\t\t\tHashMap map_2 = RougeEvaluationWrapper.runRough(confFilePath,\n\t\t\t\t\t\t\"ROUGE-2\");\n\t\t\t\tDouble met_2 = (Double) map_2.get(\"ROUGE-2\");\n\t\t\t\tSystem.out.println(\"ROUGE-2\" + \" \" + numberCluster + \" \" + met_2);\n\t\t\t\taverageMetric_2 += met_2;\n\n\t\t\t\tHashMap map_SU4 = RougeEvaluationWrapper.runRough(confFilePath,\n\t\t\t\t\t\t\"ROUGE-SU4\");\n\t\t\t\tDouble met_SU4 = (Double) map_SU4.get(\"ROUGE-SU4\");\n\t\t\t\tSystem.out.println(\"ROUGE-SU4\" + \" \" + numberCluster + \" \" + met_SU4);\n\t\t\t\taverageMetric_SU4 += met_SU4;\n\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Average ROUGE-1\" + \" \" + numberCluster + \" : \" + averageMetric_1\n\t\t\t\t\t/ iterTime);\n\t\t\tout_DCNN_Spe_C_Gre_C_110.println(\"Average ROUGE-1\" + \" \" + numberCluster + \" : \" + averageMetric_1\n\t\t\t\t\t/ iterTime);\n\n\t\t\tSystem.out.println(\"Average ROUGE-2\" + \" \" + numberCluster + \" : \" + averageMetric_2\n\t\t\t\t\t/ iterTime);\n\t\t\tout_DCNN_Spe_C_Gre_C_110.println(\"Average ROUGE-2\" + \" \" + numberCluster + \" : \" + averageMetric_2\n\t\t\t\t\t/ iterTime);\n\n\t\t\tSystem.out.println(\"Average ROUGE-SU4\" + \" \" + numberCluster + \" : \"\n\t\t\t\t\t+ averageMetric_SU4 / iterTime);\n\t\t\tout_DCNN_Spe_C_Gre_C_110.println(\"Average ROUGE-SU4\" + \" \" + numberCluster + \" : \" + averageMetric_SU4\n\t\t\t\t\t/ iterTime);\n\t\t}\n\t\tout_DCNN_Spe_C_Gre_C_110.close();\n\t\t////////////////////////////////\n\t\tPrintWriter out_DCNN_Spe_H_Gre_H_110 = FileOperation.getPrintWriter(new File(\n\t\t\t\toutputSummaryDir), \"experiment_result_DCNN_Spe_H_Gre_H_110\");\n\t\tfor (int j = 0; j < numberClusters_DCNN.length; j++) {\n\t\t\tint numberCluster = numberClusters_DCNN[j];\n\t\t\tdouble averageMetric_1 = 0.0;\n\t\t\tdouble averageMetric_2 = 0.0;\n\t\t\tdouble averageMetric_SU4 = 0.0;\n\n\t\t\tfor (int k = 0; k < iterTime; k++) {\n\t\t\t\tfor (int i = 0; i < corpusList.size(); i++) {\n\t\t\t\t\tSystem.out.println(\"Corpus id is \" + i);\n\t\t\t\t\tElement topic = corpusList.get(i);\n\t\t\t\t\tList<Element> docSets = topic.getChildren();\n\t\t\t\t\tElement docSetA = docSets.get(1);\n\t\t\t\t\tString corpusName = docSetA.getAttributeValue(\"id\");\n\t\t\t\t\tAbstractiveGenerator sg = new AbstractiveGenerator();\n\t\t\t\t\tsg.DCNN_Spe_H_Gre_H_110(inputCorpusDir + \"/\" +topic.getAttributeValue(\"id\"), outputSummaryDir, corpusName, numberCluster, proxy);\n\t\t\t\t\t \n\t\t\t\t}\n\n\t\t\t\tHashMap map_1 = RougeEvaluationWrapper.runRough(confFilePath,\n\t\t\t\t\t\t\"ROUGE-1\");\n\t\t\t\tDouble met_1 = (Double) map_1.get(\"ROUGE-1\");\n\t\t\t\tSystem.out.println(\"ROUGE-1\" + \" \" + numberCluster + \" \" + met_1);\n\t\t\t\taverageMetric_1 += met_1;\n\n\t\t\t\tHashMap map_2 = RougeEvaluationWrapper.runRough(confFilePath,\n\t\t\t\t\t\t\"ROUGE-2\");\n\t\t\t\tDouble met_2 = (Double) map_2.get(\"ROUGE-2\");\n\t\t\t\tSystem.out.println(\"ROUGE-2\" + \" \" + numberCluster + \" \" + met_2);\n\t\t\t\taverageMetric_2 += met_2;\n\n\t\t\t\tHashMap map_SU4 = RougeEvaluationWrapper.runRough(confFilePath,\n\t\t\t\t\t\t\"ROUGE-SU4\");\n\t\t\t\tDouble met_SU4 = (Double) map_SU4.get(\"ROUGE-SU4\");\n\t\t\t\tSystem.out.println(\"ROUGE-SU4\" + \" \" + numberCluster + \" \" + met_SU4);\n\t\t\t\taverageMetric_SU4 += met_SU4;\n\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Average ROUGE-1\" + \" \" + numberCluster + \" : \" + averageMetric_1\n\t\t\t\t\t/ iterTime);\n\t\t\tout_DCNN_Spe_H_Gre_H_110.println(\"Average ROUGE-1\" + \" \" + numberCluster + \" : \" + averageMetric_1\n\t\t\t\t\t/ iterTime);\n\n\t\t\tSystem.out.println(\"Average ROUGE-2\" + \" \" + numberCluster + \" : \" + averageMetric_2\n\t\t\t\t\t/ iterTime);\n\t\t\tout_DCNN_Spe_H_Gre_H_110.println(\"Average ROUGE-2\" + \" \" + numberCluster + \" : \" + averageMetric_2\n\t\t\t\t\t/ iterTime);\n\n\t\t\tSystem.out.println(\"Average ROUGE-SU4\" + \" \" + numberCluster + \" : \"\n\t\t\t\t\t+ averageMetric_SU4 / iterTime);\n\t\t\tout_DCNN_Spe_H_Gre_H_110.println(\"Average ROUGE-SU4\" + \" \" + numberCluster + \" : \" + averageMetric_SU4\n\t\t\t\t\t/ iterTime);\n\t\t}\n\t\tout_DCNN_Spe_H_Gre_H_110.close();\n\t\t\n\t\t////////////////////////\n\t\tPrintWriter out_DCNN_Spe_H_Gre_C_110 = FileOperation.getPrintWriter(new File(\n\t\t\t\toutputSummaryDir), \"experiment_result_DCNN_Spe_H_Gre_C_110\");\n\t\tfor (int j = 0; j < numberClusters_DCNN.length; j++) {\n\t\t\tint numberCluster = numberClusters_DCNN[j];\n\t\t\tdouble averageMetric_1 = 0.0;\n\t\t\tdouble averageMetric_2 = 0.0;\n\t\t\tdouble averageMetric_SU4 = 0.0;\n\n\t\t\tfor (int k = 0; k < iterTime; k++) {\n\t\t\t\tfor (int i = 0; i < corpusList.size(); i++) {\n\t\t\t\t\tSystem.out.println(\"Corpus id is \" + i);\n\t\t\t\t\tElement topic = corpusList.get(i);\n\t\t\t\t\tList<Element> docSets = topic.getChildren();\n\t\t\t\t\tElement docSetA = docSets.get(1);\n\t\t\t\t\tString corpusName = docSetA.getAttributeValue(\"id\");\n\t\t\t\t\tAbstractiveGenerator sg = new AbstractiveGenerator();\n\t\t\t\t\tsg.DCNN_Spe_H_Gre_C_110(inputCorpusDir + \"/\" +topic.getAttributeValue(\"id\"), outputSummaryDir, corpusName, numberCluster, proxy);\n\t\t\t\t\t \n\t\t\t\t}\n\n\t\t\t\tHashMap map_1 = RougeEvaluationWrapper.runRough(confFilePath,\n\t\t\t\t\t\t\"ROUGE-1\");\n\t\t\t\tDouble met_1 = (Double) map_1.get(\"ROUGE-1\");\n\t\t\t\tSystem.out.println(\"ROUGE-1\" + \" \" + numberCluster + \" \" + met_1);\n\t\t\t\taverageMetric_1 += met_1;\n\n\t\t\t\tHashMap map_2 = RougeEvaluationWrapper.runRough(confFilePath,\n\t\t\t\t\t\t\"ROUGE-2\");\n\t\t\t\tDouble met_2 = (Double) map_2.get(\"ROUGE-2\");\n\t\t\t\tSystem.out.println(\"ROUGE-2\" + \" \" + numberCluster + \" \" + met_2);\n\t\t\t\taverageMetric_2 += met_2;\n\n\t\t\t\tHashMap map_SU4 = RougeEvaluationWrapper.runRough(confFilePath,\n\t\t\t\t\t\t\"ROUGE-SU4\");\n\t\t\t\tDouble met_SU4 = (Double) map_SU4.get(\"ROUGE-SU4\");\n\t\t\t\tSystem.out.println(\"ROUGE-SU4\" + \" \" + numberCluster + \" \" + met_SU4);\n\t\t\t\taverageMetric_SU4 += met_SU4;\n\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Average ROUGE-1\" + \" \" + numberCluster + \" : \" + averageMetric_1\n\t\t\t\t\t/ iterTime);\n\t\t\tout_DCNN_Spe_H_Gre_C_110.println(\"Average ROUGE-1\" + \" \" + numberCluster + \" : \" + averageMetric_1\n\t\t\t\t\t/ iterTime);\n\n\t\t\tSystem.out.println(\"Average ROUGE-2\" + \" \" + numberCluster + \" : \" + averageMetric_2\n\t\t\t\t\t/ iterTime);\n\t\t\tout_DCNN_Spe_H_Gre_C_110.println(\"Average ROUGE-2\" + \" \" + numberCluster + \" : \" + averageMetric_2\n\t\t\t\t\t/ iterTime);\n\n\t\t\tSystem.out.println(\"Average ROUGE-SU4\" + \" \" + numberCluster + \" : \"\n\t\t\t\t\t+ averageMetric_SU4 / iterTime);\n\t\t\tout_DCNN_Spe_H_Gre_C_110.println(\"Average ROUGE-SU4\" + \" \" + numberCluster + \" : \" + averageMetric_SU4\n\t\t\t\t\t/ iterTime);\n\t\t}\n\t\tout_DCNN_Spe_H_Gre_C_110.close();\n\t\t\n\t\t////////////////////////////\n\t\tPrintWriter out_DCNN_Spe_H_LGC_C_110 = FileOperation.getPrintWriter(new File(\n\t\t\t\toutputSummaryDir), \"experiment_result_DCNN_Spe_H_LGC_C_110\");\n\t\tfor (int j = 0; j < numberClusters_DCNN.length; j++) {\n\t\t\tint numberCluster = numberClusters_DCNN[j];\n\t\t\tdouble averageMetric_1 = 0.0;\n\t\t\tdouble averageMetric_2 = 0.0;\n\t\t\tdouble averageMetric_SU4 = 0.0;\n\n\t\t\tfor (int k = 0; k < iterTime; k++) {\n\t\t\t\tfor (int i = 0; i < corpusList.size(); i++) {\n\t\t\t\t\tSystem.out.println(\"Corpus id is \" + i);\n\t\t\t\t\tElement topic = corpusList.get(i);\n\t\t\t\t\tList<Element> docSets = topic.getChildren();\n\t\t\t\t\tElement docSetA = docSets.get(1);\n\t\t\t\t\tString corpusName = docSetA.getAttributeValue(\"id\");\n\t\t\t\t\tAbstractiveGenerator sg = new AbstractiveGenerator();\n\t\t\t\t\tsg.DCNN_Spe_H_LGC_C_110(inputCorpusDir + \"/\" +topic.getAttributeValue(\"id\"), outputSummaryDir, corpusName, numberCluster, proxy);\n\t\t\t\t\t \n\t\t\t\t}\n\n\t\t\t\tHashMap map_1 = RougeEvaluationWrapper.runRough(confFilePath,\n\t\t\t\t\t\t\"ROUGE-1\");\n\t\t\t\tDouble met_1 = (Double) map_1.get(\"ROUGE-1\");\n\t\t\t\tSystem.out.println(\"ROUGE-1\" + \" \" + numberCluster + \" \" + met_1);\n\t\t\t\taverageMetric_1 += met_1;\n\n\t\t\t\tHashMap map_2 = RougeEvaluationWrapper.runRough(confFilePath,\n\t\t\t\t\t\t\"ROUGE-2\");\n\t\t\t\tDouble met_2 = (Double) map_2.get(\"ROUGE-2\");\n\t\t\t\tSystem.out.println(\"ROUGE-2\" + \" \" + numberCluster + \" \" + met_2);\n\t\t\t\taverageMetric_2 += met_2;\n\n\t\t\t\tHashMap map_SU4 = RougeEvaluationWrapper.runRough(confFilePath,\n\t\t\t\t\t\t\"ROUGE-SU4\");\n\t\t\t\tDouble met_SU4 = (Double) map_SU4.get(\"ROUGE-SU4\");\n\t\t\t\tSystem.out.println(\"ROUGE-SU4\" + \" \" + numberCluster + \" \" + met_SU4);\n\t\t\t\taverageMetric_SU4 += met_SU4;\n\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Average ROUGE-1\" + \" \" + numberCluster + \" : \" + averageMetric_1\n\t\t\t\t\t/ iterTime);\n\t\t\tout_DCNN_Spe_H_LGC_C_110.println(\"Average ROUGE-1\" + \" \" + numberCluster + \" : \" + averageMetric_1\n\t\t\t\t\t/ iterTime);\n\n\t\t\tSystem.out.println(\"Average ROUGE-2\" + \" \" + numberCluster + \" : \" + averageMetric_2\n\t\t\t\t\t/ iterTime);\n\t\t\tout_DCNN_Spe_H_LGC_C_110.println(\"Average ROUGE-2\" + \" \" + numberCluster + \" : \" + averageMetric_2\n\t\t\t\t\t/ iterTime);\n\n\t\t\tSystem.out.println(\"Average ROUGE-SU4\" + \" \" + numberCluster + \" : \"\n\t\t\t\t\t+ averageMetric_SU4 / iterTime);\n\t\t\tout_DCNN_Spe_H_LGC_C_110.println(\"Average ROUGE-SU4\" + \" \" + numberCluster + \" : \" + averageMetric_SU4\n\t\t\t\t\t/ iterTime);\n\t\t}\n\t\tout_DCNN_Spe_H_LGC_C_110.close();\n\t\t\n\t\t///////////////////////\n\t\t\n\t\tPrintWriter out_DCNN_Spe_C_LGC_C_110 = FileOperation.getPrintWriter(new File(\n\t\t\t\toutputSummaryDir), \"experiment_result_DCNN_Spe_C_LGC_C_110\");\n\t\tfor (int j = 0; j < numberClusters_DCNN.length; j++) {\n\t\t\tint numberCluster = numberClusters_DCNN[j];\n\t\t\tdouble averageMetric_1 = 0.0;\n\t\t\tdouble averageMetric_2 = 0.0;\n\t\t\tdouble averageMetric_SU4 = 0.0;\n\n\t\t\tfor (int k = 0; k < iterTime; k++) {\n\t\t\t\tfor (int i = 0; i < corpusList.size(); i++) {\n\t\t\t\t\tSystem.out.println(\"Corpus id is \" + i);\n\t\t\t\t\tElement topic = corpusList.get(i);\n\t\t\t\t\tList<Element> docSets = topic.getChildren();\n\t\t\t\t\tElement docSetA = docSets.get(1);\n\t\t\t\t\tString corpusName = docSetA.getAttributeValue(\"id\");\n\t\t\t\t\tAbstractiveGenerator sg = new AbstractiveGenerator();\n\t\t\t\t\tsg.DCNN_Spe_C_LGC_C_110(inputCorpusDir + \"/\" +topic.getAttributeValue(\"id\"), outputSummaryDir, corpusName, numberCluster, proxy);\n\t\t\t\t\t \n\t\t\t\t}\n\n\t\t\t\tHashMap map_1 = RougeEvaluationWrapper.runRough(confFilePath,\n\t\t\t\t\t\t\"ROUGE-1\");\n\t\t\t\tDouble met_1 = (Double) map_1.get(\"ROUGE-1\");\n\t\t\t\tSystem.out.println(\"ROUGE-1\" + \" \" + numberCluster + \" \" + met_1);\n\t\t\t\taverageMetric_1 += met_1;\n\n\t\t\t\tHashMap map_2 = RougeEvaluationWrapper.runRough(confFilePath,\n\t\t\t\t\t\t\"ROUGE-2\");\n\t\t\t\tDouble met_2 = (Double) map_2.get(\"ROUGE-2\");\n\t\t\t\tSystem.out.println(\"ROUGE-2\" + \" \" + numberCluster + \" \" + met_2);\n\t\t\t\taverageMetric_2 += met_2;\n\n\t\t\t\tHashMap map_SU4 = RougeEvaluationWrapper.runRough(confFilePath,\n\t\t\t\t\t\t\"ROUGE-SU4\");\n\t\t\t\tDouble met_SU4 = (Double) map_SU4.get(\"ROUGE-SU4\");\n\t\t\t\tSystem.out.println(\"ROUGE-SU4\" + \" \" + numberCluster + \" \" + met_SU4);\n\t\t\t\taverageMetric_SU4 += met_SU4;\n\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Average ROUGE-1\" + \" \" + numberCluster + \" : \" + averageMetric_1\n\t\t\t\t\t/ iterTime);\n\t\t\tout_DCNN_Spe_C_LGC_C_110.println(\"Average ROUGE-1\" + \" \" + numberCluster + \" : \" + averageMetric_1\n\t\t\t\t\t/ iterTime);\n\n\t\t\tSystem.out.println(\"Average ROUGE-2\" + \" \" + numberCluster + \" : \" + averageMetric_2\n\t\t\t\t\t/ iterTime);\n\t\t\tout_DCNN_Spe_C_LGC_C_110.println(\"Average ROUGE-2\" + \" \" + numberCluster + \" : \" + averageMetric_2\n\t\t\t\t\t/ iterTime);\n\n\t\t\tSystem.out.println(\"Average ROUGE-SU4\" + \" \" + numberCluster + \" : \"\n\t\t\t\t\t+ averageMetric_SU4 / iterTime);\n\t\t\tout_DCNN_Spe_C_LGC_C_110.println(\"Average ROUGE-SU4\" + \" \" + numberCluster + \" : \" + averageMetric_SU4\n\t\t\t\t\t/ iterTime);\n\t\t}\n\t\tout_DCNN_Spe_C_LGC_C_110.close();\n\t\t\n\t\t\n\t\tproxy.disconnect();\n\t}",
"public void random_initialize_ss()\r\n\t{\r\n//\t\tMersenneTwister mt = new MersenneTwister(10); //set seed\r\n\t\tRandom rand = new Random(); \r\n\t\tint k, n;\r\n\t\tfor (k = 0; k < num_topics; k++)\r\n\t {\r\n\t for (n = 0; n < num_terms; n++)\r\n\t {\r\n\t class_word[k][n] += 1.0/num_terms + rand.nextDouble();\r\n\t class_total[k] += class_word[k][n];\r\n\t }\r\n\t }\r\n\t}",
"protected ProbabilityDistribution getDistribution()\r\n\t{\r\n\t\treturn this.distribution;\r\n\t}",
"@Test\n\tpublic void testPoisson() throws Exception {\n\t\tPoissonDistribution p = new PoissonDistributionImpl(1);\n\t\tRandom random = new Random();\n\t\tint[] counts = new int[500];\n\t\tfor (int i = 0; i < 10000; i++) {\n\t\t\tcounts[p.inverseCumulativeProbability(random.nextDouble()) + 1]++;\n\t\t}\n\t\tdouble delta = 0.03;\n\t\tassertEquals(0.367879, counts[0] / 10000d, delta);\n\t\tassertEquals(0.367879, counts[1] / 10000d, delta);\n\t\tassertEquals(0.183940, counts[2] / 10000d, delta);\n\t\tassertEquals(0.061313, counts[3] / 10000d, delta);\n\t\tassertEquals(0.015328, counts[4] / 10000d, delta);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.0) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.1) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.2) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.3) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.4) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.5) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.6) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.7) + 1, 0);\n\t\tassertEquals(2, p.inverseCumulativeProbability(0.8) + 1, 0);\n\t\tassertEquals(2, p.inverseCumulativeProbability(0.9) + 1, 0);\n\t\tassertEquals(3, p.inverseCumulativeProbability(0.95) + 1, 0);\n\t\tassertEquals(3, p.inverseCumulativeProbability(0.975) + 1, 0);\n\t\tassertEquals(4, p.inverseCumulativeProbability(0.99) + 1, 0);\n\n\t\t// Poisson dist with t = 0.86\n\t\tp = new PoissonDistributionImpl(0.86);\n\t\tcounts = new int[500];\n\t\tfor (int i = 0; i < 10000; i++) {\n\t\t\tcounts[p.inverseCumulativeProbability(random.nextDouble()) + 1]++;\n\t\t}\n\t\tdelta = 0.03;\n\t\tassertEquals(0.423162, counts[0] / 10000d, delta);\n\t\tassertEquals(0.363919, counts[1] / 10000d, delta);\n\t\tassertEquals(0.156485, counts[2] / 10000d, delta);\n\t\tassertEquals(0.044819, counts[3] / 10000d, delta);\n\t\tassertEquals(0.009645, counts[4] / 10000d, delta);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.0) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.1) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.2) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.3) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.4) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.5) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.6) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.7) + 1, 0);\n\t\tassertEquals(2, p.inverseCumulativeProbability(0.8) + 1, 0);\n\t\tassertEquals(2, p.inverseCumulativeProbability(0.9) + 1, 0);\n\t\tassertEquals(3, p.inverseCumulativeProbability(0.95) + 1, 0);\n\t\tassertEquals(3, p.inverseCumulativeProbability(0.975) + 1, 0);\n\t\tassertEquals(4, p.inverseCumulativeProbability(0.99) + 1, 0);\n\t}",
"@Override\n public void runOneExperiment(int numGoods, int numBidders, int k, double p, String distribution, SqlDB dbLogger) throws Exception {\n if (!dbLogger.checkIfRowExists(\"singleton_\" + distribution, numGoods, numBidders, p)) {\n System.out.print(\"\\t Adding data... \");\n HashMap<String, DescriptiveStatistics> stats = new HashMap<String, DescriptiveStatistics>();\n for (int i = 0; i < RunParameters.numTrials; i++) {\n // Generate Singleton random market.\n SingletonMarket<Goods, Bidder<Goods>> M = this.getSingletonMarket(numGoods, numBidders, p, distribution);\n // Optimal Utilitarian Allocation.\n MarketAllocation<Market<Goods, Bidder<Goods>>, Goods, Bidder<Goods>> utilitarianMaxAlloc = new WelfareMaxAllocationILP<Market<Goods, Bidder<Goods>>, Goods, Bidder<Goods>>().Solve(M);\n double optimalWelfare = utilitarianMaxAlloc.getValue();\n // Optimal Egalitarian Allocation.\n MarketAllocation<Market<Goods, Bidder<Goods>>, Goods, Bidder<Goods>> egalitarianMaxAlloc = new EgalitarianMaxAllocationILP<Market<Goods, Bidder<Goods>>, Goods, Bidder<Goods>>().Solve(M);\n double optimalEgalitarian = (double) egalitarianMaxAlloc.getNumberOfWinners();\n // Obtain statistics from all algorithms.\n this.populateStats(stats, new SingletonEVP(M).Solve(), \"ev\", optimalWelfare, optimalEgalitarian);\n this.populateStats(stats, this.getRevMaxMarketPrices(M, Allocations.GreedyWelfare), \"gw\", optimalWelfare, optimalEgalitarian);\n this.populateStats(stats, this.getRevMaxMarketPrices(M, Allocations.GreedyEgalitarian), \"ge\", optimalWelfare, optimalEgalitarian);\n this.populateStats(stats, this.getRevMaxMarketPrices(M, Allocations.OptimalWelfare), \"ow\", optimalWelfare, optimalEgalitarian);\n this.populateStats(stats, this.getRevMaxMarketPrices(M, Allocations.OptimalEgalitarian), \"oe\", optimalWelfare, optimalEgalitarian);\n this.populateStats(stats, this.getRevMaxMarketPrices(M, Allocations.WaterFall), \"wf\", optimalWelfare, optimalEgalitarian);\n this.populateStats(stats, this.getRevMaxMarketPrices(M, Allocations.MaxBidder), \"mb\", optimalWelfare, optimalEgalitarian);\n }\n System.out.println(\"done!\");\n dbLogger.saveSingleton(\"singleton_\" + distribution, numGoods, numBidders, p, stats);\n } else {\n System.out.println(\"\\t Already have data \");\n }\n }",
"@SuppressWarnings(\"unchecked\")\r\n public static HashMap<Integer,TreeMap<Integer,Double>> word_distribute(Corpus c, SparseBackoffTree [] sbtToOutput) throws Exception{\n @SuppressWarnings(\"rawtypes\")\r\n HashMap<Integer,HashMap<Integer,Double>> word_givenTopic = new HashMap();\r\n for(int i = 0; i < c._pWord.length; i++) {\r\n if(c._pWord[i] > 0.0) {\r\n TIntDoubleHashMap hm = sbtToOutput[i].getLeafCounts();\r\n TIntDoubleIterator it = hm.iterator();\r\n while(it.hasNext()) {\r\n it.advance();\r\n int sId = it.key();\r\n double val = it.value()/c._pWord[i];\r\n if(word_givenTopic.containsKey(sId)){\r\n HashMap<Integer,Double> sublist = word_givenTopic.get(sId);\r\n sublist.put(i,val);\r\n }else{\r\n @SuppressWarnings(\"rawtypes\")\r\n HashMap<Integer,Double> sublist = new HashMap();\r\n sublist.put(i,val);\r\n word_givenTopic.put(sId,sublist);\r\n }\r\n }\r\n }\r\n }\r\n\r\n //sort the hash map by value.\r\n @SuppressWarnings(\"rawtypes\")\r\n HashMap<Integer,TreeMap<Integer,Double>> final_result = new HashMap();\r\n for(Entry<Integer, HashMap<Integer, Double>> entry : word_givenTopic.entrySet()) {\r\n int key = entry.getKey();\r\n HashMap<Integer,Double> word_distribution = entry.getValue();\r\n ByValueComparator bvc = new ByValueComparator(word_distribution);\r\n TreeMap<Integer, Double> sorted_word_distribution = new TreeMap<Integer, Double>(bvc);\r\n sorted_word_distribution.putAll(word_distribution);\r\n final_result.put(key,sorted_word_distribution);\r\n } \r\n return final_result;\r\n}",
"public void outputRandomVariableAtoms() {\n for (StandardPredicate openPredicate : parentDataStore.getRegisteredPredicates()) {\n for (GroundAtom atom : getAtomStore().getRandomVariableAtoms(openPredicate)) {\n System.out.println(atom.toString() + \" = \" + atom.getValue());\n }\n }\n }",
"public static void main(String[] args) {\n\r\n\t\tRandom rr=new Random();\r\n\t\t\r\n\t\tSystem.out.println(Math.random());//[0,1)\r\n\t\t \r\n\t\t// 第一种情况 int(强转之后最终的值一定是0)\r\n\t\t// 第二种情况 int(强转之后将小数点舍去 1-5)\r\n\t\tSystem.out.println((int)Math.random()*5);//0.99*5永远到不了5\r\n\t\tSystem.out.println((int)(Math.random()*5+1));//[1,5.)\r\n\t\t\r\n\t\tSystem.out.println(rr.rand107());\r\n\t\tSystem.out.println(rr.rand107());\r\n\t\tSystem.out.println(rr.rand107());\r\n\t\tSystem.out.println(rr.rand107());\r\n\t\t\r\n\t\tfor(int i=0;i<=20;i++){\r\n\t\t\tSystem.out.print(i%7+\"-\");\r\n\t\t\t\r\n\t\t}\r\n\t\t//1-M的随机产生\r\n\t\t//(int)(Math.random()*M+1)\r\n\t\t\r\n\t\t\r\n\t\t//产生0 1的概率不同 Math.random()<p?0:1\r\n\t\tSystem.out.println(\"----\"+rr.rand01p());\r\n\t\tSystem.out.println(\"----\"+rr.rand01());\r\n\t\tfor(int i=0;i<=11;i++){\r\n\t\t\tSystem.out.print(i%6+\"-\");\r\n\t\t \t\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(rr.rand106());\r\n\t}",
"public List<Distribution> calculateDistribution() {\n String[] distinctExpenses = getDistinctElements(listOfTargets);\n distributionList = initializeList(distinctExpenses);\n\n for (int i = 0; i < distributionList.size(); i++) {\n for (int j = 0; j < distinctExpenses.length; j++) {\n\n if (distinctExpenses[i].equals(distributionList.get(i).getName())) {\n distributionList.get(i).setAmount(valueLoader(distinctExpenses[i]));\n double tmp1 = valueLoader(distinctExpenses[i]);\n double tmp2 = sumOfExpenses;\n distributionList.get(i).setPercentage(tmp1 / tmp2 * 100);\n logger.debug(\"Calculated the distribution of an entity. {}\",\n distributionList.get(i).toString());\n }\n }\n }\n return distributionList;\n }",
"public interface DataDistribution {\n\n /**\n * Sample a {@code PredictionInput} from this distribution.\n * \n * @return a prediction input\n */\n PredictionInput sample();\n\n /**\n * Sample a number of {@code PredictionInputs} from this distribution.\n * \n * @return a list of prediction inputs\n */\n List<PredictionInput> sample(int sampleSize);\n\n /**\n * Get all the {@code PredictionInputs} from this distribution.\n * \n * @return a list of prediction inputs\n */\n List<PredictionInput> getAllSamples();\n\n /**\n * Get separate (independent) distributions for each feature.\n * \n * @return a list of feature distributions\n */\n List<FeatureDistribution> asFeatureDistributions();\n}",
"public MyPacMan optimise(List<double[]> dimensionList){\n for(int i = 0; i < POPULATION_SIZE; i++){\r\n MyPacMan individual = new MyPacMan(dimensionList);\r\n population.add(individual);\r\n \r\n } \r\n \r\n // try more than one iteration \r\n for(int iterationCount = 0; iterationCount < ITERATION_NO; iterationCount++){\r\n \r\n System.out.println(\"Iterazione n°: \" + Integer.toString(iterationCount));\r\n \r\n if(iterationCount%10 == 0 || iterationCount == ITERATION_NO-1){\r\n try {\r\n pw = new PrintWriter(new File(\"data/popoluation_\" + Integer.toString(iterationCount) +\".csv\"));\r\n } catch (FileNotFoundException ex) {\r\n \r\n } \r\n \r\n \r\n for(int n = 0; n < dimensionList.size(); n++){ \r\n pw.write(\"v\" + Integer.toString(n));\r\n pw.write(\",\");\r\n }\r\n \r\n pw.write(\"fValue\");\r\n\r\n pw.write(\"\\n\");\r\n \r\n for (MyPacMan individual : population) {\r\n pw.write(individual.toString());\r\n pw.write(\",\");\r\n pw.write(Double.toString(fitFunction(individual)));\r\n pw.write(\"\\n\");\r\n }\r\n \r\n pw.flush();\r\n }\r\n \r\n int loop = 0;\r\n \r\n // main loop for evolution\r\n while(loop < population.size()){ \r\n\r\n MyPacMan original = null;\r\n MyPacMan candidate = null;\r\n boolean boundsHappy;\r\n\r\n do{\r\n boundsHappy = true;\r\n // pick an agent from the the population\r\n int x = loop;\r\n int a,b,c = -1;\r\n\r\n // pick three random agents from the population\r\n // make sure that they are not identical to selected agent from\r\n // the population \r\n\r\n do{\r\n a = random.nextInt(population.size());\r\n }while(x == a);\r\n do{\r\n b = random.nextInt(population.size());\r\n }while(b==x || b==a);\r\n do{\r\n c = random.nextInt(population.size());\r\n }while(c == x || c == a || c == b);\r\n\r\n // create three agent individuals\r\n MyPacMan individual1 = population.get(a);\r\n MyPacMan individual2 = population.get(b);\r\n MyPacMan individual3 = population.get(c);\r\n\r\n // create a noisy random candidate\r\n MyPacMan noisyRandomCandicate = new MyPacMan(dimensionList);\r\n\r\n // mutation process\r\n // if an element of the trial parameter vector is\r\n // found to violate the bounds after mutation and crossover, it is reset in such a way that the bounds\r\n // are respected (with the specific protocol depending on the implementation)\r\n for(int n = 0; n < dimensionList.size(); n++){ \r\n noisyRandomCandicate.dataValue[n] = (individual1.dataValue[n] + DIFFERENTIAL_WEIGHT * (individual2.dataValue[n] - individual3.dataValue[n])); \r\n } \r\n\r\n // Create a trial candicate \r\n original = population.get(x);\r\n candidate = new MyPacMan(dimensionList);\r\n\r\n // copy values from original agent to the candidate agent\r\n for(int n = 0; n < dimensionList.size(); n++){ \r\n candidate.dataValue[n] = original.dataValue[n];\r\n } \r\n\r\n // crossver process with the selected individual\r\n // pick a random dimension, which defintely takes the value from the noisy random candidate\r\n int R = random.nextInt(dimensionList.size());\r\n\r\n for(int n = 0; n < dimensionList.size(); n++){\r\n\r\n double crossoverProbability = random.nextDouble();\r\n\r\n if(crossoverProbability < CROSSOVER_PROBABILITY || n == R){\r\n candidate.dataValue[n] = noisyRandomCandicate.dataValue[n];\r\n }\r\n\r\n }\r\n\r\n // check here if the trial candiate satisfies bounds for each value\r\n for(int n = 0; n < dimensionList.size(); n++){ \r\n if(candidate.dataValue[n] < dimensionList.get(n)[0] || candidate.dataValue[n] > dimensionList.get(n)[1]){\r\n boundsHappy = false;\r\n }\r\n }\r\n\r\n }while(boundsHappy == false);\r\n\r\n //see if the candidate is better than original, if so replace it\r\n if(fitFunction(original) < fitFunction(candidate)){\r\n population.remove(original);\r\n population.add(candidate); \r\n }\r\n loop++;\r\n } \r\n }\r\n \r\n MyPacMan bestFitness = new MyPacMan(dimensionList);\r\n \r\n // selecting the final best agent from the the population\r\n for(int i = 0; i < population.size(); i++){\r\n MyPacMan individual = population.get(i);\r\n \r\n if(fitFunction(bestFitness) < fitFunction(individual)){\r\n \r\n try {\r\n bestFitness = (MyPacMan) individual.clone();\r\n } catch (CloneNotSupportedException ex) {\r\n \r\n }\r\n }\r\n }\r\n \r\n System.out.println(\"Fitness migliore: \" + fitFunction(bestFitness));\r\n return bestFitness;\r\n }",
"private void generateData(int popsize, int ntrials) {\n data = new double[ntrials][100];\n \n for (int i = 0; i < ntrials; i++) {\n Population pop = new Population(popsize, rand);\n for (int j = 0; j < 100; j++) {\n data[i][j] = pop.totalA();\n pop.advance();\n }\n }\n }",
"void CalculateProbabilities()\n\t{\n\t int i;\n\t double maxfit;\n\t maxfit=fitness[0];\n\t for (i=1;i<FoodNumber;i++)\n\t {\n\t if (fitness[i]>maxfit)\n\t maxfit=fitness[i];\n\t }\n\n\t for (i=0;i<FoodNumber;i++)\n\t {\n\t prob[i]=(0.9*(fitness[i]/maxfit))+0.1;\n\t }\n\n\t}",
"private double[][] tokenDistribution(double[] pi, StateList states) {\n\t\tint numstates = states.size();\n\t\tif (numstates == 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\tint numplaces = states.get(0).length;\n\t\tint highestnumberoftokens = 1;\n\n\t\tDecimalFormat f = new DecimalFormat();\n\t\tf.setMaximumFractionDigits(1);\n\n\t\t// The following ArrayList tallies up the probabilities.\n\t\t// Each element in the ArrayList is an array of doubles.\n\t\t// Each row in the array of doubles represents a particular number of\n\t\t// tokens on that place and the value at that row is the probability of\n\t\t// having that many tokens.\n\t\tArrayList counter = new ArrayList(numplaces);\n\n\t\tdouble[] copy; // A temporary array for storing intermediate results\n\t\tdouble[][] result;\n\n\t\t// Each place will have at least 0 or 1 tokens on it at some point so\n\t\t// initialise each ArrayList with at a double array of at least two\n\t\t// elements\n\t\tfor (int p = 0; p < numplaces; p++) {\n\t\t\tcounter.add(p, new double[] { 0, 0 });\n\t\t}\n\n\t\tSystem.out.println(\"Calculating token distribution...\");\n\t\t// Now go through each tangible state and each place in that state. For\n\t\t// each place, determine the number of tokens on it and add that states\n\t\t// steady state distribution to the appropriate tally for that place and\n\t\t// number of tokens in the ArrayList. Also keep track of the highest\n\t\t// number of tokens for any place as we will need to know it for the\n\t\t// final\n\t\t// results array.\n\t\tfor (int marking = 0; marking < numstates; marking++) {\n\t\t\tint[] current = states.get(marking);\n\t\t\tfor (int p = 0; p < numplaces; p++) {\n\t\t\t\tif (current[p] > highestnumberoftokens) {\n\t\t\t\t\thighestnumberoftokens = current[p];\n\t\t\t\t}\n\n\t\t\t\tif (current[p] > (((double[]) counter.get(p)).length - 1)) {\n\t\t\t\t\tcopy = new double[current[p] + 1];\n\t\t\t\t\tSystem.arraycopy(counter.get(p), 0, copy, 0,\n\t\t\t\t\t\t\t((double[]) counter.get(p)).length);\n\t\t\t\t\t// Zero all the remainder of the array\n\t\t\t\t\tfor (int i = ((double[]) counter.get(p)).length; i < copy.length; i++) {\n\t\t\t\t\t\tcopy[i] = 0.0;\n\t\t\t\t\t}\n\t\t\t\t\t// Start off the tally for this number of tokens on place p\n\n\t\t\t\t\tcopy[current[p]] = pi[marking];\n\t\t\t\t\t// Get rid of the old smaller array\n\t\t\t\t\tcounter.remove(p);\n\t\t\t\t\t// Put the new one in instead\n\t\t\t\t\tcounter.add(p, copy);\n\t\t\t\t} else {\n\t\t\t\t\tcopy = (double[]) counter.get(p);\n\t\t\t\t\tcopy[current[p]] += pi[marking];\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t// System.out.print(f.format(((double)marking/numstates) * 100) +\n\t\t\t// \"% done. \\r\");\n\t\t}\n\t\tSystem.out.println(\"100.0% done. \");\n\n\t\t// Now put together our results array\n\t\tresult = new double[numplaces][highestnumberoftokens + 1];\n\t\tfor (int p = 0; p < numplaces; p++) {\n\t\t\tSystem.arraycopy(counter.get(p), 0, result[p], 0,\n\t\t\t\t\t((double[]) counter.get(p)).length);\n\t\t\tif (((double[]) counter.get(p)).length < highestnumberoftokens) {\n\t\t\t\tfor (int i = ((double[]) counter.get(p)).length; i < highestnumberoftokens; i++) {\n\t\t\t\t\tresult[p][i] = 0.0;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"public BernoulliDistribution(double p){\n\t\tsuper(1, p);\n\t}",
"private static double[] randomDoubles(int elements) {\n double[] array = new double[elements];\n for (int i = 0; i < array.length; i++) {\n double chance = Math.random();\n if (chance < 0.25) \n array[i] = Math.random() * (1000);\t\n else if (chance <= 0.50)\n array[i] = Math.random() * (1001);\t\n else if (chance <= 0.75)\n array[i] = Math.random() * (1002);\n else\n array[i] = Math.random() * (1003);\t\n }\n return array;\n }",
"@Test\r\n\tpublic void testPositiveGenerateSignedGaussians_3() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tString ticketId = roc.createTickets(1, true)[0].get(\"ticketId\").getAsString();\r\n\t\t\t\tHashMap<String, Object> o = roc.generateSignedGaussians(10, 3.41d, 2.1d, 4, \r\n\t\t\t\t\t\tuserData, ticketId);\r\n\t\t\t\t\r\n\t\t\t\tthis.signedValueTester(roc, i, o, double[].class, true, ticketId);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}",
"public void runGenerational() {\n\n\t\tSystem.out.println(\"Runing pure generational demo.\");\n\t\tFunction<BitSet, Double> knapsackFitnessFunction = new KnapsackFitness(capacity, parseElements());\n\t\tSpace<BitSet> space = new BitSetSpace(weights.length);\n\n\t\tGeneticSelector<BitSet, Double> rouletteSelector = new RouletteGeneticSelector<>(POP_SIZE);\n\t\tGeneticCrossover<BitSet, Double> crossover = new BinaryCrossover<>(0.9);\n\t\tGeneticOperator<BitSet, Double> geneticOperator = new CustomGeneticOperator<>(crossover);\n\t\tGeneticReplacement<BitSet, Double> replacement = new GenerationalReplacement<>();\n\t\tTracer.add(Population.class);\n\t\tTracer.start();\n\n\t\tSearch<BitSet, Double> search = new GeneticAlgorithm<>(POP_SIZE, NUM_ITER, rouletteSelector, geneticOperator,\n\t\t\t\treplacement);\n\t\tOptimizationProblem<BitSet, Double> problem = new OptimizationProblem<>(space, knapsackFitnessFunction,\n\t\t\t\tComparator.reverseOrder());\n\t\tSolution<BitSet, Double> foundSolution = search.solve(problem);\n\n\t\tSystem.out.println(String.format(\"Best found solution: %f, bitset: %s\",\n\t\t\t\tknapsackFitnessFunction.calculate(foundSolution.getSolution()), foundSolution.getSolution()));\n\n\t\tBitSet optimalBitSet = parseOptimalBitSet();\n\t\tSystem.out.println(String.format(\"Optimal solution: %f, bitset: %s\",\n\t\t\t\tknapsackFitnessFunction.calculate(optimalBitSet), optimalBitSet));\n\t\tKnapsackMetric metric = new KnapsackMetric();\n\t\tmetric.putDataOfBestInFile(1);\n\t}",
"public HypergeometricDistribution(int m, int r, int n){\n\t\tsetParameters(m, r, n);\n\t}",
"public void evaluateUniformDistribution(String label) {\r\n // subtract one point for each card of same suit next to a card one away in rank\r\n // subtract two points for each run of two\r\n // three points for each run of three, etc.\r\n // add no points for two adjacent cards of same suit but not of sequential rank\r\n // add one point for two adjacent cards of different suit and same rank\r\n // add two points for two adjacent cards of different suit and sequential rank\r\n // add five points for two adjacent cards of different suit and different rank\r\n int score = 0;\r\n Card c = cards.get(0);\r\n Card d = null;\r\n boolean run = false;\r\n int runCount = 0;\r\n int diff = 0;\r\n for (int i = 1; i < cards.size(); i++) {\r\n d = cards.get(i);\r\n diff = c.getRank() - d.getRank();\r\n if (c.getSuit() == d.getSuit()) {\r\n // same suit\r\n if (diff == 1) { // sequential rank\r\n run = true;\r\n score -= (1 + (runCount*2));\r\n runCount++;\r\n }\r\n } else {\r\n // different suit\r\n if (diff == 0) { // same rank\r\n score++;\r\n } else if (diff == 1) { // sequential rank\r\n score += 2;\r\n } else {\r\n score += 5;\r\n }\r\n }\r\n c = d;\r\n }\r\n System.out.println(label + \" score: \" + score);\r\n }",
"public Distribution ask(BayesianNetwork bn, RandomVariable X, Assignment e, int n);",
"public static void main(String[] args) throws CalculationException {\r\n\r\n\t\tRandomVariableFactory abstractRandomVariableFactory = SIMMTest.createRandomVariableFactoryAAD();\r\n\r\n\t\t// CurveFromInterpolationPoints Data as of December 8, 2017\r\n\t\tDiscountCurveInterpolation discountCurve = DiscountCurveInterpolation.createDiscountCurveFromDiscountFactors(\"discountCurve\",\r\n\t\t\t\t// Times\r\n\t\t\t\tnew double[]{0, 0.02739726, 0.065753425, 0.095890411, 0.178082192, 0.254794521, 0.345205479, 0.421917808, 0.506849315, 0.594520548, 0.673972603, 0.764383562, 0.843835616, 0.926027397, 1.01369863, 1.254794521, 1.512328767, 2.01369863, 3.010958904, 4.010958904, 5.010958904, 6.010958904, 7.019178082, 8.016438356, 9.01369863, 10.01369863, 11.01643836, 12.02191781, 15.01917808, 18.02465753, 20.02191781, 25.02739726, 30.03287671, 40.04109589, 50.04109589},\r\n\t\t\t\t// Discount Factors\r\n\t\t\t\tnew double[]{1, 0.942220253, 1.14628676, 0.973644156, 0.989291916, 0.988947387, 0.989030365, 0.989540089, 0.989760412, 0.990003764, 0.990397338, 0.990628687, 0.990878391, 0.991165682, 0.991574886, 0.992229531, 0.993347703, 0.993022409, 0.992927371, 0.990353891, 0.98534136, 0.977964157, 0.968209156, 0.956438149, 0.942562961, 0.927724566, 0.911915214, 0.895097576, 0.84499878, 0.798562566, 0.769568088, 0.707863301, 0.654037617, 0.562380546, 0.496026132}\r\n\t\t\t\t);\r\n\r\n\t\tForwardCurveInterpolation forwardCurve = ForwardCurveInterpolation.createForwardCurveFromForwards(\"forwardCurve\",\r\n\t\t\t\t// Fixings of the forward\r\n\t\t\t\tnew double[]{0.504109589, 1.504109589, 2.509589041, 3.506849315, 4.506849315, 5.506849315, 6.509589041, 7.515068493, 8.512328767, 9.509589041, 10.51232877, 11.51232877, 12.51232877, 13.51780822, 14.51506849, 15.51506849, 16.51506849, 17.51506849, 18.52328767, 19.52054795, 20.51780822, 21.51780822, 22.52054795, 23.52054795, 24.5260274, 25.52328767, 26.52328767, 27.52328767, 28.52328767, 29.52328767, 34.52876712, 39.53150685, 44.53424658, 49.5369863, 54.54246575, 59.54520548},\r\n\t\t\t\t// Forward Rates\r\n\t\t\t\tnew double[]{-0.002630852, -6.82E-04, 0.002757708, 0.005260602, 0.007848164, 0.010749576, 0.012628982, 0.014583704, 0.017103188, 0.017791957, 0.01917447, 0.019788258, 0.020269155, 0.02327218, 0.01577317, 0.026503375, 0.017980753, 0.016047889, 0.024898978, 0.010798547, 0.027070148, 0.014816786, 0.018220786, 0.016549747, 0.008028913, 0.020022068, 0.015134412, 0.016604122, 0.014386016, 0.026732673, 0.003643934, 0.024595029, 0.002432369, 0.02233176, 0.003397059, 0.020576206},\r\n\t\t\t\t0.5/* tenor / period length */);\r\n\r\n\t\tLIBORModelMonteCarloSimulationModel model = SIMMTest.createLIBORMarketModel(false, abstractRandomVariableFactory, numberOfPaths, 1 /*numberOfFactors*/,\r\n\t\t\t\tdiscountCurve,\r\n\t\t\t\tforwardCurve);\r\n\r\n\r\n\t\t/*\r\n\t\t * Create calibration products\r\n\t\t */\r\n\t\tint[] numberOfPeriods = new int[]{10, 20, 30};\r\n\t\tSIMMSimpleSwap[] calibrationProducts = createCalibrationProducts(1000000 /*notional*/, numberOfPeriods, 0.5 /*periodLength*/, forwardCurve, discountCurve);\r\n\t\tdouble[] targetIMValues = new double[]{25000, 38000, 55000};\r\n\r\n\t\tCalculationSchemeInitialMarginISDA isdaScheme = new CalculationSchemeInitialMarginISDA(\"EUR\");\r\n\t\t//double[] swapIM = new double[]{calibrationProducts[0].getInitialMargin(0.0, model, isdaScheme).getAverage(), calibrationProducts[1].getInitialMargin(0.0, model, isdaScheme).getAverage(), calibrationProducts[2].getInitialMargin(0.0, model, isdaScheme).getAverage()};\r\n\t\tdouble[] calibratedRiskWeights = isdaScheme.getRiskWeightsCalibrated(model, calibrationProducts, targetIMValues, null /*parameters*/);\r\n\r\n\t\tSystem.out.println(\"Maturity Bucket\" + \"\\t\" + \"Risk Weight Calibrated\");\r\n\t\tfor (int i = 0; i < calibratedRiskWeights.length; i++) {\r\n\t\t\tSystem.out.println(IRMaturityBuckets[i] + \"\\t\" + calibratedRiskWeights[i]);\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\" \" + \"\\t\" + \"Swap \" + numberOfPeriods[0] * 0.5 + \"Y\" + \"\\t\" + \"Swap \" + numberOfPeriods[1] * 0.5 + \"Y\" + \"Swap \" + numberOfPeriods[2] * 0.5 + \"Y\");\r\n\t\tSystem.out.println(\"Target \" + \"\\t\" + targetIMValues[0] + \"\\t\" + targetIMValues[1] + \"\\t\" + targetIMValues[2]);\r\n\t\tSystem.out.println(\"Calibrated\" + \"\\t\" + calibrationProducts[0].getInitialMargin(0.0, model, isdaScheme).getAverage() + \"\\t\" + calibrationProducts[1].getInitialMargin(0.0, model, isdaScheme).getAverage() + \"\\t\" + calibrationProducts[2].getInitialMargin(0.0, model, isdaScheme).getAverage());\r\n\t}",
"public void sample(RandomGenerator rng) {\n\t\tdouble rate = priorRate;\n\t\tint sumTk = 0;\n\t\tfor (ProbabilityNode node : tiedNodes) {\n\t\t\tBetaDistribution betaD = new BetaDistribution(rng, this.c, node.marginal_nk);\n\t\t\tdouble q = Math.max(1e-75, betaD.sample());\n\t\t\trate += FastMath.log(1.0 / q);\n\t\t\tsumTk += node.marginal_tk;\n\t\t}\n\t\tdouble scale = 1.0 / rate;\n\t\t// marginal nk here is \\sum_{child}child.marginal_tk\n\t\tGammaDistribution gammaD = new GammaDistribution(rng, sumTk + priorShape, scale);\n\t\tthis.setConcentration(gammaD.sample());\n\t}",
"@SuppressWarnings(\"static-access\")\r\n\tpublic static void main(String args[]) {\n//\t koenig1.getHP();\r\n//\t \r\n//\t koenig1.getAttribute();\r\n//\t \r\n\t Generator.Generate(Generator.Anzahl(), Generator.Tier());\r\n\t \r\n\t\t \r\n\t }",
"public void setDistribution(int distribution) {\n this.distribution = distribution;\n }",
"@Test\r\n\tpublic void testPositiveGenerateGaussians_2() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tdouble[] response = roc.generateGaussians(10, 3.41d, 2.1d, 4, identifier);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tdouble[] response2 = roc.generateGaussians(10, 3.41d, 2.1d, 4, identifier);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\t\r\n\t\t\t\tresponse = roc.generateGaussians(10, 3.41d, 2.1d, 4, date);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tresponse2 = roc.generateGaussians(10, 3.41d, 2.1d, 4, date);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++; \r\n\t\t}\r\n\t}",
"static double getNormalDistribution(double x) {\n return (1 / Math.sqrt(2 * Math.PI)) * Math.exp(-1 * x * x / 2.0);\n }",
"static double fitness(vmnode[] vms, jobnode[] jobs, int[] assigned, HashMap<Integer, Integer> map, double[][] ect) {\n double libd = LIBD(vms, jobs, assigned);\n double makesp = calcmakespan(map, ect);\n return libd * makesp;\n }",
"public static void main(String[] args) throws Exception {\n String dataFile = \"E:\\\\InstallPacksges\\\\JIDT\\\\infodynamics-dist-1.4\\\\demos\\\\data\\\\10ColsRandomGaussian-1.txt\";\n ArrayFileReader afr = new ArrayFileReader(dataFile);\n double[][] data = afr.getDouble2DMatrix();\n // 1. Construct the calculator:\n TransferEntropyCalculatorGaussian calc;\n calc = new TransferEntropyCalculatorGaussian();\n // 2. Set any properties to non-default values:\n // No properties were set to non-default values\n\n // Compute for all pairs:\n for (int s = 0; s < 10; s++) {\n for (int d = 0; d < 10; d++) {\n // For each source-dest pair:\n if (s == d) {\n continue;\n }\n double[] source = MatrixUtils.selectColumn(data, s);\n double[] destination = MatrixUtils.selectColumn(data, d);\n\n // 3. Initialise the calculator for (re-)use:\n calc.initialise();\n // 4. Supply the sample data:\n calc.setObservations(source, destination);\n // 5. Compute the estimate:\n double result = calc.computeAverageLocalOfObservations();\n\n System.out.printf(\"TE_Gaussian(col_%d -> col_%d) = %.4f nats\\n\",\n s, d, result);\n }\n }\n\n }",
"private double gaussprob(int k, double r)\n\t{\n\t\treturn \tMath.exp( -0.5*Math.pow( ((double)k-r)/data_bg_std , 2 ) ) * \n\t\t\t\tMath.pow( 2*Math.PI, -0.5 ) / data_bg_std;\n\t}",
"public static void main(String args[]) {\n\t\t\n\t\tdouble amount;\n\t\tdouble principle = 10000;\n\t\tdouble rate = .01; // gaining subscribers by 1 percent per day\n\t\t\n\t\tfor(int day=1;day<=20;day++) {\n\t\t\tamount=principle*Math.pow(1 + rate, day);\n\t\t\tSystem.out.println(day + \" \" + amount);\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tint n = Integer.parseInt(args[0]);\n\n\t\tdouble a = Double.parseDouble(args[1]);\n\t\tdouble b = Math.abs(1-a);\n\t\tdouble areal = n*a;\n\n\t\tdouble f = Double.parseDouble(args[2]);\n\t\tdouble t = Double.parseDouble(args[3]);\n\t\t\n\t\tint t_idx = (int) t;\n\t\tint[] freq = new int[t_idx+1];\n\n\t\tdouble[] x_a = new double[t_idx];\n\t\t\n\t\t// loop counter\n\t\tint counter = 0;\n\n\t\twhile(counter < t){\n\t\t\tint votesa = 0;\n\t\t\tint votesb = 0;\n\n\t\t\t// simulate votes that should go to candidate A\n\t\t\tfor(int i=1; i<=areal; i++){ \n\t\t\t\tif(voting(f, 0) == 0) votesa++;\n\t\t\t\telse votesb++;\n\t\t\t}\n\n\t\t\t// simulate votes that should go to candidate B\n\t\t\tfor(int i=1; i <= (n-areal); i++){ \n\t\t\t\tif(voting(f,1) == 0) votesa++;\n\t\t\t\telse votesb++;\n\t\t\t}\n\n\t\t\tx_a[counter] = votesa;\n\t\t\tfreq[votesa]++;\n\n\t\t\tcounter++;\n\t\t}\n\n\t\tdouble mean_xa = StdStats.mean(x_a);\n\t\tdouble stddev_xa = StdStats.stddev(x_a);\n\n\t\tStdOut.println(\"M = \"+ mean_xa);\n\t\tStdOut.println(\"D = \"+ stddev_xa);\n\t\tif(n<=100) StdDraw.setYscale(0, 0.18);\n\t\tif(n>100 && n<500) StdDraw.setYscale(0, 0.11);\n\t\tif(n>=500) StdDraw.setYscale(0, 0.05);\n\t\t//StdDraw.setYscale(0, 0.15);\n\n\t\t// plot normalized values\n double[] normalized = new double[n+1];\n for (int i = 0; i <= n; i++) {\n normalized[i] = (double) freq[i] / t_idx;\n }\n StdStats.plotBars(normalized);\n\n // plot Gaussian approximation\n double[] phi = new double[n+1];\n for (int i = 0; i <= n; i++) {\n phi[i] = Gaussian.pdf(i, mean_xa, stddev_xa);\n }\n\t\t\n\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\tStdStats.plotLines(phi);\n\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\tStdDraw.line(n/2, 0.0, n/2, 0.2);\n\n\t\tStdDraw.save(\"histogram-\"+n+\"-\"+a+\"-\"+f+\"-\"+t_idx+\".jpg\");\n\t\t\n\t}",
"public void generateGenes() {\n\t\tfor(int i = 0; i < geneNumber; i++){\n\t\t\tdouble[] vector = new double[NUM_HEURISTICS];\n\t\t\tfor(int j = 0; j < NUM_HEURISTICS; j++){\n\t\t\t\t// To get a number in [-0.5, 0.5)\n\t\t\t\tvector[j] = Math.random() - 0.5;\n\t\t\t}\n\t\t\tGene newGene = new Gene(vector, true);\n\t\t\tgenepool.add(newGene);\n\t\t}\n\t}",
"public void computeUtility(Tile[] tile, double[] probability, double r, double g) {\n }",
"public static void main(String[] args) {\n\t\tint M = Integer.parseInt(args[0]);\n\t\tint P = Integer.parseInt(args[1]);\n\t\tint S = Integer.parseInt(args[2]);\n\t\tint J = Integer.parseInt(args[3]);\n\t\tint N = Integer.parseInt(args[4]);\n\t\tString algorithm = args[5];\n\t\t\n\t\t//this is to match the output\n\t\tSystem.out.println(\"The machine size is \"+M);\n\t\tSystem.out.println(\"The page size is \"+P);\n\t\tSystem.out.println(\"The process size is \"+S);\n\t\tSystem.out.println(\"The job mix number is \"+J);\n\t\tSystem.out.println(\"The number of references per process is \"+N);\n\t\tSystem.out.println(\"The replacement algorithm is \"+algorithm+\"\\n\\n\");\n\t\t\n\t\t\n\t\t//attempt to read in the RandomInts.txt file\n\t\tScanner intScanner = null; \n\t\ttry {\n\t\t\tintScanner = new Scanner(new File(\"random-ints.txt\"));\n\t\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.printf(\"Error: there was a problem reading the random file\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\t\n\t\tint quantum = 3;\n\t\t\n\t\tProcess currentProcess;\n\t\tArrayList<Process> processList = new ArrayList<Process>();\n\t\t\n\t\t//check now to see the job mix\n\t\tif(J == 1){\t\n\t\t\t//int processNumber, double a, double b, double c, int size, int numberOfReferences, int numberOfPages,Scanner randInt, String replacementAlgo\n\t\t\tcurrentProcess = new Process(1,1,0,0,S,N,S/P,intScanner,algorithm);\n\t\t\tprocessList.add(currentProcess);\n\t\t}\n\t\telse if(J ==2) {\n\t\t\t\n\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\tcurrentProcess = new Process(i+1,1,0,0,S,N,S/P,intScanner,algorithm);\n\t\t\t\tprocessList.add(currentProcess);\n\t\t\t}\n\t\t}\n\t\t\t\n\t\telse if (J == 3){\n\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\tcurrentProcess = new Process(i+1,0,0,0,S,N,S/P,intScanner,algorithm);\n\t\t\t\tprocessList.add(currentProcess);\n\t\t\t}\n\t\t}\n\t\t\t\n\t\telse {\n\t\t\t//1,2,3,4\n\t\t\tcurrentProcess = new Process(1,0.75,0.25,0,S,N,S/P,intScanner,algorithm);\n\t\t\tprocessList.add(currentProcess);\n\t\t\tcurrentProcess = new Process(2,0.75,0,0.25,S,N,S/P,intScanner,algorithm);\n\t\t\tprocessList.add(currentProcess);\n\t\t\tcurrentProcess = new Process(3,0.75,0.125,0.125,S,N,S/P,intScanner,algorithm);\n\t\t\tprocessList.add(currentProcess);\n\t\t\tcurrentProcess = new Process(4,0.5,0.125,0.125,S,N,S/P,intScanner,algorithm);\n\t\t\tprocessList.add(currentProcess);\n\t\t\t\n\t\t}\n\t\t\n\t\t//get the size of the frame table depending upon machine size and page size\n\t\t//remember we are also going to use the highest most frame as the first one\n\t\tint sizeOfFrame = M/P -1;\n\t\t\n\t\t\n\t\t//these are going to simply help us determine which frame is to be evicted if neccesary\n //linked list for LRU replacement algorithm\n LinkedList<Integer> LRUList = new LinkedList<Integer>();\n\n // we do not need a data structure for LIFO either because we will always replace the last frame\n \n //we do not need to use one for random since we do not need to keep track of which page we are getting rid of\n \n\t\t//this is going to hold the current process,page pair in each index so it will look like <1,{Process,page}>\n //having the Integer array will help us replace and update the frame easier then just maintaining if there's something in the map\n\t\tHashMap<Integer, Integer[]> frame = new HashMap<Integer, Integer[]>(); \n\t\t\n\t\tint time = 1;\n\t\t\n\t\tfor(int i=0; i < processList.size() * N; i++) {\n\t\t\t//get the current process\n\t\t\tProcess runningProcess = processList.get(i%processList.size());\n\t\t\t\n\t\t\tif(runningProcess.numberOfReferences <= 0) {\n\t\t\t\t//then the process is done running\n\t\t\t\ttime++;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t\t// this is simply to simulate the round robin simulation\n\t\t\tfor(int j=0; j < quantum; j++) {\n\t\t\t\t\n\t\t\t\tif(runningProcess.numberOfReferences <= 0) {\n\t\t\t\t\t//then the process is done running\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tint currentRef = runningProcess.currentReference;\n\t\t\t\t\n\t\t\t\t//now get the page index then check if it is MAX_VALUE or within the frame\n\t\t\t\tint pageIndex = currentRef/P;\n\t\t\t\tint processFrameIndex = runningProcess.pages[pageIndex];\n\t\t\t\t\n\n\t\t\t\t//we know we had a miss because the page table is not in the frame\n\t\t\t\tif(processFrameIndex == Integer.MAX_VALUE) {\n\t\t\t\t\t\n\t\t\t\t\trunningProcess.pageFaults++;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//now we determine where to place the pageTable in the frame\n\t\t\t\t\t//we know that if it is less than zero then there is no room on the frame table since we start from highest index\n\t\t\t\t\tif(sizeOfFrame < 0) {\n\t\t\t\t\t\t//then we must use some sort of replacement algorithm\n\t\t\t\t\t\tif(runningProcess.replacementAlgo.equalsIgnoreCase(\"LIFO\")) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//pop the last frame and get the necessary information\n\t\t\t\t\t\t\tInteger[] removeProcessPagePair = frame.remove(0);\n\t\t\t\t\t\t\tint removeIndex = removeProcessPagePair[0];\n\t\t\t\t\t\t\tint nullifyPageIndex = removeProcessPagePair[1];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//get the actual process from the process list and update its values\n\t\t\t\t\t\t\tProcess updateProcess = processList.get(removeIndex);\n\t\t\t\t\t\t\tupdateProcess.pages[nullifyPageIndex] = Integer.MAX_VALUE;\n\t\t\t\t\t\t\tupdateProcess.numberOfEvictions++;\n\t\t\t\t\t\t\tupdateProcess.residencyTime += time - updateProcess.pageLoadTime[nullifyPageIndex];\n\t\t\t\t\t\t\tupdateProcess.pageLoadTime[nullifyPageIndex] = 0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tsizeOfFrame++;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//update the pages array\n\t\t\t\t\t\t\trunningProcess.pages[pageIndex] = sizeOfFrame;\n\t\t\t\t\t\t\trunningProcess.pageLoadTime[pageIndex] = time;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//we will need to know which process to update and remember that to get processNum 1 \n\t\t\t\t\t\t\t//in the array list that is at index 0. Then to update its pageTable we will also need its pageIndex\n\t\t\t\t\t\t\tInteger[] processPagePair = {runningProcess.processNumber-1,pageIndex};\n\t\t\t\t\t\t\tframe.put(sizeOfFrame, processPagePair);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tsizeOfFrame--;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(runningProcess.replacementAlgo.equalsIgnoreCase(\"LRU\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//remove the top of the LRULinked List and get the index of the frame\n\t\t\t\t\t\t\tint indexRemoveFrame = LRUList.remove();\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//pop the index of the frame and get the necessary information\n\t\t\t\t\t\t\tInteger[] removeProcessPagePair = frame.remove(indexRemoveFrame);\n\t\t\t\t\t\t\tint removeIndex = removeProcessPagePair[0];\n\t\t\t\t\t\t\tint nullifyPageIndex = removeProcessPagePair[1];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//get the actual process from the process list and update its values\n\t\t\t\t\t\t\tProcess updateProcess = processList.get(removeIndex);\n\t\t\t\t\t\t\tupdateProcess.pages[nullifyPageIndex] = Integer.MAX_VALUE;\n\t\t\t\t\t\t\tupdateProcess.numberOfEvictions++;\n\t\t\t\t\t\t\tupdateProcess.residencyTime += time - updateProcess.pageLoadTime[nullifyPageIndex];\n\t\t\t\t\t\t\tupdateProcess.pageLoadTime[nullifyPageIndex] = 0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//now add to the back of the linked list the most newly updated indexFrame\n\t\t\t\t\t\t\tLRUList.add(indexRemoveFrame);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//update the running process\n\t\t\t\t\t\t\trunningProcess.pages[pageIndex] = indexRemoveFrame;\n\t\t\t\t\t\t\trunningProcess.pageLoadTime[pageIndex] = time;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//we will need to know which process to update and remember that to get processNum 1 \n\t\t\t\t\t\t\t//in the array list that is at index 0. Then to update its pageTable we will also need its pageIndex\n\t\t\t\t\t\t\tInteger[] processPagePair = {runningProcess.processNumber-1,pageIndex};\n\t\t\t\t\t\t\tframe.put(indexRemoveFrame, processPagePair);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//this indicates it is random replacement algorithm\n\t\t\t\t\t\telse if(runningProcess.replacementAlgo.equalsIgnoreCase(\"RANDOM\")) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//get the random int and then find out which random frame you are taking out\n\t\t\t\t\t\t\tint randomInt = intScanner.nextInt();\n\t\t\t\t\t\t\t//since it is probably some big number we have to accommodate it for our frame size\n\t\t\t\t\t\t\tint randomIntIndex = (randomInt + M/P)%(M/P);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//and pretty much do the same as the above but with the randomIntIndex\n\t\t\t\t\t\t\t//pop the index of the frame and get the necessary information\n\t\t\t\t\t\t\tInteger[] removeProcessPagePair = frame.remove(randomIntIndex);\n\t\t\t\t\t\t\tint removeIndex = removeProcessPagePair[0];\n\t\t\t\t\t\t\tint nullifyPageIndex = removeProcessPagePair[1];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//get the actual process from the process list and update its values\n\t\t\t\t\t\t\tProcess updateProcess = processList.get(removeIndex);\n\t\t\t\t\t\t\tupdateProcess.pages[nullifyPageIndex] = Integer.MAX_VALUE;\n\t\t\t\t\t\t\tupdateProcess.numberOfEvictions++;\n\t\t\t\t\t\t\tupdateProcess.residencyTime += time - updateProcess.pageLoadTime[nullifyPageIndex];\n\t\t\t\t\t\t\tupdateProcess.pageLoadTime[nullifyPageIndex] = 0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/////DO IF CYCLE IS IN 38 DEBUGG IN HERE/////\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//update the running process\n\t\t\t\t\t\t\trunningProcess.pages[pageIndex] = randomIntIndex;\n\t\t\t\t\t\t\trunningProcess.pageLoadTime[pageIndex] = time;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//we will need to know which process to update and remember that to get processNum 1 \n\t\t\t\t\t\t\t//in the array list that is at index 0. Then to update its pageTable we will also need its pageIndex\n\t\t\t\t\t\t\tInteger[] processPagePair = {runningProcess.processNumber-1,pageIndex};\n\t\t\t\t\t\t\tframe.put(randomIntIndex, processPagePair);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t//otherwise we will now place the pageTable into the frame\n\t\t\t\t\telse {\n\t\t\t\t\t\t\n\t\t\t\t\t\t//update the pages array\n\t\t\t\t\t\trunningProcess.pages[pageIndex] = sizeOfFrame;\n\t\t\t\t\t\trunningProcess.pageLoadTime[pageIndex] = time;\n\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\t//we will need to know which process to update and remember that to get processNum 1 \n\t\t\t\t\t\t//in the array list that is at index 0. Then to update its pageTable we will also need its pageIndex\n\t\t\t\t\t\tInteger[] processPagePair = {runningProcess.processNumber-1,pageIndex};\n\t\t\t\t\t\tframe.put(sizeOfFrame, processPagePair);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//update the LRU if the process is using the algorithm\n\t\t\t\t\t\tif(runningProcess.replacementAlgo.equalsIgnoreCase(\"LRU\")) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//sizeOfFrame is also essentially the index of the frame\n\t\t\t\t\t\t\tLRUList.add(sizeOfFrame);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//now there is one less frame available\n\t\t\t\t\t\tsizeOfFrame--;\n\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t//there was a page hit\n\t\t\t\telse {\n\n\t\t\t\t\t//update the most recently used page for LRU\n\t\t\t\t\tif(runningProcess.replacementAlgo.equalsIgnoreCase(\"LRU\")) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t //to get it back to 0 in case we are on the last frame\n\t\t\t\t\t\t\n\t\t\t\t\t\tint removeIndex = LRUList.indexOf(processFrameIndex);\n\n\t\t\t\t\t\t//put to the end of the list\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tint updatePage = LRUList.remove(removeIndex);\n\t\t\t\t\t\tLRUList.add(updatePage);\n\t\t\t\t\t\t //to indicate we have no more frames incase the next reference needs a new one\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t//remember this also decrements the amount of references that the process has left \n\t\t\t\trunningProcess.getNextReference();\n\t\t\t\ttime++;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\tint totalFaults = 0;\n\t\tint totalEvictions = 0;\n\t\tdouble totalResidency = 0;\n\t\t\n\t\tfor(int i=0; i<processList.size();i++) {\n\t\t\t\n\t\t\tif(processList.get(i).numberOfEvictions != 0) {\n\t\t\t\ttotalFaults += processList.get(i).pageFaults;\n\t\t\t\ttotalResidency += processList.get(i).residencyTime;\n\t\t\t\ttotalEvictions += processList.get(i).numberOfEvictions;\n\t\t\t\tSystem.out.printf(\"Process Number: %d had %d faults and an average residency of %f\",processList.get(i).processNumber,processList.get(i).pageFaults,processList.get(i).residencyTime/processList.get(i).numberOfEvictions);\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttotalFaults += processList.get(i).pageFaults;\n\t\t\t\tSystem.out.printf(\"Process Number: %d had %d faults and with no evictions an average residency of undefined\",processList.get(i).processNumber,processList.get(i).pageFaults);\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t\tSystem.out.println(\"\\n\");\n\t\t\n\t\t\n\t\tif(totalEvictions != 0) {\n\t\t\tdouble avgTotalResidency = totalResidency/totalEvictions;\n\t\t\tSystem.out.printf(\"The total number of faults is %d and the overall average residency is %f\", totalFaults,avgTotalResidency);\n\t\t}\n\t\telse {\n\t\t\tSystem.out.printf(\"The total number of faults is %d and the overall average residency is undefined\", totalFaults);\n\t\t}\n\t\tSystem.out.println(\"\");\n\t\t\n\n\t}",
"public static void main(String[] args) {\n\t\tdouble[] x = new double[SIZE];\r\n\t\tdouble[] y = new double[SIZE];\r\n\t\tdouble[] a = new double[SIZE];\r\n\t\tdouble[] b = new double[SIZE];\r\n\t\tdouble[] c = new double[SIZE];\r\n\t\tdouble[] d = new double[SIZE];\r\n\t\tdouble[] ksi = new double[SIZE];\r\n\t\tdouble[] eta = new double[SIZE];\r\n\t\tdouble hPow2 = Math.pow(h, 2);\r\n\t\tdouble alpha0 = -1.95, alpha1 = 2.0;\r\n\t\tdouble A1 = 0.0, B1 = -6.02;\r\n\t\tdouble beta0 = -1.2, beta1 = 1.0;\r\n\t\tksi[1] = -(alpha1/alpha0);\r\n\t\teta[1] = -(A1/alpha0);\r\n\t\tfor(int k = 1; k < SIZE; k++){\r\n\t\t\ta[k] = 1.0;\r\n\t\t\tx[k] = A + k*h;\r\n\t\t\tb[k] = 2 + hPow2*(x[k]+1);\r\n\t\t\tc[k] = 1.0;\r\n\t\t\td[k] = hPow2*(Math.pow(x[k],5)+Math.pow(x[k],3)-6*x[k]);\r\n\t\t\tif(k!=SIZE-1){\r\n\t\t\t\tksi[k+1] = (c[k])/(b[k]-ksi[k]*c[k]);\r\n\t\t\t\teta[k+1] = (a[k]*eta[k]-d[k])/(b[k]-ksi[k]*c[k]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tint n = SIZE - 1;\r\n\t\ty[n] = (B1-beta0*eta[n])/(beta1+beta0*ksi[n]);\r\n\t\tfor(int k = n-1; k > 0; k--){\r\n\t\t\ty[k] = ksi[k+1]*y[k+1] + eta[k+1];\r\n\t\t\tSystem.out.print(\"ksi: \" + ksi[k] + \" eta: \" + eta[k] + \" y: \"+ y[k]);\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}",
"public static void main(String args[]) {\n\t\t\n\t\tString dataPath = args[0];\n\t\tint iniIter = Integer.parseInt(args[1]);\n\t\tboolean isCov1 = Boolean.parseBoolean(args[2]);\n\t\tint maxIter = Integer.parseInt(args[3]);\n\t\t\n\t\tgaussianEM gem = new gaussianEM(dataPath, iniIter, isCov1, maxIter);\n\t\tSystem.out.println(\"log likelihood/10000:\");\n\t\tSystem.out.println(gem.loglike/10000);\n\t\tSystem.out.println(\"centers:\");\n\t\tSystem.out.println(gem.mu_k[0]);\n\t\tSystem.out.println(gem.mu_k[1]);\n\t\tSystem.out.println(gem.mu_k[2]);\n\t\tSystem.out.println(\"variance:\");\n\t\tSystem.out.println(gem.cov_k[0]);\n\t\tSystem.out.println(gem.cov_k[1]);\n\t\tSystem.out.println(gem.cov_k[2]);\n\t\tSystem.out.println(\"assiginment ration of each clusters:\");\n\t\tSystem.out.println(gem.pi_k[0]);\n\t\tSystem.out.println(gem.pi_k[1]);\n\t\tSystem.out.println(gem.pi_k[2]);\n\t}",
"public StandardSolution (long[] nums){\n \t\tsequence = nums;\n \t\tpartitions = new boolean[sequence.length];\n \t\t\n \t\tRandom rand = new Random();\n \t\tfor (int i = 0; i < partitions.length; i++){\n \t\t\t// worry about seeing?\n \t\t\tpartitions[i] = rand.nextBoolean();\n \t\t}\n \t}",
"double[] ComputeNew(node st){\n\tnode p;\n\tdouble[] l;\n\tdouble[] r;\n\tdouble[] result=new double[NUMFITCASE];\n\t\n\tfor(int j=0;j<NUMVAR;j++){\t\t\n\t\t\n\t\tif(st.name.equals(\"X\"+String.valueOf(j+1))){\n\t\t\tfor(int i=0; i<NUMFITCASE; i++)\n\t\t\t{\n\t\t\t\tresult[i]=fitcase[i].x[j];\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\t\n\tif(st.name.equals(\"C\")){\n\t\tfor(int i=0; i<NUMFITCASE; i++)\n\t\t{\n\t\t\tresult[i]=st.value;\n\t\t}\n\t\treturn result;\n\t}\n\telse\n\t\tif(st.name.equals(\"ERC\")) {\n\t\t\tif(st.value==VOIDVALUE) //if it has not been initialized then initialized and return the value\n\t\t\t st.value=GenerateER(st.name); \n\t\t//\t st.att[i]=st.value;\n\t\t\tfor(int i=0; i<NUMFITCASE; i++)\n\t\t\t{\n\t\t\t\tresult[i]=st.value; \n\t\t\t}\n\t\t\treturn result;\t\t\t \n\t\t}\t\n\telse // st.name=\"EXP\"\n\t{\n\t\tp = st.children;\n\t\tif(st.name.equals(\"add\")) {\n\t\t\tl = ComputeNew(p);\n\t\t\tr = ComputeNew(p.sibling);\n\t\t\tfor(int i=0; i<NUMFITCASE; i++)\n\t\t\t{\n\t\t\t\tresult[i]=PVAL(l[i] + r[i]);\n\t\t\t}\n\t\t\treturn result;\n\t\t} else if(st.name.equals(\"sub\")) {\n\t\t\tl = ComputeNew(p);\n\t\t\tr = ComputeNew(p.sibling);\n\t\t\tfor(int i=0; i<NUMFITCASE; i++)\n\t\t\t{\n\t\t\t\tresult[i]=PVAL(l[i] - r[i]);\n\t\t\t}\n\t\t\treturn result;\n\t\t} else if(st.name.equals(\"mul\")) {\n\t\t\tl = ComputeNew(p);\n\t\t\tr = ComputeNew(p.sibling);\n\t\t\tfor(int i=0; i<NUMFITCASE; i++)\n\t\t\t{\n\t\t\t\tresult[i]=PVAL(l[i] * r[i]);\n\t\t\t}\n\t\t\treturn result;\n\t\t} else if(st.name.equals(\"div\")) {\n\t\t\tl = ComputeNew(p);\n\t\t\tr = ComputeNew(p.sibling);\n\t\t\tfor(int i=0; i<NUMFITCASE; i++)\n\t\t\t{\n\t\t\t\tif(r[i] == 0) \n\t\t\t\t\t{result[i]= 1;}\n\t\t\t\telse {result[i]= PVAL(l[i]/r[i]);}\t\t\t\t\n\t\t\t}\n\t\t\treturn result;\n\t\t\n\t\t} else if(st.name.equals(\"sin\")) {\n\t\t\tl = ComputeNew(p);\n\t\t\tfor(int i=0; i<NUMFITCASE; i++)\n\t\t\t{\n\t\t\t\tresult[i]= Math.sin(l[i]);\t\t\t\t\n\t\t\t}\n\t\t\treturn result;\n\t\t\t\n\t\t\t\n\t\t} else if(st.name.equals(\"cos\")) {\n\t\t\tl = ComputeNew(p);\n\t\t\tfor(int i=0; i<NUMFITCASE; i++)\n\t\t\t{\n\t\t\t\tresult[i]= Math.cos(l[i]);\t\t\t\t\n\t\t\t}\n\t\t\treturn result;\n\t\t\t\n\t\t} else if(st.name.equals(\"sqrt\")) {\n\t\t\tl = ComputeNew(p);\n\t\t\tfor(int i=0; i<NUMFITCASE; i++)\n\t\t\t{\n\t\t\t\tresult[i]= Math.sqrt(Math.abs(l[i]));\t\t\t\n\t\t\t}\n\t\t\treturn result;\t\t\t\n\t\t} else if(st.name.equals(\"sqr\")) {\n\t\t\tl = ComputeNew(p);\n\t\t\tfor(int i=0; i<NUMFITCASE; i++)\n\t\t\t{\n\t\t\t\tresult[i]= PVAL(l[i]*l[i]);\t\t\t\n\t\t\t}\n\t\t\treturn result;\n\t\t\t\n\t\t} else if(st.name.equals(\"ep\")) {\n\t\t\tl = ComputeNew(p);\n\t\t\tfor(int i=0; i<NUMFITCASE; i++)\n\t\t\t{\n\t\t\t\tresult[i]= PVAL(Math.exp(l[i]));\t\n\t\t\t}\n\t\t\treturn result;\t\t\t\n\t\t} else if(st.name.equals(\"divE\")) {\n\t\t\tl = ComputeNew(p);\n\t\t\tr = ComputeNew(p.sibling);\n\t\t\tfor(int i=0; i<NUMFITCASE; i++)\n\t\t\t{\n\t\t\t\tresult[i]= PVAL(l[i]/Math.sqrt(1+ r[i]*r[i]));\t\t\t\t\n\t\t\t}\n\t\t\treturn result;\t\t\t\n\t\t\t} \n\t\telse {\n\t\t\tl = ComputeNew(p);\n\t\t\tfor(int i=0; i<NUMFITCASE; i++)\n\t\t\t{\n\t\t\t\tresult[i]= PVAL(Math.exp(l[i]));\n\t\t\t\tif(l[i] == 0) result[i]= 0;\n\t\t\t\telse result[i]= PVAL(Math.log(Math.abs(l[i])));// fido fabs\n\t\t\t}\n\t\t\treturn result;\t\n\t\t\t\n\t\t}\n\t}\n}",
"public int getDistribution() {\n return distribution;\n }",
"@Test\r\n\tpublic void testPositiveGenerateSignedGaussians_4() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tHashMap<String, Object> o = roc.generateSignedGaussians(10, 3.41d, 2.1d, 4, \r\n\t\t\t\t\t\tidentifier, null, userData, null);\r\n\t\t\t\t\r\n\t\t\t\tthis.signedValueTester(roc, i, o, double[].class, true);\r\n\t\t\t\t\r\n\t\t\t\tHashMap<String, Object> o2 = roc.generateSignedGaussians(10, 3.41d, 2.1d, 4, \r\n\t\t\t\t\t\tidentifier, null, userData, null);\r\n\t\t\t\tcollector.checkThat(o.get(\"data\"), equalTo(o2.get(\"data\")));\r\n\t\t\t\t\r\n\t\t\t\to = roc.generateSignedGaussians(10, 3.41d, 2.1d, 4, date, null, userData, null);\r\n\t\t\t\to2 = roc.generateSignedGaussians(10, 3.41d, 2.1d, 4, date, null, userData, null);\r\n\t\t\t\tcollector.checkThat(o.get(\"data\"), equalTo(o2.get(\"data\")));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}",
"public LogNormalDistribution(){\n\t\tthis(0, 1);\n\t}",
"public static void main(String[] args) {\n\t\tm = 250;\n\t\tdouble coupon = 0.0;\n\t\tdouble birthday = 0.0;\n\t\tfor (int i = 0; i < iteration; i++) {\n\t\t\tarray = new int[m];\n\t\t\tArrays.fill(array, -1);\n\t\t\tresult = new int[2];\n\t\t\thash();\n\t\t\tcoupon = coupon + result[0];\n\t\t\tbirthday = birthday + result[1];\n\t\t}\n\t\t\n\t\t\n\t\tSystem.out.println(\"Coupon Collector prog :\" + coupon / iteration);\n\t\tSystem.out.println(\"Coupon Collector theory :\" + Math.sqrt(Math.PI * m / 2));\n\t\tSystem.out.print(\"\\n\");\n\t\tSystem.out.println(\"Birthday prog :\" + birthday / iteration);\n\t\tSystem.out.println(\"Birthday theory :\" + m * Math.log(m));\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tint a = Integer.parseInt(args[0]);\n\t\tint c = Integer.parseInt(args[1]);\n\t\tint m = Integer.parseInt(args[2]);\n\t\tint x0 = Integer.parseInt(args[3]);\n\t\tint n = Integer.parseInt(args[4]);\n\n\t\t// conditions 1, 2, and 3 as defined in header comment\n\t\tboolean condition1 = (a > 0 && c > 0);\n\t\tboolean condition2 = (a < m && c < m && x0 < m);\n\t\tboolean condition3 = gcd(c, m) == 1;\n\n\t\t// with conditions checked, and since x % y = x % (-y)\n\t\t// under java's modulus operator, we will take the\n\t\t// absolute value of m to prevent any possible\n\t\t// exceptions resulting from negative values for m\n\t\tif (m < 0) {\n\t\t\tm *= -1;\n\t\t}\n\n\t\t// create 10 buckets to tally the LCF's distribution\n\t\t// each bucket is initialized to 0\n\t\tint[] distribution = new int[10];\n\n\t\t// find distribution\n\t\tint x = x0; // function initial value\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tx = (a * x + c) % m; // x has value x_i\n\n\t\t\t// since we want outputs from 0 to m-1\n\t\t\t// inclusive, and since java's modulus\n\t\t\t// operator produces negative output only\n\t\t\t// when the dividend is negative, and since\n\t\t\t// negative values for x_0 are acceptable;\n\t\t\t// we must perform negative checks on x\n\t\t\tif (x < 0) { // -m < x < 0\n\t\t\t\tx += m; // 0 < x < m\n\t\t\t}\n\n\t\t\t// find bucket for this x\n\t\t\tint bucket = 9;\n\n\t\t\t// since x < m, 10x < 10m\n\t\t\t// in this way, each bucket has a range\n\t\t\t// differing by at most 1 from each other\n\t\t\t// bucket\n\t\t\twhile (10 * x < bucket * m) {\n\t\t\t\tbucket--;\n\t\t\t}\n\t\t\t// increment count for the bucket of this x\n\t\t\tdistribution[bucket]++;\n\t\t}\n\n\t\t// calculate V as defined in header comment\n\t\tdouble v = pearsonChiSquare(distribution, n);\n\n\t\t// assemble output\n\t\tString output = \"\";\n\n\t\t// report condition check results\n\t\tif (condition1 && condition2 && condition3) {\n\t\t\toutput += \"Conditions satisfied\";\n\t\t} else { // at least one condition not satisfied\n\t\t\tif (!condition1) {\n\t\t\t\toutput += \"Condition 1 not satisfied\";\n\t\t\t}\n\n\t\t\tif (!condition2) {\n\t\t\t\t// check if line break needed\n\t\t\t\tif (!condition1) {\n\t\t\t\t\toutput += \"\\n\";\n\t\t\t\t}\n\n\t\t\t\toutput += \"Condition 2 not satisfied\";\n\t\t\t}\n\n\t\t\tif (!condition3) {\n\t\t\t\t// check if line break needed\n\t\t\t\tif (!(condition1 && condition2)) {\n\t\t\t\t\toutput += \"\\n\";\n\t\t\t\t}\n\n\t\t\t\toutput+= \"Condition 3 not satisfied\";\n\t\t\t}\n\t\t}\n\n\n\t\t// report V and decide function suitability\n\n\t\t// format V\n\t\tDecimalFormat fourPlaces = new DecimalFormat(\"0.0000\");\n\t\toutput += \"\\nV = \" + fourPlaces.format(v) + \"; \";\n\n\t\t// report conclusion\n\t\toutput += \"this function is \";\n\t\tif (v >= 3.325 && v <= 16.92) {\n\t\t\toutput += \"ok\";\n\t\t} else if (v >= 2.088 && v <= 21.67) {\n\t\t\toutput += \"suspicious\";\n\t\t} else {\n\t\t\toutput += \"rejected\";\n\t\t}\n\n\t\t// print report to standard output\n\t\tSystem.out.println(output);\n\t}",
"public static void main(String[] args) {\n double r1 = Math.random();\n System.out.println(\"Printing the Math random value : \" + r1);\n\n\n /**\n * Random is thread safe for use by multiple threads.\n * But if multiple threads use the same instance of Random, the same seed is shared by multiple threads.\n * It leads to contention between multiple threads and so to performance degradation.\n */\n Random rand = new Random();\n int r2 = rand.nextInt(10);\n System.out.println(\"Printing the Random class value : \" + r2);\n\n /**\n * ThreadLocalRandom has a Random instance per thread and safeguards against contention.\n */\n int r3 = ThreadLocalRandom.current().nextInt(99999);\n System.out.println(\"Printing the Math random value using ThreadLocal : \" + r3);\n\n }",
"public static void main(String[] args) {\n List<Vector2D> training = Blatt8Utils.create2DUnitCircle(1000);\n Blatt8Utils.drawChart(training, \"unitcircle.png\");\n SOM2D som = SOM2D.create2DSOM(10, 10);\n som.setTrainingSet(training);\n\n String prefix = \"2d_circle_\";\n for (int i = 0; i < 100000; i++) {\n som.iteration();\n if (i % 1000 == 0) {\n StringBuilder builder = new StringBuilder(prefix);\n builder.append(i).append(\".png\");\n Blatt8Utils.drawChart(Blatt8Utils.som2DToVector2D(som.getPoints()), builder.toString());\n }\n }\n\n // Aufgabe8.3\n training = Blatt8Utils.create2DRing(1000, 0.3f, 1.0f);\n Blatt8Utils.drawChart(training, \"ring.png\");\n SOM1D som1d = SOM1D.create1DSOM(20);\n som1d.setTrainingSet(training);\n prefix = \"ring_20_\";\n for (int i = 0; i < 100000; i++) {\n som1d.iteration();\n if (i % 1000 == 0) {\n StringBuilder builder = new StringBuilder(prefix);\n builder.append(i).append(\".png\");\n Blatt8Utils.drawChart(Blatt8Utils.som1DToVector2D(som1d.getPoints()), builder.toString());\n }\n }\n\n // Aufgabe8.4\n som1d = SOM1D.create1DSOM(20);\n som1d.setTrainingSet(training);\n prefix = \"ring_200_\";\n for (int i = 0; i < 100000; i++) {\n som1d.iteration();\n if (i % 1000 == 0) {\n StringBuilder builder = new StringBuilder(prefix);\n builder.append(i).append(\".png\");\n Blatt8Utils.drawChart(Blatt8Utils.som1DToVector2D(som1d.getPoints()), builder.toString());\n }\n }\n }",
"public void dorgr2_(INTEGER M,INTEGER N,INTEGER K,double[] A,INTEGER LDA,double[] TAU,double[] WORK,INTEGER INFO);",
"public void trainBernoulli() {\t\t\n\t\tMap<String, Cluster> trainingDataSet = readFile(trainLabelPath, trainDataPath, \"training\");\n\t\tMap<String, Cluster> testingDataSet = readFile(testLabelPath, testDataPath, \"testing\");\n\n\t\t// do testing, if the predicted class and the gold class is not equal, increment one\n\t\tdouble error = 0;\n\n\t\tdouble documentSize = 0;\n\n\t\tSystem.out.println(\"evaluate the performance\");\n\t\tfor (int testKey = 1; testKey <= 20; testKey++) {\n\t\t\tCluster testingCluster = testingDataSet.get(Integer.toString(testKey));\n\t\t\tSystem.out.println(\"Cluster: \"+testingCluster.toString());\n\n\t\t\tfor (Document document : testingCluster.getDocuments()) {\n\t\t\t\tdocumentSize += 1; \n\t\t\t\tList<Double> classprobability = new ArrayList<Double>();\n\t\t\t\tMap<String, Integer> testDocumentWordCounts = document.getWordCount();\n\n\t\t\t\tfor (int classindex = 1; classindex <= 20; classindex++) {\n\t\t\t\t\t// used for calculating the probability\n\t\t\t\t\tCluster trainCluster = trainingDataSet.get(Integer.toString(classindex));\n\t\t\t\t\t// System.out.println(classindex + \" \" + trainCluster.mClassId);\n\t\t\t\t\tMap<String, Double> bernoulliProbability = trainCluster.bernoulliProbabilities;\n\t\t\t\t\tdouble probability = Math.log(trainCluster.getDocumentSize()/trainDocSize);\n\t\t\t\t\tfor(int index = 1; index <= voc.size(); index++ ){\n\n\t\t\t\t\t\t// judge whether this word is stop word \n\t\t\t\t\t\tboolean isStopwords = englishStopPosition.contains(index);\n\t\t\t\t\t\tif (isStopwords) continue;\n\n\t\t\t\t\t\tboolean contain = testDocumentWordCounts.containsKey(Integer.toString(index));\t\t\t\t\t\t\n\t\t\t\t\t\tif (contain) {\n\t\t\t\t\t\t\tprobability += Math.log(bernoulliProbability.get(Integer.toString(index)));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tprobability += Math.log(1 - bernoulliProbability.get(Integer.toString(index)));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// put the probability into the map for the specific class\n\t\t\t\t\tclassprobability.add(probability);\n\t\t\t\t}\n\t\t\t\tObject obj = Collections.max(classprobability);\n\t\t\t\t// System.out.println(classprobability);\n\t\t\t\tString predicte_class1 = obj.toString();\n\t\t\t\t// System.out.println(predicte_class1);\n\t\t\t\t// System.out.println(Double.parseDouble(predicte_class1));\n\t\t\t\tint index = classprobability.indexOf(Double.parseDouble(predicte_class1));\n\t\t\t\t// System.out.println(index);\n\t\t\t\tString predicte_class = Integer.toString(index + 1);\n\n\n\t\t\t\tconfusion_matrix[testKey - 1][index] += 1;\n\n\t\t\t\t// System.out.println(document.docId + \": G, \" + testKey + \"; P: \" + predicte_class);\n\t\t\t\tif (!predicte_class.equals(Integer.toString(testKey))) {\n\t\t\t\t\terror += 1;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tSystem.out.println(\"the error is \" + error + \"; the document size : \" + documentSize);\n\t\t}\n\n\t\tSystem.out.println(\"the error is \" + error + \"; the document size : \" + documentSize + \" precision rate : \" + (1 - error/documentSize));\n\n\t\t// print confusion matrix\n\t\tprintConfusionMatrix(confusion_matrix);\n\t}",
"float getSpecialProb();",
"void calculatePR( int iteration){\n\t\t\n\t\ttotal_nodes = inlinks.size();\n\t\tfor(String page : inlinks.keySet()){\n\t\t\tPageRank.put(page, (1/(double)(total_nodes)));\n\t\t\tinit_PageRank.put(page, (1/(double)(total_nodes)));\n\t\t}\n \n double ppx = 0.0;\n boolean cond = true;\n int itr =1;\n // while(iteration >0){ //Used for Graph page rank calculation; c\n while(cond){ \n \tSystem.out.println(\"Iteration\"+itr); \n double sinkPR = 0;\n for(String s: sink){\n \tsinkPR = sinkPR + (PageRank.get(s)); //calculate total sink PR\n }\n \n double entropy = 0.0;\n \n for(String s: PageRank.keySet()){\n \tdouble newPR;\n \tnewPR = (1.0 -d)/total_nodes;\n \tnewPR = newPR + (d*sinkPR)/total_nodes;\n \tSet<String> in = inlinks.get(s); //pages pointing to P\n \tif(in != null){\n \t\tfor(String s1 : in){\n \t\t\tnewPR = newPR + d* (PageRank.get(s1)/outlinks_count.get(s1)); \t\t \n \t\t}\n \t} \n \t\tnew_PageRank.put(s, newPR);\n \t\tentropy = entropy + (newPR*(Math.log(newPR)/Math.log(2))); //entroPy calculation\n \t}\n \n PageRank.putAll(new_PageRank);\n ppx = Math.pow(2,-1*entropy);\n System.out.println(\"perplexity : \"+ ppx);\n ppx_list.add(ppx);\n if(ppx_list.size()>5) \n \tcond= !check(4);\n \n itr++;\n \t\n //\t iteration --; //Used for page Rank Calculation of Graph\n } \n\t}",
"public static void main(String[] args) throws IOException {\n\t\tint p = 8;\n\t\t// r is the fraction of the population to be replaced by Crossover at\n\t\t// each step\n//\t\tdouble r = Double.valueOf(8).doubleValue();\n\t\tdouble r = 8;\n\t\t// m is the rate of mutation\n//\t\tdouble m = Double.valueOf(8).doubleValue();\n\t\tdouble m = 8;\n\n\t\t// Write into files...\n\t\tFile outputFile = new File(\"testGA.txt\");\n\t\tFileWriter out = new FileWriter(outputFile);\n\n\t\t////////////////////////\n\t\tp = 33;\n\t\tr = 0.6;\n\t\tm = 0.1;\n\n\t\t// Report the population size, crossover rate and mutation rate\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Learning the 8-queens problem with a Genetic Algorithm\");\n\t\tSystem.out.println(\"Population Size: \" + p);\n\t\tSystem.out.println(\"Crossover Rate: \" + r);\n\t\tSystem.out.println(\"Mutation Rate: \" + m);\n\t\tSystem.out.println();\n\t\tout.write(\"Parameters are p=\" + p + \", \" + \"r=\" + r + \" and m=\" + m + \"\\r\");\n\n\t\t// The genetic algorithm\n\t\tint iterationNum = 0;\n\t\tHypothesis bestIndividual;\n\t\tint bestFitness;\n\t\tdouble aveFitness;\n\t\t// Randomly generate initial population\n\t\tGA algorithm = new GA(p, r, m);\n\t\t// For each individual compute fitness\n\t\talgorithm.computeFitness();\n\t\t// Get the best individual\n\t\tbestIndividual = (algorithm.getPopulation())[0];\n\t\tbestFitness = bestIndividual.getFitness();\n\t\taveFitness = algorithm.computeAveFitness();\n\t\t// Iterate till we get the very best individual\n\t\twhile (bestFitness != 0) {\n\t\t\t// Select the very best members of the population to survive\n\t\t\talgorithm.select();\n\t\t\t// Make the best members reproduce themselves\n\t\t\talgorithm.crossover();\n\t\t\t// Add some mutations to new population\n\t\t\talgorithm.mutate();\n\t\t\t// The successor population becomes the current population\n\t\t\talgorithm.setNextGeneration();\n\t\t\t// For each individual compute fitness\n\t\t\talgorithm.computeFitness();\n\t\t\t// Get the best individual\n\t\t\tbestIndividual = (algorithm.getPopulation())[0];\n\t\t\tbestFitness = bestIndividual.getFitness();\n\t\t\taveFitness = algorithm.computeAveFitness();\n\t\t\t// Report best results to the user at every five iterations\n\t\t\tif (iterationNum % 5 == 0) {\n\t\t\t\tSystem.out.println(\"Iteration: \" + iterationNum + \" Best Fitness: \" + bestFitness\n\t\t\t\t\t\t+ \" Average Fitness \" + aveFitness);\n\t\t\t\tSystem.out.println(\"Best solution: \" + bestIndividual.toString());\n\t\t\t\tSystem.out.println();\n\t\t\t\tout.write(\"\\n\" + iterationNum + \",\" + bestFitness + \",\" + aveFitness + \"\\r\");\n\t\t\t}\n\t\t\titerationNum++;\n\t\t}\n\t\tSystem.out.println(\n\t\t\t\t\"Iteration: \" + iterationNum + \" Best Fitness: \" + bestFitness + \" Average Fitness \" + aveFitness);\n\t\tSystem.out.println(\"Solution is \" + bestIndividual.toString());\n\t\tout.write(\"\\n\" + iterationNum + \",\" + bestFitness + \",\" + aveFitness + \"\\r\");\n\t\tout.close();\n\t}",
"public SimpleRegression(TDistribution t) {\n super();\n setDistribution(t);\n }",
"@Test\n public void testWeightedConsistency() {\n\n // See if this statistic computes weighted statistics\n // If not, skip this test\n UnivariateStatistic statistic = getUnivariateStatistic();\n if (!(statistic instanceof WeightedEvaluation)) {\n return;\n }\n\n // Create arrays of values and corresponding integral weights\n // and longer array with values repeated according to the weights\n final int len = 10; // length of values array\n final double mu = 0; // mean of test data\n final double sigma = 5; // std dev of test data\n double[] values = new double[len];\n double[] weights = new double[len];\n\n // Fill weights array with random int values between 1 and 5\n int[] intWeights = new int[len];\n final DiscreteDistribution.Sampler weightDist =\n UniformDiscreteDistribution.of(1, 5).createSampler(RandomSource.WELL_512_A.create(234878544L));\n for (int i = 0; i < len; i++) {\n intWeights[i] = weightDist.sample();\n weights[i] = intWeights[i];\n }\n\n // Fill values array with random data from N(mu, sigma)\n // and fill valuesList with values from values array with\n // values[i] repeated weights[i] times, each i\n final ContinuousDistribution.Sampler valueDist =\n NormalDistribution.of(mu, sigma).createSampler(RandomSource.WELL_512_A.create(64925784252L));\n List<Double> valuesList = new ArrayList<>();\n for (int i = 0; i < len; i++) {\n double value = valueDist.sample();\n values[i] = value;\n for (int j = 0; j < intWeights[i]; j++) {\n valuesList.add(Double.valueOf(value));\n }\n }\n\n // Dump valuesList into repeatedValues array\n int sumWeights = valuesList.size();\n double[] repeatedValues = new double[sumWeights];\n for (int i = 0; i < sumWeights; i++) {\n repeatedValues[i] = valuesList.get(i);\n }\n\n // Compare result of weighted statistic computation with direct computation\n // on array of repeated values\n WeightedEvaluation weightedStatistic = (WeightedEvaluation) statistic;\n TestUtils.assertRelativelyEquals(statistic.evaluate(repeatedValues),\n weightedStatistic.evaluate(values, weights, 0, values.length),\n 10E-12);\n\n // Check consistency of weighted evaluation methods\n Assert.assertEquals(weightedStatistic.evaluate(values, weights, 0, values.length),\n weightedStatistic.evaluate(values, weights), Double.MIN_VALUE);\n }",
"private static void generaGrupos(PrintWriter salida_grupos, PrintWriter salida_musicos, PrintWriter salida_discos, PrintWriter salida_canciones){\r\n boolean flagm = true;//Indica si el nº de integrantes de a es 10 para contrarestar en la siguiente generación\r\n int a, b;\r\n String nombre = \"nombre\";\r\n String titulo = \"www.web\";\r\n String dominio = \".com\";\r\n \r\n for (long i = 1; i <= num_grupos; i++){\r\n //Calculamos el numero de integrantes que tendrán los dos grupos que se generarán por loop\r\n // si el anterior loop no se han superado los 10 integrantes en la suma de a y b,\r\n // se permitirá la generación de 10 integrantes en el grupo a\r\n // si en el anterior loop se han generado en uno de los grupos 10 integrantes\r\n // debemos reducir el numero para contrarestar en este loop,\r\n // de forma que resulte una generación aleatoria dentro de los límites pedidos\r\n if (flagm){\r\n a = rand.nextInt(10) + 1;\r\n b = 10 - a;\r\n } else {\r\n a = rand.nextInt(8) + 1;\r\n b = 9 - a;\r\n flagm = true;\r\n }\r\n if (b == 0){ b++; flagm = false;}\r\n \r\n //Grupo A del loop\r\n salida_grupos.println(cod_grupo + \",\" + nombre + cod_grupo + \",\"\r\n + genero.getGenero() + \",\" + rand.nextInt(paises.length)\r\n + \",\" + titulo + cod_grupo + dominio);\r\n generaMusicos(salida_musicos, cod_grupo, a);\r\n generaDiscos(salida_discos, salida_canciones, cod_grupo);\r\n \r\n //Aumento de las variables usadas\r\n i++; cod_grupo++;\r\n //Grupo B del loop\r\n salida_grupos.println(cod_grupo + \",\" + nombre + cod_grupo + \",\"\r\n + genero.getGenero() + \",\" + rand.nextInt(paises.length)\r\n + \",\" + titulo + cod_grupo + dominio);\r\n generaMusicos(salida_musicos, cod_grupo, b);\r\n generaDiscos(salida_discos, salida_canciones, cod_grupo);\r\n \r\n cod_grupo++;\r\n }\r\n }",
"void EvolutionWithElitism(){\n\t\t \tint i, j, l, k;\n\t\t\t//individual[] temp;\n\t\t\tbyte _flippc=0,_flippm=0;\n//\t\t\tString _temp1=\"\", _temp2=\"\";\n\t\t\tint[] _cp;\n\t\t\tnode[] _nd,_nm;\n\t\t\t// Khoi tao quan the dau tien \n\t\t\tRampedInit(6, 0.5);\n\t\t\t//RampedInitOffLine(6, 0.5,15);\n\t\t\t\n//\t\t\tconstructiveRate = new double[NUMGEN];\n//\t\t\tsemanticDistance = new double[NUMGEN];\n\t\t\t\n\t\t\tgen = 0;\n\t\t\twhile(gen < generation) {\n\t\t\t\t\n\t\t\t\tComputeFitness();\n\t\t\t\t\n//\t\t\t\tint g_ncross = 0;\n//\t\t\t\tdouble g_sd = 0;\n//\t\t\t\tPrintToFile();\n\t//----------------------\n//\t\t\t\tFileInputStream instream = null;\n//\t\t\t\tPrintStream outstream = null;\n//\t\t\t\tPrintStream console = System.out;\n//\t\t\t\ttry {\n//\t\t\t\t\toutstream = new PrintStream(new FileOutputStream(\"c:/result/\" + \"detail_\"+ gen + \".txt\"));\n//\t\t\t\t\tSystem.setOut(outstream);\n//\t\t\t\t} catch(Exception e) {\n//\t\t\t\t\tSystem.err.println(\"Error Occurred.\");\n//\t\t\t\t}\n//\t\t\t\tfor(i = 0; i < poplen; i++) {\n//\t\t\t\t\tSystem.out.printf(\"%3.5f \",oldpop[i].fitness);\n//\t\t\t\t\tif((i+1) % 10 == 0) {\n//\t\t\t\t\t\tSystem.out.println();\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t\tfor(int ii = 0; ii < poplen; ii++) {\t\t\t\n//\t\t\t\t\t_temp1=\"\";\n//\t\t\t\t\t_temp1=oldpop[ii].chrom.TreeToStringN(oldpop[ii].chrom);\n//\t\t\t\t\tSystem.out.printf(\"%s\",ii+\" \"+ _temp1);\t\t\t\n//\t\t\t\t\tSystem.out.println();\n//\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// copy anh tot nhat sang the he sau\t \t\n\t\t\t\tnewpop[0].CopyIndividual(bestcurrent[gen], TRUE);\n\t\t\t\t// dot bien anh thu 2\n\t\t\t \n\t\t\t\tl=1;\t\n\t\t\t\ti = TourSelect(TOURSIZE);\n//\t\t\t\t\n\t\t\t\t\n\t\t\t newpop[l].CopyIndividual(oldpop[i], TRUE);\n\t\t\t\tindividual[] m_individual0=new individual[1];\n\t\t\t\tint[] _mt0=new int[1];\n\t\t\t\t_nm=new node[1];\n\t\t\t\tthis.ReplaceSubTree(newpop[l], m_individual0, 15, TRUE,_mt0,_nm);\n\t\t\t\tnewpop[l]=new individual();\n\t\t\t\tnewpop[l].CopyIndividual(m_individual0[0], TRUE);\t\t\t\n\t\t\t\tnewpop[l].evaluated=FALSE;\t\t\n//\t\t\t\t\n//\t\t\t\tm_individual0=null;\n\t\t\t\t\n\t//------------------------\t\t\n\t\t\t\tl = 2;\t\t\t\n\t\t\t\twhile(l < poplen) {\n\t\t\t\t//\tSystem.out.println(\"Generation \"+ String.valueOf(gen)+\":\");\n\t\t\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\n\t\t\t\t\ti = TourSelect(TOURSIZE);\n\t\t\t\t\tj = TourSelect(TOURSIZE);\n\t\t\t\t\t\n//\t\t\t\t\t\n//\t\t\t\t\t\t\n\t\t\t\t _flippc=Flip(pcross);\n//\t\t\t\t System.out.printf(\"pcross:%d\", _flippc);\n//\t\t\t\t System.out.println();\n\t\t\t\t\tif(_flippc == 1) {\t\t\t\t\t\n\t\t\t\t\t\tindividual[] i_temp=new individual[2];\n\t\t\t\t\t\t_cp=new int[2];\n\t\t\t\t\t\t_nd=new node[2];\n\t\t\t\t//\t\n\t\t\t\t//\t\tif(SubTreeSwapWithTTest(oldpop[i], oldpop[j], i_temp,_cp,_nd) == TRUE)\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(SubTreeSwap(oldpop[i], oldpop[j], i_temp,_cp,_nd) == TRUE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnewpop[l].CopyIndividual(i_temp[0],TRUE);\n\t\t\t\t\t\t\tnewpop[l+1].CopyIndividual(i_temp[1],TRUE);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tnewpop[l].evaluated=FALSE;\n\t\t\t\t\t\t\tnewpop[l+1].evaluated=FALSE;\n//\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tncross++;\n\t\t\t\t\t\t\ti_temp=null;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// semantic distance\n//\t\t\t\t\t\t\tg_sd += newpop[l].getSemanticDistance(oldpop[i]);\n//\t\t\t\t\t\t\tg_sd += newpop[l+1].getSemanticDistance(oldpop[j]);\t\t\t\t\t\n//\t\t\t\t\t\t\tg_ncross++;\n\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\tg_sd += oldpop[i].getSemanticDistance(oldpop[j]);\t\t\t\t\t\n//\t\t\t\t\t\t\tg_ncross++;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tnewpop[l].CopyIndividual(oldpop[i], TRUE);\n\t\t\t\t\t\t\tnewpop[l + 1].CopyIndividual(oldpop[j],TRUE);\n//\t\t\t\t\t\t\tSystem.out.printf(\"%s\",\"reproduction\");\n//\t\t\t\t\t\t\tSystem.out.println();\n//\t\t\t\t\t\t\t_temp1=\"\";\n//\t\t\t\t\t\t\t_temp1=newpop[l].chrom.TreeToStringN(newpop[l].chrom);\n//\t\t\t\t\t\t\tSystem.out.printf(\"%s\", _temp1);\t\t\t\n//\t\t\t\t\t\t\tSystem.out.println();\n//\t\t\t\t\t\t\t_temp2=\"\";\n//\t\t\t\t\t\t\t_temp2=newpop[l+1].chrom.TreeToStringN(newpop[l+1].chrom);\n//\t\t\t\t\t\t\tSystem.out.printf(\"%s\", _temp2);\t\t\t\n//\t\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\t\ti_temp=null;\n\t\t\t\t\t\t} \n\t\t\t\t\t} \n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tnewpop[l].CopyIndividual(oldpop[i], TRUE);\n\t\t\t\t\t\tnewpop[l + 1].CopyIndividual(oldpop[j],TRUE);\n//\t\t\t\t\t\tSystem.out.printf(\"%s\",\"reproduction\");\n//\t\t\t\t\t\tSystem.out.println();\n//\t\t\t\t\t\t_temp1=\"\";\n//\t\t\t\t\t\t_temp1=newpop[l].chrom.TreeToStringN(newpop[l].chrom);\n//\t\t\t\t\t\tSystem.out.printf(\"%s\", _temp1);\t\t\t\n//\t\t\t\t\t\tSystem.out.println();\n//\t\t\t\t\t\t_temp2=\"\";\n//\t\t\t\t\t\t_temp2=newpop[l+1].chrom.TreeToStringN(newpop[l+1].chrom);\n//\t\t\t\t\t\tSystem.out.printf(\"%s\", _temp2);\t\t\t\n//\t\t\t\t\t\tSystem.out.println();\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t// mutation test\n\t\t\t\t\t_flippm=Flip(pmutate);\n//\t\t\t\t\tSystem.out.printf(\"pmutation:%d\", _flippm);\n//\t\t\t\t System.out.println();\n\t\t\t\t\tif(_flippm == 1) {\t\t\t\t\t\n\t\t\t\t\t\tindividual[] m_individual=new individual[1];\n\t\t\t\t\t\tint[] _mt=new int[1];\n\t\t\t\t\t\t_nm=new node[1];\n\t\t\t\t\t\tthis.ReplaceSubTree(newpop[l], m_individual, 15, TRUE,_mt,_nm);\n\t\t\t\t\t\tnewpop[l]=new individual();\n\t\t\t\t\t\tnewpop[l].CopyIndividual(m_individual[0], TRUE);\n\t\t\t\t\t\t\n\t\t\t\t\t\tnewpop[l].evaluated=FALSE;\n\t\t\t\t\t\t\n//\t\t\t\t\t\tSystem.out.printf(\"%s\",\"mutation \"+l+\" replacepoint:\"+_mt[0]);\n//\t\t\t\t\t\tSystem.out.println();\n//\t\t\t\t\t\t_temp1=\"\";\n//\t\t\t\t\t\t_temp1=newpop[l].chrom.TreeToStringN(_nm[0]);\n//\t\t\t\t\t\tSystem.out.printf(\"%s\", _temp1);\t\t\t\n//\t\t\t\t\t\tSystem.out.println();\n//\t\t\t\t\t\t_temp1=\"\";\n//\t\t\t\t\t\t_temp1=newpop[l].chrom.TreeToStringN(newpop[l].chrom);\n//\t\t\t\t\t\tSystem.out.printf(\"%s\", _temp1);\t\t\t\n//\t\t\t\t\t\tSystem.out.println();\t\t\t\t\t\n\t\t\t\t\t\tnmutate++;\n\t\t\t\t\t\tm_individual=null;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n//\t\t\t\t\t\t_temp1=\"\";\n//\t\t\t\t\t\t_temp1=newpop[l].chrom.TreeToStringN(newpop[l].chrom);\n//\t\t\t\t\t\tSystem.out.printf(\"%s\", _temp1);\t\t\t\n//\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(Flip(pmutate) == 1) {\n\t\t\t\t\t\tindividual[] m_individual1=new individual[1];\n\t\t\t\t\t\tint[] _mt=new int[1];\n\t\t\t\t\t\t_nm=new node[1];\n\t\t\t\t\t\tthis.ReplaceSubTree(newpop[l + 1], m_individual1, 15, TRUE,_mt,_nm);\n\t\t\t\t\t\tnewpop[l+1]=new individual();\n\t\t\t\t\t\tnewpop[l+1].CopyIndividual(m_individual1[0], TRUE);\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tnewpop[l+1].evaluated=FALSE;\n//\t\t\t\t\t\tSystem.out.printf(\"%s\",\"mutation \"+(l+1)+\" replacepoint:\"+_mt[0]);\n//\t\t\t\t\t\tSystem.out.println();\n//\t\t\t\t\t\t_temp2=\"\";\n//\t\t\t\t\t\t_temp2=newpop[l+1].chrom.TreeToStringN(_nm[0]);\n//\t\t\t\t\t\tSystem.out.printf(\"%s\", _temp2);\t\t\t\n//\t\t\t\t\t\tSystem.out.println();\n//\t\t\t\t\t\t_temp2=\"\";\n//\t\t\t\t\t\t_temp2=newpop[l+1].chrom.TreeToStringN(newpop[l+1].chrom);\n//\t\t\t\t\t\tSystem.out.printf(\"%s\", _temp2);\t\t\t\n//\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\tnmutate++;\n\t\t\t\t\t\tm_individual1=null;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n//\t\t\t\t\t\t_temp2=\"\";\n//\t\t\t\t\t\t_temp2=newpop[l+1].chrom.TreeToStringN(newpop[l+1].chrom);\n//\t\t\t\t\t\tSystem.out.printf(\"%s\", _temp2);\t\t\t\n//\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t}\n\t\t\t\t\tl += 2;\n\t\t\t\t}\n//\t\t\t\tfor(int ii = 0; ii < poplen; ii++) {\t\t\t\n//\t\t\t\t\t_temp1=\"\";\n//\t\t\t\t\t_temp1=oldpop[ii].chrom.TreeToStringN(newpop[ii].chrom);\n//\t\t\t\t\tSystem.out.printf(\"%s\",ii+\" \"+ _temp1);\t\t\t\n//\t\t\t\t\tSystem.out.println();\n//\t\t\t\t}\n//\t\t\t\toutstream.close();\n//\t\t\t\tSystem.setOut(console);\n\t\t\t\t// Thống kê tỷ lệ tTest\n\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t//\t\t\tsemanticDistance[gen] = g_sd / (2.0 * g_ncross);\n//\t\t\t\tsemanticDistance[gen] = g_sd /g_ncross;\n\t\t\t\t\n\t\t\t\tgen++;\n\t\t\t\tfor(k = 0; k < poplen; k++)\n\t\t\t\t{\n\t\t\t\t\toldpop[k]=null;\n\t\t\t\t\toldpop[k]=new individual();\n\t\t\t\t\toldpop[k].CopyIndividual(newpop[k], TRUE);\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"float genChance();",
"@Override\n public double[] distributionForInstance(Instance newBag) throws Exception {\n\n double[] distribution = new double[2];\n Instances contents = newBag.relationalValue(1);\n boolean positive = false;\n for (Instance i : contents) {\n if (tree.isPositive(i)) {\n positive = true;\n break;\n }\n }\n\n distribution[1] = positive ? 1 : 0;\n distribution[0] = 1 - distribution[1];\n\n return distribution;\n }"
] | [
"0.65656114",
"0.6441594",
"0.6407797",
"0.63188666",
"0.6176633",
"0.61169785",
"0.60659623",
"0.59605354",
"0.59560394",
"0.5947381",
"0.590116",
"0.5886785",
"0.5798519",
"0.5745246",
"0.5727981",
"0.5723177",
"0.569739",
"0.56758285",
"0.56692463",
"0.5581279",
"0.55614686",
"0.55370367",
"0.55141133",
"0.5512223",
"0.55003613",
"0.54910463",
"0.5472009",
"0.5470296",
"0.545309",
"0.5445748",
"0.542605",
"0.54232186",
"0.5412764",
"0.54022217",
"0.5399145",
"0.53970754",
"0.5389165",
"0.5366851",
"0.53664005",
"0.5363079",
"0.5358197",
"0.53556025",
"0.53497714",
"0.5348741",
"0.53386873",
"0.53345644",
"0.53308606",
"0.53295755",
"0.5328686",
"0.53286386",
"0.5323066",
"0.5319669",
"0.5293742",
"0.5286988",
"0.52832395",
"0.52812463",
"0.5277083",
"0.5276139",
"0.52726895",
"0.52695626",
"0.5266401",
"0.52634275",
"0.52622896",
"0.5255869",
"0.52497596",
"0.524666",
"0.52414864",
"0.5236399",
"0.5236391",
"0.52256703",
"0.5221667",
"0.5219307",
"0.5215987",
"0.52113813",
"0.52092546",
"0.52090794",
"0.5199965",
"0.5199682",
"0.5189294",
"0.51889694",
"0.51874274",
"0.5186815",
"0.518679",
"0.51842463",
"0.51819813",
"0.5181668",
"0.51797795",
"0.5176568",
"0.5171388",
"0.5157128",
"0.5156831",
"0.5156187",
"0.51543397",
"0.51537323",
"0.515158",
"0.51511586",
"0.51490736",
"0.51423556",
"0.51417834",
"0.5141309",
"0.5138764"
] | 0.0 | -1 |
Perform the appropriate actions given the game state. | public void load(BSGameState state); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void performActions(){\n GameInformation gi = this.engine.getGameInformation();\n\n if(gi.getTeam() == 0)\n this.engine.performPlayerAction(\n new MoveAction(src, dst)\n );\n\n }",
"protected abstract void actionExecuted(SUT system, State state, Action action);",
"private void updateState() {\n switch (game.getGameState()) {\n case GAME:\n gamePlay();\n break;\n case ONE:\n lostTurnByOne();\n break;\n case READY:\n readyToPlay();\n break;\n case START:\n startGame();\n break;\n case TURN:\n startTurn();\n break;\n case FINISH:\n finishGame();\n break;\n }\n }",
"@Override\r\n\tpublic void runBehaviors() throws GameActionException {\r\n\t\tID = player.myIntel.getArchonID();\r\n\t\tarchonList = player.myIntel.getArchonList();\r\n\t\tmyLoc = player.myRC.getLocation();\r\n\t\tmyX = myLoc.getX();\r\n\t\tmyY = myLoc.getY();\r\n\t\tmyDir = player.myRC.getDirection();\r\n\t\tswitch(state) {\r\n\t\tcase 0:\r\n\t\t\tdir = spreadDirection();\r\n\t\t\tif (dir != Direction.NONE) state = 1;\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\tif (myDir.equals(dir)) state = 2;\r\n\t\t\telse {\r\n\t\t\t\tplayer.myRC.setDirection(dir);\r\n\t\t\t\tstate = 2;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tif (player.myRC.getRoundsUntilMovementIdle()==0 && player.myRC.hasActionSet()==false) {\r\n\t\t\t\tif (player.myRC.canMove(myDir)) {\r\n\t\t\t\t\tplayer.myRC.moveForward();\r\n\t\t\t\t\tmoveCounter++;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tplayer.myRC.setDirection(myDir.rotateRight());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif (moveCounter >= AMOUNT_TO_SPREAD) state = 3;\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\t\r\n\t\t\tif (player.myRC.getRoundsUntilMovementIdle()==0 && player.myRC.hasActionSet()==false) {\r\n\t\t\t\tif (player.myRC.senseTerrainTile(myLoc.add(myDir)).getType() != TerrainType.LAND) {\r\n\t\t\t\t\tlandFinder();\r\n\t\t\t\t\tif (landSquares == 0) {\r\n\t\t\t\t\t\tplayer.myRC.setDirection(player.myUtils.randDir());\r\n\t\t\t\t\t\tstate = 2;\r\n\t\t\t\t\t} else\r\n\t\t\t\t\t\tplayer.myRC.setDirection(turnDir);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//STRATEGY TRANSITION\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\tplayer.myRC.setIndicatorString(2, dir.toString());\r\n\t}",
"public void setState(PlayerState newPlayerState) {\n\n this.playerState = newPlayerState;\n\n closeWindows();\n\n\n switch (newPlayerState) {\n\n case CHOOSE_BONUS_TILE:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(false);\n\n setThrowDices(false);\n\n setSkipAction(false);\n\n setEndTurn(false);\n\n setUseLeader(false);\n\n\n break;\n\n\n case THROWDICES:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(false);\n\n setThrowDices(true);\n\n setSkipAction(false);\n\n setEndTurn(false);\n\n setUseLeader(false);\n\n try {\n throwDices();\n } catch (InterruptedException e) {\n LOGGER.log(Level.WARNING, \"Interrupted!\", e);\n // clean up state...\n Thread.currentThread().interrupt();\n }\n\n break;\n\n\n\n case DOACTION:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(true);\n\n setThrowDices(false);\n\n setSkipAction(true);\n\n setEndTurn(true);\n\n setUseLeader(true);\n\n try {\n yourTurn();\n } catch (InterruptedException e) {\n LOGGER.log(Level.WARNING, \"Interrupted!\", e);\n // clean up state...\n Thread.currentThread().interrupt();\n }\n\n\n break;\n\n case BONUSACTION:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(false);\n\n setThrowDices(false);\n\n setSkipAction(true);\n\n setEndTurn(true);\n\n setUseLeader(true);\n\n\n try {\n bonusAction();\n } catch (InterruptedException e) {\n LOGGER.log(Level.WARNING, \"Interrupted!\", e);\n // clean up state...\n Thread.currentThread().interrupt();\n }\n\n break;\n\n\n case CHOOSEACTION:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(true);\n\n setThrowDices(false);\n\n setSkipAction(true);\n\n setEndTurn(true);\n\n setUseLeader(true);\n\n\n break;\n\n\n case CHOOSEWORKERS:\n case ACTIVATE_PAY_TO_OBTAIN_CARDS:\n case CHOOSE_EFFECT:\n case CHOOSECOST:\n case CHOOSE_COUNCIL_PRIVILEGE:\n case PRAY:\n case WAITING:\n\n noButtonsAble();\n\n setLeaderButtons(false);\n\n setUseLeader(false);\n\n break;\n\n case ENDTURN:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(false);\n\n setThrowDices(false);\n\n setSkipAction(false);\n\n setEndTurn(true);\n\n setUseLeader(true);\n\n\n break;\n\n case LEADER:\n\n noButtonsAble();\n\n setUseLeader(true);\n break;\n\n\n case SUSPENDED:\n\n noButtonsAble();\n\n setLeaderButtons(false);\n\n setUseLeader(false);\n\n suspendedPane.setVisible(true);\n\n break;\n\n\n }\n\n }",
"public void act()\n {\n // handle key events\n String key = Greenfoot.getKey();\n if (key != null)\n {\n handleKeyPress(key);\n } \n\n // handle mouse events\n if (startGameButton.wasClicked())\n {\n handleStartGame();\n }\n }",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tupdateGameState();\n\t}",
"public void doAction(SpaceWars game) {\r\n\t\tGameGUI gui = game.getGUI();\r\n\t\thandleTeleport(gui);\r\n\t\thandleMovements(gui);\r\n\t\thandleShield(gui);\r\n\t\thandleShooting(game, gui);\r\n\t\tmanageRound();\r\n\t}",
"public void act() \r\n {\r\n key();\r\n win();\r\n fall();\r\n lunch();\r\n }",
"private boolean runAction(Canvas cv, SUT system, State state, Taggable fragment){\n\t\tActionStatus actionStatus = new ActionStatus();\n\t\twaitUserActionLoop(cv,system,state,actionStatus);\n\n\t\tcv.begin(); Util.clear(cv);\n\t\t//visualizeState(cv, state);\n\t\tvisualizeState(cv, state,system); // by urueda \n\t\tLogSerialiser.log(\"Building action set...\\n\", LogSerialiser.LogLevel.Debug);\n\t\t\t\t\t\n\t\t// begin by urueda\n\t\tif (actionStatus.isUserEventAction()){ // user action\n\t\t\tCodingManager.buildIDs(state, actionStatus.getAction());\n\t\t} else if (mode() == Modes.AdhocTest){ // adhoc-test action\n\t\t\tif (waitAdhocTestEventLoop(state,actionStatus)){\n\t\t\t\tcv.end(); // by urueda\n\t\t\t\treturn true; // problems\n\t\t\t}\n\t\t} else{ // automatically derived action\n\t\t\tif (waitAutomaticAction(system,state,fragment,actionStatus)){\n\t\t\t\tcv.end(); // by urueda\n\t\t\t\treturn true; // problems\n\t\t\t} else if (actionStatus.getAction() == null && mode() == Modes.Spy){\n\t\t\t\tcv.end(); // by urueda\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// begin by urueda\n\t\tcv.end();\n\t\t\n\t\tif (actionStatus.getAction() == null)\n\t\t\treturn true; // problems\n\t\t// end by urueda\n\t\t\n\t\tif (actionCount == 1 && isESC(actionStatus.getAction())){ // first action in the sequence an ESC?\n\t\t\tSystem.out.println(\"First action ESC? Switching to NOP to wait for SUT UI ... \" + this.timeElapsed());\n\t\t\tUtil.pauseMs(NOP_WAIT_WINDOW); // hold-on for UI to react (e.g. scenario: SUT loading ... logo)\n\t\t\tactionStatus.setAction(new NOP());\n\t\t\tCodingManager.buildIDs(state, actionStatus.getAction());\n\t\t\tnopAttempts++; escAttempts = 0;\n\t\t} else\n\t\t\tnopAttempts = 0;\n\t\t//System.out.println(\"Selected action: \" + action.toShortString() + \" ... count of ESC/NOP = \" + escAttempts + \"/\" + nopAttempts);;\n\t\t// end by urueda\n\t\t\n\t\tLogSerialiser.log(\"Selected action '\" + actionStatus.getAction() + \"'.\\n\", LogSerialiser.LogLevel.Debug);\n\t\t\t\t\n\t\tvisualizeSelectedAction(cv, state, actionStatus.getAction());\n\t\t\n\t\tif(mode() == Modes.Quit) return actionStatus.isProblems();\n\t\t\n\t\tboolean isTestAction = nopAttempts >= MAX_NOP_ATTEMPTS || !isNOP(actionStatus.getAction()); // by urueda\n\t\t\t\n\t\tif(mode() != Modes.Spy){\n\t\t\t// begin by urueda\n\t\t\tString[] actionRepresentation = Action.getActionRepresentation(state,actionStatus.getAction(),\"\\t\");\n\t\t\tint memUsage = NativeLinker.getMemUsage(system);\n\t\t\tif (memUsage < sutRAMbase)\n\t\t\t\tsutRAMbase = memUsage;\n\t\t\tif (memUsage - sutRAMbase > sutRAMpeak)\n\t\t\t\tsutRAMpeak = memUsage - sutRAMbase;\n\t\t\tlong currentCPU[] = NativeLinker.getCPUsage(system),\n\t\t\t\t userms = currentCPU[0] - lastCPU[0],\n\t\t\t\t sysms = currentCPU[1] - lastCPU[1],\n\t\t\t\t cpuUsage[] = new long[]{ userms, sysms, currentCPU[2]}; // [2] = CPU frame\n\t\t\tlastCPU = currentCPU;\n\t\t\tif (isTestAction)\n\t\t\t\tGrapher.notify(state,state.get(Tags.ScreenshotPath, null),\n\t\t\t\t\t\t\t actionStatus.getAction(),protocolUtil.getActionshot(state,actionStatus.getAction()),actionRepresentation[1],\n\t\t\t\t\t\t \t memUsage, cpuUsage);\n\t\t\t// end by urueda\n\t\t\tLogSerialiser.log(String.format(\"Executing (%d): %s...\", actionCount,\n\t\t\t\tactionStatus.getAction().get(Desc, actionStatus.getAction().toString())) + \"\\n\", LogSerialiser.LogLevel.Debug);\n\t\t\t//if((actionSucceeded = executeAction(system, state, action))){\n\t\t\tif (actionStatus.isUserEventAction() ||\n\t\t\t\t(actionStatus.setActionSucceeded(executeAction(system, state, actionStatus.getAction())))){ // by urueda\t\t\t\t\t\n\t\t\t\t//logln(String.format(\"Executed (%d): %s...\", actionCount, action.get(Desc, action.toString())), LogLevel.Info);\n\t\t\t\t// begin by urueda\n\t\t\t\tcv.begin(); Util.clear(cv); cv.end(); // by urueda (overlay is invalid until new state/actions scan)\n\t\t\t\tstampLastExecutedAction = System.currentTimeMillis();\t\t\t\t\t\n\t\t\t\tactionExecuted(system,state,actionStatus.getAction()); // notification\n\t\t\t\tif (actionStatus.isUserEventAction())\n\t\t\t\t\tUtil.pause(settings.get(ConfigTags.TimeToWaitAfterAction)); // wait between actions\n\t\t\t\tdouble sutCPU = ((cpuUsage[0] + cpuUsage[1]) / (double)cpuUsage[2] * 100);\n\t\t\t\tif (sutCPU > sutCPUpeak)\n\t\t\t\t\tsutCPUpeak = sutCPU;\n\t\t\t\tString cpuPercent = String.format(\"%.2f\", sutCPU) + \"%\";\n\t\t\t\tLogSerialiser.log(String.format(\"Executed [%d]: %s\\n%s\",\n\t\t\t\t\t\tactionCount,\n\t\t\t\t\t\t\"action = \" + actionStatus.getAction().get(Tags.ConcreteID) +\n\t\t\t\t\t\t\" (\" + actionStatus.getAction().get(Tags.AbstractID) + \") @state = \" +\n\t\t\t\t\t\tstate.get(Tags.ConcreteID) + \" (\" + state.get(Tags.Abstract_R_ID) + \")\\n\\tSUT_KB = \" +\n\t\t\t\t\t\tmemUsage + \", SUT_ms = \" + cpuUsage[0] + \" x \" + cpuUsage[1] + \" x \" + cpuPercent,\n\t\t\t\t\t\tactionRepresentation[0]) + \"\\n\",\n\t\t\t\t\t\tLogSerialiser.LogLevel.Info);\n\t\t\t\tSystem.out.print(String.format(\n\t\t\t\t\t\t\"S[%1$\" + (1 + (int)Math.log10((double)settings.get(ConfigTags.Sequences))) + \"d=%2$\" + (1 + (int)Math.log10((double)generatedSequenceNumber)) + \"d]-\" + // S = test Sequence\n\t\t\t\t\t\t\"A[%3$\" + (1 + (int)Math.log10((double)settings().get(ConfigTags.SequenceLength))) + // A = Action\n\t\t\t\t\t\t\"d] <%4$3s@%5$3s KCVG>... SR = %6$8d KB / SC = %7$7s ... \", // KCVG = % CVG of Known UI space @ known UI space scale; SR = SUT_RAM; SC = SUT_CPU\n\t\t\t\t\t\tsequenceCount, generatedSequenceNumber, actionCount,\n\t\t\t\t\t\tGrapher.GRAPHS_ACTIVATED ? Grapher.getEnvironment().getExplorationCurveSampleCvg() : -1,\n\t\t\t\t\t\tGrapher.GRAPHS_ACTIVATED ? Grapher.getEnvironment().convertKCVG(Grapher.getEnvironment().getExplorationCurveSampleScale()) : -1,\n\t\t\t\t\t\tmemUsage, cpuPercent)); debugResources();\n\t\t\t\tSystem.out.print(\" ... L/S/T: \" + LogSerialiser.queueLength() + \"/\" + ScreenshotSerialiser.queueLength() + \"/\" + TestSerialiser.queueLength()); // L/S/T = Log/Scr/Test queues\n\t\t\t\t//Example: Seq[1]-Action[1] < 0 KCVG>... SUT_RAM = 17292 KB / SUT_CPU = 17.42% ... TESTAR_CPU: 1.550 s / TESTAR_RAM: 491.0 MB ... Log/Scr/Test queues: 2/2/0\t\t\t\t\n// temp begin\n/*if (Grapher.getEnvironment() != null){\n\tint totalWidgets = 0,\n\t totalUnxActions = 0;\n\tfor (IGraphState gs : Grapher.getEnvironment().getGraphStates()){\n\t\ttotalWidgets += gs.getStateWidgets().size();\n\t\ttotalUnxActions += gs.getUnexploredActions().size();\n\t}\n\tSystem.out.print(\"\\n\\t\" + String.format(\"%7d\",totalWidgets) + \" x \" + String.format(\"%7d\",totalUnxActions) + \"\\t(widgets x unexplored actions)\");\n}*/\n// temp end\n\t\t\t\tif (settings().get(ConfigTags.PrologActivated))\n\t\t\t\t\tSystem.out.println(\" ... prolog: \" + jipWrapper.debugPrologBase());\n\t\t\t\telse\n\t\t\t\t\tSystem.out.print(\"\\n\");\n\t\t\t\t//logln(Grapher.getExplorationCurveSample(),LogLevel.Info);\n\t\t\t\t//logln(Grapher.getLongestPath() + \"\\n\",LogLevel.Info);\n\t\t\t\tif (mode() == Modes.AdhocTest){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tprotocolUtil.adhocTestServerWriter.write(\"OK\\r\\n\"); // adhoc action executed\n\t\t\t\t\t\tprotocolUtil.adhocTestServerWriter.flush();\n\t\t\t\t\t} catch (Exception e){} // AdhocTest client disconnected?\n\t\t\t\t}\n\t\t\t\t// end by urueda\n\n\t\t\t\tif (isTestAction && actionStatus.isActionSucceeded()) // by urueda\n\t\t\t\t\tactionCount++;\n\t\t\t\tfragment.set(ExecutedAction, actionStatus.getAction());\n\t\t\t\tfragment.set(ActionDuration, settings().get(ConfigTags.ActionDuration));\n\t\t\t\tfragment.set(ActionDelay, settings().get(ConfigTags.TimeToWaitAfterAction));\n\t\t\t\tLogSerialiser.log(\"Writing fragment to sequence file...\\n\", LogSerialiser.LogLevel.Debug);\n\t\t\t\t//oos.writeObject(fragment);\n\t\t\t\tTestSerialiser.write(fragment); // by urueda\n\t\n\t\t\t\tLogSerialiser.log(\"Wrote fragment to sequence file!\\n\", LogSerialiser.LogLevel.Debug);\n\t\t\t}else{\n\t\t\t\tLogSerialiser.log(\"Execution of action failed!\\n\");\n\t\t\t\ttry {\n\t\t\t\t\tprotocolUtil.adhocTestServerWriter.write(\"FAIL\\r\\n\"); // action execution failed\n\t\t\t\t\tprotocolUtil.adhocTestServerWriter.flush();\n\t\t\t\t} catch (Exception e) {} // AdhocTest client disconnected?\n\t\t\t}\t\t\t\t\n\t\t}\n\t\t\n\t\tlastExecutedAction = actionStatus.getAction(); // by urueda\n\t\t\n\t\tif(mode() == Modes.Quit) return actionStatus.isProblems();\n\t\tif(!actionStatus.isActionSucceeded()){\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn actionStatus.isProblems();\n\t}",
"public void execute(A action) {\n\t\tS testState=action.applyTo(currentState);\n\t\tif (stop ||testState.equals(null)){\n\t\t\tString text=\"Impossible to make the action: \";\n\t\t\t\n\t\t\tif(stop){\n\t\t\t\ttext+=\"The game was stopped before \";\n\t\t\t}\n\t\t\telse if(testState.equals(null)){\n\t\t\t\ttext+=\"The game should start before realize an action\";\n\t\t\t}\n\t\t\t\n\t\t\tGameError error=new GameError(text);\n\t\t\tnotifyObservers(new GameEvent<S, A>(EventType.Error, null,currentState, error, error.getMessage()));\n\t\t\tthrow error;\n\t\t\t\n\t\t\t\t\t\n\t\t}else{\n\t\t\tthis.currentState=testState;\n\t\t\tnotifyObservers(new GameEvent<S, A>(EventType.Change, action, currentState, null,\"The game has change\"));\n\t\t\t\t\n\t\t}\n\t\t\t\n\t\n \t}",
"public void perform(GameState state) {\n\n selectCrop(state);\n\n// returnBack(state); // add back in for command lines\n }",
"private void executeExecutables() {\n \r\n if (stunTime > 0) { // still stunned, so lower stunTime and skip all actions\r\n if (stunTime < Game.deltaTime) {\r\n stunTime = 0;\r\n } else {\r\n stunTime -= Game.deltaTime;\r\n }\r\n //System.out.println(this + \" stunned\");\r\n tryStopping();\r\n return;\r\n }\r\n final Action action = state.action;\r\n if (action instanceof Attack) {\r\n if (moveTime < action.totalTime()) {\r\n moveTime += Game.deltaTime;\r\n return;\r\n } else {\r\n state.resetTime();\r\n stop();\r\n state.resetTime(); // FIXME why two calls to this\r\n }\r\n }\r\n \r\n // just finished hitstun\r\n stunTime = 0;\r\n moveTime = 0;\r\n actionTimer = 0;\r\n acceleration.x = 0;\r\n log(this + \" checking for called executables\");\r\n boolean noMovesCalled = true;\r\n for (int i = 0; i < executables.length; i++) {\r\n final Executable executable = executables[i];\r\n executable.update();\r\n if (executable.keyBinding.isPressed(controller)) {\r\n if (executable instanceof Move) {\r\n noMovesCalled = false;\r\n }\r\n //System.out.println(this + \" pressed \" + KeyBinding.get(i) + \", calling \" + executable);\r\n state = executable.execute(this);\r\n } else {\r\n executable.reset();\r\n }\r\n }\r\n if (noMovesCalled) {\r\n tryStopping();\r\n }\r\n if (wasOnPlatform) {\r\n numMidairJumps = 1;\r\n }\r\n }",
"public void act() \n {\n moveEnemy();\n checkHealth();\n attacked();\n }",
"public void doAction()\n {\n \n //Location of the player\n int cX = w.getPlayerX();\n int cY = w.getPlayerY();\n \n //Basic action:\n //Grab Gold if we can.\n if (w.hasGlitter(cX, cY))\n {\n w.doAction(World.A_GRAB);\n return;\n }\n \n //Basic action:\n //We are in a pit. Climb up.\n if (w.isInPit())\n {\n w.doAction(World.A_CLIMB);\n return;\n }\n //Test the environment\n /*if (w.hasBreeze(cX, cY))\n {\n System.out.println(\"I am in a Breeze\");\n }\n if (w.hasStench(cX, cY))\n {\n System.out.println(\"I am in a Stench\");\n }\n if (w.hasPit(cX, cY))\n {\n System.out.println(\"I am in a Pit\");\n }\n if (w.getDirection() == World.DIR_RIGHT)\n {\n System.out.println(\"I am facing Right\");\n }\n if (w.getDirection() == World.DIR_LEFT)\n {\n System.out.println(\"I am facing Left\");\n }\n if (w.getDirection() == World.DIR_UP)\n {\n System.out.println(\"I am facing Up\");\n }\n if (w.getDirection() == World.DIR_DOWN)\n {\n System.out.println(\"I am facing Down\");\n }\n */\n \n //decide next move\n if(w.hasStench(cX, cY)&&w.hasArrow())//Wumpus can be shot if located\n {\n if((w.hasStench(cX, cY+2))||(w.hasStench(cX-1, cY+1)&&w.isVisited(cX-1, cY))||(w.hasStench(cX+1, cY+1)&&w.isVisited(cX+1, cY)))//Condition for checking wumpus location\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n }\n else if((w.hasStench(cX+2, cY))||(w.hasStench(cX+1, cY-1)&&w.isVisited(cX, cY-1))||(w.hasStench(cX+1, cY+1)&&w.isVisited(cX, cY+1)))//Condition for checking wumpus location\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_SHOOT);\n }\n else if((w.hasStench(cX, cY-2))||(w.hasStench(cX-1, cY-1)&&w.isVisited(cX-1, cY))||(w.hasStench(cX+1, cY-1)&&w.isVisited(cX+1, cY)))//Condition for checking wumpus location\n {\n turnTo(World.DIR_DOWN);\n w.doAction(World.A_SHOOT);\n }\n else if((w.hasStench(cX-2, cY))||(w.hasStench(cX-1, cY+1)&&w.isVisited(cX, cY+1))||(w.hasStench(cX-1, cY-1)&&w.isVisited(cX, cY-1)))//Condition for checking wumpus location\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_SHOOT);\n }\n else if(cX==1&&cY==1) //First tile. Shoot North. If wumpus still alive, store its location as (2,1) to avoid it\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n if(w.hasStench(cX, cY))\n {\n wumpusLoc[0] = 2;\n wumpusLoc[1] = 1;\n }\n }\n else if(cX==1&&cY==4) //Condition for corner\n {\n if(w.isVisited(1, 3))\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_SHOOT);\n }\n if(w.isVisited(2, 4))\n {\n turnTo(World.DIR_DOWN);\n w.doAction(World.A_SHOOT);\n }\n \n }\n else if(cX==4&&cY==1) //Condition for corner\n {\n if(w.isVisited(3, 1))\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n }\n if(w.isVisited(4, 2))\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_SHOOT);\n }\n \n }\n else if(cX==4&&cY==4) //Condition for corner\n {\n if(w.isVisited(3, 4))\n {\n turnTo(World.DIR_DOWN);\n w.doAction(World.A_SHOOT);\n }\n if(w.isVisited(4, 3))\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_SHOOT);\n }\n \n }\n else if((cX==1)&&(w.isVisited(cX+1, cY-1))) //Condition for edge\n {\n \n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n }\n else if((cX==4)&&(w.isVisited(cX-1, cY-1))) //Condition for edge\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n }\n else if((cY==1)&&(w.isVisited(cX-1, cY+1))) //Condition for edge\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_SHOOT);\n }\n else if((cY==4)&&(w.isVisited(cX-1, cY-1))) //Condition for edge\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_SHOOT);\n }\n else //Can't locate wumpus, go back to safe location\n {\n turnTo((w.getDirection()+2)%4);\n w.doAction(World.A_MOVE);\n }\n }\n else // No stench. Explore \n {\n if(w.isValidPosition(cX, cY-1)&&!w.isVisited(cX, cY-1)&&isSafe(cX, cY-1)) \n {\n turnTo(World.DIR_DOWN);\n w.doAction(World.A_MOVE);\n }\n else if(w.isValidPosition(cX+1, cY)&&!w.isVisited(cX+1, cY)&&isSafe(cX+1, cY))\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_MOVE);\n }\n else if(w.isValidPosition(cX-1, cY)&&!w.isVisited(cX-1, cY)&&isSafe(cX-1,cY))\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_MOVE);\n }\n else\n {\n if(w.isValidPosition(cX, cY+1))\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_MOVE);\n }\n else if(w.isValidPosition(cX+1, cY))\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_MOVE);\n }\n else if(w.isValidPosition(cX-1, cY))\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_MOVE);\n }\n }\n }\n \n }",
"GameState requestActionGamePiece();",
"void updateGameState(GameState gameState);",
"public interface Action {\n void doAction(GameState state);\n}",
"public void act() \r\n {\r\n if (startTime > 0) {\r\n startTime--;\r\n }\r\n else {\r\n if (isScared()) {\r\n doScareMode();\r\n }\r\n else {\r\n if (counter == 0 || !canMove(currDirectionStr)) {\r\n counter = CELL_SIZE * 4;\r\n prevDirection = currDirection;\r\n do {\r\n currDirection = (int)(Math.random() * 10);\r\n if (currDirection == 0) {\r\n currDirectionStr = \"up\";\r\n }\r\n else if (currDirection == 1) {\r\n currDirectionStr = \"left\";\r\n }\r\n else if (currDirection == 2) {\r\n currDirectionStr = \"down\";\r\n }\r\n else if (currDirection == 3) {\r\n currDirectionStr = \"right\";\r\n }\r\n } while (!canMove(currDirectionStr));\r\n }\r\n \r\n if (canMove(currDirectionStr)) {\r\n move(currDirectionStr);\r\n }\r\n counter--;\r\n } \r\n }\r\n }",
"public void runStateMachine() {\n switch(m_currentState) {\n case PoweringUpState:\n if (this.doPowerUpStuff()) {\n this.setRobotState(RobotState.InitializingDataState);\n }\n break;\n case InitializingDataState:\n\n if (this.initializeData()) {\n // Load some commands for our robot.\n // We could definitely load these from a different file.\n System.out.println(\"-------- Populating Command Queue --------\");\n m_robotQueue.addCommand(new MoveToLocationXY(1.0, 2.0, 2.0));\n m_robotQueue.addCommand(new MoveToLocationXY(-1.0, -2.0, 1.0));\n m_robotQueue.addCommand(new RotateDegrees(180.0, 22.5));\n\n System.out.println(\"\\n-------- Entering Main Robot State --------\");\n this.setRobotState(RobotState.IdleWaitingForCommandState);\n }\n break;\n case IdleWaitingForCommandState:\n if (m_robotQueue.isCommandPending()) {\n\n m_currentCommand = m_robotQueue.getNextCommand();\n\n // m_currentCommand is a generic Object. Let's see what it actually is...\n String commandName = m_currentCommand.getClass().toString();\n System.out.println(\"* Got new command. Processing: \" + commandName);\n\n // Change robot state depending on the type of command we found.\n switch (commandName) {\n // NOTE: This \"class xyz\" text compare is kind of weird,\n // We could probably find a better way.\n case \"class commands.MoveToLocationXY\":\n this.setRobotState(RobotState.MovingToLocationState);\n break;\n case \"class commands.RotateDegrees\":\n this.setRobotState(RobotState.RotatingState);\n break;\n default:\n System.out.println(\"Unrecognized command \" + commandName);\n }\n System.out.println();\n\n } else if (m_currentCommand != null) {\n m_currentCommand = null; // Doing nothing. Clear current command.\n }\n break;\n case MovingToLocationState:\n MoveToLocationXY moveCmd = (MoveToLocationXY) m_currentCommand;\n try {\n if (moveCmd.runUntilComplete()) {\n // Done moving, process next item in command queue\n this.setRobotState(RobotState.IdleWaitingForCommandState);\n }\n } catch (InterruptedException e) { // for Thread.sleep - demo only\n e.printStackTrace();\n }\n break;\n case RotatingState:\n RotateDegrees rotateCmd = (RotateDegrees) m_currentCommand; // Cast to correct type.\n try {\n if (rotateCmd.runUntilComplete()) {\n // Done moving, process next item in command queue\n this.setRobotState(RobotState.IdleWaitingForCommandState);\n }\n } catch (InterruptedException e) { // for Thread.sleep - demo only\n e.printStackTrace();\n }\n break;\n case SearchingForTargetsState:\n // TODO - implement SearchTarget demo behavior\n break;\n }\n }",
"public void act()\n {\n if (getGrid() == null)\n return;\n if (caughtPokemon.size() <= 0)\n {\n removeSelfFromGrid();\n System.out.println(toString() + \" has blacked out! \" + toString() + \" has appeared at a PokeCenter.\");\n return;\n }\n ArrayList<Location> moveLocs = getMoveLocations();\n Location loc = selectMoveLocation(moveLocs);\n makeMove(loc);\n }",
"@Override\r\n\tpublic void runInstincts() throws GameActionException {\n\t\t\r\n\t}",
"public void act() \n {\n \n checkKey();\n platformAbove();\n \n animationCounter++;\n checkFall();\n }",
"@Override\n protected boolean makeMove(GameAction action) {\n // uses the actions to check instances of player actions\n //handles a move action by tapping on a square\n if(action instanceof StrategoMoveAction) {\n StrategoMoveAction sma = (StrategoMoveAction)action;\n state.tapOnSquare(sma.getRow(), sma.getCol());\n }\n //handles a forfeit action by telling the game state to end the game\n else if (action instanceof StrategoForfeitAction) {\n state.forfeitGame();\n }\n //handles a transition action by telling the game to transition phases\n else if (action instanceof StrategoTransitionAction) {\n state.transitionPhases();\n }\n //handles a button press by updating the proper game state variable\n else if (action instanceof StrategoButtonPieceAction) {\n StrategoButtonPieceAction bpa = (StrategoButtonPieceAction)action;\n state.setLastTappedPieceButton(bpa.getWhichButton());\n }\n else if (action instanceof StrategoMuteAction){\n StrategoMuteAction ma = (StrategoMuteAction)action;\n StrategoHumanPlayer sender = (StrategoHumanPlayer)ma.getPlayer();\n if(sender.getMediaPlayer().isPlaying()){\n sender.getMediaPlayer().pause();\n }\n else{\n sender.getMediaPlayer().start();\n }\n }\n //handles a computers setup action by setting up the board\n else if (action instanceof StrategoSmartComputerSetupAction) {\n StrategoSmartComputerSetupAction ssca = (StrategoSmartComputerSetupAction)action;\n this.letSmartComputerSetup();\n }\n //allows computers to make two dependant moves with one action\n else if (action instanceof StrategoComputerMoveAction) {\n StrategoComputerMoveAction scma = (StrategoComputerMoveAction) action;\n state.tapOnSquare(scma.getOldRow(), scma.getOldCol());\n state.tapOnSquare(scma.getFutureRow(), scma.getFutureCol());\n }\n //allows a player to pass if they cannot move\n else if (action instanceof StrategoPassAction) {\n StrategoPassAction spa = (StrategoPassAction)action;\n state.transitionTurns();\n }\n //allows the game to remove the visibility of a temporarily visible piece\n else if (action instanceof StrategoRemoveVisibilityAction) {\n StrategoRemoveVisibilityAction srva = (StrategoRemoveVisibilityAction) action;\n try{\n Thread.sleep(500);\n } catch(InterruptedException e) {\n\n }\n if(state.getVisiblePiece() != null) {\n state.removeTemporaryVisiblePiece();\n }\n }\n else if (action instanceof NoVendettaAction) {\n state.setLastKilledPiece(null);\n }\n return true;\n }",
"protected void updateGameState() {\n }",
"@Override\n public void run() {\n chosenActionUnit.run(getGame(), inputCommands);\n }",
"GameState requestActionTile();",
"public void act()\n {\n // Make sure fish is alive and well in the environment -- fish\n // that have been removed from the environment shouldn't act.\n if ( isInEnv() ) \n move();\n }",
"void runState() {\n\t\tp.displaySheet();\n\t\tcurState.run();\n\t}",
"@Override\n public void doAction() {\n String move = agent.getBestMove(currentPosition);\n execute(move);\n\n //Location of the player\n int cX = w.getPlayerX();\n int cY = w.getPlayerY();\n\n if (w.hasWumpus(cX, cY)) {\n System.out.println(\"Wampus is here\");\n w.doAction(World.A_SHOOT);\n } else if (w.hasGlitter(cX, cY)) {\n System.out.println(\"Agent won\");\n w.doAction(World.A_GRAB);\n } else if (w.hasPit(cX, cY)) {\n System.out.println(\"Fell in the pit\");\n }\n\n// //Basic action:\n// //Grab Gold if we can.\n// if (w.hasGlitter(cX, cY)) {\n// w.doAction(World.A_GRAB);\n// return;\n// }\n//\n// //Basic action:\n// //We are in a pit. Climb up.\n// if (w.isInPit()) {\n// w.doAction(World.A_CLIMB);\n// return;\n// }\n//\n// //Test the environment\n// if (w.hasBreeze(cX, cY)) {\n// System.out.println(\"I am in a Breeze\");\n// }\n// if (w.hasStench(cX, cY)) {\n// System.out.println(\"I am in a Stench\");\n// }\n// if (w.hasPit(cX, cY)) {\n// System.out.println(\"I am in a Pit\");\n// }\n// if (w.getDirection() == World.DIR_RIGHT) {\n// System.out.println(\"I am facing Right\");\n// }\n// if (w.getDirection() == World.DIR_LEFT) {\n// System.out.println(\"I am facing Left\");\n// }\n// if (w.getDirection() == World.DIR_UP) {\n// System.out.println(\"I am facing Up\");\n// }\n// if (w.getDirection() == World.DIR_DOWN) {\n// System.out.println(\"I am facing Down\");\n// }\n//\n// //decide next move\n// rnd = decideRandomMove();\n// if (rnd == 0) {\n// w.doAction(World.A_TURN_LEFT);\n// w.doAction(World.A_MOVE);\n// }\n//\n// if (rnd == 1) {\n// w.doAction(World.A_MOVE);\n// }\n//\n// if (rnd == 2) {\n// w.doAction(World.A_TURN_LEFT);\n// w.doAction(World.A_TURN_LEFT);\n// w.doAction(World.A_MOVE);\n// }\n//\n// if (rnd == 3) {\n// w.doAction(World.A_TURN_RIGHT);\n// w.doAction(World.A_MOVE);\n// }\n }",
"public void act() \n {\n checkCollision();\n KeyMovements(); \n attackWeapon();\n //stopGame();\n \n }",
"private void action() {\r\n moveSnake();\r\n if (hasEatenPowerUp() == false) checkForCollisionWithSelf();\r\n if (hasHitBoundry() == false) redraw();\r\n }",
"private void dealWithState(FindPairLogic.State state) {\n buttons[state.getI()][state.getJ()].setText(Integer.toString(state.getN()));\n buttons[state.getI()][state.getJ()].setDisable(true);\n if (state.hasResult()) {\n if (!state.isSuccess()) {\n isGameEnable.set(false);\n threadPool.schedule(() -> Platform.runLater(() -> {\n buttons[state.getI()][state.getJ()].setText(\"\");\n buttons[state.getI()][state.getJ()].setDisable(false);\n buttons[state.getPreviousI()][state.getPreviousJ()].setText(\"\");\n buttons[state.getPreviousI()][state.getPreviousJ()].setDisable(false);\n isGameEnable.set(true);\n }), 1, TimeUnit.SECONDS);\n }\n }\n if (state.isEndGame()) {\n endGame();\n }\n }",
"State takeAction(State state);",
"@Override\n public void act() {\n sleepCheck();\n if (!isAwake()) return;\n while (getActionTime() > 0f) {\n UAction action = nextAction();\n if (action == null) {\n this.setActionTime(0f);\n return;\n }\n if (area().closed) return;\n doAction(action);\n }\n }",
"private void processGameAction(GameAction gameAction) {\r\n // Get all of the methods to be called by this setting as strings\r\n ArrayList<String> methods = gameAction.getGameActionMethods();\r\n \r\n // Set each method into an array to be run using the mapMethodSetting\r\n for (String methodName : methods) {\r\n try {\r\n // Get the specific method to run from this class \r\n Method method = GameManager.class.getMethod(methodName, \r\n this.methodMapGameActions.get(methodName));\r\n \r\n // Set an array to hold the arguments for this \r\n Object[] arguments = \r\n new Object[method.getParameterTypes().length];\r\n \r\n // Loop through the values and add them to the arguments list\r\n for (int i = 0; i < arguments.length; i++) {\r\n arguments[i] = gameAction.getNextActionValue();\r\n }\r\n \r\n // Invoke the method with the arguments array\r\n method.invoke(this, arguments);\r\n }\r\n catch (NoSuchMethodException|IllegalAccessException|\r\n InvocationTargetException e) {\r\n System.out.println(e.getCause());\r\n }\r\n }\r\n }",
"public void run() \n\t\t{\n\t\t\tboolean exitMenu = false;\n\t\t\tdo \n\t\t\t{\t\t\t\t\t\n\t\t\t\tmenu.display();\n\t\t\t\tint choice = menu.getUserSelection();\n\t\t\t\t// the above method call will return 0 if the user did not\n\t\t\t\t// entered a valid selection in the opportunities given...\n\t\t\t\t// Otherwise, it is valid...\n\t\t\t\tif (choice == 0)\n\t\t\t\t{\n\t\t\t\t\t// here the user can be informed that fail to enter a\n\t\t\t\t\t// valid input after all the opportunities given....\n\t\t\t\t\t// for the moment, just exit....\n\t\t\t\t\texitMenu = true;\n\t\t\t\t}\n\t\t\t\telse if (choice == 1) \n\t\t\t\t{\n\t\t\t\t\t// here goes your code to initiate action associated to\n\t\t\t\t\t// menu option 1....\n\t\t\t\t\tProjectUtils.operationsOnNumbers();\n\t\t\t\t}\n\t\t\t\telse if (choice == 2)\n\t\t\t\t{\n\t\t\t\t\tProjectUtils.operationsOnStrings();\n\t\t\t\t}\n\t\t\t\telse if (choice == 3) \n\t\t\t\t{\n\t\t\t\t\tProjectUtils.showStatistics();\n\t\t\t\t}\n\t\t\t\telse if (choice == 4)\n\t\t\t\t{\n\t\t\t\t\texitMenu = true; \n\t\t\t\t\tProjectUtils.println(\"Exiting now... \\nGoodbye!\");\n\t\t\t\t}\n\t\t\t} while (!exitMenu);\n\t\t}",
"public void act() \r\n {\r\n if ( Greenfoot.isKeyDown( \"left\" ) )\r\n {\r\n turn( -5 );\r\n }\r\n\r\n else if ( Greenfoot.isKeyDown( \"right\" ) )\r\n {\r\n turn( 5 );\r\n }\r\n if ( Greenfoot.isKeyDown(\"up\") )\r\n {\r\n move(10);\r\n }\r\n else if ( Greenfoot.isKeyDown( \"down\") )\r\n {\r\n move(-10);\r\n }\r\n if ( IsCollidingWithGoal() )\r\n {\r\n getWorld().showText( \"You win!\", 300, 200 );\r\n Greenfoot.stop();\r\n }\r\n }",
"@Override\n public void executeState(Controller controller) {\n // controller.getGame().setEndTurn(false);\n\n controller.setUndoCheckFlag(false);\n controller.setGoOn(true);\n controller.getGame().setTargetSelected(null);\n controller.getGame().setTargetInUse(null);\n\n\n controller.getGame().setCurrentPlayer(controller.getNextPlayer(controller.getGame().getCurrentPlayer()));\n controller.saveAll();\n controller.setCanSkip(false);\n Player currentPlayer= controller.getGame().getCurrentPlayer();\n currentPlayer.setHasBeenMoved(false);\n currentPlayer.setHasBuilt(false);\n currentPlayer.setDefeat(false);\n currentPlayer.setInQue(false);\n\n\n Square square [][]=controller.getGame().getField().getSquares();\n\n for(int x=0; x<5;x++)\n for(int y=0; y<5; y++)\n square[x][y].setStart_level(square[x][y].getLevel());\n\n\n for(Worker w: currentPlayer.getWorkers()){\n w.setSquareNotAvailable(null);\n w.setMandatorySquare(null);\n w.resetHystoricPos();\n w.setCanBeMoved(true);\n w.setCanBuild(true);\n }\n\n currentPlayer.getGod().setCantDo(new ArrayList<>());\n\n\n\n }",
"public void act()\n {\n displayBoard();\n Greenfoot.delay(10);\n \n if( checkPlayerOneWin() == true )\n {\n JOptionPane.showMessageDialog( null, \"Congratulations Player One!\", \"playerOne Win\", JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( checkPlayerTwoWin() == true )\n {\n JOptionPane.showMessageDialog( null, \"Congratulations Player Two!\", \"plauerTwo Win\",JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( checkBoardFilled() == true )\n {\n JOptionPane.showMessageDialog( null, \"It is a draw!\", \"Wrong step\", JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( messageShown == false )\n {\n showTurn();\n \n messageShown = true;\n }\n \n checkMouseClick();\n }",
"public void displayCurrentState(State game);",
"private static void checkActions()\n\t{\n\t\tSystem.out.println();\n\t\t\n\t\tif (fighterAction.equals(\"Kick\") && opponentAction.equals(\"Kick\"))\n\t\t{\n\t\t\tannounce(playerOneName,\" smashes shins with \", opponentName);\n\t\t\topponentHurt = true;\n\t\t\tplayerOneHurt = true;\n\t\t}\n\t\n\t\telse if (fighterAction.equals(\"Kick\") && opponentAction.equals(\"Punch\"))\n\t\t{\n\t\t\tannounce(opponentName,\" gives a big uppercut to \", playerOneName);\n\t\t\tplayerOneHurt = true;\n\t\t\tcounterAttack = true;\n\t\t}\n\t\n\t\telse if (fighterAction.equals(\"Kick\") && opponentAction.equals(\"Block\"))\n\t\t{\n\t\t\tannounce(opponentName,\" takes a big kick to the ribs from \", playerOneName);\n\t\t\topponentHurt = true;\n\t\t\tcounterAttack = true;\n\t\t}\n\t\n\t\telse if (fighterAction.equals(\"Punch\") && opponentAction.equals(\"Kick\"))\n\t\t{\n\t\t\tannounce(playerOneName,\" gives a big uppercut to \", opponentName);\n\t\t\topponentHurt = true;\n\t\t\tcounterAttack = true;\n\t\t}\n\t\n\t\telse if (fighterAction.equals(\"Punch\") && opponentAction.equals(\"Punch\"))\n\t\t{\n\t\t\tannounce(playerOneName,\" exchanges quick jabs with \", opponentName);\n\t\t\topponentHurt = true;\n\t\t\tplayerOneHurt = true;\n\t\t}\n\t\n\t\telse if (fighterAction.equals(\"Punch\") && opponentAction.equals(\"Block\"))\n\t\t{\n\t\t\tannounce(opponentName,\" parries the punch and deals big damage to \", playerOneName);\n\t\t\tplayerOneHurt = true;\n\t\t\tcounterAttack = true;\n\t\t}\n\t\n\t\telse if (fighterAction.equals(\"Block\") && opponentAction.equals(\"Kick\"))\n\t\t{\n\t\t\tannounce(playerOneName,\" takes a big kick to the ribs from \", opponentName);\n\t\t\tplayerOneHurt = true;\n\t\t\tcounterAttack = true;\n\t\t}\n\t\n\t\telse if (fighterAction.equals(\"Block\") && opponentAction.equals(\"Punch\"))\n\t\t{\n\t\t\tannounce(playerOneName,\" parries the punch and deals big damage to \", opponentName);\n\t\t\topponentHurt = true;\n\t\t\tcounterAttack = true;\n\t\t}\n\t\n\t\t// Both block\n\t\telse\n\t\t{\n\t\t\tannounce(\"\",\"Both fighters stand still, waiting for the other to make a move!\",\"\");\n\t\t}\n\n\t\tSystem.out.println();\n\t}",
"public void act ()\n {\n checkScroll();\n checkPlatform();\n checkXAxis();\n checkDeath();\n // get the current state of the mouse\n MouseInfo m = Greenfoot.getMouseInfo();\n // if the mouse is on the screen...\n if (m != null)\n {\n // if the mouse button was pressed\n if (Greenfoot.mousePressed(null))\n {\n // shoot\n player.shoot(m.getX(), m.getY());\n }\n }\n }",
"@Override\n protected void perform(String[] params) {\n //Only state switcher command\n }",
"@Override\n public ArrayList<agents.Action> actionsFor(agents.State state) {\n\n ArrayList<agents.Action> legalActions = new ArrayList<agents.Action>();\n int[] board = ((State) state).getBoard();\n int blankPosition = 0;\n while (board[blankPosition] != 0) blankPosition++;\n if (blankPosition % 3 != 0) legalActions.add(new Action(LEFT));\n if (blankPosition % 3 != 2) legalActions.add(new Action(RIGHT));\n if (blankPosition < 6) legalActions.add(new Action(DOWN));\n if (blankPosition > 2) legalActions.add(new Action(UP));\n return legalActions;\n }",
"public boolean runTurn() {\n\t\t// Check model in board.\n\t\tfor (int i = 0; i < this.board.getHeight(); i++) {\n\t\t\tfor (int j = 0; j < this.board.getLength(); j++) {\n\t\t\t\tModel model = this.board.getModel(i, j);\n\n\t\t\t\t// check what model it is and do action.\n\t\t\t\tif (model instanceof SunFlower) {\n\t\t\t\t\tsunFlowerAction((SunFlower) model, i, j);\n\t\t\t\t} else if (model instanceof PeaShooter) {\n\t\t\t\t\tpeaShooterAction((PeaShooter) model, i, j);\n\t\t\t\t} else if (model instanceof AbstractZombie) {\n\t\t\t\t\tif (model.getHp() <= 0) {\n\t\t\t\t\t\tthis.board.removeModel(model, i, j);\n\t\t\t\t\t\tSystem.out.println(\"zombie died, new zombie coming\");\n\t\t\t\t\t\tspawnZombie(1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tzombieAction((AbstractZombie) model, i, j);\n\t\t\t\t\t\tSystem.out.println(\"zombie at [\" + i + \",\" + j + \"], Hp = \" + model.getHp());\n\t\t\t\t\t}\n\t\t\t\t} else if (model instanceof Nut) {\n\t\t\t\t\tnutAction((Nut) model, i, j);\n\t\t\t\t\tSystem.out.println(\"Nut\" + \"[\" + i + \",\" + j + \"], Hp = \" + model.getHp());\n\t\t\t\t} else if (model instanceof RePeater) {\n\t\t\t\t\tRePeaterAction((RePeater) model, i, j);\n\t\t\t\t\tSystem.out.println(\"RePeater\" + \"[\" + i + \",\" + j + \"], Hp = \" + model.getHp());\n\t\t\t\t}\n\t\t\t\tif (model instanceof SunFlower) {\n\t\t\t\t\tSystem.out.println(\"SunFlower\" + \"[\" + i + \",\" + j + \"], Hp = \" + model.getHp());\n\t\t\t\t}\n\t\t\t\tif (model instanceof PeaShooter) {\n\t\t\t\t\tSystem.out.println(\"PeaShooter\" + \"[\" + i + \",\" + j + \"], Hp = \" + model.getHp());\n\t\t\t\t} else if (model instanceof Bomb) {\n\t\t\t\t\tBombAction((Bomb) model, i, j);\n\t\t\t\t\tSystem.out.println(\"Bomb\" + \"[\" + i + \",\" + j + \"], Hp = \" + model.getHp());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Current sun points: \" + this.sp);\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.println(this.board);\n\n\t\t}\n\t\treturn this.isGameOver();\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 static void selectActions()\n\t{\n\t\t// One Player\n\t\tif (!isMultiplayer)\n\t\t{\n\t\t\tprintBorder();\n\t\t\tSystem.out.print(\"ROUND NUMBER \" + roundNumber + \"!\\n\" + playerOneName + \" has \" + playerOneHealth + \" health left, and \" + opponentName + \" has \" + opponentHealth + \" health left.\\nEnter 1 to kick, 2 to punch, 3 to block: \");\n\t\t\tfighterInput = input.nextInt();\n\t\t\t\n\t\t\t// Test crashes with floats or letters\n\t\t\twhile (fighterInput < 1 || fighterInput > 3)\n\t\t\t{\n\t\t\t\tprintBorder();\n\t\t\t\tSystem.out.print(\"What are you trying to do???\\nYou can only enter 1 to kick, 2 to punch, 3 to block: \");\n\t\t\t\tfighterInput = input.nextInt();\n\t\t\t}\n\t\t\t// Assigns index value of action array\n\t\t\tfighterAction = actionArray[fighterInput - 1];\n\t\t\n\t\t\t// Opponent rolls action\n\t\t\topponentAction = actionArray[(int) (Math.random() * 3)];\n\t\t\t}\n\t\t\t\t\n\t\t\n\t\t// Two Player\n\t\telse\n\t\t{\n\t\t\t// Player1 picks action and test input\n\t\t\tprintBorder();\n\t\t\tSystem.out.print(\"Round Number \" + roundNumber + \"!\\n\" + playerOneName + \" has \" + playerOneHealth + \" health left, and \" + opponentName + \" has \" + opponentHealth + \" health left.\\n\\n\" + playerOneName + \" enter 1 to kick, 2 to punch, 3 to block: \");\n\t\t\tfighterInput = input.nextInt();\n\t\t\twhile (fighterInput < 1 || fighterInput > 3 )\n\t\t\t{\n\t\t\t\tprintBorder();\n\t\t\t\tSystem.out.print(\"What are you trying to do???\\nYou can only enter 1 to kick, 2 to punch, 3 to block: \");\n\t\t\t\tfighterInput = input.nextInt(); // Throws error if input is not an int\n\t\t\t}\n\t\t\tfighterAction = actionArray[fighterInput - 1];\n\t\t\n\t\t\t// Prints lines to hide player one’s action\n\t\t\tfor(int i = 0; i < 50; i++) System.out.println();\n\t\n\t\t\t// Player2 picks action\n\t\t\tSystem.out.print(opponentName + \" enter 1 to kick, 2 to punch, 3 to block: \");\n\t\t\tfighterInput = input.nextInt();\n\t\t\twhile (fighterInput < 1 || fighterInput > 3 )\n\t\t\t{\n\t\t\t\tprintBorder();\n\t\t\t\tSystem.out.print(\"What are you trying to do???\\nYou can only enter 1 to kick, 2 to punch, 3 to block: \");\n\t\t\t\tfighterInput = input.nextInt();\n\t\t\t}\n\t\t\topponentAction = actionArray[fighterInput - 1];\n\t\t\t}\n\t}",
"public int performAction()\n {\n if(stunCountdown > 0) \n {\n ERROR_LOG.writeToLog(\"The saboteur is not supposed to call performAction() while stuunned. Remaining time stunned: \" + stunCountdown + '.');\n \n chasingPlayer = false;\n return stunCountdown;\n }\n \n if(chasingPlayer)\n {\n setRoom(Game.getInstance().getPlayer().getCurrentRoom());\n }\n else\n {\n if(((getCurrentRoom().isOperating() && getCurrentRoom() instanceof ItemRoom) || Game.getInstance().getGameInfo().getHackedExit() == null) && Math.random() < chanceOfSabotage)\n {\n if(!getCurrentRoom().isOperating() || !(getCurrentRoom() instanceof ItemRoom))\n {\n int sabotageExit = (int) Math.floor(Math.random() * getCurrentRoom().getCollectionOfExits().size());\n getCurrentRoom().getCollectionOfExits().get(sabotageExit).setOperating(false);\n Game.getInstance().getGameInfo().setHackedExit(getCurrentRoom().getCollectionOfExits().get(sabotageExit));\n ACTION_LOG.writeToLog(\"Sabotaged the exit between \\\"the \" + getCurrentRoom().getName() + \"\\\" and \\\"the \" + getCurrentRoom().getExit(getCurrentRoom().getCollectionOfExits().get(sabotageExit)).getName() + \"\\\".\");\n }\n else if(Game.getInstance().getGameInfo().getHackedExit() != null)\n {\n getCurrentRoom().setOperating(false);\n ACTION_LOG.writeToLog(\"Sabotaged the room: \\\"\" + getCurrentRoom().getName() + \"\\\".\");\n }\n else if(Math.random() < CHANCE_OF_DOOR_SABOTAGE)\n {\n int sabotageExit = (int) Math.floor(Math.random() * getCurrentRoom().getCollectionOfExits().size());\n getCurrentRoom().getCollectionOfExits().get(sabotageExit).setOperating(false);\n Game.getInstance().getGameInfo().setHackedExit(getCurrentRoom().getCollectionOfExits().get(sabotageExit));\n ACTION_LOG.writeToLog(\"Sabotaged the exit between \\\"the \" + getCurrentRoom().getName() + \"\\\" and \\\"the \" + getCurrentRoom().getExit(getCurrentRoom().getCollectionOfExits().get(sabotageExit)).getName() + \"\\\".\");\n }\n else\n {\n getCurrentRoom().setOperating(false);\n ACTION_LOG.writeToLog(\"Sabotaged the room: \\\"\" + getCurrentRoom().getName() + \"\\\".\");\n }\n \n chanceOfSabotage = DEFAULT_CHANCE_OF_SABOTAGE;\n }\n else\n {\n List<Exit> neighbors = getCurrentRoom().getCollectionOfExits();\n \n for(int i = neighbors.size() - 1; i >= 0; i--)\n if(getCurrentRoom().getExit(neighbors.get(i)).isControlRoom() || !neighbors.get(i).isOperating())\n neighbors.remove(i);\n \n if (neighbors.isEmpty())\n {\n ACTION_LOG.writeToLog(\"Saboteur tried to move, but all exits where removed. Current room: \\\"\" + getCurrentRoom().getName() + \"\\\".\");\n return -1;\n }\n \n int exitIndex = (int) (Math.floor(Math.random() * neighbors.size()));\n \n setRoom(getCurrentRoom().getExit(neighbors.get(exitIndex)));\n \n chanceOfSabotage += CHANCE_OF_SABOTAGE_GROWTH;\n \n //ACTION_LOG.writeToLog(\"Moved to \\\"the \" + getCurrentRoom().getName() + \"\\\".\");\n \n checkChasingPlayer();\n }\n }\n \n return(5 + (int) Math.floor(Math.random() * 6));\n }",
"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}",
"@Override\n\t public void actionPerformed(ActionEvent e) {\n\t\t isPlayerDead();\n\t\t isGameRunning();\n\n\t updatePlayer();\n\t updateCentipede();\n\t updateMissiles();\n\t\t updateMushrooms();\n\t updateSpider();\n\n\t checkCollisions();\n\t repaint();\n\t }",
"abstract public void performAction();",
"public void act() \n {\n if(s == 0)\n {\n lead();\n lookForFood();\n lookForEdge();\n lookForTail();\n }\n else\n {\n follow();\n }\n }",
"@Override\n\tpublic Map<Integer, Action> middleStep(StateView newstate,\n\t\t\tHistoryView statehistory) {\n\t\tMap<Integer, Action> actions = new HashMap<Integer, Action>();\n\t\t\n\t\t// This is a list of enemy units\n\t\tList<Integer> enemyUnitIDs = newstate.getUnitIds(enemyPlayerNum);\n\t\t\n\t\tList<Integer> myUnitIDs = newstate.getUnitIds(1);\n\t\t\n\t\tif(enemyUnitIDs.size() == 0) //Changed to accommodate unitIDs\n\t\t{\n\t\t\t// Nothing to do because there is no one left to attack\n\t\t\treturn actions;\n\t\t}\n\t\t\n\t\tint currentStep = newstate.getTurnNumber();\n\n\t\t// go through the action history\n\t\tfor(ActionResult feedback : statehistory.getCommandFeedback(playernum, currentStep-1).values())\n\t\t{\n\n\t\t\tint unitID = feedback.getAction().getUnitId();\n\t\t\tUnitView unitView = newstate.getUnit(unitID);\n\t\t\t\n\t\t\t// if the previous action is no longer in progress (either due to failure or completion)\n\t\t\tif(feedback.getFeedback() != ActionFeedback.INCOMPLETE)\n\t\t\t{\n\t\t\t\t//This moves the singular runner footman into the proper defense position.\n\t\t\t\tif (unitID == 8 && enemyUnitIDs.size() == 6) {\n\t\t\t\t\tactions.put(unitID, Action.createCompoundMove(unitID, 1, 17));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Once the runner is in the correct defense position, then the ballistas attack all enemy footmen.\n\t\t\t\tif (unitID == 8 && (unitView.getXPosition() == 1 && unitView.getYPosition() == 17)) {\n\t\t\t\t\t\n\t\t\t\t\tfor(int i = 0; i < enemyUnitIDs.size() - 1; i++) {\n\t\t\t\t\t\tactions.put(11, Action.createCompoundAttack(11, enemyUnitIDs.get(i)));\n\t\t\t\t\t\tactions.put(12, Action.createCompoundAttack(12, enemyUnitIDs.get(i)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (feedback.getAction().getType() == ActionType.COMPOUNDATTACK) {\n\t\t\t\t\t\n\t\t\t\t\t//If the last move was an attack and there are still enemy footmen on the board, attack the enemy footmen.\n\t\t\t\t\tif (enemyUnitIDs.size() != 1) {\n\t\t\t\t\t\tfor(int i = 0; i < enemyUnitIDs.size() - 1; i++) {\n\t\t\t\t\t\t\tactions.put(11, Action.createCompoundAttack(11, enemyUnitIDs.get(i)));\n\t\t\t\t\t\t\tactions.put(12, Action.createCompoundAttack(12, enemyUnitIDs.get(i)));\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\t\t\t\t\telse { //Otherwise, attack the enemy tower.\n\t\t\t\t\t\tactions.put(myUnitIDs.get(5), Action.createCompoundAttack(myUnitIDs.get(5), enemyUnitIDs.get(0)));\n\t\t\t\t\t\tactions.put(myUnitIDs.get(6), Action.createCompoundAttack(myUnitIDs.get(6), enemyUnitIDs.get(0)));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//If only the tower is left, move one of the archers out of the way, and let the ballistas reposition to attack said tower.\n\t\t\t\tif (enemyUnitIDs.size() == 1) {\n\t\t\t\t\t\n\t\t\t\t\tactions.put(myUnitIDs.get(4), Action.createCompoundMove(myUnitIDs.get(4), 24, 18));\n\t\t\t\t\tactions.put(myUnitIDs.get(5), Action.createCompoundAttack(myUnitIDs.get(5), enemyUnitIDs.get(0)));\n\t\t\t\t\tactions.put(myUnitIDs.get(6), Action.createCompoundAttack(myUnitIDs.get(6), enemyUnitIDs.get(0)));\n\t\t\t\t}\n\n\t\t\t} \n\t\t\t\n\t\t\t//If, by any chance, a unit is unable to reach his destination by the end of the turn, then tell him to move to that same position again.\n\t\t\tif(feedback.getFeedback() == ActionFeedback.FAILED && feedback.getAction().getType() == ActionType.COMPOUNDMOVE && enemyUnitIDs.size() != 1) {\n\t\t\t\t\n\t\t\t\tint[] unitXPosition = {1, 2, 2, 0, 2, 0, 1};\n\t\t\t\tint[] unitYPosition = {16, 17, 16, 16, 18, 17, 18};\n\t\t\t\t\n\t\t\t\tint unitPositionInList = myUnitIDs.indexOf(unitID);\n\t\t\t\tactions.put(unitID, Action.createCompoundMove(unitID, unitXPosition[unitPositionInList], unitYPosition[unitPositionInList]));\t\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\treturn actions;\n\t}",
"public void startOppTurn(GameState state) {\n }",
"public void action() {\r\n\t\tLCD.drawString(\"Avoid Behavior!\", 0, 7);\r\n\r\n\t\tMapUpdate.updateWithoutObject(0);\r\n\t\tMapUpdate.updateWithObject(StandardRobot.us.getRange());\r\n\r\n\t\tif (StandardRobot.ts.isPressed()) {\r\n\t\t\tStandardRobot.pilot.setTravelSpeed(7);\r\n\t\t\tStandardRobot.pilot.travel(-5);\r\n\t\t\tcounter.countTravel();\r\n\r\n\t\t\tif (store.getFlag() == 0) {\r\n\t\t\t\tStandardRobot.pilot.rotate(-90);\r\n\t\t\t\tcounter.countTurn();\r\n\t\t\t} else {\r\n\t\t\t\tStandardRobot.pilot.rotate(90);\r\n\t\t\t\tcounter.countTurn();\r\n\t\t\t}\r\n\t\t} else {\r\n\r\n\t\t\tif (store.getFlag() == 0) {\r\n\t\t\t\tStandardRobot.pilot.rotate(-90);\r\n\t\t\t\tcounter.countTurn();\r\n\t\t\t} else {\r\n\t\t\t\tStandardRobot.pilot.rotate(90);\r\n\t\t\t\tcounter.countTurn();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void act() \n {\n // Add your action code here.\n // get the Player's location\n if(!alive) return;\n \n int x = getX();\n int y = getY();\n \n // Move the Player. The setLocation() method will move the Player to the new\n // x and y coordinates.\n \n if( Greenfoot.isKeyDown(\"right\") ){\n setLocation(x+1, y);\n } else if( Greenfoot.isKeyDown(\"left\") ){\n setLocation(x-1, y);\n } else if( Greenfoot.isKeyDown(\"down\") ){\n setLocation(x, y+1);\n } else if( Greenfoot.isKeyDown(\"up\") ){\n setLocation(x, y-1);\n } \n \n removeTouching(Fruit.class);\n if(isTouching(Bomb.class)){\n alive = false;\n }\n \n }",
"public void execute(State state) {\n List possiblyRelevantObjectsList;\n //TODO machine learning - for now, no possibilities are relevant\n List relevantObjectsList = new ArrayList();\n state.setStateValue(relevantObjects, relevantObjectsList);\n }",
"state ask(state statea, state stateb) {\n\n //display options with the gamepad buttons to press\n telemetry.addData(\"A\", statea.name);\n telemetry.addData(\"B\", stateb.name);\n //show what was already added\n displayStates();\n telemetry.update();\n\n //check to make sure it is still in init\n while (!isStopRequested() && !opModeIsActive()) {\n if (gamepad1.a) {\n //loop while held to avoid double press\n while (gamepad1.a)\n idle();\n //return state to add to runList\n return statea;\n } else if (gamepad1.b) {\n //loop while held to avoid double press\n while (gamepad1.b)\n idle();\n //return state to add to runList\n return stateb;\n }\n }\n\n //return state if program was stopped to allow a quick restart\n return statea;\n }",
"@Override\n public void executeAction(Game game) {\n game.tryPlaceBomb(this.player.getId());\n game.tryDoMove(this.player.getId(), this.direction);\n }",
"public void actionPerformed(ActionEvent e) {\n keyCheck();\n LevelIntermissionCount++;\n \n if (LevelIntermissionCount > 50 && LevelIntermission == true && checkGameOver() == false) {\n LevelIntermission = false;\n LevelIntermissionCount = 0;\n reset();\n }\n if (startMenu == false && LevelIntermission == false && checkGameOver() == false){\n respawnShip();\n SwitchCount++;\n /*\n * calling functions that update all the positions of objects\n */\n UpdateShip();\n UpdateRock();\n UpdateBigRock();\n UpdateTrackerRock();\n UpdateBossRock();\n UpdateBullets();\n UpdateEnergyBlaster();\n UpdateGrenades();\n UpdateDebris();\n UpdateGrenadeBullets();\n\n checkDestruction();\n checkGernadeExplosion();\n checkCollisions();\n bossMinions();\n checkBossHP();\n checkWin();\n }\n }",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\trepaint();\n\n\t\tif (currentState == MENU_STATE) {\n\t\t\tupdateMenuState();\n\t\t} else if (currentState == GAME_STATE) {\n\t\t\tupdateGameState();\n\t\t} else if (currentState == END_STATE) {\n\t\t\tupdateEndState();\n\t\t}\n\n\t}",
"public void execute() {\r\n\t\tif(policy.moveByPolicy(level2d))\r\n\t\titem.move_up(level2d);\r\n\t\telse\r\n\t\t\tSystem.out.println(\"cant do the action\");\r\n\t\t\r\n\t}",
"public void playGame() throws Exception\n\t{\n\t\tallPlayersDataInput().playGame();\n\t\t\n\t\tgetCurrentPlayer().execBeginOfTurn();\n\t\tinitBeginOfTurn();\n\t\t\n\t\tankhMorporkUI.setVisible(true);\n\t\tThread.sleep(50); // 50ms for the UI to show up\n\t\t\t\n\t\twhile(!isEndGame)\n\t\t{\n\t\t\tPlayer currentPlayer = getCurrentPlayer();\n\t\t\tList<Object> possibleActionsList = new ArrayList<Object>();\n\t\t\tList<Card> unusableCardList = new ArrayList<Card>();\n\t\t\tif(!actionListToExecute.isEmpty())\n\t\t\t{\n\t\t\t\tpossibleActionsList.add(actionListToExecute.get(0));\n\t\t\t}\n\t\t\tfor(Card card : currentPlayer.getCityAreaCardDeck())\n\t\t\t{\n\t\t\t\tif(card.isActive() && card.canExecute(this) && card.isEnabled())\n\t\t\t\t{\n\t\t\t\t\tpossibleActionsList.add(card);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(Card card : currentPlayer.getPlayerCardDeck())\n\t\t\t{\n\t\t\t\tif(card.canBeExecutedTurnBase(canPlayPlayerCard) && card.canExecute(this) && card.isEnabled())\n\t\t\t\t{\n\t\t\t\t\tpossibleActionsList.add(card);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tunusableCardList.add(card);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(possibleActionsList.isEmpty())\n\t\t\t{\n\t\t\t\tnextTurn();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(unusableCardList.size() > 0)\n\t\t\t\t{\n\t\t\t\t\tthis.getSystemDataInput().printMessage(this.getCurrentPlayer().toString() + \": - Unusable player card:\");\n\t\t\t\t\tfor(Card card : unusableCardList)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.getSystemDataInput().printMessage(this.getCurrentPlayer().toString() + \": - \" + card.toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(this.showSaveGame)\n\t\t\t\t{\n\t\t\t\t\tthis.showSaveGame = false;\n\t\t\t\t\tpossibleActionsList.add(new SaveGame());\n\t\t\t\t}\n\t\t\t\tpossibleActionsList.add(new ShowGameStatus());\n\t\t\t\tif(!canPlayPlayerCard && actionListToExecute.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tpossibleActionsList.add(new NextPlayerTurn());\n\t\t\t\t}\n\t\t\t\tObject selection = currentPlayer.getDataInput().askPlayAction(possibleActionsList);\n\t\t\t\tif(selection == null)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\texecuteCardAction(selection);\n\t\t\t}\n\t\t}\n\t}",
"public void tryAct() {\n\n List<Player> onCardPlayers = new ArrayList<Player>();\n List<Player> offCardPlayers = new ArrayList<Player>();\n if (currentPlayer.isEmployed() == true) {\n if(!currentPlayer.getHasPlayed()){\n onCardPlayers = findPlayers(currentPlayer.getLocation().getOnCardRoles());\n offCardPlayers = findPlayers(currentPlayer.getLocation().getOffCardRoles());\n currentPlayer.act(onCardPlayers, offCardPlayers);\n refreshPlayerPanel();\n }\n else{\n view.showPopUp(currentPlayer.isComputer(), \"You've already moved, rehearsed or acted this turn. Try a different command or click `end turn` to end your turn.\");\n }\n }\n else {\n view.showPopUp(currentPlayer.isComputer(), \"You're not employed, so you need to take a role before you can act.\");\n }\n view.updateSidePanel(playerArray);\n }",
"@Override\r\n\tpublic void doAction(MedcivGame game) {\n\t\ttry {\r\n\t\t\t((Livestock)game.matchingVillager(ownerId).getItemById(targetId)).setTendedToThisTurn(true);\r\n\t\t}catch(NullPointerException e) {\r\n\t\t\t//do nothing; the cow is dead, or you are\r\n\t\t}\r\n\t}",
"@Override\n\tpublic State doAction(State state) {\n\t\tPoint oldPoint = state.findCell(Keys.MOUSE);\n\t\tPoint newPoint = new Point(oldPoint.x+this.x,oldPoint.y+this.y);\n\t\tState newState = new State(state);\n\t\tnewState.setMode(Keys.IN_PROGRESS);\n\t\tif (newState.cellExists(newPoint.x, newPoint.y) && newState.getCell(newPoint.x, newPoint.y) != -1 && newState.getCell(newPoint.x, newPoint.y) != Keys.WALL) {\n\t\t\tnewState.setCell(oldPoint.x,oldPoint.y , Keys.EMPTY);\n\t\t\t\n\t\t\tif(this.x == 0 ^ this.y == 0)\n\t\t\t\tnewState.setScore(state.getScore()+10);\n\t\t\t\n\t\t\telse if(this.x != 0 && this.y != 0){\n\t\t\t\tnewState.setScore(state.getScore()+15);\n\t\t\t}\n\t\t\t\n\t\t\tif(newPoint.equals(state.findCell(Keys.CHEESE))) {\n\t\t\t\tnewState.setCell(newPoint.x, newPoint.y, Keys.MOUSE_AND_CHEESE);\n\t\t\t} else\n\t\t\t\tnewState.setCell(newPoint.x, newPoint.y, Keys.MOUSE);\n\t\t\t\n\t\t}\n\t\treturn newState;\n\t}",
"public Types.ACTIONS act(StateObservation stateObs, ElapsedCpuTimer elapsedTimer) {\n\n try {\n Thread.sleep(500);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n if (step == 0) {\n dfs(stateObs);\n }\n return actions.get(step++);\n }",
"public void stateChange() {\n\t\tif (Qclicks > 3 && mini == GameState.questions) {\n\t\t\t/*\n\t\t\t * This makes all of the buttons disappear except for the continue\n\t\t\t * button\n\t\t\t */\n\t\t\tstage.clear();\n\t\t\tstage.addActor(next);\n\t\t}\n\t\tif (Gdx.input.justTouched()) {\n\t\t\tif (mini == GameState.start) {\n\t\t\t\tint x = Gdx.input.getX();\n\t\t\t\tint y = Gdx.input.getY();\n\t\t\t\tscore = 0;\n\t\t\t\tclicks = 0;\n\t\t\t\tQclicks = 0;\n\t\t\t\t// font.setScale(0.25f);\n\t\t\t\tif(x > 240 && x < 445 && y > 322 && y < 350){\n\t\t\t\t\tmini = GameState.questions;\n\t\t\t\t}\n\t\t\t} else if (mini == GameState.score) {\n\t\t\t\tint numc = (int) (percentCorrect * (numTries * 4)) + score;\n\t\t\t\tnumTries++;\n\t\t\t\tpercentCorrect = ((float) numc) / ((float) (numTries * 4));\n\t\t\t\tif (score >= 3) {\n\t\t\t\t\tnumSuccess++;\n\t\t\t\t}\n\t\t\t\tif (needToReview.size() == 0) {\n\t\t\t\t\tendGame();\n\t\t\t\t}\n\t\t\t\tmini = GameState.review;\n\t\t\t} else if (mini == GameState.review) {\n\t\t\t\treviewNum++;\n\t\t\t\tif (needToReview.size() == reviewNum) {\n\t\t\t\t\tendGame();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}",
"public void act() \n {\n move(3);\n turnAtEdge(); \n StrikeSeaHorse();\n }",
"public void act(){\n\t\tTile[] possibleMoves = game.getAllNeighbours(currentPosition);\r\n\t\tTile targetTile = possibleMoves[rng.nextInt(4)];\r\n\t\tmove(targetTile);\r\n\t}",
"private void executeActions (Action action, Player joueur) {\n WarPlayer player = this.castPlayer(joueur);\n super.roundSteps(action, player, player.getFood());\n this.transformResources(player);\n this.feedArmies(player);\n }",
"ProgramState execute(ProgramState state) ;",
"public boolean makeMove(GameState gameState);",
"@Override\n public void stateAction(SmartBartender smartBartenderContext) {\n LOGGER.info(\"Ready for use! Waiting for user input\");\n if (this.nextState == null) {\n this.nextState = new CleaningState();\n } else {\n this.nextState = new ShutdownState();\n }\n this.nextState(smartBartenderContext);\n\n }",
"public void act() {\n\t\tif (canMove()) {\n\t\t\tif (isOnBase()) {\n\t\t\t\tif (steps < baseSteps) {\n\t\t\t\t\tmove();\n\t\t\t\t\tsteps++;\n\t\t\t\t} else {\n\t\t\t\t\tturn();\n\t\t\t\t\tturn();\n\t\t\t\t\tturn();\n\t\t\t\t\tsteps = 0;\n\t\t\t\t}\n\t\t\t} else if (steps == baseSteps / 2) {\n\t\t\t\tturn();\n\t\t\t\tturn();\n\t\t\t\tsteps++;\n\t\t\t} else if (steps == baseSteps + 1) {\n\t\t\t\tturn();\n\t\t\t\tturn();\n\t\t\t\tturn();\n\t\t\t\tsteps = 0;\n\t\t\t} else {\n\t\t\t\tmove();\n\t\t\t\tsteps++;\n\t\t\t}\n\t\t} else {\n\t\t\tturn();\n\t\t\tturn();\n\t\t\tturn();\n\t\t\tsteps = 0;\n\t\t}\n\t}",
"public void execute(Stateful stateful) {\r\n // TODO Auto-generated method stub\r\n action.execute(stateful, param);\r\n }",
"public abstract void applyAction(Action.ActionType type, TileObject actioneer, World world);",
"protected void execute() {\n\t\ttimer.start();\n\t\t\n\t\tif(switchSide) {\n\t\t\tswitch(state) {\n\t\t\tcase 0:\n\t\t\t\tdriveToSwitch.start();\n\t\t\t\tstate++;\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tif(!driveToSwitch.isRunning()) {\n\t\t\t\t\tturnTowardsSwitchOrScale.start();\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstate++;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tif(!turnTowardsSwitchOrScale.isRunning() || timer.get() > 1.5) {\n\t\t\t\t\tturnTowardsSwitchOrScale.cancel();\n\t\t\t\t\tapproachSwitch.start();\n\t\t\t\t\tstate++;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tif(!approachSwitch.isRunning()) {\n\t\t\t\t\t//launchCubeSwitch.start();\n\t\t\t\t\tstate++;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Unexpected state in RightScaleOrSwitch.java State: \" + state);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telse if(scaleSide) {\n\t\t\tswitch(state) {\n\t\t\tcase 0:\n\t\t\t\tdriveToScale.start();\n\t\t\t\tstate++;\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tif(!driveToScale.isRunning()) {\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tturnTowardsSwitchOrScale.start();\n\t\t\t\t\tstate++;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tif(!turnTowardsSwitchOrScale.isRunning() || timer.get() > 1.5) {\n\t\t\t\t\tturnTowardsSwitchOrScale.cancel();\n\t\t\t\t\tapproachScale.start();\n\t\t\t\t\tstate++;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tif(!approachScale.isRunning()) {\n\t\t\t\t\t//launchCubeScale.start();\n\t\t\t\t\tstate++;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Unexpected state in RightScaleOrSwitch.java State: \" + state);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tcrossLine.start();\n\t\t}\n\t}",
"@Override\n\tpublic void performActions() throws IOException\n\t{\n\t\tSystem.out.println(\"these are the moviegoer actions\");\n\t\tboolean loggedIn = true;\n\t\twhile(loggedIn)\n\t\t{\n\t\t\tSystem.out.println(\"\\n=========== MovieGoer MENU ===========\");\n\t\t\tSystem.out.println(\"1: Rate a movie\");\n\t\t\tSystem.out.println(\"2: Display available movies in all Cineplexes\");\n\t\t\tSystem.out.println(\"3: Book a movie\");\n\t\t\tSystem.out.println(\"4: Retrieve booking history\");\n\t\t\tSystem.out.println(\"5: List movies ordered by sold tickets\");\n\t\t\tSystem.out.println(\"6: List movies by ratings\");\n\t\t\tSystem.out.println(\"8: Logout\");\n\t\t\tSystem.out.println(\"\\n=============================================\");\n\n\n\t\t\t\n\t\t\tint actionChoice = UserInputs.getValidIntegerInput();\n\t\t\t\n\t\t\tswitch(actionChoice)\n\t\t\t{\n\t\t\t\tcase 1:\n\t\t\t\t\tgiveRating();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tpage.listMovies();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tthis.bookMovie();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tBooking.retrieveHistory(userLogedIn.getUsername());\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tpage.listTicketOrderMovies();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tpage.listRatingOrderMovies();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 8:\n\t\t\t\t\tloggedIn = false;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"Please enter one of the valid options\");\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic void doAction(String action) {\n\t\tthis.action = action;\n\t\t\n\t\tthis.gameController.pause();\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\n\t\tif(arg0.getSource() == buttons.get(0)) // if attack's button is pressed\n\t\t{\n\t\t\taction = 1;\n\t\t\tg.fight(mode, action, characters); // then attack\n\t\t\t\n\t\t}\n\t\tif(arg0.getSource() == buttons.get(1)) // if defense's button is pressed\n\t\t{\n\t\t\taction = 2;\n\t\t\tg.fight(mode, action, characters); // defense\n\t\t\t\n\t\t}\n\t\tif(arg0.getSource() == buttons.get(2)) // if special's button is pressed\n\t\t{\n\t\t\taction = 3;\n\t\t\tg.fight(mode, action, characters); // special move\n\t\t\t\n\t\t}\n\t\telse{}\n\t\trepaint();\n\t}",
"@Override\r\n\tpublic void checkState(int delay) {\n\t\tAddAction(new DiceCheckGameStateAction(delay));\r\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(e.getSource()==btn_pause) {\n\t\t\n\t\t\tgamePause();\n\t\t}\n\t\tif(e.getSource()==btn_continue) {\n\t\t\tgameContinue();\n\t\t}\n\t\tif(e.getSource()==btn_restart) {\n\t\t\tgameResTart();\n\t\t}\n\t\tif(e.getSource()==btn_rank) {\n\t\t\tgameRank();\n\t\t}\n\t\tif(e.getSource()==btn_admin) {\n\t\t\tgameAdmin();\n\t\t}\n\t\t\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\tif(currentState == MENU){\n\t\t\t updateMenuState();\n\t\t\t \n\t\t\t}else if(currentState == GAME){\n\t\t\t updateGameState();\n\t\t\t \n\t\t\t}else if(currentState == END){\n\t\t\t updateEndState();\n\t\t\t}\n\t\trepaint();\n\t\t}",
"@Override public void doAction(int option)\n {\n switch(option)\n {\n case 1: // create and start a new game\n // display the Game menu\n startNewGame();\n break;\n case 2: // get and start a saved game\n startSavedGame();\n break;\n case 3: // get help menu\n //runs the help menu\n HelpMenuView hmv = new HelpMenuView();\n hmv.displayMenu();\n break;\n case 4: // save game\n displaySaveGameView();\n break;\n case 5:\n System.out.println(\"Thanks for playing ... goodbye.\");\n break; // Fix Invalid Value. \n }\n }",
"public void doAction(SpaceWars game){\r\n\t\t\r\n\t\tsuper.doAction(game);\r\n\t\taccelerate();\r\n\t\tfire(game);\r\n\t}",
"@Override\n // Could call like runGame in here? Then show new game state?\n public void actionPerformed(ActionEvent e) {\n\n if (e.getSource() == move1.buttonObj) {\n move1.buttonObj.setText(\"The button has been clicked\");\n }\n\n }",
"abstract void showGameState();",
"public void act() {\n\t\tMouseInfo mouseinfo = Greenfoot.getMouseInfo();\n\n\t\t/* To-be properties of MouseState */\n\t\tboolean held = lastState.held;\n\t\tboolean down = false;\n\t\tboolean up = false;\n\t\tboolean moved;\n\t\tVector position;\n\n\t\tif (mouseinfo != null) {\n\t\t\t/* Get the new mouse position */\n\t\t\tposition = new Vector(mouseinfo.getX(), mouseinfo.getY());\n\t\t\t/* We have moved if there is a difference between this mouse position and\n\t\t\t * the previous mouse position. */\n\t\t\tmoved = lastState.position == null || position.subtract(lastState.position).length() > 0.5;\n\n\t\t} else {\n\t\t\t/* mouseinfo == null */\n\n\t\t\t/* Use the previous mouse position */\n\t\t\tposition = lastState.position;\n\t\t\t/* We haven't moved the mouse pointer. */\n\t\t\tmoved = false;\n\t\t}\n\n\t\tif (lastState.held) {\n\t\t\t/* Figure out if the mouse has been released. This has to be done\n\t\t\t * differently on Mac OS X, as MouseInfo contains different info in case\n\t\t\t * of mouse release on that platform. */\n\t\t\tif (System.getProperty(\"os.name\").equals(\"Mac OS X\")) {\n\t\t\t\tif (Greenfoot.mouseClicked(null) || mouseinfo != null && (mouseinfo.getActor() != concerning || mouseinfo.getButton() != 1)) {\n\t\t\t\t\tup = true;\n\t\t\t\t\theld = false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t/* TODO: Check if this behaves correctly in Windows */\n\t\t\t\tif (Greenfoot.mouseClicked(concerning) || mouseinfo != null && (mouseinfo.getActor() != concerning || mouseinfo.getButton() != 0)) {\n\t\t\t\t\tup = true;\n\t\t\t\t\theld = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\t/* !lastState.held */\n\n\t\t\t/* Figure out if mouse has been pressed. This is thankfully\n\t\t\t * cross-platform consistent. */\n\t\t\tif (Greenfoot.mousePressed(concerning)) {\n\t\t\t\tdown = true;\n\t\t\t\theld = true;\n\t\t\t}\n\t\t}\n\n\t\t/* Store the state in the lastState property. */\n\t\tlastState = new MouseState(held, down, up, moved, position);\n\t}",
"public void action(){\n turn.sendMsg(turn.getController().getTurnOwner().getName()+\"'s turn!\");\n if(turn.getPlayer().isDown()){\n turn.setPhase(new RecoveryPhase());\n }else {\n turn.setPhase(new StarsPhase());\n }\n }",
"private GameState doMove(Move move, Player player, GameState state) {\n\t\tGameState newState = state.deepClone();\n\t\tplayer = Main.getSWController().getPlayerController().getPlayer(player.getName(), newState);\n\t\tswitch (move.getAction()) {\n\t\tcase OLYMPIA:\n\t\tcase BUILD:\n\t\t\tplayer.getHand().remove(move.getCard());\n\t\t\tplayer.getBoard().addCard(move.getCard());\n\t\t\tplayer.setChooseCard(null);\n\t\t\tif (move.getCard().getEffects() != null)\n\t\t\t\tfor (Effect effect : move.getCard().getEffects())\n\t\t\t\t\tif (effect.getType() == EffectType.WHEN_PLAYED)\n\t\t\t\t\t\teffect.run(player, newState, newState.isTwoPlayers());\n\t\t\tif (move.getTradeOption() != null)\n\t\t\t\tMain.getSWController().getPlayerController().doTrade(newState, player, move.getTradeOption());\n\t\t\tbreak;\n\t\tcase PLACE_SLOT:\n\t\t\tplayer.getHand().remove(move.getCard());\n\t\t\tswitch (player.getBoard().nextSlot()) {\n\t\t\tcase 0:\n\t\t\t\tplayer.getBoard().slot1();\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tplayer.getBoard().slot2();\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tplayer.getBoard().slot3();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tplayer.getBoard().fill(player.getBoard().nextSlot());\n\t\t\tplayer.setChooseCard(null);\n\t\t\tif (move.getTradeOption() != null)\n\t\t\t\tMain.getSWController().getPlayerController().doTrade(newState, player, move.getTradeOption());\n\t\t\tbreak;\n\t\tcase SELL:\n\t\t\tplayer.getHand().remove(move.getCard());\n\t\t\tplayer.addCoins(3);\n\t\t\tplayer.setChooseCard(null);\n\t\t}\n\n\t\treturn newState;\n\t}",
"private void processInput() \n\t{\n\t\tif (keys.get(Keys.RIGHT))\n\t\t{\n\t\t\tworld.getHunter().move_right();\n\t\t}\n\t\t\n\t\tif (keys.get(Keys.UP))\n\t\t{\n\t\t\tworld.getHunter().move_up();\n\t\t}\n\t\t\n\t\tif (keys.get(Keys.LEFT))\n\t\t{\n\t\t\tworld.getHunter().move_left();\n\t\t}\n\t\t\n\t\tif (keys.get(Keys.DOWN))\n\t\t{\n\t\t\tworld.getHunter().move_down();\n\t\t}\n\t\t\n\t\tif (keys.get(Keys.STEALTH))\n\t\t{\n\t\t\tworld.getHunter().setNoisiness(false);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tworld.getHunter().setNoisiness(true);\n\t\t}\n\t\t\n\t\tif (keys.get(Keys.RELOAD))\n\t\t{\n\t\t\tworld.getHunter().do_reload();\n\t\t}\n\t\t\n\t\tif (keys.get(Keys.FIRE))\n\t\t{\n\t\t\tworld.getHunter().do_fire();\n\t\t}\n\t}",
"public void tick() {\n\t\t//If Statement to make sure this section of the code only runs once using the runOnce variable\n\t\tif(runOnce==1) {\n\t\t\t//Set the game state for street fighter to menu\n\t\t\tGame.gameState=STATE.MENU;\n\t\t\t//Instantiante Game class object\n\t\t\tgame = new Game();\n\t\t\trunOnce=2;\n\t\t} \n\t\t\n\t\t//If Statement to make sure this section of the code only runs once using the runOnce variable\n\t\tif(runOnce==2) {\n\t\t\t//Call the game class tick method\n\t\t\tgame.tick();\n\t\t}\n\t\t\n\t\t\n\t\t//Checks if the user quit the game\n\t\tif(KeyInput.quit==true) {\n\t\t\t//Call the resetVariables method to reset all the important variables \n\t\t\tgame.resetVariables();\n\t\t\trunOnce=1;\n\t\t\t\n\t\t\t//Set the game state to the arcade menu state\n\t\t\tState.setState(handler.getGame().startingState);\n\t\t}\n\t}",
"protected abstract int evaluate(GameState state, String playername);",
"public void onClick(View v) {\n\n switch (v.getId()) {\n\n case R.id.battleText:\n\n if(mPager.getCurrentItem() == 0) {\n\n if(!battleOver) {\n\n gameMaster.advance();\n\n //new CallBackendTask(CallBackendTask.START_BATTLERESULTS, this).execute(\"http://91.155.202.223:7500/api/battleresult\", Guser.getToken());\n\n } else {\n\n Intent intent = new Intent(this, MainActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\n finish();\n startActivity(intent);\n overridePendingTransition(0,0);\n }\n\n } else {\n\n pushText(\"Select an action to use before advancing the turn...\");\n }\n\n return;\n\n case R.id.eslot1:\n\n if(mPager.getCurrentItem() != 0) {\n\n setSelectedTarget(1);\n }\n else\n return;\n\n break;\n\n case R.id.eslot2:\n\n if(mPager.getCurrentItem() != 0) {\n\n setSelectedTarget(2);\n }\n else\n return;\n\n break;\n\n case R.id.eslot3:\n\n if(mPager.getCurrentItem() != 0) {\n\n setSelectedTarget(3);\n }\n else\n return;\n\n break;\n\n case R.id.eslot4:\n\n if(mPager.getCurrentItem() != 0) {\n\n setSelectedTarget(4);\n }\n else\n return;\n\n break;\n\n default:\n\n return;\n }\n\n if(gameMaster.getTargets(gameMaster.getP(selectedSlot).getSelectedAction()) == 1)\n\n highlightEnemy(gameMaster.getSelectedTarget(selectedSlot), true);\n\n else {\n\n highlightEnemy(1, false);\n highlightEnemy(2, false);\n highlightEnemy(3, false);\n highlightEnemy(4, false);\n }\n }",
"public abstract Action takeTurn();",
"public void doPerform() {\n int noAct = 0;\n float[] curTable = myIal.getPlaceTable(0, 0, 0);\n \n while(checkNotDone()) {\n if(noAct > 3)\n return;\n\n myIal.wait(150);\n //Do an IAL action *****************************************************************************************************************\n if(myIal.lookBlock(myIal.locx, myIal.locy, myIal.locz).equals(\"air\")) { //Assess current location and change state accordingly\n myIal.myState = Agent.State.PLACE;\n } else {\n myIal.myState = Agent.State.MOVE;\n }\n\n if(myIal.myState == Agent.State.PLACE) {\n curTable = myIal.getPlaceTable(myIal.locx, myIal.locy, myIal.locz);\n noAct = 0;\n }\n else if(myIal.myState == Agent.State.MOVE) {\n curTable = myIal.getMoveTable(myIal.locx, myIal.locy, myIal.locz);\n noAct++;\n }\n \n myIal.doAction(getMaxIndex(curTable));\n //System.out.println(\"IAL action done\");\n\n my2Ial.wait(150);\n //Do a 2IAL action *****************************************************************************************************************\n if(my2Ial.lookBlock(my2Ial.locx, my2Ial.locy, my2Ial.locz) == \"air\") { //Assess current location and change state accordingly\n my2Ial.myState = Agent.State.PLACE;\n } else {\n my2Ial.myState = Agent.State.MOVE;\n }\n //System.out.println(\"ysysy\");\n if(my2Ial.myState == Agent.State.PLACE) {\n \n curTable = my2Ial.getPlaceTable(my2Ial.locx, my2Ial.locy, my2Ial.locz);\n noAct = 0;\n }\n else if(my2Ial.myState == Agent.State.MOVE) {\n curTable = my2Ial.getMoveTable(my2Ial.locx, my2Ial.locy, my2Ial.locz);\n noAct++;\n }\n \n my2Ial.doAction(getMaxIndex(curTable));\n //System.out.println(\"JAL action done\");\n }\n\n System.out.println(\"Building is done :)\");\n }",
"void update() {\n if (gameState.states > 1)\n move();\n }",
"@Override\n public void action() {\n while (turn.getPlayer().getFightDecision() == null){\n ;\n }\n FightDecision decision = turn.getPlayer().getFightDecision();\n if (decision== FightDecision.IGNORE){\n turn.getPlayer().setFightDecision(null);\n turn.setPhase(new MovePhase(y));\n }else{\n turn.getPlayer().setFightDecision(null);\n turn.setPhase(new FightPhase());\n }\n }",
"public void ExecuteAction()\n {\n ActionTarget oTarget = mVecTargets.get( 0 );\n\n // Check if attack lands: compute chance of hitting the target\n if ( RandomGenerator.GetInstance().GetRandom( 1, 100 ) <=\n mSourceUnit.GetHitChance( oTarget.mCell.GetUnit() ) )\n {\n // Get the attack information from the attacking unit\n double dFinalDamage = Math.max(\n 1,\n mSourceUnit.GetUnit().GetResultingAttributes().GetStrength() -\n oTarget.mCell.GetUnit().GetUnit().GetResultingAttributes().GetPhysicalDef() );\n\n // Check critical chance\n if ( RandomGenerator.GetInstance().GetRandom( 1, 100 ) <=\n mSourceUnit.GetCritChance() )\n {\n dFinalDamage *= 1.5;\n oTarget.mActionStatus = ActionStatus.STATUS_CRITICAL;\n }\n else\n {\n oTarget.mActionStatus = ActionStatus.STATUS_SUCCESS;\n }\n\n // Add random portion to damage (10% of base damage)\n dFinalDamage = RandomGenerator.GetInstance().GetRandom(\n dFinalDamage - ( dFinalDamage / 10 ),\n dFinalDamage + ( dFinalDamage / 10 ) );\n mDamage = oTarget.mCell.GetUnit().ApplyDamage( dFinalDamage );\n\n // Add Slow status to target\n oTarget.mCell.GetUnit().SetStatus( new UnitStatusSlow(\n SLOW_TURN_DURATION,\n oTarget.mCell.GetUnit(),\n SLOW_PERCENTAGE ) );\n\n }\n else\n {\n mDamage = 0;\n oTarget.mActionStatus = ActionStatus.STATUS_MISS;\n }\n\n NotifyActionUpdate();\n ResetAttackArray();\n mSourceUnit.SetActionPerformed();\n }"
] | [
"0.697225",
"0.67569876",
"0.66942656",
"0.6558598",
"0.65477645",
"0.64916825",
"0.64373493",
"0.6432124",
"0.6405235",
"0.6371804",
"0.636099",
"0.6359997",
"0.63555104",
"0.6325263",
"0.62994707",
"0.62992233",
"0.62634766",
"0.62501633",
"0.62294394",
"0.62288076",
"0.6220424",
"0.6196622",
"0.6196196",
"0.61868536",
"0.6174517",
"0.61488116",
"0.6139352",
"0.6103156",
"0.6097628",
"0.60922766",
"0.60817295",
"0.6078804",
"0.60634243",
"0.6062488",
"0.60612184",
"0.6057262",
"0.6043236",
"0.6025094",
"0.601897",
"0.6011409",
"0.6010048",
"0.59949994",
"0.5992427",
"0.5990863",
"0.5982338",
"0.5965379",
"0.5965001",
"0.59518427",
"0.59490585",
"0.59451735",
"0.59321755",
"0.59097165",
"0.58847797",
"0.5877934",
"0.5873407",
"0.5861187",
"0.58593285",
"0.5843207",
"0.5817704",
"0.5806799",
"0.5805868",
"0.580579",
"0.58057123",
"0.5794768",
"0.5791755",
"0.5791495",
"0.57826996",
"0.5777407",
"0.5774882",
"0.57736045",
"0.57711345",
"0.57620317",
"0.576011",
"0.5752391",
"0.5742829",
"0.5740898",
"0.5740465",
"0.5739464",
"0.57366806",
"0.5736245",
"0.5736156",
"0.5733678",
"0.5730915",
"0.57265854",
"0.5725967",
"0.5724832",
"0.5724127",
"0.57224554",
"0.571691",
"0.57163644",
"0.5707334",
"0.57055116",
"0.57017195",
"0.5697066",
"0.5696717",
"0.56967086",
"0.5693088",
"0.5692154",
"0.56914914",
"0.5680188",
"0.5679682"
] | 0.0 | -1 |
Something went wrong e.g. connection timeout or firewall problems | @Override
public void onFailure(IMqttToken asyncActionToken, Throwable exception) {
Toast.makeText(TesteMqtt.this, "ERRO", Toast.LENGTH_SHORT).show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\tSC.say(\"服务器连接已中断,请重新登录!\");\n\t\t\t}",
"protected void onConnectionError() {\n\t}",
"public void onConnectionError()\n\t\t{\n\t\t}",
"@Override\n public void connectionLost(Throwable thrwbl) {\n System.out.println(\"服务器的连接丢失\");\n }",
"@Override\n\t\t\tpublic void onNetworkError() {\n\n\t\t\t}",
"void connectFailed();",
"@Override\n public void onFailure(@NonNull Exception e) {\n Discoverer.this.eventListener.trigger(EVENT_LOG, \"Fail to request connection: \" + e.getMessage());\n }",
"private void connectionFailed() {\n // Send a failure message back to the Activity\n Message msg = handler.obtainMessage(SdlRouterService.MESSAGE_LOG);\n Bundle bundle = new Bundle();\n bundle.putString(LOG, \"Unable to connect device\");\n msg.setData(bundle);\n handler.sendMessage(msg);\n\n // Start the service over to restart listening mode\n // BluetoothSerialServer.this.start();\n }",
"@Override\n\t\t\t\t\tpublic void onConnectionFailed(Robot arg0) {\n\n\t\t\t\t\t}",
"@Override\n public void onConnectionFailed(ConnectionResult result) {\n }",
"@Override\r\n public void connectFailed() {\n super.connectFailed();\r\n Commons.showToast(act, \"连接失败\");\r\n act.dismissLoadDialog();\r\n }",
"@Override\n public void onFailure(int i) {\n System.out.println(\"pca connect: Failed to connect = \" + i);\n }",
"@Override\n\tpublic void onConnectionFailed(ConnectionResult arg0) {\n\t\t// TODO Auto-generated method stub\n\n\t}",
"@Override\n public void onConnectFailed()\n {\n Log.e(\"Dudu_SDK\",\n \"获取NS 业务服务器失败...onConnectFailed ... reconnect()...5 seconds later ...\");\n reconnect();\n if (connectCallBack != null)\n connectCallBack.onConnectFailed();\n }",
"@Override\n public void onConnectionFailed(ConnectionResult result) {\n // An unresolvable error has occurred and a connection to Google APIs\n // could not be established. Display an error message, or handle\n // the failure silently\n }",
"@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n return;\n }",
"@Override\n\tpublic void onConnectionFailed(ConnectionResult arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void onConnectionFailed(ConnectionResult arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void onConnectionFailed(ConnectionResult arg0) {\n\n\t}",
"@Override\n public void onFailure(Call<String> call, Throwable t) {\n if (t instanceof SocketTimeoutException) {\n Toast.makeText(activity, R.string.connection_timeout, Toast.LENGTH_SHORT).show();\n }\n }",
"void onConnectToNetByIPFailure();",
"@Override\r\n\t\t\t\t\t\t\tpublic void onFail(String msg) {\n\t\t\t\t\t\t\t\tToast.makeText(PhotoImagePagerActivity.this, \"服务器错误\", Toast.LENGTH_SHORT).show();\r\n\t\t\t\t\t\t\t}",
"@Override\n\tpublic void onNetWorkError() {\n\t\t\n\t}",
"public void testConnecitonFails() {\n\t\ttry {\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tConnection c = new Connection(\"localhost\", 4444, this, this);\n\t\t\t// this connection should fail... wait for that:\n\t\t\tfor (int i=0; i<10; i++) {\n\t\t\t\t// if we have a result before our max-wait-time, break\n\t\t\t\tif (connectionStatus != null)\n\t\t\t\t\tbreak;\n\t\t\t\tThread.sleep(500);\n\t\t\t}\n\t\t\t\n\t\t\tassertTrue(connectionStatus != null && connectionStatus.booleanValue() == false);\n\t\t} catch (Exception e) {\n\t\t\tassertTrue(\"should not get an exception\", false);\n\t\t}\n\t}",
"@Override\n public void onConnectionFailed(ConnectionResult result) {\n }",
"@Override\n\t\t\tpublic void connectionLost(Throwable throwable) {\n\t\t\t\tSystem.out.println(\"connectionLost\");\n\t\t\t}",
"@Override\n public void onFailure(Call<Void> call, Throwable t)\n {\n Log.e(TAG, \"FAIL = \" + call.toString());\n t.printStackTrace();\n Toast.makeText(getApplicationContext(), \"Check your network connection\", Toast.LENGTH_LONG).show();\n }",
"@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.i(\"Feelknit\", \"Connection failed: ConnectionResult.getErrorCode() = \" + result.getErrorCode());\n }",
"@Override\n public void connectionLost(Throwable cause) {\n Log.d(TAG, \"Connection lost\");\n }",
"@Override\n public void connectionLost(Throwable cause) {\n }",
"@Override\r\n\tpublic void connectionLost(Throwable cause) {\n\t\t\r\n\t}",
"@Override\n public void onConnectionFailed(ConnectionResult conRes) {}",
"@Override\n \tpublic void reconnectionFailed(Exception arg0) {\n \t}",
"@Override\n public void onConnectionFailed(ConnectionResult arg0) {\n }",
"@Override\n\tpublic void onConnectionFailed(ConnectionResult arg0) {\n\t\tToast.makeText(context, \"Connection Failed\", Toast.LENGTH_SHORT).show();\n\t}",
"@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.i(TAG, \"Connection failed. Error: \" + result.getErrorCode());\n }",
"@Override\n public void onConnectionFailed(@NonNull ConnectionResult result) {\n Fog.i(TAG, \"Connection failed: ConnectionResult.getErrorCode() = \"\n + result.getErrorCode());\n }",
"@Override\n\t\t\tpublic void onNetworkError(Request request, IOException e) {\n\n\t\t\t}",
"@Override\n\t\t\t\tpublic void onNetworkError(Request request, IOException e) {\n\t\t\t\t\t\n\t\t\t\t}",
"private void showConnectionError() {\n String couldNotConnect = Localization.lang(\"Could not connect to the update server.\");\n String tryLater = Localization.lang(\"Please try again later and/or check your network connection.\");\n if (manualExecution) {\n JOptionPane.showMessageDialog(this.mainFrame, couldNotConnect + \"\\n\" + tryLater,\n couldNotConnect, JOptionPane.ERROR_MESSAGE);\n }\n this.mainFrame.output(couldNotConnect + \" \" + tryLater);\n }",
"@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n Log.d(LCAT, \"onConnectionFailed:\" + connectionResult);\n }",
"@Override\n public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {\n Log.d(\"recon\", \"error \" + statusCode + \" \" + throwable);\n\n Toast.makeText(getApplicationContext(), \"Error: \" + statusCode + \" Verify your Internet Connection is stable or working.\", Toast.LENGTH_LONG).show();\n }",
"@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n }",
"private void connectionFailed() {\n if (debugging)\n Log.d(TAG, \"connection Failed\");\n setState(EBluetoothStates.DISCONNECTED);\n if (mConnectionManager != null) {\n mConnectionManager.closeSocket();\n }\n }",
"public void OnConnectionError();",
"@Override\n public void connectionLost(Throwable cause) {\n\n }",
"@Override\n public void connectionLost(Throwable t) {\n System.out.println(\"Connection lost!\");\n }",
"@Override\n public void onFailure(Call<String> call, Throwable t) {\n /*dismiss the dialog*/\n Util.dissmisDialog(dialog);\n /*handle network error and notify the user*/\n if (t instanceof SocketTimeoutException) {\n Toast.makeText(activity, R.string.connection_timeout, Toast.LENGTH_SHORT).show();\n }\n\n }",
"public static ConnectorException handleConnectionError(Throwable error) {\r\n ConnectorException ce = null;\r\n if (error instanceof UnknownHostException || error instanceof ConnectException || error instanceof NoRouteToHostException) {\r\n ce = new ConnectorException(\"Unable to connect to backend\", error); //$NON-NLS-1$\r\n ce.setStatusCode(502); // BAD GATEWAY\r\n } else if (error instanceof InterruptedIOException || error instanceof java.util.concurrent.TimeoutException) {\r\n ce = new ConnectorException(\"Connection to backend terminated. \" + error.getMessage(), error); //$NON-NLS-1$\r\n ce.setStatusCode(504); // GATEWAY TIMEOUT\r\n\r\n }\r\n if (ce != null) {\r\n return ce;\r\n } else {\r\n return new ConnectorException(error.getMessage(), error);\r\n }\r\n }",
"@Override\n\tpublic void connectionFailed(String message) {\n\t\tToast.makeText(this, \"Connection Failed !\", Toast.LENGTH_SHORT).show();\n\t}",
"@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n Toast.makeText(this,\n \"Could not connect to Google API Client: Error \" + connectionResult.getErrorCode(),\n Toast.LENGTH_SHORT).show();\n }",
"@Override\r\n\tpublic void connectionLost(Throwable t) {\n\t}",
"@Override\r\n public void onFailure(@NotNull Call call, @NotNull IOException e) {\r\n Log.e(TAG, \"internet error\");\r\n Log.e(TAG, e.getMessage());\r\n }",
"private void sendConnectorProblems(HttpRequest request,\n\t\t\tHttpResponse response, Exception e) {\n\t\tresponse.clearContent();\n\t\tresponse.setStatus( HttpResponse.STATUS_NOT_ACCEPTABLE );\n\t\tresponse.setContentType( \"text/plain\" );\n\t\tresponse.println ( \"The invocation parameters could not be read!\" );\n\t\tresponse.println ( \"Exception-Message: \" + e.getMessage() );\n\t\tconnector.logError(\"Request coding exception in invocation request \" + request.getPath());\n\t}",
"@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.d(\"SCXTT\", \" onConnectionFailed \" + result.toString());\n\n }",
"@Override\n public void onConnectionFailed(ConnectionResult arg0) {\n\n }",
"@Override\n\t\t\t\t\t\tpublic void onFailure(int arg0, Header[] arg1,\n\t\t\t\t\t\t\t\tbyte[] arg2, Throwable arg3) {\n\t\t\t\t\t\t\tToast.makeText(ChangeUserResumeActivity.this,\n\t\t\t\t\t\t\t\t\t\"网络连接失败,请检测网络!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t}",
"@Override\n\tpublic void connectionLost(Throwable cause) {\n\t\t\n\t}",
"@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.i(TAG, \"Connection failed: ConnectionResult.getErrorCode() = \" + result.getErrorCode());\n }",
"public void alertConnectionError(){\n\t\tthis.alert(\"ERROR\",\"Server Connection Error\\nTo adjust server settings go to:\\nGame->Settings\",AlertType.ERROR);\n\t}",
"@Override\n\t\t\tpublic void onFailure(int arg0, Header[] arg1, byte[] arg2,\n\t\t\t\t\tThrowable arg3) {\n\t\t\t\tToast.makeText(MyApplication.getContext(), \"网络通讯错误\",\n\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t}",
"@Override\r\n\t\t\tpublic void onNetworkError(NetworkError networkError) {\n\r\n\t\t\t}",
"@Override\n public void onConnectionFailed(ConnectionResult result) {\n\n }",
"protected abstract void showConnectError();",
"public void socketError(Exception arg0) {\n\t\t\r\n\t}",
"@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.i(TAG, \"Connection failed: ConnectionResult.getErrorCode() = \" + result.getErrorCode());\n }",
"@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.i(TAG, \"Connection failed: ConnectionResult.getErrorCode() = \" + result.getErrorCode());\n }",
"@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.i(TAG, \"Connection failed: ConnectionResult.getErrorCode() = \" + result.getErrorCode());\n }",
"@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.e(TAG, \"Connection failed: ConnectionResult.getErrorCode() = \" + result.getErrorCode());\n }",
"@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.i(TAG, \"Connection failed: ConnectionResult.getErrorCode() = \"\n + result.getErrorCode());\n }",
"private void handleDownloadFailure(){\n Toast.makeText(this,\n \"Could not establish connection to service.\\n\" +\n \"Please check your internet connection and \\n\" +\n \"make sure internet permissions are granted.\",\n Toast.LENGTH_LONG\n ).show();\n }",
"@Override\n\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\t\t\t\tif(progressDialog!=null)progressDialog.dismiss();\n\t\t\t\tshowShortToast(\"获取失败,请检查网络连接\");\n\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void onConnectTimeoutException(String msg) {\n\t\t\t\t\t\tUToast.showConnectTimeoutToast(getActivity());\r\n\t\t\t\t\t\tstopLoadMoreAndRefresh();\r\n\t\t\t\t\t}",
"@Override\r\n public void onConnectionFailed(ConnectionResult result) {\n Log.i(\"onConnectionFailed \", \"Connection failed: ConnectionResult.getErrorCode() = \" + result.getErrorCode());\r\n }",
"@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n }",
"@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n }",
"@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n }",
"protected void serverError() throws IOException {\n cleanup();\n throw new IOException(\"Recieved error message from server:\\n\" + new String(_text_buffer));\n }",
"@Override\n\tpublic void onConnectionFailed(ConnectionResult connectionResult) {\n\t\tLog.e(TAG, \"onConnectionFailed: ConnectionResult.getErrorCode() = \"\n\t\t\t\t+ connectionResult.getErrorCode());\n\t\t// TODO(Developer): Check error code and notify the user of error state and resolution.\n\t\tToast.makeText(this,\n\t\t\t\t\"Could not connect to Google API Client: Error \" + connectionResult.getErrorCode(),\n\t\t\t\tToast.LENGTH_SHORT).show();\n\n\t}",
"@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult)\n {\n swipeRefreshLayout.setVisibility(View.GONE);\n showError(R.drawable.ic_location_disabled_black,\n R.string.error_message_update_google_play_services,\n R.string.fix_error_no_fix);\n }",
"@Override\n public void onFailure(Call<VehicleDetailModel> call, Throwable t) {\n Toast.makeText(getApplicationContext(), \"Network issue\", Toast.LENGTH_SHORT).show();\n }",
"@Override\r\n\tpublic void onErrorGetVerifyCode(Exception exception) {\n\t\tif (exception.getCause() instanceof ConnectTimeoutException) {\r\n\t\t\tSystem.out.println(\"ConnectionTimeoutException\");\r\n\t\t}\r\n\t\tif (exception instanceof ResourceAccessException) {\r\n\t\t\tSystem.out.println(\"ResourceAccessException\");\r\n\t\t}\r\n\t\tdisplayShortMsg(\"网络连接出错\");\r\n\t\tenableYzBtnHandler.sendEmptyMessageDelayed(1, 1500);\r\n\t}",
"private void signalError() {\n Connection connection = connectionRef.get();\n if (connection != null && connection.isDefunct()) {\n Host host = cluster.metadata.getHost(connection.address);\n // Host might be null in the case the host has been removed, but it means this has\n // been reported already so it's fine.\n if (host != null) {\n cluster.signalConnectionFailure(host, connection.lastException());\n return;\n }\n }\n\n // If the connection is not defunct, or the host has left, just reconnect manually\n reconnect();\n }",
"@Override\n public void connectionLost(Throwable arg0) {\n\n }",
"@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n Log.e(TAG, \"onConnectionFailed: ConnectionResult.getErrorCode() = \" + connectionResult.getErrorCode());\n }",
"@Override\n\tpublic void onConnectionFailed(ConnectionResult result) {\n\t\tLog.d(\"ANDROID\", \"faild contected\");\n\t}",
"@Override\n public void onConnectionFailed(@NonNull ConnectionResult result) {\n }",
"@Override\n\t\t\t\t\tpublic void onErrorResponse(VolleyError arg0) {\n\t\t\t\t\t\tToast.makeText(GetPersonalInfoActivity.this, \"网络连接异常!\",\n\t\t\t\t\t\t\t\t1000).show();\n\t\t\t\t\t}",
"@Override public void onConnectionFailed(ConnectionResult connectionResult) {\n }",
"@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.i(\"Connection failed:\", \" ConnectionResult.getErrorCode() = \"\n + result.getErrorCode());\n }",
"@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n\n }",
"public String formTimeout()\r\n {\r\n return formError(\"503 Gateway timeout\",\"The connection timed out\");\r\n }",
"@Test\n public void testConnectToInvalidService()\n throws IOException\n {\n final boolean availability = ConnectionChecker.checkServiceAvailability(\"localhost\", 65534, 3000);\n\n assertFalse(availability);\n }",
"@Override\n protected void onFailureComponentConnectionRequest(PlatformComponentProfile remoteParticipant) {\n System.out.println(\"************ Crypto Addresses -> FAILURE CONNECTION.\");\n checkFailedDeliveryTime(remoteParticipant.getIdentityPublicKey());\n }",
"@Override\n public void onFailure(Call<Item> call, Throwable t)\n {\n Log.e(TAG, \"FAIL = \" + call.toString());\n Log.e(TAG, \"message \" + t.getLocalizedMessage());\n t.printStackTrace();\n Toast.makeText(getApplicationContext(), \"Check your network connection\", Toast.LENGTH_LONG).show();\n }",
"@Override\n\t\t\t\t\t\tpublic void onFailure(int arg0, Header[] arg1,\n\t\t\t\t\t\t\t\tbyte[] arg2, Throwable arg3) {\n\t\t\t\t\t\t\tToast.makeText(ChangeUserResumeActivity.this,\n\t\t\t\t\t\t\t\t\t\"网络连接失败,请检测网络!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\tpd.dismiss();\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\tpublic void HttpFail(int ErrCode) {\n\n\t\t\t\t\t\t\t}",
"public void connectionLost(Throwable cause) {\n\t}",
"@Override\n public void onErrorResponse(VolleyError error) {\n if (ConstantsDefined.isOnline(AllSectionsSummary.this)) {\n //Do nothing..\n Toast.makeText(AllSectionsSummary.this, \"Couldn't connect..Please try again..\", Toast.LENGTH_LONG).show();\n } else {\n Toast.makeText(AllSectionsSummary.this, \"Sorry! No internet connection\", Toast.LENGTH_SHORT).show();\n }\n }",
"public ConfigurationServerFailureException() {\n\t\tsuper();\n\t}",
"@Override\n\t\t\t\t\t\tpublic void failed() {\n\t\t\t\t\t\t\tSystem.out.println(\"下载失败\");\n\t\t\t\t\t\t}"
] | [
"0.7053674",
"0.6950883",
"0.6944978",
"0.6814548",
"0.6775823",
"0.6726047",
"0.6655834",
"0.66306865",
"0.65048355",
"0.6428909",
"0.6425276",
"0.64199686",
"0.6414024",
"0.6403037",
"0.63989985",
"0.6376857",
"0.63732743",
"0.63732743",
"0.63602227",
"0.63545495",
"0.6354029",
"0.6347935",
"0.6303331",
"0.62957793",
"0.6281002",
"0.6270189",
"0.62649834",
"0.6244471",
"0.62430423",
"0.6231216",
"0.62307334",
"0.62265974",
"0.6220083",
"0.6218847",
"0.6215468",
"0.6210823",
"0.6196901",
"0.6173535",
"0.6170187",
"0.6170085",
"0.6162223",
"0.6151714",
"0.6144301",
"0.6142622",
"0.6133316",
"0.6124761",
"0.6123345",
"0.61205906",
"0.61171556",
"0.6102226",
"0.6098834",
"0.6097765",
"0.60920733",
"0.6078742",
"0.6060241",
"0.6059514",
"0.6056401",
"0.6055331",
"0.60552436",
"0.60540426",
"0.6053567",
"0.60499585",
"0.60488266",
"0.6047551",
"0.6047546",
"0.6046692",
"0.6046692",
"0.6046692",
"0.603488",
"0.60333514",
"0.6032422",
"0.6030657",
"0.6016525",
"0.60116184",
"0.601115",
"0.601115",
"0.601115",
"0.60064805",
"0.60038567",
"0.5999769",
"0.598292",
"0.59655166",
"0.59640896",
"0.5962795",
"0.5962147",
"0.5940913",
"0.5936065",
"0.5932282",
"0.59280723",
"0.5922885",
"0.5917874",
"0.59127474",
"0.5889666",
"0.58889824",
"0.587641",
"0.5874677",
"0.5866219",
"0.58550096",
"0.58469814",
"0.58455485",
"0.5845387"
] | 0.0 | -1 |
Return whether the provided query trees are considered equivalent. | public static boolean isEqual(JexlNode first, JexlNode second) {
return checkEquality(first, second).isEqual();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isEquals(BinaryTree<T> tree){\n //if both are empty, are equals\n if(this.isEmpty() && tree.isEmpty()){\n return true;\n \n //if this is empty (and the other not, because don't get the if before)\n //is false\n }else if(this.isEmpty()){\n return false;\n \n //if the content of both nodes are equals...\n }else if(this.content.equals(tree.content)){\n //check recursively their childs\n if(this.left.isEquals(tree.left) \n && this.right.isEquals(tree.right)){\n return false;\n }else{\n return true;\n }\n \n //if not one of the before ifs, aren't equals \n }else{\n return false;\n }\n }",
"@Override\n public boolean isEqual(Query e1, Query e2) {\n //Devuelve siempre falso, en una lista no puede haber dos querys iguales\n return this.compare(e1,e2) == this.EQUAL;\n }",
"public boolean equals(Object obj) {\n // Quick same object test\n if(this == obj) {\n return true;\n }\n\n // Quick fail tests\n if(!(obj instanceof SetQuery)) {\n return false;\n }\n\n SetQuery other = (SetQuery) obj;\n\n return getOperation() == other.getOperation() &&\n EquivalenceUtil.areEqual(this.isAll(), other.isAll()) &&\n EquivalenceUtil.areEqual(this.leftQuery, other.leftQuery) &&\n EquivalenceUtil.areEqual(this.rightQuery, other.rightQuery) &&\n EquivalenceUtil.areEqual(getOrderBy(), other.getOrderBy()) &&\n EquivalenceUtil.areEqual(getLimit(), other.getLimit()) &&\n EquivalenceUtil.areEqual(getWith(), other.getWith()) &&\n sameOptionAndHint(other);\n }",
"private final static boolean equivalent(Automaton automaton,\n\t\t\tBinaryMatrix equivs, Automaton.Set ic, Automaton.Set jc) {\n\t\tint ic_size = ic.size();\n\t\tint jc_size = jc.size();\n\n\t\t// NOTE: the size of two equivalent sets may differ at this stage. This\n\t\t// is because we may two states which are identical and which will\n\t\t// subsequently reduced to a state. Thus, the current size of a set may\n\t\t// not be its final size.\n\n\t\tint[] ic_children = ic.children;\n\t\tint[] jc_children = jc.children;\n\n\t\t// First, check every node in s1 has equivalent in s2\n\t\tfor (int k = 0; k != ic_size; ++k) {\n\t\t\tint ic_child = ic_children[k];\n\t\t\tboolean matched = false;\n\t\t\tfor (int l = 0; l != jc_size; ++l) {\n\t\t\t\tint jc_child = jc_children[l];\n\t\t\t\tif (ic_child == jc_child\n\t\t\t\t\t\t|| (ic_child >= 0 && jc_child >= 0 && equivs.get(\n\t\t\t\t\t\t\t\tic_child, jc_child))) {\n\t\t\t\t\tmatched = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!matched) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Second, check every node in s2 has equivalent in s1\n\t\tfor (int k = 0; k != jc_size; ++k) {\n\t\t\tint jc_child = jc_children[k];\n\t\t\tboolean matched = false;\n\t\t\tfor (int l = 0; l != ic_size; ++l) {\n\t\t\t\tint ic_child = ic_children[l];\n\t\t\t\tif (ic_child == jc_child\n\t\t\t\t\t\t|| (ic_child >= 0 && jc_child >= 0 && equivs.get(\n\t\t\t\t\t\t\t\tic_child, jc_child))) {\n\t\t\t\t\tmatched = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!matched) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"private static boolean isSameTree(Node currentT1Node, Node currentT2Node) {\n\t\tif (currentT1Node != null && currentT2Node != null) {\n\t\t\tboolean isLeftSame = isSameTree(currentT1Node.leftChild, currentT2Node.leftChild);\n\t\t\tboolean isRightSame = isSameTree(currentT1Node.rightChild, currentT2Node.rightChild);\n\n\t\t\t// If either is false it means that the trees differ so we return immediately\n\t\t\tif (!isLeftSame || !isRightSame) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// Otherwise we compare the nodes in the current value.\n\t\t\tif (currentT1Node.value == currentT2Node.value) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\t// If one current Tn node is null and the other isn't then the trees are not the same.\n\t\tif ((currentT1Node == null && currentT2Node != null) || (currentT1Node != null && currentT2Node == null)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true; // We have hit the bottom of both trees, both T1 and T2 are null therefore it still matches.\n\t}",
"boolean hasIsEquivalent();",
"private final static boolean equivalent(Automaton automaton,\n\t\t\tBinaryMatrix equivs, Automaton.List il, Automaton.List jl) {\n\t\tint il_size = il.size();\n\t\tint jl_size = jl.size();\n\t\tif (il_size != jl_size) {\n\t\t\t// List have different sizes, so cannot be equivalent.\n\t\t\treturn false;\n\t\t} else {\n\t\t\t// Lists have the same size, so check each child is equivalent in\n\t\t\t// sequence\n\t\t\tint[] il_children = il.children;\n\t\t\tint[] jl_children = jl.children;\n\t\t\tfor (int k = 0; k != il_size; ++k) {\n\t\t\t\tint il_child = il_children[k];\n\t\t\t\tint jl_child = jl_children[k];\n\t\t\t\tif (il_child < 0 || jl_child < 0) {\n\t\t\t\t\t// In this case, one or both of the child states are\n\t\t\t\t\t// virtual. Thus, we cannot look them up in the equivs\n\t\t\t\t\t// relation, and must compare directly (which is safe).\n\t\t\t\t\tif (il_child != jl_child) {\n\t\t\t\t\t\t// Children are not equivalent so fail\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} else if (!equivs.get(il_child, jl_child)) {\n\t\t\t\t\t// Children are not equivalent so fail\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// All children must have been equivalent\n\t\t\treturn true;\n\t\t}\n\t}",
"private final static boolean equivalent(Automaton automaton,\n\t\t\tBinaryMatrix equivs, Automaton.Bag b1, Automaton.Bag b2) {\n\t\tint b1_size = b1.size();\n\t\tint b2_size = b2.size();\n\n\t\tif (b1_size != b2_size) {\n\t\t\t// Observe that, unlike a set, the size of a bag will never be\n\t\t\t// changed by the identification of equivalent states. Therefore,\n\t\t\t// the size of both collection must be identical, otherwise they can\n\t\t\t// never be equivalent.\n\t\t\treturn false;\n\t\t}\n\n\t\tint[] b1_children = b1.children;\n\t\tint[] b2_children = b2.children;\n\t\t// maps vertices in b2 to those they are matched against in b1\n\t\tint[] matches = new int[b1_size];\n\t\tArrays.fill(matches, -1);\n\t\t// Used to ensure no vertex is explored more than once during\n\t\t// reconfiguration.\n\t\tboolean[] visited = new boolean[b1_size];\n\t\t\n\t\t// For every state in s1\n\t\tfor (int i = 0; i != b1_size; ++i) {\n\t\t\tint b1_child = b1_children[i];\n\t\t\tif(b1_child < 0) {\n\t\t\t\t// In this case, we have to do something different.\n\t\t\t\tif(!findNegativeMatch(i,b1_children,b2_children,equivs,matches)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tArrays.fill(visited,false);\n\t\t\t\tif(!findMatch(i,b1_children,b2_children,equivs,matches,visited)) {\n\t\t\t\t\t// If we can't find a match, then it's game over and we know for\n\t\t\t\t\t// sure these two states are not equivalent.\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"static boolean areSame(String expr1, String expr2)\n\t{\n\n\t\t// Create a vector for all operands and\n\t\t// initialize the vector as 0.\n\t\tint[] v = new int[MAX_CHAR];\n\n\t\t// Put signs of all operands in expr1\n\t\teval(expr1, v, true);\n\n\t\t// Subtract signs of operands in expr2\n\t\teval(expr2, v, false);\n\n\t\t// If expressions are same, vector must\n\t\t// be 0.\n\t\tfor (int i = 0; i < MAX_CHAR; i++)\n\t\t\tif (v[i] != 0)\n\t\t\t\treturn false;\n\n\t\treturn true;\n\t}",
"public boolean isSameOVsameEntity() {\r\n\t\t\tList<TempTableHeader> leaves = this.getParents(); // leaves of boolean expression evaluation tree\r\n\t\t\t\r\n\t\t\t// prepare a set with names of OVs declared in current if-clause, \r\n\t\t\t// We'll use it later in order to check whether the OVs in leaf.getCurrentEntityAndArguments() matches with the ones declared in current if-clause\r\n\t\t\t// TODO migrate this set to somewhere else so that we don't have to instantiate the same set several times\r\n\t\t\tCollection<String> varSetNamesInCurrentIfClause = new ArrayList<String>();\t// Note: we may use HashSet if we expect many OVs declared in a single if-clause\t\r\n\t\t\t// Note: at this point, getVarsetname() is a string representing the ovs declared in this if-clause, and the ovs are separated by getSSBNNode().getStrongOVSeparator()\r\n\t\t\tfor (String ovName : getVarsetname().split(\"\\\\\" + getSSBNNode().getStrongOVSeparator())) {\r\n\t\t\t\tvarSetNamesInCurrentIfClause.add(ovName);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfor (TempTableHeader leaf : leaves) {\r\n\t\t\t\tif (leaf.isKnownValue()) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tList<OVInstance> args = leaf.getCurrentEntityAndArguments().arguments;\r\n\t\t\t\tif (args.isEmpty()) {\r\n\t\t\t\t\t// ignore nodes with no arguments\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// at least 1 OV in arguments shall be declared in the varset field of this if-clause, or else current combination of values of parents must be ignored\r\n\t\t\t\tboolean isAtLeast1OVDeclaredInVarsetname = false;\r\n\t\t\t\t\r\n\t\t\t\t// first, test if leaf has same arguments as its ssbnnode (if ssbnnode has same arguments as parents)\r\n\t\t\t\tfor (OVInstance argParent : args) {\r\n\t\t\t\t\t// check condition to activate the flag (i.e. to change content of isAllOVsDeclaredInVarsetname)\r\n\t\t\t\t\t// check if the ov of this argument was declared in the varsetname field of current if-clause\r\n\t\t\t\t\tif (varSetNamesInCurrentIfClause.contains(argParent.getOv().getName())) {\r\n\t\t\t\t\t\tisAtLeast1OVDeclaredInVarsetname = true;\t// we found at least 1 OV, so turn the flag on\r\n\t\t\t\t\t} else if (!argParent.getOv().getValueType().hasOrder() // we don't need to consider weak ovs\r\n\t\t\t\t\t\t\t\t&& isExactMatchStrongOV()) {\r\n\t\t\t\t\t\t// we can immediately return if compiler requires exact match of strong ovs\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// if it has same OV as ssbnnode, then should be the same entity\r\n\t\t\t\t\tfor (OVInstance argChild : this.currentSSBNNode.getArguments()) {\r\n\t\t\t\t\t\tif (argChild.getOv().getName().equalsIgnoreCase(argParent.getOv().getName())) {\r\n\t\t\t\t\t\t\tif (!argChild.getEntity().getInstanceName().equalsIgnoreCase(argParent.getEntity().getInstanceName())) {\r\n\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (!isAtLeast1OVDeclaredInVarsetname) {\r\n\t\t\t\t\t// current value of parents was not declared in the varsetname field of current if-clause, so we should not consider it.\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfor (int i = leaves.indexOf(leaf) + 1; i < leaves.size(); i++) {\r\n\t\t\t\t\t// try all other leaves\r\n\t\t\t\t\tfor (OVInstance argleaf : args) {\r\n\t\t\t\t\t\tif (leaves.get(i).isKnownValue()) {\r\n\t\t\t\t\t\t\t// if current leaf has a known value (i.e. it is allways evaluating false), then\r\n\t\t\t\t\t\t\t// it is not necessary to test OVInstance's name-value consistency\r\n\t\t\t\t\t\t\t// (we don't have to check if OVs with same name has same value, since\r\n\t\t\t\t\t\t\t// at evaluation time their values are not going to be used at all)\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tfor (OVInstance argothers : leaves.get(i).getCurrentEntityAndArguments().arguments) {\r\n\t\t\t\t\t\t\tif(argleaf.getOv().getName().equalsIgnoreCase(argothers.getOv().getName())) {\r\n\t\t\t\t\t\t\t\tif (!argleaf.getEntity().getInstanceName().equalsIgnoreCase(argothers.getEntity().getInstanceName()) ) {\r\n\t\t\t\t\t\t\t\t\t// if they are the same OV but different instances of Entities... then false\r\n\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}",
"private static boolean areLeafsEquivalent(JavaTree leftNode, JavaTree rightNode) {\n if (leftNode instanceof IdentifierTree) {\n return Objects.equal(((IdentifierTree) leftNode).name(), ((IdentifierTree) rightNode).name());\n } else if (leftNode instanceof PrimitiveTypeTree) {\n return Objects.equal(((PrimitiveTypeTree) leftNode).keyword().text(), ((PrimitiveTypeTree) rightNode)\n .keyword().text());\n } else if (leftNode instanceof SyntaxToken) {\n return Objects.equal(((SyntaxToken) leftNode).text(), ((SyntaxToken) rightNode).text());\n } else if (leftNode.is(Tree.Kind.INFERED_TYPE)) {\n return rightNode.is(Tree.Kind.INFERED_TYPE);\n } else {\n throw new IllegalArgumentException();\n }\n }",
"public static boolean areSimilar(Node n1, Node n2) {\n boolean flag=true;\n int n=n1.children.size();\n if(n!=n2.children.size())\n return false;\n for(int i=0;i<n;i++)\n {\n flag=flag && areSimilar(n1.children.get(i),n2.children.get(i));\n if(flag==false)\n break;\n }\n return flag;\n }",
"public static boolean isEqual(BinaryTree tree1, BinaryTree tree2) {\n\n if (tree1 == null) {\n return (tree2 == null);\n }\n if (tree2 == null) {\n return false;\n }\n if (tree1.rootData == tree2.rootData) {\n return isEqual(tree1.leftTree, tree2.leftTree) && isEqual(tree1.rightTree, tree2.rightTree);\n }\n return false;\n }",
"public final static boolean equivalent(Automaton automaton,\n\t\t\tBinaryMatrix equivs, int i, int j) {\n\t\tAutomaton.State is = automaton.get(i);\n\t\tAutomaton.State js = automaton.get(j);\n\n\t\tif (is == null || js == null) {\n\t\t\treturn false;\n\t\t} else if (is.kind != js.kind) {\n\t\t\treturn false;\n\t\t}\n\n\t\tswitch (is.kind) {\n\t\tcase Automaton.K_VOID: {\n\t\t\treturn true;\n\t\t}\n\t\tcase Automaton.K_BOOL:\n\t\tcase Automaton.K_INT:\n\t\tcase Automaton.K_REAL:\n\t\tcase Automaton.K_STRING: {\n\t\t\tAutomaton.Constant<?> ic = (Automaton.Constant<?>) is;\n\t\t\tAutomaton.Constant<?> jc = (Automaton.Constant<?>) js;\n\t\t\treturn ic.value.equals(jc.value);\n\t\t}\n\n\t\tcase Automaton.K_LIST: {\n\t\t\tAutomaton.List il = (Automaton.List) is;\n\t\t\tAutomaton.List jl = (Automaton.List) js;\n\t\t\treturn equivalent(automaton, equivs, il, jl);\n\t\t}\n\t\tcase Automaton.K_SET: {\n\t\t\tAutomaton.Set il = (Automaton.Set) is;\n\t\t\tAutomaton.Set jl = (Automaton.Set) js;\n\t\t\treturn equivalent(automaton, equivs, il, jl);\n\t\t}\n\t\tcase Automaton.K_BAG: {\n\t\t\tAutomaton.Bag il = (Automaton.Bag) is;\n\t\t\tAutomaton.Bag jl = (Automaton.Bag) js;\n\t\t\treturn equivalent(automaton, equivs, il, jl);\n\t\t}\n\t\tdefault: {\n\t\t\t// All other kinds of state must be terms.\n\t\t\tAutomaton.Term it = (Automaton.Term) is;\n\t\t\tAutomaton.Term jt = (Automaton.Term) js;\n\t\t\tint it_contents = it.contents;\n\t\t\tint jt_contents = jt.contents;\n\t\t\tif (it_contents < 0 || jt_contents < 0) {\n\t\t\t\treturn it_contents == jt_contents;\n\t\t\t} else {\n\t\t\t\treturn equivs.get(it_contents, jt_contents);\n\t\t\t}\n\t\t}\n\t\t}\n\t}",
"private boolean isThereEquivalenceBetweenNorms(Norm norm1, Norm norm2) {\n\t\tboolean conflictContext = contextChecker(norm1, norm2);\n\t\tif (!conflictContext) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// returns true if the if the entities are the same OR one is ALL\n\t\tboolean conflictEntity = entityChecker(norm1, norm2);\n\t\tif (!conflictEntity) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// returns true if there is not conflict between activation and deactivation constraint\n\t\tboolean conflictConstraint = constraintChecker(norm1, norm2);\n\t\tif (!conflictConstraint) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// returns true if the action are the same\n\t\tboolean conflictAction = actionChecker(norm1, norm2);\n\t\tif (!conflictAction) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// at this moment all conditions are valid and the norms are in conflict\n\t\treturn true;\n\t}",
"public static boolean areSimilar(Node n1, Node n2) {\r\n \r\n //If any condition where children sizes are not same it means shape is not similar so return false\r\n if(n1.children.size() != n2.children.size()){\r\n return false;\r\n }\r\n \r\n boolean res = true;\r\n //To traverse on both trees we use loop in below form, children size are similar if we come here\r\n //so we can use any one for loop traversal length either n1 or n2.\r\n for(int i=0; i<n1.children.size(); i++){\r\n Node child1 = n1.children.get(i);\r\n Node child2 = n2.children.get(i);\r\n \r\n res = areSimilar(child1, child2);\r\n \r\n //if even once a false is encountered it means no further calculation required so return from here\r\n if(res == false){\r\n return false;\r\n }\r\n }\r\n return res;\r\n }",
"public boolean equal(Tree T) {\n if(T.count() != count()) {\n return false;\n } else {\n return equalNodes(root,T.root);\n }\n }",
"@Override\n\tdefault boolean equivalentTo(Tree otherTree) {\n\t\tif (this == otherTree)\n\t\t\treturn true;\n\t\t\n\t\tif (otherTree == null || this.getKind() != otherTree.getKind() || this.hashCode() != otherTree.hashCode())\n\t\t\treturn false;\n\t\t\n\t\t\n\t\tCatchTree other = (CatchTree) otherTree;\n\t\t\n\t\tif (!Tree.equivalentTo(this.getBlock(), other.getBlock()))\n\t\t\treturn false;\n\t\t\n\t\tif (!Tree.equivalentTo(this.getParameter(), other.getParameter()))\n\t\t\treturn false;\n\t\t\n\t\tif (!Tree.equivalentTo(this.getType(), other.getType()))\n\t\t\treturn false;\n\t\t\n\t\treturn true;\n\t}",
"boolean hasSameAs();",
"public static boolean isEqualSet(Collection set1, Collection set2) {\n/* 99 */ if (set1 == set2) {\n/* 100 */ return true;\n/* */ }\n/* 102 */ if (set1 == null || set2 == null || set1.size() != set2.size()) {\n/* 103 */ return false;\n/* */ }\n/* */ \n/* 106 */ return set1.containsAll(set2);\n/* */ }",
"private boolean equalNodes(Node[] arr1, Node[] arr2) {\n // generic tests\n if (!Arrays.equals(arr1, arr2)) {\n return false;\n }\n\n if ((arr1 == null) || (arr1.length == 0)) {\n return true;\n }\n\n // compare paths from each node to root\n int i = 0;\n\n while ((i < arr1.length) && Arrays.equals(NodeOp.createPath(arr1[i], null), NodeOp.createPath(arr2[i], null))) {\n i++;\n }\n\n return i == arr1.length;\n }",
"public boolean percolates() {\n return unionFind.connected(topRoot, bottomRoot);\n }",
"public boolean equivalent(Tradeoff trade)\r\n\t{\r\n\t\tboolean eq = false;\r\n\t\tif ((trade.getOnt1().toString().equals(ont1.toString())) &&\r\n\t\t\t\t(trade.getOnt2().toString().equals(ont2.toString())))\r\n\t\t\teq = true;\r\n\t\telse if ((trade.getOnt1().toString().equals(ont2.toString())) &&\r\n\t\t\t\t(trade.getOnt2().toString().equals(ont1.toString())))\r\n\t\t\teq = true;\r\n\t\treturn eq;\r\n\t}",
"boolean distinct(Node qNode) {\n switch (type()) {\n\n case UNION:\n //case OPTION:\n boolean success = false;\n for (Exp ee : this) {\n success = ee.distinct(qNode) || success;\n }\n if (success) {\n return true;\n }\n break;\n\n case AND:\n case BGP:\n case GRAPH:\n\n for (int i = 0; i < size(); i++) {\n Exp exp = get(i);\n switch (exp.type()) {\n case EDGE:\n case PATH:\n case XPATH:\n case EVAL:\n //Edge edge = exp.getEdge();\n if (exp.contains(qNode)) {\n add(i + 1, Exp.create(ACCEPT, qNode));\n return true;\n }\n break;\n\n case AND:\n case GRAPH:\n case UNION:\n //case OPTION:\n if (exp.distinct(qNode)) {\n return true;\n }\n\n break;\n\n }\n }\n }\n\n return false;\n }",
"private static boolean equiv(VObject src, VObject dst)\n {\n return ((src.getId() != null && src.getId().equals(dst.getId()))\n || (src.getSid() != null && src.getSid().equals(dst.getSid())) \n || (src.getName() != null && src.getName().equals(dst.getName())));\n }",
"public boolean equalTo( PuzzleGrid pg )\n\t{\n\t\tboolean equal = true;\n\t\t\n\t\t// For each element in each grid, test for equality\n\t\t// Loops break if it is found that two elements are not equal\n\t\tfor ( int y = 0; y < height && equal == true; y++ )\n\t\t{\n\t\t\tfor ( int x = 0; x < width && equal == true; x++ )\n\t\t\t{\n\t\t\t\t// If any element is not equal, equal = false\n\t\t\t\tif ( grid[x][y] != pg.getRawGrid()[x][y] ) \n\t\t\t\t{\n\t\t\t\t\tequal = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn equal;\n\t}",
"public boolean haveSameKeys(Tree<K, V> otherTree) {\n\t\tif (this.size() != otherTree.size()) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tTree<K, V> t = this;\n\t\t\tboolean sameKey = true;\n\t\t\treturn haveSameKeys(t, otherTree, sameKey);\n\t\t}\n\t}",
"public boolean equivalentInteractions(InteractionObject first, InteractionObject second) {\n\t\tboolean result = \n\t\t\tfirst.getType() == second.getType() &&\n\t\t\tfirst.getIndex() == second.getIndex();\n\t\treturn result;\n\t}",
"public static boolean IdenticalTrees(Node n1,Node n2) {\n\t\n\tif(n1!=null && n2!=null && n1.key==n2.key)\n\t{\n\t\treturn IdenticalTrees(n1.left, n2.left) && IdenticalTrees(n1.right, n2.right);\n\t}\n\t\n\tif(n1==null && n2==null)\n\t\treturn true;\n\treturn false;\n}",
"public boolean isEqual(Expression other) {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n\n if (other instanceof Mult) {\n return (((Mult) other).getLeft().toString().equals(left.toString())\n && ((Mult) other).getRight().toString().equals(right.toString()))\n || ((Mult) other).getLeft().toString().equals(right.toString())\n && ((Mult) other).getRight().toString().equals(left.toString());\n }\n\n return false;\n }",
"@Override\n @SuppressWarnings(\"unchecked\")\n public Boolean apply(final T value)\n {\n final R left = evaluateChild(0, value);\n final R right = evaluateChild(1, value);\n\n if (right instanceof EmptySetExpression)\n {\n return Boolean.FALSE;\n }\n\n if (!_typeValidator.test(left) || !_typeValidator.test(right))\n {\n throw QueryEvaluationException.of(\n Errors.COMPARISON.INAPPLICABLE,\n StringUtils.getClassName(left),\n StringUtils.getClassName(right)\n );\n }\n\n if (left instanceof Number && right instanceof Number)\n {\n return new BigDecimal(left.toString()).compareTo(new BigDecimal(right.toString())) >= 0;\n }\n\n if (DateTimeConverter.isDateTime(left) || DateTimeConverter.isDateTime(right))\n {\n return DateTimeConverter.toInstantMapper().apply(left).compareTo(DateTimeConverter.toInstantMapper().apply(right)) >= 0;\n }\n\n if (left instanceof Comparable && right instanceof Comparable)\n {\n final Comparable<R> leftComparable = (Comparable<R>) left;\n return leftComparable.compareTo(right) >= 0;\n }\n\n throw QueryParsingException.of(Errors.COMPARISON.INAPPLICABLE, StringUtils.getClassName(left), StringUtils.getClassName(right));\n }",
"boolean equalSubtrees(Object other) {\n if (!(other instanceof ForStatement)) {\n return false; }\n ForStatement o = (ForStatement) other;\n return \n (ASTNode.equalLists(initializers(), o.initializers())\n && ASTNode.equalNodes(getExpression(), o.getExpression())\n && ASTNode.equalLists(updaters(), o.updaters())\n && ASTNode.equalNodes(getBody(), o.getBody())); }",
"public boolean isEquals() {\n long len = -1L;\n\n //1. check the lengths of the words\n for(S left : slp.getAxioms()) {\n if(len == -1L) {\n len = slp.length(left);\n }\n else {\n if(len != slp.length(left)) {\n return false;\n }\n }\n }\n\n // all words are the empty word\n if(len == 0) {\n return true;\n }\n\n // 2. the length are all equals and not zero => execute the recompression\n execute();\n\n S otherSymbol = null;\n boolean first = true;\n\n // 3. chech now if for all axioms X : |val(X)| = 1 and all val(X) are equals.\n for(S left : slp.getAxioms()) {\n if(first) {\n slp.length(left, true);\n first = false;\n }\n\n if(slp.length(left) != 1) {\n return false;\n }\n else {\n S symbol = slp.get(left, 1);\n if(otherSymbol == null) {\n otherSymbol = symbol;\n }\n\n if(!symbol.equals(otherSymbol)) {\n return false;\n }\n }\n }\n\n return true;\n }",
"@Override public boolean equalsDeep(@Nullable SqlNode node, Litmus litmus) {\n // This is the difference over super.equalsDeep. It skips\n // operands[0] the declared name fo this window. We only want\n // to check the window components.\n return node == this\n || node instanceof SqlWindow\n && SqlNode.equalDeep(\n Util.skip(getOperandList()),\n Util.skip(((SqlWindow) node).getOperandList()), litmus);\n }",
"public boolean equivalentTo (BusinessObject other, Callback<BusinessObject, Boolean> ignoreFields) {\n\t\tif (this == other) {\n\t\t\treturn true;\t// no point checking... we know they're the same...\n\t\t}\n\t\tif (getClass() != other.getClass() ||\t// different class... must be different\n\t\t\t\t((children == null) != (other.children == null)) ||\t// one is null while other isn't\n\t\t\t\t(children != null && children.size() != other.children.size())) {\t// both has children, but differing amounts\t\n\t\t\treturn false;\n\t\t} \n\t\tif (children != null) {\n\t\t\tfor (BusinessObject child : children.values()) {\n\t\t\t\t// Not going to bother comparing if callback returns true\n\t\t\t\tif (ignoreFields != null && ignoreFields.call(child)) continue;\t\n\t\t\t\tString name = child.nameProperty().getValue();\n\t\t\t\tBusinessObject otherChild = other.findChildByName(name);\n\t\t\t\tif(otherChild == null || !child.equivalentTo(otherChild, ignoreFields)) return false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"private boolean equals1(BinaryNode<AnyType> t, BinaryNode<AnyType> t1)\r\n\t{\r\n\t\tif(t==null && t1==null)\r\n\t\t\treturn true;\r\n\t\tif((t!=null && t1!=null)&&(t.element==t1.element))\r\n\t\t\treturn (equals1(t.left, t1.left)&& equals1(t.right, t1.right));\r\n\r\n\t\treturn false;\r\n\t}",
"public boolean isSameTree(TreeNode p, TreeNode q) {\n if (p == null && q == null) return true;\n if (p == null || q == null) return false;\n if (p.val != q.val) return false;\n return isSameTree(p.left, q.left) && isSameTree(p.right, q.right);\n }",
"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}",
"private boolean isSimilar(Node root1, Node root2){\n if(root1 == null && root2 == null){\n return true;\n }\n\n if(root1 == null || root2 ==null){\n return false;\n }\n\n return isSimilar(root1.getLeft(), root2.getLeft()) && isSimilar(root1.getRight(), root2.getRight());\n }",
"public boolean matches(Row row) {\n Object leftValue = extractValue(_leftOperand, row);\n Object rightValue = extractValue(_rightOperand, row);\n\n if (leftValue == null && rightValue == null) {\n return (_operator == Operator.IS);\n } else if (leftValue == null || rightValue == null) {\n return (_operator == Operator.ISNOT);\n }\n\n // at this point both values are non-null. IS is same as EQ, and ISNOT as NE\n switch (_operator) {\n case EQ:\n case IS:\n return compareValues(leftValue, rightValue) == 0;\n case GE:\n return compareValues(leftValue, rightValue) >= 0;\n case GT:\n return compareValues(leftValue, rightValue) > 0;\n case LE:\n return compareValues(leftValue, rightValue) <= 0;\n case LT:\n return compareValues(leftValue, rightValue) < 0;\n case NE:\n case ISNOT:\n return compareValues(leftValue, rightValue) != 0;\n default:\n throw new BatfishException(\"Unhandled operator: \" + _operator);\n }\n }",
"public abstract boolean doEquivalent(T t, T t2);",
"public boolean isSameTree(BinaryTreeNode p, BinaryTreeNode q) {\n if (p == null && q == null)\n return true;\n\n if (p == null || q == null)\n return false;\n\n if (p.val != q.val) {\n return false;\n } else {\n return isSameTree(p.left, q.left) && isSameTree(p.right, q.right);\n }\n\n\n }",
"public boolean isSameTree(TreeNode p, TreeNode q) {\n \n if (p == null && q == null) return true;\n \n if (p == null || q == null) return false;\n \n return p.val == q.val && isSameTree(p.left, q.left) && isSameTree(p.right, q.right);\n }",
"public boolean equivalent(DataType dataType) {\n return equals(dataType);\n }",
"public boolean allDuplicatesEqual() {\n int[] input = {1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5};\n int dupA = findDuplicatesA(input);\n int dupB = findDuplicatesB(input);\n int dupC = findDuplicatesC(input);\n int dupD = findDuplicatesD(input);\n int dupE = findDuplicatesE(input);\n return dupA == dupB && dupA == dupC && dupA == dupD && dupA == dupE;\n }",
"public boolean equals(Object o) {\n if (!super.equals(o)) return false;\n ASTSubtree that = (ASTSubtree)o;\n return this.getRootToken().equals(that.getRootToken());\n }",
"public boolean hasSubQuery() {\r\n\t\tList list = allElements();\r\n\t\tint len = list.size();\r\n\t\tfor (int n = 0; n < len; ++n) {\r\n\t\t\tObject ob = list.get(n);\r\n\t\t\tif (ob instanceof TObject) {\r\n\t\t\t\tTObject tob = (TObject) ob;\r\n\t\t\t\tif (tob.getTType() instanceof TQueryPlanType) {\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\treturn false;\r\n\t}",
"private boolean methodEqueals(Method m1, Method m2) {\n\t\tif (m1.getName() == m2.getName()) {\n\t\t\tif (!m1.getReturnType().equals(m2.getReturnType()))\n\t\t\t\treturn false;\n\t\t\tClass<?>[] params1 = m1.getParameterTypes();\n\t\t\tClass<?>[] params2 = m2.getParameterTypes();\n\t\t\tif (params1.length == params2.length) {\n\t\t\t\tfor (int i = 0; i < params1.length; i++) {\n\t\t\t\t\tif (params1[i] != params2[i])\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isSameTree(TreeNode p, TreeNode q) {\n if (p == null && q == null) return true;\r\n\r\n // If only one of p and q is null, then they are not the same tree\r\n if (p == null || q == null) return false;\r\n\r\n // If the values of p and q are different, then they are not the same tree\r\n if (p.val != q.val) return false;\r\n\r\n // Recursively check the left and right subtrees of p and q\r\n // If both the left and right subtrees are the same, then p and q are the same tree\r\n return isSameTree(p.left, q.left) && isSameTree(p.right, q.right);\r\n }",
"protected abstract boolean isEqual(E entryA, E entryB);",
"public boolean equivalent(Operation o) {\n return o.token == this.token && o.op == this.op;\n }",
"public boolean isSameTree(TreeNode p, TreeNode q) {\n if (p==null&&q==null){\n return true;\n }else if (p==null||q==null){\n return false;\n }else {\n if (p.val!=q.val){\n return false;\n }\n return isSameTree(p.left,q.left)&&isSameTree(p.right,q.right);\n }\n }",
"public static boolean equalsUnordered( Collection<?> collection1, Collection<?> collection2 )\r\n {\r\n //\r\n boolean retval = collection1.size() == collection2.size();\r\n \r\n //\r\n for ( Object iObject : collection1 )\r\n {\r\n retval &= collection2.contains( iObject );\r\n }\r\n \r\n //\r\n return retval;\r\n }",
"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}",
"public static boolean areSame(AnnotatedTypeMirror t1, AnnotatedTypeMirror t2) {\n return t1.toString().equals(t2.toString());\n }",
"@Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (!(o instanceof Query)) {\n return false;\n }\n return id != null && id.equals(((Query) o).id);\n }",
"public boolean isSameAs( PlanNode other ) {\n if (other == null) return false;\n if (this.getType() != other.getType()) return false;\n if (!ObjectUtil.isEqualWithNulls(this.nodeProperties, other.nodeProperties)) return false;\n if (!this.getSelectors().equals(other.getSelectors())) return false;\n if (this.getChildCount() != other.getChildCount()) return false;\n Iterator<PlanNode> thisChildren = this.getChildren().iterator();\n Iterator<PlanNode> thatChildren = other.getChildren().iterator();\n while (thisChildren.hasNext() && thatChildren.hasNext()) {\n if (!thisChildren.next().isSameAs(thatChildren.next())) return false;\n }\n return true;\n }",
"@Override\n public boolean equals(Object o) {\n if(o == null){\n return false;\n }\n\n if (this == o) { return true; }\n if (getClass() != o.getClass()) { return false; }\n Query a_new = (Query) o;\n return this.requestedPosts== (a_new.getRequestedPosts()) && this.getQueryID() == a_new.getQueryID();\n }",
"public static int isEqual(MyNode root0, MyNode root1) {\r\n int result = 0;\r\n\r\n if (root0 == null && root1 == null) {\r\n return 1;\r\n } else {\r\n if (root0 != null && root1 != null) {\r\n if (root0.getValue() == root1.getValue()) {\r\n if (isEqual(root0.getLeft(), root0.getLeft()) == 1) {\r\n result = isEqual(root0.getRight(), root1.getRight());\r\n }\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n }",
"public boolean treeEquals(IntTree that) {\n\t\t// TODO\n return treeEquals(root, that.root);\n\t}",
"@Override\n\tpublic boolean equals(Object other)\n\t{\n\t\tif (!(other instanceof Graph))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tGraph<N, ET> otherGraph = (Graph<N, ET>) other;\n\t\tList<N> otherNodeList = otherGraph.getNodeList();\n\t\tint thisNodeSize = nodeList.size();\n\t\tif (thisNodeSize != otherNodeList.size())\n\t\t{\n\t\t\t//\t\t\tSystem.err.println(\"Not equal node count\");\n\t\t\treturn false;\n\t\t}\n\t\t// (potentially wasteful, but defensive copy)\n\t\totherNodeList = new ArrayList<N>(otherNodeList);\n\t\tif (otherNodeList.retainAll(nodeList))\n\t\t{\n\t\t\t// Some nodes are not identical\n\t\t\t//\t\t\tSystem.err.println(\"Not equal node list\");\n\t\t\t//\t\t\tSystem.err.println(nodeList);\n\t\t\t//\t\t\tSystem.err.println(otherNodeList);\n\t\t\treturn false;\n\t\t}\n\t\t// Here, the node lists are identical...\n\t\tList<ET> otherEdgeList = otherGraph.getEdgeList();\n\t\tint thisEdgeSize = edgeList.size();\n\t\tif (thisEdgeSize != otherEdgeList.size())\n\t\t{\n\t\t\t//\t\t\tSystem.err.println(\"Not equal edge count\");\n\t\t\treturn false;\n\t\t}\n\t\t// (potentially wasteful, but defensive copy)\n\t\totherEdgeList = new ArrayList<ET>(otherEdgeList);\n\t\tif (otherEdgeList.retainAll(edgeList))\n\t\t{\n\t\t\t// Other Graph contains extra edges\n\t\t\t//\t\t\tSystem.err.println(\"not equal edge retain\");\n\t\t\t//\t\t\tSystem.err.println(edgeList);\n\t\t\t//\t\t\tSystem.err.println(otherEdgeList);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public boolean equalNodes(Node N, Node M) {\n if(N == null && M == null) return true;\n if((N == null && M != null)||(N != null && M == null)) return false;\n if(N.getData() != M.getData()) return false;\n if((!equalNodes(N.getRight(), M.getRight())|| (!equalNodes(N.getLeft(), M.getLeft())))) return false;\n\n return true;\n }",
"private boolean isMatch(AxiomTreeNode t1, AxiomTreeNode t2, AxiomTreeMapping mapping) {\n\n boolean match;\n //System.out.println(\"MATCHING: \" + t1 + \" \" + t2);\n //System.out.println(\"t1: \" + t1);\n //System.out.println(\"t2: \" + t2);\n // nodes must have the same number of children\n if (t1.getChildCount() != t2.getChildCount()) {\n match = false;\n //System.out.println(\"DIFFERENT CHILD COUNT\");\n //System.out.println(\"\");\n return match;\n }\n\n // string matching for operators\n if (isOperator(t1) && isOperator(t2)) {\n match = t1.sameLabel(t2);\n // System.out.println(\"OPERATORS. Label matching is: \"+ match);\n // System.out.println(\"\");\n return match;\n } else {\n // else check whether the nodes violate an existing mapping\n if (compatibleNodeTypes(t1, t2) && !mapping.violatesStrictMapping(t1, t2)) {\n \t//System.out.println(\"AT LEAST ONE NON OPERATOR. Compatible.\");\n \t//System.out.println(\"\");\n return true;\n }\n }\n //System.out.println(\"Fails all tests.\");\n //System.out.println(\"\");\n return false;\n\n }",
"private boolean canJoinTuples() {\n if (predicate == null)\n return true;\n\n environment.clear();\n environment.addTuple(leftSchema, leftTuple);\n environment.addTuple(rightSchema, rightTuple);\n\n return predicate.evaluatePredicate(environment);\n }",
"public Boolean checkIfTumblerRowIsAllTheSame(Tumbler tum) {\n if (tum.getTumbler1() == tum.getTumbler2() && tum.getTumbler1() == tum.getTumbler3() && tum.getTumbler1() == tum.getTumbler4()\n && tum.getTumbler1() == tum.getTumbler5()) {\n return true;\n }\n return false;\n }",
"static <T> boolean argEquals(T a1,boolean a2, T b1,boolean b2) {\n return\n Null.equals(a1, b1) && //\n a2==b2; //\n }",
"public boolean _is_equivalent(Object that) {\n return equals(that) ;\n }",
"public boolean equals(Object object){\n\t\tif(!(object instanceof BinaryTree)){\n\t\t\tSystem.out.println(\"The object is not a BinaryTree\");\n\t\t\ttry {\n\t\t\t\tthrow new Exception();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tBinaryTree tree = (BinaryTree) object;\n\t\tif((this.leftTree()==null) && tree.leftTree()==null){\n\t\t\treturn true;\n\t\t}\n\t\tif((this.leftTree()==null && tree.rightTree()!=null) || (this.rightTree()!=null &&tree.rightTree()==null)){\n\t\t\treturn false;\n\t\t}\n\t\tif(this.getElement().equals(tree.getElement()) && this.leftTree().equals(tree.leftTree()) && this.rightTree().equals(tree.rightTree())){\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"abstract boolean equivalentXml(Object target);",
"private boolean areTransitionsForSchemaEqual(Set<foreignkeyshistory.SchemaTransition> schemaTransitions, Map<String,Integer> otherTransitions)\n\t{\n\t\t\n\t\tfor (foreignkeyshistory.SchemaTransition schemaTransition : schemaTransitions)\n\t\t{\n\t\t\tif (!transitionExists(schemaTransition, otherTransitions)){ return false; }\n\t\t}\n\t\t\n\t\tfor (Map.Entry<String, Integer> entry : otherTransitions.entrySet())\n\t\t{\n\t\t\tif (!transitionExists(entry.getKey(), entry.getValue(), schemaTransitions)){ return false; }\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"public boolean equals (SetADT<T> set);",
"public boolean isIdentical(Node node1, Node node2)\r\n\t{\r\n\t\tif(node1 == null && node2 == null)\r\n\t\t\treturn true;\r\n\t\tif(node1 == null || node2 == null)\r\n\t\t\treturn false;\r\n\t\treturn (node1.data == node2.data) && isIdentical(node1.left, node2.left) && isIdentical(node1.right, node2.right);\r\n\t}",
"protected abstract NativeSQLStatement createNativeEqualsStatement(Geometry geom);",
"boolean isOQL();",
"private boolean compare(TreeNode leftRoot, TreeNode rightRoot) {\n // Good shortcut\n //if(left==null || right==null) return left==right;\n if (leftRoot == null && rightRoot == null) return true;\n if (leftRoot == null || rightRoot == null) return false;\n if (leftRoot.val != rightRoot.val) return false;\n boolean isOutersEqual = compare(leftRoot.left, rightRoot.right);\n boolean isInnersEqual = compare(leftRoot.right, rightRoot.left);\n return isOutersEqual && isInnersEqual;\n }",
"public boolean equals(Object other) {\n\t\t\n\t\t// checks if other object is a type of ISet\n\t\tif(other instanceof ISet<?>) {\n\t\t\t\n\t\t\tISet<E> otherSet = ((ISet<E>)(other));\n\t\t\t\n \t\t// lists aren't equal if sizes don't match\n \t\tif(this.size() != otherSet.size()) {\n \t\t\treturn false;\n \t\t}\n \t\t// empty lists are equal\n \t\tif(this.size() == 0 && otherSet.size() == 0) {\n \t\t\treturn true;\n \t\t}\n \t\t\n \t\t// checks all the elements in both sets to ensure equality\n \t\tif(this.containsAll(otherSet)) {\n \t\t\treturn true;\n \t\t}\n \t\treturn false;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}",
"public abstract boolean equals(Object other);",
"private boolean equal(Fragment left, Fragment right) {\n return (left != null && right != null && left.getClass().getName().equalsIgnoreCase(right.getClass().getName()));\n }",
"Expr equality() throws IOException {\n\t\tExpr e = rel();\t\t\t\t\t\t\t\t\t\t\t//\t\t\t equality ne rel | rel\n\t\twhile (look.tag == Tag.EQ || look.tag == Tag.NE) {\n\t\t\tToken tok = look;\n\t\t\tmove();\n\t\t\te = new Rel(tok, e, rel());\n\t\t}\n\t\treturn e;\n\t}",
"public boolean isSameTree_bfs(TreeNode p, TreeNode q) {\n if (p == null && q == null) return true;\n if (p == null || q == null) return false;\n if (p.val != q.val) return false;\n\n Queue<TreeNode> qp = new LinkedList<>();\n qp.add(p);\n Queue<TreeNode> qq = new LinkedList<>();\n qq.add(q);\n\n while (!qp.isEmpty() || !qq.isEmpty()) {\n int sizep = qp.size();\n int sizeq = qq.size();\n if (sizep != sizeq) return false;\n\n for (int i = 0; i < sizep; i++) {\n TreeNode np = qp.poll();\n TreeNode nq = qq.poll();\n if (np.val != nq.val) return false;\n\n if (np.left != null && nq.left != null) {\n qp.add(np.left);\n qq.add(nq.left);\n } else if (!(np.left == null && nq.left == null)) {\n return false;\n }\n\n if (np.right != null && nq.right != null) {\n qp.add(np.right);\n qq.add(nq.right);\n } else if (!(np.right == null && nq.right == null)) {\n return false;\n }\n }\n }\n\n return true;\n\n }",
"private Comparison checkEquality(SimpleNode node1, SimpleNode node2) {\n // Compare the classes.\n Comparison comparison = compareClasses(node1, node2);\n if (!comparison.isEqual()) {\n return comparison;\n }\n\n // Compare the values.\n comparison = compareValues(node1, node2);\n if (!comparison.isEqual()) {\n return comparison;\n }\n\n // Compare the images.\n comparison = compareImages(node1, node2);\n if (!comparison.isEqual()) {\n return comparison;\n }\n\n // Compare the children.\n return compareChildren(node1, node2);\n }",
"public boolean isEquilateral () {\r\n\t\tif ((startSide1 == startSide2 && startSide1 == startSide3) && isTriangle () == true && isRight () == false) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse return false;\r\n\t}",
"public static Comparison checkEquality(JexlNode first, JexlNode second) {\n if (first == second) {\n return Comparison.IS_EQUAL;\n } else if (first == null || second == null) {\n return Comparison.notEqual(\"One tree is null: \" + first + \" vs \" + second);\n } else {\n TreeEqualityVisitor visitor = new TreeEqualityVisitor();\n return (Comparison) first.jjtAccept(visitor, second);\n }\n }",
"boolean newequals(DataBT a, DataBT b) \n\t {\n\t \tSystem.out.println(\"!!\");\n\t \t\n\t /*1. both empty */\n\t if ((IBinTree)a instanceof MtBT && (IBinTree)b instanceof MtBT)\n\t return true;\n\t System.out.println(\"1 \" + a.data);\n\t \t \n\t /* 2. both non-empty -> compare them */\n\t if ( !((IBinTree)a instanceof MtBT) && !((IBinTree)b instanceof MtBT)) {\n\n\t \tboolean check = (a.data == b.data);\n\t\t System.out.println(\"1112\");\n\t\t \n\t\t if(a.left instanceof MtBT && b.left instanceof MtBT);else\n\t\t if((a.left instanceof MtBT) != (a.left instanceof MtBT))check = false;else\n\t \tif(!newequals((DataBT)a.left, (DataBT)b.left))check = false;\n\t\t \n\t\t \n\t\t System.out.println(\"1113\");\n\t\t \n\t\t \n\t\t if(a.right instanceof MtBT && b.right instanceof MtBT);else\n\t\t\t if((a.right instanceof MtBT) != (a.right instanceof MtBT))check = false;else\n\t\t if(!newequals((DataBT)a.right, (DataBT)b.right))check = false;\n\n\t\t System.out.println(\"112\");\n\n\t\t return (check);\n\t }\n\t System.out.println(\"2\");\n\t \n\t /* 3. one empty, one not -> false */\n\t if ( ((IBinTree)a instanceof MtBT) && (!((IBinTree)b instanceof MtBT))) {\n\t \treturn false;\n\t }\n\t System.out.println(\"3\");\n\t return false;\n\t }",
"public static boolean proveEquality(Tableau tableau) {\n boolean retVal = expandAllAlphas(tableau);\n // Deltas\n retVal = expandAllDeltas(tableau) || retVal;\n // Brown's rule\n retVal = tableau.applyAllBrowns() || retVal;\n // Beta or Gamma\n if (expandOneBeta(tableau))\n return true;\n if (Prover.unifyEquality(tableau) != null)\n return false;\n return expandOneGamma(tableau) || retVal;\n }",
"public static boolean areMirror(Node n1, Node n2) {\n boolean flag=true;\n int n=n1.children.size();\n\n if(n!=n2.children.size())\n return false;\n for(int i=0;i<n;i++)\n {\n flag= flag && areMirror(n1.children.get(i),n2.children.get(n-i-1));\n if(flag==false)\n break;\n }\n return flag;\n }",
"@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n // instanceof handles nulls\n if (!(other instanceof TagAllCommand)) {\n return false;\n }\n\n // state check\n TagAllCommand t = (TagAllCommand) other;\n return tagToAdd.equals(t.tagToAdd);\n }",
"public static boolean areMirror(Node n1, Node n2) {\r\n //If any condition where children sizes are not same it means shape is not similar so return false\r\n if(n1.children.size() != n2.children.size()){\r\n return false;\r\n }\r\n \r\n boolean res = true;\r\n //For node2 interate from reverse\r\n int j = n2.children.size()-1;\r\n \r\n for(int i=0; i<n1.children.size(); i++){\r\n Node child1 = n1.children.get(i);\r\n \r\n Node child2 = n2.children.get(j--); //decrease j while traversing from behind\r\n \r\n res = areMirror(child1, child2);\r\n \r\n //if even once a false is encountered it means no calculate further and return from here\r\n if(res == false){\r\n return false;\r\n }\r\n }\r\n return res;\r\n }",
"public boolean checkEquality(){\n boolean flag = true;\n for (int i = 0; i < boardRows ; i++) {\n for (int j = 0; j < boardColumns; j++) {\n if(this.currentBoardState[i][j] != this.goalBoardState[i][j]){\n flag = false;\n }\n }\n }\n return flag;\n }",
"@ZenCodeType.Operator(ZenCodeType.OperatorType.EQUALS)\n default boolean equalTo(IData other) {\n \n return notSupportedOperator(OperatorType.EQUALS);\n }",
"public static boolean equalValues(QuoteShort lastQuote, QuoteShort q) {\n\t\tif (lastQuote.getOpen()!= q.getOpen()) return false;\r\n\t\tif (lastQuote.getHigh()!= q.getHigh()) return false;\r\n\t\tif (lastQuote.getLow()!= q.getLow()) return false;\r\n\t\tif (lastQuote.getClose()!= q.getClose()) return false;\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"boolean equivalent(Concept x, Concept y);",
"private boolean checkQueryTrace(ListIterator<CachedQueryTraceEntry> entries, QueryTrace trace, List<QueryTraceEntry> usedEntries) {\n if (!entries.hasNext()) {\n Map<CachedQueryTraceEntry.Index, Object> mappedIndices = new HashMap<>();\n // mappedIndices is populated through query parameters, including those of later queries, so\n // all queries' parameters/variables must be processed before any query's values\n Iterator<CachedQueryTraceEntry> cacheEntries = this.entries.iterator();\n for (QueryTraceEntry entry : usedEntries) {\n CachedQueryTraceEntry cacheEntry = cacheEntries.next();\n if (!cacheEntry.checkParameters(entry, mappedIndices)) {\n return false;\n }\n }\n cacheEntries = this.entries.iterator();\n for (QueryTraceEntry entry : usedEntries) {\n CachedQueryTraceEntry cacheEntry = cacheEntries.next();\n if (!cacheEntry.checkValues(entry, mappedIndices)) {\n return false;\n }\n }\n return true;\n }\n\n CachedQueryTraceEntry cacheEntry = entries.next();\n\n if (cacheEntry.isCurrentQuery()) {\n QueryTraceEntry traceEntry = trace.getCurrentQuery();\n if (cacheEntry.checkQueryText(traceEntry)) {\n usedEntries.add(traceEntry);\n if (checkQueryTrace(entries, trace, usedEntries)) {\n return true;\n }\n usedEntries.remove(usedEntries.size() - 1);\n }\n } else if (trace.queries.containsKey(cacheEntry.getQueryText())) {\n for (QueryTraceEntry traceEntry : trace.queries.get(cacheEntry.getQueryText())) {\n if (cacheEntry.checkQueryText(traceEntry)) {\n usedEntries.add(traceEntry);\n if (checkQueryTrace(entries, trace, usedEntries)) {\n return true;\n }\n usedEntries.remove(usedEntries.size() - 1);\n }\n }\n }\n\n entries.previous();\n return false;\n }",
"private Comparison compareChildren(SimpleNode first, SimpleNode second) {\n List<SimpleNode> firstChildren = getChildren(first);\n List<SimpleNode> secondChildren = getChildren(second);\n\n // Compare the sizes.\n if (firstChildren.size() != secondChildren.size()) {\n return Comparison.notEqual(\"Num children differ: \" + firstChildren + \" vs \" + secondChildren);\n }\n\n // Look for an equivalent of each child, visiting each child recursively when needed.\n Comparison currentComparison = null;\n for (SimpleNode firstChild : firstChildren) {\n for (int i = 0; i < secondChildren.size(); i++) {\n SimpleNode secondChild = secondChildren.get(i);\n currentComparison = (Comparison) firstChild.jjtAccept(this, secondChild);\n if (currentComparison.isEqual()) {\n secondChildren.remove(i);\n break;\n }\n }\n\n if (!currentComparison.isEqual()) {\n return Comparison.notEqual(\"Did not find a matching child for \" + firstChild + \" in \" + secondChildren + \": \" + currentComparison.getReason());\n }\n }\n\n return Comparison.IS_EQUAL;\n }",
"public boolean equals(AsNode other) {\n\t\treturn this.state.getHash() == other.state.getHash();\n\t}",
"private static boolean checkEqualsToOperations(String expression, Lexemes lexemes, SymbolTable table) {\n\t\tif (expression.contains(\"==\")) {\n\n\t\t\tString[] arr = expression.split(\"==\");\n\t\t\tint finalIndex = arr.length - 1;\n\n\t\t\tfor (int i = 0; i <= finalIndex; i++) {\n\t\t\t\tString s = arr[i];\n\n\t\t\t\t// check if the current word is a variable\n\t\t\t\tif (table.contains(s)) {\n\t\t\t\t\tint id = table.getIdOfVariable(s);\n\t\t\t\t\tlexemes.insertLexeme(\"ID\", ((Integer) id).toString());\n\t\t\t\t} else {\n\n\t\t\t\t\tif (s.equals(\"true\")) {\n\t\t\t\t\t\tlexemes.insertLexeme(\"CONST_BOOL\", \"true\");\n\t\t\t\t\t} else if (s.equals(\"false\")) {\n\t\t\t\t\t\tlexemes.insertLexeme(\"CONST_BOOL\", \"false\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!checkRelationalOperations(s.trim(), lexemes, table)) return false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (i < finalIndex) {\n\t\t\t\t\tlexemes.insertLexeme(\"RELOP\", \"==\");\n\t\t\t\t} else if (expression.endsWith(\"==\")) {\n\t\t\t\t\tlexemes.insertLexeme(\"RELOP\", \"==\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\tif (!checkRelationalOperations(expression.trim(), lexemes, table)) return false;\n\t\t}\n\n\t\treturn true;\n\t}",
"public static <V, I> boolean compareTwoDag(final DAG<V, I> dag1, final DAG<V, I> dag2) {\n if (!(dag1.numberOfVertices() == dag2.numberOfVertices()\n && dag1.numberOfEdges() == dag2.numberOfEdges())) {\n return false;\n }\n\n boolean comp = true;\n for (final V root : dag1.getRootVertices()) {\n comp = dfsCompare(dag1, dag2, root) && comp;\n }\n return comp;\n }",
"@Override\n\tpublic boolean equals(MengdeADT<T> m) {\n\t\tboolean likeMengder = true;\n\t\tIterator<T> nye = m.oppramser();\n\t\tif (this.antall == m.antall()) {\n\t\t\twhile (nye.hasNext() && likeMengder) {\n\t\t\t\t// Hvis neste element i m ikke er med i denne mengden --> likeMengder = false\n\t\t\t\tif (!inneholder(nye.next())) {\n\t\t\t\t\tlikeMengder = false;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tlikeMengder = false;\n\t\t}\n\t\t\n\t\treturn likeMengder;\n\t}",
"public boolean isSame(Schema other) {\n if (this.varNameToExpressionMap.size() != other.varNameToExpressionMap.size()) {\n return false;\n }\n if (!this.varNameToExpressionMap.keySet().equals(other.varNameToExpressionMap.keySet())) {\n return false;\n }\n for (var key : varNameToExpressionMap.keySet()) {\n if (varNameToExpressionMap.get(key).getDataType() !=\n other.varNameToExpressionMap.get(key).getDataType()) {\n return false;\n }\n }\n return true;\n }",
"public boolean checkIfORExists(NestedExpression nestedExpression) {\n //GURKAN;\n //This method checks if OR exists in any nested query\n //This method is used by doNestedNaturalJoin() to make sure\n //OR does not exist within query\n int numberOfExp = nestedExpression.getExpressionCount();\n\n if (nestedExpression.getExpressionOperator() == LogicalOperator.OR) {\n return true;\n }\n\n for (int i = 0; i < numberOfExp; i++) {\n Expression expression = nestedExpression.getExpression(i);\n\n if (expression.isNested()) {\n NestedExpression nestedExp = (NestedExpression) expression;\n\n return checkIfORExists(nestedExp);\n }\n }\n\n return false;\n }"
] | [
"0.63127744",
"0.6272843",
"0.6121458",
"0.5829282",
"0.5815127",
"0.5808347",
"0.56999874",
"0.56271553",
"0.5515341",
"0.5497447",
"0.54119176",
"0.54109025",
"0.5391919",
"0.5368256",
"0.53582925",
"0.53501546",
"0.53467417",
"0.5326201",
"0.5322426",
"0.5287422",
"0.5283854",
"0.52565587",
"0.5253497",
"0.5227678",
"0.5217545",
"0.52067566",
"0.5204313",
"0.5195653",
"0.51733494",
"0.51706374",
"0.5157084",
"0.51553446",
"0.51408947",
"0.5131975",
"0.5120513",
"0.5120481",
"0.51202166",
"0.51188624",
"0.5093168",
"0.50844026",
"0.50767136",
"0.50756204",
"0.5073219",
"0.5062761",
"0.50575376",
"0.50504476",
"0.50458807",
"0.5044008",
"0.50222903",
"0.50208735",
"0.5017336",
"0.50062215",
"0.4979735",
"0.49790078",
"0.4968015",
"0.49596733",
"0.4952103",
"0.49446154",
"0.4931576",
"0.49279827",
"0.4926731",
"0.49259338",
"0.49063239",
"0.49049973",
"0.48890874",
"0.48853892",
"0.48763525",
"0.48738283",
"0.48708808",
"0.48684955",
"0.4867144",
"0.48651496",
"0.48612297",
"0.4860892",
"0.4854174",
"0.48535335",
"0.4845438",
"0.48395294",
"0.483719",
"0.48275527",
"0.48224458",
"0.4820587",
"0.48193753",
"0.481797",
"0.48131365",
"0.48033437",
"0.48022786",
"0.47994158",
"0.47931242",
"0.47821832",
"0.47819123",
"0.47813737",
"0.4779448",
"0.47789878",
"0.4777986",
"0.47757754",
"0.47749698",
"0.47729093",
"0.47708762",
"0.47699815"
] | 0.50490236 | 46 |
Compare the provided query trees for equivalency and return the resulting comparison. | public static Comparison checkEquality(JexlNode first, JexlNode second) {
if (first == second) {
return Comparison.IS_EQUAL;
} else if (first == null || second == null) {
return Comparison.notEqual("One tree is null: " + first + " vs " + second);
} else {
TreeEqualityVisitor visitor = new TreeEqualityVisitor();
return (Comparison) first.jjtAccept(visitor, second);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Comparison compareChildren(SimpleNode first, SimpleNode second) {\n List<SimpleNode> firstChildren = getChildren(first);\n List<SimpleNode> secondChildren = getChildren(second);\n\n // Compare the sizes.\n if (firstChildren.size() != secondChildren.size()) {\n return Comparison.notEqual(\"Num children differ: \" + firstChildren + \" vs \" + secondChildren);\n }\n\n // Look for an equivalent of each child, visiting each child recursively when needed.\n Comparison currentComparison = null;\n for (SimpleNode firstChild : firstChildren) {\n for (int i = 0; i < secondChildren.size(); i++) {\n SimpleNode secondChild = secondChildren.get(i);\n currentComparison = (Comparison) firstChild.jjtAccept(this, secondChild);\n if (currentComparison.isEqual()) {\n secondChildren.remove(i);\n break;\n }\n }\n\n if (!currentComparison.isEqual()) {\n return Comparison.notEqual(\"Did not find a matching child for \" + firstChild + \" in \" + secondChildren + \": \" + currentComparison.getReason());\n }\n }\n\n return Comparison.IS_EQUAL;\n }",
"private Comparison checkEquality(SimpleNode node1, SimpleNode node2) {\n // Compare the classes.\n Comparison comparison = compareClasses(node1, node2);\n if (!comparison.isEqual()) {\n return comparison;\n }\n\n // Compare the values.\n comparison = compareValues(node1, node2);\n if (!comparison.isEqual()) {\n return comparison;\n }\n\n // Compare the images.\n comparison = compareImages(node1, node2);\n if (!comparison.isEqual()) {\n return comparison;\n }\n\n // Compare the children.\n return compareChildren(node1, node2);\n }",
"@Override\n public boolean isEqual(Query e1, Query e2) {\n //Devuelve siempre falso, en una lista no puede haber dos querys iguales\n return this.compare(e1,e2) == this.EQUAL;\n }",
"@Override\n @SuppressWarnings(\"unchecked\")\n public Boolean apply(final T value)\n {\n final R left = evaluateChild(0, value);\n final R right = evaluateChild(1, value);\n\n if (right instanceof EmptySetExpression)\n {\n return Boolean.FALSE;\n }\n\n if (!_typeValidator.test(left) || !_typeValidator.test(right))\n {\n throw QueryEvaluationException.of(\n Errors.COMPARISON.INAPPLICABLE,\n StringUtils.getClassName(left),\n StringUtils.getClassName(right)\n );\n }\n\n if (left instanceof Number && right instanceof Number)\n {\n return new BigDecimal(left.toString()).compareTo(new BigDecimal(right.toString())) >= 0;\n }\n\n if (DateTimeConverter.isDateTime(left) || DateTimeConverter.isDateTime(right))\n {\n return DateTimeConverter.toInstantMapper().apply(left).compareTo(DateTimeConverter.toInstantMapper().apply(right)) >= 0;\n }\n\n if (left instanceof Comparable && right instanceof Comparable)\n {\n final Comparable<R> leftComparable = (Comparable<R>) left;\n return leftComparable.compareTo(right) >= 0;\n }\n\n throw QueryParsingException.of(Errors.COMPARISON.INAPPLICABLE, StringUtils.getClassName(left), StringUtils.getClassName(right));\n }",
"public Object visitEqualityExpression(GNode n) {\n Object a, b, result;\n String op;\n boolean mydostring = dostring;\n \n nonboolean = true;\n \n dostring = true;\n \n a = dispatch(n.getGeneric(0));\n b = dispatch(n.getGeneric(2));\n op = n.getString(1);\n \n dostring = false;\n \n if (a instanceof Long && b instanceof Long) {\n if (op.equals(\"==\")) {\n result = ((Long) a).equals((Long) b);\n }\n else if (op.equals(\"!=\")) {\n result = ! ((Long) a).equals((Long) b);\n }\n else {\n result = \"\";\n }\n }\n else {\n String sa, sb;\n \n if (a instanceof String) {\n sa = (String) a;\n }\n else if (a instanceof Long) {\n sa = ((Long) a).toString();\n }\n else {\n return null;\n }\n \n if (b instanceof String) {\n sb = (String) b;\n }\n else if (b instanceof Long) {\n sb = ((Long) b).toString();\n }\n else {\n return null;\n }\n \n if (op.equals(\"==\") && sa.equals(sb)) {\n result = mydostring ? \"1\" : B.one();\n }\n else {\n result = parens(sa) + \" \" + op + \" \" + parens(sb);\n }\n }\n \n return result;\n }",
"private boolean compare(TreeNode leftRoot, TreeNode rightRoot) {\n // Good shortcut\n //if(left==null || right==null) return left==right;\n if (leftRoot == null && rightRoot == null) return true;\n if (leftRoot == null || rightRoot == null) return false;\n if (leftRoot.val != rightRoot.val) return false;\n boolean isOutersEqual = compare(leftRoot.left, rightRoot.right);\n boolean isInnersEqual = compare(leftRoot.right, rightRoot.left);\n return isOutersEqual && isInnersEqual;\n }",
"private final static boolean equivalent(Automaton automaton,\n\t\t\tBinaryMatrix equivs, Automaton.Set ic, Automaton.Set jc) {\n\t\tint ic_size = ic.size();\n\t\tint jc_size = jc.size();\n\n\t\t// NOTE: the size of two equivalent sets may differ at this stage. This\n\t\t// is because we may two states which are identical and which will\n\t\t// subsequently reduced to a state. Thus, the current size of a set may\n\t\t// not be its final size.\n\n\t\tint[] ic_children = ic.children;\n\t\tint[] jc_children = jc.children;\n\n\t\t// First, check every node in s1 has equivalent in s2\n\t\tfor (int k = 0; k != ic_size; ++k) {\n\t\t\tint ic_child = ic_children[k];\n\t\t\tboolean matched = false;\n\t\t\tfor (int l = 0; l != jc_size; ++l) {\n\t\t\t\tint jc_child = jc_children[l];\n\t\t\t\tif (ic_child == jc_child\n\t\t\t\t\t\t|| (ic_child >= 0 && jc_child >= 0 && equivs.get(\n\t\t\t\t\t\t\t\tic_child, jc_child))) {\n\t\t\t\t\tmatched = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!matched) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Second, check every node in s2 has equivalent in s1\n\t\tfor (int k = 0; k != jc_size; ++k) {\n\t\t\tint jc_child = jc_children[k];\n\t\t\tboolean matched = false;\n\t\t\tfor (int l = 0; l != ic_size; ++l) {\n\t\t\t\tint ic_child = ic_children[l];\n\t\t\t\tif (ic_child == jc_child\n\t\t\t\t\t\t|| (ic_child >= 0 && jc_child >= 0 && equivs.get(\n\t\t\t\t\t\t\t\tic_child, jc_child))) {\n\t\t\t\t\tmatched = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!matched) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"private final static boolean equivalent(Automaton automaton,\n\t\t\tBinaryMatrix equivs, Automaton.Bag b1, Automaton.Bag b2) {\n\t\tint b1_size = b1.size();\n\t\tint b2_size = b2.size();\n\n\t\tif (b1_size != b2_size) {\n\t\t\t// Observe that, unlike a set, the size of a bag will never be\n\t\t\t// changed by the identification of equivalent states. Therefore,\n\t\t\t// the size of both collection must be identical, otherwise they can\n\t\t\t// never be equivalent.\n\t\t\treturn false;\n\t\t}\n\n\t\tint[] b1_children = b1.children;\n\t\tint[] b2_children = b2.children;\n\t\t// maps vertices in b2 to those they are matched against in b1\n\t\tint[] matches = new int[b1_size];\n\t\tArrays.fill(matches, -1);\n\t\t// Used to ensure no vertex is explored more than once during\n\t\t// reconfiguration.\n\t\tboolean[] visited = new boolean[b1_size];\n\t\t\n\t\t// For every state in s1\n\t\tfor (int i = 0; i != b1_size; ++i) {\n\t\t\tint b1_child = b1_children[i];\n\t\t\tif(b1_child < 0) {\n\t\t\t\t// In this case, we have to do something different.\n\t\t\t\tif(!findNegativeMatch(i,b1_children,b2_children,equivs,matches)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tArrays.fill(visited,false);\n\t\t\t\tif(!findMatch(i,b1_children,b2_children,equivs,matches,visited)) {\n\t\t\t\t\t// If we can't find a match, then it's game over and we know for\n\t\t\t\t\t// sure these two states are not equivalent.\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"void compareDataStructures();",
"private Comparison compareValues(SimpleNode first, SimpleNode second) {\n return Objects.equals(first.jjtGetValue(), second.jjtGetValue()) ? Comparison.IS_EQUAL\n : Comparison.notEqual(\"Node values differ: \" + first.jjtGetValue() + \" vs \" + second.jjtGetValue());\n }",
"@Test\n public void equalityForDifferentBinaryOps() {\n XPathStringLiteral leftStringExpr = new XPathStringLiteral(\"left side\");\n XPathNumericLiteral zero = new XPathNumericLiteral(0d);\n\n // Setup expressions to test equality over.\n // Note: these binary expressions make semantic sense\n XPathArithExpr additionExpr = new XPathArithExpr(XPathArithExpr.ADD, leftStringExpr, zero);\n XPathArithExpr additionExprClone = new XPathArithExpr(XPathArithExpr.ADD, leftStringExpr, zero);\n XPathArithExpr subtractExpr = new XPathArithExpr(XPathArithExpr.SUBTRACT, leftStringExpr, zero);\n\n XPathBoolExpr andExpr = new XPathBoolExpr(XPathBoolExpr.AND, leftStringExpr, zero);\n XPathBoolExpr andExprClone = new XPathBoolExpr(XPathBoolExpr.AND, leftStringExpr, zero);\n XPathBoolExpr orExpr = new XPathBoolExpr(XPathBoolExpr.OR, leftStringExpr, zero);\n\n XPathCmpExpr lessThanExpr = new XPathCmpExpr(XPathCmpExpr.LT, leftStringExpr, zero);\n XPathCmpExpr greaterThanExpr = new XPathCmpExpr(XPathCmpExpr.GT, leftStringExpr, zero);\n\n XPathEqExpr eqExpr = new XPathEqExpr(XPathEqExpr.EQ, leftStringExpr, zero);\n XPathEqExpr neqExpr = new XPathEqExpr(XPathEqExpr.NEQ, leftStringExpr, zero);\n\n XPathUnionExpr union = new XPathUnionExpr(leftStringExpr, zero);\n XPathUnionExpr differentUnion = new XPathUnionExpr(zero, zero);\n\n // basic equality tests over same subclass\n Assert.assertEquals(\"Same + expression reference is equal\", additionExpr, additionExpr);\n Assert.assertEquals(\"Same + expression is equal\", additionExpr, additionExprClone);\n Assert.assertNotEquals(\"+ not equal to -\", additionExpr, subtractExpr);\n Assert.assertEquals(\"Same && expression reference is equal\", andExpr, andExpr);\n Assert.assertEquals(\"Same && expression is equal\", andExpr, andExprClone);\n Assert.assertNotEquals(\"&& not equal to ||\", andExpr, orExpr);\n Assert.assertEquals(\"Same < expression is equal\", lessThanExpr, lessThanExpr);\n Assert.assertNotEquals(\"< not equal to >\", lessThanExpr, greaterThanExpr);\n Assert.assertEquals(\"Same == expression is equal\", eqExpr, eqExpr);\n Assert.assertNotEquals(\"== not equal to !=\", eqExpr, neqExpr);\n\n // make sure different binary expressions with same op code aren't equal\n Assert.assertNotEquals(\"+ not equal to &&\", additionExpr, andExpr);\n Assert.assertNotEquals(\"+ not equal to <\", additionExpr, lessThanExpr);\n Assert.assertNotEquals(\"+ not equal to ==\", additionExpr, eqExpr);\n Assert.assertNotEquals(\"- not equal to ||\", subtractExpr, orExpr);\n Assert.assertNotEquals(\"- not equal to >\", subtractExpr, greaterThanExpr);\n Assert.assertNotEquals(\"- not equal to !=\", subtractExpr, neqExpr);\n\n // make sure union equality, which doesn't have an op code, works\n Assert.assertEquals(\"same union instance is equal to itself\", union, union);\n Assert.assertNotEquals(union, differentUnion);\n Assert.assertNotEquals(\"+ not equal to union\", additionExpr, union);\n }",
"@Override\n public int compare(Query e1, Query e2) {\n if (e1.getFreq() < e2.getFreq() ||\n (e1.getFreq() == e2.getFreq() && e1.getText().compareTo(e2.getText()) > 0))\n return this.LESS;\n else if (e1.getFreq() > e2.getFreq() ||\n (e1.getFreq() == e2.getFreq() && e1.getText().compareTo(e2.getText()) < 0))\n return this.GREATER;\n return this.EQUAL;\n }",
"private Boolean compararQueries(Configuracion config,Consulta consultaOriginal, Consulta consultaAlternativa, int itemConsultaOriginal, int itemConsultaAlternativa){\n\t\tDatabase database1 = new Database();\n\t\tDatabase database2 = new Database();\n\t\tList<Map<String, Object>> resultadosConsulta1 = database1.ejecutarQuery(config, consultaOriginal, database1);\n\t\tList<Map<String, Object>> resultadosConsulta2 = database2.ejecutarQuery(config, consultaAlternativa, database2);\n\t\tif (resultadosConsulta1.equals(resultadosConsulta2)){\n\t\t\treturn true;\t\t\t\t\t\n\t\t}\n\t\telse\n\t\t\treturn false;\t\t\t\n\t}",
"public boolean isEquals(BinaryTree<T> tree){\n //if both are empty, are equals\n if(this.isEmpty() && tree.isEmpty()){\n return true;\n \n //if this is empty (and the other not, because don't get the if before)\n //is false\n }else if(this.isEmpty()){\n return false;\n \n //if the content of both nodes are equals...\n }else if(this.content.equals(tree.content)){\n //check recursively their childs\n if(this.left.isEquals(tree.left) \n && this.right.isEquals(tree.right)){\n return false;\n }else{\n return true;\n }\n \n //if not one of the before ifs, aren't equals \n }else{\n return false;\n }\n }",
"@Override\n public VectorEquality compareTo(PredicateVector vectorCmp) {\n try {\n PredicateVector vectorLarge;\n PredicateVector vectorSmall;\n VectorEquality cmpResult;\n \n if (flagged || vectorCmp.flagged) {\n return VectorEquality.UNIQUE;\n }\n \n // TODO: add size check\n \n if (this.size() > vectorCmp.size() && !this.values().iterator().next().isEmpty()) {\n vectorLarge = this;\n vectorSmall = vectorCmp;\n cmpResult = VectorEquality.SUPERSET;\n } else {\n vectorLarge = vectorCmp;\n vectorSmall = this;\n cmpResult = VectorEquality.SUBSET;\n }\n \n int largeVectorIter = 0;\n int numEq = 0;\n \n List<Integer> vectorSmallKeys = new ArrayList<Integer>(vectorSmall.keySet());\n Collections.sort(vectorSmallKeys);\n \n List<Integer> vectorLargeKeys = new ArrayList<Integer>(vectorLarge.keySet());\n Collections.sort(vectorLargeKeys);\n\n int i = 0;\n\n for (Integer smallVectorKey: vectorSmallKeys) {\n StateVector smallVectorState = vectorSmall.get(smallVectorKey);\n // Check if we have not iterated over all large vector states\n if (largeVectorIter >= vectorLargeKeys.size() && !smallVectorState.isEmpty()) {\n cmpResult = VectorEquality.UNIQUE;\n break;\n }\n \n \n for (i = largeVectorIter; i < vectorLargeKeys.size(); i++) {\n StateVector largeVectorState = vectorLarge.get(vectorLargeKeys.get(i));\n VectorEquality cmpVectorResult = smallVectorState.compareTo(largeVectorState); \n if (cmpVectorResult == VectorEquality.EQUAL) {\n numEq += 1;\n break;\n }\n \n if (cmpVectorResult == VectorEquality.SUPERSET || cmpVectorResult == VectorEquality.SUBSET) {\n cmpResult = cmpVectorResult;\n numEq += 1;\n break;\n }\n }\n \n largeVectorIter = i + 1; // TODO: double check i+1\n }\n \n if (numEq < vectorSmall.size() && !vectorSmall.values().iterator().next().isEmpty())\n cmpResult = VectorEquality.UNIQUE;\n \n return cmpResult;\n } catch (ArrayIndexOutOfBoundsException e) {\n e.printStackTrace();\n }\n \n return VectorEquality.UNIQUE;\n }",
"boolean newequals(DataBT a, DataBT b) \n\t {\n\t \tSystem.out.println(\"!!\");\n\t \t\n\t /*1. both empty */\n\t if ((IBinTree)a instanceof MtBT && (IBinTree)b instanceof MtBT)\n\t return true;\n\t System.out.println(\"1 \" + a.data);\n\t \t \n\t /* 2. both non-empty -> compare them */\n\t if ( !((IBinTree)a instanceof MtBT) && !((IBinTree)b instanceof MtBT)) {\n\n\t \tboolean check = (a.data == b.data);\n\t\t System.out.println(\"1112\");\n\t\t \n\t\t if(a.left instanceof MtBT && b.left instanceof MtBT);else\n\t\t if((a.left instanceof MtBT) != (a.left instanceof MtBT))check = false;else\n\t \tif(!newequals((DataBT)a.left, (DataBT)b.left))check = false;\n\t\t \n\t\t \n\t\t System.out.println(\"1113\");\n\t\t \n\t\t \n\t\t if(a.right instanceof MtBT && b.right instanceof MtBT);else\n\t\t\t if((a.right instanceof MtBT) != (a.right instanceof MtBT))check = false;else\n\t\t if(!newequals((DataBT)a.right, (DataBT)b.right))check = false;\n\n\t\t System.out.println(\"112\");\n\n\t\t return (check);\n\t }\n\t System.out.println(\"2\");\n\t \n\t /* 3. one empty, one not -> false */\n\t if ( ((IBinTree)a instanceof MtBT) && (!((IBinTree)b instanceof MtBT))) {\n\t \treturn false;\n\t }\n\t System.out.println(\"3\");\n\t return false;\n\t }",
"@Test\n public void testEquals() {\n Term t1 = structure(\"abc\", atom(\"a\"), atom(\"b\"), atom(\"c\"));\n Term t2 = structure(\"abc\", integerNumber(), decimalFraction(), variable());\n PredicateKey k1 = PredicateKey.createForTerm(t1);\n PredicateKey k2 = PredicateKey.createForTerm(t2);\n testEquals(k1, k2);\n }",
"private Expr comparison() {\n Expr expr = addition();\n\n while(match(GREATER, GREATER_EQUAL, LESS, LESS_EQUAL)) { // These variable length arguments are real convenient\n Token operator = previous();\n Expr right = addition();\n expr = new Expr.Binary(expr, operator, right);\n }\n\n return expr;\n }",
"private static boolean areLeafsEquivalent(JavaTree leftNode, JavaTree rightNode) {\n if (leftNode instanceof IdentifierTree) {\n return Objects.equal(((IdentifierTree) leftNode).name(), ((IdentifierTree) rightNode).name());\n } else if (leftNode instanceof PrimitiveTypeTree) {\n return Objects.equal(((PrimitiveTypeTree) leftNode).keyword().text(), ((PrimitiveTypeTree) rightNode)\n .keyword().text());\n } else if (leftNode instanceof SyntaxToken) {\n return Objects.equal(((SyntaxToken) leftNode).text(), ((SyntaxToken) rightNode).text());\n } else if (leftNode.is(Tree.Kind.INFERED_TYPE)) {\n return rightNode.is(Tree.Kind.INFERED_TYPE);\n } else {\n throw new IllegalArgumentException();\n }\n }",
"private boolean equalNodes(Node[] arr1, Node[] arr2) {\n // generic tests\n if (!Arrays.equals(arr1, arr2)) {\n return false;\n }\n\n if ((arr1 == null) || (arr1.length == 0)) {\n return true;\n }\n\n // compare paths from each node to root\n int i = 0;\n\n while ((i < arr1.length) && Arrays.equals(NodeOp.createPath(arr1[i], null), NodeOp.createPath(arr2[i], null))) {\n i++;\n }\n\n return i == arr1.length;\n }",
"public void testComparisons() {\n\tfinal double small = Math.pow(2.0, -42);\n\n\t// Input: a, b\n\tdouble[][] input = new double[][] { new double[] { 1, 1 },\n\t\tnew double[] { 1, 2 }, new double[] { 1, 1 - small / 10 },\n\t\tnew double[] { 1, 1 + small / 10 },\n\n\t\tnew double[] { 0, 1 }, new double[] { 0, 0 },\n\t\tnew double[] { 0, -1 }, new double[] { 0, small / 100 },\n\t\tnew double[] { 2100000001.0001, 2100000001.0003 }, };\n\n\t// Output: less, equals\n\tboolean[][] output = new boolean[][] { new boolean[] { false, true },\n\t\tnew boolean[] { true, false }, new boolean[] { false, true },\n\t\tnew boolean[] { false, true },\n\n\t\tnew boolean[] { true, false }, new boolean[] { false, true },\n\t\tnew boolean[] { false, false }, new boolean[] { false, true },\n\t\tnew boolean[] { false, true }, };\n\n\tfor (int i = 0; i < input.length; ++i) {\n\t boolean l = StandardFloatingPointComparator.getDouble().less(\n\t\t input[i][0], input[i][1]);\n\t boolean e = StandardFloatingPointComparator.getDouble().equals(\n\t\t input[i][0], input[i][1]);\n\n\t boolean ne = StandardFloatingPointComparator.getDouble().notEquals(\n\t\t input[i][0], input[i][1]);\n\t boolean le = StandardFloatingPointComparator.getDouble()\n\t\t .lessOrEquals(input[i][0], input[i][1]);\n\t boolean g = StandardFloatingPointComparator.getDouble().greater(\n\t\t input[i][0], input[i][1]);\n\t boolean ge = StandardFloatingPointComparator.getDouble()\n\t\t .greaterOrEquals(input[i][0], input[i][1]);\n\n\t boolean less = output[i][0];\n\t boolean equals = output[i][1];\n\n\t boolean notEquals = !equals;\n\t boolean lessOrEquals = less || equals;\n\t boolean greater = !lessOrEquals;\n\t boolean greaterOrEquals = !less;\n\n\t assertFalse(l != less);\n\t assertFalse(g != greater);\n\t assertFalse(e != equals);\n\t assertFalse(ne != notEquals);\n\t assertFalse(le != lessOrEquals);\n\t assertFalse(ge != greaterOrEquals);\n\t}\n }",
"private static boolean checkLikelyEqual(EquationSystem system, Map<Sort, List<Term>> smallTerms) {\n //int searchDepth = 0;\n //Term convergence = null;\n\n return true;\n /*\n\n for (int i = 0; i < 2; i++) {\n Set<Term> leftTerms = new HashSet<>();\n Set<Term> rightTerms = new HashSet<>();\n\n Term left = system.getGoal().getLeft();\n Term right = system.getGoal().getRight();\n\n for (Variable var : left.getVariables()) {\n left = left.substitute(var, smallTerms.get(var.getSort()).get(i));\n right = right.substitute(var, smallTerms.get(var.getSort()).get(i));\n }\n\n leftTerms.add(left);\n rightTerms.add(right);\n\n Logger.d(\"Checking convergence of \" + left.toString() + \" to \" + right.toString());\n\n while (convergence == null && searchDepth < 5) {\n leftTerms.addAll(Prover.rewriteAll(leftTerms, system.getEquations(), null, true, true));\n rightTerms.addAll(Prover.rewriteAll(rightTerms, system.getEquations(), null, true, true));\n\n searchDepth++;\n convergence = checkConvergence(leftTerms, rightTerms);\n }\n\n if (convergence == null) {\n return false;\n }\n }\n\n return true;*/\n }",
"@Override\n\tpublic void visit(AllComparisonExpression arg0) {\n\n\t}",
"@Override\n\tpublic void visit(AllComparisonExpression arg0) {\n\t\t\n\t}",
"@Factory\n public static Matcher<QueryTreeNode> equalTo(Matcher<QueryTreeNode> leftMatcher, Matcher<QueryTreeNode> rightMatcher) {\n return new BinaryOperatorNodeMatcher(leftMatcher, \"=\", rightMatcher);\n }",
"boolean equalSubtrees(Object other) {\n if (!(other instanceof ForStatement)) {\n return false; }\n ForStatement o = (ForStatement) other;\n return \n (ASTNode.equalLists(initializers(), o.initializers())\n && ASTNode.equalNodes(getExpression(), o.getExpression())\n && ASTNode.equalLists(updaters(), o.updaters())\n && ASTNode.equalNodes(getBody(), o.getBody())); }",
"Expr equality() throws IOException {\n\t\tExpr e = rel();\t\t\t\t\t\t\t\t\t\t\t//\t\t\t equality ne rel | rel\n\t\twhile (look.tag == Tag.EQ || look.tag == Tag.NE) {\n\t\t\tToken tok = look;\n\t\t\tmove();\n\t\t\te = new Rel(tok, e, rel());\n\t\t}\n\t\treturn e;\n\t}",
"protected abstract NativeSQLStatement createNativeEqualsStatement(Geometry geom);",
"@Test\n void compareTo_Identical_AllParts()\n {\n runIsMatchTest(AnswerType.yes, AnswerType.yes, AnswerType.yes, AnswerType.yes, ContactMatchType.Identical);\n }",
"protected abstract boolean isEqual(E entryA, E entryB);",
"private static boolean isSameTree(Node currentT1Node, Node currentT2Node) {\n\t\tif (currentT1Node != null && currentT2Node != null) {\n\t\t\tboolean isLeftSame = isSameTree(currentT1Node.leftChild, currentT2Node.leftChild);\n\t\t\tboolean isRightSame = isSameTree(currentT1Node.rightChild, currentT2Node.rightChild);\n\n\t\t\t// If either is false it means that the trees differ so we return immediately\n\t\t\tif (!isLeftSame || !isRightSame) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// Otherwise we compare the nodes in the current value.\n\t\t\tif (currentT1Node.value == currentT2Node.value) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\t// If one current Tn node is null and the other isn't then the trees are not the same.\n\t\tif ((currentT1Node == null && currentT2Node != null) || (currentT1Node != null && currentT2Node == null)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true; // We have hit the bottom of both trees, both T1 and T2 are null therefore it still matches.\n\t}",
"private final static boolean equivalent(Automaton automaton,\n\t\t\tBinaryMatrix equivs, Automaton.List il, Automaton.List jl) {\n\t\tint il_size = il.size();\n\t\tint jl_size = jl.size();\n\t\tif (il_size != jl_size) {\n\t\t\t// List have different sizes, so cannot be equivalent.\n\t\t\treturn false;\n\t\t} else {\n\t\t\t// Lists have the same size, so check each child is equivalent in\n\t\t\t// sequence\n\t\t\tint[] il_children = il.children;\n\t\t\tint[] jl_children = jl.children;\n\t\t\tfor (int k = 0; k != il_size; ++k) {\n\t\t\t\tint il_child = il_children[k];\n\t\t\t\tint jl_child = jl_children[k];\n\t\t\t\tif (il_child < 0 || jl_child < 0) {\n\t\t\t\t\t// In this case, one or both of the child states are\n\t\t\t\t\t// virtual. Thus, we cannot look them up in the equivs\n\t\t\t\t\t// relation, and must compare directly (which is safe).\n\t\t\t\t\tif (il_child != jl_child) {\n\t\t\t\t\t\t// Children are not equivalent so fail\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} else if (!equivs.get(il_child, jl_child)) {\n\t\t\t\t\t// Children are not equivalent so fail\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// All children must have been equivalent\n\t\t\treturn true;\n\t\t}\n\t}",
"public void equalsCheck() {\n System.out.println(\"\\nTesting TreeNode.equals with simple objects\");\n\n //Create two simple objects for testing\n TreeNode testOne = new TreeNode(new Data(\"Test\", 1) );\n TreeNode testTwo = new TreeNode(new Data(\"Test\", 1) );\n\n //Test that a simple object equals itself.\n assertTrue(testOne.equals(testOne));\n assertTrue(testTwo.equals(testTwo));\n\n // Create to objects simple that should be the same \n assertTrue(testOne.equals(testTwo));\n assertTrue(testTwo.equals(testOne));\n\n //-------------------------------------------------------\n\n System.out.println(\"Testing TreeNode.equals with complex objects\");\n \n //Complex node 1\n TreeNode child1One = new TreeNode(new Data(\"Child1\", 2));\n TreeNode child2One = new TreeNode(new Data(\"Child2\", 3));\n TreeNode child3One = new TreeNode(new Data(\"Child3\", 4));\n testOne.insert(child1One);\n testOne.insert(child2One);\n testOne.insert(child3One);\n\n TreeNode child12One = new TreeNode(new Data(\"Child2Child1\", 5) );\n child2One.insert(child12One);\n\n //Complex node 2\n TreeNode child1Two = new TreeNode(new Data(\"Child1\", 2));\n TreeNode child2Two = new TreeNode(new Data(\"Child2\", 3));\n TreeNode child3Two = new TreeNode(new Data(\"Child3\", 4));\n testTwo.insert(child1Two);\n testTwo.insert(child2Two);\n testTwo.insert(child3Two);\n\n TreeNode child12Two = new TreeNode(new Data(\"Child2Child1\", 5) );\n child2Two.insert(child12Two);\n\n //Test that a complex object equals itself.\n assertTrue(testOne.equals(testOne));\n assertTrue(testTwo.equals(testTwo));\n\n // Create to complex simple that should be the same\n assertTrue(testOne.equals(testTwo));\n assertTrue(testTwo.equals(testOne));\n\n\n // --------------------------------------\n System.out.println(\"Testing TreeNode.equals (not Equal) with complex objects\");\n\n child2One.getNodeData().setId(10);\n \n // Check that to not equal objects return false\n assertFalse(testOne.equals(testTwo));\n assertFalse(testTwo.equals(testOne));\n\n // Test that it return false with different parents\n child2One.getNodeData().setId(1);\n child12One.remove(child12One);\n\n\n // Check that to not equal objects return false\n assertFalse(testOne.equals(testTwo));\n assertFalse(testTwo.equals(testOne));\n\n\n }",
"private static void linkComparisons() {\n\t\tif (state.currentConditionNode == null || state.currentRVIndex == -1) return;\n\t\t\n\t\tlinkComparisonNode(state.currentConditionNode.root);\n\t\tif (state.whereCondition != null)\n\t\t\tlinkComparisonNode(state.whereCondition);\n\t}",
"public boolean equivalentTo (BusinessObject other, Callback<BusinessObject, Boolean> ignoreFields) {\n\t\tif (this == other) {\n\t\t\treturn true;\t// no point checking... we know they're the same...\n\t\t}\n\t\tif (getClass() != other.getClass() ||\t// different class... must be different\n\t\t\t\t((children == null) != (other.children == null)) ||\t// one is null while other isn't\n\t\t\t\t(children != null && children.size() != other.children.size())) {\t// both has children, but differing amounts\t\n\t\t\treturn false;\n\t\t} \n\t\tif (children != null) {\n\t\t\tfor (BusinessObject child : children.values()) {\n\t\t\t\t// Not going to bother comparing if callback returns true\n\t\t\t\tif (ignoreFields != null && ignoreFields.call(child)) continue;\t\n\t\t\t\tString name = child.nameProperty().getValue();\n\t\t\t\tBusinessObject otherChild = other.findChildByName(name);\n\t\t\t\tif(otherChild == null || !child.equivalentTo(otherChild, ignoreFields)) return false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"public abstract void compare();",
"static boolean areSame(String expr1, String expr2)\n\t{\n\n\t\t// Create a vector for all operands and\n\t\t// initialize the vector as 0.\n\t\tint[] v = new int[MAX_CHAR];\n\n\t\t// Put signs of all operands in expr1\n\t\teval(expr1, v, true);\n\n\t\t// Subtract signs of operands in expr2\n\t\teval(expr2, v, false);\n\n\t\t// If expressions are same, vector must\n\t\t// be 0.\n\t\tfor (int i = 0; i < MAX_CHAR; i++)\n\t\t\tif (v[i] != 0)\n\t\t\t\treturn false;\n\n\t\treturn true;\n\t}",
"@Override\n public Expression toExpression()\n {\n return new ComparisonExpression(getType(this.compareType), lvalue.toExpression(), rvalue.toExpression());\n }",
"public abstract boolean doEquivalent(T t, T t2);",
"@Override\n\tdefault boolean equivalentTo(Tree otherTree) {\n\t\tif (this == otherTree)\n\t\t\treturn true;\n\t\t\n\t\tif (otherTree == null || this.getKind() != otherTree.getKind() || this.hashCode() != otherTree.hashCode())\n\t\t\treturn false;\n\t\t\n\t\t\n\t\tCatchTree other = (CatchTree) otherTree;\n\t\t\n\t\tif (!Tree.equivalentTo(this.getBlock(), other.getBlock()))\n\t\t\treturn false;\n\t\t\n\t\tif (!Tree.equivalentTo(this.getParameter(), other.getParameter()))\n\t\t\treturn false;\n\t\t\n\t\tif (!Tree.equivalentTo(this.getType(), other.getType()))\n\t\t\treturn false;\n\t\t\n\t\treturn true;\n\t}",
"public static <V, I> boolean compareTwoDag(final DAG<V, I> dag1, final DAG<V, I> dag2) {\n if (!(dag1.numberOfVertices() == dag2.numberOfVertices()\n && dag1.numberOfEdges() == dag2.numberOfEdges())) {\n return false;\n }\n\n boolean comp = true;\n for (final V root : dag1.getRootVertices()) {\n comp = dfsCompare(dag1, dag2, root) && comp;\n }\n return comp;\n }",
"public static void main(String[] args) {\n\t\tBTNode r1 = BTNode.createtree();\n\t\tBTNode r2 = BTNode.createtree();\n//\t\tBTNode r2 = new BTNode(2);\n//\t\tr2.left = new BTNode(4);\n//\t\tr2.right = new BTNode(5);\n\t\t\n\t\tif(matchTree(r1,r2)) {\n\t\t\tSystem.out.println(\"trees are matched\");\n\t\t} else {\n\t\t\tSystem.out.println(\"trees are not matched\");\n\t\t}\n\n\t}",
"public static void main(String[] args) {\n\t\tTreeNode first=new TreeNode(1);\n\t\tfirst.left=new TreeNode(2);\n\t\tfirst.right=new TreeNode(3);\n\t\t\n\t\tTreeNode second=new TreeNode(1);\n\t\tsecond.left=new TreeNode(2);\n\t\tsecond.right=new TreeNode(4);\n\t\tif(isSame(first, second)){\n\t\t\tSystem.out.println(\"Same Tree!\");\n\t\t}else{\n\t\t\tSystem.out.println(\"is Not Same Tree!\");\n\t\t}\n\n\t}",
"public final AstValidator.rel_op_eq_return rel_op_eq() throws RecognitionException {\n AstValidator.rel_op_eq_return retval = new AstValidator.rel_op_eq_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n CommonTree set523=null;\n\n CommonTree set523_tree=null;\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:767:11: ( STR_OP_EQ | NUM_OP_EQ )\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n set523=(CommonTree)input.LT(1);\n\n if ( input.LA(1)==NUM_OP_EQ||input.LA(1)==STR_OP_EQ ) {\n input.consume();\n if ( state.backtracking==0 ) {\n set523_tree = (CommonTree)adaptor.dupNode(set523);\n\n\n adaptor.addChild(root_0, set523_tree);\n }\n\n state.errorRecovery=false;\n state.failed=false;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return retval;}\n MismatchedSetException mse = new MismatchedSetException(null,input);\n throw mse;\n }\n\n if ( state.backtracking==0 ) {\n } \n\n }\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }",
"public boolean equal(Tree T) {\n if(T.count() != count()) {\n return false;\n } else {\n return equalNodes(root,T.root);\n }\n }",
"@Override\r\n public int compare(Element e1, Element e2) {\r\n\t\t//FIXME !!!!\r\n\t\treturn -1;\r\n//\t\t// first try to compare by type:\r\n//\t\tint result = compareType(e1, e2);\r\n//\t\tif(result != 0)\r\n//\t\t\treturn result;\r\n//\t\t\r\n//\t\t// results with matching case before results with different case then searched word\r\n//\t\tresult = compareCase(e1, e2);\r\n//\t\tif(result != 0) {\r\n//\t\t\treturn result;\r\n//\t\t}\r\n//\t\t// when they both do/don't match case, compare by label:\r\n//\t\tresult = compareLabel(e1, e2);\r\n//\t\tif(result != 0) {\r\n//\t\t\treturn result;\r\n//\t\t}\r\n//\r\n//\t\t// if the same label as well, compare by hashcode\r\n//\t\tresult = e1.compareTo(e2);\r\n//\t\treturn result;\r\n\r\n\t}",
"public static boolean areSimilar(Node n1, Node n2) {\r\n \r\n //If any condition where children sizes are not same it means shape is not similar so return false\r\n if(n1.children.size() != n2.children.size()){\r\n return false;\r\n }\r\n \r\n boolean res = true;\r\n //To traverse on both trees we use loop in below form, children size are similar if we come here\r\n //so we can use any one for loop traversal length either n1 or n2.\r\n for(int i=0; i<n1.children.size(); i++){\r\n Node child1 = n1.children.get(i);\r\n Node child2 = n2.children.get(i);\r\n \r\n res = areSimilar(child1, child2);\r\n \r\n //if even once a false is encountered it means no further calculation required so return from here\r\n if(res == false){\r\n return false;\r\n }\r\n }\r\n return res;\r\n }",
"private boolean compatibleNodeTypes(AxiomTreeNode t1, AxiomTreeNode t2) {\n if (!t1.getNodeType().equals(t2.getNodeType())) {\n return false;\n }\n \n switch (t1.getNodeType()) {\n case CARD:\n int label1 = (Integer) t1.getLabel();\n int label2 = (Integer) t2.getLabel();\n return (label1 == label2);\n \t\n case OWLOBJECT:\n OWLObject o1 = (OWLObject) t1.getLabel();\n OWLObject o2 = (OWLObject) t2.getLabel();\n //System.out.println(o1.getClass());\n //System.out.println(o2.getClass());\n //Check for datatypes - then check datatype to see match. Else, return true if compatible.\n if(o1.getClass() == o2.getClass())\n {\n \tif(!o1.getDatatypesInSignature().isEmpty())\n \t{\n \t\t//Need to check if built in first. First check is convenience, datatypes should match\n \t\t//If one is built in, so should other. If neither is built in, this is also a viable match\n \t\t//If not equal and at least one is built in, its not a match.\n \t\tOWLDatatype dt1 = (OWLDatatype) o1.getDatatypesInSignature().toArray()[0];\n \t\t\tOWLDatatype dt2 = (OWLDatatype) o2.getDatatypesInSignature().toArray()[0];\n \t\t\t//System.out.println(\"DT1: \" + dt1);\n \t\t\t//System.out.println(\"DT2: \" + dt2);\n \t\tif(dt1.equals(dt2) && dt1.isBuiltIn())\n \t\t{\t\n \t\t\t//System.out.println(\"Standard state\");\n \t\t\t//System.out.println(o1.equals(o2));\n \t\t\treturn o1.equals(o2);\n \t\t}\n \t\telse if(!dt1.isBuiltIn() && !dt2.isBuiltIn())\n \t\t{\n \t\t\t//System.out.println(\"Unique state\");\n \t\t\treturn true;\n \t\t}\n \t\telse\n \t\t{\n \t\t\t//System.out.println(\"Rejection state\");\n \t\t\treturn false;\n \t\t}\n \n \t}\n \telse\n \t{\n \t\treturn true;\n \t}\n }\n else\n {\n \treturn false;\n }\n }\n return false;\n }",
"public Type typeCheck(SymbolTable stable) throws TypeCheckError {\n final Type tleft = _left.typeCheck(stable);\n final Type tright = _right.typeCheck(stable);\n\n if (tleft.isSimple() && tright.isSimple()) {\n if (tleft != tright) {\n if (tleft instanceof BooleanType) {\n _right = new CastExpr(_right, Type.Boolean);\n }\n else if (tright instanceof BooleanType) {\n _left = new CastExpr(_left, Type.Boolean);\n }\n else if (tleft instanceof NumberType ||\n tright instanceof NumberType) {\n _left = new CastExpr(_left, Type.Real);\n _right = new CastExpr(_right, Type.Real);\n }\n else { // both compared as strings\n _left = new CastExpr(_left, Type.String);\n _right = new CastExpr(_right, Type.String);\n }\n }\n }\n else if (tleft instanceof ReferenceType) {\n _right = new CastExpr(_right, Type.Reference);\n }\n else if (tright instanceof ReferenceType) {\n _left = new CastExpr(_left, Type.Reference);\n }\n // the following 2 cases optimize @attr|.|.. = 'string'\n else if (tleft instanceof NodeType && tright == Type.String) {\n _left = new CastExpr(_left, Type.String);\n }\n else if (tleft == Type.String && tright instanceof NodeType) {\n _right = new CastExpr(_right, Type.String);\n }\n // optimize node/node\n else if (tleft instanceof NodeType && tright instanceof NodeType) {\n _left = new CastExpr(_left, Type.String);\n _right = new CastExpr(_right, Type.String);\n }\n else if (tleft instanceof NodeType && tright instanceof NodeSetType) {\n // compare(Node, NodeSet) will be invoked\n }\n else if (tleft instanceof NodeSetType && tright instanceof NodeType) {\n swapArguments(); // for compare(Node, NodeSet)\n }\n else {\n // At least one argument is of type node, node-set or result-tree\n\n // Promote an expression of type node to node-set\n if (tleft instanceof NodeType) {\n _left = new CastExpr(_left, Type.NodeSet);\n }\n if (tright instanceof NodeType) {\n _right = new CastExpr(_right, Type.NodeSet);\n }\n\n // If one arg is a node-set then make it the left one\n if (tleft.isSimple() ||\n tleft instanceof ResultTreeType &&\n tright instanceof NodeSetType) {\n swapArguments();\n }\n\n // Promote integers to doubles to have fewer compares\n if (_right.getType() instanceof IntType) {\n _right = new CastExpr(_right, Type.Real);\n }\n }\n return _type = Type.Boolean;\n }",
"public static boolean isEqual(BinaryTree tree1, BinaryTree tree2) {\n\n if (tree1 == null) {\n return (tree2 == null);\n }\n if (tree2 == null) {\n return false;\n }\n if (tree1.rootData == tree2.rootData) {\n return isEqual(tree1.leftTree, tree2.leftTree) && isEqual(tree1.rightTree, tree2.rightTree);\n }\n return false;\n }",
"private static void compareForIdenticalKeys() {\n Integer[] identical = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1};\n\n Insertion insertion = new Insertion();\n insertion.analyzeSort(identical);\n insertion.getStat().printReport();\n\n Selection selection = new Selection();\n selection.analyzeSort(identical);\n selection.getStat().printReport();\n }",
"private boolean compareStatements(com.hp.hpl.jena.rdf.model.Statement stmt1,com.hp.hpl.jena.rdf.model.Statement stmt2) {\n if (!stmt1.getSubject().toString().equals(stmt2.getSubject().toString()))\n return false;\n else if (!stmt1.getObject().toString().equals(stmt2.getObject().toString()))\n return false;\n else if (!stmt1.getPredicate().toString().equals(stmt2.getPredicate().toString()))\n return false;\n else\n return true;\n }",
"Equality createEquality();",
"static public java.lang.String genComparisons (org.apache.spark.sql.catalyst.expressions.codegen.CodegenContext ctx, org.apache.spark.sql.types.StructType schema) { throw new RuntimeException(); }",
"public boolean compareObjects(Object object1, Object object2, AbstractSession session) {\n Object firstCollection = getRealCollectionAttributeValueFromObject(object1, session);\n Object secondCollection = getRealCollectionAttributeValueFromObject(object2, session);\n ContainerPolicy containerPolicy = getContainerPolicy();\n\n if (containerPolicy.sizeFor(firstCollection) != containerPolicy.sizeFor(secondCollection)) {\n return false;\n }\n\n if (containerPolicy.sizeFor(firstCollection) == 0) {\n return true;\n }\n Object iterFirst = containerPolicy.iteratorFor(firstCollection);\n Object iterSecond = containerPolicy.iteratorFor(secondCollection);\n\n //loop through the elements in both collections and compare elements at the\n //same index. This ensures that a change to order registers as a change.\n while (containerPolicy.hasNext(iterFirst)) {\n //fetch the next object from the first iterator.\n Object firstAggregateObject = containerPolicy.next(iterFirst, session);\n Object secondAggregateObject = containerPolicy.next(iterSecond, session);\n\n //fetch the next object from the second iterator.\n //matched object found, break to outer FOR loop\t\t\t\n if (!getReferenceDescriptor().getObjectBuilder().compareObjects(firstAggregateObject, secondAggregateObject, session)) {\n return false;\n }\n }\n return true;\n }",
"public AlgoAreEqual(Construction cons, GeoElement inputElement1,\n\t\t\tGeoElement inputElement2) {\n\t\tsuper(cons);\n\t\tthis.inputElement1 = inputElement1;\n\t\tthis.inputElement2 = inputElement2;\n\n\t\toutputBoolean = new GeoBoolean(cons);\n\n\t\tsetInputOutput();\n\t\tcompute();\n\n\t}",
"public void testCompare() throws Exception {\n\n Object testData[][] = {\n { \"aaa\", \"bbb\", -1 },\n { \"aaa\", \"aaa\", 0 },\n { \"bbb\", \"aaa\", 1 },\n { \"aaa\", \"aaa_L1_bbb.lsm\", -1 },\n { \"aaa_L1_bbb.lsm\", \"aaa_L1_bbb.lsm\", 0 },\n { \"aaa_L1_bbb.lsm\", \"aaa\", 1 },\n { \"aaa_L1_bbb.lsm\", \"aaa_L10_bbb.lsm\", -1 },\n { \"aaa_L10_bbb.lsm\", \"aaa_L1_bbb.lsm\", 1 },\n { \"aaa_La_bbb.lsm\", \"aaa_L1_bbb.lsm\", 1 },\n { \"aaa_L2_bbb.lsm\", \"aaa_L10_bbb.lsm\", -1 }\n };\n\n LNumberComparator comparator = new LNumberComparator();\n\n for (Object[] testRow : testData) {\n String name1 = (String) testRow[0];\n String name2 = (String) testRow[1];\n File file1 = new File(name1);\n File file2 = new File(name2);\n int expectedResult = (Integer) testRow[2];\n int actualResult = comparator.compare(new FileTarget(file1),\n new FileTarget(file2));\n\n boolean isValid = ((expectedResult > 0) && (actualResult > 0)) ||\n ((expectedResult < 0) && (actualResult < 0)) ||\n ((expectedResult == 0) && (actualResult == 0));\n\n assertTrue(name1 + \" compared to \" + name2 +\n \" returned invalid result of \" + actualResult +\n \" (should have same sign as \" + expectedResult + \")\",\n isValid);\n }\n\n }",
"public static void compare () {\r\n for (int i = 0; i < dim; i++) {\r\n for (int j = 0; j < dim; j++) {\r\n if (d[i][j] != adjacencyMatrix[i][j])// here \r\n {\r\n System.out.println(\"Comparison failed\");\r\n \r\n return;\r\n }\r\n }\r\n }\r\n System.out.println(\"Comparison succeeded\");\r\n }",
"@Override\n\tpublic void visit(AnyComparisonExpression arg0) {\n\n\t}",
"@Override\n\tpublic void visit(AnyComparisonExpression arg0) {\n\t\t\n\t}",
"@Override\r\n public int compare(Node o1, Node o2) {\r\n\r\n ArrayList<Litteral> solution1 = o1.getValeur();\r\n ArrayList<Litteral> solution2 = o2.getValeur();\r\n int satisfaitClauseNumberS1 = satInstance.satisfaitClauseNumber(solution1);\r\n int satisfaitClauseNumberS2 = satInstance.satisfaitClauseNumber(solution2);\r\n return satisfaitClauseNumberS2 - satisfaitClauseNumberS1;\r\n\r\n }",
"private List<SimilarNode> astCCImplmentation(HashMap<ASTNode, NodeInfo> fileNodeMap1, HashMap<ASTNode, NodeInfo> fileNodeMap2) {\n TreeMap<Integer, List<NodeInfo>> treeMap1 = convertToTreeMap(fileNodeMap1);\n TreeMap<Integer, List<NodeInfo>> treeMap2 = convertToTreeMap(fileNodeMap2);\n List<SimilarNode> result = new ArrayList<>();\n int[] array1 = getArray(treeMap1.keySet());\n int[] array2 = getArray(treeMap2.keySet());\n int i = 0;\n int j = 0;\n int sum = 0;\n while (i < array1.length && j < array2.length) {\n if (array1[i] == array2[j]) {\n // obtain list of nodeInfos for both and compare them if match found then add it to report\n List<NodeInfo> list1 = treeMap1.get(array1[i]);\n List<NodeInfo> list2 = treeMap2.get(array2[j]);\n for (NodeInfo nodeInfo1 : list1) {\n for (NodeInfo nodeInfo2 : list2) {\n if ((nodeInfo1.hashValue == nodeInfo2.hashValue) && (nodeInfo1.nodeType == nodeInfo2.nodeType)) {\n result.add(new SimilarNode(nodeInfo1, nodeInfo2));\n\n }\n }\n }\n i++;\n j++;\n\n } else if (array1[i] > array2[j]) {\n j++;\n } else if (array1[i] < array2[j]) {\n i++;\n }\n }\n return result;\n }",
"private boolean equals1(BinaryNode<AnyType> t, BinaryNode<AnyType> t1)\r\n\t{\r\n\t\tif(t==null && t1==null)\r\n\t\t\treturn true;\r\n\t\tif((t!=null && t1!=null)&&(t.element==t1.element))\r\n\t\t\treturn (equals1(t.left, t1.left)&& equals1(t.right, t1.right));\r\n\r\n\t\treturn false;\r\n\t}",
"protected void assertSame(BytesRef lowerVal, BytesRef upperVal, boolean includeLower, boolean includeUpper) throws IOException {\n Query docValues = new ConstantScoreQuery(DocTermOrdsRangeFilter.newBytesRefRange(fieldName, lowerVal, upperVal, includeLower, includeUpper));\n MultiTermQuery inverted = new TermRangeQuery(fieldName, lowerVal, upperVal, includeLower, includeUpper);\n inverted.setRewriteMethod(MultiTermQuery.CONSTANT_SCORE_FILTER_REWRITE);\n\n TopDocs invertedDocs = searcher1.search(inverted, 25);\n TopDocs docValuesDocs = searcher2.search(docValues, 25);\n\n CheckHits.checkEqual(inverted, invertedDocs.scoreDocs, docValuesDocs.scoreDocs);\n }",
"public boolean equals(Object obj) {\n // Quick same object test\n if(this == obj) {\n return true;\n }\n\n // Quick fail tests\n if(!(obj instanceof SetQuery)) {\n return false;\n }\n\n SetQuery other = (SetQuery) obj;\n\n return getOperation() == other.getOperation() &&\n EquivalenceUtil.areEqual(this.isAll(), other.isAll()) &&\n EquivalenceUtil.areEqual(this.leftQuery, other.leftQuery) &&\n EquivalenceUtil.areEqual(this.rightQuery, other.rightQuery) &&\n EquivalenceUtil.areEqual(getOrderBy(), other.getOrderBy()) &&\n EquivalenceUtil.areEqual(getLimit(), other.getLimit()) &&\n EquivalenceUtil.areEqual(getWith(), other.getWith()) &&\n sameOptionAndHint(other);\n }",
"public final Expr expr() throws RecognitionException {\n\t\tExpr e = null;\n\n\n\t\tToken EQUALITY11=null;\n\t\tExpr e1 =null;\n\t\tExpr e2 =null;\n\n\n\t\t\t\tExpr it = null;\n\t\t\t\n\t\ttry {\n\t\t\t// ul.g:148:3: (e1= compareExpr ( EQUALITY e2= compareExpr )* )\n\t\t\t// ul.g:149:2: e1= compareExpr ( EQUALITY e2= compareExpr )*\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_compareExpr_in_expr620);\n\t\t\te1=compareExpr();\n\t\t\tstate._fsp--;\n\t\t\tif (state.failed) return e;\n\t\t\tif ( state.backtracking==0 ) {it = e1;}\n\t\t\t// ul.g:149:29: ( EQUALITY e2= compareExpr )*\n\t\t\tloop11:\n\t\t\twhile (true) {\n\t\t\t\tint alt11=2;\n\t\t\t\tint LA11_0 = input.LA(1);\n\t\t\t\tif ( (LA11_0==EQUALITY) ) {\n\t\t\t\t\talt11=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt11) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// ul.g:149:31: EQUALITY e2= compareExpr\n\t\t\t\t\t{\n\t\t\t\t\tEQUALITY11=(Token)match(input,EQUALITY,FOLLOW_EQUALITY_in_expr625); if (state.failed) return e;\n\t\t\t\t\tpushFollow(FOLLOW_compareExpr_in_expr631);\n\t\t\t\t\te2=compareExpr();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {it = new EqualityExp(it, e2, (EQUALITY11!=null?EQUALITY11.getLine():0), EQUALITY11.getCharPositionInLine());}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak loop11;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( state.backtracking==0 ) {\n\t\t\t\t\te = it;\n\t\t\t\t}\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn e;\n\t}",
"@Test\n public void treeGraphsTest() throws Exception {\n // Construct a tree, rooted at INITIAL, with two \"a\" children, both of\n // which have different \"b\" and \"c\" children.\n String traceStr = \"1,0 a\\n\" + \"2,0 b\\n\" + \"1,1 c\\n\" + \"--\\n\"\n + \"1,0 a\\n\" + \"2,0 b\\n\" + \"1,1 c\\n\";\n TraceParser parser = genParser();\n ArrayList<EventNode> parsedEvents = parser.parseTraceString(traceStr,\n getTestName().getMethodName(), -1);\n DAGsTraceGraph inputGraph = parser\n .generateDirectPORelation(parsedEvents);\n exportTestGraph(inputGraph, 0);\n\n // This returns a set with one node -- INITIAL. It will have two\n // children -- the two \"a\" nodes, which should be k-equivalent for all\n // k.\n EventNode initNode = inputGraph.getDummyInitialNode();\n\n List<Transition<EventNode>> initNodeTransitions = initNode\n .getAllTransitions();\n EventNode firstA = initNodeTransitions.get(0).getTarget();\n EventNode secondA = initNodeTransitions.get(1).getTarget();\n for (int k = 1; k < 4; k++) {\n testKEqual(firstA, secondA, k);\n }\n\n // In this tree the firstA and secondA should _not_ be 1-equivalent (one\n // has children {b,c}, while the other has children {b,d}), but\n // they are still 0-equivalent.\n traceStr = \"1,0 a\\n\" + \"2,0 b\\n\" + \"1,1 c\\n\" + \"--\\n\" + \"1,0 a\\n\"\n + \"2,0 b\\n\" + \"1,1 d\\n\";\n parser = genParser();\n parsedEvents = parser.parseTraceString(traceStr, getTestName()\n .getMethodName(), -1);\n inputGraph = parser.generateDirectPORelation(parsedEvents);\n exportTestGraph(inputGraph, 1);\n\n initNode = inputGraph.getDummyInitialNode();\n initNodeTransitions = initNode.getAllTransitions();\n firstA = initNodeTransitions.get(0).getTarget();\n secondA = initNodeTransitions.get(1).getTarget();\n testKEqual(firstA, secondA, 1);\n testNotKEqual(firstA, secondA, 2);\n }",
"@Test\n\tpublic void equalGraphsWhichMatchTerms(){\n\t\tTerm term = new Term();\n\t\tterm.setName(\"tutorials\");\n\t\tterm.setNodeid(\"24\");\n\t\ttermRepository.save(term);\n\t\tList<Term> termList = termRepository.findTerms();\n\t\tAssert.assertEquals(\"tutorials\", term.getName());\n\t\tAssert.assertEquals(\"24\", term.getNodeid());\n\t}",
"@Test\n public void baseCaseTriviallyIdenticalGraphsTest() {\n Event a1 = new Event(\"label1\");\n Event a2 = new Event(\"label1\");\n\n EventNode e1 = new EventNode(a1);\n EventNode e2 = new EventNode(a2);\n // If k exceeds the depth of the graph, if they are equivalent to max\n // existing depth then they are equal. Regardless of subsumption.\n testKEqual(e1, e2, 100);\n // A node should always be k-equivalent to itself.\n testKEqual(e1, e1, 100);\n }",
"private void checkQuery(Class<? extends Containerable> objectClass, ObjectQuery q1object, String q2xml) throws Exception {\n\t\tdisplayText(\"Query 1:\");\n\t\tdisplayQuery(q1object);\n\t\tQueryType q1jaxb = toQueryType(q1object);\n\t\tdisplayQueryType(q1jaxb);\n\t\tString q1xml = toXml(q1jaxb);\n\t\tdisplayQueryXml(q1xml);\n//\t\tXMLAssert.assertXMLEqual(\"Serialized query is not correct: Expected:\\n\" + q2xml + \"\\n\\nReal:\\n\" + q1xml, q2xml, q1xml);\n\n\t\t// step 2 (parsing of Q2 + comparison)\n\t\tdisplayText(\"Query 2:\");\n\t\tdisplayQueryXml(q2xml);\n\t\tQueryType q2jaxb = toQueryType(q2xml);\n\t\tdisplayQueryType(q2jaxb);\n\t\tObjectQuery q2object = toObjectQuery(objectClass, q2jaxb);\n\t\tassertEquals(\"Reparsed query is not as original one (via toString)\", q1object.toString(), q2object.toString());\t// primitive way of comparing parsed queries\n\t\tassertTrue(\"Reparsed query is not as original one (via equivalent):\\nq1=\"+q1object+\"\\nq2=\"+q2object, q1object.equivalent(q2object));\n\t}",
"public static int isEqual(MyNode root0, MyNode root1) {\r\n int result = 0;\r\n\r\n if (root0 == null && root1 == null) {\r\n return 1;\r\n } else {\r\n if (root0 != null && root1 != null) {\r\n if (root0.getValue() == root1.getValue()) {\r\n if (isEqual(root0.getLeft(), root0.getLeft()) == 1) {\r\n result = isEqual(root0.getRight(), root1.getRight());\r\n }\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n }",
"private static <V, I> boolean dfsCompare(final DAG<V, I> dag1,\n final DAG<V, I> dag2,\n final V dag1Vertex) {\n if (!dag2.hasVertex(dag1Vertex)) {\n return false;\n }\n\n final Map<V, I> dag1Edges = dag1.getEdges(dag1Vertex);\n final Map<V, I> dag2Edges = dag2.getEdges(dag1Vertex);\n\n if (dag2Edges == null || !dag1Edges.equals(dag2Edges)) {\n return false;\n }\n\n boolean comp = true;\n for (final Map.Entry<V, I> entry : dag1Edges.entrySet()) {\n comp = dfsCompare(dag1, dag2, entry.getKey()) && comp;\n }\n\n return comp;\n }",
"@Override\n\tpublic ComparisonResult computeDifference() throws Exception {\n\t\t\n\t\tList<Token> tokens1 = file1.getTokens();\n\t\tList<Token> tokens2 = file2.getTokens();\n\t\t\n\t\t\n\t\tif (tokens1.size() == 0 || tokens2.size() == 0)\n\t\t\treturn new ComparisonResult(null, 0);\n\t\t\n\t\tQGramToken qGram1 = (QGramToken) new QGramTokenContainer(tokens1, tokens1.size()).get(0);\n\t\tQGramToken qGram2 = (QGramToken) new QGramTokenContainer(tokens2, tokens2.size()).get(0);\n\t\t\n\t\t// peut être négatif si les deux fichiers ont un taux d'alignement des tokens supérieur au nombre total de token.\n\t\tdouble val = qGram1.needlemanWunschAlignment(qGram2, -1) / (double) Math.max(qGram1.size(), qGram2.size());\n\t\t\n\t\treturn new ComparisonResult((val > heuristicPlagiatThreshold) ? (Boolean)true : val <= 0 ? false : null, val < 0 ? 0 : val);\n\t}",
"@Test\n public void testNotEquals2() throws Exception {\n String sql = \"SELECT a from db.g where a != 'value'\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n verifyElementSymbol(selectNode, Select.SYMBOLS_REF_NAME, \"a\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, \"db.g\");\n\n Node criteriaNode = verify(queryNode, Query.CRITERIA_REF_NAME, CompareCriteria.ID);\n verifyProperty(criteriaNode, AbstractCompareCriteria.OPERATOR_PROP_NAME, CriteriaOperator.Operator.NE.name());\n verifyElementSymbol(criteriaNode, AbstractCompareCriteria.LEFT_EXPRESSION_REF_NAME, \"a\");\n verifyConstant(criteriaNode, CompareCriteria.RIGHT_EXPRESSION_REF_NAME, \"value\");\n \n verifySql(\"SELECT a FROM db.g WHERE a <> 'value'\", fileNode);\n }",
"final static void determineEquivalenceClasses(Automaton automaton,\n\t\t\tBinaryMatrix equivs) {\n\t\tboolean changed = true;\n\t\tint size = automaton.nStates();\n\n\t\twhile (changed) {\n\t\t\tchanged = false;\n\t\t\tfor (int i = 0; i < size; ++i) {\n\t\t\t\tfor (int j = i + 1; j < size; ++j) {\n\t\t\t\t\tif (equivs.get(i, j)) {\n\t\t\t\t\t\t// no need to explore nodes which are already known to\n\t\t\t\t\t\t// be not equivalent.\n\t\t\t\t\t\tboolean b = equivalent(automaton, equivs, i, j);\n\t\t\t\t\t\tequivs.set(i, j, b);\n\t\t\t\t\t\tequivs.set(j, i, b);\n\t\t\t\t\t\tchanged |= !b;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public int compareTo(Object other){\r\n int[][] thisState = this.getState();\r\n int[][] thatState = ((Node)other).getState();\r\n int length = this.getState().length;\r\n for (int i = 0; i<length; i++){\r\n for (int j = 0; j<length; j++){\r\n if (thisState[i][j] != thatState[i][j])\r\n return 1;\r\n }\r\n }\r\n return 0;\r\n }",
"@ZenCodeType.Operator(ZenCodeType.OperatorType.EQUALS)\n default boolean equalTo(IData other) {\n \n return notSupportedOperator(OperatorType.EQUALS);\n }",
"private boolean compareStructure1(BinaryNode<AnyType> t, BinaryNode<AnyType> t1)\r\n\t{\r\n\t\tif(t==null && t1==null)\r\n\t\t\treturn true;\r\n\t\tif(t!=null && t1!=null)\r\n\t\t\treturn (compareStructure1(t.left, t1.left)&& compareStructure1(t.right, t1.right));\r\n\t\treturn false;\r\n\t}",
"@Test public void testCompareTo() {\r\n new LinkedHashMap<Entry<String, ComparisonResult>, Entry<Word, Word>>() {\r\n private static final long serialVersionUID = -114525477689441361L; {\r\n put(new SimpleEntry<>(\"test(Test)\", ComparisonResult.LESS_THAN), new SimpleEntry<>(w1, w2));\r\n put(new SimpleEntry<>(\"Test(test)\", ComparisonResult.GREATER_THAN), new SimpleEntry<>(w2, w1));\r\n put(new SimpleEntry<>(\"Test(Te/t)\", ComparisonResult.LESS_THAN), new SimpleEntry<>(w2, w5));\r\n put(new SimpleEntry<>(\"Te/t(Test)\", ComparisonResult.GREATER_THAN), new SimpleEntry<>(w5, w2));\r\n put(new SimpleEntry<>(\"Text(Te/t)\", ComparisonResult.GREATER_THAN), new SimpleEntry<>(w7, w5));\r\n put(new SimpleEntry<>(\"Te/t(Text)\", ComparisonResult.LESS_THAN), new SimpleEntry<>(w5, w7));\r\n put(new SimpleEntry<>(\"testing(test'ing)\", ComparisonResult.LESS_THAN), new SimpleEntry<>(w3, w4));\r\n put(new SimpleEntry<>(\"test'ing(testing)\", ComparisonResult.GREATER_THAN), new SimpleEntry<>(w4, w3));\r\n put(new SimpleEntry<>(\"test(testing)\", ComparisonResult.LESS_THAN), new SimpleEntry<>(w1, w3));\r\n put(new SimpleEntry<>(\"testing(test)\", ComparisonResult.GREATER_THAN), new SimpleEntry<>(w3, w1));\r\n put(new SimpleEntry<>(\"test(test)\", ComparisonResult.EQUAL_TO), new SimpleEntry<>(w1, w6));\r\n }}.forEach((k, v) -> {\r\n assertTrue(String.format(\"%1$s should be %2$s\", k.getKey(), k.getValue().toString()),\r\n v.getKey().compareTo(v.getValue()) == k.getValue());\r\n });\r\n }",
"public int compareTo(Term that){\n \treturn this.query.compareTo(that.query);\n }",
"private static void compareForReverseArrays() {\n Integer[] reverse1 = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1};\n Integer[] reverse2 = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1};\n Insertion insertion = new Insertion();\n insertion.analyzeSort(reverse1);\n insertion.getStat().printReport();\n\n Selection selection = new Selection();\n selection.analyzeSort(reverse2);\n selection.getStat().printReport();\n }",
"Expression eqExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = relExpression();\r\n\t\twhile(isKind(OP_EQ, OP_NEQ)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = relExpression();\r\n\t\t\te0 = new ExpressionBinary(first, e0,op,e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}",
"public static void main(String[] args) {\n BinaryTreeNode<Integer> tree = new BinaryTreeNode<>(3);\n tree.setLeft(new BinaryTreeNode<>(2));\n tree.getLeft().setLeft(new BinaryTreeNode<>(1));\n tree.getLeft().getLeft().setLeft(new BinaryTreeNode<>(10));\n tree.getLeft().getLeft().getLeft().setRight(new BinaryTreeNode<>(13));\n tree.setRight(new BinaryTreeNode<>(5));\n tree.getRight().setLeft(new BinaryTreeNode<>(4));\n tree.getRight().setRight(new BinaryTreeNode<>(6));\n List<List<Integer>> result = btDepthOrder(tree);\n List<List<Integer>> goldenRes = new ArrayList<>();\n goldenRes.add(Arrays.asList(3));\n goldenRes.add(Arrays.asList(2, 5));\n goldenRes.add(Arrays.asList(1, 4, 6));\n goldenRes.add(Arrays.asList(10));\n goldenRes.add(Arrays.asList(13));\n goldenRes.add(new ArrayList());\n System.out.println(goldenRes.equals(result));\n System.out.println(result);\n }",
"protected abstract boolean equalityTest(Object key, Object key2);",
"public final PythonParser.comparison_return comparison(expr_contextType ctype) throws RecognitionException {\n PythonParser.comparison_return retval = new PythonParser.comparison_return();\n retval.start = input.LT(1);\n\n PythonTree root_0 = null;\n\n List list_right=null;\n PythonParser.expr_return left = null;\n\n PythonParser.comp_op_return comp_op188 = null;\n\n PythonParser.expr_return right = null;\n right = null;\n RewriteRuleSubtreeStream stream_expr=new RewriteRuleSubtreeStream(adaptor,\"rule expr\");\n RewriteRuleSubtreeStream stream_comp_op=new RewriteRuleSubtreeStream(adaptor,\"rule comp_op\");\n\n List cmps = new ArrayList();\n\n try {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1087:5: (left= expr[ctype] ( ( comp_op right+= expr[ctype] )+ | -> $left) )\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1087:7: left= expr[ctype] ( ( comp_op right+= expr[ctype] )+ | -> $left)\n {\n pushFollow(FOLLOW_expr_in_comparison4522);\n left=expr(ctype);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) stream_expr.add(left.getTree());\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1088:8: ( ( comp_op right+= expr[ctype] )+ | -> $left)\n int alt86=2;\n int LA86_0 = input.LA(1);\n\n if ( ((LA86_0>=IN && LA86_0<=IS)||LA86_0==NOT||(LA86_0>=LESS && LA86_0<=NOTEQUAL)) ) {\n alt86=1;\n }\n else if ( (LA86_0==EOF||LA86_0==NEWLINE||LA86_0==NAME||(LA86_0>=AND && LA86_0<=AS)||LA86_0==FOR||LA86_0==IF||(LA86_0>=OR && LA86_0<=ORELSE)||(LA86_0>=RPAREN && LA86_0<=COMMA)||(LA86_0>=SEMI && LA86_0<=DOUBLESLASHEQUAL)||LA86_0==RBRACK||(LA86_0>=RCURLY && LA86_0<=BACKQUOTE)) ) {\n alt86=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 86, 0, input);\n\n throw nvae;\n }\n switch (alt86) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1088:10: ( comp_op right+= expr[ctype] )+\n {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1088:10: ( comp_op right+= expr[ctype] )+\n int cnt85=0;\n loop85:\n do {\n int alt85=2;\n int LA85_0 = input.LA(1);\n\n if ( ((LA85_0>=IN && LA85_0<=IS)||LA85_0==NOT||(LA85_0>=LESS && LA85_0<=NOTEQUAL)) ) {\n alt85=1;\n }\n\n\n switch (alt85) {\n \tcase 1 :\n \t // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1088:12: comp_op right+= expr[ctype]\n \t {\n \t pushFollow(FOLLOW_comp_op_in_comparison4536);\n \t comp_op188=comp_op();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) stream_comp_op.add(comp_op188.getTree());\n \t pushFollow(FOLLOW_expr_in_comparison4540);\n \t right=expr(ctype);\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) stream_expr.add(right.getTree());\n \t if (list_right==null) list_right=new ArrayList();\n \t list_right.add(right.getTree());\n\n \t if ( state.backtracking==0 ) {\n\n \t cmps.add((comp_op188!=null?comp_op188.op:null));\n \t \n \t }\n\n \t }\n \t break;\n\n \tdefault :\n \t if ( cnt85 >= 1 ) break loop85;\n \t if (state.backtracking>0) {state.failed=true; return retval;}\n EarlyExitException eee =\n new EarlyExitException(85, input);\n throw eee;\n }\n cnt85++;\n } while (true);\n\n\n }\n break;\n case 2 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1094:7: \n {\n\n // AST REWRITE\n // elements: left\n // token labels: \n // rule labels: retval, left\n // token list labels: \n // rule list labels: \n // wildcard labels: \n if ( state.backtracking==0 ) {\n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n RewriteRuleSubtreeStream stream_left=new RewriteRuleSubtreeStream(adaptor,\"rule left\",left!=null?left.tree:null);\n\n root_0 = (PythonTree)adaptor.nil();\n // 1094:7: -> $left\n {\n adaptor.addChild(root_0, stream_left.nextTree());\n\n }\n\n retval.tree = root_0;}\n }\n break;\n\n }\n\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (PythonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n if ( state.backtracking==0 ) {\n\n if (!cmps.isEmpty()) {\n retval.tree = new Compare((left!=null?((Token)left.start):null), actions.castExpr((left!=null?((PythonTree)left.tree):null)), actions.makeCmpOps(cmps),\n actions.castExprs(list_right));\n }\n\n }\n }\n\n catch (RecognitionException re) {\n errorHandler.reportError(this, re);\n errorHandler.recover(this, input,re);\n retval.tree = (PythonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n }\n finally {\n }\n return retval;\n }",
"boolean equalTo(Block leftBlock, int leftPosition, Block rightBlock, int rightPosition);",
"@Override\n\tpublic void visit(EqualityNode node) {\n\t\tif (Evaluator.checkScope(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (Evaluator.checkAssert(node) == false) {\n\t\t\treturn;\n\t\t}\n\t\t/**\n\t\t * evaluam fiul stang si fiul drept\n\t\t */\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\tEvaluator.evaluate(node.getChild(1));\n\n\t\tString s2 = null;\n\t\tString s1 = null;\n\t\t/**\n\t\t * preluam rezultatele evaluarii celor doi fii\n\t\t */\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\ts1 = Evaluator.variables.get(node.getChild(0).getName());\n\t\t} else {\n\t\t\ts1 = node.getChild(0).getName();\n\t\t}\n\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\ts2 = Evaluator.variables.get(node.getChild(1).getName());\n\t\t} else {\n\t\t\ts2 = node.getChild(1).getName();\n\t\t}\n\n\t\t/**\n\t\t * verificam daca cei doi fii s- au evaluat la aceeasi expresie\n\t\t */\n\t\tif (s1.contentEquals(s2)) {\n\t\t\tnode.setName(\"true\");\n\t\t} else {\n\t\t\tnode.setName(\"false\");\n\t\t}\n\n\t}",
"boolean equivalent(Concept x, Concept y);",
"public boolean isEqual(Expression other) {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n\n if (other instanceof Mult) {\n return (((Mult) other).getLeft().toString().equals(left.toString())\n && ((Mult) other).getRight().toString().equals(right.toString()))\n || ((Mult) other).getLeft().toString().equals(right.toString())\n && ((Mult) other).getRight().toString().equals(left.toString());\n }\n\n return false;\n }",
"private static boolean equiv(VObject src, VObject dst)\n {\n return ((src.getId() != null && src.getId().equals(dst.getId()))\n || (src.getSid() != null && src.getSid().equals(dst.getSid())) \n || (src.getName() != null && src.getName().equals(dst.getName())));\n }",
"static public java.lang.String genComparisons (org.apache.spark.sql.catalyst.expressions.codegen.CodegenContext ctx, scala.collection.Seq<org.apache.spark.sql.catalyst.expressions.SortOrder> ordering) { throw new RuntimeException(); }",
"BooleanExpression gteq(ComparableExpression<? extends T> expr);",
"private Comparison compareImages(SimpleNode first, SimpleNode second) {\n if (first instanceof JexlNode) {\n String firstImage = ((JexlNode) first).image;\n String secondImage = ((JexlNode) second).image;\n if (!Objects.equals(firstImage, secondImage)) {\n return Comparison.notEqual(\"Node images differ: \" + firstImage + \" vs \" + secondImage);\n }\n }\n return Comparison.IS_EQUAL;\n }",
"@Test\n public void testEqualTo() {\n System.out.println(\"AbsolutePathNode - testEqualTo\");\n final AbsolutePathNode instance1 = new AbsolutePathNode();\n final AbsolutePathNode instance2 = new AbsolutePathNode();\n final TestNode testInstance = TestNode.instance;\n assertTrue(instance1.equalTo(instance2));\n assertFalse(instance1.equalTo(testInstance));\n }",
"private Object eval(RelExpr expr) {\n Object res = eval(expr.getExpr().get(0));\n\n if (expr.getExpr().size() == 2) {\n Object res2 = eval(expr.getExpr().get(1));\n String opt = expr.getOpt();\n\n if (\"==\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = ((Double) res).equals(res2);\n } else if (res instanceof String && res2 instanceof String) {\n res = ((String) res).equals(res2);\n } else if (res instanceof Boolean && res2 instanceof Boolean) {\n res = ((Boolean) res).equals(res2);\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\"!=\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = !((Double) res).equals(res2);\n } else if (res instanceof String && res2 instanceof String) {\n res = !((String) res).equals(res2);\n } else if (res instanceof Boolean && res2 instanceof Boolean) {\n res = !((Boolean) res).equals(res2);\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\"<\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res < (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\"<=\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res <= (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\">\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res > (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else if (\">=\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res >= (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: RelExpr error\");\n }\n } else {\n throw new RaydenScriptException(\"Expression error: Invalid operator '\" + opt + \"'.\");\n }\n }\n\n return res;\n }",
"<T extends Comparable<T>> R visit(Eq<T> eq);",
"public final EObject ruleEqualsOperator() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token otherlv_1=null;\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4540:28: ( ( () otherlv_1= '==' ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4541:1: ( () otherlv_1= '==' )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4541:1: ( () otherlv_1= '==' )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4541:2: () otherlv_1= '=='\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4541:2: ()\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4542:5: \r\n {\r\n if ( state.backtracking==0 ) {\r\n\r\n current = forceCreateModelElement(\r\n grammarAccess.getEqualsOperatorAccess().getEqualsOperatorAction_0(),\r\n current);\r\n \r\n }\r\n\r\n }\r\n\r\n otherlv_1=(Token)match(input,55,FOLLOW_55_in_ruleEqualsOperator9973); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_1, grammarAccess.getEqualsOperatorAccess().getEqualsSignEqualsSignKeyword_1());\r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }",
"@JRubyMethod(name = \"==\", required = 1)\n public static IRubyObject op_equal(ThreadContext ctx, IRubyObject self, IRubyObject oth) {\n RubyString str1, str2;\n RubyModule instance = (RubyModule)self.getRuntime().getModule(\"Digest\").getConstantAt(\"Instance\");\n if (oth.getMetaClass().getRealClass().hasModuleInHierarchy(instance)) {\n str1 = digest(ctx, self, null).convertToString();\n str2 = digest(ctx, oth, null).convertToString();\n } else {\n str1 = to_s(ctx, self).convertToString();\n str2 = oth.convertToString();\n }\n boolean ret = str1.length().eql(str2.length()) && (str1.eql(str2));\n return ret ? self.getRuntime().getTrue() : self.getRuntime().getFalse();\n }",
"private void assertCompareTwoXML(String path1, String path2){\n\t\tFile f1 = new File(path1);\n\t\tFile f2 = new File(path2);\n\t\tassertTrue(\"Le fichier \"+path1+\" n'existe pas.\",f1.exists());\n\t\tassertTrue(\"Le fichier \"+path2+\" n'existe pas.\",f2.exists());\n\t\t\n\t\ttry {\n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder builder = factory.newDocumentBuilder();\n\t\t\tDocument doc1 = builder.parse(f1);\n\t\t\t\n\t\t\tDocumentBuilderFactory factory2 = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder builder2 = factory2.newDocumentBuilder();\n\t\t\tDocument doc2 = builder2.parse(f2);\n\n\t\t\tElement root1 = doc1.getDocumentElement(); //<tds> </tds>\n\t\t\tElement root2 = doc2.getDocumentElement();\n\t\t\t\n\t\t\t//Checking symboles\n\t\t\tNodeList symbs1 = root1.getElementsByTagName(\"sym\"); //Getting all <function>\n\t\t\tNodeList symbs2 = root2.getElementsByTagName(\"sym\"); //Getting all <function>\n\t\t\tUtilitaire.assertT(\"Les fichiers n'ont pas le meme nombre de symboles\",symbs1.getLength() == symbs2.getLength());\n\t\t\t\n\t\t\tfor(int symbIndex=0; symbIndex < symbs1.getLength();symbIndex++){\n\t\t\t\tboolean sameSymb = false;\n\t\t\t\tString sym1 = ((Element) symbs1.item(symbIndex)).getTextContent();\n\t\t\t\tfor(int symbIndex2=0; symbIndex2 < symbs2.getLength();symbIndex2++){\n\t\t\t\t\tString sym2 = ((Element) symbs2.item(symbIndex2)).getTextContent();\n\t\t\t\t\tif(sym1.equals(sym2)) sameSymb = true;\n\t\t\t\t}\n\t\t\t\tUtilitaire.assertT(\"Les symboles ne sont pas les memes.\",sameSymb);\n\t\t\t}\n\t\t\t\n\t\t\t//Checking functions\n\t\t\tNodeList functions1 = root1.getElementsByTagName(\"function\"); //Getting all <function>\n\t\t\tNodeList functions2 = root2.getElementsByTagName(\"function\"); //Getting all <function>\n\t\t\tUtilitaire.assertT(\"Les fichiers n'ont pas le meme nombre de fonctions\",functions1.getLength() == functions2.getLength());\n\t\t\t\t//Checking each function\n\t\t\tfor(int tmp = 0; tmp < functions1.getLength();tmp++){\n\t\t\t\tNode node1 = functions1.item(tmp);\n\t\t\t\tNode node2 = null;\n\t\t\t\t//Checking function name\n\t\t\t\tString funName1 = ((Element) node1).getElementsByTagName(\"name\").item(0).getTextContent();\n\t\t\t\tString funName2 = null;\n\t\t\t\tboolean sameFunName = false;\n\t\t\t\t//Iterate over the second file to find (eventually) the same function node\n\t\t\t\tfor(int tmp2 = 0; (tmp2 < functions2.getLength()) && !sameFunName ;tmp2++){\n\t\t\t\t\tnode2 = functions2.item(tmp2);\n\t\t\t\t\tfunName2 = ((Element) node2).getElementsByTagName(\"name\").item(0).getTextContent();\n\t\t\t\t\tif(funName1.equals(funName2)) sameFunName = true;\n\t\t\t\t\t//If a same node if found, the following tests will be with node1's function = node2's function\n\t\t\t\t}\n\t\t\t\t//If there is no node with the same function name -> fail\n\t\t\t\tassertTrue(\"Deux fonctions n'ont pas le meme nom : \"+funName1, sameFunName);\n\t\t\t\t\n\t\t\t\tNodeList vars1 = ((Element) node1).getElementsByTagName(\"var\"); //Getting <var>\n\t\t\t\tNodeList vars2 = ((Element) node2).getElementsByTagName(\"var\");\n\t\t\t\tUtilitaire.assertT(\"Il n'y a pas le meme nombre de variables pour la fonction \"+funName1,vars1.getLength() == vars2.getLength());\n\t\t\t\tfor(int varIndex = 0; varIndex < vars1.getLength();varIndex++){\n\t\t\t\t\tboolean sameVarsName = false;\n\t\t\t\t\tNode varNode1 = vars1.item(varIndex);\n\t\t\t\t\t//Checking vars name\n\t\t\t\t\tString varName1 = ((Element) varNode1).getElementsByTagName(\"vname\").item(0).getTextContent(); //Writing vars names\n\t\t\t\t\t//Iterate through the vars of the second file to see if there is a same as varName1\n\t\t\t\t\tfor(int varIndex2 = 0; varIndex2 < vars2.getLength();varIndex2++){\n\t\t\t\t\t\tString varName2 = ((Element) vars2.item(varIndex2)).getElementsByTagName(\"vname\").item(0).getTextContent(); //Writing vars names\n\t\t\t\t\t\tif(varName1.equals(varName2)) sameVarsName = true;\n\t\t\t\t\t}\n\t\t\t\t\tUtilitaire.assertT(\"Les variables n'ont pas le meme nom : \"+varName1, sameVarsName);\n\t\t\t\t\t//Checking vars value\n\t\t\t\t\tboolean sameVarsValue = false;\n\t\t\t\t\t//Iterate through the vars of the second file to see if there is a same as varValue1\n\t\t\t\t\tString varValue1 = ((Element) varNode1).getElementsByTagName(\"value\").item(0).getTextContent(); //Writing vars names\n\t\t\t\t\tfor(int varIndex2 = 0; varIndex2 < vars2.getLength();varIndex2++){\n\t\t\t\t\t\tString varValue2 = ((Element) vars2.item(varIndex2)).getElementsByTagName(\"value\").item(0).getTextContent(); //Writing vars names\n\t\t\t\t\t\tif(varValue1.equals(varValue2)) sameVarsValue = true;\n\t\t\t\t\t}\n\t\t\t\t\tUtilitaire.assertT(\"Les variables n'ont pas les mÍmes valeurs : \"+varValue1, sameVarsValue);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Checking calls\n\t\t\t\tNodeList calls1 = ((Element) node1).getElementsByTagName(\"f\");\n\t\t\t\tNodeList calls2 = ((Element) node2).getElementsByTagName(\"f\");\n\t\t\t\tUtilitaire.assertT(\"Le nombre d'appels de fonctions ne sont pas les memes.\",calls1.getLength() == calls2.getLength());\n\t\t\t\t\n\t\t\t\tfor(int callIndex = 0; callIndex < calls1.getLength(); callIndex++){\n\t\t\t\t\tboolean sameCalls = false;\n\t\t\t\t\tString callValue1 = ((Element) calls1.item(callIndex)).getTextContent();\n\t\t\t\t\t//Iterate through the calls of the second file to see if there is a same as callValue1\n\t\t\t\t\tfor(int callIndex2 = 0; callIndex2 < calls2.getLength(); callIndex2++){\n\t\t\t\t\t\tString callValue2 = ((Element) calls2.item(callIndex2)).getTextContent();\n\t\t\t\t\t\tif(callValue1.equals(callValue2)) sameCalls = true;\n\t\t\t\t\t}\n\t\t\t\t\tUtilitaire.assertT(\"Les functions appellees ne sont pas les memes : \"+callValue1, sameCalls);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} catch (ParserConfigurationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SAXException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Test\n public void runQueriesWithoutCollisions() throws Throwable\n {\n execute(\"INSERT INTO %s (pk, ck, dec) VALUES (-2, 1, 2.2)\");\n execute(\"INSERT INTO %s (pk, ck, dec) VALUES (-2, 2, 2.2)\");\n execute(\"INSERT INTO %s (pk, ck, dec) VALUES (-1, 1, 1.1)\");\n execute(\"INSERT INTO %s (pk, ck, dec) VALUES (0, 1, 0)\");\n execute(\"INSERT INTO %s (pk, ck, dec) VALUES (1, 1, 1.1)\");\n execute(\"INSERT INTO %s (pk, ck, dec) VALUES (2, 1, 2.2)\");\n execute(\"INSERT INTO %s (pk, ck, dec) VALUES (2, 2, 2.2)\");\n\n // EQ queries\n assertRowsIgnoringOrder(execute(\"SELECT * FROM %s WHERE dec = 1.1\"),\n row(-1, 1, BigDecimal.valueOf(1.1D)),\n row(1, 1, BigDecimal.valueOf(1.1D)));\n\n assertRowsIgnoringOrder(execute(\"SELECT * FROM %s WHERE dec = 2.2\"),\n row(-2, 1, BigDecimal.valueOf(2.2D)),\n row(-2, 2, BigDecimal.valueOf(2.2D)),\n row(2, 1, BigDecimal.valueOf(2.2D)),\n row(2, 2, BigDecimal.valueOf(2.2D)));\n\n // LT/LTE queries\n assertRowsIgnoringOrder(execute(\"SELECT * FROM %s WHERE dec < 1.1\"),\n row(0, 1, BigDecimal.valueOf(0)));\n\n assertRowsIgnoringOrder(execute(\"SELECT * FROM %s WHERE dec <= 1.1\"),\n row(-1, 1, BigDecimal.valueOf(1.1D)),\n row(0, 1, BigDecimal.valueOf(0)),\n row(1, 1, BigDecimal.valueOf(1.1D)));\n\n // GT/GTE queries\n assertRowsIgnoringOrder(execute(\"SELECT * FROM %s WHERE dec > 1.1\"),\n row(-2, 1, BigDecimal.valueOf(2.2D)),\n row(-2, 2, BigDecimal.valueOf(2.2D)),\n row(2, 1, BigDecimal.valueOf(2.2D)),\n row(2, 2, BigDecimal.valueOf(2.2D)));\n\n assertRowsIgnoringOrder(execute(\"SELECT * FROM %s WHERE dec >= 1.1\"),\n row(-2, 1, BigDecimal.valueOf(2.2D)),\n row(-2, 2, BigDecimal.valueOf(2.2D)),\n row(-1, 1, BigDecimal.valueOf(1.1D)),\n row(1, 1, BigDecimal.valueOf(1.1D)),\n row(2, 1, BigDecimal.valueOf(2.2D)),\n row(2, 2, BigDecimal.valueOf(2.2D)));\n }"
] | [
"0.59196055",
"0.5875119",
"0.5797646",
"0.55721426",
"0.551044",
"0.5479743",
"0.539913",
"0.5397209",
"0.5357766",
"0.53187513",
"0.5315482",
"0.52743214",
"0.52595305",
"0.5192827",
"0.5191151",
"0.51768726",
"0.51428515",
"0.51411086",
"0.5124302",
"0.5096864",
"0.5096299",
"0.5089118",
"0.50817513",
"0.5080337",
"0.5064898",
"0.5049817",
"0.50466436",
"0.50369126",
"0.5006076",
"0.50036997",
"0.49883726",
"0.49840158",
"0.4964348",
"0.49492338",
"0.4945061",
"0.49422228",
"0.4924234",
"0.4922982",
"0.4908049",
"0.48971757",
"0.48897582",
"0.48815492",
"0.48637742",
"0.48526603",
"0.48443583",
"0.4832576",
"0.4825541",
"0.4819914",
"0.48081627",
"0.4805105",
"0.48008192",
"0.47962585",
"0.47935233",
"0.47919747",
"0.47859004",
"0.47841868",
"0.47633988",
"0.47507632",
"0.4746054",
"0.473781",
"0.47314304",
"0.47302082",
"0.47217",
"0.47191012",
"0.47161996",
"0.4714283",
"0.47064054",
"0.47050685",
"0.47023666",
"0.46997803",
"0.46864077",
"0.46846783",
"0.46827158",
"0.46732014",
"0.46665826",
"0.46626168",
"0.46613437",
"0.46604675",
"0.46528715",
"0.46493724",
"0.4643233",
"0.46424198",
"0.46321997",
"0.46286926",
"0.4627077",
"0.46269608",
"0.4626581",
"0.46193743",
"0.46072623",
"0.45881748",
"0.45818585",
"0.45795086",
"0.4577703",
"0.45771363",
"0.45755973",
"0.4571894",
"0.45699129",
"0.45689037",
"0.45668566",
"0.45663154"
] | 0.5569778 | 4 |
Compare the given node and evaluate their equivalence. This visitor will be applied to each of the first node's children. The visitor will be accepted on all the first node's children. | private Comparison checkEquality(SimpleNode node1, SimpleNode node2) {
// Compare the classes.
Comparison comparison = compareClasses(node1, node2);
if (!comparison.isEqual()) {
return comparison;
}
// Compare the values.
comparison = compareValues(node1, node2);
if (!comparison.isEqual()) {
return comparison;
}
// Compare the images.
comparison = compareImages(node1, node2);
if (!comparison.isEqual()) {
return comparison;
}
// Compare the children.
return compareChildren(node1, node2);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Comparison compareChildren(SimpleNode first, SimpleNode second) {\n List<SimpleNode> firstChildren = getChildren(first);\n List<SimpleNode> secondChildren = getChildren(second);\n\n // Compare the sizes.\n if (firstChildren.size() != secondChildren.size()) {\n return Comparison.notEqual(\"Num children differ: \" + firstChildren + \" vs \" + secondChildren);\n }\n\n // Look for an equivalent of each child, visiting each child recursively when needed.\n Comparison currentComparison = null;\n for (SimpleNode firstChild : firstChildren) {\n for (int i = 0; i < secondChildren.size(); i++) {\n SimpleNode secondChild = secondChildren.get(i);\n currentComparison = (Comparison) firstChild.jjtAccept(this, secondChild);\n if (currentComparison.isEqual()) {\n secondChildren.remove(i);\n break;\n }\n }\n\n if (!currentComparison.isEqual()) {\n return Comparison.notEqual(\"Did not find a matching child for \" + firstChild + \" in \" + secondChildren + \": \" + currentComparison.getReason());\n }\n }\n\n return Comparison.IS_EQUAL;\n }",
"@Override\r\n\t\tpublic boolean isEqualNode(Node arg)\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}",
"@Override\r\n\t\tpublic boolean isSameNode(Node other)\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}",
"@Test\n\tpublic void isChildOrSameTest1()\n\t{\n\t\tNodeList n1=xmlDocument.getElementsByTagName(\"b\");\n\t\tNodeList n2=xmlDocument.getElementsByTagName(\"p\");\n\t\tassertEquals(true,Manipulator.isChildOrSame(n2.item(0),n1.item(0)));\n\t}",
"@Test\n\tpublic void isChildOrSameTest2()\n\t{\n\t\tNodeList n1=xmlDocument.getElementsByTagName(\"b\");\n\t\tassertEquals(true,Manipulator.isChildOrSame(n1.item(0),n1.item(0)));\n\t}",
"public void visit(Node node) {\n if (this.labelling[node.vertexIndex] == -1) {\n this.labelling[node.vertexIndex] = this.currentLabel;\n this.currentLabel++;\n }\n if (comparator != null) {\n Collections.sort(node.children, comparator);\n }\n for (Node child : node.children) {\n child.accept(this);\n }\n }",
"@Override\r\n\tpublic boolean isEqual(Node node) {\n\t\treturn false;\r\n\t}",
"@Test\n\tpublic void isChildOrSameTest3()\n\t{\n\t\tNodeList n1=xmlDocument.getElementsByTagName(\"b\");\n\t\tNodeList n2=xmlDocument.getElementsByTagName(\"p\");\n\t\tassertEquals(false,Manipulator.isChildOrSame(n1.item(0),n2.item(0)));\n\t}",
"@Override\n public int compareTo(Node<T> other) {\n if (this == other) {\n return 0;\n }\n\n return this.data.compareTo(other.data);\n }",
"@Override\n\tpublic Object visit(ASTRoot node, Object data)\n\t{\n\t\treturn singleChildValid(node, data);\n\t}",
"@Override\n\tpublic void visit(AllComparisonExpression arg0) {\n\n\t}",
"@Override\n\tpublic void visit(AllComparisonExpression arg0) {\n\t\t\n\t}",
"public static Comparison checkEquality(JexlNode first, JexlNode second) {\n if (first == second) {\n return Comparison.IS_EQUAL;\n } else if (first == null || second == null) {\n return Comparison.notEqual(\"One tree is null: \" + first + \" vs \" + second);\n } else {\n TreeEqualityVisitor visitor = new TreeEqualityVisitor();\n return (Comparison) first.jjtAccept(visitor, second);\n }\n }",
"@Override\n\tpublic void visit(EqualityNode node) {\n\t\tif (Evaluator.checkScope(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (Evaluator.checkAssert(node) == false) {\n\t\t\treturn;\n\t\t}\n\t\t/**\n\t\t * evaluam fiul stang si fiul drept\n\t\t */\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\tEvaluator.evaluate(node.getChild(1));\n\n\t\tString s2 = null;\n\t\tString s1 = null;\n\t\t/**\n\t\t * preluam rezultatele evaluarii celor doi fii\n\t\t */\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\ts1 = Evaluator.variables.get(node.getChild(0).getName());\n\t\t} else {\n\t\t\ts1 = node.getChild(0).getName();\n\t\t}\n\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\ts2 = Evaluator.variables.get(node.getChild(1).getName());\n\t\t} else {\n\t\t\ts2 = node.getChild(1).getName();\n\t\t}\n\n\t\t/**\n\t\t * verificam daca cei doi fii s- au evaluat la aceeasi expresie\n\t\t */\n\t\tif (s1.contentEquals(s2)) {\n\t\t\tnode.setName(\"true\");\n\t\t} else {\n\t\t\tnode.setName(\"false\");\n\t\t}\n\n\t}",
"public static boolean areSimilar(Node n1, Node n2) {\n boolean flag=true;\n int n=n1.children.size();\n if(n!=n2.children.size())\n return false;\n for(int i=0;i<n;i++)\n {\n flag=flag && areSimilar(n1.children.get(i),n2.children.get(i));\n if(flag==false)\n break;\n }\n return flag;\n }",
"@Override\n\tpublic Object visit(SimpleNode node, Object data) {\n\t\treturn node.childrenAccept(this, data);\n\t}",
"public boolean isSameAs( PlanNode other ) {\n if (other == null) return false;\n if (this.getType() != other.getType()) return false;\n if (!ObjectUtil.isEqualWithNulls(this.nodeProperties, other.nodeProperties)) return false;\n if (!this.getSelectors().equals(other.getSelectors())) return false;\n if (this.getChildCount() != other.getChildCount()) return false;\n Iterator<PlanNode> thisChildren = this.getChildren().iterator();\n Iterator<PlanNode> thatChildren = other.getChildren().iterator();\n while (thisChildren.hasNext() && thatChildren.hasNext()) {\n if (!thisChildren.next().isSameAs(thatChildren.next())) return false;\n }\n return true;\n }",
"public boolean equals(LinearNode<T> node) {\t\r\n\t\t\r\n\t\tboolean result = true; \r\n\r\n\t\tif (this.getElement() == node.getElement())\r\n\t\t\tresult = true;\r\n\t\telse\r\n\t\t\tresult = false;\r\n\t\t\r\n\t\treturn result;\r\n\t\r\n\t}",
"public static void main(String[] args) {\n\t\tTreeNode first=new TreeNode(1);\n\t\tfirst.left=new TreeNode(2);\n\t\tfirst.right=new TreeNode(3);\n\t\t\n\t\tTreeNode second=new TreeNode(1);\n\t\tsecond.left=new TreeNode(2);\n\t\tsecond.right=new TreeNode(4);\n\t\tif(isSame(first, second)){\n\t\t\tSystem.out.println(\"Same Tree!\");\n\t\t}else{\n\t\t\tSystem.out.println(\"is Not Same Tree!\");\n\t\t}\n\n\t}",
"@Override\n\tpublic int compareTo(Node o) {\n\t\treturn (int) (this.value - o.value);\n\t}",
"@Override\n public R visit(TriplesSameSubject n, A argu) {\n R _ret = null;\n n.nodeChoice.accept(this, argu);\n return _ret;\n }",
"boolean isSameChildren(int nodeID, DependencyRelations deps){\n check(nodeID);\n if (deps == null)\n throw new IllegalArgumentException(\"the dependency relations is null.\");\n\n if (size_ != deps.size_)\n return false;\n\n Node a = nodes_[nodeID];\n Node b = deps.nodes_[nodeID];\n if (a.size_ != b.size_)\n return false;\n\n for(int i = 0; i < a.size_; i++){\n if (a.children_[i] != b.children_[i])\n return false;\n }\n return true;\n }",
"@Override\n\tpublic void visit(AnyComparisonExpression arg0) {\n\n\t}",
"@Override\n\tpublic void visit(AnyComparisonExpression arg0) {\n\t\t\n\t}",
"public boolean depthFirstTraversal( SubmissionVisitor visitor );",
"public static boolean areSimilar(Node n1, Node n2) {\r\n \r\n //If any condition where children sizes are not same it means shape is not similar so return false\r\n if(n1.children.size() != n2.children.size()){\r\n return false;\r\n }\r\n \r\n boolean res = true;\r\n //To traverse on both trees we use loop in below form, children size are similar if we come here\r\n //so we can use any one for loop traversal length either n1 or n2.\r\n for(int i=0; i<n1.children.size(); i++){\r\n Node child1 = n1.children.get(i);\r\n Node child2 = n2.children.get(i);\r\n \r\n res = areSimilar(child1, child2);\r\n \r\n //if even once a false is encountered it means no further calculation required so return from here\r\n if(res == false){\r\n return false;\r\n }\r\n }\r\n return res;\r\n }",
"private RegressionTreeNode traverseNominalNode(Serializable value) {\n\t\tif(value.equals(this.value)){\n\t\t\treturn this.leftChild;\n\t\t}else{\n\t\t\treturn this.rightChild;\n\t\t}\n\t}",
"public int compareTo(Node otherNode) \r\n\t{\n\t\tif(this.getTravelTime() < otherNode.getTravelTime())\r\n\t\t{\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\telse if(this.getTravelTime() > otherNode.getTravelTime())\r\n\t\t{\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t//EQUAL -- CHECK NODE TYPE\r\n\t\t\tif(otherNode.getNodeType()==1) \t//If other node is destination\r\n\t\t\t{\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\t\t\telse if(this.getNodeType()==1)\r\n\t\t\t{\r\n\t\t\t\treturn -1;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private boolean equals1(BinaryNode<AnyType> t, BinaryNode<AnyType> t1)\r\n\t{\r\n\t\tif(t==null && t1==null)\r\n\t\t\treturn true;\r\n\t\tif((t!=null && t1!=null)&&(t.element==t1.element))\r\n\t\t\treturn (equals1(t.left, t1.left)&& equals1(t.right, t1.right));\r\n\r\n\t\treturn false;\r\n\t}",
"void accept0(ASTVisitor visitor) {\n boolean visitChildren = visitor.visit(this);\n if (visitChildren) {\n // visit children in normal left to right reading order\n acceptChild(visitor, getExpression());\n acceptChildren(visitor, this.typeArguments);\n acceptChild(visitor, getName());\n }\n visitor.endVisit(this);\n }",
"public void equalsCheck() {\n System.out.println(\"\\nTesting TreeNode.equals with simple objects\");\n\n //Create two simple objects for testing\n TreeNode testOne = new TreeNode(new Data(\"Test\", 1) );\n TreeNode testTwo = new TreeNode(new Data(\"Test\", 1) );\n\n //Test that a simple object equals itself.\n assertTrue(testOne.equals(testOne));\n assertTrue(testTwo.equals(testTwo));\n\n // Create to objects simple that should be the same \n assertTrue(testOne.equals(testTwo));\n assertTrue(testTwo.equals(testOne));\n\n //-------------------------------------------------------\n\n System.out.println(\"Testing TreeNode.equals with complex objects\");\n \n //Complex node 1\n TreeNode child1One = new TreeNode(new Data(\"Child1\", 2));\n TreeNode child2One = new TreeNode(new Data(\"Child2\", 3));\n TreeNode child3One = new TreeNode(new Data(\"Child3\", 4));\n testOne.insert(child1One);\n testOne.insert(child2One);\n testOne.insert(child3One);\n\n TreeNode child12One = new TreeNode(new Data(\"Child2Child1\", 5) );\n child2One.insert(child12One);\n\n //Complex node 2\n TreeNode child1Two = new TreeNode(new Data(\"Child1\", 2));\n TreeNode child2Two = new TreeNode(new Data(\"Child2\", 3));\n TreeNode child3Two = new TreeNode(new Data(\"Child3\", 4));\n testTwo.insert(child1Two);\n testTwo.insert(child2Two);\n testTwo.insert(child3Two);\n\n TreeNode child12Two = new TreeNode(new Data(\"Child2Child1\", 5) );\n child2Two.insert(child12Two);\n\n //Test that a complex object equals itself.\n assertTrue(testOne.equals(testOne));\n assertTrue(testTwo.equals(testTwo));\n\n // Create to complex simple that should be the same\n assertTrue(testOne.equals(testTwo));\n assertTrue(testTwo.equals(testOne));\n\n\n // --------------------------------------\n System.out.println(\"Testing TreeNode.equals (not Equal) with complex objects\");\n\n child2One.getNodeData().setId(10);\n \n // Check that to not equal objects return false\n assertFalse(testOne.equals(testTwo));\n assertFalse(testTwo.equals(testOne));\n\n // Test that it return false with different parents\n child2One.getNodeData().setId(1);\n child12One.remove(child12One);\n\n\n // Check that to not equal objects return false\n assertFalse(testOne.equals(testTwo));\n assertFalse(testTwo.equals(testOne));\n\n\n }",
"@Override\n\tpublic Object visit(ASTEquality node, Object data)\n\t{\n\t\treturn visitOperatorNode(node, data);\n\t}",
"public boolean isIdentical(Node node1, Node node2)\r\n\t{\r\n\t\tif(node1 == null && node2 == null)\r\n\t\t\treturn true;\r\n\t\tif(node1 == null || node2 == null)\r\n\t\t\treturn false;\r\n\t\treturn (node1.data == node2.data) && isIdentical(node1.left, node2.left) && isIdentical(node1.right, node2.right);\r\n\t}",
"private static void commonNodesInOrdSuc(Node r1, Node r2)\n {\n Node n1 = r1, n2 = r2;\n \n if(n1==null || n2==null)\n return;\n \n while(n1.left != null)\n n1 = n1.left;\n \n while(n2.left!= null)\n n2 = n2.left;\n \n while(n1!=null && n2!=null)\n {\n if(n1.data < n2.data)\n n1 = inOrdSuc(n1);\n \n else if(n1.data > n2.data)\n n2 = inOrdSuc(n2);\n \n else\n {\n System.out.print(n1.data+\" \"); n1 = inOrdSuc(n1); n2 = inOrdSuc(n2);\n }\n }\n \n System.out.println();\n }",
"public boolean equals(Object other){\n if(other instanceof Node){\n return ((Node)other).getData().equals(this.data);\n } else {\n return false;\n }\n\n }",
"@Override\r\n public boolean equals(Object obj) {\n return this.name.equals(((Node) obj).name);\r\n }",
"@Override\r\n\tpublic int compareTo(Object o) {\n\t\tNode other=(Node)o;\r\n\t\t\r\n\t\t\r\n\t\treturn this.getWeight()-other.getWeight();//正序,\r\n\t}",
"@Override\r\n\tpublic boolean equals(Object obj) {\n\t\tNode another = (Node) obj;\r\n\t\treturn (this.id == another.getId());\r\n\t}",
"public abstract <S> int visitItemIterator(\n Iterator<S> it1, Iterator<S> it2, CompareToAccept<S> compareToAccept);",
"public boolean hasCycle(Node<T> first) {\n Iterator itOne = this.iterator();\n Iterator itTwo = this.iterator();\n try {\n while (true) {\n T one = (T) itOne.next();\n itTwo.next();\n T two = (T) itTwo.next();\n if (one.equals(two)) {\n return true;\n }\n }\n } catch (NullPointerException ex) {\n ex.printStackTrace();\n }\n return false;\n }",
"public static boolean isSameBinaryTreeIterativeApproach(Node x, Node y) {\n\t\tif (x == null && y == null) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// if first tree is empty (& second tree is non-empty), return false\n\t\tif (x == null) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// if second tree is empty (& first tree is non-empty), return false\n\t\tif (y == null) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// create a stack to hold Node pairs\n\t\tDeque<Pair<Node, Node>> stack = new ArrayDeque<>();\n\t\tstack.add(Pair.of(x, y));\n\n\t\t// do till stack is not empty\n\t\twhile (!stack.isEmpty()) {\n\t\t\t// pop top pair from the stack and process it\n\t\t\tx = stack.peek().first;\n\t\t\ty = stack.peek().second;\n\t\t\tstack.poll();\n\n\t\t\t// if value of their root node don't match, return false\n\t\t\tif (x.data != y.data) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// if left subtree of both x and y exists, push their addresses\n\t\t\t// to stack else return false if only one left child exists\n\t\t\tif (x.left != null && y.left != null) {\n\t\t\t\tstack.add(Pair.of(x.left, y.left));\n\t\t\t} else if (x.left != null || y.left != null) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// if right subtree of both x and y exists, push their addresses\n\t\t\t// to stack else return false if only one right child exists\n\t\t\tif (x.right != null && y.right != null) {\n\t\t\t\tstack.add(Pair.of(x.right, y.right));\n\t\t\t} else if (x.right != null || y.right != null) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// if we reach here, both binary trees are identical\n\t\treturn true;\n\t}",
"@Override\n\tdefault boolean equivalentTo(Tree otherTree) {\n\t\tif (this == otherTree)\n\t\t\treturn true;\n\t\t\n\t\tif (otherTree == null || this.getKind() != otherTree.getKind() || this.hashCode() != otherTree.hashCode())\n\t\t\treturn false;\n\t\t\n\t\t\n\t\tCatchTree other = (CatchTree) otherTree;\n\t\t\n\t\tif (!Tree.equivalentTo(this.getBlock(), other.getBlock()))\n\t\t\treturn false;\n\t\t\n\t\tif (!Tree.equivalentTo(this.getParameter(), other.getParameter()))\n\t\t\treturn false;\n\t\t\n\t\tif (!Tree.equivalentTo(this.getType(), other.getType()))\n\t\t\treturn false;\n\t\t\n\t\treturn true;\n\t}",
"@Override\n\tpublic Void visit(Equal eq) {\n\t\tprintIndent(eq.token.getText());\n\t\tindent++;\n\t\teq.left.accept(this);\n\t\teq.right.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}",
"@Override\n public boolean equals(final Object obj) {\n if (obj == null) {\n return false;\n }\n if (getClass() != obj.getClass()) {\n return false;\n }\n return Objects.equals(this.name, ((Node) obj).name);\n }",
"private boolean equalNodes(Node[] arr1, Node[] arr2) {\n // generic tests\n if (!Arrays.equals(arr1, arr2)) {\n return false;\n }\n\n if ((arr1 == null) || (arr1.length == 0)) {\n return true;\n }\n\n // compare paths from each node to root\n int i = 0;\n\n while ((i < arr1.length) && Arrays.equals(NodeOp.createPath(arr1[i], null), NodeOp.createPath(arr2[i], null))) {\n i++;\n }\n\n return i == arr1.length;\n }",
"<R,D> R accept(TreeVisitor<R,D> visitor, D data);",
"@Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (!(o instanceof Node)) {\n return false;\n }\n Node node = (Node) o;\n return Objects.equals(course, node.course) && Objects\n .equals(nextNode, node.nextNode);\n }",
"@Override\n public int compareTo(Node n){\n if(this.getfVal() < n.getfVal())\n return -1;\n if(this.getfVal() > n.getfVal())\n return 1;\n return 0;\n }",
"public static boolean isSameTree(Node nodeOne, Node nodeTwo) {\n if (nodeOne == null && nodeTwo == null) {\n return true;\n }\n if (nodeOne.getData() != nodeTwo.getData()) {\n return false;\n }\n return isSameTree(nodeOne.getRight(), nodeTwo.getRight()) && isSameTree(nodeOne.getLeft(), nodeTwo.getLeft());\n }",
"@Test\n public void baseCaseTriviallyIdenticalGraphsTest() {\n Event a1 = new Event(\"label1\");\n Event a2 = new Event(\"label1\");\n\n EventNode e1 = new EventNode(a1);\n EventNode e2 = new EventNode(a2);\n // If k exceeds the depth of the graph, if they are equivalent to max\n // existing depth then they are equal. Regardless of subsumption.\n testKEqual(e1, e2, 100);\n // A node should always be k-equivalent to itself.\n testKEqual(e1, e1, 100);\n }",
"public void traverse(Node node) {\n //pre order\n //System.out.println(node.data);\n\n if (node.leftChild != null) {\n traverse(node.leftChild);\n }\n //in order\n System.out.println(node.data);\n\n if (node.rightChild != null) {\n traverse(node.rightChild);\n }\n //post order\n //System.out.println(node.data);\n\n\n }",
"public static boolean isEqual(JexlNode first, JexlNode second) {\n return checkEquality(first, second).isEqual();\n }",
"@Override\n\tpublic int compareTo(Node node) {\n\t\treturn minPath - node.minPath;\n\t}",
"private Comparison compareValues(SimpleNode first, SimpleNode second) {\n return Objects.equals(first.jjtGetValue(), second.jjtGetValue()) ? Comparison.IS_EQUAL\n : Comparison.notEqual(\"Node values differ: \" + first.jjtGetValue() + \" vs \" + second.jjtGetValue());\n }",
"@Override\n public int compareTo(final Node that) {\n //Preconditions\n assert that != null : \"that must not be null\";\n\n return this.name.compareTo(that.name);\n }",
"public boolean equivalentTo (BusinessObject other, Callback<BusinessObject, Boolean> ignoreFields) {\n\t\tif (this == other) {\n\t\t\treturn true;\t// no point checking... we know they're the same...\n\t\t}\n\t\tif (getClass() != other.getClass() ||\t// different class... must be different\n\t\t\t\t((children == null) != (other.children == null)) ||\t// one is null while other isn't\n\t\t\t\t(children != null && children.size() != other.children.size())) {\t// both has children, but differing amounts\t\n\t\t\treturn false;\n\t\t} \n\t\tif (children != null) {\n\t\t\tfor (BusinessObject child : children.values()) {\n\t\t\t\t// Not going to bother comparing if callback returns true\n\t\t\t\tif (ignoreFields != null && ignoreFields.call(child)) continue;\t\n\t\t\t\tString name = child.nameProperty().getValue();\n\t\t\t\tBusinessObject otherChild = other.findChildByName(name);\n\t\t\t\tif(otherChild == null || !child.equivalentTo(otherChild, ignoreFields)) return false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"public static int compareOrder(SiblingCountingNode first, SiblingCountingNode second) {\n NodeInfo ow = second;\n \n // are they the same node?\n if (first.isSameNodeInfo(second)) {\n return 0;\n }\n \n NodeInfo firstParent = first.getParent();\n if (firstParent == null) {\n // first node is the root\n return -1;\n }\n \n NodeInfo secondParent = second.getParent();\n if (secondParent == null) {\n // second node is the root\n return +1;\n }\n \n // do they have the same parent (common case)?\n if (firstParent.isSameNodeInfo(secondParent)) {\n int cat1 = nodeCategories[first.getNodeKind()];\n int cat2 = nodeCategories[second.getNodeKind()];\n if (cat1 == cat2) {\n return first.getSiblingPosition() - second.getSiblingPosition();\n } else {\n return cat1 - cat2;\n }\n }\n \n // find the depths of both nodes in the tree\n int depth1 = 0;\n int depth2 = 0;\n NodeInfo p1 = first;\n NodeInfo p2 = second;\n while (p1 != null) {\n depth1++;\n p1 = p1.getParent();\n }\n while (p2 != null) {\n depth2++;\n p2 = p2.getParent();\n }\n // move up one branch of the tree so we have two nodes on the same level\n \n p1 = first;\n while (depth1 > depth2) {\n p1 = p1.getParent();\n if (p1.isSameNodeInfo(second)) {\n return +1;\n }\n depth1--;\n }\n \n p2 = ow;\n while (depth2 > depth1) {\n p2 = p2.getParent();\n if (p2.isSameNodeInfo(first)) {\n return -1;\n }\n depth2--;\n }\n \n // now move up both branches in sync until we find a common parent\n while (true) {\n NodeInfo par1 = p1.getParent();\n NodeInfo par2 = p2.getParent();\n if (par1 == null || par2 == null) {\n throw new NullPointerException(\"DOM/JDOM tree compare - internal error\");\n }\n if (par1.isSameNodeInfo(par2)) {\n return ((SiblingCountingNode)p1).getSiblingPosition() -\n ((SiblingCountingNode)p2).getSiblingPosition();\n }\n p1 = par1;\n p2 = par2;\n }\n }",
"private boolean compareStructure1(BinaryNode<AnyType> t, BinaryNode<AnyType> t1)\r\n\t{\r\n\t\tif(t==null && t1==null)\r\n\t\t\treturn true;\r\n\t\tif(t!=null && t1!=null)\r\n\t\t\treturn (compareStructure1(t.left, t1.left)&& compareStructure1(t.right, t1.right));\r\n\t\treturn false;\r\n\t}",
"public void inOrderDepthFirstTraversal(NodeVisitor action){\n\t\tif(this.getElement()==null)\n\t\t\treturn;\n\t\t\n\t\tthis.left.inOrderDepthFirstTraversal(action);\n\t\taction.visit(this.getElement());\n\t\tthis.right.inOrderDepthFirstTraversal(action);\n\t}",
"public boolean equal(Tree T) {\n if(T.count() != count()) {\n return false;\n } else {\n return equalNodes(root,T.root);\n }\n }",
"public MType visit(CompareExpression n, MType argu) {\n \tMType _ret = new MBoolean();\n \tn.f0.accept(this, argu);\n \tn.f2.accept(this, argu);\n \treturn _ret;\n }",
"@Override\n\tpublic void accept(NodeVisitor visitor) {\n\t\tvisitor.visit(this);\n\t}",
"public static void main(String[] args) {\n\n Node<Integer> node1 = new Node<>(1);\n Node<Integer> node2 = new Node<>(2);\n Node<Integer> node3 = new Node<>(3);\n Node<Integer> node4 = new Node<>(4);\n\n node1.setLeftChild(node2);\n node1.setRightChild(node3);\n\n node2.setLeftChild(node4);\n\n node3.setLeftChild(new Node<>(5));\n node3.setRightChild(new Node<>(6));\n\n node4.setLeftChild(new Node<>(7));\n node4.setRightChild(new Node<>(8));\n\n traverse(node1);\n }",
"NodeIterable(Node firstChild) {\n next = firstChild;\n }",
"void accept0(ASTVisitor visitor) {\r\n\t\tboolean visitChildren = visitor.visit(this);\r\n\t\tif (visitChildren) {\r\n\t\t\t// visit children in normal left to right reading order\r\n\t\t\tacceptChild(visitor, getExpression());\r\n\t\t\tacceptChildren(visitor, newArguments);\r\n\t\t\tacceptChildren(visitor, constructorArguments);\r\n\t\t\tacceptChildren(visitor, baseClasses);\r\n\t\t\tacceptChildren(visitor, declarations);\r\n\t\t}\r\n\t\tvisitor.endVisit(this);\r\n\t}",
"@Test\n public void treeGraphsTest() throws Exception {\n // Construct a tree, rooted at INITIAL, with two \"a\" children, both of\n // which have different \"b\" and \"c\" children.\n String traceStr = \"1,0 a\\n\" + \"2,0 b\\n\" + \"1,1 c\\n\" + \"--\\n\"\n + \"1,0 a\\n\" + \"2,0 b\\n\" + \"1,1 c\\n\";\n TraceParser parser = genParser();\n ArrayList<EventNode> parsedEvents = parser.parseTraceString(traceStr,\n getTestName().getMethodName(), -1);\n DAGsTraceGraph inputGraph = parser\n .generateDirectPORelation(parsedEvents);\n exportTestGraph(inputGraph, 0);\n\n // This returns a set with one node -- INITIAL. It will have two\n // children -- the two \"a\" nodes, which should be k-equivalent for all\n // k.\n EventNode initNode = inputGraph.getDummyInitialNode();\n\n List<Transition<EventNode>> initNodeTransitions = initNode\n .getAllTransitions();\n EventNode firstA = initNodeTransitions.get(0).getTarget();\n EventNode secondA = initNodeTransitions.get(1).getTarget();\n for (int k = 1; k < 4; k++) {\n testKEqual(firstA, secondA, k);\n }\n\n // In this tree the firstA and secondA should _not_ be 1-equivalent (one\n // has children {b,c}, while the other has children {b,d}), but\n // they are still 0-equivalent.\n traceStr = \"1,0 a\\n\" + \"2,0 b\\n\" + \"1,1 c\\n\" + \"--\\n\" + \"1,0 a\\n\"\n + \"2,0 b\\n\" + \"1,1 d\\n\";\n parser = genParser();\n parsedEvents = parser.parseTraceString(traceStr, getTestName()\n .getMethodName(), -1);\n inputGraph = parser.generateDirectPORelation(parsedEvents);\n exportTestGraph(inputGraph, 1);\n\n initNode = inputGraph.getDummyInitialNode();\n initNodeTransitions = initNode.getAllTransitions();\n firstA = initNodeTransitions.get(0).getTarget();\n secondA = initNodeTransitions.get(1).getTarget();\n testKEqual(firstA, secondA, 1);\n testNotKEqual(firstA, secondA, 2);\n }",
"void traverse2() {\n BTNode node = root, prev = null, next;\n while (node != null) {\n if (prev == node.parent) {\n if (node.left != null) {\n next = node.left;\n }\n else if (node.right != null) {\n next = node.right;\n }\n else {\n next = node.parent;\n }\n } else if (prev == node.left) {\n if (node.right != null) {\n next = node.right;\n }\n else {\n next = node.parent;\n }\n } else {\n next = node.parent;\n }\n prev = node;\n node = next;\n }\n }",
"void visit(final Compare compare);",
"@Override\n\tpublic Object visit(SimpleNode node, Object data)\n\t{\n\t\t//Delegate to the appropriate class\n\t\treturn node.jjtAccept(this, data);\n\t}",
"private BinaryNode<AnyType> findParentNode1(BinaryNode<AnyType> t, AnyType x)\r\n\t{\r\n\t\tif(t == null)\r\n\t\t\treturn null;\r\n\t\telse if(t == root && (x.compareTo(root.element)== 0))\r\n\t\t\treturn t;\r\n\t\telse\r\n\t\t{\r\n\t\t\tif((t.left!= null && (x.compareTo(t.left.element) == 0)) || (t.right!= null && (x.compareTo(t.right.element) == 0)))\r\n\t\t\t\treturn t;\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tBinaryNode<AnyType> temp = findParentNode1(t.left,x);\r\n\t\t\t\tif(temp == null)\r\n\t\t\t\t\treturn findParentNode1(t.right,x);\r\n\t\t\t\telse\r\n\t\t\t\t\treturn temp;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public boolean visit(CommonContentBase node) {\n return visit((AnnotatedBase)node);\n }",
"@org.junit.Test\n public void constrCompelemNodeid1() {\n final XQuery query = new XQuery(\n \"for $x in <a/>, $y in element elem {$x} return exactly-one($y/a) is $x\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n assertBoolean(false)\n );\n }",
"@Override\npublic boolean fjern(T verdi) {\n Node<T> curr = hode;\n while (curr != null) {\n if (curr.verdi.equals(verdi)) {\n if (antall == 1) {\n hode = hale = null;\n } else if (curr == hode) {\n hode = hode.neste;\n hode.forrige = null;\n } else if (curr == hale) {\n hale = hale.forrige;\n hale.neste = null;\n } else {\n curr.forrige.neste = curr.neste;\n curr.neste.forrige = curr.forrige;\n }\n antall--;\n endringer++;\n return true;\n }\n curr = curr.neste;\n }\n return false;\n}",
"public boolean equalNodes(Node N, Node M) {\n if(N == null && M == null) return true;\n if((N == null && M != null)||(N != null && M == null)) return false;\n if(N.getData() != M.getData()) return false;\n if((!equalNodes(N.getRight(), M.getRight())|| (!equalNodes(N.getLeft(), M.getLeft())))) return false;\n\n return true;\n }",
"private static boolean areLeafsEquivalent(JavaTree leftNode, JavaTree rightNode) {\n if (leftNode instanceof IdentifierTree) {\n return Objects.equal(((IdentifierTree) leftNode).name(), ((IdentifierTree) rightNode).name());\n } else if (leftNode instanceof PrimitiveTypeTree) {\n return Objects.equal(((PrimitiveTypeTree) leftNode).keyword().text(), ((PrimitiveTypeTree) rightNode)\n .keyword().text());\n } else if (leftNode instanceof SyntaxToken) {\n return Objects.equal(((SyntaxToken) leftNode).text(), ((SyntaxToken) rightNode).text());\n } else if (leftNode.is(Tree.Kind.INFERED_TYPE)) {\n return rightNode.is(Tree.Kind.INFERED_TYPE);\n } else {\n throw new IllegalArgumentException();\n }\n }",
"@Override\n\tpublic boolean equals(Object obj) {\n\tif (this.id == ((Node<?>) obj).getId()) \n\t\t\treturn true;\n\t\treturn false;\n\t}",
"private Node serchNode(E input, Node current) {\n Node node = null;\n if (current.value.equals(input)) {\n node = current;\n } else {\n List<Node> children = current.children;\n for (Node child : children) {\n node = serchNode(input, child);\n if (node != null) {\n break;\n }\n }\n }\n return node;\n }",
"@Test\n public void testEqualTo() {\n System.out.println(\"AbsolutePathNode - testEqualTo\");\n final AbsolutePathNode instance1 = new AbsolutePathNode();\n final AbsolutePathNode instance2 = new AbsolutePathNode();\n final TestNode testInstance = TestNode.instance;\n assertTrue(instance1.equalTo(instance2));\n assertFalse(instance1.equalTo(testInstance));\n }",
"@Test\n public void whenAddTwoNodesThenHasNextTrue() {\n tree.addChild(nodeOne, \"1\");\n nodeOne.addChild(nodeTwo, \"2\");\n Iterator iter = tree.iterator();\n assertThat(iter.hasNext(), is(true));\n }",
"protected boolean traverseThisNode(iNamedObject node)\n\t{\n\t\treturn true;\n\t}",
"public boolean equals(AsNode other) {\n\t\treturn this.state.getHash() == other.state.getHash();\n\t}",
"public boolean equals(Node testNode) {\r\n\t\tif(this.getID().equals(testNode.getID())) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"Node commonAncestor(Node one, Node two);",
"public void visit(EqualityExpression n) {\n n.f0.accept(this);\n n.f1.accept(this);\n }",
"public int compareTo(VNode other)\n {\n if (other==null) \n return 1; // this > null \n \n return _nodeVRL.compareTo(other.getLocation()); \n }",
"public int compareTo(Node otherNode) { \r\n if (TotalDistance < otherNode.TotalDistance) {\r\n return -1;\r\n } else if (TotalDistance > otherNode.TotalDistance) {\r\n return 1;\r\n } else {\r\n return 0;\r\n }\r\n }",
"private static <N> void postOrderTraversal(TreeNode<N> node, TreeNodeVisitor<N> visitor) throws TreeNodeVisitException {\r\n\t\tif(node.hasChildren()){\r\n\t\t\tfor(TreeNode<N> childNode : node.getChildren()){\r\n\t\t\t\tpostOrderTraversal(childNode, visitor);\r\n\t\t\t}\r\n\t\t\tvisitor.visitNode(node);\r\n\t\t}else{\r\n\t\t\tvisitor.visitNode(node);\r\n\t\t}\r\n\t}",
"private static <N> void preOrderTraversal(TreeNode<N> node, TreeNodeVisitor<N> visitor) throws TreeNodeVisitException {\r\n\t\t\r\n\t\tvisitor.visitNode(node);\r\n\t\r\n\t\tif(node.hasChildren()){\r\n\t\t\tfor(TreeNode<N> childNode : node.getChildren()){\r\n\t\t\t\tpreOrderTraversal(childNode, visitor);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"@Override\r\n \tpublic final void accept(IASTNeoVisitor visitor) {\r\n \t\tassertNotNull(visitor);\r\n \t\t\r\n \t\t// begin with the generic pre-visit\r\n \t\tif(visitor.preVisit(this)) {\r\n \t\t\t// dynamic dispatch to internal method for type-specific visit/endVisit\r\n \t\t\taccept0(visitor);\r\n \t\t}\r\n \t\t// end with the generic post-visit\r\n \t\tvisitor.postVisit(this);\r\n \t}",
"@Override\r\n\tpublic boolean accept(Node node) {\r\n\t\tif(node instanceof Div || node instanceof TableTag || node instanceof TableRow || node instanceof TableColumn)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}",
"@Override\n public R visit(GraphNode n, A argu) {\n R _ret = null;\n n.nodeChoice.accept(this, argu);\n return _ret;\n }",
"public static int isEqual(MyNode root0, MyNode root1) {\r\n int result = 0;\r\n\r\n if (root0 == null && root1 == null) {\r\n return 1;\r\n } else {\r\n if (root0 != null && root1 != null) {\r\n if (root0.getValue() == root1.getValue()) {\r\n if (isEqual(root0.getLeft(), root0.getLeft()) == 1) {\r\n result = isEqual(root0.getRight(), root1.getRight());\r\n }\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n }",
"private static boolean isItVisted(Node node) {\n\t\t\n\t\tboolean areNodesEqual = false;\n\t\tfor (Node temp : nodesCovered) {\n\t\t\tif(choice==1){\n\t\t\t\tif (node.count == temp.count) \t\t\t\t{\n\t\t\t\t\tif (areTheyEqual(temp.stateSpace, node.stateSpace)) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t }\n\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\tif (node.manhattanDist == temp.manhattanDist) {\n\t\t\t\t\t\tif (areTheyEqual(temp.stateSpace, node.stateSpace)) {\n\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}\n\t\treturn areNodesEqual;\n\t}",
"private Node getSuccessorBasedOnMin(Node node) {\n Node successor = localMinAndItsParent(node)[0];\n Node successorParent = localMinAndItsParent(node)[1];\n if (successor != node.rightChild) {\n successorParent.leftChild = successor.rightChild;\n successor.rightChild = node.rightChild;\n }\n return successor;\n }",
"private boolean contains(Node node, Object o) {\n if (node == null) {\n return false;\n }\n\n if (o.equals(node.value)) {\n return true;\n }\n\n if (((Comparable)o).compareTo(node.value) < 0) {\n return contains(node.leftChild, o);\n } else {\n return contains(node.rightChild, o);\n }\n }",
"@Override\n\tpublic int compareTo(AsNode other) {\n\t\tif(this.state.getF() < other.state.getF()) return -1;\n\t\tif(this.state.getF() > other.state.getF()) return 1;\n\t\treturn 0;\n\t}",
"private static boolean isSameTree(Node currentT1Node, Node currentT2Node) {\n\t\tif (currentT1Node != null && currentT2Node != null) {\n\t\t\tboolean isLeftSame = isSameTree(currentT1Node.leftChild, currentT2Node.leftChild);\n\t\t\tboolean isRightSame = isSameTree(currentT1Node.rightChild, currentT2Node.rightChild);\n\n\t\t\t// If either is false it means that the trees differ so we return immediately\n\t\t\tif (!isLeftSame || !isRightSame) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// Otherwise we compare the nodes in the current value.\n\t\t\tif (currentT1Node.value == currentT2Node.value) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\t// If one current Tn node is null and the other isn't then the trees are not the same.\n\t\tif ((currentT1Node == null && currentT2Node != null) || (currentT1Node != null && currentT2Node == null)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true; // We have hit the bottom of both trees, both T1 and T2 are null therefore it still matches.\n\t}",
"@Override\n public R visit(NodeList n, A argu) {\n R _ret = null;\n for (Enumeration<Node> e = n.elements(); e.hasMoreElements();) {\n e.nextElement().accept(this, argu);\n }\n return _ret;\n }",
"void accept0(ASTVisitor visitor) {\n boolean visitChildren = visitor.visit(this);\n if (visitChildren) {\n // visit children in normal left to right reading order\n acceptChildren(visitor, initializers);\n acceptChild(visitor, getExpression());\n acceptChildren(visitor, updaters);\n acceptChild(visitor, getBody()); }\n visitor.endVisit(this); }",
"public static int CmpAscendancy( TaxoNode node1, TaxoNode node2 ) {\r\n\t\tif( node1 == null || node2 == null )\r\n\t\t\tthrow new RuntimeException( \"Bad node passed to CmpAscendancy\" );\r\n\t\tTaxoNode par = node1.parent;\r\n\t\twhile( par != null ) {\r\n\t\t\tif( par == node2 )\r\n\t\t\t\treturn 1; // Tag 2 is ascendant of tag1\r\n\t\t\tpar = par.parent;\r\n\t\t}\r\n\t\t// Okay, so tag2 is not above tag1. Look the other way\r\n\t\tpar = node2.parent;\r\n\t\twhile( par != null ) {\r\n\t\t\tif( par == node1 )\r\n\t\t\t\treturn -1; // Tag1 is ascendant of tag2\r\n\t\t\tpar = par.parent;\r\n\t\t}\r\n\t\t// If we got here, the nodes are not related\r\n\t\treturn 0;\r\n\t}"
] | [
"0.62953377",
"0.5965739",
"0.59408784",
"0.57475615",
"0.56019956",
"0.55888176",
"0.5481321",
"0.54702795",
"0.5342518",
"0.5244528",
"0.5244453",
"0.5223955",
"0.5168766",
"0.5147617",
"0.5145105",
"0.5144302",
"0.51175946",
"0.511419",
"0.5112733",
"0.5100099",
"0.5089133",
"0.5083892",
"0.507385",
"0.5059917",
"0.5050788",
"0.5043854",
"0.5006242",
"0.49877232",
"0.49820378",
"0.4887284",
"0.48863247",
"0.48822886",
"0.48765546",
"0.4867295",
"0.48600012",
"0.48558065",
"0.48476553",
"0.48476264",
"0.4847087",
"0.48375404",
"0.48282614",
"0.48199",
"0.481117",
"0.48053992",
"0.48041567",
"0.47946158",
"0.47893468",
"0.478591",
"0.47825563",
"0.47810248",
"0.477349",
"0.4767546",
"0.47639453",
"0.475599",
"0.47473708",
"0.47344103",
"0.4730936",
"0.47297907",
"0.4729496",
"0.4724998",
"0.47137764",
"0.4710631",
"0.47105092",
"0.47083652",
"0.47059327",
"0.47019047",
"0.46999747",
"0.4683172",
"0.46808627",
"0.4677937",
"0.46752718",
"0.4671674",
"0.46672016",
"0.46569824",
"0.46524572",
"0.46513587",
"0.46488962",
"0.46468943",
"0.46456674",
"0.4645094",
"0.46446",
"0.46430904",
"0.46363455",
"0.4633597",
"0.46178165",
"0.46175045",
"0.46144652",
"0.46111432",
"0.4609956",
"0.45991912",
"0.4597955",
"0.45915595",
"0.45907927",
"0.4590714",
"0.45837048",
"0.45784435",
"0.45702973",
"0.45626545",
"0.45619497",
"0.4558557"
] | 0.53426373 | 8 |
Compare the values of both node. | private Comparison compareValues(SimpleNode first, SimpleNode second) {
return Objects.equals(first.jjtGetValue(), second.jjtGetValue()) ? Comparison.IS_EQUAL
: Comparison.notEqual("Node values differ: " + first.jjtGetValue() + " vs " + second.jjtGetValue());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int compare(Object nodes1, Object nodes2) {\r\n\t\tdouble w1 = 0.0;\r\n\t\tIterator it = ((Set)nodes1).iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tDouble v = ((Node) it.next()).getWeightValueUnsynchronized(\"value\");\r\n\t\t\tw1 += (v==null ? 1.0 : v.doubleValue());\r\n\t\t}\r\n\t\tdouble w2 = 0.0;\r\n\t\tit = ((Set)nodes2).iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tDouble v = ((Node) it.next()).getWeightValueUnsynchronized(\"value\");\r\n\t\t\tw2 += (v==null ? 1.0 : v.doubleValue());\r\n\t\t}\r\n\t\tint res = Double.compare(w2, w1);\r\n\t\tif (res==0) { // oops, must figure out how they differ\r\n\t\t\tSet ns1 = (Set) nodes1;\r\n\t\t\tSet ns2 = (Set) nodes2;\r\n\t\t\tint ns1sz = ns1.size();\r\n\t\t\tint ns2sz = ns2.size();\r\n\t\t\tif (ns1sz>ns2sz) return -1; // more nodes, the better\r\n\t\t\telse if (ns1sz<ns2sz) return 1;\r\n\t\t\t// go through the *very* expensive nodes discrimination\r\n\t\t\tIterator it1 = ns1.iterator();\r\n\t\t\tIntSet nis1 = new IntSet();\r\n\t\t\twhile (it1.hasNext()) {\r\n\t\t\t\tNode n = (Node) it1.next();\r\n\t\t\t\tnis1.add(new Integer(n.getId()));\r\n\t\t\t}\r\n\t\t\tIterator it2 = ns2.iterator();\r\n\t\t\tIntSet nis2 = new IntSet();\r\n\t\t\twhile (it2.hasNext()) {\r\n\t\t\t\tNode n = (Node) it2.next();\r\n\t\t\t\tnis2.add(new Integer(n.getId()));\r\n\t\t\t}\r\n\t\t\treturn nis2.compareTo(nis1);\r\n\t\t}\r\n\t\treturn res;\r\n\t}",
"private Comparison checkEquality(SimpleNode node1, SimpleNode node2) {\n // Compare the classes.\n Comparison comparison = compareClasses(node1, node2);\n if (!comparison.isEqual()) {\n return comparison;\n }\n\n // Compare the values.\n comparison = compareValues(node1, node2);\n if (!comparison.isEqual()) {\n return comparison;\n }\n\n // Compare the images.\n comparison = compareImages(node1, node2);\n if (!comparison.isEqual()) {\n return comparison;\n }\n\n // Compare the children.\n return compareChildren(node1, node2);\n }",
"@Override\n\t\t\tpublic int compare(ListNode o1, ListNode o2) {\n\t\t\t\treturn o1.val - o2.val;\n\t\t\t}",
"public int compare(Object o1, Object o2) {\r\n Node n1 = (Node) o1;\r\n Node n2 = (Node) o2;\r\n\t\tDouble n1wD = n1.getWeightValueUnsynchronized(\"value\"); // used to be n1.getWeightValue(\"value\");\r\n\t\tDouble n2wD = n2.getWeightValueUnsynchronized(\"value\"); // used to be n2.getWeightValue(\"value);\r\n\t\tdouble n1w = n1wD == null ? 1.0 : n1wD.doubleValue();\r\n\t\tdouble n2w = n2wD == null ? 1.0 : n2wD.doubleValue();\r\n\t\tif (n1w>n2w) return -1;\r\n\t\telse if (Double.compare(n2w, n1w)==0) {\r\n\t\t\tdouble n1sz = n1.getNborsUnsynchronized().size();\r\n\t\t\tdouble n2sz = n2.getNborsUnsynchronized().size();\r\n\t\t\ttry {\r\n\t\t\t\tdouble n1szaux = n1.getNborWeights(\"value\");\r\n\t\t\t\tdouble n2szaux = n2.getNborWeights(\"value\");\r\n\t\t\t\tn1sz = n1szaux;\r\n\t\t\t\tn2sz = n2szaux;\r\n\t\t\t}\r\n\t\t\tcatch (ParallelException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tif (n1sz < n2sz) return -1;\r\n\t\t\telse if (n1sz == n2sz) {\r\n\t\t\t\tif (n1.getId() < n2.getId())return -1;\r\n\t\t\t\telse if (n1.getId() == n2.getId())return 0;\r\n\t\t\t\telse return 1;\r\n\t\t\t}\r\n\t\t\telse return 1;\r\n\t\t}\r\n\t\telse return 1;\r\n }",
"public int compare(Object o1, Object o2) {\r\n Node n1 = (Node) o1;\r\n Node n2 = (Node) o2;\r\n\t\tDouble n1wD = n1.getWeightValueUnsynchronized(\"value\"); // used to be n1.getWeightValue(\"value\");\r\n\t\tDouble n2wD = n2.getWeightValueUnsynchronized(\"value\"); // used to be n2.getWeightValue(\"value);\r\n\t\tdouble n1w = n1wD == null ? 1.0 : n1wD.doubleValue();\r\n\t\tdouble n2w = n2wD == null ? 1.0 : n2wD.doubleValue();\r\n\t\tif (n1w<n2w) return -1;\r\n\t\telse if (Double.compare(n2w, n1w)==0) {\r\n\t\t\tdouble n1sz = n1.getNborsUnsynchronized().size();\r\n\t\t\tdouble n2sz = n2.getNborsUnsynchronized().size();\r\n\t\t\ttry {\r\n\t\t\t\tdouble n1szaux = n1.getNborWeights(\"value\");\r\n\t\t\t\tdouble n2szaux = n2.getNborWeights(\"value\");\r\n\t\t\t\tn1sz = n1szaux;\r\n\t\t\t\tn2sz = n2szaux;\r\n\t\t\t}\r\n\t\t\tcatch (ParallelException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tif (n1sz > n2sz) return -1;\r\n\t\t\telse if (n1sz == n2sz) {\r\n\t\t\t\tif (n1.getId() < n2.getId())return -1;\r\n\t\t\t\telse if (n1.getId() == n2.getId())return 0;\r\n\t\t\t\telse return 1;\r\n\t\t\t}\r\n\t\t\telse return 1;\r\n\t\t}\r\n\t\telse return 1;\r\n }",
"@Override\n public double similarity(\n final Integer value1, final Integer value2) {\n\n // The value of nodes is an integer...\n return 1.0 / (1.0 + Math.abs(value1 - value2));\n }",
"public int compare(ListNode o1, ListNode o2) {\n return o1.val-o2.val;\n }",
"private boolean compare(TreeNode leftRoot, TreeNode rightRoot) {\n // Good shortcut\n //if(left==null || right==null) return left==right;\n if (leftRoot == null && rightRoot == null) return true;\n if (leftRoot == null || rightRoot == null) return false;\n if (leftRoot.val != rightRoot.val) return false;\n boolean isOutersEqual = compare(leftRoot.left, rightRoot.right);\n boolean isInnersEqual = compare(leftRoot.right, rightRoot.left);\n return isOutersEqual && isInnersEqual;\n }",
"@Override\r\n\t\tpublic boolean isEqualNode(Node arg)\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}",
"@Override\r\n public int compare(Node x, Node y)\r\n {\n if (x.getD() < y.getD())\r\n {\r\n return -1;\r\n }\r\n else if (x.getD() > y.getD())\r\n {\r\n return 1;\r\n }\r\n return 0;\r\n }",
"@Override\r\n public int compare(Node o1, Node o2) {\r\n\r\n ArrayList<Litteral> solution1 = o1.getValeur();\r\n ArrayList<Litteral> solution2 = o2.getValeur();\r\n int satisfaitClauseNumberS1 = satInstance.satisfaitClauseNumber(solution1);\r\n int satisfaitClauseNumberS2 = satInstance.satisfaitClauseNumber(solution2);\r\n return satisfaitClauseNumberS2 - satisfaitClauseNumberS1;\r\n\r\n }",
"public boolean nodeValueCompare(Node destinationNode, Node sourceNode, String messageTitle, Check check, TestConfigData test)\n\t{\n\t\tboolean result = true;\n\t\tboolean checkAttribute = false;\n\t\tElement sourceElement = (Element) sourceNode;\n\t\tString sourceAttribute = \"\";\n\t\tif (check.SourcePath.trim().indexOf(\")\") == (check.SourcePath.trim().length() -1)) \n\t\t{\n\t\t\tcheckAttribute = true;\n\t\t\tsourceAttribute = check.SourcePath.substring(check.SourcePath.indexOf(\"(\")+1, check.SourcePath.indexOf(\")\"));\t\t\t\n\t\t}\n\t\tif (sourceNode != null && destinationNode != null)\n\t\t{\t\n\t\t\tif (check.Type == null)\n\t\t\t{\t\n\t\t\t\tdouble sourceValue;\n\t\t\t\tdouble destinationValue = destinationNode.getText() == \"\" ? 0 : Double.parseDouble(destinationNode.getText());\n\t\t\t\tif (checkAttribute) sourceValue = sourceElement.attributeValue(sourceAttribute) == \"\" ? 0 : Double.parseDouble(sourceElement.attributeValue(sourceAttribute));\n\t\t\t\telse sourceValue = sourceNode.getText() == \"\" ? 0 : Double.parseDouble(sourceNode.getText());\t\t\t\t\t\t\t\t\t\n\t\t\t\tif (destinationValue != sourceValue)\n\t\t\t\t{\n\t\t\t\t\tif (checkAttribute) logger.error(messageTitle + check.DestinationPath + \"\\t\" + check.SourcePath + \"\\tdata deosn't match for \" + test.DestNodeSpecifiedDefinitions + \"/\" + check.DestinationPath + \": \"\n\t\t\t\t\t\t\t+ destinationNode.getText() + \",\" + sourceElement.attributeValue(sourceAttribute));\t\n\t\t\t\t\telse\tlogger.error(messageTitle + check.DestinationPath + \"\\t\" + check.SourcePath + \"\\tdata deosn't match for \" + test.DestNodeSpecifiedDefinitions + \"/\" + check.DestinationPath + \": \"\n\t\t\t\t\t\t\t+ destinationNode.getText() + \",\" + sourceNode.getText());\t\t\t\t\t\t\t\t\n\t\t\t\t\tresult = false;\n\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}else\n\t\t\t{\n\t\t\t\tString destinationValue = destinationNode.getText();\n\t\t\t\tString sourceValue;\n\t\t\t\tif (checkAttribute) sourceValue = sourceElement.attributeValue(sourceAttribute);\n\t\t\t\telse\tsourceValue = sourceNode.getText();\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (!destinationValue.equals(sourceValue)) \n\t\t\t\t{\n\t\t\t\t\tlogger.error(messageTitle + check.DestinationPath + \"\\t\" + check.SourcePath + \"\\tdata deosn't match for \" + test.DestNodeSpecifiedDefinitions + \": \"\n\t\t\t\t\t\t\t+ destinationNode.getText() + \",\" + sourceValue);\t\t\n\t\t\t\t\tresult = false;\n\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\t\t\t\t\t\t\t\t\t\n\t\t}else if (sourceNode == null && destinationNode == null) ;\n\t\t\t else if (sourceNode == null) \n\t\t\t\t {\n\t\t\t\t \t if (!destinationNode.getText().trim().equals(\"\"))\n\t\t\t\t \t {\n\t\t\t\t \t\t result = false;\n\t\t\t\t\t\t logger.error(messageTitle + test.Name + \"\\t\" + check.DestinationPath + \"\\t source Value can't be same with destination value. \\t Source Node Value is null, but Destination Node Value is \" + destinationNode.getText());\n\t\t\t\t \t }\t\t\t\t \t \n\t\t\t\t }\n\t\t\t \t else \n\t\t\t \t {\n\t\t\t \t\t String sourceValue;\n\t\t\t\t\t if (checkAttribute) sourceValue = sourceElement.attributeValue(sourceAttribute).trim();\n\t\t\t\t\t else\tsourceValue = sourceNode.getText().trim();\t\n\n\t\t\t \t\t if (!sourceValue.equals(\"\"))\n\t\t\t \t\t {\n\t\t\t \t\t\t result = false;\n\t\t\t \t\t\t logger.error(messageTitle + test.Name + \"\\t\" + check.DestinationPath + \"\\t source Value can't be same with destination value. \\t Source Node value is \" + sourceValue + \"\\t Destination Node Value is \" + destinationNode);\n\t\t\t \t\t }\t\t\t \t\t \n\t\t\t \t }\n\t\treturn result;\n\t}",
"@Override\n\tpublic int compareTo(Node o) {\n\t\treturn (int) (this.value - o.value);\n\t}",
"public static Comparison checkEquality(JexlNode first, JexlNode second) {\n if (first == second) {\n return Comparison.IS_EQUAL;\n } else if (first == null || second == null) {\n return Comparison.notEqual(\"One tree is null: \" + first + \" vs \" + second);\n } else {\n TreeEqualityVisitor visitor = new TreeEqualityVisitor();\n return (Comparison) first.jjtAccept(visitor, second);\n }\n }",
"@Override\r\n\t\tpublic boolean isSameNode(Node other)\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}",
"private Comparison compareChildren(SimpleNode first, SimpleNode second) {\n List<SimpleNode> firstChildren = getChildren(first);\n List<SimpleNode> secondChildren = getChildren(second);\n\n // Compare the sizes.\n if (firstChildren.size() != secondChildren.size()) {\n return Comparison.notEqual(\"Num children differ: \" + firstChildren + \" vs \" + secondChildren);\n }\n\n // Look for an equivalent of each child, visiting each child recursively when needed.\n Comparison currentComparison = null;\n for (SimpleNode firstChild : firstChildren) {\n for (int i = 0; i < secondChildren.size(); i++) {\n SimpleNode secondChild = secondChildren.get(i);\n currentComparison = (Comparison) firstChild.jjtAccept(this, secondChild);\n if (currentComparison.isEqual()) {\n secondChildren.remove(i);\n break;\n }\n }\n\n if (!currentComparison.isEqual()) {\n return Comparison.notEqual(\"Did not find a matching child for \" + firstChild + \" in \" + secondChildren + \": \" + currentComparison.getReason());\n }\n }\n\n return Comparison.IS_EQUAL;\n }",
"public boolean equals(ListNode one, ListNode two){\n\t \t\treturn one.val == two.val;\n\t \t}",
"public boolean differ(Object a, Object b) {\n Node set1 = find(getNode(a));\n Node set2 = find(getNode(b));\n\n return set1 != set2;\n }",
"@Override\n public int compareTo(Node<T> other) {\n if (this == other) {\n return 0;\n }\n\n return this.data.compareTo(other.data);\n }",
"public static int graphNodeComparison(Vector3D targetNodePosition, GraphNode a, GraphNode b) {\n Vector3D aPos = getPositionOf(a);\n Vector3D bPos = getPositionOf(b);\n\n float aDiff = Vector3D.getDistanceBetween(aPos, targetNodePosition);\n float bDiff = Vector3D.getDistanceBetween(bPos, targetNodePosition);\n\n float diff = aDiff - bDiff;\n int intDiff = Math.round(diff * DIFF_SCALE);\n\n if (intDiff == 0)\n intDiff = (int)Math.signum(diff);\n\n return intDiff;\n }",
"private boolean equalNodes(Node[] arr1, Node[] arr2) {\n // generic tests\n if (!Arrays.equals(arr1, arr2)) {\n return false;\n }\n\n if ((arr1 == null) || (arr1.length == 0)) {\n return true;\n }\n\n // compare paths from each node to root\n int i = 0;\n\n while ((i < arr1.length) && Arrays.equals(NodeOp.createPath(arr1[i], null), NodeOp.createPath(arr2[i], null))) {\n i++;\n }\n\n return i == arr1.length;\n }",
"public int compareWriteLockValues(Object value1, Object value2) {\r\n long longValue1 = ((Number)value1).longValue();\r\n long longValue2 = ((Number)value2).longValue();\r\n if ( longValue1 < longValue2 ) return -1;\r\n if ( longValue1 == longValue2 ) return 0;\r\n return 1;\r\n }",
"@Override\n\t\tpublic int compare(PathfindingNode object1, PathfindingNode object2) \n\t\t{\n\t\t\treturn _totalCosts.get(object1) - _totalCosts.get(object2);\n\t\t}",
"@Override\r\n\tpublic boolean isEqual(Node node) {\n\t\treturn false;\r\n\t}",
"@Override\n public int compareTo(Node n){\n if(this.getfVal() < n.getfVal())\n return -1;\n if(this.getfVal() > n.getfVal())\n return 1;\n return 0;\n }",
"@Override\r\n public int compare(searchNode e1, searchNode e2) {\r\n //if node 1 has a a lower FScore than node 2, return -1 which will put e1 BEFORE e2\r\n if (e1.getFScore() < e2.getFScore()) {\r\n return -1;\r\n }\r\n //if node 1 has a higher FScore than node 2, return 1 which will put e2 BEFORE e1\r\n if (e1.getFScore() > e2.getFScore()) {\r\n return 1;\r\n }\r\n //else return they are same whichw ill keep order same\r\n return 0;\r\n }",
"private boolean compare(ValueType first, ValueType second) {\r\n // TODO\r\n return false;\r\n }",
"@Override\r\n\t public int compare(Node o1, Node o2) {\n\t\tif (o1.downloadRate > o2.downloadRate)\r\n\t\t return 1;\r\n\t\tif (o1.downloadRate < o2.downloadRate)\r\n\t\t return -1;\r\n\t\t\r\n\t\treturn 0;\r\n\t }",
"public int compareTo(Node otherNode) { \r\n if (TotalDistance < otherNode.TotalDistance) {\r\n return -1;\r\n } else if (TotalDistance > otherNode.TotalDistance) {\r\n return 1;\r\n } else {\r\n return 0;\r\n }\r\n }",
"public int compare(int a, int b) {\n //System.err.println(\"compare \" + a + \" with \" + b);\n return comparer.compare((NodeInfo)sequence.itemAt(a),\n (NodeInfo)sequence.itemAt(b));\n }",
"public int compareTo(Object other){\r\n int[][] thisState = this.getState();\r\n int[][] thatState = ((Node)other).getState();\r\n int length = this.getState().length;\r\n for (int i = 0; i<length; i++){\r\n for (int j = 0; j<length; j++){\r\n if (thisState[i][j] != thatState[i][j])\r\n return 1;\r\n }\r\n }\r\n return 0;\r\n }",
"private List<SimilarNode> astCCImplmentation(HashMap<ASTNode, NodeInfo> fileNodeMap1, HashMap<ASTNode, NodeInfo> fileNodeMap2) {\n TreeMap<Integer, List<NodeInfo>> treeMap1 = convertToTreeMap(fileNodeMap1);\n TreeMap<Integer, List<NodeInfo>> treeMap2 = convertToTreeMap(fileNodeMap2);\n List<SimilarNode> result = new ArrayList<>();\n int[] array1 = getArray(treeMap1.keySet());\n int[] array2 = getArray(treeMap2.keySet());\n int i = 0;\n int j = 0;\n int sum = 0;\n while (i < array1.length && j < array2.length) {\n if (array1[i] == array2[j]) {\n // obtain list of nodeInfos for both and compare them if match found then add it to report\n List<NodeInfo> list1 = treeMap1.get(array1[i]);\n List<NodeInfo> list2 = treeMap2.get(array2[j]);\n for (NodeInfo nodeInfo1 : list1) {\n for (NodeInfo nodeInfo2 : list2) {\n if ((nodeInfo1.hashValue == nodeInfo2.hashValue) && (nodeInfo1.nodeType == nodeInfo2.nodeType)) {\n result.add(new SimilarNode(nodeInfo1, nodeInfo2));\n\n }\n }\n }\n i++;\n j++;\n\n } else if (array1[i] > array2[j]) {\n j++;\n } else if (array1[i] < array2[j]) {\n i++;\n }\n }\n return result;\n }",
"public int CompareTwoLinkedLists(MyLinkList l1, MyLinkList l2) {\n Node curr = l1.head;\n Node curr2 = l2.head;\n while (curr != null) {\n if ((curr.next != null && curr2.next == null) || (curr.next == null && curr2.next != null)) {\n return 0;\n }\n if (curr.data != curr2.data) {\n return 0;\n }\n System.out.printf(\"Data : \" + curr.data + \"--\" + curr2.data + \"\\n\");\n curr = curr.next;\n curr2 = curr2.next;\n }\n return 1;\n }",
"private Comparison compareImages(SimpleNode first, SimpleNode second) {\n if (first instanceof JexlNode) {\n String firstImage = ((JexlNode) first).image;\n String secondImage = ((JexlNode) second).image;\n if (!Objects.equals(firstImage, secondImage)) {\n return Comparison.notEqual(\"Node images differ: \" + firstImage + \" vs \" + secondImage);\n }\n }\n return Comparison.IS_EQUAL;\n }",
"private static void commonNodesInOrdSuc(Node r1, Node r2)\n {\n Node n1 = r1, n2 = r2;\n \n if(n1==null || n2==null)\n return;\n \n while(n1.left != null)\n n1 = n1.left;\n \n while(n2.left!= null)\n n2 = n2.left;\n \n while(n1!=null && n2!=null)\n {\n if(n1.data < n2.data)\n n1 = inOrdSuc(n1);\n \n else if(n1.data > n2.data)\n n2 = inOrdSuc(n2);\n \n else\n {\n System.out.print(n1.data+\" \"); n1 = inOrdSuc(n1); n2 = inOrdSuc(n2);\n }\n }\n \n System.out.println();\n }",
"void compareDataStructures();",
"public int compare(Node o1, Node o2) {\n\t\tif(o1.getFn()<o2.getFn())\r\n\t\t\treturn -1;\r\n\t\tif(o1.getFn()>o2.getFn())\r\n\t\t\treturn 1;\r\n\t\treturn 0;\r\n\t}",
"public int compareTo(Node other) {\n if (dist == other.dist)\n return label.compareTo(other.label);\n return Integer.compare(dist, other.dist);\n }",
"public float compare(Cluster other) {\n \treturn compare(center, other.center);\n }",
"private static boolean areLeafsEquivalent(JavaTree leftNode, JavaTree rightNode) {\n if (leftNode instanceof IdentifierTree) {\n return Objects.equal(((IdentifierTree) leftNode).name(), ((IdentifierTree) rightNode).name());\n } else if (leftNode instanceof PrimitiveTypeTree) {\n return Objects.equal(((PrimitiveTypeTree) leftNode).keyword().text(), ((PrimitiveTypeTree) rightNode)\n .keyword().text());\n } else if (leftNode instanceof SyntaxToken) {\n return Objects.equal(((SyntaxToken) leftNode).text(), ((SyntaxToken) rightNode).text());\n } else if (leftNode.is(Tree.Kind.INFERED_TYPE)) {\n return rightNode.is(Tree.Kind.INFERED_TYPE);\n } else {\n throw new IllegalArgumentException();\n }\n }",
"public int compare(Edge a, Edge b) {\n // for ascending\n return a.weight - b.weight;\n\n // for descending\n // return b.weight - a.weight;\n }",
"@Override\n public int compare(Edge edge1, Edge edge2) {\n return Integer.compare(edge1.weight, edge2.weight);\n }",
"public int compareTo(Node otherNode) \r\n\t{\n\t\tif(this.getTravelTime() < otherNode.getTravelTime())\r\n\t\t{\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\telse if(this.getTravelTime() > otherNode.getTravelTime())\r\n\t\t{\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t//EQUAL -- CHECK NODE TYPE\r\n\t\t\tif(otherNode.getNodeType()==1) \t//If other node is destination\r\n\t\t\t{\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\t\t\telse if(this.getNodeType()==1)\r\n\t\t\t{\r\n\t\t\t\treturn -1;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n protected final int compareNodeFields(Node o) {\n TypedNodeWithUuids other = (TypedNodeWithUuids) o;\n if (!typeConceptUuid.equals(other.typeConceptUuid)) {\n return typeConceptUuid.compareTo(other.typeConceptUuid);\n }\n return compareTypedNodeFields(o);\n }",
"public boolean equals(AsNode other) {\n\t\treturn this.state.getHash() == other.state.getHash();\n\t}",
"private boolean compatibleNodeTypes(AxiomTreeNode t1, AxiomTreeNode t2) {\n if (!t1.getNodeType().equals(t2.getNodeType())) {\n return false;\n }\n \n switch (t1.getNodeType()) {\n case CARD:\n int label1 = (Integer) t1.getLabel();\n int label2 = (Integer) t2.getLabel();\n return (label1 == label2);\n \t\n case OWLOBJECT:\n OWLObject o1 = (OWLObject) t1.getLabel();\n OWLObject o2 = (OWLObject) t2.getLabel();\n //System.out.println(o1.getClass());\n //System.out.println(o2.getClass());\n //Check for datatypes - then check datatype to see match. Else, return true if compatible.\n if(o1.getClass() == o2.getClass())\n {\n \tif(!o1.getDatatypesInSignature().isEmpty())\n \t{\n \t\t//Need to check if built in first. First check is convenience, datatypes should match\n \t\t//If one is built in, so should other. If neither is built in, this is also a viable match\n \t\t//If not equal and at least one is built in, its not a match.\n \t\tOWLDatatype dt1 = (OWLDatatype) o1.getDatatypesInSignature().toArray()[0];\n \t\t\tOWLDatatype dt2 = (OWLDatatype) o2.getDatatypesInSignature().toArray()[0];\n \t\t\t//System.out.println(\"DT1: \" + dt1);\n \t\t\t//System.out.println(\"DT2: \" + dt2);\n \t\tif(dt1.equals(dt2) && dt1.isBuiltIn())\n \t\t{\t\n \t\t\t//System.out.println(\"Standard state\");\n \t\t\t//System.out.println(o1.equals(o2));\n \t\t\treturn o1.equals(o2);\n \t\t}\n \t\telse if(!dt1.isBuiltIn() && !dt2.isBuiltIn())\n \t\t{\n \t\t\t//System.out.println(\"Unique state\");\n \t\t\treturn true;\n \t\t}\n \t\telse\n \t\t{\n \t\t\t//System.out.println(\"Rejection state\");\n \t\t\treturn false;\n \t\t}\n \n \t}\n \telse\n \t{\n \t\treturn true;\n \t}\n }\n else\n {\n \treturn false;\n }\n }\n return false;\n }",
"@Override\r\n\t\tpublic int compare(String2DoubleNode o1, String2DoubleNode o2) {\n\t\t\treturn o2.value.compareTo(o1.value);\r\n\t\t}",
"public static Map<String, Map<Object, Object>> getDiffirentComparisionVal(Device d1, Device d2) throws IllegalArgumentException, IllegalAccessException {\n\t\t\n\t\t//Node root = ObjectDifferBuilder.buildDefault().compare(d1, d2);\n\t\t\t\t\n\t\t//To get Device one property\n\t\tMap <Object, Object> device1Fields = getFields(d1);\n\t\t\n\t\t//To get Device one property\n\t\tMap <Object, Object> device2Fields = getFields(d2);\n\t\t\n\t\t//Map to get Device difference property value\n\t\tMap <Object, Object> DeviceResult1 = new HashMap<>();\n\t\tMap <Object, Object> DeviceResult2 = new HashMap<>();\n\t\t\n Map <String, Map<Object, Object>> deviceComparisonMap = new HashMap<>();\n\t\t device1Fields.forEach((k,v)->{\n\t\t \t \tif(null != v && !device2Fields.get(k).equals(v)){\n\t\t \t\t DeviceResult1.put(k, v);\n\t\t \t DeviceResult2.put(k, device2Fields.get(k));\n\t\t \t}\n\t\t });\n\t\t deviceComparisonMap.put(d1.getCmMacAddress(), DeviceResult1);\n\t\t deviceComparisonMap.put(d2.getCmMacAddress(), DeviceResult2);\n\t\treturn deviceComparisonMap;\n\t\t\n\t}",
"public static boolean isEqual(JexlNode first, JexlNode second) {\n return checkEquality(first, second).isEqual();\n }",
"@Override\n\tpublic int compareTo(AsNode other) {\n\t\tif(this.state.getF() < other.state.getF()) return -1;\n\t\tif(this.state.getF() > other.state.getF()) return 1;\n\t\treturn 0;\n\t}",
"public static int compareOrder(SiblingCountingNode first, SiblingCountingNode second) {\n NodeInfo ow = second;\n \n // are they the same node?\n if (first.isSameNodeInfo(second)) {\n return 0;\n }\n \n NodeInfo firstParent = first.getParent();\n if (firstParent == null) {\n // first node is the root\n return -1;\n }\n \n NodeInfo secondParent = second.getParent();\n if (secondParent == null) {\n // second node is the root\n return +1;\n }\n \n // do they have the same parent (common case)?\n if (firstParent.isSameNodeInfo(secondParent)) {\n int cat1 = nodeCategories[first.getNodeKind()];\n int cat2 = nodeCategories[second.getNodeKind()];\n if (cat1 == cat2) {\n return first.getSiblingPosition() - second.getSiblingPosition();\n } else {\n return cat1 - cat2;\n }\n }\n \n // find the depths of both nodes in the tree\n int depth1 = 0;\n int depth2 = 0;\n NodeInfo p1 = first;\n NodeInfo p2 = second;\n while (p1 != null) {\n depth1++;\n p1 = p1.getParent();\n }\n while (p2 != null) {\n depth2++;\n p2 = p2.getParent();\n }\n // move up one branch of the tree so we have two nodes on the same level\n \n p1 = first;\n while (depth1 > depth2) {\n p1 = p1.getParent();\n if (p1.isSameNodeInfo(second)) {\n return +1;\n }\n depth1--;\n }\n \n p2 = ow;\n while (depth2 > depth1) {\n p2 = p2.getParent();\n if (p2.isSameNodeInfo(first)) {\n return -1;\n }\n depth2--;\n }\n \n // now move up both branches in sync until we find a common parent\n while (true) {\n NodeInfo par1 = p1.getParent();\n NodeInfo par2 = p2.getParent();\n if (par1 == null || par2 == null) {\n throw new NullPointerException(\"DOM/JDOM tree compare - internal error\");\n }\n if (par1.isSameNodeInfo(par2)) {\n return ((SiblingCountingNode)p1).getSiblingPosition() -\n ((SiblingCountingNode)p2).getSiblingPosition();\n }\n p1 = par1;\n p2 = par2;\n }\n }",
"@Test\n\tpublic void isChildOrSameTest1()\n\t{\n\t\tNodeList n1=xmlDocument.getElementsByTagName(\"b\");\n\t\tNodeList n2=xmlDocument.getElementsByTagName(\"p\");\n\t\tassertEquals(true,Manipulator.isChildOrSame(n2.item(0),n1.item(0)));\n\t}",
"private void assertCompareTwoXML(String path1, String path2){\n\t\tFile f1 = new File(path1);\n\t\tFile f2 = new File(path2);\n\t\tassertTrue(\"Le fichier \"+path1+\" n'existe pas.\",f1.exists());\n\t\tassertTrue(\"Le fichier \"+path2+\" n'existe pas.\",f2.exists());\n\t\t\n\t\ttry {\n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder builder = factory.newDocumentBuilder();\n\t\t\tDocument doc1 = builder.parse(f1);\n\t\t\t\n\t\t\tDocumentBuilderFactory factory2 = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder builder2 = factory2.newDocumentBuilder();\n\t\t\tDocument doc2 = builder2.parse(f2);\n\n\t\t\tElement root1 = doc1.getDocumentElement(); //<tds> </tds>\n\t\t\tElement root2 = doc2.getDocumentElement();\n\t\t\t\n\t\t\t//Checking symboles\n\t\t\tNodeList symbs1 = root1.getElementsByTagName(\"sym\"); //Getting all <function>\n\t\t\tNodeList symbs2 = root2.getElementsByTagName(\"sym\"); //Getting all <function>\n\t\t\tUtilitaire.assertT(\"Les fichiers n'ont pas le meme nombre de symboles\",symbs1.getLength() == symbs2.getLength());\n\t\t\t\n\t\t\tfor(int symbIndex=0; symbIndex < symbs1.getLength();symbIndex++){\n\t\t\t\tboolean sameSymb = false;\n\t\t\t\tString sym1 = ((Element) symbs1.item(symbIndex)).getTextContent();\n\t\t\t\tfor(int symbIndex2=0; symbIndex2 < symbs2.getLength();symbIndex2++){\n\t\t\t\t\tString sym2 = ((Element) symbs2.item(symbIndex2)).getTextContent();\n\t\t\t\t\tif(sym1.equals(sym2)) sameSymb = true;\n\t\t\t\t}\n\t\t\t\tUtilitaire.assertT(\"Les symboles ne sont pas les memes.\",sameSymb);\n\t\t\t}\n\t\t\t\n\t\t\t//Checking functions\n\t\t\tNodeList functions1 = root1.getElementsByTagName(\"function\"); //Getting all <function>\n\t\t\tNodeList functions2 = root2.getElementsByTagName(\"function\"); //Getting all <function>\n\t\t\tUtilitaire.assertT(\"Les fichiers n'ont pas le meme nombre de fonctions\",functions1.getLength() == functions2.getLength());\n\t\t\t\t//Checking each function\n\t\t\tfor(int tmp = 0; tmp < functions1.getLength();tmp++){\n\t\t\t\tNode node1 = functions1.item(tmp);\n\t\t\t\tNode node2 = null;\n\t\t\t\t//Checking function name\n\t\t\t\tString funName1 = ((Element) node1).getElementsByTagName(\"name\").item(0).getTextContent();\n\t\t\t\tString funName2 = null;\n\t\t\t\tboolean sameFunName = false;\n\t\t\t\t//Iterate over the second file to find (eventually) the same function node\n\t\t\t\tfor(int tmp2 = 0; (tmp2 < functions2.getLength()) && !sameFunName ;tmp2++){\n\t\t\t\t\tnode2 = functions2.item(tmp2);\n\t\t\t\t\tfunName2 = ((Element) node2).getElementsByTagName(\"name\").item(0).getTextContent();\n\t\t\t\t\tif(funName1.equals(funName2)) sameFunName = true;\n\t\t\t\t\t//If a same node if found, the following tests will be with node1's function = node2's function\n\t\t\t\t}\n\t\t\t\t//If there is no node with the same function name -> fail\n\t\t\t\tassertTrue(\"Deux fonctions n'ont pas le meme nom : \"+funName1, sameFunName);\n\t\t\t\t\n\t\t\t\tNodeList vars1 = ((Element) node1).getElementsByTagName(\"var\"); //Getting <var>\n\t\t\t\tNodeList vars2 = ((Element) node2).getElementsByTagName(\"var\");\n\t\t\t\tUtilitaire.assertT(\"Il n'y a pas le meme nombre de variables pour la fonction \"+funName1,vars1.getLength() == vars2.getLength());\n\t\t\t\tfor(int varIndex = 0; varIndex < vars1.getLength();varIndex++){\n\t\t\t\t\tboolean sameVarsName = false;\n\t\t\t\t\tNode varNode1 = vars1.item(varIndex);\n\t\t\t\t\t//Checking vars name\n\t\t\t\t\tString varName1 = ((Element) varNode1).getElementsByTagName(\"vname\").item(0).getTextContent(); //Writing vars names\n\t\t\t\t\t//Iterate through the vars of the second file to see if there is a same as varName1\n\t\t\t\t\tfor(int varIndex2 = 0; varIndex2 < vars2.getLength();varIndex2++){\n\t\t\t\t\t\tString varName2 = ((Element) vars2.item(varIndex2)).getElementsByTagName(\"vname\").item(0).getTextContent(); //Writing vars names\n\t\t\t\t\t\tif(varName1.equals(varName2)) sameVarsName = true;\n\t\t\t\t\t}\n\t\t\t\t\tUtilitaire.assertT(\"Les variables n'ont pas le meme nom : \"+varName1, sameVarsName);\n\t\t\t\t\t//Checking vars value\n\t\t\t\t\tboolean sameVarsValue = false;\n\t\t\t\t\t//Iterate through the vars of the second file to see if there is a same as varValue1\n\t\t\t\t\tString varValue1 = ((Element) varNode1).getElementsByTagName(\"value\").item(0).getTextContent(); //Writing vars names\n\t\t\t\t\tfor(int varIndex2 = 0; varIndex2 < vars2.getLength();varIndex2++){\n\t\t\t\t\t\tString varValue2 = ((Element) vars2.item(varIndex2)).getElementsByTagName(\"value\").item(0).getTextContent(); //Writing vars names\n\t\t\t\t\t\tif(varValue1.equals(varValue2)) sameVarsValue = true;\n\t\t\t\t\t}\n\t\t\t\t\tUtilitaire.assertT(\"Les variables n'ont pas les mÍmes valeurs : \"+varValue1, sameVarsValue);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Checking calls\n\t\t\t\tNodeList calls1 = ((Element) node1).getElementsByTagName(\"f\");\n\t\t\t\tNodeList calls2 = ((Element) node2).getElementsByTagName(\"f\");\n\t\t\t\tUtilitaire.assertT(\"Le nombre d'appels de fonctions ne sont pas les memes.\",calls1.getLength() == calls2.getLength());\n\t\t\t\t\n\t\t\t\tfor(int callIndex = 0; callIndex < calls1.getLength(); callIndex++){\n\t\t\t\t\tboolean sameCalls = false;\n\t\t\t\t\tString callValue1 = ((Element) calls1.item(callIndex)).getTextContent();\n\t\t\t\t\t//Iterate through the calls of the second file to see if there is a same as callValue1\n\t\t\t\t\tfor(int callIndex2 = 0; callIndex2 < calls2.getLength(); callIndex2++){\n\t\t\t\t\t\tString callValue2 = ((Element) calls2.item(callIndex2)).getTextContent();\n\t\t\t\t\t\tif(callValue1.equals(callValue2)) sameCalls = true;\n\t\t\t\t\t}\n\t\t\t\t\tUtilitaire.assertT(\"Les functions appellees ne sont pas les memes : \"+callValue1, sameCalls);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} catch (ParserConfigurationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SAXException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private boolean isValuesEqual(BinaryMessage tocmp, BinaryMessage original) {\n\t\tif(tocmp.getValue().equals(original.getValue())) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}",
"@Override\r\n\t\tpublic int compare(Pair o1, Pair o2) {\r\n\t\t\treturn o2.val.compareTo(o1.val);\r\n\t\t}",
"public boolean equals(Object other){\n if(other instanceof Node){\n return ((Node)other).getData().equals(this.data);\n } else {\n return false;\n }\n\n }",
"private int compareValueToNodeValue(@NotNull T value, @NotNull Node<T> node) {\n return node == head ? 1 : (node == tail ? -1 : value.compareTo(node.value));\n }",
"public static int compareString(NodeValue nv1, NodeValue nv2) {\n return calcReturn(nv1.getString().compareTo(nv2.getString())) ;\n }",
"private Set<Match> compareTwoNodeLists(List<Node> programANodeList, List<Node> programBNodeList) {\n\t\t// convert node list to string representations in order\n\t\tString programATypeAbbr = getProgramRepresentation(programANodeList);\n\t\tString programBTypeAbbr = getProgramRepresentation(programBNodeList);\n\n\t\t// call Greedy String Tilling algorithms to compare the Strings\n\t\tGreedyStringTilling gst = new GreedyStringTilling(MIN_MATCHED_LEN_FOR_GST);\n\n\t\treturn gst.GST(programATypeAbbr, programBTypeAbbr);\n\t}",
"public int compareTo(VNode other)\n {\n if (other==null) \n return 1; // this > null \n \n return _nodeVRL.compareTo(other.getLocation()); \n }",
"@Override\n\tpublic int compare(ExecutionNode o1, ExecutionNode o2) {\n\t\t// compare start times\n\t\tTimePoint s1 = o1.getInterval().getStartTime();\n\t\tTimePoint s2 = o2.getInterval().getStartTime();\n\t\t// compare lower bounds\n\t\treturn s1.getLowerBound() < s2.getLowerBound() ? -1 : s1.getLowerBound() > s2.getLowerBound() ? 1 : 0;\n\t}",
"private static void commonNodesIterInOrd(Node root1,Node root2)\n {\n if(root1 == null || root2 == null) return;\n \n LinkedList<Node> stack1 = new LinkedList<>();\n LinkedList<Node> stack2 = new LinkedList<>();\n \n Node n1 = root1, n2 = root2;\n \n while(true)\n {\n if(n1!=null)\n {\n stack1.push(n1); n1 = n1.left;\n }\n if(n2!=null)\n {\n stack2.push(n2); n2 = n2.left;\n } \n \n if(n1 == null && n2 == null)\n {\n if(stack1.size() == 0 || stack2.size() == 0)\n break;\n \n n1 = stack1.peekFirst(); n2 = stack2.peekFirst();\n \n if(n1.data < n2.data)\n {\n stack1.pop(); n1 = n1.right; n2 = null;\n }\n else if(n1.data > n2.data)\n {\n stack2.pop(); n2 = n2.right; n1 = null;\n }\n else\n {\n stack1.pop(); stack2.pop(); \n System.out.print(n1.data+\" \");\n n1 = n1.right; n2 = n2.right;\n }\n }\n }\n }",
"public int compare(Element e1, Element e2) {\n return e1.getKey() - e2.getKey();\n }",
"public int compare(SearchNode sn1, SearchNode sn2) {\n int hp1 = sn1.dist + sn1.board.manhattan();\n int hp2 = sn2.dist + sn2.board.manhattan();\n \n if (hp1 > hp2) return 1;\n if (hp1 < hp2) return -1;\n return 0;\n }",
"boolean newequals(DataBT a, DataBT b) \n\t {\n\t \tSystem.out.println(\"!!\");\n\t \t\n\t /*1. both empty */\n\t if ((IBinTree)a instanceof MtBT && (IBinTree)b instanceof MtBT)\n\t return true;\n\t System.out.println(\"1 \" + a.data);\n\t \t \n\t /* 2. both non-empty -> compare them */\n\t if ( !((IBinTree)a instanceof MtBT) && !((IBinTree)b instanceof MtBT)) {\n\n\t \tboolean check = (a.data == b.data);\n\t\t System.out.println(\"1112\");\n\t\t \n\t\t if(a.left instanceof MtBT && b.left instanceof MtBT);else\n\t\t if((a.left instanceof MtBT) != (a.left instanceof MtBT))check = false;else\n\t \tif(!newequals((DataBT)a.left, (DataBT)b.left))check = false;\n\t\t \n\t\t \n\t\t System.out.println(\"1113\");\n\t\t \n\t\t \n\t\t if(a.right instanceof MtBT && b.right instanceof MtBT);else\n\t\t\t if((a.right instanceof MtBT) != (a.right instanceof MtBT))check = false;else\n\t\t if(!newequals((DataBT)a.right, (DataBT)b.right))check = false;\n\n\t\t System.out.println(\"112\");\n\n\t\t return (check);\n\t }\n\t System.out.println(\"2\");\n\t \n\t /* 3. one empty, one not -> false */\n\t if ( ((IBinTree)a instanceof MtBT) && (!((IBinTree)b instanceof MtBT))) {\n\t \treturn false;\n\t }\n\t System.out.println(\"3\");\n\t return false;\n\t }",
"@Override\n\t\t\tpublic int compare(Map.Entry<T, Integer> e1, Map.Entry<T, Integer> e2)\n\t\t\t{\n\n\t\t\t\treturn - (e1.getValue() - e2.getValue());\n\t\t\t}",
"public static int compare(Vertex first, Vertex second) {\n if(first.getKey() == second.getKey())\n return 0;\n else if(first.getKey() >= second.getKey())\n return 1;\n else\n return -1;\n }",
"public int compare(Key<Double, Double> a, Key<Double, Double> b){\n\t\t\tif (a.getFirst() < b.getFirst()){\n\t\t\t\treturn -1;\n\t\t\t} else if (a.getFirst() == b.getFirst()){\n\t\t\t\treturn 0;\n\t\t\t} else {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}",
"public int compare(SearchNode sn1, SearchNode sn2) {\n int hp1 = sn1.dist + sn1.board.hamming();\n int hp2 = sn2.dist + sn2.board.hamming();\n \n if (hp1 > hp2) return 1;\n if (hp1 < hp2) return -1;\n return 0;\n }",
"public boolean isIdentical(Node node1, Node node2)\r\n\t{\r\n\t\tif(node1 == null && node2 == null)\r\n\t\t\treturn true;\r\n\t\tif(node1 == null || node2 == null)\r\n\t\t\treturn false;\r\n\t\treturn (node1.data == node2.data) && isIdentical(node1.left, node2.left) && isIdentical(node1.right, node2.right);\r\n\t}",
"public int compare(Element e1, Element e2) {\n return e2.getKey() - e1.getKey();\n }",
"@Override\n\t\t\tpublic int compare(Edge o1, Edge o2) {\n\t\t\t\treturn o1.weight - o2.weight;\n\t\t\t}",
"private static boolean isSameTree(Node currentT1Node, Node currentT2Node) {\n\t\tif (currentT1Node != null && currentT2Node != null) {\n\t\t\tboolean isLeftSame = isSameTree(currentT1Node.leftChild, currentT2Node.leftChild);\n\t\t\tboolean isRightSame = isSameTree(currentT1Node.rightChild, currentT2Node.rightChild);\n\n\t\t\t// If either is false it means that the trees differ so we return immediately\n\t\t\tif (!isLeftSame || !isRightSame) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// Otherwise we compare the nodes in the current value.\n\t\t\tif (currentT1Node.value == currentT2Node.value) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\t// If one current Tn node is null and the other isn't then the trees are not the same.\n\t\tif ((currentT1Node == null && currentT2Node != null) || (currentT1Node != null && currentT2Node == null)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true; // We have hit the bottom of both trees, both T1 and T2 are null therefore it still matches.\n\t}",
"@Test\n\tpublic void isChildOrSameTest3()\n\t{\n\t\tNodeList n1=xmlDocument.getElementsByTagName(\"b\");\n\t\tNodeList n2=xmlDocument.getElementsByTagName(\"p\");\n\t\tassertEquals(false,Manipulator.isChildOrSame(n1.item(0),n2.item(0)));\n\t}",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }"
] | [
"0.6890835",
"0.68435967",
"0.6619421",
"0.6533591",
"0.6524064",
"0.64970875",
"0.64641464",
"0.62994283",
"0.6234131",
"0.62301207",
"0.6225202",
"0.6197304",
"0.6177353",
"0.61331093",
"0.6090915",
"0.60792595",
"0.60790366",
"0.60775876",
"0.6067737",
"0.60670525",
"0.6003975",
"0.5986679",
"0.59757614",
"0.59701",
"0.5958971",
"0.5952553",
"0.594577",
"0.5924226",
"0.59084547",
"0.59027183",
"0.589386",
"0.5891602",
"0.58895296",
"0.58809084",
"0.58802354",
"0.58349836",
"0.5809745",
"0.5797927",
"0.5795762",
"0.5789976",
"0.5779747",
"0.5756832",
"0.5751475",
"0.5743017",
"0.5737124",
"0.5735656",
"0.57312864",
"0.5726981",
"0.57258123",
"0.57241005",
"0.5711735",
"0.56749076",
"0.5649765",
"0.56486213",
"0.5642538",
"0.5628455",
"0.5627962",
"0.56255484",
"0.5604355",
"0.55899554",
"0.5589433",
"0.5587914",
"0.55670285",
"0.5564405",
"0.5548737",
"0.554093",
"0.55397123",
"0.55394393",
"0.55304736",
"0.5526382",
"0.55249035",
"0.55245847",
"0.5520126",
"0.55194175",
"0.5517736",
"0.5517736",
"0.5517736",
"0.5517736",
"0.5517736",
"0.5517736",
"0.5517736",
"0.5517736",
"0.5517736",
"0.5517736",
"0.5517736",
"0.5517736",
"0.5517736",
"0.5517736",
"0.5517736",
"0.5517736",
"0.5517736",
"0.5517736",
"0.5517736",
"0.5517736",
"0.5517736",
"0.5517736",
"0.5517736",
"0.5517736",
"0.55177027",
"0.55177027"
] | 0.7858284 | 0 |
Compare the images of both node (if applicable). | private Comparison compareImages(SimpleNode first, SimpleNode second) {
if (first instanceof JexlNode) {
String firstImage = ((JexlNode) first).image;
String secondImage = ((JexlNode) second).image;
if (!Objects.equals(firstImage, secondImage)) {
return Comparison.notEqual("Node images differ: " + firstImage + " vs " + secondImage);
}
}
return Comparison.IS_EQUAL;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Comparison checkEquality(SimpleNode node1, SimpleNode node2) {\n // Compare the classes.\n Comparison comparison = compareClasses(node1, node2);\n if (!comparison.isEqual()) {\n return comparison;\n }\n\n // Compare the values.\n comparison = compareValues(node1, node2);\n if (!comparison.isEqual()) {\n return comparison;\n }\n\n // Compare the images.\n comparison = compareImages(node1, node2);\n if (!comparison.isEqual()) {\n return comparison;\n }\n\n // Compare the children.\n return compareChildren(node1, node2);\n }",
"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}",
"private Boolean equalWebItemImages(WebItemImage webItemImageOne, WebItemImage webItemImageTwo) {\n\t\tif (webItemImageOne==null && webItemImageTwo==null) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\tif (webItemImageOne==null || webItemImageTwo==null) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (webItemImageOne.getSourceURL() == webItemImageTwo.getSourceURL()) {\r\n\t\t\treturn true;\r\n\t\t } else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"void compare(BufferedImage bi0, BufferedImage bi1, int biType, Color c) {\n for (int x=0; x<wid; x++) {\n for (int y=0; y<hgt; y++) {\n int rgb0 = bi0.getRGB(x, y);\n int rgb1 = bi1.getRGB(x, y);\n if (rgb0 == rgb1) continue;\n int r0 = (rgb0 & 0xff0000) >> 16;\n int r1 = (rgb1 & 0xff0000) >> 16;\n int rdiff = r0-r1; if (rdiff<0) rdiff = -rdiff;\n int g0 = (rgb0 & 0x00ff00) >> 8;\n int g1 = (rgb1 & 0x00ff00) >> 8;\n int gdiff = g0-g1; if (gdiff<0) gdiff = -gdiff;\n int b0 = (rgb0 & 0x0000ff);\n int b1 = (rgb1 & 0x0000ff);\n int bdiff = b0-b1; if (bdiff<0) bdiff = -bdiff;\n if (rdiff > 1 || gdiff > 1 || bdiff > 1) {\n throw new RuntimeException(\n \"Images differ for type \"+biType + \" col=\"+c +\n \" at x=\" + x + \" y=\"+ y + \" \" +\n Integer.toHexString(rgb0) + \" vs \" +\n Integer.toHexString(rgb1));\n }\n }\n }\n\n }",
"public static boolean compareImages(String image1, String image2) {\n \t\tboolean equals = false;\n \t\ttry {\n \t\t\tExifInterface exif1 = new ExifInterface(image1);\n \t\t\tExifInterface exif2 = new ExifInterface(image2);\n \t\t\t\n \t\t\tfinal String datetime1 = exif1.getAttribute(ExifInterface.TAG_DATETIME);\n \t\t\tfinal String datetime2 = exif2.getAttribute(ExifInterface.TAG_DATETIME);\n \t\t\t\n \t\t\tif (!TextUtils.isEmpty(datetime1) && !TextUtils.isEmpty(datetime1)) {\n \t\t\t\tequals = datetime1.equals(datetime2);\n \t\t\t} else {\n \t\t\t\tLog.d(TAG, \"Datetime is null or empty. The MD5 checksum will be compared\");\n \t\t\t\tequals = compareFilesChecksum(image1, image2);\n \t\t\t}\n \t\t} catch (IOException e) {\n \t\t\tLog.e(TAG, e.getMessage());\n \t\t}\n \t\t\n \t\treturn equals;\n \t}",
"public double compareImages(ImageSub img1, ImageSub img2) {\n\t\tdouble[] channels = new double[3];\n\t\tdouble sumOfSquares = 0;\n\t\tfor(int i = 0; i < channels.length; i++) {\n\t\t\tchannels[i] = Imgproc.compareHist(img1.cvChannels.get(i), img2.cvChannels.get(i), Imgproc.CV_COMP_BHATTACHARYYA);\n\t\t\t\n\t\t\t//Uncomment this. Comment the line above\n\t\t\t//channels[i] = SSIM.compareImages(img1.cvChannels.get(i), img2.cvChannels.get(i));\n\t\t\tsumOfSquares += channels[i];\n\t\t}\n\t\tsumOfSquares /= channels.length;\n\t\t//System.out.println(sumOfSquares);\n\t\treturn sumOfSquares;\n\t}",
"public static void compareImage( BufferedImage expectedImage, BufferedImage calculatedImage) {\n\n // take buffer data from botm image files //\n DataBuffer dbA = expectedImage.getData().getDataBuffer();\n int dataTypeSizeA= dbA.getDataTypeSize(DataBuffer.TYPE_BYTE);\n\n DataBuffer dbB =calculatedImage.getData().getDataBuffer();\n int dataTypeSizeB = dbB.getDataTypeSize(DataBuffer.TYPE_BYTE);\n\n\n //validate the image size\n Assert.assertEquals(dataTypeSizeA, dataTypeSizeB);\n Assert.assertEquals(dbA.getSize(), dbB.getSize());\n\n\n if (expectedImage.getWidth() == calculatedImage.getWidth() && expectedImage.getHeight() == calculatedImage.getHeight()) {\n for (int x = 0; x < calculatedImage.getWidth(); x++) {\n for (int y = 0; y < calculatedImage.getHeight(); y++) {\n Assert.assertEquals(expectedImage.getRGB(x, y), calculatedImage.getRGB(x, y));\n\n }\n }\n }\n\n\n }",
"private boolean isDominated(Image img1, Image img2) {\r\n\t\tint size1 = img1.getWidth() * img1.getHeight();\r\n\t\tint size2 = img2.getWidth() * img2.getHeight();\r\n\t\treturn size1 < size2;\r\n\t}",
"int match(ArrayList<ImageCell> images);",
"public int compare(Object nodes1, Object nodes2) {\r\n\t\tdouble w1 = 0.0;\r\n\t\tIterator it = ((Set)nodes1).iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tDouble v = ((Node) it.next()).getWeightValueUnsynchronized(\"value\");\r\n\t\t\tw1 += (v==null ? 1.0 : v.doubleValue());\r\n\t\t}\r\n\t\tdouble w2 = 0.0;\r\n\t\tit = ((Set)nodes2).iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tDouble v = ((Node) it.next()).getWeightValueUnsynchronized(\"value\");\r\n\t\t\tw2 += (v==null ? 1.0 : v.doubleValue());\r\n\t\t}\r\n\t\tint res = Double.compare(w2, w1);\r\n\t\tif (res==0) { // oops, must figure out how they differ\r\n\t\t\tSet ns1 = (Set) nodes1;\r\n\t\t\tSet ns2 = (Set) nodes2;\r\n\t\t\tint ns1sz = ns1.size();\r\n\t\t\tint ns2sz = ns2.size();\r\n\t\t\tif (ns1sz>ns2sz) return -1; // more nodes, the better\r\n\t\t\telse if (ns1sz<ns2sz) return 1;\r\n\t\t\t// go through the *very* expensive nodes discrimination\r\n\t\t\tIterator it1 = ns1.iterator();\r\n\t\t\tIntSet nis1 = new IntSet();\r\n\t\t\twhile (it1.hasNext()) {\r\n\t\t\t\tNode n = (Node) it1.next();\r\n\t\t\t\tnis1.add(new Integer(n.getId()));\r\n\t\t\t}\r\n\t\t\tIterator it2 = ns2.iterator();\r\n\t\t\tIntSet nis2 = new IntSet();\r\n\t\t\twhile (it2.hasNext()) {\r\n\t\t\t\tNode n = (Node) it2.next();\r\n\t\t\t\tnis2.add(new Integer(n.getId()));\r\n\t\t\t}\r\n\t\t\treturn nis2.compareTo(nis1);\r\n\t\t}\r\n\t\treturn res;\r\n\t}",
"public static boolean areImagesSame(Image a, Image b) {\n if(a.getWidth() == b.getWidth() && a.getHeight() == b.getHeight()) {\n for(int x=0; x<(int) a.getWidth(); x++) {\n for(int y=0; y<(int) a.getHeight(); y++) {\n // If even a single pixel doesn't match color then it will return false\n if(!a.getPixelReader().getColor(x, y).equals(b.getPixelReader().getColor(x, y))) return false;\n }\n }\n }\n return true;\n }",
"private boolean equalNodes(Node[] arr1, Node[] arr2) {\n // generic tests\n if (!Arrays.equals(arr1, arr2)) {\n return false;\n }\n\n if ((arr1 == null) || (arr1.length == 0)) {\n return true;\n }\n\n // compare paths from each node to root\n int i = 0;\n\n while ((i < arr1.length) && Arrays.equals(NodeOp.createPath(arr1[i], null), NodeOp.createPath(arr2[i], null))) {\n i++;\n }\n\n return i == arr1.length;\n }",
"public static void main(String [] args) throws Exception{\n\t\tBufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n\t\tSystem.out.print(\"Enter first image path : \");\n\t String imgPath1 = bufferRead.readLine();\n\t System.out.print(\"Enter second image path : \");\n\t String imgPath2 = bufferRead.readLine();\n\t\tboolean res = compare(imgPath1, imgPath2);\n\t\tif(res)\n\t\t\tSystem.out.println(\"SAME\");\n\t\telse\n\t\t\tSystem.out.println(\"NOT SAME\");\n\t}",
"public static BufferedImage getDifferenceImage(BufferedImage img1, BufferedImage img2) {\n int width1 = img1.getWidth(); // Change - getWidth() and getHeight() for BufferedImage\n int width2 = img2.getWidth(); // take no arguments\n int height1 = img1.getHeight();\n int height2 = img2.getHeight();\n if ((width1 != width2) || (height1 != height2)) {\n System.err.println(\"Error: Images dimensions mismatch\");\n System.exit(1);\n }\n\n // NEW - Create output Buffered image of type RGB\n BufferedImage outImg = new BufferedImage(width1, height1, BufferedImage.TYPE_INT_RGB);\n\n // Modified - Changed to int as pixels are ints\n int diff;\n int result; // Stores output pixel\n for (int i = 0; i < height1; i++) {\n for (int j = 0; j < width1; j++) {\n int rgb1 = img1.getRGB(j, i);\n int rgb2 = img2.getRGB(j, i);\n int r1 = (rgb1 >> 16) & 0xff;\n int g1 = (rgb1 >> 8) & 0xff;\n int b1 = (rgb1) & 0xff;\n int r2 = (rgb2 >> 16) & 0xff;\n int g2 = (rgb2 >> 8) & 0xff;\n int b2 = (rgb2) & 0xff;\n diff = Math.abs(r1 - r2); // Change\n diff += Math.abs(g1 - g2);\n diff += Math.abs(b1 - b2);\n diff /= 3; // Change - Ensure result is between 0 - 255\n // Make the difference image gray scale\n // The RGB components are all the same\n result = (diff << 16) | (diff << 8) | diff;\n outImg.setRGB(j, i, result); // Set result\n }\n }\n\n // Now return\n return outImg;\n}",
"public static boolean compare(String imgPath1, String imgPath2) throws ClassNotFoundException {\n\t\t\n\t\tDistanceEvaluator distanceEvaluator = new DistanceEvaluator(ExtractionParameters.STORAGE_FILE);\n\t \n\t\tFile img1 = new File(imgPath1);\n\t\tFile img2 = new File(imgPath2);\n\t\t\n\t\treturn (distanceEvaluator.evaluateDistance(img1, img2) <= RecognitionParameters.THRESHOLD);\n\t}",
"public void compareImageAction() {\n\t\tif (selectedAnimalModel == null) {\n\t\t\tshowDialog(ERROR_MESSAGE, \"Animal needs to be saved first.\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (selectedAnimalModel.getId() == 0L || isImageChangedFlag) {\n\t\t\tshowDialog(ERROR_MESSAGE, \"Animal needs to be saved first.\");\n\t\t\treturn;\n\t\t}\n\n\t\tAsyncTask asyncTask = new AsyncTask() {\n\t\t\tAnimalModel animal1 = null;\n\t\t\tAnimalModel animal2 = null;\n\t\t\tAnimalModel animal3 = null;\n\n\t\t\t@Override\n\t\t\tprotected void onDone(boolean success) {\n\t\t\t\tif (!success) {\n\t\t\t\t\tshowDialog(ERROR_MESSAGE, \"Cannot compare images.\");\n\t\t\t\t} else {\n\t\t\t\t\tCompareImagesDialog dialog = new CompareImagesDialog(multimediaPanel, selectedAnimalModel, animal1, animal2, animal3);\n\t\t\t\t\tdialog.setVisible(true);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tprotected Boolean doInBackground() throws Exception {\n\t\t\t\ttry {\n\t\t\t\t\tArrayList<AnimalModel> models;\n\n\t\t\t\t\tmodels = DataManager.getInstance().getThreeSimilarImages(selectedAnimalModel);\n\n\t\t\t\t\tif (models.size() > 0) {\n\t\t\t\t\t\tanimal1 = models.get(0);\n\t\t\t\t\t}\n\t\t\t\t\tif (models.size() > 1) {\n\t\t\t\t\t\tanimal2 = models.get(1);\n\t\t\t\t\t}\n\t\t\t\t\tif (models.size() > 2) {\n\t\t\t\t\t\tanimal3 = models.get(2);\n\t\t\t\t\t}\n\n\t\t\t\t} catch (DataManagerException e1) {\n\t\t\t\t\tLogger.createLog(Logger.ERROR_LOG, e1.getMessage());\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\tasyncTask.start();\n\n\t}",
"public int compare(Object o1, Object o2) {\r\n Node n1 = (Node) o1;\r\n Node n2 = (Node) o2;\r\n\t\tDouble n1wD = n1.getWeightValueUnsynchronized(\"value\"); // used to be n1.getWeightValue(\"value\");\r\n\t\tDouble n2wD = n2.getWeightValueUnsynchronized(\"value\"); // used to be n2.getWeightValue(\"value);\r\n\t\tdouble n1w = n1wD == null ? 1.0 : n1wD.doubleValue();\r\n\t\tdouble n2w = n2wD == null ? 1.0 : n2wD.doubleValue();\r\n\t\tif (n1w<n2w) return -1;\r\n\t\telse if (Double.compare(n2w, n1w)==0) {\r\n\t\t\tdouble n1sz = n1.getNborsUnsynchronized().size();\r\n\t\t\tdouble n2sz = n2.getNborsUnsynchronized().size();\r\n\t\t\ttry {\r\n\t\t\t\tdouble n1szaux = n1.getNborWeights(\"value\");\r\n\t\t\t\tdouble n2szaux = n2.getNborWeights(\"value\");\r\n\t\t\t\tn1sz = n1szaux;\r\n\t\t\t\tn2sz = n2szaux;\r\n\t\t\t}\r\n\t\t\tcatch (ParallelException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tif (n1sz > n2sz) return -1;\r\n\t\t\telse if (n1sz == n2sz) {\r\n\t\t\t\tif (n1.getId() < n2.getId())return -1;\r\n\t\t\t\telse if (n1.getId() == n2.getId())return 0;\r\n\t\t\t\telse return 1;\r\n\t\t\t}\r\n\t\t\telse return 1;\r\n\t\t}\r\n\t\telse return 1;\r\n }",
"public int compare(Object o1, Object o2) {\r\n Node n1 = (Node) o1;\r\n Node n2 = (Node) o2;\r\n\t\tDouble n1wD = n1.getWeightValueUnsynchronized(\"value\"); // used to be n1.getWeightValue(\"value\");\r\n\t\tDouble n2wD = n2.getWeightValueUnsynchronized(\"value\"); // used to be n2.getWeightValue(\"value);\r\n\t\tdouble n1w = n1wD == null ? 1.0 : n1wD.doubleValue();\r\n\t\tdouble n2w = n2wD == null ? 1.0 : n2wD.doubleValue();\r\n\t\tif (n1w>n2w) return -1;\r\n\t\telse if (Double.compare(n2w, n1w)==0) {\r\n\t\t\tdouble n1sz = n1.getNborsUnsynchronized().size();\r\n\t\t\tdouble n2sz = n2.getNborsUnsynchronized().size();\r\n\t\t\ttry {\r\n\t\t\t\tdouble n1szaux = n1.getNborWeights(\"value\");\r\n\t\t\t\tdouble n2szaux = n2.getNborWeights(\"value\");\r\n\t\t\t\tn1sz = n1szaux;\r\n\t\t\t\tn2sz = n2szaux;\r\n\t\t\t}\r\n\t\t\tcatch (ParallelException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tif (n1sz < n2sz) return -1;\r\n\t\t\telse if (n1sz == n2sz) {\r\n\t\t\t\tif (n1.getId() < n2.getId())return -1;\r\n\t\t\t\telse if (n1.getId() == n2.getId())return 0;\r\n\t\t\t\telse return 1;\r\n\t\t\t}\r\n\t\t\telse return 1;\r\n\t\t}\r\n\t\telse return 1;\r\n }",
"public static boolean areSimilar(Node n1, Node n2) {\r\n \r\n //If any condition where children sizes are not same it means shape is not similar so return false\r\n if(n1.children.size() != n2.children.size()){\r\n return false;\r\n }\r\n \r\n boolean res = true;\r\n //To traverse on both trees we use loop in below form, children size are similar if we come here\r\n //so we can use any one for loop traversal length either n1 or n2.\r\n for(int i=0; i<n1.children.size(); i++){\r\n Node child1 = n1.children.get(i);\r\n Node child2 = n2.children.get(i);\r\n \r\n res = areSimilar(child1, child2);\r\n \r\n //if even once a false is encountered it means no further calculation required so return from here\r\n if(res == false){\r\n return false;\r\n }\r\n }\r\n return res;\r\n }",
"@Override\n\tpublic float similarity(PetriNet pn1, PetriNet pn2) {\n\t\treturn similarity((PetriNet) pn1.clone(), (PetriNet) pn2.clone(), 1);\n\t}",
"public static double compareImage(BufferedImage myImage, BufferedImage otherImage) {\n\t\tif (otherImage.getWidth() != myImage.getWidth()) {\n\t\t\tLOG.info(\"图片宽度不一致\");\n\t\t\treturn 0; \n\t\t}\n\t\tif (otherImage.getHeight() != myImage.getHeight()) {\n\t\t\tLOG.info(\"图片高度不一致\");\n\t\t\treturn 0; \n\t\t}\n\t\tint width = myImage.getWidth();\n\t\tint height = myImage.getHeight();\n\t\tint numDiffPixels = 0;\n\t\tfor (int y = 0; y < height; y++) {\n\t\t\tfor (int x = 0; x < width; x++) {\n\t\t\t\tif (myImage.getRGB(x, y) != otherImage.getRGB(x, y)) {\n\t\t\t\t\tnumDiffPixels++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdouble numberPixels = height * width;\n\t\tdouble samePixels = numberPixels - numDiffPixels;\n\t\tdouble samePercent = samePixels / numberPixels * 100;\n\t\tLOG.info(\"相似像素数量:\" + samePixels + \" 不相似像素数量:\" + numDiffPixels + \" 相似率:\" + String.format(\"%.1f\", samePercent) + \"%\");\n\t\treturn samePercent;\n\t}",
"private boolean imageStatsEquals(ImageStatistics a, ImageStatistics b)\n\t{\n\t\tif (!Arrays.equals(a.histogram, b.histogram))\n\t\t\treturn false;\n\n\t\tif (a.pixelCount != b.pixelCount)\n\t\t\treturn false;\n\n\t\tif (a.mode != b.mode)\n\t\t\treturn false;\n\n\t\tif (a.dmode != b.dmode)\n\t\t\treturn false;\n\n\t\tif (a.area != b.area)\n\t\t\treturn false;\n\n\t\tif (a.min != b.min)\n\t\t\treturn false;\n\n\t\tif (a.max != b.max)\n\t\t\treturn false;\n\n\t\tif (a.mean != b.mean)\n\t\t\treturn false;\n\n\t\tif (a.median != b.median)\n\t\t\treturn false;\n\n\t\tif (a.stdDev != b.stdDev)\n\t\t\treturn false;\n\n\t\tif (a.skewness != b.skewness)\n\t\t\treturn false;\n\n\t\tif (a.kurtosis != b.kurtosis)\n\t\t\treturn false;\n\n\t\tif (a.xCentroid != b.xCentroid)\n\t\t\treturn false;\n\n\t\tif (a.yCentroid != b.yCentroid)\n\t\t\treturn false;\n\n\t\tif (a.xCenterOfMass != b.xCenterOfMass)\n\t\t\treturn false;\n\n\t\tif (a.yCenterOfMass != b.yCenterOfMass)\n\t\t\treturn false;\n\n\t\treturn true;\n\t}",
"public static BufferedImage getDifferenceImage1(BufferedImage img1,\n BufferedImage img2) {\n int w=img1.getWidth();\n int h=img1.getHeight();\n Rectangle r=new Rectangle(0,0,w,h);\n return getDifferenceImage1(img1,img2,w,h,r); \n }",
"private List<SimilarNode> astCCImplmentation(HashMap<ASTNode, NodeInfo> fileNodeMap1, HashMap<ASTNode, NodeInfo> fileNodeMap2) {\n TreeMap<Integer, List<NodeInfo>> treeMap1 = convertToTreeMap(fileNodeMap1);\n TreeMap<Integer, List<NodeInfo>> treeMap2 = convertToTreeMap(fileNodeMap2);\n List<SimilarNode> result = new ArrayList<>();\n int[] array1 = getArray(treeMap1.keySet());\n int[] array2 = getArray(treeMap2.keySet());\n int i = 0;\n int j = 0;\n int sum = 0;\n while (i < array1.length && j < array2.length) {\n if (array1[i] == array2[j]) {\n // obtain list of nodeInfos for both and compare them if match found then add it to report\n List<NodeInfo> list1 = treeMap1.get(array1[i]);\n List<NodeInfo> list2 = treeMap2.get(array2[j]);\n for (NodeInfo nodeInfo1 : list1) {\n for (NodeInfo nodeInfo2 : list2) {\n if ((nodeInfo1.hashValue == nodeInfo2.hashValue) && (nodeInfo1.nodeType == nodeInfo2.nodeType)) {\n result.add(new SimilarNode(nodeInfo1, nodeInfo2));\n\n }\n }\n }\n i++;\n j++;\n\n } else if (array1[i] > array2[j]) {\n j++;\n } else if (array1[i] < array2[j]) {\n i++;\n }\n }\n return result;\n }",
"public void compareTwoImages(WebDriver driver, String expectedImageFileName) throws Throwable {\n\t\t\n\t\tBufferedImage expectedImages = ImageIO.read(new File(constantValues.getSavedImagesFolderPath() + \"\\\\\" + expectedImageFileName + \".png\"));\n\t\t\n\t\tRandom randomVal = new Random();\n\t\tboolean comapareReturnValue = Shutterbug.shootPage(driver, ScrollStrategy.WHOLE_PAGE).withName(String.valueOf(randomVal.nextInt(1000))).equals(expectedImages);\n\t\tAssert.assertTrue(comapareReturnValue);\n\t\tlogger.info(\"Both imanges are matching as expected\");\n\t}",
"@Override\n public double similarity(\n final Integer value1, final Integer value2) {\n\n // The value of nodes is an integer...\n return 1.0 / (1.0 + Math.abs(value1 - value2));\n }",
"private boolean compatibleNodeTypes(AxiomTreeNode t1, AxiomTreeNode t2) {\n if (!t1.getNodeType().equals(t2.getNodeType())) {\n return false;\n }\n \n switch (t1.getNodeType()) {\n case CARD:\n int label1 = (Integer) t1.getLabel();\n int label2 = (Integer) t2.getLabel();\n return (label1 == label2);\n \t\n case OWLOBJECT:\n OWLObject o1 = (OWLObject) t1.getLabel();\n OWLObject o2 = (OWLObject) t2.getLabel();\n //System.out.println(o1.getClass());\n //System.out.println(o2.getClass());\n //Check for datatypes - then check datatype to see match. Else, return true if compatible.\n if(o1.getClass() == o2.getClass())\n {\n \tif(!o1.getDatatypesInSignature().isEmpty())\n \t{\n \t\t//Need to check if built in first. First check is convenience, datatypes should match\n \t\t//If one is built in, so should other. If neither is built in, this is also a viable match\n \t\t//If not equal and at least one is built in, its not a match.\n \t\tOWLDatatype dt1 = (OWLDatatype) o1.getDatatypesInSignature().toArray()[0];\n \t\t\tOWLDatatype dt2 = (OWLDatatype) o2.getDatatypesInSignature().toArray()[0];\n \t\t\t//System.out.println(\"DT1: \" + dt1);\n \t\t\t//System.out.println(\"DT2: \" + dt2);\n \t\tif(dt1.equals(dt2) && dt1.isBuiltIn())\n \t\t{\t\n \t\t\t//System.out.println(\"Standard state\");\n \t\t\t//System.out.println(o1.equals(o2));\n \t\t\treturn o1.equals(o2);\n \t\t}\n \t\telse if(!dt1.isBuiltIn() && !dt2.isBuiltIn())\n \t\t{\n \t\t\t//System.out.println(\"Unique state\");\n \t\t\treturn true;\n \t\t}\n \t\telse\n \t\t{\n \t\t\t//System.out.println(\"Rejection state\");\n \t\t\treturn false;\n \t\t}\n \n \t}\n \telse\n \t{\n \t\treturn true;\n \t}\n }\n else\n {\n \treturn false;\n }\n }\n return false;\n }",
"public static BufferedImage getDifferenceImage1(BufferedImage img1,\n BufferedImage img2, int width, int height,Rectangle r) {\n // convert images to pixel arrays...\n \n final int[] p1 = img1.getRGB(r.x, r.y, r.width, r.height, null, 0, r.width);\n final int[] p2 = img2.getRGB(r.x, r.y, r.width, r.height, null, 0, r.width);\n // compare img1 to img2, pixel by pixel. If different, highlight img1's\n // pixel...\n for (int i = 0; i < p1.length; i++) {\n int rgb1=p1[i];\n int rgb2=p2[i];\n int r1 = (rgb1 >> 16) & 0xff;\n int g1 = (rgb1 >> 8) & 0xff;\n int b1 = (rgb1) & 0xff;\n int r2 = (rgb2 >> 16) & 0xff;\n int g2 = (rgb2 >> 8) & 0xff;\n int b2 = (rgb2) & 0xff;\n\n int rd=r1>r2?r1-r2:r2-r1;\n int gd=g1>g2?g1-g2:g2-g1;\n int bd=b1>b2?b1-b2:b2-b1;\n int d = (rd << 16) | (gd << 8) | bd;\n p1[i] = d;\n }\n // save img1's pixels to a new BufferedImage, and return it...\n // (May require TYPE_INT_ARGB)\n final BufferedImage out = new BufferedImage(width, height,\n BufferedImage.TYPE_INT_RGB);\n out.setRGB(r.x, r.y, r.width, r.height, p1, 0, r.width);\n return out;\n }",
"@Override\npublic int compareTo(ImageForSort newImage) {\n\tif(this.distance==newImage.distance)\n\treturn 0;\n\telse if(this.getDistance()>newImage.getDistance()){\n\t\treturn 1;\n\t}else{\n\t\treturn -1;\n\t}\n}",
"@Test\n public void equality() {\n ImageReference expected = createSampleImage();\n\n assertEquals(expected, createSampleImage());\n assertNotEquals(expected, new ImageReference.Builder()\n .setContentUri(\"content://bar\")\n .setIsTintable(true)\n .setOriginalSize(TEST_WIDTH, TEST_HEIGHT)\n .build());\n assertNotEquals(expected, new ImageReference.Builder()\n .setContentUri(TEST_CONTENT_URI)\n .setIsTintable(false)\n .setOriginalSize(TEST_WIDTH, TEST_HEIGHT)\n .build());\n assertNotEquals(expected, new ImageReference.Builder()\n .setContentUri(TEST_CONTENT_URI)\n .setIsTintable(false)\n .setOriginalSize(1, TEST_HEIGHT)\n .build());\n assertNotEquals(expected, new ImageReference.Builder()\n .setContentUri(TEST_CONTENT_URI)\n .setIsTintable(false)\n .setOriginalSize(TEST_WIDTH, 1)\n .build());\n\n assertEquals(expected.hashCode(), new ImageReference.Builder()\n .setContentUri(TEST_CONTENT_URI)\n .setIsTintable(true)\n .setOriginalSize(TEST_WIDTH, TEST_HEIGHT)\n .build()\n .hashCode());\n }",
"public static int graphNodeComparison(Vector3D targetNodePosition, GraphNode a, GraphNode b) {\n Vector3D aPos = getPositionOf(a);\n Vector3D bPos = getPositionOf(b);\n\n float aDiff = Vector3D.getDistanceBetween(aPos, targetNodePosition);\n float bDiff = Vector3D.getDistanceBetween(bPos, targetNodePosition);\n\n float diff = aDiff - bDiff;\n int intDiff = Math.round(diff * DIFF_SCALE);\n\n if (intDiff == 0)\n intDiff = (int)Math.signum(diff);\n\n return intDiff;\n }",
"@Override\n public BufferedImage filter(BufferedImage image) {\n int width = image.getWidth();\n int height = image.getHeight();\n int imageType = image.getType();\n BufferedImage newImage = new BufferedImage(width, height, imageType);\n \n // Process each pixel in column-major order\n for (int column = 0; column < newImage.getWidth(); column++) {\n for (int row = 0; row < newImage.getHeight(); row++) {\n \n try {\n // Compare the pixel at (column, row) in this image to the pixel\n // at (column, row) in the other image, and visualize the results\n // accordingly.\n int thisRGB = image.getRGB(column, row);\n int otherRGB = this.other.getRGB(column, row);\n int difference = otherRGB - thisRGB;\n if (difference == 0) {\n newImage.setRGB(column, row, MATCH_COLOR);\n } else {\n newImage.setRGB(column, row, NO_MATCH_COLOR);\n }\n } \n \n // If the other image is narrower or shorter than this one, and this \n // pixel lies out of the range of the smaller image, then visualize\n // this pixel as \"out of bounds\"\n catch (IndexOutOfBoundsException e) {\n newImage.setRGB(column, row, OUT_OF_BOUNDS_COLOR);\n } \n }\n }\n \n return newImage;\n }",
"public static double compareImg(double x, double y, double z, double x2,double y2, double z2) {\n return Math.sqrt(Math.pow(x-x2, 2) + Math.pow(y-y2, 2)+ Math.pow(z-z2, 2));\n }",
"public int compare(SearchNode sn1, SearchNode sn2) {\n int hp1 = sn1.dist + sn1.board.hamming();\n int hp2 = sn2.dist + sn2.board.hamming();\n \n if (hp1 > hp2) return 1;\n if (hp1 < hp2) return -1;\n return 0;\n }",
"@Test\n public void testSmallDist() throws Exception {\n assertTrue(\n new ImageSimilarity(getFile(\"imageSimilarity/with.png\"))\n .calcDistance(ImageIO.read(getFile(\"imageSimilarity/without.png\")))\n > 0);\n }",
"private boolean compare(TreeNode leftRoot, TreeNode rightRoot) {\n // Good shortcut\n //if(left==null || right==null) return left==right;\n if (leftRoot == null && rightRoot == null) return true;\n if (leftRoot == null || rightRoot == null) return false;\n if (leftRoot.val != rightRoot.val) return false;\n boolean isOutersEqual = compare(leftRoot.left, rightRoot.right);\n boolean isInnersEqual = compare(leftRoot.right, rightRoot.left);\n return isOutersEqual && isInnersEqual;\n }",
"@Override\r\n\t\tpublic boolean isSameNode(Node other)\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}",
"public static boolean areSimilar(Node n1, Node n2) {\n boolean flag=true;\n int n=n1.children.size();\n if(n!=n2.children.size())\n return false;\n for(int i=0;i<n;i++)\n {\n flag=flag && areSimilar(n1.children.get(i),n2.children.get(i));\n if(flag==false)\n break;\n }\n return flag;\n }",
"private Similarity getSimilarity(DisjointSets<Pixel> ds, int root1, int root2)\n {\n return null; //TODO: remove and replace this line\n }",
"private void categoriseNodes(final CyNetwork result, final Set<CyNode> leftSet,\n\t\t\t\t final Set<CyNode> rightSet)\n\t{\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tfinal Set<CyNode> orig1 = new HashSet<CyNode>(network1.nodesList());\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tfinal Set<CyNode> orig2 = new HashSet<CyNode>(network2.nodesList());\n\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tfinal List<CyNode> resultNodes = (List<CyNode>)result.nodesList();\n\t\t\n\t\tfinal CyAttributes nodeAttr = Cytoscape.getNodeAttributes();\n\t\t\n\t\tfor (final CyNode node : resultNodes) {\n\t\t\tfinal boolean inNetwork1 = orig1.contains(node);\n\t\t\tfinal boolean inNetwork2 = orig2.contains(node);\n\t\t\t\n\t\t\tif (inNetwork1 && inNetwork2)\n\t\t\t\t/* Do Nothing. */;\n\t\t\telse if (inNetwork1 && !inNetwork2) {\n\t\t\t\tleftSet.add(node);\n\t\t\t\tnodeAttr.setAttribute(node.getIdentifier(), visualStyleName, network1.getTitle());\n\t\t\t} else if (!inNetwork1 && inNetwork2) {\n\t\t\t\trightSet.add(node);\n\t\t\t\tnodeAttr.setAttribute(node.getIdentifier(), visualStyleName, network2.getTitle());\n\t\t\t} else // This should never happen!\n\t\t\t\tthrow new IllegalStateException(\"Do not know how to categorise a node!\");\n\t\t}\n\t}",
"public boolean areEqual(Element element1, Element element2, HashMap<String, Integer> lengthMap, GUIState state, GUIState currentState) throws MultipleListOrGridException {\n if (!isAttributeEqual(element1, element2)) {\n return false;\n }\n\n for (int i = 0; i < max(element1.elements().size(), element2.elements().size()); i++) {\n if (i == ((Element) element1).elements().size() || i == ((Element) element2).elements().size())\n return false;\n if (element1.attributeValue(NodeAttribute.Class) != null && element2.attributeValue(NodeAttribute.Class) != null &&\n (element1.attributeValue(NodeAttribute.Class).equals(NodeAttribute.ListView) && element2.attributeValue(NodeAttribute.Class).equals(NodeAttribute.ListView)\n || element1.attributeValue(NodeAttribute.Class).equals(NodeAttribute.GridView) && element2.attributeValue(NodeAttribute.Class).equals(NodeAttribute.GridView))) {\n\n if (state.getListSize() != currentState.getListSize() && state.getGridSize() != currentState.getGridSize()) {\n currentState.setIsDynamicListAndGrid(true);\n }\n if (currentState.isDynamicListAndGrid()) {\n if (lengthMap.get(getCurrentXpath(element1, getStringList(element1))) == null)\n lengthMap.put(getCurrentXpath(element1, getStringList(element1)), 0);\n\n if (!areEqual((Element) element1.elements().get(i), (Element) element2.elements().get(i), lengthMap, state, currentState)) {\n return false;\n } else {\n int lengthValue = lengthMap.get(getCurrentXpath(element1, getStringList(element1))) + 1;\n lengthMap.put(getCurrentXpath(element1, getStringList(element1)), lengthValue);\n if (lengthMap.get(getCurrentXpath(element1, getStringList(element1))) >= maxListGridSizeThreshold) {\n this.totalListGridEquivalentStateCount++;\n state.setIsEquivalentState(true);\n if (!state.getImagelist().contains(currentState.getImagelist().get(0)))\n state.addImage(currentState.getImagelist().get(0));\n state.increaseEquivalentStateCount();\n state.setIsListAndGrid(true);\n return true;\n }\n }\n } else {\n return false;\n }\n\n } else {\n if (!areEqual((Element) element1.elements().get(i), (Element) element2.elements().get(i), lengthMap, state, currentState)) {\n return false;\n }\n }\n }\n return true;\n }",
"private static int binaryCompare(final Resource r1, final Resource r2) throws IOException {\n try (InputStream in1 = new BufferedInputStream(r1.getInputStream());\n InputStream in2 =\n new BufferedInputStream(r2.getInputStream())) {\n\n for (int b1 = in1.read(); b1 != -1; b1 = in1.read()) {\n final int b2 = in2.read();\n if (b1 != b2) {\n return b1 > b2 ? 1 : -1;\n }\n }\n return in2.read() == -1 ? 0 : -1;\n }\n }",
"@Override\r\n\t public int compare(Node o1, Node o2) {\n\t\tif (o1.downloadRate > o2.downloadRate)\r\n\t\t return 1;\r\n\t\tif (o1.downloadRate < o2.downloadRate)\r\n\t\t return -1;\r\n\t\t\r\n\t\treturn 0;\r\n\t }",
"public int compare(SearchNode sn1, SearchNode sn2) {\n int hp1 = sn1.dist + sn1.board.manhattan();\n int hp2 = sn2.dist + sn2.board.manhattan();\n \n if (hp1 > hp2) return 1;\n if (hp1 < hp2) return -1;\n return 0;\n }",
"public Image getTwo();",
"public static double qualityFactor(BufferedImage img1, BufferedImage img2){\n int imagePixels1 = img1.getWidth() * img1.getHeight();\n int[] colorsTile1;\n int red = 0, green=0, blue = 0;\n //Get the mean of each channel of all pixels of the image 1\n for (int tileX = 0; tileX < img1.getWidth(); tileX++) {\n for (int tileY = 0; tileY < img1.getHeight(); tileY++) {\n colorsTile1 = getPixelColor(img1,tileX,tileY);\n red += colorsTile1[0];\n green += colorsTile1[1];\n blue += colorsTile1[2];\n }\n }\n double meanRed1 = (double) red / imagePixels1;\n double meanGreen1 = (double) green / imagePixels1;\n double meanBlue1 = (double) blue / imagePixels1;\n \n int imagePixels2 = img2.getWidth() * img2.getHeight();\n int[] colorsTile2;\n int red2 = 0, green2 = 0, blue2 = 0;\n //Get the mean of each channel of all pixels of the image 2\n for (int tileX = 0; tileX < img2.getWidth(); tileX++) {\n for (int tileY = 0; tileY < img2.getHeight(); tileY++) {\n colorsTile2 = getPixelColor(img2,tileX,tileY);\n red2 += colorsTile2[0];\n green2 += colorsTile2[1];\n blue2 += colorsTile2[2];\n }\n }\n double meanRed2 = (double) red2 / imagePixels2;\n double meanGreen2 = (double) green2 / imagePixels2;\n double meanBlue2 = (double) blue2 / imagePixels2;\n //Use the correlation function to get a quality coeficient\n return compareImg3(meanRed1, meanGreen1, meanBlue1, meanRed2, meanGreen2, meanBlue2);\n }",
"@Override\n\tpublic ComparisonResult computeDifference() throws Exception {\n\t\t\n\t\tList<Token> tokens1 = file1.getTokens();\n\t\tList<Token> tokens2 = file2.getTokens();\n\t\t\n\t\t\n\t\tif (tokens1.size() == 0 || tokens2.size() == 0)\n\t\t\treturn new ComparisonResult(null, 0);\n\t\t\n\t\tQGramToken qGram1 = (QGramToken) new QGramTokenContainer(tokens1, tokens1.size()).get(0);\n\t\tQGramToken qGram2 = (QGramToken) new QGramTokenContainer(tokens2, tokens2.size()).get(0);\n\t\t\n\t\t// peut être négatif si les deux fichiers ont un taux d'alignement des tokens supérieur au nombre total de token.\n\t\tdouble val = qGram1.needlemanWunschAlignment(qGram2, -1) / (double) Math.max(qGram1.size(), qGram2.size());\n\t\t\n\t\treturn new ComparisonResult((val > heuristicPlagiatThreshold) ? (Boolean)true : val <= 0 ? false : null, val < 0 ? 0 : val);\n\t}",
"public void testEquals() {\n XYBlockRenderer r1 = new XYBlockRenderer();\n XYBlockRenderer r2 = new XYBlockRenderer();\n r1.setBlockHeight(2.0);\n r2.setBlockHeight(2.0);\n r1.setBlockWidth(2.0);\n r2.setBlockWidth(2.0);\n r1.setPaintScale(new GrayPaintScale(0.0, 1.0));\n r2.setPaintScale(new GrayPaintScale(0.0, 1.0));\n }",
"@Test\n\tpublic void equalsSimilarObjects() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tboolean equals = key1.equals(key2);\n\t\tSystem.out.println();\n\t\tAssert.assertTrue(equals);\n\t}",
"@Override\r\n public int compare(Node x, Node y)\r\n {\n if (x.getD() < y.getD())\r\n {\r\n return -1;\r\n }\r\n else if (x.getD() > y.getD())\r\n {\r\n return 1;\r\n }\r\n return 0;\r\n }",
"@Override\n\t\t public int compare(PathObject lhs, PathObject rhs) {\n\t\t return Double.compare(lhs.getClassProbability(), rhs.getClassProbability()); // Use double compare to safely handle NaN and Infinity\n\t\t }",
"@Override\n\t\t public int compare(PathObject lhs, PathObject rhs) {\n\t\t return Double.compare(lhs.getClassProbability(), rhs.getClassProbability()); // Use double compare to safely handle NaN and Infinity\n\t\t }",
"boolean losCompare(double x1, double y1, double x2, double y2, CObject pHo)\r\n {\r\n double delta;\r\n int x, y;\r\n\r\n int xLeft = pHo.hoX - pHo.hoImgXSpot;\r\n int xRight = xLeft + pHo.hoImgWidth;\r\n int yTop = pHo.hoY - pHo.hoImgYSpot;\r\n int yBottom = yTop + pHo.hoImgHeight;\r\n\r\n if (x2 - x1 > y2 - y1)\r\n {\r\n delta = (double) (y2 - y1) / (double) (x2 - x1);\r\n if (x2 > x1)\r\n {\r\n if (xRight < x1 || xLeft >= x2)\r\n {\r\n return false;\r\n }\r\n }\r\n else\r\n {\r\n if (xRight < x2 || xLeft >= x1)\r\n {\r\n return false;\r\n }\r\n }\r\n y = (int) (delta * (xLeft - x1) + y1);\r\n if (y >= yTop && y < yBottom)\r\n {\r\n return true;\r\n }\r\n\r\n y = (int) (delta * (xRight - x1) + y1);\r\n if (y >= yTop && y < yBottom)\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n else\r\n {\r\n delta = (double) (x2 - x1) / (double) (y2 - y1);\r\n if (y2 > y1)\r\n {\r\n if (yBottom < y1 || yTop >= y2)\r\n {\r\n return false;\r\n }\r\n }\r\n else\r\n {\r\n if (yBottom < y2 || yTop >= y1)\r\n {\r\n return false;\r\n }\r\n }\r\n x = (int) (delta * (yTop - y1) + x1);\r\n if (x >= xLeft && x < xRight)\r\n {\r\n return true;\r\n }\r\n\r\n x = (int) (delta * (yTop - y1) + x1);\r\n if (x >= xLeft && x < xRight)\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n }",
"public static boolean similar(BinaryTreeNode t1, BinaryTreeNode t2) {\n\t\t\n \n\t\tif (isPlaceHolder(t1) && isPlaceHolder(t2))\n\t\treturn true;\n\n\t\telse if (isPlaceHolder(t1) || isPlaceHolder(t2))\n\t\treturn false;\n\n\t\treturn similar(t1.getLeft(),t2.getLeft()) && similar(t1.getRight(),t2.getRight()); \n\n\n }",
"public float compare(Cluster other) {\n \treturn compare(center, other.center);\n }",
"boolean hasImageByTransform();",
"private static boolean compare(BufferedInputStream b1, BufferedInputStream b2) throws IOException {\n\t\tint cmp1 = 0, cmp2;\r\n\t\tbyte[] i = new byte[100];\r\n\t\tbyte[] j = new byte[100];\r\n\t\t\r\n\t\twhile(cmp1 != -1){\r\n\t\t\tcmp1 = b1.read(i, 0, i.length);\r\n\t\t\tcmp2 = b2.read(j, 0, j.length);\r\n\t\t\tif(cmp1 != cmp2){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfor(int k = 0; k < cmp1; k++){\r\n\t\t\t\tif(i[k] != j[k]){\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"private PlainGraph mergeGraphsInternal(PlainGraph g1, PlainGraph g2) {\n // Create all nodes of g2 in g1\n // AddNode does check if the node does exist already, if so it doesn't create a new one\n for (Map.Entry<String, PlainNode> entry: graphNodeMap.get(g2).entrySet()){\n addNode(g1, entry.getKey(), null);\n }\n\n // create all edges of g2 in g1\n for (PlainEdge edge: g2.edgeSet()) {\n // check if the edge exists in g1, if so check if the variable names of the source and the target are also the same and not just the node names\n // Since the node names are numbered in each graph starting with 0, collisions could exists without the 2nd and 3rd check\n // Inverse the whole such that if this edge doesn't exist create it in g1\n if (! (g1.containsEdge(edge) && getVarName(g2, edge.source()).equals(getVarName(g1, edge.source())) && getVarName(g2, edge.target()).equals(getVarName(g1, edge.target())))) {\n addEdge(g1, getVarName(g2, edge.source()), edge.label().text(), getVarName(g2, edge.target()));\n }\n }\n return g1;\n }",
"@Override\r\n\tpublic int compare(GraphNode<T> o1, GraphNode<T> o2) {\n\t\treturn o1.getName().compareTo(o2.getName());\r\n\t}",
"private Comparison compareChildren(SimpleNode first, SimpleNode second) {\n List<SimpleNode> firstChildren = getChildren(first);\n List<SimpleNode> secondChildren = getChildren(second);\n\n // Compare the sizes.\n if (firstChildren.size() != secondChildren.size()) {\n return Comparison.notEqual(\"Num children differ: \" + firstChildren + \" vs \" + secondChildren);\n }\n\n // Look for an equivalent of each child, visiting each child recursively when needed.\n Comparison currentComparison = null;\n for (SimpleNode firstChild : firstChildren) {\n for (int i = 0; i < secondChildren.size(); i++) {\n SimpleNode secondChild = secondChildren.get(i);\n currentComparison = (Comparison) firstChild.jjtAccept(this, secondChild);\n if (currentComparison.isEqual()) {\n secondChildren.remove(i);\n break;\n }\n }\n\n if (!currentComparison.isEqual()) {\n return Comparison.notEqual(\"Did not find a matching child for \" + firstChild + \" in \" + secondChildren + \": \" + currentComparison.getReason());\n }\n }\n\n return Comparison.IS_EQUAL;\n }",
"protected int checkMergeShapes(FoundShape shapeA, FoundShape shapeB) {\n\t\tmembersAinB.clear();\n\t\tmembersBinA.clear();\n\n\t\t// find points which are mutual members\n\t\tfindMembersRigorous(shapeA, shapeB.points, membersBinA);\n\t\tfindMembersRigorous(shapeB, shapeA.points, membersAinB);\n\n\t\t// see if one of the shapes has a bunch of points in the other\n\t\tdouble fracAinB = membersAinB.size() / (double) shapeA.points.size();\n\t\tdouble fracBinA = membersBinA.size() / (double) shapeB.points.size();\n\n\t\tif (Math.max(fracAinB, fracBinA) <= commonMembershipFraction) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tif (fracAinB > fracBinA) {\n\t\t\t// B is the dominant one\n\t\t\tmodifiedDominant = mergeShape(shapeB, shapeA.points);\n\t\t\treturn 2;\n\t\t} else {\n\t\t\t// A is the dominant one\n\t\t\tmodifiedDominant = mergeShape(shapeA, shapeB.points);\n\t\t\treturn 1;\n\t\t}\n\t}",
"private void CompareTwoFiles() {\n GetCharactersFromProject prog1Char;\r\n KGram prog1KGram;\r\n HashKGram prog1HashKGram;\r\n FingerPrint prog1FingerPrint;\r\n ArrayList<Integer> fingerprintProg1 = null;\r\n\r\n GetCharactersFromProject prog2Char;\r\n KGram prog2KGram;\r\n HashKGram prog2HashKGram;\r\n FingerPrint prog2FingerPrint;\r\n ArrayList<Integer> fingerprintProg2 = null;\r\n\r\n //for the first file\r\n try {\r\n prog1Char = new GetCharactersFromProject(filepath1);\r\n prog1KGram = new KGram(prog1Char.getCharacters());\r\n prog1HashKGram = new HashKGram(prog1KGram.ReturnProcessedKGram());\r\n prog1FingerPrint = new FingerPrint(prog1HashKGram.ReturnProcessedHashes());\r\n fingerprintProg1 = prog1FingerPrint.ReturnFingerPrint();\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n //this is for the second file\r\n try {\r\n prog2Char = new GetCharactersFromProject(filepath2);\r\n prog2KGram = new KGram(prog2Char.getCharacters());\r\n prog2HashKGram = new HashKGram(prog2KGram.ReturnProcessedKGram());\r\n prog2FingerPrint = new FingerPrint(prog2HashKGram.ReturnProcessedHashes());\r\n fingerprintProg2 = prog2FingerPrint.ReturnFingerPrint();\r\n } catch (IOException ex) {\r\n ex.printStackTrace();\r\n }\r\n\r\n //this is for jaccard index. Jaccard index will be the basis of similarity\r\n float numSimilarity = 0;\r\n boolean isSimilarEncounter = false;\r\n int sizeFingerprint1 = fingerprintProg1.size();\r\n int sizeFingerprint2 = fingerprintProg2.size();\r\n\r\n for (Integer integer : fingerprintProg1) {\r\n\r\n for (Integer value : fingerprintProg2) {\r\n\r\n\r\n if ((integer.intValue() == value.intValue()) && !isSimilarEncounter) {\r\n numSimilarity++;\r\n isSimilarEncounter = true;\r\n }\r\n\r\n }\r\n\r\n\r\n isSimilarEncounter = false;\r\n }\r\n\r\n SimilarityScore = (numSimilarity / (sizeFingerprint1 + sizeFingerprint2 - numSimilarity));\r\n }",
"private Comparison compareValues(SimpleNode first, SimpleNode second) {\n return Objects.equals(first.jjtGetValue(), second.jjtGetValue()) ? Comparison.IS_EQUAL\n : Comparison.notEqual(\"Node values differ: \" + first.jjtGetValue() + \" vs \" + second.jjtGetValue());\n }",
"private void compareSecondPass() {\n final int arraySize = this.oldFileNoMatch.size()\r\n + this.newFileNoMatch.size();\r\n this.compareArray = new SubsetElement[arraySize][2];\r\n final Iterator<String> oldIter = this.oldFileNoMatch.keySet()\r\n .iterator();\r\n int i = 0;\r\n while (oldIter.hasNext()) {\r\n final String key = oldIter.next();\r\n final SubsetElement oldElement = this.oldFileNoMatch.get(key);\r\n SubsetElement newElement = null;\r\n if (this.newFileNoMatch.containsKey(key)) {\r\n newElement = this.newFileNoMatch.get(key);\r\n }\r\n this.compareArray[i][0] = oldElement;\r\n this.compareArray[i][1] = newElement;\r\n i++;\r\n }\r\n // now go through the new elements and check for any that have no match.\r\n // these will be new elements with no corresponding old element\r\n final SubsetElement oldElement = null;\r\n final Iterator<String> newIter = this.newFileNoMatch.keySet()\r\n .iterator();\r\n while (newIter.hasNext()) {\r\n final String key = newIter.next();\r\n if (!this.oldFileNoMatch.containsKey(key)) {\r\n final SubsetElement newElement = this.newFileNoMatch.get(key);\r\n this.compareArray[i][0] = oldElement;\r\n this.compareArray[i][1] = newElement;\r\n i++;\r\n }\r\n\r\n }\r\n\r\n }",
"public int compareTo( Similarity other )\n {\n int diff=this.distance - other.distance;\n if(diff!=0) return diff;\n diff=getID(this.pixels.p) - getID(other.pixels.p);\n if(diff!=0) return diff;\n return getID(this.pixels.q) - getID(other.pixels.q);\n }",
"public boolean compareType(Node n1, Node n2)\n {\n boolean compare= false;\n if (n1 instanceof Ipv4 && n2 instanceof Ipv4)\n {\n if (((Ipv4) n1).getType().equals(((Ipv4) n2).getType()))\n compare= true;\n }\n else if (n1 instanceof Ipv4 && n2 instanceof Ipv6)\n {\n if (((Ipv4) n1).getType().equals(((Ipv6) n2).getType()))\n compare= true;\n }\n else if (n1 instanceof Ipv6 && n2 instanceof Ipv4)\n {\n if (((Ipv6) n1).getType().equals(((Ipv4) n2).getType()))\n compare= true;\n }\n else if (n1 instanceof Ipv6 && n2 instanceof Ipv6)\n {\n if (((Ipv6) n1).getType().equals(((Ipv6) n2).getType()))\n compare= true;\n }\n return compare;\n }",
"public boolean nodeValueCompare(Node destinationNode, Node sourceNode, String messageTitle, Check check, TestConfigData test)\n\t{\n\t\tboolean result = true;\n\t\tboolean checkAttribute = false;\n\t\tElement sourceElement = (Element) sourceNode;\n\t\tString sourceAttribute = \"\";\n\t\tif (check.SourcePath.trim().indexOf(\")\") == (check.SourcePath.trim().length() -1)) \n\t\t{\n\t\t\tcheckAttribute = true;\n\t\t\tsourceAttribute = check.SourcePath.substring(check.SourcePath.indexOf(\"(\")+1, check.SourcePath.indexOf(\")\"));\t\t\t\n\t\t}\n\t\tif (sourceNode != null && destinationNode != null)\n\t\t{\t\n\t\t\tif (check.Type == null)\n\t\t\t{\t\n\t\t\t\tdouble sourceValue;\n\t\t\t\tdouble destinationValue = destinationNode.getText() == \"\" ? 0 : Double.parseDouble(destinationNode.getText());\n\t\t\t\tif (checkAttribute) sourceValue = sourceElement.attributeValue(sourceAttribute) == \"\" ? 0 : Double.parseDouble(sourceElement.attributeValue(sourceAttribute));\n\t\t\t\telse sourceValue = sourceNode.getText() == \"\" ? 0 : Double.parseDouble(sourceNode.getText());\t\t\t\t\t\t\t\t\t\n\t\t\t\tif (destinationValue != sourceValue)\n\t\t\t\t{\n\t\t\t\t\tif (checkAttribute) logger.error(messageTitle + check.DestinationPath + \"\\t\" + check.SourcePath + \"\\tdata deosn't match for \" + test.DestNodeSpecifiedDefinitions + \"/\" + check.DestinationPath + \": \"\n\t\t\t\t\t\t\t+ destinationNode.getText() + \",\" + sourceElement.attributeValue(sourceAttribute));\t\n\t\t\t\t\telse\tlogger.error(messageTitle + check.DestinationPath + \"\\t\" + check.SourcePath + \"\\tdata deosn't match for \" + test.DestNodeSpecifiedDefinitions + \"/\" + check.DestinationPath + \": \"\n\t\t\t\t\t\t\t+ destinationNode.getText() + \",\" + sourceNode.getText());\t\t\t\t\t\t\t\t\n\t\t\t\t\tresult = false;\n\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}else\n\t\t\t{\n\t\t\t\tString destinationValue = destinationNode.getText();\n\t\t\t\tString sourceValue;\n\t\t\t\tif (checkAttribute) sourceValue = sourceElement.attributeValue(sourceAttribute);\n\t\t\t\telse\tsourceValue = sourceNode.getText();\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (!destinationValue.equals(sourceValue)) \n\t\t\t\t{\n\t\t\t\t\tlogger.error(messageTitle + check.DestinationPath + \"\\t\" + check.SourcePath + \"\\tdata deosn't match for \" + test.DestNodeSpecifiedDefinitions + \": \"\n\t\t\t\t\t\t\t+ destinationNode.getText() + \",\" + sourceValue);\t\t\n\t\t\t\t\tresult = false;\n\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\t\t\t\t\t\t\t\t\t\n\t\t}else if (sourceNode == null && destinationNode == null) ;\n\t\t\t else if (sourceNode == null) \n\t\t\t\t {\n\t\t\t\t \t if (!destinationNode.getText().trim().equals(\"\"))\n\t\t\t\t \t {\n\t\t\t\t \t\t result = false;\n\t\t\t\t\t\t logger.error(messageTitle + test.Name + \"\\t\" + check.DestinationPath + \"\\t source Value can't be same with destination value. \\t Source Node Value is null, but Destination Node Value is \" + destinationNode.getText());\n\t\t\t\t \t }\t\t\t\t \t \n\t\t\t\t }\n\t\t\t \t else \n\t\t\t \t {\n\t\t\t \t\t String sourceValue;\n\t\t\t\t\t if (checkAttribute) sourceValue = sourceElement.attributeValue(sourceAttribute).trim();\n\t\t\t\t\t else\tsourceValue = sourceNode.getText().trim();\t\n\n\t\t\t \t\t if (!sourceValue.equals(\"\"))\n\t\t\t \t\t {\n\t\t\t \t\t\t result = false;\n\t\t\t \t\t\t logger.error(messageTitle + test.Name + \"\\t\" + check.DestinationPath + \"\\t source Value can't be same with destination value. \\t Source Node value is \" + sourceValue + \"\\t Destination Node Value is \" + destinationNode);\n\t\t\t \t\t }\t\t\t \t\t \n\t\t\t \t }\n\t\treturn result;\n\t}",
"@Override\n public int compare(Edge edge1, Edge edge2) {\n return Integer.compare(edge1.weight, edge2.weight);\n }",
"public int compareTo(Node other) {\n if (dist == other.dist)\n return label.compareTo(other.label);\n return Integer.compare(dist, other.dist);\n }",
"@Override\n public int compare(Box b1, Box b2) { \n return b1.width > b2.width ? 1 :(b1.width == b2.width ? 0 : -1);\n }",
"@Test\n\tpublic void hashCodeSimilarObjects() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tAssert.assertEquals(key1.hashCode(), key2.hashCode());\n\t}",
"public boolean differ(Object a, Object b) {\n Node set1 = find(getNode(a));\n Node set2 = find(getNode(b));\n\n return set1 != set2;\n }",
"public boolean hasSameVariants(ImageVariantConfig other) {\n if (getVariantList().size() != other.getVariantList().size()) return false;\n for(VariantInfo variant : getVariantList()) {\n if (!variant.equalsProps(other.getVariant(variant.getName()))) return false;\n }\n return true;\n }",
"@Override\n public int compare(Camera.Size lhs, Camera.Size rhs) {\n return Long.signum((long) lhs.width * lhs.height -\n (long) rhs.width * rhs.height);\n }",
"@Override\n public int compare(Camera.Size lhs, Camera.Size rhs) {\n return Long.signum((long) lhs.width * lhs.height -\n (long) rhs.width * rhs.height);\n }",
"private static boolean compareEdges(S2Point a0, S2Point a1, S2Point b0, S2Point b1) {\n if (a1.lessThan(a0)) {\n S2Point temp = a0;\n a0 = a1;\n a1 = temp;\n }\n if (b1.lessThan(b0)) {\n S2Point temp = b0;\n b0 = b1;\n b1 = temp;\n }\n return a0.lessThan(b0) || (a0.equalsPoint(b0) && b0.lessThan(b1));\n }",
"public static void assertEquals(final File file, final BufferedImage image)\n throws IOException\n {\n BufferedImage other;\n int w, h, x, y;\n\n other = ImageIO.read(file);\n\n w = image.getWidth();\n h = image.getHeight();\n if (other.getWidth() != w || other.getHeight() != h)\n {\n fail(\"Image has not the same size as the file: \" + file.getPath());\n }\n for (y = 0; y < h; y++)\n {\n for (x = 0; x < w; x++)\n {\n if (image.getRGB(x, y) != other.getRGB(x, y))\n {\n fail(\"Image does not match the image in the file: \"\n + file.getPath());\n }\n }\n }\n }",
"public void testSetImage() {\n byte[] image = new byte[] {1, 2, 3};\n byte[] expResult = new byte[] {1, 2, 3};\n CLImage instance = new CLImage();\n instance.setImage(image);\n assertEquals(expResult.length, instance.image.length);\n for (int i = 0; i < expResult.length; ++i)\n {\n assertEquals(expResult[i], instance.image[i]);\n }\n }",
"public static boolean areMirror(Node n1, Node n2) {\r\n //If any condition where children sizes are not same it means shape is not similar so return false\r\n if(n1.children.size() != n2.children.size()){\r\n return false;\r\n }\r\n \r\n boolean res = true;\r\n //For node2 interate from reverse\r\n int j = n2.children.size()-1;\r\n \r\n for(int i=0; i<n1.children.size(); i++){\r\n Node child1 = n1.children.get(i);\r\n \r\n Node child2 = n2.children.get(j--); //decrease j while traversing from behind\r\n \r\n res = areMirror(child1, child2);\r\n \r\n //if even once a false is encountered it means no calculate further and return from here\r\n if(res == false){\r\n return false;\r\n }\r\n }\r\n return res;\r\n }",
"@Test void compareToNaive() {\n\t\tfor (var type : new ImageType[]{ImageType.SB_U8, ImageType.SB_U16, ImageType.SB_F32, ImageType.SB_F64}) {\n\t\t\tvar src = (ImageGray)type.createImage(width, height);\n\t\t\tvar dst = (ImageGray)type.createImage(1, 1);\n\n\t\t\tGImageMiscOps.fillUniform(src, rand, 0, 100);\n\n\t\t\tdouble mean = GImageStatistics.mean(src);\n\t\t\tGeometricMeanFilter.filter(src, radiusX, radiusY, mean, dst);\n\n\t\t\tassertEquals(width, dst.width);\n\t\t\tassertEquals(height, dst.height);\n\n\t\t\tfor (int y = 0; y < dst.height; y++) {\n\t\t\t\tfor (int x = 0; x < dst.width; x++) {\n\t\t\t\t\tdouble found = GeneralizedImageOps.get(dst, x, y);\n\t\t\t\t\tassertEquals(naiveMean(src, x, y, radiusX, radiusY), found, 1.0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private boolean compareFiles(String file1, String file2)\r\n throws IOException {\r\n \r\n BufferedReader reader1 = new BufferedReader(new FileReader(file1));\r\n BufferedReader reader2 = new BufferedReader(new FileReader(file2));\r\n \r\n\r\n String line1 = reader1.readLine();\r\n String line2 = reader2.readLine();\r\n\r\n boolean areEqual = true;\r\n\r\n int lineNum = 1;\r\n\r\n while (line1 != null || line2 != null) {\r\n if (line1 == null || line2 == null) {\r\n areEqual = false;\r\n break;\r\n }\r\n \r\n else if (!line1.equals(line2)) {\r\n areEqual = false;\r\n break;\r\n }\r\n\r\n line1 = reader1.readLine();\r\n line2 = reader2.readLine();\r\n\r\n lineNum++;\r\n }\r\n reader1.close();\r\n reader2.close();\r\n\r\n if (areEqual) { \r\n return true;\r\n }\r\n else { \r\n System.out.println(\r\n \"Two files have different content. They differ at line \"\r\n + lineNum);\r\n return false;\r\n }\r\n\r\n \r\n }",
"@Override\n public int compare(Size lhs, Size rhs) {\n return Long.signum((long) lhs.getWidth() * lhs.getHeight() -\n (long) rhs.getWidth() * rhs.getHeight());\n }",
"public int compareTo(Object other){\r\n int[][] thisState = this.getState();\r\n int[][] thatState = ((Node)other).getState();\r\n int length = this.getState().length;\r\n for (int i = 0; i<length; i++){\r\n for (int j = 0; j<length; j++){\r\n if (thisState[i][j] != thatState[i][j])\r\n return 1;\r\n }\r\n }\r\n return 0;\r\n }",
"public static void compare () {\r\n for (int i = 0; i < dim; i++) {\r\n for (int j = 0; j < dim; j++) {\r\n if (d[i][j] != adjacencyMatrix[i][j])// here \r\n {\r\n System.out.println(\"Comparison failed\");\r\n \r\n return;\r\n }\r\n }\r\n }\r\n System.out.println(\"Comparison succeeded\");\r\n }",
"@Override\n\t\t\tpublic int compare(Sprite s1, Sprite s2) {\n\t\t\t\tif(!s1.sort)\n\t\t\t\t\treturn -1;\n\t\t\t\tif(!s2.sort)\n\t\t\t\t\treturn 1;\n\t\n\t\t\t\t\n\t\t if (s1.position.y+s1.height < s2.position.y+s2.height) {\n\t\t return -1;\n\t\t }else {\n\t\t return 1;\n\t\t }\n\t\t\t}",
"@Override\n public int compare(Size lhs, Size rhs) {\n return Long.signum((long) lhs.getWidth() * lhs.getHeight() - (long) rhs.getWidth() *\n rhs.getHeight());\n }",
"public static Map<String, Map<Object, Object>> getDiffirentComparisionVal(Device d1, Device d2) throws IllegalArgumentException, IllegalAccessException {\n\t\t\n\t\t//Node root = ObjectDifferBuilder.buildDefault().compare(d1, d2);\n\t\t\t\t\n\t\t//To get Device one property\n\t\tMap <Object, Object> device1Fields = getFields(d1);\n\t\t\n\t\t//To get Device one property\n\t\tMap <Object, Object> device2Fields = getFields(d2);\n\t\t\n\t\t//Map to get Device difference property value\n\t\tMap <Object, Object> DeviceResult1 = new HashMap<>();\n\t\tMap <Object, Object> DeviceResult2 = new HashMap<>();\n\t\t\n Map <String, Map<Object, Object>> deviceComparisonMap = new HashMap<>();\n\t\t device1Fields.forEach((k,v)->{\n\t\t \t \tif(null != v && !device2Fields.get(k).equals(v)){\n\t\t \t\t DeviceResult1.put(k, v);\n\t\t \t DeviceResult2.put(k, device2Fields.get(k));\n\t\t \t}\n\t\t });\n\t\t deviceComparisonMap.put(d1.getCmMacAddress(), DeviceResult1);\n\t\t deviceComparisonMap.put(d2.getCmMacAddress(), DeviceResult2);\n\t\treturn deviceComparisonMap;\n\t\t\n\t}",
"@Override\r\n public int compare(searchNode e1, searchNode e2) {\r\n //if node 1 has a a lower FScore than node 2, return -1 which will put e1 BEFORE e2\r\n if (e1.getFScore() < e2.getFScore()) {\r\n return -1;\r\n }\r\n //if node 1 has a higher FScore than node 2, return 1 which will put e2 BEFORE e1\r\n if (e1.getFScore() > e2.getFScore()) {\r\n return 1;\r\n }\r\n //else return they are same whichw ill keep order same\r\n return 0;\r\n }",
"public ImageGraph(BufferedImage[] originalArray) {\n\n this.originalArray = originalArray; // the original one dimensional array of pics\n int size = this.originalArray.length; // size of the graph\n\n // transfer this into a two dimensional array that stores Nodes\n Node[][] twoDimensional = new Node[size][size];\n for (int i=0; i<this.originalArray.length; i++) {\n twoDimensional[i / size][i % size] = new Node(this.originalArray[i]);\n }\n this.reference = twoDimensional[0][0]; // set up the reference\n\n int dimension = (int) Math.sqrt(size);\n\n for (int r=0; r<twoDimensional.length; r++) {\n for (int c=0; c<twoDimensional[0].length; c++) {\n // exceptional cases\n if (r==0 && c==0) {\n /*\n 1 0 0\n 0 0 0\n 0 0 0\n */\n twoDimensional[r][c].setRight(twoDimensional[r][c+1]);\n twoDimensional[r][c].setDown(twoDimensional[r+1][c]);\n } else if (r == 0 && c == dimension) {\n /*\n 0 0 1\n 0 0 0\n 0 0 0\n */\n twoDimensional[r][c].setLeft(twoDimensional[r][c-1]);\n twoDimensional[r][c].setDown(twoDimensional[r+1][c]);\n } else if (r == dimension && c == 0) {\n /*\n 0 0 0\n 0 0 0\n 1 0 0\n */\n twoDimensional[r][c].setUpper(twoDimensional[r-1][c]);\n twoDimensional[r][c].setRight(twoDimensional[r][c+1]);\n } else if (r == dimension && c == dimension) {\n /*\n 0 0 0\n 0 0 0\n 0 0 1\n */\n twoDimensional[r][c].setUpper(twoDimensional[r-1][c]);\n twoDimensional[r][c].setLeft(twoDimensional[r][c-1]);\n } else if (r != dimension && r != 0 && c == 0) {\n /*\n 0 0 0 0\n 1 0 0 0\n 1 0 0 0\n 0 0 0 0\n */\n twoDimensional[r][c].setUpper(twoDimensional[r-1][c]);\n twoDimensional[r][c].setRight(twoDimensional[r][c+1]);\n twoDimensional[r][c].setDown(twoDimensional[r-1][c]);\n } else if (r != dimension && r != 0 && c == dimension) {\n /*\n 0 0 0 0\n 0 0 0 1\n 0 0 0 1\n 0 0 0 0\n */\n twoDimensional[r][c].setUpper(twoDimensional[r-1][c]);\n twoDimensional[r][c].setDown(twoDimensional[r-1][c]);\n twoDimensional[r][c].setLeft(twoDimensional[r][c-1]);\n } else if (r == 0 && c != 0 && c!= dimension) {\n /*\n 0 1 1 0\n 0 0 0 0\n 0 0 0 0\n 0 0 0 0\n */\n twoDimensional[r][c].setLeft(twoDimensional[r][c-1]);\n twoDimensional[r][c].setRight(twoDimensional[r][c+1]);\n twoDimensional[r][c].setDown(twoDimensional[r+1][c]);\n } else if (r == dimension && c != 0 && c != dimension ) {\n /*\n 0 0 0 0\n 0 0 0 0\n 0 0 0 0\n 0 1 1 0\n */\n twoDimensional[r][c].setLeft(twoDimensional[r][c-1]);\n twoDimensional[r][c].setRight(twoDimensional[r][c+1]);\n twoDimensional[r][c].setUpper(twoDimensional[r-1][c]);\n }\n // in general\n twoDimensional[r][c].setDown(twoDimensional[r+1][c]);\n twoDimensional[r][c].setUpper(twoDimensional[r-1][c]);\n twoDimensional[r][c].setLeft(twoDimensional[r][c-1]);\n twoDimensional[r][c].setRight(twoDimensional[r][c+1]);\n }\n }\n\n // initialization of node array\n for (int i=0; i<twoDimensional.length; i++) {\n for (int j=0; j<twoDimensional[0].length; j++) {\n this.nodeArray[i*dimension+j] = twoDimensional[i][j];\n }\n }\n\n }",
"@Override\n public Image merge(Image a, Image b) {\n if (a.getCached() == null) {\n drawImage(a, 0, 0);\n }\n if (b.getCached() == null) {\n drawImage(b, 0, 0);\n }\n Object nativeImage = graphicsEnvironmentImpl.mergeImages(canvas, a, b, a.getCached(), b.getCached());\n Image merged = Image.create(getImageSource(nativeImage));\n merged.cache(nativeImage);\n return merged;\n }",
"public int compare(Dataset object1, Dataset object2){\n if(object1.getAttributeCount() != candidate.getAttributeCount() ||\n object2.getAttributeCount() != candidate.getAttributeCount()){\n return 0;\n }\n\n double dist1 = 0.0, dist2 = 0.0;\n double tmp1 = 0.0, tmp2 = 0.0;\n\n for(int i = 0; i < candidate.getAttributeCount(); i++){\n if(candidate.getOutputColumnCount() == (i+1)){\n continue;\n }\n\n Attribute ac = candidate.getAttribute(i);\n Attribute a1 = object1.getAttribute(i);\n Attribute a2 = object2.getAttribute(i);\n\n if(ac.getType() == AttributeTypes.TEXT){\n dist1 += DatasetEuklidianComparator.unlimitedCompare((String)ac.getValue(), (String)a1.getValue());\n dist2 += DatasetEuklidianComparator.unlimitedCompare((String)ac.getValue(), (String)a2.getValue());\n }else{\n /*\n double acDouble = 0.0;\n double a1Double = 0.0;\n double a2Double = 0.0;\n switch(ac.getType()){\n case INTEGER: acDouble = (double)((Integer)ac.getValue()).intValue(); break;\n case DECIMAL: acDouble = (double)ac.getValue();\n }\n switch(a1.getType()){\n case INTEGER: a1Double = (double)((Integer)a1.getValue()).intValue(); break;\n case DECIMAL: a1Double = (double)a1.getValue();\n }\n switch(a2.getType()){\n case INTEGER: a2Double = (double)((Integer)a2.getValue()).intValue(); break;\n case DECIMAL: a2Double = (double)a2.getValue();\n }*/\n double acDouble = (double)ac.getValue();\n double a1Double = (double)a1.getValue();\n double a2Double = (double)a2.getValue();\n\n tmp1 += Math.pow(a1Double-acDouble, 2);\n tmp2 += Math.pow(a2Double-acDouble, 2);\n }\n }\n\n dist1 += Math.sqrt(tmp1);\n dist2 += Math.sqrt(tmp2);\n\n if (dist1 > dist2) {\n return 1;\n }\n if (dist1 < dist2) {\n return -1;\n }\n return 0;\n }",
"public int compare(Edge a, Edge b) {\n // for ascending\n return a.weight - b.weight;\n\n // for descending\n // return b.weight - a.weight;\n }",
"public static boolean compareTags(ItemStack stack1, ItemStack stack2) {\n\t\tif (!stack1.hasTag())\n\t\t\treturn true;\n\n\t\tif (stack1.hasTag() && !stack2.hasTag())\n\t\t\treturn false;\n\t\t\n\t\tvar stack1Keys = NBTHelper.getTagCompound(stack1).getAllKeys();\n\t\tvar stack2Keys = NBTHelper.getTagCompound(stack2).getAllKeys();\n\t\t\n\t\tfor (var key : stack1Keys) {\n\t\t\tif (!stack2Keys.contains(key))\n\t\t\t\treturn false;\n\n\t\t\tif (!NbtUtils.compareNbt(NBTHelper.getTag(stack1, key), NBTHelper.getTag(stack2, key), true))\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"public boolean isSameNodeInfo(NodeInfo other) {\n if (!(other instanceof DocumentWrapper)) {\n return false;\n }\n return node == ((DocumentWrapper)other).node;\n }",
"private boolean isSimilar(Node root1, Node root2){\n if(root1 == null && root2 == null){\n return true;\n }\n\n if(root1 == null || root2 ==null){\n return false;\n }\n\n return isSimilar(root1.getLeft(), root2.getLeft()) && isSimilar(root1.getRight(), root2.getRight());\n }",
"@Override\n public int compare(Size lhs, Size rhs) {\n return Long.signum((long) lhs.getWidth() * lhs.getHeight()\n - (long) rhs.getWidth() * rhs.getHeight());\n }",
"@Override\n public int compare(Size lhs, Size rhs) {\n return Long.signum((long) lhs.getWidth() * lhs.getHeight()\n - (long) rhs.getWidth() * rhs.getHeight());\n }",
"public int compare(GridCell a, GridCell b) {\n\t\treturn FloatUtil.compare(mapInfo.getHCost(a), mapInfo.getHCost(b));\n\t}",
"@Override\n public int compare(Size lhs, Size rhs) {\n return Long.signum((long) lhs.getWidth() * lhs.getHeight() -\n (long) rhs.getWidth() * rhs.getHeight());\n }",
"@Override\n public int compare(Size lhs, Size rhs) {\n return Long.signum((long) lhs.getWidth() * lhs.getHeight() -\n (long) rhs.getWidth() * rhs.getHeight());\n }"
] | [
"0.68079805",
"0.66943514",
"0.65274274",
"0.650541",
"0.6226026",
"0.60127985",
"0.5998478",
"0.5975642",
"0.5973089",
"0.59461707",
"0.59231114",
"0.58880997",
"0.5849287",
"0.5787432",
"0.5778163",
"0.57336444",
"0.5716887",
"0.57157135",
"0.56992954",
"0.5675555",
"0.5662313",
"0.5622728",
"0.5615484",
"0.556013",
"0.5548527",
"0.5537502",
"0.55120003",
"0.550941",
"0.5488386",
"0.54867166",
"0.5388697",
"0.5385083",
"0.5353707",
"0.5344359",
"0.5338526",
"0.53162444",
"0.5288695",
"0.52818924",
"0.5270287",
"0.5266685",
"0.526068",
"0.52548814",
"0.5249067",
"0.52442026",
"0.5238272",
"0.5215501",
"0.5213872",
"0.5205291",
"0.5192514",
"0.5185347",
"0.5182263",
"0.5182263",
"0.51808923",
"0.51805115",
"0.51785064",
"0.51751053",
"0.51698273",
"0.5147679",
"0.514765",
"0.5141052",
"0.51348096",
"0.512993",
"0.51278514",
"0.5114962",
"0.51054937",
"0.5104605",
"0.51010376",
"0.5100423",
"0.5100119",
"0.5098795",
"0.50967103",
"0.50943786",
"0.50912786",
"0.50911343",
"0.50911343",
"0.5087638",
"0.5083646",
"0.50750095",
"0.5069594",
"0.5068548",
"0.5051794",
"0.50516844",
"0.50502616",
"0.5048423",
"0.50457007",
"0.5037554",
"0.50359917",
"0.5033369",
"0.50301147",
"0.50217855",
"0.50195664",
"0.50178105",
"0.50143164",
"0.5010537",
"0.5010121",
"0.50099",
"0.50099",
"0.50094855",
"0.5003921",
"0.5003921"
] | 0.81881 | 0 |
Compare the children of both nodes. | private Comparison compareChildren(SimpleNode first, SimpleNode second) {
List<SimpleNode> firstChildren = getChildren(first);
List<SimpleNode> secondChildren = getChildren(second);
// Compare the sizes.
if (firstChildren.size() != secondChildren.size()) {
return Comparison.notEqual("Num children differ: " + firstChildren + " vs " + secondChildren);
}
// Look for an equivalent of each child, visiting each child recursively when needed.
Comparison currentComparison = null;
for (SimpleNode firstChild : firstChildren) {
for (int i = 0; i < secondChildren.size(); i++) {
SimpleNode secondChild = secondChildren.get(i);
currentComparison = (Comparison) firstChild.jjtAccept(this, secondChild);
if (currentComparison.isEqual()) {
secondChildren.remove(i);
break;
}
}
if (!currentComparison.isEqual()) {
return Comparison.notEqual("Did not find a matching child for " + firstChild + " in " + secondChildren + ": " + currentComparison.getReason());
}
}
return Comparison.IS_EQUAL;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\tpublic void isChildOrSameTest1()\n\t{\n\t\tNodeList n1=xmlDocument.getElementsByTagName(\"b\");\n\t\tNodeList n2=xmlDocument.getElementsByTagName(\"p\");\n\t\tassertEquals(true,Manipulator.isChildOrSame(n2.item(0),n1.item(0)));\n\t}",
"@Test\n\tpublic void isChildOrSameTest3()\n\t{\n\t\tNodeList n1=xmlDocument.getElementsByTagName(\"b\");\n\t\tNodeList n2=xmlDocument.getElementsByTagName(\"p\");\n\t\tassertEquals(false,Manipulator.isChildOrSame(n1.item(0),n2.item(0)));\n\t}",
"public static int compareOrder(SiblingCountingNode first, SiblingCountingNode second) {\n NodeInfo ow = second;\n \n // are they the same node?\n if (first.isSameNodeInfo(second)) {\n return 0;\n }\n \n NodeInfo firstParent = first.getParent();\n if (firstParent == null) {\n // first node is the root\n return -1;\n }\n \n NodeInfo secondParent = second.getParent();\n if (secondParent == null) {\n // second node is the root\n return +1;\n }\n \n // do they have the same parent (common case)?\n if (firstParent.isSameNodeInfo(secondParent)) {\n int cat1 = nodeCategories[first.getNodeKind()];\n int cat2 = nodeCategories[second.getNodeKind()];\n if (cat1 == cat2) {\n return first.getSiblingPosition() - second.getSiblingPosition();\n } else {\n return cat1 - cat2;\n }\n }\n \n // find the depths of both nodes in the tree\n int depth1 = 0;\n int depth2 = 0;\n NodeInfo p1 = first;\n NodeInfo p2 = second;\n while (p1 != null) {\n depth1++;\n p1 = p1.getParent();\n }\n while (p2 != null) {\n depth2++;\n p2 = p2.getParent();\n }\n // move up one branch of the tree so we have two nodes on the same level\n \n p1 = first;\n while (depth1 > depth2) {\n p1 = p1.getParent();\n if (p1.isSameNodeInfo(second)) {\n return +1;\n }\n depth1--;\n }\n \n p2 = ow;\n while (depth2 > depth1) {\n p2 = p2.getParent();\n if (p2.isSameNodeInfo(first)) {\n return -1;\n }\n depth2--;\n }\n \n // now move up both branches in sync until we find a common parent\n while (true) {\n NodeInfo par1 = p1.getParent();\n NodeInfo par2 = p2.getParent();\n if (par1 == null || par2 == null) {\n throw new NullPointerException(\"DOM/JDOM tree compare - internal error\");\n }\n if (par1.isSameNodeInfo(par2)) {\n return ((SiblingCountingNode)p1).getSiblingPosition() -\n ((SiblingCountingNode)p2).getSiblingPosition();\n }\n p1 = par1;\n p2 = par2;\n }\n }",
"@Test\n\tpublic void isChildOrSameTest2()\n\t{\n\t\tNodeList n1=xmlDocument.getElementsByTagName(\"b\");\n\t\tassertEquals(true,Manipulator.isChildOrSame(n1.item(0),n1.item(0)));\n\t}",
"private boolean compare(TreeNode leftRoot, TreeNode rightRoot) {\n // Good shortcut\n //if(left==null || right==null) return left==right;\n if (leftRoot == null && rightRoot == null) return true;\n if (leftRoot == null || rightRoot == null) return false;\n if (leftRoot.val != rightRoot.val) return false;\n boolean isOutersEqual = compare(leftRoot.left, rightRoot.right);\n boolean isInnersEqual = compare(leftRoot.right, rightRoot.left);\n return isOutersEqual && isInnersEqual;\n }",
"private Comparison checkEquality(SimpleNode node1, SimpleNode node2) {\n // Compare the classes.\n Comparison comparison = compareClasses(node1, node2);\n if (!comparison.isEqual()) {\n return comparison;\n }\n\n // Compare the values.\n comparison = compareValues(node1, node2);\n if (!comparison.isEqual()) {\n return comparison;\n }\n\n // Compare the images.\n comparison = compareImages(node1, node2);\n if (!comparison.isEqual()) {\n return comparison;\n }\n\n // Compare the children.\n return compareChildren(node1, node2);\n }",
"@Override\n public int compareTo(Node<T> other) {\n if (this == other) {\n return 0;\n }\n\n return this.data.compareTo(other.data);\n }",
"@Override\r\n public int compare(Node x, Node y)\r\n {\n if (x.getD() < y.getD())\r\n {\r\n return -1;\r\n }\r\n else if (x.getD() > y.getD())\r\n {\r\n return 1;\r\n }\r\n return 0;\r\n }",
"public int compare(Object nodes1, Object nodes2) {\r\n\t\tdouble w1 = 0.0;\r\n\t\tIterator it = ((Set)nodes1).iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tDouble v = ((Node) it.next()).getWeightValueUnsynchronized(\"value\");\r\n\t\t\tw1 += (v==null ? 1.0 : v.doubleValue());\r\n\t\t}\r\n\t\tdouble w2 = 0.0;\r\n\t\tit = ((Set)nodes2).iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tDouble v = ((Node) it.next()).getWeightValueUnsynchronized(\"value\");\r\n\t\t\tw2 += (v==null ? 1.0 : v.doubleValue());\r\n\t\t}\r\n\t\tint res = Double.compare(w2, w1);\r\n\t\tif (res==0) { // oops, must figure out how they differ\r\n\t\t\tSet ns1 = (Set) nodes1;\r\n\t\t\tSet ns2 = (Set) nodes2;\r\n\t\t\tint ns1sz = ns1.size();\r\n\t\t\tint ns2sz = ns2.size();\r\n\t\t\tif (ns1sz>ns2sz) return -1; // more nodes, the better\r\n\t\t\telse if (ns1sz<ns2sz) return 1;\r\n\t\t\t// go through the *very* expensive nodes discrimination\r\n\t\t\tIterator it1 = ns1.iterator();\r\n\t\t\tIntSet nis1 = new IntSet();\r\n\t\t\twhile (it1.hasNext()) {\r\n\t\t\t\tNode n = (Node) it1.next();\r\n\t\t\t\tnis1.add(new Integer(n.getId()));\r\n\t\t\t}\r\n\t\t\tIterator it2 = ns2.iterator();\r\n\t\t\tIntSet nis2 = new IntSet();\r\n\t\t\twhile (it2.hasNext()) {\r\n\t\t\t\tNode n = (Node) it2.next();\r\n\t\t\t\tnis2.add(new Integer(n.getId()));\r\n\t\t\t}\r\n\t\t\treturn nis2.compareTo(nis1);\r\n\t\t}\r\n\t\treturn res;\r\n\t}",
"private static void commonNodesIterInOrd(Node root1,Node root2)\n {\n if(root1 == null || root2 == null) return;\n \n LinkedList<Node> stack1 = new LinkedList<>();\n LinkedList<Node> stack2 = new LinkedList<>();\n \n Node n1 = root1, n2 = root2;\n \n while(true)\n {\n if(n1!=null)\n {\n stack1.push(n1); n1 = n1.left;\n }\n if(n2!=null)\n {\n stack2.push(n2); n2 = n2.left;\n } \n \n if(n1 == null && n2 == null)\n {\n if(stack1.size() == 0 || stack2.size() == 0)\n break;\n \n n1 = stack1.peekFirst(); n2 = stack2.peekFirst();\n \n if(n1.data < n2.data)\n {\n stack1.pop(); n1 = n1.right; n2 = null;\n }\n else if(n1.data > n2.data)\n {\n stack2.pop(); n2 = n2.right; n1 = null;\n }\n else\n {\n stack1.pop(); stack2.pop(); \n System.out.print(n1.data+\" \");\n n1 = n1.right; n2 = n2.right;\n }\n }\n }\n }",
"public static boolean areSimilar(Node n1, Node n2) {\r\n \r\n //If any condition where children sizes are not same it means shape is not similar so return false\r\n if(n1.children.size() != n2.children.size()){\r\n return false;\r\n }\r\n \r\n boolean res = true;\r\n //To traverse on both trees we use loop in below form, children size are similar if we come here\r\n //so we can use any one for loop traversal length either n1 or n2.\r\n for(int i=0; i<n1.children.size(); i++){\r\n Node child1 = n1.children.get(i);\r\n Node child2 = n2.children.get(i);\r\n \r\n res = areSimilar(child1, child2);\r\n \r\n //if even once a false is encountered it means no further calculation required so return from here\r\n if(res == false){\r\n return false;\r\n }\r\n }\r\n return res;\r\n }",
"public static boolean areSimilar(Node n1, Node n2) {\n boolean flag=true;\n int n=n1.children.size();\n if(n!=n2.children.size())\n return false;\n for(int i=0;i<n;i++)\n {\n flag=flag && areSimilar(n1.children.get(i),n2.children.get(i));\n if(flag==false)\n break;\n }\n return flag;\n }",
"public boolean equivalentTo (BusinessObject other, Callback<BusinessObject, Boolean> ignoreFields) {\n\t\tif (this == other) {\n\t\t\treturn true;\t// no point checking... we know they're the same...\n\t\t}\n\t\tif (getClass() != other.getClass() ||\t// different class... must be different\n\t\t\t\t((children == null) != (other.children == null)) ||\t// one is null while other isn't\n\t\t\t\t(children != null && children.size() != other.children.size())) {\t// both has children, but differing amounts\t\n\t\t\treturn false;\n\t\t} \n\t\tif (children != null) {\n\t\t\tfor (BusinessObject child : children.values()) {\n\t\t\t\t// Not going to bother comparing if callback returns true\n\t\t\t\tif (ignoreFields != null && ignoreFields.call(child)) continue;\t\n\t\t\t\tString name = child.nameProperty().getValue();\n\t\t\t\tBusinessObject otherChild = other.findChildByName(name);\n\t\t\t\tif(otherChild == null || !child.equivalentTo(otherChild, ignoreFields)) return false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"private boolean equalNodes(Node[] arr1, Node[] arr2) {\n // generic tests\n if (!Arrays.equals(arr1, arr2)) {\n return false;\n }\n\n if ((arr1 == null) || (arr1.length == 0)) {\n return true;\n }\n\n // compare paths from each node to root\n int i = 0;\n\n while ((i < arr1.length) && Arrays.equals(NodeOp.createPath(arr1[i], null), NodeOp.createPath(arr2[i], null))) {\n i++;\n }\n\n return i == arr1.length;\n }",
"public int compareTo(Node otherNode) { \r\n if (TotalDistance < otherNode.TotalDistance) {\r\n return -1;\r\n } else if (TotalDistance > otherNode.TotalDistance) {\r\n return 1;\r\n } else {\r\n return 0;\r\n }\r\n }",
"boolean isSameChildren(int nodeID, DependencyRelations deps){\n check(nodeID);\n if (deps == null)\n throw new IllegalArgumentException(\"the dependency relations is null.\");\n\n if (size_ != deps.size_)\n return false;\n\n Node a = nodes_[nodeID];\n Node b = deps.nodes_[nodeID];\n if (a.size_ != b.size_)\n return false;\n\n for(int i = 0; i < a.size_; i++){\n if (a.children_[i] != b.children_[i])\n return false;\n }\n return true;\n }",
"private static void commonNodesInOrdSuc(Node r1, Node r2)\n {\n Node n1 = r1, n2 = r2;\n \n if(n1==null || n2==null)\n return;\n \n while(n1.left != null)\n n1 = n1.left;\n \n while(n2.left!= null)\n n2 = n2.left;\n \n while(n1!=null && n2!=null)\n {\n if(n1.data < n2.data)\n n1 = inOrdSuc(n1);\n \n else if(n1.data > n2.data)\n n2 = inOrdSuc(n2);\n \n else\n {\n System.out.print(n1.data+\" \"); n1 = inOrdSuc(n1); n2 = inOrdSuc(n2);\n }\n }\n \n System.out.println();\n }",
"@Override\r\n\t\tpublic boolean isSameNode(Node other)\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}",
"public int compareTo(Node other) {\n if (dist == other.dist)\n return label.compareTo(other.label);\n return Integer.compare(dist, other.dist);\n }",
"@Override\n\tpublic int compareTo(Node o) {\n\t\treturn (int) (this.value - o.value);\n\t}",
"public int compare(Cluster cluster1, Cluster cluster2) {\n for (Node n1 : cluster1) {\n for (Node n2 : cluster2) {\n if (n1.isAncestorOf(n2)) {\n return -1;\n } else if (n2.isAncestorOf(n1)) {\n return 1;\n }\n }\n }\n return 0;\n }",
"private static boolean areLeafsEquivalent(JavaTree leftNode, JavaTree rightNode) {\n if (leftNode instanceof IdentifierTree) {\n return Objects.equal(((IdentifierTree) leftNode).name(), ((IdentifierTree) rightNode).name());\n } else if (leftNode instanceof PrimitiveTypeTree) {\n return Objects.equal(((PrimitiveTypeTree) leftNode).keyword().text(), ((PrimitiveTypeTree) rightNode)\n .keyword().text());\n } else if (leftNode instanceof SyntaxToken) {\n return Objects.equal(((SyntaxToken) leftNode).text(), ((SyntaxToken) rightNode).text());\n } else if (leftNode.is(Tree.Kind.INFERED_TYPE)) {\n return rightNode.is(Tree.Kind.INFERED_TYPE);\n } else {\n throw new IllegalArgumentException();\n }\n }",
"@Override\r\n\t\tpublic short compareDocumentPosition(Node other) throws DOMException\r\n\t\t\t{\n\t\t\t\treturn 0;\r\n\t\t\t}",
"public int compareTo(Object other){\r\n int[][] thisState = this.getState();\r\n int[][] thatState = ((Node)other).getState();\r\n int length = this.getState().length;\r\n for (int i = 0; i<length; i++){\r\n for (int j = 0; j<length; j++){\r\n if (thisState[i][j] != thatState[i][j])\r\n return 1;\r\n }\r\n }\r\n return 0;\r\n }",
"public int compare(Object o1, Object o2) {\r\n Node n1 = (Node) o1;\r\n Node n2 = (Node) o2;\r\n\t\tDouble n1wD = n1.getWeightValueUnsynchronized(\"value\"); // used to be n1.getWeightValue(\"value\");\r\n\t\tDouble n2wD = n2.getWeightValueUnsynchronized(\"value\"); // used to be n2.getWeightValue(\"value);\r\n\t\tdouble n1w = n1wD == null ? 1.0 : n1wD.doubleValue();\r\n\t\tdouble n2w = n2wD == null ? 1.0 : n2wD.doubleValue();\r\n\t\tif (n1w<n2w) return -1;\r\n\t\telse if (Double.compare(n2w, n1w)==0) {\r\n\t\t\tdouble n1sz = n1.getNborsUnsynchronized().size();\r\n\t\t\tdouble n2sz = n2.getNborsUnsynchronized().size();\r\n\t\t\ttry {\r\n\t\t\t\tdouble n1szaux = n1.getNborWeights(\"value\");\r\n\t\t\t\tdouble n2szaux = n2.getNborWeights(\"value\");\r\n\t\t\t\tn1sz = n1szaux;\r\n\t\t\t\tn2sz = n2szaux;\r\n\t\t\t}\r\n\t\t\tcatch (ParallelException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tif (n1sz > n2sz) return -1;\r\n\t\t\telse if (n1sz == n2sz) {\r\n\t\t\t\tif (n1.getId() < n2.getId())return -1;\r\n\t\t\t\telse if (n1.getId() == n2.getId())return 0;\r\n\t\t\t\telse return 1;\r\n\t\t\t}\r\n\t\t\telse return 1;\r\n\t\t}\r\n\t\telse return 1;\r\n }",
"public int compare(Object o1, Object o2) {\r\n Node n1 = (Node) o1;\r\n Node n2 = (Node) o2;\r\n\t\tDouble n1wD = n1.getWeightValueUnsynchronized(\"value\"); // used to be n1.getWeightValue(\"value\");\r\n\t\tDouble n2wD = n2.getWeightValueUnsynchronized(\"value\"); // used to be n2.getWeightValue(\"value);\r\n\t\tdouble n1w = n1wD == null ? 1.0 : n1wD.doubleValue();\r\n\t\tdouble n2w = n2wD == null ? 1.0 : n2wD.doubleValue();\r\n\t\tif (n1w>n2w) return -1;\r\n\t\telse if (Double.compare(n2w, n1w)==0) {\r\n\t\t\tdouble n1sz = n1.getNborsUnsynchronized().size();\r\n\t\t\tdouble n2sz = n2.getNborsUnsynchronized().size();\r\n\t\t\ttry {\r\n\t\t\t\tdouble n1szaux = n1.getNborWeights(\"value\");\r\n\t\t\t\tdouble n2szaux = n2.getNborWeights(\"value\");\r\n\t\t\t\tn1sz = n1szaux;\r\n\t\t\t\tn2sz = n2szaux;\r\n\t\t\t}\r\n\t\t\tcatch (ParallelException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tif (n1sz < n2sz) return -1;\r\n\t\t\telse if (n1sz == n2sz) {\r\n\t\t\t\tif (n1.getId() < n2.getId())return -1;\r\n\t\t\t\telse if (n1.getId() == n2.getId())return 0;\r\n\t\t\t\telse return 1;\r\n\t\t\t}\r\n\t\t\telse return 1;\r\n\t\t}\r\n\t\telse return 1;\r\n }",
"public boolean isSameNodeInfo(NodeInfo other) {\n if (!(other instanceof DocumentWrapper)) {\n return false;\n }\n return node == ((DocumentWrapper)other).node;\n }",
"public static int CmpAscendancy( TaxoNode node1, TaxoNode node2 ) {\r\n\t\tif( node1 == null || node2 == null )\r\n\t\t\tthrow new RuntimeException( \"Bad node passed to CmpAscendancy\" );\r\n\t\tTaxoNode par = node1.parent;\r\n\t\twhile( par != null ) {\r\n\t\t\tif( par == node2 )\r\n\t\t\t\treturn 1; // Tag 2 is ascendant of tag1\r\n\t\t\tpar = par.parent;\r\n\t\t}\r\n\t\t// Okay, so tag2 is not above tag1. Look the other way\r\n\t\tpar = node2.parent;\r\n\t\twhile( par != null ) {\r\n\t\t\tif( par == node1 )\r\n\t\t\t\treturn -1; // Tag1 is ascendant of tag2\r\n\t\t\tpar = par.parent;\r\n\t\t}\r\n\t\t// If we got here, the nodes are not related\r\n\t\treturn 0;\r\n\t}",
"public boolean differ(Object a, Object b) {\n Node set1 = find(getNode(a));\n Node set2 = find(getNode(b));\n\n return set1 != set2;\n }",
"private Comparison compareImages(SimpleNode first, SimpleNode second) {\n if (first instanceof JexlNode) {\n String firstImage = ((JexlNode) first).image;\n String secondImage = ((JexlNode) second).image;\n if (!Objects.equals(firstImage, secondImage)) {\n return Comparison.notEqual(\"Node images differ: \" + firstImage + \" vs \" + secondImage);\n }\n }\n return Comparison.IS_EQUAL;\n }",
"private Comparison compareValues(SimpleNode first, SimpleNode second) {\n return Objects.equals(first.jjtGetValue(), second.jjtGetValue()) ? Comparison.IS_EQUAL\n : Comparison.notEqual(\"Node values differ: \" + first.jjtGetValue() + \" vs \" + second.jjtGetValue());\n }",
"boolean hasChildNodes();",
"public int compare(ListNode o1, ListNode o2) {\n return o1.val-o2.val;\n }",
"@Override\n\t\t\tpublic int compare(ListNode o1, ListNode o2) {\n\t\t\t\treturn o1.val - o2.val;\n\t\t\t}",
"public boolean isSameAs( PlanNode other ) {\n if (other == null) return false;\n if (this.getType() != other.getType()) return false;\n if (!ObjectUtil.isEqualWithNulls(this.nodeProperties, other.nodeProperties)) return false;\n if (!this.getSelectors().equals(other.getSelectors())) return false;\n if (this.getChildCount() != other.getChildCount()) return false;\n Iterator<PlanNode> thisChildren = this.getChildren().iterator();\n Iterator<PlanNode> thatChildren = other.getChildren().iterator();\n while (thisChildren.hasNext() && thatChildren.hasNext()) {\n if (!thisChildren.next().isSameAs(thatChildren.next())) return false;\n }\n return true;\n }",
"private void assertCompareTwoXML(String path1, String path2){\n\t\tFile f1 = new File(path1);\n\t\tFile f2 = new File(path2);\n\t\tassertTrue(\"Le fichier \"+path1+\" n'existe pas.\",f1.exists());\n\t\tassertTrue(\"Le fichier \"+path2+\" n'existe pas.\",f2.exists());\n\t\t\n\t\ttry {\n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder builder = factory.newDocumentBuilder();\n\t\t\tDocument doc1 = builder.parse(f1);\n\t\t\t\n\t\t\tDocumentBuilderFactory factory2 = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder builder2 = factory2.newDocumentBuilder();\n\t\t\tDocument doc2 = builder2.parse(f2);\n\n\t\t\tElement root1 = doc1.getDocumentElement(); //<tds> </tds>\n\t\t\tElement root2 = doc2.getDocumentElement();\n\t\t\t\n\t\t\t//Checking symboles\n\t\t\tNodeList symbs1 = root1.getElementsByTagName(\"sym\"); //Getting all <function>\n\t\t\tNodeList symbs2 = root2.getElementsByTagName(\"sym\"); //Getting all <function>\n\t\t\tUtilitaire.assertT(\"Les fichiers n'ont pas le meme nombre de symboles\",symbs1.getLength() == symbs2.getLength());\n\t\t\t\n\t\t\tfor(int symbIndex=0; symbIndex < symbs1.getLength();symbIndex++){\n\t\t\t\tboolean sameSymb = false;\n\t\t\t\tString sym1 = ((Element) symbs1.item(symbIndex)).getTextContent();\n\t\t\t\tfor(int symbIndex2=0; symbIndex2 < symbs2.getLength();symbIndex2++){\n\t\t\t\t\tString sym2 = ((Element) symbs2.item(symbIndex2)).getTextContent();\n\t\t\t\t\tif(sym1.equals(sym2)) sameSymb = true;\n\t\t\t\t}\n\t\t\t\tUtilitaire.assertT(\"Les symboles ne sont pas les memes.\",sameSymb);\n\t\t\t}\n\t\t\t\n\t\t\t//Checking functions\n\t\t\tNodeList functions1 = root1.getElementsByTagName(\"function\"); //Getting all <function>\n\t\t\tNodeList functions2 = root2.getElementsByTagName(\"function\"); //Getting all <function>\n\t\t\tUtilitaire.assertT(\"Les fichiers n'ont pas le meme nombre de fonctions\",functions1.getLength() == functions2.getLength());\n\t\t\t\t//Checking each function\n\t\t\tfor(int tmp = 0; tmp < functions1.getLength();tmp++){\n\t\t\t\tNode node1 = functions1.item(tmp);\n\t\t\t\tNode node2 = null;\n\t\t\t\t//Checking function name\n\t\t\t\tString funName1 = ((Element) node1).getElementsByTagName(\"name\").item(0).getTextContent();\n\t\t\t\tString funName2 = null;\n\t\t\t\tboolean sameFunName = false;\n\t\t\t\t//Iterate over the second file to find (eventually) the same function node\n\t\t\t\tfor(int tmp2 = 0; (tmp2 < functions2.getLength()) && !sameFunName ;tmp2++){\n\t\t\t\t\tnode2 = functions2.item(tmp2);\n\t\t\t\t\tfunName2 = ((Element) node2).getElementsByTagName(\"name\").item(0).getTextContent();\n\t\t\t\t\tif(funName1.equals(funName2)) sameFunName = true;\n\t\t\t\t\t//If a same node if found, the following tests will be with node1's function = node2's function\n\t\t\t\t}\n\t\t\t\t//If there is no node with the same function name -> fail\n\t\t\t\tassertTrue(\"Deux fonctions n'ont pas le meme nom : \"+funName1, sameFunName);\n\t\t\t\t\n\t\t\t\tNodeList vars1 = ((Element) node1).getElementsByTagName(\"var\"); //Getting <var>\n\t\t\t\tNodeList vars2 = ((Element) node2).getElementsByTagName(\"var\");\n\t\t\t\tUtilitaire.assertT(\"Il n'y a pas le meme nombre de variables pour la fonction \"+funName1,vars1.getLength() == vars2.getLength());\n\t\t\t\tfor(int varIndex = 0; varIndex < vars1.getLength();varIndex++){\n\t\t\t\t\tboolean sameVarsName = false;\n\t\t\t\t\tNode varNode1 = vars1.item(varIndex);\n\t\t\t\t\t//Checking vars name\n\t\t\t\t\tString varName1 = ((Element) varNode1).getElementsByTagName(\"vname\").item(0).getTextContent(); //Writing vars names\n\t\t\t\t\t//Iterate through the vars of the second file to see if there is a same as varName1\n\t\t\t\t\tfor(int varIndex2 = 0; varIndex2 < vars2.getLength();varIndex2++){\n\t\t\t\t\t\tString varName2 = ((Element) vars2.item(varIndex2)).getElementsByTagName(\"vname\").item(0).getTextContent(); //Writing vars names\n\t\t\t\t\t\tif(varName1.equals(varName2)) sameVarsName = true;\n\t\t\t\t\t}\n\t\t\t\t\tUtilitaire.assertT(\"Les variables n'ont pas le meme nom : \"+varName1, sameVarsName);\n\t\t\t\t\t//Checking vars value\n\t\t\t\t\tboolean sameVarsValue = false;\n\t\t\t\t\t//Iterate through the vars of the second file to see if there is a same as varValue1\n\t\t\t\t\tString varValue1 = ((Element) varNode1).getElementsByTagName(\"value\").item(0).getTextContent(); //Writing vars names\n\t\t\t\t\tfor(int varIndex2 = 0; varIndex2 < vars2.getLength();varIndex2++){\n\t\t\t\t\t\tString varValue2 = ((Element) vars2.item(varIndex2)).getElementsByTagName(\"value\").item(0).getTextContent(); //Writing vars names\n\t\t\t\t\t\tif(varValue1.equals(varValue2)) sameVarsValue = true;\n\t\t\t\t\t}\n\t\t\t\t\tUtilitaire.assertT(\"Les variables n'ont pas les mÍmes valeurs : \"+varValue1, sameVarsValue);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Checking calls\n\t\t\t\tNodeList calls1 = ((Element) node1).getElementsByTagName(\"f\");\n\t\t\t\tNodeList calls2 = ((Element) node2).getElementsByTagName(\"f\");\n\t\t\t\tUtilitaire.assertT(\"Le nombre d'appels de fonctions ne sont pas les memes.\",calls1.getLength() == calls2.getLength());\n\t\t\t\t\n\t\t\t\tfor(int callIndex = 0; callIndex < calls1.getLength(); callIndex++){\n\t\t\t\t\tboolean sameCalls = false;\n\t\t\t\t\tString callValue1 = ((Element) calls1.item(callIndex)).getTextContent();\n\t\t\t\t\t//Iterate through the calls of the second file to see if there is a same as callValue1\n\t\t\t\t\tfor(int callIndex2 = 0; callIndex2 < calls2.getLength(); callIndex2++){\n\t\t\t\t\t\tString callValue2 = ((Element) calls2.item(callIndex2)).getTextContent();\n\t\t\t\t\t\tif(callValue1.equals(callValue2)) sameCalls = true;\n\t\t\t\t\t}\n\t\t\t\t\tUtilitaire.assertT(\"Les functions appellees ne sont pas les memes : \"+callValue1, sameCalls);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} catch (ParserConfigurationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SAXException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static void computeChildren() {\n\t\tArrayList<BNNode> children = new ArrayList<BNNode>();\n\t\t// For each node, build an array of children by checking which nodes have it as a parent.\n\t\tfor (BNNode node : nodes) {\n\t\t\tchildren.clear();\n\t\t\tfor (BNNode node2 : nodes) {\n\t\t\t\tif (node == node2)\n\t\t\t\t\tcontinue;\n\t\t\t\tfor (BNNode node3 : node2.parents)\n\t\t\t\t\tif (node3 == node)\n\t\t\t\t\t\tchildren.add(node2);\n\t\t\t}\n\t\t\tnode.children = new BNNode[children.size()];\n\t\t\tnode.children = (BNNode[]) children.toArray(node.children);\n\t\t}\n\t}",
"public int compare(Node o1, Node o2) {\n\t\tif(o1.getFn()<o2.getFn())\r\n\t\t\treturn -1;\r\n\t\tif(o1.getFn()>o2.getFn())\r\n\t\t\treturn 1;\r\n\t\treturn 0;\r\n\t}",
"@Override\n\tpublic int compareTo(AsNode other) {\n\t\tif(this.state.getF() < other.state.getF()) return -1;\n\t\tif(this.state.getF() > other.state.getF()) return 1;\n\t\treturn 0;\n\t}",
"public int compareTo(Node otherNode) \r\n\t{\n\t\tif(this.getTravelTime() < otherNode.getTravelTime())\r\n\t\t{\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\telse if(this.getTravelTime() > otherNode.getTravelTime())\r\n\t\t{\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t//EQUAL -- CHECK NODE TYPE\r\n\t\t\tif(otherNode.getNodeType()==1) \t//If other node is destination\r\n\t\t\t{\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\t\t\telse if(this.getNodeType()==1)\r\n\t\t\t{\r\n\t\t\t\treturn -1;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic int compareTo(Object o) {\n\t\tNode other=(Node)o;\r\n\t\t\r\n\t\t\r\n\t\treturn this.getWeight()-other.getWeight();//正序,\r\n\t}",
"private boolean hasTwo()\r\n\t\t{\r\n\t\t\treturn getLeftChild() != null && getRightChild() != null;\r\n\t\t}",
"private boolean hasTwoChildren(int i) {\n\t\tint left=left(i);\n\t\tint right=right(i);\n\t\tint sizee=heap.size();\n\t\tif(left<sizee-1 && right<sizee-1){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\r\n public int compare(Node o1, Node o2) {\r\n\r\n ArrayList<Litteral> solution1 = o1.getValeur();\r\n ArrayList<Litteral> solution2 = o2.getValeur();\r\n int satisfaitClauseNumberS1 = satInstance.satisfaitClauseNumber(solution1);\r\n int satisfaitClauseNumberS2 = satInstance.satisfaitClauseNumber(solution2);\r\n return satisfaitClauseNumberS2 - satisfaitClauseNumberS1;\r\n\r\n }",
"public boolean isHeap2() {\r\n\t\tint child = theHeap.size() - 1, parent;\r\n\r\n\t\twhile (child > 0) {\r\n\t\t\tparent = (child - 1) >> 1; \r\n\t\t\tif (compare(theHeap.get(child), theHeap.get(parent)) < 0)\r\n\t\t\t\treturn false;\t\r\n\t\t\tchild-- ;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic int compare(Column column1, Column column2) {\n\t\tboolean condition1 = column1.getRootId() > column2.getRootId();\n\t\tboolean condition2 = column1.getRootId() == column2.getRootId() && column1.getLevel() > column2.getLevel();\n\t\tboolean condition3 = column1.getRootId() == column2.getRootId() && column1.getLevel() == column2.getLevel() && column1.getSeq() > column2.getSeq();\n\t\t\n\t\tif(condition1 || condition2 || condition3){\n\t\t\t return 1;\n\t\t}else{\n\t\t\t return 0;\n\t\t} \n\t}",
"public int compareTo(VNode other)\n {\n if (other==null) \n return 1; // this > null \n \n return _nodeVRL.compareTo(other.getLocation()); \n }",
"@Override\r\n public int compare(searchNode e1, searchNode e2) {\r\n //if node 1 has a a lower FScore than node 2, return -1 which will put e1 BEFORE e2\r\n if (e1.getFScore() < e2.getFScore()) {\r\n return -1;\r\n }\r\n //if node 1 has a higher FScore than node 2, return 1 which will put e2 BEFORE e1\r\n if (e1.getFScore() > e2.getFScore()) {\r\n return 1;\r\n }\r\n //else return they are same whichw ill keep order same\r\n return 0;\r\n }",
"void compareDataStructures();",
"@Override\n public int compare(ObjectRelation o1, ObjectRelation o2) {\n return (o1.order - o2.order);\n }",
"public int compare(int a, int b) {\n //System.err.println(\"compare \" + a + \" with \" + b);\n return comparer.compare((NodeInfo)sequence.itemAt(a),\n (NodeInfo)sequence.itemAt(b));\n }",
"@Override\n protected final int compareNodeFields(Node o) {\n TypedNodeWithUuids other = (TypedNodeWithUuids) o;\n if (!typeConceptUuid.equals(other.typeConceptUuid)) {\n return typeConceptUuid.compareTo(other.typeConceptUuid);\n }\n return compareTypedNodeFields(o);\n }",
"@Override\r\n\t\tpublic boolean isEqualNode(Node arg)\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}",
"private static boolean isDescendantOf(final ClassLoader cl0, final ClassLoader cl1) {\n for (ClassLoader cl = cl0; cl != null; cl = cl.getParent()) {\n if (cl == cl1) {\n return true;\n }\n }\n return false;\n }",
"private List<SimilarNode> astCCImplmentation(HashMap<ASTNode, NodeInfo> fileNodeMap1, HashMap<ASTNode, NodeInfo> fileNodeMap2) {\n TreeMap<Integer, List<NodeInfo>> treeMap1 = convertToTreeMap(fileNodeMap1);\n TreeMap<Integer, List<NodeInfo>> treeMap2 = convertToTreeMap(fileNodeMap2);\n List<SimilarNode> result = new ArrayList<>();\n int[] array1 = getArray(treeMap1.keySet());\n int[] array2 = getArray(treeMap2.keySet());\n int i = 0;\n int j = 0;\n int sum = 0;\n while (i < array1.length && j < array2.length) {\n if (array1[i] == array2[j]) {\n // obtain list of nodeInfos for both and compare them if match found then add it to report\n List<NodeInfo> list1 = treeMap1.get(array1[i]);\n List<NodeInfo> list2 = treeMap2.get(array2[j]);\n for (NodeInfo nodeInfo1 : list1) {\n for (NodeInfo nodeInfo2 : list2) {\n if ((nodeInfo1.hashValue == nodeInfo2.hashValue) && (nodeInfo1.nodeType == nodeInfo2.nodeType)) {\n result.add(new SimilarNode(nodeInfo1, nodeInfo2));\n\n }\n }\n }\n i++;\n j++;\n\n } else if (array1[i] > array2[j]) {\n j++;\n } else if (array1[i] < array2[j]) {\n i++;\n }\n }\n return result;\n }",
"@Override\r\n\t public int compare(Node o1, Node o2) {\n\t\tif (o1.downloadRate > o2.downloadRate)\r\n\t\t return 1;\r\n\t\tif (o1.downloadRate < o2.downloadRate)\r\n\t\t return -1;\r\n\t\t\r\n\t\treturn 0;\r\n\t }",
"@Override\n\tpublic int compare(Family o1, Family o2) {\n\t\treturn o2.getMembers().size() - o1.getMembers().size();\n\t}",
"@Test\n\tpublic void lowestCommonAncestorTest1()\n\t{\n\t\tNodeList n1=xmlDocument.getElementsByTagName(\"b\");\n\t\tNodeList n2=xmlDocument.getElementsByTagName(\"i\");\n\t\tassertEquals(\"p\",Manipulator.lowestCommonAncesstor(n1.item(0),n2.item(0)).getNodeName());\n\t}",
"@Override\r\n\tpublic int compare(GraphNode<T> o1, GraphNode<T> o2) {\n\t\treturn o1.getName().compareTo(o2.getName());\r\n\t}",
"public static boolean areMirror(Node n1, Node n2) {\r\n //If any condition where children sizes are not same it means shape is not similar so return false\r\n if(n1.children.size() != n2.children.size()){\r\n return false;\r\n }\r\n \r\n boolean res = true;\r\n //For node2 interate from reverse\r\n int j = n2.children.size()-1;\r\n \r\n for(int i=0; i<n1.children.size(); i++){\r\n Node child1 = n1.children.get(i);\r\n \r\n Node child2 = n2.children.get(j--); //decrease j while traversing from behind\r\n \r\n res = areMirror(child1, child2);\r\n \r\n //if even once a false is encountered it means no calculate further and return from here\r\n if(res == false){\r\n return false;\r\n }\r\n }\r\n return res;\r\n }",
"public boolean subtree(TreeNode t1, TreeNode t2)\n {\n if(t2 == null)\n {\n return true;\n }\n \n if(t1 == null)\n {\n return false;\n }\n \n if(t1.data == t2.data)\n {\n if(match(t1, t2))\n {\n return true;\n }\n }\n \n return subtree(t1.left, t2) || subtree(t1.right, t2);\n }",
"public int compareTo(Item other) {\n if (other.isNull()) {\n return 1;\n }\n return this.serialize().compareTo(other.serialize());\n }",
"public float compare(Cluster other) {\n \treturn compare(center, other.center);\n }",
"Node commonAncestor(Node one, Node two);",
"public int compare(Edge a, Edge b) {\n // for ascending\n return a.weight - b.weight;\n\n // for descending\n // return b.weight - a.weight;\n }",
"private int Compare(ResultsClass lhs, ResultsClass rhs) {\n if (lhs.bodyPart > rhs.bodyPart) {\n return 1;\n } else if (lhs.bodyPart > rhs.bodyPart) {\n return -1;\n } else {\n return 0;\n }\n }",
"boolean newequals(DataBT a, DataBT b) \n\t {\n\t \tSystem.out.println(\"!!\");\n\t \t\n\t /*1. both empty */\n\t if ((IBinTree)a instanceof MtBT && (IBinTree)b instanceof MtBT)\n\t return true;\n\t System.out.println(\"1 \" + a.data);\n\t \t \n\t /* 2. both non-empty -> compare them */\n\t if ( !((IBinTree)a instanceof MtBT) && !((IBinTree)b instanceof MtBT)) {\n\n\t \tboolean check = (a.data == b.data);\n\t\t System.out.println(\"1112\");\n\t\t \n\t\t if(a.left instanceof MtBT && b.left instanceof MtBT);else\n\t\t if((a.left instanceof MtBT) != (a.left instanceof MtBT))check = false;else\n\t \tif(!newequals((DataBT)a.left, (DataBT)b.left))check = false;\n\t\t \n\t\t \n\t\t System.out.println(\"1113\");\n\t\t \n\t\t \n\t\t if(a.right instanceof MtBT && b.right instanceof MtBT);else\n\t\t\t if((a.right instanceof MtBT) != (a.right instanceof MtBT))check = false;else\n\t\t if(!newequals((DataBT)a.right, (DataBT)b.right))check = false;\n\n\t\t System.out.println(\"112\");\n\n\t\t return (check);\n\t }\n\t System.out.println(\"2\");\n\t \n\t /* 3. one empty, one not -> false */\n\t if ( ((IBinTree)a instanceof MtBT) && (!((IBinTree)b instanceof MtBT))) {\n\t \treturn false;\n\t }\n\t System.out.println(\"3\");\n\t return false;\n\t }",
"private static boolean isSameTree(Node currentT1Node, Node currentT2Node) {\n\t\tif (currentT1Node != null && currentT2Node != null) {\n\t\t\tboolean isLeftSame = isSameTree(currentT1Node.leftChild, currentT2Node.leftChild);\n\t\t\tboolean isRightSame = isSameTree(currentT1Node.rightChild, currentT2Node.rightChild);\n\n\t\t\t// If either is false it means that the trees differ so we return immediately\n\t\t\tif (!isLeftSame || !isRightSame) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// Otherwise we compare the nodes in the current value.\n\t\t\tif (currentT1Node.value == currentT2Node.value) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\t// If one current Tn node is null and the other isn't then the trees are not the same.\n\t\tif ((currentT1Node == null && currentT2Node != null) || (currentT1Node != null && currentT2Node == null)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true; // We have hit the bottom of both trees, both T1 and T2 are null therefore it still matches.\n\t}",
"public int compareTo(Node otherguy)\n {\n return value.compareTo(otherguy.value);\n }",
"@Override\r\n\tpublic int compareTo(HuffmanTree otherTree) {\r\n\t\treturn super.getRoot().getElement().getFrequency() - ((HuffmanPair) otherTree.getRoot().getElement()).getFrequency();\r\n\t}",
"@Override\n public int compareTo(JBurgPatternMatcher other)\n {\n Vector<PathElement> this_path = this.generateAccessPath();\n Vector<PathElement> other_path = other.generateAccessPath();\n \n int result = this_path.size() - other_path.size();\n \n for ( int i = 0; i < this_path.size() && result == 0; i++ )\n result = this_path.elementAt(i).compareTo(other_path.elementAt(i));\n\n return result;\n }",
"public int compare(Object o1, Object o2) {\n if (!(o1 instanceof BodyDeclaration) && !(o2 instanceof BodyDeclaration)) {\n throw new ClassCastException();\n }\n BodyDeclaration node1 = (BodyDeclaration) o1;\n BodyDeclaration node2 = (BodyDeclaration) o2;\n int category1 = getCategory(node1);\n int category2 = getCategory(node2);\n if (category1 != category2) {\n return category1 - category2;\n }\n if (o1 == o2) {\n return 0;\n }\n String node1Signature = buildSignature(node1);\n String node2Signature = buildSignature(node2);\n if (node1Signature.length() != 0 && node2Signature.length() != 0) {\n int compare = this.collator.compare(node1Signature, node2Signature);\n if (compare != 0) {\n return compare;\n }\n }\n int sourceStart1 = ((Integer) node1.getProperty(CompilationUnitSorter.RELATIVE_ORDER)).intValue();\n int sourceStart2 = ((Integer) node2.getProperty(CompilationUnitSorter.RELATIVE_ORDER)).intValue();\n return sourceStart1 - sourceStart2;\n }",
"protected void setChildren(Node n1, Node n2) {\r\n children[0] = n1;\r\n children[1] = n2;\r\n }",
"@Override\n public int compare(Edge edge1, Edge edge2) {\n return Integer.compare(edge1.weight, edge2.weight);\n }",
"@Override\n\t\tpublic int compare(PathfindingNode object1, PathfindingNode object2) \n\t\t{\n\t\t\treturn _totalCosts.get(object1) - _totalCosts.get(object2);\n\t\t}",
"public static Comparison checkEquality(JexlNode first, JexlNode second) {\n if (first == second) {\n return Comparison.IS_EQUAL;\n } else if (first == null || second == null) {\n return Comparison.notEqual(\"One tree is null: \" + first + \" vs \" + second);\n } else {\n TreeEqualityVisitor visitor = new TreeEqualityVisitor();\n return (Comparison) first.jjtAccept(visitor, second);\n }\n }",
"@Test\n\tpublic void lowestCommonAncestorTest3()\n\t{\n\t\tNodeList n1=xmlDocument.getElementsByTagName(\"b\");\n\t\tNodeList n2=xmlDocument.getElementsByTagName(\"p\");\n\t\tassertEquals(\"#document\",Manipulator.lowestCommonAncesstor(n1.item(0),n2.item(0)).getNodeName());\n\t}",
"private Node caseTwoChildren(Node deleteThis) {\r\n\r\n Node next = getMin(deleteThis.getRight()),\r\n child, parent;\r\n deleteThis.setKey(next.getKey());\r\n child = next.getRight();\r\n parent = next.getParent();\r\n if (parent.getLeft() == next) {\r\n parent.setLeft(child);\r\n } else {\r\n parent.setRight(child);\r\n }\r\n if (child != null) {\r\n child.setParent(parent);\r\n }\r\n return next;\r\n }",
"public static int graphNodeComparison(Vector3D targetNodePosition, GraphNode a, GraphNode b) {\n Vector3D aPos = getPositionOf(a);\n Vector3D bPos = getPositionOf(b);\n\n float aDiff = Vector3D.getDistanceBetween(aPos, targetNodePosition);\n float bDiff = Vector3D.getDistanceBetween(bPos, targetNodePosition);\n\n float diff = aDiff - bDiff;\n int intDiff = Math.round(diff * DIFF_SCALE);\n\n if (intDiff == 0)\n intDiff = (int)Math.signum(diff);\n\n return intDiff;\n }",
"public int compareTo(DocumentPair other) {\r\n return (this.jsDiv - other.jsDiv);\r\n }",
"public boolean greaterThan(XObject obj2)\n throws javax.xml.transform.TransformerException{\n if(obj2.getType()==XObject.CLASS_NODESET)\n return obj2.lessThan(this);\n return this.num()>obj2.num();\n }",
"boolean hasChildren();",
"private static int binaryCompare(final Resource r1, final Resource r2) throws IOException {\n try (InputStream in1 = new BufferedInputStream(r1.getInputStream());\n InputStream in2 =\n new BufferedInputStream(r2.getInputStream())) {\n\n for (int b1 = in1.read(); b1 != -1; b1 = in1.read()) {\n final int b2 = in2.read();\n if (b1 != b2) {\n return b1 > b2 ? 1 : -1;\n }\n }\n return in2.read() == -1 ? 0 : -1;\n }\n }",
"@Override\n public int compareTo(Entry other) {\n if(this.tag>other.tag) return 1;\n if(this.tag==other.tag) return 0;\n return -1;\n }",
"@Override\n\t\tpublic int compare(ModCandidate a, ModCandidate b) {\n\n\t\t\tif (a.isRoot()) {\n\t\t\t\tif (!b.isRoot()) {\n\t\t\t\t\treturn -1; // only a is root\n\t\t\t\t}\n\t\t\t} else if (b.isRoot()) {\n\t\t\t\treturn 1; // only b is root\n\t\t\t}\n\n\t\t\t// sort id desc\n\t\t\tint idCmp = a.getId().compareTo(b.getId());\n\t\t\tif (idCmp != 0) return idCmp;\n\n\t\t\t// sort version desc (lower version later)\n\t\t\tint versionCmp = b.getVersion().compareTo(a.getVersion());\n\t\t\tif (versionCmp != 0) return versionCmp;\n\n\t\t\t// sort nestLevel asc\n\t\t\tint nestCmp = a.getMinNestLevel() - b.getMinNestLevel(); // >0 if nest(a) > nest(b)\n\t\t\tif (nestCmp != 0) return nestCmp;\n\n\t\t\tif (a.isRoot()) return 0; // both root\n\n\t\t\tList<ModCandidate> parents = new ArrayList<>(a.getParentMods().size() + b.getParentMods().size());\n\t\t\tparents.addAll(a.getParentMods());\n\t\t\tparents.addAll(b.getParentMods());\n\t\t\tparents.sort(this);\n\n\t\t\tif (a.getParentMods().contains(parents.get(0))) {\n\t\t\t\tif (b.getParentMods().contains(parents.get(0))) {\n\t\t\t\t\treturn 0;\n\t\t\t\t} else {\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}",
"public int compareTo(Node k){\n Integer thisValue = this.number;\n Integer otherValue = k.getNumber();\n return thisValue.compareTo(otherValue);\n }",
"private boolean compatibleNodeTypes(AxiomTreeNode t1, AxiomTreeNode t2) {\n if (!t1.getNodeType().equals(t2.getNodeType())) {\n return false;\n }\n \n switch (t1.getNodeType()) {\n case CARD:\n int label1 = (Integer) t1.getLabel();\n int label2 = (Integer) t2.getLabel();\n return (label1 == label2);\n \t\n case OWLOBJECT:\n OWLObject o1 = (OWLObject) t1.getLabel();\n OWLObject o2 = (OWLObject) t2.getLabel();\n //System.out.println(o1.getClass());\n //System.out.println(o2.getClass());\n //Check for datatypes - then check datatype to see match. Else, return true if compatible.\n if(o1.getClass() == o2.getClass())\n {\n \tif(!o1.getDatatypesInSignature().isEmpty())\n \t{\n \t\t//Need to check if built in first. First check is convenience, datatypes should match\n \t\t//If one is built in, so should other. If neither is built in, this is also a viable match\n \t\t//If not equal and at least one is built in, its not a match.\n \t\tOWLDatatype dt1 = (OWLDatatype) o1.getDatatypesInSignature().toArray()[0];\n \t\t\tOWLDatatype dt2 = (OWLDatatype) o2.getDatatypesInSignature().toArray()[0];\n \t\t\t//System.out.println(\"DT1: \" + dt1);\n \t\t\t//System.out.println(\"DT2: \" + dt2);\n \t\tif(dt1.equals(dt2) && dt1.isBuiltIn())\n \t\t{\t\n \t\t\t//System.out.println(\"Standard state\");\n \t\t\t//System.out.println(o1.equals(o2));\n \t\t\treturn o1.equals(o2);\n \t\t}\n \t\telse if(!dt1.isBuiltIn() && !dt2.isBuiltIn())\n \t\t{\n \t\t\t//System.out.println(\"Unique state\");\n \t\t\treturn true;\n \t\t}\n \t\telse\n \t\t{\n \t\t\t//System.out.println(\"Rejection state\");\n \t\t\treturn false;\n \t\t}\n \n \t}\n \telse\n \t{\n \t\treturn true;\n \t}\n }\n else\n {\n \treturn false;\n }\n }\n return false;\n }",
"public int CompareTwoLinkedLists(MyLinkList l1, MyLinkList l2) {\n Node curr = l1.head;\n Node curr2 = l2.head;\n while (curr != null) {\n if ((curr.next != null && curr2.next == null) || (curr.next == null && curr2.next != null)) {\n return 0;\n }\n if (curr.data != curr2.data) {\n return 0;\n }\n System.out.printf(\"Data : \" + curr.data + \"--\" + curr2.data + \"\\n\");\n curr = curr.next;\n curr2 = curr2.next;\n }\n return 1;\n }",
"public int compare(T element1, T element2) {\n\t\t\n\t\tint result = 0;\n\t\t\n\t\ttry{\n\t\t\tComparable<T> element = (Comparable<T>) element2;\n\t\t\tresult = element.compareTo(element1);\n\t\t}catch(ClassCastException ex){\n\t\t\tex.getStackTrace();\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"@Override\n public int compareTo(final Node that) {\n //Preconditions\n assert that != null : \"that must not be null\";\n\n return this.name.compareTo(that.name);\n }",
"@Override\n public int compare(Membership ms1, Membership ms2) {\n if (ms1.getEnd() == null ^ ms2.getEnd() == null) {\n return ms1.getEnd() == null ? -1 : 1;\n }\n // fallback to lexical sorting of group names\n return ms1.getGroup().compareTo(ms2.getGroup());\n }",
"public static <V, I> boolean compareTwoDag(final DAG<V, I> dag1, final DAG<V, I> dag2) {\n if (!(dag1.numberOfVertices() == dag2.numberOfVertices()\n && dag1.numberOfEdges() == dag2.numberOfEdges())) {\n return false;\n }\n\n boolean comp = true;\n for (final V root : dag1.getRootVertices()) {\n comp = dfsCompare(dag1, dag2, root) && comp;\n }\n return comp;\n }",
"@Override\r\n public int compare(HDTV o1, HDTV o2) {\n return o1.getSize() - o2.getSize(); // prints object in ascending order\r\n\r\n }",
"@Override\n\t\t\tpublic int compare(Jugador j1, Jugador j2) {\n\t\t\t\treturn j1.valorDeCartas() - j2.valorDeCartas();\n\t\t\t}",
"private static void commonNodesBSTFind(Node r1, Node r2)\n {\n if(r1 == null || r2==null)\n return;\n commonNodesBSTFind(r1.left, r2);\n findNode(r2,r1.data);\n commonNodesBSTFind(r1.right,r2);\n }",
"public static boolean areMirror2(Node n1, Node n2) {\n boolean flag=true;\n int n=n1.children.size();\n\n if(n!=n2.children.size() && n1.data!=n2.data)\n return false;\n for(int i=0;i<n;i++)\n {\n flag= flag && areMirror(n1.children.get(i),n2.children.get(n-i-1));\n if(flag==false)\n break;\n }\n return flag;\n }",
"@Override\n public int compareTo(Node n){\n if(this.getfVal() < n.getfVal())\n return -1;\n if(this.getfVal() > n.getfVal())\n return 1;\n return 0;\n }",
"public static boolean areMirror(Node n1, Node n2) {\n boolean flag=true;\n int n=n1.children.size();\n\n if(n!=n2.children.size())\n return false;\n for(int i=0;i<n;i++)\n {\n flag= flag && areMirror(n1.children.get(i),n2.children.get(n-i-1));\n if(flag==false)\n break;\n }\n return flag;\n }",
"@Test(expected=NullPointerException.class)\n\tpublic void lowestCommonAncestorTest2()\n\t{\n\t\tNodeList n1=xmlDocument.getElementsByTagName(\"c\");\n\t\tNodeList n2=xmlDocument.getElementsByTagName(\"i\");\n\t\tManipulator.lowestCommonAncesstor(n1.item(0),n2.item(0));\n\t}",
"private Set<Match> compareTwoNodeLists(List<Node> programANodeList, List<Node> programBNodeList) {\n\t\t// convert node list to string representations in order\n\t\tString programATypeAbbr = getProgramRepresentation(programANodeList);\n\t\tString programBTypeAbbr = getProgramRepresentation(programBNodeList);\n\n\t\t// call Greedy String Tilling algorithms to compare the Strings\n\t\tGreedyStringTilling gst = new GreedyStringTilling(MIN_MATCHED_LEN_FOR_GST);\n\n\t\treturn gst.GST(programATypeAbbr, programBTypeAbbr);\n\t}"
] | [
"0.6638102",
"0.65207756",
"0.63636285",
"0.6267411",
"0.62174815",
"0.6101471",
"0.5992768",
"0.5975032",
"0.59429723",
"0.5882214",
"0.5808297",
"0.57628036",
"0.573446",
"0.5730383",
"0.5723277",
"0.5722027",
"0.5700096",
"0.5688998",
"0.5627146",
"0.56199956",
"0.5596816",
"0.5596149",
"0.557097",
"0.55633926",
"0.55337137",
"0.55316174",
"0.5505153",
"0.5462778",
"0.5442721",
"0.54365313",
"0.5423151",
"0.5414291",
"0.53753126",
"0.5353765",
"0.5349862",
"0.53384894",
"0.5338095",
"0.5334086",
"0.53178644",
"0.5316746",
"0.53059715",
"0.5289215",
"0.5274584",
"0.5273694",
"0.52706456",
"0.52605015",
"0.52518034",
"0.524821",
"0.523924",
"0.5224959",
"0.5205446",
"0.51820505",
"0.5179724",
"0.5179017",
"0.5175382",
"0.5168092",
"0.5166372",
"0.5156846",
"0.5156823",
"0.51567554",
"0.51529676",
"0.5146386",
"0.5142395",
"0.5135435",
"0.5130327",
"0.5122958",
"0.51207614",
"0.51160574",
"0.5114824",
"0.50987136",
"0.5097386",
"0.50911784",
"0.50897276",
"0.5088179",
"0.5081399",
"0.5078085",
"0.5068401",
"0.50612664",
"0.50589234",
"0.5057989",
"0.5052084",
"0.50492495",
"0.5047778",
"0.50422",
"0.50419146",
"0.50403535",
"0.50355065",
"0.5027403",
"0.502498",
"0.5023079",
"0.5018542",
"0.50133216",
"0.50060874",
"0.5005619",
"0.5001054",
"0.49933645",
"0.49768138",
"0.49676993",
"0.49665764",
"0.49633074"
] | 0.7883699 | 0 |
Return the flattened children of the given node. | private List<SimpleNode> getChildren(SimpleNode node) {
Class<?> nodeType = node.getClass();
List<SimpleNode> children = new ArrayList<>();
for (int i = 0; i < node.jjtGetNumChildren(); i++) {
children.addAll(flatten(node.jjtGetChild(i), nodeType));
}
return children;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private List<Node<E>> getChildrenForNode(Node<E> node) {\n ArrayList<Node<E>> list = new ArrayList<>();\n for (Node<E> child : node.getChilden()) {\n list.add(child);\n }\n return list;\n }",
"List<Node<T>> children();",
"private List<SimpleNode> flatten(SimpleNode node, Class<?> rootType) {\n if (isFlattenable(node, rootType)) {\n List<SimpleNode> children = new ArrayList<>();\n for (int i = 0; i < node.jjtGetNumChildren(); i++) {\n children.addAll(flatten(node.jjtGetChild(i), rootType));\n }\n return children;\n } else {\n return Collections.singletonList(node);\n }\n }",
"Node[] getChildren(Node node);",
"public static Stream<Node> childNodesOf(@Nonnull final Node node) {\n\t\treturn streamOf(node.getChildNodes());\n\t}",
"public static ArrayList<Node> getAllChildren(Node node) {\r\n ArrayList<Node> list = new ArrayList<Node>();\r\n if (node == null)\r\n return list;\r\n\r\n for (Node child = node.getFirstChild(); child != null; child = child.getNextSibling()) {\r\n list.add(child);\r\n }\r\n\r\n return list;\r\n }",
"public static DocumentFragment extractChildren(final Node node) throws DOMException {\n\t\treturn extractChildren(node, true); //extract the childen by removing them\n\t}",
"public Node[] getChildren() {\n\t\treturn children.toArray(new Node[0]);\n\t}",
"Collection<DendrogramNode<T>> getChildren();",
"public @NonNull List<@NonNull Node<@Nullable T>> getChildren() {\n return Collections.unmodifiableList(this.children);\n }",
"public JodeList children() {\n return new JodeList(node.getChildNodes());\n }",
"public Node[] getChildren(){return children;}",
"@Nonnull\n Iterable<? extends T> getChildren();",
"public Node[] getChildren(){\n return children.values().toArray(new Node[0]);\n }",
"public List<Node> getChildren() {\r\n\t\t\tchildren.reset();\r\n\t\t\treturn children;\r\n\t\t}",
"public XMLElement[] getChildren()\n/* */ {\n/* 532 */ int childCount = getChildCount();\n/* 533 */ XMLElement[] kids = new XMLElement[childCount];\n/* 534 */ this.children.copyInto(kids);\n/* 535 */ return kids;\n/* */ }",
"public JodeList children(String nodeName) {\n return this.children().filter(nodeName);\n }",
"public List<TreeNode> getChildren ()\r\n {\r\n if (logger.isFineEnabled()) {\r\n logger.fine(\"getChildren of \" + this);\r\n }\r\n\r\n return children;\r\n }",
"public List<TreeNode> getChildrenNodes();",
"@Override\n\tpublic Set<HtmlTag> getChildren()\n\t{\n\t\tImmutableSet.Builder<HtmlTag> childrenBuilder = ImmutableSet.builder();\n\t\tfor(TreeNode<? extends HtmlTag> child : node.getChildren())\n\t\t{\n\t\t\tchildrenBuilder.add(child.getValue());\n\t\t}\n\t\treturn childrenBuilder.build();\n\t}",
"public ArrayList<Node> getChildren() {\n return children;\n }",
"@NotNull\n public abstract JBIterable<T> children(@NotNull T root);",
"public ArrayList<Node> getChildren() { return this.children; }",
"public ArrayList<Node> getChildren(){\n return children;\n }",
"public void flatten()\r\n\t\t{\r\n\t\t\tif (_children.size() > 0) \r\n\t\t\t{\r\n\t\t\t\tint i = 0;\r\n\t\t\t\twhile(i < _children.size())\r\n\t\t\t\t{\r\n\t\t\t\t\tExpressionNode subExpr = _children.get(i);\r\n\t\t\t\t\tsubExpr.flatten();\r\n\t\t\t\t\tif (_data.equals(subExpr._data)) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t_children.addAll(subExpr._children);\r\n\t\t\t\t\t\t_children.remove(subExpr);\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}\r\n\t\t}",
"public List<Element> getChildElements() {\n return getChildNodes().stream().filter(n -> n instanceof Element)\n .map(n -> (Element) n).collect(Collectors.toUnmodifiableList());\n }",
"@Override\n public List<TreeNode<N>> children() {\n return Collections.unmodifiableList(children);\n }",
"@Override\n\tpublic TreeNode[] getChildren() {\n\t\treturn this.children ;\n\t}",
"@JsProperty\n NodeList getChildNodes();",
"public List<EntityHierarchyItem> children() {\n return this.innerProperties() == null ? null : this.innerProperties().children();\n }",
"public Iterator<String> listChildren(T node){\n\t\tT target = node;\n\t\tSet<Edge<T,E>> alledges = this.graph.getEdges(target);\n\t\tList<String> children = new ArrayList<String>();\n\t\tfor(Edge<T, E> e : alledges) {\n\t\t\tchildren.add(e.getChild()+\"(\"+e.getName()+\")\");\n\t\t}\n\t\tCollections.sort(children);\n\t\tIterator<String> itr = children.iterator();\n\t\treturn itr;\n\t}",
"public Collection<ChildType> getChildren();",
"public abstract List<Node> getChildNodes();",
"public Vector<GraphicalLatticeElement> getChildren() {\n\t\tVector<GraphicalLatticeElement> children = new Vector<GraphicalLatticeElement>();\n\t\tif (childrenEdges != null)\n\t\t\tfor (int i = 0; i < childrenEdges.size(); i++) {\n\t\t\t\tEdge edge = childrenEdges.elementAt(i);\n\t\t\t\tchildren.add(edge);\n\t\t\t\tchildren.add(edge.getDestination());\n\t\t\t}\n\t\t\n\t\treturn children;\n\t}",
"public ResultMap<BaseNode> listChildren();",
"abstract public Collection<? extends IZipNode> getChildren();",
"public JodeList children(Predicate<Jode> filter) {\n return this.children().filter(filter);\n }",
"public Enumeration<Node> children() { return null; }",
"@Override\r\n\tpublic List<TreeNode> getChildren() {\n\t\tif(this.children==null){\r\n\t\t\treturn new ArrayList<TreeNode>();\r\n\t\t}\r\n\t\treturn this.children;\r\n\t}",
"@NotNull\n @Override\n public TreeElement[] getChildren() {\n return callChildren(this, navigationItem);\n }",
"public Element[] getChildren(Element element) {\n return DocumentHelper.getChildren(element, getNamespaceURI());\n }",
"@Override\n\tpublic List<Node> chilren() {\n\t\treturn children;\n\t}",
"public ListNode[] getChildren(){\n\t\tListNode[] ret = new ListNode[length()];\n\t\tListNode temp = firstNode;\n\t\tfor(int i = 0; i < ret.length && temp != null; i++){\n\t\t\tret[i] = temp;\n\t\t\ttemp = temp.getNextNode();\n\t\t}\n\n\t\treturn ret;\n\t}",
"public List<PafDimMember> getChildren() {\r\n\t\t\r\n\t\tList<PafDimMember> childList = null;\r\n\t\t\r\n\t\t// If no children are found, return empty array list\r\n\t\tif (children == null) {\r\n\t\t\tchildList = new ArrayList<PafDimMember>();\r\n\t\t} else {\r\n\t\t\t// Else, return pointer to children\r\n\t\t\tchildList = children;\r\n\t\t}\r\n\t\treturn childList;\r\n\t}",
"protected final synchronized Iterator<T> children() {\n if( children == null ) {\n children = Collections.emptyList();\n }\n \n return children.iterator();\n }",
"@SuppressWarnings(\"unchecked\")\r\n public synchronized List<TreeNode> getChildrenCopy ()\r\n {\r\n if (logger.isFineEnabled()) {\r\n logger.fine(\"getChildrenCopy of \" + this);\r\n }\r\n\r\n return new ArrayList(children);\r\n }",
"public List<XML2JSONObject> getChildren() {\r\n return _childs;\r\n }",
"private static ArrayList<Species> getAllDescendantSpeciesHelper(PhyloTreeNode node,java.util.ArrayList<Species> descendants) {\n if(node == null)\n return descendants;\n if(node.isLeaf()) {\n descendants.add(node.getSpecies());\n return descendants;\n }\n else{\n if(node.getLeftChild() != null) {\n descendants = getAllDescendantSpeciesHelper(node.getLeftChild(), descendants);\n }\n if(node.getRightChild() != null) {\n descendants = getAllDescendantSpeciesHelper(node.getRightChild(), descendants);\n }\n }\n return descendants;\n }",
"public ParseTree[] getChildren() {\n\t\treturn children;\n\t}",
"public static void computeChildren() {\n\t\tArrayList<BNNode> children = new ArrayList<BNNode>();\n\t\t// For each node, build an array of children by checking which nodes have it as a parent.\n\t\tfor (BNNode node : nodes) {\n\t\t\tchildren.clear();\n\t\t\tfor (BNNode node2 : nodes) {\n\t\t\t\tif (node == node2)\n\t\t\t\t\tcontinue;\n\t\t\t\tfor (BNNode node3 : node2.parents)\n\t\t\t\t\tif (node3 == node)\n\t\t\t\t\t\tchildren.add(node2);\n\t\t\t}\n\t\t\tnode.children = new BNNode[children.size()];\n\t\t\tnode.children = (BNNode[]) children.toArray(node.children);\n\t\t}\n\t}",
"private List<Node> returnAllNodes(Node node) {\n List<Node> listOfNodes = new ArrayList<Node>();\n if (node != null) {\n listOfNodes.add(node);\n for (int i = 0; i < listOfNodes.size(); ++i) {\n Node n = listOfNodes.get(i);\n List<Node> children = n.children;\n if (children != null) {\n for (Node child : children) {\n if (!listOfNodes.contains(child)) {\n listOfNodes.add(child);\n }\n }\n }\n }\n }\n return listOfNodes;\n }",
"public List<TreeNode> getChildren() {\n\t\treturn children;\n\t}",
"public Object[] getFilteredChildren() {\n\t\treturn getFilteredChildren(txTableViewer);\n\t}",
"public List<FileNode> getChildren() {\r\n return this.children;\r\n }",
"public Vector getChildren()\r\n\t{\r\n\t\treturn m_children;\r\n\t}",
"public void flatten();",
"public Iterator<ParseTreeNode> children() {\r\n if ((_children == null) || (_children.size() == 0)) {\r\n return NULL_ITERATOR;\r\n }\r\n return _children.iterator();\r\n }",
"public LinkedList<Node> getChildren() { \r\n LinkedList<Node> nodes = new LinkedList<>();\r\n for(int i=0;i<=size;i++)\r\n nodes.add(children[i]);\r\n return nodes;\r\n }",
"@Override\r\n\tpublic List<Node> getChildren() {\r\n\t\treturn null;\r\n\t}",
"public List<String> getChildren() {\n\t\treturn null;\n\t}",
"public ArrayList<BTreeNode<E>> getChildren() {\n\t\treturn children;\n\t}",
"@Override\n public LinkedList<ApfsElement> getChildren() {\n return this.children;\n }",
"public ArrayList getChildren()\n {\n return children;\n }",
"public Enumeration enumerateChildren() {\n return this.children.elements();\n }",
"public ArrayList<PiptDataElement> getChildren()\n {\n\treturn children;\n }",
"public Vector getChildren() {\n return this.children;\n }",
"List<HNode> getChildren(Long id);",
"public Collection<BaseGenerator> \n getChildren() \n {\n return Collections.unmodifiableCollection(pChildren.values());\n }",
"public List<String> children() {\n return this.children;\n }",
"public String getChildren() {\n return children;\n }",
"public java.util.List<Node> getChildren(String... args) throws ChildNotFoundException {\n\t\tjava.util.List<Node> children = new ArrayList<Node>();\n\t\tfor(Node node : selected_nodes) {\n\t\t\ttry {\n\t\t\t\tchildren.addAll(node.getChildren(args));\n\t\t\t} catch (ChildNotFoundException e) {}\n\t\t}\n\t\tif(children.isEmpty()) {\n\t\t\tthrow new ChildNotFoundException(\"No children found with that path\");\n\t\t}\n\t\treturn children;\n\t}",
"public ArrayList<LexiNode> getChilds(){\n\t\treturn childs;\n\t}",
"@SuppressWarnings(\"unchecked\")\n public List<AbstractFamixEntity> getDescendants(AbstractFamixEntity entity) {\n List<AbstractFamixEntity> entities = new ArrayList<AbstractFamixEntity>();\n entities.add(entity);\n if (entity instanceof IHierarchicalElement) {\n IHierarchicalElement<? extends AbstractFamixEntity> parentEntity = (IHierarchicalElement<? extends AbstractFamixEntity>) entity;\n if (parentEntity.getChildren().size() > 0) {\n for (AbstractFamixEntity child : parentEntity.getChildren()) {\n entities.addAll(getDescendants(child));\n }\n }\n }\n return entities;\n }",
"public Element[] getChildren(Element element, String localName) {\n return DocumentHelper.getChildren(element, getNamespaceURI(), localName);\n }",
"@Override\n\tpublic Object visit(SimpleNode node, Object data) {\n\t\treturn node.childrenAccept(this, data);\n\t}",
"protected abstract List<T> getChildren();",
"public List<ChronologElement> getChildren() {\r\n return children;\r\n }",
"private Node removeChildNodes(Node node) throws TransformerException {\r\n\r\n NodeList children = node.getChildNodes();\r\n int index = 0;\r\n int length = children.getLength();\r\n\r\n for (index = 0; index < length; index++) {\r\n Node n = children.item(index);\r\n String nString = nodeToString(n);\r\n\r\n // for(Node n : node.getChildNodes()){\r\n if (n != null) {\r\n if (n.hasChildNodes()) {// edit to remove children of children\r\n removeChildNodes(n);\r\n node.removeChild(n);\r\n } else\r\n node.removeChild(n);\r\n }\r\n }\r\n String nodeString = nodeToString(node);\r\n return node;\r\n }",
"public static DocumentFragment extractChildren(final Node node, final int startChildIndex, final int endChildIndex)\n\t\t\tthrows ArrayIndexOutOfBoundsException, DOMException {\n\t\treturn extractChildren(node, startChildIndex, endChildIndex, true); //extract the childen by removing them\n\t}",
"public Collection<VisualLexiconNode> getChildren() {\n \t\treturn children;\n \t}",
"public Set<VfsFile> getChildren()\n {\n return children;\n }",
"public ArrayList<ExpandableListItems_Child> getChildren()\n {\n return children;\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/* */ }",
"private List getDescendantChanges(TreeTableNode node) {\r\n\t\tList changes = new ArrayList();\r\n\t\t// start with node and recurse over children\r\n\t\t// dont add the top node which has children\r\n\t\tif (node.children.size()>0) {\r\n\t\t\tfor (Iterator iter = node.children.iterator(); iter.hasNext();) {\r\n\t\t\t\tTreeTableNode child = (TreeTableNode) iter.next();\r\n\t\t\t\tchanges.addAll(getDescendantChanges(child));\r\n\t\t\t}\t\t\t\t\r\n\t\t}\r\n\t\telse if (!node.swoopChange.isTopNode) changes.add(node.swoopChange);\r\n\t\treturn changes;\r\n\t}",
"public List<GuiElementBase> getChildren()\n\t\t{ return Collections.unmodifiableList(children); }",
"@Nonnull\r\n List<DataSet> children(@Nonnull DataSet parent) throws IllegalArgumentException, IOException;",
"private Object[] localGetChildren(Object arg0) {\r\n\t\t\tArrayList<Object> returnList = new ArrayList<Object>();\r\n\t\t\tObject[] children = super.getChildren(arg0);\r\n\t\t\tfor (Object child: children) {\r\n\t\t\t\tif (child instanceof IViewSite || \r\n\t\t\t\t\tchild instanceof IWorkspaceRoot || \r\n\t\t\t\t\tchild instanceof IFolder)\r\n\t\t\t\t{\r\n\t\t\t\t\treturnList.add(child);\r\n\t\t\t\t} else if (child instanceof IProject) {\r\n\t\t\t\t\tif (((IProject)child).isOpen()) {\r\n\t\t\t\t\t\treturnList.add(child);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn returnList.toArray(new Object[returnList.size()]);\r\n\t\t}",
"public java.util.List<BinomialTree<KEY, ITEM>> children()\n\t{\n\t\treturn _children;\n\t}",
"public static List<Node> getChildren(Element sourceElement) {\r\n return getChildren(sourceElement, false);\r\n }",
"ArrayList<Expression> getChildren();",
"protected void uncolorChildren(Node node) {\r\n int children = node.getChildren().size();\r\n for (int k = 0; k < children; k++) {\r\n colorObject(\"p\" + node.getChildren().get(k).getId(), edgeColor);\r\n }\r\n }",
"@Override\n public List<String> getChildren(String path) {\n return null;\n }",
"List<Tag<? extends Type>> getChildren();",
"private List<AxiomTreeNode> getChildNodeList(AxiomTreeNode t) {\n\n List<AxiomTreeNode> list = new ArrayList<AxiomTreeNode>();\n\n for (int i = 0; i < t.getChildCount(); i++) {\n\n list.add((AxiomTreeNode) t.getChildAt(i));\n }\n\n return list;\n }",
"public static DocumentFragment extractChildren(final Node node, final boolean remove) throws DOMException {\n\t\treturn extractChildren(node, 0, node.getChildNodes().getLength(), remove); //extract all the children and return the new document fragment \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 String getChildren() {\n\t\treturn children;\n\t}",
"public List<HtmlMap<T>> getChildren()\n\t{\n\t\treturn m_children;\n\t}",
"public SeleniumQueryObject children() {\n\t\treturn ChildrenFunction.children(this, elements);\n\t}",
"@SuppressWarnings(\"unchecked\")\n public Iterator<Post> getChildren() {\n if(this.resource != null) {\n java.util.List<Resource> childrenList = IteratorUtils.toList(this.resource.getChildren().iterator());\n Iterator<Resource> reverseChildren = new ReverseListIterator(childrenList);\n return ResourceUtil.adaptTo(reverseChildren, Post.class);\n } else {\n return null;\n }\n }"
] | [
"0.66303694",
"0.65870506",
"0.6580786",
"0.63890725",
"0.63806295",
"0.6302893",
"0.6259415",
"0.6223173",
"0.6203872",
"0.61760056",
"0.615305",
"0.6139897",
"0.6128649",
"0.6063955",
"0.5983985",
"0.5912987",
"0.59054655",
"0.5869784",
"0.5863784",
"0.5833952",
"0.5829381",
"0.58070385",
"0.5798892",
"0.5783131",
"0.5778372",
"0.57731545",
"0.57687944",
"0.57058334",
"0.5703842",
"0.56985563",
"0.5684168",
"0.5666545",
"0.56345665",
"0.5614449",
"0.55818516",
"0.5575386",
"0.55476403",
"0.5517841",
"0.55071586",
"0.5506907",
"0.5505208",
"0.5477501",
"0.5466026",
"0.54528123",
"0.5449724",
"0.5430703",
"0.5428756",
"0.5419651",
"0.5414513",
"0.54128194",
"0.54040325",
"0.54025054",
"0.539596",
"0.53773344",
"0.53675926",
"0.5357285",
"0.5356875",
"0.5355331",
"0.53547186",
"0.5324397",
"0.5315702",
"0.5297104",
"0.52953917",
"0.52697897",
"0.5245941",
"0.5240938",
"0.52402467",
"0.5235116",
"0.5229964",
"0.5222603",
"0.520326",
"0.51896787",
"0.51786256",
"0.51719946",
"0.5159533",
"0.5138661",
"0.5121789",
"0.5109446",
"0.51056224",
"0.5094526",
"0.5092226",
"0.5091264",
"0.5075935",
"0.50755554",
"0.5071617",
"0.50694495",
"0.50693053",
"0.5068118",
"0.5066356",
"0.50623065",
"0.5062156",
"0.5059785",
"0.50585186",
"0.50538516",
"0.50448376",
"0.5042659",
"0.5040817",
"0.50397336",
"0.5037585",
"0.5037194"
] | 0.7057843 | 0 |
Return a flattened version of the given node if possible, expanding the node to its base comparable children. | private List<SimpleNode> flatten(SimpleNode node, Class<?> rootType) {
if (isFlattenable(node, rootType)) {
List<SimpleNode> children = new ArrayList<>();
for (int i = 0; i < node.jjtGetNumChildren(); i++) {
children.addAll(flatten(node.jjtGetChild(i), rootType));
}
return children;
} else {
return Collections.singletonList(node);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void flatten()\r\n\t\t{\r\n\t\t\tif (_children.size() > 0) \r\n\t\t\t{\r\n\t\t\t\tint i = 0;\r\n\t\t\t\twhile(i < _children.size())\r\n\t\t\t\t{\r\n\t\t\t\t\tExpressionNode subExpr = _children.get(i);\r\n\t\t\t\t\tsubExpr.flatten();\r\n\t\t\t\t\tif (_data.equals(subExpr._data)) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t_children.addAll(subExpr._children);\r\n\t\t\t\t\t\t_children.remove(subExpr);\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}\r\n\t\t}",
"private TreeNode helper2(TreeNode node) {\n // Handle the null scenario\n if (node == null)\n return null;\n\n // For a leaf node, we simply return the node as is.\n if (node.left == null && node.right == null)\n return node;\n\n //Recursively flatten the left subtree\n TreeNode leftTail = this.helper2(node.left);\n\n // Recursively flatten the right subtree\n TreeNode rightTail = this.helper2(node.right);\n\n // If there was a left subtree, we shuffle the connections around,\n // so that there is nothing on the left side anymore.\n if (leftTail != null) {\n leftTail.right = node.right;\n\n node.right = node.left;\n\n node.left = null;\n }\n\n // We need to return the \"rightmost\" node after we are\n // done wiring the new connections.\n return rightTail == null ? leftTail : rightTail;\n }",
"public void flatten();",
"private TreeNode flat(TreeNode cur) {\n if (cur == null) {\n return null;\n }\n TreeNode right = cur.right;\n TreeNode left = cur.left;\n if (left == null && right == null) {\n return cur;\n }\n cur.left = null;\n\n TreeNode rightLast = flat(right);\n TreeNode leftLast = flat(left);\n if (left != null) {\n leftLast.right = right;\n cur.right = left;\n }\n return rightLast == null ? leftLast : rightLast;\n }",
"public Node flatten(Node head) {\n Node p = head;\n while (p != null) {\n if (p.child != null) {\n Node tmp = p.child;\n while (tmp.next != null) {\n tmp = tmp.next;\n }\n Node next = p.next;\n /** add the head of the child linked list to the original. **/\n p.next = p.child;\n p.child.prev = p;\n tmp.next = next;\n if (next != null) {\n next.prev = tmp;\n }\n p.child = null;\n }\n p = p.next;\n }\n return head;\n }",
"public abstract List<Node> expand();",
"public void flatten (){\n // Don't need to do anything\n }",
"public void flatten()\n\t{\n\t}",
"public void flatten (TreeNode root) {\n while (root != null) {\n TreeNode left = root.left;\n if (left != null) {\n while (left.right != null) {\n left = left.right;\n }\n left.right = root.right;\n root.right = root.left;\n root.left = null;\n }\n root = root.right;\n }\n }",
"public void recursiveExpand(StatementParse node, ArrayList<StatementParse> expanded){\n if (node.getName().equals(\"-\")){\n node.getChildren().get(1).changeNegativity();\n }\n for (StatementParse child: node.getChildren()){\n // distribute if the child is negative\n if (child.isNegative()){\n for (StatementParse grandChild: child.getChildren()){\n grandChild.changeNegativity();\n }\n }\n if (this.isMulDiv(child)) {\n StatementParse transformedMulDiv = this.mulDivTransform(child);\n expanded.add(transformedMulDiv);\n } else if (this.isAddSub(child)){\n recursiveExpand(child, expanded);\n } else {\n expanded.add(child);\n }\n }\n }",
"public static Node<Integer> flatten(Node<Integer> root) {\r\n\r\n\t\tNode<Integer> flatten = root;\r\n\t\twhile (root != null) {\r\n\t\t\t// Merge two lists at a time.\r\n\t\t\tflatten = merge(flatten, root.next);\r\n\r\n\t\t\troot = root.next;\r\n\t\t}\r\n\r\n\t\treturn flatten;\r\n\t}",
"public String marshallNode(XsdNode node, Node element) throws IOException {\n\t\tString marshalling = \"\";\n\t\tif (!node.isUsed) {\n\t\t\treturn marshalling;\n\t\t}\n\n\t\tif (selections.contains(node)) {\n\t\t\tif (firstElement)\n\t\t\t\tfirstElement = false;\n\t\t\telse\n\t\t\t\tmarshalling += separator;\n\n\t\t\t\n\t\t\t\n\t\t\tEnumeration children = node.children();\n\t\t\tboolean filtered = false;\n\t\t\twhile (children.hasMoreElements()) {\n\t\t\t\tXsdNode child = (XsdNode) children.nextElement();\n\t\t\t\n\t\t\t\tif (((Annotated) child.getUserObject()).getStructureType() == Structure.ATTRIBUTE) {\n\t\t\t\t\tif (elementFilters.containsKey(child)) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tString value = ((Element) element)\n\t\t\t\t\t\t\t\t\t.getAttributeNode(child.toString())\n\t\t\t\t\t\t\t\t\t.getNodeValue();\n\t\t\t\t\t\t\t/** TODO: done for managing filter */\n\t\t\t\t\t\t\tif (!value.matches((String) elementFilters\n\t\t\t\t\t\t\t\t\t.get(child))) {\n\t\t\t\t\t\t\t\tfiltered = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (NullPointerException e) {\n\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\tif (element != null && filtered == false) {\n\t\t\t\tmarshalling += getElementValue((Element) element);\n\t\t\t}\n\t\t}\n\n\t\tEnumeration children = node.children();\n\t\twhile (children.hasMoreElements()) {\n\t\t\tXsdNode child = (XsdNode) children.nextElement();\n\t\t\tif (child.isUsed) {\n\t\t\t\tswitch (((Annotated) child.getUserObject()).getStructureType()) {\n\t\t\t\tcase Structure.ELEMENT:\n\t\t\t\t\tint cpt = 0;\n\t\t\t\t\t/* create a NodeList with all childs with tagname */\n\t\t\t\t\tif (element != null) {\n\t\t\t\t\t\tNodeList allElements = element.getChildNodes();\n\t\t\t\t\t\tArrayList elements = new ArrayList();\n\t\t\t\t\t\tfor (int i = 0; i < allElements.getLength(); i++) {\n\t\t\t\t\t\t\tif (allElements.item(i).getNodeName().compareTo(\n\t\t\t\t\t\t\t\t\tchild.toString()) == 0) {\n\t\t\t\t\t\t\t\telements.add(allElements.item(i));\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t/* get references */\n\t\t\t\t\t\t\telse if (isXsRefPath(allElements.item(i)\n\t\t\t\t\t\t\t\t\t)) {\n\t\t\t\t\t\t\t\tElement ref = //document.\n\t\t\t\t\t\t\t\tthis.getElementByKeyRef((Element) allElements\n\t\t\t\t\t\t\t\t\t\t\t\t.item(i));\n\t\t\t\t\t\t\t\tif (ref != null\n\t\t\t\t\t\t\t\t\t\t&& ref.getNodeName().compareTo(\n\t\t\t\t\t\t\t\t\t\t\t\tchild.toString()) == 0) {\n\t\t\t\t\t\t\t\t\telements.add(ref);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* get references */\n\t\t\t\t\t\t\telse if (isRefType(allElements.item(i)\n\t\t\t\t\t\t\t\t\t.getNodeName())) {\n\t\t\t\t\t\t\t\tElement ref = //document.\n\t\t\t\t\t\t\t\tgetElementById(((Element) allElements\n\t\t\t\t\t\t\t\t\t\t\t\t.item(i))\n\t\t\t\t\t\t\t\t\t\t\t\t.getAttribute(refAttribute));\n\t\t\t\t\t\t\t\tif (ref != null\n\t\t\t\t\t\t\t\t\t\t&& ref.getNodeName().compareTo(\n\t\t\t\t\t\t\t\t\t\t\t\tchild.toString()) == 0) {\n\t\t\t\t\t\t\t\t\telements.add(ref);\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\twhile (cpt < elements.size()) {\n\t\t\t\t\t\t\tmarshalling += marshallNode(child, (Node) elements\n\t\t\t\t\t\t\t\t\t.get(cpt));\n\t\t\t\t\t\t\tcpt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tint maxCount = getMaxCount(child);\n\t\t\t\t\twhile (cpt < maxCount) {\n\t\t\t\t\t\tmarshalling += marshallNode(child, null);\n\t\t\t\t\t\tcpt++;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase Structure.ATTRIBUTE:\n\t\t\t\t\tif (firstElement)\n\t\t\t\t\t\tfirstElement = false;\n\t\t\t\t\telse\n\t\t\t\t\t\tmarshalling += separator;\n\n\t\t\t\t\tif (element != null) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tmarshalling += ((Element) element)\n\t\t\t\t\t\t\t\t\t.getAttributeNode(child.toString())\n\t\t\t\t\t\t\t\t\t.getNodeValue();\n\t\t\t\t\t\t} catch (NullPointerException ne) {\n\t\t\t\t\t\t\t/* main cause: the cell does not exist */\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t.println(\"[PSI makers: flattener] ERROR: the node is neither an attribute nor an element\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn marshalling;\n\t}",
"private List<SimpleNode> getChildren(SimpleNode node) {\n Class<?> nodeType = node.getClass();\n List<SimpleNode> children = new ArrayList<>();\n for (int i = 0; i < node.jjtGetNumChildren(); i++) {\n children.addAll(flatten(node.jjtGetChild(i), nodeType));\n }\n return children;\n }",
"public ArrayList<TreeNode> flatternTree(TreeNode root){\n ArrayList<TreeNode> queue = new ArrayList<TreeNode>();\n ArrayList<TreeNode> returnList = new ArrayList<TreeNode>();\n // if empty tree\n if (root == null){\n return null;\n }\n // else\n queue.add(root);\n while(!queue.isEmpty()){\n TreeNode obj = queue.get(0);\n returnList.add(obj);\n if (obj.left != null){\n queue.add(obj.left);\n }\n if (obj.right != null){\n queue.add(obj.right);\n }\n queue.remove(0);\n }\n return returnList;\n }",
"public Boolean DeleteAndMerge(Node node) {\n\t\tif (node.getLeftChild() == null) {\n\t\t\tDeleteAllChild(node);\n\t\t\treturn true;\n\t\t}\n\n\t\tif (node.getParent().getLeftChild() == node) {\n\t\t\t// Node tempNode=node.getLeftChild();\n\t\t\tint level = node.getLevel();\n\t\t\tNode pa = node.getParent();\n\t\t\tPreorderLevel(node.getLeftChild());\n\t\t\tnode.getParent().setLeftChild(node.getLeftChild());\n\t\t\tnode.getLeftChild().setParent(node.getParent());\n\t\t\tnode.getLeftChild().setLevel(node.getLevel());\n\t\t\tNode tempNode = node.getRightChild();\n\t\t\tnode = node.getLeftChild();\n\n\t\t\tfor (;;) {\n\t\t\t\tif (node.getRightChild() == null) {\n\t\t\t\t\tnode.setRightChild(tempNode);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tnode = node.getRightChild();\n\n\t\t\t\t\tnode.setLevel(level);\n\t\t\t\t\tnode.setParent(pa);\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\tint level = node.getLevel();\n\t\t\tNode tNode = node.getParent().getLeftChild();\n\n\t\t\tfor (;;) {\n\t\t\t\tif (tNode.getRightChild() == node)\n\t\t\t\t\tbreak;\n\t\t\t\ttNode = tNode.getRightChild();\n\t\t\t}\n\t\t\ttNode.setRightChild(node.getLeftChild());\n\n\t\t\tNode parent = node.getParent();\n\t\t\tNode rNode = node.getRightChild();\n\t\t\tnode = node.getLeftChild();\n\t\t\tPreorderLevel(node);\n\t\t\tfor (;;) {\n\t\t\t\tif (node.getRightChild() == null)\n\t\t\t\t\tbreak;\n\t\t\t\telse {\n\t\t\t\t\tnode.setParent(parent);// 改变子结点的父结点\n\t\t\t\t\t// 修改结点层级\n\t\t\t\t\tif (node.getParent() == null) {\n\t\t\t\t\t\tnode.setLevel(0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnode.setLevel(level);\n\t\t\t\t\t}\n\t\t\t\t\tnode = node.getRightChild();\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tnode.setParent(parent);\n\t\t\tnode.setLevel(level);\n\t\t\tnode.setRightChild(rNode);\n\t\t\t// if (rNode.getParent() == null) {\n\t\t\t// rNode.setLevel(0);\n\t\t\t// } else {\n\t\t\t// rNode.setLevel(rNode.getParent().getLevel() + 1);\n\t\t\t// }\n\t\t}\n\n\t\treturn true;\n\n\t}",
"private Node getRoot( Node node )\n {\n // Base case: we are at root already. Simply return node.\n if (node.parent.equals(node))\n return node;\n // Recursive case: not at root, then find root, linking everything to\n // that root recursively on the way back. (This line does the path\n // compression part of the whole process.) When done, can return parent,\n // since that will now be overall tree root, wherever we started.\n node.parent = getRoot( node.parent );\n return node.parent;\n }",
"private Node linearize2(Node node) {\n\t\tif (node.children.size() == 0) {\n\t\t\treturn node;\n\t\t}\n\n\t\tNode ltail = linearize2(node.children.get(node.children.size() - 1));\n\t\twhile (node.children.size() > 1) {\n\t\t\tNode lr = node.children.remove(node.children.size() - 1);\n\t\t\tNode sl = node.children.get(node.children.size() - 1);\n\t\t\tNode sltail = linearize2(sl);\n\t\t\tsltail.children.add(lr);\n\t\t}\n\t\treturn ltail;\n\t}",
"public static Node leftDescendant(Node node){\n if(node.left!=null){\n return leftDescendant(node.left); // คือการ (findMin) ด้ายซ้าย\n }\n else{\n return node;}\n }",
"void flatten(TreeNode root) {\n TreeNode tail = root;\n while (tail != null) {\n if (tail.left != null) {\n // 1. Find the right-most node of tail's left\n TreeNode rightMost = tail.left;\n while (rightMost.right != null)\n rightMost = rightMost.right;\n\n // 2. Insert [tail.left -> ... -> rightMost] in between `tail` and `tail.right`\n rightMost.right = tail.right;\n tail.right = tail.left;\n\n // 3. Cut off from tail's left\n tail.left = null;\n }\n\n // 4. Move `tail` one step down on the right\n tail = tail.right;\n }\n }",
"public TreeNodeDataType leftDescendant(TreeNodeDataType node) {\r\n\r\n if (node != null) {\r\n\r\n if (node.getLeftChild() == null) {\r\n return node;\r\n } else {\r\n return leftDescendant(node.getLeftChild());\r\n }\r\n\r\n } else {\r\n return null;\r\n }\r\n }",
"public node simplify() {\n node n = null;\n Object[] o = children().toArray();\n int l = o.length;\n if ( l == 1 )\n return (node) o[0];\n\n node orr = (node) o[0];\n node atmost1 = (node) o[0];\n\n for ( int i=1; i<l; i++ ) {\n orr = new or( orr, (node) o[i] );\n atmost1 = new atmostone( atmost1, (node) o[i] );\n }\n node result = (new and(orr, atmost1)).simplify();\n return result;\n }",
"public ArrayList<StatementParse> expandNode(StatementParse node){\n ArrayList<StatementParse> expanded = new ArrayList<>();\n recursiveExpand(node, expanded);\n return expanded;\n\n }",
"private void expandTree() {\n tree.expand();\n }",
"private List<Node> returnAllNodes(Node node) {\n List<Node> listOfNodes = new ArrayList<Node>();\n if (node != null) {\n listOfNodes.add(node);\n for (int i = 0; i < listOfNodes.size(); ++i) {\n Node n = listOfNodes.get(i);\n List<Node> children = n.children;\n if (children != null) {\n for (Node child : children) {\n if (!listOfNodes.contains(child)) {\n listOfNodes.add(child);\n }\n }\n }\n }\n }\n return listOfNodes;\n }",
"Node[] getChildren(Node node);",
"public FlatData flatten() {\n\t\t\treturn new Text(description).flatten();\n\t\t}",
"public abstract Type treeCopyNoTransform();",
"public CondensedDependencyNode condense() {\r\n\t\t\r\n\t\t// IF the whole subtree is made up of same quantifiers return one node with them all\r\n\t\t// included\r\n\t\tif(this.homogenousSubtree()) {\r\n\t\t\tCondensedDependencyNode n = new CondensedDependencyNode(this.type);\r\n\t\t\tfor(DependencyNode d : this.allSubnodes()) {\r\n\t\t\t\tn.variables.add(d.variable);\r\n\t\t\t}\r\n\t\t\treturn n;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tswitch(children.size()) {\r\n\t\t\tcase 0:\r\n\t\t\t\t// Cant be. homogenousSubtree would have returned already\r\n\t\t\t\tassert(false);\r\n\t\t\t\tlogger.fatal(\"Algorithm fail... Contact Author.\");\r\n\t\t\t\tthrow new RuntimeException();\r\n\t\t\tcase 1:\r\n\t\t\t\tCondensedDependencyNode n = new CondensedDependencyNode(this.type);\r\n\t\t\t\tDependencyNode current = this;\r\n\t\t\t\t\r\n\t\t\t\twhile(current.type == this.type && current.children.size() == 1) {\r\n\t\t\t\t\tn.variables.add(current.variable);\r\n\t\t\t\t\t\r\n\t\t\t\t\tcurrent = current.children.get(0);\r\n\t\t\t\t}\r\n\t\t\t\tCondensedDependencyNode cd = current.condense();\r\n\t\t\t\tn.addChild(cd);\r\n\t\t\t\t\r\n\t\t\t\tif(n.type == NodeType.ROOT)\r\n\t\t\t\t\tn.setDepth(0);\r\n\t\t\t\treturn n;\r\n\t\t\tcase 2:\r\n\t\t\t\tCondensedDependencyNode n1 = new CondensedDependencyNode(this.type);\r\n\t\t\t\tn1.variables.add(this.variable);\r\n\t\t\t\t\r\n\t\t\t\tCondensedDependencyNode cdn0 = this.children.get(0).condense();\r\n\t\t\t\tCondensedDependencyNode cdn1 = this.children.get(1).condense();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// NEW\r\n//\t\t\t\tif(cdn0.type == this.type)\r\n//\t\t\t\t\tn1.variables.addAll(cdn0.variables);\r\n//\t\t\t\t\t\r\n//\t\t\t\telse \r\n//\t\t\t\t\tn1.addChild(cdn0);\r\n//\t\t\t\t\r\n//\t\t\t\tif(cdn1.type == this.type)\r\n//\t\t\t\t\tn1.variables.addAll(cdn1.variables);\r\n//\t\t\t\telse \r\n//\t\t\t\t\tn1.addChild(cdn1);\r\n//\t\t\t\t\r\n\t\t\t\t// Original\r\n\t\t\t\t n1.addChild(this.children.get(0).condense());\r\n\t\t\t\t n1.addChild(this.children.get(1).condense());\r\n\t\t\t\treturn n1;\r\n\t\t\tdefault:\r\n\t\t\t\tassert(false);\r\n\t\t\t\tlogger.fatal(\"A DependencyNode must not have more than 3 childnodes.\");\r\n\t\t\t\tthrow new RuntimeException();\r\n\t\t}\r\n\t}",
"private static Node buildSmallerTree() {\n\t\tNode root = createNode(10);\n\t\troot.leftChild = createNode(25);\n\t\troot.rightChild = createNode(25);\n\t\troot.leftChild.leftChild = createNode(13);\n\t\troot.rightChild.rightChild = createNode(7);\n\t\troot.leftChild.rightChild = createNode(27);\n\t\t\n\t\treturn root;\n\t}",
"public TreeNode subtreeWithAllDeepest(TreeNode root) {\n }",
"@Override\n public JsonNode visit(JmesPathFlatten flatten, JsonNode input) throws InvalidTypeException {\n JsonNode flattenResult = flatten.getFlattenExpr().accept(this, input);\n if (flattenResult.isArray()) {\n Iterator<JsonNode> elements = flattenResult.elements();\n ArrayNode flattenedArray = ObjectMapperSingleton.getObjectMapper().createArrayNode();\n while (elements.hasNext()) {\n JsonNode element = elements.next();\n if (element != null) {\n if (element.isArray()) {\n Iterator<JsonNode> inner = element.iterator();\n while (inner.hasNext()) {\n JsonNode innerElement = inner.next();\n if (innerElement != null) {\n flattenedArray.add(innerElement);\n }\n }\n } else {\n flattenedArray.add(element);\n }\n }\n }\n return flattenedArray;\n }\n\n return NullNode.getInstance();\n }",
"default void flatten() {\n\t\tFieldGraph<F> flatGraph = FieldGraph.of(getFields());\n\t\tC flatClone = cloneFlat();\t// have to clone, because pull doesn't change value if pulling from self\n\t\tfor (F field : getFields())\n\t\t\tpull(field, flatClone, flatGraph);\n\t}",
"@SuppressWarnings({\"unchecked\", \"cast\"})\n public TypeVariable fullCopy() {\n TypeVariable tree = (TypeVariable) copy();\n if (children != null) {\n for (int i = 0; i < children.length; ++i) {\n ASTNode child = (ASTNode) children[i];\n if(child != null) {\n child = child.fullCopy();\n tree.setChild(child, i);\n }\n }\n }\n return tree;\n }",
"@SuppressWarnings(\"unchecked\")\n\tprivate void build(Node<VirtualDataSet> node) {\n\n\t\tif (node == null)\n\t\t\tthrow new NullPointerException(\"Cannot built a decision (sub)tree for a null node.\");\n\n\t\tVirtualDataSet set = node.data;\n\n\t\tif (set == null || set.getNumberOfDatapoints() == 0 || set.getNumberOfAttributes() == 0)\n\t\t\tthrow new IllegalStateException(\"The dataset is in an invalid state!\");\n\n\t\tif (set.getNumberOfAttributes() == 1) // We have only the class attribute left\n\t\t\treturn;\n\n\t\tif (set.getAttribute(set.getNumberOfAttributes() - 1).getValues().length == 1) // No uncertainty left\n\t\t\treturn;\n\n\t\tboolean needsSplit = false;\n\n\t\tfor (int i = 0; i < set.getNumberOfAttributes() - 1; i++) {\n\t\t\tif (set.getAttribute(i).getValues().length < 2) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tneedsSplit = true;\n\t\t}\n\n\t\tif (!needsSplit) // split would be futile for all remaining attributes\n\t\t\treturn;\n\n\t\tGainInfoItem[] gains = InformationGainCalculator.calculateAndSortInformationGains(set);\n\t\t\n\t\tif (gains[0].getGainValue() == 0.0) // No split when there is no gain\n\t\t\treturn; \n\n\t\tAttribute bestAttribute = set.getAttribute(gains[0].getAttributeName());\n\n\t\tif (bestAttribute.getType() == AttributeType.NOMINAL) {\n\t\t\tVirtualDataSet[] partitions = set\n\t\t\t\t\t.partitionByNominallAttribute(set.getAttributeIndex(bestAttribute.getName()));\n\t\t\tnode.children = (Node<VirtualDataSet>[]) new Node[partitions.length];\n\n\t\t\tfor (int i = 0; i < node.children.length; i++) {\n\t\t\t\tnode.children[i] = new Node<VirtualDataSet>(partitions[i]);\n\t\t\t}\n\n\t\t\tfor (int i = 0; i < node.children.length; i++) {\n\t\t\t\tbuild(node.children[i]);\n\t\t\t}\n\n\t\t} else {\n\t\t\tint attributeIndex = node.data.getAttributeIndex(bestAttribute.getName());\n\n\t\t\tString[] values = bestAttribute.getValues();\n\n\t\t\tint valueIndex = -1;\n\n\t\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\t\tif (values[i].equals(gains[0].getSplitAt())) {\n\t\t\t\t\tvalueIndex = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (valueIndex == -1) {\n\t\t\t\tSystem.out.println(\"Houston, we have a problem!\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tVirtualDataSet[] partitions = set.partitionByNumericAttribute(attributeIndex, valueIndex);\n\n\t\t\tnode.children = (Node<VirtualDataSet>[]) new Node[partitions.length];\n\n\t\t\tfor (int i = 0; i < node.children.length; i++) {\n\t\t\t\tnode.children[i] = new Node<VirtualDataSet>(partitions[i]);\n\t\t\t}\n\n\t\t\tfor (int i = 0; i < node.children.length; i++) {\n\t\t\t\tbuild(node.children[i]);\n\t\t\t}\n\t\t}\n\t}",
"public TreeNode resolve(TreeNode root, TreeNode node){\n if (root == null) {\n return node;\n }\n else if(root.val > node.val){ // no replace, keep going down\n root.right = resolve(root.right, node);\n return root;\n }\n else { // new biggest, old root becomes left child\n node.left = root;\n root = null;\n return node;\n }\n }",
"private Node getSuccessorBasedOnMin(Node node) {\n Node successor = localMinAndItsParent(node)[0];\n Node successorParent = localMinAndItsParent(node)[1];\n if (successor != node.rightChild) {\n successorParent.leftChild = successor.rightChild;\n successor.rightChild = node.rightChild;\n }\n return successor;\n }",
"public static Node rightAncestor(Node node) {\n\n\n if(node.parent!=null){\n if(node.key>node.parent.key){ // หา parent ตัวแรกี่มีคค่ามากกว่า\n return rightAncestor(node.parent);\n }\n else {return node.parent;}\n }else{return null;}//////\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 }",
"public boolean expand(DefaultMutableTreeNode parent) {\r\n\t\tDefaultMutableTreeNode flagNode = (DefaultMutableTreeNode) parent.getFirstChild();\r\n\t\tif (flagNode == null) // No flag\r\n\t\t\treturn false;\r\n\t\tObject obj = flagNode.getUserObject();\r\n\t\tif (!(obj instanceof Boolean))\r\n\t\t\treturn false; // Already expanded\r\n\r\n\t\tparent.removeAllChildren(); // Remove FlagNode\r\n\r\n\t\tFile[] dirs = getChildren();\r\n\t\tif (dirs == null)\r\n\t\t\treturn true;\r\n\r\n\t\t// Create a sorted list of domain-objects\r\n\t\t// ArrayList sortedChildDomainObjects = new ArrayList();\r\n\t\tArrayList<DirectoryObject> sortedChildDomainObjects = new ArrayList<DirectoryObject>();\r\n\r\n\t\tfor (File dir : dirs) {\r\n\t\t\tDirectoryObject newNode = new DirectoryObject(dir);\r\n\t\t\tboolean isAdded = false;\r\n\t\t\tfor (int i = 0; i < sortedChildDomainObjects.size(); i++) {\r\n\t\t\t\tDirectoryObject nd = (DirectoryObject) sortedChildDomainObjects.get(i);\r\n\t\t\t\tif (newNode.compareTo(nd) < 0) {\r\n\t\t\t\t\tsortedChildDomainObjects.add(i, newNode);\r\n\t\t\t\t\tisAdded = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!isAdded)\r\n\t\t\t\tsortedChildDomainObjects.add(newNode);\r\n\t\t}\r\n\r\n\t\t// Add children nodes under parent in the tree\r\n\t\tfor (Object aChild : sortedChildDomainObjects) {\r\n\t\t\tDirectoryObject nd = (DirectoryObject) aChild;\r\n\t\t\tDefaultMutableTreeNode node = new DefaultMutableTreeNode(nd);\r\n\t\t\tparent.add(node);\r\n\r\n\t\t\tif (nd.hasChildren)\r\n\t\t\t\tnode.add(new DefaultMutableTreeNode(true));\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}",
"public TreeNode invertBinaryTreeIterative(TreeNode node) {\n if (node == null) return node;\n Queue<TreeNode> queue = new LinkedList<>();\n queue.add(node);\n\n while (!queue.isEmpty()) {\n TreeNode temp = node.left;\n node.left = node.right;\n node.right = temp;\n if (node.left != null) queue.add(node.left);\n if (node.right != null) queue.add(node.right);\n }\n\n return node;\n }",
"List<Node<T>> children();",
"Collection<Element> getElementTreeFromPlainList() {\n Map<String, Element> values = new HashMap<String, Element>();\n for (String[] s : data) {\n values.put(s[0], new Element(s[2], s[1]));\n }\n\n // creates a result list\n Collection<Element> result = new ArrayList<Element>();\n\n // for each element in the result list that has a parent, put it into it\n // otherwise it is added to the result list\n for (Element e : values.values()) {\n if (e.parent != null) {\n values.get(e.parent).getChildren().add(e);\n } else {\n result.add(e);\n }\n }\n\n return result;\n }",
"Collection<Element> getElementTreeFromPlainList() {\n Map<String, Element> values = new HashMap<String, Element>();\n for (String[] s : data) {\n values.put(s[0], new Element(s[2], s[1]));\n }\n\n // creates a result list\n Collection<Element> result = new ArrayList<Element>();\n\n // for each element in the result list that has a parent, put it into it\n // otherwise it is added to the result list\n for (Element e : values.values()) {\n if (e.parent != null) {\n values.get(e.parent).getChildren().add(e);\n } else {\n result.add(e);\n }\n }\n\n return result;\n }",
"static String serializeNode(Node node, boolean childrenOnly)\n {\n\t short nodeType = node.getNodeType();\n\n\t switch (nodeType)\n\t {\n\t\t case Node.ATTRIBUTE_NODE:\n\t\t case Node.CDATA_SECTION_NODE:\n\t\t case Node.TEXT_NODE:\n\t\t\tif (childrenOnly)\n\t\t\t{\n\t\t\t return null;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t return node.getNodeValue();\n\t\t\t}\n\n\t\t case Node.COMMENT_NODE:\n\t\t case Node.DOCUMENT_TYPE_NODE:\n\t\t case Node.ENTITY_NODE:\n\t\t case Node.NOTATION_NODE:\n\t\t case Node.PROCESSING_INSTRUCTION_NODE:\n\t\t\t// These nodes are not part of the \"data\" of a document. Therefore\n\t\t\t// return null;\n\t\t\treturn null;\n\n\t\t case Node.ELEMENT_NODE:\n\t\t\tbreak;\n\n\t\t case Node.DOCUMENT_FRAGMENT_NODE:\n\t\t\tchildrenOnly = true;\n\t\t\tbreak;\n\n\t\t case Node.DOCUMENT_NODE:\n\t\t\tnode = ((Document)node).getDocumentElement();\n\t\t\tchildrenOnly = false;\n\t\t\tbreak;\n\t }\n\n\t // Build a string from element, text, and CDATA child nodes. Elements\n\t // are represented by tags; note that there is a problem here, as it is\n\t // impossible to tell a real element from a tag constructed with lt/gt\n\t // entities or CDATA.\n\n\t StringBuffer value = new StringBuffer();\n\t Node current, next;\n\n\t if (childrenOnly)\n\t {\n\t\t current = node.getFirstChild();\n\t }\n\t else\n\t {\n\t\t current = node;\n\t }\n\n\t while (current != null)\n\t {\n\t\t // Append the value of the node (if any) to the complete value. We\n\t\t // ignore comments and PIs. We \"expand\" entity references by simply\n\t\t // traversing their children.\n\n\t\t nodeType = current.getNodeType();\n\t\t if (nodeType == Node.ELEMENT_NODE)\n\t\t {\n\t\t\tvalue.append(LT);\n\t\t\tvalue.append(current.getNodeName());\n\t\t\tvalue.append(serializeAttrs(current.getAttributes()));\n\t\t\tvalue.append(GT);\n\t\t }\n\t\t else if ((nodeType == Node.TEXT_NODE) ||\n\t\t\t\t (nodeType == Node.CDATA_SECTION_NODE))\n\t\t {\n\t\t\tvalue.append(current.getNodeValue());\n\t\t }\n\n\t\t // Get the first child of the node.\n\n\t\t next = current.getFirstChild();\n\t\t if (next != null)\n\t\t {\n\t\t\tcurrent = next;\n\t\t\tcontinue;\n\t\t }\n\n\t\t // If the node has no children, then get the sibling of the node.\n\n\t\t while (current != null)\n\t\t {\n\t\t\t// Close the current node.\n\t\t\tif (current.getNodeType() == Node.ELEMENT_NODE)\n\t\t\t{\n\t\t\t value.append(LT);\n\t\t\t value.append(SLASH);\n\t\t\t value.append(current.getNodeName());\n\t\t\t value.append(GT);\n\t\t\t}\n\n\t\t\t// Get the next sibling. If there is a next sibling, then go to\n\t\t\t// the outer while loop to process it and get its children. If\n\t\t\t// there is no next sibling, then go back up a level. If we get\n\t\t\t// back to the original node, stop processing.\n\n\t\t\tnext = current.getNextSibling();\n\t\t\tif (next != null)\n\t\t\t{\n\t\t\t current = next;\n\t\t\t break;\n\t\t\t}\n\n\t\t\tcurrent = current.getParentNode();\n\t\t\tif (current == node)\n\t\t\t{\n\t\t\t if (!childrenOnly &&\n\t\t\t\t (current.getNodeType() == Node.ELEMENT_NODE))\n\t\t\t {\n\t\t\t\t value.append(LT);\n\t\t\t\t value.append(SLASH);\n\t\t\t\t value.append(current.getNodeName());\n\t\t\t\t value.append(GT);\n\t\t\t }\n\t\t\t current = null;\n\t\t\t}\n\t\t }\n\t }\n\t return value.toString();\n }",
"private Node serchNode(E input, Node current) {\n Node node = null;\n if (current.value.equals(input)) {\n node = current;\n } else {\n List<Node> children = current.children;\n for (Node child : children) {\n node = serchNode(input, child);\n if (node != null) {\n break;\n }\n }\n }\n return node;\n }",
"private List<Node<E>> getChildrenForNode(Node<E> node) {\n ArrayList<Node<E>> list = new ArrayList<>();\n for (Node<E> child : node.getChilden()) {\n list.add(child);\n }\n return list;\n }",
"boolean getRecursiveNull();",
"@Override\n\tpublic void select(Node node) {\n\t\tif (node.getArtifact() == null || !node.getArtifact().isOrdered() || !node.getArtifact().isSequenced() || node.getArtifact().getSequenceGraph() == null)\n\t\t\treturn;\n\n\t\tList<Node> orderedChildren = new ArrayList<Node>();\n\n\t\tthis.traverseSequenceGraph(node.getArtifact().getSequenceGraph().getRoot(), node.getChildren(), orderedChildren);\n\n\t\tnode.getChildren().clear();\n\t\tnode.getChildren().addAll(orderedChildren);\n\t}",
"public void merge(NODE node) {\n root = root == null ? node : root.merge(node);\n }",
"public abstract Type treeCopy();",
"private Node minNode(Node node) {\n Node updt = node;\n // Finding the leftmost leaf\n while (updt.left != null) {\n updt = updt.left;\n }\n return updt;\n }",
"public Call treeCopyNoTransform() {\n Call tree = (Call) copy();\n if (children != null) {\n for (int i = 0; i < children.length; ++i) {\n ASTNode child = (ASTNode) children[i];\n if (child != null) {\n child = child.treeCopyNoTransform();\n tree.setChild(child, i);\n }\n }\n }\n return tree;\n }",
"public Node findSet(Node node ){\n Node parent = node.parent;\n //it means no one is parent\n if( parent == node ){\n return parent;\n }\n //do compression\n node.parent = findSet( parent );\n return node.parent;\n }",
"private static ArrayList<Species> getAllDescendantSpeciesHelper(PhyloTreeNode node,java.util.ArrayList<Species> descendants) {\n if(node == null)\n return descendants;\n if(node.isLeaf()) {\n descendants.add(node.getSpecies());\n return descendants;\n }\n else{\n if(node.getLeftChild() != null) {\n descendants = getAllDescendantSpeciesHelper(node.getLeftChild(), descendants);\n }\n if(node.getRightChild() != null) {\n descendants = getAllDescendantSpeciesHelper(node.getRightChild(), descendants);\n }\n }\n return descendants;\n }",
"private String toStringHelper(Node<T> node, int curDepth) {\n if (node.data != null) {\n return node.data.toString();\n }\n if (node.children == null) {\n return \"_\";\n }\n\n StringBuilder outString = new StringBuilder();\n for (int i = 0; i < branchingFactor; i++) {\n if (node.get(i) == null) {\n outString.append(\"_\");\n //break;\n } else {\n if (curDepth == 0) {\n outString.append(node.get(i).toString());\n\n } else {\n outString.append(toStringHelper(node.get(i), curDepth - 1));\n }\n }\n\n if (i + 1 != branchingFactor) {\n outString.append(\", \");\n }\n }\n return \"(\" + outString + \")\";\n }",
"@VisibleForTesting\n List<ExecNode<?>> calculatePipelinedAncestors(ExecNode<?> node) {\n List<ExecNode<?>> ret = new ArrayList<>();\n AbstractExecNodeExactlyOnceVisitor ancestorVisitor =\n new AbstractExecNodeExactlyOnceVisitor() {\n @Override\n protected void visitNode(ExecNode<?> node) {\n boolean hasAncestor = false;\n\n if (!boundaries.contains(node)) {\n List<InputProperty> inputProperties = node.getInputProperties();\n for (int i = 0; i < inputProperties.size(); i++) {\n // we only go through PIPELINED edges\n if (inputProperties\n .get(i)\n .getDamBehavior()\n .stricterOrEqual(safeDamBehavior)) {\n continue;\n }\n hasAncestor = true;\n node.getInputEdges().get(i).getSource().accept(this);\n }\n }\n\n if (!hasAncestor) {\n ret.add(node);\n }\n }\n };\n node.accept(ancestorVisitor);\n return ret;\n }",
"private MutableTreeNode convertSubTree(\n MutableTreeNode newCurrentSubTreeRootNode,\n TreeNode oldCurrentSubTreeRootNode) {\n // if this thing has no children\n if (oldCurrentSubTreeRootNode.getChildCount() == 0) {\n return convertTreeNode(oldCurrentSubTreeRootNode);\n }\n // if there are children, then collect all the children and convert\n // each subtree\n else {\n // if the node passed in is null, it means\n // that we are starting off at the root.\n // In that case, create a new convertedTreeNode\n if (newCurrentSubTreeRootNode == null) {\n newCurrentSubTreeRootNode = convertTreeNode(oldCurrentSubTreeRootNode);\n }\n // if the node passed in is not null, it means that it is\n // a converted version of the root of the subtree (the converted\n // root node of the current subtree.\n // what we need to do now is:\n // get the children of the current subtree root\n // convert each subtree of which the children are roots\n // return the current converted rootnode.\n \n // get the number of children\n int numChildren = oldCurrentSubTreeRootNode.getChildCount();\n for (int i = 0; i < numChildren; ++i) {\n // take each child\n TreeNode oldChildTreeNode = oldCurrentSubTreeRootNode.getChild(i) ;\n // convert the child to the new treenode\n MutableTreeNode newChildTreeNode = convertTreeNode(oldChildTreeNode) ;\n // convert the subtree of the child and add it to the current root\n newCurrentSubTreeRootNode.insert(convertSubTree(newChildTreeNode, oldChildTreeNode), i) ;\n }\n // this will be the root after everything is done.\n return newCurrentSubTreeRootNode ;\n }\n }",
"public RegexNode ReduceConcatenation()\n\t{\n\t\t// Eliminate empties and concat adjacent strings/chars\n\n\t\tboolean wasLastString;\n\t\tRegexOptions optionsLast;\n\t\tRegexOptions optionsAt;\n\t\tint i;\n\t\tint j;\n\n\t\tif (_children == null)\n\t\t{\n\t\t\treturn new RegexNode(RegexNode.Empty, _options);\n\t\t}\n\n\t\twasLastString = false;\n\t\toptionsLast = RegexOptions.forValue(0);\n\n\t\tfor (i = 0, j = 0; i < _children.size(); i++, j++)\n\t\t{\n\t\t\tRegexNode at;\n\t\t\tRegexNode prev;\n\n\t\t\tat = _children.get(i);\n\n\t\t\tif (j < i)\n\t\t\t{\n\t\t\t\t_children.set(j, at);\n\t\t\t}\n\n\t\t\tif (at._type == RegexNode.Concatenate && ((at._options.getValue() & RegexOptions.RightToLeft.getValue()) == (_options.getValue() & RegexOptions.RightToLeft.getValue())))\n\t\t\t{\n\t\t\t\tfor (int k = 0; k < at._children.size(); k++)\n\t\t\t\t{\n\t\t\t\t\tat._children.get(k)._next = this;\n\t\t\t\t}\n\n\t\t\t\t//_children.InsertRange(i + 1, at._children);\n\t\t\t\t_children.addAll(i + 1 , at._children);\n\t\t\t\tj--;\n\t\t\t}\n\t\t\telse if (at._type == RegexNode.Multi || at._type == RegexNode.One)\n\t\t\t{\n\t\t\t\t// Cannot merge strings if L or I options differ\n\t\t\t\toptionsAt = RegexOptions.forValue(at._options.getValue() & (RegexOptions.RightToLeft.getValue() | RegexOptions.IgnoreCase.getValue()));\n\n\t\t\t\tif (!wasLastString || optionsLast != optionsAt)\n\t\t\t\t{\n\t\t\t\t\twasLastString = true;\n\t\t\t\t\toptionsLast = optionsAt;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tprev = _children.get(--j);\n\n\t\t\t\tif (prev._type == RegexNode.One)\n\t\t\t\t{\n\t\t\t\t\tprev._type = RegexNode.Multi;\n\t\t\t\t\tprev._str = String.valueOf(prev._ch);\n\t\t\t\t}\n\n\t\t\t\tif ((optionsAt.getValue() & RegexOptions.RightToLeft.getValue()) == 0)\n\t\t\t\t{\n\t\t\t\t\tif (at._type == RegexNode.One)\n\t\t\t\t\t{\n\t\t\t\t\t\tprev._str += (new Character(at._ch)).toString();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tprev._str += at._str;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (at._type == RegexNode.One)\n\t\t\t\t\t{\n\t\t\t\t\t\tprev._str = (new Character(at._ch)).toString() + prev._str;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tprev._str = at._str + prev._str;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse if (at._type == RegexNode.Empty)\n\t\t\t{\n\t\t\t\tj--;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\twasLastString = false;\n\t\t\t}\n\t\t}\n\n\t\tif (j < i)\n\t\t{\n\t\t\t//_children.removeRange(j, i - j + j);\n\t\t\tArrayExt.removeRange(_children, j, i - j + j);\n\t\t}\n\n\t\treturn StripEnation(RegexNode.Empty);\n\t}",
"private Node merge(Node r) {\r\n if (r.op() == Empty) return r;\r\n assert(r.op() == List);\r\n if (r.left().op() == Rule) { merge(r.right()); return r; }\r\n Node n = r.left();\r\n assert(n.op() == List);\r\n r.left(n.left());\r\n if (n.right().op() == Empty) return r;\r\n n.left(n.right());\r\n n.right(r.right());\r\n r.right(n);\r\n merge(r);\r\n return r;\r\n }",
"public abstract boolean \tgetNodeExpanded(int nodeIndex);",
"public static Node findMin(Node node){\n if(node.left!=null){\n return findMin(node.left); // recursive left-subtree จนตกเกือบ null แล้ว return node นั้น\n }\n else{\n return node;}\n }",
"static void flatten(Value value, Collection<Value> result) {\r\n if (value instanceof ContainerValue) {\r\n ContainerValue cont = (ContainerValue) value;\r\n for (int i = 0, size = cont.getElementSize(); i < size; i++) {\r\n flatten(cont.getElement(i), result);\r\n } \r\n } else {\r\n result.add(value);\r\n }\r\n }",
"public TreeNode rewriteTreeNode(TreeNode node) {\n if (node instanceof Group) {\n BGP theBGP = new BGP(new ArrayList<TriplePatternNode>());\n Group g = (Group) node;\n ArrayList<GraphPattern> toAdd = new ArrayList<GraphPattern>(), toRemove = new ArrayList<GraphPattern>();\n\n for (GraphPattern pattern : g.getPatterns()) {\n if (pattern instanceof BGP || pattern instanceof Group) {\n if (conjoinGraphPattern(theBGP, g, pattern, toAdd))\n toRemove.add(pattern);\n }\n }\n\n for (GraphPattern gp : toRemove)\n g.removeGraphPattern(gp);\n for (GraphPattern gp : toAdd)\n g.addGraphPattern(gp);\n\n // we used to only add a BGP if it was non-empty\n // the special case of empty groups made backends more difficult\n // to implement in some cases, so now we ensure a single BGP for\n // every group, even if it is empty\n g.addGraphPattern(theBGP);\n }\n return node;\n }",
"public final AstValidator.flatten_clause_return flatten_clause() throws RecognitionException {\n AstValidator.flatten_clause_return retval = new AstValidator.flatten_clause_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n CommonTree FLATTEN166=null;\n AstValidator.expr_return expr167 =null;\n\n\n CommonTree FLATTEN166_tree=null;\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:377:16: ( ^( FLATTEN expr ) )\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:377:18: ^( FLATTEN expr )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n FLATTEN166=(CommonTree)match(input,FLATTEN,FOLLOW_FLATTEN_in_flatten_clause1651); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n FLATTEN166_tree = (CommonTree)adaptor.dupNode(FLATTEN166);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(FLATTEN166_tree, root_1);\n }\n\n\n match(input, Token.DOWN, null); if (state.failed) return retval;\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_expr_in_flatten_clause1653);\n expr167=expr();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, expr167.getTree());\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }",
"public static Node treeToList(Node root) {\r\n // base case: empty tree -> empty list\r\n if (root == null)\r\n return (null);\r\n\r\n // Recursively do the subtrees (leap of faith!)\r\n Node aList = treeToList(root.left);\r\n Node bList = treeToList(root.right);\r\n\r\n // Make the single root node into a list length-1\r\n // in preparation for the appending\r\n root.left = root;\r\n root.right = root;\r\n\r\n // At this point we have three lists, and it's\r\n // just a matter of appending them together\r\n // in the right order (aList, root, bList)\r\n aList = append(aList, root);\r\n aList = append(aList, bList);\r\n\r\n return (aList);\r\n }",
"public T smallest(Node node) {\n while (node.left != null) {\n node = node.left;\n }\n return node.element;\n }",
"public static Stream<Node> childNodesOf(@Nonnull final Node node) {\n\t\treturn streamOf(node.getChildNodes());\n\t}",
"public abstract List<Node> getChildNodes();",
"private Node min(Node node){\n if(node == null)\n return null;\n else if(node.left == null)\n return node;\n\n //walk left nodes\n return min(node.left);\n }",
"public Node<T> extractMin() {\n Node<T> z = min;\n if (z != null) {\n if (z.child != null) {\n Node<T> leftChild = z.child.leftSibling;\n Node<T> rightChild = z.child;\n z.child.parent = null;\n while (leftChild != rightChild) {\n leftChild.parent = null;\n leftChild = leftChild.leftSibling;\n }\n leftChild = leftChild.rightSibling;\n\n // add child to the root list\n Node<T> tmp = z.rightSibling;\n z.rightSibling = leftChild;\n leftChild.leftSibling = z;\n tmp.leftSibling = rightChild;\n rightChild.rightSibling = tmp;\n }\n\n // remove z from the root list\n z.rightSibling.leftSibling = z.leftSibling;\n z.leftSibling.rightSibling = z.rightSibling;\n\n if (z == z.rightSibling) {\n min = null;\n } else {\n min = z.rightSibling;\n consolidate();\n }\n\n size--;\n }\n return z;\n }",
"public static void mirror(Node node){\r\n //Traverse to the end of the tree first\r\n for(Node child : node.children){\r\n mirror(child);\r\n }\r\n \r\n //Now reverse the children of parent node\r\n int left = 0;\r\n int right = node.children.size() - 1;\r\n \r\n while(left < right){\r\n Node temp = node.children.get(left);\r\n node.children.set(left, node.children.get(right));\r\n node.children.set(right, temp);\r\n \r\n left++; right--;\r\n }\r\n }",
"public Object[] getFilteredSuccessorNodes (Object node) throws InvalidComponentException;",
"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}",
"@Override\n\tpublic Object visit(SimpleNode node, Object data) {\n\t\treturn node.childrenAccept(this, data);\n\t}",
"private Node removeMin(Node node){\n if(node == null)\n return null;\n else if(node.left == null) {//use right child to replace this node (min value node)\n if(node.count!=0){ //multiple value in same node\n node.count--;\n return node;\n }\n else{\n decDepth(node.right); //maintain depth when chain in right tree\n return node.right;\n }\n }\n\n //walk through left branch\n node.left = removeMin(node.left);\n if(node!=null) node.size--; // the min value must be removed\n return node;\n }",
"public String getTitle(XsdNode node) {\n\t\tString out = \"\";\n\n\t\t/** TODO: new */\n\t\tgetMaxCount(node);\n\n\t\tif (!node.isUsed) {\n\t\t\treturn out;\n\t\t}\n\n\t\tif (selections.contains(node)) {\n\t\t\tif (firstElement)\n\t\t\t\tfirstElement = false;\n\t\t\telse\n\t\t\t\tout += separator;\n\t\t\tout += node.getName() + nextNumber(node);\n\t\t}\n\n\t\tEnumeration children = node.children();\n\t\twhile (children.hasMoreElements()) {\n\t\t\tXsdNode child = (XsdNode) children.nextElement();\n\n\t\t\tif (child.isUsed) {\n\t\t\t\tswitch (((Annotated) child.getUserObject()).getStructureType()) {\n\t\t\t\tcase Structure.ELEMENT:\n\t\t\t\t\tint cpt = 0;\n\t\t\t\t\t/* create a NodeList with all childs with tagname */\n\t\t\t\t\tint maxCount = getMaxCount(child);\n\t\t\t\t\twhile (cpt < maxCount) {\n\t\t\t\t\t\tout += getTitle(child);\n\t\t\t\t\t\tcpt++;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase Structure.ATTRIBUTE:\n\t\t\t\t\tif (firstElement)\n\t\t\t\t\t\tfirstElement = false;\n\t\t\t\t\telse\n\t\t\t\t\t\tout += separator;\n\t\t\t\t\tout += child.getName() + nextNumber(child);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t.println(\"[PSI makers: flattener] ERROR: the node is neither an attribute nor an element\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn out;\n\t}",
"Node convertList2Binary(Node node) {\n\n\t\tQueue<Node> q = new LinkedList<Node>();\n\n\t\t// Base Case\n\t\tif (head == null) {\n\t\t\tnode = null;\n\t\t\treturn null;\n\t\t}\n\n\t\t// The first node is always the root node, and\n\t\t// add it to the queue\n\t\tnode = new Node(head.data);\n\t\tq.add(node);\n\n\t\t// advance the pointer to the next node\n\t\thead = head.next;\n\n\t\t// until the end of linked list is reached, do the\n\t\t// following steps\n\t\twhile (head != null) {\n\t\t\t\n\t\t\t// take the parent node from the q and\n\t\t\t// remove it from q\n\t\t\tNode parent = q.peek();\n\t\t\tNode pp = q.poll();\n\n\t\t\t// take next two nodes from the linked list.\n\t\t\t// We will add them as children of the current\n\t\t\t// parent node in step 2.b. Push them into the\n\t\t\t// queue so that they will be parents to the\n\t\t\t// future nodes\n\t\t\t\n\t\t\tNode leftChild = null, rightChild = null;\n\t\t\tleftChild = new Node(head.data);\n\t\t\tq.add(leftChild);\n\t\t\thead = head.next;\n\t\t\tif (head != null) {\n\t\t\t\trightChild = new Node(head.data);\n\t\t\t\tq.add(rightChild);\n\t\t\t\thead = head.next;\n\t\t\t}\n\n\t\t\t// assign the left and right children of\n\t\t\t// parent\n\t\t\tparent.left = leftChild;\n\t\t\tparent.right = rightChild;\n\t\t}\n\n\t\treturn node;\n\t}",
"void getInorderIteratively(Node node) {\n Stack<Node> stack = new Stack<Tree.Node>();\n if (node == null)\n return;\n Node current = node;\n while (!stack.isEmpty() || current != null) {\n // While the sub tree is not empty keep on adding them\n while (current != null) {\n stack.push(current);\n current = current.left;\n }\n // No more left sub tree\n Node temp = stack.pop();\n System.out.println(temp.data);\n // We now have to move to the right sub tree of the just popped out node\n current = temp.right;\n }\n\n }",
"public void flatten () {\n String tags2 = tags.toString();\n tags.delete (0, tags.length());\n int e2 = 0;\n int s2 = indexOfNextWordStart (tags2, e2, slashToSeparate);\n while (s2 < tags2.length()) {\n e2 = indexOfNextSeparator (tags2, s2, true, true, slashToSeparate);\n merge (tags2.substring (s2, e2));\n s2 = indexOfNextWordStart (tags2, e2, slashToSeparate);\n }\n }",
"@Nullable\n public static String toString(final Node node) {\n\n return toString( node, true );\n }",
"public Node getSuccessorNode(Node node) {\n Node successor = null;\n Node successorParent = null;\n Node currentNode = node.getRightChild();\n while (currentNode != null) {\n successorParent = successor;\n successor = currentNode;\n currentNode = currentNode.getLeftChild();\n }\n if (successor != node.getRightChild()) {\n successorParent.setLeftChild(successor.getRightChild());\n successor.setRightChild(node.getRightChild());\n }\n return successor;\n }",
"void expandChilds() {\n\t\t\tenumAndExpand(this.parentItem);\n\t\t}",
"public static void mirror(Node node){\n Queue<Node> q= new ArrayDeque<>();\n q.add(node);\n while(q.size()>0) {\n\n int qlen=q.size();\n while(qlen>0) {\n Node nn=q.remove();\n int n =nn.children.size();\n for (int i = 0; i < n; i++) {\n q.add(nn.children.get(i));\n }\n\n for (int i = 0; i < n / 2; i++) {\n Node temp = nn.children.get(i);\n nn.children.set(i, nn.children.get(n - 1 - i));\n nn.children.set(n - 1 - i, temp);\n }\n qlen--;\n }\n }\n\n }",
"private void copy(Node node){\n parent_ = node.parent_;\n size_ = node.size_;\n for(int i = 0; i < size_; i++)\n children_[i] = node.children_[i];\n }",
"public static String innerXml(final Node node) {\n final DOMImplementationLS lsImpl = (DOMImplementationLS) node.getOwnerDocument()\n .getImplementation().getFeature(\"LS\", \"3.0\");\n final LSSerializer lsSerializer = lsImpl.createLSSerializer();\n final DOMConfiguration c = lsSerializer.getDomConfig();\n c.setParameter(\"format-pretty-print\", false);\n c.setParameter(\"xml-declaration\", false);\n\n final StringBuilder sb = new StringBuilder();\n for (Element childElement : getChildElements(node)) {\n sb.append(lsSerializer.writeToString(childElement));\n }\n return sb.toString();\n }",
"public void deleteNode(TreeNode node) {\n if (node != null) {\n /* One child situation */\n if (node.getLeft() == null) {\n transplantNode(node, node.getRight());\n } else if (node.getRight() == null) {\n transplantNode(node, node.getLeft());\n } else {\n // Node has two children, so replacement is not that simple.\n TreeNode replacement = getMinimumNodeInSubTree(node.getRight());\n if (replacement.getParent() != node) {\n transplantNode(replacement, replacement.getRight());\n replacement.setRight(node.getRight());\n replacement.getRight().setParent(replacement);\n }\n transplantNode(node, replacement);\n replacement.setLeft(node.getLeft());\n replacement.getLeft().setParent(replacement);\n }\n }\n }",
"public void encodeTree(){\n StringBuilder builder = new StringBuilder();\n encodeTreeHelper(root,builder);\n }",
"public Node merge(Node node1, Node node2) {\n\t\tsize--;\r\n\t\t\r\n\t\tNode parent = node1.getParent();\r\n\t\tNode merged = new Node();\r\n\r\n\t\t//add all data/children from node1 into merged\r\n\t\tfor (int i = 0; i < node1.getData().size(); i++) {\r\n\t\t\tmerged.addData(node1.getData(i));\r\n\t\t\tif (!node1.isLeaf())\r\n\t\t\t\tmerged.addChild(node1.getChild(i));\r\n\t\t}\r\n\t\tif (!node1.isLeaf())\r\n\t\t\tmerged.addChild(node1.getChild(node1.getChildren().size() - 1));\r\n\r\n\t\t//add all data/children from node2 into merged\r\n\t\tfor (int i = 0; i < node2.getData().size(); i++) {\r\n\t\t\tmerged.addData(node2.getData(i));\r\n\t\t\tif (!node2.isLeaf())\r\n\t\t\t\tmerged.addChild(node2.getChild(i));\r\n\t\t}\r\n\t\tif (!node2.isLeaf())\r\n\t\t\tmerged.addChild(node2.getChild(node2.getChildren().size() - 1));\r\n\t\t\r\n\t\t//remove node1 and node2 from parent, then add merged\r\n\t\tparent.removeChild(parent.getChildNumber(node1));\r\n\t\tparent.removeChild(parent.getChildNumber(node2));\r\n\t\tparent.addChild(merged);\r\n\t\t\r\n\t\treturn merged;\r\n\t}",
"private T bestValue(MatchTreeNode<T> node) {\n T value = null;\n if (node != null) {\n if (node.child(\"/\") != null) {\n value = node.child(\"/\").value();\n } else {\n value = bestValue(node.parent());\n }\n }\n return value;\n }",
"public FlatData flatten() {\n\t\tString data;\n\t\tdouble[] coords = coordinateTools.localToCoordinates(this);\n\t\tdata = this.getClass().getName() + \":\";\n\t\tdata += coords[0] + \"#\" + coords[1];\n\t\treturn new FlatData(data);\n\t}",
"public boolean isExpandable();",
"private void preorderTraverseForToString(Node node) {\n\t\tif (node == null)\n\t\t\treturn;\n\n\t\tthis.order += node + \"\\n\";\n\n\t\t// walk trough left sub-tree\n\t\tpreorderTraverseForToString(node.left);\n\t\t// walk trough right sub-tree\n\t\tpreorderTraverseForToString(node.right);\n\t}",
"public TreeNode encode(Node root) {\n if (root == null) return null;\n TreeNode node = new TreeNode(root.val);\n List<Node> children = root.children;\n TreeNode tmp = node;\n if (!children.isEmpty()) {\n for (int i = 0; i < children.size(); i++) {\n if (i == 0) {\n node.left = encode(children.get(0));\n tmp = node.left;\n } else {\n tmp.right = encode(children.get(i));\n tmp = tmp.right;\n }\n }\n }\n return node;\n }",
"private void handleUnderflow(Node node) {\n\t\t\r\n\t\tNode parent = node.getParent();\r\n\t\t\r\n\t\t//underflow in parent\r\n\t\tif (parent == null) {\r\n\t\t\t//System.out.println(\"Underflow in root!\");\r\n\t\t\tNode newRoot = new Node();\r\n\t\t\t//copy all data of root children into new root\r\n\t\t\tfor (int i = 0; i < root.getChildren().size(); i++) {\r\n\t\t\t\tfor (int j = 0; j < root.getChild(i).getData().size(); j++) {\r\n\t\t\t\t\tnewRoot.addData(root.getChild(i).getData(j));\r\n\t\t\t\t\tif (!root.getChild(i).isLeaf()) {\r\n\t\t\t\t\t\tnewRoot.addChild(root.getChild(i).getChild(j));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!root.getChild(i).isLeaf())\r\n\t\t\t\t\tnewRoot.addChild(root.getChild(i).getChild(root.getChild(i).getChildren().size()));\r\n\t\t\t}\r\n\t\t\tsize--;\r\n\t\t\troot = newRoot;\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\tint nodePosInParent = parent.getEmptyChild();\r\n\t\t\t//if right most child of parent, must borrow from left\r\n\t\t\tif (nodePosInParent == parent.getChildren().size() - 1 ) {\r\n\t\t\t\t//take right most data value from parent\r\n\t\t\t\tnode.addData(parent.removeData(parent.getData().size() - 1));\r\n\t\t\t\t\r\n\t\t\t\tif (node.getSibling(\"left\").getData().size() > 1) {\r\n\t\t\t\t\tparent.addData(node.getSibling(\"left\").removeData(node.getSibling(\"left\").getData().size() - 1));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmerge(node.getSibling(\"left\"), node);\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t//take immediate greater value from parent\r\n\t\t\t\t//node.addData(parent.removeData(nodePosInParent));\r\n\r\n\t\t\t\t//if we can steal from right sibling\r\n\t\t\t\tif (node.getSibling(\"right\").getData().size() > 1) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t//take immediate greater value from parent\r\n\t\t\t\t\tnode.addData(parent.removeData(nodePosInParent));\r\n\t\t\t\t\t\r\n\t\t\t\t\tparent.addData(node.getSibling(\"right\").removeData(0));\r\n\t\t\t\t\t\r\n\t\t\t\t//otherwise steal from left\r\n\t\t\t\t} else if (nodePosInParent != 0 && node.getSibling(\"left\").getData().size() > 1) {\r\n\r\n\t\t\t\t\t//take immediate lesser value from parent\r\n\t\t\t\t\tnode.addData(parent.removeData(nodePosInParent - 1));\r\n\t\t\t\t\t\r\n\t\t\t\t\tparent.addData(node.getSibling(\"left\").removeData(node.getSibling(\"left\").getData().size() - 1));\r\n\t\t\t\t\t\r\n\t\t\t\t//else, merge\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\t//take immediate greater value from parent\r\n\t\t\t\t\tnode.addData(parent.removeData(nodePosInParent));\r\n\t\t\t\t\t\r\n\t\t\t\t\tmerge(node, node.getSibling(\"right\"));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n public List<Person> getChildren(Person object, boolean fullDepth) {\n return getChildren(object);\n }",
"private String toTreeString(PhyloTreeNode node) {\n if(node == null) {\n return \"\";\n }\n if(node.isLeaf()) {\n if(node.getParent() != null)\n builderTree.append(node.getLabel() + \":\" + String.format(\"%.5f\", node.getParent().getDistanceToChild()));\n else{\n builderTree.append(node.getLabel() + \":0.0\");\n }\n }\n else{\n builderTree.append(\"(\");\n toTreeString(node.getRightChild());\n builderTree.append(\",\");\n toTreeString(node.getLeftChild());\n builderTree.append(\")\");\n if(node.getParent() != null) {\n builderTree.append(\":\" + String.format(\"%.5f\", node.getParent().getDistanceToChild()));\n }\n }\n return builderTree.toString();\n }",
"private MyBinNode getToReplace(MyBinNode node){\n MyBinNode replc_p = node;\n MyBinNode replace = node;\n MyBinNode aux = node.right;\n while(aux != null){\n replc_p = replace;\n replace = aux;\n aux = aux.left;\n }\n if(replace != node.right){\n replc_p.left = replace.right;\n replace.right = node.right;\n }\n return replace;\n }",
"public List expand()\r\n {\r\n boolean isComp1 = isComposite(boundable1);\r\n boolean isComp2 = isComposite(boundable2);\r\n \r\n /**\r\n * HEURISTIC: If both boundable are composite,\r\n * choose the one with largest area to expand.\r\n * Otherwise, simply expand whichever is composite.\r\n */\r\n if (isComp1 && isComp2) {\r\n if (area(boundable1) > area(boundable2)) {\r\n return expand(boundable1, boundable2);\r\n }\r\n else {\r\n return expand(boundable2, boundable1); \r\n }\r\n }\r\n else if (isComp1) {\r\n return expand(boundable1, boundable2);\r\n }\r\n else if (isComp2) {\r\n return expand(boundable2, boundable1);\r\n }\r\n \r\n throw new IllegalArgumentException(\"neither boundable is composite\");\r\n }",
"void transplantNode(TreeNode nodeTodelete, TreeNode replacementNode, TreeNode nullNode) {\n assert nodeTodelete != nullNode;\n if (nodeTodelete.getParent() == nullNode) {\n // root Node\n this.root = replacementNode;\n } else if (nodeTodelete.getParent().getLeft() == nodeTodelete) {\n nodeTodelete.getParent().setLeft(replacementNode);\n } else {\n nodeTodelete.getParent().setRight(replacementNode);\n }\n\n if (replacementNode != nullNode) {\n replacementNode.setParent(nodeTodelete.getParent());\n }\n }",
"private static String toHtml(Node node) {\n\t\tStringBuilder buf = new StringBuilder();\n\t\tif (!node.heading.text.isEmpty()) {\n\t\t\tbuf.append(node.heading.text);\n\t\t\tbuf.append(\"\\n\");\n\t\t}\n\t\tIterator<Node> iter = node.children.iterator();\n\t\tif (iter.hasNext()) {\n\t\t\tbuf.append(\"<ul>\");\n\n\t\t\twhile (iter.hasNext()) {\n\t\t\t\tNode child = iter.next();\n\t\t\t\tbuf.append(\"<li>\");\n\t\t\t\tbuf.append(toHtml(child));\n\t\t\t\tbuf.append(\"</li>\");\n\t\t\t\tif (iter.hasNext()) {\n\t\t\t\t\tbuf.append(\"\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tbuf.append(\"</ul>\");\n\t\t}\n\t\treturn buf.toString();\n\t}"
] | [
"0.596218",
"0.5797632",
"0.5701686",
"0.56463957",
"0.5527223",
"0.5469752",
"0.5248121",
"0.51118207",
"0.50863934",
"0.5083663",
"0.5033567",
"0.4994496",
"0.49653134",
"0.49319592",
"0.4913794",
"0.4889507",
"0.48822692",
"0.4877426",
"0.4874684",
"0.48450387",
"0.4832965",
"0.4811471",
"0.48078912",
"0.4768379",
"0.47664836",
"0.47646406",
"0.47431263",
"0.47312477",
"0.46848527",
"0.46782744",
"0.46486765",
"0.46355996",
"0.46294156",
"0.46287507",
"0.4621951",
"0.46078074",
"0.45906246",
"0.4553941",
"0.4549466",
"0.45351478",
"0.45249492",
"0.45062792",
"0.45062792",
"0.44794655",
"0.44700733",
"0.44537216",
"0.44517532",
"0.442833",
"0.44270632",
"0.44249636",
"0.44027692",
"0.44020846",
"0.44014406",
"0.4396315",
"0.43880853",
"0.43876696",
"0.438668",
"0.4365939",
"0.43612495",
"0.4359807",
"0.43593323",
"0.43569738",
"0.43562168",
"0.43532282",
"0.43488342",
"0.4343116",
"0.43422413",
"0.4325426",
"0.43223086",
"0.43192154",
"0.43094543",
"0.42980814",
"0.4297771",
"0.42957276",
"0.4293801",
"0.42920795",
"0.42901707",
"0.4288673",
"0.42882606",
"0.4277493",
"0.42748904",
"0.42652324",
"0.42591646",
"0.42560604",
"0.4255199",
"0.42512634",
"0.42469588",
"0.4240171",
"0.42280132",
"0.42265946",
"0.4225182",
"0.42233294",
"0.42202002",
"0.42193258",
"0.42193228",
"0.42138833",
"0.42095828",
"0.42095482",
"0.42090017",
"0.4198854"
] | 0.6306203 | 0 |
Original Press (drag) / Name: begin Purpose: This is the method that is run when the applet starts. It sets up the canvas with the vertical and horizontal lines (the axes). It also sets up the buttons and whatnot. Parameters: N/A Return: void | public void begin()
{
canvasWidth = canvas.getWidth(); // Store canvas width
canvasHeight = canvas.getHeight(); // Store canvas height
sliderDimension = new Dimension((int) Math.round(canvasWidth / 3),
(int) Math.round(canvasHeight / 15));
JPanel north = new JPanel(); // Create overall north
JPanel north1 = new JPanel(); // Create top row north
JPanel north2 = new JPanel(); // Create bottom row north
JPanel south = new JPanel(); // Create overall south
// FIX UP NORTH OVERALL LAYOUT
north.setLayout(new GridLayout(2,1)); // North divided 2 rows
north.add(north1); // Add North1 (header text)
north.add(north2); // Add North2 (buttons)
// CREATE GUI OBJECTS
header = new JLabel("Resizable Balls Controls");
header.setHorizontalAlignment(SwingConstants.CENTER);
start = new JButton("Start");
stop = new JButton("Stop");
clearAll = new JButton("Clear All");
speedSlider = new JSlider(JSlider.HORIZONTAL, // Horizontal JSlider
MIN_SPEED, // Goes from Slow Speed,
MAX_SPEED, // to Fast Speed
MIN_SPEED); // Starts at Slow Speed
speedSlider.setPreferredSize(sliderDimension); // Adjust Slider Size
slideLabel = new JLabel("The speed is " + speedSlider.getValue());
// CREATE LISTENERS
speedSlider.addChangeListener(this);
start.addActionListener(this);
stop.addActionListener(this);
canvas.addMouseListener(this);
canvas.addMouseMotionListener(this);
// FIX UP NORTH1 (NORTH TOP ROW)
north1.add(header);
// FIX UP NORTH2 (NORTH BOTTOM ROW)
north2.add(start);
north2.add(stop);
north2.add(clearAll);
// FIX UP SOUTH
south.add(slideLabel);
south.add(speedSlider);
// ADD COMPONENTS AND VALIDATE
this.add(north, BorderLayout.NORTH);
this.add(south, BorderLayout.SOUTH);
this.validate();
visibleHeight = canvasHeight - north.getHeight() - south.getHeight();
// Create Horizontal Line
hLine = new Line( 0,
visibleHeight/2, // Left Point
canvasWidth,
visibleHeight/2, // Right Point
canvas); // Canvas
// Create Vertical Line
vLine = new Line( canvasWidth/2, 0, // Top Point
canvasWidth/2, canvasHeight, // Bottom Point
canvas); // Canvas
hLineProportion = (hLine.getStart()).getY() / canvasHeight;
vLineProportion = (vLine.getStart()).getX() / canvasWidth;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void init() {\n this.addMouseListener(new MouseAdapter() {\n public void mousePressed(MouseEvent e) {\n last_x = e.getX();\n last_y = e.getY();\n }\n });\n\n // Define, instantiate and register a MouseMotionListener object\n this.addMouseMotionListener(new MouseMotionAdapter() {\n public void mouseDragged(MouseEvent e) {\n Graphics g = getGraphics();\n int x = e.getX(), y = e.getY();\n g.setColor(Color.black);\n g.drawLine(last_x, last_y, x, y);\n last_x = x; last_y = y;\n }\n });\n\n // Create a clear button\n Button b = new Button(\"Clear\");\n // Define, instantiate, and register a listener to handle button presses\n b.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) { // clear the scribble\n Graphics g = getGraphics();\n g.setColor(getBackground());\n g.fillRect(0, 0, getSize().width, getSize().height);\n }\n });\n // And add the button to the applet\n this.add(b);\n }",
"@Override\n public void initialize() {\n double left = getBorder().getStrokes().get(0).getWidths().getLeft();\n canvas.widthProperty().bind(widthProperty().subtract(left * 2));\n canvas.heightProperty().bind(heightProperty().subtract(left * 2));\n canvas.setTranslateX(left);\n canvas.setTranslateY(left);\n\n // init properties value\n color.set(Color.BLUE);\n thickness.set(5);\n\n // addind mouse handlers\n canvas.setOnMousePressed(e -> {\n lastLineList.clear();\n handleMouseEvent(e);\n });\n canvas.setOnMouseDragged(e -> handleMouseEvent(e));\n canvas.setOnMouseReleased(e -> {\n handleMouseEvent(e);\n lastLine.setValue(new DrawingInfos(lastLineList));\n });\n }",
"public void start() {\n\t\t\n\t\t/*\n\t\t * This is the main JFrame that everything will be placed on. \n\t\t * The size is set to a maximum value, and made unresizable to make repainting easier to achieve.\n\t\t */\n\t\tJFrame frame = new JFrame(\"Paint\");\n\t\tframe.setSize(Canvas.getMaxWindowSize(), Canvas.getMaxWindowSize());\n\t\tframe.setResizable(false);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\t/*\n\t\t * The mainPanel is the panel on which all the other panels will be organized.\n\t\t * It uses a BorderLayout to divide the panel into 5 possible areas: North, South, West, East, and Center.\n\t\t */\n\t\tJPanel mainPanel = new JPanel(new BorderLayout());\n\t\tframe.add(mainPanel);\n\t\t\n\t\t/*\n\t\t * The canvas is added to the center of the mainPanel.\n\t\t */\n\t\tCanvas canvas = new Canvas();\n\t\tmainPanel.add(canvas, BorderLayout.CENTER);\n\t\t\n\t\t/*\n\t\t * The topToolPanel is a JPanel that will also use a BorderLayout to organize items placed upon it.\n\t\t * It is placed in the North portion of the mainPanel.\n\t\t */\n\t\tJPanel topToolPanel = new JPanel(new BorderLayout());\n\t\tmainPanel.add(topToolPanel, BorderLayout.NORTH);\n\t\t\n\t\t/*\n\t\t * The shapeToolsPanel is JPanel on which all the buttons for different shapes will be placed. \n\t\t * It is placed in the West portion of the topToolPanel.\n\t\t */\n\t\tJPanel shapeToolsPanel = new JPanel();\n\t\ttopToolPanel.add(shapeToolsPanel, BorderLayout.WEST);\n\t\t\n\t\t/*\n\t\t * The usefulToolPanel will hold buttons for options like \"Fill\" or \"No Fill\", as well as our \"Undo\" button.\n\t\t */\n\t\tJPanel usefulToolPanel = new JPanel();\n\t\ttopToolPanel.add(usefulToolPanel, BorderLayout.EAST);\n\t\t\n\t\t/*\n\t\t * Each of the next five buttons added represent an option to choose a certain shape to draw.\n\t\t * They all get added to the shapeToolsPanel from left to right.\n\t\t */\n\t\tJButton rectButton = new JButton(\"Rectangle\");\n\t\tshapeToolsPanel.add(rectButton);\n\t\trectButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setShapeSelection(\"rectangle\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton circButton = new JButton (\"Circle\");\n\t\tshapeToolsPanel.add(circButton);\n\t\tcircButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setShapeSelection(\"circle\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton triButton = new JButton (\"Triangle\");\n\t\tshapeToolsPanel.add(triButton);\n\t\ttriButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setShapeSelection(\"triangle\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton lineButton = new JButton (\"Line\");\n\t\tshapeToolsPanel.add(lineButton);\n\t\tlineButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setShapeSelection(\"line\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton penButton = new JButton (\"Pen\");\n\t\tshapeToolsPanel.add(penButton);\n\t\tpenButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setShapeSelection(\"pen\");\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\t/*\n\t\t * The following three buttons are useful tools for the program to use: the option to choose whether or not to fill shapes, and the undo option.\n\t\t * Each of these will be added to the usefulToolPanel, once again from right to left.\n\t\t */\n\t\tJButton fillButton = new JButton(\"Fill\");\n\t\tusefulToolPanel.add(fillButton);\n\t\tfillButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setIsFilled(true);\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton outlineButton = new JButton(\"No Fill\");\n\t\tusefulToolPanel.add(outlineButton);\n\t\toutlineButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setIsFilled(false);\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton increaseButton = new JButton (\"Increase width\");\n\t\tusefulToolPanel.add(increaseButton);\n\t\tincreaseButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setShapeThickness(Canvas.getShapeThickness() + 1);\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton decreaseButton = new JButton (\"Decrease width\");\n\t\tusefulToolPanel.add(decreaseButton);\n\t\tdecreaseButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tCanvas.setShapeThickness(Canvas.getShapeThickness() - 1);\n\t\t\t\t}catch(IllegalArgumentException exception) {\n\t\t\t\t\tSystem.out.println(\"The shape thickness cannot be zero.\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton undoButton = new JButton (\"Undo\");\n\t\tusefulToolPanel.add(undoButton);\n\t\tundoButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tcanvas.undo();\n\t\t\t\t}catch(IndexOutOfBoundsException exception) {\n\t\t\t\t\tSystem.out.println(\"No item in shape list to undo.\");\n\t\t\t\t}\t\n\t\t\t}\n\t\t});\n\t\t\n\t\t/*\n\t\t * The colorPanel is a JPanel which utilizes a GridLayout to organize buttons from the top to the bottom.\n\t\t * It is set up to have more rows than are actually filled to minimize the size of each button on it.\n\t\t */\n\t\tJPanel colorPanel = new JPanel(new GridLayout(defaultGridRows, defaultGridColumns, defaultGridPadding, defaultGridPadding));\n\t\tmainPanel.add(colorPanel, BorderLayout.WEST);\n\t\t\n\t\t/*\n\t\t * Each of the following buttons will be added to the colorPanel.\n\t\t * They will stack one on top of the other as the grid is set up to only have one column.\n\t\t * Additionally, the text portion of each button will be set to the color that the button is connected to.\n\t\t */\n\t\tJButton blackButton = new JButton (\"Black\");\n\t\tcolorPanel.add(blackButton);\n\t\tblackButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setColorSelection(Color.black);\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton yellowButton = new JButton (\"Yellow\");\n\t\tyellowButton.setForeground(Color.yellow);\n\t\tcolorPanel.add(yellowButton);\n\t\tyellowButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setColorSelection(Color.yellow);\n\t\t\t}\n\t\t});\n\n\t\tJButton greenButton = new JButton (\"Green\");\n\t\tgreenButton.setForeground(Color.green);\n\t\tcolorPanel.add(greenButton);\n\t\tgreenButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setColorSelection(Color.green);\n\t\t\t}\n\t\t});\n\n\t\tJButton blueButton = new JButton (\"Blue\");\n\t\tblueButton.setForeground(Color.blue);\n\t\tcolorPanel.add(blueButton);\n\t\tblueButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setColorSelection(Color.blue);\n\t\t\t}\n\t\t});\n\n\t\tJButton magentaButton = new JButton (\"Magenta\");\n\t\tmagentaButton.setForeground(Color.magenta);\n\t\tcolorPanel.add(magentaButton);\n\t\tmagentaButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setColorSelection(Color.magenta);\n\t\t\t}\n\t\t});\n\n\t\tJButton redButton = new JButton (\"Red\");\n\t\tredButton.setForeground(Color.red);\n\t\tcolorPanel.add(redButton);\n\t\tredButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setColorSelection(Color.red);\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton pinkButton = new JButton (\"Pink\");\n\t\tpinkButton.setForeground(Color.pink);\n\t\tcolorPanel.add(pinkButton);\n\t\tpinkButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setColorSelection(Color.pink);\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tframe.setVisible(true);\n\t}",
"private VecCanvas(){\n MouseAdapter mouse = new CanvasMouse();\n this.addMouseListener(mouse);\n this.addMouseMotionListener(mouse);\n setupKeyBindings();\n }",
"public LaserCanvas()\r\n\t{\r\n\t\tsuper();\r\n\t\t\r\n\t\tgame = new LaserTutor();\r\n\t\t\r\n\t\tgame.initialize( );\r\n\t}",
"public BasicLinePix() {\r\n\t\tsetTitle(\"Basic Line Pix 1.0\");\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tContainer cp = getContentPane();\r\n\t\tcp.setLayout(new BorderLayout());\r\n\t\teh = new EventHandler();\r\n\t\tdrawingPanel = makeDrawingPanel();\r\n\t\tdrawingPanel.addMouseListener(eh);\r\n\t\tdrawingPanel.addMouseMotionListener(eh);\r\n\t\tJPanel statusBar = createStatusBar();\r\n\t\tcp.add(drawingPanel, BorderLayout.CENTER);\r\n\t\tcp.add(statusBar, BorderLayout.SOUTH);\r\n\t\tbuildMenu();\r\n\t\tpack();\r\n\t}",
"public SignalCanvas() {\n\t\tsuper();\n\t}",
"DrawingCanvas() {\n super();\n\n // ArrayList to hold all shape objects\n shapes = new ArrayList<>();\n\n // ArrayList to hold all point objects\n points = new ArrayList<>();\n\n // Initialize colour arrays\n lineColours = new ArrayList<>();\n fillColours = new ArrayList<>();\n\n lineColours.add(Color.black);\n fillColours.add(null);\n\n clickStatus = true;\n activeTool = 1;\n this.addMouseListener(this);\n this.addMouseMotionListener(new MouseMotionAdapter() {\n public void mouseDragged(MouseEvent e) {\n endDrag = new Point(e.getX(), e.getY());\n repaint();\n }\n });\n\n // Initialize the WriteVec object, so it can be written to\n writeFile = new WriteVec();\n\n // Initialize the ShapeCreator object\n newShape = new ShapeCreator();\n\n // Set colours\n currentFillColour = null;\n currentPenColour = Color.BLACK;\n }",
"public void button1Pushed(ActionEvent event)\r\n {\n GraphicsContext gc = canvas.getGraphicsContext2D();\r\n \r\n //clear any content out of the canvas\r\n gc.clearRect(0, 0, canvas.getWidth(), canvas.getHeight());\r\n \r\n //draw line from upper-left to lower-right of the canvas\r\n gc.strokeLine(0, 0, canvas.getWidth(), canvas.getHeight());\r\n \r\n //draw line from upper-right to lower-left corner\r\n gc.strokeLine(canvas.getWidth(), 0, 0, canvas.getHeight());\r\n \r\n }",
"public CreateLineCanvas(CanvasApp canvasApp) {\n\t\tthis.cmdAppliedCanvas=canvasApp;\n\t}",
"public void begin() {\n\n JLabel header = new JLabel(\"Reflecting Pond Control Panel\");\n run = new JButton(\"Run\");\n run.addActionListener(this);\n run.setActionCommand(\"run\");\n pause = new JButton(\"Pause\");\n pause.addActionListener(this);\n pause.setActionCommand(\"pause\");\n clear = new JButton(\"Clear Ripples\");\n clear.addActionListener(this);\n clear.setActionCommand(\"clear\");\n\n speed = 50;\n speedLabel = new JLabel(\"The speed is \" + speed);\n speedController = new JSlider(JSlider.HORIZONTAL,1,100,50);\n speedController.addChangeListener(this);\n\n JPanel northPanel = new JPanel();\n JPanel northPanel2 = new JPanel();\n JPanel southPanel = new JPanel();\n southPanel.add(speedLabel);\n southPanel.add(speedController);\n northPanel.add(header);\n northPanel2.add(run);\n northPanel2.add(pause);\n northPanel2.add(clear);\n\n JPanel gridPanel = new JPanel();\n gridPanel.setLayout(new GridLayout(2,1));\n gridPanel.add(northPanel);\n gridPanel.add(northPanel2);\n\n this.add(gridPanel, BorderLayout.NORTH);\n this.add(southPanel, BorderLayout.SOUTH);\n\n\n canvas.addMouseListener(this);\n canvas.addMouseMotionListener(this);\n\n this.validate();\n\n movingRipples = true;\n\n // create an instance of class PondQuadrants\n pond = new PondQuadrants( canvas );\n }",
"public void init ()\n\t// layout the applet\n\t{\tPlotarea=new Plot();\n\t\tPanel panel1=new Panel();\n\t\tPanel panel2=new Panel();\n\t\tClear=new Button(\" Clear \");\n\t\tRandomize=new Button(\" Random \");\n\t\tNRandom=new TextField(\"\",4);\n\t\tLocalOptimize=new Button(\"Local Optimum\");\n\t\tNIterations=new TextField(\"\",4);\n\t\tpanel1.add(Clear);\n\t\tpanel1.add(Randomize);\n\t\tpanel1.add(NRandom);\n\t\tpanel2.add(LocalOptimize);\n\t\tpanel2.add(new Label(\" Iterations:\"));\n\t\tpanel2.add(NIterations);\n\t\tsetLayout(gridbag);\n\t\tsetConstrain(Plotarea,0,0,1,1,\n\t\t\tGridBagConstraints.BOTH,GridBagConstraints.CENTER,\n\t\t\t1.0,1.0);\n\t\tadd(Plotarea);\n\t\tsetConstrain(panel1,0,2,1,1,\n\t\t\tGridBagConstraints.NONE,GridBagConstraints.CENTER,\n\t\t\t1.0,0.0);\n\t\tadd(panel1);\n\t\tsetConstrain(panel2,0,3,1,1,\n\t\t\tGridBagConstraints.NONE,GridBagConstraints.CENTER,\n\t\t\t1.0,0.0);\n\t\tadd(panel2);\n\t}",
"public void beginDrawing();",
"public void init()\n {\n\t Toolkit.getDefaultToolkit();\n \t\t\n \t\t//The following sets the int values\n \t\tx_pos = 125;\n \t\ty_pos = 120;\n \t\t\n \t\tx_speed = 5;\t//The x_ and y_speed values are only to be used when\n\t\ty_speed = 1; \t//the game is in gameplay mode (in other words, when\n \t\t\t\t\t\t//numClicks = 1)----\n \t\tlevel = 1;\n \t\t\n \t\txClouds1 = 0;\n\t\txClouds2 = -500;\n\t\tyBkg1 = 0;\n\t\tyBkg2 = 600;\n \t\t\n \t\t//The following sets the images\n \t\ttitleScreen = getImage (getCodeBase (), \"images/PaperAirplane.GIF\");\n\t\t\n\t\tgameBkg1 = getImage (getCodeBase (), \"images/bricks.GIF\");\n\t\tgameBkg2 = getImage (getCodeBase (), \"images/bricks.GIF\");\n\t\tgameClouds1 = getImage (getCodeBase (), \"images/clouds.GIF\");\n\t\tgameClouds2 = getImage (getCodeBase (), \"images/clouds.GIF\");\n\t\t\n\t\tplaneAngle = new Image [11];\t//This sets the planeAngle array to\n\t\t\t\t\t\t\t\t\t\t//hold 11 elements\n\t\t//The following below sets a GIF for each of the elements in the\n\t\t//planeAngle array.\n\t\tplaneAngle [0] = getImage (getCodeBase (), \"images/planeLeft5.GIF\");\n\t\tplaneAngle [1] = getImage (getCodeBase (), \"images/planeLeft4.GIF\");\n\t\tplaneAngle [2] = getImage (getCodeBase (), \"images/planeLeft3.GIF\");\n\t\tplaneAngle [3] = getImage (getCodeBase (), \"images/planeLeft2.GIF\");\n\t\tplaneAngle [4] = getImage (getCodeBase (), \"images/planeLeft1.GIF\");\n\t\tplaneAngle [5] = getImage (getCodeBase (), \"images/planeDown.GIF\");\n\t\tplaneAngle [6] = getImage (getCodeBase (), \"images/planeRight1.GIF\");\n\t\tplaneAngle [7] = getImage (getCodeBase (), \"images/planeRight2.GIF\");\n\t\tplaneAngle [8] = getImage (getCodeBase (), \"images/planeRight3.GIF\");\n\t\tplaneAngle [9] = getImage (getCodeBase (), \"images/planeRight4.GIF\");\n\t\tplaneAngle [10] = getImage (getCodeBase (), \"images/planeRight5.GIF\");\n\t\t\n\t\tleftWall = getImage (getCodeBase (), \"images/leftWall.GIF\");\n\t\trightWall = getImage (getCodeBase (), \"images/rightWall.GIF\");\n\t\t\n\t\t//The following sets the audio\n\t\tlevelSong = getAudioClip (getCodeBase (), \"audio/level.au\");\n\t\thitWall = getAudioClip (getCodeBase (), \"audio/hitWall.au\");\n\t\topening = getAudioClip (getCodeBase (), \"audio/exitbike.au\");\n\t\tstageIntro = getAudioClip (getCodeBase (), \"audio/stageIntro.au\");\n\t\tstageSong = getAudioClip (getCodeBase (), \"audio/stageSong.au\");\n\t\t\n\t\t//The following sets up the GamePlay Classes\n\t\tw = new Wall [4];\t//sets the Wall array w to have 4 elements\n\t\t\n\t\tw[0] = new Wall (50, 200, 200, 50);\t //Is a platform located on the left\n\t\t\t\t\t\t\t\t\t\t\t //side of the screen.\n\t\tw[1] = new Wall (250, 450, 200, 50); //Is a platform located on the\n\t\t\t\t\t\t\t\t\t\t\t //right side of the screen.\n\t\tw[2] = new Wall (50, 700, 200, 50);\t //Is a platform located on the left\n\t\t\t\t\t\t\t\t\t\t\t //side of the screen.\n\t\tw[3] = new Wall (250, 950, 200, 50); //Is a platform located on the\n\t\t\t\t\t\t\t\t\t\t\t //right side of the screen.\n\t\t\n\t\tsW = new SideWall [4];\t//sets the SideWall array sW to have 4 elements\n\t\t\n\t\tsW[0] = new SideWall (0, 0, 50, 600);\t\t//Is the left wall\n\t\tsW[1] = new SideWall (450, 0, 50, 600);\t//Is the right wall\n\t\tsW[2] = new SideWall (0, 600, 50, 600);\t//Is the left wall\n\t\tsW[3] = new SideWall (450, 600, 50, 600);\t//Is the right wall\n\t\t\n\t\tscore = new Score ();\n\t\thighScore = new Score ();\n\t\t\n\t\ttime = new Timer ();\n\t\tbestTime = new Timer ();\n\t\t\n \t\tp = new PaperAirplane (x_pos, y_pos);\n\t\t\n\t\t//The following sets up the fonts\n\t\tfTitle = new Font (\"titleStyle\", Font.BOLD, 25);\n\t\tfPressAny = new Font (\"pressStartStyle\", Font.PLAIN, 12);\n\t\tfGameOver = new Font (\"gameOverStyle\", Font.ITALIC, 50);\n\t\tfScore = new Font (\"scoreStyle\", Font.BOLD, 15);\n\t\tfCreditNames = new Font (\"creditStyle\", Font.BOLD, 20);\n\t\t\n\t\t//The following sets up the coordinate arrays\n\t\txPoints = p.getXPoints ();\n\t\tyPoints = p.getYPoints ();\n }",
"@Override\n public void init(GLAutoDrawable drawable) {\n\n /**\n * A mouse motion listener for the rendering client.\n *\n * @author Curtis White\n * @version 1.0\n * @since 1.0\n */\n addMouseMotionListener(new MouseMotionListener() {\n\n /**\n * Stores the mouse x value from the last frame.\n */\n private int old_x = 0;\n\n /**\n * Stores the mouse x value from the last frame.\n */\n private int old_y = 0;\n\n /**\n * Overridden method from the one declared in MouseMotionListener.\n * <p>\n * mouseDragged() runs when the mouse moves while a mouse button is\n * held\n *\n * @author Curtis White\n * @since 1.0\n * @param e A MouseEvent that details when, where and how the mouse\n * was moved/clicked\n */\n @Override\n public void mouseDragged(MouseEvent e) {\n\n // Check whether left or right mouse is held\n if (SwingUtilities.isLeftMouseButton(e)) {\n // Get x and y\n int x = e.getX();\n int y = e.getY();\n\n // Rotate for LMB\n rt_y -= (old_x - x) / 2;\n rt_x -= (old_y - y) / 2;\n\n // Overwrite last frame data\n old_x = x;\n old_y = y;\n } else if (SwingUtilities.isRightMouseButton(e)) {\n // Get x and y\n int x = e.getX();\n int y = e.getY();\n\n // Translate for RMB\n tr_x -= ((float) old_x - (float) x) / 1000;\n tr_y += ((float) old_y - (float) y) / 1000;\n\n // Overwrite last frame data\n old_x = x;\n old_y = y;\n }\n }\n\n /**\n * Overridden method from the one declared in MouseMotionListener.\n * <p>\n * mouseMoved() runs when the mouse moves when a mouse button is not\n * held\n *\n * @author Curtis White\n * @since 1.0\n * @param e A MouseEvent that details when, where and how the mouse\n * was moved/clicked\n */\n @Override\n public void mouseMoved(MouseEvent e) {\n // Simply find x and y and then overwrite last frame data\n int x = e.getX();\n int y = e.getY();\n\n old_x = x;\n old_y = y;\n }\n });\n\n /**\n * A mouse wheel listener for the rendering client.\n *\n * @author Curtis White\n * @version 1.0\n * @since 1.0\n */\n addMouseWheelListener(new MouseWheelListener() {\n\n /**\n * Overridden method from the one declared in MouseWheelListener.\n * <p>\n * mouseMoved() runs when the mouse moves when a mouse button is not\n * held\n *\n * @author Curtis White\n * @since 1.0\n * @param e A MouseWheelEvent that details when, where and how the\n * mouse wheel moved\n */\n @Override\n public void mouseWheelMoved(MouseWheelEvent e) {\n // Check direction of rotation\n if (e.getWheelRotation() < 0) {\n // Zoom in for up\n tr_z += 0.01f;\n } else {\n // Zoom out for down\n tr_z -= 0.01f;\n }\n }\n });\n\n /**\n * A key listener for the rendering client.\n *\n * @author Curtis White\n * @version 1.0\n * @since 1.0\n */\n this.addKeyListener(new KeyListener() {\n\n /**\n * Overridden method from the one declared in KeyListener. (unused)\n *\n * @author Curtis White\n * @since 1.0\n * @param e A KeyEvent that details when, where and how key was\n * pressed/released/typed.\n */\n @Override\n public void keyTyped(KeyEvent e) {\n\n }\n\n /**\n * Overridden method from the one declared in KeyListener.\n * <p>\n * keyPressed() runs on key down of any key. The key pressed can be\n * found in e. This method is used over others for faster looping\n * and response time.\n *\n * @author Curtis White\n * @since 1.0\n * @param e A KeyEvent that details when, where and how key was\n * pressed/released/typed.\n */\n @Override\n public void keyPressed(KeyEvent e) {\n\n /**\n * The code for the key that was pressed\n */\n int key = e.getKeyCode();\n\n // Probably could be a case statement\n // Checking which key was pressed and acting accordingly\n if (key == KeyEvent.VK_W) {\n rt_x += 1f; // Positive x rotation\n } else if (key == KeyEvent.VK_X) {\n rt_x -= 1f; // Negative x rotation\n } else if (key == KeyEvent.VK_D) {\n rt_y += 1f; // Positive y rotation\n } else if (key == KeyEvent.VK_A) {\n rt_y -= 1f; // Negative y rotation\n } else if (key == KeyEvent.VK_E) {\n rt_z += 1f; // Positive z rotation\n } else if (key == KeyEvent.VK_Z) {\n rt_z -= 1f; // Negative z rotation\n } else if (key == KeyEvent.VK_P) {\n tr_z += 0.01f; // Zooming in\n } else if (key == KeyEvent.VK_O) {\n tr_z -= 0.01f; // Zooming out\n } else if (key == KeyEvent.VK_K) {\n // This toggles the render mode\n if (render_mode == GL_FILL) {\n render_mode = GL_LINE;\n } else {\n render_mode = GL_FILL;\n }\n } else if (key == KeyEvent.VK_L) {\n // Toggle the lighting (doesn't disable ambient light)\n if (lights_on) {\n lights_on = false;\n } else {\n lights_on = true;\n }\n } else if (key == KeyEvent.VK_M) {\n // Cycles through the materials\n material += 1;\n } else if (key == KeyEvent.VK_J) {\n // Toggle perspective type\n draw_mode += 1;\n }\n }\n\n /**\n * Overridden method from the one declared in KeyListener. (unused)\n *\n * @author Curtis White\n * @since 1.0\n * @param e A KeyEvent that details when, where and how key was\n * pressed/released/typed.\n */\n @Override\n public void keyReleased(KeyEvent e) {\n\n }\n\n });\n\n // Try/Catch to find and handle IOExceptions\n try {\n if (archivo == null || archivo.isEmpty()) {\n values = new Reader(\n (getClass().getClassLoader().getResourceAsStream(\"bun_zipper_res3.ply\")), null);\n //values = new Reader(Paths.get(\"/media/DATOS/Universidad/Proyectos/bunny/reconstruction/bun_zipper.ply\"));\n //values = new Reader(Paths.get(\"/media/DATOS/Universidad/Proyectos/horse.ply\"));\n //values = new Reader(Paths.get(\"/media/DATOS/Universidad/Proyectos/Armadillo_scans/ArmadilloStand_0.ply\"));\n } else {\n values = new Reader(Paths.get(archivo), null);\n }\n } catch (IOException ie) {\n ie.printStackTrace();\n }\n\n // Get OpenGL context and GL Utils\n gl = drawable.getGL().getGL2();\n glu = new GLU();\n\n // Clear background colour and depth\n gl.glClearColor(0.1f, 0.1f, 0.2f, 0.0f);\n gl.glClearDepth(1.0f);\n\n // Depth testing, perspective and smooth shading\n gl.glEnable(GL_DEPTH_TEST);\n gl.glDepthFunc(GL_LEQUAL);\n gl.glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);\n gl.glShadeModel(GL_SMOOTH);\n\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n upBtn = new javax.swing.JButton();\n downBtn = new javax.swing.JButton();\n leftBtn = new javax.swing.JButton();\n rightBtn = new javax.swing.JButton();\n upTextField = new javax.swing.JTextField();\n downTextField = new javax.swing.JTextField();\n leftTextField = new javax.swing.JTextField();\n rightTextField = new javax.swing.JTextField();\n canvas = new java.awt.Canvas();\n button1Btn = new javax.swing.JButton();\n button2Btn = new javax.swing.JButton();\n button1TextField = new javax.swing.JTextField();\n button2TextField = new javax.swing.JTextField();\n startBtn = new javax.swing.JButton();\n stopBtn = new javax.swing.JButton();\n abutBtn = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);\n setTitle(\"RPi Joystick emulator\");\n setResizable(false);\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowClosing(java.awt.event.WindowEvent evt) {\n formWindowClosing(evt);\n }\n });\n addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n formKeyPressed(evt);\n }\n });\n\n upBtn.setText(\"UP\");\n upBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n upBtnActionPerformed(evt);\n }\n });\n\n downBtn.setText(\"DOWN\");\n downBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n downBtnActionPerformed(evt);\n }\n });\n\n leftBtn.setText(\"LEFT\");\n leftBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n leftBtnActionPerformed(evt);\n }\n });\n\n rightBtn.setText(\"RIGHT\");\n rightBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n rightBtnActionPerformed(evt);\n }\n });\n\n upTextField.setEditable(false);\n upTextField.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n upTextFieldKeyPressed(evt);\n }\n });\n\n downTextField.setEditable(false);\n downTextField.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n downTextFieldKeyPressed(evt);\n }\n });\n\n leftTextField.setEditable(false);\n leftTextField.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n leftTextFieldKeyPressed(evt);\n }\n });\n\n rightTextField.setEditable(false);\n rightTextField.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n rightTextFieldKeyPressed(evt);\n }\n });\n\n canvas.setBackground(new java.awt.Color(255, 255, 255));\n canvas.setMinimumSize(new java.awt.Dimension(200, 200));\n canvas.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n canvasKeyPressed(evt);\n }\n public void keyReleased(java.awt.event.KeyEvent evt) {\n canvasKeyReleased(evt);\n }\n });\n\n button1Btn.setText(\"BUTTON 1\");\n button1Btn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n button1BtnActionPerformed(evt);\n }\n });\n\n button2Btn.setText(\"BUTTON 2\");\n button2Btn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n button2BtnActionPerformed(evt);\n }\n });\n\n button1TextField.setEditable(false);\n button1TextField.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n button1TextFieldKeyPressed(evt);\n }\n });\n\n button2TextField.setEditable(false);\n button2TextField.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n button2TextFieldKeyPressed(evt);\n }\n });\n\n startBtn.setText(\"Start\");\n startBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n startBtnActionPerformed(evt);\n }\n });\n\n stopBtn.setText(\"Stop\");\n stopBtn.setEnabled(false);\n stopBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n stopBtnActionPerformed(evt);\n }\n });\n\n abutBtn.setText(\"?\");\n abutBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n abutBtnActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(button1Btn, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)\n .addComponent(rightBtn, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(leftBtn, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(downBtn, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(upBtn, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(button2Btn, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(button1TextField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 120, Short.MAX_VALUE)\n .addComponent(rightTextField, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(leftTextField, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(downTextField, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(upTextField, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(button2TextField))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(canvas, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(abutBtn)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(stopBtn)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(startBtn)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(upBtn)\n .addComponent(upTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(downTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(downBtn))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(leftBtn)\n .addComponent(leftTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(rightBtn)\n .addComponent(rightTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(button1Btn)\n .addComponent(button1TextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(button2Btn)\n .addComponent(button2TextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(canvas, javax.swing.GroupLayout.PREFERRED_SIZE, 216, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(stopBtn)\n .addComponent(startBtn))\n .addComponent(abutBtn))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }",
"private void init() {\n setDefaultCloseOperation(EXIT_ON_CLOSE);\n controlPanel = new ControlPanel(this);\n canvas = new DrawingPanel(this);\n shapeController = ShapeController.getInstance();\n\n shapeController.setFactory(new RegularPolygonShapeFactory(6, 50));\n optionsPanel = new RegularPolygonOptionsPanel(this, 6, 50);\n toolPanel = new ToolPanel(this);\n\n add(optionsPanel, BorderLayout.NORTH);\n add(canvas, BorderLayout.CENTER);\n add(controlPanel, BorderLayout.SOUTH);\n add(toolPanel, BorderLayout.EAST);\n\n pack();\n }",
"private void setup() {\r\n\t\tscrollPane.setContent(iv);\r\n\t\tiv.setPickOnBounds(true);\r\n\t\tiv.requestFocus();\r\n\t\tiv.setOnMouseClicked(e -> {\r\n\t\tswitch (click) {\r\n\t\t\tcase 0:\r\n\t\t\t\tlines = image.getRGB((int) Math.round(e.getX() * (image.getWidth() / iv.getLayoutBounds().getWidth())),\r\n\t\t\t\t\t\t(int) Math.round(e.getY() * (image.getHeight() / iv.getLayoutBounds().getHeight())));\r\n\t\t\t\tColor lColH = new Color(lines);\r\n\t\t\t\tjavafx.scene.paint.Color lCol = javafx.scene.paint.Color.rgb(lColH.getRed(), lColH.getGreen(), lColH.getBlue(), lColH.getTransparency());\r\n\t\t\t\twallRect.setFill(lCol);\r\n\t\t\t\tclick++;\r\n\t\t\t\te.consume();\r\n\t\t\t\tstateLabel.setText(\"Click on a corrider\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase 1:\r\n\t\t\t\tspace = image.getRGB((int) Math.round(e.getX() * (image.getWidth() / iv.getLayoutBounds().getWidth())),\r\n\t\t\t\t\t\t(int) Math.round(e.getY() * (image.getHeight() / iv.getLayoutBounds().getHeight())));\r\n\t\t\t\tclick++;\r\n\t\t\t\tColor sColH = new Color(space);\r\n\t\t\t\tjavafx.scene.paint.Color sCol = javafx.scene.paint.Color.rgb(sColH.getRed(), sColH.getGreen(), sColH.getBlue(), sColH.getTransparency());\r\n\t\t\t\tspaceRect.setFill(sCol);\r\n\t\t\t\te.consume();\r\n\t\t\t\tstateLabel.setText(\"Choose start location\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tstart = new Pair<Integer, Integer>(\r\n\t\t\t\t\t\t(int) Math.round(e.getX() * (image.getWidth() / iv.getLayoutBounds().getWidth())),\r\n\t\t\t\t\t\t(int) Math.round(e.getY() * (image.getHeight() / iv.getLayoutBounds().getHeight())));\r\n\t\t\t\timage.setRGB(start.getKey(), start.getValue(), Color.BLUE.getRGB());\r\n\t\t\t\tiv.setImage(SwingFXUtils.toFXImage(image, null));\r\n\t\t\t\tclick++;\r\n\t\t\t\tstateLabel.setText(\"Choose end location\");\r\n\t\t\t\te.consume();\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\tend = new Pair<Integer, Integer>(\r\n\t\t\t\t\t\t(int) Math.round(e.getX() * (image.getWidth() / iv.getLayoutBounds().getWidth())),\r\n\t\t\t\t\t\t(int) Math.round(e.getY() * (image.getHeight() / iv.getLayoutBounds().getHeight())));\r\n\t\t\t\te.consume();\r\n\t\t\t\timage.setRGB(end.getKey(), end.getValue(), Color.BLUE.getRGB());\r\n\t\t\t\tiv.setImage(SwingFXUtils.toFXImage(image, null));\r\n\t\t\t\tclick++;\r\n\t\t\t\tsolveButton.setDisable(false);\r\n\t\t\t\tstateLabel.setText(\"Ready to solve\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\t\tzoomProperty.addListener(new InvalidationListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void invalidated(Observable arg0) {\r\n\t\t\t\tiv.setFitWidth(zoomProperty.get() * 4);\r\n\t\t\t\tiv.setFitHeight(zoomProperty.get() * 3);\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tscrollPane.addEventFilter(ScrollEvent.ANY, new EventHandler<ScrollEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ScrollEvent event) {\r\n\t\t\t\tif (event.getDeltaY() > 0) {\r\n\t\t\t\t\tzoomProperty.set(zoomProperty.get() * 1.1);\r\n\t\t\t\t} else if (event.getDeltaY() < 0) {\r\n\t\t\t\t\tzoomProperty.set(zoomProperty.get() / 1.1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t\tiv.setSmooth(false);\r\n\t\tiv.preserveRatioProperty().set(true);\r\n\t}",
"public BMTron()\n\t{\n\t\tframe = new JFrame(\"Serpentine\");\n\t\tframe.setVisible(true);\n\t\tframe.setSize(793 + 5, 623 + 25);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setResizable(false);\n\t\tframe.addKeyListener(this);\n\t\tdraw = new Drawing();\n\t\tframe.add(draw);\n\t\tinitial();\n\t\tinitialize();\n\t\tstartMove();\n\t}",
"@Override protected void startup() {\n BlaiseGraphicsTestFrameView view = new BlaiseGraphicsTestFrameView(this);\n canvas1 = view.canvas1;\n root1 = view.canvas1.getGraphicRoot();\n canvas1.setSelectionEnabled(true);\n show(view);\n }",
"private void configure() {\n\t\tthis.pressedListener = new EventHandler<MouseEvent>() {\n\t\t\t@Override\n\t\t\tpublic void handle(MouseEvent me) {\n\t\t\t\tstartDragX = me.getSceneX();\n\t\t\t\tstartDragY = me.getSceneY();\n\t\t\t\tstartNodeX = getTranslateX();\n\t\t\t\tstartNodeY = getTranslateY();\n\t\t\t\tstartWidth = getMaxWidth();\n\t\t\t\tstartHeight = getMaxHeight();\n\t\t\t}\n\t\t};\n\t\ttopDragger.setOnMousePressed(this.pressedListener);\n\t\tbottomDragger.setOnMousePressed(this.pressedListener);\n\t\tleftDragger.setOnMousePressed(this.pressedListener);\n\t\trightDragger.setOnMousePressed(this.pressedListener);\n\n\t\tsetTop(topDragger);\n\t\tsetBottom(bottomDragger);\n\t\tsetLeft(leftDragger);\n\t\tsetRight(rightDragger);\n\t\tsetCenter(center);\n\t\tbuildDragListeners();\n\t\tbuildResizeListeners();\n\t}",
"public void create() {\n \n EventHandler filter2 = \n new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent event) {\n /*sim.updateCanvasMouseCoordinates(event.getX(), event.getY());\n sim.screenMouseX = event.getScreenX();\n sim.screenMouseY = event.getScreenY();\n sim.sceneMouseX = event.getSceneX();\n sim.sceneMouseY = event.getSceneY();*/\n //System.out.println(\"H: \" + spCanvasContainer.getHvalue() + \" Y:\" + spCanvasContainer.getVvalue());\n //System.out.println(\"Hm: \" + spCanvasContainer.getHmax() + \" Ym:\" + spCanvasContainer.getVmax());\n //System.out.println(\"Move: \" + canvasMouseX + \" Y:\" + canvasMouseY);\n }\n };\n this.addEventFilter(MouseEvent.ANY, filter2);\n\n this.setOnMouseClicked(new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent event) {\n //onMouseClick(event.getX(), event.getY());\n if (event.getButton() == MouseButton.PRIMARY) {\n onLeftClick(event.getX(), event.getY());\n //scenario.leftClick(event.getX(), event.getY());\n //event.consume();\n }\n else if (event.getButton() == MouseButton.SECONDARY) {\n onRightClick(event.getX(), event.getY());\n //scenario.rightClick(event.getX(), event.getY());\n }\n }\n });\n\n this.setOnMousePressed(new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent event) {\n if (event.getButton() == MouseButton.PRIMARY) {\n onLeftPressed(event.getX(), event.getY());\n }\n else if (event.getButton() == MouseButton.SECONDARY) {\n onRightPressed(event.getX(), event.getY());\n }\n }\n });\n\n this.setOnMouseDragged(new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent event) {\n if (event.getButton() == MouseButton.PRIMARY) {\n onLeftDragged(event.getX(), event.getY());\n }\n else if (event.getButton() == MouseButton.SECONDARY) {\n onRightDragged(event.getX(), event.getY());\n }\n }\n });\n\n this.setOnMouseReleased(new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent event) {\n //draggingWell = null;\n //onMouseDragged(event.getX(), event.getY());\n /*if (event.isPrimaryButtonDown()) {\n // scenario.onMouseDrag(event.getX(), event.getY());\n event.consume();\n }\n else if (event.isSecondaryButtonDown()) {\n }*/\n }\n });\n\n this.setOnMouseMoved(new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent event) {\n onMouseMove(event.getX(), event.getY());\n }\n });\n }",
"private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 694, 705);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tt1 = new JTextArea();\r\n\t\tt1.setBounds(100, 116, 413, 176);\r\n\t\tframe.getContentPane().add(t1);\r\n\t\tt1.addMouseListener(this);\r\n\t\tt1.addMouseMotionListener(this);\r\n\t\t\r\n\t\tl1 = new JLabel(\"Ans\");\r\n\t\tl1.setBounds(158, 413, 287, 59);\r\n\t\tframe.getContentPane().add(l1);\r\n\t}",
"void initFrame(PApplet sketch);",
"private void initialSetup() {\n\t\tcaretTimer = new Timeline(new KeyFrame(Duration.millis(GlobalAppSettings.caretBlinkRate), new EventHandler<ActionEvent>(){\r\n\t\t\t@Override\r\n\t\t public void handle(ActionEvent event) {\r\n\t\t\t\tisCaretVisible = !isCaretVisible;\t\t\t\t\r\n\t\t\t\tif(caretParagraph!= null && caretIndex == anchor) {\r\n\t\t\t\t\ttextModifyFacade.getLineViewWithIndex(caretIndex).getColumnView().getDocumentView().refreshOverlay();\r\n\t\t\t\t}\r\n\t\t }\r\n\t\t}));\r\n\t\tcaretTimer.setCycleCount(-1);\r\n\t\tcaretTimer.play();\r\n\t\t\r\n\t\tcaretMovementTimer = new Timeline(new KeyFrame(Duration.millis(GlobalAppSettings.fastDeviceFrameMillis), new EventHandler<ActionEvent>(){\r\n\t\t\t@Override\r\n\t\t public void handle(ActionEvent event) {\r\n\t\t\t\ttotalDestination += GlobalAppSettings.fastDeviceFrameMillis;\r\n\t\t\t\tscreenX = interpolation.apply(startX, destinationX, totalDestination / GlobalAppSettings.caretMovementTime);\r\n\t\t\t\tscreenY = interpolation.apply(startY, destinationY, totalDestination / GlobalAppSettings.caretMovementTime);\r\n\t\t\t\tif(totalDestination > GlobalAppSettings.caretMovementTime){\r\n\t\t\t\t\tscreenX = destinationX;\r\n\t\t\t\t\tscreenY = destinationY;\r\n\t\t\t\t\tcaretMovementTimer.stop();\r\n\t\t\t\t\ttotalDestination = 0;\r\n\t\t\t\t}\r\n\t\t\t\tif(caretParagraph!= null && caretIndex == anchor) {\r\n\t\t\t\t\ttextModifyFacade.getLineViewWithIndex(caretIndex).getColumnView().getDocumentView().refreshOverlay();\r\n\t\t\t\t}\r\n\t\t }\r\n\t\t}));\r\n\t\tcaretMovementTimer.setCycleCount(-1);\r\n\t\t\r\n\t\tcaretIndex = 0;\r\n\t\tanchor = 0;\r\n\t}",
"public DrawGUI() {\n\n\t\tthis.setTitle(\"Draw 0.2\");\n\t\tsetIconImage(Toolkit.getDefaultToolkit().getImage(\"img/logo.png\"));\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\tdrawingContainer = new DrawingContainer();\n\t\tscrollpane = new JScrollPane(drawingContainer);\n\n\t\tcontroller = new DrawingController(this);\n\t\ttools = new ToolBox(controller);\n\t\tcontroller.newDrawing(new Dimension(500, 380));\n\n\t\t// statusBar = new StatusBar();\n\n\t\tgetContentPane().add(tools, BorderLayout.WEST);\n\t\tgetContentPane().add(scrollpane, BorderLayout.CENTER);\n\t\t// getContentPane().add(statusBar, BorderLayout.SOUTH);\n\n\t\tMenuListener mainMenuListener = new MenuListener(controller);\n\t\tJMenuBar mainMenu = new MainMenu(mainMenuListener);\n\t\tthis.setJMenuBar(mainMenu);\n\n\t\tpack();\n\t\tsetVisible(true);\n\n\t}",
"public LafPaintFrame() {\n initComponents();\n add(canvas);\n \n /*\n try {\n img = ImageIO.read(new File(\"D:\\\\kishida\\\\java\\\\trial\\\\nb6m10\\\\Laftan\\\\laf.png\"));\n } catch (IOException e) {\n }*/\n \n undoMan.setLimit(30);\n saveAction.putValue(Action.ACCELERATOR_KEY, \n KeyStroke.getKeyStroke(KeyEvent.VK_S, ActionEvent.CTRL_MASK));\n btnSave.setAction(saveAction);\n miSave.setAction(saveAction);\n \n undoAction.putValue(Action.ACCELERATOR_KEY, \n KeyStroke.getKeyStroke(KeyEvent.VK_Z, ActionEvent.CTRL_MASK));\n btnUndo.setAction(undoAction);\n miUndo.setAction(undoAction);\n\n redoAction.putValue(Action.ACCELERATOR_KEY, \n KeyStroke.getKeyStroke(KeyEvent.VK_Y, ActionEvent.CTRL_MASK));\n btnRedo.setAction(redoAction);\n miRedo.setAction(redoAction);\n \n undoUpdate();\n \n //色設定ボタン\n Color[] colors = {\n Color.BLACK, Color.GRAY, Color.LIGHT_GRAY, Color.WHITE,\n Color.RED, Color.GREEN, Color.BLUE, Color.YELLOW,Color.ORANGE\n };\n boolean first = true;\n for(Color col : colors){\n JToggleButton tb = new JToggleButton();\n tb.setBackground(col);\n tb.setText(\" \");\n tb.setMinimumSize(new Dimension(32, 32));\n tb.setPreferredSize(new Dimension(32, 32));\n bgColor.add(tb);\n tbColor.add(tb);\n if(first){\n tb.setSelected(true);\n selectedColor = tb.getBackground();\n first = false;\n }\n tb.addActionListener(ae -> {\n selectColor(((JToggleButton)ae.getSource()).getBackground());\n });\n }\n \n actions.put(\"LINE\", new DrawLine());\n actions.put(\"FILL\", new DrawFillLine());\n actions.put(\"ERASE\", new Erase());\n canvas.addMouseListener(new MouseListener(){\n\n public void mouseClicked(MouseEvent e) {\n }\n\n public void mousePressed(MouseEvent e) {\n Draw d = actions.get(getMode());\n if(d == null) return;\n d.canvasMousePressed(e);\n }\n\n @Override\n public void mouseReleased(MouseEvent e) {\n Draw d = actions.get(getMode());\n if(d == null) return;\n d.canvasMouseReleased(e);\n }\n\n @Override\n public void mouseEntered(MouseEvent e) {\n Draw d = actions.get(getMode());\n if(d == null) return;\n d.canvasMouseEntered(e);\n }\n\n @Override\n public void mouseExited(MouseEvent e) {\n Draw d = actions.get(getMode());\n if(d == null) return;\n d.canvasMouseExited(e);\n }\n\n });\n canvas.addMouseMotionListener(new MouseMotionListener(){\n @Override\n public void mouseDragged(MouseEvent e) {\n Draw d = actions.get(getMode());\n if(d == null) return;\n d.canvasMouseDragged(e);\n }\n\n @Override\n public void mouseMoved(MouseEvent e) {\n }\n });\n \n }",
"public DrawCanvas(DrawConsoleUI drawConsole) {\n /*Call the super constructor and set the background colour*/\n super();\n this.setBackground(Color.white);\n\n /*Set the size of this component*/\n this.setPreferredSize(new Dimension(970,800));\n\n /*Enable autoscroll for this panel, when there is a need to\n update component's view*/\n this.setAutoscrolls(true);\n\n /*Construct a list that will hold the shapes*/\n //shapesBuffer = Collections.synchronizedList(new ArrayList());\n labelBuffer = Collections.synchronizedList(new ArrayList());\n\n /*Hold a reference to the DrawConsoleUI class*/\n drawConsoleUI = drawConsole;\n\n \n /***\n * Register Listeners to the canvas\n */\n\n /*Mouse move*/\n this.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {\n public void mouseMoved(java.awt.event.MouseEvent evt) {\n //panelMouseMoved(evt);\n }//end mouse motion moved\n\n public void mouseDragged(java.awt.event.MouseEvent evt) {\n try {\n panelMouseDragged(evt);\n } catch (Exception e) {e.getMessage(); }\n }//end mouse motion Dragged\n });\n\n /*Mouse Clicked*/\n this.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n try {\n panelMouseClicked(evt);\n } catch (Exception e) {e.getMessage(); }\n }//end\n\n /*Mouse Pressed*/\n public void mousePressed(java.awt.event.MouseEvent evt) {\n try {\n panelMousePressed(evt);\n } catch (Exception e) {e.getMessage(); }\n }//end\n\n /*Mouse Released*/\n public void mouseReleased(java.awt.event.MouseEvent evt) {\n try {\n panelMouseReleased(evt);\n } catch (Exception e) {e.getMessage(); }\n }//end\n });\n\n\n }",
"public DrawFrame() \n {\n //Initiate title and layout of frame\n super( \"SuperPaint Application!\" );\n setLayout( new BorderLayout() );\n setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );\n setSize( 600, 600 );\n \n //Initiate draw panel and add it to the center\n panel = new DrawPanel( new JLabel(\"Use mouse to draw.\") );\n add( panel, BorderLayout.CENTER );\n \n //Initiate a panel to store buttons\n buttonJPanel = new JPanel();\n buttonJPanel.setLayout( new GridLayout( 1, AMOUNTOFBUTTONS, 20, 0 ));\n \n //Initiate JButtons and add to panel\n undoButton = new JButton(\"Undo\");\n buttonJPanel.add(undoButton);\n redoButton = new JButton(\"Redo\");\n buttonJPanel.add(redoButton);\n clearButton = new JButton(\"Clear\");\n buttonJPanel.add(clearButton);\n \n //Iniiate ComboBoxes and add to panel\n colorsJComboBox = new JComboBox( colorNames );\n colorsJComboBox.setMaximumRowCount(13);\n buttonJPanel.add(colorsJComboBox);\n shapesJComboBox = new JComboBox( shapeNames );\n shapesJComboBox.setMaximumRowCount(3);\n buttonJPanel.add(shapesJComboBox);\n \n //Initiate CheckBoxes and add to panel\n filledJCheckBox = new JCheckBox( \"Filled\" );\n buttonJPanel.add(filledJCheckBox);\n\n //Add button panel into draw panel\n add(buttonJPanel, BorderLayout.NORTH);\n \n //BUTTON HANDLING\n //Assign JButtons to handler\n ButtonHandler buttonHandler = new ButtonHandler();\n undoButton.addActionListener( buttonHandler );\n redoButton.addActionListener( buttonHandler );\n clearButton.addActionListener( buttonHandler );\n \n //Assign CheckBoxes to handler\n CheckBoxHandler checkBoxHandler = new CheckBoxHandler();\n filledJCheckBox.addItemListener( checkBoxHandler );\n \n //Assign Comboxes to handler \n ComboBoxHandler comboBoxHandler = new ComboBoxHandler();\n colorsJComboBox.addItemListener( comboBoxHandler );\n shapesJComboBox.addItemListener( comboBoxHandler );\n \n //Make frame visible\n setVisible( true );\n }",
"public Canvas(MainWindow main){\n super();\n this.setBounds(0, 0, Const.WINDOW_SIZE, Const.WINDOW_SIZE); //Seta o tamanho do canvas\n this.init(); //Chama as threads\n }",
"public PencilDrawing() //default constructor\n {\n \n super(\"Pencil Draw\");\n \n Toolkit tk = Toolkit.getDefaultToolkit(); //so that the frame fills the screen\n Dimension dim = tk.getScreenSize();\n setBounds(0,0, dim.width, dim.height);\n points = new PointData();\n \n //place buttons\n buttonPanel = new JPanel();\n eraseButton = new JButton(\"Erase\");\n colorButton = new JButton(\"Color\");\n exitButton = new JButton(\"Exit\");\n buttonPanel.add(eraseButton);\n buttonPanel.add(colorButton);\n buttonPanel.add(exitButton);\n add(buttonPanel, BorderLayout.SOUTH);\n \n //place the drawing panel in the frame\n paper = new JPanel();\n add(paper);\n \n //register the mouse listners\n addMouseListener(new MouseButtonListener());\n addMouseMotionListener(new MoveMouseListener());\n \n //register the button listener\n eraseButton.addActionListener(new ButtonListener());\n colorButton.addActionListener(new ButtonListener());\n exitButton.addActionListener(new ButtonListener());\n setResizable(false);\n setVisible(true);\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n \n }",
"private void initControl(){\n cleared=0;\n scoreboard=new Scoreboard();\n timer=new Timer();\n grid=new Grid(mouseEvent);\n cells=grid.getGrid();\n setTop(scoreboard);\n setCenter(grid);\n startButtonAction();\n }",
"public CanvasPanel() {\n\t \t\taddMouseListener(this);\n\t \t\taddMouseMotionListener(this);\n\t }",
"public void initialize(){\n\t\ttoolBar.setDrawingPanel(drawingPanel);\n\t\t// component initialization\n\t\tmenuBar.initialize();\t\n\t\ttoolBar.initialize();\t\n\t\tdrawingPanel.initialize();\n\t\t\n\t\t\n\t}",
"public void initialize() {\n\t\t/*\n\t\t * one Jpanel in the north which contains two buttons and one textfield:\n\t\t * open, quit buttons and textfield that shows the name of the file\n\t\t */\n\t\tJPanel myPanel1 = new JPanel();\n\t\tthis.add(myPanel1,BorderLayout.NORTH);\n\t\t\n\t\tmyPanel1.add(openbt);\n\t\topenbt.addActionListener(this);\n\t\tfilename.setEditable(false);\n\t\tmyPanel1.add(filename);\n\t\tmyPanel1.add(quitbt);\n\t\tquitbt.addActionListener(this);\n\n\t\t//one Jcomponent in the centre for the drawing area\n\t\tthis.add(plotContent,BorderLayout.CENTER);\n\t\t\n\t\t/*\n\t\t * one Jpanel in the south that has two combobox and one textarea\n\t\t * the comboboxes can change the column used for the x axis and y axis\n\t\t * the text area shows the corresponding trade that has be clicked\n\t\t */\n\t\tJPanel myPanel2 = new JPanel();\n\t\tthis.add(myPanel2,BorderLayout.SOUTH);\n\t\tString[] options1 = { \"YIELD\", \"DAYS_TO_MATURITY\", \"AMOUNT_CHF(000)\"};\n\t\tString[] options2 = { \"DAYS_TO_MATURITY\", \"YIELD\", \"AMOUNT_CHF(000)\"};\n\t\txcb = new JComboBox(options1);\n\t\tycb = new JComboBox(options2);\n\t\tmyPanel2.add(xcb);\n\t\tmyPanel2.add(ycb);\n\t\txcb.addItemListener(this);\n\t\tycb.addItemListener(this);\n\t\ttradedetail.setEditable(false);\n\t\tmyPanel2.add(tradedetail);\t\n\t}",
"public void show() {\n\t\tJFrame frame = new JFrame(\"Canvas\");\r\n\r\n\t\tContainer content = frame.getContentPane();\r\n\t\t// set layout on content pane\r\n\t\tcontent.setLayout(new BorderLayout());\r\n\t\t// create draw area\r\n\t\tcanvas = new Canvas(dos, dis);\r\n\t\t\r\n\t\t\r\n\t\t// add to content pane\r\n\t\tcontent.add(canvas, BorderLayout.CENTER);\r\n\t\tJPanel controls = new JPanel();\r\n\t\tframe.addComponentListener(new ComponentListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void componentHidden(ComponentEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void componentMoved(ComponentEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void componentResized(ComponentEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t/*\tSystem.out.println(\"Frame size : \" + frame.getSize());\r\n\t\t\t\tSystem.out.println(\"Canvas size : \" + canvas.getSize());\r\n\t\t\t\tSystem.out.println(\"Control panel size : \" + controls.getSize());\r\n\t\t\t\tcanvas.validate();*/\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void componentShown(ComponentEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\t\r\n\t\t// create controls to apply colors and call clear feature\r\n\t\t/*JPanel controls = new JPanel();*/\r\n\r\n\t\tclearBtn.addActionListener(actionListener);\r\n\t\tblackBtn.addActionListener(actionListener);\r\n\t\tblueBtn.addActionListener(actionListener);\r\n\t\tgreenBtn.addActionListener(actionListener);\r\n\t\tredBtn.addActionListener(actionListener);\r\n\t\tmagentaBtn.addActionListener(actionListener);\r\n\t\tyellowBtn.addActionListener(actionListener);\r\n\r\n\t\t// add to panel\r\n\t\tcontrols.add(greenBtn);\r\n\t\tcontrols.add(blueBtn);\r\n\t\tcontrols.add(blackBtn);\r\n\t\tcontrols.add(redBtn);\r\n\t\tcontrols.add(magentaBtn);\r\n\t\tcontrols.add(yellowBtn);\r\n\t\tcontrols.add(clearBtn);\r\n\r\n\t\t// add to content pane\r\n\t\tcontent.add(controls, BorderLayout.NORTH);\r\n\r\n\t\tframe.setSize(600, 600);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t// show the swing paint result\r\n\t\tframe.setVisible(true);\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 void init() {\n fIconkit = new Iconkit(this);\n\n\t\tsetLayout(new BorderLayout());\n\n fView = createDrawingView();\n\n Panel attributes = createAttributesPanel();\n createAttributeChoices(attributes);\n add(\"North\", attributes);\n\n Panel toolPanel = createToolPalette();\n createTools(toolPanel);\n add(\"West\", toolPanel);\n\n add(\"Center\", fView);\n Panel buttonPalette = createButtonPanel();\n createButtons(buttonPalette);\n add(\"South\", buttonPalette);\n\n initDrawing();\n setBufferedDisplayUpdate();\n setupAttributes();\n }",
"@Override\n public void simpleInitApp() {\n this.viewPort.setBackgroundColor(ColorRGBA.LightGray);\n im = new InteractionManager();\n setEdgeFilter();\n initEnemies();\n initCamera();\n initScene();\n initPlayer();\n initCrossHairs();\n }",
"@Override\n public void setup() {\n strokeWeight(1);\n smooth();\n textMode(SHAPE);\n origin = new PVector(width / 2, height / 2,0);\n size = 2000;\n zoom = 1.5f;\n rX = -0.51f;\n rY = -0.65f;\n arm = new Arm(this);\n ik = new InverseK(arm.getL());\n angles = new double[]{0,0,0};\n }",
"public void draw() {\n\t\tif (fill) {\n\t\t\tapplet.noStroke();\n\t\t\tapplet.fill(color);\n\t\t} else {\n\t\t\tapplet.noFill();\n\t\t\tapplet.stroke(color);\n\t\t}\n\t\tapplet.rect(position.x, position.y, size.x, size.y);\n\t\tsliderButton.draw(new PVector(-10,0));\n\t}",
"public void button2Pushed(ActionEvent event)\r\n {\n GraphicsContext gc = canvas.getGraphicsContext2D();\r\n \r\n gc.clearRect(0, 0, canvas.getWidth(), canvas.getHeight());\r\n \r\n //draw line from 0,0 to lower right\r\n for (int start = 0; start <= canvas.getWidth(); start += 20)\r\n gc.strokeLine(start, canvas.getHeight()-start, canvas.getWidth(), canvas.getHeight());\r\n \r\n \r\n for (int start = 0; start <= canvas.getWidth(); start += 20)\r\n gc.strokeLine(0, 0, start, canvas.getHeight()-start);\r\n \r\n }",
"@Override\n public void start(Stage primaryStage) throws Exception {\n BorderPane root = new BorderPane();\n\n // setup canvas\n canvas = new Canvas(700, 700);\n canvas.setOnMouseClicked(this::handleCanvasClick);\n root.setCenter(canvas);\n\n // setup button bar\n HBox buttonBar = new HBox();\n\n Button pointsButton = new Button(\"Generate points\");\n pointsButton.setOnAction(this::generatePoints);\n\n Button voronoiButton = new Button(\"Generate Voronoi\");\n voronoiButton.setOnAction(this::generateVoronoi);\n\n Button relaxButton = new Button(\"Relax sites\");\n relaxButton.setOnAction(this::relaxSites);\n\n buttonBar.getChildren().addAll(pointsButton, voronoiButton, relaxButton);\n\n root.setBottom(buttonBar);\n\n // show\n Scene scene = new Scene(root);\n primaryStage.setScene(scene);\n primaryStage.show();\n }",
"public void setup()\n{\n\t//CANVAS\n\tpP = (pCompleta == true)? 1 : proporcionP;\n\tsize(displayWidth/pP, displayHeight/pP, P3D);\n\tpW=width;pH=height;\n\tframe.setResizable(pDeformable);\n\t//SYPHON SERVER\n\tserver \t= new SyphonServer(this, nombreServer);\n\t//AUDIO\n\tminim \t= new Minim(this);\n\tin0 \t= minim.getLineIn(estereo, buffer, sampleR, profBit);\n\t// ... escribe tu setup aqu\\u00ed\n \n\n \n\n\n \n}",
"public JVDraw() {\r\n\t\tsetDefaultCloseOperation(DISPOSE_ON_CLOSE);\r\n\t\tsetLocation(250, 250);\r\n\t\tsetSize(500, 500);\r\n\t\tsetTitle(\"JVDraw\");\r\n\r\n\t\tsetLayout(new BorderLayout());\r\n\r\n\t\tJPanel toolbar = new JPanel(new FlowLayout(FlowLayout.LEFT));\r\n\r\n\t\tJColorArea jca = new JColorArea(Color.BLACK);\r\n\t\tJColorArea jca2 = new JColorArea(Color.WHITE);\r\n\r\n\t\ttoolbar.add(jca);\r\n\t\ttoolbar.add(jca2);\r\n\t\tShapeButtons sbg = new ShapeButtons(Shape.LINE);\r\n\t\ttoolbar.add(sbg);\r\n\t\tadd(toolbar, BorderLayout.NORTH);\r\n\r\n\t\tdrawingModel = new DrawingModelImpl();\r\n\t\tdrawingCanvas = new JDrawingCanvas(drawingModel);\r\n\r\n\t\tadd(drawingCanvas, BorderLayout.CENTER);\r\n\r\n\t\tdrawingModel.addDrawingModelListener(drawingCanvas);\r\n\t\tmouseCreator = new MouseCreator(drawingModel, jca, jca2, sbg);\r\n\t\tdrawingCanvas.addMouseListener(mouseCreator);\r\n\t\tdrawingCanvas.addMouseMotionListener(mouseCreator);\r\n\r\n\t\tlistModel = new DrawingObjectListModel(drawingModel);\r\n\t\tdrawingModel.addDrawingModelListener(listModel);\r\n\r\n\t\tadd(new DrawingObjectList(listModel), BorderLayout.EAST);\r\n\r\n\t\tJMenuBar menuBar = new JMenuBar();\r\n\t\tsetJMenuBar(menuBar);\r\n\t\tJMenu fileMenu = new JMenu(\"File\");\r\n\t\tmenuBar.add(fileMenu);\r\n\t\tfileMenu.add(new OpenAction(this));\r\n\t\tfileMenu.add(new SaveAction(this));\r\n\t\tfileMenu.add(new SaveAsAction(this));\r\n\t\tfileMenu.add(new ExportAction(this));\r\n\t\tfileMenu.add(new ExitAction(this));\r\n\r\n\t\tdrawingModel.addDrawingModelListener(new DrawingModelListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void objectsRemoved(DrawingModel source, int index0, int index1) {\r\n\t\t\t\tmodified = true;\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void objectsChanged(DrawingModel source, int index0, int index1) {\r\n\t\t\t\tmodified = true;\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void objectsAdded(DrawingModel source, int index0, int index1) {\r\n\t\t\t\tmodified = true;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tadd(new StatusBar(jca, jca2), BorderLayout.SOUTH);\r\n\t}",
"private void enableDrag() {\n final Delta dragDelta = new Delta();\n setOnMousePressed((MouseEvent mouseEvent) -> {\n // record a delta distance for the drag and drop operation.\n if(isDragEnabled) {\n dragDelta.x = getCenterX() - mouseEvent.getX();\n dragDelta.y = getCenterY() - mouseEvent.getY();\n }\n });\n setOnMouseDragged((MouseEvent mouseEvent) -> {\n if(isDragEnabled) {\n double newX = mouseEvent.getX() + dragDelta.x;\n if (newX > 0 && newX < getScene().getWidth()) {\n setCenterX(newX);\n if(this == base)\n startX = getCenterX();\n }\n double newY = mouseEvent.getY() + dragDelta.y;\n if (newY > 0 && newY < getScene().getHeight()) {\n setCenterY(newY);\n if(this == base)\n startY = getCenterY();\n }\n }\n });\n }",
"public void setup() {\n\t\t//This throws an exception and causes us to reenter once \"frame\" exists\n\t\tsize(VIEW_WIDTH,VIEW_HEIGHT,P2D);\n\t\ttxt = createFont(\"Vera.ttf\",90,true);\n\t\tframeRate(60);\n\t\tif (!frame.isResizable()){\n\t\t\tframe.setResizable(true);\n\t\t}\n\t}",
"public void init() {\n startMenuActionListener = new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n if (e.getActionCommand().equals(\"START\")) {\n startMenu = false;\n LevelIntermission = true;\n LevelIntermissionCount = 0;\n reset();\n requestFocusInWindow();\n }\n else if (e.getActionCommand().equals(\"EXIT\")){\n System.exit(0);\n }\n }\n };\n \n // Activating the Key Listener to listen to the applet\n this.addKeyListener(this);\n startButton = new Button(\"START\");\n exitButton = new Button(\"EXIT\");\n startButton.addActionListener(startMenuActionListener);\n exitButton.addActionListener(startMenuActionListener);\n startMenu = true;\n LevelIntermission = false;\n \n // default weapon is bullets\n one = true;\n two = false;\n three = false;\n \n // Setteing the length and width of the User Imterface\n backgroundX = 1200;\n backgroundY = 650;\n this.setSize(backgroundX, backgroundY);\n \n // Creating backround image\n offScreen = createImage(backgroundX, backgroundY);\n offG = offScreen.getGraphics();\n \n // Starting the timer - 50 frames a seconds\n timer = new Timer(20, this);\n }",
"public void setup() {\n\t\tthis.image = new BufferedImage(maxXPos, maxYPos, BufferedImage.TYPE_4BYTE_ABGR);\n\t\tthis.graphics = getImage().createGraphics();\n\t}",
"public void start() {\n\t\tcanvas.createBufferStrategy(2);\n\t\tbuffer = canvas.getBufferStrategy();\n\t\tthread = new Thread(this);\n\t\tthread.start();\n\t}",
"public void start() {\r\n loadSoundFiles();\r\n addChangeListeners();\r\n createQueues();\r\n sendQueue();\r\n addKeyListener(myKeyAdapter);\r\n setResizable(false);\r\n final JPanel previewPanel = new JPanel(new BorderLayout(), true);\r\n previewPanel.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED));\r\n previewPanel.add(myPiecePanel, BorderLayout.NORTH);\r\n previewPanel.add(myInfoPanel, BorderLayout.CENTER);\r\n final JPanel borderPanel = new JPanel();\r\n borderPanel.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED));\r\n borderPanel.add(myTetrisPanel);\r\n getContentPane().add(borderPanel, BorderLayout.WEST);\r\n getContentPane().add(previewPanel, BorderLayout.CENTER);\r\n setJMenuBar(myTetrisMenuBar);\r\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n setVisible(true);\r\n setLocationRelativeTo(null);\r\n pack();\r\n }",
"public void setUpView() {\n\n\n\t\t//Make the components\n\t\tinputAnswer = new Button(\"Submit\");\n\t\tbegin\t\t= new Button(\"Begin level \" + gameLevel);\n\t\tblueButt\t= new Button();\n\t\tredButt = new Button();\n\t\tgreenButt = new Button();\n\t\tyellowButt = new Button();\n\t\tclear = new Button(\"Clear\");\n\t\tguessArea = new TextArea();\n\t\ttopPan = new Panel();\n\t\tinstructLab = new Label(\"Welcome to the great guessing game. Try and finish it, its fun honest!\");\n\t\treset = new Button(\"Start again?\");\n\t\tpointsLab = new Label(\"Points: \" + points);\n\t\t\n\t\t//Change the font\n\t\tFont font = new Font(\"Verdana\", Font.BOLD, 18);\n\t\tinstructLab.setFont(font);\n\t\t\n\t\t//Add the label to the top panel\n\t\ttopPan.add(instructLab);\n\t\t\n\t\t//Set layout\n\t\tsetLayout(new MigLayout());\n\t\n\t\t//Set the size of the components\n\t\tblueButt.setPreferredSize (new Dimension(60, 50));\n\t\tredButt.setPreferredSize (new Dimension(60, 50));\n\t\tgreenButt.setPreferredSize (new Dimension(60, 50));\n\t\tyellowButt.setPreferredSize(new Dimension(60, 50));\n\t\tguessArea.setPreferredSize (new Dimension(50, 10));\n\t\tpointsLab.setPreferredSize (new Dimension(100, 30));\n\t\t\n\t\t//Turn the submit button of until there is something to submit\n\t\tinputAnswer.setEnabled(false);\n\n\t\t//Set the button colour\n\t\tblueButt.setBackground (Color.blue);\n\t\tredButt.setBackground (Color.red);\n\t\tgreenButt.setBackground (Color.green);\n\t\tyellowButt.setBackground(Color.yellow);\n\t\t\n\t\t//Hide the reset button until it is needed\n\t\treset.setVisible(false);\n\n\t\t//Add the components to the applet\n\t\tadd(topPan, \"wrap\");\n\t\tadd(redButt, \"cell 0 1\");\n\t\tadd(blueButt, \"cell 0 1\");\t\t\n\t\tadd(greenButt, \"cell 0 1\");\n\t\tadd(yellowButt, \"cell 0 1\");\n\t\tadd(begin, \"wrap\");\n\t\tadd(guessArea, \"wrap\");\n\t\tadd(inputAnswer,\"split 2\");\t\n\t\tadd(clear, \"gap left 340, cell 0 2, wrap\");\n\t\tadd(reset, \t\t\"wrap\");\n\t\tadd(pointsLab);\n\n\n\n\t\t//If the status bar is present show the user there level\n\t\tshowStatus(\"You are on level: \" + gameLevel);\n\n\n\t\t//Set the size of the applet\n\t\tsetSize(new Dimension(1000, 1000));\n\n\t}",
"public void init() {\n\t\t\n\t\tmarkerCircle.setFilled(true);\n\t\t\n\t\tstartButton = new JButton(\"Start\"); \n\t\tadd(startButton, EAST);\n\t\t\n\t\tstopButton = new JButton(\"Stop\");\n\t\tadd(stopButton, EAST);\n\t\t\n\t\tflipDirection = new JButton(\"Change rotation\");\n\t\tadd(flipDirection, EAST);\n\t\t\n\t\tdoneWithFigure = new JButton(\"Next Figure\");\n\t\tadd(doneWithFigure, SOUTH);\n\t\t\n\t\tremoveLast = new JButton(\"Remove Figure\");\n\t\tadd(removeLast, SOUTH);\n\t\t\n\t\tclear = new JButton(\"Clear\");\n\t\tadd(clear, SOUTH);\n\t\t\n\t\tadd(new JLabel(\"Speed\"), EAST);\n\t\tspeedSlider = new JSlider(MIN_BREAK, MAX_BREAK, TIME_FACTOR);\n\t\tspeedSlider.addChangeListener(this);\n\t\tadd(speedSlider, EAST);\n\t\t\n\t\tadd(new JLabel(\"Red\"), EAST);\n\t\tredSlider = new JSlider(MIN_RGB, MAX_RGB, MIN_RGB);\n\t\tredSlider.addChangeListener(this);\n\t\tadd(redSlider, EAST);\n\t\t\n\t\tadd(new JLabel(\"Green\"), EAST);\n\t\tgreenSlider = new JSlider(MIN_RGB, MAX_RGB, MIN_RGB);\n\t\tgreenSlider.addChangeListener(this);\n\t\tadd(greenSlider, EAST);\n\t\t\n\t\tadd(new JLabel(\"Blue\"), EAST);\n\t\tblueSlider = new JSlider(MIN_RGB, MAX_RGB, MIN_RGB);\n\t\tblueSlider.addChangeListener(this);\n\t\tadd(blueSlider, EAST);\n\t\t\n\t\tJLabel spacer = new JLabel(\"\");\n\t\tadd(spacer, EAST);\n\t\t\n\t\tcolorBox = new GRect(0,0,COLOR_BOX_SIZE,COLOR_BOX_SIZE);\n\t\tcolorBox.setFilled(true);\n\t\tadd(colorBox);\n\t\t\n\t\tcenter = new JButton(\"Center Figure\");\n\t\tadd(center, EAST);\n\t\t\n\t\tliftPen = new JButton(\"Toggle Pen\");\n\t\tadd(liftPen, EAST);\n\t\t\n\t\tmakeItCool = new JButton(\"Make it Cool\");\n\t\tadd(makeItCool, SOUTH);\n\t\t\n\t\t\n\t\taddMouseListeners();\n\t\taddActionListeners();\n\t}",
"private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 800, 640);\n\t\tframe.setTitle(\"Graphite\");\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tJPanel mainPanel = new JPanel();\n\t\tframe.getContentPane().add(mainPanel);\n\t\tGridBagLayout gbl_mainPanel = new GridBagLayout();\n\t\tgbl_mainPanel.columnWidths = new int[]{0,0};\n\t\tgbl_mainPanel.rowHeights = new int[]{0, 0};\n\t\tgbl_mainPanel.columnWeights = new double[]{1.0, Double.MIN_VALUE};\n\t\tgbl_mainPanel.rowWeights = new double[]{1.0, Double.MIN_VALUE};\n\t\tmainPanel.setLayout(gbl_mainPanel);\n\t\t\n\t\tdrawpad = new canvas();\n\t\tdrawpad.setDoubleBuffered(true);\n\t\tdrawpad.setBackground(Color.LIGHT_GRAY);\n\t\tGridBagConstraints gbc_drawpad = new GridBagConstraints();\n\t\tgbc_drawpad.gridwidth = 22;\n\t\tgbc_drawpad.gridheight = 2;\n\t\tgbc_drawpad.insets = new Insets(5, 5, 5, 5);\n\t\tgbc_drawpad.fill = GridBagConstraints.BOTH;\n\t\tgbc_drawpad.gridx = 0;\n\t\tgbc_drawpad.gridy = 0;\n\t\tmainPanel.add(drawpad, gbc_drawpad);\n\t\t\n\t\tJPanel sidePanel = new JPanel();\n\t\tGridBagConstraints gbc_sidePanel = new GridBagConstraints();\n\t\tgbc_sidePanel.gridheight = 2;\n\t\tgbc_sidePanel.insets = new Insets(5, 5, 5, 5);\n\t\tgbc_sidePanel.fill = GridBagConstraints.BOTH;\n\t\tgbc_sidePanel.gridx = 22;\n\t\tgbc_sidePanel.gridy = 0;\n\t\tmainPanel.add(sidePanel, gbc_sidePanel);\n\t\tGridBagLayout gbl_sidePanel = new GridBagLayout();\n\t\tgbl_sidePanel.columnWidths = new int[]{118};\n\t\tgbl_sidePanel.rowHeights = new int[]{25, 0, 0, 0, 0, 0, 0, 0, 0, 0};\n\t\tgbl_sidePanel.columnWeights = new double[]{1.0};\n\t\tgbl_sidePanel.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE};\n\t\tsidePanel.setLayout(gbl_sidePanel);\n\t\t\n\t\tJButton btnColorGraph = new JButton(\"Color Graph\");\n\t\tbtnColorGraph.setPreferredSize(new Dimension(120,25));\n\t\tGridBagConstraints gbc_btnColorGraph = new GridBagConstraints();\n\t\tgbc_btnColorGraph.anchor = GridBagConstraints.NORTHWEST;\n\t\tgbc_btnColorGraph.insets = new Insets(0, 0, 5, 0);\n\t\tgbc_btnColorGraph.gridx = 0;\n\t\tgbc_btnColorGraph.gridy = 0;\n\t\tsidePanel.add(btnColorGraph, gbc_btnColorGraph);\n\t\tbgpFunctions.add(btnColorGraph);\n\t\tbtnColorGraph.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tFunctions func = new Functions();\n\t\t\t\tgraph = func.colorGraph(graph);\n\t\t\t\tconsoleOut.setText(\"Colors: \"+graph.attributes.get(\"colors\")+\"\\nBipartite: \" + graph.attributes.get(\"bipartite\"));\n\t\t\t\tdrawpad.repaint();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton btnClear = new JButton(\"Clear\");\n\t\tbtnClear.setPreferredSize(new Dimension(120,25));\n\t\tGridBagConstraints gbc_btnClear = new GridBagConstraints();\n\t\tgbc_btnClear.insets = new Insets(5, 0, 5, 0);\n\t\tgbc_btnClear.anchor = GridBagConstraints.NORTHWEST;\n\t\tgbc_btnClear.gridx = 0;\n\t\tgbc_btnClear.gridy = 2;\n\t\tsidePanel.add(btnClear, gbc_btnClear);\n\t\tbtnClear.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tgraph = new AdjListGraph<Integer, Integer>();\n\t\t\t\tconsoleOut.setText(\"\");\n\t\t\t\tdrawpad.repaint();\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton btnHelp = new JButton(\"Help\");\n\t\tbtnHelp.setPreferredSize(new Dimension(120,25));\n\t\tGridBagConstraints gbc_btnHelp = new GridBagConstraints();\n\t\tgbc_btnHelp.insets = new Insets(0, 0, 5, 0);\n\t\tgbc_btnHelp.anchor = GridBagConstraints.NORTHWEST;\n\t\tgbc_btnHelp.gridx = 0;\n\t\tgbc_btnHelp.gridy = 3;\n\t\tsidePanel.add(btnHelp, gbc_btnHelp);\n\t\tbtnHelp.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tHelp help = new Help();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton btnFindPath = new JButton(\"Find Path\");\n\t\tbtnFindPath.setPreferredSize(new Dimension(120,25));\n\t\tGridBagConstraints gbc_btnFindPath = new GridBagConstraints();\n\t\tgbc_btnFindPath.insets = new Insets(0, 0, 5, 0);\n\t\tgbc_btnFindPath.gridx = 0;\n\t\tgbc_btnFindPath.gridy = 1;\n\t\tsidePanel.add(btnFindPath, gbc_btnFindPath);\n\t\tbtnFindPath.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tFunctions func = new Functions();\n\t\t\t\tgraph = func.findPath(graph, selected, altSelected);\n\t\t\t\tdrawpad.repaint();\n\t\t\t}\n\t\t});\n\t\t\n\t\tconsoleOut = new JTextArea();\n\t\tconsoleOut.setEditable(false);\n\t\tGridBagConstraints gbc_consoleOut = new GridBagConstraints();\n\t\tgbc_consoleOut.fill = GridBagConstraints.BOTH;\n\t\tgbc_consoleOut.gridx = 0;\n\t\tgbc_consoleOut.gridy = 8;\n\t\tsidePanel.add(consoleOut, gbc_consoleOut);\n\t\tconsoleOut.setPreferredSize(new Dimension(10,10));\n\t\t\n\t\t\n\t\tframe.setFocusTraversalPolicy(new FocusTraversalOnArray(new Component[]{drawpad}));\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\"> \n private void initComponents() {\n\n canvas3 = new java.awt.Canvas();\n\n setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseReleased(java.awt.event.MouseEvent evt) {\n formMouseReleased(evt);\n }\n });\n\n org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(0, size, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(0, 433, Short.MAX_VALUE)\n );\n }",
"public void init() {\n\t\t//initializing graphics area\n \tcanvas = new FacePamphletCanvas();\n \tadd(canvas);\n \t\n\t\taddInteractors();\n\t\taddActionListeners();\n }",
"public AutoClickGUI() {\n initComponents();\n this.getContentPane().setBackground(Color.WHITE);\n this.setLocationRelativeTo(null);\n this.Campo_X.setFocusable(false);\n this.Campo_Y.setFocusable(false);\n this.Btn_instrucciones.setFocusable(false);\n this.btn_chrome.setFocusable(false);\n this.btn_link_base.setFocusable(false);\n this.Campo_X.setEditable(false);\n this.Campo_Y.setEditable(false);\n this.setVisible(true);\n this.setResizable(false);\n this.setTitle(\"AutoClick\");\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n stepSlider = new javax.swing.JSlider();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n update = new javax.swing.JButton();\n stepState = new javax.swing.JLabel();\n Caculate = new javax.swing.JButton();\n showConnect = new javax.swing.JCheckBox();\n randLine = new javax.swing.JCheckBox();\n randInfect = new javax.swing.JCheckBox();\n widthSlider = new javax.swing.JSlider();\n heightSlider = new javax.swing.JSlider();\n drawPanel = new DrawPanel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBorder(new javax.swing.border.MatteBorder(null));\n\n stepSlider.setMajorTickSpacing(10);\n stepSlider.setMinorTickSpacing(1);\n stepSlider.setPaintLabels(true);\n stepSlider.setPaintTicks(true);\n stepSlider.setToolTipText(\"Time\");\n stepSlider.setValue(0);\n stepSlider.setAutoscrolls(true);\n stepSlider.addChangeListener(new javax.swing.event.ChangeListener() {\n public void stateChanged(javax.swing.event.ChangeEvent evt) {\n stepSliderStateChanged(evt);\n }\n });\n\n jLabel1.setText(\"width\");\n\n jLabel2.setText(\"height\");\n\n update.setText(\"Update\");\n update.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mousePressed(java.awt.event.MouseEvent evt) {\n updateMousePressed(evt);\n }\n });\n update.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n updateActionPerformed(evt);\n }\n });\n\n Caculate.setText(\"Caculate\");\n Caculate.setToolTipText(\"\");\n Caculate.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mousePressed(java.awt.event.MouseEvent evt) {\n CaculateMousePressed(evt);\n }\n });\n Caculate.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n CaculateActionPerformed(evt);\n }\n });\n\n showConnect.setText(\"ShowConnectLine\");\n showConnect.addChangeListener(new javax.swing.event.ChangeListener() {\n public void stateChanged(javax.swing.event.ChangeEvent evt) {\n showConnectStateChanged(evt);\n }\n });\n showConnect.addPropertyChangeListener(new java.beans.PropertyChangeListener() {\n public void propertyChange(java.beans.PropertyChangeEvent evt) {\n showConnectPropertyChange(evt);\n }\n });\n\n randLine.setText(\"Random Line\");\n\n randInfect.setText(\"Random Infected\");\n\n widthSlider.setMajorTickSpacing(10);\n widthSlider.setMinimum(10);\n widthSlider.setMinorTickSpacing(2);\n widthSlider.setPaintTicks(true);\n widthSlider.setToolTipText(\"\");\n widthSlider.setValue(10);\n widthSlider.addChangeListener(new javax.swing.event.ChangeListener() {\n public void stateChanged(javax.swing.event.ChangeEvent evt) {\n widthSliderStateChanged(evt);\n }\n });\n widthSlider.addPropertyChangeListener(new java.beans.PropertyChangeListener() {\n public void propertyChange(java.beans.PropertyChangeEvent evt) {\n widthSliderPropertyChange(evt);\n }\n });\n\n heightSlider.setMajorTickSpacing(10);\n heightSlider.setMinimum(10);\n heightSlider.setMinorTickSpacing(2);\n heightSlider.setPaintTicks(true);\n heightSlider.setValue(10);\n heightSlider.addChangeListener(new javax.swing.event.ChangeListener() {\n public void stateChanged(javax.swing.event.ChangeEvent evt) {\n heightSliderStateChanged(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(stepSlider, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(showConnect)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(randLine))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(widthSlider, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(randInfect)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(14, 14, 14)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(heightSlider, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(stepState, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(update)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(Caculate))))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(0, 0, 0)\n .addComponent(stepSlider, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(stepState, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(widthSlider, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(update)\n .addComponent(Caculate))\n .addComponent(heightSlider, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(showConnect)\n .addComponent(randLine)\n .addComponent(randInfect))\n .addContainerGap())\n );\n\n drawPanel.setBorder(new javax.swing.border.MatteBorder(null));\n drawPanel.setName(\"drawPanel\"); // NOI18N\n drawPanel.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n drawPanelMouseClicked(evt);\n }\n public void mousePressed(java.awt.event.MouseEvent evt) {\n drawPanelMousePressed(evt);\n }\n public void mouseReleased(java.awt.event.MouseEvent evt) {\n drawPanelMouseReleased(evt);\n }\n });\n drawPanel.addComponentListener(new java.awt.event.ComponentAdapter() {\n public void componentResized(java.awt.event.ComponentEvent evt) {\n drawPanelComponentResized(evt);\n }\n });\n drawPanel.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {\n public void mouseDragged(java.awt.event.MouseEvent evt) {\n drawPanelMouseDragged(evt);\n }\n });\n drawPanel.addPropertyChangeListener(new java.beans.PropertyChangeListener() {\n public void propertyChange(java.beans.PropertyChangeEvent evt) {\n drawPanelPropertyChange(evt);\n }\n });\n\n javax.swing.GroupLayout drawPanelLayout = new javax.swing.GroupLayout(drawPanel);\n drawPanel.setLayout(drawPanelLayout);\n drawPanelLayout.setHorizontalGroup(\n drawPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 639, Short.MAX_VALUE)\n );\n drawPanelLayout.setVerticalGroup(\n drawPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 259, Short.MAX_VALUE)\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(drawPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(drawPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n\n pack();\n }",
"@Override\n public void initiateMouse() {\n\n MouseHandler m = new MouseHandler();\n m.addRunnablePress(1, new SelectNote(this.model, this.view.getGui(), m));\n m.addRunnablePress(3, new SelectNoteToBeAdded(this.model, this.view.getGui(), m));\n m.addRunnableRelease(3, new AddNote(this.model, this.view.getGui(), this.view, m));\n\n this.view.addMouseListener(m);\n\n }",
"private void start () {\n NumberAxis xAxis = new NumberAxis();\n NumberAxis yAxis = new NumberAxis();\n\n xAxis.setForceZeroInRange(false);\n yAxis.setForceZeroInRange(false);\n xAxis.setAnimated(false);\n yAxis.setAnimated(false);\n\n xAxis.setLabel(\"Number of \" + cmc + \" Drops\");\n xAxis.setMinorTickVisible(false);\n\n chart = new LineChart<>(xAxis, yAxis);\n chart.setTitle(\"Changes in \" + cmc + \" Drops\");\n chart.setLegendSide(Side.LEFT);\n chart.setAnimated(false);\n\n this.getChildren().add(chart);\n this.setAlignment(Pos.CENTER_LEFT);\n }",
"private void startDragging() {\n Point mousePosition = calculateMouseLocation();\n mouseX = mousePosition.getX();\n mouseY = mousePosition.getY();\n prevX = getArea().getX();\n prevY = getArea().getY();\n setDragging(true);\n }",
"public Window() {\n initComponents();\n setTitle(\"Clash of Asteroids 1J\");\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n setResizable(false);\n setLocationRelativeTo(null);\n canvas = new Canvas();\n keyBoard = new KeyBoard();\n mouseInput = new MouseInput();\n canvas.setPreferredSize(new Dimension(Constants.WIDTH, Constants.HEIGHT));\n canvas.setMaximumSize(new Dimension(Constants.WIDTH, Constants.HEIGHT));\n canvas.setMinimumSize(new Dimension(Constants.WIDTH, Constants.HEIGHT));\n canvas.setFocusable(true);\n add(canvas);\n canvas.addKeyListener(keyBoard);\n addKeyListener(keyBoard);\n canvas.addMouseListener(mouseInput);\n addMouseListener(mouseInput);\n canvas.addMouseMotionListener(mouseInput);\n addMouseMotionListener(mouseInput);\n setVisible(true);\n }",
"private void initialize() throws IOException{\r\n\t\tthis.setVisible(true);\r\n\t\tthis.setSize(400,300);\r\n\r\n\t\tthis.getContentPane().add(getScrollPane());\r\n\t\tthis.setAutoscrolls(true);\r\n\t\tthis.addMouseListener(new java.awt.event.MouseAdapter() { \r\n\t\t\tpublic void mouseExited(java.awt.event.MouseEvent e) { \r\n\t\t\t\t// System.out.println(\"mouseExited()\"); // TODO Auto-generated Event stub mouseExited()\r\n\t\t\t\teditor.repaint();\r\n\t\t\t} \r\n\t\t\tpublic void mouseEntered(java.awt.event.MouseEvent e) { \r\n\t\t\t\t// System.out.println(\"mouseEntered()\"); // TODO Auto-generated Event stub mouseEntered()\r\n\t\t\t\teditor.repaint();\r\n\t\t\t}\r\n\t\t});\r\n\t\tthis.addInternalFrameListener(new javax.swing.event.InternalFrameAdapter() { \r\n\t\t\tpublic void internalFrameActivated(javax.swing.event.InternalFrameEvent e) { \r\n\t\t\t\t// System.out.println(\"internalFrameActivated()\"); // TODO Auto-generated Event stub internalFrameActivated()\r\n\t\t\t\tactualizaScreen();\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"private static void setupWindow() {\n window.setSize((2 * WINDOW_MARGINS) + (CELL_SIZE * SIZE_X), (2 * WINDOW_MARGINS) + (CELL_SIZE * SIZE_Y));\n window.add(canvas);\n window.setVisible(true);\n window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n canvas.createBufferStrategy(2);\n }",
"@Override\n public void init(){\n setStartIn18Inches(false);\n super.init();\n //start\n programStage = progStates.allowingUserControl1.ordinal();\n\n //since we are measuring, start at 0,0,0\n setStartingPosition(0,0,Math.toRadians(0));\n }",
"public void initialize() {\n\t\ttoolBar.setDrawingPanel(this.drawingPanel);\r\n\t\t//component initialize\r\n\t\tmenuBar.initialize();\r\n\t\ttoolBar.initialize();\r\n\t\tdrawingPanel.initialize();\r\n\t\t\r\n\t}",
"public void start() {\r\n\t\tsetupWWD();\r\n\t\tsetupStatusBar();\r\n\t\tsetupViewControllers();\r\n\t\tsetupSky();\r\n\t\t//setupAnnotationToggling();\r\n\r\n\t\t// Center the application on the screen.\r\n\t\tWWUtil.alignComponent(null, this, AVKey.CENTER);\r\n\t\t\r\n\t\tgetLayerEnableCmd().run(); // Enable/disable the desired layers.\r\n\t}",
"public Kal()\n {\n setDefaultCloseOperation( EXIT_ON_CLOSE );\n \n setLayout( new FlowLayout() );\n \n allTheShapes = new Shape[1000];\n \n boxButton = new JButton(\"box\");\n add(boxButton);\n boxButton.addActionListener(this);\n \n addMouseListener(this);\n addMouseMotionListener(this);\n \n setSize( 500,500);\n setVisible( true);\n \n theColorPicker = new ColorPicker3();\n \n }",
"public MenuCanvas() {\n\n //CR 14694\n imageDisplay = new ImageDisplay();\n iCaptureImage = new CaptureImageAudio(this);\n iImageMenu = new CustomMenu(this);\n\n //#if KEYPAD\n //|JG|iKeyHandler = ObjectBuilderFactory.getKeyHandler();\n //|JG|iKeyHandler.setCanvasHandler(this);\n //#endif\n iCustomPopup = new CustomPopup(this);\n iMenu = new CustomMenu(this);\n \n bannerHandler = new CustomBanner(this);\n textboxSize = (short)(8 + CustomCanvas.font.getHeight());\n }",
"public MyFrame(){\n\t\tsetFocusable(true);\n\t\taddKeyListener(new KeyAdapter(){\n\t\t\tpublic void keyTyped(KeyEvent e){\n\t\t\t\tchar c = e.getKeyChar();\n\t\t\t\tif(c == 'a'){\n\t\t\t\t\tagain = true;\n\t\t\t\t\tSystem.out.println(\"A is pressed\");\n\t\t\t\t\tpicNum =0;\n\t\t\t\t\tperNum ++;\n\t\t\t\t}\n\t\t\t\tif(c=='s'){\n\t\t\t\t\tstart =true;\n\t\t\t\t\t//perNum++;\n\t\t\t\t\tSystem.out.println(\"S is pressed\");\n\t\t\t\t\tpicNum = 0;\n\t\t\t\t\tperNum = 0;\n\t\t\t\t\tagain = false;\n\t\t\t\t\tuploadStart = false;\n\t\t\t\t\tuploaded = false;\n\t\t\t\t\trecogStart = false;\n\t\t\t\t}\n\t\t\t\tif(c =='r'){\n\t\t\t\t\tSystem.out.println(\"R is pressed\");\n\t\t\t\t\trecogStart = !recogStart;\n\t\t\t\t}\n\t\t\t\tif(c =='u'){\n\t\t\t\t\tSystem.out.println(\"U is pressed\");\n\t\t\t\t\tuploadStart = true;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}",
"public static void main(String[] args) {\n\t\tJFrame myFrame = new JFrame(\"Plane Control\");\n\t\tmyFrame.setSize(650, 600);\n\t\tmyFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\t// Creating widgets\n\t\tJSlider jsCentreStick = new JSlider(JSlider.HORIZONTAL, 0, 10, 5); // min\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// max\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// current\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// parameters\n\t\tJSlider jsThrottle = new JSlider(JSlider.VERTICAL, 0, 10, 0);\n\t\tJButton jbReset = new JButton(\"Reset\");\n\t\tJTextArea jtArea = new JTextArea();\n\n\t\t// Automatically scrolls down\n\t\tDefaultCaret caret = (DefaultCaret) jtArea.getCaret();\n\t\tcaret.setUpdatePolicy(DefaultCaret.ALWAYS_UPDATE);\n\t\tJScrollPane scroll = new JScrollPane(jtArea);\n\t\tmyFrame.setLayout(new GridLayout(2, 1));\n\t\tmyFrame.add(scroll);\n\n\t\t// Creates panel, sets layout and adds widgets to south panel\n\t\tJPanel jpSouth = new JPanel();\n\t\tjpSouth.setLayout(new BorderLayout());\n\t\tjpSouth.add(jsCentreStick, BorderLayout.NORTH);\n\t\tjpSouth.add(jsThrottle, BorderLayout.CENTER);\n\t\tjpSouth.add(jbReset, BorderLayout.SOUTH);\n\n\t\t// adds panel to frame\n\t\tmyFrame.add(jpSouth);\n\n\t\t// Creates an aeroplane and the initial x and y value is from the\n\t\t// throttle and centrestick\n\t\tAeroplane plane = new Aeroplane(0, jsCentreStick.getValue(),\n\t\t\t\tjsThrottle.getValue(), 0, 0);\n\n\t\t// Creates an inner class\n\t\tjsCentreStick.addChangeListener(new ChangeListener() {\n\t\t\t/*\n\t\t\t * updates planes x value with the centresticks value on the GUI\n\t\t\t */\n\t\t\tpublic void stateChanged(ChangeEvent e) {\n\t\t\t\tplane.setX(jsCentreStick.getValue());\n\t\t\t}\n\t\t});\n\t\t// Creates an inner class\n\t\tjsThrottle.addChangeListener(new ChangeListener() {\n\t\t\tpublic void stateChanged(ChangeEvent e) {\n\t\t\t\t/*\n\t\t\t\t * updates planes speed value with the throttle value on the GUI\n\t\t\t\t */\n\t\t\t\tplane.setSpeed(jsThrottle.getValue());\n\t\t\t}\n\t\t});\n\t\t// allows the user to see the GUI\n\t\tmyFrame.setVisible(true);\n\n\t\twhile (plane.onRunway()) {\n\t\t\ttry {\n\t\t\t\t// print message of plane details\n\t\t\t\tjtArea.append(\"Seconds: \" + plane.getCurrentTime() + \" \\n\"\n\t\t\t\t\t\t+ \"X: \" + plane.getX() + \" Y: \" + plane.getY()\n\t\t\t\t\t\t+ \" Speed: \" + plane.getSpeed() + \" Elevation: \"\n\t\t\t\t\t\t+ plane.updateElevation() + \"\\n\");\n\t\t\t\t// 1 second pause and adds 1 second\n\t\t\t\tThread.sleep(1000);\n\t\t\t\tplane.setCurrentTime(plane.getCurrentTime() + 1);\n\t\t\t\t// checks if plane's elevation is greater than 4 and x value is\n\t\t\t\t// 5\n\t\t\t\tif (plane.getElevation() > 4 && plane.getX() == 5) {\n\t\t\t\t\tjtArea.append(\"Plane has taken off! \\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (InterruptedException e) {\n\t\t\t}\n\t\t}\n\t\t// checks if the plane is not on the runway\n\t\tif (!plane.onRunway()) {\n\t\t\tjtArea.append(\"Take off failed!\");\n\t\t}\n\n\t}",
"@Override\r\n public void start(Stage primaryStage) {\r\n \r\n \r\n // StackPane root = new StackPane(); \r\n Scene scene = new Scene(root, 900, 900); //set up a window with these propotions\r\n \r\n primaryStage.setTitle(\"Keep it Clean simulator\"); //window title\r\n primaryStage.setScene(scene);\r\n primaryStage.show();\r\n \r\n setLayout();\r\n \r\n drawUI.Draw(dataInput, tileMin, tileMax);\r\n }",
"@Override public void begin() {\n horizontalCorner = new Location( 0, 200 );\n verticalCorner = new Location( 200, 0 );\n }",
"private void setController() {\n\t\tcontroller = new Controller();\n\t\t// adds mouse listeners\n\t\tthis.addMouseListener(controller);\n\t\tthis.addMouseMotionListener(controller);\n\t\t// adds default DraggableRect objects with positions\n\n\t\t// adds all draggableRects to the JFrame\n\t\t/*\n\t\t * for(DraggableRect r : controller.getRects()){ add(r); }\n\t\t */\n\t}",
"private void initialize()\n {\n this.setTitle( \"SerialComm\" ); // Generated\n this.setSize( 500, 300 );\n this.setContentPane( getJContentPane() );\n }",
"public void init() {\n\n setBackground(Color.lightGray);\n\n x = xo = 10;\n y = yo = 10;\n // loading the first wold in the world table\n loadWorld();\n\n // registering listeners\n addKeyListener(this);\n addMouseListener(this);\n addMouseMotionListener(this);\n setFocusable(true);\n enableEvents(AWTEvent.FOCUS_EVENT_MASK);\n\n requestFocus();\n /*\n // building the popup menu\n menu = new PopupMenu();\n MenuItem start = new MenuItem(\"Start\");\n start.addActionListener(this);\n start.setActionCommand(\"start\");\n menu.add(start);\n MenuItem next = new MenuItem(\"Next\");\n next.addActionListener(this);\n next.setActionCommand(\"next\");\n menu.add(next);\n MenuItem previous = new MenuItem(\"Previous\");\n previous.addActionListener(this);\n previous.setActionCommand(\"previous\");\n menu.add(previous);\n\n menu.addSeparator();\n\n MenuItem undo = new MenuItem(\"Undo\");\n undo.addActionListener(this);\n undo.setActionCommand(\"undo\");\n menu.add(undo);\n MenuItem redo = new MenuItem(\"Redo\");\n redo.addActionListener(this);\n redo.setActionCommand(\"redo\");\n menu.add(redo);\n\n menu.addSeparator();\n\n beep = new CheckboxMenuItem(\"Beep\", beepOn);\n beep.addItemListener(this);\n beep.setActionCommand(\"beep\");\n menu.add(beep);\n\n add(menu);\n */\n }",
"@Override\r\n\tvoid start() {\n\t\tButton btnPayed = new Button(\"Paid\");\r\n\t\tButton btnCanceled = new Button(\"Canceled\");\r\n\t\t// Set button action events to the event methods of this class\r\n\t\tsetControlButton(btnPayed, \"Paid\");\r\n\t\tsetControlButton(btnCanceled, \"Canceled\");\r\n\r\n\t\ttextLabelDisplayed = new Label(\"\");\r\n\t\ttextLabelDisplayed.setPrefWidth(120);\r\n\r\n\t\tGridPane gridPaneAll = new GridPane();\r\n\t\tgridPaneAll.setVgap(10);\r\n\t\tGridPane gridPaneOrder = new GridPane();\r\n\t\tgridPaneOrder.setHgap(10);\r\n\t\tgridPaneOrder.add(btnPayed, 0, 0);\r\n\t\tgridPaneOrder.add(btnCanceled, 1, 0);\r\n\t\tgridPaneAll.add(gridPaneOrder, 0, 0);\r\n\t\tgridPaneAll.add(textLabelDisplayed, 0, 1);\r\n\r\n\t\twindow.addNodesAsChildrenToRoot(gridPaneAll);\r\n\r\n\t\t// Put the final touches and display the window.\r\n\t\twindow.start();\r\n\r\n\t\trefreshDisplay();\r\n\t}",
"public CanvasPanel( )\n {\n // make this canvas panel listen to mouse\n addMouseListener(new PointListener());\n addMouseMotionListener(new PointListener());\n\n setBackground(Color.BLACK);\n }",
"public DrawPanel()\n {\n initComponents();\n penManager = new PenManager(this);\n penManager.pen.addListener(this);\n }",
"private void init(){\n\t\tadd(new DrawSurface());\n\t\tsetTitle(\"Animation Exercise\");\n\t\tsetSize(640, 480);\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t}",
"private void initializeDragVars(MouseEvent me) { m_wx0 = m_wx1 = sxToWx(m_x0 = m_x1 = me.getX()); m_wy0 = m_wy1 = syToWy(m_y0 = m_y1 = me.getY()); }",
"public DRInitialPlotPanel() {\n initComponents();\n }",
"@Override\n\tpublic void start(Stage stage) throws Exception {\n\t\tSideMenu sidemenu = new SideMenu(canvas);\n\t\tgridpane.add(sidemenu, 0, 0);\n\t\tgridpane.add(canvas, 1, 0);\n\t\t\n\t\tScene scene = new Scene(gridpane);\n\t\t\n\t\tstage.setScene(scene);\n\t\tstage.sizeToScene();\n\t\t\n\t\tstage.setTitle(\"Make your own Dot Drawing - By Joeri\");\n\t\tstage.show();\n\t\t\n\t\tstage.setMinWidth(stage.getWidth());\n\t\tstage.setMinHeight(stage.getHeight());\n\t}",
"void setupDragLines() {\n\t\tmouseLockedToLine = true;\n\t\tbeginOffsetP.set(P); // lock the beginning position of the offset vector\n\t\tfor (int i = 0; i < amount; i++)\n\t\t\tline[i].resetLockPoints(P); // check\n\t}",
"private void initButtonsListener(){\n initDraw();\n initResign();\n initRedo();\n }",
"private void initializeFeatures() {\n\t\tint buttonLength = 2*super.getXLength()/3;\n\t\tint buttonHeight = super.getYLength()/6;\n\t\tint startX = super.getXPos() + super.getXLength()/2 - buttonLength/2; \n\t\tint startY = super.getYPos() + super.getYLength()/2 - buttonHeight/2;\n\t\tint spacingBetweenButtons = 10; \n\t\tstart = new StartButton(parent,startX,startY,buttonLength,buttonHeight);\n\t\tinstructions = new InstructionsButton(parent,startX,startY + spacingBetweenButtons+buttonHeight,buttonLength,buttonHeight);\n\t\tquit = new QuitButton(parent,startX,startY + 2*(buttonHeight + spacingBetweenButtons),buttonLength,buttonHeight);\n\t}",
"@FXML\n public void drawXButtonPressed()\n {\n //get the GraphicsContent, which is used to draw on the canvas\n GraphicsContext gc = clearCanvasAndGetGraphicsContext();\n\n //draw line from top corner to bottom corner\n gc.strokeLine(\n 0,\n 0,\n canvas.getWidth(),\n canvas.getHeight()\n );\n\n //draw line from bottom left corner to upper right corner\n gc.strokeLine(\n 0,\n canvas.getHeight(),\n canvas.getWidth(),\n 0\n );\n }",
"public MainClass()\r\n\t{\r\n\t\tthis.setPreferredSize(new Dimension(width - 300, height));// This sets the dimensions of the graphic space where cam is drawn\r\n\t\tpanel = new ControlPanel(); // Initialization of various objects incorporated into the main class\r\n\t\twindow = new Window(this, panel);\t\t\t\t//\r\n\t\tdisp = new DispAngleDiagram(stroke);\t\t\t//\r\n\t\trcp = new RenderCamProfile(disp, panel);\t\t//\r\n\t\tinput = new InputHandler(disp);\t\t\t\t\t//\r\n\t\t\r\n\t\tthis.addMouseListener(input);\t\t\t\t\t\r\n\t\tthis.addMouseMotionListener(input);\r\n\t}",
"@Override\n public void simpleInitApp()\n {\n makeInitialWorld();\n \tAudio audio = new Audio(assetManager, rootNode);\n inputManager.setCursorVisible(false);\n \trootNode.attachChild(overlayNode);\n\n \tflyCam.setEnabled(true);\n flyCam.setMoveSpeed(25);\n\n setDisplayFps(true);\n setDisplayStatView(true);\n\n GUIInfo guiInfo = new GUIInfo(guiNode, assetManager.loadFont(\"Interface/Fonts/Console.fnt\"));\n guiNode.addControl(guiInfo);\n }",
"static void InitiateDraw() {\n\t\tshape = new GeneralPath();\n\t\ti1.setOverlay(null);\n\t\tOL = new Overlay();\n\t}",
"private void initControlsPage()\r\n {\n \tString keyTitleString = \"KEYBOARD\";\r\n \tkeyTitleText = new OText(25, 200, 300, keyTitleString);\r\n \tkeyTitleText.setFont(\"Courier New\", 20, 1.0, 'C', Settings.themes.textColor);\r\n \t\r\n \t//Initialize the keyboard movement text\r\n \tString keyMoveString = \"Move Optimus with the WASD keys \"\r\n \t\t\t + \" <br> \"\r\n \t\t\t + \"as if they were the arrow keys.\";\r\n \tkeyMoveText = new OText(25, 225, 300, keyMoveString);\r\n \tkeyMoveText.setFont(\"Courier New\", 14, 1.0, 'C', Settings.themes.textColor);\r\n \t\r\n \t\r\n \t//Initialize the mouse title text\r\n \tString mouseTitleString = \"MOUSE\";\r\n \tmouseTitleText = new OText(375, 200, 300, mouseTitleString);\r\n \tmouseTitleText.setFont(\"Courier New\", 20, 1.0, 'C', Settings.themes.textColor);\r\n \t\r\n \t//Initialize the mouse text\r\n \tString mouseMoveString = \"Aim by moving the mouse and shoot bullets from Optimus in the direction of the cursor using both clicks. \";\r\n \tmouseText = new OText(375, 225, 300, mouseMoveString);\r\n \tmouseText.setFont(\"Courier New\", 14, 1.0, 'C', Settings.themes.textColor);\r\n }",
"public void init()\r\n\t{\n\t\tsetSize(300,300);\r\n\t\taddKeyListener(this); //ajout d'ecouteur de clavier\r\n\t\t\r\n\t}",
"public void mousePressed() {\n if (mouseX > 250 && mouseX < 300 && mouseY > 45 && mouseY < 95) {\n // createWindows();\n // btnMakeWindow.setEnabled(false); createWindows();\n }\n\n if (mouseX > 20 && mouseX < 20+20 && mouseY > 20 && mouseY < 20+20) {\n button = !button;\n }\n if (mouseX > 250 && mouseX < 350 && mouseY > 20 && mouseY < 20+50) {\n\n }\n if (mouseX > 418 && mouseX < 473 && mouseY > 185 && mouseY < 204) {\n rgbEffects();\n }\n if (mouseX > 10 && mouseX < 49 && mouseY > 150 && mouseY < 169) {\n MyController1.getController(\"bar height\").setValue(50);\n MyController2.getController(\"width\").setValue(50);\n input.disableMonitoring();\n }\n if (mouseX > 395 && mouseX < 395+24 && mouseY > 285 && mouseY < 285+24) {\n\n JOptionPane.showMessageDialog(null, \"Audio Visualizer made by Debus Alexy\\nRaccourci clavier : Touche p ou P pour stopper le programme\\nTouche d ou D pour reset\", \"Information\", JOptionPane.INFORMATION_MESSAGE);\n }\n\n if (mouseX > 180 && mouseX < 230 && mouseY > 152 && mouseY < 167) {\n javaColor = JColorChooser.showDialog(null, \"color picker\",Color.WHITE);\n\n\t\tif (javaColor!= null){\n\t\t BEAT = javaColor;\n rgbToHsv(BEAT);\n MyController1.getController(\"Saturation\").setValue((float)s);\n MyController1.getController(\"Brightness\").setValue((float)v);\n h-=90;\n if (h<0){\n h+=360;\n }\n MyController1.getController(\"Hue\").setValue((float)h);\n MyController1.getController(\"Hue\").setColorBackground(color(javaColor.getRed(),javaColor.getGreen(),javaColor.getBlue()));\n // MyController1.getController(\"Hue\").setColorValue(color(255-javaColor.getRed(),255-javaColor.getGreen(),255-javaColor.getBlue()));\n // mon_port.write(javaColor.getRed()+'g'+javaColor.getGreen()+'b'+javaColor.getBlue());\n \t}\n\t\telse {\n\t\t //default\n BEAT = Color.WHITE;\n\t\t}\n\n }\n\n if (mouseX > 430 && mouseX < 469 && mouseY > 290 && mouseY < 309) {\n leaving();\n }\n if (mouseX > 420 && mouseX < 450 && mouseY > 25 && mouseY < 35) {\n MyController1.getController(\"Play\").setValue(1);\n\n }else if (mouseX > 390 && mouseX < 400 && mouseY > 25 && mouseY < 35) {\n MyController1.getController(\"Play\").setValue(0);\n MyController1.getController(\"Beat pulse\").setValue(0);\n }\n\n if (mouseX > 400 && mouseX < 466 && mouseY > 20 && mouseY < 44) {\n buttonPlay = !buttonPlay;\n if (buttonPlay ==true){\n // mon_port.write('1');\n MyController1.getController(\"Play\").setImages(loadImage(\"On.png\"),loadImage(\"On.png\"),loadImage(\"On.png\"));\n }else{\n mon_port.write('0');\n MyController1.getController(\"Play\").setImages(loadImage(\"Off.png\"),loadImage(\"Off.png\"),loadImage(\"Off.png\"));\n }\n }\n}",
"public myGameFrame() throws IOException {\n initComponents();\n newDeck = new DeckOfCards ();\n carrd = newDeck.carrd;\n userPoint = 0;\n northPoint= 0; \n westPoint = 0; \n eastPoint = 0;\n mytransporthandler = new myTransferHandler (\"icon\"); \n \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 }",
"private void initialize() {\r\n\t\tsetLabels();\r\n\t\tinitPoints();\r\n\t\tsetButtons();\r\n\t\tthis.setTitle(\"Digite os pesos dos pontos\");\r\n\t\tthis.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);\r\n\t}",
"@Override\n\n\t//Method\n\tpublic void start (Stage primaryStage) {\n\t\tPane pane = new Pane();\n\n\t\t//Make the machine\n\t\tLine L1=new Line();\n\t\tL1.setStartX(180);\n\t\tL1.setStartY(39);\n\t\tL1.setEndX(285);\n\t\tL1.setEndY(168);\n\n\t\tLine L2=new Line();\n\t\tL2.setStartX(285);\n\t\tL2.setStartY(210);\n\t\tL2.setEndX(45);\n\t\tL2.setEndY(210);\n\n\t\tLine L3=new Line();\n\t\tL3.setStartX(150);\n\t\tL3.setStartY(39);\n\t\tL3.setEndX(45);\n\t\tL3.setEndY(168);\n\n\t\tLine L4=new Line();\n\t\tL4.setStartX(285);\n\t\tL4.setStartY(168);\n\t\tL4.setEndX(285);\n\t\tL4.setEndY(210);\n\n\t\tLine L5=new Line();\n\t\tL5.setStartX(45);\n\t\tL5.setStartY(210);\n\t\tL5.setEndX(45);\n\t\tL5.setEndY(168);\n\n\t\tLine L6=new Line();\n\t\tL6.setStartX(180);\n\t\tL6.setStartY(39);\n\t\tL6.setEndX(180);\n\t\tL6.setEndY(24);\n\n\t\tLine L7=new Line();\n\t\tL7.setStartX(150);\n\t\tL7.setStartY(39);\n\t\tL7.setEndX(150);\n\t\tL7.setEndY(24);\n\n\t\tLine L8=new Line();\n\t\tL8.setStartX(75);\n\t\tL8.setStartY(168);\n\t\tL8.setEndX(75);\n\t\tL8.setEndY(210);\n\n\t\tLine L9=new Line();\n\t\tL9.setStartX(105);\n\t\tL9.setStartY(168);\n\t\tL9.setEndX(105);\n\t\tL9.setEndY(210);\n\n\t\tLine L10=new Line();\n\t\tL10.setStartX(135);\n\t\tL10.setStartY(168);\n\t\tL10.setEndX(135);\n\t\tL10.setEndY(210);\n\n\t\tLine L11=new Line();\n\t\tL11.setStartX(165);\n\t\tL11.setStartY(168);\n\t\tL11.setEndX(165);\n\t\tL11.setEndY(210);\n\n\t\tLine L12=new Line();\n\t\tL12.setStartX(195);\n\t\tL12.setStartY(168);\n\t\tL12.setEndX(195);\n\t\tL12.setEndY(210);\n\n\t\tLine L13=new Line();\n\t\tL13.setStartX(255);\n\t\tL13.setStartY(168);\n\t\tL13.setEndX(255);\n\t\tL13.setEndY(210);\n\n\t\tLine L14=new Line();\n\t\tL14.setStartX(225);\n\t\tL14.setStartY(168);\n\t\tL14.setEndX(225);\n\t\tL14.setEndY(210);\n\n\t\tEllipse D1 = new Ellipse(165,60,5,5);\n\t\tEllipse D2 = new Ellipse(150,78,5,5);\n\t\tEllipse D3 = new Ellipse(180,78,5,5);\n\t\tEllipse D4 = new Ellipse(165,96,5,5);\n\t\tEllipse D5 = new Ellipse(195,96,5,5);\n\t\tEllipse D6 = new Ellipse(135,96,5,5);\n\t\tEllipse D7 = new Ellipse(120,114,5,5);\n\t\tEllipse D8 = new Ellipse(210,114,5,5);\n\t\tEllipse D9 = new Ellipse(150,114,5,5);\n\t\tEllipse D10 = new Ellipse(180,114,5,5);\n\t\tEllipse D11 = new Ellipse(225,132,5,5);\n\t\tEllipse D12 = new Ellipse(105,132,5,5);\n\t\tEllipse D13 = new Ellipse(135,132,5,5);\n\t\tEllipse D14 = new Ellipse(165,132,5,5);\n\t\tEllipse D15 = new Ellipse(195,132,5,5);\n\t\tEllipse D16 = new Ellipse(240,150,5,5);\n\t\tEllipse D17 = new Ellipse(90,150,5,5);\n\t\tEllipse D18 = new Ellipse(120,150,5,5);\n\t\tEllipse D19 = new Ellipse(150,150,5,5);\n\t\tEllipse D20 = new Ellipse(180,150,5,5);\n\t\tEllipse D21 = new Ellipse(210,150,5,5);\n\t\tEllipse D22 = new Ellipse(255,168,5,5);\n\t\tEllipse D23 = new Ellipse(75,168,5,5);\n\t\tEllipse D24 = new Ellipse(105,168,5,5);\n\t\tEllipse D25 = new Ellipse(135,168,5,5);\n\t\tEllipse D26 = new Ellipse(165,168,5,5);\n\t\tEllipse D27 = new Ellipse(195,168,5,5);\n\t\tEllipse D28 = new Ellipse(225,168,5,5);\n\n\t\t//Add all things in pane\n\t\tpane.getChildren().addAll(L1,L2,L3,L4,L5,L6,L7,L8,L9,L10,L11,L12,L13,L14,D1,D2,D3,D4,D5,D6,D7,D8,D9,D10,D11,D12,D13,D14,D15,D16,D17,D18,D19,D20,D21,D22,D23,D24,D25,D26,D27,D28);\n\t\t//Add the pane in the scene\n\t\tScene scene = new Scene(pane, 480, 240);\n\t\t//Add scene in the stage\n\t\tprimaryStage.setScene(scene);\n\t\t//Show the stage\n\t\tprimaryStage.show();\n\t}",
"protected void init() {\r\n\t\tsetBackground(Color.black);\r\n\t\tsetForeground(Color.white);\r\n\t\taddMouseListener(this);\r\n\t\taddMouseMotionListener(this);\r\n\t\tcreateSelection();\r\n\t\tsel.addListener(this);\r\n\t\tcreateSection();\r\n\t\tsection.addListener(this);\r\n\t\tsetOpaque(true);\r\n\t\tremoveAll();\r\n\t}",
"private void initialize() {\n\t\tthis.setLayout(null);\n\t\tthis.setBackground(Color.white);\n\t\tthis.setBounds(new Rectangle(0, 0, 943, 615));\n this.setPreferredSize(new Dimension(890,570));\n this.setMinimumSize(new Dimension(890,570));\n\n\t\tm_GraphControlGradient = new GraphControl();\n\t\tm_GraphControlGradient.setBounds(new Rectangle(4, 16, 461, 285));\n\t\tm_GraphControlGradient.setControlsEnabled(false);\n\n\t\tm_GraphControlFlowRate = new GraphControl();\n\t\tm_GraphControlFlowRate.setBounds(new Rectangle(3, 16, 462, 241));\n\t\tm_GraphControlFlowRate.setControlsEnabled(false);\n\n\t\tthis.add(getJbtnPreviousStep(), null);\n\t\tthis.add(getJpanelGradientProfile(), null);\n\t\tthis.add(getJpanelFlowProfile(), null);\n\t\tthis.setVisible(true);\n\t\tthis.add(getJbtnHelp(), null);\n\t\tthis.add(getJpanelStep5(), null);\n\t\t\n\t\tthis.tmOutputModel.addTableModelListener(this);\n\t\tthis.addComponentListener(this);\n\t}",
"@FXML\n\tvoid initialize() {\n\t\tm = new PR1Model();\n\t\tsetFile(null);\n\t\tselection = new SimpleObjectProperty<Shape>();\n\t\tapplication = new PR1();\n\t\tsetSelection(null);\n\t\tsetClipboard(null);\n\t\tviewState = new SimpleObjectProperty<ViewState>(ViewState.CLOSE);\n\t\tclipboardState = new SimpleObjectProperty<ClipboardState>(ClipboardState.IDLE);\n\t\tdefaultS = m.add(-50, -50);\n\t\tdefaultS.setText(defaultshape);\n\t\t\n\t\t\n\t\tcanvasListener = new ChangeListener<Number>() {\n\n\t\t\t/**\n\t\t\t * Handles the canvas resizing.\n\t\t\t * \n\t\t\t * @param event The event object.\n\t\t\t */\n\t\t\t@Override\n\t\t\tpublic void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {\n\t\t\t\tviewState.set(ViewState.RESIZE);\n\t\t\t\t\n\t\t\t}\n\t\t};\n\t\t\n\n\t\t\n\t\tgc = canvas.getGraphicsContext2D();\n\t\tcanvas.heightProperty().set(1105);\n\t\tcanvas.widthProperty().set(1105);\n\t\tcanvas.heightProperty().addListener(canvasListener);\n\t\tcanvas.widthProperty().addListener(canvasListener);\n\t\t\n\t\t\n\t\ttcs.prefWidthProperty().bind(tv.widthProperty().divide(11));\n\t\ttccx.prefWidthProperty().bind(tv.widthProperty().divide(11));\n\t\ttccy.prefWidthProperty().bind(tv.widthProperty().divide(11));\n\t\ttcr.prefWidthProperty().bind(tv.widthProperty().divide(11));\n\t\ttcc.prefWidthProperty().bind(tv.widthProperty().divide(11));\n\t\ttcw.prefWidthProperty().bind(tv.widthProperty().divide(11));\n\t\ttch.prefWidthProperty().bind(tv.widthProperty().divide(11));\n\t\ttcaw.prefWidthProperty().bind(tv.widthProperty().divide(11));\n\t\ttcah.prefWidthProperty().bind(tv.widthProperty().divide(11));\n\t\ttct.prefWidthProperty().bind(tv.widthProperty().divide(11));\n\t\ttcd.prefWidthProperty().bind(tv.widthProperty().divide(11));\n\t\t\n\t\ttcs.setCellValueFactory(new PropertyValueFactory<Shape, ShapeType>(\"type\"));\n\t\ttccx.setCellValueFactory(new PropertyValueFactory<Shape, Double>(\"centerX\"));\n\t\ttccy.setCellValueFactory(new PropertyValueFactory<Shape, Double>(\"centerY\"));\n\t\ttcr.setCellValueFactory(new PropertyValueFactory<Shape, Double>(\"radius\"));\n\t\ttcc.setCellValueFactory(new PropertyValueFactory<Shape, Color>(\"color\"));\n\t\ttcw.setCellValueFactory(new PropertyValueFactory<Shape, Double>(\"width\"));\n\t\ttch.setCellValueFactory(new PropertyValueFactory<Shape, Double>(\"height\"));\n\t\ttcaw.setCellValueFactory(new PropertyValueFactory<Shape, Double>(\"arcWidth\"));\n\t\ttcah.setCellValueFactory(new PropertyValueFactory<Shape, Double>(\"arcHeight\"));\n\t\ttct.setCellValueFactory(new PropertyValueFactory<Shape, String>(\"text\"));\n\t\ttcd.setCellValueFactory(new PropertyValueFactory<Shape, Boolean>(\"delete\"));\n\t\t\n\t\tObservableList<ShapeType> shapeValues = FXCollections.observableArrayList(ShapeType.CIRCLE, ShapeType.RECTANGLE, ShapeType.OVAL, ShapeType.ROUNDRECT, ShapeType.TEXT);\n\t\t\n\t\ttcs.setCellFactory(ComboBoxTableCell.forTableColumn(new PR1Model.ShapeTypeStringConverter(), shapeValues));\n\t\ttccx.setCellFactory(TextFieldTableCell.forTableColumn(new DoubleStringConverter()));\n\t\ttccy.setCellFactory(TextFieldTableCell.forTableColumn(new DoubleStringConverter()));\n\t\ttcr.setCellFactory(TextFieldTableCell.forTableColumn(new DoubleStringConverter()));\n\t\t\n\t\ttcw.setCellFactory(TextFieldTableCell.forTableColumn(new DoubleStringConverter()));\n\t\ttch.setCellFactory(TextFieldTableCell.forTableColumn(new DoubleStringConverter()));\n\t\ttcaw.setCellFactory(TextFieldTableCell.forTableColumn(new DoubleStringConverter()));\n\t\ttcah.setCellFactory(TextFieldTableCell.forTableColumn(new DoubleStringConverter()));\n\t\t\n\t\ttcd.setCellFactory(CheckBoxTableCell.forTableColumn(tcd));\n\t\t\n\t\ttct.setCellFactory(TextFieldTableCell.forTableColumn());\n\t\t\n\t\ttcc.setCellFactory(ColorTableCell<Shape>::new);\n\t\t\n\t\tscrpaneright.setFitToHeight(true);\n\t\tscrpaneright.setFitToWidth(true);\n\t\t\n\t\t\n\t\taddMouseListener(new EventHandler<MouseEvent>() {\n\n\t\t\t/**\n\t\t\t * Handles the mouse events.\n\t\t\t * \n\t\t\t * @param event The event object.\n\t\t\t */\n\t\t\t@Override\n\t\t\tpublic void handle(MouseEvent e) {\n\t\t\t\tmouseLastX = e.getX();\n\t\t\t\tmouseLastY = e.getY();\n\t\t\t\tif (viewState.get() == ViewState.CLOSED) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (e.getEventType() == MouseEvent.MOUSE_PRESSED){\n\t\t\t\t\t\n\t\t\t\t\tsetSelection(m.select(e.getX(), e.getY()));\n\t\t\t\t\tif (e.getButton() == MouseButton.PRIMARY) {\n\t\t\t\t\t\tif (getSelection() != null) {\n\t\t\t\t\t\t\tm.setTop(getSelection());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tviewState.set(ViewState.MODIFIED);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (e.getEventType() == MouseEvent.MOUSE_DRAGGED) {\n\t\t\t\t\tif (getSelection() != null) {\n\t\t\t\t\t\tif (e.getButton() == MouseButton.PRIMARY) {\n\t\t\t\t\t\t\tgetSelection().setCenterX(e.getX());\n\t\t\t\t\t\t\tgetSelection().setCenterY(e.getY());\n\t\t\t\t\t\t\tviewState.set(ViewState.MODIFIED);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (e.getButton() == MouseButton.SECONDARY) {\n\t\t\t\t\t\t\tif(getSelection().getType() == ShapeType.CIRCLE) {\n\t\t\t\t\t\t\t\tgetSelection().setRadius(getSelection().getRadius() + 0.25 * (e.getX() - getSelection().getCenterX()));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tgetSelection().setWidth(getSelection().getWidth() + 0.25 * (e.getX() - getSelection().getCenterX()));\n\t\t\t\t\t\t\t\tgetSelection().setHeight(getSelection().getHeight() + 0.25 * (e.getY() - getSelection().getCenterY()));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tviewState.set(ViewState.MODIFIED);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (e.getEventType() == MouseEvent.MOUSE_CLICKED) {\n\t\t\t\t\tif (e.getButton().equals(MouseButton.PRIMARY)){\n\t\t\t\t\t\tswitch (e.getClickCount()) {\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\tif (getSelection() == null) {\n\t\t\t\t\t\t\t\tsetSelection(m.add(defaultS.getType(), e.getX(), e.getY()));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tviewState.set(ViewState.MODIFIED);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\tsetSelection(m.select(e.getX(), e.getY()));\n\t\t\t\t\t\t\tapplication.goToCD(getSelection());\n\t\t\t\t\t\t\tviewState.set(ViewState.MODIFIED);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tm.drawDataProperty().addListener(new ListChangeListener<PR1Model.Shape>() {\n\n\t\t\t/**\n\t\t\t * Handles the model changes.\n\t\t\t * Always repaints, regardless of the event object. Inefficient but works!\n\t\t\t * \n\t\t\t * @param e The event object.\n\t\t\t */\n\t\t\t@Override\n\t\t\tpublic void onChanged(ListChangeListener.Change<? extends PR1Model.Shape> e) { \n\t\t\t\t\n\t\t\t\trepaint(); \n\t\t\t\treTable();\n\t\t\t\tviewState.set(ViewState.MODIFIED);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tviewState.addListener(new ChangeListener<ViewState>() {\n\n\t\t\t/**\n\t\t\t * Handles the view state changes (from File menu and window resizing).\n\t\t\t * \n\t\t\t * @param event The event object.\n\t\t\t */\n\t\t\t@Override\n\t\t\tpublic void changed(ObservableValue<? extends ViewState> observable, ViewState oldValue, ViewState newValue) {\n\t\t\t\tif (!newValue.equals(oldValue)) {\n\t\t\t\t\tswitch (newValue) {\n\t\t\t\t\tcase CLOSED: // No file opened (when the application starts or when the current file is closed.\n\t\t\t\t\t\tsetFileMenu(false, false, true, true, false); // Configures individual file menu items (enabled/disabled).\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase NEW: // A new file to be opened.\n\t\t\t\t\t\tif (file != null) {\n\t\t\t\t\t\t\tif (file.exists()) {\n\t\t\t\t\t\t\t\tfile.delete(); // Delete the file if it the file with that name already exists (overwrite).\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\tcase OPEN: // An existing file opened.\n\t\t\t\t\t\tif (file != null) {\n\t\t\t\t\t\t\tCharset charset = Charset.forName(\"US-ASCII\");\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tfile.createNewFile();\n\t\t\t\t\t\t\t\tBufferedReader reader = Files.newBufferedReader(file.toPath(), charset);\n\t\t\t\t\t\t\t\tString line = null;\n\t\t\t\t\t\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\tm.add(line); // Read the file line by line and add the circle (line) to the model.\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tcatch (NumberFormatException e) { } // Ignores an incorrectly formatted line.\n\t\t\t\t\t\t\t\t\tcatch (ArrayIndexOutOfBoundsException e) { } // Ignores an incorrectly formatted line.\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tviewState.set(ViewState.OPENED);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcatch (IOException e) {\n\t\t\t\t\t\t\t\tviewState.set(ViewState.CLOSE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase OPENED: // The file is opened.\n\t\t\t\t\t\tsetFileMenu(true, true, false, true, false); // Configures individual file menu items (enabled/disabled).\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase CLOSE: // The file has to be closed.\n\t\t\t\t\t\tsetFile(null); // Clears the file.\n\t\t\t\t\t\tsetSelection(null); // Clears the selection;\n\t\t\t\t\t\tsetClipboard(null); // Clears the selection;\n\t\t\t\t\t\tm.clear(); // Clears the model.\n\t\t\t\t\t\tclear(); // Clears the view.\n\t\t\t\t\t\tviewState.set(ViewState.CLOSED);\n\t\t\t\t\t\tbreak;\t\t\t\t\n\t\t\t\t\tcase MODIFIED: // The file has been modified, needs saving.\n\t\t\t\t\t\tsetFileMenu(true, true, true, false, false);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SAVE: // Save the file.\n\t\t\t\t\t\tif (file != null) {\n\t\t\t\t\t\t\tCharset charset = Charset.forName(\"US-ASCII\");\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tBufferedWriter writer = Files.newBufferedWriter(file.toPath(), charset, StandardOpenOption.WRITE);\n\t\t\t\t\t\t\t\tfor (PR1Model.Shape c : m.drawDataProperty()) {\n\t\t\t\t\t\t\t\t\t//For the project, the line needs to be created in a more complicated way than before,\n\t\t\t\t\t\t\t\t\t//so the work is passed off to a function here.\n\t\t\t\t\t\t\t\t\tString line = lineMaker(c);\n\t\t\t\t\t\t\t\t\twriter.write(line);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twriter.close();\n\t\t\t\t\t\t\t\tviewState.set(ViewState.OPENED);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcatch (IOException e) {\n\t\t\t\t\t\t\t\tapplication.goToErrorDialog();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase QUIT: // Quit the application\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (oldValue == ViewState.MODIFIED) {\n\t\t\t\t\t\t\tapplication.goToQuitDialog();\n\t\t\t\t\t\t\t//if the application didn't quit, setback the viewState\n\t\t\t\t\t\t\tviewState.set(oldValue);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase RESIZE: // Redraw the view when the application window resizes.\n\t\t\t\t\t\trepaint();\n\t\t\t\t\t\tviewState.set(oldValue);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\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\t\n\t\t\n\t\tclipboardState.addListener(new ChangeListener<ClipboardState>() {\n\n\t\t\t/**\n\t\t\t * Handles the clipboard changes.\n\t\t\t * \n\t\t\t * @param event The event object.\n\t\t\t */\n\t\t\t@Override\n\t\t\tpublic void changed(ObservableValue<? extends ClipboardState> observable, ClipboardState oldValue, ClipboardState newValue) {\n\t\t\t\tShape c = null;\n\t\t\t\tif (getSelection() != null) {\n\t\t\t\t\tswitch (newValue) {\n\t\t\t\t\tcase COPY: // Copy the selection to the clipboard. \n\t\t\t\t\t\tsetClipboard(getSelection());\n\t\t\t\t\t\tsetEditMenu(false, false, false); // Enable all Edit menu items.\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase PASTE: // Paste the clipboard to the view.\n\t\t\t\t\t\tc = m.add(mouseLastX, mouseLastY);\n\t\t\t\t\t\tc.setRadius(getClipboard().getRadius());\n\t\t\t\t\t\tc.setColor(getClipboard().getColor());\n\t\t\t\t\t\tc.setHeight(getClipboard().getHeight());\n\t\t\t\t\t\tc.setWidth(getClipboard().getWidth());\n\t\t\t\t\t\tc.setArcheight(getClipboard().getAH());\n\t\t\t\t\t\tc.setArcwidth(getClipboard().getAW());\n\t\t\t\t\t\tc.setType(getClipboard().getType());\n\t\t\t\t\t\tc.setText(getClipboard().getText());\n\t\t\t\t\t\tviewState.set(ViewState.MODIFIED);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DELETE: // delete the selection.\n\t\t\t\t\t\tc = getSelection();\n\t\t\t\t\t\tsetSelection(null);\n\t\t\t\t\t\tm.remove(c);\n\t\t\t\t\t\tsetEditMenu(true, true, true); // Disable all Edit menu items.\t\t\n\t\t\t\t\t\tviewState.set(ViewState.MODIFIED);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase IDLE:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tclipboardState.set(ClipboardState.IDLE);\n\t\t\t\t}\n\t\t\t}\n\n\t\t});\n\t\tsetFileMenu(false, false, true, true, false);\n\t\tsetEditMenu(true, true, true);\n\t}"
] | [
"0.7190087",
"0.65001845",
"0.6456198",
"0.6191743",
"0.61850154",
"0.6117974",
"0.60062855",
"0.59874654",
"0.598608",
"0.595967",
"0.5937948",
"0.5928026",
"0.59167117",
"0.5884582",
"0.5869491",
"0.5854764",
"0.58444256",
"0.584247",
"0.5819873",
"0.5813203",
"0.58058465",
"0.5799443",
"0.5785752",
"0.5782084",
"0.57576305",
"0.5749475",
"0.5742559",
"0.5739531",
"0.57394826",
"0.5728526",
"0.5724922",
"0.5718454",
"0.5678882",
"0.56679726",
"0.5665126",
"0.5662696",
"0.5642708",
"0.56396556",
"0.56131035",
"0.5610266",
"0.5609766",
"0.5603847",
"0.56025714",
"0.55998087",
"0.5593694",
"0.5582666",
"0.557765",
"0.55750716",
"0.5562503",
"0.5553643",
"0.55445564",
"0.55443406",
"0.55414647",
"0.55297774",
"0.55293",
"0.55250883",
"0.5524733",
"0.5518878",
"0.5517928",
"0.5508475",
"0.5507755",
"0.5505544",
"0.5492856",
"0.5486982",
"0.54747176",
"0.5473627",
"0.54700565",
"0.5461082",
"0.5457494",
"0.5455646",
"0.5440989",
"0.54378575",
"0.5437052",
"0.5430681",
"0.5426746",
"0.54257804",
"0.5421006",
"0.5417269",
"0.5411412",
"0.5398878",
"0.5398756",
"0.53973716",
"0.5392362",
"0.53915924",
"0.5389365",
"0.5385707",
"0.53836596",
"0.5381032",
"0.5380905",
"0.5376926",
"0.5375444",
"0.53751934",
"0.53737116",
"0.5361106",
"0.5361009",
"0.53554463",
"0.53524625",
"0.53481835",
"0.5345827",
"0.53436613"
] | 0.5447487 | 70 |
/ Name: mousePressed Purpose: This is the method that is run when the user presses (not necessarily a click, but a press specifically) the mouse. It checks if the user has pressed on one of the lines (or both, if the intersection is clicked). If so, the toggle is set to true (so when a user moves the mouse, the line(s) move). Parameters: e: MouseEvent (the mouse press event) Return: void | public void mousePressed(MouseEvent e) // When mouse is pressed:
{
Location pt = new Location(e.getX(),e.getY());
origPress = pt;
if(hLine.contains(pt)) // If press is on hLine:
{
hLineGrabbed = true; // hLine is grabbed
}
if(vLine.contains(pt)) // If press is on vLine:
{
vLineGrabbed = true; // vLine is grabbed
}
lastPt = pt; // Set the point to lastPt
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void mousePressed(MouseEvent e) {\n\t\tdouble x = e.getX();\n\t\tdouble y = e.getY();\n\t\tswitch (clickTracker) {\n\t\t\tcase 0:\n\t\t\t\t//figureDone = false;\n\t\t\t\tflipDirection.setEnabled(false);\n\t\t\t\tlastClick = new GPoint(x,y);\n\t\t\t\tlineActive = true;\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tlineActive = false;\n\t\t\t\tremove(centerCircle);\n\t\t\t\tdrawCenter(x, y);\n\t\t\t\t//println(lastClick + \" x \" + x + \" y \" +y);\n\t\t\t\t//double centerX = lastClick.getX();\n\t\t\t\t//double centerY = lastClick.getY();\n\t\t\t\tlastClick = new GPoint(lastClick.getX() + centerCircle.getWidth(), lastClick.getY());\n\t\t\t\tbreak;\n\t\t\t//case 2:\n\t\t\t\t//lastClick = new GPoint(x,y);\n\t\t\t\t//lineActive = true;\n\t\t\t\t//break;\n\t\t\tcase 2:\n\t\t\t\tlineActive = false;\n\t\t\t\tremove(outerCircle);\n\t\t\t\tdrawOuter(x, y);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tlineActive = false;\n\t\t\t\tremove(armLine);\n\t\t\t\tdrawArm(x,y);\n\t\t\t\tinitalizeFigure();\n\t\t\t\tbreak;\n\t\t}\n\t\tclickTracker++;\n\t\tif (clickTracker == 3 || clickTracker == 2) lineActive = true;\n\t}",
"public void mousePressed(MouseEvent e) {\n\t\tfor(Shape s : drawing){\n\t\t\tif(s.isOn(e.getPoint())){\n\t\t\t\tdrawing.currentShape = s;\n\t\t\t\tcurrentShape = s;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"public void mousePressed( MouseEvent e )\n {\n x = pressx = e.getX(); y = pressy = e.getY();\n \n Point p0 = new Point( x, y );\n Point p1 = new Point( pressx, pressy );\n \n if ( mode==0 ) { theShape = theLine = new Line( p0, p1 ); }\n else if ( mode==1 ) { theShape = theBox = new Box( p0, p1 ); }\n \n allTheShapes[ allTheShapesCount++ ] = theShape;\n \n theShape.color = theColorPicker.b.color;\n }",
"@Action(selectedProperty = LINE_PAINTING)\r\n public void toggleLines (ActionEvent e)\r\n {\r\n }",
"@Override\r\n\tpublic void mousePressed(MouseEvent e) {\n\t\tPoint point = new Point();\r\n\t\tpoint.x = e.getX();\r\n\t\tpoint.y = e.getY();\r\n\r\n\t switch (shape) {\r\n\t \r\n\t case LINE :\r\n\r\n\t \tthis.clicksforLine.add(point);\r\n\t \tbreak;\r\n\t case CIRCLE:\r\n\r\n\t \tthis.clicksforCircle.add(point);\r\n\t \tbreak;\r\n\t case POLYGON:\r\n\r\n\t \tthis.clicksforPoly.add(point);\r\n\t \tbreak;\r\n\t case CURVE:\r\n\r\n\t \tthis.clicksforCurve.add(point);\r\n\t \tbreak;\r\n\t case CLEAR:\r\n\t {\r\n\t }\r\n\t \tbreak;\r\n\t default:\r\n\t \tbreak;\r\n\t }\r\n \r\n\t\tSystem.out.println(point.x+ \",\"+point.y);\r\n repaint();\r\n\t\t\r\n\t}",
"@Override\r\n\tpublic void mousePressed(MouseEvent e) {\r\n\t\tLOG.fine(\"Pressed...\");\r\n\t\tif (shapeManipulator != null) {\r\n\t\t\tshapeManipulator.mousePressed(e);\r\n\t\t}\r\n\t}",
"public void mousePressed(MouseEvent e) {\n e.getComponent().requestFocus();\n \n if (e.getSource() instanceof MapBean) {\n // mouse has now been pressed\n mousePressed = true;\n // erase the old circle if any\n eraseCircle();\n \n if (theMap == null) {\n theMap = (MapBean) e.getSource();\n }\n \n // anchor the new first point of the line\n rPoint1 = theMap.getProjection().inverse(e.getPoint());\n // ensure the second point is not yet set.\n rPoint2 = null;\n // add the anchor point to the list of line segments\n segments.addElement(rPoint1);\n // add the distance to the total distance\n totalDistance = totalDistance + distance;\n }\n }",
"public void mousePressed(MouseEvent e) {\n\t\t// It's true that the mouse is pressed\n\t\tmousePress = true;\n\t\t// Record the point user presses as starting point\n\t\tstartTrunk = new Point2D.Double(e.getX(), e.getY());\n\t}",
"@Override\r\n public boolean mousePressed(MouseEvent e) {\r\n state = 2;\r\n return true;\r\n }",
"@Override\n\tpublic void mouseMoved(MouseEvent e) {\n\t\tif(clicks % 2 != 0) {\n\t\t\tend = new Point2D(e.getX(), e.getY());\n\t\t\tline.setEndPoint(end);\n\t\t}\n\t}",
"public void mousePressed(MouseEvent e) {\n \t\t\r\n \t}",
"public void mousePressed(MouseEvent e) {\n if(e.isPopupTrigger()){\n Point2DSerializable checkRange=new Point2DSerializable(e.getPoint(),true);\n if(checkRange.checkInsideFrame()==false){\n return;\n }\n }\n maybeShowPopup(e);\n if((e.getModifiers() & MouseEvent.BUTTON1_MASK)!=0 ){\n if(addRoad==true){\n SelectedObject.setNoBlink();\n //firstSelected.setAlwaysRepaint();\n addJunctionAndRoad(new Point2DSerializable(e.getPoint(),true));//////***\n addRoad=false;\n ctrlOnLine=true;\n PSRender.allwaysRepaintOn();\n }else if(ctrlOnLine==true){\n ////////////////////////////////\n PSRender.allwaysRepaintOff();\n firstSelected.removeLastCtrl();\n firstSelected.addPointCtrl2End(new Point2DSerializable(e.getPoint(),true));\n /**/\n PSRender.repaint();\n //firstSelected.resetAlwaysRepaint();\n firstSelected=null;\n secondSelected=null;\n firstSelectedPointType=NO_SELECTED_TYPE;\n secondSelectedPointType=NO_SELECTED_TYPE;\n\n SelectedObject.setBlink();\n ctrlOnLine=false;\n }else if(addOOPath==true){\n addOOPath=false;\n if(selectedOtherObject!=null){\n selectedOtherObject.addP2(new Point2DSerializable(e.getPoint(),true));\n }else{\n System.out.println(\"Other object == null\");\n }\n PSRender.repaint();\n }\n }\n //System.out.println(\"\\tout method: mousePressed()\");\n }",
"public void mousePressed(MouseEvent e) {\n\n\t\t\t\t\n\t\t\t}",
"public void mousePressed(MouseEvent e) {\n \t // Click gauche enfoncé\n \t if (e.getButton() == 1) {\n\t \t app.modifierCurseurVue(Cursor.MOVE_CURSOR);\n\t \t prevX = e.getX();\n\t \t prevY = e.getY();\n \t }\n }",
"public void mouseReleased(MouseEvent e) // When mouse is released:\n {\n hLineGrabbed = vLineGrabbed = // Neither line is grabbed\n hLineMoved = vLineMoved = false; // Neither line is moved anymore\n }",
"public void mousePressed(MouseEvent event){\n\t\t// We recognized pressing the mouse with a flag\n\t\tclickflag = true;\t\t\n\t}",
"public void mousePressed(MouseEvent e) {\n\n\t}",
"public void mousePressed(MouseEvent e)\r\n\t{\r\n\t}",
"public void mousePressed(MouseEvent e) {\n\t\t\t\n\t\t}",
"public void mousePressed(MouseEvent e) {\n\t\t\t\n\t\t}",
"public void mousePressed(MouseEvent e) {\n\t\t\t\n\t\t}",
"public void mousePressed(MouseEvent e) {\n\t\t\t\n\t\t}",
"public void mousePressed(MouseEvent e) {\n\t\t\n\t}",
"public void mousePressed(MouseEvent e) {\n\t\t\n\t}",
"public void mousePressed(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\tclicks++;\n\t\t\n\t\tif(clicks % 2 != 0) {\n\t\t\tstart = new Point2D(e.getX(), e.getY());\n\t\t\tend = new Point2D(e.getX(), e.getY());\n\t\t\tline = new Line(colorProvider, start, end);\n\t\t\tmodel.add(line);\n\t\t}\n\t}",
"void mousePressed(double x, double y, MouseEvent e );",
"public void mousePressed(MouseEvent e) \r\n\t{\r\n\t}",
"public void mousePressed(MouseEvent e) {\n\t\t\t\r\n\t\t}",
"public void mousePressed() {\n\t\tif(detectCollision(this.p.mouseX,this.p.mouseY)) {\n\t\t\tthis.isPressed = true;\n\t\t\tclick();\n\t\t}\n\t}",
"public void mousePressed(MouseEvent e) {\n\t\t\r\n\t}",
"@Override\n public void mouseClicked(MouseEvent e) {\n if (e.getButton() == MouseEvent.BUTTON3) {\n if (currentDrawing == null) {\n return;\n }\n currentDrawing = null;\n canvas.repaint();\n }\n\n// start drawing\n if (currentDrawing == null) {\n currentDrawing = new Line(e.getPoint(), e.getPoint(), outlineColorProvider.getCurrentColor());\n canvas.repaint();\n return;\n }\n\n// finish drawing\n currentDrawing.setEnd(e.getPoint());\n drawingModel.add(currentDrawing);\n currentDrawing = null;\n }",
"@Override\n\tpublic void mousePressed(MouseEvent e) {\n\t\tco.mousePressed(e);\n\t}",
"public void mousePressed(MouseEvent e)\n\t{\n\t}",
"private void pressedEdge(MouseEvent e) {\r\n if (e.getModifiers() >= MouseEvent.BUTTON1_MASK) {\r\n /* Click on a node */\r\n if (graphX.nodesContains(e.getPoint()) == true) {\r\n /* Set the first point in the tool */\r\n edgeTool.setFirstPoint(e.getPoint());\r\n }\r\n }\r\n }",
"@Override\n public void mouseClicked(MouseEvent e) {\n clicked = true;\n }",
"@Override\n public void mousePressed(final MouseEvent theEvent) {\n myTool = PowerPaintMenus.getTool();\n if (!myHasShape) {\n myHasShape = true;\n myCurrentShape = myTool.start(theEvent.getX(), theEvent.getY());\n repaint();\n }\n }",
"@Override\n public void mousePressed(MouseEvent e) {\n\n prevMouse.x = x(e);\n prevMouse.y = y(e);\n\n // 3D mode\n if (getChart().getView().is3D()) {\n if (handleSlaveThread(e)) {\n return;\n }\n }\n\n // 2D mode\n else {\n\n Coord2d startMouse = prevMouse.clone();\n\n if (maintainInAxis)\n maintainInAxis(startMouse);\n\n\n\n // stop displaying mouse position on roll over\n mousePosition = new MousePosition();\n\n // start creating a selection\n mouseSelection.start2D = startMouse;\n mouseSelection.start3D = screenToModel(startMouse.x, startMouse.y);\n\n if (mouseSelection.start3D == null)\n System.err.println(\"Mouse.onMousePressed projection is null \");\n\n\n // screenToModel(bounds3d.getCorners())\n\n }\n }",
"public void mousePressed(MouseEvent e) {\n int modifiers = e.getModifiers();\n Point point = e.getPoint();\n \n if ((modifiers & MouseEvent.BUTTON1_MASK) != 0) {\n startPoint = point;\n }\n }",
"public void mouseEntered(PInputEvent e) {\n\t\t\t\tif(draw){\n\t\t\t\t\tboolean match = false;\n\t\t\t\t\tif(n1!=null){\n\t\t\t\t\t\tLink tlink = new Link(null, n1, in);\n\t\t\t\t\t\tif(n1.getName().regionMatches(0, \"uit\", 0, 3) && in.getName().regionMatches(0, \"uit\", 0, 3) || !AllowOutputConnection(tlink)){\n\t\t\t\t\t\t\tmatch = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(linePresent(in) || in==n1 || match){\n\t\t\t\t\t\tin.setPaint(Color.RED);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tin.setPaint(Color.GREEN);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(removeline){\n\t\t\t\t\tfor(int i=0; i<links.size();i++){\n\t\t\t\t\t\tLink l = links.get(i);\n\t\t\t\t\t\tif (in == l.getNode1() || in == l.getNode2()){\n\t\t\t\t\t\t\tl.getNode1().setPaint(Color.GREEN);\n\t\t\t\t\t\t\tl.getNode2().setPaint(Color.GREEN);\n\t\t\t\t\t\t\tl.getPPath().setTransparency((float)0.5);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}",
"public void mousePressed(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"public void mousePressed(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"public void mousePressed(MouseEvent e) {\n }",
"public void mousePressed(MouseEvent e) {\n if ((e.getModifiers() & InputEvent.BUTTON1_MASK) == InputEvent.BUTTON1_MASK) { // left\n movelight();\n display();\n repaint();\n e.consume();\n }\n }",
"public void mousePressed(MouseEvent e) {\n }",
"public void mousePressed(MouseEvent e) {}",
"public void mousePressed(MouseEvent e) {}",
"public void mousePressed(MouseEvent e) {}",
"public void mousePressed(MouseEvent e) {\r\n\t\tmouseMoved(e);\r\n\t\tmenuControl();\r\n\t\t\r\n\t}",
"public void mousePressed(MouseEvent e) {\n\r\n\t}",
"public void mousePressed(MouseEvent e) {\n oldX = e.getX();\r\n oldY = e.getY();\r\n }",
"public void mouseClicked(MouseEvent e) {\n\t\t\t\tpunto1.setFilled(true);\n\t\t\t\tpunto1.setColor(Color.red);\n\t\t\t\t\tif(numClicks == 0) {\n\t\t\t\t\t\tadd(punto1, e.getX(),e.getY());\n\t\t\t\t\t\tnumClicks++;\n\t\t\t\t\t\taprox.setStartPoint(e.getX(), e.getY());\n\t\t\t\t\t\tadd(engorgio1, e.getX(),e.getY());\n\n\t\t\t\t\t}\n\t\t//final\n\t\t\t\t\telse if(numClicks == 1) {\n\t\t\t\t\t\tpunto2.setFilled(true);\n\t\t\t\t\t\tpunto2.setColor(Color.blue);\n\t\t\t\t\t\tadd(punto2, e.getX(),e.getY());\n\t\t\t\t\t\tnumClicks++;\n\t\t\t\t\t\taprox.setEndPoint(e.getX(), e.getY());\n\t\t\t\t\t\tadd(aprox);\n\t\t\t\t\t\tadd(engorgio2, e.getX(),e.getY());\n\t\t\t\t\t}\n\t\t}",
"@Override\n\t\tpublic void mousePressed(MouseEvent e) {\n\n\t\t\tif(holding) {\n\n\t\t\t\tif(checkPlayer != holdingPlayer) {\n\t\t\t\t\t\n\t\t\t\t\tif(holdingPlayer != null) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tcheckPlayer = holdingPlayer;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tsetHoldPlayer(SmallTable.curPlayer);\n\t\t\t\t\tselectX = currentX;\n\t\t\t\t\tselectY = currentY;\n\t\t\t\t\tinputWait = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\trepaint();\n\t\t}",
"@Override\n public void mousePressed(final MouseEvent e)\n {\n }",
"@Override\r\n public void mousePressed(MouseEvent event) { // on left mouse press, draw shapes\r\n System.out.println(\"pressed\");\r\n\r\n switch (state) {\r\n case DRAWRECT: // for drawing rectangle\r\n RectangleNode rectangle = new RectangleNode(event.getX(), event.getY());\r\n shapes.add(rectangle);\r\n repaint();\r\n state = SELECT;\r\n break;\r\n case DRAWELLIPSE: // for drawing ellipse\r\n EllipseNode ellipse = new EllipseNode(event.getX(), event.getY());\r\n shapes.add(ellipse);\r\n repaint();\r\n state = SELECT;\r\n break;\r\n case DRAWEDGE: // for drawing edge start\r\n Edge edge = new Edge(event.getX(), event.getY(), event.getX(), event.getY());\r\n currentEdge = edge;\r\n shapes.add(edge);\r\n repaint();\r\n state = DRAWINGEDGE;\r\n break;\r\n case DRAWINGEDGE: // for drawing edge end\r\n repaint();\r\n currentEdge = null;\r\n state = SELECT;\r\n break;\r\n default: // select\r\n if (event.getButton() == MouseEvent.BUTTON1) { // if the left mouse button is clicked\r\n for (int i = 0; i < shapes.size(); i++) {\r\n if (shapes.get(i).isClicked(event.getX(), event.getY())) { // checks if the mouse click is in a shape\r\n System.out.println(\"selecting shit\");\r\n\r\n if (selectedElement != null) {\r\n selectedElement.setColor(Color.BLACK);\r\n repaint();\r\n selectedElement = null;\r\n }\r\n\r\n selectedElement = shapes.get(i);\r\n selectedElement.setColor(Color.BLUE);\r\n repaint();\r\n break;\r\n\r\n } else if (selectedElement != null) {\r\n System.out.println(\"deselecting shit\");\r\n selectedElement.setColor(Color.BLACK);\r\n repaint();\r\n selectedElement = null;\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n\r\n if (event.getButton() == MouseEvent.BUTTON3 && selectedElement != null) { // on right mouse press shape is DELETED\r\n System.out.println(\"BUTTON TWO ASDFGHJKL;\");\r\n shapes.remove(selectedElement);\r\n selectedElement = null;\r\n repaint();\r\n }\r\n\r\n\r\n\r\n }",
"public void mousePressed(MouseEvent e)\n {\n points.setX(e.getX());\n points.setY(e.getY());\n }",
"@Override\n public void mousePressed(MouseEvent e) {\n x_pressed = e.getX();\n y_pressed = e.getY();\n \n }",
"public void mouseClicked(MouseEvent e){\r\n\t\tif (e.getButton() == MouseEvent.BUTTON1){\r\n\t\t\tboolean b = myGraph.isAdjacent(roboSpot,(Spot)e.getSource()); \r\n\t\t\tSystem.out.print(e.getSource()+\" Clicked and it is\");\r\n\t\t\tif(!b) System.out.print(\" not\");\r\n\t\t\tSystem.out.println(\" adjacent\");\r\n\t\t} else { //a different button was clicked...\r\n\t\t\tArrayList<Spot> sequence = myGraph.getShortestPath(roboSpot,goalSpot);\r\n\t\t\t\r\n\t\t\tfor(int i=0; i<sequence.size(); i++){\r\n\t\t\t\tsequence.get(i).setSeqInd(i+1);\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.revalidate();\r\n\t\tthis.repaint();\r\n\t}",
"public void mousePressed(MouseEvent e) {\n\t\tSystem.out.println(\"Pressed!!!\");\n\n\t}",
"public void mousePressed( MouseEvent event ){}",
"public void mousePressed (MouseEvent m)\r\n {\r\n \tmousePressed = true;\r\n \tmouseReleased = false;\r\n \tmouseX = m.getX();\r\n \tmouseY = m.getY();\r\n \tpickObject(mouseX, mouseY, m);\r\n \t//System.out.println(\"mousePressed\");\r\n }",
"public void mousePressed(MouseEvent e) {\n\n if(Objects.equals(ToolSelect.GetTool(), \"zoom/pan\")){\n released = false;\n sPoint = MouseInfo.getPointerInfo().getLocation();\n }else {\n\n startPoint = e.getPoint();\n shape = new ColoredRectangle(ToolSelect.GetBorderColor(), ToolSelect.GetFillColor(), new Rectangle(), ToolSelect.GetTool(), null);\n if (Objects.equals(ToolSelect.GetTool(), \"plot\") || Objects.equals(ToolSelect.GetTool(), \"line\")) {\n shape.shape.setBounds(e.getX(), e.getY(), 1, 1);\n }\n }\n\n }",
"public void mousePressed(PInputEvent e) {\n\t\t\t\tif(e.getButton()==1){\n\t\t\t\t\tif(draw){ //when a line is being drawn\n\t\t\t\t\t\tif (pline){ //check if there is already a connection selected\n\t\t\t\t\t\t\tn2 = in;\n\t\t\t\t\t\t\tif(n1==n2){ //trying to connect the same connection\n\t\t\t\t\t\t\t\ttemplink.moveToFront();\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(frame, \"Een connectie mag niet met zichzelf verbonden worden\", \"Fout\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\t\t\t\tdraw = false;\n\t\t\t\t\t\t\t\tn1.setPaint(Color.lightGray);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tboolean linepresent = linePresent(n2);\n\t\t\t\t\t\t\t\tLink tlink = new Link(null,n1,n2);\n\t\t\t\t\t\t\t\tif(!linepresent){//check if 2 outputs are being connected\n\t\t\t\t\t\t\t\t\tif(n1.getName().regionMatches(0, \"uit\", 0, 3) && n2.getName().regionMatches(0, \"uit\", 0, 3)){\n\t\t\t\t\t\t\t\t\t\tdraw = false;\n\t\t\t\t\t\t\t\t\t\t//n2.setPaint(Color.lightGray);\n\t\t\t\t\t\t\t\t\t\tn1.setPaint(Color.red);\n\t\t\t\t\t\t\t\t\t\tn2.setPaint(Color.red);\n\t\t\t\t\t\t\t\t\t\ttemplink.moveToFront();\n\t\t\t\t\t\t\t\t\t\tlayer.repaint();\n\t\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"2 uitgangen mogen niet met elkaar verbonden worden.\", \"Fout\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\t\t\t\t\t\tn1.setPaint(Color.lightGray);\n\t\t\t\t\t\t\t\t\t\tn2.setPaint(Color.lightGray);\n\t\t\t\t\t\t\t\t\t}else if(!AllowOutputConnection(tlink)){\n\t\t\t\t\t\t\t\t\t\tn2.setPaint(Color.lightGray);\n\t\t\t\t\t\t\t\t\t\tif(c1!=null){\n\t\t\t\t\t\t\t\t\t\t\tc1.setPaint(Color.red);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif(c2!=null){\n\t\t\t\t\t\t\t\t\t\t\tc2.setPaint(Color.red);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\ttemplink.moveToFront();\n\t\t\t\t\t\t\t\t\t\tlayer.repaint();\n\t\t\t\t\t\t\t\t\t\tdraw = false;\n\t\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"2 uitgangen zijn onrechtstreeks met elkaar verbonden.\", \"Fout\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\t\t\t\t\t\tif(c1!=null){\n\t\t\t\t\t\t\t\t\t\t\tc1.setPaint(Color.lightGray);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif(c2!=null){\n\t\t\t\t\t\t\t\t\t\t\tc2.setPaint(Color.lightGray);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}else{//not yet a line drawn and the connection isn't connected\n\t\t\t\t\t\t\t\t\t\t\t// to himself and there aren't 2outputs connected\n\t\t\t\t\t\t\t\t\t\tdrawLine(n1, n2);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{// line is already drawn from selected connection\n\t\t\t\t\t\t\t\t\tdraw = false;\n\t\t\t\t\t\t\t\t\ttemplink.moveToFront();\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Er mag maar een lijn per connectie verbonden worden.\", \"Fout\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\t\t\t\t\tn1.setPaint(Color.lightGray);\n\t\t\t\t\t\t\t\t\tn2.setPaint(Color.lightGray);\n\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tpline = false;\n\t\t\t\t\t\t\tif(templink!=null){\n\t\t\t\t\t\t\t\tlayer.removeChild(templink);\n\t\t\t\t\t\t\t\ttemplink = null;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{// another connection is selected to draw a line\n\t\t\t\t\t\t\tn1 = in;\n\t\t\t\t\t\t\tboolean linepresent = linePresent(n1);\n\t\t\t\t\t\t\tif(!linepresent){\n\t\t\t\t\t\t\t\tpline = true;\n\t\t\t\t\t\t\t\tfloat x = (float)(n1.getFullBoundsReference().getCenter2D().getX() + n1.getParent().getFullBounds().getOrigin().getX());\n\t\t\t\t\t\t\t\tfloat y = (float)(n1.getFullBoundsReference().getCenter2D().getY() + n1.getParent().getFullBounds().getOrigin().getY());\n\t\t\t\t\t\t\t\ttemplink = PPath.createLine(x, y, x, y);//temporary line from connection to mousetip\n\t\t\t\t\t\t\t\tlayer.addChild(templink);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(frame, \"Er mag maar een lijn per connectie verbonden worden.\", \"Fout\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\t\t\t\tdraw = false;\n\t\t\t\t\t\t\t\tn1.setPaint(Color.lightGray);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if(removeline){\n\t\t\t\t\t\tfor(int i=0; i<links.size();i++){\n\t\t\t\t\t\t\tLink l = links.get(i);\n\t\t\t\t\t\t\tif (in == l.getNode1() || in == l.getNode2()){\n\t\t\t\t\t\t\t\tl.getNode1().setPaint(Color.lightGray);\n\t\t\t\t\t\t\t\tl.getNode2().setPaint(Color.lightGray);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tremoveLine(in);\n\t\t\t\t\t\tremoveline = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(e.getButton()==3){\n\t\t\t\t\tremoveActions();\n\t\t\t\t\tif(n1!=null){\n\t\t\t\t\t\tn1.setPaint(Color.lightGray);\n\t\t\t\t\t}\n\t\t\t\t\tif(n2!=null){\n\t\t\t\t\t\tn2.setPaint(Color.lightGray);\n\t\t\t\t\t}\n\t\t\t\t\tin.setPaint(Color.lightGray);\n\t\t\t\t}\n\t\t\t\te.setHandled(true);\t\n\t\t\t}",
"@Override\r\n\tpublic void mousePressed(MouseEvent e) {\n\t\tl1.setText(\"You pressed the mouse\");\r\n\t}",
"@Override\n\t\tpublic void mousePressed(MouseEvent e) {}",
"public void mousePressed(MouseEvent e) {\r\n }",
"@Override\n\tpublic void mousePressed(\n\t\t\tMouseEvent e)\n\t\t{\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void mousePressed(MouseEvent e)\n\t\t{\n\t\t\treturn;\n\t\t}",
"public synchronized void mousePressed (MouseEvent e)\n\t{\n\t\tMouseDown = true;\n\t\trequestFocus();\n\t}",
"void mousePressed() {\n firing = true;\n\n}",
"public void mousePressed(java.awt.event.MouseEvent e)\n\t{\n\t\tsuper.collectMouseEvent(e);\n\t}",
"@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\r\n\t\tLOG.fine(\"Clicked\");\r\n\t\tif (shapeManipulator != null) {\r\n\t\t\tshapeManipulator.mouseClicked(e);\r\n\t\t}\r\n\t}",
"public void mousePressed(MouseEvent mouseEvent) {\n if (mouseEvent.isPrimaryButtonDown()) {\n canvasDrawer.drawPressed(mouseEvent, board, true);\n aliveLabel.setText(\"\" + board.getCellsAlive());\n }else if (mouseEvent.isSecondaryButtonDown()) {\n canvasDrawer.setOriginalDrag(mouseEvent);\n canvasArea.setCursor(Cursor.MOVE);\n }\n draw();\n }",
"public void mousePressed(MouseEvent e) {\n if (mousePressedCmd != null) {\n mousePressedCmd.execute();\n }\n }",
"public void mousePressed() {\n }",
"public void mousePressed(MouseEvent e) {\n\t\tint mouseX = e.getX();\n\t\tint mouseY = e.getY();\n\n\t\tif (mouseOver(mouseX, mouseY, (Game.WIDTH / 2) - 95, 150, 150, 50)) {\n\t\t\tgame.state = GAMESTATE.Game;\n\t\t\thandler.addObject(new Player(Game.WIDTH / 2 - 32, Game.HEIGHT / 2 - 32, ID.Player, handler));\n\t\t\thandler.addObject(new BasicEnemy(r.nextInt(Game.WIDTH), r.nextInt(Game.HEIGHT), ID.BasicEnemy, handler));\n\t\t}\n\t\tif (mouseOver(mouseX, mouseY, (Game.WIDTH / 2) - 95, 250, 150, 50)) {\n\t\t\tgame.state = GAMESTATE.Help;\n\t\t}\n\t\tif(mouseOver(mouseX, mouseY,(Game.WIDTH / 2) - 95, 400, 160, 50)){\n\t\t\thud.setLevel(1);\n\t\t\thud.setScore(0);\n\t\t\tgame.state = GAMESTATE.Game;\n\t\t}\n\t}",
"@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\n\t\t\t}",
"void mousePressed(MouseEvent mouseEvent);",
"public void mousePressed(MouseEvent e) {\n\n }",
"@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t}",
"@Override\n public void mousePressed(MapEventMouse e) {\n if (SwingUtilities.isLeftMouseButton(e)) {\n start = e.getPoint();\n startCoordinate = e.getLocation();\n isDragging = true;\n end = null;\n }\n }",
"@Override\n\t\t\t\t\tpublic void mousePressed(MouseEvent e) {\n\n\t\t\t\t\t}",
"boolean _mousePressed(MouseEvent ev) {\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic void mouseMoved(MouseEvent e) {\r\n\t\t// for Polyline\r\n\t\tif (shapeManipulator != null) {\r\n\t\t\tshapeManipulator.mouseMoved(e);\r\n\t\t}\r\n\t}",
"public void mousePressed(MouseEvent mEvent) \n {\n /* take no action while game running */\n if(GAME_RUNNING)\n return;\n\n /* only respond to button 1 */\n if(mEvent.getButton() != MouseEvent.BUTTON1)\n return;\n \n /* TODO: remove debug msg */\n\t\t//System.out.println(\"Mouse pressed on the \"+ mEvent.getComponent().getClass().getName() +\" @ \"+ mEvent.getX() + \", \" + mEvent.getY());\n\t\t\n\t\tif(SELECT_MODE != SelectMode.DRAGGING && SELECT_MODE != SelectMode.ADDING)\n\t\t{\n\t\t\tpressX = mEvent.getX();\n\t\t\tpressY = mEvent.getY();\n\t\t}\n\t}",
"@Override\n public void mouseClicked(MouseEvent e) {\n System.out.println(\"MouseClicked\");\n //kwadrat.clicked();\n trojkat.clicked();\n //kolo.clicked();\n //square.clicked();\n }",
"public void mouseClicked(int mouseX, int mouseY, int mouse) {}",
"@Override\r\n public void mousePressed(MouseEvent e) {\n }",
"@Override\r\n public void mousePressed(MouseEvent e) {\r\n\r\n }",
"@Override\r\n public void mousePressed(MouseEvent e) {\r\n\r\n }",
"@Override\n public void mousePressed(MouseEvent e) {\n x_pressed = e.getX();\n y_pressed = e.getY();\n \n }"
] | [
"0.7392495",
"0.7020833",
"0.69139904",
"0.683753",
"0.6772609",
"0.6761114",
"0.6664822",
"0.6647117",
"0.65509695",
"0.6540303",
"0.65297747",
"0.6525398",
"0.6483763",
"0.64796776",
"0.64683306",
"0.6457948",
"0.6448427",
"0.6445658",
"0.644468",
"0.644468",
"0.644468",
"0.644468",
"0.64427483",
"0.64427483",
"0.64427483",
"0.643993",
"0.6430927",
"0.64307344",
"0.64292574",
"0.6426296",
"0.6417751",
"0.6401311",
"0.6396349",
"0.6385251",
"0.6371079",
"0.63699317",
"0.63670975",
"0.63663983",
"0.6359628",
"0.6342615",
"0.63395345",
"0.63395345",
"0.6334859",
"0.6333362",
"0.631294",
"0.63041615",
"0.63041615",
"0.63041615",
"0.62697875",
"0.62672955",
"0.62632155",
"0.6254558",
"0.62543815",
"0.6220884",
"0.62179214",
"0.62163115",
"0.6211977",
"0.6195163",
"0.61920005",
"0.6179262",
"0.61757654",
"0.6166182",
"0.61603343",
"0.61552554",
"0.6148519",
"0.61362326",
"0.6123987",
"0.6118553",
"0.6117414",
"0.61133456",
"0.61108476",
"0.61085176",
"0.61011523",
"0.6100768",
"0.6099577",
"0.6086406",
"0.6074508",
"0.6074508",
"0.6074508",
"0.6074508",
"0.6074508",
"0.6074508",
"0.6074508",
"0.6074508",
"0.6074508",
"0.6074508",
"0.60620487",
"0.60605717",
"0.60552573",
"0.6050551",
"0.6048298",
"0.6040064",
"0.60391325",
"0.603741",
"0.6034882",
"0.603209",
"0.60320413",
"0.60286117",
"0.60286117",
"0.60267735"
] | 0.75182134 | 0 |
/ Name: mouseReleased Purpose: This is the method that is run when the user, after having pressed the mouse, releases it. It sets both "line grabbed" toggles to false (so when a user moves the mouse, the line(s) no longer move). Parameters: e: MouseEvent (the mouse release event) Return: void | public void mouseReleased(MouseEvent e) // When mouse is released:
{
hLineGrabbed = vLineGrabbed = // Neither line is grabbed
hLineMoved = vLineMoved = false; // Neither line is moved anymore
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void mouseReleased(MouseEvent e) {\n\t\tmouseDown = false;\n\t}",
"public void mouseReleased(MouseEvent e) {\n mDown=false;\n }",
"public void mouseReleased(MouseEvent e) {\n mouseX = e.getX();\n mouseY = e.getY();\n if(onClick!=null) {\n mouseRelease = true;\n }\n }",
"@Override\r\n\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\tif (e.isShiftDown() && getCurrentShape()==\"Line\") {\r\n\t\t\t\tmyLine = new Line(startPoint, endPoint, outline);\r\n\t\t\t\tstartPoint = null;\r\n\t\t\t\tendPoint = null;\r\n\t\t\t\trepaint();\r\n\t\t\t}\r\n\t\t\tif (e.isShiftDown() && getCurrentShape()==\"Oval\") {\t\r\n\t\t\t\tmyOval = new Oval(startPoint, width, height, outline, fill);\r\n\t\t\t\tstartPoint = null;\r\n\t\t\t\tendPoint = null;\r\n\t\t\t\twidth = 0;\r\n\t\t\t\theight = 0;\r\n\t\t\t\trepaint();\r\n\t\t\t}\r\n\t\t\tif (e.isControlDown()) {\r\n\t\t\t\trepaint();\r\n\t\t\t\tShapes.remove(Shapes.get(Shapes.size() - 1));\r\n\t\t\t}\r\n\t\t}",
"public void mouseReleased(MouseEvent e) {\n\t\t// It's true that the mouse is released now\n\t\tmouseRelease = true;\n\t\t// Record the point user releases as end point\n\t\tendTrunk = new Point2D.Double(e.getX(), e.getY());\n\t\t// Pain the tree\n\t\trepaint();\n\t}",
"public void mouseReleased() {\n super.mouseReleased();\n pressed = false;\n properties.post_mouseReleased(1);\n }",
"@Override\r\n\tpublic void mouseReleased(MouseEvent e) {\r\n\t\tLOG.fine(\"Released...\");\r\n\t\tif (shapeManipulator != null) {\r\n\t\t\tshapeManipulator.mouseReleased(e);\r\n\t\t}\r\n\t}",
"public void mouseReleased (MouseEvent m)\r\n {\r\n \tmousePressed = false;\r\n \tmouseReleased = true;\r\n \tobjPicked = false;\r\n \t//System.out.println(\"mouseReleased..\");\r\n }",
"@Override\n\tpublic void mouseReleased(MouseEvent e) {\n\t\tisMoved = false;\n\t}",
"public void mouseReleased() {\n\t\tthis.isPressed = false;\n\t}",
"public void mouseReleased(MouseEvent e) {\n if (mouseReleasedCmd != null) {\n mouseReleasedCmd.execute();\n }\n }",
"public void mouseReleased(MouseEvent e) {\n\t\t}",
"public void mouseReleased(MouseEvent e) {\n\t\t\n\t}",
"public void mouseReleased(MouseEvent e) {\n\t\t\n\t}",
"public void mouseReleased(MouseEvent e) {\n\t\t\n\t}",
"public void mouseReleased(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\t\tpublic void mouseReleased(MouseEvent e)\n\t\t{\n\t\t\treturn;\n\t\t}",
"public void mouseReleased(MouseEvent e) {\n\n\t\t\t}",
"public void mouseReleased(MouseEvent e) {\r\n\t}",
"public void mouseReleased(MouseEvent e) {\n\t\t\t\r\n\t\t}",
"public void mouseReleased(MouseEvent e) {\n\n\t}",
"public void mouseReleased(MouseEvent e) {\n\n\t}",
"public void mouseReleased(MouseEvent e) {\n \t\t\r\n \t}",
"public void mouseReleased(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"@Override\n\tpublic void mouseReleased(MouseEvent e) {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\t mouseReleased = true;\n\t\t cardClicked = false;\n\t\t mouseClick = false;\n\t\t \n\t}",
"public void mouseReleased(MouseEvent e) {\n\t}",
"public void mouseReleased(MouseEvent e) {\n\t\t\t\n\t\t}",
"public void mouseReleased(MouseEvent e) {\n\t\t\t\n\t\t}",
"public void mouseReleased(MouseEvent e)\r\n\t{\r\n\t}",
"public void mouseReleased(MouseEvent mouseRelease)\r\n\t{\r\n\t\tmouseReleasedX = mouseRelease.getX();\r\n\t\tmouseReleasedY = mouseRelease.getY();\r\n\t\tmouseReleasedFlag = true;\r\n\t\t//System.out.println(\"mouseReleasedX: \" + mouseReleasedX);\r\n\t\t//System.out.println(\"mouseReleasedY: \" + mouseReleasedY);\r\n\t}",
"@Override\n public void mouseReleased(final MouseEvent e)\n {\n }",
"public void mouseReleased(MouseEvent e) {\n\t\t\r\n\t}",
"public void mouseReleased(java.awt.event.MouseEvent e)\n\t{\n\t\tsuper.collectMouseEvent(e);\n\t}",
"public void mouseReleased(MouseEvent e)\n\t{\n\t}",
"void mouseReleased(double x, double y, MouseEvent e );",
"@Override\n\tpublic void mouseReleased(MouseEvent e) {\n\n\t\tif (!enabled) {\n\t\t\treturn;\n\t\t}\n\t\tx2 = e.getX();\n\t\ty2 = e.getY();\n\t\tedg.newCords(x2, y2);\n\t\tedg.repaint();\n\t\tedg.revalidate();\n\t\tenabled = false;\n\t\tAssignment.clicked = 0; // Allows another button to get pressed\n\t}",
"public void mouseReleased(MouseEvent release) {\r\n\t\tif (SwingUtilities.isLeftMouseButton(release)) {\r\n\t\t\twasReleased = true;\r\n\t\t}\r\n\r\n\t\telse if (SwingUtilities.isRightMouseButton(release)) {\r\n\t\t\trClick = false;\r\n\t\t}\r\n\t}",
"private void releasedEdge(MouseEvent e) {\r\n if (e.getModifiers() >= MouseEvent.BUTTON1_MASK) {\r\n if (edgeTool.getDrawState() == true && graphX.nodesContains(e.getPoint()) == true) {\r\n edgeTool.setSeccondPoint(e.getPoint());\r\n\r\n addEdge(graphX.getNode(edgeTool.getFirstPoint()), graphX.getNode(edgeTool.getSeccondPoint()));\r\n }\r\n /* Reset the tool in any case */\r\n edgeTool.reset();\r\n }\r\n }",
"public void mouseReleased( MouseEvent e )\n {\n }",
"@Override\n\tpublic void mouseReleased(\n\t\t\tMouseEvent e)\n\t\t{\n\t\t\t\n\t\t}",
"public void mouseReleased(MouseEvent e) {\n }",
"public void mouseReleased(MouseEvent e) {}",
"public void mouseReleased(MouseEvent e) {}",
"public void mouseReleased(MouseEvent e) {}",
"public void mouseReleased(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"public void mouseReleased(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"public void mouseReleased(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"public void mouseReleased(MouseEvent e) {\n\r\n\t\t}",
"boolean _mouseReleased(MouseEvent ev) {\n\t\treturn false;\n\t}",
"public void mouseReleased( MouseEvent event ){}",
"@Override\n\t\tpublic void mouseReleased(MouseEvent e) {\n\n\t\t}",
"public void mouseReleased(MouseEvent e) {\n\r\n\t}",
"public void mouseReleased(MouseEvent e) {\n\r\n\t}",
"@Override\n\tpublic void mouseMoved(MouseEvent e) {\n\t\tif(clicks % 2 != 0) {\n\t\t\tend = new Point2D(e.getX(), e.getY());\n\t\t\tline.setEndPoint(end);\n\t\t}\n\t}",
"@Override\n\tpublic void mouseReleaseHandler(MouseEvent e) {\n\n\t}",
"void mouseReleased() {\n firing = false;\n}",
"@Override\r\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t}",
"@Override\r\n public void mouseReleased(MouseEvent e) {\n }",
"@Override\r\n public void mouseReleased(MouseEvent e) {\n }",
"@Override\r\n public void mouseReleased(MouseEvent e) {\n }",
"@Override\n\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\n\t\t\t\t}",
"@Override\n\tpublic void mouseReleased(MouseEvent arg0) {\n\t\tif(Piece.selectedPiece != null)\n\t\t{\n\t\t\tPiece.moving = false;\n\t\t\tPiece.selectedPiece.setMoving(false);\n\t\t\tdraw();\n\t\t\trepaint();\n\t\t\t//System.out.println(\"mouseReleased\");\n\t\t}\n\t}",
"public void mouseReleased(int mouseX, int mouseY) {\n\t\t// your code here\n\t\tint xDelta = mouseX - xI;\n\t\tint yDelta = mouseY - yI;\n\t\t\n\t\txVelo = -xDelta/10;\n\t\tyVelo = -yDelta/10;\n\t\t\n\t\tgSwitch = true;\n\t}",
"@Override\n\t\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\n\t\t\t\t\t}",
"@Override\n public void mouseReleased(MouseEvent e) {\n }",
"@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\n\t\t\t}",
"@Override\n public void mouseReleased(MouseEvent e)\n {\n }",
"@Override\n public void mouseReleased(MouseEvent e)\n {\n }",
"@Override\n\t\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\t}",
"@Override\r\n public void mouseReleased(MouseEvent e) {\r\n\r\n }",
"@Override\r\n public void mouseReleased(MouseEvent e) {\r\n\r\n }",
"public void mousePressed(MouseEvent e) // When mouse is pressed:\n {\n Location pt = new Location(e.getX(),e.getY());\n origPress = pt;\n\n if(hLine.contains(pt)) // If press is on hLine:\n {\n hLineGrabbed = true; // hLine is grabbed\n }\n\n if(vLine.contains(pt)) // If press is on vLine:\n {\n vLineGrabbed = true; // vLine is grabbed\n }\n\n lastPt = pt; // Set the point to lastPt\n }",
"@Override\r\n\t\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"public boolean mouseReleased(MouseEvent e) {\n Debug.message(\"eomg\",\n \"GraphicStateMachine|delete node state|mouseReleased\");\n\n GrabPoint mp = graphic.getMovingPoint(e);\n\n // If the graphic itself was clicked on, then just go to\n // selected\n // mode.\n if (mp != null) {\n int index = ((EditableOMPoly) graphic).whichGrabPoint(mp);\n if (index != EditableOMPoly.OFFSET_POINT_INDEX) {\n ((EditableOMPoly) graphic).deletePoint(index);\n }\n }\n\n graphic.getStateMachine().setSelected();\n graphic.redraw(e, true);\n\n return false;\n }",
"@Override\r\n\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\t\r\n\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\t\r\n\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\t\r\n\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\t\r\n\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\t\r\n\t\t\t\t}",
"@Override\n public void mouseReleased(MouseEvent e) {\n }",
"@Override\r\n public void mouseReleased(MouseEvent e) {\n }",
"public void mouseReleased(MouseEvent e) {\n moveP = null; // jetzt nicht mehr bewegen\n }",
"@Override\r\n\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\r\n\t\t}",
"@Override\r\n\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\r\n\t\t}",
"public void mouseReleased(MouseEvent e) {\n }",
"@Override\n public void mouseReleased(MouseEvent e) {\n\n }",
"@Override\r\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}"
] | [
"0.76225156",
"0.7362874",
"0.73172945",
"0.72873175",
"0.7285379",
"0.7269741",
"0.71390843",
"0.71158546",
"0.70914465",
"0.7022488",
"0.7021552",
"0.7011409",
"0.6983121",
"0.6983121",
"0.6983121",
"0.6983121",
"0.6980878",
"0.6963082",
"0.6960888",
"0.69597334",
"0.6956234",
"0.6956234",
"0.6943963",
"0.69394547",
"0.6935677",
"0.69322836",
"0.69317895",
"0.69317895",
"0.69266665",
"0.69166523",
"0.6898698",
"0.68866545",
"0.68761104",
"0.68712234",
"0.68406963",
"0.68335664",
"0.6831337",
"0.68252206",
"0.682324",
"0.68201077",
"0.6794897",
"0.6766225",
"0.6766225",
"0.6766225",
"0.6763822",
"0.6763822",
"0.6763822",
"0.6754712",
"0.67523015",
"0.67475796",
"0.67461985",
"0.6725957",
"0.6725957",
"0.6715139",
"0.67058504",
"0.66849035",
"0.6679217",
"0.66670865",
"0.66670865",
"0.66670865",
"0.66621184",
"0.66619533",
"0.66510373",
"0.66489106",
"0.6645604",
"0.6643059",
"0.6643059",
"0.6643059",
"0.6643059",
"0.6643059",
"0.6643059",
"0.6643059",
"0.6643059",
"0.6643059",
"0.6643059",
"0.66320163",
"0.66320163",
"0.6625214",
"0.6625214",
"0.6614033",
"0.6614033",
"0.6609797",
"0.6606974",
"0.6606974",
"0.66044456",
"0.6599568",
"0.65955764",
"0.65955764",
"0.65955764",
"0.65955764",
"0.65955764",
"0.65883726",
"0.6585424",
"0.65852994",
"0.6581565",
"0.6581565",
"0.658075",
"0.65728056",
"0.65696084",
"0.65696084"
] | 0.8737616 | 0 |
/ Name: mouseDragged Purpose: This is the method that is run when the user, after having pressed the mouse, moves it without releasing. If the user does a drag while one or both of the lines is grabbed, then the line(s) grabbed move with the user's mouse, and the lines are forced to remain within a horizontal and vertical margin, which are defined at the beginning of this class. Parameters: e: MouseEvent (the mouse drag event) Return: void | public void mouseDragged(MouseEvent e) // When mouse is dragged:
{
Location pt = new Location(e.getX(),e.getY());
dragDx = pt.getX() - lastPt.getX();
dragDy = pt.getY() - lastPt.getY();
// If H Line was grabbed and drag is within the margins:
if(hLineGrabbed && pt.getY() >= MARGIN_HORIZONTAL && // If hLine grabbed
pt.getY() <= canvasHeight - MARGIN_HORIZONTAL) // and drag is in
{ // the margins:
hLine.setEndPoints(0, (hLine.getStart()).getY() + dragDy,
canvasWidth,
(hLine.getStart()).getY() + dragDy);// Move hLine
if(lastPt != pt) // If new point is
{ // different (moved):
hLineMoved = true; // hLine was moved
}
else // If new point is
{ // same (not moved):
hLineMoved = false; // hLine not moved
}
}
// If V Line was grabbed and drag is within the margins:
if(vLineGrabbed && pt.getX() >= MARGIN_VERTICAL && // If vLine grabbed
pt.getX() <= canvasWidth - MARGIN_VERTICAL) // and drag is in
{ // the margins:
vLine.setEndPoints((vLine.getStart()).getX() + dragDx, 0,
(vLine.getStart()).getX() + dragDx,
canvasHeight); // Move vLine
if(lastPt != pt) // If new point is
{ // different (moved):
vLineMoved = true; // vLine was moved
}
else // If new point is
{ // same (not moved):
vLineMoved = false; // vLine not moved
}
}
hLineProportion = (hLine.getStart()).getY() / canvasHeight;
vLineProportion = (vLine.getStart()).getX() / canvasWidth;
lastPt = pt; // Set the point to
dragDx = dragDy = 0; // Reset drag delta
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void mouseDragged(MouseEvent e) {\n currX = e.getX();\r\n currY = e.getY();\r\n\r\n if(g2 != null) {\r\n // Draw line if g2 context is not null\r\n g2.drawLine(oldX, oldY, currX, currY);\r\n // Refresh draw area to repaint\r\n repaint();\r\n // Stores current coordinates x,y as old x,y\r\n oldX = currX;\r\n oldY = currY;\r\n }\r\n }",
"void dragLines() {\n\t\t// calculate the offset made by mouseDrag -- subtract beginOffsetP from\n\t\t// P\n\t\toffsetP = PVector.sub(P, beginOffsetP);\n\n\t\tfor (int i = 0; i < amount; i++)\n\t\t\tline[i].drag();\n\t}",
"public void mouseDragged(MouseEvent e) \r\n\t{\r\n\t\tswitch (MouseDown) {\r\n\t\t\tcase 1:\r\n\t\t\t\tgetCamera().rotateY(((float)LastMouse[0]-e.getX())*0.4F);\r\n\t\t\t\tgetCamera().rotateX(((float)LastMouse[1]-e.getY())*-0.4F);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tgetCamera().translate(((float)LastMouse[0]-e.getX())*-0.01F,0,0);\r\n\t\t\t\tgetCamera().translate(0,((float)LastMouse[1]-e.getY())*0.01F,0);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\tgetCamera().zoom(((float)LastMouse[1]-e.getY())*0.1F);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t//System.out.print(\"MMove: \" + e.getPoint().toString() + \"\\r\");\r\n\t\te.consume();\r\n\t\tLastMouse[0] = e.getX();\r\n\t\tLastMouse[1] = e.getY();\r\n\t\trender(true);\t\t\r\n\t}",
"public void mouseDragged( MouseEvent e )\n {\n x = e.getX(); y = e.getY();\n \n theShape.ends[0].x = x;\n theShape.ends[0].y = y;\n /*\n if ( mode==0 ) // Line\n {\n theLine.ends[0].x = x; \n theLine.ends[0].y = y; \n }\n else if ( mode==1 ) // Box\n {\n theBox.ends[0].x = x;\n theBox.ends[0].y = y;\n }\n */\n \n System.out.println(\"dragged to x=\"+x+\" y=\"+y);\n repaint();\n }",
"void setupDragLines() {\n\t\tmouseLockedToLine = true;\n\t\tbeginOffsetP.set(P); // lock the beginning position of the offset vector\n\t\tfor (int i = 0; i < amount; i++)\n\t\t\tline[i].resetLockPoints(P); // check\n\t}",
"@Override\n\tpublic void mouseMoved(MouseEvent e) {\n\t\tif(clicks % 2 != 0) {\n\t\t\tend = new Point2D(e.getX(), e.getY());\n\t\t\tline.setEndPoint(end);\n\t\t}\n\t}",
"public void mouseDragged(MouseEvent e) {\n\t \t\t\n\t \t}",
"public void mouseDragged(MouseEvent e) {\n\n }",
"@Override\n\tpublic void mouseDragged(MouseEvent e) {\n\t\tdx=dx+(e.getX()-x);\n\t\tdy=dy+(e.getY()-y);\n\t\t\n\t\tx=e.getX();\n\t\ty=e.getY();\n\t}",
"public void mouseDragged(MouseEvent e) {\n\t\t\r\n\t}",
"public void mouseDragged(MouseEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void mouseDragged(MouseEvent e) {\r\n\t\tLOG.fine(\"Dragged [\" + e.getX() + \", \" + e.getY() + \"]...\");\r\n\t\t\r\n\t\tif (shapeManipulator != null) {\r\n\t\t\tshapeManipulator.mouseDragged(e);\r\n\t\t}\r\n\t}",
"public void mouseDragged(MouseEvent e) {\n\t\t\n\t}",
"public void mouseReleased(MouseEvent e) // When mouse is released:\n {\n hLineGrabbed = vLineGrabbed = // Neither line is grabbed\n hLineMoved = vLineMoved = false; // Neither line is moved anymore\n }",
"@Override\n public void mouseDragged(MouseEvent e) {\n\n // Check if mouse rate limiter wish to forbid this mouse drag instruction\n if (rateLimiter != null && !rateLimiter.rateLimitCheck()) {\n return;\n }\n\n // Apply mouse drag\n Coord2d mouse = xy(e);\n\n // 3D mode\n if (getChart().getView().is3D()) {\n // Rotate if left button down\n if (AWTMouseUtilities.isLeftDown(e)) {\n Coord2d move = mouse.sub(prevMouse).div(100);\n rotate(move);\n }\n\n // Shift if right button down\n else if (AWTMouseUtilities.isRightDown(e)) {\n Coord2d move = mouse.sub(prevMouse);\n if (move.y != 0)\n shift(move.y / 500);\n }\n\n }\n\n // 2D mode\n else {\n // Record the mouse selection in progress\n Coord2d dragMouse = xy(e);\n\n if (maintainInAxis)\n maintainInAxis(dragMouse);\n\n\n mouseSelection.stop2D = dragMouse;\n mouseSelection.stop3D = screenToModel(dragMouse.x, dragMouse.y);\n\n getChart().getView().shoot();\n\n }\n\n prevMouse = mouse;\n }",
"public void mouseDragged(MouseEvent e) {\n\t}",
"public void mouseDragged( MouseEvent e ){\n\t\t\t\t\tint xValue, yValue;// comments similar to mousePressed method\n\t\t\t\t\tCoordinate currentMousePosition;\n\t\t\t\t\txValue = e.getX();\n\t\t\t\t\tyValue = e.getY();\n\t\t\t\t\tcurrentMousePosition = new Coordinate(xValue, yValue);\n\t\t\t\t\tmousePositionOnBoard(currentMousePosition);\n\t\t\t\t\trepaint();\n\t\t\t\t}",
"public void mouseDragged( MouseEvent e ) {\n }",
"public void mouseDragged(MouseEvent e){\n\t\t\tt.rotateStick(e.getX(), e.getY());\n\t\t\tmx = e.getX();\n\t\t\tmy = e.getY();\n\t\t\trepaint();\n\t\t}",
"public void mouseDragged(MouseEvent e) {\n if (mouseDraggedCmd != null) {\n mouseDraggedCmd.execute();\n }\n }",
"@Override\r\n\tpublic void mouseMoved(MouseEvent e) {\r\n\t\t// for Polyline\r\n\t\tif (shapeManipulator != null) {\r\n\t\t\tshapeManipulator.mouseMoved(e);\r\n\t\t}\r\n\t}",
"public void mouseDragged(MouseEvent e)\n {}",
"public void mouseDragged( MouseEvent e ) {\n int novaKoordinataX = e.getX();\n int novaKoordinataY = e.getY();\n\n // adjust angles according to the distance travelled by the mouse\n // since the last event\n a -= novaKoordinataX - koordinataX;\n izvishuvanje += novaKoordinataY - koordinataY;\n\n // update the backbuffer\n crtajKocka( grafika );\n\n // update our data\n koordinataX = novaKoordinataX;\n koordinataY = novaKoordinataY;\n\n repaint();\n e.consume();\n }",
"public void mouseDragged(MouseEvent e) {\r\n// if (mouseDraggedEnabled && ((e.getModifiers() & (InputEvent.ALT_DOWN_MASK | InputEvent.ALT_MASK)) == 0))\r\n if (mouseDraggedEnabled && mouseDraggedType == MOUSE_DRAG_ZOOM) {\r\n if (parent.onEvent(e, ChartPanel.MOUSE_DRAGGED)) {\r\n dragged = true;\r\n int _x = Math.min(draggedFromX, e.getX());\r\n int _y = Math.min(draggedFromY, e.getY());\r\n int _w = Math.abs(draggedFromX - e.getX());\r\n int _h = Math.abs(draggedFromY - e.getY());\r\n draggingRectangle = new Rectangle(_x, _y, _w, _h);\r\n repaint();\r\n }\r\n } else if (mouseDraggedEnabled && mouseDraggedType == MOUSE_DRAW_LINE_ON_CHART) {\r\n this.setCursor(crossHairCursor);\r\n if (parent.onEvent(e, ChartPanel.MOUSE_DRAGGED)) {\r\n dragged = true;\r\n int x1 = draggedFromX;\r\n int y1 = draggedFromY;\r\n int x2 = e.getX();\r\n int y2 = e.getY();\r\n lineToDraw = new ArrayList<Point>(2);\r\n lineToDraw.add(new Point(x1, y1));\r\n lineToDraw.add(new Point(x2, y2));\r\n repaint();\r\n }\r\n }\r\n// if ((e.getModifiers() & (InputEvent.ALT_DOWN_MASK | InputEvent.ALT_MASK)) != 0) // Alt + Click: Grab Scroll\r\n if (mouseDraggedEnabled && mouseDraggedType == MOUSE_DRAG_GRAB_SCROLL) {\r\n this.setCursor(closedHandCursor);\r\n int x = this.getVisibleRect().x - (e.getX() - draggedFromX);\r\n int y = this.getVisibleRect().y - (e.getY() - draggedFromY);\r\n this.scrollRectToVisible(new Rectangle(x, y, this.getVisibleRect().width, this.getVisibleRect().height));\r\n// this.setCursor(defaultCursor);\r\n }\r\n // MOUSE_DRAW_ON_CHART\r\n if (mouseDraggedEnabled && mouseDraggedType == MOUSE_DRAW_ON_CHART) {\r\n this.setCursor(drawingCursor);\r\n if (parent.onEvent(e, ChartPanel.MOUSE_DRAGGED)) {\r\n dragged = true;\r\n if (oneDrawing == null) {\r\n oneDrawing = new PointList<GeoPoint>(10);\r\n oneDrawing.setLineColor(drawColor);\r\n }\r\n GeoPoint dpt = getGeoPos(e.getX(), e.getY());\r\n // System.out.println(\"Point \" + dpt.toString());\r\n oneDrawing.add(dpt);\r\n repaint();\r\n }\r\n }\r\n if (parent instanceof ChartPanelParentInterface_II)\r\n ((ChartPanelParentInterface_II) parent).afterEvent(e, ChartPanel.MOUSE_DRAGGED);\r\n }",
"@Override\n public void onDrag(MouseEvent e, GraphicsContext g) {\n g.lineTo(e.getX(), e.getY());\n g.setLineWidth(1);\n g.stroke();\n }",
"public void mouseDragged(MouseEvent e) {\n }",
"public void mouseDragged(MouseEvent e) {}",
"public void mouseDragged(MouseEvent e){}",
"@Override\n\tpublic void mouseDragged(MouseEvent e) {\n\t\tco.mouseDragged(e);\n\t}",
"void mouseDragged(double x, double y, MouseEvent e );",
"public void mouseDragged(MouseEvent e) {\n mouseX = e.getX();\n mouseY = e.getY();\n }",
"@Override\n\t\tpublic void mouseDragged(MouseEvent e) {\n\n\t\t}",
"@Override\n public void onDrag(MouseEvent e, GraphicsContext g) {\n g.lineTo(e.getX(), e.getY());\n g.stroke();\n }",
"public void mouseDragged (MouseEvent e) {}",
"@Override\n\t\t\tpublic void mouseDragged(MouseEvent e) {\n\t\t\t}",
"public void mouseDragged(MouseEvent e) {\r\n redispatchMouseEvent(e);\r\n }",
"@Override\n\tpublic void mouseDragged(MouseEvent e) {\n\t\tif (!enabled) {\n\t\t\treturn;\n\t\t}\n\t\tx2 = e.getX();\n\t\ty2 = e.getY();\n\t\tedg.newCords(x2, y2);\n\t\tedg.repaint();\n\t\tedg.revalidate();\n\n\t}",
"public void mouseMoved(MouseEvent e) {\n ptDragStart = e.getPoint();\r\n\r\n }",
"public void mouseDragged(MouseEvent e) {\n\n try {\n dragEndScreen = e.getPoint();\n //Create a point2d.float with the\n Point2D.Float dragStart = transformPoint(dragStartScreen);\n Point2D.Float dragEnd = transformPoint(dragEndScreen);\n //calculate how far the screen is dragged from its start position.\n double dx = dragEnd.getX() - dragStart.getX();\n double dy = dragEnd.getY() - dragStart.getY();\n transform.translate(dx, dy);\n\n //remember to reposition points to avoid unstable dragging.\n dragStartScreen = dragEndScreen;\n dragEndScreen = null;\n repaint();\n } catch (NoninvertibleTransformException ex) {\n ex.printStackTrace();\n }\n\n }",
"boolean onMouseDragged(double mouseX, double mouseY, double prevMouseX, double prevMouseY);",
"public void mouseMoved(MouseEvent e) {\n\t\t\n\t}",
"public void mouseDragged( MouseEvent event ){}",
"public void mouseDragged(MouseEvent mouseDrag)\r\n\t{\r\n\t\tmouseDraggedX = mouseDrag.getX();\r\n\t\tmouseDraggedY = mouseDrag.getY();\r\n\t\tmouseDraggedFlag = true;\r\n\t\t//System.out.println(\"mouseDraggedX: \" + mouseDraggedX);\r\n\t\t//System.out.println(\"mouseDraggedY: \" + mouseDraggedY);\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n\t\tpublic void mouseDragged(MouseEvent e) {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void mouseDragged(MouseEvent e) {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void mouseDragged(MouseEvent e) {\n\t\t\t\n\t\t}",
"public void mouseDragged(MouseEvent event)\n\t\t{}",
"public void mouseDragged(MouseEvent evt) {\n\t\t\t// newX = evt.getX();\n\t\t\t// newY = evt.getY();\n\t\t\t// System.out.println(newX + \" dragged \" + newY);\n\t\t}",
"@Override\r\n\tpublic void mouseDragged(MouseEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void mouseDragged(MouseEvent e) {\n\t\t\r\n\t}",
"@Override\r\n public void mouseDragged(MouseEvent e) {\n }",
"public void mouseMoved(MouseEvent e)\r\n \t{\r\n\t\t//System.out.print(\"MMove: \" + e.getPoint().toString() + \"\\r\");\r\n \t}",
"public void mouseMoved(MouseEvent e){\n\t\t\tt.rotateStick(e.getX(), e.getY());\n\t\t\tmx = e.getX();\n\t\t\tmy = e.getY();\n\t\t\trepaint();\n\n\t\t}",
"@Override\r\n\tpublic void mouseDragged(MouseEvent e) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tif(e.getX()<0)\r\n\t\t\tborder=2;\r\n\t\telse\r\n\t\t\tif(e.getX()>174)\r\n\t\t\t\tborder=173;\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tborder = e.getX();\r\n\t\t\t\trepaint();\r\n\t\t\t}\r\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n public void mouseDragged(MouseEvent e) {\r\n // test if the mouse drags on a node, and make sure the node is in the displaying area(r=40)\r\n if(mode == InputMode.ADD_NODES && nodeUnderMouse != null\r\n && e.getX()>=40 && e.getY()>=40\r\n && e.getX()<=1460 && e.getY()<=860) {\r\n nodeUnderMouse.getData().setPosition(e.getPoint());\r\n canvas.repaint();\r\n }\r\n }",
"@Override\n public void mouseDragged(java.awt.event.MouseEvent e) {\n }",
"public void mouseDragged(MouseEvent e) {\n if(jtf[mmlp1][mmlp2].getBackground()==Color.yellow || isRightClick)\n setNotDraging();// agar khane zard rang bashad wa ya rast klik shawad-\n else //-nemitan bar ruye an draging kard.\n setDraging();\n }",
"void mouseMoved(double x, double y, MouseEvent e );",
"public void mouseDragged(MouseEvent mouseEvent) {\n if (mouseEvent.isPrimaryButtonDown()) {\n canvasDrawer.drawDragged(mouseEvent, board, true);\n aliveLabel.setText(\"\" + board.getCellsAlive());\n } else if (mouseEvent.isSecondaryButtonDown()) {\n canvasDrawer.setDragOffset(mouseEvent);\n }\n draw();\n }",
"public void mouseMoved(MouseEvent mouseMove)\r\n\t{\r\n\t\t\r\n\t}",
"public void mouseDragged(MouseEvent e) {\n if (moveP != null) {\n // Koordinaten des Mauszeigers sind relativ zum sichtbaren Bereich der\n // Zeichenflaeche. Also linke obere Ecke des sichtb. Bereichs holen\n // und beruecksichtigen.\n Rectangle r = ((JScrollPane) e.getSource()).getViewport().getViewRect();\n int f = model.getFactor(); // Zoomfaktor beachten\n int x = r.x + e.getX();\n x = x / f;\n int y = r.y + e.getY();\n y = y / f;\n\n moveP.movePoint(x, y);\n model.notifyChanged();\n }\n }",
"@Override\r\n\t\t\tpublic void mouseDragged(MouseEvent arg0) {\n\t\t\t}",
"@Override\n\tpublic void mouseDragged(MouseEvent e) {\n\n\t}",
"@Override\n public void handleMouseDragged(int x, int y)\n {\n windowManager.mouseDragged(deskXToAbst(x), deskYToAbst(y));\n }",
"public void mouseDragged( MouseEvent evt ){\n Location x = new Location( evt.getX(), evt.getY() );\n pond.moveAxis(x, canvas);\n\n }",
"public void mouseDragged(MouseEvent me) {\n\n\t\t\t}",
"@Override\n public void mouseDragged(MouseEvent e) {\n\n // Check whether left or right mouse is held\n if (SwingUtilities.isLeftMouseButton(e)) {\n // Get x and y\n int x = e.getX();\n int y = e.getY();\n\n // Rotate for LMB\n rt_y -= (old_x - x) / 2;\n rt_x -= (old_y - y) / 2;\n\n // Overwrite last frame data\n old_x = x;\n old_y = y;\n } else if (SwingUtilities.isRightMouseButton(e)) {\n // Get x and y\n int x = e.getX();\n int y = e.getY();\n\n // Translate for RMB\n tr_x -= ((float) old_x - (float) x) / 1000;\n tr_y += ((float) old_y - (float) y) / 1000;\n\n // Overwrite last frame data\n old_x = x;\n old_y = y;\n }\n }",
"@Override\r\n\tpublic void mouseDragged(MouseEvent me) {\r\n\t\tdrag(me.getX(), me.getY());\r\n\t}",
"public void mouseDragged(MouseEvent mEvent) \n {\n /* don't do anything while game is running */\n if(GAME_RUNNING)\n return;\n\n /* TODO: remove debug msg */\n statusMsg = new String(\"mouseDragged @ \" + mEvent.getX() + \", \" + mEvent.getY() + \" on \" + mEvent.getComponent().getClass().getName());\n\n if(mEvent.getComponent() instanceof GameCanvas)\n {\n /* handle mouse dragging on gamecanvas while game is not running */\n switch(SELECT_MODE)\n {\n //=================\n case NONE:\n case SELECTED:\n /* mouse is being dragged but we aren't in drag mode, did this drag start on an unlocked widget? */\n Widget startWidget = timWorld.grabWidget(pressX,pressY); //TODO: add a flag/check so we don't have to continually try to grab in case of failure\n if(startWidget != null && startWidget.isLocked() == false)\n {\n /* mouse dragging started over an unlocked widget, pick it up and begin dragging */\n selectedWidget = startWidget;\n SELECT_MODE = SelectMode.DRAGGING;\n DRAG_TYPE = DragType.PRESS;\n \n clickOffsetX = selectedWidget.getPosition().getX() - pressX;\n clickOffsetY = selectedWidget.getPosition().getY() - pressY;\n \n canvas.repaint();\n }\n break;\n //=================\n case DRAGGING:\n case ADDING:\n /* update mouseX and mouseY for bounding box drawing of the widget being dragged or added */\n mouseX = mEvent.getX();\n mouseY = mEvent.getY();\n canvas.repaint();\n break;\n }\n }\n else if(mEvent.getComponent() instanceof WidgetScroller)\n {\n /* dragging on widget scroller */\n\n /* make sure we aren't already in adding or dragging mode */\n if(SELECT_MODE != SelectMode.ADDING)\n {\n String pressedWidget = ws.getWidgetAt(pressX, pressY);\n if(pressedWidget != null)\n {\n /* pressed on an actual widget, create an instance of it and commence dragging */\n \n // TODO: check for nulls\n addedWidget = pressedWidget;\n selectedWidget = WidgetFactory.createWidget(pressedWidget);\n SELECT_MODE = SelectMode.ADDING;\n DRAG_TYPE = DragType.PRESS;\n\n /* set widget to 0,0 so its boundary will be drawn properly while dragging */\n selectedWidget.setPositionX(0.0f);\n selectedWidget.setPositionY(0.0f);\n\n clickOffsetX = 0;\n clickOffsetY = 0;\n\n canvas.setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));\n\n /* TODO: remove debug msg */\n //System.out.println(\"Picked up \" + pressedWidget + \" from widgetscroller\");\n }\n }\n else\n {\n mouseX = mEvent.getX();\n mouseY = mEvent.getY() + 465;\n canvas.repaint();\n }\n }\n\t}",
"@Override\n\t\tpublic void mouseDragged(MouseEvent arg0) {\n\t\t\t\n\t\t}",
"@Override\n public void mouseDragged(final MouseEvent me){\n\n setSkipped(false);\n \tif(om.equals(\"graphic_associate_interaction\") || om.equals(\"graphic_order_interaction\") || om.equals(\"gap_match_interaction\"))\n \t{\n\t \tif(start != null || mov != null)\n\t \t\tmpos = me.getPoint();\n\t \tfor(int i=hotspots.size()-1; i > -1; --i)\n\t \t\tif(hotspots.elementAt(i).inside(me.getPoint()))\n\t \t\t\thotspots.elementAt(i).setHighlighted(true);\n\t \t\telse\n\t \t\t\thotspots.elementAt(i).setHighlighted(false);\n\t \trepaint();\n \t}\n \tif(om.equals(\"graphic_order_interaction\") || om.equals(\"gap_match_interaction\") || om.equals(\"figure_placement_interaction\"))\n \t{\n \t\tif(mov != null)\n \t\t{\n \t\t\tmov.setPos(me.getPoint());\n \t\t}\n \t\tif (om.equals(\"figure_placement_interaction\")) {\n \t\t repaint();\n \t\t}\n \t}\n \tdrawHSLabel = null;\n }",
"public void mouseMoved(MouseEvent evt) {\r\n }",
"@Override\r\n\tpublic void mouseDragged(MouseEvent e) {\n\t\tl1.setText(\"You dragged the mouse\");\r\n\t}",
"@Override\n\tpublic void mouseDragged(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseDragged(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseDragged(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseDragged(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseDragged(MouseEvent e) {\n\t\t\n\t}",
"void onMouseMoved(double mouseX, double mouseY, double prevMouseX, double prevMouseY);",
"public void mouseMoved(MouseEvent evt) {\n\n\t\t\tif (isDrawing) {\n\t\t\t\tnewX = evt.getX();\n\t\t\t\tnewY = evt.getY();\n\t\t\t\t\n\t\t\t\trepaint();\n\n\t\t\t}\n\t\t}",
"public void mouseDragged(java.awt.event.MouseEvent e) {\n\t\t\t\teditor.repaint();\r\n\t\t\t}",
"private void toolbarEmpMouseDragged(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_toolbarEmpMouseDragged\n int x = evt.getXOnScreen();\n int y = evt.getYOnScreen();\n // Move frame by the mouse delta\n setLocation(getLocationOnScreen().x + x - lastX,\n getLocationOnScreen().y + y - lastY);\n lastX = x;\n lastY = y;\n }",
"@Override\n\tpublic void mouseDragged(MouseEvent e) {\n\t\tshowmBox = false;\n\n\t\tint newx = e.getX(), newy = getHeight() - e.getY();\n\t\tint changex = newx - mousemovex, changey = newy - mousemovey;\n\n\t\tdouble changewindowx = changex * (param.maxx - param.minx) / (getWidth());\n\t\tdouble changewindowy = changey * (param.maxy - param.miny) / (-getHeight());\n\n\t\tparam.maxx -= changewindowx;\n\t\tparam.minx -= changewindowx;\n\t\tparam.maxy += changewindowy;\n\t\tparam.miny += changewindowy;\n\n\t\tmousemovex = newx;\n\t\tmousemovey = newy;\n\n\t\trepaint();\n\t}",
"@Override\r\n\t\t\tpublic void mouseMoved(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\t\tpublic void mouseDragged(MouseEvent arg0) {\n\t\t\tif(state.getStatus()==Status.SELECTING_RECT){\n\t\t\t\tif(startDragginPoint == null)\n\t\t\t\t\tdraggingFrom(arg0.getPoint());\n\t\t\t\tcurrentDragPoint = arg0.getPoint();\t\n\t\t\t\trepaint();\n\t\t\t}\n\t\t\tif(state.getStatus()==Status.SELECTING_RECT_LS){\n\t\t\t\tif(startDragginPoint == null)\n\t\t\t\t\tdraggingFrom(arg0.getPoint());\n\t\t\t\tcurrentDragPoint = arg0.getPoint();\t\n\t\t\t\trepaint();\n\t\t\t}\n\t\t}",
"public void mouseDragged(MouseEvent event) { }",
"@Override\n\t\tpublic void mouseMoved(MouseEvent e) {\n\t\t}",
"@Override\n \tpublic void mouseDragged(MouseEvent e) {\n \t}",
"public void mouseMoved(MouseEvent e) {}",
"public void mouseMoved(MouseEvent e) {}",
"public void mouseMoved(MouseEvent e,double w,double h) throws RemoteException;",
"@Override\n public void mouseDragged(MouseEvent arg0) {\n \n }",
"public void mouseMoved(MouseEvent e){}",
"@Override\r\n\tpublic void mouseDragged(MouseEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void mouseDragged(MouseEvent arg0) {\n\t\t\r\n\t}",
"public void mouseMoved(MouseEvent e) {\n }",
"@Override\r\n\t\t\tpublic void mouseDragged(MouseEvent arg0) {\n\r\n\t\t\t}",
"@Override\r\n\tpublic void mouseDragged(MouseEvent e) {\n\r\n\t}",
"@Override\r\n\tpublic void mouseDragged(MouseEvent e) {\n\r\n\t}",
"public void mouseMoved(MouseEvent event) {\n }"
] | [
"0.8079513",
"0.7672222",
"0.7558978",
"0.75233674",
"0.7295044",
"0.7294356",
"0.7291668",
"0.725671",
"0.72395253",
"0.72149104",
"0.72149104",
"0.7207518",
"0.72053784",
"0.71968347",
"0.71747535",
"0.7172807",
"0.71477795",
"0.7130879",
"0.71268195",
"0.7114065",
"0.7073386",
"0.70474744",
"0.7039631",
"0.7023359",
"0.7020253",
"0.7016538",
"0.7013432",
"0.7003587",
"0.7000698",
"0.69967544",
"0.69906664",
"0.698062",
"0.69777477",
"0.6968792",
"0.696762",
"0.696365",
"0.69442505",
"0.6925855",
"0.68971413",
"0.6891467",
"0.68842846",
"0.6868001",
"0.6860177",
"0.6856055",
"0.6856055",
"0.6856055",
"0.6847484",
"0.6843498",
"0.6823977",
"0.6823977",
"0.6807714",
"0.68065435",
"0.67894256",
"0.6789301",
"0.67880553",
"0.6780013",
"0.67790306",
"0.6773672",
"0.6773478",
"0.6761631",
"0.67556083",
"0.6743052",
"0.6734662",
"0.67220086",
"0.6721521",
"0.6709321",
"0.6707636",
"0.66896015",
"0.668405",
"0.6682088",
"0.66749525",
"0.66713613",
"0.6670737",
"0.66696626",
"0.66696626",
"0.66696626",
"0.66696626",
"0.66696626",
"0.6668832",
"0.6666864",
"0.66659886",
"0.666597",
"0.66658056",
"0.6660859",
"0.665236",
"0.66513497",
"0.6646249",
"0.664543",
"0.6642416",
"0.6642416",
"0.6635742",
"0.66310304",
"0.6626782",
"0.6626669",
"0.6626669",
"0.6624178",
"0.6618946",
"0.6607192",
"0.6607192",
"0.66045374"
] | 0.7764722 | 1 |
/ Name: mouseClicked Purpose: This is the method that is run when the user clicks the mouse (a click is when the mouse is pressed AND released with no movement). It creates a ResizableBall object (the description of the "ResizableBall" is given at the beginning of this file). Parameters: e: MouseEvent (the mouse click event) Return: void | public void mouseClicked(MouseEvent e) // When mouse is clicked:
{
Location pt = new Location(e.getX(),e.getY());
ResizableBall t = new ResizableBall( pt.getX(), pt.getY(),
BALL_SIZE, canvas, hLine, vLine,
speedSlider.getValue());
start.addActionListener(t);
stop.addActionListener(t);
clearAll.addActionListener(t);
speedSlider.addChangeListener(t);
canvas.addMouseListener(t);
canvas.addMouseMotionListener(t);
canvas.addComponentListener(t);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void mouseClicked(MouseEvent e) {\n\t\t\n\t\tShape newShape = (Shape)currentShape.clone(); //Creates new shape based on the shape constructed and cloned \n\t\tnewShape.setCenter(e.getX(), e.getY()); //sets the shape to center around the mouse clicked region \n\t\tDrawingCanvas drawingCanvas = (DrawingCanvas)e.getSource(); //creates a drawingCanvas after mouse(clicked)event occurs\n\t\tdrawingCanvas.addShape(newShape); //adds the related shape to drawingCanvas\n\t\t\n }",
"@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\r\n\t\tLOG.fine(\"Clicked\");\r\n\t\tif (shapeManipulator != null) {\r\n\t\t\tshapeManipulator.mouseClicked(e);\r\n\t\t}\r\n\t}",
"@Override\n public void mouseClicked(MouseEvent e) {\n //location where mouse was pressed\n Point mousePoint = e.getPoint();\n //conversion to location on frame\n Vec2 worldPoint = view.viewToWorld(mousePoint);\n float fx = e.getPoint().x;\n float fy = e.getPoint().y;\n float vx = worldPoint.x;\n float vy = worldPoint.y;\n //Completes checks for pressing of GUI components\n restartCheck(vx, vy);\n settingsCheck(vx, vy);\n zoomCheck(fx, fy);\n }",
"public void mouseClicked(MouseEvent e) {\n //System.out.println(\"Mouse Panel pos: \" + e.getX() + \" \" + e.getY() + \"\\n\");\n if (e.getX() >=_ballXpos && e.getX() <= _ballXpos + 25 && e.getY() >=_ballYpos && e.getY() <= _ballYpos + 25 ) { \n \tmoveBallTimer.stop();\n frame2.setVisible(false);\n frame3.setVisible(true);\n frame3.invalidate();\n frame3.repaint();\n }\n // System.out.println(\"{e.getX(): \" + e.getX() + \" / \" + \"_ballXpos: \" + _ballXpos + \" | \" + \"{e.getY(): \" + e.getY() + \" / \" + \"_ballYpos: \" + _ballYpos);\n\n }",
"public void mouseClicked(MouseEvent evt) {\n Location x = new Location( evt.getX(), evt.getY() );\n ripple = new Ripples(x, canvas, pond, true, movingRipples,this);\n run.addActionListener(ripple);\n pause.addActionListener(ripple);\n clear.addActionListener(ripple);\n speedController.addChangeListener(ripple);\n canvas.addMouseListener(ripple);\n canvas.addMouseMotionListener(ripple);\n }",
"public void mouseClicked(MouseEvent e) {\n\t\t\tx = e.getX();//gets the x and y values of the location clicked\r\n\t\t\ty = e.getY();\r\n\t\t\tif((x > 150 && x < 200) && (y > 50 && y < 150))\r\n\t\t\t{\r\n\t\t\t\t Mario myGUI = new Mario();//if they click mario start mario and exits the program\r\n\t\t\t\t this.dispose();\r\n\t\t\t}\r\n\t\t\telse if((x > 300 && x < 350) && (y > 50 && y < 150))\r\n\t\t\t{\r\n\t\t\t\t Luigi myGUI = new Luigi();//if they click luigi start luigi and exits the program\r\n\t\t\t\t this.dispose();\r\n\t\t\t}\r\n\t\t}",
"public RectangleClicker() {\n JFrame myFrame = new JFrame();\n myFrame.setSize(myWindowWidth, myWindowHeight);\n myFrame.add(this);\n myFrame.setVisible(true);\n myFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n addMouseListener(this);\n }",
"public void mouseClicked (MouseEvent e)\r\n\t{\r\n\t\tx = e.getX ();\r\n\t\ty = e.getY ();\r\n\t\t//Rules screen photo button 'PLAY'\r\n\t\tif ((screen == 0 || screen == 4 || screen == 5) && (x > 250 && x < 320) && (y > 360 && y < 395)){ \r\n\t\t\tscreen = 1;\r\n\t\t\trepaint();\r\n\t\t}\r\n\t\t//Game screen photo button 'Press to Start'\r\n\t\telse if (screen == 1 || screen == 2 || screen == 3){ \r\n\t\t\tif ((x > 10 && x < 180) && (y > 80 && y < 105)) \r\n\t\t\t\tnewGame();\r\n\t\t\tanimateButtons ();\r\n\t\t}\r\n\t\t\r\n\r\n\t}",
"public void mouseClicked(MouseEvent e) {\n \t\t\r\n \t}",
"void mouseClicked(double x, double y, MouseEvent e );",
"public void mouseClicked(MouseEvent e) {\n\t\t\n\t}",
"public void mouseClicked(MouseEvent e) {\n\t\t\n\t}",
"public void mouseClicked(MouseEvent e)\n {}",
"@Override\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tif (e.getButton() == MouseEvent.BUTTON1)\n\t\t\t\t{\n\t\t\t\t\tif (pl.NumBullets > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t\t//creates shoot and adds the to the list\n\t\t\t\t\t\t\tpl.Shoot(); \n\t\t\t\t\t\t\tBulletFired = true; \n\t\t\t\t\t\t\tbul = new Bullet(pl.GetXCoord() + 240,pl.GetYCoord() + 70); \n\t\t\t\t\t\t\tBulletList.add(bul); \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (pl.NumBullets <= 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tGameOn = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//actions performed when mouse button 2 is pressed \t\n\t\t\t\t\t if (e.getButton() == MouseEvent.BUTTON3)\n\t\t\t\t\t{\n\n\t\t\t\t\t\tif (pl.NumRockets > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//creates rockets and adds the to the list\n\t\t\t\t\t\t\tpl.FireRocket(); \n\t\t\t\t\t\t\tRocketFired = true; \n\t\t\t\t\t\t\trock = new Rocket(pl.GetXCoord() + 200,pl.GetYCoord() + 60); \n\t\t\t\t\t\t\tRocketList.add(rock); \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}",
"public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"public void mouseClicked(MouseEvent e) {\n\n }",
"public void mouseClicked(MouseEvent e) {\n\t\t\t\n\t\t}",
"public void mouseClicked(MouseEvent e) {\n\t\t\t\n\t\t}",
"public void mouseClicked(MouseEvent e) {\r\n\t}",
"public void mouseClicked(MouseEvent e) {}",
"public void mouseClicked(MouseEvent e) {}",
"public void mouseClicked(MouseEvent e) {}",
"public void mouseClicked(MouseEvent e) {}",
"public void mouseClicked(MouseEvent e) {\n\t}",
"public void mouseClicked(MouseEvent e) {\n\t}",
"public void mouseClicked(MouseEvent e) {\n\t}",
"public void mouseClicked(MouseEvent e) {\n\n\t\t\t}",
"public void mouseClicked(MouseEvent e) {\n\n\t\t\t}",
"public void mouseClicked(MouseEvent e) \t{\n\t\t\t\t\r\n\t\t\t}",
"public void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}",
"public void mouseClicked(MouseEvent e) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t\r\n\t}",
"public void mouseClicked(MouseEvent event){}",
"public abstract void mouseClicked(MouseEvent e);",
"@Override\n\tpublic void mouseDragged(MouseEvent e) {\n\n\t\tmouseClicked(e);\n\t\t\n\t}",
"public void mouseClicked(MouseEvent e) {\r\n //panel.addCircle(new Circle(e.getX(), e.getY(), 24, Color.BLUE));\r\n // super.mouseClicked(e);\r\n water.addWater(e.getX(), e.getY(), 50);\r\n }",
"public void mouseClicked(MouseEvent e) {\n\r\n\t}",
"@Override\n\tpublic void mouseClicked(\n\t\t\tMouseEvent e)\n\t\t{\n\t\t\t\n\t\t}",
"public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}",
"void mouseClicked(MouseEvent mouseEvent);",
"public void mouseClicked(MouseEvent e) {\n\t\t\t\tpunto1.setFilled(true);\n\t\t\t\tpunto1.setColor(Color.red);\n\t\t\t\t\tif(numClicks == 0) {\n\t\t\t\t\t\tadd(punto1, e.getX(),e.getY());\n\t\t\t\t\t\tnumClicks++;\n\t\t\t\t\t\taprox.setStartPoint(e.getX(), e.getY());\n\t\t\t\t\t\tadd(engorgio1, e.getX(),e.getY());\n\n\t\t\t\t\t}\n\t\t//final\n\t\t\t\t\telse if(numClicks == 1) {\n\t\t\t\t\t\tpunto2.setFilled(true);\n\t\t\t\t\t\tpunto2.setColor(Color.blue);\n\t\t\t\t\t\tadd(punto2, e.getX(),e.getY());\n\t\t\t\t\t\tnumClicks++;\n\t\t\t\t\t\taprox.setEndPoint(e.getX(), e.getY());\n\t\t\t\t\t\tadd(aprox);\n\t\t\t\t\t\tadd(engorgio2, e.getX(),e.getY());\n\t\t\t\t\t}\n\t\t}",
"public void mouseClicked(int mouseX, int mouseY, int mouse) {}",
"public void mousePressed(MouseEvent arg0) {\n\t\t\tSystem.out.println(String.format(\"Position %d/%d\", arg0.getX(), arg0.getY()));\n\t\t\t\n\t\t\tBouncingBall ball = dartOnBall(arg0.getX(), arg0.getY()); \n\t\t\tif (ball != null) {\n\t\t\t\t// Aufgabe 5: Ball l�schen\n\t\t\t\tball.erase();\n\t\t\t\tballs.remove(ball);\n\t\t\t\tSystem.out.println(\"Balls remaining: \" + balls.size());\n\t\t\t} else {\n\t\t\t\tRandom r = new Random();\n\t\t\t\t// Aufgabe 5: Teil geschenkt :-)\n\t\t\t\tballs.add( new BouncingBall(r.nextInt(200)+20, r.nextInt(100)+20, r.nextInt(80)+20,\n\t\t\t\t\t\t new Color(r.nextInt(256),r.nextInt(256),r.nextInt(256)), \n\t\t\t\t\t\t GROUNDLINE, myCanvas) );\t\t\t\t\n\t\t\t}\n\t\t}",
"public void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"public void mouseClicked(MouseEvent e) {\r\n if (e.getButton() == MouseEvent.BUTTON3) {\r\n rectangle = null;\r\n uncolorNodes(selectedIds);\r\n } else if (e.getButton() == MouseEvent.BUTTON1) {\r\n rectangle = new Rectangle(e.getPoint(), new Dimension(1, 1));\r\n colorSelectedNodes();\r\n }\r\n }",
"@Override\n public void mouseClicked(MouseEvent e) {\n clicked = true;\n }",
"public void mouseClicked(MouseEvent e) {\n\n }",
"public void mouseClicked(MouseEvent e) { \r\n }",
"public void mouseClicked(MouseEvent event)\n\t\t{}",
"public void mouseClicked( MouseEvent event ){}",
"public void mousePressed(MouseEvent e) {\n\n if(Objects.equals(ToolSelect.GetTool(), \"zoom/pan\")){\n released = false;\n sPoint = MouseInfo.getPointerInfo().getLocation();\n }else {\n\n startPoint = e.getPoint();\n shape = new ColoredRectangle(ToolSelect.GetBorderColor(), ToolSelect.GetFillColor(), new Rectangle(), ToolSelect.GetTool(), null);\n if (Objects.equals(ToolSelect.GetTool(), \"plot\") || Objects.equals(ToolSelect.GetTool(), \"line\")) {\n shape.shape.setBounds(e.getX(), e.getY(), 1, 1);\n }\n }\n\n }",
"public void mousePressed(MouseEvent e) {\n if(component.getCursor() != Cursor.getDefaultCursor()) {\n // If cursor is set for resizing, allow dragging.\n dragging = true;\n }\n else{\n jmao.inRect(component, e);\n }\n }",
"public void mouseClicked(MouseEvent e) {\n adaptee.listDisponibles_mouseClicked(e);\n }",
"@Override\n\tpublic void mouseClicked(MouseEvent e) \n\t{\n\t\tmouseSO.makeSolidObject(e.getX(), e.getY(), 5, 5);\n\t\t\n\t\t\tif(mouseRect.isCollidingWith(balloon1))\n\t\t\t{\n\t\t\t\tballoonY = 100;\n\t\t\t\tballoonX = (gen.nextInt(650)-75);\n\t\t\t\tif(randomColor.equals(Color.green))\n\t\t\t\t{\n\t\t\t\t\tscore++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tscore--;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(mouseRect.isCollidingWith(balloon2))\n\t\t\t\t{\n\t\t\t\tballoon2Y = 100;\n\t\t\t\tballoon2X = (gen.nextInt(650)-75);\n\t\t\t\tif(randomColor.equals(Color.red))\n\t\t\t\t{\n\t\t\t\t\tscore++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tscore--;\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(mouseRect.isCollidingWith(balloon3))\n\t\t\t\t\t{\n\t\t\t\t\t\tballoon3Y = 100;\n\t\t\t\t\t\tballoon3X = (gen.nextInt(650)-75);\n\t\t\t\t\t\tif(randomColor.equals(Color.blue))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tscore++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tscore--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif(mouseRect.isCollidingWith(balloon4))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tballoon4Y = 100;\n\t\t\t\t\t\t\tballoon4X = (gen.nextInt(650)-75);\n\t\t\t\t\t\t\tif(randomColor.equals(Color.yellow))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tscore++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tscore--;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mouseRect.isCollidingWith(balloon5))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tballoon5Y = 100;\n\t\t\t\t\t\t\t\tballoon5X = (gen.nextInt(650)-75);\n\t\t\t\t\t\t\t\tif(randomColor.equals(Color.magenta))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tscore++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tscore--;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(mouseRect.isCollidingWith(balloon6))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tballoon6Y = 50;\n\t\t\t\t\t\t\t\t\tballoon6X = (gen.nextInt(650)-75);\n\t\t\t\t\t\t\t\t\tif(randomColor.equals(Color.green))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tscore++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tscore--;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif(mouseRect.isCollidingWith(balloon7))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tballoon7Y = 50;\n\t\t\t\t\t\t\t\t\t\tballoon7X = (gen.nextInt(650)-75);\n\t\t\t\t\t\t\t\t\t\tif(randomColor.equals(Color.red))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tscore++;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tscore--;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(mouseRect.isCollidingWith(balloon8))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tballoon8Y = 50;\n\t\t\t\t\t\t\t\t\t\t\tballoon8X = (gen.nextInt(650)-75);\n\t\t\t\t\t\t\t\t\t\t\tif(randomColor.equals(Color.blue))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tscore++;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tscore--;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif(mouseRect.isCollidingWith(balloon9))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tballoon9Y = 50;\n\t\t\t\t\t\t\t\t\t\t\t\tballoon9X = (gen.nextInt(650)-75);\n\t\t\t\t\t\t\t\t\t\t\t\tif(randomColor.equals(Color.yellow))\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tscore++;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tscore--;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif(mouseRect.isCollidingWith(balloon10))\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tballoon10Y = 50;\n\t\t\t\t\t\t\t\t\t\t\t\t\tballoon10X = (gen.nextInt(650)-75);\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(randomColor.equals(Color.magenta))\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tscore++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tscore--;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\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}",
"@Override\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\n\n\t\t}",
"public void mouseClicked(MouseEvent e) {\n\t\t\tJLabel button = (JLabel)e.getSource();\n\t\t//BorderFactory.createLoweredBevelBorder());\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void mouseClicked(MouseEvent e) \n\t\t{\n\t\t\t\n\t\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\tint clickX = e.getX();\n\t\tint clickY = e.getY();\n\t\tint row = clickX/cellSize;\n\t\tint col = clickY/cellSize;\n\t\tgameLogic.setElement(row, col, 1);\n\t}",
"public void mousePressed( MouseEvent e )\n {\n x = pressx = e.getX(); y = pressy = e.getY();\n \n Point p0 = new Point( x, y );\n Point p1 = new Point( pressx, pressy );\n \n if ( mode==0 ) { theShape = theLine = new Line( p0, p1 ); }\n else if ( mode==1 ) { theShape = theBox = new Box( p0, p1 ); }\n \n allTheShapes[ allTheShapesCount++ ] = theShape;\n \n theShape.color = theColorPicker.b.color;\n }",
"public abstract void mouseClicked(MouseClickedEvent event);",
"public void mouseClicked( MouseEvent e )\n {\n x = e.getX(); y = e.getY();\n System.out.println(\"click at x=\"+x+\" y=\"+y);\n repaint();\n }",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t\t\n\t}",
"@Override\r\n public void mouseClicked(MouseEvent e) {\n }",
"@Override\r\n public void mouseClicked(MouseEvent e) {\n }",
"@Override\n\tpublic void mouseClicked(MouseEvent e)\n\t{\n\n\t}",
"public void mouseClicked(MouseEvent event) { \n\t\t\n\t}",
"public void mouseClicked(java.awt.event.MouseEvent e)\n\t{\n\t\tsuper.collectMouseEvent(e);\n\t}",
"@Override\r\n public void mouseClicked(MouseEvent e) {}",
"public void mouseClicked(MouseEvent e) {\r\n\t\t// nothing\r\n\t}",
"public void mouseClicked(MouseEvent mouseClick)\r\n\t{\r\n\t\tmouseClickX = mouseClick.getX();\r\n\t\tmouseClickY = mouseClick.getY();\r\n\t\tmouseClickedFlag = true;\r\n\t\tmouseClickedFlagForWeapon = true;\r\n\t\tmouseClickCount = mouseClick.getClickCount();\r\n\t\tmouseButtonNumber = mouseClick.getButton();\r\n\t\t//System.out.println(\"MouseClickX: \" + mouseClickX);\r\n\t\t//System.out.println(\"MouseClickY: \" + mouseClickY);\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\r\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\r\n\t\t}",
"public void mousePressed(MouseEvent e) {\n\t\tdouble x = e.getX();\n\t\tdouble y = e.getY();\n\t\tswitch (clickTracker) {\n\t\t\tcase 0:\n\t\t\t\t//figureDone = false;\n\t\t\t\tflipDirection.setEnabled(false);\n\t\t\t\tlastClick = new GPoint(x,y);\n\t\t\t\tlineActive = true;\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tlineActive = false;\n\t\t\t\tremove(centerCircle);\n\t\t\t\tdrawCenter(x, y);\n\t\t\t\t//println(lastClick + \" x \" + x + \" y \" +y);\n\t\t\t\t//double centerX = lastClick.getX();\n\t\t\t\t//double centerY = lastClick.getY();\n\t\t\t\tlastClick = new GPoint(lastClick.getX() + centerCircle.getWidth(), lastClick.getY());\n\t\t\t\tbreak;\n\t\t\t//case 2:\n\t\t\t\t//lastClick = new GPoint(x,y);\n\t\t\t\t//lineActive = true;\n\t\t\t\t//break;\n\t\t\tcase 2:\n\t\t\t\tlineActive = false;\n\t\t\t\tremove(outerCircle);\n\t\t\t\tdrawOuter(x, y);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tlineActive = false;\n\t\t\t\tremove(armLine);\n\t\t\t\tdrawArm(x,y);\n\t\t\t\tinitalizeFigure();\n\t\t\t\tbreak;\n\t\t}\n\t\tclickTracker++;\n\t\tif (clickTracker == 3 || clickTracker == 2) lineActive = true;\n\t}",
"@Override\r\n\tpublic void mouseClicked(MouseEvent e) {}",
"@Override\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\n\t\t\t\t}",
"public void mouseClicked(int ex, int ey, int button) {\r\n\t}",
"@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}",
"@Override\r\n public void mouseClicked(MouseEvent e) { }",
"@Override\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\n\t\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}"
] | [
"0.6764862",
"0.6651816",
"0.63780046",
"0.6376569",
"0.6368577",
"0.6352153",
"0.6311439",
"0.6288028",
"0.6283695",
"0.6257318",
"0.6224189",
"0.6224189",
"0.61777353",
"0.6173374",
"0.6166316",
"0.6166316",
"0.6166316",
"0.6158279",
"0.61569923",
"0.61569923",
"0.615506",
"0.615091",
"0.615091",
"0.615091",
"0.615091",
"0.6146858",
"0.6146858",
"0.6146858",
"0.6139968",
"0.6139968",
"0.61348695",
"0.61143667",
"0.6108254",
"0.6076254",
"0.60752296",
"0.60732955",
"0.6063627",
"0.60625786",
"0.6057964",
"0.60555726",
"0.6046178",
"0.6036134",
"0.60180295",
"0.6017139",
"0.60169375",
"0.60125154",
"0.6006115",
"0.60037065",
"0.6003004",
"0.5986656",
"0.59813803",
"0.5979596",
"0.59718686",
"0.5967457",
"0.5964908",
"0.5925216",
"0.59245676",
"0.59133154",
"0.59131086",
"0.59122825",
"0.5899647",
"0.58993834",
"0.58969367",
"0.5894684",
"0.58933794",
"0.58881384",
"0.5887647",
"0.5884546",
"0.5878885",
"0.5872038",
"0.58686566",
"0.5868085",
"0.58656895",
"0.58643675",
"0.58596987",
"0.5856618",
"0.5845893",
"0.5845893",
"0.5845893",
"0.5845893",
"0.5845893",
"0.5845893",
"0.5845893",
"0.5845893",
"0.5844991",
"0.58431566",
"0.58431566",
"0.58431566",
"0.584107",
"0.584107",
"0.584107",
"0.584107",
"0.584107",
"0.584107",
"0.584107",
"0.584107",
"0.584107",
"0.584107",
"0.584107",
"0.584107"
] | 0.8766019 | 0 |
/ Name: stateChanged Purpose: This method handles ChangeEvent (in this case, just moving the slider). When the slider is changed, update the slider label. Parameters: e: ChangeEvent (the slider sliding) Return: void | public void stateChanged(ChangeEvent e)
{
slideLabel.setText("The speed is " + speedSlider.getValue());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void stateChanged(ChangeEvent e) {\n\t\tJSlider source = (JSlider) e.getSource();\n\t\tif (!source.getValueIsAdjusting()) {\n\t\t\tdgopval = Math.pow(10, -source.getValue() / 10.0);\n\t\t\tpvalLabel.setText(\"X = \" + source.getValue() / 10.0\n\t\t\t\t\t+ \"; p-value threshold is \"\n\t\t\t\t\t+ DREMGui_KeyInputs.doubleToSz(dgopval));\n\t\t\taddGOLabels(rootptr);\n\t\t}\n\t}",
"public void stateChanged(ChangeEvent e) {\r\n Object source = e.getSource();\r\n\r\n if (source instanceof JSlider) {\r\n JSlider slider = (JSlider) source;\r\n if (text != null) {\r\n text.setText(\"<html><font color=#FFFFFF>Volume: \"+slider.getValue()+\"</font></html>\");\r\n text.setLocation(getWidth()/2-text.getWidth()/2, text.getY());\r\n revalidate();\r\n repaint();\r\n }\r\n }\r\n }",
"public void stateChanged(ChangeEvent e) {\n\n\t\tJSlider src = (JSlider) e.getSource();\n\n\t\tif (src == gainFactorSlider) {\n\t\t\tif (!src.getValueIsAdjusting()) {\n\t\t\t\tint val = (int) src.getValue();\n\t\t\t\tgainFactor = val * 0.25;\n\n\t\t\t}\n\t\t} else if (src == biasFactorSlider) {\n\t\t\tif (!src.getValueIsAdjusting()) {\n\t\t\t\tbiasFactor = (int) src.getValue();\n\n\t\t\t}\n\t\t}\n\n\t}",
"@Override\r\n\tpublic void stateChanged(ChangeEvent e) {\n\t\tJSlider source = (JSlider)e.getSource();\r\n\t\tif (!source.getValueIsAdjusting()) {\r\n\t\t\tSystem.out.println(source.getValue());\r\n\t\t\tSliderState.setSliderValue(source.getValue());\r\n\t\t}\r\n\t}",
"public void stateChanged(ChangeEvent e)\n {\n simulation.setSpeed(speedSlider.getValue());\n }",
"public void stateChanged(ChangeEvent event) {\n\t\t\t\t\t\t\t\t\tlabelFilons.setText(((JSlider)event.getSource()).getValue() + \" filons :\");\n\t\t\t\t\t\t\t\t}",
"@Override\n public void stateChanged(ChangeEvent e)\n {\n if (e.getSource()==delaySlider)\n {\n// System.out.println(delaySlider.getValue());\n rightPanel.setDelayMS(delaySlider.getValue());\n }\n }",
"public void stateChanged(ChangeEvent event)\n {\n JSlider source = (JSlider) event.getSource();\n if (!source.getValueIsAdjusting())\n {\n SensorInfo.getInstance().setSliderSpeed(source.getValue());\n Controller.getInstance().setMotors();\n }\n }",
"@Override\r\n public void stateChanged(ChangeEvent e) {\n gameWindow.getTickDelayLabel().setText(\"Delay: \" + gameWindow.getSlider().getValue()*10 + \" ms\");\r\n }",
"public void stateChanged(ChangeEvent e) {\n\n (model.getInterpol()).setBezierIterationen(((JSlider) e.getSource()).getValue());\n }",
"public void stateChanged(ChangeEvent event){\n\t\t\t\t\t\t\tlabelLargeur.setText(2*((JSlider)event.getSource()).getValue()-1 + \" cases :\");\n\t\t\t\t\t\t}",
"public void stateChanged(ChangeEvent evt) {\n lowBox. setText(String. valueOf(lowSlider. getValue()));\n updateThreshold(lowSlider. getValue(), highSlider. getValue()); \n }",
"public void stateChanged(ChangeEvent event){\n\t\t\t\t\t\t\tlabelHauteur.setText(2*((JSlider)event.getSource()).getValue()-1 + \" cases :\");\n\t\t\t\t\t\t}",
"private void ssSliderStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_ssSliderStateChanged\n float tmp_value = ((float)this.ssSlider.getValue())/10;\n this.paramssLabel.setText(\"\" + tmp_value);\n }",
"private void iSliderStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_iSliderStateChanged\n float tmp_value = ((float)this.iSlider.getValue())/10;\n this.paramILabel.setText(\"\" + tmp_value);\n }",
"private void dSliderStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_dSliderStateChanged\n float tmp_value = ((float)this.dSlider.getValue())/10;\n this.paramDLabel.setText(\"\" + tmp_value);\n }",
"@Override\n public void stateChanged(ChangeEvent _e) {\n if (_e.getSource() instanceof JSlider){\n mView.setFrequencyTxt(((JSlider) _e.getSource()).getValue());\n mComponent.getCMUpdateThread().setInterval(((JSlider) _e.getSource()).getValue());\n if (mComponent.isPlaying())\n \tmComponent.getSimulationPlayer().setInterval(((JSlider) _e.getSource()).getValue());\n }\n }",
"private void pSliderStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_pSliderStateChanged\n float tmp_value = ((float)this.pSlider.getValue())/10;\n this.paramPLabel.setText(\"\" + tmp_value);\n }",
"public void stateChanged(ChangeEvent evt) {\n highBox. setText(String. valueOf(highSlider. getValue()));\n updateThreshold(lowSlider. getValue(), highSlider. getValue());\n }",
"@Override\n\tpublic void stateChanged(ChangeEvent e) {\n\t\t//changes speed of animation\n\t\tif (e.getSource() == speed) {\n\t\t\ttimer.stop();\n\t\t\ttimer.setDelay(speed.getValue());\n\t\t\tstop.setSelected(true);\n\t\t}\n\t\t//changes # of boxes\n\t\tif (e.getSource() == gridSize) {\n\t\t\ttimer.stop();\n\t\t\tstop.setSelected(true);\n\t\t\tint [][] newGrid = new int [gridSize.getValue()][gridSize.getValue()];\n\t\t\tgridValues = newGrid;\n\t\t\tSetState(-1);\n\t\t\tgenerateValues(source);\n\t\t\tcounter = 0;\n\t\t\tsteps.setText(\"Steps: \" + counter);\n\t\t\trepaint();\n\t\t}\n\t}",
"public void stateChanged(ChangeEvent e)\n {\n JSlider source = (JSlider)e.getSource();\n if (!source.getValueIsAdjusting())\n speed = source.getValue();\n if (0 < speed && speed < 2)\n speed = 2;\n }",
"private void sliderChanged(ChangeEvent e) {\n\t\tif (isTest()) { // TEST TEST TEST TEST !!!!!!!!!!!!!\n\t\t\treturn;\n\t\t}\n\t\n\t\tJSlider source = (JSlider) e.getSource();\n\t\tsliderValue = (int) source.getValue();\n\t\t// System.out.println(windowBase.getName() + \": sliderChanged: \" +\n\t\t// sliderValue);\n\t\tint size = index.data.getPictureSize();\n\t\tif (size == 0) {\n\t\t\tremoveAllPictureViews(); \n\t\t\treturn;\n\t\t}\n\t\t\n\t\t \n\t\tPM_Picture pic = null;\n\t\t\n\t\tif (client.getComponentCount() > 0) {\n\t\t\tObject o = client.getComponent(0);\n\t\t\tif (o instanceof PM_PictureView) {\n\t\t\t\tpic = ((PM_PictureView)o).getPicture();\n\t\t\t}\n\t\t}\n\t\t\n//\t\tSystem.out.println(\"..... sliderChanged\");\n\t\tpaintViewport(pic);\n\t\t// paintViewport(null);\n\t}",
"public void stateChanged(ChangeEvent evt){player.seek(slider.getValue());}",
"@Override\n\t\t\tpublic void stateChanged(ChangeEvent e) {\n\t\t\t\tint amount = betslider.getValue();\n\t\t\t\tbetAmount.setText(\"$\"+amount);\n\t\t\t}",
"@Override\n\tpublic void stateChanged(ChangeEvent e) {\n\t\tJSlider difficultySlider = (JSlider) e.getSource();\n\t\n\t\tint newDifficulty = difficultySlider.getValue();\n\t\tmodel.getLevelTemplate().setProbConst(newDifficulty);\n\t}",
"@Override\n\tpublic void stateChanged(ChangeEvent e) {\n\t\tJSlider source = (JSlider) e.getSource();\n\t\tif(!source.getValueIsAdjusting()) {// getValueIsAdjusting 함수는 어떤 이벤트 인스턴스에서 연속적으로 이벤트가 일어 났을 때, \n\t\t\t//해당 이벤트 인스턴스들을 일종의 데이터 체인으로 보고 체인의 마지막 인스턴스 외에서 호출하는 경우 true를 반환하는 함수이다.\n\t\t\t\n\t\t\t\n\t\tint value = (int) slider.getValue();\n\t\timgBtn.setSize(value*10, value*10);// 슬라이더의 상태가 변경되면 호출됨\n\t\t}\n\t}",
"private void ffSliderStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_ffSliderStateChanged\n float tmp_value = ((float)this.ffSlider.getValue())/10;\n this.paramffLabel.setText(\"\" + tmp_value);\n }",
"public void stateChanged(ChangeEvent e) {\n\t\t\t\tplane.setX(jsCentreStick.getValue());\n\t\t\t}",
"@Override\n public void stateChanged(ChangeEvent e) {\n if (getSliderThreadsPerScan().getValue() == 0) {\n getSliderThreadsPerScan().setValue(1);\n }\n setLabelThreadsPerScanValue(getSliderThreadsPerScan().getValue());\n }",
"public void stateChanged(ChangeEvent evt) {\n if (evt.getSource() == bgColorSlider) {\n int bgVal = bgColorSlider.getValue();\n displayLabel.setBackground( new Color(bgVal,bgVal,bgVal) );\n // NOTE: The background color is a shade of gray,\n // determined by the setting on the slider.\n }\n else {\n float hue = fgColorSlider.getValue()/100.0f;\n displayLabel.setForeground( Color.getHSBColor(hue, 1.0f, 1.0f) );\n // Note: The foreground color ranges through all the colors\n // of the spectrum.\n }\n }",
"public void stateChanged(ChangeEvent e) {\n isChanged = true;\n refreshComponents();\n }",
"public void stateChanged(ChangeEvent e) {\n JSlider source = (JSlider)e.getSource();\n //volume\n if(parameter=='v'){\n System.out.println(\"Panel: \"+numSampler+\" volume: \"+source.getValue());\n }\n //volume\n else if(parameter=='p'){\n System.out.println(\"Panel: \"+numSampler+\" pitch: \"+source.getValue());\n }\n else if(parameter=='f'){\n System.out.println(\"Panel: \"+numSampler+\" filter cutoff: \"+source.getValue());\n }\n }",
"public void stateChanged( ChangeEvent event )\n {\n \n }",
"public void stateChanged(ChangeEvent e) {\n }",
"@Override\n\t\t\tpublic void stateChanged(final ChangeEvent evt) {\n\t\t\t\tfinal JSlider mySlider3 = (JSlider) evt.getSource();\n\t\t\t\t//if (source.getValueIsAdjusting()) {\n\t\t\t\tif (mySlider3.getValueIsAdjusting()) {\n\t\t\t\t\t// int freq = (int)source.getValue();\n\t\t\t\t\tfloat freq = (float) mySlider3.getValue();\n\t\t\t\t\tfreq = (freq / FREQ_MAX) * (freq / FREQ_MAX);\n\t\t\t\t\tfreq = freq * FREQ_MAX;\n\t\t\t\t\tfreq = freq + FREQ_MIN;\n\t\t\t\t\tdoPrintValue3(freq);\n\t\t\t\t\t// when the action occurs the doSendSlider method is invoked\n\t\t\t\t\t// with arguments for freq and node\n\t\t\t\t\tdoSendSlider(freq, 1002);\n\t\t\t\t}\n\t\t\t}",
"public void stateChanged (ChangeEvent e)\n {\n }",
"@Override\n public void stateChanged(javax.swing.event.ChangeEvent e) {\n }",
"@Override\n\t\t\tpublic void stateChanged(ChangeEvent e) {\n\t\t\t\tint perPersonTipPercentage=((JSlider) e.getSource()).getValue();\n\t\t\t\tfloat perPersonNewTip=(((float)perPersonTipPercentage)/100)*(Float.valueOf(TipCalcView.getInstance().totalTip.getText()).floatValue());\n\t\t\n\t\t\t\tDecimalFormat decimalFormat=new DecimalFormat(\"#.##\");\n\t\t\t\tTipTailorView.getInstance().labels[no].setText(String.valueOf(decimalFormat.format(perPersonNewTip)));\n\t\t\t\tTipCalcView.getInstance().perPersonTip.setText(\"Not Applicable\");\n\t\t\t\tTipCalcView.getInstance().perPersonTip.setEditable(false);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}",
"public void stateChanged(ChangeEvent e) {\n\t\tupdatePits();\n\t\tSystem.out.println(\"Player 0 score: \" + model.getMancalas()[0]);\n\t\tSystem.out.println(\"Player 1 score: \" + model.getMancalas()[1]);\n\t\tleftScore.setText( Integer.toString(model.getMancalas()[1]));\n\t\trightScore.setText( Integer.toString(model.getMancalas()[0]));\n\t\tSystem.out.println(\"It is now player: \" + model.getPlayer() + \"'s turn\");\n\t\t\n\t}",
"public void stateChanged(ChangeEvent e) {\n\t\tif(e.getSource().equals(minPriceSpinner)){\n\t\t\tif((Integer)minPriceSpinner.getValue() > (Integer)maxPriceSpinner.getValue()){\n\t\t\t\tmaxPriceSpinner.setValue((Integer)minPriceSpinner.getValue() + 1);\n\t\t\t}\n\t\t}\n\t\telse if(e.getSource().equals(maxPriceSpinner)){\n\t\t\tif((Integer)minPriceSpinner.getValue() > (Integer)maxPriceSpinner.getValue()){\n\t\t\t\tminPriceSpinner.setValue((Integer)maxPriceSpinner.getValue() - 1);\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic void stateChanged(ChangeEvent e) {\n\t\t// TODO Auto-generated method stub\n\t\tepochSelected = ((Number)epochSelector.getValue()).intValue();\n\t\tupdateParticles();\n\t\tthis.repaint();\n\t}",
"@Override\r\n\tpublic void stateChanged(ChangeEvent e) {\n\t\tif(e.getSource() == this.progress){\r\n\t\t\tint value = this.progress.getValue();\r\n\t\t\tif(value == 0 && this.left_button >0){\r\n\t\t\t\tthis.time.stop();\r\n\t\t\t\tthis.is_over = true;\r\n\t\t\t\t//锟斤拷示锟斤拷戏锟斤拷锟斤拷\r\n\t\t\t\tObject[] options = {\"yes\",\" no \"}; \r\n\t\t\t\tint response=JOptionPane.showOptionDialog(this, \"Play again?\", \"Game over!\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[0]);\r\n\t\t\t\tif(0 == response){\r\n\t\t\t\t\tthis.init();\t\t\t\t//锟斤拷锟斤拷锟斤拷戏\r\n\t\t\t\t}else if(1 == response){\r\n\t\t\t\t\tSystem.exit(0);\r\n\t\t\t\t}\r\n\t\t\t\tthis.init();\t\t\t\t\t//锟斤拷锟斤拷锟斤拷戏\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void stateChanged(ChangeEvent changeEvent) {\n Color newForegroundColor = colorChooser.getColor();\n label.setForeground(newForegroundColor);\n }",
"@Override\n\tpublic void stateChanged(ChangeEvent e) {\n\t\tlijst = imagemodel.getLijst();\n\t\trepaint();\n\t}",
"public void stateChanged(ChangeEvent e) {\n\t\t\t\tplane.setSpeed(jsThrottle.getValue());\n\t\t\t}",
"@Override\n\tpublic void stateChanged(ChangeEvent e) {\n\t}",
"@Override\r\n public void stateChanged(ChangeEvent e) {\n }",
"@Override\n\tpublic void stateChanged(ChangeEvent arg0) {\n\t\t\n\t}",
"public void stateChanged(ChangeEvent e){\n\r\n fShape.removeChangeListener(this); // ordinarily stateChange can get called many\r\n //times during resize, so we'll stop listening once we know\r\n // there is change\r\n\r\n\r\n if (fLastEdit!=this){\r\n if (fLastEdit != null) // kill the previous one so there's only one undo\r\n fLastEdit.die(); // don't kill ourselves\r\n\r\n //fUndoListener.undoableEditHappened(new UndoableEditEvent(TShapePanel.this, this)); // tell the listener.\r\n\r\n tellListeners(new UndoableEditEvent(TShapePanel.this,this)); // tell the listeners.\r\n\r\n fLastEdit = this;\r\n }\r\n }",
"public void stateChanged(ChangeEvent e)\r\n\t\t\t\t\t{\n\t\t\t\t\t\ttheGridView.showNogoTiles(showNogoTilesButton.isSelected());\r\n\t\t\t\t\t}",
"@Override\n public void stateChanged(ChangeEvent e) {\n if (Controls.getSelectedIndex() == 3) {\n Controls.setComponentAt(3, LineCC);\n Controls.setComponentAt(4, null);\n } else if (Controls.getSelectedIndex() == 4) {\n Controls.setComponentAt(3, null);\n Controls.setComponentAt(4, BackGCC);\n } else {\n Controls.setComponentAt(3, null);\n Controls.setComponentAt(4, null);\n }\n Zoom = ZoomSlider.getValue() / 10f;\n DrawGraphPassive();\n if ((int) EquationNum.getValue() != CurrentEQNum) {\n CurrentEQNum = (int) EquationNum.getValue();\n BackGCC.setColor(lineGraphs.get(CurrentEQNum - 1).getBackColor());\n LineCC.setColor(lineGraphs.get(CurrentEQNum - 1).getLineColour());\n Cards.show(EquationCardLayout, Integer.toString((int) EquationNum.getValue()));\n }\n }",
"protected void valueChanged() {\r\n \t\tint newValue = slider.getSelection();\r\n \t\tint oldValue = this.intValue;\r\n \t\tintValue = newValue;\r\n \t\tjava.beans.PropertyChangeEvent event = new java.beans.PropertyChangeEvent(\r\n \t\t\t\tthis, IPropertyEditor.VALUE, oldValue, newValue);\r\n \t\tvalueChangeListener.valueChange(event);\r\n \t}",
"public void propertyChange(PropertyChangeEvent e) {\n String name = e.getPropertyName();\n if (name.equals(\"stepnumber\")) { //$NON-NLS-1$\n if (trackerPanel.getSelectedTrack() == this) {\n displayWorldCoordinates();\n stepValueLabel.setText(e.getNewValue() + \":\"); //$NON-NLS-1$\n }\n } else if (name.equals(\"locked\")) { //$NON-NLS-1$\n xField.setEnabled(!isLocked());\n yField.setEnabled(!isLocked());\n } else super.propertyChange(e);\n }",
"public void propertyChange(PropertyChangeEvent evt) {\n if(evt.getPropertyName().equals(\"position\")){\n// System.out.println(\"slider property change new val=\"+evt.getNewValue());\n sliderDontProcess=true;\n // note this cool semaphore/flag trick to avoid processing the\n // event generated when we programmatically set the slider position here\n playerSlider.setValue(Math.round(player.getFractionalPosition()*100));\n }else if(evt.getPropertyName().equals(\"readerStarted\")){\n log.info(\"MotionViewer.propertyChange: AEReader started, fixing device control menu\");\n // cypress reader started, can set device control for cypress usbio reader thread\n// fixDeviceControlMenuItems();\n }\n }",
"public void stateChanged (ChangeEvent event)\n {\n ((GroupItem)gbox.getSelectedItem()).configChanged();\n }",
"public void stateChanged(ChangeEvent event)\r\n {\r\n fireChangeEvent(event);\r\n }",
"public void stateChanged(ChangeEvent e){\n\n\t\t Component selected = fTabs.getSelectedComponent();\n\n\t\t if (selected == fConnective) {\n\t\t if (!fConnectiveRunning) {\n\t\t fConnective.run();\n\t\t fConnectiveRunning = true;\n\t\t }\n\t\t }\n\t\t else {\n\t\t if (selected == fTT) {\n\t\t if (!fTTRunning) {\n\t\t fTT.run();\n\t\t fTTRunning = true;\n\t\t }\n\t\t }\n\t\t else {\n\t\t if (selected == fSatis) {\n\t\t if (!fSatisRunning) {\n\t\t fSatis.run();\n\t\t fSatisRunning = true;\n\t\t }\n\n\t\t }\n\t\t else {\n\t\t if (selected == fCons) {\n\t\t if (!fConsRunning) {\n\t\t fCons.run();\n\t\t fConsRunning = true;\n\t\t }\n\n\t\t }\n\t\t else {\n\t\t if (selected == fInvalid) {\n\t\t if (!fInvalidRunning) {\n\t\t fInvalid.run();\n\t\t fInvalidRunning = true;\n\t\t }\n\n\t\t }\n\t\t else {\n\t\t if (selected == fFinishPanel) {\n\t\t \trefreshFinishPanel();\n\t\t \n\t\t }\n\t\t }\n\t\t }\n\t\t }\n\t\t }\n\t\t }\n\t\t}",
"public void stateChanged(ChangeEvent e)\r\n\t\t\t\t\t{\n\t\t\t\t\t\ttheGridView.showWalkTiles(showWalkTilesButton.isSelected());\r\n\t\t\t\t\t}",
"@Override\n public void stateChanged(ChangeEvent ce) {\n if (ce.getSource().equals(segmentSizeSpinner)) {\n setSegmentSize(Double.parseDouble(segmentSizeSpinner.getValue().toString()));\n } else if (ce.getSource().equals(targetMarginSpinner)) {\n setTargetMargin(Double.parseDouble(targetMarginSpinner.getValue().toString()));\n } else if (ce.getSource().equals(sourceMarginSpinner)) {\n setSourceMargin(Double.parseDouble(sourceMarginSpinner.getValue().toString()));\n } else if (ce.getSource().equals(segmentMarginSpinner)) {\n setSegmentMargin(Double.parseDouble(segmentMarginSpinner.getValue().toString()));\n } else if (ce.getSource().equals(segmentAngleSpinner)) {\n setSegmentAngle(Double.parseDouble(segmentAngleSpinner.getValue().toString()));\n }\n }",
"public void onSliderChanged() {\r\n\r\n // So we can get the date of where our slider is pointing\r\n int sliderValue = (int) dateSlider.getValue();\r\n System.out.println(sliderValue);\r\n\r\n // When the slider is moved, only the correct button will appear\r\n if(sliderValue == 0) {\r\n eventButton1.setVisible(true);\r\n eventButton2.setVisible(false);\r\n eventButton3.setVisible(false);\r\n eventButton4.setVisible(false);\r\n eventButton5.setVisible(false);\r\n } else if(sliderValue == 6) {\r\n eventButton1.setVisible(false);\r\n eventButton2.setVisible(true);\r\n eventButton3.setVisible(false);\r\n eventButton4.setVisible(false);\r\n eventButton5.setVisible(false);\r\n } else if(sliderValue == 12) {\r\n eventButton1.setVisible(false);\r\n eventButton2.setVisible(false);\r\n eventButton3.setVisible(true);\r\n eventButton4.setVisible(false);\r\n eventButton5.setVisible(false);\r\n } else if(sliderValue == 18) {\r\n eventButton1.setVisible(false);\r\n eventButton2.setVisible(false);\r\n eventButton3.setVisible(false);\r\n eventButton4.setVisible(true);\r\n eventButton5.setVisible(false);\r\n } else if(sliderValue == 25) {\r\n eventButton1.setVisible(false);\r\n eventButton2.setVisible(false);\r\n eventButton3.setVisible(false);\r\n eventButton4.setVisible(false);\r\n eventButton5.setVisible(true);\r\n }\r\n }",
"private void speedStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_speedStateChanged\n\n int speedvalue = speed.getValue();//gets the value of the speed slider from the control panel\n roboLogic.speed(speedvalue); // calls the speed method of the RobotLogic class\n\n\n }",
"@Override\n\tpublic void stateChanged() {\n\t\t\n\t}",
"public abstract void stateChanged(STATE state);",
"public void stateChanged(ChangeEvent e) \n\t{\n\t\t//if user has changed clicked the next month, redraw all the buttons\n\t\tif (cModel.hasUpdated()) \n\t\t{\n\t\t\t//find and update the new amount of days in the month\n\t\t\tmonthMaxDays = cModel.getMonthMaxDays();\n\t\t\t\n\t\t\t//erase buttons from panel\n\t\t\tnumberPanel.removeAll();\n\t\t\t\n\t\t\t//delete all the buttons from the array\n\t\t\tbuttonArray.clear();\n\t\t\t\n\t\t\t//erase the date since none is selected\n\t\t\teraseDateLabel();\n\t\t\t\n\t\t\t//update the label for the month/year\n\t\t\tmonthYearLabel.setText(monthArray[cModel.getCalMonth()] + \" \" + cModel.getCalYear());\n\t\t\t\n\t\t\t//make the new number buttons\t\t\t\n\t\t\tmakeDayButtons();\n\t\t\t\n\t\t\t//put in the empty buttons\n\t\t\tfor (int i = 1; i < cModel.findDayOfWeek(1); i++) \n\t\t\t{\n\t\t\t\tJButton emptyButton = new JButton();\n\t\t\t\t\n\t\t\t\t//these buttons will not work\n\t\t\t\temptyButton.setEnabled(false);\n\t\t\t\tnumberPanel.add(emptyButton); //add to panel\n\t\t\t}\n\t\t\t\n\t\t\t//add each button from ArrayList to the panel\n\t\t\tfor (JButton day : buttonArray) \n\t\t\t{\n\t\t\t\tnumberPanel.add(day);\n\t\t\t}\n\t\t\t\n\t\t\t//highlightEvents();\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//no bordered button\n\t\t\tbordered = -1;\n\t\t\t\n\t\t\tcModel.unupdated();\n\t\t\tframe.pack();\n\t\t\tframe.repaint();\n\t\t} \n\t\telse \n\t\t{\n\t\t\twriteEvents(cModel.getSelectedDate());\n\t\t\tchangeDateLabel(cModel.getSelectedDate());\n\t\t\tborderSelected(cModel.getSelectedDate() - 1);\n\t\t}\n\t}",
"public void stateChanged(ChangeEvent e){\r\n \t//logger.info(\"Change event \" + e.getSource());\r\n \tif(e.getSource() == tabbedPane){\r\n \t\tlogger.info(\"Index of the selected tab is \" + tabbedPane.getSelectedIndex()); \r\n \t\tif(tabbedPane.getSelectedIndex() == -1){\r\n \t\t\treturn;\r\n \t\t}\r\n \t\t// Change to the current view\r\n \t\tcurrentView = tabViews.get(tabbedPane.getSelectedIndex());\r\n \t}\r\n }",
"public void sliderChanged(int sliderIndex, String sliderName, double value) {\n\n FractalAlgorithm algorithm = simulator_.getAlgorithm();\n\n if (sliderName.equals(ITER_SLIDER)) {\n algorithm.setMaxIterations((int)value);\n }\n else if (sliderName.equals(TIMESTEP_SLIDER)) {\n simulator_.setTimeStep(value);\n }\n }",
"@Override\n\t\t\tpublic void stateChanged(ChangeEvent e) {\n\t\t\t\ttexto.setFont(new Font((String) miCombo.getSelectedItem(), Font.PLAIN,miSlider.getValue()));\n\t\t\t}",
"@Override\n\tpublic void stateChanged (ChangeEvent e)\n\t{\n\t\tboolean enabled = mAdvancedOptionsCheckBox.isSelected();\n\t\tmManualParametersPane.setEnabled(enabled);\n\t\tmGrid1Pane.setEnabled(enabled);\n\t\tmCartogramGridSizeLabel.setEnabled(enabled);\n\t\tmCartogramGridSizeTextField.setEnabled(enabled);\n\t\tmGrid2Pane.setEnabled(enabled);\n\t\tmDiffusionGridSizeLabel.setEnabled(enabled);\n\t\tmDiffusionGridMenu.setEnabled(enabled);\n\t\tmIterPane.setEnabled(enabled);\n\t\tmIterationsLabel.setEnabled(enabled);\n\t\tmDiffusionIterationsTextField.setEnabled(enabled);\n\t\n\t}",
"public void stateChanged(ChangeEvent e){\n\r\n if (fLastEdit!=this){ // just a precaution against stateChange getting called many times\r\n\r\n if (fLastEdit != null) // kill the previous one so there's only one undo\r\n fLastEdit.die(); // don't kill ourselves\r\n\r\n fLastEdit = this;\r\n // fUndoListener.undoableEditHappened(new UndoableEditEvent(TShapePanel.this, this)); // tell the listener.\r\n\r\n tellListeners(new UndoableEditEvent(TShapePanel.this,this)); // tell the listeners.\r\n\r\n }\r\n\r\n }",
"public void adjustmentValueChanged( AdjustmentEvent e ) {\n\trefreshControls();\n }",
"public abstract void updateSlider();",
"@Override\n protected void positionChanged () {\n\n\n valueLabel.setPosition( this.getX() + ((this.getScaleX() * this.getWidth() - valueLabel.getScaleX() * valueLabel.getWidth()) / 2),\n this.getY() + ((this.getScaleY() * this.getHeight() - valueLabel.getScaleY() * valueLabel.getHeight()) / 2) );\n }",
"@FXML\n\tpublic void onInstrumentSliderChanged(MouseEvent e) {\n\t\t//Grab the affected slider\n\t\tSlider sliderChanged = (Slider) e.getSource();\n\n\t\t//The envelope's array index corresponding to the slider type\n\t\tint sliderIndex = -1;\n\n\t\t//Switch conditional for the slider's fxID\n\t\t//Sets the slider index value\n\t\tswitch(sliderChanged.getId()) {\n\t\t\tcase \"attackSlider\":\n\t\t\t\tsliderIndex = Instrument.ATTACK_VALUE;\n\t\t\t\tbreak;\n\t\t\tcase \"decaySlider\":\n\t\t\t\tsliderIndex = Instrument.DECAY_VALUE;\n\t\t\t\tbreak;\n\t\t\tcase \"sustainSlider\":\n\t\t\t\tsliderIndex = Instrument.SUSTAIN_VALUE;\n\t\t\t\tbreak;\n\t\t\tcase \"releaseSlider\":\n\t\t\t\tsliderIndex = Instrument.RELEASE_VALUE;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t//Grab old/new slider values\n\t\tdouble oldValue = synth.getSelectedInstrument().getEnvelopeData()[sliderIndex],\n\t\t\t\tnewValue = sliderChanged.getValue();\n\n\t\t//Add the action if the values differ and the slider index is valid\n\t\tif(oldValue != newValue && sliderIndex != -1) {\n\t\t\ttry {\n\t\t\t\t//Add the action\n\t\t\t\tactionLog.AddAction(\n\t\t\t\t\t\toldValue,\n\t\t\t\t\t\tnewValue,\n\t\t\t\t\t\tsliderChanged,\n\t\t\t\t\t\tsliderChanged.getClass().getMethod(\"setValue\", double.class),\n\t\t\t\t\t\tthis.getClass().getMethod(\"updateEnvelope\", double.class));\n\t\t\t} catch (NoSuchMethodException | SecurityException e1) {\n\t\t\t\tSystem.out.println(\"An unexpected error has occured.\");\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\t\tupdateEnvelope(0);\n\t\t}\n\t}",
"@Override\n\tpublic void stateChanged(ChangeEvent e) {\n\t\tPicture unfiltered = copy(_original_pic);\n\n\t\tint blurFactor = _blur_slider.getValue();\n\t\tdouble brightenFactor = _brightness_slider.getValue();\n\t\tdouble saturateFactor = _saturation_slider.getValue();\n\n\t\tPicture blurredOutput = blur(unfiltered, blurFactor);\n\t\tPicture saturatedOutput = saturate(blurredOutput, saturateFactor);\n\t\tPicture brightenedOutput = brighten(saturatedOutput, brightenFactor);\n\t\tObservablePicture output = brightenedOutput.createObservable();\n\t\t_picture_view.setPicture(output);\n\t}",
"@Override\n\tpublic void moveState(JLabel label, int x1, int y1, int x2, int y2) {\n\n\t}",
"public void stateChanged( ChangeEvent event )\n {\n // Update view with extended system games selected in the Single row system.\n int minRights = maltipsDocument.getMaltipsSystem().getSingleSystem().getMinInSingleRow();\n minComboBox.setSelectedIndex( minRights );\n \n int maxRights = maltipsDocument.getMaltipsSystem().getSingleSystem().getMaxInSingleRow();\n maxComboBox.setSelectedIndex( maxRights );\n }",
"public void stateChanged(ChangeEvent e){\n\r\n if (fLastEdit!=this){ // just a precaution against stateChange getting called many times\r\n\r\n if (fLastEdit != null) // kill the previous one so there's only one undo\r\n fLastEdit.die(); // don't kill ourselves\r\n\r\n fLastEdit = this;\r\n // fUndoListener.undoableEditHappened(new UndoableEditEvent(TShapePanel.this, this)); // tell the listener.\r\n\r\n tellListeners(new UndoableEditEvent(TShapePanel.this,this)); // tell the listeners.\r\n\r\n }\r\n\r\n }",
"@Override\n public void stateChanged(ChangeEvent e) {\n\n if (tree.isSelected()) {\n runTree(191 - (int) (fractalDepth.getValue() * 1.9));\n }\n if (triangle.isSelected()) {\n runTriangle(401 - 4 * fractalDepth.getValue());\n }\n if (original.isSelected()) {\n runOriginal(201 - 2 * fractalDepth.getValue());\n }\n if (carpet.isSelected()) {\n runCarpet((int) (361 - 3.6 * fractalDepth.getValue()));\n }\n }",
"@Override\r\n\t\t\tpublic void stateChanged(ChangeEvent e)\r\n\t\t\t\t{\r\n\t\t\t\tint spinMinValue = (int)spinMin.getValue();\r\n\t\t\t\tint spinMaxValue = (int)spinMax.getValue();\r\n\r\n\t\t\t\tif (spinMinValue >= spinMaxValue) { // verify if the min spin goes upper the max limit and adjust the value if necessary\r\n\t\t\t\t\tif (++spinMaxValue > max)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tspinMin.setValue(spinMinValue = (spinMaxValue=max)-1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\tspinMax.setValue(spinMaxValue);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (spinMaxValue > spinMinValue) // verify intervals are correct\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdiceBuilder.setInterval(spinMinValue, spinMaxValue);\r\n\t\t\t\t\t}\r\n\t\t\t\t}",
"public void stateChanged(SensorPort arg0, int arg1, int arg2) {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void stateChanged(ChangeEvent e)\r\n\t\t\t\t{\r\n\t\t\t\tint spinMinValue = (int)spinMin.getValue();\r\n\t\t\t\tint spinMaxValue = (int)spinMax.getValue();\r\n\r\n\t\t\t\tif (spinMaxValue <= spinMinValue) { // verify if the max spin goes under the min limit and adjust the value if necessary\r\n\t\t\t\t\tif (--spinMinValue < min)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tspinMax.setValue(spinMaxValue = (spinMinValue=min)+1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\tspinMin.setValue(spinMinValue);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (spinMaxValue > spinMinValue) // verify intervals are correct\r\n\t\t\t\t\t{\r\n\t\t\t\t\tdiceBuilder.setInterval(spinMinValue, spinMaxValue);\r\n\t\t\t\t\t}\r\n\t\t\t\t}",
"String updateSliderLabel() {\n if (this.direction.equals(\"H\"))\n return \"Percentage of Width : \";\n if (this.direction.equals(\"V\"))\n return \"Percentage of Height : \";\n return \"/!\\\\ Direction issue! Please relaunch the App /!\\\\\";\n }",
"public void updateState() {\n\t\tfloat uptime = .05f;\t\t\t// Amount of Time the up animation is performed\n\t\tfloat downtime = .35f;\t\t\t// Amount of Time the down animation is performed\n\t\tColor colorUp = Color.YELLOW;\t// Color for when a value is increased\n\t\tColor colorDown = Color.RED;\t// Color for when a value is decreased\n\t\tColor color2 = Color.WHITE;\t\t// Color to return to (Default Color. Its White btw)\n\t\t\n\t\t// Check to see if the Time has changed and we are not initializing the label\n\t\tif(!time.getText().toString().equals(Integer.toString(screen.getState().getHour()) + \":00\") && !level.getText().toString().equals(\"\")) {\n\t\t\t// Set the time label and add the animation\n\t\t\ttime.setText(Integer.toString(screen.getState().getHour()) + \":00\");\n\t\t\ttime.addAction(sequence(parallel(moveBy(0, 4f, uptime), color(colorUp)), parallel(moveBy(0, -4f, .5f), color(color2, downtime))));\n\t\t} else if(time.getText().toString().equals(\"\")) {\n\t\t\t// First time setting the label, dont add the animation\n\t\t\ttime.setText(Integer.toString(screen.getState().getHour()) + \":00\");\n\t\t}\n\t\t\n\t\t// Check to see if the Level has changed and we are not initializing the label\n\t\tif(!level.getText().toString().equals(screen.getState().getTitle()) && !level.getText().toString().equals(\"\")) {\n\t\t\tlevel.setText(\"Level: \" + screen.getState().getTitle());\n\t\t\tlevel.addAction(sequence(parallel(moveBy(0, 4f, uptime), color(colorUp)), parallel(moveBy(0, -4f, .5f), color(color2, downtime))));\n\t\t} else if(level.getText().toString().equals(\"\")) {\n\t\t\t// Initialize the level label\n\t\t\tlevel.setText(\"Level: \" + screen.getState().getTitle());\n\t\t}\n\t\t\n\t\t// Check to see if the XP has changed and we are not initializing the label\n\t\tif(!xp.getText().toString().equals(\"XP: \" + Integer.toString(screen.getState().getXp())) && !xp.getText().toString().equals(\"\")) {\n\t\t\txp.setText(\"XP: \" + Integer.toString(screen.getState().getXp()));\n\t\t\txp.addAction(sequence(parallel(moveBy(0, 4f, uptime), color(colorUp)), parallel(moveBy(0, -4f, .5f), color(color2, downtime))));\n\t\t} else if(xp.getText().toString().equals(\"\")) {\n\t\t\t// Initialize the XP label\n\t\t\txp.setText(\"XP: \" + Integer.toString(screen.getState().getXp()));\n\t\t}\n\t\t\n\t\t// Check to see if the Money has changed and we are not initializing the label\n\t\tif(!money.getText().toString().equals(\"$\" + Double.toString(screen.getState().getMoney()) + \"0\") && !money.getText().toString().equals(\"\")) {\n\t\t\t\n\t\t\t// Check to see if the player's money went up. This is a mess but it works\n\t\t\t// Makes the change animation Yellow or Green depending on the change in money\n\t\t\tif(Double.parseDouble(money.getText().substring(1).toString()) <= screen.getState().getMoney())\n\t\t\t\tmoney.addAction(sequence(parallel(moveBy(0, 4f, uptime), color(colorUp)), parallel(moveBy(0, -4f, .5f), color(color2, downtime))));\n\t\t\telse\n\t\t\t\tmoney.addAction(sequence(parallel(moveBy(0, 4f, uptime), color(colorDown)), parallel(moveBy(0, -4f, .5f), color(color2, downtime))));\n\t\t\t\n\t\t\t// Set the label to the new money\n\t\t\tmoney.setText(\"$\" + Double.toString(screen.getState().getMoney()) + \"0\");\n\t\t\t\n\t\t} else if(money.getText().toString().equals(\"\")) {\n\t\t\t// Initialize the Money Label\n\t\t\tmoney.setText(\"$\" + Double.toString(screen.getState().getMoney()) + \"0\");\n\t\t}\n\t\t\n\t\t// Check to see if the Energy has changed and we are not initializing the label\n\t\tif(!energy.getText().toString().equals(\"E: \" + Integer.toString(screen.getState().getEnergy()) + \"/100\") && !energy.getText().toString().equals(\"\")) {\n\t\t\t\n\t\t\t// Changes the animation to Yellow or Red depending on the change in the energy value\n\t\t\tif(Integer.parseInt(energy.getText().substring(3).split(\"/\")[0].toString()) < screen.getState().getEnergy())\n\t\t\t\tenergy.addAction(sequence(parallel(moveBy(0, 4f, uptime), color(colorUp)), parallel(moveBy(0, -4f, .5f), color(color2, downtime))));\n\t\t\telse\n\t\t\t\tenergy.addAction(sequence(parallel(moveBy(0, 4f, uptime), color(colorDown)), parallel(moveBy(0, -4f, .5f), color(color2, downtime))));\n\t\t\t\n\t\t\t// Set the energy label\n\t\t\tenergy.setText(\"E: \" + Integer.toString(screen.getState().getEnergy()) + \"/100\");\n\t\t} else if(energy.getText().toString().equals(\"\")) {\n\t\t\t// Initialize the energy label if it isnt set\n\t\t\tenergy.setText(\"E: \" + Integer.toString(screen.getState().getEnergy()) + \"/100\");\n\t\t}\n\t\t\n\t\t// Get the current date.\n\t\tint[] curDate = screen.getState().getDate();\n\t\t\t\n\t\t// Check to see if the Date has changed and we are not initializing the label\n\t\tif(!date.getText().toString().equals(\"\" + curDate[2] + \"/\" + curDate[1] + \"/\" + curDate[0]) && !date.getText().toString().equals(\"\")) {\n\t\t\t// Set the date label and add the change animation\n\t\t\tdate.setText(\"\" + curDate[2] + \"/\" + curDate[1] + \"/\" + curDate[0]);\n\t\t\tdate.addAction(sequence(parallel(moveBy(0, 4f, uptime), color(colorUp)), parallel(moveBy(0, -4f, .5f), color(color2, downtime))));\n\t\t} else if(date.getText().toString().equals(\"\")) {\n\t\t\t// Initialize the date label\n\t\t\tdate.setText(\"\" + curDate[2] + \"/\" + curDate[1] + \"/\" + curDate[0]);\n\t\t}\n\t\t\n\t\t// Set the log text\n\t\tlogLabel.setText(screen.getState().getLog());\n\t\t\n\t\t// Update the stats\n\t\tState state = screen.getState();\n\t\tstatsLabel.setText(\"XP: \" + state.getXp() + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Level: \" + state.getLevel() + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Title: \" + state.getTitle() + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Popularity: \" + state.getPopularity() + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Year \" + state.getDate()[0] + \" Month \" + state.getDate()[1] + \" Day \" + state.getDate()[2] + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Hour: \" + state.getHour() + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Energy: \" + state.getEnergy() + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Current Funds: \" + state.getMoney() + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Money Earned: \" + state.getEarned_money() + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Money Spent: \" + state.getSpent_money());\n\t}",
"public void stateChanged (ChangeEvent e)\r\n\t {\t\t\r\n\t\t int index = tabbedPane.getSelectedIndex();\r\n\t\t m_selectionActive = (index == 0);\r\n\t }",
"public void stateChanged(ChangeEvent e)\r\n\t\t\t\t\t{\n\t\t\t\t\t\ttheGridView.showExitTiles(showExitTilesButton.isSelected());\r\n\t\t\t\t\t}",
"@FXML\n\tpublic void onVolumeSliderChanged(MouseEvent e){\n\t\t//Grab the affected slider\n\t\tSlider sliderChanged = (Slider) e.getSource();\n\n\t\t//Grab old/new slider values\n\t\tdouble oldValue = synth.getVolume(),\n\t\t\t\tnewValue = sliderChanged.getValue();\n\n\t\t//Add the action if the values differ\n\t\tif(oldValue != newValue) {\n\t\t\ttry {\n\t\t\t\t//Add the action\n\t\t\t\tactionLog.AddAction(\n\t\t\t\t\t\toldValue,\n\t\t\t\t\t\tnewValue,\n\t\t\t\t\t\tsliderChanged,\n\t\t\t\t\t\tsliderChanged.getClass().getMethod(\"setValue\", double.class),\n\t\t\t\t\t\tthis.getClass().getMethod(\"changeVolume\", double.class));\n\t\t\t} catch (NoSuchMethodException | SecurityException e1) {\n\t\t\t\tSystem.out.println(\"An unexpected error has occured.\");\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\t\tchangeVolume(newValue);\n\t\t}\n\t}",
"@Override\n public void stateChanged(ChangeEvent e) {\n model.generateGridWithSpecifiedProblemDifficulty(view.getSpinnerValue());\n view.updateGridPanel(model.getGrid(), model.getAgentLocation());\n }",
"private void sensSliderMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_sensSliderMouseReleased\n this.sens = this.sensSlider.getValue();\n this.controller.setSens(this.sens);\n this.sensPercentLabel.setText(\"\"+this.sens+\"%\");\n }",
"public void changed(ProgressEvent event) {\n\t\t\t}",
"public void changed (ChangeEvent event, Actor actor) {\n\t \t\t\t\tfloat percent = (float)theCasing.maintenance/(float)ST.getJarMaintenance( theCasing.strain.temp_required, Assets.player.inc_temp );\n\t \t\t\t\tif ( theCasing.location==ST.FC )\n\t \t\t\t\t\t percent = (float)theCasing.maintenance/(float)ST.getJarMaintenance( theCasing.strain.temp_required, Assets.player.fc_temp );\n\t \t\t\t\tAssets.player.increaseXP( (int)(ST.MAINTENANCE_XP*ST.logisticSpread( percent ) ) );\n\t \t\t\t\t\n\t \t\t\t\tST.focus( pane, maintenanceBar );\n\t \t\t\t\t\n\t \t\t\t\t// reduce the jar's maintenance to 0\n\t \t\t\t\ttheCasing.maintenance = 0;\n\t \t\t\t}",
"@Override\n\tpublic void update(Event e) {\n\t}",
"@Override\n\t\t\tpublic void itemStateChanged(ItemEvent e) {\n\t\t\t\trepaint();\n\n\t\t\t\tif (e.getStateChange() == 1) {\n\t\t\t\t\traceChoosen = (String) e.getItem();\n\n\t\t\t\t\tif (raceChoosen.equals(\"Elf\")) {\n\t\t\t\t\t\tvitesseSlider.setMinimum(8);\n\t\t\t\t\t\tvitesseSlider.setMaximum(10);\n\t\t\t\t\t\tvitesseSlider.setValue(9);\n\t\t\t\t\t\tforceSlider.setMinimum(1);\n\t\t\t\t\t\tforceSlider.setMaximum(3);\n\t\t\t\t\t\tforceSlider.setValue(2);\n\t\t\t\t\t} else if (raceChoosen.equals(\"Ogre\")) {\n\t\t\t\t\t\tvitesseSlider.setMinimum(1);\n\t\t\t\t\t\tvitesseSlider.setMaximum(7);\n\t\t\t\t\t\tvitesseSlider.setValue(4);\n\t\t\t\t\t\tforceSlider.setMinimum(4);\n\t\t\t\t\t\tforceSlider.setMaximum(10);\n\t\t\t\t\t\tforceSlider.setValue(7);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvitesseSlider.setMinimum(4);\n\t\t\t\t\t\tvitesseSlider.setMaximum(10);\n\t\t\t\t\t\tvitesseSlider.setValue(7);\n\t\t\t\t\t\tforceSlider.setMinimum(1);\n\t\t\t\t\t\tforceSlider.setMaximum(7);\n\t\t\t\t\t\tforceSlider.setValue(4);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"void slide_numAgents_stateChanged(ChangeEvent e) {\n lbl_agentCount.setText( Integer.toString( slide_numAgents.getValue() ) );\n }",
"@Override\n\t\t\tpublic void stateChanged(ChangeEvent e) {\n\t\t\t\tif(location.isSelected()) {\n\t\t\t\t\tduree.setVisible(true);\n\t\t\t\t\tchampPlus.setText(\"Durée\");}\n\t\t\t\telse\n\t\t\t\t\tduree.setVisible(false);\n\t\t\t}",
"public void gxlValueChanged(GXLValueModificationEvent e) {\n\t}",
"protected void stateChanged() {\r\n\t\tsetChanged();\r\n\t\tnotifyObservers();\r\n\t}",
"public void mouseMoved(MouseEvent e)\n\t{\n\t\tint x = e.getX(); int y = e.getY();\n\t\tlabel.setText(\"mouse moved to (\"+x+\", \"+y+\")\");\n\t}",
"@Override\n\t\t\t\tpublic void stateChanged(ChangeEvent e) {\n\t\t\t\t\tif (!updating && button.isSelected()) {\n\t\t\t\t\t\tmodel.set(db);\n\t\t\t\t\t}\n\t\t\t\t\tif (!useRadioButtons) {\n\t\t\t\t\t\tlabel.setForeground(button.isSelected() ? selectedForeground : unselectedForeground);\n\t\t\t\t\t}\n\t\t\t\t}",
"void stateChanged( final GameState oldState, final GameState newState );",
"@Override\n public void propertyChange(PropertyChangeEvent evt) {\n\tString change = evt.getPropertyName();\n\n\tif (change.equals(StateChanges.SAVE_OPERATION_FINISHED.toString())) {\n\t // Save operation finished. Sets text to \"Operation finished\"\n\t org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application\n\t\t .getInstance().getContext()\n\t\t .getResourceMap(FinishedViewPanel.class);\n\t operationFinishedLabel.setText(resourceMap\n\t\t .getString(\"operationFinishedLabel.text\"));\n\t} else if (change\n\t\t.equals(StateChanges.SAVE_OPERATION_ABORTED.toString())) {\n\t // Save operation aborted. Sets text to \"Operation aborted\"\n\t org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application\n\t\t .getInstance().getContext()\n\t\t .getResourceMap(FinishedViewPanel.class);\n\t operationFinishedLabel.setText(resourceMap\n\t\t .getString(\"operationFinishedLabel.alttext\"));\n\t}\n }"
] | [
"0.7994317",
"0.7704498",
"0.7629279",
"0.76259696",
"0.7593107",
"0.75674725",
"0.7550019",
"0.7518154",
"0.7481481",
"0.74799514",
"0.7455372",
"0.74349564",
"0.7397656",
"0.7380273",
"0.73634106",
"0.7346273",
"0.7325715",
"0.73246616",
"0.72588736",
"0.7214912",
"0.7204049",
"0.7182904",
"0.7066707",
"0.7031933",
"0.7025638",
"0.6985829",
"0.69835067",
"0.6968171",
"0.69550836",
"0.6908193",
"0.6886809",
"0.6867991",
"0.68195444",
"0.6773588",
"0.6705308",
"0.67040086",
"0.66882133",
"0.66771585",
"0.66586816",
"0.6571887",
"0.6557169",
"0.65562093",
"0.6474862",
"0.6469101",
"0.6453788",
"0.6449318",
"0.6433034",
"0.637063",
"0.63101745",
"0.62970525",
"0.6275599",
"0.62713856",
"0.6248555",
"0.6216507",
"0.61948305",
"0.6177928",
"0.6177304",
"0.61642957",
"0.6159189",
"0.61334336",
"0.61325115",
"0.61284786",
"0.6125242",
"0.61030823",
"0.6088252",
"0.6060371",
"0.6036274",
"0.6018415",
"0.59993786",
"0.5995785",
"0.5990598",
"0.5974812",
"0.5973113",
"0.5957822",
"0.5931286",
"0.59199053",
"0.59189075",
"0.58995044",
"0.5873201",
"0.58667356",
"0.58483326",
"0.5840287",
"0.5821559",
"0.5814803",
"0.5811935",
"0.5795791",
"0.5792358",
"0.5785377",
"0.5783526",
"0.5770657",
"0.57629126",
"0.57594943",
"0.5754724",
"0.5745881",
"0.5743126",
"0.57302934",
"0.57157165",
"0.57146865",
"0.57132745",
"0.5691211"
] | 0.8313797 | 0 |
/ Name: paint Purpose: This is the method that is run when the canvas is resized. It extends (or shrinks) the line(s) that hit the moved canvas side so that both lines continue to perfectly hit the canvas edge. It also sets up dx and dy to move the balls too. Parameters: g: Graphics Return: void | public void paint( java.awt.Graphics g )
{
super.paint( g ); // Ord gave us this
canvasWidth = canvas.getWidth(); // Update original
canvasHeight = canvas.getHeight(); // canvas dimensions
double newHLineY = hLineProportion * canvas.getHeight();
double newVLineX = vLineProportion * canvas.getWidth();
hLine.setEndPoints(0, newHLineY, canvasWidth, newHLineY);
vLine.setEndPoints(newVLineX, 0, newVLineX, canvasHeight);
hLineMoved = vLineMoved = true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void paint(Graphics g){\n super.paint(g);\n Graphics2D g2d = (Graphics2D) g;\n g.setColor(Color.WHITE);\n for(int i = 0; i < ROWS; i++){\n g.drawLine(0, i * HEIGHT / ROWS - 1, \n WIDTH, i * HEIGHT / ROWS - 1);\n g.drawLine(0, i * HEIGHT / ROWS - 2, \n WIDTH, i * HEIGHT / ROWS - 2);\n }\n for (int i = 0; i <= COLS; i++) {\n g.drawLine(i * Game.getWindowWidth() / Game.getCols(), 0,\n i * Game.getWindowWidth() / Game.getCols(), HEIGHT);\n g.drawLine(i * Game.getWindowWidth() / Game.getCols() - 1, 0,\n i * Game.getWindowWidth() / Game.getCols() - 1, HEIGHT);\n }\n for (int i = 0; i < ROWS; i++) {\n for (int j = 0; j < COLS; j++) {\n grid[i][j].paintShadow(g2d);\n }\n }\n for (int i = 0; i < ROWS; i++) {\n for (int j = 0; j < COLS; j++) {\n grid[i][j].paint(g2d);\n }\n }\n \n for(Ball b : balls) {\n b.paint(g2d);\n }\n g2d.setColor(Color.BLACK);\n //segment at the top\n g2d.drawLine(0, 0, WIDTH, 0);\n g2d.drawLine(0, 1, WIDTH, 1);\n g2d.drawLine(0, 2, WIDTH, 2);\n //segment at the bottom\n g2d.drawLine(0, HEIGHT, WIDTH, HEIGHT);\n g2d.drawLine(0, HEIGHT + 1, WIDTH, HEIGHT + 1);\n g2d.drawLine(0, HEIGHT + 2, WIDTH, HEIGHT + 2);\n \n for(Point p : corners){\n g2d.drawOval(p.x, p.y, 3, 3);\n }\n\n if(aimStage){\n //draw the firing line\n g2d.setColor(lineColor);\n drawFatPath(g2d, startX, startY, endX, endY);\n g2d.setColor(arrowColor);\n drawArrow(g2d);\n }\n if(mouseHeld){\n// drawFatPath(g, Ball.restPositionX, HEIGHT - Ball.diameter, \n// getEndPoint().x, getEndPoint().y);\n }\n }",
"@Override\n\tpublic void paint(Graphics g) {\n\t\n\t\tg.drawImage(desk,0,0,null);\n\t\tg.drawImage(ball,(int)x,(int)y,null);\n\t\t\n\t\t\n\t\tif(right)\n\t\t\tx+=10;\n\t\telse x-=10;\n\t\t\n\t\tif(x>856-40-30){ //856是窗口宽度,40是桌子边框的宽度,30是小球的直径\n right = false;\n }\n \n if(x<40){ //40是桌子边框的宽度\n right = true;\n }\n\t\t\n\t}",
"public void paint(Graphics g) {\n\t\t\n\t\t//find slope - use to calculate position \n\t\tArrayList <Integer> Xpos = new ArrayList<Integer>();\n\t\tArrayList <Integer> Ypos = new ArrayList<Integer>();\n\n\t\t//contain all the x and y coordinates for horizontal lines\n\t\tArrayList <Integer> HorizXOutline = new ArrayList<Integer>();\n\t\tArrayList <Integer> HorizYOutline = new ArrayList<Integer>();\n\t\t//contain all x any y points for veritical lines\n\t\tArrayList <Integer> VertOutlineX = new ArrayList<Integer>();\n\t\tArrayList <Integer> VertOutlineY = new ArrayList<Integer>();\n\t\t//contain all x and y points of postive and pos diag lines\n\t\tArrayList <Integer> PosDiagOutlineX = new ArrayList<Integer>();\n\t\tArrayList <Integer> PosDiagOutlineY = new ArrayList<Integer>();\n\t\t//contain all x and y points of postive and neg diag lines\n\t\tArrayList <Integer> NegDiagOutlineX = new ArrayList<Integer>();\n\t\tArrayList <Integer> NegDiagOutlineY = new ArrayList<Integer>();\n\n\t\tg.setColor(Color.green);\n\t\t//adding outer shape x coord\n\t\tXpos.add(100);Xpos.add(100);Xpos.add(100);Xpos.add(200);\n\t\tXpos.add(200);Xpos.add(300);Xpos.add(100);Xpos.add(200);\n\t\tXpos.add(300);Xpos.add(400);Xpos.add(300);Xpos.add(350);\n\t\tXpos.add(400);Xpos.add(350);Xpos.add(300);Xpos.add(350);\n\t\tXpos.add(400);Xpos.add(350);Xpos.add(200);Xpos.add(300);//Xpos.add(120);Xpos.add(120);\n\t\tSystem.out.println(Xpos.size());\n\t\t//g.drawArc(100, 10, 200, 200, 0, 360);\n\t\t//adding outer shape y coord\n\t\tYpos.add(100);Ypos.add(10);Ypos.add(10);Ypos.add(10);\n\t\tYpos.add(10);Ypos.add(110);Ypos.add(100);Ypos.add(200);\n\t\tYpos.add(300);Ypos.add(300);Ypos.add(300);Ypos.add(180);\n\t\tYpos.add(300);Ypos.add(180);Ypos.add(300);Ypos.add(420);\n\t\tYpos.add(300);Ypos.add(420);Ypos.add(200);Ypos.add(110);//Ypos.add(100);Ypos.add(10);\n\t\tfor(int x =0;x<Xpos.size();x+=2){\n\t\t\tg.drawLine(Xpos.get(x), Ypos.get(x), Xpos.get(x+1), Ypos.get(x+1));\n\t\t\tif(Ypos.get(x)==Ypos.get(x+1)){\n\t\t\t\tHorizXOutline.add(x);HorizXOutline.add(x+1);\n\t\t\t\tHorizYOutline.add(x);HorizYOutline.add(x+1);\n\t\t\t\tg.drawLine(Xpos.get(x),Ypos.get(x)+20,Xpos.get(x+1),Ypos.get(x+1)+20);\n\t\t\t}\n\t\t\telse if(Xpos.get(x)==Xpos.get(x+1)){\n\t\t\t\tVertOutlineX.add(x);VertOutlineX.add(x+1);\n\t\t\t\tVertOutlineY.add(x);VertOutlineY.add(x+1);\n\t\t\t\tg.drawLine(Xpos.get(x)+20,Ypos.get(x),Xpos.get(x+1)+20,Ypos.get(x+1));\n\t\t\t}\n\t\t\tif((Ypos.get(x+1)-Ypos.get(x))!=0)\n\t\t\t{\n\t\t\t\tint slope = (Xpos.get(x)-Xpos.get(x+1))/(Ypos.get(x+1)-Ypos.get(x));\n\t\t\t\tif(slope<0){\n\t\t\t\t\tNegDiagOutlineX.add(x);NegDiagOutlineX.add(x+1);\n\t\t\t\t\tNegDiagOutlineY.add(x);NegDiagOutlineY.add(x+1);\n\t\t\t\t\tif(Xpos.get(x)<=100){\n\t\t\t\t\t\tg.drawLine(Xpos.get(x),Ypos.get(x)-20,Xpos.get(x+1)+10,Ypos.get(x+1)-10);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\tg.drawLine(Xpos.get(x),Ypos.get(x)+20,Xpos.get(x+1)-10,Ypos.get(x+1)+10);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(slope>0){\n\t\t\t\t\tPosDiagOutlineX.add(x);PosDiagOutlineX.add(x+1);\n\t\t\t\t\tPosDiagOutlineY.add(x);PosDiagOutlineY.add(x+1);\n\t\t\t\t\tg.drawLine(Xpos.get(x)-10,Ypos.get(x)-10,Xpos.get(x+1)-10,Ypos.get(x+1)-10);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n//\t for(int x = 0;x<=120;x+=10){\n//\t \t//change in x-3900/-13 = Xpos\n//\t \tint xpos1 = (int)(350 +(x/10)*(-50/11));\n//\t \tint xpos2 = (int)(350+(x/10)*(50/11));\n//\t \tint ypos = 180+x;\n//\t \tg.setColor(Color.red);\n//\t \tg.drawLine(xpos1, ypos, xpos2, ypos);\n//\t \tXpos.add(xpos1);Ypos.add(ypos);Xpos.add(xpos2);Ypos.add(ypos);\n//\t }\n//\t // g.setColor(Color.blue);\n//\t ////.drawRect(200, 100, 100, 100);\n//\t // g.setColor(Color.red);\n//\t double slope = (300-200)/(110-10);\n//\t int y = (int) (100-slope*20);\n//\t // g.drawRect(220, 130-y, 100, 100);\n//\t for(int x = 20;x<=100;x+=10){\n//\t \t//Y=slope*x+0 : (Y)/slope = X where Y = interval of 20\n//\t \tint ypos = (int)(x/slope)+190;\n//\t \tg.drawLine(100, x, ypos, x);\n//\t \tXpos.add(100);Ypos.add(x);Xpos.add(ypos);Ypos.add(x);\n//\t }\n\t // g.drawLine(300, 100, 200, 200);\n//\t for(int x = 100;x<=200;x+=10){\n//\t \tdouble circleypos = 200+ Math.sqrt((200-x)*100);\n//\t \tg.drawLine(x, x, (int)(circleypos), x);\n//\t \t\n//\t }\n\t double totalDist=0;\n\t for(int x=0; x<Xpos.size();x+=2){\n\t int xd = Xpos.get(x+1)-Xpos.get(x); xd = xd*xd;\n\t int yd = Ypos.get(x+1)-Ypos.get(x); yd = yd*yd;\n\t int distance = (int) (Math.sqrt(xd+yd));\n\t totalDist +=distance;\n\t System.out.println(\"The length of this line is\" + distance + \" and the total distance as of now is \" + totalDist);\n\t }\n\t}",
"public void paintComponent(Graphics g)\n\t{\n\t\t\n\t\t\n\t\t// Get the current width and height of the window.\n\t\tint width = getWidth(); // panel width\n\t\tint height = getHeight(); // panel height\n\t\t// Calculate the new xOffset position of the moving object.\n\t\t\n\t\t\t\txOffset = (xOffset +stepSize) % width;\n\t\t\t\t\n\t\t// Fill the graphics page with the background color.\n\t\tg.setColor(BACKGROUND_COLOR);\n\t\tg.fillRect(0, 0, width, height);\n\t\t\n\t\t//This draw the road\n\t\tint x = width/5;\n\t\tint y= height/4;\n\t\tg.setColor(new Color(211,211,211));\n\t\tg.fillRect(0, height/2, width, height/5);\n\t\t\n\t\t\n\t\t// \tThis draw the pavement \n\t\tg.setColor(new Color(245,245,220));\n\t\tg.fillRect(0,7*height/10, width, 3*height/10);\n\t\t\n\t\t// This draw paint on the road\n\t\tg.setColor(new Color(255,165,0));\n\t\tg.fillRect(0, 3*height/5, x/2, height/40);\n\t\tg.setColor(new Color(255,165,0));\n\t\tg.fillRect(x, 3*height/5, x/2, height/40);\n\t\tg.setColor(new Color(255,165,0));\n\t\tg.fillRect(2*x, 3*height/5, x/2, height/40);\n\t\tg.setColor(new Color(255,165,0));\n\t\tg.fillRect(3*x, 3*height/5, x/2, height/40);\n\t\tg.setColor(new Color(255,165,0));\n\t\tg.fillRect(4*x, 3*height/5, x/2, height/40);\n\t\tg.setColor(new Color(255,165,0));\n\t\tg.fillRect((int)(4.75*x), 3*height/5, x/2, height/40);\n\t\t\n\t\t\n\t\t// This draws background theme\n\t\tg.setColor(new Color(212,39,41));\n\t\tg.fillRect(0,0, x, height/2);\n\t\tg.setColor(new Color(1,87,174));\n\t\tg.fillRect(x,0, x, height/2);\n\t\tg.setColor(new Color(255,255,255));\n\t\tg.fillRect(2*x,0, x, height/2);\n\t\tg.setColor(Color.RED);\n\t\tg.fillRect(3*x,0, x, height/2);\n\t\tg.setColor(new Color(0,6,84));\n\t\tg.fillRect(4*x,0, x, height/2);\n\n\t\t\t\t\n\n\t\t// Insert a string \n\t\tg.setColor(Color.BLACK);\n\t\tString str = \"Stand up and Salute!!!!!\";\n\t\tg.setFont(new Font(\"Courier New\", Font.BOLD+ Font.ITALIC,y/5));\n g.drawString(str,(int)(1.5*x), height/6);\n\t\t\n // This draw a tank \n \n //This draw rectangle1\n \tg.setColor(new Color(29,33,13));\n \tg.fillRect(xOffset+7*width/50,23*height/72,3*width/25,height/9);\n \n // This draw rectangle2 \n\t\tg.setColor(new Color(29,33,13));\n\t\tg.fillRect(xOffset+width/10,(int)(1.5*y),width/5 ,height/9 );\n\t\t\n\t\t// This draw a logo on rect2\n\t\tg.setColor(Color.WHITE);\n\t\tString ban = \"TEAM USA\";\n\t\tg.setFont(new Font(\"Courier New\", Font.BOLD+ Font.ITALIC,y/5));\n g.drawString(ban,xOffset+(int)(0.12*width), 31*height/72);\n\t\t\n\t\t//This draw 2 triangles \n\t\tg.setColor(new Color(125,138,53));\n\t\t\n\t\tg.drawLine(xOffset, (int)(35*y/18),xOffset+width/10,(int)(1.5*y));\n\t\tg.drawLine(xOffset,(int)(35*y/18), xOffset+width/10,(int)(35*y/18));\n\t\t\n\t\tg.drawLine(xOffset+3*width/10, (int)(1.5*y),xOffset+4*width/10, 35*y/18);\n\t\tg.drawLine(xOffset+3*width/10,35*y/18, xOffset+4*width/10, 35*y/18);\n\t\t\n\t\n\t\t// This draw rectangle3\n\t\tg.fillRect(xOffset+13*width/50, 23*height/72, width/10, height/40);\n\t\t\n\t\t//This draw a rectangle4\n\t\tg.setColor(new Color(25,28,11));\n\t\tg.fillRect(xOffset+9*width/25,557*height/1800 ,7*width/90, (int)(1.5*height/35));\n\t\t//This draw a missile launched from the tank\n\t\tg.setColor(new Color(255,215,0));\n\t\tg.fillArc(xOffset+58*width/225,557*height/1800 ,xOffset+11*width/90, (int)(1.5*height/35),0, 45);\n\t\t\n\t\t//This draw 2 wheels\n\t\tg.setColor(Color.BLACK);\n\t\tg.fillOval(xOffset, (int)(35*y/18),3*width/50 , 9*height/100);\n\t\tg.fillOval(xOffset+(int)(0.35*width),(int)(35*y/18), 3*width/50, 9*height/100);\n\t\t\n\t\t// This draw person1 watching the tank passing by\n\t\tg.setColor(new Color(205,183,158));\n\t\tg.fillOval(x, 3*y, 3*width/50, 9*height/100);\n\t\tg.setColor(new Color(125,138,53));\n\t\tg.fillRoundRect(x, 21*height/25, 3*width/40, 9*height/60,180,90);\n\t\tg.setColor(new Color(125,138,53));\n\t\tg.fillArc((int)(0.95*x), 3*y, 4*width/50, 9*height/100, 0, 180);\n\t\tg.setColor(Color.BLACK);\n\t\tg.fillOval(19*width/80,183*height/200, width/80 , height/80);\n\t\tg.fillOval(19*width/80, 47*height/50, width/80, height/80);\n\t\tg.fillOval(19*width/80, 89*height/100, width/80, height/80);\n\t\t\n\t\t// This draw person2 watching the tank passing by\n\t\tg.setColor(new Color(205,183,158));\n\t\tg.fillOval((int)(1.5*x), 3*y, 3*width/50, 9*height/100);\n\t\tg.setColor(new Color(125,138,53));\n\t\tg.fillRoundRect((int)(1.5*x), 21*height/25, 3*width/40, 9*height/60,180,90);\n\t\tg.setColor(new Color(125,138,53));\n\t\tg.fillArc((int)(1.45*x), 3*y, 4*width/50, 9*height/100, 0, 180);\n\t\tg.setColor(Color.BLACK);\n\t\tg.fillOval(27*width/80,183*height/200, width/80 , height/80);\n\t\tg.fillOval(27*width/80, 47*height/50, width/80, height/80);\n\t\tg.fillOval(27*width/80, 89*height/100, width/80, height/80);\n\t\t\n\t\t// This draw person3 watching the tank passing by\n\t\tg.setColor(new Color(205,183,158));\n\t\tg.fillOval((int)(2*x), 3*y, 3*width/50, 9*height/100);\n\t\tg.setColor(new Color(125,138,53));\n\t\tg.fillRoundRect((int)(2*x), 21*height/25, 3*width/40, 9*height/60,180,90);\n\t\tg.setColor(new Color(125,138,53));\n\t\tg.fillArc((int)(1.95*x), 3*y, 4*width/50, 9*height/100, 0, 180);\n\t\tg.setColor(Color.BLACK);\n\t\tg.fillOval(7*width/16,183*height/200, width/80 , height/80);\n\t\tg.fillOval(7*width/16, 47*height/50, width/80, height/80);\n\t\tg.fillOval(7*width/16, 89*height/100, width/80, height/80);\n\t\t\n\t\t// This drawperson4 watching the tank passing by\n\t\tg.setColor(new Color(205,183,158));\n\t\tg.fillOval((int)(2.5*x), 3*y, 3*width/50, 9*height/100);\n\t\tg.setColor(new Color(125,138,53));\n\t\tg.fillRoundRect((int)(2.5*x), 21*height/25, 3*width/40, 9*height/60,180,90);\n\t\tg.setColor(new Color(125,138,53));\n\t\tg.fillArc((int)(2.45*x), 3*y, 4*width/50, 9*height/100, 0, 180);\n\t\tg.setColor(Color.BLACK);\n\t\tg.fillOval(43*width/80,183*height/200, width/80 , height/80);\n\t\tg.fillOval(43*width/80, 47*height/50, width/80, height/80);\n\t\tg.fillOval(43*width/80, 89*height/100, width/80, height/80);\n\t\t\n\t\t// This draw person5 watching the tank passing by\n\t\tg.setColor(new Color(205,183,158));\n\t\tg.fillOval((int)(3*x), 3*y, 3*width/50, 9*height/100);\n\t\tg.setColor(new Color(125,138,53));\n\t\tg.fillRoundRect((int)(3*x), 21*height/25, 3*width/40, 9*height/60,180,90);\n\t\tg.setColor(new Color(125,138,53));\n\t\tg.fillArc((int)(2.95*x), 3*y, 4*width/50, 9*height/100, 0, 180);\n\t\tg.setColor(Color.BLACK);\n\t\tg.fillOval(51*width/80,183*height/200, width/80 , height/80);\n\t\tg.fillOval(51*width/80, 47*height/50, width/80, height/80);\n\t\tg.fillOval(51*width/80, 89*height/100, width/80, height/80);\n\t\t\n\t\t// This draw a small plane flying across the screen with a banner \n\t\tg.setColor(new Color(255,87,51));\n\t\tg.fillRoundRect(-xOffset+(int)(0.75*width),0, width/8, height/9, 90, 90);\n\t\t\n\t\t\n\t\tg.setColor(new Color(218,247,166));\n\t\tg.fillRect(-xOffset+4*width/5,0,width/5,height/9);\n\t\t\n\t\tg.setColor(new Color(8,24,69));\n\t\tg.fillRoundRect(-xOffset+(int)(0.85*width),height/27,width/20,height/20,180,90);\n\t\t\n\t\t\n\t\n\t\t\n\t\t\n\t\t// Put your code above this line. This makes the drawing smoother.\n\t\tToolkit.getDefaultToolkit().sync();\n\t}",
"public void paint( Graphics g ){\n g.drawOval(-4, -4, 8, 8);\n g.drawLine(-2, 2, 2,-2);\n g.drawLine(-2,-2, 2, 2);\n }",
"public void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\n\t\tint width = getWidth();\n\t\tint height = getHeight();\n\t\tint wSteps = width / 15;\n\t\tint hSteps = height / 15;\n\n\t\tint xDelta = wSteps;\n\t\tint yDelta = height;\n\n\t\t// draw a series of lines fanning from top corner\n\t\tfor (int i = 0; i < 15; i++) {\n\t\t\tg.drawLine(0, 0, xDelta, yDelta);\n\n\t\t\txDelta += wSteps;\n\t\t\tyDelta -= hSteps;\n\n\t\t}\n\t}",
"public void drawDragon(Graphics g)\n {\n g.setColor(c); // Watermelon Dragon.\n g.fillRect(x, y , size * 25, size * 25); //Draw Head\n g.fillRect(bodyX, bodyY, bodyWidth, bodyHeight); //Draw Body\n g.fillRect(x+size * 25, (y + size*25) + size * 50, size * 10, size * 50); //Draw Leg #1\n g.fillRect(x+size * 25+ size*60-size*10, (y + size*25) + size * 50, size * 10, size * 50); //Draw Leg #2//Draw Health bar\n /*if(health > 30)\n {\n g.setColor(Color.YELLOW);\n g.fillRect(x, y - 50, size * 60, size*50/6);\n }*/\n \n }",
"@Override\n\tpublic void paint(Graphics g) {\n\t\tsuper.paint(g);\n\t\tGraphics2D g2d = (Graphics2D) g;\n\n\t\tg2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\n\t\t\t\t\tRenderingHints.VALUE_ANTIALIAS_ON);\n\t\t\n\t\tball.paint(g2d);\n\t\tpaddle.paint(g2d);\n\t}",
"void draw(Graphics2D g2d) {\n this.golfBall.draw(g2d);\n if (this.golfBall.stopped) {\n this.arrow.draw(g2d);\n }\n }",
"public void onDraw(Canvas canvas) {\n\t\tcanvas.drawRect(0, 0, width, height, background);\n\n\t\tboolean[][] hLines = maze.getHorizontalLines();\n\t\tboolean[][] vLines = maze.getVerticalLines();\n\t\t// iterate over the boolean arrays to draw walls\n\t\tfor (int i = 0; i < mazeSizeX; i++) {\n\t\t\tfor (int j = 0; j < mazeSizeY; j++) {\n\t\t\t\tfloat x = j * totalCellWidth;\n\t\t\t\tfloat y = i * totalCellHeight;\n\t\t\t\tif (j < mazeSizeX - 1 && vLines[i][j]) {\n\t\t\t\t\t// we'll draw a vertical line\n\t\t\t\t\tcanvas.drawLine(x + cellWidth, // start X\n\t\t\t\t\t\t\ty, // start Y\n\t\t\t\t\t\t\tx + cellWidth, // stop X\n\t\t\t\t\t\t\ty + cellHeight, // stop Y\n\t\t\t\t\t\t\tline);\n\t\t\t\t}\n\t\t\t\tif (i < mazeSizeY - 1 && hLines[i][j]) {\n\t\t\t\t\t// we'll draw a horizontal line\n\t\t\t\t\tcanvas.drawLine(x, // startX\n\t\t\t\t\t\t\ty + cellHeight, // startY\n\t\t\t\t\t\t\tx + cellWidth, // stopX\n\t\t\t\t\t\t\ty + cellHeight, // stopY\n\t\t\t\t\t\t\tline);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// draw the finishing point indicator\n\t\tcanvas.drawText(\"F\", (mazeFinishX * totalCellWidth)\n\t\t\t\t+ (cellWidth * 0.25f), (mazeFinishY * totalCellHeight)\n\t\t\t\t+ (cellHeight * 0.75f), red);\n\n\t\tint currentX = maze.getCurrentX(), currentY = maze.getCurrentY();\n\t\t// draw the ball in a specified location between the middle of cell\n\t\tcanvas.drawCircle((currentX*totalCellWidth) + (cellWidth / 2), // x of center\n\t\t\t\t(currentY*totalCellHeight) + (cellWidth / 2), // y of center\n\t\t\t\t(cellWidth * 0.4f), // radius\n\t\t\t\tred);\n\n//\t\tcanvas.drawCircle((currentX * totalCellWidth) + (cellWidth / 2), // x of center\n//\t\t\t\t(currentY * totalCellHeight) + (cellWidth / 2), // y of center\n//\t\t\t\t(cellWidth * 0.4f), // radius\n//\t\t\t\tred);\n\n\t\t //maze.draw(canvas, line);\n\t\t\n\t\tupdateMarble();\n\t\t//invalidate();\n\t}",
"public void paint(Graphics g) {\r\n\t\tsuper.paint(g);\r\n\t\t// add code below\r\n\t\tGraphics g1 = drawingPanel.getGraphics();\r\n\t\tif (myLine != null && myLine.getIsAPerpendicular() == false) {\r\n\t\t\tShapes.add(myLine);\r\n\t\t\tfor (int i = 0; i < Shapes.size(); i++) {\r\n\t\t\t\tShapes.get(i).draw(g1);\r\n\t\t\t}\r\n\t\t}// End If to prevent null pointer exception\r\n\t\tif (myOval != null) {\r\n\t\t\tShapes.add(myOval);\r\n\t\t\tfor (int i = 0; i < Shapes.size(); i++) {\r\n\t\t\t\tShapes.get(i).draw(g1); // To make this legal an abstract method named draw which accepted graphics g need to be added to the shapes class\r\n\t\t\t}\r\n\t\t}// End If to prevent null pointer exception\r\n\t}",
"public void paintBalls(Graphics g);",
"@Override\n protected void onDraw(Canvas canvas) {\n super.onDraw(canvas);\n\n float cellSize, hMargin, vMargin, radius;\n\n ballPaint.setColor(getResources().getColor(R.color.midRed));\n ballPaint.setStrokeWidth(0);\n ballPaint.setStyle(Paint.Style.FILL);\n\n //get values for size of the maze the ball will be in\n int height = getHeight();\n int width = getWidth();\n //calculate size for path-, start-, end- and wall-pieces\n if(width/height < COL/ROW){\n cellSize = width/(COL+1);\n }\n else{\n cellSize = height/(ROW+1);\n }\n //calculate size of maze\n hMargin = (width-COL*cellSize)/2;\n vMargin = (height-ROW*cellSize)/2;\n canvas.translate(hMargin, vMargin);\n radius = cellSize/2;\n\n //if start button has been clicked get positions of the ball\n //in the maze-array (maze[yCurr][xCurr]) and in the drawing (xPos, yPos)\n if(isGameStarted){\n if(xDir < -3 && xCurr+1 != 21 && maze[yCurr][xCurr+1] != 'w'){\n xCurr += 1;\n xPos += cellSize;\n try {\n //give ball a delay to make sure it doesn't move too fast\n TimeUnit.MILLISECONDS.sleep(100);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n } else if(xDir > 3 && xCurr != 0 && maze[yCurr][xCurr-1] != 'w'){\n xCurr -= 1;\n xPos -= cellSize;\n try {\n TimeUnit.MILLISECONDS.sleep(100);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n } else if(yDir < -3 && yCurr != 0 && maze[yCurr-1][xCurr] != 'w'){\n yCurr -= 1;\n yPos -= cellSize;\n try {\n TimeUnit.MILLISECONDS.sleep(100);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n } else if(yDir > 3 && yCurr+1 != 21 && maze[yCurr+1][xCurr] != 'w'){\n yCurr += 1;\n yPos += cellSize;\n try {\n TimeUnit.MILLISECONDS.sleep(100);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n canvas.drawCircle(xPos+radius, yPos+radius, radius, ballPaint);\n //when ball lands on field named \"e\" for end, the game is over\n // and the ball will be placed on a start-field\n if(maze[yCurr][xCurr] == 'e'){\n gameOver = true;\n isWinner = true;\n xCurr = 0;\n yCurr = 0;\n xPos = 0;\n yPos = 0;\n }\n }\n }",
"public void move() { check for bounce and make the ball bounce if necessary\n\t\t//\n\t\tif (x < 0 && dx < 0) {\n\t\t\t// bounce off the left wall\n\t\t\tx = 0;\n\t\t\tdx = -dx;\n\t\t}\n\t\tif (y < 0 && dy < 0) {\n\t\t\t// bounce off the top wall\n\t\t\ty = 0;\n\t\t\tdy = -dy;\n\t\t}\n\t\tif (x > panel.getWidth() - SIZE && dx > 0) {\n\t\t\t// bounce off the right wall\n\t\t\tx = panel.getWidth() - SIZE;\n\t\t\tdx = -dx;\n\t\t}\n\t\tif (y > panel.getHeight() - SIZE && dy > 0) {\n\t\t\t// bounce off the bottom wall\n\t\t\ty = panel.getHeight() - SIZE;\n\t\t\tdy = -dy;\n\t\t}\n\n\t\t// make the ball move\n\t\tx += dx;\n\t\ty += dy;\n\t}",
"public void paint(Graphics g )\n {\n super.paint(g); // is no super.paint(), then lines stay on screen \n \n for ( int i=0; i<allTheShapesCount; i++ )\n {\n allTheShapes[ i ] . drawMe(g);\n }\n }",
"public void paintComponent(Graphics g) {\n\t\t\tsuper.paintComponent(g);\n\t\t\t\n\t\t\t// First 2 arguments (X, Y) -> start, Last 2 arguments (X, Y) -> end\n\t\t\tg.drawLine(0, 3, 200, 200);\n\t\t\tg.drawLine(200, 200, 0, 400);\n\t\t\t\n\t\t}",
"@Override\n\tpublic void draw(Graphics g) {\n\t\tsuper.draw(g);\n\t\tif(!satillite){\n\t\t\tdrawTrace(g);\n\t\t}\n\t\t\n \t\tmove();\n\t}",
"private void drawBall(Graphics g) {\n Ball b = game.getBall();\n Color savedCol = g.getColor();\n g.setColor(Ball.COLOR);\n g.fillOval(b.getX() - Ball.SIZE / 2, b.getY() - Ball.SIZE / 2, Ball.SIZE, Ball.SIZE);\n g.setColor(savedCol);\n }",
"private void subDraw(Graphics2D g, Body myBody, Color c)\r\n\t{\r\n\t\tg.setColor(c);\r\n\r\n\t\t//This drawing code inspired by drawBody() method in net.phys2d.raw.test.AbstractDemo\r\n\t\t//by Kevin Glass, 2006\r\n\t\t//Source: http://www.cokeandcode.com/phys2d/source/builds/src060408.zip\r\n\t\tif (myBody.getShape() instanceof Box)\r\n\t\t{\r\n\t\t\tVector2f[] pts = ((Box)myBody.getShape()).getPoints(myBody.getPosition(), myBody.getRotation());\r\n\t\t\tg.drawLine((int) pts[0].x,(int) pts[0].y,(int) pts[1].x,(int) pts[1].y);\r\n\t\t\tg.drawLine((int) pts[1].x,(int) pts[1].y,(int) pts[2].x,(int) pts[2].y);\r\n\t\t\tg.drawLine((int) pts[2].x,(int) pts[2].y,(int) pts[3].x,(int) pts[3].y);\r\n\t\t\tg.drawLine((int) pts[3].x,(int) pts[3].y,(int) pts[0].x,(int) pts[0].y);\r\n\t\t}\r\n\t\tif (myBody.getShape() instanceof Circle)\r\n\t\t{\r\n\t\t\tCircle myCircle;\r\n\t\t\tmyCircle = (Circle)myBody.getShape();\r\n\t\t\tg.drawOval((int)myBody.getPosition().getX()-(int)myCircle.getRadius(), (int)myBody.getPosition().getY()-(int)myCircle.getRadius(), \r\n\t\t\t\t\t(int)myCircle.getRadius()*2, (int)myCircle.getRadius()*2);\r\n\t\t}\r\n\t}",
"@Override\n public void paint(Graphics g) {\n g2 = (Graphics2D) g;\n drawBackground();\n drawSquares();\n drawLines();\n gui.hint = new TreeSet<>();\n }",
"public void paintComponent(Graphics g){\n\t\t\n\t\t// chama paintComponent para assegurar que o painel é exibido corretamente\n\t\tsuper.paintComponent(g);\n\t\tint width = getWidth(); // largura total \n\t\tint height = getHeight(); // altura total\n\t\tint meio1 = (width/2);\n\t\tint meio2 = (height/2);\n\t\t// desenha uma linha a partir do canto superior esquerdo até o inferior direito\n\t\tg.drawLine(0, 0, width, height);\n\n\t\t// desenha uma linha a partir do canto inferior esquerdo até o superior direito\n\t\tg.drawLine(0, height, width, 0);\n\t\t\n\t\t// A parte, cria uma linha Horizontal\n\t\tg.drawLine(0, meio2, width, meio2);\n\t\t// A parte, cria uma linha Vertical\n\t\tg.drawLine(meio1, 0, meio1, height);\n\t\t\n\t}",
"public void paint(Graphics2D g) {\n g.setColor(Color.ORANGE); // sets the color of the ball as orange\r\n g.fillOval(x, y, DIAMETER, DIAMETER); // fills the oval with specific diameter and position in the screen\r\n }",
"public void traceMe(Graphics g){\n\t\ttheball.setFrame(this.getX(),this.getY(),diameter,diameter);\n\t\t((Graphics2D)g).fill(theball);\n\t}",
"public void draw(Graphics g) {\n int x = super.getX();\n int y = super.getY();\n int d = (int)radius*2; //d = diameter\n g.setColor(Color.BLACK);\n g.drawOval(265/2,235,265,265);\n g.drawLine(265, 115, 265, 500);\n\n int [ ] x2 = {27, 500, 265}; //lets work on that line?\n int [ ] y2 = {500, 500, 115};\n g.setColor(Color.black);\n g.drawPolygon(x2, y2, 3);\n\n }",
"public void draw(Graphics g) {\n g.drawLine(start_x, start_y, start_x, end_y);\n g.drawLine(start_x, start_y, end_x, start_y);\n g.drawLine(start_x, end_y, end_x, end_y);\n g.drawLine(end_x, start_y, end_x, end_y);\n }",
"public void draw(Graphics g) {\r\n g.drawLine(line.get(0).getX() + 4, line.get(0).getY() + 4, line.get(4).getX() + 4, line.get(4).getY() + 4);\r\n }",
"public void paint(Graphics g) {\n\t\tDimension d = getSize();\n\t\tint brickLine = d.height * 85 / 100;\n\t\tint brickHeight = d.height * 4 / 100;\n\t\tint skyline = brickLine + brickHeight;\n\n\t\t// draw solid sky, mortar, and moon\n\t\t// g.setColor(NIGHTSKY);\n\t\t// g.fillRect(0, 0, d.width, skyline);\n\t\tg.drawImage(bgImg, 0, 0, null);\n\n\t\t// Draw the snowflakes.\n\t\tfor (int i = 0; i < numFlakes; i++) {\n\t\t\tflakes[i].paint(this, g);\n\t\t}\n\t}",
"@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n\n if (bdhcHandler != null) {\n int[] slopes = bdhcHandler.getSelectedPlate().getSlope();\n float angle = (float) Math.atan2(slopes[indexSlope1], slopes[indexSlope2]);\n\n Graphics2D g2 = (Graphics2D) g;\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\n RenderingHints.VALUE_ANTIALIAS_ON);\n\n g.setColor(Color.magenta);\n final int angleRadius = (radius * 2) / 3;\n final int angleOffset = size / 2 - angleRadius;\n g2.setStroke(new BasicStroke(2));\n g.drawArc(angleOffset, angleOffset, 2 * angleRadius, 2 * angleRadius, 0, (int) (-(angle * 180) / Math.PI));\n\n g2.setStroke(new BasicStroke(2));\n if (frontView) {\n g.setColor(Color.red);\n g.drawLine(size / 2, size / 2, size, size / 2);\n g.setColor(Color.blue);\n g.drawLine(size / 2, size / 2, size / 2, 0);\n } else {\n g.setColor(Color.green);\n //g.drawLine(size / 2, size / 2, size, size / 2);\n g.drawLine(size / 2, size / 2, size, size / 2);\n g.setColor(Color.blue);\n g.drawLine(size / 2, size / 2, size / 2, 0);\n }\n\n int circleOffset = size / 2 - radius;\n g.setColor(Color.black);\n g2.setStroke(new BasicStroke(1));\n g.drawOval(circleOffset, circleOffset, radius * 2, radius * 2);\n\n int x = (int) (Math.cos(angle) * radius);\n int y = (int) (Math.sin(angle) * radius);\n int lineOffset = size / 2;\n g.setColor(Color.orange);\n g2.setStroke(new BasicStroke(3));\n g.drawLine(lineOffset - x, lineOffset - y, lineOffset + x, lineOffset + y);\n\n }\n\n }",
"@Override\r\n\tpublic void onSizeChanged(int w, int h, int oldW, int oldH) {\r\n\t\t// Set the movement bounds for the ball\r\n\t\txMax = w - 1;\r\n\t\tyMax = h - 1;\r\n\t}",
"private void redrawLines()\n {\n for(int i =0; i<currentRide;i++)\n {\n rides[i].moveTogether(650,60 + 40*i);//move all elemetnts of ride lines\n \n }\n }",
"@Override\r\n\tpublic void paint(Graphics g) {\n\t\tGraphics2D g2d= (Graphics2D)g;//Cast the Graphics received in the paint method to Graphics2D\r\n\t\tg2d.setColor(Color.RED);//Set the color to red\r\n\t\tg2d.setStroke(new BasicStroke(5));//Set the width of the line to 5px \r\n\t\t//g2d.drawLine(0, 0, 500, 500);//Draw a line starting at point (0,0) and ending at point (500,500)\r\n\t\t//g2d.drawRect(100, 100, 300, 300);//Draw a rectangle with upper left corner at (100,100) and with width and height of 300px\r\n\t\tg2d.setColor(Color.GREEN);//Set the color to green\r\n\t\t//g2d.fillRect(100, 100, 300, 300);//Fill the rectangle\r\n\t\t\r\n\t\t//If we will draw the line first and then the rectangle, the rectangle will be on top of the line and hide part of it\r\n\t\t//g2d.drawOval(100, 100, 300, 300);//Draw circle\r\n\t\t//g2d.fillOval(100, 100, 300, 300);//Fill the circle\r\n\t\t\r\n\t\t//g2d.drawArc(100,100,200,200,0,180);//Draw half circle\r\n\t\r\n\t\t//g2d.drawArc(100,100,200,200,180,180);//Flip it\r\n\t\t//g2d.drawArc(100,100,200,200,0,270);//Draw 3/4 of a circle\r\n\t\t\r\n\t\t//int[] xPoints= {150,250,350};\r\n\t\t//int[] yPoints= {300,150,300};\r\n\t\t//g2d.drawPolygon(xPoints,yPoints,3);//Draw rectangle using polygon, specify x points and y points of the corners and number of corners,\r\n\t\t\t\t\t\t\t\t\t\t //we can specify more than 3 corners and create different shapes.\r\n\t\t\t\t\r\n\t\t//g2d.fillPolygon(xPoints,yPoints,3);//Fill the rectangle using polygon\r\n\t\tg2d.setColor(Color.BLACK);//Set the color to black\r\n\t\tg2d.setFont(new Font(\"Ink Free\", Font.BOLD,40));\r\n\t\tg2d.drawString(\"Hello world\", 100, 100);\r\n\t}",
"private void draw(Graphics2D g)\r\n\t{\t\t\r\n\t\tColor[] cols = new Color[] {Color.red,Color.green,Color.blue};\r\n\t\t\r\n\t\t// clear the background\r\n\t\tg.setColor(Color.black);\r\n\t\tg.fillRect(0,0,640,510);\r\n\t\t\r\n\t\tg.translate(0,30);\t\r\n\r\n\t\tif (zp < 0) {\r\n\t\t\tdrawBall(g);\r\n\t\t} \r\n\r\n\t\tColor[] colMap = new Color[16];\r\n\t\tcolMap[3] = Color.white;\r\n\t\tcolMap[12] = cols[(timers[0] / 100) % 3];\r\n\t\tcolMap[13] = Color.black;\r\n\t\tcolMap[14] = Color.gray;\r\n\t\tcolMap[15] = Color.yellow;\r\n\t\t\r\n\t\tfor (int x=0;x<30;x++) {\r\n\t\t\tfor (int y=0;y<30;y++) {\r\n\t\t\t\tint tile = getTile(x,y);\r\n\t\t\t\tif (tile != 0) {\r\n\t\t\t\t\tPolygon p = new Polygon();\r\n\r\n\t\t\t\t\tint total = addPoint(x,y,p);\r\n\t\t\t\t\ttotal += addPoint(x+1,y,p);\r\n\t\t\t\t\ttotal += addPoint(x+1,y+1,p);\r\n\t\t\t\t\ttotal += addPoint(x,y+1,p);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (total == 4) {\r\n\t\t\t\t\t\tif ((tile == 11) && (!controls[19])) {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif ((tile == 13) && (toggles > 0)) {\r\n\t\t\t\t\t\t\ttile = 1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tColor col = cols[l % 3];\r\n\t\t\t\t\t\tif ((x+y) % 2 == 0) {\r\n\t\t\t\t\t\t\tcol = cols[l % 3].darker();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (colMap[tile] != null) {\r\n\t\t\t\t\t\t\tcol = colMap[tile];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tg.setColor(col);\r\n\t\t\t\t\t\tg.fillPolygon(p);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (tile > 10) {\r\n\t\t\t\t\t\t\tg.setColor(Color.darkGray);\r\n\t\t\t\t\t\t\tif (tile == 11) {\r\n\t\t\t\t\t\t\t\tg.setColor(col.darker());\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tg.fillPolygon(p);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tPolygon p2 = new Polygon();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\taddPoint(x+0.1,y+0.1,p2);\r\n\t\t\t\t\t\t\taddPoint(x+0.9,y+0.1,p2);\t\t\t\t\r\n\t\t\t\t\t\t\taddPoint(x+0.9,y+0.9,p2);\t\t\t\t\r\n\t\t\t\t\t\t\taddPoint(x+0.1,y+0.9,p2);\r\n\t\r\n\t\t\t\t\t\t\tg.setColor(col);\r\n\t\t\t\t\t\t\tg.fillPolygon(p2);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (zp >= 0) {\r\n\t\t\tdrawBall(g);\r\n\t\t}\r\n\t\t\r\n\t\tg.setColor(Color.black);\r\n\t\tg.fillRect(0,-20,640,45);\r\n\t\tg.setColor(Color.darkGray);\r\n\t\tg.drawLine(0,25,640,25);\r\n\t\tg.setFont(g.getFont().deriveFont(Font.BOLD, 20.0f));\t\r\n\t\tg.setPaint(new GradientPaint(0,20,Color.green,0,0,Color.white));\r\n\t\t\r\n\t\tg.drawString(\"Time: \"+(timers[0]/1000),530,20);\r\n\t\tg.drawString(\"Ball\",20,20);\r\n\t\t\r\n\t\tg.setPaint(new GradientPaint(0,20,Color.yellow,0,0,Color.white));\r\n\t\tg.drawString(msg,(640-g.getFontMetrics().stringWidth(msg))/2,20);\r\n\t\t\r\n\t\tif (!started) {\r\n\t\t\tang += 0.01f;\r\n\t\t\tg.drawString(\"Cursors - Move PgUp/PgDown - View Space - Jump\",60,470);\r\n\t\t}\r\n\t}",
"public void mouseDragged(MouseEvent e) // When mouse is dragged:\n {\n Location pt = new Location(e.getX(),e.getY());\n\n dragDx = pt.getX() - lastPt.getX();\n dragDy = pt.getY() - lastPt.getY();\n\n // If H Line was grabbed and drag is within the margins:\n if(hLineGrabbed && pt.getY() >= MARGIN_HORIZONTAL && // If hLine grabbed\n pt.getY() <= canvasHeight - MARGIN_HORIZONTAL) // and drag is in\n { // the margins:\n hLine.setEndPoints(0, (hLine.getStart()).getY() + dragDy,\n canvasWidth,\n (hLine.getStart()).getY() + dragDy);// Move hLine\n\n if(lastPt != pt) // If new point is\n { // different (moved):\n hLineMoved = true; // hLine was moved\n }\n\n else // If new point is\n { // same (not moved):\n hLineMoved = false; // hLine not moved\n }\n }\n\n // If V Line was grabbed and drag is within the margins:\n if(vLineGrabbed && pt.getX() >= MARGIN_VERTICAL && // If vLine grabbed\n pt.getX() <= canvasWidth - MARGIN_VERTICAL) // and drag is in\n { // the margins:\n vLine.setEndPoints((vLine.getStart()).getX() + dragDx, 0,\n (vLine.getStart()).getX() + dragDx, \n canvasHeight); // Move vLine\n\n if(lastPt != pt) // If new point is\n { // different (moved):\n vLineMoved = true; // vLine was moved\n }\n\n else // If new point is\n { // same (not moved):\n vLineMoved = false; // vLine not moved\n }\n }\n\n hLineProportion = (hLine.getStart()).getY() / canvasHeight;\n vLineProportion = (vLine.getStart()).getX() / canvasWidth;\n\n lastPt = pt; // Set the point to\n dragDx = dragDy = 0; // Reset drag delta\n }",
"@Override\r\n\tpublic void draw(Graphics g) {\n\t\tg.setColor(this.color);\r\n\t\tg.fillOval((int)x, (int)y, side, side);\r\n\t\tg.setColor(this.color2);\r\n\t\tg.fillOval((int)x+5, (int)y+2, side/2, side/2);\r\n\t}",
"public void paintComponent(Graphics g) {\r\n\t\tsuper.paintComponent(g);\r\n\t\t\r\n\t\t// Setting drawings the global color.\r\n\t\tg.setColor( this.model.defaultV.movingColor ); \r\n\r\n\t\t//Painting all of the particles.\r\n\t\tfor(int i = 0; i < this.model.particleArray.size(); i++) {\r\n\t\t\tParticle p = (Particle) this.model.particleArray.get(i);\r\n\t\t\tint x = (int) p.x;\r\n\t\t\tint y = (int) p.y;\r\n\t\t\t\r\n\t\t\t// Changing the color accordingly.\r\n\t\t\tif( p.isMoving ) {\r\n\t\t\t\tg.setColor( p.color );\r\n\t\t\t} else {\r\n\t\t\t\tg.setColor( this.model.defaultV.stuckColor );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Painting each particle.\r\n\t\t\tg.fillRect(x, y, this.model.defaultV.particleSize, this.model.defaultV.particleSize);\r\n\t\t\t\r\n\t\t\tif (p.isTracking && p.trackingPath.size() > 1) {\r\n\t\t\t\tParticle firstPos = p.trackingPath.get(0); // Our very first particle position.\r\n\t\t\t\tfor(int j = 1; j < p.trackingPath.size() - 1; j++) {\r\n\t\t\t\t\tParticle secondPos = p.trackingPath.get(j);\r\n\t\t\t\t\t// draw line from first to second.\r\n\t\t\t\t\tGraphics2D g2 = (Graphics2D) g;\r\n\t\t\t\t\tLine2D lin = new Line2D.Float((int) firstPos.x, (int) firstPos.y, (int) secondPos.x, (int) secondPos.y);\r\n\t\t\t\t\tg.setColor( p.color );\r\n\t\t\t\t\tg2.draw(lin);\r\n\t\t\t\t\t// Set our first to the next.\r\n\t\t\t\t\tfirstPos = secondPos;\r\n\t\t\t\t}\r\n\t\t\t}\r\n }\r\n\t}",
"@Override\npublic void paint(Graphics g) {\n\tsuper.paint(g);\n\tg.drawImage(bak, 0, 0, null);\n\t\n\t//画线\n\tfor(int i=0;i<Config.ROWS;i++)\n\t{\n\t\tfor(int j=0;j<Config.COLS;j++)\n\t\t{\n\t\t\tg.setColor(new Color(137,92,44));\n\t\t\tg.drawRect(j*Config.CELL+Config.OFFSETX, i*Config.CELL+Config.OFFSETY, Config.CELL, Config.CELL);\n\t\t}\n\t}\n\t//画焦点\n\tfor(int i=0;i<Config.ROWS;i++)\n\t{\n\t\tfor(int j=0;j<Config.COLS;j++)\n\t\t{\n\t\t\tif(Config.MAP[i][j]==Config.FOCUS)\n\t\t\t{\n\t\t\t\tg.setColor(new Color(137,92,44));\n\t\t\t\tg.fillRect(j*Config.CELL+Config.OFFSETX-5, i*Config.CELL+Config.OFFSETY-5, 10, 10);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t//画子\n\t\tfor(int i=0;i<Config.ROWS;i++)\n\t\t{\n\t\t\tfor(int j=0;j<Config.COLS;j++)\n\t\t\t{\n\t\t\t\tif(Config.MAP[i][j]==Config.BLACK)\n\t\t\t\t{\n\t\t\t\t g.drawImage(black, Config.CELL*j+Config.OFFSETX-20, i*Config.CELL+Config.OFFSETY-20, null);\n\t\t\t\t \n\t\t\t\t}\n\t\t\t\tif(Config.MAP[i][j]==Config.WHITE)\n\t\t\t\t{\n\t\t\t\t g.drawImage(white, Config.CELL*j+Config.OFFSETX-20, i*Config.CELL+Config.OFFSETY-20, null);\n\t\t\t\t \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n //画提拉\n\t\tg.setFont(new Font(\"微软雅黑\",Font.BOLD,24));\n\t\tg.setColor(step%2==0?Color.black:Color.white);\n\t\tg.drawString(step%2==0?\"黑子下\":\"白子下\", 640, 80);\n}",
"public void draw(Graphics g) {\r\n\t\tGraphics2D g2d = (Graphics2D) g;\r\n\t\tg2d.setStroke(new BasicStroke((float) penWidth));\r\n\t\tg2d.setPaint(borderColor);\r\n\t\tif (width<height){\r\n\t\t\tg2d.drawPolygon(new int[]{p.x,p.x + (width / 2),p.x + width, p.x + (width/2)}, new int[] {p.y,p.y + (width/3),p.y,p.y + width},4);\r\n\t\t}else{\r\n\t\t\tg2d.drawPolygon(new int[]{p.x,p.x + (height/2),p.x + height, p.x + (height/2)}, new int[] {p.y,p.y+(height/3),p.y,p.y + height},4);\r\n\r\n\t\t}\r\n\t\tdrawHandles(g);\r\n\t}",
"@Override\r\n\tpublic void paint(Graphics g) {\n\t\tsuper.paint(g);\r\n\t Graphics2D graphics = (Graphics2D)g;\r\n\t \r\n\t for (int i = 0; i < tom.snake.size() -1; i++) {\r\n\t \tDimension xy = new Dimension(tom.snake.get(i));\r\n\t \tgraphics.setColor(BLACK);\r\n\t \tgraphics.fillRect(xy.width*SNAKE_SIZE, xy.height*SNAKE_SIZE, SNAKE_SIZE, SNAKE_SIZE);\r\n\t \t\r\n\t }\r\n\t graphics.fillOval(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE, SNAKE_SIZE, SNAKE_SIZE);\r\n\t \r\n\t switch (tom.getDir()){\r\n\t\tcase 0: //up\r\n\t\t graphics.fillRect(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE+SNAKE_SIZE/2, SNAKE_SIZE, SNAKE_SIZE/2+2);\r\n\t\t graphics.setColor(WHITE);\r\n\t\t graphics.fillOval(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE+SNAKE_SIZE/3, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE+SNAKE_SIZE/2, SNAKE_SIZE/3, SNAKE_SIZE/3);\r\n\t\t graphics.fillOval(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE+SNAKE_SIZE/3*2, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE+SNAKE_SIZE/2, SNAKE_SIZE/3, SNAKE_SIZE/3);break;\r\n\t\tcase 1: //down\r\n\t\t graphics.fillRect(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE, SNAKE_SIZE, SNAKE_SIZE/2);\r\n\t\t graphics.setColor(WHITE);\r\n\t\t graphics.fillOval(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE+SNAKE_SIZE/3, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE+SNAKE_SIZE/4, SNAKE_SIZE/3, SNAKE_SIZE/3);\r\n\t\t graphics.fillOval(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE+SNAKE_SIZE/3*2, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE+SNAKE_SIZE/4, SNAKE_SIZE/3, SNAKE_SIZE/3);break;\r\n\t\tcase 2: //left\r\n\t\t graphics.fillRect(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE+SNAKE_SIZE/2, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE, SNAKE_SIZE/2, SNAKE_SIZE);\r\n\t\t graphics.setColor(WHITE);\r\n\t\t graphics.fillOval(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE+SNAKE_SIZE/3, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE+SNAKE_SIZE/4, SNAKE_SIZE/3, SNAKE_SIZE/3);\r\n\t\t graphics.fillOval(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE+SNAKE_SIZE/3*2, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE+SNAKE_SIZE/4, SNAKE_SIZE/3, SNAKE_SIZE/3);break;\r\n\t\tcase 3: //right\r\n\t\t graphics.fillRect(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE, SNAKE_SIZE/2, SNAKE_SIZE);\r\n\t\t graphics.setColor(WHITE);\r\n\t\t graphics.fillOval(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE+SNAKE_SIZE/3, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE+SNAKE_SIZE/4, SNAKE_SIZE/3, SNAKE_SIZE/3);\r\n\t\t graphics.fillOval(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE+SNAKE_SIZE/3*2, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE+SNAKE_SIZE/4, SNAKE_SIZE/3, SNAKE_SIZE/3);break;\r\n\t\t } \r\n\t \r\n\t graphics.setColor(RED);\r\n\t graphics.fillOval(apple.x*SNAKE_SIZE-1, apple.y*SNAKE_SIZE-1, SNAKE_SIZE+2, SNAKE_SIZE+2);\r\n\t graphics.setColor(BLACK);\r\n\t graphics.setStroke(new BasicStroke(2));\r\n\t graphics.drawLine(apple.x*SNAKE_SIZE+SNAKE_SIZE/2, apple.y*SNAKE_SIZE+SNAKE_SIZE/4, apple.x*SNAKE_SIZE+SNAKE_SIZE/3, apple.y*SNAKE_SIZE-3);\r\n\t \r\n\t if (!game) {\r\n\t \tgraphics.setColor(DIMSCREEN);\r\n\t \tgraphics.fillRect(0, 0, 607, 607);\r\n\t \tgraphics.setColor(RED);\r\n\t \tgraphics.setFont(new Font(\"TimesRoman\", Font.BOLD, 50));\r\n\t \tif(Game.status()) { //Igra je bila zakljucena\r\n\t \t\tgraphics.drawString(\"GAME OVER\", 150, 260);\r\n\t \t\tgraphics.drawString(\"CTRL-P to restart\", 110, 320);\r\n\t \t}\r\n\t \telse if(Game.firstTime) { //Zacetni prikaz drugacen kot za navadno pavzo\r\n\t\t\t\tgraphics.drawString(\"Arrow keys to move\", 80, 260);\r\n\t\t \tgraphics.drawString(\"CTRL-P to start/pause\", 55, 320);\r\n\t \t}\r\n\t \telse \r\n\t \t\tgraphics.drawString(\"PAUSED\", 200, 300);\r\n\t }\t \r\n\t}",
"public void paint(Graphics g)\n\t{\n\t\t// Clear the window.\n\t\tg.drawImage(background, 0, 0, 800, 600, this);\n\t\t\n\t\tfor(int i = 0; i < logs.length; i++)\n\t\t{\n\t\t\t// Tell the balls to draw themselves.\n\t\t\tlogs[i].draw(g, i, log);\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < carsRight.length; i++)\n\t\t{\n\t\t\t// Tell the balls to draw themselves.\n\t\t\tcarsRight[i].drawRight(g, i, carRight);\n\t\t}\n\t\tfor(int i = 0; i < carsLeft.length; i++)\n\t\t{\n\t\t\t// Tell the balls to draw themselves.\n\t\t\tcarsLeft[i].drawRight(g, i, carLeft);\n\t\t}\n\t\t// Tell the balls to draw themselves.\n\t\tfroggy.draw(g, frog);\n\t\t\n\t\tg.drawString(\"Number of Lives Left: \" + (3 - lossCount), 650, 40);\n\t\tg.drawString(\"Number of Wins: \" + (winCount) + \"/3\", 450, 40);\n\t\tif((3 - lossCount) == 0)\n\t\t{\n\t\t\tg.drawImage(background, 0, 0, 800, 600, this);\n\t\t\tg.setFont(new Font(\"Serif\", Font.BOLD, 50));\n\t\t\tg.setColor(Color.black);\n\t\t\tg.drawString(\"YOU LOSE\", 275, 300);\n\t\t}\n\n\t\tif(winCount == 3)\n\t\t{\n\t\t\tg.drawImage(background, 0, 0, 800, 600, this);\n\t\t\tg.setFont(new Font(\"Serif\", Font.BOLD, 50));\n\t\t\tg.setColor(Color.blue);\n\t\t\tg.drawString(\"YOU WIN\", 275, 300);\n\t\t}\n\t}",
"@Override\n public void draw(GraphicsContext gc) {\n gc.setFill(getFillColor());\n gc.setStroke(getStrokeColor());\n gc.setLineWidth(getStrokeWidth());\n gc.fillRect(getX1(), getY1(), getX2() - getX1(), getX2() - getX1());\n gc.strokeRect(getX1(), getY1(), getX2() - getX1(), getX2() - getX1());\n }",
"public void move()\n {\n xPosition = xPosition + xSpeed;\n yPosition = yPosition + ySpeed;\n draw();\n if (xPosition >= rightBound - diameter)\n {\n xSpeed = -(xSpeed);\n\n }\n else\n {\n }\n if (xPosition <= leftBound)\n {\n xSpeed = -(xSpeed);\n\n }\n else\n {\n }\n if (yPosition <= upBound)\n {\n ySpeed = -(ySpeed);\n\n }\n else\n {\n }\n if (yPosition >= lowBound - diameter)\n {\n ySpeed = -(ySpeed);\n\n }\n else \n {\n }\n\n }",
"public void paint(Graphics g) {\r\n\t\t\tDimension d = getSize();\r\n\t\t\tGraphics2D g2d = (Graphics2D) g;\r\n\t\t\tg2d.setColor(Color.lightGray);\r\n\t\t\tg2d.fillRect(0, 0, d.width, d.height);\r\n\t\t\tg2d.setColor(Color.black);\r\n\t\t\tg2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\r\n\t\t\t\t\tRenderingHints.VALUE_ANTIALIAS_ON);\r\n\t\t\tg2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,\r\n\t\t\t\t\tRenderingHints.VALUE_TEXT_ANTIALIAS_OFF);\r\n\t\t\t// g2d.setFont(new Font(\"Times New Roman\", Font.PLAIN, 14));\r\n\t\t\tg2d.setFont(new Font(\"Times New Roman\", Font.BOLD, 14));\r\n\t\t\tint[] xs = { 2, 5, 5, 2 };\r\n\t\t\tint[] ys = { 5, 5, 69, 69 };\r\n\t\t\tg2d.drawPolyline(xs, ys, 4);\r\n\t\t\tg2d.setColor(Color.blue);\r\n\t\t\tg2d.drawString(\"Start\", xs[1] + 10, ys[1] + 7);\r\n\t\t\tg2d.setColor(Color.black);\r\n\t\t\tif (this.enabled == ((int) Math.pow(2, 4)) - 1)\r\n\t\t\t\tg2d.setColor(new Color(0, 127, 0));\r\n\t\t\tg2d.setColor(Color.blue);\r\n\t\t\tg2d.drawString(\"Finish\", xs[2] + 10, ys[2] + 3);\r\n\t\t\tg2d.setColor(Color.black);\r\n\t\t\tfor (int i = 0; i < 3; i++)\r\n\t\t\t\tpaintSteps(g2d, xs[1] - 2, ys[1] + 15, i);\r\n\t\t}",
"public void draw(float delta) {\n\t\tcanvas.clear();\n\t\tcanvas.begin();\n\t\tcw = canvas.getWidth();\n\t\tch = canvas.getHeight();\n\t\tfor (int i = -5; i < 5; i++) {\n\t\t\tfor (int j = -5; j < 5; j++) {\n\t\t\t\tcanvas.draw(getBackground(dayTime), Color.WHITE, cw*i * 2, ch*j * 2, cw * 2, ch * 2);\n\t\t\t\tif(dayTime == 0 || dayTime == 1){\n\t\t\t\t\tcanvas.draw(getBackground(dayTime + 1), levelAlpha, cw*i * 2, ch*j * 2, cw * 2, ch * 2);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcanvas.end();\n\t\tif (walls.size() > 0){ \n\t\t\tfor (ArrayList<Float> wall : walls) canvas.drawPath(wall);\n\t\t}\n\t\tcanvas.begin();\n\t\t//\t\tcanvas.draw(background, Color.WHITE, 0, 0, canvas.getWidth(), canvas.getHeight());\n\t\t//canvas.draw(rocks, Color.WHITE, 0, 0, canvas.getWidth(), canvas.getHeight());\n\t\t\n\t\t\n//\t\tfor (ArrayList<Float> wall : walls) canvas.drawPath(wall);\n\t\t\n\t\tfor(Obstacle obj : objects) {\n\t\t\tobj.draw(canvas);\n\t\t}\n\t\t\n\n\t\tfor (int i = -5; i < 5; i++) {\n\t\t\tfor (int j = -5; j < 5; j++) {\n\t\t\t\tcanvas.draw(overlay, referenceC, cw*i, ch*j, cw, ch);\n\t\t\t}\n\t\t}\n\n\t\tcanvas.end();\n\n\t\tif (debug) {\n\t\t\tcanvas.beginDebug();\n\t\t\tfor(Obstacle obj : objects) {\n\t\t\t\tobj.drawDebug(canvas);\n\t\t\t}\n\t\t\tcanvas.endDebug();\n\t\t}\n\n\n\n//\t\t// Final message\n//\t\tif (complete && !failed) {\n//\t\t\tdisplayFont.setColor(Color.BLACK);\n//\t\t\tcanvas.begin(); // DO NOT SCALE\n//\t\t\tcanvas.drawTextCentered(\"VICTORY!\", displayFont, 0.0f);\n//\t\t\tcanvas.end();\n//\t\t\tdisplayFont.setColor(Color.BLACK);\n//\t\t} else if (failed) {\n//\t\t\tdisplayFont.setColor(Color.RED);\n//\t\t\tcanvas.begin(); // DO NOT SCALE\n//\t\t\tcanvas.drawTextCentered(\"FAILURE!\", displayFont, 0.0f);\n//\t\t\tcanvas.end();\n//\t\t}\n\t}",
"public void paint(Graphics g) {\n\t\t\tGraphics2D graphicSettings = (Graphics2D)g;\n\t\t\tAffineTransform identity = new AffineTransform();\n\t\t\t\n\t\t\t// draw a rectangle that is the size of the GameBoard\n\t\t\tgraphicSettings.setColor(Color.BLACK);\n\t\t\tgraphicSettings.fillRect(0, 0, getWidth(), getHeight());\n\t\t\t\n\t\t\t// set the rules of rendoring (Anti-Aliasing is important)\n\t\t\tgraphicSettings.setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\t\t\n\t\t\t// make the color white for the asteroids\n\t\t\tgraphicSettings.setPaint(Color.WHITE);\n\t\t\t\n\t\t\t// Cycle through all of the rock objects\n\t\t\tfor(Rock rock : rocks) {\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t// Draw the rock if its supposed to be onScreen\n\t\t\t\tif (rock.onScreen)\n\t\t\t\t{\n\t\t\t\t\t// the rock moves\n\t\t\t\t\trock.move(ship, GameBoard.blasters);\n\t\t\t\t\t\n\t\t\t\t\tgraphicSettings.draw(rock);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\n\t\t\t\n\t\t\t// press 'd'\n\t\t\tif (GameBoard.keyHeld == true && GameBoard.keyHeldCode == 68 )\n\t\t\t{\n\t\t\t\tship.increaseRotationAngle();\n\t\t\t\tSystem.out.println(\"angle Decreased to \" + ship.getRotationAngle());\n\t\t\t}\n\t\t\t\n\t\t\t// press 'a'\n\t\t\tif (GameBoard.keyHeld == true && GameBoard.keyHeldCode == 65 )\n\t\t\t{\n\t\t\t\tship.decreaseRotationAngle();\n\t\t\t\tSystem.out.println(\"angle Increased to \" + ship.getRotationAngle());\n\t\t\t}\n\t\t\t\n\t\t\t// press the 'w'\n\t\t\tif (GameBoard.keyHeld == true && GameBoard.keyHeldCode == 87 )\n\t\t\t{\n\t\t\t\tship.setMoveAngle(ship.getRotationAngle());\n\t\t\t\t\n\t\t\t\tship.IncreaseVelocityX(ship.MoveAngleX(ship.getMoveAngle())*.1);\n\t\t\t\tship.IncreaseVelocityY(ship.MoveAngleY(ship.getMoveAngle())*.1);\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"move speed Increased\");\n\t\t\t}\n\t\t\t\n\t\t\t// press the 's'\n\t\t\tif (GameBoard.keyHeld == true && GameBoard.keyHeldCode == 83 )\n\t\t\t{\n\t\t\t\tship.setMoveAngle(ship.getRotationAngle());\n\t\t\t\t\n\t\t\t\tship.IncreaseVelocityX(-ship.MoveAngleX(ship.getMoveAngle())*.1);\n\t\t\t\tship.IncreaseVelocityY(-ship.MoveAngleY(ship.getMoveAngle())*.1);\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"move speed decreased\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\n\t\t\tship.move();\n\t\t\t\n\t\t\t// set the origin to the screen so that the rotation of the ship occurs properly\n\t\t\tgraphicSettings.setTransform(identity);\n\t\t\t\n\t\t\t// move the ship\n\t\t\tgraphicSettings.translate(ship.getCenterX(), ship.getCenterY());\n\t\t\t\n\t\t\t// rotate the ship\n\t\t\tgraphicSettings.rotate(Math.toRadians(ship.getRotationAngle()));\n\t\t\t\n\t\t\t// keep the ship drawn on the screen\n\t\t\tgraphicSettings.draw(ship);\n\t\t\t\n\t\t\t// draw blasters\n\t\t\tfor(Blaster blasters: GameBoard.blasters)\n\t\t\t{\n\t\t\t\tblasters.move();\n\t\t\t\t\n\t\t\t\t// if the blasters not on screen don't calculate for the blaster\n\t\t\t\tif (blasters.onScreen)\n\t\t\t\t{\n\t\t\t\t\tgraphicSettings.setTransform(identity);\n\t\t\t\t\tgraphicSettings.translate(blasters.getCenterX(), blasters.getCenterY());\n\t\t\t\t\tgraphicSettings.draw(blasters);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}",
"public void draw(Graphics g) {\n\t\tGraphics2D g2d = (Graphics2D) g;\n\t\tg2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\n\t\t\t\tRenderingHints.VALUE_ANTIALIAS_ON);\n\n\t\tg2d.setColor(Color.WHITE);\n\t\tg2d.fillOval(this.x1 - 5, this.y1 - 10, 40, 30);\n\t\tg2d.setColor(Color.BLACK);\n\t\tg2d.drawOval(this.x1 - 5, this.y1 - 10, 40, 30);\n\t\t/*\n\t\t * drawXiaBiao(g, this.x1 + 5, this.y1 + this.y2 / 2 -\n\t\t * img.getHeight(observer) + 12, this.getNumber());\n\t\t */\n\n\t\tdrawXiaBiao(g, this.x1, this.y1 + this.y2 / 4, this.getNumber());\n\t}",
"public void moveAndDraw(Graphics window)\r\n {\r\n \t//draw a white ball at old ball location\r\n\t draw(window, Color.WHITE);\r\n\t setx(getx()+xSpeed);\r\n\t sety(gety()+ySpeed);\r\n\r\n\t\t\t//draw the ball at its new location\r\n\t this.draw(window);\r\n }",
"public void paint(Graphics g) {\n g.drawLine(120, 10, 120, 140);\n g.drawLine(120,140, 240, 140);\n g.drawString(\"120\",90,35 );\n g.drawString(\"100\",90,55 );\n g.drawString(\"80\",90,75 );\n g.drawString(\"60\",90,92 );\n g.drawString(\"40\",90,105 );\n g.drawString(\"20\",90,120 );\n g.drawString(\"0\",90,140 );\n g.drawString(\"Valerie\", 120,160);\n g.drawString(\"Hans\", 170,160);\n g.drawString(\"Jeroen\", 210,160);\n g.setColor(Color.red);\n g.fillRect(120, yvalerie, 40, hvalerie);\n g.drawRect(120, 100, 40, 40);\n g.setColor(Color.magenta);\n g.fillRect(160, yhans, 40, hhans);\n g.drawRect(160, 65, 40, 75);\n g.setColor(Color.orange);\n g.fillRect(200, yjeroen, 40, hjeroen);\n g.drawRect(200, 45, 40, 95);\n\n\n }",
"@Override \n\tpublic void update(Graphics g) \n\t{\n\t\tpaint(g); \n\t}",
"public void paint(Graphics g) {\n super.paint(g);\n update(g);\n }",
"public void moveAndDraw(Graphics window)\r\n {\n Color temp = getColor();\r\n\t\tdraw(window, Color.WHITE);\r\n\t\tsetPos(getXSpeed()+xSpeed, getYSpeed()+ySpeed);\r\n\t\tdraw(window, temp);\r\n\t\t//setY\r\n\r\n\t\t//draw the ball at its new location\r\n }",
"public void draw(Graphics g) {\n g.setColor(Color.red);\r\n //g2d.rotate(Math.toRadians(degree), restX-X_SIZE/2 , restY-Y_SIZE/2 );\r\n g.fillOval(deltaX-xSize/2, deltaY-ySize/2, xSize, ySize);\r\n //g2d.setTransform(old);\r\n }",
"@Override\n\tpublic void paint(Graphics oldg) {\n\t\tGraphics2D g = (Graphics2D) oldg;\n\t\t//设置画笔宽度\n\t\tBasicStroke stroke = new BasicStroke(10);\n\t\tg.setStroke(stroke);\n\t\t//画线\n\t\tLine2D line = new Line2D.Float(0,0,20,30);\n\t\tg.draw(line);\n\t\tline = new Line2D.Float(50,50,100,50);\n\t\tg.draw(line);\n\t\tline = new Line2D.Float(50,50,50,100);\n\t\tg.draw(line);\n\t\t//修改画笔宽度\n\t\tstroke = new BasicStroke(5);\n\t\tg.setStroke(stroke);\n\t\t//设置渐变色\n\t\tGradientPaint gt = new GradientPaint(0, 0, Color.green,50,30,Color.blue,true);\n\t\tg.setPaint((Paint)gt);\n\t\t//画矩形\n\t\tRectangle2D rect = new Rectangle2D.Float(80,80,40,40);\n\t\tg.draw(rect);//画框\n\t\trect = new Rectangle2D.Float(100,100,40,40);\n\t\tg.fill(rect);//区域填充\n\t\t//画椭圆\n\t\tEllipse2D ellipse = new Ellipse2D.Float(120, 120, 30, 40);\n\t\tg.draw(ellipse);\n\t\t//更改渐变色\n\t\tgt = new GradientPaint(0, 0, Color.red, 30, 30, Color.yellow,true);\n\t\tg.setPaint(gt);\n\t\t//填充椭圆区域\n\t\tellipse = new Ellipse2D.Float(140, 140, 20, 20);\n\t\tg.fill(ellipse);\n\t\t//画圆角矩形\n\t\tRoundRectangle2D roundRect = new RoundRectangle2D.Float(160,160,40,40,20,20);\n\t\tg.draw(roundRect);\n\t\t\n\t\troundRect = new RoundRectangle2D.Float(180,180,40,40,20,20);\n\t\tg.fill(roundRect);\n\t\t\n\t\t//画几何图形\n\t\tGeneralPath path = new GeneralPath();\n\t\tpath.moveTo(150, 0);\n\t\tpath.lineTo(160, 50);\n\t\tpath.curveTo(190, 200, 240, 150, 200, 100);\n\t\tg.fill(path);\n\t\t\n\t}",
"@Override\r\n public void paintComponent(Graphics brush)\r\n {\r\n super.paintComponent(brush);\r\n Graphics2D g2 = (Graphics2D) brush;\r\n /*Faster Rendering for mouse interaction*/\r\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\r\n g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);\r\n \r\n \r\n if (!wps.getWalls().isEmpty())\r\n {\r\n x = INITIAL_X;\r\n int wallNo = 1;\r\n /*Iterate for all Walls*/\r\n for (Wall wa : wps.getWalls())\r\n {\r\n /*Rectangle counters*/\r\n int rectangles = 0;\r\n for (int bays : wa.getBaysArray())\r\n {\r\n y = INITIAL_Y;\r\n for (int i=0; i<bays;i++)\r\n {\r\n brush.drawRect(x,y, SLEEPER_W, SLEEPER_H);\r\n brush.setFont(f);\r\n //Centering the Name\r\n brush.drawString(\"Wall \"+wallNo, x+28, y+16);\r\n y = y - SLEEPER_H;\r\n }\r\n \r\n /*Painting rectangles to simulate at entire bay*/\r\n if(wps.getWalls().get(wallNo-1).getArrayRect().size() != wps.getWalls().get(wallNo-1).getBaysArray().size())\r\n {\r\n wps.getWalls().get(wallNo-1).getArrayRect().add(new Rectangle(x,y+SLEEPER_H, SLEEPER_W, (SLEEPER_H*bays)));\r\n }\r\n g2.draw(wps.getWalls().get(wallNo-1).getArrayRect().get(rectangles));\r\n rectangles++;\r\n x = x + SLEEPER_W;\r\n \r\n }\r\n wallNo++;\r\n }\r\n }\r\n \r\n if (x> 830)\r\n {\r\n this.setPreferredSize(new Dimension(x+20,560));\r\n this.revalidate();\r\n }\r\n }",
"public void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\t\n\t\t//int width = getWidth();\n\t\t\n\t\tint steps = getWidth() / 15;\n\t\tint x1 = 0;\n\t\tint y1 = 0;\n\t\tint x2 = steps;\n\t\tint y2 = getHeight();\n\t\t\n\t\t// draw a line from the upper-left to the lower-right (right side)\n\t\tfor (int i = 0; i < 15; i++) {\n\t\t\tg.drawLine(x1, y1, x2, y2);\n\t\t\ty1 = y1 + steps;\n\t\t\tx2 = x2 + steps;\n\n\t\t}\n\t\t\n\t\tx1 = 0;\n\t\ty1 = getHeight();\n\t\tx2 = steps;\n\t\ty2 = 0;\n\t\t\n\t\t// draw a line from the lower-left to the top-right (left side)\n\t\tfor (int i = 0; i < 15; i++) {\n\t\t\tg.drawLine(x1, y1, x2, y2);\n\t\t\ty1 = y1 - steps;\n\t\t\tx2 = x2 + steps;\n\n\t\t}\n\t\t\n\t\tx1 = 0;\n\t\ty1 = getHeight();\n\t\tx2 = getWidth();\n\t\ty2 = getHeight() - steps;\n\t\t\n\t\t// draw a line from the lower-left to the top-right (right side)\n\t\tfor (int i = 0; i < 15; i++) {\n\t\t\tg.drawLine(x1, y1, x2, y2);\n\t\t\tx1 = x1 + steps;\n\t\t\ty2 = y2 - steps;\n\n\n\t\t}\n\t\t\n\t\tx1 = 0;\n\t\ty1 = 0;\n\t\tx2 = getWidth();\n\t\ty2 = steps;\n\t\t\n\t\t// draw a line from the upper-left to the lower-right (left side)\n\t\tfor (int i = 0; i < 15; i++) {\n\t\t\tg.drawLine(x1, y1, x2, y2);\n\t\t\tx1 = x1 + steps;\n\t\t\ty2 = y2 + steps;\n\n\n\t\t}\n\t\t\n\t}",
"public void draw(Graphics g) {\n g.setColor(needsHighlight() ? selectColor : Color.GRAY);\n setBbox(x1, y1, x2, y2);\n g.setLineDash(16, 6);\n if (x1 < x2 && y1 < y2) {\n g.drawRect(x1, y1, x2 - x1, y2 - y1);\n } else if (x1 > x2 && y1 < y2) {\n g.drawRect(x2, y1, x1 - x2, y2 - y1);\n } else if (x1 < x2 && y1 > y2) {\n g.drawRect(x1, y2, x2 - x1, y1 - y2);\n } else {\n g.drawRect(x2, y2, x1 - x2, y1 - y2);\n }\n g.setLineDash(0, 0);\n }",
"@Override\n public void update(Graphics g) {\n paint(g);\n }",
"public void tick(Canvas g) {\n //moves the ball according to its assigned speed\n b.numX = b.numX + b.xSpeed;\n b.numY = b.numY + b.ySpeed;\n //moves the computer paddle\n this.compY = this.compY + this.compSpeed;\n if ((compY >= BOX_HEIGHT - 200) || compY <= 200) {\n this.reverseCompSpeed();\n }\n //check if the ball hits the top or bottom of the screen\n if (hitSides()) b.reverseYSpeed();\n //check if the ball hits the user or computer paddles\n if (hitMyPaddle()) {\n b.reverseXSpeed();\n }\n if (hitCompPaddle()) {\n b.reverseXSpeed();\n }\n // Draw the ball in the correct position.\n this.drawBall(b.numX, b.numY, g);\n //Draw the paddles\n this.drawMyPaddle(this.touchedY, g);\n this.drawCompPaddle(this.compY, g);\n }",
"public void paint(Graphics g) \r\n\t{\n\t\tEllipse2D circle;\r\n\t\tGraphics2D g2 = (Graphics2D)g;\r\n\t\tRectangle2D player;\r\n\t\tplayer = new Rectangle2D.Double(playerX, playerY, 20, 20);\r\n\t\t//Updates player movement based on keys in the keys ArrayList\r\n\t\t//Key presses will update player's movement speed, not position\r\n\t\tif (keys.contains(KeyEvent.VK_LEFT)) {\r\n\t\t\tplayerdX -= 2;\r\n\t\t}\r\n\t\tif (keys.contains(KeyEvent.VK_RIGHT)) {\r\n\t\t\tplayerdX += 2;\r\n\t\t}\r\n\t\tif (keys.contains(KeyEvent.VK_UP)) {\r\n\t\t\tplayerdY -= 2;\r\n\t\t}\r\n\t\tif (keys.contains(KeyEvent.VK_DOWN)) {\r\n\t\t\tplayerdY += 2;\r\n\t\t}\r\n\t\tplayerX += playerdX;\r\n\t\tplayerY += playerdY;\r\n\t\t//Prevents the player from going off the screen\r\n\t\tif (playerY < 0) {\r\n\t\t\tplayerY = 0;\r\n\t\t\tplayerdY = 0;\r\n\t\t}\r\n\t\tif (playerY > this.getHeight() - 20) {\r\n\t\t\tplayerY = this.getHeight() - 20;\r\n\t\t\tplayerdY = 0;\r\n\t\t}\r\n\t\tif (playerX < 0) {\r\n\t\t\tplayerX = 0;\r\n\t\t\tplayerdX = 0;\r\n\t\t}\r\n\t\tif (playerX > this.getWidth() - 20) {\r\n\t\t\tplayerX = this.getWidth() - 20;\r\n\t\t\tplayerdX = 0;\r\n\t\t}\r\n\t\t//Adds \"friction\" to slow the player down over time\r\n\t\tif (Math.abs(playerdX) < 1) {\r\n\t\t\tplayerdX = 0;\r\n\t\t} else if (playerdX > 0) {\r\n\t\t\tplayerdX -= 1;\r\n\t\t} else if (playerdX < 0) {\r\n\t\t\tplayerdX += 1;\r\n\t\t}\r\n\t\tif (Math.abs(playerdY) < 1) {\r\n\t\t\tplayerdY = 0;\r\n\t\t} else if (playerdY > 0) {\r\n\t\t\tplayerdY -= 1;\r\n\t\t} else if (playerdY < 0) {\r\n\t\t\tplayerdY += 1;\r\n\t\t}\r\n\t\t\r\n\t\t//Document this...what's going on in each line?... there should be a comment for each line.\r\n\t\tfor(int count = 0;count < MAX_CIRCLES; count++)\r\n\t\t{\r\n\t\t\tBubble thisBubble = bubbles[count]; //finds the bubble in the list\r\n\t\t\tthisBubble.addY(); //update y by yvelocity\r\n\t\t\tthisBubble.addX(); //update x by xvelocity\r\n\t\t\t\r\n\t\t\tif(thisBubble.getY()>this.getHeight() - thisBubble.getSize() || thisBubble.getY() < 0) //if the circle's y is off the screen\r\n\t\t\t{\r\n\t\t\t\tthisBubble.setyVelocity(thisBubble.getyVelocity() * -1); //bounce\r\n\t\t\t}\r\n\t\t\tif(thisBubble.getX()>this.getWidth() - thisBubble.getSize() || thisBubble.getX() < 0) //if the circle's y is off the screen\r\n\t\t\t{\r\n\t\t\t\tthisBubble.setxVelocity(thisBubble.getxVelocity() * -1); //bounce\r\n\t\t\t}\r\n\t\t\tif (thisBubble.isGood()) { //if this bubble is \"good\"\r\n\t\t\t\tg2.setPaint(Color.green); //set the color to green\r\n\t\t\t} else {\r\n\t\t\t\tg2.setPaint(Color.red); //otherwise make it red\r\n\t\t\t}\r\n\t\t\tcircle = new Ellipse2D.Double(thisBubble.getX(), thisBubble.getY(), thisBubble.getSize(), thisBubble.getSize()); //generate the circle graphically\t\r\n\t\t\tif (circle.intersects(player)) { //If the bubble is touching the player\r\n\t\t\t\tscore += thisBubble.getScore(); //Add the bubbles score to the score\r\n\t\t\t\tif (score < 0) { //Avoid a negative score\r\n\t\t\t\t\tscore = 0;\r\n\t\t\t\t}\r\n\t\t\t\tthisBubble.reset(this.getWidth(), this.getHeight(), MAX_Y_VELOCITY, MAX_X_VELOCITY, MAX_SIZE, thisBubble.isGood());\t//Reset the bubble with new velocity and size\r\n\t\t\t}\r\n\t\t\tg2.fill(circle); //display the circle on the screen\r\n\t\t\tg2.setFont(new Font(\"Arial\", Font.PLAIN, 12));\r\n\t\t\tg2.setPaint(Color.black);\r\n\t\t\tg2.drawString(Integer.toString(thisBubble.getScore()), thisBubble.getX() + thisBubble.getSize() / 3, thisBubble.getY()); //Labels the bubble with its score\r\n\t\t}\r\n\t\tg2.setPaint(Color.orange);\r\n\t\tg2.fill(player); //Fills in the player\r\n\t\tg2.setFont(new Font(\"Arial\", Font.BOLD, 35));\r\n\t\tg2.setPaint(Color.black);\r\n\t\tg2.drawString(\"Score: \" + score, 25, 40); //Displays the score\r\n\t}",
"@Override\n public void draw(Graphics g, Dimension drawArea) {\n int widthUnit = drawArea.width / 6;\n int heightUnit = drawArea.height / 6;\n\n // Makes the lines thicker\n Graphics2D g2d = (Graphics2D)g;\n g2d.setStroke(new BasicStroke(3));\n\n // draws a circle and two lines\n g2d.drawOval(widthUnit, heightUnit, widthUnit * 4, heightUnit * 4);\n g2d.drawLine(widthUnit, heightUnit, 5 * widthUnit, 5 * heightUnit);\n g2d.drawLine(5 * widthUnit, heightUnit, widthUnit, 5 * heightUnit);\n }",
"public void paint(Graphics g) {\n g.setColor(Color.black);\n g.drawLine(50, 120, 300, 120);\n g.drawRect(50, 150, 250, 100 );\n g.drawRoundRect(50,275,250,100, 25, 25);\n g.setColor(Color.magenta);\n g.fillRect(350, 150, 250, 100);\n g.setColor(Color.black);\n g.drawArc(350, 150, 250, 100, 90, 360);\n g.setColor(Color.magenta);\n g.fillArc(350,275, 250, 100, 90 , 360 );\n g.setColor(Color.black);\n g.drawArc(650, 150, 250, 100, 90, 360);\n g.setColor(Color.magenta);\n g.fillArc(650,150, 250, 100, 0 , 45 );\n g.setColor(Color.black);\n g.drawArc(725, 275, 100, 100, 90, 360);\n }",
"public void paint(Graphics g) {\n\tupdate(g);\n }",
"@Override\r\n\tpublic void paint(Graphics g) {\n\t\tswitch(this.getAngle()){\r\n\t\tcase 0 :\r\n\t\t\tg.fillRect(this.getX()+(this.getTaille()/4), this.getY(), this.getTaille()/2, this.getTaille());\r\n\t\t\tbreak;\r\n\t\tcase 90:\r\n\t\t\tg.fillRect(this.getX(), this.getY()+(this.getTaille()/4), this.getTaille(), this.getTaille()/2);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}",
"public void update(Graphics g) {\r\n paint(g);\r\n }",
"@Override\n\tprotected void paintComponent(Graphics g) {\n\t\tpainter.setColorFractions(new float[]{0.0f, 1.0f});\n\t\tpainter.setColors(new Color[]{LIGHT_BLUE, BLUE});\n\t\tfinal Rectangle r = new Rectangle(0, 0, getWidth(), getHeight());\n\t\tpainter.paint((Graphics2D) g, r);\n\n\t\t// Draw a darker line as bottom border\n\t\tg.setColor(DARK_BLUE);\n\t\tg.drawLine(0, getHeight() - 1, getWidth(), getHeight() - 1);\n\n\t\tsuper.paintComponent(g);\n\t}",
"public void update(Graphics g){\n paint (g);\r\n \r\n }",
"public void paint(Graphics g) {\n\n \t\n \tsuper.paint(g);\n \n \tg.drawRect(0, 0, \n \t\t getSize().width - 1,\n \t\t getSize().height - 1); \t\n \t\n\n }",
"public void update(Graphics g) {\n paint(g);\n }",
"public void update(Graphics g) {\n paint(g);\n }",
"public void paint (Graphics g) {\n super.paint(g);\n // g.setColor(Color.BLUE);\n // g.drawRect(0, 0, 100, 100);\n }",
"public void draw(Graphics2D g) {\n g.setStroke(stroke);\n g.setColor(EditorCommonSettings.getGridColor());\n g.draw(minorLinesPath);\n g.setColor(EditorCommonSettings.getGridColor().darker());\n g.draw(majorLinesPath);\n }",
"public void update(Graphics g){\n paint(g);\n }",
"public void paintComponent(Graphics g)\n {\n\t Graphics2D g2 = (Graphics2D) g;\n\t // draw start point and end point\n\t g2.setColor(START_COLOR);\n\t Rectangle myStart = new Rectangle(START_X + maze.getEntryLoc().getCol()*BOX_WIDTH+INSET, START_Y + maze.getEntryLoc().getRow()*BOX_HEIGHT+INSET, BOX_WIDTH-INSET*TWO_SIDE, BOX_HEIGHT-INSET*TWO_SIDE);\n\t g2.fill(myStart);\n\t g2.setColor(END_COLOR);\n\t Rectangle myEnd = new Rectangle(START_X + maze.getExitLoc().getCol()*BOX_WIDTH+INSET, START_Y + maze.getExitLoc().getRow()*BOX_HEIGHT+INSET, BOX_WIDTH-INSET*TWO_SIDE, BOX_HEIGHT-INSET*TWO_SIDE);\n\t g2.fill(myEnd);\n\t //draw walls and borders\n\t g2.setColor(WALL_COLOR);\n\t Rectangle myWall;\n\t for (int i = FOR_INIT; i < maze.numRows(); i++){\n\t\t for (int j = FOR_INIT; j < maze.numCols(); j++){\n\t\t\t if (maze.hasWallAt(new MazeCoord(i,j))){\n\t\t\t\t myWall= new Rectangle(START_X + j*BOX_WIDTH, START_Y + i*BOX_HEIGHT, BOX_WIDTH, BOX_HEIGHT);\n\t\t\t\t g2.fill(myWall);\n\t\t\t }\n\t\t }\n\t }\n\t myWall = new Rectangle(START_X,START_Y,maze.numCols()*BOX_WIDTH,maze.numRows()*BOX_HEIGHT);\n\t g2.draw(myWall);\n\t //draw path use linkedlist \n\t g2.setColor(PATH_COLOR);\n\t double x1,y1,x2,y2;\n\t ListIterator<MazeCoord> iter = maze.getPath().listIterator(); \n\t MazeCoord temp = null;\n\t if (iter.hasNext()){\n\t\t temp = iter.next();\n\t }\n\t //use iteration to get the value\n\t while (iter.hasNext()){\n\t\t x1 = START_X + temp.getCol() * BOX_WIDTH + BOX_WIDTH / TWO_SIDE;\n\t\t y1 = START_Y + temp.getRow() * BOX_HEIGHT + BOX_HEIGHT / TWO_SIDE;\n\t\t temp = iter.next();\n\t\t x2 = START_X + temp.getCol() * BOX_WIDTH + BOX_WIDTH / TWO_SIDE;\n\t\t y2 = START_Y + temp.getRow() * BOX_HEIGHT + BOX_HEIGHT / TWO_SIDE;\n\t\t Line2D.Double myPath = new Line2D.Double(x1, y1, x2, y2);\t \n\t\t g2.draw(myPath);\n\t }\t\t\t \n }",
"public void paintComponent(Graphics g) { \r\n\t\tsuper.paintComponent(g);\r\n \t//draw text\r\n \tg.setColor(Color.WHITE);\r\n g.drawString(\"Controls: wasd or arrow keys changes snake direction; ENTER = restart game.\", 50, 20);\r\n g.drawString(\"Score: \" + foodCollected, 50, 35);\r\n \t//draw boundary\r\n \tg.setColor(Color.LIGHT_GRAY);\r\n \tg.drawRect(50, 50, 500, 500);\r\n \t\r\n if(gameOver == false) {\r\n\t //draw snake\r\n\t g.setColor(Color.GREEN);\r\n\t for(int i = 0; i < snake.getLength(); i++) {\r\n\t \tSnakeSegment ts = snake.getSegment(i);\r\n\t \tg.fillRect(ts.getxPos(), ts.getyPos(), 10, 10);\r\n\t }\r\n\t //draw food\r\n\t \tg.setColor(Color.RED);\r\n\t for(int i = 0; i < foodList.size(); i++) {\r\n\t \tg.fillOval(foodList.get(i).getxPos(), foodList.get(i).getyPos(), 10, 10);\r\n\t }\r\n\t timer.start();\r\n }\r\n else {\r\n \t//snake turns yellow when it bites itself\r\n \tif(snake.getLength() > 0) {\r\n \t\tg.setColor(Color.YELLOW);\r\n \t for(int i = 0; i < snake.getLength(); i++) {\r\n \t \tSnakeSegment ts = snake.getSegment(i);\r\n \t \tg.fillRect(ts.getxPos(), ts.getyPos(), 10, 10);\r\n \t }\r\n \t}\r\n \t//draw food\r\n \tg.setColor(Color.RED);\r\n\t for(int i = 0; i < foodList.size(); i++) {\r\n\t \tg.fillOval(foodList.get(i).getxPos(), foodList.get(i).getyPos(), 10, 10);\r\n\t }\r\n\t //print game over message\r\n\t g.setColor(Color.WHITE);\r\n \tg.drawString(\"GAME OVER\", 270, 270);\r\n \ttimer.stop();\r\n }\r\n\t}",
"@Override\r\n \tpublic void paintComponent(Graphics g) {\r\n \t\tsuper.paintComponent(g);\r\n \t\tdrawSnake(g);\r\n \t}",
"@Override\n public void paintComponent(Graphics g) {\n Graphics2D g2 = (Graphics2D) g;\n g2.setStroke(new BasicStroke(WALL));\n int[] xs = {BORDER + WALL, BORDER, BORDER, BORDER + (width-1)*SIZE + WALL};\n int[] ys = {BORDER, BORDER, BORDER + height*SIZE, BORDER + height*SIZE};\n g2.drawPolyline(xs, ys, 4);\n int[] xs2 = {BORDER + SIZE - WALL, BORDER + width*SIZE, BORDER + width*SIZE, BORDER + width*SIZE - WALL};\n g2.drawPolyline(xs2, ys, 4);\n // code that was used to create the intermediate images\n// g2.setColor(Color.LIGHT_GRAY);\n// for(int i = 1; i < height; i++) {\n// int where = BORDER + i*SIZE;\n// g2.drawLine(BORDER + WALL, where, BORDER + width * SIZE - WALL, where);\n// }\n// for(int i = 1; i < width; i++) {\n// int where = BORDER + i*SIZE;\n// g2.drawLine(where, BORDER + WALL, where, BORDER + height * SIZE - WALL);\n// }\n g2.setColor(Color.blue);\n for(Wall wall : walls) {\n drawWall(g2, wall);\n }\n }",
"@Override\r\n public void paint(Graphics g){\n if(ch.moveCountY == 1 && flag == false){ \r\n flag = true;\r\n animator = new Thread(this);\r\n animator.start();\r\n }\r\n \r\n super.paint(g);\r\n \r\n Graphics2D g2d = (Graphics2D) g;\r\n \r\n if(ch.v == 330){\r\n ch.mainC = img;\r\n }\r\n \r\n if(pos2 < -15){\r\n // g2d.drawImage(img_bg2 , pos2, 0 , null);\r\n b.setBounds(pos2, 0, 995, 610);\r\n \r\n }\r\n \r\n if(pos <= -15){\r\n b.setBounds(pos2, 0, 995, 610);\r\n //g2d.drawImage(img_bg2 , pos2, 0 , null);\r\n \r\n }\r\n \r\n \r\n a.setBounds(pos, 0, 995, 610);\r\n g2d.drawImage(ch.getImage() , ch.getMoveX() , ch.v , null);\r\n g2d.drawImage(obs1.getImage() , obs1.getX() , obs1.getY() , null);\r\n g2d.drawImage(obs2.pic2 , obs2.getX() , obs2.getY() , null);\r\n \r\n }",
"public void move() {\n if (Math.abs(rx + vx) + radius > 1.0) bounceOffVerticalWall();\n if (Math.abs(ry + vy) + radius > 1.0) bounceOffHorizontalWall();\n rx = rx + vx;\n ry = ry + vy;\n }",
"public void repaint (Graphics g){\r\n g.drawLine(10,10,150,150); // Draw a line from (10,10) to (150,150)\r\n \r\n g.setColor(Color.darkGray);\r\n g.fillRect( 0 , 0 , \r\n 4000 , 4000 ); \r\n \r\n g.setColor(Color.BLACK);\r\n \r\n BufferedImage image;\r\n \r\n for(int h = 0; h < 16; h++){\r\n for(int w =0; w< 16; w++){\r\n //g.drawImage(image.getSubimage(w *16, h*16, 16, 16), 0+(32*w),0 +(32*h), 32,32,this);\r\n g.drawRect(w *32, h*32, 32, 32);\r\n \r\n if(coord.xSelected >=0){\r\n g.setColor(Color.WHITE);\r\n g.drawRect(coord.xSelected *32, coord.ySelected *32, 32, 32);\r\n g.setColor(Color.BLACK);\r\n }\r\n }\r\n }\r\n \r\n \r\n }",
"@Override\n\tpublic void draw(GraphicsContext gc) {\n\t\tif(directY != 0){\n\t\t\tif(directX == 1){\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),150, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),900, 150, 150, 150);\n\t\t\t}else if(directX == -1){\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),450, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),1050, 150, 150, 150);\n\t\t\t}else{\n\t\t\t\tif(lastDirectX == 1){\n\t\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),150, 0, 150, 150);\n\t\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),900, 150, 150, 150);\n\t\t\t\t}else{\n\t\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),450, 0, 150, 150);\n\t\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),1050, 150, 150, 150);\n\t\t\t\t}\n\t\t\t}\n\t\t}else if(isMove){\n\t\t\tif(directX == 1){\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),150, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),((Main.getInstance().getCurrentFrame() % 2) + 1) * 150, 150, 150, 150);\n\t\t\t}else if(directX == -1){\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),450, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),((Main.getInstance().getCurrentFrame() % 2) + 4)* 150, 150, 150, 150);\n\t\t\t}\n\t\t}else{\n\t\t\tif(lastDirectX == 1){\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),150, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),0, 150, 150, 150);\n\t\t\t}else{\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),450, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),450, 150, 150, 150);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tgc.drawImage(hanzoBody, x-55, y-50);\n\t\tgc.drawImage(hanzoLeg, x-55, y-50);\n\t\t//gc.drawImage(hanzoFX, x-55, y-50);\n\t\t\n\t}",
"public void draw(Graphics g) {\n\t\tif (isRoom()) {\n\t\t\tg.setColor(Color.LIGHT_GRAY);\n\t\t\tg.fillRect(column * CELL_WIDTH, row * CELL_HEIGHT, CELL_WIDTH, CELL_HEIGHT);\n\t\t}\n\t\telse if (isDoorway()) {\n\t\t\tg.setColor(Color.LIGHT_GRAY);\n\t\t\tg.fillRect(column * CELL_WIDTH, row * CELL_HEIGHT, CELL_WIDTH, CELL_HEIGHT);\n\t\t\tif (direction == DoorDirection.UP) {\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.fillRect(column * CELL_WIDTH, row * CELL_HEIGHT, CELL_WIDTH, SMALL_RECT);\n\t\t\t}\n\t\t\telse if (direction == DoorDirection.RIGHT) {\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.fillRect(column * CELL_WIDTH + CELL_WIDTH - SMALL_RECT, row * CELL_HEIGHT, SMALL_RECT, CELL_HEIGHT);\n\t\t\t}\n\t\t\telse if (direction == DoorDirection.DOWN) {\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.fillRect(column * CELL_WIDTH, row * CELL_HEIGHT + CELL_HEIGHT - SMALL_RECT, CELL_WIDTH, 5);\n\t\t\t}\n\t\t\telse if (direction == DoorDirection.LEFT) {\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.fillRect(column * CELL_WIDTH, row * CELL_HEIGHT, SMALL_RECT, CELL_HEIGHT);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tg.setFont(new Font(\"SansSerif\", Font.BOLD, 12));\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.drawString(roomName, column * CELL_WIDTH, row * CELL_HEIGHT);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tg.setColor(Color.BLACK);\n\t\t\tg.drawRect(column * CELL_WIDTH, row * CELL_HEIGHT, CELL_WIDTH, CELL_HEIGHT);\n\t\t}\n\t}",
"@Override\n protected void onDraw(Canvas canvas) {\n\n // Draw the board\n backgCalculating.draw(canvas, displayArea, centralBall);\n\n // Delay\n try {\n Thread.sleep(30);\n } catch (InterruptedException e) {}\n\n invalidate(); // Force a re-draw\n }",
"public void draw(Graphics g) {\r\n\t\tg.setColor(Color.RED);\r\n\t\tg.fillRect(xcoord * width, ycoord * height, width, height);\r\n\t}",
"private void drawBox(Graphics2D g)\n\t{\n\t\t// Resize values with magic numbers\n\t\tLine2D.Double line = new Line2D.Double();\n\t\tStroke drawingStroke = new BasicStroke(3, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND);\t\t\n\t\tg.setStroke(drawingStroke);\n\t\tmidBoxWidth = super.getWidth() - 234;\n\t\tmidBoxHeight = super.getHeight() - 55;\n\t\tORIGIN_X = MID_BOX_X + AXIS_X_GAP;\n\t\tORIGIN_Y = MID_BOX_Y + midBoxHeight - AXIS_X_GAP;\n\n\t\t/**\n\t\t * Super hard coded for now \n\t\t */\n\n\t\t// White background\n\t\tRectangle2D middle = new Rectangle2D.Double(MID_BOX_X, MID_BOX_Y, midBoxWidth, midBoxHeight);\t\t\n\t\tg.setColor(Color.white);\n\t\tg.fill(middle);\n\t\t// Drawing borders\n\t\tg.setColor(Color.black);\n\t\t// Top\n\t\tline.setLine(MID_BOX_X, MID_BOX_Y, MID_BOX_X + midBoxWidth, MID_BOX_Y);\n\t\tg.draw(line);\n\t\t// Left\n\t\tline.setLine(MID_BOX_X, MID_BOX_Y, MID_BOX_X, MID_BOX_Y + midBoxHeight);\n\t\tg.draw(line);\n\t\t// Bottom\n\t\tline.setLine(MID_BOX_X, MID_BOX_Y + midBoxHeight, MID_BOX_X + midBoxWidth, MID_BOX_Y + midBoxHeight);\n\t\tg.draw(line);\n\t\t// Right\n\t\tline.setLine(MID_BOX_X + midBoxWidth, MID_BOX_Y, MID_BOX_X + midBoxWidth, MID_BOX_Y + midBoxHeight);\n\t\tg.draw(line);\n\n\t\t// Drawing Axes\n\t\tdrawingStroke = new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND);\n\t\tg.setStroke(drawingStroke);\n\t\t// Y-axis\n\t\tline.setLine(MID_BOX_X + AXIS_X_GAP, MID_BOX_Y + AXIS_Y_GAP/2, MID_BOX_X + AXIS_X_GAP, MID_BOX_Y + midBoxHeight - AXIS_Y_GAP/2);\n\t\tg.draw(line);\t\n\n\t\t// Arrow Tip\n\t\tline.setLine(MID_BOX_X + AXIS_X_GAP, MID_BOX_Y + AXIS_Y_GAP/2, MID_BOX_X + AXIS_X_GAP + 10, MID_BOX_Y + AXIS_Y_GAP/2 + 15);\n\t\tg.draw(line);\t\t\t\n\t\tline.setLine(MID_BOX_X + AXIS_X_GAP, MID_BOX_Y + AXIS_Y_GAP/2, MID_BOX_X + AXIS_X_GAP - 10, MID_BOX_Y + AXIS_Y_GAP/2 + 15);\n\t\tg.draw(line);\t\n\n\t\t// X-axis\n\t\tline.setLine(MID_BOX_X + AXIS_Y_GAP/2, MID_BOX_Y + midBoxHeight - AXIS_X_GAP, MID_BOX_X + midBoxWidth - AXIS_Y_GAP/2, MID_BOX_Y + midBoxHeight - AXIS_X_GAP);\n\t\tg.draw(line);\n\t\t// Arrow tip\n\t\tline.setLine(MID_BOX_X + midBoxWidth - AXIS_Y_GAP/2, MID_BOX_Y + midBoxHeight - AXIS_X_GAP, MID_BOX_X + midBoxWidth - AXIS_Y_GAP/2 - 15, MID_BOX_Y + midBoxHeight - AXIS_X_GAP + 10);\n\t\tg.draw(line);\t\t\t\n\t\tline.setLine(MID_BOX_X + midBoxWidth - AXIS_Y_GAP/2, MID_BOX_Y + midBoxHeight - AXIS_X_GAP, MID_BOX_X + midBoxWidth - AXIS_Y_GAP/2 - 15, MID_BOX_Y + midBoxHeight - AXIS_X_GAP - 10);\n\t\tg.draw(line);\t\n\n\t\tnew BasicStroke(2, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND);\n\t\tg.setStroke(drawingStroke);\n\n\t\t// Axis labels\n\t\tg.setColor(Color.black);\n\t\tg.rotate(Math.toRadians(-90));\n\n\t\t// Magic numbers - even I don't know what they are but they somehow centres the text\n\t\tswitch (graph) {\n\t\tcase ARRIVAL: {\n\t\t\tg.drawString(\"Total arrivals per interval (cars)\", -midBoxHeight/2 - 80, MID_BOX_X + 16);\n\t\t\tbreak;\n\t\t}\n\t\tcase MAX_QUEUE_TIME: {\n\t\t\tg.drawString(\"Max Queue Time (seconds)\", -midBoxHeight/2 - 70, MID_BOX_X + 16);\n\t\t\tbreak;\n\t\t}\n\t\tcase AVG_QUEUE_TIME: {\n\t\t\tg.drawString(\"Average Queue Time (seconds)\", -midBoxHeight/2 - 80, MID_BOX_X + 16);\n\t\t\tbreak;\n\t\t}\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\tg.rotate(Math.toRadians(90));\n\t\tg.drawString(\"Time Interval (minutes)\", MID_BOX_X + midBoxWidth/2 - 50, MID_BOX_Y + midBoxHeight - AXIS_Y_GAP/2 + 18);\n\t}",
"public void paintComponent(Graphics g) {\n\t\tdrawMaze(g);\n\t\tif (maze.getPath().size() > 0) {\n\t\t\tdrawPath(g);\n\t\t}\n\t}",
"public void paint(Graphics g) {\n\t\tupdate(g);\n\t}",
"@Override\n\t\t\tpublic void mouseDragged(MouseEvent e) {\n\t\t\t\tif (draw == 1) {\n\t\t\t\t\twall[e.getX()/30][e.getY()/30] = 1;\n\t\t\t\t}else {\n\t\t\t\t\twall[e.getX()/30][e.getY()/30] = 0;\n\t\t\t\t}\n\t\t\t\trepaint();\n\t\t\t}",
"public void paint(Graphics g){\n\t\tg.setColor(getBackground());\n\t\tg.fillRect(0,0, Frame_Size_X, Frame_Size_Y);\n\t\t\n\t\tif (!gameStarted){\n\t\t\tstartNewGame(g);\n\t\t\t\n\t\t} \n\t\tif (gameStarted && !gameOver){\n\t\t\tupdateObjects(g);\n\t\t}\n\t\tif (gameOver){\n\t\t\tdrawGameOverBanner(g);\n\t\t}\n\t}",
"@Override\n public void paint(Graphics g) {\n\n g2d = (Graphics2D) g; //Casting the Grahpics object to an Graphics2D object.\n\n /**\n * Setting RenderingHints.\n */\n g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);\n g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);\n g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_DEFAULT);\n\n /**\n * Initializing of board.\n * Call to method drawGrid().\n * Drawing all Grids from 0 to 15 in a for()-loop.\n */\n paintGrid();\n\n /**\n * Call to method drawNumbers().\n * Writing numbers in field for easier recognition.\n */\n paintNumbers();\n\n /**\n * Checks if a game is initialized.\n * If it is, it will paint the tokens, if not, it won't paint the tokens.\n */\n if(game != null) {\n\n game.paint(g2d);\n }\n }",
"public void paint(Graphics g){\n\t\tsuper.paint(g);\n\t\tGraphics2D g2d= (Graphics2D) g;\n\t\tStroke stroke= new BasicStroke(2.0f);// width = 3\n\t\tg2d.setStroke(stroke);\n\n\t\tg2d.setColor(Color.ORANGE);\n\t\tg2d.drawLine(50, 75, 80, 100);\n\t\tg2d.drawLine(113, 100, 149, 100);\n\t\tg2d.drawLine(182, 100, 209, 135);\n\t\tg2d.drawLine(225, 166, 193, 200);\n\t\tg2d.drawLine(160, 215, 132, 230);\n\t\tg2d.drawLine(242, 150, 280, 110);\n\t\tg2d.drawLine(312, 110, 349, 60);\n\n\t}",
"private void draw() {\n\n // Current generation (y-position on canvas)\n int generation = 0;\n\n // Looping while still on canvas\n while (generation < canvasHeight / CELL_SIZE) {\n\n // Next generation\n cells = generate(cells);\n\n // Drawing\n for (int i = 0; i < cells.length; i++) {\n gc.setFill(colors[cells[i]]);\n gc.fillRect(i * CELL_SIZE, generation * CELL_SIZE, CELL_SIZE, CELL_SIZE);\n }\n\n // Next line..\n generation++;\n }\n }",
"public void drawMe(Graphics g){\r\n\t\t\tg.setColor(color);\r\n\t\t\tg.fillRect(x, y, sizeX, sizeY);\r\n\t\t}",
"@Override\n public void onSizeChanged(int w, int h, int oldW, int oldH) {\n // Set the movement bounds for the ball\n displayArea.setDisp(w-1, h-1);\n if (!isInitBackground) {\n isInitBackground = true;\n backgCalculating = new BackCalculating(0, 0, displayArea.xMax, displayArea.yMax, Color.BLACK, Color.YELLOW);\n }\n }",
"public void updateCoords() {\n line.setLine(parent.getFullBounds().getCenter2D(), child.getFullBounds().getCenter2D());\n Rectangle2D r = line.getBounds2D();\n // adding 1 to the width and height prevents the bounds from\n // being marked as empty and is much faster than createStrokedShape()\n setBounds(r.getX(), r.getY(), r.getWidth() + 1, r.getHeight() + 1);\n invalidatePaint();\n }",
"public void paintComponent(final Graphics g) {\n drawWall(g);\n drawDots(g);\n drawGhosts(g);\n drawPacman(g);\n }",
"protected void paintComponent(Graphics g) {\n \t\n \tif(refreshRate != 0)//if FPS is set to 0, this will simulate a 'frozen' state\n \tt.setDelay(1000 / refreshRate);//creates desired FPS\n \t//if-else statement used for incrementing and resetting repaintCount, and used for calculating the FPS which is displaye dby fpsPanel.java\n \tif (repaintCount++ > 0) {\n long curTime = System.currentTimeMillis();\n long elapseTime = curTime - startTime;\n rate = ((double)(repaintCount - 1)) / (elapseTime / 1000.0);\n } else {\n startTime = System.currentTimeMillis();\n }\n super.paintComponent(g);\n g.setColor(backColor);//backcolor controls the color of the background\n g.fillRect(0, 0, getWidth(), getHeight());\n g.setColor(objectColor);//objectColor controls the color of the shape\n if(oval)\n \tg.drawArc(x, y, width, height, 0, 360);\n if (rect)\n \tg.drawRect(x, y, width, height);\n if (rectround){\n RoundRectangle2D roundedRectangle = new RoundRectangle2D.Float(x, y, width, height,5,5);\n ((Graphics2D) g).draw(roundedRectangle); \n }\n g.setColor(textColor);//textColor controls the color of the text\n g.setFont(f);\n if (small)\n \tg.drawString(\"(\"+x+\",\"+y+\")\",x-15,y+13);//positioned properly for all small sizes\n if(medium)\n \tg.drawString(\"(\"+x+\",\"+y+\")\",x+1,y+16);//coordinates position properaly for all medium sizes\n if(large)\n \tg.drawString(\"(\"+x+\",\"+y+\")\",x+50,y+25);//coordinates position properly for all large sizes\n \t\n }",
"public void updatePhysics() {\n ball.setLayoutX(ball.getLayoutX() + velX);\n ball.setLayoutY(ball.getLayoutY() - velY);\n\n velY += accelY;\n velX += accelX;\n }",
"@Override\n public void paint(Graphics g) {\n super.paint(g);\n\n // update the text area lenght\n updateTextAreaLenght();\n\n // update tha number of bars\n updateBars();\n \n // draw internal borders\n drawBorders(g);\n\n // draw the text area\n drawTextArea(g);\n\n // draw the content area\n drawContentArea(g);\n\n // draw bars\n drawBars(g);\n\n }",
"@Override\n\tpublic void draw(Graphics g) {\n\t\tg.setColor(Color.BLACK);\n for(int j = 0 ; j < 3 ; j++) {\n \tg.drawRect(0,50*j, 120, 50);\n }\n \n if(super.selected) {\n\t\t\tg.fillRect(super.north_port.x, super.north_port.y, super.connection_port_width ,super.connection_port_width);\n\t g.fillRect(super.east_port.x-super.connection_port_width, super.east_port.y, super.connection_port_width,super.connection_port_width);\n\t g.fillRect(super.south_port.x, super.south_port.y-super.connection_port_width ,super.connection_port_width,super.connection_port_width);\n\t g.fillRect(super.west_port.x, super.west_port.y, super.connection_port_width,super.connection_port_width);\n\t\t}\n \t\n \n }",
"public void update(Canvas canvas) {\n GraphicsContext graphics = canvas.getGraphicsContext2D();\n graphics.setFill(this.color);\n graphics.fillRect(getX(), getY(), getWidth(), getHeight());\n }",
"public void draw(Graphics g){\n g.setColor(c);\n if (this.fill){\n g.fillOval(x, y, width, height);\n }else{\n g.drawOval(x, y, width, height);\n }\n }"
] | [
"0.66984504",
"0.63943875",
"0.6270109",
"0.6184592",
"0.6128112",
"0.6080358",
"0.60629785",
"0.60395104",
"0.6031943",
"0.60168964",
"0.59995806",
"0.5995882",
"0.59663576",
"0.595764",
"0.5950069",
"0.59463346",
"0.58824706",
"0.58730906",
"0.58362997",
"0.58262944",
"0.5814994",
"0.5793293",
"0.5792805",
"0.57891214",
"0.57561713",
"0.57402426",
"0.5739225",
"0.5737696",
"0.57333183",
"0.57313854",
"0.572936",
"0.5719572",
"0.5715883",
"0.5709",
"0.57028437",
"0.57025546",
"0.5696989",
"0.5692784",
"0.56851584",
"0.56839997",
"0.56789136",
"0.5677868",
"0.56712997",
"0.56668186",
"0.5664829",
"0.56644666",
"0.5658573",
"0.56543916",
"0.5650968",
"0.56446415",
"0.56365585",
"0.5633606",
"0.5632013",
"0.5631237",
"0.56302357",
"0.56149954",
"0.56127703",
"0.5610731",
"0.5607932",
"0.55865556",
"0.5583235",
"0.5579456",
"0.55757356",
"0.5557391",
"0.55568695",
"0.5556786",
"0.55555767",
"0.55555767",
"0.5547278",
"0.55467033",
"0.5540027",
"0.55391",
"0.5526158",
"0.55209875",
"0.55149364",
"0.55141544",
"0.55133253",
"0.55123436",
"0.54995847",
"0.54936266",
"0.5492745",
"0.5486151",
"0.54852897",
"0.54834807",
"0.5481323",
"0.54797757",
"0.5478474",
"0.54768145",
"0.5475756",
"0.54753184",
"0.5474093",
"0.54734117",
"0.5466954",
"0.5466227",
"0.5465893",
"0.54652256",
"0.5463346",
"0.54632324",
"0.54614884",
"0.5460971"
] | 0.6795869 | 0 |
Generates a PCM array then returns it This array needs to fill up the whole PcmArray | public byte[] genTone(){
//Ramp time is the denominator of the total sample.
//This really should be a ration of samples per cycle.
//do this math to get a smooth sound
int rampTime = 2000;
//Fill the sample array.
for (int i = 0; i < numSamples; ++i) {
//Here is the brains of the operation. Don't axe me what it does
//But it pretty much unrolls a sin curve into a wave
sample[i] = Math.sin(freqOfTone * 2 * Math.PI * i / (sampleRate));
}
// convert to 16 bit pcm sound array
// assumes the sample buffer is normalized.
int PCMindex = 0;
int i;
//The ramp. It is how many samples will be ramped up.
int ramp = numSamples/rampTime;
/**
* Ramp up the tone to avoid clicks
*/
for (i = 0; i< ramp; ++i) {
//Grab the values from the sample array for each i
double dVal = sample[i];
//Ramp down the value.
//Convert a -1.0 - 1.0 double into a short. 32767 should be contant for max 16 bit signed int value
final short val = (short) ((dVal * 32767 * i/ramp));
//Put the value into the PCM byte array
//Break the short into a byte using a bit mask.
//First bit mask adds the second byte. Second bit mask adds the second byte.
PcmArray[PCMindex++] = (byte) (val & 0x00ff);
PcmArray[PCMindex++] = (byte) ((val & 0xff00) >>> 8);
}
for (i = ramp; i< numSamples - ramp; ++i) {
//Grab the values from the sample array for each i
double dVal = sample[i];
//Convert a -1.0 - 1.0 double into a short. 32767 should be contant for max 16 bit signed int value
final short val = (short) ((dVal * 32767));
//Put the value into the PCM byte array
//Break the short into a byte using a bit mask.
//First bit mask adds the second byte. Second bit mask adds the second byte.
PcmArray[PCMindex++] = (byte) (val & 0x00ff);
PcmArray[PCMindex++] = (byte) ((val & 0xff00) >>> 8);
}
for (i = (int) (numSamples - ramp); i< numSamples; ++i) {
//Grab the values from the sample array for each i
double dVal = sample[i];
//Convert a -1.0 - 1.0 double into a short. 32767 should be contant for max 16 bit signed int value
//Ramp down the values
final short val = (short) ((dVal * 32767 * (numSamples-i)/ramp ));
//Put the value into the PCM byte array
//Break the short into a byte using a bit mask.
//First bit mask adds the second byte. Second bit mask adds the second byte.
PcmArray[PCMindex++] = (byte) (val & 0x00ff);
PcmArray[PCMindex++] = (byte) ((val & 0xff00) >>> 8);
}
return PcmArray;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void compose() {\n \tnumSamples = duration * sampleRate;\n \tsample = new double[numSamples];\n \tgeneratedSnd = new byte[2 * numSamples];\t\t\n\t}",
"private void compose() {\n \tnumSamples = duration * sampleRate;\n \tsample = new double[numSamples];\n \tgeneratedSnd = new byte[2 * numSamples];\n\t}",
"public short[] updateAudioTxBuf()\n\t{\n\t\taudioTxBufLength = sampleBit * (bitLength1+bitLength2+bitLength3)+352*2;\t\n\t\tshort[] audioTxBuf = new short[audioTxBufLength];\n\t\tcounter_k = 0;\n\n\t\tinitEncoderTxData();\n\n\t\tfor(counter_i=0;counter_i<bitLength1;counter_i++)\n\t\t{\n\t\t\t\tfor(counter_j=0;counter_j<sampleBit;counter_j++)\n\t\t\t\t{\n\t\t\t\t\taudioTxBuf[counter_k] = highLevel[counter_j];\t//Samsung, Xiaomi(MIUI)\n//\t\t\t\t\taudioTxBuf[counter_k] = lowLevel[counter_j];\t//else\n\t\t\t\t\tcounter_k++;\n\t\t\t\t}\n\t\t\t\n\t\t}\n\t\tfor (int i = 1; i < 352; i++) {\n\t\t\taudioTxBuf[counter_k+i]= (short)0;\t\n\t\t}\n\t\tcounter_k=counter_k+351;\n\t\tfor(counter_i=0;counter_i<bitLength2;counter_i++)\n\t\t{\n\t\t\t\tfor(counter_j=0;counter_j<sampleBit;counter_j++)\n\t\t\t\t{\n\t\t\t\t\taudioTxBuf[counter_k] = highLevel[counter_j];\t//Samsung, Xiaomi(MIUI)\n//\t\t\t\t\taudioTxBuf[counter_k] = lowLevel[counter_j];\t//else\n\t\t\t\t\tcounter_k++;\n\t\t\t\t}\t\t\t\n\t\t\t\n\t\t}\t\n\t\tfor (int i = 1; i < 352; i++) {\n\t\t\taudioTxBuf[counter_k+i]= (short) 0;\t\t\t\n\t\t}\n\t\tcounter_k=counter_k+351;\n\t\tfor(counter_i=0;counter_i<bitLength3;counter_i++)\n\t\t{\n\t\t\t\tfor(counter_j=0;counter_j<sampleBit;counter_j++)\n\t\t\t\t{\n\t\t\t\t\taudioTxBuf[counter_k] = highLevel[counter_j];\t//Samsung, Xiaomi(MIUI)\n//\t\t\t\t\taudioTxBuf[counter_k] = lowLevel[counter_j];\t//else\n\t\t\t\t\tcounter_k++;\n\t\t\t\t}\n\t\t\t\n\t\t}\n\t\tcounter_k=0;\n\t\treturn audioTxBuf;\n\t}",
"AudioProcessor[] mo25073a();",
"public byte[] getPermutation() {\n byte[] p = new byte[48];\n for(int i = 0; i < 24; i+=3) {\n int k = co[i/3];\n if(k == 0) {}\n else if(k == 1) {k=2;}\n else {k=1;}\n int r = cp[i/3] * 3 + k;\n p[i] = (byte) r;\n p[i+1] = (byte) (((r-r/3*3+1)%3)+r/3*3);\n p[i+2] = (byte) (((r-r/3*3+2)%3)+r/3*3);\n }\n for(int i = 24; i < 48; i +=2) {\n int r = ep[(i-24)/2]*2 + eo[(i-24)/2];\n p[i] = (byte) (r + 24);\n p[i+1] = (byte) ((r-r/2*2+1)%2 + r/2*2 + 24);\n }\n return p;\n }",
"public static double[] rawFreqCreator(){\n\t\tfinal int EXTERNAL_BUFFER_SIZE = 2097152;\n\t\t//128000\n\n\t\t//Get the location of the sound file\n\t\tFile soundFile = new File(\"MoodyLoop.wav\");\n\n\t\t//Load the Audio Input Stream from the file \n\t\tAudioInputStream audioInputStream = null;\n\t\ttry {\n\t\t\taudioInputStream = AudioSystem.getAudioInputStream(soundFile);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\t//Get Audio Format information\n\t\tAudioFormat audioFormat = audioInputStream.getFormat();\n\n\t\t//Handle opening the line\n\t\tSourceDataLine\tline = null;\n\t\tDataLine.Info\tinfo = new DataLine.Info(SourceDataLine.class, audioFormat);\n\t\ttry {\n\t\t\tline = (SourceDataLine) AudioSystem.getLine(info);\n\t\t\tline.open(audioFormat);\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\t//Start playing the sound\n\t\t//line.start();\n\n\t\t//Write the sound to an array of bytes\n\t\tint nBytesRead = 0;\n\t\tbyte[]\tabData = new byte[EXTERNAL_BUFFER_SIZE];\n\t\twhile (nBytesRead != -1) {\n\t\t\ttry {\n\t\t \t\tnBytesRead = audioInputStream.read(abData, 0, abData.length);\n\n\t\t\t} catch (IOException e) {\n\t\t \t\te.printStackTrace();\n\t\t\t}\n\t\t\tif (nBytesRead >= 0) {\n\t\t \t\tint nBytesWritten = line.write(abData, 0, nBytesRead);\n\t\t\t}\n\n\t\t}\n\n\t\t//close the line \n\t\tline.drain();\n\t\tline.close();\n\t\t\n\t\t//Calculate the sample rate\n\t\tfloat sample_rate = audioFormat.getSampleRate();\n\t\tSystem.out.println(\"sample rate = \"+sample_rate);\n\n\t\t//Calculate the length in seconds of the sample\n\t\tfloat T = audioInputStream.getFrameLength() / audioFormat.getFrameRate();\n\t\tSystem.out.println(\"T = \"+T+ \" (length of sampled sound in seconds)\");\n\n\t\t//Calculate the number of equidistant points in time\n\t\tint n = (int) (T * sample_rate) / 2;\n\t\tSystem.out.println(\"n = \"+n+\" (number of equidistant points)\");\n\n\t\t//Calculate the time interval at each equidistant point\n\t\tfloat h = (T / n);\n\t\tSystem.out.println(\"h = \"+h+\" (length of each time interval in second)\");\n\t\t\n\t\t//Determine the original Endian encoding format\n\t\tboolean isBigEndian = audioFormat.isBigEndian();\n\n\t\t//this array is the value of the signal at time i*h\n\t\tint x[] = new int[n];\n\n\t\t//convert each pair of byte values from the byte array to an Endian value\n\t\tfor (int i = 0; i < n*2; i+=2) {\n\t\t\tint b1 = abData[i];\n\t\t\tint b2 = abData[i + 1];\n\t\t\tif (b1 < 0) b1 += 0x100;\n\t\t\tif (b2 < 0) b2 += 0x100;\n\t\t\tint value;\n\n\t\t\t//Store the data based on the original Endian encoding format\n\t\t\tif (!isBigEndian) value = (b1 << 8) + b2;\n\t\t\telse value = b1 + (b2 << 8);\n\t\t\tx[i/2] = value;\n\t\t\t\n\t\t}\n\t\t\n\t\t//do the DFT for each value of x sub j and store as f sub j\n\t\tdouble f[] = new double[n/2];\n\t\tfor (int j = 0; j < n/2; j++) {\n\n\t\t\tdouble firstSummation = 0;\n\t\t\tdouble secondSummation = 0;\n\n\t\t\tfor (int k = 0; k < n; k++) {\n\t\t \t\tdouble twoPInjk = ((2 * Math.PI) / n) * (j * k);\n\t\t \t\tfirstSummation += x[k] * Math.cos(twoPInjk);\n\t\t \t\tsecondSummation += x[k] * Math.sin(twoPInjk);\n\t\t\t}\n\n\t\t f[j] = Math.abs( Math.sqrt(Math.pow(firstSummation,2) + \n\t\t Math.pow(secondSummation,2)) );\n\n\t\t\tdouble amplitude = 2 * f[j]/n;\n\t\t\tdouble frequency = j * h / T * sample_rate;\n\t\t\tSystem.out.println(\"frequency = \"+frequency+\", amp = \"+amplitude);\n\t\t}\n\t\tSystem.out.println(\"DONE\");\n\t\treturn f;\n\t\t\n\t}",
"public MHKEncryption_Array(){\n\t\t\tBigInteger wgenerator = new BigInteger(\"2\");\n\t\t\twsum = BigInteger.ZERO;\n\t\t\tfor(int i = 0;i < 640;i++){\n\t\t\t\twgenerator = wgenerator.multiply(new BigInteger(\"2\")).subtract(BigInteger.ONE); \n\t\t\t\tw[i] = wgenerator;\n\t\t\t\twsum = wsum.add(wgenerator);\n\t\t\t}\n\t}",
"public void pushData() {\n\t\t\tFile file = new File(Environment.getExternalStorageDirectory()\n\t\t\t\t\t.getAbsolutePath()\n\t\t\t\t\t+ \"/reverseme.pcm\");\n\t\t\t// Get the length of the audio stored in the file (16 bit so 2 bytes\n\t\t\t// per short)\n\t\t\t// and create a short array to store the recorded audio.\n\t\t\tint audioLength = (int) (file.length() / 2);\n\t\t\taudio = new short[audioLength];\n\n\t\t\ttry {\n\t\t\t\t// Create a DataInputStream to read the audio data back from the\n\t\t\t\t// saved file.\n\t\t\t\tInputStream is = new FileInputStream(file);\n\t\t\t\tBufferedInputStream bis = new BufferedInputStream(is);\n\t\t\t\tDataInputStream dis = new DataInputStream(bis);\n\n\t\t\t\t// Read the file into the music array.\n\t\t\t\tint i = 0;\n\t\t\t\twhile (dis.available() > 0) {\n\t\t\t\t\taudio[i] = dis.readShort();\n\t\t\t\t\ti++;\n\t\t\t\t}\n\n\t\t\t\t// Close the input streams.\n\t\t\t\tdis.close();\n\n\t\t\t} catch (Throwable t) {\n\t\t\t\tLog.e(\"AudioTrack\", \"Playback Failed\");\n\t\t\t}\n\t\t}",
"public void getNextRawSamples( double[] rawBuffer );",
"float[] getMVPMatrix();",
"@Override\n\tpublic float[] read() {\n\t\tif (buffer.getSampleCount() != 1) {\n\t\t\tbuffer.changeSampleCount(1, true);\n\t\t\trawBytes = new byte[buffer.getByteArrayBufferSize(format)];\n\t\t}\n\t\tfloat[] samples = new float[buffer.getChannelCount()];\n\t\tif (play) {\n\t\t\tmRead();\n\t\t\tfor (int i = 0; i < buffer.getChannelCount(); i++) {\n\t\t\t\tsamples[i] = buffer.getChannel(i)[0];\n\t\t\t}\n\t\t}\n\t\treturn samples;\n\t}",
"public static Bitrate[] m11050g() {\n return new Bitrate[]{PCM};\n }",
"private static int[] createArray() {\n\t\trnd = new Random();\r\n\t\trandomArray = new int[8];\r\n\t\tfor (int i = 0; i < 8; i++) {\r\n\t\t\trandomArray[i] = rnd.nextInt(45);\r\n\t\t}\r\n\t\treturn randomArray;\r\n\t}",
"public List<E> getNextArray()\r\n/* */ {\r\n/* */ List<E> permutationResult;\r\n/* */ \r\n/* */ \r\n/* */ List<E> permutationResult;\r\n/* */ \r\n/* 123 */ if (this.permOrder.hasNextPermutaions()) {\r\n/* 124 */ this.currPermutationArray = this.permOrder.nextPermutation();\r\n/* 125 */ permutationResult = applyPermutation();\r\n/* */ } else {\r\n/* 127 */ permutationResult = null;\r\n/* */ }\r\n/* */ \r\n/* 130 */ return permutationResult;\r\n/* */ }",
"public void initEncoderTxData()\n\t{\n\t\tfor(counter_i=0;counter_i<sampleBit;counter_i++)\n\t\t{\n\t\t\thighLevel[counter_i] = (short) (audioAM * (-Math.sin(Math.PI * counter_i /sampleBit * 2)));\n\t\t\tlowLevel[counter_i] = (short) (audioAM * (Math.sin(Math.PI * counter_i /sampleBit * 2)));\n\t\t}\n\t}",
"public short[] get_data() {\n short[] tmp = new short[60];\n for (int index0 = 0; index0 < numElements_data(0); index0++) {\n tmp[index0] = getElement_data(index0);\n }\n return tmp;\n }",
"private byte[] encodeFos( byte[] pcm, int offset, int len )\n {\n byte[] ret = new byte[len / 4];\n\n for ( int i = 0; i < ( len / 2 ); i++ )\n {\n //int curSample = pcm[i] & 0xFF;\n int curSample = pcm[i];\n\n int delta = curSample - predictedSample;\n\n boolean isSignBit = false;\n\n if ( delta < 0 )\n {\n delta = -delta;\n isSignBit = true;\n }\n\n int code = 4 * delta / ADPCMDecoder.step_table[index];\n\n if ( code > 7 )\n code = 7;\n\n delta = ( ADPCMDecoder.step_table[index] * code ) / 4 +\n ADPCMDecoder.step_table[index] / 8;\n\n if ( isSignBit )\n delta = -delta;\n\n predictedSample += delta;\n\n if ( predictedSample > 32767 )\n predictedSample = 32767;\n else if ( predictedSample < -32768 )\n predictedSample = -32768;\n\n index += ADPCMDecoder.index_adjust[code];\n\n if ( index < 0 )\n index = 0;\n else if ( index > 88 )\n index = 88;\n\n if ( i % 2 != 0 )\n ret[i >> 1] |= code | ( isSignBit ? 8 : 0 );\n else\n ret[i >> 1] = (byte)( ( code | ( isSignBit ? 8 : 0 ) ) << 4 );\n\n }\n\n return ret;\n }",
"public EnemigoGenerico[] cargaBichos()\n {\n \n //Crear la bicheria (hardCoded)\n CoordCasilla[] origen={new CoordCasilla(1,1), new CoordCasilla(18,1), new CoordCasilla(14,8), new CoordCasilla(17,17), new CoordCasilla(13,5)};\n CoordCasilla[] destino={new CoordCasilla(6,18) , new CoordCasilla(1,1), new CoordCasilla(1,8), new CoordCasilla(18,1) , new CoordCasilla(13,18) };\n \n \n DefBicho pelota=this.atlasBicheria.get(\"Pelota Maligna\");\n EnemigoGenerico bichos[]=new EnemigoGenerico[origen.length];\n \n for(int x=0;x<origen.length;x++)\n {\n List<CoordCasilla> camino = this.getCamino(origen[x], destino[x]);\n Gdx.app.log(\"CAMINO:\", \"DESDE (\"+origen[x].x+\",\"+origen[x].y+\") HASTA ( \"+destino[x].x+\",\"+destino[x].y+\")\");\n for (CoordCasilla cc : camino)\n Gdx.app.log(\"CASILLA.\", String.format(\"(%2d ,%2d )\", cc.x, cc.y));\n \n \n bichos[x] = new EnemigoGenerico(pelota, this.mapaAnimaciones.get(pelota.archivoAnim), pelota.pv, pelota.tasaRegen, pelota.velocidad, camino, pelota.distanciaPercepcion, pelota.ataques);\n }\n \n return bichos;\n }",
"Array createArray();",
"private byte[] PPMfile() {\n StringBuilder Finald = new StringBuilder();\n Finald.append(\"P6\");\n Finald.append(\"\\n\");\n Finald.append(width);\n Finald.append(\" \");\n Finald.append(height);\n Finald.append(\"\\n\");\n Finald.append(255);\n Finald.append(\"\\n\");\n for (int x = 0; x < height; ++x) {\n for (int y = 0; y < width; ++y) {\n char auxe = (char) FinalR[x][y];\n Finald.append(auxe);\n auxe = (char) FinalG[x][y];\n Finald.append(auxe);\n auxe = (char) FinalB[x][y];\n Finald.append(auxe);\n }\n }\n String Finaldes = Finald.toString();\n return Finaldes.getBytes();\n }",
"public static void init_memory_rp(Memory[] memory_rp, int[] ncm_per_cycle_rp){\n\t\tfor(int i=0;i<48;i++){\n\t\t\tmemory_rp[i].address=i;\n\t\t\tmemory_rp[i].content=\"S\";\n\t\t\tmemory_rp[i].ncm=0;\n\t\t\tmemory_rp[i].priority=0;\n\t\t}\n\t\tfor(int i=0;i<100;i++){\n\t\t\tncm_per_cycle_rp[i]=0;\n\t\t}\n\t}",
"public List<Float> calculatePitches(){\n\t\tList<Integer> res = new ArrayList<Integer>();\n\t\tint size = data.size();\n\t\tint maxAmp = 0;\n\t\tint startPos = 0;\n\t\t// get the first pitch in the basic period\n\t\tfor (int i = 0; i < BASE_FRAGMENT; i ++){\n\t\t\tif (maxAmp < data.get(i)){\n\t\t\t\tmaxAmp = data.get(i);\n\t\t\t\t// set this position as the start position\n\t\t\t\tstartPos = i;\n\t\t\t}\n\t\t}\n\t\tLog.v(\"startPos\", String.valueOf(startPos));\n\t\t// find every pitch in all the fragments\n\t\tint pos = startPos + OFFSET; // set current position\n\t\tint posAmpMax;\n\t\twhile(startPos < 1000){\n\t\t\tif(data.get(pos) > 0) { // only read the positive data\n\n\t\t\t\tposAmpMax = 0;\n\t\t\t\tmaxAmp = 0;\n\t\t\t\t// access to all the data in this fragment\n\t\t\t\twhile (pos < startPos + BASE_FRAGMENT) {\n\t\t\t\t\t// find the pitch and mark this position\n\t\t\t\t\tif (maxAmp < data.get(pos)) {\n\t\t\t\t\t\tmaxAmp = data.get(pos);\n\t\t\t\t\t\tposAmpMax = pos;\n\t\t\t\t\t}\n\t\t\t\t\tpos++;\n\t\t\t\t}\n\t\t\t\t// add pitch position into the list\n\t\t\t\tpitchPositions.add(posAmpMax);\n\t\t\t\tres.add(posAmpMax);\n\t\t\t\t// update the start position and the current position\n\t\t\t\tstartPos = posAmpMax;\n\t\t\t\tpos = startPos + OFFSET;\n\t\t\t}else{\n\t\t\t\tpos ++;\n\t\t\t}\n\t\t}\n\n\t\t// calculate all periods and add them into list\n\t\tfor(int i = 0; i < pitchPositions.size() - 1; i++){\n\t\t\tfloat period = (float)(pitchPositions.get(i+1) - pitchPositions.get(i));\n\t\t\tT.add(period);\n\t\t\tpitches.add(PeriodToPitch(period));\n\t\t}\n\t\tpitchPositions.clear();\n\t\treturn pitches;\n\t}",
"private float[] generateParticleTimeStamps(float totalTime)\n {\n float timeStamps[] = new float[mEmitRate * 2];\n for ( int i = 0; i < mEmitRate * 2; i +=2 )\n {\n timeStamps[i] = totalTime + mRandom.nextFloat();\n timeStamps[i + 1] = 0;\n }\n return timeStamps;\n }",
"public DataChunk getNext() throws RecoverableInputProblem\n\t{\n\t data.setTo( base + amplitude * Math.random());\n\t ++counter;\n\t return data;\n\t}",
"@Override\n\t\tpublic void run() {\n\t\t\tshort samples[] = new short[Player.BUFFER_SIZE];\n\t\t\tshort silenceSamples[] = new short[Player.BUFFER_SIZE];\n\t\t\t\n\t\t\twhile (!this.stopped) {\n\t\t\t\t\t\t\n\t\t\t\tif (this.paused == false) {\n\t\t\t\t\t\n\t\t\t\t\tthis.currentModule.advanceByOneTick();\n\t\t\t\t\tswitch(this.interpolationMode) {\n\t\t\t\t\tcase Player.INTERPOLATION_MODE_LINEAR:\n\t\t\t\t\t\tthis.tickSamples = this.tickMixer.renderTickLinearInterpolation(this.currentModule);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Player.INTERPOLATION_MODE_CUBIC:\n\t\t\t\t\t\tthis.tickSamples = this.tickMixer.renderTickCubicInterpolation(this.currentModule);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tthis.tickSamples = this.tickMixer.renderTickNoInterpolation(this.currentModule);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tthis.bufferPosition = 0;\n\t\t\t\t\t\n\t\t\t\t\tif (this.fading == false) { \n\t\t\t\t\t\tfor (int s=0;s<this.tickSamples;s++) {\n\t\t\t\t\t\t\t//floating point version\n\t\t\t\t\t\t\t//samples[this.samplesPosition++] = FixedPoint.FP_TO_FLOAT(this.tickMixer.leftSamples[this.bufferPosition]);\n\t\t\t\t\t\t\t//samples[this.samplesPosition++] = FixedPoint.FP_TO_FLOAT(this.tickMixer.rightSamples[this.bufferPosition]);\n\t\t\t\t\t\t\tsamples[this.samplesPosition++] = (short)(this.tickMixer.leftSamples[this.bufferPosition] << 1);\n\t\t\t\t\t\t\tsamples[this.samplesPosition++] = (short)(this.tickMixer.rightSamples[this.bufferPosition] << 1);\n\t\t\t\t\t\t\tthis.bufferPosition++;\n\t\t\t\t\t\t\tif (this.samplesPosition >= Player.BUFFER_SIZE) {\n\t\t\t\t\t\t\t\t// write to device\n\t\t\t\t\t\t\t\tdevice.writeSamples(samples, 0, samples.length);\n\t\t\t\t\t\t\t\tthis.samplesPosition = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (int s=0;s<this.tickSamples;s++) {\n\t\t\t\t\t\t\tif (this.fadeSamples <= 0) {\n\t\t\t\t\t\t\t\tif (this.fadeStatus == ModulePlayer.FADE_STATUS_FADE_OUT) {\n\t\t\t\t\t\t\t\t\t// start fade in\n\t\t\t\t\t\t\t\t\tthis.currentModule = this.nextModule;\n\t\t\t\t\t\t\t\t\tthis.fadeStatus = ModulePlayer.FADE_STATUS_FADE_IN;\n\t\t\t\t\t\t\t\t\tthis.fadeSamples = this.fadeInSamples;\n\t\t\t\t\t\t\t\t\tthis.fadeFactorDelta = (1.0f - this.fadeFactor) / (float)this.fadeSamples;\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (this.fadeStatus == ModulePlayer.FADE_STATUS_FADE_IN) {\n\t\t\t\t\t\t\t\t\t// stop fading\n\t\t\t\t\t\t\t\t\tthis.fading = false;\n\t\t\t\t\t\t\t\t\tthis.fadeStatus = ModulePlayer.FADE_STATUS_FADE_DONE;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//floating point version\n\t\t\t\t\t\t\t//samples[this.samplesPosition++] = FixedPoint.FP_TO_FLOAT(this.tickMixer.leftSamples[this.bufferPosition]) * this.fadeFactor;\n\t\t\t\t\t\t\t//samples[this.samplesPosition++] = FixedPoint.FP_TO_FLOAT(this.tickMixer.rightSamples[this.bufferPosition]) * this.fadeFactor;\n\t\t\t\t\t\t\tsamples[this.samplesPosition++] = (short)(((this.tickMixer.leftSamples[this.bufferPosition] * this.fadeFactorFP) >> FixedPoint.FP_SHIFT) << 1);\n\t\t\t\t\t\t\tsamples[this.samplesPosition++] = (short)(((this.tickMixer.rightSamples[this.bufferPosition] * this.fadeFactorFP) >> FixedPoint.FP_SHIFT) << 1);\n\t\t\t\t\t\t\tthis.fadeFactor += this.fadeFactorDelta;\n\t\t\t\t\t\t\tthis.fadeFactorFP = FixedPoint.FLOAT_TO_FP(this.fadeFactor);\n\t\t\t\t\t\t\tthis.fadeSamples--;\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tthis.bufferPosition++;\n\t\t\t\t\t\t\tif (this.samplesPosition >= Player.BUFFER_SIZE) {\n\t\t\t\t\t\t\t\t// write to device\n\t\t\t\t\t\t\t\tdevice.writeSamples(samples, 0, samples.length);\n\t\t\t\t\t\t\t\tthis.samplesPosition = 0;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// write silence to device\n\t\t\t\t\tdevice.writeSamples(silenceSamples, 0, samples.length);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tdevice.dispose();\n\t\t}",
"public Integer[] createPermutation() {\n Integer[] value = createSortedArray();\n\n for (int c = 0; c < 5; c++) {\n for (int i = 0; i<value.length; i++) {\n int j = (int)(Math.random()*value.length);\n int temp = value[i];\n value[i] = value[j];\n value[j] = temp;\n }\n }\n \n return value;\n }",
"private static ArrayList<double[]> createSamples(double p, int n) {\n\t\tArrayList<double[]> result = new ArrayList<double[]>();\n\t\tint cutoff = (int) Math.round(n * p);\n\t\tfor (int i = 0; i < cutoff; i++) result.add(new double[] {1});\n\t\tfor (int i = cutoff; i < n; i++) result.add(new double[] {0});\n\t\treturn result;\n\t}",
"public double getNextRawSample();",
"private long searchSPSandPPS()\n {\n ByteBuffer[] inputBuffers = encoder.getInputBuffers();\n ByteBuffer[] outputBuffers = encoder.getOutputBuffers();\n BufferInfo info = new BufferInfo();\n byte[] csd = new byte[128];\n int len = 0;\n int p = 4;\n int q = 4;\n long elapsed = 0;\n long now = timestamp();\n\n while (elapsed < 3000000 && (SPS == null || PPS == null))\n {\n // Some encoders won't give us the SPS and PPS unless they receive something to encode first...\n int bufferIndex = encoder.dequeueInputBuffer(1000000 / FRAMERATE);\n if (bufferIndex >= 0)\n {\n check(inputBuffers[bufferIndex].capacity() >= data.length, \"The input buffer is not big enough.\");\n inputBuffers[bufferIndex].clear();\n inputBuffers[bufferIndex].put(data, 0, data.length);\n encoder.queueInputBuffer(bufferIndex, 0, data.length, timestamp(), 0);\n }\n else\n {\n Log.e(TAG,\"No buffer available !\");\n }\n\n // We are looking for the SPS and the PPS here. As always, Android is very inconsistent, I have observed that some\n // encoders will give those parameters through the MediaFormat object (that is the normal behaviour).\n // But some other will not, in that case we try to find a NAL unit of type 7 or 8 in the byte stream outputed by the encoder...\n\n int index = encoder.dequeueOutputBuffer(info, 1000000 / FRAMERATE);\n\n if (index == MediaCodec.INFO_OUTPUT_FORMAT_CHANGED)\n {\n // The PPS and PPS should be there\n MediaFormat format = encoder.getOutputFormat();\n ByteBuffer spsb = format.getByteBuffer(\"csd-0\");\n ByteBuffer ppsb = format.getByteBuffer(\"csd-1\");\n SPS = new byte[spsb.capacity() - 4];\n spsb.position(4);\n spsb.get(SPS,0, SPS.length);\n PPS = new byte[ppsb.capacity() - 4];\n ppsb.position(4);\n ppsb.get(PPS,0, PPS.length);\n break;\n }\n else if (index == MediaCodec.INFO_OUTPUT_BUFFERS_CHANGED)\n {\n outputBuffers = encoder.getOutputBuffers();\n }\n else if (index >= 0)\n {\n len = info.size;\n if (len < 128)\n {\n outputBuffers[index].get(csd,0,len);\n if (len > 0 && csd[0] == 0 && csd[1] == 0 && csd[2] == 0 && csd[3] == 1)\n {\n // Parses the SPS and PPS, they could be in two different packets and in a different order\n //depending on the phone so we don't make any assumption about that\n while (p < len)\n {\n while (!(csd[p + 0] == 0 && csd[p + 1] == 0 && csd[p + 2] == 0 && csd[p + 3] == 1) && p + 3 < len)\n {\n p++;\n }\n\n if (p + 3 >= len)\n {\n p=len;\n }\n\n if ((csd[q] & 0x1F) == 7)\n {\n SPS = new byte[p - q];\n System.arraycopy(csd, q, SPS, 0, p - q);\n }\n else\n {\n PPS = new byte[p - q];\n System.arraycopy(csd, q, PPS, 0, p - q);\n }\n\n p += 4;\n q = p;\n }\n }\n }\n\n encoder.releaseOutputBuffer(index, false);\n }\n\n elapsed = timestamp() - now;\n }\n\n check(PPS != null && SPS != null, \"Could not determine the SPS & PPS.\");\n base64PPS = Base64.encodeToString(PPS, 0, PPS.length, Base64.NO_WRAP);\n base64SPS = Base64.encodeToString(SPS, 0, SPS.length, Base64.NO_WRAP);\n\n return elapsed;\n }",
"public int[] cloneMemory(){\n return memory.clone();\n }",
"private float[] generateParticleVelocities()\n {\n float velocities[] = new float[mEmitRate * 3];\n for ( int i = 0; i < mEmitRate * 3; i +=3 )\n {\n Vector3f nexVel = getNextVelocity();\n velocities[i] = nexVel.x;\n velocities[i+1] = nexVel.y;\n velocities[i+2] = nexVel.z;\n }\n return velocities;\n }",
"void genTone(){\n for (int i = 0; i < numSamples; ++i) {\n sample[i] = Math.sin(2 * Math.PI * i / (sampleRate/freqOfTone));\n }\n\n // convert to 16 bit pcm sound array\n // assumes the sample buffer is normalised.\n int idx = 0;\n for (final double dVal : sample) {\n // scale to maximum amplitude\n final short val = (short) ((dVal * 32767));\n // in 16 bit wav PCM, first byte is the low order byte\n generatedSnd[idx++] = (byte) (val & 0x00ff);\n generatedSnd[idx++] = (byte) ((val & 0xff00) >>> 8);\n }\n }",
"public byte[] convertToByteArray(AudioFormat format) {\n\t\t// throws exception when sampleRate doesn't match\n\t\t// creates a new byte[] buffer and returns it\n\t\tbyte[] res = new byte[getByteArrayBufferSize(format)];\n\t\tconvertToByteArray(res, 0, format);\n\t\treturn res;\n\t}",
"static int [] GerarAleatorio()\n {\n Random gerar = new Random();\n int [] Aleatorio = new int [pergu]; // Cria um Vetor com o tamanho de quantidade de perguntas\n \n \n int pos1, pos2, auxilio; \n \n for (int i = 0; i < Aleatorio.length; i++) \n {\n Aleatorio[i] = i ; // preenche o vetor\n }\n \n for (int i = 0; i < 1000; i++) //Quantidade de vezes que as perguntas serão embaralhadas \n {\n pos1 = gerar.nextInt(Aleatorio.length);\n pos2 = gerar.nextInt(Aleatorio.length);\n //troca \n auxilio = Aleatorio[pos1]; //guarda o valor da posição 1\n \n Aleatorio [pos1] = Aleatorio[pos2]; //troca o valor de 1 para 2\n Aleatorio[pos2] = auxilio; //troca o valor de 2 para o valor que estava na 1\n }\n \n \n return Aleatorio; \n }",
"public static Vector init(){\n \n pwmDevice = new Vector(0);\n Debug.output(\"Pwm.init: creating new Pwm\", new Integer(pwmBus), ConstantManager.deviceDebug);\n pwmDevice.addElement(new Pwm(pwmBus));\n Debug.output(\"Pwm.init: creating new data storage vector\", null, ConstantManager.deviceDebug);\n pwmDevice.addElement(new Vector(0)); //This is for data storage\n //System.out.println(\"Pwm.init: creating new integer ID\");\n Debug.output(\"Pwm.init: creating new integer ID\", new Integer(pwmBus - 1), ConstantManager.deviceDebug);\n pwmDevice.addElement(new Integer(pwmBus -1)); //this is the ID number\n pwmBus++;\n Debug.output(\"Pwm.init: Final Vector\", pwmDevice, 0); //very low priority because it takes time to do\n return pwmDevice; //Might want to attach success boolean for outputting which jaguar was at fault in the overall grid.\n }",
"private short[] makeRandomArray(Random r) {\n short[] array = new short[r.nextInt(100)];\n for (int j = 0; j < array.length; j++) {\n array[j] = (short) r.nextInt();\n }\n return array;\n }",
"public @NotNull Image genMipmaps()\n {\n if (this.data != null)\n {\n // TODO - LWJGL-ify\n int mipCount = 1; // Required mipmap levels count (including base level)\n int mipWidth = this.width; // Base image width\n int mipHeight = this.height; // Base image height\n \n int mipSize = mipWidth * mipHeight * this.format.sizeof; // Image data size (in bytes)\n \n // Count mipmap levels required\n while (mipWidth != 1 || mipHeight != 1)\n {\n if (mipWidth != 1) mipWidth >>= 1;\n if (mipHeight != 1) mipHeight >>= 1;\n \n // Security check for NPOT textures\n if (mipWidth < 1) mipWidth = 1;\n if (mipHeight < 1) mipHeight = 1;\n \n Image.LOGGER.fine(\"Next mipmap level: %s x %s - current size %s\", mipWidth, mipHeight, mipSize);\n \n mipCount++;\n mipSize += mipWidth * mipHeight * this.format.sizeof; // Add mipmap size (in bytes)\n }\n \n if (this.mipmaps < mipCount)\n {\n Color.Buffer temp = Color.realloc(this.data, mipSize);\n \n if (temp.address() != 0)\n {\n this.data = temp; // Assign new pointer (new size) to store mipmaps data\n }\n else\n {\n Image.LOGGER.warning(\"IMAGE: Mipmaps required memory could not be allocated\");\n }\n \n // Pointer to allocated memory point where store next mipmap level data\n long nextMip = this.data.address() + (long) this.width * this.height * this.format.sizeof;\n \n mipWidth = this.width >> 1;\n mipHeight = this.height >> 1;\n mipSize = mipWidth * mipHeight * this.format.sizeof;\n Image imCopy = copy();\n \n for (int i = 1; i < mipCount; i++)\n {\n Image.LOGGER.fine(\"IMAGE: Generating mipmap level: %s (%s x %s) - size: %s - offset: 0x%x\", i, mipWidth, mipHeight, mipSize, nextMip);\n \n imCopy.resize(mipWidth, mipHeight); // Uses internally Mitchell cubic downscale filter\n \n if (imCopy.data != null) MemoryUtil.memCopy(imCopy.data.address(), nextMip, mipSize);\n nextMip += mipSize;\n this.mipmaps++;\n \n // Security check for NPOT textures\n if ((mipWidth >>= 1) < 1) mipWidth = 1;\n if ((mipHeight >>= 1) < 1) mipHeight = 1;\n \n mipSize = mipWidth * mipHeight * this.format.sizeof;\n }\n \n imCopy.delete();\n }\n else\n {\n Image.LOGGER.warning(\"Mipmaps already available\");\n }\n }\n return this;\n }",
"interface Generator {\n int[] generate(int size);\n }",
"public byte[] getP() {\n return p;\n }",
"@Override\n\tprotected void uGenerate(float[] channels) \n\t{\n\t\tif (!isTurnedOn)\n\t\t{\n\t\t\tfor(int i = 0; i < channelCount(); i++)\n\t\t\t{\n\t\t\t\tchannels[i] = beforeAmplitude*audio.getLastValues()[i];\n\t\t\t}\n\t\t}\n\t\t// after the envelope, just output the afterAmplitude*audio\n\t\telse if (timeFromOff > releaseTime)\n\t\t{\n\t\t\tfor(int i = 0; i < channelCount(); i++)\n\t\t\t{\n\t\t\t\tchannels[i] = afterAmplitude*audio.getLastValues()[i];\n\t\t\t}\t\n\t\t\tif ( unpatchAfterRelease )\n\t\t\t{\n\t\t\t if ( output != null )\n\t\t\t {\n\t\t\t unpatch( output );\n\t\t\t output = null;\n\t\t\t }\n\t\t\t if ( ugenOutput != null )\n\t\t\t {\n\t\t\t unpatch( ugenOutput );\n\t\t\t ugenOutput = null;\n\t\t\t }\n\t\t\t unpatchAfterRelease = false;\n\t\t\t}\n\t\t}\n\t\t// inside the envelope\n\t\telse\n\t\t{\n\t\t\tif ((isTurnedOn) && (!isTurnedOff))\n\t\t\t{\n\t\t\t\t// ATTACK\n\t\t\t\tif (timeFromOn <= attackTime)\n\t\t\t\t{\n\t\t\t\t\t// use time remaining until maxAmplitude to change amplitude\n\t\t\t\t\tfloat timeRemain = (attackTime - timeFromOn);\n\t\t\t\t\tamplitude += (maxAmplitude - amplitude)*timeStepSize/timeRemain;\t\t\t\t\n\t\t\t\t}\n\t\t\t\t// DECAY\n\t\t\t\telse if ((timeFromOn > attackTime) && (timeFromOn <= (attackTime+decayTime)))\n\t\t\t\t{\n\t\t\t\t\t// use time remaining until sustain to change to sustain level\n\t\t\t\t\tfloat timeRemain = (attackTime + decayTime - timeFromOn);\n\t\t\t\t\tamplitude += (sustainLevel*maxAmplitude - amplitude)*timeStepSize/timeRemain;\t\t\t\n\t\t\t\t}\n\t\t\t\t// SUSTAIN\n\t\t\t\telse if (timeFromOn > (attackTime+decayTime))\n\t\t\t\t{\n\t\t\t\t\t// hold the sustain level\n\t\t\t\t\tamplitude = sustainLevel*maxAmplitude;\n\t\t\t\t}\n\t\t\t\ttimeFromOn += timeStepSize;\n\t\t\t}\n\t\t\t// RELEASE\n\t\t\telse //isTurnedOn and isTurnedOFF and timeFromOff < releaseTime\n\t\t\t{\n\t\t\t\t// use remaining time to get to afterAmplitude\n\t\t\t\tfloat timeRemain = (releaseTime - timeFromOff);\n\t\t\t\tamplitude += (afterAmplitude - amplitude)*timeStepSize/timeRemain;\n\t\t\t\ttimeFromOff += timeStepSize;\n\t\t\t}\n\t\t\t// finally multiply the input audio to generate the output\n\t\t\tfor(int i = 0; i < channelCount(); i++)\n\t\t\t{\n\t\t\t\tchannels[i] = amplitude*audio.getLastValues()[i];\n\t\t\t}\t\t\n\t\t}\n\t}",
"VectorArray getResHar();",
"private void m18347j() {\n int i = 0;\n while (true) {\n AudioProcessor[] audioProcessorArr = this.f16596P;\n if (i < audioProcessorArr.length) {\n AudioProcessor audioProcessor = audioProcessorArr[i];\n audioProcessor.flush();\n this.f16597Q[i] = audioProcessor.mo25039c();\n i++;\n } else {\n return;\n }\n }\n }",
"public int[] CreatePermutations(int[] seq){\n \n return seq;\n }",
"@Override\n public void consume(ParsableByteArray data) {\n checkStateNotNull(sampleReader);\n checkStateNotNull(output);\n int offset = data.getPosition();\n int limit = data.limit();\n byte[] dataArray = data.getData();\n\n // Append the data to the buffer.\n totalBytesWritten += data.bytesLeft();\n output.sampleData(data, data.bytesLeft());\n\n while (true) {\n int startCodeOffset = NalUnitUtil.findNalUnit(dataArray, offset, limit, prefixFlags);\n\n if (startCodeOffset == limit) {\n // We've scanned to the end of the data without finding another start code.\n if (!hasOutputFormat) {\n csdBuffer.onData(dataArray, offset, limit);\n }\n sampleReader.onData(dataArray, offset, limit);\n if (userData != null) {\n userData.appendToNalUnit(dataArray, offset, limit);\n }\n return;\n }\n\n // We've found a start code with the following value.\n int startCodeValue = data.getData()[startCodeOffset + 3] & 0xFF;\n // This is the number of bytes from the current offset to the start of the next start\n // code. It may be negative if the start code started in the previously consumed data.\n int lengthToStartCode = startCodeOffset - offset;\n\n if (!hasOutputFormat) {\n if (lengthToStartCode > 0) {\n csdBuffer.onData(dataArray, offset, /* limit= */ startCodeOffset);\n }\n // This is the number of bytes belonging to the next start code that have already been\n // passed to csdBuffer.\n int bytesAlreadyPassed = lengthToStartCode < 0 ? -lengthToStartCode : 0;\n if (csdBuffer.onStartCode(startCodeValue, bytesAlreadyPassed)) {\n // The csd data is complete, so we can decode and output the media format.\n output.format(\n parseCsdBuffer(csdBuffer, csdBuffer.volStartPosition, checkNotNull(formatId)));\n hasOutputFormat = true;\n }\n }\n\n sampleReader.onData(dataArray, offset, /* limit= */ startCodeOffset);\n\n if (userData != null) {\n int bytesAlreadyPassed = 0;\n if (lengthToStartCode > 0) {\n userData.appendToNalUnit(dataArray, offset, /* limit= */ startCodeOffset);\n } else {\n bytesAlreadyPassed = -lengthToStartCode;\n }\n\n if (userData.endNalUnit(bytesAlreadyPassed)) {\n int unescapedLength = NalUnitUtil.unescapeStream(userData.nalData, userData.nalLength);\n castNonNull(userDataParsable).reset(userData.nalData, unescapedLength);\n castNonNull(userDataReader).consume(pesTimeUs, userDataParsable);\n }\n\n if (startCodeValue == START_CODE_VALUE_USER_DATA\n && data.getData()[startCodeOffset + 2] == 0x1) {\n userData.startNalUnit(startCodeValue);\n }\n }\n\n int bytesWrittenPastPosition = limit - startCodeOffset;\n long absolutePosition = totalBytesWritten - bytesWrittenPastPosition;\n sampleReader.onDataEnd(absolutePosition, bytesWrittenPastPosition, hasOutputFormat);\n // Indicate the start of the next chunk.\n sampleReader.onStartCode(startCodeValue, pesTimeUs);\n // Continue scanning the data.\n offset = startCodeOffset + 3;\n }\n }",
"void permutateArrays()\n {\n for (int i = 0; i < sampleArrays.length; i++)\n {\n for (int i1 = 0; i1 < (r.nextInt() % 7); i1++)\n {\n addToArray(sampleArrays[i], sampleStrings[r.nextInt(5)]);\n addToArray(sampleArrays[i], sampleNumbers[r.nextInt(5)]);\n addToArray(sampleArrays[i], sampleObjects[r.nextInt(5)]);\n addToArray(sampleArrays[i], specialValues[r.nextInt(2)]);\n }\n }\n }",
"public Object[] startingBatchEmit(int bank, int start, int end, boolean toFile) \n {\n return new Object[0]; \n }",
"public static int[] initialPermutation(int[] inputText){\n\t\tint[] permutedText = new int[64];\n\t\t\n\t\tfor(int i = 0; i < 8; i++){\n\t\t\tif(i < 4){\n\t\t\t\tpermutedText[i*8 + 0] = inputText[57 + i*2];\n\t\t\t\tpermutedText[i*8 + 1] = inputText[49 + i*2];\n\t\t\t\tpermutedText[i*8 + 2] = inputText[41 + i*2];\n\t\t\t\tpermutedText[i*8 + 3] = inputText[33 + i*2];\n\t\t\t\tpermutedText[i*8 + 4] = inputText[25 + i*2];\n\t\t\t\tpermutedText[i*8 + 5] = inputText[17 + i*2];\n\t\t\t\tpermutedText[i*8 + 6] = inputText[ 9 + i*2];\n\t\t\t\tpermutedText[i*8 + 7] = inputText[ 1 + i*2];\n\t\t\t}\n\t\t\telse{\n\t\t\t\tpermutedText[i*8 + 0] = inputText[56 + (i-4)*2];\n\t\t\t\tpermutedText[i*8 + 1] = inputText[48 + (i-4)*2];\n\t\t\t\tpermutedText[i*8 + 2] = inputText[40 + (i-4)*2];\n\t\t\t\tpermutedText[i*8 + 3] = inputText[32 + (i-4)*2];\n\t\t\t\tpermutedText[i*8 + 4] = inputText[24 + (i-4)*2];\n\t\t\t\tpermutedText[i*8 + 5] = inputText[16 + (i-4)*2];\n\t\t\t\tpermutedText[i*8 + 6] = inputText[ 8 + (i-4)*2];\n\t\t\t\tpermutedText[i*8 + 7] = inputText[ 0 + (i-4)*2];\n\t\t\t}\n\t\t}\n\t\treturn permutedText;\n\t}",
"static int[] singleArrayGenerator(int num){\n int[] arr = new int[num];\n for(int i = 0; i < num; i++)\n arr[i] = new Random().nextInt(100);\n return arr;\n }",
"private int[] enquadramentoContagemDeCaracteres(int[] quadro) throws Exception {\n System.out.println(\"\\n\\t[Contagem de Caracteres]\");\n Painel.CAMADAS_RECEPTORAS.camadaEnlace(\"\\n\\t[Contagem de Caracteres]\\n\");\n Thread.sleep(velocidade);\n\n int informacaoDeControle = ManipuladorDeBit.getPrimeiroByte(quadro[0]);//Quantidade de Bits do quadro\n //Quantidade de Bits de carga util do quadro\n int quantidadeDeBitsCargaUtil = informacaoDeControle;\n System.out.println(\"IC: \" + informacaoDeControle);\n Painel.CAMADAS_RECEPTORAS.camadaEnlace(\"\\n\\tIC [\"+informacaoDeControle+\"] \");\n\n\n int novoTamanho = quantidadeDeBitsCargaUtil/8;\n\n int[] quadroDesenquadrado = new int[novoTamanho];//Novo vetor de Carga Util\n int posQuadro = 0;//Posicao do Vetor de Quadros\n\n int cargaUtil = 0;//Nova Carga Util\n\n quadro[0] = ManipuladorDeBit.deslocarBits(quadro[0]);//Deslocando os bits 0's a esquerda\n //Primeiro inteiro do Quadro - Contem a informacao de Controle IC nos primeiros 8 bits\n quadro[0] <<= 8;//Deslocando 8 bits para a esquerda, descartar a IC\n\n Painel.CAMADAS_RECEPTORAS.camadaEnlace(\"Carga Util [ \");\n for (int i=1; (i<=3) && (i<=novoTamanho); i++) {\n cargaUtil = ManipuladorDeBit.getPrimeiroByte(quadro[0]);\n quadroDesenquadrado[posQuadro++] = cargaUtil;\n Painel.CAMADAS_RECEPTORAS.camadaEnlace(cargaUtil + \" \");\n quadro[0] <<= 8;//Desloca 8 bits para a esquerda\n }\n\n Thread.sleep(velocidade);\n\n //Caso o quadro for composto por mais de um inteiro do vetor\n for (int i=1, quantidadeByte; posQuadro<novoTamanho; i++) {\n quantidadeByte = ManipuladorDeBit.quantidadeDeBytes(quadro[i]);\n quadro[i] = ManipuladorDeBit.deslocarBits(quadro[i]);\n\n for (int x=1; (x<=quantidadeByte) && (x<=4); x++) {\n cargaUtil = ManipuladorDeBit.getPrimeiroByte(quadro[i]);\n quadroDesenquadrado[posQuadro++] = cargaUtil;\n Painel.CAMADAS_RECEPTORAS.camadaEnlace(cargaUtil + \" \");\n quadro[i] <<= 8;//Desloca 8 bits para a esquerda\n }\n Thread.sleep(velocidade);\n }\n \n Painel.CAMADAS_RECEPTORAS.camadaEnlace(\"]\\n\");\n Thread.sleep(velocidade);\n\n return quadroDesenquadrado;\n }",
"public native String passingDataToJni(float[] audio_data, int array_length);",
"public Integer[] createArray() {\n Integer[] value = new Integer[defaultLaenge];\n\n for (int i = 0; i < value.length; i++) {\n value[i] = (int)(value.length*Math.random());\n }\n\n return value;\n }",
"public byte[] getByteArray(){\r\n\r\n byte[] b = new byte[0x54];\r\n\r\n System.arraycopy(PID_pointer, 0, b, 0, 4);\r\n System.arraycopy(MPID_pointer, 0, b, 4, 4);\r\n System.arraycopy(Null_pointer, 0, b, 8, 4);\r\n System.arraycopy(Portrait_pointer, 0, b, 12, 4);\r\n System.arraycopy(Class_pointer, 0, b, 16, 4);\r\n System.arraycopy(Affiliation_pointer, 0, b, 20, 4);\r\n System.arraycopy(Weaponlevel_pointer, 0, b, 24, 4);\r\n System.arraycopy(Skill1_pointer, 0, b, 28, 4);\r\n System.arraycopy(Skill2_pointer, 0, b, 32, 4);\r\n System.arraycopy(Skill3_pointer, 0, b, 36, 4);\r\n System.arraycopy(Animation1_pointer, 0, b, 40, 4);\r\n System.arraycopy(Animation2_pointer, 0, b, 44, 4);\r\n b[48] = unknownbyte1;\r\n b[49] = unknownbyte2;\r\n b[50] = unknownbyte3;\r\n b[51] = unknownbyte4;\r\n b[52] = unknownbyte5;\r\n b[53] = unknownbyte6;\r\n b[54] = level;\r\n b[55] = build;\r\n b[56] = weight;\r\n System.arraycopy(bases, 0, b, 57, 8);\r\n System.arraycopy(growths, 0, b, 65, 8);\r\n System.arraycopy(supportgrowth, 0, b, 73, 8);\r\n b[81] = unknownbyte9;\r\n b[82] = unknownbyte10;\r\n b[83] = unknownbyte11;\r\n\r\n return b;\r\n }",
"private static int[] createArray(int n) {\n\t \tint[] array = new int[n];\n\t \tfor(int i=0; i<n; i++){\n\t \t\tarray[i] = (int)(Math.random()*10);\n\t \t}\n\t\t\treturn array;\n\t\t}",
"static int [] rand (int [] m) {\r\n\t\tint [] massive = new int [m.length];\r\n\t\tfor (int i = 0; i < (m.length-1); i++) {\r\n\t\t\tmassive [i] = (int) Math.round( (Math.random() * 100));\r\n\t\t\tSystem.out.print(massive [i] + \" \");\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\treturn massive;\r\n\t}",
"private byte[] magSerializedForm() {\n int len = mag.length;\n\n int bitLen = (len == 0 ? 0 : ((len - 1) << 5) + bitLengthForInt(mag[0]));\n int byteLen = (bitLen + 7) >>> 3;\n byte[] result = new byte[byteLen];\n\n for (int i = byteLen - 1, bytesCopied = 4, intIndex = len - 1, nextInt = 0;\n i >= 0; i--) {\n if (bytesCopied == 4) {\n nextInt = mag[intIndex--];\n bytesCopied = 1;\n } else {\n nextInt >>>= 8;\n bytesCopied++;\n }\n result[i] = (byte)nextInt;\n }\n return result;\n }",
"public byte[] mo43874n() {\n try {\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n DataOutputStream dout = new DataOutputStream(bout);\n mo43851a(dout);\n dout.close();\n return bout.toByteArray();\n } catch (IOException e) {\n throw new InternalError();\n }\n }",
"void genTone() {\n for (int i = 0; i < numSamples; ++i) {\n sample[i] = Math.sin(2 * Math.PI * i / (sampleRate / freqOfTone));\n }\n\n // convert to 16 bit pcm sound array\n // assumes the sample buffer is normalised.\n int idx = 0;\n for (final double dVal : sample) {\n // scale to maximum amplitude\n final short val = (short) ((dVal * 32767));\n // in 16 bit wav PCM, first byte is the low order byte\n generatedSnd[idx++] = (byte) (val & 0x00ff);\n generatedSnd[idx++] = (byte) ((val & 0xff00) >>> 8);\n\n }\n }",
"void genTone() {\n for (int i = 0; i < numSamples; ++i) {\n sample[i] = Math.sin(2 * Math.PI * i / (sampleRate / freqOfTone));\n }\n\n // convert to 16 bit pcm sound array\n // assumes the sample buffer is normalised.\n int idx = 0;\n for (final double dVal : sample) {\n // scale to maximum amplitude\n final short val = (short) ((dVal * 32767));\n // in 16 bit wav PCM, first byte is the low order byte\n generatedSnd[idx++] = (byte) (val & 0x00ff);\n generatedSnd[idx++] = (byte) ((val & 0xff00) >>> 8);\n\n }\n }",
"public abstract void startArray();",
"protected abstract UtteranceProcessor getAudioOutput() throws IOException ;",
"private static int[] arrayInitializer(int length) {\n int[] myArray = new int[length];\n Random rand = new Random();\n for (int i = 0; i < length; i++) {\n myArray[i] = rand.nextInt(1000);\n }\n return myArray;\n }",
"static int[] createMessage(int[] data){\r\n\t\tint[] message = new int[6 + data.length + 2];\r\n\t\tmessage[0] = 0xF0;\r\n\t\tmessage[1] = 0x41;\r\n\t\tmessage[2] = 0x7F;\r\n\t\tmessage[3] = 0x00;\r\n\t\tmessage[4] = 0x59;\r\n\t\tmessage[5] = 0x12;\r\n\t\tint total = 0;\r\n\t\tfor(int i = 0; i < data.length; i++){\r\n\t\t\ttotal += data[i];\r\n\t\t\tmessage[6 + i] = data[i];\r\n\t\t}\r\n\t\tmessage[message.length - 2] = 128 - (total % 128);\r\n\t\tmessage[message.length - 1] = 0xF7;\r\n\t\treturn message;\r\n\t}",
"int pauseSamples() {\n return 0;\n }",
"protected abstract byte[] getCANMessage();",
"void createArray(int n) {\n numbers = new int[n];\n for ( int i = 0; i < n; i++){\n numbers[i] = random.nextInt(1000);\n }\n }",
"public byte[] produce(int quantity)\n\t{\n\t\t//generate an array of trash\n\t\tbyte[] trash = new byte[quantity];\n\t\tfor(int i=0; i<quantity; i++)\n\t\t{\n\t\t\ttrash[i] = (byte)randomNumGen.nextInt(256);\n\t\t}\n\t\t\n\t\treturn trash;\n\t}",
"public final void pcm() throws RecognitionException {\n try {\n // C:\\\\Users\\\\Cavicchio\\\\workspace\\\\InterDepAdjStructure\\\\newgrammar\\\\JCB_tree.g:867:5: ( OPEN_MATRIX pcmrows CLOSE_MATRIX NEWLINE )\n // C:\\\\Users\\\\Cavicchio\\\\workspace\\\\InterDepAdjStructure\\\\newgrammar\\\\JCB_tree.g:867:7: OPEN_MATRIX pcmrows CLOSE_MATRIX NEWLINE\n {\n match(input,OPEN_MATRIX,FOLLOW_OPEN_MATRIX_in_pcm998); \n\n\n if ((displayProductions == true) && (displayPCMProductions == true))\n {\n System.out.println(\"Production: pcm : OPEN_MATRIX\");\n }\n problem.startPreemptionCostMatrix();\n\n\n pushFollow(FOLLOW_pcmrows_in_pcm1007);\n pcmrows();\n\n state._fsp--;\n\n\n\n if ((displayProductions == true) && (displayPCMProductions == true))\n {\n System.out.println(\"Production: pcm : OPEN_MATRIX pcmrows\");\n }\n\n\n match(input,CLOSE_MATRIX,FOLLOW_CLOSE_MATRIX_in_pcm1015); \n\n match(input,NEWLINE,FOLLOW_NEWLINE_in_pcm1017); \n\n\n if ((displayProductions == true) && (displayPCMProductions == true))\n {\n System.out.println(\"Production: pcm : OPEN_MATRIX pcmrows pcmids? CLOSE_MATRIX\");\n }\n if (displayPCMMatrix == true)\n {\n problem.displayPreemptionCostMatrix();\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return ;\n }",
"public /* bridge */ /* synthetic */ java.lang.Object[] newArray(int r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: android.telephony.SmsCbCmasInfo.1.newArray(int):java.lang.Object[], dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telephony.SmsCbCmasInfo.1.newArray(int):java.lang.Object[]\");\n }",
"static void initializeArray(boolean firstTime) {\n\t\tint count = 0;\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tRandom r = new Random();\n\t\t\tint val = r.nextInt(m);\n\t\t\tint mod = val % m;\n\t\t\tif (array[mod] == -1) {\n\t\t\t\tarray[mod] = val;\n\t\t\t\tresult[1]++;\n\t\t\t\tcount++;\n\t\t\t} else if (firstTime) {\n\t\t\t\tresult[0] = count;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"public static int getPCM(String name) {\n return mapPCM.get(name);\n }",
"@Override\n public byte[] getValue() {\n return MetricUtils.concat2(topologyId, getTag(), sampleRate).getBytes();\n }",
"public long[] toArray() {\n/* 406 */ long[] array = new long[(int)(this.max - this.min + 1L)];\n/* 407 */ for (int i = 0; i < array.length; i++) {\n/* 408 */ array[i] = this.min + i;\n/* */ }\n/* 410 */ return array;\n/* */ }",
"public void setPCA0MD_CPS_Bits(PCA_ClockSource source){\r\n checkServoCommandThread();\r\n ServoCommand cmd=new ServoCommand();\r\n cmd.bytes=new byte[2];\r\n cmd.bytes[0]=CMD_SET_PCA0MD_CPS;\r\n cmd.bytes[1]=(byte)(0x07&source.code());\r\n submitCommand(cmd);\r\n }",
"@Override\n\tpublic int read(CCMultiChannelBuffer outBuffer) {\n\t\tif (buffer.getSampleCount() != outBuffer.getBufferSize()) {\n\t\t\tbuffer.changeSampleCount(outBuffer.getBufferSize(), true);\n\t\t\trawBytes = new byte[buffer.getByteArrayBufferSize(format)];\n\t\t}\n\t\tint framesRead = 0;\n\t\tif (play) {\n\t\t\tframesRead = mRead();\n\t\t} else {\n\t\t\tbuffer.makeSilence();\n\t\t}\n\t\tfor (int i = 0; i < buffer.getChannelCount(); i++) {\n\t\t\toutBuffer.setChannel(i, buffer.getChannel(i));\n\t\t}\n\n\t\treturn framesRead;\n\t}",
"public AudioFormat genAudioFormat(){\n\t\treturn new AudioFormat(\n\t\t\t\tAudioFormat.Encoding.PCM_SIGNED, MicTest.SAMPLE_RATE, 8 *MicTest.FRAME, 1, MicTest.FRAME, MicTest.SAMPLE_RATE,\n\t\t\t\tfalse);\n\n\t}",
"private int[] reset() {\n return data;\n }",
"@Override\n\tprotected void uGenerate(float[] channels) \n\t{\n\t\tif (!isActivated)\n\t\t{\n\t\t\tArrays.fill( channels, begAmp );\n\t\t} \n\t\telse if (lineNow >= lineTime)\n\t\t{\n\t\t\tArrays.fill( channels, endAmp );\n\t\t} \n\t\telse \n\t\t{\n\t\t\tamp += ( endAmp - amp )*timeStepSize/( lineTime - lineNow );\n\t\t\t//Minim.debug(\" dampTime = \" + dampTime + \" begAmp = \" + begAmp + \" amp = \" + amp + \" dampNow = \" + dampNow);\n\t\t\tArrays.fill( channels, amp );\n\t\t\tlineNow += timeStepSize;\n\t\t}\n\t}",
"protected abstract void nextWave();",
"@Override\n\tprotected float[] readEntireArray(InputStream in) throws IOException\n\t{\n\t\tArrayList<double[]> buffers = new ArrayList<double[]>();\n\n\t\tbyte[] buf = new byte[this.frameSize*2];\n\t\t\n\t\tint nBytesRead = 0;\n\n\t while (nBytesRead != -1)\n\t {\n\t nBytesRead = in.read(buf, 0, buf.length);\n\n\t double[] samples = new double[this.frameSize];\n\n\t for (int i = 0; i < this.frameSize; i++)\n\t\t\t{\n\t\t\t\tint hi = buf[(2 * i)];\n\t\t\t\tint low = buf[(2 * i + 1)] & 0xFF;\n\t\t\t\tint sampVal = hi << 8 | low;\n\t\t\t\tsamples[i] = (sampVal / this.spectralScale);\n\t\t\t}\n\n\t buffers.add( samples );\n\n\t }\n\n\t\tfloat[] totalBuffer = new float[buffers.size()*this.frameSize];\n\t\tint index = 0 ;\n\n\t\t//copy the entire thing over\n\t\tfor(double[] tempBuffer:buffers)\n\t\t{\n\t\t\tfor(int k=0;k<tempBuffer.length;k++)\n\t\t\t{\n\t\t\t\ttotalBuffer[index] = (float)tempBuffer[k];\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t\tbuffers.clear();\n\t\tbuffers = null;\n\t\tSystem.gc();\n\t\treturn totalBuffer;\n\t}",
"public byte[] toByteArray() {\n/* 510 */ ByteBuffer buff = ByteBuffer.allocate(40).order(ByteOrder.LITTLE_ENDIAN);\n/* 511 */ writeTo(buff);\n/* 512 */ return buff.array();\n/* */ }",
"public static MicroArrayData combinePMAReplicates(String fName) {\r\n\t\tMicroArrayData PMA = new MicroArrayData();\r\n\t\tPMA.setDiscrete();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tPMA.readFileBlind(fName);\r\n\t\t} catch(IOException e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\t\r\n\t\tint[][] PMAc = new int[PMA.numRows][PMA.numCols/2];\r\n\t\tString[] experimentNames = new String[PMA.numCols/2];\r\n\t\t\r\n\t\tint i = 0;\r\n\t\tint j = 0;\r\n\t\tint k = 0;\r\n\t\tint v = 0;\r\n\t\tk = 0;\r\n\t\tj = 0;\r\n\t\twhile (j<PMA.numCols-1) {\r\n\t\t\tfor (i=0;i<PMAc.length;i++) {\r\n\t\t\t\tv = 0;\r\n\t\t\t\tif (PMA.dvalues[i][j] > 0 | PMA.dvalues[i][j+1] > 0) {\r\n\t\t\t\t\tv = 1;\r\n\t\t\t\t}\r\n\t\t\t\tPMAc[i][k] = v;\r\n\t\t\t}\r\n\t\t\texperimentNames[k] = PMA.experimentNames[j];\r\n\t\t\tk++;\r\n\t\t\tj = j + 2;\r\n\t\t}\r\n\t\t\r\n\t\tPMA.experimentNames = experimentNames;\r\n\t\tPMA.dvalues = PMAc;\r\n\t\tPMA.numCols = PMA.numCols/2;\r\n\t\t\r\n\t\treturn PMA;\r\n\t}",
"public int ppcm(int a, int b) throws Exception {\n return a*b / pgcdByDE(a,b);\n }",
"public static int[] finalPermutation(int[] inputText){\n\t\tint[] permutedText = new int[64];\n\t\tfor(int i = 0; i < 8; i++){\n\t\t\tpermutedText[i*8 + 0] = inputText[39 - i];\n\t\t\tpermutedText[i*8 + 1] = inputText[ 7 - i];\n\t\t\tpermutedText[i*8 + 2] = inputText[47 - i];\n\t\t\tpermutedText[i*8 + 3] = inputText[15 - i];\n\t\t\tpermutedText[i*8 + 4] = inputText[55 - i];\n\t\t\tpermutedText[i*8 + 5] = inputText[23 - i];\n\t\t\tpermutedText[i*8 + 6] = inputText[63 - i];\n\t\t\tpermutedText[i*8 + 7] = inputText[31 - i];\n\t\t}\n\t\treturn permutedText;\n\t}",
"public interface Wave {\n\n /**\n * Get the next single, unformatted sample and return it as a double.\n *\n * <p>The next call to any of the get or insert methods will return samples\n * following the samples returned by this call.\n *\n * @return the next unformatted sample\n */\n public double getNextRawSample();\n\n /**\n * <p>Get the next (single) sample and store it at the given offset\n * in the supplied buffer.\n *\n * <p>The next call to any of the get or insert methods will return samples\n * following the samples returned by this call.\n *\n * @param buffer to put the sample in\n * @param byteOffset starting index for the sample\n *\n * @throws IndexOutOfBoundsException if the sample extends past the\n * end of the buffer\n */\n public void insertNextSample( byte[] buffer, int byteOffset );\n\n /**\n * <p>Get the next specified number of unformatted samples from the wave\n * and store them in the supplied double array at the given offset.\n *\n * <p>The next call to any of the get or insert methods will return samples\n * following the samples returned by this call.\n *\n * @param rawBuffer storage for the unformatted samples\n * @param offset starting index for the samples\n * @param nSamples number of samples to provide\n *\n * @throws IndexOutOfBoundsException if the samples would extend past the\n * end of the buffer\n */\n public void getNextRawSamples( double[] rawBuffer, int offset, int nSamples )\n throws IndexOutOfBoundsException;\n\n /**\n * <p>Fill the supplied buffer with unformatted samples from the wave.\n *\n * <p>The next call to any of the get or insert methods will return samples\n * following the samples returned by this call.\n *\n * @param rawBuffer buffer to fill\n */\n public void getNextRawSamples( double[] rawBuffer );\n\n /**\n * <p>Get the next specified number of samples (note: samples, not bytes)\n * from the wave, format them, and store them in the supplied byte array at\n * the given offset.\n *\n * <p>The starting offset is in bytes, and there is no requirement that the\n * offset be aligned on a sampleBytes boundary, nor that the buffer length\n * be an integral number of samples, as the caller may have other information\n * stored in the buffer (e.g. a header for the audio format). For the same\n * reason, this does not wrap if the number of samples will not fit in the\n * tail of the buffer.\n *\n * <p>The next call to any of the get or insert methods will return samples\n * following the samples returned by this call.\n *\n * @param buffer storage for the samples\n * @param byteOffset starting index in buffer at which to store the\n * samples\n * @param nSamples number of samples to insert\n *\n * @throws IndexOutOfBoundsException if the samples would extend past the\n * end of the buffer\n */\n public void insertNextSamples( byte[] buffer, int byteOffset, int nSamples )\n throws IndexOutOfBoundsException;\n\n /**\n * <p>Get the next specified number of bytes worth of samples, format the\n * samples, and store them in the supplied byte array at the given offset.\n * If the number of bytes is not a multiple of the sample size, the number\n * of bytes provided will be rounded down to the nearest whole sample.\n * (This is for the benefit of callers that don't know about the audio format,\n * mainly MockTargetDataLine.)\n *\n * <p>The starting offset is in bytes, and there is no requirement that the\n * offset be aligned on a sampleBytes boundary, nor that the buffer length\n * be an integral number of samples, as the caller may have other information\n * stored in the buffer (e.g. a header for the audio format). For the same\n * reason, this does not wrap if the number of samples will not fit in the\n * tail of the buffer.\n *\n * <p>The next call to any of the get or insert methods will return samples\n * following the samples returned by this call.\n *\n * @param buffer storage for the samples\n * @param byteOffset starting index in buffer at which to store the\n * samples\n * @param nBytes number of bytes to insert\n */\n public void insertNextBytes( byte[] buffer, int byteOffset, int nBytes )\n throws IndexOutOfBoundsException;\n\n /**\n * <p>Fill the supplied buffer with formatted samples from the wave.\n * \n * <p>This version of insertNextSamples is not intended for buffers that\n * include non-sample data such as headers, as it will insert samples\n * starting at index 0. Instead, use\n * {@link insertNextSamples(byte[], int, int)}.\n *\n * <p>If the buffer is not an integral multiple of the sample size, this\n * will fill in as many samples as it can, leaving the remaining bytes\n * unmodified.\n *\n * <p>The next call to any of the get or insert methods will return samples\n * following the samples returned by this call.\n * \n * @param buffer storage for samples\n * \n * @throws IllegalArgumentException if the buffer size is not an integral\n * multiple of the audio format's sample size\n */\n public void insertNextSamples( byte[] buffer )\n throws IllegalArgumentException;\n\n /**\n * Reset phase for next sample to originally-specified initial phase(s).\n */\n public void resetPhase();\n}",
"AudioGenerator() {\n minim = new Minim(this);\n // use the getLineOut method of the Minim object to get an AudioOutput object\n out = minim.getLineOut();\n }",
"public byte[] array()\r\n/* 127: */ {\r\n/* 128:156 */ ensureAccessible();\r\n/* 129:157 */ return this.array;\r\n/* 130: */ }",
"@Override\n public byte[] provide() {\n long start = System.nanoTime();\n\n try {\n if (packetQueue.peek() == null) {\n underflowed ++;\n return new byte[0];\n }\n\n OpusPacket packet = packetQueue.remove();\n\n if (packet == null) {\n underflowed ++;\n return new byte[0];\n }\n\n availableInput += packet.getSamples();\n opusBytePosition += packet.getBytes().length;\n opusPacketsSent ++;\n\n return packet.getBytes();\n } catch (NoSuchElementException ex) {\n underflowed ++;\n return new byte[0];\n } finally {\n long networkTime = System.nanoTime() - start;\n\n if (networkTime >= (opusParameters.getOpusFrameTime() * 1000000L)) {\n underflowed++;\n\n Logger.getGlobal().warning(\"[TeamspeakFastMixerSink] provide() took longer than the expected \" +\n opusParameters.getOpusFrameTime() + \"ms: \" + ((double)networkTime / 1_000_000D) + \"ms\");\n }\n\n this.networkTime += networkTime;\n\n if (packetQueue.peek() == null) {\n synchronized (drainLock) {\n drainLock.notifyAll();\n }\n }\n }\n }",
"static com.qiyukf.nimlib.p470f.p471a.C5826a m23369a(android.os.Parcel r4) {\n /*\n com.qiyukf.nimlib.f.a.a r0 = new com.qiyukf.nimlib.f.a.a\n r1 = 0\n r0.m50001init(r1)\n int r2 = r4.readInt()\n r0.f18499a = r2\n int r2 = r4.readInt()\n if (r2 <= 0) goto L_0x001d\n byte[] r2 = r4.createByteArray()\n java.nio.ByteBuffer r2 = java.nio.ByteBuffer.wrap(r2)\n r0.f18501c = r2\n L_0x001d:\n int r2 = r4.readInt()\n r0.f18500b = r2\n int r2 = r4.readInt()\n if (r2 <= 0) goto L_0x0061\n byte[] r4 = r4.createByteArray()\n int r3 = r0.f18500b\n if (r3 <= 0) goto L_0x005c\n int r1 = r0.f18500b\n if (r1 != r2) goto L_0x0049\n java.nio.ByteBuffer r4 = java.nio.ByteBuffer.wrap(r4)\n r0.f18502d = r4\n java.nio.ByteBuffer r4 = r0.f18502d\n r4.position(r2)\n goto L_0x0068\n L_0x0049:\n int r1 = r0.f18500b\n java.nio.ByteBuffer r1 = java.nio.ByteBuffer.allocate(r1)\n r0.f18502d = r1\n java.nio.ByteBuffer r1 = r0.f18502d\n r1.put(r4)\n goto L_0x0068\n L_0x005c:\n java.nio.ByteBuffer r4 = java.nio.ByteBuffer.wrap(r4, r1, r2)\n goto L_0x0065\n L_0x0061:\n java.nio.ByteBuffer r4 = java.nio.ByteBuffer.allocate(r1)\n L_0x0065:\n r0.f18502d = r4\n L_0x0068:\n boolean r4 = m23372b(r0)\n if (r4 == 0) goto L_0x006f\n return r0\n L_0x006f:\n int r4 = r0.f18500b\n if (r4 <= 0) goto L_0x007d\n android.util.SparseArray<com.qiyukf.nimlib.f.a.a> r4 = f18504a\n int r1 = r0.f18499a\n r4.put(r1, r0)\n goto L_0x00a2\n L_0x007d:\n android.util.SparseArray<com.qiyukf.nimlib.f.a.a> r4 = f18504a\n int r1 = r0.f18499a\n java.lang.Object r4 = r4.get(r1)\n com.qiyukf.nimlib.f.a.a r4 = (com.qiyukf.nimlib.p470f.p471a.C5826a) r4\n if (r4 == 0) goto L_0x00a2\n java.nio.ByteBuffer r1 = r4.f18502d\n java.nio.ByteBuffer r0 = r0.f18502d\n r1.put(r0)\n boolean r0 = m23372b(r4)\n if (r0 == 0) goto L_0x00a2\n android.util.SparseArray<com.qiyukf.nimlib.f.a.a> r0 = f18504a\n int r1 = r4.f18499a\n r0.remove(r1)\n return r4\n L_0x00a2:\n r4 = 0\n return r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.qiyukf.nimlib.p470f.p471a.C5826a.C5829b.m23369a(android.os.Parcel):com.qiyukf.nimlib.f.a.a\");\n }",
"private static byte[] internalToMidi (byte[] internalData) {\r\n double size = internalData.length * 8.0 / 7.0; // every 7 bytes will be expanded to 8 bytes\r\n byte[] tmpData = new byte[(int)Math.ceil(size)];\r\n\r\n int j = 0;\r\n int byteNo = 0;\r\n byte header = 0x00;\r\n byte msb;\r\n byte[] sevenBytes = new byte[7]; // temp storage for the seven bytes being worked on\r\n for (int i = 0; i < internalData.length; ++i) {\r\n byteNo = i % 7;\r\n if (byteNo == 0) { // first byte\r\n header = 0x00;\r\n for (int x = 0; x < 7; ++x) {\r\n sevenBytes[x] = 0x00;\r\n }\r\n }\r\n \r\n msb = (byte)((internalData[i] & 0x80) >> (byteNo + 1));\r\n header |= msb;\r\n sevenBytes[byteNo] = (byte)(internalData[i] & 0x7F);\r\n \r\n if (byteNo == 6) { // last byte\r\n tmpData[j++] = header;\r\n System.out.print (String.format(\"j %3d - byteNo %d, header %02X, seven:\", j, byteNo, header));\r\n for (byte b : sevenBytes) {\r\n System.out.print(String.format(\", %02X\", b));\r\n tmpData[j++] = b;\r\n }\r\n System.out.println();\r\n }\r\n }\r\n \r\n if (byteNo != 6) { // need to write out these bytes\r\n tmpData[j++] = header;\r\n for (int i = 0; i <= byteNo; ++i) {\r\n tmpData[j++] = sevenBytes[i];\r\n }\r\n }\r\n \r\n byte[] midiData = new byte[j];\r\n System.arraycopy(tmpData, 0, midiData, 0, j);\r\n \r\n return midiData;\r\n }",
"public byte[] encode() throws IOException {\n byte[] buffer = new byte[12+193];\n LittleEndianDataOutputStream dos = new LittleEndianDataOutputStream(new ByteArrayOutputStream());\n dos.writeByte((byte)0xFD);\n dos.writeByte(payload_length & 0x00FF);\n dos.writeByte(incompat & 0x00FF);\n dos.writeByte(compat & 0x00FF);\n dos.writeByte(packet & 0x00FF);\n dos.writeByte(sysId & 0x00FF);\n dos.writeByte(componentId & 0x00FF);\n dos.writeByte(messageType & 0x00FF);\n dos.writeByte((messageType >> 8) & 0x00FF);\n dos.writeByte((messageType >> 16) & 0x00FF);\n dos.writeLong(tms);\n for (int i=0; i<40; i++) {\n dos.writeInt((int)(data[i]&0x00FFFFFFFF));\n }\n dos.writeFloat(cx);\n dos.writeFloat(cy);\n dos.writeFloat(cz);\n dos.writeFloat(resolution);\n dos.writeFloat(extension);\n dos.writeInt((int)(count&0x00FFFFFFFF));\n dos.writeByte(status&0x00FF);\n dos.flush();\n byte[] tmp = dos.toByteArray();\n for (int b=0; b<tmp.length; b++) buffer[b]=tmp[b];\n int crc = MAVLinkCRC.crc_calculate_encode(buffer, 193);\n crc = MAVLinkCRC.crc_accumulate((byte) IMAVLinkCRC.MAVLINK_MESSAGE_CRCS[messageType], crc);\n byte crcl = (byte) (crc & 0x00FF);\n byte crch = (byte) ((crc >> 8) & 0x00FF);\n buffer[203] = crcl;\n buffer[204] = crch;\n dos.close();\n return buffer;\n}",
"void genPermute() {\n\t\tpermute = new ArrayList<Integer>();\n\t\tfor(int idx = 0; idx < dim(); idx++)\n\t\t\tpermute.add(idx);\n\t\tjava.util.Collections.shuffle(permute);\n\t}",
"public byte[] getbyteArray() {\n byte[] output = new byte[header_size+fileData.length];\n output[0] = (byte)((type & 0xff00)>> 8);\n output[1] = (byte)(type & 0xff);\n output[2] = (byte)((length & 0xff00)>> 8);\n\t output[3] = (byte)(length & 0xff);\n output[4] = (byte)((clientID & 0xff00)>> 8);\n output[5] = (byte)(clientID & 0xff);\n output[6] = action;\n byte[] temp2 = ByteBuffer.allocate(4).putInt(sectionLength).array();\n for(int i=0;i<4;i++) {\n output[7+i] = temp2[i]; \n }\n temp2 = ByteBuffer.allocate(4).putInt(filePosition).array();\n for(int j=0;j<4;j++) {\n output[11+j] = temp2[j]; \n }\n //copy file data\n System.arraycopy(fileData, 0,output, 15,fileData.length); \n return output;\n }",
"byte [] getBuffer ();",
"public byte[] getPgenCounter() {\n return pgenCounter;\n }",
"public Array<Particle> getParticlesListIteration() {\n return new Array(masterList);\n }",
"protected Void doInBackground(Integer... i) {\r\n\t\t// configure stuff\r\n\t\tint channelConfiguration = AudioFormat.CHANNEL_CONFIGURATION_MONO;\r\n\t\tint audioEncoding = AudioFormat.ENCODING_PCM_16BIT;\r\n\t\tint bufferSize = AudioRecord.getMinBufferSize(FREQUENCY, channelConfiguration, audioEncoding);\r\n\t\tAudioRecord audioRecord = new AudioRecord(MediaRecorder.AudioSource.MIC, FREQUENCY, channelConfiguration,audioEncoding, bufferSize);\r\n\r\n\t\tshort[] buffer = new short[bufferSize];\r\n\t\taudioRecord.startRecording();\r\n\r\n\t\t// A linked-list object to hold our pcm data\r\n\t\tLinkedList<Short> pcmList = new LinkedList<Short>();\r\n\r\n\t\t// variable used to individual PCM data\r\n\t\tshort pcmShort;\r\n\r\n\t\t// for auto detect; used to determine time-stamp of last audio\r\n\t\tlong lastFound = 0;\r\n\t\t\r\n\r\n\t\twhile (isRecording) {\r\n\t\t\t// process new audio data\r\n\t\t\tint bufferReadResult = audioRecord.read(buffer, 0, bufferSize);\r\n\t\t\tfor (int b = 0; b < bufferReadResult; b++) {\r\n\t\t\t\t//add the incoming short to the offset\r\n\t\t\t\tpcmShort = (short) (buffer[b] + offset);\r\n\t\t\t\t\r\n\t\t\t\t//if we detect some non-noise let the timer know\r\n\t\t\t\tif (Swype.isOutsideThreshold(pcmShort)) {\r\n\t\t\t\t\tlastFound = System.currentTimeMillis();\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\t//if the timer is counting, add the data to the list\r\n\t\t\t\tif (lastFound != 0) {\r\n\t\t\t\t\tpcmList.add(pcmShort);\r\n\t\t\t\t\t//pcmList_sand.add(pcmShort);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//if the timer is running and it has been > 1/10th of a second since the last peak\r\n\t\t\tif (lastFound != 0 && (System.currentTimeMillis() - lastFound) > 100) {\r\n\t\t\t\t// make sure that the PCM data is actually of a meaningful length\r\n\t\t\t\tif (pcmList.size() > minListLen) {\r\n\t\t\t\t\t// looks like we may have found a card\r\n\t\t\t\t\taudioRecord.stop();\r\n\t\t\t\t\t if (DEBUG) Log.v(TAG,\"processing audio segment\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t// reset timer\r\n\t\t\t\t\tlastFound = 0;\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t//process the PCM data and hope for a card\r\n\r\n\t\t\t\t\t//decode the swype\r\n\t\t\t\t\tSwype swype = new Swype(pcmList);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//publishProgress(swype.getBinaryString());\r\n\t\t\t\t\t\r\n\t\t\t\t\t//publishProgress(\"Size:\" +swype.getBinaryList().size());\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (swype.isvalid()){ //TODO this is backwards\r\n\t\t\t\t\t\tif (DEBUG) Log.d(TAG, \"Swype was valid\");\r\n\t\t\t\t\r\n\t\t\t\t\t\t// get the card\r\n\t\t\t\t\t\tCard card = new Card(swype.getBinaryList());\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (card.isValid()){ //possibly check that the string is != null\r\n\t\t\t\t\t\t\tif (DEBUG) Log.d(TAG, \"card is valid\");\r\n\t\t\t\t\t\t\tpublishProgress(\"Valid Swipe!\");\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tpublishProgress(\"Invalid Swipe, outputting regardless\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tpublishProgress(\"---------------------------------------------------------\");\r\n\t\t\t\t\t\tpublishProgress(card.getASCII());\r\n\t\t\t\t\t\tpublishProgress(\" ------- binary ------------\");\r\n\t\t\t\t\t\tpublishProgress(Swype.binaryString(swype.getBinaryList()));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tpublishProgress(\"Invalid Swipe!\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\taudioRecord.startRecording();\r\n\t\t\t\t}\r\n\t\t\t\t//reset the PCMlist for the next card\r\n\t\t\t\t//pcmList.clear(); //TODO check this\r\n\t\t\t\tpcmList.clear();\r\n\t\t\t\t//pcmList_sand.clear();\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t//we are done recording\r\n\t\taudioRecord.stop();\r\n\t\t//due to the Void (note the capital V) return type\r\n\t\t//the following line must be here.\r\n\t\treturn null;\r\n\t}",
"public abstract Parts getRAM();",
"public int getSamples(){ \n return this.samples; \n }",
"public RealBuffer copyOf()\n {\n float[] copy = Arrays.copyOf(mSamples, mSamples.length);\n\n return new RealBuffer(copy);\n }",
"int[][] getData()\n {\n return block;\n }"
] | [
"0.60940444",
"0.60307485",
"0.5951677",
"0.58791614",
"0.5715504",
"0.55871826",
"0.5480953",
"0.53951705",
"0.51970726",
"0.51607084",
"0.5150512",
"0.51337194",
"0.5132472",
"0.51245904",
"0.5064536",
"0.5048292",
"0.49909276",
"0.49905238",
"0.4976472",
"0.49201375",
"0.49185187",
"0.49006736",
"0.4899184",
"0.48777667",
"0.48758873",
"0.48715046",
"0.48677453",
"0.48618612",
"0.484312",
"0.48320633",
"0.48075426",
"0.48043263",
"0.48030078",
"0.47980306",
"0.47935888",
"0.4793035",
"0.47812915",
"0.47639614",
"0.47610798",
"0.47596014",
"0.47585735",
"0.47582617",
"0.4756369",
"0.47472933",
"0.4745787",
"0.4728063",
"0.472168",
"0.47205645",
"0.47100756",
"0.47000587",
"0.46997768",
"0.4694735",
"0.46825108",
"0.46778277",
"0.4673523",
"0.46730638",
"0.4669415",
"0.4669415",
"0.4661791",
"0.4660323",
"0.46575615",
"0.4650409",
"0.46453544",
"0.46416283",
"0.46362203",
"0.46360922",
"0.46344143",
"0.46332273",
"0.4631273",
"0.46266532",
"0.46216807",
"0.46029288",
"0.45976055",
"0.45974478",
"0.4585187",
"0.45818877",
"0.45811975",
"0.45760715",
"0.4571891",
"0.45710942",
"0.45626482",
"0.45612508",
"0.45599458",
"0.45587242",
"0.4558483",
"0.45583567",
"0.45515463",
"0.45507497",
"0.45493612",
"0.4543977",
"0.45410788",
"0.45403814",
"0.45397753",
"0.45395327",
"0.45379356",
"0.45329043",
"0.4527079",
"0.4521245",
"0.45147893",
"0.4505133"
] | 0.6706934 | 0 |
20030709AH Retrieve and return the ActionForm bean associated with this mapping, creating and stashing one if necessary. If there is no form bean associated with this mapping, return null. This subclass of RequestProcessor will also search for ActionForm in an OperationContext object stored in session scope under an attribute identified by OperationConstant.ID_PARAMETER. Currently only one ActionForm is supported at a time by this method. This search is done first and if it fails to find an action form, the normal superclass behaviour will be followed. 20030124: The behaviour has been modified slightly it seems there was a problem with opCon stored forms in that the first request, not having an opCon yet would cause the handling to be delegated to struts, which if a name was specified in the actionMapping would create and store an actionForm in the scope. We state scope=session for opCon forms its only half true (it is in the session just nested a bit ;>) so opCon forms ended up being given a shared reference in the session. Future requests for this type of form would thus return the same instance leading to concurrency issues. A property has been added to the GTActionMapping named 'deferFormCreation'. For forms in opCon it is therefore necessary to specify this property in the mapping as true in order to avoid such problems. If this mapping is specified for nonopCon forms, it results in the form never being retrieved by this method thus leaving it to the action to manage that on its own. For opCon forms, the form will be retrieved on subsequent requests related to that opCon. Its creation is the responsibility of the Action however. A side effect of this to be aware of is that if the form hasnt been supplied by the RequestProcessor then it can hardly be expected to be populated either... This also is the responsibility of the action for opCon forms. (Part of the price to be paid for the usefullness of opCons!) | protected ActionForm processActionForm(HttpServletRequest request,
HttpServletResponse response,
ActionMapping mapping)
{
String scope = mapping.getScope();
if(scope != null)
{
try
{
if(scope.equals("session"))
{
OperationContext opCon = OperationContext.getOperationContext(request);
if(opCon != null)
{
if(_log.isInfoEnabled())
{
_log.info("Looking for ActionForm in OperationContext[id=" + opCon.getOperationContextId() + "]"); //20030124AH
}
ActionForm form = opCon.getActionForm();
if(form != null)
{
if(_log.isInfoEnabled())
{
_log.info("Found ActionForm in OperationContext"); //20030124AH
}
return form;
}
else
{
if(_log.isWarnEnabled())
{
_log.warn("No ActionForm found in OperationContext"); //20030124AH
}
return null; //20030124AH
}
}
}
}
catch(OperationException e)
{
// OperationExceptions here are normal when we forward from a completed operation
// to the next action, so we ignore them.
}
catch(Throwable t)
{
if(_log.isErrorEnabled())
{
_log.error("Error caught in processActionForm() performing customised ActionForm handling", t); //20030124AH
}
}
}
if(mapping instanceof GTActionMapping)
{ //20030124AH - Check the mapping to see if we should defer form creation or do it as normal
if( ((GTActionMapping)mapping).isDeferFormCreation() )
{
if(_log.isInfoEnabled())
{
_log.info("Deferring ActionForm creation");
}
return null;
}
}
//...
if(_log.isInfoEnabled())
{
_log.info("Delegating to superclass to obtain ActionForm"); //20030124AH
}
ActionForm form = super.processActionForm(request, response, mapping);
return form;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected ActionForm getActionForm(ActionMapping mapping,\r\n\t\t\tHttpServletRequest request) {\r\n\t\tActionForm actionForm = null;\r\n\r\n\t\t// Remove the obsolete form bean\r\n\t\tif (mapping.getAttribute() != null) {\r\n\t\t\tif (\"request\".equals(mapping.getScope())) {\r\n\t\t\t\tactionForm = (ActionForm) request.getAttribute(mapping\r\n\t\t\t\t\t\t.getAttribute());\r\n\t\t\t} else {\r\n\t\t\t\tHttpSession session = request.getSession();\r\n\r\n\t\t\t\tactionForm = (ActionForm) session.getAttribute(mapping\r\n\t\t\t\t\t\t.getAttribute());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn actionForm;\r\n\t}",
"protected ActionForward processActionPerform(HttpServletRequest request,\n HttpServletResponse response,\n Action action,\n ActionForm form,\n ActionMapping mapping)\n throws IOException, ServletException\n { //20030502AH - Copied from struts src, with extra code added \n try\n {\n if(mapping instanceof GTActionMapping)\n {\n //20050317AH - mod to also check for asdmin rights where spec'd in mapping\n GTActionMapping gtMapping = (GTActionMapping)mapping;\n boolean needsSession = gtMapping.isRequiresGtSession() ||gtMapping.isRequiresAdmin() \n \t\t\t\t\t\t\t\t\t\t\t\t|| gtMapping.isRequiresP2P() || gtMapping.isRequiresUDDI();\n if( needsSession )\n {\n //We will try to obtain a reference to the IGTSession using the method provided\n //in StaticWebUtils. This will throw a NoSessionException if we have no IGTSession.\n //By putting this check here it will be captured as though it was thrown by the action.\n IGTSession gtasSession = StaticWebUtils.getGridTalkSession(request);\n //NSL20060424 Check for P2P and UDDI requirement\n if (gtMapping.isRequiresP2P() && gtasSession.isNoP2P())\n {\n \tthrow new IllegalStateException(\"P2P functionality access required for mapped path \"+gtMapping.getPath());\n }\n if (gtMapping.isRequiresUDDI() && gtasSession.isNoUDDI())\n {\n \tthrow new IllegalStateException(\"UDDI functionality access required for mapped path \"+gtMapping.getPath());\n }\n if(gtMapping.isRequiresAdmin() && !gtasSession.isAdmin())\n {\n throw new IllegalStateException(\"Admin access required for mapped path \" + gtMapping.getPath());\n }\n }\n }\n return (action.execute(mapping, form, request, response));\n }\n catch (Exception e)\n {\n return (processException(request, response,e, form, mapping));\n }\n \n }",
"public ActionForward execute(ActionMapping actionMapping,\r\n\t\t\tActionForm actionForm, HttpServletRequest httpServletRequest,\r\n\t\t\tHttpServletResponse httpServletResponse) {\r\n\r\n\t\tActionForward retorno = actionMapping.findForward(\"inserirCobrancaSituacao\");\r\n\r\n\t\tInserirCobrancaSituacaoActionForm inserirCobrancaSituacaoActionForm = (InserirCobrancaSituacaoActionForm) actionForm;\r\n\t\t\r\n\t\t\r\n\t\t//Motivo de Revisao da Conta\r\n\t\t FiltroContaMotivoRevisao filtroContaMotivoRevisao = new FiltroContaMotivoRevisao();\r\n\t \r\n\t\t filtroContaMotivoRevisao.setCampoOrderBy(FiltroContaMotivoRevisao.ID);\r\n\t \r\n\t\t filtroContaMotivoRevisao.adicionarParametro(new ParametroSimples(\r\n\t\t\t\t FiltroContaMotivoRevisao.INDICADOR_USO,\r\n\t \t\tConstantesSistema.INDICADOR_USO_ATIVO));\r\n\t \r\n\t Collection colecaoPesquisa = null;\r\n\t \r\n\t //Retorna tipo de situacao especial de faturamento\r\n\t colecaoPesquisa = this.getFachada().pesquisar(filtroContaMotivoRevisao,\r\n\t \t\t ContaMotivoRevisao.class.getName());\r\n\t \r\n\t if (colecaoPesquisa == null || colecaoPesquisa.isEmpty()) {\r\n\t //Nenhum registro na tabela leitura_anormalidade_consumo foi encontrado\r\n\t throw new ActionServletException(\r\n\t \"atencao.pesquisa.nenhum_registro_tabela\", null,\r\n\t \"Motivo de Revisão da Conta\");\r\n\t } else {\r\n\t httpServletRequest.setAttribute(\"colecaoContaMotivoRevisao\", colecaoPesquisa);\r\n\t }\r\n\t \r\n\t //Profissão\r\n\t FiltroProfissao filtroProfissao = new FiltroProfissao();\r\n\t filtroProfissao.setCampoOrderBy(FiltroProfissao.ID);\r\n\t filtroProfissao.adicionarParametro(new ParametroSimples(\r\n\t \t\tFiltroProfissao.INDICADOR_USO,\r\n\t \t\t\tConstantesSistema.INDICADOR_USO_ATIVO));\r\n\t Collection colecaoProfissao = null;\r\n\t colecaoProfissao = this.getFachada().pesquisar(filtroProfissao, \r\n\t \t\tProfissao.class.getName());\r\n\t \r\n\t if ( colecaoProfissao == null || colecaoProfissao.isEmpty() ) {\r\n\t \tthrow new ActionServletException (\r\n\t \t\t\t\"atencao.pesquisa.nenhum_registro_tabela\", null,\r\n\t \"Profissão\");\r\n\t } else {\r\n\t \thttpServletRequest.setAttribute(\"colecaoProfissao\", colecaoProfissao );\r\n\t }\r\n\t \r\n\t //Ramo Atividade\r\n\t FiltroRamoAtividade filtroRamoAtividade = new FiltroRamoAtividade();\r\n\t filtroRamoAtividade.setCampoOrderBy(FiltroRamoAtividade.ID);\r\n\t filtroRamoAtividade.adicionarParametro(new ParametroSimples(\r\n\t \t\tFiltroRamoAtividade.INDICADOR_USO,\r\n\t \t\t\tConstantesSistema.INDICADOR_USO_ATIVO));\r\n\t Collection colecaoRamoAtividade = null;\r\n\t colecaoRamoAtividade = this.getFachada().pesquisar(filtroRamoAtividade, \r\n\t \t\tRamoAtividade.class.getName());\r\n\t \r\n\t if ( colecaoRamoAtividade == null || colecaoRamoAtividade.isEmpty() ) {\r\n\t \tthrow new ActionServletException (\r\n\t \t\t\t\"atencao.pesquisa.nenhum_registro_tabela\", null,\r\n\t \"Ramo Atividade\");\r\n\t } else {\r\n\t \thttpServletRequest.setAttribute(\"colecaoRamoAtividade\", colecaoRamoAtividade );\r\n\t }\r\n\t \r\n if (httpServletRequest.getParameter(\"menu\") != null && httpServletRequest.getParameter(\"menu\").equals(\"sim\")) {\r\n \tinserirCobrancaSituacaoActionForm.setIndicadorBloqueioParcelamento(ConstantesSistema.NAO);\r\n \tinserirCobrancaSituacaoActionForm.setIndicadorExigenciaAdvogado(ConstantesSistema.NAO); \r\n \tinserirCobrancaSituacaoActionForm.setIndicadorBloqueioInclusao(ConstantesSistema.NAO);\r\n \tinserirCobrancaSituacaoActionForm.setIndicadorBloqueioRetirada(ConstantesSistema.NAO);\r\n \tinserirCobrancaSituacaoActionForm.setIndicadorSelecaoApenasComPermissao(ConstantesSistema.NAO);\r\n \tinserirCobrancaSituacaoActionForm.setIndicadorPrescricaoImoveisParticulares( new Integer(ConstantesSistema.NAO.toString()));\r\n \tinserirCobrancaSituacaoActionForm.setIndicadorNaoIncluirImoveisEmCobrancaResultado( new Integer(ConstantesSistema.NAO.toString()));\r\n }\r\n \r\n \r\n\t\treturn retorno;\r\n\t}",
"public ActionForward init(ActionMapping mapping, ActionForm form,\n\t\t\tHttpServletRequest request, HttpServletResponse response) {\n\n\t\tHttpSession session = request.getSession();\n\t\tif (session.getAttribute(\"admin\") == null) {\n\t\t\treturn mapping.findForward(\"wrong\");\n\t\t} else {\n\t\t\tMessageService messageService = new MessageService();\n\t\t\tList<Message> msglist = messageService.getMessage();\n\t\t\trequest.setAttribute(\"msglist\", msglist);\n\t\t\tif (session.getAttribute(\"message\") != null) {\n\t\t\t\trequest.removeAttribute(\"message\");\n\t\t\t}\n\t\t\tOrderService orderService = new OrderService();\n\t\t\tint back = orderService.getOrderCount();\n\t\t\trequest.setAttribute(\"count\", back);\n\t\t\treturn mapping.findForward(\"list\");\n\t\t}\n\t}",
"protected void processPopulate(HttpServletRequest request,\n HttpServletResponse response,\n ActionForm form,\n ActionMapping mapping)\n throws ServletException\n {\n if(form != null)\n {\n if(mapping instanceof GTActionMapping)\n { //20030124AH\n if( ((GTActionMapping)mapping).isPopulate() == false )\n {\n return; //Do not pass go. Do not collect $200.\n }\n }\n super.processPopulate(request,response,form,mapping);\n }\n else\n {\n return; //No form to populate\n }\n }",
"public ActionForward execute(ActionMapping actionMapping,\r\n\t\t\tActionForm actionForm, HttpServletRequest httpServletRequest,\r\n\t\t\tHttpServletResponse httpServletResponse) {\r\n\r\n\t\tActionForward retorno = null;\r\n\r\n\t\tInserirQualidadeAguaActionForm form = (InserirQualidadeAguaActionForm) actionForm;\r\n\r\n\t\t// [FS0001 - VALIDAR REFERÊNCIA]\r\n\t\tif ((form.getReferencia() != null && !form.getReferencia().equals(\"\"))) {\r\n\r\n\t\t\tString anoMesReferencia = Util.formatarMesAnoParaAnoMesSemBarra(form.getReferencia());\r\n\t\t\t\r\n\t\t\tSistemaParametro sistemaParametro = this.getFachada().pesquisarParametrosDoSistema();\r\n\t\t\tString anoMesFuturo = \r\n\t\t\t\t\"\"+Util.somaUmMesAnoMesReferencia(sistemaParametro.getAnoMesFaturamento());\r\n\t\t\t\r\n\t\t\tif (Util.compararAnoMesReferencia(anoMesReferencia,anoMesFuturo,\">\")){\r\n\t\t\t\thttpServletRequest.setAttribute(\"nomeCampo\", \"referencia\");\t\r\n\t\t\t\tthrow new ActionServletException(\"atencao.mes_ano_menor\");\r\n\t\t\t} \r\n\r\n\t\t}\r\n\r\n\t\t// Setor Comercial\r\n\r\n\t\tif (form.getIdSetorComercial() != null\r\n\t\t\t\t&& !form.getIdSetorComercial().toString().trim()\r\n\t\t\t\t\t\t.equalsIgnoreCase(\"\")) {\r\n\t\t\tif (form.getIdSetorComercial() != null\r\n\t\t\t\t\t&& !form.getIdLocalidade().toString().trim()\r\n\t\t\t\t\t\t\t.equalsIgnoreCase(\"\")) {\r\n\r\n\t\t\t\tFiltroSetorComercial filtroSetorComercial = new FiltroSetorComercial();\r\n\r\n\t\t\t\tfiltroSetorComercial.limparListaParametros();\r\n\r\n\t\t\t\tfiltroSetorComercial.adicionarParametro(new ParametroSimples(\r\n\t\t\t\t\t\tFiltroSetorComercial.INDICADORUSO,\r\n\t\t\t\t\t\tConstantesSistema.INDICADOR_USO_ATIVO));\r\n\t\t\t\tfiltroSetorComercial.adicionarParametro(new ParametroSimples(\r\n\t\t\t\t\t\tFiltroSetorComercial.ID_LOCALIDADE, new Integer(form\r\n\t\t\t\t\t\t\t\t.getIdLocalidade())));\r\n\t\t\t\tfiltroSetorComercial.adicionarParametro(new ParametroSimples(\r\n\t\t\t\t\t\tFiltroSetorComercial.CODIGO_SETOR_COMERCIAL,\r\n\t\t\t\t\t\tnew Integer(form.getIdSetorComercial())));\r\n\r\n\t\t\t\tCollection colecaoSetorComerciais = this.getFachada()\r\n\t\t\t\t\t\t.pesquisar(filtroSetorComercial,\r\n\t\t\t\t\t\t\t\tSetorComercial.class.getName());\r\n\r\n\t\t\t\tif (colecaoSetorComerciais == null\r\n\t\t\t\t\t\t|| colecaoSetorComerciais.isEmpty()) {\r\n\t\t\t\t\tthrow new ActionServletException(\r\n\t\t\t\t\t\t\t\"atencao.setor_comercial.inexistente\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Verifica qual é o próximo passo para a execução do processo\r\n\t\t// String destinoPagina = httpServletRequest.getParameter(\"destino\");\r\n\r\n\t\treturn retorno;\r\n\r\n\t}",
"public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {\n\t\tActionForward retorno = actionMapping.findForward(\"telaSucesso\");\r\n\r\n\t\tInserirProcessoMensalEventualActionForm inserirProcessoMensalEventualActionForm = (InserirProcessoMensalEventualActionForm) actionForm;\r\n\r\n\t\tFachada fachada = Fachada.getInstancia();\r\n\r\n\t\tint idProcesso = Integer.parseInt(inserirProcessoMensalEventualActionForm.getIdProcesso());\r\n\t\t\r\n\t\tFiltroProcesso filtro = new FiltroProcesso();\r\n\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroProcesso.ID, Integer.valueOf(idProcesso)));\r\n\t\t\r\n\t\tCollection lista = fachada.pesquisar(filtro, Processo.class.getName());\r\n\t\t\r\n\t\tProcesso processo = (Processo) lista.iterator().next();\r\n\t\t\r\n\t\tif (processo.isExcluido()){\r\n\t\t\tthrow new ActionServletException(\"atencao.processo_excluido\");\r\n\t\t}\r\n\t\t\r\n\t\tString dataAgendamento = inserirProcessoMensalEventualActionForm.getDataAgendamento();\r\n\t\tString horaAgendamento = inserirProcessoMensalEventualActionForm.getHoraAgendamento();\r\n\t\tString idProcessoIniciadoPrecedenteRequest = inserirProcessoMensalEventualActionForm.getIdProcessoIniciadoPrecedente();\r\n\t\tInteger idProcessoIniciadoPrecedente = null;\r\n\t\t\r\n\t\tif (idProcessoIniciadoPrecedenteRequest != null && !idProcessoIniciadoPrecedenteRequest.trim().equals(\"\")) {\r\n\t\t\tidProcessoIniciadoPrecedente = Integer.parseInt(idProcessoIniciadoPrecedenteRequest);\r\n\t\t}\r\n\r\n\t\tProcessoIniciado processoIniciado = new ProcessoIniciado();\r\n\r\n\t\tSimpleDateFormat formatoDataHora = new SimpleDateFormat(\"dd/MM/yyyy k:mm:ss\");\r\n\r\n\t\ttry {\r\n\t\t\tif (dataAgendamento != null && !dataAgendamento.equals(\"\") && horaAgendamento != null && !horaAgendamento.equals(\"\")) {\r\n\t\t\t\tprocessoIniciado.setDataHoraAgendamento(formatoDataHora.parse(dataAgendamento + \" \" + horaAgendamento));\r\n\t\t\t}\r\n\t\t} catch (ParseException e) {\r\n\t\t\tthrow new ActionServletException(\"erro.sistema\");\r\n\t\t}\r\n\r\n\t\tProcessoSituacao processoSituacao = new ProcessoSituacao();\r\n\r\n\t\tprocessoIniciado.setProcesso(processo);\r\n\t\tprocessoIniciado.setProcessoSituacao(processoSituacao);\r\n\r\n\t\tif (idProcessoIniciadoPrecedente != null) {\r\n\t\t\tProcessoIniciado processoIniciadoPrecedente = new ProcessoIniciado();\r\n\t\t\tprocessoIniciadoPrecedente.setId(idProcessoIniciadoPrecedente);\r\n\r\n\t\t\tprocessoIniciado.setProcessoIniciadoPrecedente(processoIniciadoPrecedente);\r\n\t\t}\r\n\r\n\t\t//Falta setar o usuário real\r\n\t\tprocessoIniciado.setUsuario(this.getUsuarioLogado(httpServletRequest));\r\n\r\n\t\tInteger codigoProcessoIniciadoGerado = (Integer) fachada.inserirProcessoIniciado(processoIniciado);\r\n\r\n\t\tmontarPaginaSucesso(httpServletRequest, \"Processo Iniciado de código \"\r\n\t\t\t\t+ codigoProcessoIniciadoGerado + \" inserido com sucesso.\",\r\n\t\t\t\t\"Inserir outro Processo\", \"exibirInserirProcessoAction.do\");\r\n\r\n\t\treturn retorno;\r\n\t}",
"@Override\r\n\tpublic ActionForward to_objectNew(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows KANException {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic ActionForward execute(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows Exception {\n\t\t\r\n\t\tPrognosisFormBean formBean = (PrognosisFormBean) form;\r\n String forwardAction = ActionConstant.NONE;\r\n\t\tString command = request.getParameter(\"command\");\r\n\r\n\t\t//session expired checking\r\n\t\tif (request.getSession().getAttribute(MiscConstant.USER_SESSION) == null) {\r\n\t\t\tforwardAction = ActionConstant.SHOW_AJAX_EXPIRED;\r\n\t\t} else {\r\n\t\t\tif (command!=null) {\r\n\t\t\t\t\r\n\t\t\t\tint module = ModuleConstant.PROGNOSIS;\r\n\t\t\t\t\r\n\t\t\t\tif (command.equalsIgnoreCase(ParamConstant.AJAX_GO_TO_CHILD)) {\t\t\r\n\t\t\t\t\t//fetch the data\r\n\t\t\t\t\t\r\n\t\t\t\t\tint patientSystemCaseId = Integer.parseInt(request.getParameter(\"patientSystemCaseId\"));\r\n\t\t\t\t\t\r\n\t\t\t\t\tPrognosis model = new Prognosis();\r\n\t\t\t\t\tmodel.setPatientCaseSystemId(patientSystemCaseId);\r\n\t\t\t\t\t\r\n\t\t\t\t\tHashMap<String,Object> dataMap = new HashMap<String, Object>();\r\n\t\t\t dataMap.put(MapConstant.MODULE, module);\r\n\t\t\t dataMap.put(MapConstant.CLASS_DATA, model);\r\n\t\t\t dataMap.put(MapConstant.ACTION, ActionConstant.GET_DATA);\r\n\t\t\t \r\n\t\t\t ServiceManager service = new ServiceManagerImpl();\r\n\t\t\t Map<String, Object> resultMap = service.executeRequest(dataMap);\r\n\t\t\t\t\t\r\n\t\t\t if (resultMap!=null && !resultMap.isEmpty()) {\r\n\t\t\t\t model = (Prognosis) resultMap.get(MapConstant.CLASS_DATA);\t\t \t\t\r\n\t\t\t \tformBean.populateFormBean(model);\r\n\t\t\t } else {\r\n\t\t\t \tformBean.setPatientCaseSystemId(model.getPatientCaseSystemId());\r\n\t\t\t }\r\n\r\n\t\t\t\t\tformBean.setTransactionStatus(false);\r\n\t\t\t\t\tformBean.setTransactionMessage(MiscConstant.TRANS_MESSSAGE_RESET);\r\n\t\t\t\t\tforwardAction = ActionConstant.SHOW_AJAX_ADD;\t\r\n\t\t\t\t} else if (command.equalsIgnoreCase(ParamConstant.AJAX_SAVE)) {\r\n\t\t\t\t\t//populateModel\r\n\t\t\t\t\tPrognosis model = (Prognosis) formBean.populateModel(formBean);\r\n\t\t\t\t\t\r\n\t\t\t\t\tUser user = (User) request.getSession().getAttribute(MiscConstant.USER_SESSION);\r\n\t\t\t\t\t\r\n\t\t\t\t\tHashMap<String,Object> dataMap = new HashMap<String, Object>();\r\n\t\t\t dataMap.put(MapConstant.MODULE, module);\r\n\t\t\t dataMap.put(MapConstant.CLASS_DATA, model);\r\n\t\t\t dataMap.put(MapConstant.USER_SESSION_DATA, user);\r\n\t\t\t \r\n\t\t\t \r\n\t\t\t if (model.getId()==0) {//diagnosisid in form\r\n\t\t\t \tdataMap.put(MapConstant.ACTION, ActionConstant.SAVE);\r\n\t\t\t } else {\r\n\t\t\t \tdataMap.put(MapConstant.ACTION, ActionConstant.UPDATE);\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t \r\n\t\t\t ServiceManager service = new ServiceManagerImpl();\r\n\t\t\t Map<String, Object> resultMap = service.executeRequest(dataMap);\r\n\t\t\t \r\n\t\t\t if (resultMap!=null && !resultMap.isEmpty()) {\r\n\t\t\t \t//check resultmap action status\r\n\t\t\t \tboolean transactionStatus = (boolean) resultMap.get(MapConstant.TRANSACTION_STATUS);\r\n\r\n\t\t\t \tformBean.setTransactionStatus(transactionStatus);\r\n\t\t\t \t\r\n\t\t\t \t\t\t\r\n\t\t\t \tif (transactionStatus) {\r\n\t\t\t \t\t//show success page\r\n\t\t\t \t\t//add confirmation message\r\n\t\t\t \t\t\t\t \t\t\r\n\t\t\t \t\tif (dataMap.get(MapConstant.ACTION).equals(ActionConstant.SAVE)) {\r\n\t\t\t \t\t\tformBean.setTransactionMessage(MiscConstant.TRANS_MESSSAGE_SAVED);\r\n\t\t\t \t\t\tPIBSUtils.writeLogInfo(logger, MiscConstant.TRANS_MESSSAGE_SAVED+\" - \"+module);\r\n\t\t\t \t\t\t//logger.info(MiscConstant.TRANS_MESSSAGE_SAVED);\r\n\t\t\t \t\t}else {\r\n\t\t\t \t\t\tformBean.setTransactionMessage(MiscConstant.TRANS_MESSSAGE_UPDATED);\r\n\t\t\t \t\t\tPIBSUtils.writeLogInfo(logger, MiscConstant.TRANS_MESSSAGE_UPDATED+\" - \"+module);\r\n\t\t\t \t\t\t//logger.info(MiscConstant.TRANS_MESSSAGE_UPDATED);\r\n\t\t\t \t\t}\r\n\t\t\t \t\t\r\n\r\n\t\t\t \t\t//update the diagnosis id in the form\r\n\t\t\t \t\tservice = null;\r\n\t\t\t \t\tresultMap = null;\r\n\t\t\t \t\t\r\n\t\t\t \t\tmodel = new Prognosis();\r\n\t\t\t\t\t\t\tmodel.setPatientCaseSystemId(formBean.getPatientCaseSystemId());\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tdataMap = new HashMap<String, Object>();\r\n\t\t\t\t\t dataMap.put(MapConstant.MODULE, module);\r\n\t\t\t\t\t dataMap.put(MapConstant.CLASS_DATA, model);\r\n\t\t\t\t\t dataMap.put(MapConstant.ACTION, ActionConstant.GET_DATA);\r\n\t\t\t\t\t \r\n\t\t\t\t\t service = new ServiceManagerImpl();\r\n\t\t\t\t\t resultMap = service.executeRequest(dataMap);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t if (resultMap!=null && !resultMap.isEmpty()) {\r\n\t\t\t\t\t\t model = (Prognosis) resultMap.get(MapConstant.CLASS_DATA);\t\t \t\t\r\n\t\t\t\t\t \tformBean.populateFormBean(model);\r\n\t\t\t\t\t }\r\n\t\t\t \t\t\r\n\t\t\t \t\tforwardAction = ActionConstant.AJAX_SUCCESS;\r\n\t\t\t \t} else {\r\n\t\t\t \t\tformBean.setTransactionMessage(MiscConstant.TRANS_MESSSAGE_ERROR);\r\n\t\t\t \t\t//logger.info(MiscConstant.TRANS_MESSSAGE_ERROR);\r\n\t\t\t \t\tPIBSUtils.writeLogInfo(logger, MiscConstant.TRANS_MESSSAGE_ERROR+\" - \"+module);\r\n\t\t\t \t\tforwardAction = ActionConstant.AJAX_FAILED;\r\n\t\t\t \t}\r\n\t\t\t }\r\n\t\t\t\t\t\r\n\t\t\t\t} \r\n\t\t\t} else {\r\n\t\t\t\t//show main screen\r\n\t\t\t\t forwardAction = ActionConstant.SHOW_AJAX_MAIN;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn mapping.findForward(forwardAction);\r\n\t}",
"public ActionForward execute(ActionMapping actionMapping,\r\n\t\t\tActionForm actionForm, HttpServletRequest httpServletRequest,\r\n\t\t\tHttpServletResponse httpServletResponse) {\n\t\tActionForward retorno = actionMapping\r\n\t\t\t\t.findForward(\"exibirGerarRelatorioRelacaoParcelamento\");\t\r\n\r\n\t\tFachada fachada = Fachada.getInstancia();\r\n\t\t\r\n\t\tGerarRelatorioRelacaoParcelamentoActionForm form = (GerarRelatorioRelacaoParcelamentoActionForm) actionForm;\r\n\t\t\r\n\t\tHttpSession sessao = httpServletRequest.getSession(false);\r\n\t\t\r\n\t\tif (form.getIdUnidadeOrganizacional() != null && !form.getIdUnidadeOrganizacional().equals(\"\")) {\r\n\t\t\t\r\n\t\t\tthis.pesquisarUnidadeOrganizacional(httpServletRequest, form);\r\n\t\t}else{\r\n\t\t\tform.setDescricaoUnidadeOrganizacional(\"\");\r\n\t\t}\r\n\t\t\r\n\t\t// Gerência Regional\r\n\t\tif(sessao.getAttribute(\"gerenciasRegionais\") == null){\r\n\t\t\tFiltroGerenciaRegional filtroGerenciaRegional = new FiltroGerenciaRegional();\r\n\t\t\tfiltroGerenciaRegional.adicionarParametro(new ParametroSimples(\r\n\t\t\t\t\tFiltroGerenciaRegional.INDICADOR_USO,\r\n\t\t\t\t\tConstantesSistema.INDICADOR_USO_ATIVO));\r\n\t\t\tCollection gerenciasRegionais = fachada.pesquisar(filtroGerenciaRegional,\r\n\t\t\t\t\tGerenciaRegional.class.getName());\r\n\t\t\t\r\n\t\t\tif (gerenciasRegionais == null || gerenciasRegionais.isEmpty()) {\r\n\t\t\t\tthrow new ActionServletException(\"atencao.naocadastrado\", null,\r\n\t\t\t\t\t\t\"Gerência Regional\");\r\n\t\t\t} else {\r\n\t\t\t\tsessao.setAttribute(\"gerenciasRegionais\", gerenciasRegionais);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Unidade de Negócio\r\n\t\tif(sessao.getAttribute(\"colecaoUnidadeNegocio\") == null){\r\n\t\t\tFiltroUnidadeNegocio filtroUnidadeNegocio = new FiltroUnidadeNegocio();\r\n\t\t\tfiltroUnidadeNegocio.adicionarParametro(new ParametroSimples(\r\n\t\t\t\t\tFiltroUnidadeNegocio.INDICADOR_USO,\r\n\t\t\t\t\tConstantesSistema.INDICADOR_USO_ATIVO));\r\n\t\t\tCollection colecaoUnidadeNegocio = fachada.pesquisar(filtroUnidadeNegocio,\r\n\t\t\t\t\tUnidadeNegocio.class.getName());\r\n\t\t\t\r\n\t\t\tif (colecaoUnidadeNegocio == null || colecaoUnidadeNegocio.isEmpty()) {\r\n\t\t\t\tthrow new ActionServletException(\"atencao.naocadastrado\", null,\r\n\t\t\t\t\t\t\"Unidade de Negócio\");\r\n\t\t\t} else {\r\n\t\t\t\tsessao.setAttribute(\"colecaoUnidadeNegocio\", colecaoUnidadeNegocio);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(sessao.getAttribute(\"colecaoSituacaoParcelamento\") == null){\r\n\t\t //Pesquisando Situação do parcelamento\r\n\t\t FiltroParcelamentoSituacao filtroParcelamentoSituacao = new FiltroParcelamentoSituacao();\r\n\t \r\n\t\t Collection colecaoSituacaoParcelamento = \r\n\t\t\t fachada.pesquisar(filtroParcelamentoSituacao, \r\n\t \t\t\tParcelamentoSituacao.class.getName()); \r\n\t\t\r\n\t\t if (colecaoSituacaoParcelamento == null || colecaoSituacaoParcelamento.isEmpty()) {\r\n\t\t \tthrow new ActionServletException(\"atencao.entidade_sem_dados_para_selecao\",\r\n\t\t\t\t\tnull, \"Situação do Parcelamento\");\r\n\t\t }\r\n\t\t\r\n\t\t sessao.setAttribute(\"colecaoSituacaoParcelamento\",colecaoSituacaoParcelamento);\r\n\t\t}\r\n\t\t\r\n\t\t// Pesquisando local de instalação\r\n\t\tFiltroParcelamentoMotivoDesfazer filtroParcelamentoMotivoDesfazer = new FiltroParcelamentoMotivoDesfazer();\r\n\r\n\t\tCollection colecaoMotivoDesfazimento = fachada\r\n\t\t\t\t.pesquisar(filtroParcelamentoMotivoDesfazer,\r\n\t\t\t\t\t\tParcelamentoMotivoDesfazer.class.getName());\r\n\r\n\t\tif (colecaoMotivoDesfazimento == null || colecaoMotivoDesfazimento.isEmpty()) {\r\n\t\t\tthrow new ActionServletException(\r\n\t\t\t\t\t\"atencao.entidade_sem_dados_para_selecao\", null, \"Situação do Parcelamento\");\r\n\t\t}\r\n\r\n\t\thttpServletRequest.setAttribute(\"colecaoMotivoDesfazimento\", colecaoMotivoDesfazimento);\r\n\t\t\r\n\t\t\r\n\t\tif(httpServletRequest.getParameter(\"idSituacaoParcelamento\") != null){\r\n\t\t\tInteger idSituacaoParcelamento = new Integer(httpServletRequest.getParameter(\"idSituacaoParcelamento\"));\t\r\n\t\t\tif(idSituacaoParcelamento.equals(ParcelamentoSituacao.DESFEITO)){\r\n\t\t\t\thttpServletRequest.setAttribute(\"Desfeito\", \"sim\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tString idLocalidade = form.getIdLocalidade();\r\n\t\t\r\n\t\tif (idLocalidade != null && !idLocalidade.trim().equals(\"\")) {\r\n\t\t\tFiltroLocalidade filtroLocalidade = new FiltroLocalidade();\r\n\t\t\tfiltroLocalidade.adicionarParametro(new ParametroSimples(\r\n\t\t\t\t\tFiltroLocalidade.ID, idLocalidade));\r\n\r\n\t\t\tCollection colecaoLocalidade = fachada.pesquisar(\r\n\t\t\t\t\tfiltroLocalidade, Localidade.class.getName());\r\n\r\n\t\t\tif (colecaoLocalidade != null && !colecaoLocalidade.isEmpty()) {\r\n\t\t\t\tLocalidade localidade = (Localidade) colecaoLocalidade\r\n\t\t\t\t\t\t.iterator().next();\r\n\r\n\t\t\t\tform.setIdLocalidade(idLocalidade);\r\n\t\t\t\tform.setDescricaoLocalidade(localidade.getDescricao());\r\n\r\n\t\t\t} else {\r\n\t\t\t\tform.setIdLocalidade(\"\");\r\n\t\t\t\tform.setDescricaoLocalidade(\"LOCALIDADE INEXISTENTE\");\r\n\t\t\t\thttpServletRequest.setAttribute(\"localidadeInexistente\",\r\n\t\t\t\t\t\ttrue);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tform.setDescricaoLocalidade(\"\");\r\n\t\t}\r\n\t\t\r\n\t\tString codigoSetorComercial = form.getIdSetorComercial();\r\n\t\t\r\n\t\tif (codigoSetorComercial != null && !codigoSetorComercial.trim().equals(\"\")) {\r\n\t\t\tFiltroSetorComercial filtroSetorComercial = new FiltroSetorComercial();\r\n\t\t\tfiltroSetorComercial.adicionarParametro(new ParametroSimples(\r\n\t\t\t\t\tFiltroSetorComercial.ID_LOCALIDADE, idLocalidade));\r\n\t\t\t\r\n\t\t\tfiltroSetorComercial.adicionarParametro(new ParametroSimples(\r\n\t\t\t\t\tFiltroSetorComercial.CODIGO_SETOR_COMERCIAL, codigoSetorComercial));\r\n\r\n\t\t\tCollection colecaosetoComercial = fachada.pesquisar(\r\n\t\t\t\t\tfiltroSetorComercial, SetorComercial.class.getName());\r\n\r\n\t\t\tif (colecaosetoComercial != null && !colecaosetoComercial.isEmpty()) {\r\n\t\t\t\tSetorComercial setorComercial = (SetorComercial) colecaosetoComercial\r\n\t\t\t\t\t\t.iterator().next();\r\n\r\n\t\t\t\tform.setIdSetorComercial(codigoSetorComercial);\r\n\t\t\t\tform.setDescricaoSetorComercial(setorComercial.getDescricao());\r\n\r\n\t\t\t} else {\r\n\t\t\t\tform.setIdSetorComercial(\"\");\r\n\t\t\t\tform.setDescricaoSetorComercial(\"SETOR COMERCIAL INEXISTENTE\");\r\n\t\t\t\thttpServletRequest.setAttribute(\"setorComercialInexistente\",true);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tform.setDescricaoSetorComercial(\"\");\r\n\t\t}\r\n \r\n\t\t\r\n\t\tthis.pesquisarPerfilImovel(httpServletRequest);\r\n\t\t/*\r\n\t\t * Felipe Santos\r\n\t\t * \r\n\t\t * Não há nenhuma localidade associada a um municipio (muni_idprincipal != null)\r\n\t\t */\r\n//\t\tthis.pesquisarMunicipioAssociado(httpServletRequest);\r\n\t\t\r\n\t\tif(httpServletRequest.getParameter(\"pesqperfilImoveluisarUsuarioResponsavel\")!=null\r\n\t\t\t\t&& httpServletRequest.getParameter(\"pesquisarUsuarioResponsavel\").toString().equalsIgnoreCase(\"SIM\")\r\n\t\t\t\t&& form.getIdUsuarioResponsavel()!=null \r\n\t\t\t\t&& !form.getIdUsuarioResponsavel().equals(\"\")){\r\n\t\t\t\r\n\t\t\tFiltroUsuario filtro = new FiltroUsuario();\r\n\t\t\t\r\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroUsuario.ID, form.getIdUsuarioResponsavel()));\r\n\t\t\t\r\n\t\t\tCollection<Usuario> colecaoUsuariosResponsaveis = fachada.pesquisar(filtro, Usuario.class.getName());\r\n\t\t\t\r\n\t\t\tif(colecaoUsuariosResponsaveis!=null && !colecaoUsuariosResponsaveis.isEmpty()){\r\n\t\t\t\tUsuario usuarioResponsavel = colecaoUsuariosResponsaveis.iterator().next();\r\n\t\t\t\t\r\n\t\t\t\tform.setIdUsuarioResponsavel(usuarioResponsavel.getId().toString());\r\n\t\t\t\tform.setDescricaoUsuarioResponsavel(usuarioResponsavel.getNomeUsuario());\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tform.setIdUsuarioResponsavel(\"\");\r\n\t\t\t\tform.setDescricaoUsuarioResponsavel(\"USUARIO INEXISTENTE\");\r\n\t\t\t\thttpServletRequest.setAttribute(\"usuarioResponsavelInexistente\",true);\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tif(httpServletRequest.getParameter(\"pesquisarUsuarioConfirmacao\")!=null\r\n\t\t\t\t&& httpServletRequest.getParameter(\"pesquisarUsuarioConfirmacao\").toString().equalsIgnoreCase(\"SIM\")\r\n\t\t\t\t&& form.getIdUsuarioConfirmacao()!=null \r\n\t\t\t\t&& !form.getIdUsuarioConfirmacao().equals(\"\")){\r\n\t\t\t\r\n\t\t\tFiltroUsuario filtro = new FiltroUsuario();\r\n\t\t\t\r\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroUsuario.ID, form.getIdUsuarioConfirmacao()));\r\n\t\t\t\r\n\t\t\tCollection<Usuario> colecaoUsuariosConfirmacao = fachada.pesquisar(filtro, Usuario.class.getName());\r\n\t\t\t\r\n\t\t\tif(colecaoUsuariosConfirmacao!=null && !colecaoUsuariosConfirmacao.isEmpty()){\r\n\t\t\t\tUsuario usuarioConfirmacao = colecaoUsuariosConfirmacao.iterator().next();\r\n\t\t\t\t\r\n\t\t\t\tform.setIdUsuarioConfirmacao(usuarioConfirmacao.getId().toString());\r\n\t\t\t\tform.setDescricaoUsuarioConfirmacao(usuarioConfirmacao.getNomeUsuario());\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tform.setIdUsuarioConfirmacao(\"\");\r\n\t\t\t\tform.setDescricaoUsuarioConfirmacao(\"USUARIO INEXISTENTE\");\r\n\t\t\t\thttpServletRequest.setAttribute(\"usuarioConfirmacaoInexistente\",true);\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif(form.getIndicadorConfirmacaoOperadora()==null){\r\n\t\t\tform.setIndicadorConfirmacaoOperadora(\"2\");\r\n\t\t}\r\n\t\t\r\n return retorno;\r\n \r\n\t}",
"@Override\r\n\tpublic ActionForward display(ActionMapping mapping, BaseForm form,\r\n\t\t\tString operation, HttpServletRequest request,\r\n\t\t\tHttpServletResponse response) {\r\n\r\n\t\tAuditUtil.getInstance().writeLog(\r\n\t\t\t\tAuditUtil.FILE_TYPE_G4G,\r\n\t\t\t\tnew StringBuffer(this.getClass().getName()).append(\r\n\t\t\t\t\t\tG4GConstants.CALLINGMETHOD).append(\r\n\t\t\t\t\t\tDataUtil.getCallingMethod()).append(\r\n\t\t\t\t\t\tG4GConstants.DISPLAY_STARTS)\r\n\t\t\t\t\t\t.append(G4GConstants.DASHES).append(\r\n\t\t\t\t\t\t\t\trequest.getSession().getId()).toString(),\r\n\t\t\t\tLevel.INFO);\r\n\t\tif (request.getSession().getAttribute(G4GConstants.USERDTO) == null) {\r\n\t\t\tAuditUtil.getInstance().writeLog(\r\n\t\t\t\t\tAuditUtil.FILE_TYPE_G4G,\r\n\t\t\t\t\tnew StringBuffer(this.getClass().getName()).append(\r\n\t\t\t\t\t\t\tG4GConstants.COLON_WITH_SPACES).append(\r\n\t\t\t\t\t\t\tDataUtil.getCurrentMethod()).append(\r\n\t\t\t\t\t\t\tG4GConstants.COLON_WITH_SPACES).append(G4GConstants.DASHES)\r\n\t\t\t\t\t\t\t.append(request.getSession().getId()).append(\r\n\t\t\t\t\t\t\t\t\tG4GConstants.USER_NOT_RECOGNIZE).append(\r\n\t\t\t\t\t\t\t\t\trequest.getSession().getId()).toString(),\r\n\t\t\t\t\tLevel.INFO);\r\n\t\t\treturn mapping.findForward(G4GConstants.HOMEPAGE);\r\n\t\t}\r\n\t\tList<OpenMatchDTO> matchList = new ArrayList<OpenMatchDTO>();\r\n\t\tUserDTO userDTO;\r\n\t\tGameDTO gameDTO = null;\r\n\t\tint playerId = G4GConstants.ZERO;\r\n\t\tGameDetailsForm gameDetailsForm = new GameDetailsForm();\r\n\t\tint gameId =G4GConstants.ZERO;\r\n\t\ttry {\r\n\t\t\tgameId = request.getParameter(G4GConstants.GAMEID) != null ? Integer\r\n\t\t\t\t\t.parseInt(request.getParameter(G4GConstants.GAMEID))\r\n\t\t\t\t\t: G4GConstants.ZERO;\r\n\t\t\tuserDTO = DataUtil.getUserDTO(request);\r\n\t\t\tplayerId = userDTO.getPlayerDTO().getId();\r\n\t\t\tAuditUtil.getInstance().writeLog(\r\n\t\t\t\t\tAuditUtil.FILE_TYPE_G4G,\r\n\t\t\t\t\tnew StringBuffer(this.getClass().getName()).append(\r\n\t\t\t\t\t\t\tCALLINGMETHOD).append(DataUtil.getCallingMethod())\r\n\t\t\t\t\t\t\t.append(DISPLAY_STARTS).append(DASHES).append(\r\n\t\t\t\t\t\t\t\t\tG4GConstants.GETTING_DETAILS).append(\r\n\t\t\t\t\t\t\t\t\trequest.getSession().getId()).toString());\r\n\t\t\t/* Getting game details as per the gameId */\r\n\t\t\tgameDTO = GameServiceDelegator.getGame(gameId);\r\n\t\t\tif(gameDTO == null){\r\n\t\t\t\treturn mapping.findForward(G4GConstants.GAMELOBBY);\r\n\t\t\t}\r\n\t\t\tAuditUtil.getInstance().writeLog(\r\n\t\t\t\t\tAuditUtil.FILE_TYPE_G4G,\r\n\t\t\t\t\tnew StringBuffer(this.getClass().getName()).append(\r\n\t\t\t\t\t\t\tCALLINGMETHOD).append(DataUtil.getCallingMethod())\r\n\t\t\t\t\t\t\t.append(DISPLAY_STARTS).append(DASHES).append(\r\n\t\t\t\t\t\t\t\t\tG4GConstants.THIS_IS_GAME).append(\r\n\t\t\t\t\t\t\t\t\tgameDTO.getGamename()).append(\r\n\t\t\t\t\t\t\t\t\trequest.getSession().getId()).toString());\r\n\r\n\t\t\t/* Getting match details for openMatches tab */\r\n\t\t\tmatchList = TwoPlayerTournamentServiceDelegator\r\n\t\t\t\t\t.getOpenMatchesDetails(gameId, playerId);\r\n\t\t\t/*\r\n\t\t\t * Form field allPlayers id populated with players having this\r\n\t\t\t * gameId\r\n\t\t\t */\r\n\t\t\tgameDetailsForm.setAllPlayers(PlayerServiceDelegator\r\n\t\t\t\t\t.getGameWisePlayersList(gameId));\r\n\t\t\tAuditUtil.getInstance().writeLog(\r\n\t\t\t\t\tAuditUtil.FILE_TYPE_G4G,\r\n\t\t\t\t\tnew StringBuffer(this.getClass().getName()).append(\r\n\t\t\t\t\t\t\tG4GConstants.GAME_ID_IS).append(gameId).toString());\r\n\r\n\t\t\trequest.setAttribute(G4GConstants.GAMEDETAILSFORM, gameDetailsForm);\r\n\t\t}catch(NumberFormatException e) {\r\n\t\t\tAuditUtil.getInstance().writeLog(\r\n\t\t\t\t\tAuditUtil.FILE_TYPE_G4G,\r\n\t\t\t\t\tnew StringBuffer(this.getClass().getName()).append(\r\n\t\t\t\t\t\t\tG4GConstants.COLON_WITH_SPACES).append(\r\n\t\t\t\t\t\t\tDataUtil.getCurrentMethod()).append(\r\n\t\t\t\t\t\t\tG4GConstants.COLON_WITH_SPACES).append(G4GConstants.DASHES)\r\n\t\t\t\t\t\t\t.append(request.getSession().getId()).append(\r\n\t\t\t\t\t\t\t\t\t\"No Game with this id\").append(\r\n\t\t\t\t\t\t\t\t\te.getMessage()).toString(),\r\n\t\t\t\t\tLevel.ERROR);\r\n\t\t\treturn mapping.findForward(G4GConstants.GAMELOBBY);\r\n\t\t} catch (NullPointerException exception) {\r\n\t\t\tAuditUtil.getInstance().writeLog(\r\n\t\t\t\t\tAuditUtil.FILE_TYPE_HIBERNATE,\r\n\t\t\t\t\tnew StringBuffer(this.getClass().getName()).append(\r\n\t\t\t\t\t\t\tG4GConstants.COLON_WITH_SPACES).append(\r\n\t\t\t\t\t\t\tDataUtil.getCurrentMethod()).append(\r\n\t\t\t\t\t\t\tG4GConstants.DASHES).append(exception.getMessage())\r\n\t\t\t\t\t\t\t.append(\r\n\t\t\t\t\t\t\t\t\tDataUtil.getUserDTO(request).getPlayerDTO()\r\n\t\t\t\t\t\t\t\t\t\t\t.getScreenname()).append(\r\n\t\t\t\t\t\t\t\t\trequest.getSession().getId()).toString(),\r\n\t\t\t\t\tLevel.ERROR);\r\n\t\t\tAuditUtil.getInstance().writeLog(\r\n\t\t\t\t\tAuditUtil.FILE_TYPE_G4G,\r\n\t\t\t\t\tnew StringBuffer(this.getClass().getName()).append(\r\n\t\t\t\t\t\t\tG4GConstants.COLON_WITH_SPACES).append(\r\n\t\t\t\t\t\t\tDataUtil.getCurrentMethod()).append(\r\n\t\t\t\t\t\t\tG4GConstants.DASHES).append(exception.getMessage())\r\n\t\t\t\t\t\t\t.append(\r\n\t\t\t\t\t\t\t\t\tDataUtil.getUserDTO(request).getPlayerDTO()\r\n\t\t\t\t\t\t\t\t\t\t\t.getScreenname()).append(\r\n\t\t\t\t\t\t\t\t\trequest.getSession().getId()).toString(),\r\n\t\t\t\t\tLevel.ERROR);\r\n\t\t}\r\n\r\n\t\tAuditUtil.getInstance().writeLog(\r\n\t\t\t\tAuditUtil.FILE_TYPE_G4G,\r\n\t\t\t\tnew StringBuffer(this.getClass().getName()).append(\r\n\t\t\t\t\t\tCALLINGMETHOD).append(DataUtil.getCallingMethod())\r\n\t\t\t\t\t\t.append(DASHES).append(G4GConstants.SET_FORM_FIELDS)\r\n\t\t\t\t\t\t.append(request.getSession().getId()).toString(),\r\n\t\t\t\tLevel.INFO);\r\n\t\trequest.setAttribute(G4GConstants.ALLPLAYERSLIST,\r\n\t\t\t\tPlayerServiceDelegator.getGameWisePlayersList(gameId));\r\n\t\trequest.setAttribute(G4GConstants.MATCHLIST, matchList);\r\n\t\trequest.setAttribute(G4GConstants.GAMEDTO, gameDTO);\r\n\t\t/*if (WidgetsServiceDelegator.getActivePlayers(G4GConstants.MAX_RECORDS,\r\n\t\t\t\tG4GConstants.MAX_PLAYED_IN_DAYS).size() > G4GConstants.ZERO) {\r\n\t\t\trequest.setAttribute(G4GConstants.ACTIVEPLAYERS, WidgetsAjaxImpl\r\n\t\t\t\t\t.getActivePlayers(G4GConstants.MAX_RECORDS,\r\n\t\t\t\t\t\t\tG4GConstants.MAX_PLAYED_IN_DAYS, request));\r\n\t\t} else {\r\n\t\t\trequest.setAttribute(G4GConstants.ACTIVEPLAYERS, null);\r\n\t\t}*/\r\n\t\tGameLobbyPageForm gameLobbyForm = new GameLobbyPageForm();\r\n\t\tList<ActivePlayersDTO> activePlayersList = WidgetsServiceDelegator\r\n\t\t.getActivePlayers(G4GConstants.MAX_RECORDS, G4GConstants.MAX_PLAYED_IN_DAYS);\r\n\t\tgameLobbyForm.setActivePlayers(activePlayersList);\r\n\r\n\t\tList<GameDTO> xbox360GamesList = WidgetsServiceDelegator.getMyLobby(\r\n\t\t\t\tplayerId, G4GConstants.NETWORK_XBOX360_LIST_KEY);\r\n\t\tgameLobbyForm.setXbox360Games(xbox360GamesList);\r\n\r\n\t\tList<GameDTO> ps2GamesList = WidgetsServiceDelegator.getMyLobby(\r\n\t\t\t\tplayerId, G4GConstants.NETWORK_PS2_ID_LIST_KEY);\r\n\t\tgameLobbyForm.setPs2Games(ps2GamesList);\r\n\r\n\t\tList<GameDTO> ps3GamesList = WidgetsServiceDelegator.getMyLobby(\r\n\t\t\t\tplayerId, G4GConstants.NETWORK_PS3_ID_LIST_KEY);\r\n\t\tgameLobbyForm.setPs3Games(ps3GamesList);\r\n\r\n\t\trequest.setAttribute(G4GConstants.GAME_LOBBY_PAGE_FORM, gameLobbyForm);\r\n\t\treturn mapping.findForward(G4GConstants.SUCCESS);\r\n\t}",
"public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)\r\n {\r\n final org.apache.struts.action.ActionErrors errors = super.validate(mapping, request);\r\n if (errors != null && !errors.isEmpty())\r\n {\r\n // we populate the current form with only the request parameters\r\n Object currentForm = request.getSession().getAttribute(\"form\");\r\n // if we can't get the 'form' from the session, try from the request\r\n if (currentForm == null)\r\n {\r\n currentForm = request.getAttribute(\"form\");\r\n }\r\n if (currentForm != null)\r\n {\r\n final java.util.Map parameters = new java.util.HashMap();\r\n for (final java.util.Enumeration names = request.getParameterNames(); names.hasMoreElements();)\r\n {\r\n final String name = String.valueOf(names.nextElement());\r\n parameters.put(name, request.getParameter(name));\r\n }\r\n try\r\n {\r\n org.apache.commons.beanutils.BeanUtils.populate(currentForm, parameters);\r\n }\r\n catch (java.lang.Exception populateException)\r\n {\r\n // ignore if we have an exception here (we just don't populate).\r\n }\r\n }\r\n }\r\n return errors;\r\n }",
"public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)\r\n {\r\n final org.apache.struts.action.ActionErrors errors = super.validate(mapping, request);\r\n if (errors != null && !errors.isEmpty())\r\n {\r\n // we populate the current form with only the request parameters\r\n Object currentForm = request.getSession().getAttribute(\"form\");\r\n // if we can't get the 'form' from the session, try from the request\r\n if (currentForm == null)\r\n {\r\n currentForm = request.getAttribute(\"form\");\r\n }\r\n if (currentForm != null)\r\n {\r\n final java.util.Map parameters = new java.util.HashMap();\r\n for (final java.util.Enumeration names = request.getParameterNames(); names.hasMoreElements();)\r\n {\r\n final String name = String.valueOf(names.nextElement());\r\n parameters.put(name, request.getParameter(name));\r\n }\r\n try\r\n {\r\n org.apache.commons.beanutils.BeanUtils.populate(currentForm, parameters);\r\n }\r\n catch (java.lang.Exception populateException)\r\n {\r\n // ignore if we have an exception here (we just don't populate).\r\n }\r\n }\r\n }\r\n return errors;\r\n }",
"public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)\r\n {\r\n final org.apache.struts.action.ActionErrors errors = super.validate(mapping, request);\r\n if (errors != null && !errors.isEmpty())\r\n {\r\n // we populate the current form with only the request parameters\r\n Object currentForm = request.getSession().getAttribute(\"form\");\r\n // if we can't get the 'form' from the session, try from the request\r\n if (currentForm == null)\r\n {\r\n currentForm = request.getAttribute(\"form\");\r\n }\r\n if (currentForm != null)\r\n {\r\n final java.util.Map parameters = new java.util.HashMap();\r\n for (final java.util.Enumeration names = request.getParameterNames(); names.hasMoreElements();)\r\n {\r\n final String name = String.valueOf(names.nextElement());\r\n parameters.put(name, request.getParameter(name));\r\n }\r\n try\r\n {\r\n org.apache.commons.beanutils.BeanUtils.populate(currentForm, parameters);\r\n }\r\n catch (java.lang.Exception populateException)\r\n {\r\n // ignore if we have an exception here (we just don't populate).\r\n }\r\n }\r\n }\r\n return errors;\r\n }",
"public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)\r\n {\r\n final org.apache.struts.action.ActionErrors errors = super.validate(mapping, request);\r\n if (errors != null && !errors.isEmpty())\r\n {\r\n // we populate the current form with only the request parameters\r\n Object currentForm = request.getSession().getAttribute(\"form\");\r\n // if we can't get the 'form' from the session, try from the request\r\n if (currentForm == null)\r\n {\r\n currentForm = request.getAttribute(\"form\");\r\n }\r\n if (currentForm != null)\r\n {\r\n final java.util.Map parameters = new java.util.HashMap();\r\n for (final java.util.Enumeration names = request.getParameterNames(); names.hasMoreElements();)\r\n {\r\n final String name = String.valueOf(names.nextElement());\r\n parameters.put(name, request.getParameter(name));\r\n }\r\n try\r\n {\r\n org.apache.commons.beanutils.BeanUtils.populate(currentForm, parameters);\r\n }\r\n catch (java.lang.Exception populateException)\r\n {\r\n // ignore if we have an exception here (we just don't populate).\r\n }\r\n }\r\n }\r\n return errors;\r\n }",
"public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)\r\n {\r\n final org.apache.struts.action.ActionErrors errors = super.validate(mapping, request);\r\n if (errors != null && !errors.isEmpty())\r\n {\r\n // we populate the current form with only the request parameters\r\n Object currentForm = request.getSession().getAttribute(\"form\");\r\n // if we can't get the 'form' from the session, try from the request\r\n if (currentForm == null)\r\n {\r\n currentForm = request.getAttribute(\"form\");\r\n }\r\n if (currentForm != null)\r\n {\r\n final java.util.Map parameters = new java.util.HashMap();\r\n for (final java.util.Enumeration names = request.getParameterNames(); names.hasMoreElements();)\r\n {\r\n final String name = String.valueOf(names.nextElement());\r\n parameters.put(name, request.getParameter(name));\r\n }\r\n try\r\n {\r\n org.apache.commons.beanutils.BeanUtils.populate(currentForm, parameters);\r\n }\r\n catch (java.lang.Exception populateException)\r\n {\r\n // ignore if we have an exception here (we just don't populate).\r\n }\r\n }\r\n }\r\n return errors;\r\n }",
"public ActionForward unspecified(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response)\n throws Exception {\n this.setup(mapping,form,request,response);\n \n return mapping.findForward(\"backToGeneExp\");\n }",
"@Override\r\n \tpublic ActionForward executeSecureAction(ActionMapping mapping, ActionForm form,\r\n \t\t\tHttpServletRequest request, HttpServletResponse response) throws IOException,\r\n \t\t\tServletException\r\n \t{\r\n \t\tsaveActionErrors(form, request);\r\n \t\t// //Gets the value of the operation parameter.\r\n \t\t// String operation = request.getParameter(Constants.OPERATION);\r\n \t\t//\r\n \t\t// //Sets the operation attribute to be used in the Add/Edit Institute\r\n \t\t// Page.\r\n \t\t// request.setAttribute(Constants.OPERATION, operation);\r\n \t\ttry\r\n \t\t{\r\n \t\t\tfinal IFactory factory = AbstractFactoryConfig.getInstance().getBizLogicFactory();\r\n \t\t\tfinal IBizLogic bizLogic = factory.getBizLogic(Constants.DEFAULT_BIZ_LOGIC);\r\n \r\n \t\t\t// ************* ForwardTo implementation *************\r\n \t\t\t// forwarded from Specimen page\r\n \t\t\tfinal HashMap forwardToHashMap = (HashMap) request.getAttribute(\"forwardToHashMap\");\r\n \t\t\tString specimenId = null;\r\n \t\t\tString specimenLabel = null;\r\n \t\t\tString specimenClass = null;\r\n \t\t\t// -------------Mandar 04-July-06 QuickEvents start\r\n \t\t\tString fromQuickEvent = (String) request.getAttribute(\"isQuickEvent\");\r\n \t\t\tif (fromQuickEvent == null)\r\n \t\t\t{\r\n \t\t\t\tfromQuickEvent = request.getParameter(\"isQuickEvent\");\r\n \t\t\t}\r\n \t\t\tString eventSelected = \"\";\r\n \t\t\tif (fromQuickEvent != null)\r\n \t\t\t{\r\n \t\t\t\tspecimenId = (String) request.getAttribute(Constants.SPECIMEN_ID);\r\n \t\t\t\teventSelected = (String) request.getAttribute(Constants.EVENT_SELECTED);\r\n \t\t\t\tif (eventSelected == null && forwardToHashMap != null)\r\n \t\t\t\t{\r\n \t\t\t\t\tspecimenClass = (String) forwardToHashMap.get(\"specimenClass\");\r\n \t\t\t\t\tspecimenId = (String) forwardToHashMap.get(\"specimenId\");\r\n \t\t\t\t\tif (specimenClass.equalsIgnoreCase(\"Tissue\"))\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\teventSelected = Constants.EVENT_PARAMETERS[14];\r\n \t\t\t\t\t}\r\n \t\t\t\t\telse if (specimenClass.equalsIgnoreCase(\"Molecular\"))\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\teventSelected = Constants.EVENT_PARAMETERS[9];\r\n \t\t\t\t\t}\r\n \t\t\t\t\telse if (specimenClass.equalsIgnoreCase(\"Cell\"))\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\teventSelected = Constants.EVENT_PARAMETERS[1];\r\n \t\t\t\t\t}\r\n \t\t\t\t\telse if (specimenClass.equalsIgnoreCase(\"Fluid\"))\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\teventSelected = Constants.EVENT_PARAMETERS[7];\r\n \t\t\t\t\t}\r\n \r\n \t\t\t\t}\r\n \t\t\t\trequest.setAttribute(Constants.EVENT_SELECTED, eventSelected);\r\n \t\t\t\t// System.out.println(\"::::::::::::::\\n\\n\\n\\n\"+form.getClass().\r\n \t\t\t\t// getName() );\r\n \t\t\t\tListSpecimenEventParametersForm eventForm = (ListSpecimenEventParametersForm) form;\r\n \t\t\t\tif (eventForm == null)\r\n \t\t\t\t{\r\n \t\t\t\t\teventForm = new ListSpecimenEventParametersForm();\r\n \t\t\t\t}\r\n \t\t\t\teventForm.setSpecimenEventParameter(eventSelected);\r\n \t\t\t\teventForm.setSpecimenId(specimenId.trim());\r\n \r\n \t\t\t}\r\n \t\t\t// -------------Mandar 04-July-06 QuickEvents end\r\n \t\t\tif (forwardToHashMap != null)\r\n \t\t\t{\r\n \t\t\t\t// Fetching SpecimenId from HashMap generated by\r\n \t\t\t\t// ForwardToProcessor\r\n \t\t\t\tspecimenId = (String) forwardToHashMap.get(\"specimenId\");\r\n \t\t\t\tspecimenLabel = (String) forwardToHashMap.get(Constants.SPECIMEN_LABEL);\r\n \t\t\t\tLogger.out.debug(\"SpecimenID found in \" + \"forwardToHashMap========>>>>>>\"\r\n \t\t\t\t\t\t+ specimenId);\r\n \t\t\t}\r\n \t\t\t// ************* ForwardTo implementation *************\r\n \r\n \t\t\t// If new SpecimenEvent is added, specimenId in forwardToHashMap\r\n \t\t\t// will be null, following code handles that case\r\n \t\t\tif (specimenId == null)\r\n \t\t\t{\r\n \t\t\t\tfinal String eventId = request.getParameter(\"eventId\");\r\n \r\n \t\t\t\t// Added by Vijay Pande. While cliking on events tab both\r\n \t\t\t\t// specimenId and eventId are getting null. Since there was no\r\n \t\t\t\t// check on eventId it was throwing error for following retrieve\r\n \t\t\t\t// call.\r\n \t\t\t\t// Null check is added for eventId. Fix for bug Id: 4731\r\n \t\t\t\tif (eventId != null)\r\n \t\t\t\t{\r\n \t\t\t\t\tLogger.out.debug(\"Event ID added===>\" + eventId);\r\n \t\t\t\t\t// Retrieving list of SpecimenEvents for added\r\n \t\t\t\t\t// SpecimenEventId\r\n \t\t\t\t\tfinal Object object = bizLogic.retrieve(\r\n \t\t\t\t\t\t\tSpecimenEventParameters.class.getName(), new Long(eventId));\r\n \r\n \t\t\t\t\tif (object != null)\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\t// Getting object of specimenEventParameters from the\r\n \t\t\t\t\t\t// list of SepcimenEvents\r\n \t\t\t\t\t\tfinal SpecimenEventParameters specimenEventParameters = (SpecimenEventParameters) object;\r\n \r\n \t\t\t\t\t\t// getting SpecimenId of SpecimenEventParameters\r\n \t\t\t\t\t\tfinal AbstractSpecimen specimen = specimenEventParameters.getSpecimen();\r\n \t\t\t\t\t\tspecimenId = specimen.getId().toString();\r\n \t\t\t\t\t\t// specimenLabel = specimen.getLabel();\r\n \t\t\t\t\t\tLogger.out.debug(\"Specimen of Event Added====>\"\r\n \t\t\t\t\t\t\t\t+ (specimenEventParameters.getSpecimen()).getId());\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t}\r\n \r\n \t\t\tif (specimenId == null)\r\n \t\t\t{\r\n \t\t\t\tspecimenId = request.getParameter(Constants.SPECIMEN_ID);\r\n \t\t\t\tspecimenLabel = request.getParameter(Constants.SPECIMEN_LABEL);\r\n \t\t\t}\r\n \t\t\tif (specimenId == null)\r\n \t\t\t{\r\n \t\t\t\tspecimenId = (String) request.getAttribute(Constants.SPECIMEN_ID);\r\n \t\t\t}\r\n \r\n \t\t\trequest.setAttribute(Constants.SPECIMEN_ID, specimenId);\r\n \r\n \t\t\tfinal Object object = bizLogic.retrieve(Specimen.class.getName(), new Long(specimenId));\r\n \r\n \t\t\tif (object != null)\r\n \t\t\t{\r\n \t\t\t\tfinal Specimen specimen = (Specimen) object;\r\n \t\t\t\tif (specimenLabel == null)\r\n \t\t\t\t{\r\n \t\t\t\t\tspecimenLabel = specimen.getLabel();\r\n \t\t\t\t}\r\n \t\t\t\t// Setting Specimen Event Parameters' Grid\r\n \r\n \t\t\t\t// Ashish - 4/6/07 --- Since lazy=true, retriving the events\r\n \t\t\t\t// collection.\r\n \t\t\t\tfinal Collection<SpecimenEventParameters> specimenEventCollection = this\r\n \t\t\t\t\t\t.getSpecimenEventParametersColl(specimenId, bizLogic);\r\n \t\t\t\tfinal Collection<ActionApplication> dynamicEventCollection = this\r\n \t\t\t\t\t\t.getDynamicEventColl(specimenId, bizLogic);\r\n \t\t\t\t/**\r\n \t\t\t\t * Name: Chetan Patil Reviewer: Sachin Lale Bug ID: Bug#4180\r\n \t\t\t\t * Patch ID: Bug#4180_1 Description: The values of event\r\n \t\t\t\t * parameter is stored in a Map and in turn the Map is stored in\r\n \t\t\t\t * a List. This is then sorted chronologically, using a date\r\n \t\t\t\t * value form the Map. After sorting the List of Map is\r\n \t\t\t\t * converted into the List of List, which is used on the UI for\r\n \t\t\t\t * displaying values form List on the grid.\r\n \t\t\t\t */\r\n \t\t\t\tif (dynamicEventCollection != null)\r\n \t\t\t\t{\r\n \t\t\t\t\tfinal List<Map<String, Object>> gridData = new ArrayList<Map<String, Object>>();\r\n \r\n \t\t\t\t\tfor (final ActionApplication actionApp : dynamicEventCollection)\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\tfinal Map<String, Object> rowDataMap = new HashMap<String, Object>();\r\n \t\t\t\t\t\tif (actionApp != null)\r\n \t\t\t\t\t\t{\r\n \t\t\t\t\t\t\t//final String[] events = EventsUtil\r\n \t\t\t\t\t\t\t//\t\t.getEvent(eventParameters);\r\n \t\t\t\t\t\t\tlong contId = actionApp.getApplicationRecordEntry().getFormContext()\r\n \t\t\t\t\t\t\t\t\t.getContainerId();\r\n \t\t\t\t\t\t\tList contList = AppUtility\r\n \t\t\t\t\t\t\t\t\t.executeSQLQuery(\"select caption from dyextn_container where identifier=\"\r\n \t\t\t\t\t\t\t\t\t\t\t+ contId);\r\n \t\t\t\t\t\t\tString container = (String) ((List) contList.get(0)).get(0);\r\n \t\t\t\t\t\t\t//final Object container =bizLogic.retrieve(Container.class.getName(),new Long(contId));\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.ID, String.valueOf(actionApp.getId()));\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.EVENT_NAME,\r\n \t\t\t\t\t\t\t\t\tedu.wustl.cab2b.common.util.Utility\r\n \t\t\t\t\t\t\t\t\t\t\t.getFormattedString(container));\r\n \r\n \t\t\t\t\t\t\t// Ashish - 4/6/07 - retrieving User\r\n \t\t\t\t\t\t\t// User user = eventParameters.getUser();\r\n \t\t\t\t\t\t\tfinal User user = this.getUser(actionApp.getId(), bizLogic);\r\n \r\n \t\t\t\t\t\t\trowDataMap.put(Constants.USER_NAME, user.getLastName() + \", \"\r\n \t\t\t\t\t\t\t\t\t+ user.getFirstName());\r\n \r\n \t\t\t\t\t\t\t// rowDataMap.put(Constants.EVENT_DATE,\r\n \t\t\t\t\t\t\t// Utility.parseDateToString\r\n \t\t\t\t\t\t\t// (eventParameters.getTimestamp(),\r\n \t\t\t\t\t\t\t// Constants.TIMESTAMP_PATTERN)); // Sri: Changed\r\n \t\t\t\t\t\t\t// format for bug #463\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.EVENT_DATE, actionApp.getTimestamp());\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.PAGE_OF, \"pageOfDynamicEvent\");// pageOf\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.SPECIMEN_ID, request\r\n \t\t\t\t\t\t\t\t\t.getAttribute(Constants.SPECIMEN_ID));// pageOf\r\n \t\t\t\t\t\t\tgridData.add(rowDataMap);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \r\n \t\t\t\t\tfinal List<List<String>> gridDataList = this.getSortedGridDataList(gridData);\r\n \t\t\t\t\tfinal String[] columnList1 = Constants.EVENT_PARAMETERS_COLUMNS;\r\n \t\t\t\t\tfinal List<String> columnList = new ArrayList<String>();\r\n \t\t\t\t\tfor (final String element : columnList1)\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\tcolumnList.add(element);\r\n \t\t\t\t\t}\r\n \t\t\t\t\tAppUtility.setGridData(gridDataList, columnList, request);\r\n \t\t\t\t\trequest.setAttribute(\r\n \t\t\t\t\t\t\tedu.wustl.simplequery.global.Constants.SPREADSHEET_DATA_LIST,\r\n \t\t\t\t\t\t\tgridDataList);\r\n \t\t\t\t\tfinal Integer identifierFieldIndex = new Integer(0);\r\n \t\t\t\t\trequest.setAttribute(\"identifierFieldIndex\", identifierFieldIndex.intValue());\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tif (request.getAttribute(Constants.SPECIMEN_LABEL) == null)\r\n \t\t\t{\r\n \t\t\t\trequest.setAttribute(Constants.SPECIMEN_LABEL, specimenLabel);\r\n \t\t\t}\r\n \t\t\trequest.setAttribute(Constants.EVENT_PARAMETERS_LIST, new SOPBizLogic()\r\n \t\t\t\t\t.getAllSOPEventFormNames(dynamicEventMap));\r\n \t\t\trequest.getSession().setAttribute(\"dynamicEventMap\", dynamicEventMap);\r\n \r\n \t\t}\r\n \t\tcatch (final Exception e)\r\n \t\t{\r\n \t\t\tthis.logger.error(e.getMessage(), e);\r\n \t\t}\r\n \t\trequest.setAttribute(Constants.MENU_SELECTED, new String(\"15\"));\r\n \t\tString pageOf = (String) request.getParameter(Constants.PAGE_OF);\r\n \t\tif (pageOf == null)\r\n \t\t\tpageOf = (String) request.getAttribute(Constants.PAGE_OF);\r\n \t\trequest.setAttribute(Constants.PAGE_OF, pageOf);\r\n \r\n \t\tif (pageOf.equals(Constants.PAGE_OF_LIST_SPECIMEN_EVENT_PARAMETERS_CP_QUERY))\r\n \t\t{\r\n \t\t\trequest.getSession().setAttribute(\"CPQuery\", \"CPQuery\");\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\tif (request.getSession().getAttribute(\"CPQuery\") != null)\r\n \t\t\t{\r\n \t\t\t\trequest.getSession().removeAttribute(\"CPQuery\");\r\n \t\t\t}\r\n \t\t}\r\n \t\tLong specimenRecEntryEntityId = null;\r\n \t\ttry\r\n \t\t{\r\n \t\t\tif (CatissueCoreCacheManager.getInstance().getObjectFromCache(\r\n \t\t\t\t\tAnnotationConstants.SPECIMEN_REC_ENTRY_ENTITY_ID) != null)\r\n \t\t\t{\r\n \t\t\t\tspecimenRecEntryEntityId = (Long) CatissueCoreCacheManager.getInstance()\r\n \t\t\t\t\t\t.getObjectFromCache(AnnotationConstants.SPECIMEN_REC_ENTRY_ENTITY_ID);\r\n \t\t\t}\r\n \t\t\telse\r\n \t\t\t{\r\n \t\t\t\tspecimenRecEntryEntityId = AnnotationUtil\r\n \t\t\t\t\t\t.getEntityId(AnnotationConstants.ENTITY_NAME_SPECIMEN_REC_ENTRY);\r\n \t\t\t\tCatissueCoreCacheManager.getInstance().addObjectToCache(\r\n \t\t\t\t\t\tAnnotationConstants.SPECIMEN_REC_ENTRY_ENTITY_ID, specimenRecEntryEntityId);\r\n \t\t\t}\r\n \r\n \t\t}\r\n \t\tcatch (final Exception e)\r\n \t\t{\r\n \t\t\tthis.logger.error(e.getMessage(), e);\r\n \t\t}\r\n \t\t// request.setAttribute(\"specimenEntityId\", specimenEntityId);\r\n \t\trequest.setAttribute(AnnotationConstants.SPECIMEN_REC_ENTRY_ENTITY_ID,\r\n \t\t\t\tspecimenRecEntryEntityId);\r\n \t\treturn mapping.findForward(request.getParameter(Constants.PAGE_OF));\r\n \t}",
"protected ActionForward initialiser(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response,\r\n\t\t\tActionErrors errors, Hashtable hParams) throws ServletException {\r\n\t\tVector vParamOut = new Vector();\r\n\t\tString signatureMethode = this.getClass().getName()\r\n\t\t\t\t+ \" - initialiser(paramProc, mapping, form , request, response, errors )\";\r\n\t\tlogBipUser.entry(signatureMethode);\r\n\t\tRecupModeContractuelForm rechercheForm = (RecupModeContractuelForm) form;\r\n\t\t// Détruit la liste de la session si elle existait suite à uen recherche\r\n\t\tif (request.getSession(false).getAttribute(LISTE_RECHERCHE_ID) != null)\r\n\t\t\trequest.getSession(false).removeAttribute(LISTE_RECHERCHE_ID);\r\n\t\ttry {\r\n\t\t\trechercheForm.setAction(\"modifier\");\r\n\t\t\trechercheForm.setListePourPagination(null);\r\n\t\t\trequest.setAttribute(\"RecupModeContractuelForm\", rechercheForm);\r\n\t\t} catch (Exception ex) {\r\n\t\t\t return mapping.findForward(processSsimpleException(this.getClass()\r\n\t\t\t\t\t.getName(), \"consulter\", ex, rechercheForm, request));\r\n\t\t}\r\n\t\tlogBipUser.exit(signatureMethode);\r\n\t\t return mapping.findForward(\"ecran\");\r\n\t}",
"public ActionForward execute(ActionMapping actionMapping,\r\n\t\t\tActionForm actionForm, HttpServletRequest httpServletRequest,\r\n\t\t\tHttpServletResponse httpServletResponse) {\r\n\r\n\t\t// Mudar isso quando tiver esquema de segurança\r\n\t\tHttpSession sessao = httpServletRequest.getSession(false);\r\n\r\n\t\t// Seta o mapeamento de retorno\r\n\t\tActionForward retorno = actionMapping.findForward(\"inserirMotivoNaoGeracaoCobrancaResultado\");\r\n\r\n\t\t// Obtém a instância da fachada\r\n\t\tFachada fachada = Fachada.getInstancia();\r\n\r\n\t\tInserirMotivoNaoGeracaoCobrancaResultadoActionForm form = (InserirMotivoNaoGeracaoCobrancaResultadoActionForm) actionForm;\r\n\t\tform.setIndicadorUso(ConstantesSistema.SIM+\"\");\r\n\r\n\t\t \r\n\t\tif ((httpServletRequest.getParameter(\"desfazer\") != null && httpServletRequest\r\n\t\t\t\t.getParameter(\"desfazer\").equalsIgnoreCase(\"S\"))) {\r\n\t\t\t\r\n\r\n\t\t\tform.setDescricao(\"\");\r\n\r\n\t\t\tif (form.getDescricao() == null\r\n\t\t\t\t\t|| form.getDescricao().equals(\"\")) {\r\n\r\n\t\t\t\tCollection colecaoPesquisa = null;\r\n\r\n\t\t\t\tFiltroMotivoNaoGeracaoCobrancaResultado filtroMotivo = new FiltroMotivoNaoGeracaoCobrancaResultado();\r\n\r\n\t\t\t\tfiltroMotivo.setCampoOrderBy(FiltroMotivoNaoGeracaoCobrancaResultado.DESCRICAO);\r\n\r\n\t\t\t\tcolecaoPesquisa = fachada.pesquisar(filtroMotivo,\r\n\t\t\t\t\t\tMotivoNaoGeracaoCobrancaResultado.class.getName());\r\n\r\n\t\t\t\tif (colecaoPesquisa == null || colecaoPesquisa.isEmpty()) {\r\n\t\t\t\t\tthrow new ActionServletException(\r\n\t\t\t\t\t\t\t\"atencao.pesquisa.nenhum_registro_tabela\", null,\r\n\t\t\t\t\t\t\t\"Motivo de Corte\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsessao.setAttribute(\"colecaoMotivoCorte\", colecaoPesquisa);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Coleção de Motivo Nao Geracao Cobranca Resultado\r\n\t\t\t\tFiltroMotivoNaoGeracaoCobrancaResultado filtroMotivoCombrancao = new FiltroMotivoNaoGeracaoCobrancaResultado();\r\n\t\t\t\tfiltroMotivoCombrancao.setCampoOrderBy(FiltroMotivoNaoGeracaoCobrancaResultado.ID);\r\n\r\n\t\t\t\tCollection colecaoMotivoCombracaResultado = fachada.pesquisar(filtroMotivoCombrancao,\r\n\t\t\t\t\t\tMotivoCorte.class.getName());\r\n\t\t\t\tsessao.setAttribute(\"colecaoMotivoCombracaResultado\", colecaoMotivoCombracaResultado);\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t\r\n\t\treturn retorno;\r\n\t\r\n\t}",
"public ActionForward execute(ActionMapping actionMapping,\r\n\t\t\tActionForm actionForm, HttpServletRequest httpServletRequest,\r\n\t\t\tHttpServletResponse httpServletResponse) {\n\t\tActionForward retorno = actionMapping\r\n\t\t\t\t.findForward(\"exibirInformarImovelSituacaoCobranca\");\r\n\r\n\t\tFachada fachada = Fachada.getInstancia();\r\n\t\t\t\t\r\n\t\t// Mudar isso quando tiver esquema de segurança\r\n\t\t// HttpSession sessao = httpServletRequest.getSession(false);\r\n\t\t\r\n\t\tInformarImovelSituacaoCobrancaActionForm informarImovelSituacaoCobrancaActionForm = (InformarImovelSituacaoCobrancaActionForm) actionForm;\r\n\t\t\r\n\t\t\r\n\t\tif (httpServletRequest.getParameter(\"objetoConsulta\") != null ){\r\n\t\t\tInteger idImovel = new Integer(informarImovelSituacaoCobrancaActionForm.getIdImovel()); \r\n\t\t\tif (idImovel != null){\r\n\t\t\t\tString matriculaImovel = fachada.pesquisarInscricaoImovel(idImovel);\r\n\t\t\t\tImovel imovel = fachada.pesquisarImovelComSituacaoAguaEsgoto(idImovel);\r\n\t\t\t\thttpServletRequest.setAttribute(\"imovel\", imovel);\r\n\t\t\t\tif (matriculaImovel != null && !matriculaImovel.equalsIgnoreCase(\"\")){\r\n\t\t\t\t\tString enderecoImovel = fachada.pesquisarEndereco(idImovel);\r\n\t\t\t\t\thttpServletRequest.setAttribute(\"endereco\", enderecoImovel);\r\n\t\t\t\t\thttpServletRequest.setAttribute(\"matriculaImovel\", matriculaImovel);\r\n\t\t\t\t\t\r\n\t\t\t\t\tFiltroImovelCobrancaSituacao filtroImovelCobrancaSituacao = new FiltroImovelCobrancaSituacao();\r\n\t\t\t\t\tfiltroImovelCobrancaSituacao.adicionarParametro(new ParametroSimples(\r\n\t\t\t\t\t\t\tFiltroImovelCobrancaSituacao.IMOVEL_ID, idImovel.toString()));\r\n\t\t\t\t\tfiltroImovelCobrancaSituacao.adicionarCaminhoParaCarregamentoEntidade(\"cobrancaSituacao\");\r\n\t\t\t\t\tfiltroImovelCobrancaSituacao.adicionarCaminhoParaCarregamentoEntidade(\"cliente\");\r\n\t\t\t\t\tfiltroImovelCobrancaSituacao.adicionarCaminhoParaCarregamentoEntidade(\"imovel.ligacaoAguaSituacao\");\r\n\t\t\t\t\tfiltroImovelCobrancaSituacao.adicionarCaminhoParaCarregamentoEntidade(\"imovel.ligacaoEsgotoSituacao\");\r\n\t\t\t\t\tCollection colecaoImovelCobrancaSituacao = fachada.pesquisar(\r\n\t\t\t\t\t\t\tfiltroImovelCobrancaSituacao, ImovelCobrancaSituacao.class.getName());\r\n\t\t\t\t\t\r\n\t\t\t\t\tboolean escondeRetirar = true;\r\n\t\t\t\t\tboolean existeNaoRealizado = false;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (colecaoImovelCobrancaSituacao != null && !colecaoImovelCobrancaSituacao.isEmpty()){\r\n\t\t\t\t\t\thttpServletRequest.setAttribute(\"situacoes\", colecaoImovelCobrancaSituacao);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tfor (Iterator iter = colecaoImovelCobrancaSituacao.iterator(); iter.hasNext();) {\r\n\t\t\t\t\t\t\tImovelCobrancaSituacao imovelCobrancaSituacao = (ImovelCobrancaSituacao) iter.next();\r\n\t\t\t\t\t\t\tif (imovelCobrancaSituacao.getDataRetiradaCobranca() == null) {\r\n\t\t\t\t\t\t\t\texisteNaoRealizado = true;\r\n//\t\t\t\t\t\t\t\tescondeInserir = true;\r\n\t\t\t\t\t\t\t\tShort indicadorRetirada = imovelCobrancaSituacao.getCobrancaSituacao().getIndicadorBloqueioRetirada();\r\n\t\t\t\t\t\t\t\tif (indicadorRetirada == null || indicadorRetirada.equals(new Short(\"2\"))) {\r\n\t\t\t\t\t\t\t\t\tescondeRetirar = false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (existeNaoRealizado == false) { \r\n\t\t\t\t\t\t\tescondeRetirar = true; \r\n\t\t\t\t\t\t} \r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tescondeRetirar = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n//\t\t\t\t\tif (escondeInserir) httpServletRequest.setAttribute(\"escondeInserir\", \"sim\");\r\n\t\t\t\t\tif (escondeRetirar) httpServletRequest.setAttribute(\"escondeRetirar\", \"sim\");\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\thttpServletRequest.setAttribute(\"inexistente\", 1);\r\n\t\t\t\t\thttpServletRequest.setAttribute(\"escondeInserir\", \"sim\");\r\n\t\t\t\t\thttpServletRequest.setAttribute(\"escondeRetirar\", \"sim\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t//o sistema desabilita a primeira vez q entra na tela\r\n\t\t\thttpServletRequest.setAttribute(\"escondeInserir\", \"sim\");\r\n\t\t\thttpServletRequest.setAttribute(\"escondeRetirar\", \"sim\");\r\n\t\t}\r\n\r\n\t\t\r\n\t\treturn retorno;\r\n\r\n\t}",
"@Override\r\n\tpublic ActionForward submit(ActionMapping mapping, BaseForm form,\r\n\t\t\tString operation, HttpServletRequest request,\r\n\t\t\tHttpServletResponse response) {\r\n\t\tAuditUtil.getInstance().writeLog(\r\n\t\t\t\tAuditUtil.FILE_TYPE_G4G,\r\n\t\t\t\tnew StringBuffer(this.getClass().getName()).append(\r\n\t\t\t\t\t\tG4GConstants.COLON_WITH_SPACES)\r\n\t\t\t\t\t\t.append(DataUtil.getCurrentMethod()).append(\r\n\t\t\t\t\t\t\t\tG4GConstants.DASHES).append(\r\n\t\t\t\t\t\t\t\tG4GConstants.SUBMIT_STARTS).toString());\r\n\t\treturn mapping.findForward(G4GConstants.HOMEPAGE);\r\n\t}",
"protected ActionForward creer(ActionMapping mapping,ActionForm form , HttpServletRequest request, HttpServletResponse response, ActionErrors errors,Hashtable hParamProc ) throws ServletException{\r\n\t\t\r\n\t\tVector vParamOut = new Vector();\r\n\t\tString message=\"\";\r\n\t\tboolean msg=false;\r\n\t\t\r\n\t\tString signatureMethode =\"CompocfAction -creer( mapping, form , request, response, errors )\";\r\n\r\n\t\tlogBipUser.entry(signatureMethode);\r\n\t\r\n\t\tlogBipUser.exit(signatureMethode);\r\n\t\r\n\t return mapping.findForward(\"ecran\");\t\r\n\t}",
"public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest,\n\t\t\t\t\tHttpServletResponse httpServletResponse){\n\n\t\t// localiza o action no objeto actionmapping\n\t\tActionForward retorno = actionMapping.findForward(\"exibirInformarParametrosSistemaAtendimentoPublicoSeguranca\");\n\n\t\tHttpSession sessao = httpServletRequest.getSession(false);\n\n\t\tInformarSistemaParametrosActionForm form = (InformarSistemaParametrosActionForm) actionForm;\n\n\t\tSistemaParametro sistemaParametro = (SistemaParametro) sessao.getAttribute(\"sistemaParametro\");\n\n\t\tif(sistemaParametro.getIndicadorSugestaoTramite() != null){\n\n\t\t\tform.setIndicadorSugestaoTramite(\"\" + sistemaParametro.getIndicadorSugestaoTramite());\n\t\t}\n\n\t\tif(sistemaParametro.getDiasReativacao() != null){\n\t\t\tform.setDiasMaximoReativarRA(\"\" + sistemaParametro.getDiasReativacao());\n\t\t}\n\n\t\tif(sistemaParametro.getDiasMaximoAlterarOS() != null){\n\t\t\tform.setDiasMaximoAlterarOS(\"\" + sistemaParametro.getDiasMaximoAlterarOS());\n\t\t}\n\n\t\tif(sistemaParametro.getUltimoRAManual() != null){\n\t\t\tform.setUltimoIDGeracaoRA(\"\" + sistemaParametro.getUltimoRAManual());\n\t\t}\n\n\t\tif(sistemaParametro.getNumeroDiasExpiracaoAcesso() != null){\n\t\t\tform.setDiasMaximoExpirarAcesso(\"\" + sistemaParametro.getNumeroDiasExpiracaoAcesso());\n\t\t}\n\n\t\tif(sistemaParametro.getNumeroDiasMensagemExpiracao() != null){\n\t\t\tform.setDiasMensagemExpiracaoSenha(\"\" + sistemaParametro.getNumeroDiasMensagemExpiracao());\n\t\t}\n\n\t\tif(sistemaParametro.getNumeroMaximoLoginFalho() != null){\n\t\t\tform.setNumeroMaximoTentativasAcesso(\"\" + sistemaParametro.getNumeroMaximoLoginFalho());\n\t\t}\n\n\t\tif(sistemaParametro.getNumeroMaximoFavorito() != null){\n\t\t\tform.setNumeroMaximoFavoritosMenu(\"\" + sistemaParametro.getNumeroMaximoFavorito());\n\t\t}\n\n\t\t// -------Parte que trata do código quando o usuário tecla enter na pesquisa da Unidade\n\t\t// Organiz.\n\t\tFachada fachada = Fachada.getInstancia();\n\n\t\tString idDigitadoEnterUnidadeEmpresa = form.getIdUnidadeOrganizacionalPresidencia();\n\t\t// Verifica se o código da Unidade Empresa foi digitado\n\n\t\tFiltroUnidadeOrganizacional filtroUnidadeEmpresa = new FiltroUnidadeOrganizacional();\n\n\t\tif(idDigitadoEnterUnidadeEmpresa != null && !idDigitadoEnterUnidadeEmpresa.trim().equals(\"\")){\n\n\t\t\tfiltroUnidadeEmpresa.adicionarParametro(new ParametroSimples(FiltroUnidadeOrganizacional.ID, idDigitadoEnterUnidadeEmpresa));\n\n\t\t\tCollection<UnidadeOrganizacional> unidadeEmpresaEncontrada = fachada.pesquisar(filtroUnidadeEmpresa,\n\t\t\t\t\t\t\tUnidadeOrganizacional.class.getName());\n\n\t\t\tif(unidadeEmpresaEncontrada != null && !unidadeEmpresaEncontrada.isEmpty()){\n\t\t\t\t// a unidade de Unidade Empresa foi encontrado\n\t\t\t\tform.setIdUnidadeOrganizacionalPresidencia(\"\" + ((UnidadeOrganizacional) ((List) unidadeEmpresaEncontrada).get(0)).getId());\n\t\t\t\tform.setNomeUnidadeOrganizacionalPresidencia(((UnidadeOrganizacional) ((List) unidadeEmpresaEncontrada).get(0))\n\t\t\t\t\t\t\t\t.getDescricao());\n\t\t\t\thttpServletRequest.setAttribute(\"idUnidadeEmpresaNaoEncontrada\", \"true\");\n\t\t\t\thttpServletRequest.setAttribute(\"nomeCampo\", \"nomeUnidadeEmpresaNaoEncontrada\");\n\n\t\t\t}else{\n\n\t\t\t\tform.setIdUnidadeOrganizacionalPresidencia(\"\");\n\t\t\t\thttpServletRequest.setAttribute(\"idUnidadeEmpresaNaoEncontrada\", \"exception\");\n\t\t\t\tform.setNomeUnidadeOrganizacionalPresidencia(\"UNIDADE EMPRESA INEXISTENTE\");\n\t\t\t\thttpServletRequest.setAttribute(\"nomeCampo\", \"idUnidadeEmpresa\");\n\n\t\t\t}\n\n\t\t}else{\n\t\t\tif(sistemaParametro.getUnidadeOrganizacionalIdPresidencia() != null){\n\t\t\t\tform.setIdUnidadeOrganizacionalPresidencia(sistemaParametro.getUnidadeOrganizacionalIdPresidencia().getId().toString());\n\n\t\t\t\tfiltroUnidadeEmpresa.adicionarParametro(new ParametroSimples(FiltroUnidadeOrganizacional.ID, sistemaParametro\n\t\t\t\t\t\t\t\t.getUnidadeOrganizacionalIdPresidencia().getId()));\n\n\t\t\t\tCollection<UnidadeOrganizacional> unidadeEmpresaEncontrada = fachada.pesquisar(filtroUnidadeEmpresa,\n\t\t\t\t\t\t\t\tUnidadeOrganizacional.class.getName());\n\t\t\t\tif(unidadeEmpresaEncontrada != null && !unidadeEmpresaEncontrada.isEmpty()){\n\n\t\t\t\t\tform.setNomeUnidadeOrganizacionalPresidencia(((UnidadeOrganizacional) ((List) unidadeEmpresaEncontrada).get(0))\n\t\t\t\t\t\t\t\t\t.getDescricao());\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\t/*\n\t\t * Tipo de Solicitação Padrão:\n\t\t * Especificação Padrão:* -> colecaoEspecificacaoPadrao\n\t\t * Tipo de Solicitação Reiteração:*\n\t\t * Especificação Reiteração:* -> colecaoEspecificacaoReiteracao\n\t\t */\n\n\t\t/*\n\t\t * Na tela informar parâmetros do sistema, na aba \"Atendimento Segurança\"\n\t\t * os campos \"Especificação Padrão:\" e \"Especificação Reiteração:\" precisam trazer somente\n\t\t * os \"Tipos de Solicitação Especificação\" referentes ao \"SolicitacaoTipo\" do tipo de cada\n\t\t * um respectivamente.\n\t\t */\n\n\t\tFiltroSolicitacaoTipoEspecificacao filtroSolicitacaoTipoEspecificacaoDefault = new FiltroSolicitacaoTipoEspecificacao();\n\t\tfiltroSolicitacaoTipoEspecificacaoDefault.adicionarParametro(new ParametroSimples(FiltroSolicitacaoTipoEspecificacao.ID,\n\t\t\t\t\t\tsistemaParametro.getSolicitacaoTipoEspecificacaoDefault()));\n\t\tfiltroSolicitacaoTipoEspecificacaoDefault.adicionarParametro(new ParametroSimples(FiltroSolicitacaoTipoEspecificacao.INDICADOR_USO,\n\t\t\t\t\t\tConstantesSistema.INDICADOR_USO_ATIVO));\n\t\tCollection solicitacoesTipoEspecificacao = fachada.pesquisar(filtroSolicitacaoTipoEspecificacaoDefault,\n\t\t\t\t\t\tSolicitacaoTipoEspecificacao.class.getName());\n\t\tSolicitacaoTipoEspecificacao solicitacaoTipoEspecificacaoDefault = new SolicitacaoTipoEspecificacao();\n\n\t\tif(solicitacoesTipoEspecificacao != null && !solicitacoesTipoEspecificacao.isEmpty()){\n\n\t\t\tfor(Iterator iterator = solicitacoesTipoEspecificacao.iterator(); iterator.hasNext();){\n\t\t\t\tsolicitacaoTipoEspecificacaoDefault = (SolicitacaoTipoEspecificacao) iterator.next();\n\t\t\t}\n\t\t\tfiltroSolicitacaoTipoEspecificacaoDefault.limparListaParametros();\n\n\t\t\tif(solicitacaoTipoEspecificacaoDefault != null && solicitacaoTipoEspecificacaoDefault.getSolicitacaoTipo() != null){\n\t\t\t\tfiltroSolicitacaoTipoEspecificacaoDefault.adicionarParametro(new ParametroSimples(\n\t\t\t\t\t\t\t\tFiltroSolicitacaoTipoEspecificacao.SOLICITACAO_TIPO_ID, solicitacaoTipoEspecificacaoDefault\n\t\t\t\t\t\t\t\t\t\t\t\t.getSolicitacaoTipo().getId()));\n\n\t\t\t}\n\t\t\tfiltroSolicitacaoTipoEspecificacaoDefault.adicionarParametro(new ParametroSimples(\n\t\t\t\t\t\t\tFiltroSolicitacaoTipoEspecificacao.INDICADOR_USO, ConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tsolicitacoesTipoEspecificacao = fachada.pesquisar(filtroSolicitacaoTipoEspecificacaoDefault,\n\t\t\t\t\t\t\tSolicitacaoTipoEspecificacao.class.getName());\n\n\t\t}\n\n\t\t/*\n\t\t * encontrei a SolicitacaoTipoEspecificacao que está setada no banco, agora, através dela,\n\t\t * vou encontrar as outras do mesmo tipo.\n\t\t */\n\n\n\t\t/*\n\t\t * Encontrar agora as SolicitacaoTipoEspecificacao que tem o mesmo SolicitacaoTipo da\n\t\t * SolicitacaoTipoEspecificacaoReiteracao\n\t\t * setada no banco.\n\t\t */\n\t\tFiltroSolicitacaoTipoEspecificacao filtroSolicitacaoTipoReiteracao = new FiltroSolicitacaoTipoEspecificacao();\n\t\tfiltroSolicitacaoTipoReiteracao.adicionarParametro(new ParametroSimples(FiltroSolicitacaoTipoEspecificacao.ID, sistemaParametro\n\t\t\t\t\t\t.getSolicitacaoTipoEspecificacaoReiteracao()));\n\t\tfiltroSolicitacaoTipoReiteracao.adicionarParametro(new ParametroSimples(FiltroSolicitacaoTipoEspecificacao.INDICADOR_USO,\n\t\t\t\t\t\tConstantesSistema.INDICADOR_USO_ATIVO));\n\t\tCollection solicitacoesTipoReiteracao = fachada.pesquisar(filtroSolicitacaoTipoReiteracao, SolicitacaoTipoEspecificacao.class\n\t\t\t\t\t\t.getName());\n\t\tSolicitacaoTipoEspecificacao solicitacaoTipoReiteracao = new SolicitacaoTipoEspecificacao();\n\t\tfor(Iterator iterator = solicitacoesTipoReiteracao.iterator(); iterator.hasNext();){\n\t\t\tsolicitacaoTipoReiteracao = (SolicitacaoTipoEspecificacao) iterator.next();\n\t\t}\n\t\tfiltroSolicitacaoTipoReiteracao.limparListaParametros();\n\n\t\tif(solicitacaoTipoReiteracao.getSolicitacaoTipo() != null){\n\t\t\tfiltroSolicitacaoTipoReiteracao.adicionarParametro(new ParametroSimples(FiltroSolicitacaoTipoEspecificacao.SOLICITACAO_TIPO_ID,\n\t\t\t\t\t\t\tsolicitacaoTipoReiteracao.getSolicitacaoTipo().getId()));\n\t\t\tfiltroSolicitacaoTipoReiteracao.adicionarParametro(new ParametroSimples(FiltroSolicitacaoTipoEspecificacao.INDICADOR_USO,\n\t\t\t\t\t\t\tConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tsolicitacoesTipoReiteracao = fachada.pesquisar(filtroSolicitacaoTipoReiteracao, SolicitacaoTipoEspecificacao.class.getName());\n\t\t}\n\n\t\t// carrega as combos de Tipo de Solicitação e Especificação\n\n\t\t// FiltroSolicitacaoTipoEspecificacao filtroSolicitacaoTipoEspecificacao = new\n\t\t// FiltroSolicitacaoTipoEspecificacao();\n\t\t// filtroSolicitacaoTipoEspecificacao.adicionarParametro(new\n\t\t// ParametroSimples(FiltroSolicitacaoTipoEspecificacao.INDICADOR_USO,\n\t\t// ConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t// Collection<SolicitacaoTipoEspecificacao> colecaoSolicitacaoTipoEspecificacao =\n\t\t// fachada.pesquisar(filtroSolicitacaoTipoEspecificacao,\n\t\t// SolicitacaoTipoEspecificacao.class.getName());\n\n\t\tFiltroSolicitacaoTipo filtroSolicitacaoTipo = new FiltroSolicitacaoTipo(FiltroSolicitacaoTipo.DESCRICAO);\n\t\tfiltroSolicitacaoTipo.adicionarParametro(new ParametroSimples(FiltroSolicitacaoTipo.INDICADOR_USO,\n\t\t\t\t\t\tConstantesSistema.INDICADOR_USO_ATIVO));\n\t\tCollection<SolicitacaoTipo> colecaoSolicitacaoTipo = fachada.pesquisar(filtroSolicitacaoTipo, SolicitacaoTipo.class.getName());\n\n\t\t// SolicitacaoTipo solicitacaoTipo = new SolicitacaoTipo();\n\t\t// solicitacaoTipo.setDescricao(\"\");\n\t\t// solicitacaoTipo.setId(null);\n\t\t// colecaoSolicitacaoTipo.add(solicitacaoTipo);\n\n\t\t// BeanComparator comparador = new BeanComparator(\"descricao\");\n\t\t// Collections.sort((List) colecaoSolicitacaoTipo, comparador);\n\n\t\tsessao.setAttribute(\"colecaoSolicitacaoTipo\", colecaoSolicitacaoTipo);\n\t\tsessao.setAttribute(\"colecaoEspecificacaoPadrao\", solicitacoesTipoEspecificacao);\n\t\tsessao.setAttribute(\"colecaoEspecificacaoReiteracao\", solicitacoesTipoReiteracao);\n\t\t// sessao.setAttribute(\"colecaoSolicitacaoTipoEspecificacao\",\n\t\t// colecaoSolicitacaoTipoEspecificacao);\n\n\n\n\t\treturn retorno;\n\n\t}",
"@Override\r\n\tpublic ActionForward executeSecureAction(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response) throws IOException,\r\n\t\t\tServletException, Exception\r\n\t{\r\n\t\tgetOperation(request);\r\n\r\n\t\tSet<AbstractFormContext> formContextCollection = new HashSet<AbstractFormContext>();\r\n\t\tMap<AbstractFormContext, Map<String, Object>> formContextParameterMap = new HashMap<AbstractFormContext, Map<String, Object>>();\r\n\r\n\t\tActionForward actionForward = mapping.findForward(Constants.PAGE_OF_SPP);\r\n\t\t//Save SPP events\r\n\t\tif (Boolean.parseBoolean(request.getParameter(Constants.SAVE_SPP_EVENTS)))\r\n\t\t{\r\n\t\t\tSPPEventProcessor sppEventProcessor = new SPPEventProcessor();\r\n\t\t\tformContextParameterMap = sppEventProcessor.populateFormContextParmaterMap(request\r\n\t\t\t\t\t.getParameterMap());\r\n\t\t\tformContextCollection.addAll(formContextParameterMap.keySet());\r\n\t\t\tboolean isEditOperation = false;\r\n\r\n\t\t\tList<String> listOfError = validateDEData(request, formContextCollection,\r\n\t\t\t\t\tformContextParameterMap, sppEventProcessor);\r\n\r\n\t\t\tif (listOfError.isEmpty())\r\n\t\t\t{\r\n\t\t\t\tfor (AbstractFormContext formContext : formContextCollection)\r\n\t\t\t\t{\r\n\t\t\t\t\tAction action = (Action) formContext;\r\n\r\n\t\t\t\t\t//Generate mock request object required for DE data entry\r\n\t\t\t\t\tMutableHttpRequest httprequest = getMockRequestObject(request,\r\n\t\t\t\t\t\t\tformContextParameterMap, formContext);\r\n\r\n\t\t\t\t\tMap<AbstractFormContext, Long> contextRecordIdMap = new SPPBizLogic()\r\n\t\t\t\t\t\t\t.generateContextRecordIdMap(formContext, action);\r\n\r\n\t\t\t\t\tSet<AbstractFormContext> contextCollection = new HashSet<AbstractFormContext>();\r\n\t\t\t\t\tcontextCollection.add(formContext);\r\n\r\n\t\t\t\t\tMap<AbstractFormContext, Long> contextVsRecordIdMap = sppEventProcessor\r\n\t\t\t\t\t\t\t.insertUpdateDEDataForSPPEvents(httprequest, contextRecordIdMap,\r\n\t\t\t\t\t\t\t\t\tcontextCollection);\r\n\r\n\t\t\t\t\tif (action.getApplicationDefaultValue() == null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tDEIntegration deIntegration = new DEIntegration();\r\n\t\t\t\t\t\tdeIntegration.insertAndHookRecordEntry(formContext, action,\r\n\t\t\t\t\t\t\t\tcontextVsRecordIdMap);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tisEditOperation = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tString[] displayNameParams = {Constants.DEFAULT_VALUES, Constants.SPP_EVENTS_MSG};\r\n\t\t\t\tsetSuccessMsg(request, displayNameParams, isEditOperation);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tsaveActionErrors(request, listOfError);\r\n\t\t\t\tactionForward = mapping.findForward(\"pageOfDisplaySPPDefaultValue\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn actionForward;\r\n\t}",
"public ActionForward execute(ActionMapping actionMapping,\r\n ActionForm actionForm,\r\n HttpServletRequest request,\r\n HttpServletResponse response) {\r\n return process(actionMapping, actionForm, request, response, null);\r\n }",
"@Override\r\n\tpublic ActionForward to_objectModify(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows KANException {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tprotected String doExecute(ActionForm form, HttpServletRequest request,\r\n\t\t\tHttpServletResponse response, ActionMapping mapping)\r\n\t\t\tthrows Exception {\n\t\treturn null;\r\n\t}",
"public RestResult constructFormRequest(String confAlias, Page page, ExecutionMode mode)\n throws IOException {\n log.info(\"Constructing a form request...\");\n\n InvokeWebServiceAction serviceAction = new InvokeWebServiceAction(args.getFirstString(\n PARAM_NAME_API_NAME));\n serviceAction.setFormId(page.getFormId());\n\n serviceAction.addServiceParameter(PARAM_NAME_CONF_ALIAS, confAlias);\n serviceAction.addServiceParameter(PARAM_NAME_CONTAINER_WIZARD, wizard.serialize());\n\n if (shouldSetNextPageIdx) {\n log.info(\"Setting next page index to \" + nextPageIdx);\n\n if (wizard.isInAddXmlMoMode()) {\n // Needed to make this work when using a form request\n nextPageIdx = wizard.getAddXmlMoContext().getXmlMoConfIdx();\n }\n serviceAction.addServiceParameter(PARAM_NAME_NEXT_PAGE_IDX, String.valueOf(nextPageIdx));\n }\n if (shouldSetNextSubPageIdx) {\n log.info(\"Setting next sub page index form parameter to \" + getNextSubPageIdx());\n serviceAction.addFormParameter(PARAM_NAME_NEXT_SUB_PAGE_IDX, String.valueOf(\n getNextSubPageIdx()));\n }\n\n // copied from constructActionRequest ...\n serviceAction.addProperty(PARAM_NAME_API_NAME, args.getFirstString(PARAM_NAME_API_NAME));\n serviceAction.addProperty(PARAM_NAME_OPERATION_NAME, wizard.getOperationName());\n\n if (page.isSubPages()) {\n Integer nextSubPageOffset = getIntValue(args.getFirst(PARAM_NAME_SECTION_TYPE_IDX), 0);\n Integer nextSubPageIdx = wizard.isInAddXmlMoMode() ? wizard.getAddXmlMoContext()\n .getXmlMoConfIdx() : getNextSubPageIdx() + nextSubPageOffset;\n log.info(\"Setting next sub page index service parameter to \" + nextSubPageIdx\n + \" (offset was \" + nextSubPageOffset + \")\");\n // Needed to make this work when using a form request\n serviceAction.addServiceParameter(PARAM_NAME_NEXT_SUB_PAGE_IDX, Integer.toString(\n nextSubPageIdx));\n // set a specific width\n JQueryDialogOptions dialogOptions = new JQueryDialogOptions();\n dialogOptions.setWidth(400);\n serviceAction.setDialogOptions(dialogOptions);\n }\n\n // end copy\n\n serviceAction.addServiceParameter(PARAM_NAME_EXECUTION_MODE, mode.name());\n\n // Make the web service string params also available to the form.\n for (CallArgument arg : serviceAction.getServiceParameters().values()) {\n if (StringUtils.isNotBlank(arg.getValue())) {\n serviceAction.addFormParameter(arg.getName(), arg.getValue());\n }\n }\n\n RestResult restResult = new RestResult();\n restResult.addAction(serviceAction);\n return restResult;\n }",
"@Override\n\tpublic ActionForward doDefault(ActionMapping mapping, ActionForm form,\n\t\t\tHttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows Exception {\n\t\t// TODO Auto-generated method stub\n\t\treturn null;\n\n\t}",
"@Override\r\n\tpublic ActionForward modify_object(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows KANException {\n\t\treturn null;\r\n\t}",
"public ActionForward execute(ActionMapping actionMapping,\n\t\t\tActionForm actionForm, HttpServletRequest httpServletRequest,\n\t\t\tHttpServletResponse httpServletResponse) {\n\t\tActionForward retorno = actionMapping.findForward(\"telaSucesso\");\n\t\t\n\t\tretorno.getName();\n\t\t\n\t\tIntegracaoComercialHelper helper = new IntegracaoComercialHelper();\n\t\t\n\t\tHttpSession sessao = httpServletRequest.getSession(false);\n\t\t\n\t\tUsuario usuarioLogado = (Usuario) sessao.getAttribute(\"usuarioLogado\");\n\n\t\tAlterarTipoCorteActionForm form = (AlterarTipoCorteActionForm) actionForm;\n\n\t\tFachada fachada = Fachada.getInstancia();\n\t\t\n\t\tif(form.getIdOrdemServico()!=null && !form.getIdOrdemServico().equals(\"\")){\n\t\t\n\t\t\tif (sessao.getAttribute(\"ordemServico\") != null) {\n\t\t\t\t\n\t\t\t\t//pesquisa Ligacao agua\n\t\t\t\tFiltroLigacaoAgua filtroLigacaoAgua = new FiltroLigacaoAgua();\n\t\t\t\tfiltroLigacaoAgua.adicionarParametro(new ParametroSimples(\n\t\t\t\t\t\tFiltroLigacaoAgua.ID, form.getMatriculaImovel()));\n\t\t\t\t\n\t\t\t\tfiltroLigacaoAgua.adicionarCaminhoParaCarregamentoEntidade(FiltroLigacaoAgua.CORTE_TIPO);\n\n\t\t\t\tCollection colecaoLigacao = getFachada().pesquisar(\n\t\t\t\t\t\tfiltroLigacaoAgua, LigacaoAgua.class.getName());\n\n\n\t\t\t\tLigacaoAgua ligacaoAgua = (LigacaoAgua) Util\n\t\t\t\t\t\t.retonarObjetoDeColecao(colecaoLigacao);\n\t\t\t\t\n\t\t\t\t//Pesquisa Imovel\n\t\t\t\tFiltroImovel filtroImovel = new FiltroImovel();\n\t\t\t\tfiltroImovel.adicionarParametro(new ParametroSimples(FiltroImovel.ID,form.getMatriculaImovel()));\n\n\t\t\t\tCollection colecaoImovel = getFachada().pesquisar(filtroImovel,\n\t\t\t\t\t\tImovel.class.getName());\n\n\t\t\t\t\n\n\t\t\t\tImovel imovel = (Imovel) colecaoImovel.iterator().next();\n\t\t\t\t\n\t\t\t\t//pesquisa OS\n\t\t\t\tFiltroOrdemServico filtroOrdemServico = new FiltroOrdemServico();\n\t\t\t\tfiltroOrdemServico.adicionarParametro(new ParametroSimples(FiltroOrdemServico.ID,form.getIdOrdemServico()));\n\t\t\t\tfiltroOrdemServico.adicionarCaminhoParaCarregamentoEntidade(FiltroOrdemServico.SERVICO_TIPO);\n\t\t\t\tfiltroOrdemServico.adicionarCaminhoParaCarregamentoEntidade(\"servicoTipo.debitoTipo\");\n\t\t\t\tfiltroOrdemServico.adicionarCaminhoParaCarregamentoEntidade(\"servicoNaoCobrancaMotivo\");\n \n\t\t\t\tCollection colecaoOrdemServico = fachada.pesquisar(filtroOrdemServico,OrdemServico.class.getName());\n\t\n\t\t\t\tOrdemServico ordemServico = (OrdemServico) colecaoOrdemServico.iterator().next();\n\t\t\t\t\n\t\t\t\thelper.setOrdemServico(ordemServico);\t\n\t\t\t\thelper.setLigacaoAgua(ligacaoAgua);\t\n\t\t\t\thelper.getLigacaoAgua().getCorteTipo().setId(new Integer(form.getTipoCorte()));\n\t\t\t\thelper.getLigacaoAgua().setUltimaAlteracao(form.getDataConcorrencia());\n\t\t\t\thelper.setMatriculaImovel(form.getMatriculaImovel());\n\t\t\t\thelper.setImovel(imovel);\n\n\t\t\t\tString debitoEncontrado = \"false\";\n\t\t\t\t\n\t\t\t\tdebitoEncontrado = (String) sessao.getAttribute(\"debitoEncontrado\");\n\t\t\t\t\n\t\t\t\tif(debitoEncontrado!=null && debitoEncontrado.equals(\"true\") && form.getMotivoNaoCobranca() != null \n\t\t\t\t\t\t&& !form.getMotivoNaoCobranca().equals(\"-1\")){\n\t\t\t\t\t\n\t\t\t\t\tServicoNaoCobrancaMotivo sncm = new ServicoNaoCobrancaMotivo();\n\t\t\t\t\t\n\t\t\t\t\tsncm.setId(new Integer(form.getMotivoNaoCobranca()));\n\t\t\t\t\t\n\t\t\t\t\thelper.getOrdemServico().setServicoNaoCobrancaMotivo(sncm);\n\t\t\t\t\t\n\t\t\t\t}else if(debitoEncontrado!=null && debitoEncontrado.equals(\"true\")){\n\t\t\t\t\t\n\t\t\t\t\tBigDecimal valorAtual = new BigDecimal(0);\n\t\t\t\t\tif (form.getValorDebito() != null) {\n\t\t\t\t\t String valorDebito = form\n\t\t\t\t\t \t.getValorDebito().toString().replace(\".\", \"\");\n\t\t\t\t\t \n\t\t\t\t\t valorDebito = valorDebito.replace(\",\", \".\");\n\t\t\t\t\t \n\t\t\t\t\t valorAtual = new BigDecimal(valorDebito);\n\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\thelper.getOrdemServico().setId(new Integer(form.getIdOrdemServico()));\n\t\t\t\t\thelper.getOrdemServico().getServicoTipo().getDebitoTipo().setId(new Integer(form.getIdTipoDebito()));\n\t\t\t\t\thelper.getOrdemServico().setValorAtual(valorAtual);\n\t\t\t\t\thelper.setQtdParcelas(form.getQuantidadeParcelas());\n\t\t\t\t\thelper.getOrdemServico().setPercentualCobranca(new BigDecimal(form.getPercentualCobranca()));\n\t\t\t\t\thelper.setUsuarioLogado(usuarioLogado);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t }\n\t\t\tif(form.getVeioEncerrarOS().equalsIgnoreCase(\"FALSE\")){\n\t\t\t\thelper.setVeioEncerrarOS(Boolean.FALSE);\n\t\t\t\tfachada.atualizarTipoCorte(helper);\n\t\t\t}else{\n\t\t\t\thelper.setVeioEncerrarOS(Boolean.TRUE);\n\t\t\t\tsessao.setAttribute(\"integracaoComercialHelper\", helper);\n\t\t\t\t\n\t\t\t\tif(sessao.getAttribute(\"menu\") == null){\n\t\t\t\t\tretorno = actionMapping.findForward(\"encerrarOrdemServicoAction\");\n\t\t\t\t}else{\n\t\t\t\t\tretorno = actionMapping.findForward(\"encerrarOrdemServicoPopupAction\");\n\t\t\t\t}\n\t\t\t\tsessao.removeAttribute(\"caminhoRetornoIntegracaoComercial\");\n\t\t\t}\n\t\t\t\t\t\n\t\t}\n\t\tretorno.getName();\n\t\tif(retorno.getName().equalsIgnoreCase(\"telaSucesso\")){\n\n\t\t\tmontarPaginaSucesso(httpServletRequest,\"Tipo do Corte Ligação de Água do imóvel \"+form.getMatriculaImovel()+\" efetuado com sucesso\",\n\t\t\t\t\t\"Atualizar outro Corte de Ligação de Água\",\n\t\t\t\t\t\"exibirAlterarTipoCorteAction.do?menu=sim\");\n\t\t\n\t\t}\n\t return retorno;\n\t}",
"protected ActionForward annuler(ActionMapping mapping,ActionForm form , HttpServletRequest request, HttpServletResponse response, ActionErrors errors,Hashtable hParamProc ) throws ServletException{\r\n\t\tString sMode = request.getParameter(\"mode\") ;\r\n\t\t\r\n\t\t//page bCompocfAd.jsp\r\n\t\tif (sMode .equals(\"avant\")) \r\n\t\t\t return mapping.findForward(\"avant\") ;\r\n\t\t\r\n\t\telse if (sMode .equals(\"ecran\")) \r\n\t\t\t return mapping.findForward(\"ecran\") ;\r\n\t\t\r\n\t\telse if (sMode .equals(\"initial\")) \r\n\t\t\t return mapping.findForward(\"initial\") ;\r\n\t\t\r\n\t\telse\r\n\t\t return mapping.findForward(\"avant\") ;\r\n\t}",
"protected ActionForward customProcess(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response, String name) throws Throwable {\r\n \treturn performAction(actionMapping, actionForm, request, response);\r\n }",
"protected IManagedForm getForm(){\r\n\t\treturn _mForm;\r\n\t}",
"@Override\n\tpublic ActionForward init(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) {\n\n\t\ttry {\n\t\t\tint user=0;\n\t\t\t\n\t\t\tif(request.getSession().getAttribute(\"perfil\")!=null) {\n\t\t\t\tuser= Utils.parseInt((String)request.getSession().getAttribute(\"perfil\"));\n\t\t\t} else {\n\t\t\t\tUsuarioWebVO us=this.getUsuario(request.getSession());\n\t\t\t\trequest.getSession().setAttribute(\"idEmpresa\", us.getIdPropietario());\n\t\t\t\t//System.out.println(\"--OfertaEdicionAction.init-idEmpresa:\" + us.getIdPropietario());\n\t\t\t\tuser=(int)us.getIdTipoUsuario();\n\t\t\t\trequest.getSession().setAttribute(\"perfil\",user+\"\" );\t\t\t\t \n\t\t\t}\t\n\t\t\t\n\t\t\tString idOferta = request.getParameter(\"id\");\n\t\t\trequest.getSession().setAttribute(\"idOferta\", idOferta);\n\t\t\trequest.setAttribute(\"idOferta\", idOferta);\n\t\t\t\n\t\t\tif(user!=0 && user==Constantes.TIPO_USUARIO.ADMINISTRADOR.getIdTipoUsuario()){\n\t\t\t\trequest.getSession().setAttribute(\"usuario\",\"100\");\n\t\t\t}else { \n\t\t\t\trequest.getSession().setAttribute(\"usuario\",\"200\");\n\t\t\t}\n\t\t\t \n\t\t\trequest.getSession().removeAttribute(\"listaConocimientos\");\n\t\t\trequest.getSession().removeAttribute(\"listaHabilidades\");\n\t\t\trequest.getSession().removeAttribute(\"listaCompetencias\");\n\t\t\trequest.getSession().removeAttribute(\"listaIdiomas\");\n\t\t\trequest.getSession().removeAttribute(\"listaCarrerasSeleccionadas\");\n\t\t\trequest.getSession().removeAttribute(\"listaSectoresSeleccionados\");\n\t\t\trequest.getSession().removeAttribute(\"listaEntidadesSeleccionadas\");\n\t\t\trequest.getSession().removeAttribute(\"listaPrestaciones\");\n\t\t\trequest.getSession().removeAttribute(\"ofertaVO\");\n\t\t\trequest.getSession().removeAttribute(\"tercerasEmpresas\");\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"----ofertaedicionaction ya borre ofertaVO y tercerasEmpresas\");\n\t\t\tOfertaBusDelegate services = OfertaBusDelegateImpl.getInstance();\n\n\t\t\tOfertaEmpleoVO ofertaVO = services.obtenerOferta(Utils.parseLong(idOferta));\n\t\t\tif (ofertaVO.getMapaUbicacion() == null)\n\t\t\t\tofertaVO.setMapaUbicacion(\"\");\n\t\t\tif (ofertaVO.getMapaUbicacion() != null && ofertaVO.getMapaUbicacion().compareTo(\"null\") == 0)\n\t\t\t\tofertaVO.setMapaUbicacion(\"\");\n\t\t\t\t\n\t\t\trequest.getSession().setAttribute(\"ofertaVO\", ofertaVO);\n\n\t\t\tArrayList<String> sectores = services.obtenerSectoresOferta(ofertaVO.getIdOfertaEmpleo());\n\t\t\trequest.getSession().setAttribute(\"listaSectoresSeleccionados\", sectores);\n\n\t\t\tArrayList<String> prestaciones = services.obtenerPrestacionesOferta(ofertaVO.getIdOfertaEmpleo());\n\t\t\trequest.getSession().setAttribute(\"listaPrestacionesSeleccionadas\", prestaciones);\n\n\t\t\tArrayList<RegistroEntidadesVO> entidades = services.obtenerEntidadesOferta(ofertaVO.getIdOfertaEmpleo());\n\t\t\trequest.getSession().setAttribute(\"listaEntidadesSeleccionadas\", entidades);\n\n\t\t\tArrayList<OfertaCarreraEspecialidadVO> carreras = services.obtenerCarrerasEspecialidades(ofertaVO.getIdOfertaEmpleo());\n\t\t\trequest.getSession().setAttribute(\"listaCarrerasEspecialidadesOferta\", carreras);\n\n\t\t\tArrayList<RequisitoVO> requisitos = services.obetenerRequisitos(ofertaVO.getIdOfertaEmpleo());\n\t\t\trequest.getSession().setAttribute(\"listaRequisitosOferta\",requisitos);\n\n\t\t\tArrayList<OfertaIdiomaVO> idiomas = services.obtenerIdiomas(ofertaVO.getIdOfertaEmpleo());\n\t\t\trequest.getSession().setAttribute(\"listaIdiomasOferta\", idiomas);\n\n\t\t\tDomicilioVO domicilio = (DomicilioVO) services.obtenerDomicilio(Utils.parseLong(idOferta));\n\t\t\trequest.getSession().setAttribute(\"domicilio\", domicilio);\n\n\t\t\tCodigoPostalVO cp = services.obtenerCodigoPostal(domicilio.getIdColonia());\n\t\t\trequest.getSession().setAttribute(\"cp\", cp);\n\n\t\t\tList<CatalogoOpcionVO> catAreasLaborales = services.obtenerCatalogoAlf(Constantes.CATALOGO_OPCION_AREA_LABORAL);\n\t\t\trequest.setAttribute(\"CATALOGO_OPCION_AREA_LABORAL\", catAreasLaborales);\n\t\t\t/*List<CatalogoOpcionVO> catOcupacion = services.obtenerCatalogoAlf(Constantes.CATALOGO_OPCION_OCUPACION);\n\t\t\trequest.setAttribute(\"CATALOGO_OPCION_OCUPACION\", catOcupacion);*/\n\t\t\trequest.setAttribute(\"CATALOGO_OPCION_SECTOR\", services.obtenerCatalogoAlf(Constantes.CATALOGO_OPCION_SUBSECTOR));\n\t\t\trequest.setAttribute(\"CATALOGO_OPCION_HORARIO_LABORAL\", services.obtenerCatalogo(Constantes.CATALOGO_OPCION_HORARIO_LABORAL));\n\t\t\trequest.setAttribute(\"CATALOGO_OPCION_HORARIO_CONTACTO\", services.obtenerCatalogo(Constantes.CATALOGO_OPCION_HORARIO_CONTACTO));\n\t\t\trequest.setAttribute(\"CATALOGO_OPCION_TIPO_CONTRATO\", services.obtenerCatalogo(Constantes.CATALOGO_OPCION_TIPO_CONTRATO));\n\t\t\trequest.setAttribute(\"CATALOGO_OPCION_PRESTACIONES\", services.obtenerCatalogo(Constantes.CATALOGO_OPCION_PRESTACIONES));\n\t\t\trequest.setAttribute(\"CATALOGO_OPCION_JERARQUIA_PUESTO\", services.obtenerCatalogo(Constantes.CATALOGO_OPCION_JERARQUIA_PUESTO));\n\t\t\trequest.setAttribute(\"CATALOGO_OPCION_CAUSA_OFERTA\", services.obtenerCatalogo(Constantes.CATALOGO_OPCION_CAUSA_OFERTA));\n\n\t\t\t//List<MunicipioVO> catMunicipios = (List<MunicipioVO>) request.getSession().getAttribute(\"CatalogoMunicipios\");\n\n\t\t\trequest.setAttribute(\"CATALOGO_OPCION_TIPO_DISCAPACIDAD\", services.obtenerCatalogo(Constantes.CATALOGO_OPCION_TIPO_DISCAPACIDAD));\n\t\t\trequest.setAttribute(\"CATALOGO_OPCION_TIPO_EMPLEO\", services.obtenerCatalogoAlf(Constantes.CATALOGO_OPCION_TIPO_EMPLEO));\n\n\t\t} catch (BusinessException e) {\n\t\t\tlogger.error(e); // TODO Notificar error al usuario\n\t\t} catch (ServiceLocatorException e) {\n\t\t\tlogger.error(e); // TODO Notificar error al usuario\n\t\t}\n\n\t\tocultaBarraArticulos(request);\n\t\trequest.getSession().setAttribute(BODY_JSP, mapping.findForward(FORWARD_JSP).getPath());\n PropertiesLoader properties = PropertiesLoader.getInstance();\n\t\trequest.getSession().setAttribute(TITULO_PAGINA, \"Editar oferta\");\n\t\trequest.getSession().setAttribute(DESCRIPCION_PAGINA, \"Editar oferta, Secretaría del Trabajo y Previsión Social, Servicio Nacional de Empleo, Portal del Empleo.\");\n\t\trequest.getSession().setAttribute(FACEBOOK_IMAGE, properties.getProperty(\"app.context.url.ssl\")+\"/css/images/contenido-compartir.jpg\");\n\t\trequest.getSession().setAttribute(TWITTER_IMAGE, properties.getProperty(\"app.context.url.ssl\") + \"/css/images/compartir-contenido-tweetA.jpg\");\n\t\trequest.getSession().setAttribute(URL_ESPECIFICA, properties.getProperty(\"app.context.url.ssl\")+ response.encodeURL(request.getRequestURI().toString()));\n\t\treturn mapping.findForward(FORWARD_TEMPLATE_MI_ESP_EMP);\n\t}",
"public ActionForward toAdd(ActionMapping mapping,\r\n\t\t\tActionForm actionForm, HttpServletRequest request,\r\n\t\t\tHttpServletResponse response) throws Exception {\n\t\t\r\n\t\tList modules = getService().findAll(Module.class);\r\n\t\trequest.setAttribute(\"modules\", modules);\r\n\t\t\r\n//\t\tList columns = scs.findSystemTableColumns(smt);\r\n//\t\trequest.setAttribute(\"columns\", columns);\r\n//\t\t\r\n//\t\tList mainColumns = smcs.findSystemMainTableColumns(smt);\r\n//\t\trequest.setAttribute(\"mainColumns\", mainColumns);\r\n//\t\t\r\n//\t\tList extColumns =secs.findSystemExtendColumns(smt);\r\n//\t\trequest.setAttribute(\"extColumns\", extColumns);\r\n\t\t\r\n\t\treturn mapping.findForward(\"form\");\r\n\t}",
"@Override\r\n\tpublic ActionForward add_object(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows KANException {\n\t\treturn null;\r\n\t}",
"protected void updateFormBean(ActionMapping mapping,\r\n\t\t\tHttpServletRequest request, ActionForm form) {\r\n\t\t// Remove the obsolete form bean\r\n\t\tif (mapping.getAttribute() != null) {\r\n\t\t\tif (\"request\".equals(mapping.getScope())) {\r\n\t\t\t\trequest.setAttribute(mapping.getAttribute(), form);\r\n\t\t\t} else {\r\n\t\t\t\tHttpSession session = request.getSession();\r\n\r\n\t\t\t\tsession.setAttribute(mapping.getAttribute(), form);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public ActionForward execute(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows Exception {\r\n\t\tif (isCancelled(request)) {\r\n\t\t\tActionForward af = cancelled(mapping, form, request, response);\r\n\r\n\t\t\tif (af != null) {\r\n\t\t\t\treturn af;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tMessageResources resources = getResources(request);\r\n\r\n\t\t// Identify the localized message for the cancel button\r\n\t\tString edit = resources.getMessage(Locale.ENGLISH, \"button.edit\")\r\n\t\t\t\t.toLowerCase();\r\n\t\tString save = resources.getMessage(Locale.ENGLISH, \"button.save\")\r\n\t\t\t\t.toLowerCase();\r\n\t\tString search = resources.getMessage(Locale.ENGLISH, \"button.search\")\r\n\t\t\t\t.toLowerCase();\r\n\t\tString view = resources.getMessage(Locale.ENGLISH, \"button.view\")\r\n\t\t\t\t.toLowerCase();\r\n\t\tString[] rules = { edit, save, search, view };\r\n\r\n\t\t// Identify the request parameter containing the method name\r\n\t\t// 得到字符串method,制定变量method中存放的是方法名称\r\n\t\tString parameter = mapping.getParameter();\r\n\r\n\t\t// don't set keyName unless it's defined on the action-mapping\r\n\t\t// no keyName -> unspecified will be called\r\n\t\tString keyName = null;\r\n\r\n\t\tif (parameter != null) {\r\n\t\t\t// 从变量method中取出方法名\r\n\t\t\tkeyName = request.getParameter(parameter);\r\n\t\t}\r\n\r\n\t\tif ((keyName == null) || (keyName.length() == 0)) {\r\n\t\t\tfor (int i = 0; i < rules.length; i++) {\r\n\t\t\t\t// apply the rules for automatically appending the method name\r\n\t\t\t\t// 根据请求路径中的信息,来选择处理方法。\r\n\t\t\t\tif (request.getServletPath().indexOf(rules[i]) > -1) {\r\n\t\t\t\t\treturn dispatchMethod(mapping, form, request, response,\r\n\t\t\t\t\t\t\trules[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn this.unspecified(mapping, form, request, response);\r\n\t\t}\r\n\r\n\t\t// Identify the string to lookup\r\n\t\tString methodName = getMethodName(mapping, form, request, response,\r\n\t\t\t\tparameter);\r\n\r\n\t\treturn dispatchMethod(mapping, form, request, response, methodName);\r\n\t}",
"protected ActionForward suite(ActionMapping mapping,ActionForm form , HttpServletRequest request, HttpServletResponse response, ActionErrors errors,Hashtable hParamProc ) throws ServletException{\r\n \tString signatureMethode =\r\n\t\t\t\"CompocfAction-suite(paramProc, mapping, form , request, response, errors )\";\r\n\r\n\t\tlogBipUser.entry(signatureMethode);\r\n \t//((CentrefraisForm)form).setLibcfrais(libCentreFrais);\r\n logBipUser.exit(signatureMethode);\r\n return mapping.findForward(\"initial\") ;\r\n\t}",
"public ActionForward init(\n\t\t\tActionMapping mapping,\n\t\t\tActionForm form,\n\t\t\tHttpServletRequest request,\n\t\t\tHttpServletResponse response)\n\t\t\tthrows Exception {\n\t\t\t\tResourceBundle bundle = ResourceBundle.getBundle(\"ApplicationResources\");\n\t\t\t\tUserMstr userBean = (UserMstr)request.getSession().getAttribute(\"USER_INFO\");\n\t\t\t\tKmElementMstrFormBean formBean = (KmElementMstrFormBean)form;\n\t\t\t\tlogger.info(userBean.getUserLoginId() + \" entered initElement method\");\n\t\t\t\tformBean.reset(mapping,request);\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\tKmElementMstrService kmElementService = new KmElementMstrServiceImpl();\n\t\t\t\t\tList firstDropDown;\n\t\t\t\t\tif (userBean.getKmActorId().equals(bundle.getString(\"LOBAdmin\"))||userBean.getKmActorId().equals(bundle.getString(\"Superadmin\"))) {\n\t\t\t\t\t\tfirstDropDown = kmElementService.getAllChildren(userBean.getElementId());\n\t\t\t\t\t}else{\n\t\t\t\t\t\tfirstDropDown = kmElementService.getChildren(userBean.getElementId());\n\t\t\t\t\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\tif (firstDropDown!=null && firstDropDown.size()!=0){\n\t\t\t\t\t\tformBean.setInitialLevel(((KmElementMstr)firstDropDown.get(0)).getElementLevel());\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t\n\t\t\t\t\t\tint initialLevel=Integer.parseInt(kmElementService.getElementLevelId(userBean.getElementId()));\n\t\t\t\t\t\tinitialLevel++;\n\t\t\t\t\t\tformBean.setInitialLevel(initialLevel+\"\");\n\t\t\t\t\t}\n\t\t\t\t\tformBean.setParentId(userBean.getElementId());\n\t\t\t\t\tformBean.setCreateMultiple(null);\n\t\t\t\t\tformBean.setElementPath(\"\");\n\t\t\t\t\trequest.setAttribute(\"elementLevelNames\",kmElementService.getAllElementLevelNames());\n\t\t\t\t\trequest.setAttribute(\"allParentIdString\",kmElementService.getAllParentIdString(\"1\",userBean.getElementId()));\n\t\t\t\t\trequest.setAttribute(\"firstList\",firstDropDown);\n\t\t\t\t\t\n\t\t\t\t} catch (LMSException e) {\n\t\t\t\t\tlogger.error(\"KmException in Loading page for Init Create ELement: \"+e.getMessage());\n\t\t\t\t\t\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlogger.error(\"Exception in Loading page for Init Create ELement: \"+e.getMessage());\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\tlogger.info(userBean.getUserLoginId() + \" exited init Create Element method\");\n\t\t\t\treturn mapping.findForward(\"initialize\");\n\t\t\t\t\n\t\t}",
"@Override\n\tpublic ActionForward doExecute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tString action = request.getParameter(\"action1\");\n\t\tif (action == null) action = LIST;\n\t\tif (log.isDebugEnabled()) log.debug(\"action:\" + action);\n\t\tActionForward forward = null;\n\t\tUserDefinedQueryForm theForm = (UserDefinedQueryForm) form;\n\t\ttry {\n\t\t\tif (LIST.equalsIgnoreCase(action)) forward = listAdvanceBacth(mapping, theForm, request, response); // 打开复杂查询列表页面\n\t\t\telse if (\"LISTSIMPLE\".equalsIgnoreCase(action)) forward = listSimpleBacth(mapping, theForm, request, response); // 打开简单查询列表页面\n\t\t\telse if (\"SHOWQUERY\".equalsIgnoreCase(action)) forward = queryAdvance(mapping, theForm, request, response);\n\t\t\telse if (\"SHOWSIMPLE\".equalsIgnoreCase(action)) forward = querySimple(mapping, theForm, request, response);\n\t\t\telse if (\"VALID\".equalsIgnoreCase(action)) forward = validate(mapping, theForm, request, response);\n\t\t\telse if (\"PREVIEWSQL\".equalsIgnoreCase(action)) forward = getSQLForPreview(mapping, theForm, request, response);\n\t\t\telse if (\"VALIDSIMPLE\".equalsIgnoreCase(action)) forward = validateSimple(mapping, theForm, request, response);\n\t\t\telse if (\"ADVANCEOVERVIEW\".equalsIgnoreCase(action)) forward = queryAdvanceOverview(mapping, theForm, request, response);\n\t\t\telse if (\"SIMPLEOVERVIEW\".equalsIgnoreCase(action)) forward = querySimpleOverview(mapping, theForm, request, response);\n\t\t\telse if (\"SAVERESULT\".equalsIgnoreCase(action)) forward = saveResult(mapping, theForm, request, response);\n\t\t\telse if (\"SHOWEXPORTEXCEL\".equalsIgnoreCase(action)) forward = showExportExcel(mapping, theForm, request, response);\n\t\t\telse if (\"EXPORTEXCEL\".equalsIgnoreCase(action)) forward = exportExcel(mapping, theForm, request, response);\n\t\t\telse {\n\t\t\t\trequest.setAttribute(\"err\", new WebException(\"找不到该action方法:\" + action));\n\t\t\t\tforward = mapping.findForward(ERROR);// 找不到合适的action\n\t\t\t}\n\n\t\t\t// else if(\"SAVEPARAM\".equalsIgnoreCase(action))\n\t\t\t// forward=saveQueryParam(mapping, theForm, request, response);\n\t\t\t// //保存查询条件到个人空间\n\t\t}\n\t\tcatch (Exception e) {// 其他系统出错\n\t\t\trequest.setAttribute(\"err\", e);\n\t\t\tforward = mapping.findForward(ERROR);\n\t\t}\n\t\treturn forward;\n\t}",
"public ActionForward execute(ActionMapping mapping, ActionForm form,\n\t\t\tHttpServletRequest req, HttpServletResponse res)\n\t\t\tthrows IOException, ServletException {\n\n\t\tTargetForm aForm = null;\n\t\tActionMessages errors = new ActionMessages();\n\t\tActionForward destination = null;\n\n\t\tif (!this.checkLogon(req)) {\n\t\t\treturn mapping.findForward(\"logon\");\n\t\t}\n\n\t\tif (form != null) {\n\t\t\taForm = (TargetForm) form;\n\t\t} else {\n\t\t\taForm = new TargetForm();\n\t\t}\n\n\t\tif (req.getParameter(\"delete.x\") != null) {\n\t\t\taForm.setAction(TargetAction.ACTION_CONFIRM_DELETE);\n\t\t}\n\n\t\tAgnUtils.logger().info(\"Action: \" + aForm.getAction());\n\n\t\tif (!allowed(\"targets.show\", req)) {\n\t\t\terrors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(\n\t\t\t\t\t\"error.permissionDenied\"));\n\t\t\tsaveErrors(req, errors);\n\t\t\treturn null;\n\t\t}\n\n\t\ttry {\n\t\t\tswitch (aForm.getAction()) {\n\t\t\tcase ACTION_LIST:\n\t\t\t\tdestination = mapping.findForward(\"list\");\n\t\t\t\tbreak;\n\n\t\t\tcase ACTION_VIEW:\n\t\t\t\tif (aForm.getTargetID() != 0) {\n\t\t\t\t\taForm.setAction(TargetAction.ACTION_SAVE);\n\t\t\t\t\tloadTarget(aForm, req);\n\t\t\t\t} else {\n\t\t\t\t\taForm.setAction(TargetAction.ACTION_NEW);\n\t\t\t\t}\n\t\t\t\tdestination = mapping.findForward(\"success\");\n\t\t\t\tbreak;\n\n\t\t\tcase ACTION_SAVE:\n\t\t\t\t// if(req.getParameter(\"save.x\")!=null) {\n\t\t\t\tsaveTarget(aForm, req);\n\t\t\t\t// }\n\t\t\t\tdestination = mapping.findForward(\"success\");\n\t\t\t\tbreak;\n\n\t\t\tcase ACTION_NEW:\n\t\t\t\t// if(req.getParameter(\"save.x\")!=null) {\n\t\t\t\tsaveTarget(aForm, req);\n\t\t\t\taForm.setAction(TargetAction.ACTION_SAVE);\n\t\t\t\t// }\n\t\t\t\tdestination = mapping.findForward(\"success\");\n\t\t\t\tbreak;\n\n\t\t\tcase ACTION_CONFIRM_DELETE:\n\t\t\t\tloadTarget(aForm, req);\n\t\t\t\tdestination = mapping.findForward(\"delete\");\n\t\t\t\taForm.setAction(TargetAction.ACTION_DELETE);\n\t\t\t\tbreak;\n\n\t\t\tcase ACTION_DELETE:\n\t\t\t\tthis.deleteTarget(aForm, req);\n\t\t\t\taForm.setAction(TargetAction.ACTION_LIST);\n\t\t\t\tdestination = mapping.findForward(\"list\");\n\t\t\t\tbreak;\n\n\t\t\tcase ACTION_CREATE_ML:\n\t\t\t\tdestination = mapping.findForward(\"create_ml\");\n\t\t\t\tbreak;\n\n\t\t\tcase ACTION_CLONE:\n\t\t\t\tif (aForm.getTargetID() != 0) {\n\t\t\t\t\tloadTarget(aForm, req);\n\t\t\t\t\tcloneTarget(aForm, req);\n\t\t\t\t\taForm.setAction(TargetAction.ACTION_SAVE);\n\t\t\t\t}\n\t\t\t\tdestination = mapping.findForward(\"success\");\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase ACTION_DELETE_RECIPIENTS_CONFIRM:\n\t\t\t\tloadTarget(aForm, req);\n\t\t\t\tthis.getRecipientNumber(aForm, req);\n\t\t\t\tdestination = mapping.findForward(\"delete_recipients\");\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase ACTION_DELETE_RECIPIENTS:\n\t\t\t\tloadTarget(aForm, req);\n\t\t\t\tthis.deleteRecipients(aForm, req);\t\t\t\t\n\t\t\t\taForm.setAction(TargetAction.ACTION_LIST);\n\t\t\t\tdestination = mapping.findForward(\"list\");\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase ACTION_BACK_TO_MAILINGWIZARD:\n\t\t\t\tdestination = mapping.findForward(\"back_mailingwizard\");\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\tdestination = mapping.findForward(\"list\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tAgnUtils.logger().error(\n\t\t\t\t\t\"execute: \" + e + \"\\n\" + AgnUtils.getStackTrace(e));\n\t\t\terrors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(\n\t\t\t\t\t\"error.exception\"));\n\t\t}\n\t\t\n\t\tif( \"list\".equals(destination.getName())) {\n\t\t\treq.setAttribute(\"targetlist\", loadTargetList(req) );\n\t\t\tsetNumberOfRows(req, aForm);\n\t\t}\n\t\t\n\n\t\t// Report any errors we have discovered back to the original form\n\t\tif (!errors.isEmpty()) {\n\t\t\tsaveErrors(req, errors);\n\t\t\treturn (new ActionForward(mapping.getInput()));\n\t\t}\n\n\t\treturn destination;\n\n\t}",
"public Form getCreationForm() throws ProcessManagerException {\r\n try {\r\n Action creation = processModel.getCreateAction();\r\n return processModel.getPublicationForm(creation.getName(), currentRole,\r\n getLanguage());\r\n } catch (WorkflowException e) {\r\n throw new ProcessManagerException(\"SessionController\",\r\n \"processManager.ERR_NO_CREATION_FORM\", e);\r\n }\r\n }",
"private String getFormAction(UserRequest ureq) {\n // cannot avoid rawtype warning\n @SuppressWarnings(\"rawtypes\")\n Enumeration params = ureq.getHttpReq().getParameterNames();\n while (params.hasMoreElements()) {\n String key = (String) params.nextElement();\n if (key.startsWith(ACTION_PRE)) {\n return key.substring(ACTION_PRE.length());\n }\n }\n return null;\n }",
"public Object formBackingObject(HttpServletRequest request)\n\t\t\tthrows ServletException {\n \t\n \t// get the User's type from session \t\n \t// \n \t/*String action = request.getParameter(\"action\");\n \tString basketId = request.getParameter(\"basket\"); \t\n \t*/\n \t\n \tString vasItemId = request.getParameter(\"vasitem\");\n \tString funcId = request.getParameter(\"funcid\");\n \t\n \tVasMrtSelectionDTO vasMrtSelectionDTO = new VasMrtSelectionDTO();\n \tvasMrtSelectionDTO.setFuncId(funcId);\n \t\n \tBomSalesUserDTO user = (BomSalesUserDTO) request.getSession().getAttribute(\"bomsalesuser\");\n \tString appMode = (String) request.getSession().getAttribute(\"appMode\");\n \t\n \tif (\"EX06\".equals(funcId)){\n \t\n \tvasMrtSelectionDTO = (VasMrtSelectionDTO) request.getSession().getAttribute(\"vasMrtSelectionSession\");\n \t\n \tCustomerProfileDTO sessionCustomer = null; //Dennis MIP3\n \t\n \t\n \t \n\t\t\n\t\tif (\"mobccs\".equals(appMode)) {\n\t\t\tsessionCustomer = (CustomerProfileDTO) MobCcsSessionUtil.getSession(request, \"customer\");\n\t\t} else {\n\t\t\tsessionCustomer = (CustomerProfileDTO) request.getSession().getAttribute(\"customer\");\n\t\t} \t\t\n \t\n \t\n \tif (vasMrtSelectionDTO == null || !vasItemId.equals(vasMrtSelectionDTO.getVasItemId())) {\n \t\tvasMrtSelectionDTO = new VasMrtSelectionDTO();\n \tvasMrtSelectionDTO.setFuncId(funcId);\n \t\t\n \t\tvasMrtSelectionDTO.setVasItemId(vasItemId);\n \t\t\n \t\t\n \t\tif (sessionCustomer != null) {\n \t\t\tvasMrtSelectionDTO.setNumType(sessionCustomer.getNumType());\n \t\t}\t\t\t\t\n \t\t\n\t\t} \telse {\n\t\t\tif (StringUtils.isNotEmpty(vasMrtSelectionDTO.getMsisdn())){\n\t\t\t\t\tif (\"mobccs\".equals(appMode)) {\n\t\t\t\t\t\tList<String[]> lists = mobCcsMrtService.getOneCardTwoNumberByFullNumber(user.getChannelCd(), vasMrtSelectionDTO.getMsisdn(), vasMrtSelectionDTO.getNumType());\n\n\t\t\t\n\t\t\t\t\t\tIterator<String[]> itr = lists.iterator();\n\t\t\t\t\t while (itr.hasNext()){\n\t\t\t\t\t \tString[] item = itr.next();\n\t\t\t\t\t \t\n\t\t\t\t\t\t\tvasMrtSelectionDTO.setMsisdn(item[0]);\n\t\t\t\t\t\t\tvasMrtSelectionDTO.setMsisdnLvl(item[1]);\n\t\t\t\t\t\t\tvasMrtSelectionDTO.setChannelCd(item[2]);\n\t\t\t\t\t\t\tvasMrtSelectionDTO.setCityCd(item[3]);\n\t\t\t\t\t\t\tvasMrtSelectionDTO.setMsisdnStatus(item[4]);\n\t\t\t\t\t\t\tvasMrtSelectionDTO.setNumType(item[5]);\n\t\t\t\t\t\t\tvasMrtSelectionDTO.setSrvNumType(item[6]);\n\t\t\t\t\t }\n\t\t\t\t\t} else {\n\t\t\t\t\t\tList<CnpDTO> output = mnpService.getNew1C2NMsisdn(vasMrtSelectionDTO.getMsisdn(),\n\t\t\t\t\t\t\t\tBomWebPortalConstant.CNM_STATUS_NORMAL, user.getBomShopCd(), \"R\", null,\n\t\t\t\t\t\t\t\tsessionCustomer.getNumType(), 1);\n\t\t\t\t\t\tif (output != null && !output.isEmpty() && output.size() == 1) {\n\t\t\t\t\t\t\tCnpDTO temp = output.get(0);\n\t\t\t\t\t\t\tvasMrtSelectionDTO.setMsisdn(temp.getMsisdn());\n\t\t\t\t\t\t\tvasMrtSelectionDTO.setNumType(temp.getNumType());\n\t\t\t\t\t\t\tvasMrtSelectionDTO.setCityCd(temp.getCity());\n\t\t\t\t\t\t\tvasMrtSelectionDTO.setMsisdnStatus(String.valueOf(temp.getStatus()));\n\t\t\t\t\t\t\tvasMrtSelectionDTO.setSrvNumType(temp.getType());\n\t\t\t\t\t\t\tvasMrtSelectionDTO.setShopCd(temp.getDepartmentCode().substring(1));\n\t\t\t\t\t\t\tvasMrtSelectionDTO.setMsisdnLvl(temp.getLevel());\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n \t\n \tvasMrtSelectionDTO.setSession(request.getSession());\n \tvasMrtSelectionDTO.setChinaInd(\"Y\");\n \t}\n \t\n \tif (\"EX07\".equals(funcId)){\n \t\n \tvasMrtSelectionDTO = (VasMrtSelectionDTO) request.getSession().getAttribute(\"ssMrtSelectionSession\");\n\n \tCustomerProfileDTO sessionCustomer = null; //Dennis MIP3\n\t\t\n\t\tif (user.getChannelId() == 2) {\n\t\t\tsessionCustomer = (CustomerProfileDTO) MobCcsSessionUtil.getSession(request, \"customer\");\n\t\t} else {\n\t\t\tsessionCustomer = (CustomerProfileDTO) request.getSession().getAttribute(\"customer\");\n\t\t} \t\t\n \t\n \tif (vasMrtSelectionDTO == null || !vasItemId.equals(vasMrtSelectionDTO.getVasItemId())) {\n \t\tvasMrtSelectionDTO = new VasMrtSelectionDTO();\n \tvasMrtSelectionDTO.setFuncId(funcId);\n \t\t\n \t\tvasMrtSelectionDTO.setVasItemId(vasItemId);\n \t\t\t\n \t\tif (sessionCustomer != null) {\n \t\t\tvasMrtSelectionDTO.setNumType(sessionCustomer.getNumType());\n \t\t}\n \t\t\n\t\t} else {\n\t\t\tif (StringUtils.isNotEmpty(vasMrtSelectionDTO.getSecSrvNum())){\n\t\t\t\tList<CnpDTO> output = mnpService.getNewSsMsisdn(vasMrtSelectionDTO.getSecSrvNum(), BomWebPortalConstant.CNM_STATUS_NORMAL, user.getBomShopCd(), \"R\", sessionCustomer.getNumType(), 1);\n\t\t\t\tif (output != null && !output.isEmpty() && output.size() == 1){\n\t\t\t\t\tCnpDTO temp = output.get(0);\n\t\t\t\t\tvasMrtSelectionDTO.setMsisdn(temp.getMsisdn());\n\t\t\t\t\tvasMrtSelectionDTO.setNumType(temp.getNumType());\n\t\t\t\t\tvasMrtSelectionDTO.setCityCd(temp.getCity());\n\t\t\t\t\tvasMrtSelectionDTO.setMsisdnStatus(String.valueOf(temp.getStatus()));\n\t\t\t\t\tvasMrtSelectionDTO.setSrvNumType(temp.getType());\n\t\t\t\t\tvasMrtSelectionDTO.setShopCd(temp.getDepartmentCode().substring(1));\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tvasMrtSelectionDTO.setMsisdnLvl(temp.getLevel());\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n \t\n \tif (vasMrtSelectionDTO.getVasItemId() == null) {\n \t\tvasMrtSelectionDTO.setVasItemId(vasItemId);\n\t\t}\n \t\n \tif (vasMrtSelectionDTO.getFuncId() == null) {\n \t\tvasMrtSelectionDTO.setFuncId(funcId);\n\t\t} \t\n\t\t\n \t}\n \t\n \tvasMrtSelectionDTO.setValue(\"user\", user);\n \tvasMrtSelectionDTO.setValue(\"request\", request);\n \t\n\t\treturn vasMrtSelectionDTO;\n \t\n }",
"protected ActionForward valider(ActionMapping mapping, ActionForm form, String mode, HttpServletRequest request, HttpServletResponse response, ActionErrors errors ,Hashtable hParamProc ) throws ServletException{\r\n\t\t//Récupérer le niveau d'habilitation = keyList1\r\n\t\tString sHab = ((CentrefraisForm)form).getKeyList1();\r\n\t\t\r\n\t\tVector vParamOut = new Vector();\r\n\t String message=\"\";\r\n\t\tActionForward actionForward=null;\r\n\t\tString signatureMethode =\r\n\t\t\t\"CompocfAction-valider(paramProc, mapping, form , request, response, errors )\";\r\n\r\n\t\tlogBipUser.entry(signatureMethode);\r\n\t\t\r\n\t\t//Titre de la liste\r\n\t\tif (sHab.equals(\"br\")){\r\n\t\t\t\t\t((CentrefraisForm)form).setTitrePage(\"branches\");\r\n\t\t}\r\n\t\telse if (sHab.equals(\"dir\")){\r\n\t\t\t\t\t((CentrefraisForm)form).setTitrePage(\"directions\");\r\n\t\t}\r\n\t\telse if (sHab.equals(\"dpt\")){\r\n\t\t\t\t\t((CentrefraisForm)form).setTitrePage(\"départements\");\r\n\t\t}\r\n\t\telse if (sHab.equals(\"pole\")){\r\n\t\t\t\t\t((CentrefraisForm)form).setTitrePage(\"pôles\");\r\n\t\t}\r\n\t\tif (mode .equals(\"insert\")){ //Page mCompocfAd.jsp\r\n\t\t\r\n\t\t\t\tlogBipUser.exit(signatureMethode);\r\n\t\t\t\treturn mapping.findForward(\"bddpg\") ;\r\n\t\t\r\n\t\t}\r\n\t\telse {\r\n\t\t\tlogBipUser.debug(\"mode:\"+hParamProc.get(\"mode\"));\r\n\t\t\t//exécuter la procédure\r\n\t\t\tactionForward = validation(mapping, form ,mode, request,response, errors,hParamProc );\r\n\t\t\t\r\n\t\t}\r\n\t\r\n\t\t return actionForward;\r\n\t\r\n\t}",
"public ActionForward initNonContext(ActionMapping mapping, ActionForm form,\n\t\t\tHttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows Exception {\n\t\tlogger.info(\" Started... \");\n\n\t\t/*\n\t\t * No dropdowns to populate, Redirect to Change Password JSP for\n\t\t * Non-Context User.\n\t\t */\n\t\tlogger.info(\" successful redirected to : nonContextInitSuccess\");\n\t\tlogger.info(\" Executed... \");\n\t\treturn mapping.findForward(NON_CONTEXT_INIT_SUCCESS);\n\t}",
"public Form getActionForm(String stateName, String actionName)\r\n throws ProcessManagerException {\r\n try {\r\n return processModel.getPublicationForm(actionName, currentRole,\r\n getLanguage());\r\n } catch (WorkflowException e) {\r\n throw new ProcessManagerException(\"SessionController\",\r\n \"processManager.UNKNOWN_ACTION\", e);\r\n }\r\n }",
"public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {\r\n Logger l = LogUtils.enterLog(getClass(), \"execute\");\r\n\r\n ActionForward af = null;\r\n Record inputRecord = getInputRecord(request);\r\n\r\n if (l.isLoggable(Level.FINE)) {\r\n l.logp(Level.FINE, getClass().getName(), \"execute\", \"Request URI:\" + request.getRequestURI() + \"', process: '\" + request.getParameter(\"process\") + \"', parameters as Input Record: \" + inputRecord);\r\n String txtXML = request.getParameter(\"txtXML\");\r\n if (!StringUtils.isBlank(txtXML)) {\r\n l.logp(Level.FINE, getClass().getName(), \"execute\", \"txtXML as Input RecordSet: \" + getInputRecordSet(request));\r\n }\r\n }\r\n\r\n boolean isAjaxRequest = isAjaxRequest(request);\r\n try {\r\n String policyNo = \"\";\r\n\r\n if (!StringUtils.isBlank(request.getParameter(RequestIds.POLICY_NO))) {\r\n policyNo = request.getParameter(RequestIds.POLICY_NO);\r\n }\r\n else {\r\n if (RequestStorageManager.getInstance().has(RequestStorageIds.POLICY_NO)) {\r\n policyNo = (String) RequestStorageManager.getInstance().get(RequestStorageIds.POLICY_NO);\r\n }\r\n }\r\n\r\n boolean requestDueToFailure = false;\r\n if (MessageManager.getInstance().hasErrorMessages()) {\r\n requestDueToFailure = true;\r\n }\r\n\r\n // Load the Policy Header even if the policyNo is blank so that if the previous policy was locked, it will be unlocked.\r\n PolicyHeader policyHeader = null;\r\n try {\r\n\r\n //Initialize the save token. Don't do this for Ajax requests because the save token is already set for the page.\r\n if (!isAjaxRequest) {\r\n initializeLoadRequestForSave(request, getTokenConstant());\r\n if (inputRecord.hasField(\"noLoadingDiv\")\r\n && YesNoFlag.getInstance(inputRecord.getStringValue(\"noLoadingDiv\")).booleanValue()) {\r\n request.setAttribute(\"noLoadingDiv\", true);\r\n }\r\n }\r\n\r\n RequestStorageManager.getInstance().set(RequestIds.IS_PREVIEW_REQUEST,\r\n (YesNoFlag.getInstance((String) inputRecord.getFieldValue(RequestIds.IS_PREVIEW_REQUEST, \"N\")).booleanValue()));\r\n\r\n policyHeader = loadPolicyHeader(request);\r\n\r\n handlePreviewRequest(request, policyHeader);\r\n\r\n if (inputRecord.getBooleanValue(\"processRatingB\", false).booleanValue()) {\r\n UserSessionManager.getInstance().getUserSession().set(\"PreviousPolicyHeader\", policyHeader);\r\n }\r\n\r\n // Load the PolicyHeader Oasis Fields for the included policyHeader.jsp.\r\n if (policyHeader != null) {\r\n //For access trail\r\n request.setAttribute(AccessTrailRequestIds.ACCESS_TRAIL_SOURCE_TABLE_NAME, \"POLICY_TERM_HISTORY\");\r\n request.setAttribute(AccessTrailRequestIds.ACCESS_TRAIL_SOURCE_RECORD_NO, policyHeader.getPolicyNo());\r\n request.setAttribute(AccessTrailRequestIds.ACCESS_TRAIL_SOURCE_RECORD_FK, policyHeader.getPolicyTermHistoryId());\r\n\r\n // If the Policy Header is loaded:\r\n // 1. Load the Policy Header specific OasisFields and create field/value beans\r\n securePage(request, form, true, true);\r\n\r\n // record for header fields\r\n Record record = (Record) request.getAttribute(RequestIds.NON_GRID_FIELDS_RECORD);\r\n request.setAttribute(RequestIds.HEADER_FIELDS_RECORD, record);\r\n request.removeAttribute(RequestIds.NON_GRID_FIELDS_RECORD);\r\n\r\n OasisFields fieldsMap = (OasisFields) request.getAttribute(IOasisAction.KEY_FIELDS);\r\n Term currentTerm = policyHeader.getPolicyTerm(policyHeader.getPolicyTermHistoryId());\r\n boolean isWipAvailable = currentTerm.isWipExists();\r\n boolean isOfficialAailable = currentTerm.isOfficialExists();\r\n boolean isEndorsementQuoteAailable = currentTerm.isEndorsementQuoteExists();\r\n boolean isRenewalQuoteAailable = currentTerm.isRenewalQuoteExists();\r\n\r\n OasisFormField field = (OasisFormField) fieldsMap.get(\"policyViewMode\");\r\n String lovSql = \"[NO_ADD_SELECT_OPTION]LIST:\";\r\n if (isOfficialAailable) {\r\n lovSql = lovSql + \"OFFICIAL,Official,\";\r\n }\r\n if (isWipAvailable) {\r\n lovSql = lovSql + \"WIP,WIP,\";\r\n }\r\n if (isEndorsementQuoteAailable) {\r\n //get Endorsment Quote list\r\n RecordSet rs = getPolicyManager().loadAllEndorsementQuote(policyHeader);\r\n Iterator itor = rs.getRecords();\r\n while (itor.hasNext()) {\r\n Record endQuoteRecord = (Record) itor.next();\r\n String endQuoteId = endQuoteRecord.getStringValue(\"endorsementQuoteId\");\r\n lovSql = lovSql + \"ENDQUOTE,Endorsement Quote: \" + endQuoteId + \",\";\r\n }\r\n\r\n }\r\n else if (isRenewalQuoteAailable) {\r\n //get renewal quote list\r\n RecordSet rs = getPolicyManager().loadAllEndorsementQuote(policyHeader);\r\n Iterator itor = rs.getRecords();\r\n while (itor.hasNext()) {\r\n Record endQuoteRecord = (Record) itor.next();\r\n String endQuoteId = endQuoteRecord.getStringValue(\"endorsementQuoteId\");\r\n lovSql = lovSql + \"ENDQUOTE,Renewal Quote: \" + endQuoteId + \",\";\r\n }\r\n }\r\n\r\n if (PolicyAttributesFactory.getInstance().isDisplayQuoteInViewModeEnable(\r\n policyHeader.getLastTransactionInfo().getTransEffectiveFromDate(),\r\n policyHeader.getPolicyCycleCode(),\r\n policyHeader.getQuoteCycleCode(),\r\n policyHeader.getLastTransactionInfo().getTransactionTypeCode(),\r\n policyHeader.getRecordMode(),\r\n policyHeader.getPolicyStatus())) {\r\n Record r = policyHeader.toRecord();\r\n r.setFieldValue(QuoteFields.SELECT_MODE,\r\n QuoteFields.joinSelectMode(QuoteFields.EXCL_SELF, QuoteFields.TERM_SENS, QuoteFields.EXCL_NB,\r\n QuoteFields.EXCL_INVALID, QuoteFields.EXCL_ACCEPTED));\r\n RecordSet rs = getQuoteManager().loadQuoteVersions(r);\r\n\r\n for (int i = 0; i < rs.getRecordList().size(); i ++ ) {\r\n r = rs.getRecordList().get(i);\r\n String text = PolicyAttributesFactory.getInstance().getDisplayQuoteInViewModeText(\r\n policyHeader.getLastTransactionInfo().getTransEffectiveFromDate(),\r\n PolicyFields.getPolicyCycleCode(r),\r\n PolicyFields.getQuoteCycleCode(r),\r\n r);\r\n if (text != null) {\r\n lovSql = lovSql + \"QUOTE:\"+PolicyHeaderFields.getPolicyNo(r) +\r\n \",\" + text + \",\";\r\n }\r\n }\r\n }\r\n field.setLovSql(lovSql);\r\n // 2. Load any list of values for the Policy Header\r\n loadListOfValues(request, form);\r\n // 3. Reset the map attribute to a specific policyHeaderFieldsMap name\r\n request.setAttribute(KEY_PH_FIELDS, fieldsMap);\r\n request.setAttribute(IOasisAction.KEY_HEADER_PAGE_FIELDS, fieldsMap);\r\n //set selected endquote\r\n\r\n //TODO: see workaround below\r\n// request.removeAttribute(IOasisAction.KEY_FIELDS);\r\n// if(policyHeader.getPolicyIdentifier().getPolicyViewMode().isEndquote()){\r\n// request.setAttribute(\"policyViewMode\",\"ENDQUOTE:\"+policyHeader.getLastTransactionId());\r\n// }\r\n }\r\n }\r\n catch (Exception e) {\r\n l.logp(Level.WARNING, getClass().getName(), \"execute\", \"Failed to load the policy information for policyNo '\" + policyNo + \"'\", e);\r\n }\r\n final StringBuffer requestInformation = new StringBuffer();\r\n requestInformation.append(\"URI:'\").append(request.getRequestURI()).append(\"', \");\r\n requestInformation.append(\"process:'\").append(request.getParameter(RequestIds.PROCESS)).append(\"', \");\r\n requestInformation.append(\"UserId:'\").append(UserSessionManager.getInstance().getUserSession().getUserId()).append(\"', \");\r\n if (!StringUtils.isBlank(policyNo)) {\r\n if (policyHeader != null) {\r\n\r\n if (l.isLoggable(Level.INFO)) {\r\n if (!mapping.getPath().endsWith(\"maintainLock\") || l.isLoggable(Level.FINE)) {\r\n requestInformation.append(\"Policy No:'\").append(policyHeader.getPolicyNo()).append(\"', \");\r\n requestInformation.append(\"Policy Id:'\").append(policyHeader.getPolicyId()).append(\"', \");\r\n requestInformation.append(\"Policy Type:'\").append(policyHeader.getPolicyTypeCode()).append(\"', \");\r\n requestInformation.append(\"View Mode:'\").append(policyHeader.getPolicyIdentifier().getPolicyViewMode()).append(\"', \");\r\n requestInformation.append(\"Lock Id:'\").append(policyHeader.getPolicyIdentifier().getPolicyLockId()).append(\"', \");\r\n requestInformation.append(\"IsSelectedTermInWIP:'\").append(policyHeader.isWipB()).append(\"', \");\r\n requestInformation.append(\"Own Lock?\").append(policyHeader.getPolicyIdentifier().ownLock()).append(\"', \");\r\n requestInformation.append(\"Policy History Term Id:'\").append(policyHeader.getPolicyTermHistoryId()).append(\"', \");\r\n requestInformation.append(\"Term Base Id:'\").append(policyHeader.getTermBaseRecordId()).append(\"', \");\r\n requestInformation.append(\"Effective From Date:'\").append(policyHeader.getTermEffectiveFromDate()).append(\"', \");\r\n requestInformation.append(\"Effective To Date:'\").append(policyHeader.getTermEffectiveToDate()).append(\"', \");\r\n requestInformation.append(\"Risk Id:'\").append(inputRecord.getStringValue(\"riskId\", \"\")).append(\"', \");\r\n requestInformation.append(\"Coverage Id:'\").append(inputRecord.getStringValue(\"coverageId\", \"\")).append(\"', \");\r\n requestInformation.append(\"Latest Transaction Id:'\").append(policyHeader.getLastTransactionInfo().getTransactionLogId()).append(\"' \");\r\n\r\n l.logp(Level.INFO, getClass().getName(), \"execute\", \"Request Information: \" + requestInformation.toString());\r\n }\r\n\r\n if (l.isLoggable(Level.FINE)) {\r\n l.logp(Level.FINE, getClass().getName(), \"execute\", \"policyHeader = \" + policyHeader);\r\n }\r\n\r\n }\r\n af = super.execute(mapping, form, request, response);\r\n }\r\n else {\r\n if (requestDueToFailure) {\r\n l.logp(Level.INFO, getClass().getName(), \"execute\", \"Request Information: \" + requestInformation.toString());\r\n // Don't forward to failure page if this request is already the result of a failure.\r\n af = super.execute(mapping, form, request, response);\r\n }\r\n else {\r\n l.logp(Level.INFO, getClass().getName(), \"execute\", \"Request Information: \" + requestInformation.toString());\r\n // Failed to load the PolicyHeader for the requested PolicyNo.\r\n l.logp(Level.WARNING, getClass().getName(), \"execute\", \"Unable to load the policy information for policyNo '\" + policyNo + \"'\");\r\n MessageManager.getInstance().addErrorMessage(\"pm.findpolicy.noData.msg\", new Object[]{policyNo});\r\n if (isAjaxRequest) {\r\n // If this is an Ajax request, write the error\r\n writeAjaxResponse(response, new Record(), true);\r\n }\r\n else {\r\n // Otherwise, return the global forward to the find policy page\r\n af = mapping.findForward(\"loadPolicyFailure\");\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n requestInformation.append(\"Policy No Is Not Provided\");\r\n l.logp(Level.INFO, getClass().getName(), \"execute\", \"Request Information: \" + requestInformation.toString());\r\n af = super.execute(mapping, form, request, response);\r\n }\r\n // Reset notification transaction time\r\n OasisUser oasisUser = UserSessionManager.getInstance().getUserSession().getOasisUser();\r\n if (oasisUser.hasRequestedTransactionTime()) {\r\n oasisUser.setRequestedTransactionTime(null);\r\n }\r\n }\r\n catch (Exception e) {\r\n AppException ae = ExceptionHelper.getInstance().handleException(\"Error loading policy header information.\", e);\r\n l.throwing(getClass().getName(), \"execute\", ae);\r\n String forwardString = handleError(AppException.UNEXPECTED_ERROR, \"Error loading policy header information.\", e, request, mapping);\r\n af = mapping.findForward(forwardString);\r\n }\r\n\r\n // Set all fields in fieldsMap to readonly if there's \"readOnly\" attribute is set to \"Y\" in request.\r\n // The fieldId of this indicator field is defined in EntitlementFields class.\r\n // For some unkown reason, sometime the readOnly attribute is set as String\r\n // Below codes are from safe perspective\r\n Object oReadonly = request.getAttribute(EntitlementFields.READ_ONLY);\r\n boolean isReadonly = false;\r\n if (oReadonly != null) {\r\n if (oReadonly instanceof String) {\r\n isReadonly = YesNoFlag.getInstance((String) oReadonly).booleanValue();\r\n }\r\n else if (oReadonly instanceof YesNoFlag) {\r\n isReadonly = ((YesNoFlag) oReadonly).booleanValue();\r\n }\r\n }\r\n\r\n Object oHanldeLayer = request.getAttribute(EntitlementFields.HANDLE_LAYER);\r\n boolean isHanldeLayer = true;\r\n if (oHanldeLayer != null) {\r\n if (oHanldeLayer instanceof String) {\r\n isHanldeLayer = YesNoFlag.getInstance((String) oHanldeLayer).booleanValue();\r\n }\r\n else if (oHanldeLayer instanceof YesNoFlag) {\r\n isHanldeLayer = ((YesNoFlag) oHanldeLayer).booleanValue();\r\n }\r\n }\r\n\r\n if (isReadonly) {\r\n String [] excludedFieldsList = null;\r\n if (hasAlwaysEnabledFieldIds())\r\n excludedFieldsList = getAlwaysEnabledFieldIds().split(\",\");\r\n setFieldsToReadOnly(request, excludedFieldsList, isHanldeLayer, true);\r\n }\r\n\r\n if (isSaveInProgress()) {\r\n if (isAjaxRequest && MessageManager.getInstance().hasConfirmationPrompts()) {\r\n // The Ajax request was a save request, and did not complete because it requires confirmations.\r\n // Remove the save in-progress session attribute to indicate that the save process has been exited.\r\n updateSessionToken(request,getTokenConstant());\r\n removeSaveInProgressIndicator();\r\n }\r\n else if (request.getAttribute(IOasisAction.KEY_ERROR) == null &&\r\n request.getAttribute(IOasisAction.KEY_VALIDATION_ERROR) == null &&\r\n MessageManager.getInstance().hasErrorMessages() == false\r\n ) {\r\n\r\n saveProcessSucceeded(request, getTokenConstant());\r\n }\r\n else {\r\n updateSessionToken(request, getTokenConstant());\r\n saveProcessFailed(request);\r\n }\r\n } else {\r\n //make sure a new token gets generated when loading a page. this will avoid calling the saveToken() on all the action classes initial load.\r\n //the IS_STRUTS_LOAD_ACTION is to make sure that it is loading for the first time.\r\n if (!isAjaxRequest(request) && request.getAttribute(RequestStorageIds.IS_STRUTS_LOAD_ACTION) == null) {\r\n //saveToken(request, getTokenConstant());\r\n updateCSRFTokenInForwardParameter(request);\r\n }\r\n }\r\n\r\n request.getSession().removeAttribute(RequestStorageIds.IS_STRUTS_LOAD_ACTION);\r\n\r\n request.removeAttribute(RequestStorageIds.IS_STRUTS_LOAD_ACTION);\r\n l.exiting(getClass().getName(), \"execute\", af);\r\n return af;\r\n }",
"ActionMap getActionMap() {\n String mapName = getPropertyPrefix() + \".actionMap\";\n ActionMap map = (ActionMap)UIManager.get(mapName);\n\n if (map == null) {\n map = createActionMap();\n if (map != null) {\n UIManager.getLookAndFeelDefaults().put(mapName, map);\n }\n }\n ActionMap componentMap = new ActionMapUIResource();\n componentMap.put(\"requestFocus\", new FocusAction());\n /*\n * fix for bug 4515750\n * JTextField & non-editable JTextArea bind return key - default btn not accessible\n *\n * Wrap the return action so that it is only enabled when the\n * component is editable. This allows the default button to be\n * processed when the text component has focus and isn't editable.\n *\n */\n if (getEditorKit(editor) instanceof DefaultEditorKit) {\n if (map != null) {\n Object obj = map.get(DefaultEditorKit.insertBreakAction);\n if (obj instanceof DefaultEditorKit.InsertBreakAction breakAction) {\n Action action = new TextActionWrapper(breakAction);\n componentMap.put(action.getValue(Action.NAME),action);\n }\n }\n }\n if (map != null) {\n componentMap.setParent(map);\n }\n return componentMap;\n }",
"public ActionForward inicio(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response)\n throws Exception\n {\n TemaForm temaForm = (TemaForm) form;\n String forward = \"INICIO\";\n try\n {\n temaForm.setCriterioTema(new CriterioTema());\n temaForm.setTema(new Tema());\n temaForm.setTemas(new ArrayList<Tema>());\n } catch (Exception e)\n {\n log.error(\"Ha ocurrido un error en el metodo inicio del tema\", e);\n }\n return mapping.findForward(forward);\n }",
"@Override\n\tpublic FormContainer getFormContainer() {\n\t\treturn null;\n\t}",
"private ApplicationActionMap getAppActionMap() {\n\t\treturn Application.getInstance().getContext().getActionMap(this);\n\t}",
"public ActionForward execute(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response) {\r\n\t\tRootMaster rootMaster = new RootMaster();\r\n\t\tString strStatus=\"failure\";\r\n\t\tDataSource dataSource = getDataSource(request,\"entp\");\r\n\t\tFirstCreationForm firstCreationForm = (FirstCreationForm) form;// TODO Auto-generated method stub\r\n\t\tString phoneNo = firstCreationForm.getTxtCPPrefix()+\"~\"+firstCreationForm.getTxtCAreacode()+\"~\"+firstCreationForm.getTxtCPhone();\r\n\t\tString strResult=rootMaster.companyVerify(dataSource,firstCreationForm.getCompanySName(),firstCreationForm.getCompanyEMail(),phoneNo);\r\n\t\tif(!strResult.equals(\"success\"))\r\n\t\t{\r\n\t\t\tif(strResult.equals(\"sname\"))\r\n\t\t\t{\r\n\t\t\t\tActionErrors errors = new ActionErrors();\r\n\t\t\t\terrors.add(\"duplicate\", new ActionError(\"errors.company.duplicate\"));\r\n\t\t\t\t\r\n\t\t\t\tif(!errors.isEmpty())\r\n\t\t\t\t{\r\n\t\t\t\t\tsaveErrors(request, errors);\r\n\t\t\t\t}\r\n\t\t\t\tstrStatus=\"failure\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(strResult.equals(\"mailid\"))\r\n\t\t\t{\r\n\t\t\t\tActionErrors errors = new ActionErrors();\r\n\t\t\t\terrors.add(\"duplicate\", new ActionError(\"errors.company.mailId\"));\r\n\t\t\t\t\r\n\t\t\t\tif(!errors.isEmpty())\r\n\t\t\t\t{\r\n\t\t\t\t\tsaveErrors(request, errors);\r\n\t\t\t\t}\r\n\t\t\t\tstrStatus=\"failure\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(strResult.equals(\"phone\"))\r\n\t\t\t{\r\n\t\t\t\tActionErrors errors = new ActionErrors();\r\n\t\t\t\terrors.add(\"duplicate\", new ActionError(\"errors.company.phone\"));\r\n\t\t\t\t\r\n\t\t\t\tif(!errors.isEmpty())\r\n\t\t\t\t{\r\n\t\t\t\t\tsaveErrors(request, errors);\r\n\t\t\t\t}\r\n\t\t\t\tstrStatus=\"failure\";\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t//end company phone no check\r\n\t\t\r\n\t\tFirstCreationVo firstCreationVo=firstCreationForm.getFirstCreationVO();\r\n\t\tHttpSession session= request.getSession();\r\n\t\tsession.setAttribute(\"companyData\", firstCreationVo);\r\n\t\tstrStatus=\"success\";\r\n\t\t}\r\n\t\treturn mapping.findForward(strStatus);\r\n\t}",
"public ActionForward execute(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response)\n throws Exception {\n // Use the overridden getMethodName.\n return super.execute(mapping, form, request, response);\n }",
"protected ActionForward performAction(ActionMapping \t\tmapping,\n\t\t\t\t\t\t\t\t\t\t ActionForm\t\t\tform,\n\t\t\t\t\t\t\t\t\t\t HttpServletRequest\trequest,\n\t\t\t\t\t\t\t\t\t\t HttpServletResponse\tresponse)\n\t\tthrows Exception \n\t{\n\t\tString forward = \"success\";\n\t\trequest.setAttribute(ALLOW_EDITS_KEY, \"false\");\n\t\t\n\t\tHttpSession session = request.getSession();\n\t\tArrayList selectedTestIds = new ArrayList();\n\t\tsession.setAttribute(\"selectedTestIds\", selectedTestIds);\n\n\t\tBaseActionForm dynaForm = (BaseActionForm) form;\n\n\t\t// Initialize the form.\n\t\tdynaForm.initialize(mapping);\n\t\t\n\t\tPropertyUtils.setProperty(dynaForm, \"currentDate\", DateUtil.getCurrentDateAsText());\n\t\tPropertyUtils.setProperty(dynaForm, \"sampleTypes\", DisplayListService.getList(ListType.SAMPLE_TYPE_ACTIVE));\n\t\tPropertyUtils.setProperty(dynaForm, \"sampleSources\", DisplayListService.getList(ListType.SAMPLE_SOURCE));\n\t\tPropertyUtils.setProperty(dynaForm, \"initConditionFormErrorsList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_INIT_COND_FORM_ERRORS));\n\t\tPropertyUtils.setProperty(dynaForm, \"initConditionLabelErrorsList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_INIT_COND_LABEL_ERRORS));\n\t\tPropertyUtils.setProperty(dynaForm, \"initConditionMiscList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_INIT_COND_MISC));\n\t\tPropertyUtils.setProperty(dynaForm, \"rejectionReasonFormErrorsList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_REJECTION_FORM_ERRORS));\n\t\tPropertyUtils.setProperty(dynaForm, \"rejectionReasonLabelErrorsList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_REJECTION_LABEL_ERRORS));\n\t\tPropertyUtils.setProperty(dynaForm, \"rejectionReasonMiscList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_REJECTION_MISC));\n PropertyUtils.setProperty(dynaForm, \"genderList\", DisplayListService.getList(ListType.GENDERS));\n PropertyUtils.setProperty(dynaForm, \"cityList\", DisplayListService.getList(ListType.CITY));\n PropertyUtils.setProperty(dynaForm, \"districtList\", DisplayListService.getList(ListType.DISTRICT));\n PropertyUtils.setProperty(dynaForm, \"departmentList\", DisplayListService.getList(ListType.DEPARTMENT));\n PropertyUtils.setProperty(dynaForm, \"patientTypeList\", DisplayListService.getList(ListType.PATIENT_TYPE));\n\n // for backwards compatibility with non-modal version of sample entry\n\t\tPropertyUtils.setProperty(dynaForm, \"initialSampleConditionList\", DisplayListService.getList(ListType.INITIAL_SAMPLE_CONDITION));\n\t\tPropertyUtils.setProperty(dynaForm, \"testSectionList\", DisplayListService.getList(ListType.TEST_SECTION));\n\n\t\tSample\tsample\t= new Sample();\n\n\t\t// Set received date and entered date to today's date\n\t\tDate today = Calendar.getInstance().getTime();\n\t\tString dateAsText = DateUtil.formatDateAsText(today);\n\n\t\tSystemConfiguration sysConfig = SystemConfiguration.getInstance();\n\t\t\n\t\tsample.setReceivedDateForDisplay(dateAsText);\n\t\tsample.setEnteredDateForDisplay(dateAsText);\n\t\tsample.setReferredCultureFlag(sysConfig.getQuickEntryDefaultReferredCultureFlag());\n\t\tsample.setStickerReceivedFlag(sysConfig.getQuickEntryDefaultStickerReceivedFlag());\n\t\t\n\t\t// default nextItemSequence to 1 (for clinical - always 1)\n\t\tsample.setNextItemSequence(sysConfig.getQuickEntryDefaultNextItemSequence());\n\n\t\t// revision is set to 0 on insert\n\t\tsample.setRevision(sysConfig.getQuickEntryDefaultRevision());\n\n\t\tsample.setCollectionTimeForDisplay(sysConfig.getQuickEntryDefaultCollectionTimeForDisplay());\n\n\t\tif (sample.getId() != null && !sample.getId().equals(\"0\"))\n\t\t{\n\t\t\trequest.setAttribute(ID, sample.getId());\n\t\t}\n\n\t\t// populate form from valueholder\n\t\tPropertyUtils.copyProperties(form, sample);\n\n\t\tPropertyUtils.setProperty(form, \"currentDate\",\t\tdateAsText);\n\t\trequest.setAttribute(\"menuDefinition\", \"BatchEntryDefinition\");\n\t\treturn mapping.findForward(forward);\n\t}",
"protected ActionForward unspecified(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response)\n throws Exception {\n String message =\n messages.getMessage(\"mapping.parameter\", mapping.getPath());\n\n log.error(message);\n\n throw new ServletException(message);\n }",
"public ActionForward execute(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response) throws Exception {\n // TODO Auto-generated method stub\n String forwardName = \"\";\n HttpSession session = ((HttpServletRequest) request).getSession(false);\n EditSearchCityForm searchform = (EditSearchCityForm) form;\n String buttonValue = searchform.getButtonValue();\n UnLocationDAO unLocationDAO = new UnLocationDAO();\n\n CitySelectionBean cbs = new CitySelectionBean();\n if (request.getParameter(\"index\") != null) {\n int ind = Integer.parseInt(request.getParameter(\"index\"));\n List cityList = (List) session.getAttribute(\"cityDetails\");\n CitySelectionBean citySelBean = (CitySelectionBean) cityList.get(ind);\n UnLocation unLoc = citySelBean.getUnloaction();\n RefTerminal terminal = null;\n if (session.getAttribute(\"terminal\") == null) {\n terminal = new RefTerminal();\n } else {\n terminal = (RefTerminal) session.getAttribute(\"terminal\");\n }\n terminal.setCountry(unLoc.getCountryId());\n terminal.setState(unLoc.getStateId().getCodedesc());\n\n terminal.setUnLocation(unLoc);\n request.setAttribute(\"buttonValue\", \"completed\");\n session.removeAttribute(\"cityDetails\");\n }\n if (buttonValue != null && buttonValue.equals(\"search\")) {\n\n List city = unLocationDAO.findbyCity(request.getParameter(\"city\"));\n List cityDetails = cbs.getCityDetails(city);\n session.setAttribute(\"cityDetails\", cityDetails);\n\n }\n return mapping.findForward(\"EditSearchpopup\");\n }",
"public ActionForward perform(ActionMapping mapping, ActionForm form,\n\t\t\tHttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows IOException, ServletException {\n\t\tif (!checkUser(request))\n\t\t\treturn (mapping.findForward(\"errorUserIon\"));\n\n\t\t// check if this action is allowed\n\t\ttry {\n\t\t\tMapping.begin();\n\t\t\tif (!new SecurityManagerImpl().canAdminSecurity(User.getInstance(request.getSession().getAttribute(\"userLogin\")+ \"\"))) {\n\t\t\t\tthrow new Exception();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tMapping.rollback();\n\t\t\tLogger.getInstance().error(e.getMessage(), CreateUserAction.class,e);\n\t\t\treturn (mapping.findForward(\"errorSecurityIon\"));\n\t\t} finally {\n\t\t\tMapping.rollback();\n\t\t}\n\n\t\tUser currentUser = null;\n\t\ttry {\n\t\t\tcurrentUser = getCurrentUser(request);\n\t\t} catch (MappingException e) {\n\t\t\tMapping.rollback();\n\t\t\tLogger.getInstance().error(e.getMessage(), EditUserAction.class,e);\n\t\t\treturn (mapping.findForward(\"errorSecurityIon\"));\n\t\t} finally {\n\t\t\tMapping.rollback();\n\t\t}\n\t\tboolean isSuperAdmin = isSuperAdmin(request);\n\n\t\t// get the form\n\t\tCreateUserForm sform = (CreateUserForm) form;\n\t\tActionErrors errors = sform.myValidate(request);\n\n\t\t// user need cancel\n\t\tif (request.getParameter(\"cancel\") != null) {\n\t\t\t// Forward to the next page\n\t\t\treturn (mapping.findForward(\"cancel\"));\n\t\t}\n\n\t\ttry {\n\t\t\tVector groups = null;\n\t\t\tMapping.begin();\n\t\t\tif (isSuperAdmin) {\n\t\t\t\tgroups = Group.listAll();\n\t\t\t} else {\n\t\t\t\tgroups = currentUser.listGroups();\n\t\t\t}\n\t\t\tMapping.rollback();\n\t\t\trequest.setAttribute(\"groups\", groups);\n\t\t} catch (Exception e) {\n\t\t\tLogger.getInstance().error(e.getMessage(), CreateUserAction.class,e);\n\t\t\treturn (mapping.findForward(\"errorIon\"));\n\t\t} finally {\n\t\t\tMapping.rollback();\n\t\t}\n\n\t\t// fill data | first time\n\t\tif (sform.getName() == null) {\n\t\t\t// Forward to the view page\n\t\t\treturn (mapping.findForward(\"view\"));\n\t\t}\n\n\t\t// fill data | errors\n\t\tif (errors.size() > 0) {\n\t\t\trequest.setAttribute(ERROR_KEY, errors);\n\t\t\t// Forward to the view page\n\t\t\treturn (mapping.findForward(\"view\"));\n\t\t}\n\n\t\t// all it's ok : update user\n\t\ttry {\n\t\t\t// creation user os\n\t\t\tString userLogin=sform.getLogin();\n\n\t\t\tMapping.begin();\n\t\t\tUser user = null;\n\t\t\ttry {\n\t\t\t\tuser = User.getInstance(userLogin);\n\t\t\t} catch (MappingException e) {\n\t\t\t\tLogger.getInstance().error(\"Test effectué que l'utilisateur n'existe pas\", CreateUserAction.class,e);\n\t\t\t}\n\t\t\tif (user !=null) {// existe déjà\n\t\t\t\tthrow new StandardException(\"L'utilisateur n'existe déjà avec le login \" + userLogin);\n\t\t\t}\n\n\t\t\tuser = User.create(userLogin);\n\t\t\tuser.setMetaData(\"name\", sform.getName());\n\t\t\tuser.setMetaData(\"email\", sform.getEmail());\n\t\t\tuser.setMetaData(\"active\", sform.getActive());\n\n\t\t\tuser.setPassword(org.nextime.ion.commons.Authenticator.createPassword(sform.getPassword()));\n\t\t\tuser.resetGroups();\n\t\t\tif (sform.getGroups() != null) {\n\t\t\t\tfor (int i = 0; i < sform.getGroups().length; i++) {\n\t\t\t\t\tGroup group = Group.getInstance(sform.getGroups()[i]);\n\t\t\t\t\tuser.addGroup(group);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tMapping.commit();\n\n\t\t} catch (StandardException e) {\n\t\t\t// message\n\t\t\terrors = new ActionErrors();\n\t\t\tActionError error = new ActionError(\"error.createUser.userExisted\");\n\t\t\terrors.add(\"login\", error);\n\t\t\trequest.setAttribute(ERROR_KEY, errors);\n\t\t\tLogger.getInstance().error(e.getMessage(), CreateUserAction.class,e);\n\t\t\treturn (mapping.findForward(\"view\"));\n\t\t}\n\t\tcatch (MappingException e) {\n\t\t\tMapping.rollback();\n\t\t\tLogger.getInstance().error(e.getMessage(), CreateUserAction.class,e);\n\t\t\treturn (mapping.findForward(\"errorIon\"));\n\t\t} finally {\n\t\t\tMapping.rollback();\n\t\t}\n\n\t// Forward to the next page\n\t\treturn (mapping.findForward(\"ok\"));\n\t}",
"public ActionForward perform(\n\t\tActionMapping mapping,\n\t\tActionForm form,\n\t\tHttpServletRequest request,\n\t\tHttpServletResponse response) {\n\t\t\n\t\tLocale locale = getLocale(request);\n\t\tMessageResources messages = getResources();\n\t\tString action = request.getParameter(\"FormAction\");\n\t\tUserLogin ul = (UserLogin)request.getSession().getAttribute(Constants.USERLOGIN_KEY);\n\t\tif(action == null) action = \"QueryForList\";\n\t\t\n\t\tif (action.equals(\"QueryForList\")) {\n\t\t\tList result = findQueryResult(request);\n\t\t\trequest.setAttribute(\"QryList\", result);\n\t\t} \n\t\t\n\t\tif (action.equals(\"PAConfirm\")) {\n\t\t\tString chk[] =request.getParameterValues(\"chk\");\n\t\t\tTransactionServices ts = new TransactionServices();\t\t\t\t\t\t\t\t\n\n\t\t\tif (chk != null) {\n\t\t\t\ttry {\n\t\t\t\t\tnet.sf.hibernate.Session hs =Hibernate2Session.currentSession();\n\t\t\t\t\tTransaction tx = hs.beginTransaction();\n\t\t\t\t\tint RowSize = java.lang.reflect.Array.getLength(chk);\n\t\t\t\t\tfor (int i = 0; i < RowSize; i++) {\n\t\t\t\t\t\tProjectCostMaster pcm = (ProjectCostMaster)hs.load(ProjectCostMaster.class, new Integer(chk[i]));\n\t\t\t\t\t\tif (pcm.getPAConfirm() == null) {\n\t\t\t\t\t\t\tpcm.setPAConfirm(UtilDateTime.nowTimestamp());\n\t\t\t\t\t\t\ths.update(pcm);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tts.insert(pcm, ul);\n\t\t\t\t\t}\n\t\t\t\t\ttx.commit();\n\t\t\t\t\ths.flush();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tList result = findQueryResult(request);\n\t\t\trequest.setAttribute(\"QryList\", result);\n\t\t}\n\t\tif (action.equals(\"PAUNConfirm\")) {\n\t\t\tString chk[] =request.getParameterValues(\"chk\");\n\t\t\tTransactionServices ts = new TransactionServices();\t\t\t\t\t\t\t\t\n\n\t\t\tif (chk != null) {\n\t\t\t\ttry {\n\t\t\t\t\tnet.sf.hibernate.Session hs =Hibernate2Session.currentSession();\n\t\t\t\t\tTransaction tx = hs.beginTransaction();\n\t\t\t\t\tint RowSize = java.lang.reflect.Array.getLength(chk);\n\t\t\t\t\tfor (int i = 0; i < RowSize; i++) {\n\t\t\t\t\t\tProjectCostMaster pcm = (ProjectCostMaster)hs.load(ProjectCostMaster.class, new Integer(chk[i]));\n\t\t\t\t\t\tif (pcm.getPAConfirm() != null) {\n\t\t\t\t\t\t\tpcm.setPAConfirm(null);\n\t\t\t\t\t\t\ths.update(pcm);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tts.remove(pcm);\n\t\t\t\t\t}\n\t\t\t\t\ttx.commit();\n\t\t\t\t\ths.flush();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tList result = findQueryResult(request);\n\t\t\trequest.setAttribute(\"QryList\", result);\n\t\t}\n\t\tif (action.equals(\"Confirm\")) {\n\t\t\tString chk[] =request.getParameterValues(\"chk\");\n\t\t\tTransactionServices ts = new TransactionServices();\t\t\t\t\t\t\t\t\n\n\t\t\tif (chk != null) {\n\t\t\t\ttry {\n\t\t\t\t\tnet.sf.hibernate.Session hs =Hibernate2Session.currentSession();\n\t\t\t\t\tTransaction tx = hs.beginTransaction();\n\t\t\t\t\tint RowSize = java.lang.reflect.Array.getLength(chk);\n\t\t\t\t\tfor (int i = 0; i < RowSize; i++) {\n\t\t\t\t\t\tProjectCostMaster pcm = (ProjectCostMaster)hs.load(ProjectCostMaster.class, new Integer(chk[i]));\n\t\t\t\t\t\tif (pcm.getApprovalDate() == null) {\n\t\t\t\t\t\t\tpcm.setApprovalDate(UtilDateTime.nowTimestamp());\n\t\t\t\t\t\t\tpcm.setPayStatus(\"confirmed\");\n\t\t\t\t\t\t\ths.update(pcm);\n\t\t\t\t\t\t}\n\t\t\t\t//\t\tts.remove(pcm);\n\t\t\t\t\t}\n\t\t\t\t\ttx.commit();\n\t\t\t\t\ths.flush();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tList result = findQueryResult(request);\n\t\t\trequest.setAttribute(\"QryList\", result);\n\t\t}\n\t\tif (action.equals(\"PostToFA\")) {\n\t\t\tString chk[] =request.getParameterValues(\"chk\");\n\t\t\tif (chk != null) {\n\t\t\t\ttry {\n\t\t\t\t\tnet.sf.hibernate.Session hs =Hibernate2Session.currentSession();\n\t//\t\t\t\tTransaction tx = hs.beginTransaction();\n\t\t\t\t\tint RowSize = java.lang.reflect.Array.getLength(chk);\n\t\t\t\t\tfor (int i = 0; i < RowSize; i++) {\n\t\t\t\t\t\tProjectCostMaster pcm = (ProjectCostMaster)hs.load(ProjectCostMaster.class, new Integer(chk[i]));\n\t\t\t\t\t\tProjectAirFareCost pac = (ProjectAirFareCost)hs.load(ProjectAirFareCost.class, new Integer(chk[i]));\n\t\t\t\t\t//\tif(pac.getReturnDate()!=null){\n\t\t\t\t\t\t\tpcm.setPayStatus(\"Posted\");\n\t\t\t\t\t\t\ths.save(pcm);\n\t\t\t\t\t//\t}\n\t\t\t\t\t}\n\t\t//\t\t\ttx.commit();\n\t\t\t\t\ths.flush();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tList result = findQueryResult(request);\n\t\t\trequest.setAttribute(\"QryList\", result);\n\t\t}\n\t\tif (action.equals(\"ExcelPrint\")) {\n\t\t\tString chk[] =request.getParameterValues(\"chk\");\n\t\t\t\n\t\t\tif (chk != null) {\n\t\t\t\ttry {\n//\t\t\t\t\tGet Excel Template Path =============================================\n\t\t\t\t\tnet.sf.hibernate.Session hs =Hibernate2Session.currentSession();\n\t\t\t\t\t\n\t\t\t\t\tString TemplatePath = GetTemplateFolder();\n\t\t\t\t\tif (TemplatePath == null) return null;\n\t\t\t\t\t\n\t\t\t\t\tint RowSize = java.lang.reflect.Array.getLength(chk);\n\t\t\t\t\t\n\t\t\t\t\t//Start to output the excel file\n\t\t\t\t\tresponse.reset();\n\t\t\t\t\tresponse.setHeader(\"Content-Disposition\", \"attachment;filename=\\\"\"+ SaveToFileName + \"\\\"\");\n\t\t\t\t\tresponse.setContentType(\"application/octet-stream\");\n\t\t\t\t\t\n\t\t\t\t\t//Use POI to read the selected Excel Spreadsheet\n\t\t\t\t\tHSSFWorkbook wb = new HSSFWorkbook(new FileInputStream(TemplatePath+\"\\\\\"+ExcelTemplate));\n\t\t\t\t\t//Select the first worksheet\n\t\t\t\t\tHSSFSheet sheet = wb.getSheet(FormSheetName);\n\t\t\t\t\t\n\t\t\t\t\tDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH);\n\t\t\t\t\tString status =\"\";\n\t\t\t\t\t\t\t\t\n\t\t\t\t\tHSSFCell cell = null;\n\t\t\t\t\t\t\t\n\t\t\t\t\t//List\n\t\t\t\t\tHSSFCellStyle boldTextStyle = sheet.getRow(ListStartRow).getCell((short)0).getCellStyle();\n\t\t\t\t\tHSSFCellStyle dateStyle = sheet.getRow(1).getCell((short)7).getCellStyle();\n\t\t\t\t\tHSSFCellStyle numberFormatStyle = sheet.getRow(ListStartRow).getCell((short)6).getCellStyle();\n\t\t\t\t\t\n\t\t\t\t\tint ExcelRow = ListStartRow;\n\t\t\t\t\t\n\t\t\t\t\tHSSFRow HRow = null;\n\t\t\t\t\tHRow = sheet.createRow(1);\n\t\t\t\t\tcell = HRow.createCell((short)7);\n\t\t\t\t\tcell.setCellValue(new Date());\n\t\t\t\t\tcell.setCellStyle(dateStyle);\n\t\t\t\t\t\n\t\t\t\t\t//in order to make groups\n\t\t\t\t\t\n\t\t\t\t\tshort cellNumber = 0;\n\t\t\t\t\t\n\t\t\t\t\t//write the titles\n\t\t\t\t\tHRow = sheet.createRow(titleRow);\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Ticket Code\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Project ID\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Staff Name\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Description\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Bill To\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Create Date\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Flight No.\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Paid By\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Flight Date\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Confirm Date\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Price\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Vendor\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\n\t\t\t\t\t\n\t\t\t\t\t//write contents\n\t\t\t\t\tfor (int i = 0; i < RowSize; i++) {\n\t\t\t\t\tProjectCostMaster pcm = (ProjectCostMaster)hs.load(ProjectCostMaster.class, new Integer(chk[i]));\n\t\t\t\t\tProjectAirFareCost pac = (ProjectAirFareCost)hs.load(ProjectAirFareCost.class, new Integer(chk[i]));\n\n\t\t\t\t\t\tcellNumber = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tHRow = sheet.createRow(ExcelRow);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getFormCode());\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getProjectMaster()==null ? \"\" : pcm.getProjectMaster().getProjId());\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getUserLogin().getName());\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t cell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getPayType()== null? pcm.getProjectMaster().getProjName() : pcm.getPayType());\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getProjectMaster().getBillTo() == null ? \"\" : pcm.getProjectMaster().getBillTo().getDescription());\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(df.format(pcm.getCreatedate()));\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getRefno());\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getClaimType().equals(\"CN\") ? \"Company\" : \"Customer\");\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(df.format(pcm.getCostdate()));\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getApprovalDate()==null? \"\" : df.format(pcm.getApprovalDate()));\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getTotalvalue());\n\t\t\t\t\t\t\tcell.setCellStyle(numberFormatStyle);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getVendor()==null?\"\":pcm.getVendor().getDescription());\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tpcm.setExportDate(UtilDateTime.nowTimestamp());\n\t\t\t\t\t\t\tExcelRow++;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t//\twriteExportDate(sr);\n\t\t\t\t//\twriteExportDate(sr);\n\t\t\t\t\t//写入Excel工作表\n\t\t\t\t\twb.write(response.getOutputStream());\n\t\t\t\t\t//关闭Excel工作薄对象\n\t\t\t\t\tresponse.getOutputStream().close();\n\t\t\t\t\tresponse.setStatus( HttpServletResponse.SC_OK );\n\t\t\t\t\tresponse.flushBuffer();\n//------------------------------------------\t\t\t\t\t\n\t\t\t\t\t\n\t//\t\t\t\tTransaction tx = hs.beginTransaction();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\ths.flush();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t//\tList result = findQueryResult(request);\n\t\t//\trequest.setAttribute(\"QryList\", result);\n\t\t}\n\t\treturn (mapping.findForward(\"success\"));\n\t}",
"ActionMap getActionMap() {\n return createActionMap(); }",
"@Override\n\tpublic PageForm formBackingObject(HttpServletRequest request) throws Exception { \n\n \tHttpSession session = request.getSession();\n \tPageForm theForm = (PageForm) super.formBackingObject(request);\n setPageMessage(session, theForm);\n return theForm;\n }",
"public ActionForward execute(ActionMapping mapping, ActionForm form,\r\n\t HttpServletRequest request, HttpServletResponse response)\r\n\t throws Exception {\r\n\t\t\t\r\n\t\t\tActionErrors errors = new ActionErrors();\r\n\t\t\tActionForward forward = new ActionForward();\r\n\t\t\tActionMessages messages= new ActionMessages();\r\n\t\t\tResourceBundle bundle = ResourceBundle.getBundle(\"ApplicationResources\");\r\n\t\t\t\r\n\t\t\tKmSchemesAndBenefitsDetailsFormBean formBean = (KmSchemesAndBenefitsDetailsFormBean) form;\r\n\t\t\tKmSchemesAndBenefitsDto iPortalDTO = new KmSchemesAndBenefitsDto();\r\n\t\t\tKmSchemesAndBenefitsDao iPortalDaoImpl = new KmSchemesAndBenefitsDaoImpl();\r\n\t\t\tKmUploadSchemesAndBenefitsActionUtil util = new KmUploadSchemesAndBenefitsActionUtil();\r\n\t\t\tKmElementMstrService elementService=new KmElementMstrServiceImpl();\r\n\t\t\t\r\n\t\t\tString insertedBy = null;\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\t//User Id To be taken from Session\r\n\t\t\t\tKmUserMstr userBean = (KmUserMstr) request.getSession().getAttribute(\"USER_INFO\");\r\n\t\t\t\tinsertedBy = userBean.getUserLoginId();\r\n\t\t\t\tformBean.setInsertedBy(insertedBy);\r\n\t\t\t\tlogger.info(\"Initiated by \"+ formBean.getInsertedBy());\r\n\t\t\t\t\r\n\t\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyyMMdd_HH-mm-ss\");\r\n\t\t\t\tString date = sdf.format(new java.util.Date());\r\n\t\t\t\t\r\n\t\t\t\tif(formBean != null ){\r\n\t\t\t\t\tBeanUtils.copyProperties(iPortalDTO, formBean);\r\n\t\t\t\t\t\r\n\t\t\t\t\tFormFile file = formBean.getUploadFile();\r\n\t\t\t\t\tif(file != null && !file.getFileName().equals(\"\")){\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Validating File at server side\r\n\t\t\t\t\t\tboolean isValidUpload = util.validateFileUpload(formBean, userBean, request, errors, messages);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(isValidUpload){\r\n\t\t\t\t\t\t\t//Appending Date to file name\r\n\t\t\t\t\t\t\tString fileName = file.getFileName();\r\n\t\t\t\t\t\t\tif (fileName.equals(\"\")) {\r\n\t\t\t\t\t\t\t\tfile = (FormFile) request.getSession().getAttribute(\"file\");\r\n\t\t\t\t\t\t\t\tfileName = file.getFileName();\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\tString extn = fileName.substring(fileName.indexOf(\".\") + 1);\r\n\t\t\t\t\t\t\tfileName = fileName.substring(0, fileName.indexOf(\".\"));\r\n\t\t\t\t\t\t\tfileName = fileName + \"_\" + date + \".\" + extn;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tformBean.setFileName(fileName);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//Uploading File to temp Loc\r\n\t\t\t\t\t\t\tboolean result = util.uploadMstr(formBean, userBean, errors, messages);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(result){\r\n\t\t\t\t\t\t\t\tString path = formBean.getFilePath();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//Reading File\r\n\t\t\t\t\t\t\t\tReadExcel readExcel=new ReadExcel();\r\n\t\t\t\t\t\t\t\tArrayList records = readExcel.readFromExcelFile(path);\r\n\t\t\t\t\t\t\t\tif(records.size()!=0){\r\n\t\t\t\t\t\t\t\t//Validating File\r\n\t\t\t\t\t\t\t\tboolean flag1, flag2 = false;\r\n\t\t\t\t\t\t\t\tflag1 = readExcel.validateExcelRows(records);\r\n\t\t\t\t\t\t\t\tif (flag1 == false) {\r\n\t\t\t\t\t\t\t\t\tmessages.add(\"msg1\",new ActionMessage(\"excel.rowValidation.error\"));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tlogger.info(\"Validating Rows Successful\");\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif (flag1 == true) {\r\n\t\t\t\t\t\t\t\t\tflag2 = readExcel.validateExcelColumns(records);\r\n\t\t\t\t\t\t\t\t\tif (flag2 == false) {\r\n\t\t\t\t\t\t\t\t\t\tmessages.add(\"msg2\",new ActionMessage(\"excel.colValidation.error\"));\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tiPortalDTO.setSheetList(records);\r\n\t\t\t\t\t\t\t\tlogger.info(\"Validating Columns Successful\");\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif(flag1 && flag2){\r\n\t\t\t\t\t\t\t\t\t//Creating a folder\r\n\t\t\t\t\t\t\t\t\tString newPath = Constants.BULK_FILE_PATH;\r\n\t\t\t\t\t\t\t\t\tString existingPath = bundle.getString(\"folder.path\");\r\n\t\t\t\t\t\t\t\t\tlogger.info(\"Calling createNewFolder()\");\r\n\t\t\t\t\t\t\t\t\tutil.createNewFolder(newPath, existingPath);\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tlogger.info(\"File Name :: \" + fileName + \" path :: \" + path);\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tIndexFiles indexObject = new IndexFiles();\r\n\t\t\t\t\t\t\t\t\tAddFileService addFileService = new AddFileServiceImpl();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tString appendedPath = \"/1/\" + newPath;\r\n\t\t\t\t\t\t\t\t\tpath = bundle.getString(\"folder.path\") + appendedPath;\r\n\t\t\t\t\t\t\t\t\tString documentPath = path + \"/\" + fileName;\r\n\t\t\t\t\t\t\t\t\tString parentId = Constants.SNB_PARENT_ID;\r\n\t\t\t\t\t\t\t\t\taddFileService.saveFile(documentPath, file, parentId);\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t//Save uploaded file details in DB\r\n\t\t\t\t\t\t\t\t\tSimpleDateFormat sdf2 = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\t\t\t\t\t\t\t\tString date2 = sdf2.format(new java.util.Date(new java.util.Date().getTime() - Constants.MILLIS_IN_A_DAY));\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tKmDocumentMstr documentDTO= new KmDocumentMstr();\r\n\t\t\t\t\t\t\t\t\tdocumentDTO.setDocumentName(fileName);\r\n\t\t\t\t\t\t\t\t\tdocumentDTO.setDocumentDisplayName(file.getFileName());\r\n\t\t\t\t\t\t\t\t\tdocumentDTO.setDocumentDesc(file.getFileName());\r\n\t\t\t\t\t\t\t\t\tdocumentDTO.setApprovalStatus(\"A\");\r\n\t\t\t\t\t\t\t\t\tdocumentDTO.setUploadedBy(userBean.getUserId());\r\n\t\t\t\t\t\t\t\t\tdocumentDTO.setUpdatedBy(userBean.getUserId());\r\n\t\t\t\t\t\t\t\t\tdocumentDTO.setPublishingStartDate(date2);\r\n\t\t\t\t\t\t\t\t\tdocumentDTO.setPublishingEndDate(date2);\r\n\t\t\t\t\t\t\t\t\tdocumentDTO.setDocumentPath(appendedPath);\r\n\t\t\t\t\t\t\t\t\tdocumentDTO.setDocName(fileName);\r\n\t\t\t\t\t\t\t\t\tdocumentDTO.setDocType(Constants.DOC_TYPE_SNB);\r\n\t\t\t\t\t\t\t\t\tlogger.info(\"Document Details Set\");\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tKmElementMstr elementMstrDto= new KmElementMstr();\r\n\t\t\t\t\t\t\t\t\telementMstrDto.setElementName(file.getFileName());\r\n\t\t\t\t\t\t\t\t\telementMstrDto.setElementDesc(file.getFileName());\r\n\t\t\t\t\t\t\t\t\telementMstrDto.setParentId(parentId);\r\n\t\t\t\t\t\t\t\t\telementMstrDto.setElementLevel(\"0\");\r\n\t\t\t\t\t\t\t\t\telementMstrDto.setPanStatus(\"N\");\r\n\t\t\t\t\t\t\t\t\telementMstrDto.setStatus(\"A\");\r\n\t\t\t\t\t\t\t\t\telementMstrDto.setCreatedBy(userBean.getUserId());\r\n\t\t\t\t\t\t\t\t\telementMstrDto.setUpdatedBy(userBean.getUserId());\r\n\t\t\t\t\t\t\t\t\tString elementId = elementService.createElement(elementMstrDto);\r\n\t\t\t\t\t\t\t\t\tdocumentDTO.setElementId(elementId);\r\n\t\t\t\t\t\t\t\t\tlogger.info(\"Element Details Set\");\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tString docId = addFileService.saveFileInfoInDB(documentDTO);\r\n\t\t\t\t\t\t\t\t\tlogger.info(\"documentId after saving in DB\" + docId);\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t//Deleting and Inserting Records\r\n\t\t\t\t\t\t\t\t\tboolean isPresent = iPortalDaoImpl.isPresent();\r\n\t\t\t\t\t\t\t\t\tif(isPresent){\r\n\t\t\t\t\t\t\t\t\t\tboolean flag3 = iPortalDaoImpl.deleteDetails();\r\n\t\t\t\t\t\t\t\t\t\tif(flag3){\r\n\t\t\t\t\t\t\t\t\t\t\tboolean flag4 = readExcel.getSheetForExcelUpload(iPortalDTO);\r\n\t\t\t\t\t\t\t\t\t\t\tif(flag4){\r\n\t\t\t\t\t\t\t\t\t\t\t\tmessages.add(\"msg3\",new ActionMessage(\"excel.upload.success\"));\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\t\tboolean flag4 = readExcel.getSheetForExcelUpload(iPortalDTO);\r\n\t\t\t\t\t\t\t\t\t\tif(flag4){\r\n\t\t\t\t\t\t\t\t\t\t\tmessages.add(\"msg4\",new ActionMessage(\"excel.upload.success\"));\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\t\tmessages.add(\"msg1\",new ActionMessage(\"excel.xlsValidation.error\"));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tsaveMessages(request, messages);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\t}\r\n\t\t\tcatch (Exception exp) {\r\n\t\t\t\terrors.add(\"uploadError\", new ActionError(\"\"));\r\n\t\t\t\tsaveErrors(request, errors);\r\n\t\t\t\treturn mapping.findForward(\"FAILURE\");\r\n\t\t\t}\t\r\n\t\t\tif (!errors.isEmpty()) {\r\n\t\t\t\tsaveErrors(request, errors);\r\n\t\t\t\tforward = mapping.findForward(\"FAILURE\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tforward = mapping.findForward(\"SUCCESS\");\r\n\t\t\t}\r\n\t\t\treturn (forward);\r\n\t\t}",
"public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,\n\t\t\tHttpServletResponse response) {\n\t\tif (!CommonUtil.validateSessionUser(request, SessionConstants.Common.ADMIN_PRIVILAGE_ID)) {\n\t\t\treturn mapping.findForward(SessionConstants.Common.SESSION_INVALID_GLOBAL_FORWARD);\n\t\t}\n\n\t\tString status = \"\";\n\t\tmanager = (Manager) BeanUtil.getBean(\"hotelmanager\");\n\n\t\tRoomTypeFormBean roomTypeFormBean = (RoomTypeFormBean) form;\n\t\ttry {\n\n\t\t\t// Occation of insert a new room category or edit existing one after\n\t\t\t// modify values.\n\t\t\tif (request.getParameter(\"hdnMode\") == null) {\n\n\t\t\t\tif (FormDataValidatorUtil.isRoomTypeDataValid(roomTypeFormBean, request)) {\n\t\t\t\t\tRoomType roomTypeToSave = populateRoomType(roomTypeFormBean);\n\n\t\t\t\t\tmanager.saveOrUpdateRoomType(roomTypeToSave);\n\t\t\t\t\trequest.setAttribute(\"successMessage\", resourceBundleUtil\n\t\t\t\t\t\t\t.getLocaleSpecificValue(\"room.type.success.save\"));\n\t\t\t\t\tgetAllRoomTypes(request);\n\n\t\t\t\t\tstatus = \"success\";\n\t\t\t\t} else {\n\n\t\t\t\t\trequest.setAttribute(\"roomTypeObject\", populateRoomType(roomTypeFormBean));\n\t\t\t\t\tgetAllRoomTypes(request);\n\t\t\t\t\tstatus = \"invalidRoomTypeData\";\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Load the page from administrator profile\n\t\t\tif (request.getParameter(\"hdnMode\") != null && request.getParameter(\"hdnMode\").equals(\"getAllRoomType\")) {\n\n\t\t\t\tgetAllRoomTypes(request);\n\t\t\t\tstatus = \"success\";\n\n\t\t\t} else {\n\t\t\t\t// Request for edit an existing room category. Load particular\n\t\t\t\t// category by\n\t\t\t\t// id. and send back to user interface\n\t\t\t\tif (request.getParameter(\"hdnMode\") != null && request.getParameter(\"hdnMode\").equals(\"editRoomType\")) {\n\t\t\t\t\tInteger idOfEditingType = Integer.valueOf(request.getParameter(\"id\"));\n\t\t\t\t\tRoomType roomTypeLoaded = manager.getRoomTypeById(idOfEditingType);\n\n\t\t\t\t\trequest.setAttribute(\"roomTypeObject\", roomTypeLoaded);\n\t\t\t\t\tgetAllRoomTypes(request);\n\t\t\t\t\tstatus = \"success\";\n\n\t\t\t\t} else {\n\t\t\t\t\t// delete an existing room category.\n\t\t\t\t\tif (request.getParameter(\"hdnMode\") != null\n\t\t\t\t\t\t\t&& request.getParameter(\"hdnMode\").equals(\"deleteRoomType\")) {\n\n\t\t\t\t\t\t// get the id of object need to delete\n\t\t\t\t\t\tInteger idOfDeletingType = Integer.valueOf(request.getParameter(\"id\"));\n\n\t\t\t\t\t\t// get the version of object need to delete\n\t\t\t\t\t\tInteger versionOfDeletingType = Integer.valueOf(request.getParameter(\"version\"));\n\n\t\t\t\t\t\t// Load the existing object need to delete\n\t\t\t\t\t\tRoomType roomTypeLoaded = manager.getRoomTypeById(idOfDeletingType);\n\n\t\t\t\t\t\t// set the version of ui side object to loaded object.\n\t\t\t\t\t\troomTypeLoaded.setVersion(versionOfDeletingType);\n\n\t\t\t\t\t\tmanager.deleteRoomType(roomTypeLoaded);\n\t\t\t\t\t\trequest.setAttribute(\"successDeleteMessage\", resourceBundleUtil\n\t\t\t\t\t\t\t\t.getLocaleSpecificValue(\"room.type.success.delete\"));\n\t\t\t\t\t\tgetAllRoomTypes(request);\n\t\t\t\t\t\tstatus = \"success\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (DataIntegrityViolationException e) {\n\n\t\t\trequest.setAttribute(\"RoomTypeException\", resourceBundleUtil\n\t\t\t\t\t.getLocaleSpecificValue(\"roomType.already.engaged\"));\n\n\t\t\tgetAllRoomTypes(request);\n\t\t\tstatus = \"exceptionInRoomType\";\n\n\t\t} catch (NestedRuntimeException e) {\n\t\t\tstatus = \"databaseException\";\n\t\t} catch (Exception e) {\n\t\t\tstatus = \"generalException\";\n\t\t}\n\n\t\treturn mapping.findForward(status);\n\t}",
"public int doStartTag() throws JspException \n\t{\n\t\twrite(MessageFormat.format(FORM_START, new Object[] { getActionAddress() }));\n\t\twrite(MessageFormat.format(HIDDEN, new Object[] { ACTION_ID_PARAMETER, getActionID() }));\n\t\twrite(MessageFormat.format(HIDDEN, new Object[] { FINISHED_ADDRESS_PARAMETER, getFinalReturnAddress() }));\n\t\twrite(MessageFormat.format(HIDDEN, new Object[] { WORKFLOW_ID_PARAMETER, getWorkflowID() }));\n\t\treturn EVAL_BODY_INCLUDE;\n\t}",
"public ActionForward execute(ActionMapping actionMapping,\n\t\t\tActionForm actionForm, HttpServletRequest httpServletRequest,\n\t\t\tHttpServletResponse httpServletResponse) {\n\n\t\tActionForward retorno = actionMapping.findForward(\"contratoArrecadadorInserir\");\n\t\t\n\t\tCollection colecaoPesquisa = null;\n\n\t\tInserirContratoArrecadadorActionForm inserirContratoArrecadadorActionForm = (InserirContratoArrecadadorActionForm) actionForm;\n\n\t\t// Instancia da Fachada\n\t\tFachada fachada = Fachada.getInstancia();\n\n\t\t// Obtém a sessão\n\t\tHttpSession sessao = httpServletRequest.getSession(false);\n\n\t\t// Campos do formulario\n\t\tString idCliente = inserirContratoArrecadadorActionForm.getIdCliente();\n\n\t\t// Arrecadador\n\t\tFiltroArrecadador filtroArrecadador = new FiltroArrecadador();\n\n\t\t// Ordena filtro de arrecadador por descrição nome \n\t\tfiltroArrecadador.setCampoOrderBy(\"cliente.nome\");\n\t\t// Inclui a obejeto de cliente no filtro de arrecadador \n\t\tfiltroArrecadador.adicionarCaminhoParaCarregamentoEntidade(\"cliente\");\n\t\t// Preenche colecao de arrecadador \n\t\tCollection<Arrecadador> colecaoArrecadador = fachada.pesquisar(filtroArrecadador, Arrecadador.class.getName());\n\t\tif (colecaoArrecadador == null || colecaoArrecadador.isEmpty()) {\n\t\t\tthrow new ActionServletException(\"atencao.entidade_sem_dados_para_selecao\", null,\"Arrecadador\");\n\t\t} else {\n\t\t\tArrayList<Cliente> clientes = new ArrayList<Cliente>();\n\t\t\t//FiltroCliente filtroCliente = new FiltroCliente();\n\t\t\tIterator iteratorColecaoArrecadador = colecaoArrecadador.iterator();\n\t\t\tCliente cliente = new Cliente();\n\t\t\twhile (iteratorColecaoArrecadador.hasNext()) {\n\t\t\t\tArrecadador arrecadador = (Arrecadador) iteratorColecaoArrecadador.next();\n\t\t\t\tclientes.add(arrecadador.getCliente());\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tsessao.setAttribute(\"colecaoClienteArrecadador\", clientes);\n\t\t}\n\t\t\n\t\tString objetoConsulta = (String) httpServletRequest\n \t.getParameter(\"objetoConsulta\");\n\t\t\n\t\tif (objetoConsulta != null\n\t\t\t\t&& !objetoConsulta.trim().equalsIgnoreCase(\"\")) {\n\n\t\t\tswitch (Integer.parseInt(objetoConsulta)) {\t\n\t\t\n\t\t\t// Cliente\n \tcase 1:\n \t\t//Recebe o valor do campo bancoID do formulário.\n \t\tString clienteID = inserirContratoArrecadadorActionForm\n .getIdCliente();\n\n \t\tFiltroCliente filtroCliente1 = new FiltroCliente();\n\n \t\tfiltroCliente1\n .adicionarParametro(new ParametroSimples(\n FiltroCliente.ID, clienteID));\n\n \t\tfiltroCliente1\n .adicionarParametro(new ParametroSimples(\n \t\tFiltroCliente.INDICADOR_USO,\n ConstantesSistema.INDICADOR_USO_ATIVO));\n\n //Retorna Cliente\n colecaoPesquisa = fachada.pesquisar(filtroCliente1,\n Cliente.class.getName());\n\n if (colecaoPesquisa == null || colecaoPesquisa.isEmpty()) {\n //Setor censitario nao encontrado\n //Limpa o campo clienteID do formulário\n \tinserirContratoArrecadadorActionForm.setIdCliente(\"\");\n \tinserirContratoArrecadadorActionForm\n .setNomeCliente(\"Cliente inexistente.\");\n httpServletRequest.setAttribute(\"existeCliente\",\n \"exception\");\n \n httpServletRequest.setAttribute(\"nomeCampo\", \"clienteID\");\n } else {\n Cliente objetoCliente = (Cliente) Util\n .retonarObjetoDeColecao(colecaoPesquisa);\n inserirContratoArrecadadorActionForm.setIdCliente(String\n .valueOf(objetoCliente.getId()));\n inserirContratoArrecadadorActionForm\n .setNomeCliente(objetoCliente\n .getDescricao());\n httpServletRequest.setAttribute(\"existeCliente\",\n \"valor\");\n \n httpServletRequest.setAttribute(\"nomeCampo\", \"clienteID\");\n }\n break;\n default:\n\n break;\n }\n \t\t}\n\t\t\n\t\t\n\t\t// Verificar se o número do cliente não está cadastrado\n\t\tif (idCliente != null && !idCliente.trim().equals(\"\")) {\n\t\t\t// Filtro para descobrir id do Cliente\n\t\t\tFiltroCliente filtroCliente = new FiltroCliente();\n\t\t\tfiltroCliente.adicionarParametro(new ParametroSimples(FiltroCliente.ID, idCliente));\n filtroCliente.adicionarCaminhoParaCarregamentoEntidade(\"clienteTipo\");\n\t\t\tCollection colecaoCliente = fachada.pesquisar(filtroCliente,Cliente.class.getName());\n\t\t\tif (colecaoCliente == null || colecaoCliente.isEmpty()) {\n\t\t\t\tinserirContratoArrecadadorActionForm.setIdCliente(\"\");\n\t\t\t\tinserirContratoArrecadadorActionForm.setNomeCliente(\"CLIENTE INEXISTENTE\");\n\t\t\t\thttpServletRequest.setAttribute(\"existeCliente\", \"exception\");\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tCliente cliente = (Cliente) Util.retonarObjetoDeColecao(colecaoCliente);\n //[FS0004]-Verificar se pessoa física\n if(cliente.getClienteTipo().getIndicadorPessoaFisicaJuridica() != null && \n cliente.getClienteTipo().getIndicadorPessoaFisicaJuridica().equals(new Short(\"2\"))){\n throw new ActionServletException(\"atencao.cliente_arrecadador_pessoa_fisica\");\n }\n \n\t\t\t\tinserirContratoArrecadadorActionForm.setIdCliente(cliente.getId().toString());\n\t\t\t\thttpServletRequest.setAttribute(\"nomeCampo\", \"idCliente\");\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Inserir Arrecadador Contrato Tarifa\n\t\t * @date 28/05/09\n\t\t * @author Arthur Carvalho\n\t\t */\n\t\tif (inserirContratoArrecadadorActionForm.getFormaDeArrecadacao() == null\n\t\t\t\t|| inserirContratoArrecadadorActionForm.getFormaDeArrecadacao().equals(\"\")) {\n\n\t\t\tFiltroArrecadacaoForma filtroArrecadadorForma = new FiltroArrecadacaoForma();\n\t\t\tfiltroArrecadadorForma.setCampoOrderBy(FiltroArrecadacaoForma.DESCRICAO);\n\t\t\t\n\t\t\tCollection colecaoArrecadacaoForma = fachada.pesquisar( filtroArrecadadorForma,\n\t\t\t\t\tArrecadacaoForma.class.getName() );\n\n\t\t\tif (colecaoArrecadacaoForma == null || colecaoArrecadacaoForma.isEmpty()) {\n\t\t\t\tthrow new ActionServletException(\n\n\t\t\t\t\"atencao.pesquisa.nenhum_registro_tabela\", null, \"Forma de Arrecadação\");\n\n\t\t\t} else {\n\n\t\t\t\tsessao.setAttribute(\"colecaoFormaArrecadacao\", colecaoArrecadacaoForma);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tArrayList colecaoArrecadadorContratoTarifaSelecionados ;\n\t\tArrecadadorContratoTarifa arrecadadorContratoTarifa = new ArrecadadorContratoTarifa();\n\t\t\n\t\t//Forma de Arrecadacao\n\t\tif (inserirContratoArrecadadorActionForm.getFormaDeArrecadacao() != null\n\t\t\t\t&& !\"-1\".equals( inserirContratoArrecadadorActionForm.getFormaDeArrecadacao() ) ) {\n\t\t\t\n\t\t\tFiltroArrecadacaoForma filtroArrecadadorForma = new FiltroArrecadacaoForma();\n\t\t\tfiltroArrecadadorForma.adicionarParametro(new ParametroSimples(FiltroArrecadacaoForma.CODIGO, inserirContratoArrecadadorActionForm.getFormaDeArrecadacao()));\n\t\t\t\n\t\t\tCollection colecaoArrecadacaoForma = fachada.pesquisar( filtroArrecadadorForma,\n\t\t\t\t\tArrecadacaoForma.class.getName() );\n\t\t\t\n\t\t\tif (colecaoArrecadacaoForma != null && !colecaoArrecadacaoForma.isEmpty()) {\n\t\t\t\tArrecadacaoForma arrecadacaoForma = (ArrecadacaoForma) Util.retonarObjetoDeColecao(colecaoArrecadacaoForma);\n\t\t\t\tarrecadadorContratoTarifa.setArrecadacaoForma(arrecadacaoForma);\n\t\t\t}\n\t\t\t \n\t\t\t\n\t\t}\n\t\t\n\t\t//Valor Tarifa\n\t\tBigDecimal valorTarifa = null;\n\t\tif (inserirContratoArrecadadorActionForm.getValorTarifa() != null\n\t\t\t\t&& !\"\".equals( inserirContratoArrecadadorActionForm.getValorTarifa() ) ) {\n\t\t\tvalorTarifa = Util.formatarMoedaRealparaBigDecimal( inserirContratoArrecadadorActionForm.getValorTarifa() ) ;\n\t\t\t\n\t\t\tarrecadadorContratoTarifa.setValorTarifa( valorTarifa );\n\t\t}\n\t\t\n\t\t//Valor Tarifa Percentual\n\t\tBigDecimal valorTarifaPercentual = null;\n\t\tif ( inserirContratoArrecadadorActionForm.getValorTarifaPercentual() != null &&\n\t\t\t\t!inserirContratoArrecadadorActionForm.getValorTarifaPercentual().equals(\"\")){\n\t\t\t\n\t\t\tvalorTarifaPercentual = Util.formatarMoedaRealparaBigDecimal(inserirContratoArrecadadorActionForm.getValorTarifaPercentual());\n\t\t\tarrecadadorContratoTarifa.setValorTarifaPercentual(valorTarifaPercentual);\n\t\t\t\n\t\t}\n\t\t\n\t\t//Numero de dias Float\n\t\tShort nmDiasFloat = null;\n\t\tif (inserirContratoArrecadadorActionForm.getNumeroDiaFloat() != null\n\t\t\t\t&& !\"\".equals( inserirContratoArrecadadorActionForm.getNumeroDiaFloat() ) ) {\n\t\t\tnmDiasFloat = new Short( inserirContratoArrecadadorActionForm.getNumeroDiaFloat() ) ;\n\t\t\tarrecadadorContratoTarifa.setNumeroDiaFloat(nmDiasFloat);\n\t\t}\n\t\t\n\t\t//Adiciona o Arrecadador Contrato Tarifa a Colecao\n if (sessao.getAttribute(\"colecaoArrecadadorContratoTarifaSelecionados\") != null){\n \t\n \tcolecaoArrecadadorContratoTarifaSelecionados = (ArrayList) sessao\n \t\t.getAttribute(\"colecaoArrecadadorContratoTarifaSelecionados\");\n }else{\n \tcolecaoArrecadadorContratoTarifaSelecionados = new ArrayList();\n }\n \n \n \n //Verifica se o usuario clicou no botao adicionar\n if ( httpServletRequest.getParameter(\"acao\") != null && \n \thttpServletRequest.getParameter(\"acao\").equals(\"adicionar\") &&\n \t!inserirContratoArrecadadorActionForm.getFormaDeArrecadacao().equals(\"-1\") && \n \t( !inserirContratoArrecadadorActionForm.getValorTarifa().equals(\"\") || \n \t!inserirContratoArrecadadorActionForm.getValorTarifaPercentual().equals(\"\") ) \n \t&& !inserirContratoArrecadadorActionForm.getNumeroDiaFloat().equals(\"\") ) {\n \t\n\t \tarrecadadorContratoTarifa.setUltimaAlteracao(new Date());\n\t \n\t \tIterator iteratorColecaoArrecadadorContratoTarifa = colecaoArrecadadorContratoTarifaSelecionados.iterator();\n\t \t\tArrecadadorContratoTarifa contratoTarifa = null;\n\t \t\t\n\t \t\tif ( inserirContratoArrecadadorActionForm.getValorTarifaPercentual() != null &&\n\t \t\t\t\t!inserirContratoArrecadadorActionForm.getValorTarifaPercentual().equals(\"\")){\n\t \t\t\t\n\t\t \t\t//Validação do valor da tarifa percentual\n\t\t \t\tBigDecimal valorTarifaPerc = Util.formatarMoedaRealparaBigDecimal\n\t\t \t\t\t(inserirContratoArrecadadorActionForm.getValorTarifaPercentual());\n\t\t \t\t//Variaveis para comparar valorTarifaPercentual\n\t\t \t\tBigDecimal igualZero = new BigDecimal(0);\n\t\t \t\tBigDecimal maiorQue100 = new BigDecimal(100);\n\t\t \t\tif (valorTarifaPerc.compareTo(igualZero) == 0){\n\t\t \t\t\t\n\t\t \t\t\tthrow new ActionServletException(\"atencao.tarifa_invalida\", null ,\"Tarifa de Contrato\" );\n\t\t \t\t\t\n\t\t \t\t}else if ( valorTarifaPerc.compareTo(maiorQue100) == 1){\n\t\t \t\t\t\n\t\t \t\t\tthrow new ActionServletException(\"atencao.tarifa_invalida\", null ,\"Tarifa de Contrato\" );\n\t\t \t\t\t\n\t\t \t\t}\n\t \t\t\t\n\t \t\t}\n\t\n\t \t\t//Valida se ja existe forma de arrecadacao\n\t \t\twhile (iteratorColecaoArrecadadorContratoTarifa.hasNext()) {\n\t \t\t\t\n\t \t\t\tcontratoTarifa = (ArrecadadorContratoTarifa) iteratorColecaoArrecadadorContratoTarifa.next();\n\t \t\t\t\n\t \t\t\tif ( arrecadadorContratoTarifa.getArrecadacaoForma().getId().intValue() == contratoTarifa.getArrecadacaoForma().getId().intValue() ) {\n\t \t\t\t\tthrow new ActionServletException(\"atencao.forma_ja_cadastrada\", null ,\"Tarifa de Contrato\" );\n\t \t\t\t} \n\t \t\n\t \t\t}\n\t \t\n\t\t\t\tcolecaoArrecadadorContratoTarifaSelecionados.add(arrecadadorContratoTarifa);\n\t\t\t\t\n\t\t\t\tinserirContratoArrecadadorActionForm.setTamanhoColecao(\"\" + colecaoArrecadadorContratoTarifaSelecionados.size());\n\t \t\tinserirContratoArrecadadorActionForm.setNumeroDiaFloat(\"\");\n\t \t\tinserirContratoArrecadadorActionForm.setValorTarifa(\"\");\n\t \t\tinserirContratoArrecadadorActionForm.setValorTarifaPercentual(\"\");\n\t \t\tinserirContratoArrecadadorActionForm.setFormaDeArrecadacao(\"-1\");\n }\n \n //Remover o Contrato Tarifa da Colecao\n if ( httpServletRequest.getParameter(\"acao\") != null && \n \thttpServletRequest.getParameter(\"acao\").equals(\"remover\") ) {\n \tint obj = new Integer(httpServletRequest.getParameter(\"id\")).intValue();\n \t\n \tif (colecaoArrecadadorContratoTarifaSelecionados.size() >= obj) {\n \t\tcolecaoArrecadadorContratoTarifaSelecionados.remove(obj-1);\n \t}\n \t\n }\n \n //Limpar Form\n if ( httpServletRequest.getParameter(\"acao\") != null && \n \thttpServletRequest.getParameter(\"acao\").equals(\"limparForm\") ) {\n \t\n \tcolecaoArrecadadorContratoTarifaSelecionados.removeAll(colecaoArrecadadorContratoTarifaSelecionados);\n \t\n }\n \n sessao.setAttribute(\"colecaoArrecadadorContratoTarifaSelecionados\", colecaoArrecadadorContratoTarifaSelecionados );\n\t\t\n\t\tinserirContratoArrecadadorActionForm.setFormaDeArrecadacao(\"-1\");\n\t\t\n\t\tinserirContratoArrecadadorActionForm.setTamanhoMaximoIdentificacaoImovel(\"8\");\n\t\t\n\t\treturn retorno;\n\t}",
"public ActionForward populateCis(ActionMapping mapping,\r\n ActionForm form,\r\n HttpServletRequest request,\r\n HttpServletResponse response) throws Exception {\r\n Logger l = LogUtils.getLogger(getClass());\r\n if (l.isLoggable(Level.FINER)) {\r\n l.entering(getClass().getName(), \"populateCis\", new Object[]{form, request, response});\r\n }\r\n\r\n try {\r\n // Secure page\r\n securePage(request, form);\r\n PolicyHeader policyHeader = getPolicyHeader(request);\r\n\r\n // Get all request parameters into a record\r\n Record inputRecord = getInputRecord(request);\r\n Record rc = getQuickQuoteManager().populateCis(policyHeader, inputRecord);\r\n writeAjaxXmlResponse(response, rc);\r\n }\r\n catch (Exception e) {\r\n handleErrorForAjax(AppException.UNEXPECTED_ERROR, \"Failed to populate cis.\", e, response);\r\n }\r\n\r\n ActionForward af = null;\r\n if (l.isLoggable(Level.FINER)) {\r\n l.exiting(getClass().getName(), \"populateCis\", af);\r\n }\r\n return af;\r\n }",
"public final ScForm findFormWrapper()\n {\n if ( isForm() )\n return asForm();\n\n if ( hasParent() )\n return getParent().findFormWrapper();\n\n return null;\n }",
"public Form getPrintForm(HttpServletRequest request)\r\n throws ProcessManagerException {\r\n try {\r\n com.silverpeas.workflow.api.model.Form form = processModel\r\n .getForm(\"printForm\");\r\n if (form == null) {\r\n throw new ProcessManagerException(\"ProcessManagerSessionController\",\r\n \"processManager.NO_PRINTFORM_DEFINED_IN_MODEL\");\r\n }\r\n \r\n else {\r\n HtmlForm htmlForm = new HtmlForm(processModel.getDataFolder()\r\n .toRecordTemplate(currentRole, getLanguage(), true));\r\n \r\n htmlForm.setFileName(form.getHTMLFileName());\r\n return htmlForm;\r\n }\r\n } catch (Exception e) {\r\n throw new ProcessManagerException(\"ProcessManagerSessionController\",\r\n \"processManager.EX_GET_PRINT_FORM\", e);\r\n }\r\n }",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic ActionForward queryTest(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\treturn mapping.findForward(\"succ\");\r\n\t}",
"public ActionForward editarUbicacion(ActionMapping mapping,\n\t\t\tActionForm form, HttpServletRequest request,\n\t\t\tHttpServletResponse response) {\n\t\tlong idOferta = Utils.parseLong(request.getParameter(\"idOferta\").toString());\n\t\trequest.setAttribute(\"idOferta\", idOferta+\"\");\n\t\t\n\t\t\n\t\ttry {\n\t\t\tlong idEmpresa = Utils.parseLong(request.getSession().getAttribute(\"idEmpresa\").toString());\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tArrayList<RegistroEntidadesVO> listaEntidadesSeleccionadas = (ArrayList<RegistroEntidadesVO>) request\n\t\t\t\t\t.getSession().getAttribute(\"listaEntidadesSeleccionadas\");\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tArrayList<String> listaSectoresSeleccionados = (ArrayList<String>) request\n\t\t\t\t\t.getSession().getAttribute(\"listaSectoresSeleccionados\");\n\t\t\tRegistroUbicacionForm f = (RegistroUbicacionForm) form;\n\n\t\t\tif (listaEntidadesSeleccionadas == null\n\t\t\t\t\t&& f.getPrefiereCandidatosEntidad() != null) {\n\t\t\t\tArrayList<RegistroEntidadesVO> listaEnt = new ArrayList<RegistroEntidadesVO>();\n\t\t\t\tRegistroEntidadesVO entidad = new RegistroEntidadesVO();\n\t\t\t\tentidad.setEntidad(Utils.parseLong(f\n\t\t\t\t\t\t.getPrefiereCandidatosEntidad()));\n\t\t\t\tentidad.setMunicipio(Utils.parseLong(f\n\t\t\t\t\t\t.getPrefiereCandidatosMunicipio()));\n\t\t\t\tlistaEnt.add(entidad);\n\t\t\t\trequest.getSession().setAttribute(\n\t\t\t\t\t\t\"listaEntidadesSeleccionadas\", listaEnt);\n\t\t\t}\n\n\t\t\tif (listaEntidadesSeleccionadas != null\n\t\t\t\t\t&& f.getPrefiereCandidatosEntidad() != null) {\n\t\t\t\tRegistroEntidadesVO entidad = new RegistroEntidadesVO();\n\t\t\t\tentidad.setEntidad(Utils.parseLong(f\n\t\t\t\t\t\t.getPrefiereCandidatosEntidad()));\n\t\t\t\tentidad.setMunicipio(Utils.parseLong(f\n\t\t\t\t\t\t.getPrefiereCandidatosMunicipio()));\n\t\t\t\tlistaEntidadesSeleccionadas.add(entidad);\n\t\t\t\trequest.getSession().setAttribute(\n\t\t\t\t\t\t\"listaEntidadesSeleccionadas\",\n\t\t\t\t\t\tlistaEntidadesSeleccionadas);\n\t\t\t}\n\n\t\t\tif (listaSectoresSeleccionados == null && f.getSector() != null) {\n\t\t\t\tArrayList<String> listaSectores = new ArrayList<String>();\n\t\t\t\tString sector = f.getSector();\n\t\t\t\tlistaSectores.add(sector);\n\t\t\t\trequest.getSession().setAttribute(\"listaSectoresSeleccionados\",\n\t\t\t\t\t\tlistaSectores);\n\t\t\t}\n\n\t\t\tif (listaSectoresSeleccionados != null && f.getSector() != null) {\n\t\t\t\tString sector = f.getSector();\n\t\t\t\tlistaSectoresSeleccionados.add(sector);\n\t\t\t\trequest.getSession().setAttribute(\"listaSectoresSeleccionados\",\n\t\t\t\t\t\tlistaSectoresSeleccionados);\n\t\t\t}\n\n\t\t\tRegistroUbicacionVO registroUbicacionVO = converterUbicacion(form,\n\t\t\t\t\tidEmpresa);\n\t\t\tregistroUbicacionVO.setIdOferta(idOferta);\n\t\t\trequest.getSession().setAttribute(\"listaPrestaciones\",\n\t\t\t\t\tregistroUbicacionVO.getPrestaciones());\n\n\t\t\trequest.getSession().setAttribute(\"registroUbicacionVO\",\n\t\t\t\t\tregistroUbicacionVO);\n\n\t\t\t// idOferta = services.guardarUbicacion(registroUbicacionVO);\n\t\t\t// idOferta = services.editarUbicacion(registroUbicacionVO);\n\n\t\t\t// request.getSession().setAttribute(\"id_oferta\", \"\" + idOferta);\n\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(e); // TODO Notificar error al usuario\n\t\t}\n\n\t\t// request.getSession().setAttribute(BODY_JSP,\n\t\t// mapping.findForward(FORWARD_NEXT).getPath());\n\t\treturn mapping.findForward(FORWARD_NEXT);\n\t}",
"public ActionForward unspecified(ActionMapping mapping, ActionForm form,\r\n HttpServletRequest request, HttpServletResponse response) throws Exception {\r\n return displayProcessErp(mapping, form, request, response);\r\n }",
"@Override\n public FormMappingOption adjustFormMapping() {\n return formMappingOption;\n }",
"protected ActionForward performAction(ActionMapping mapping,\n ActionForm form, HttpServletRequest request,\n HttpServletResponse response) throws Exception {\n\n String forward = FWD_SUCCESS;\n request.setAttribute(ALLOW_EDITS_KEY, \"true\");\n request.setAttribute(PREVIOUS_DISABLED, \"false\");\n request.setAttribute(NEXT_DISABLED, \"false\");\n\n String id = request.getParameter(ID);\n \n if (StringUtil.isNullorNill(id) || \"0\".equals(id)) {\n isNew = true;\n } else {\n isNew = false;\n }\n \n BaseActionForm dynaForm = (BaseActionForm) form;\n \n ActionMessages errors = dynaForm.validate(mapping, request); \n if (errors != null && errors.size() > 0) {\n // System.out.println(\"Server side validation errors \"\n // + errors.toString());\n saveErrors(request, errors);\n // since we forward to jsp - not Action we don't need to repopulate\n // the lists here\n return mapping.findForward(FWD_FAIL);\n }\n \n String start = (String) request.getParameter(\"startingRecNo\");\n String direction = (String) request.getParameter(\"direction\");\n \n District district = new District();\n //get sysUserId from currentUserId\n district.setSysUserId(currentUserId); \n org.hibernate.Transaction tx = HibernateUtil.getSession().beginTransaction();\n \n // populate value holder from form\n PropertyUtils.copyProperties(district, dynaForm);\n // Get cityId from property \"selectedCityId\"\n String selectedCityId = PropertyUtils\n .getProperty(dynaForm, \"selectedCityId\").toString();\n // Get City object from cityId\n DictionaryDAO dictionaryDAO = new DictionaryDAOImpl();\n Dictionary city = new Dictionary();\n city = dictionaryDAO.getDataForId(selectedCityId);\n \n // Get DictrictEntry from districtName property from form\n String districtName = PropertyUtils\n .getProperty(dynaForm, \"districtName\").toString();\n \n DistrictDAO distDAO = new DistrictDAOImpl();\n \n List<Dictionary> districtEntry = distDAO.getDistrictsEntyByName(districtName);\n \n // Set some property for district\n district.setCity(city);\n district.setDescription(\"\");\n \n try {\n // Check DistrictEntry is already exists or not.\n if (districtEntry.size() == 0) {\n Dictionary newDistrictEntry = new Dictionary();\n newDistrictEntry.setDictEntry(districtName);\n DictionaryCategory dicCategory = new DictionaryCategory();\n DictionaryCategoryDAO dicCategoryDAO = \n new DictionaryCategoryDAOImpl();\n dicCategory = dicCategoryDAO\n .getDictionaryCategoryByName(\"districts\");\n newDistrictEntry.setDictionaryCategory(dicCategory);\n newDistrictEntry.setSysUserId(currentUserId);\n newDistrictEntry.setIsActive(\"Y\");\n dictionaryDAO.insertData(newDistrictEntry);\n district.setDistrictEntry(dictionaryDAO\n .getDictionaryByDictEntry(districtName));\n } else {\n district.setDistrictEntry(districtEntry.get(0));\n }\n if (!isNew) {\n // UPDATE\n distDAO.updateData(district);\n } else {\n // INSERT\n distDAO.insertData(district);\n }\n tx.commit();\n \n } catch (LIMSRuntimeException lre) {\n //bugzilla 2154\n LogEvent.logError(\"DistrictUpdateAction\", \"performAction()\",\n lre.toString());\n tx.rollback();\n errors = new ActionMessages();\n java.util.Locale locale = (java.util.Locale) request.getSession()\n .getAttribute(\"org.apache.struts.action.LOCALE\");\n ActionError error = null;\n if (lre.getException()\n instanceof org.hibernate.StaleObjectStateException) {\n // how can I get popup instead of struts error at the top of\n // page?\n // ActionMessages errors = dynaForm.validate(mapping, request);\n error = new ActionError(\"errors.OptimisticLockException\", null,\n null);\n } else {\n // bugzilla 1482\n if (lre.getException()\n instanceof LIMSDuplicateRecordException) {\n String messageKey = \"district.browse.title\";\n String msg = ResourceLocator.getInstance()\n .getMessageResources().getMessage(locale,\n messageKey);\n error = new ActionError(\"errors.DuplicateRecord\",\n msg, null);\n\n } else {\n error = new ActionError(\"errors.UpdateException\", null,\n null);\n }\n }\n errors.add(ActionMessages.GLOBAL_MESSAGE, error);\n saveErrors(request, errors);\n request.setAttribute(Globals.ERROR_KEY, errors);\n //bugzilla 1485: allow change and try updating again \n //enable save button & disable previous and next\n request.setAttribute(PREVIOUS_DISABLED, \"true\");\n request.setAttribute(NEXT_DISABLED, \"true\");\n forward = FWD_FAIL;\n\n } finally {\n HibernateUtil.closeSession();\n }\n \n if (forward.equals(FWD_FAIL)) {\n return mapping.findForward(forward);\n }\n // initialize the form\n dynaForm.initialize(mapping);\n // repopulate the form from valueholder\n PropertyUtils.copyProperties(dynaForm, district);\n if (\"true\".equalsIgnoreCase(request.getParameter(\"close\"))) {\n forward = FWD_CLOSE;\n }\n\n if (district.getId() != null && !district.getId().equals(\"0\")) {\n request.setAttribute(ID, district.getId());\n\n }\n\n //bugzilla 1400\n if (isNew) {\n forward = FWD_SUCCESS_INSERT;\n }\n //bugzilla 1467 added direction for redirect to NextPreviousAction\n return getForward(mapping.findForward(forward), id, start, direction);\n \n }",
"public ActionForward execute(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response) {\r\n\t\tBlockEditForm bform = (BlockEditForm) form;\r\n\t\tString action = request.getParameter(\"action\");\r\n\t\t\r\n\t\t//防止表单二次提交\r\n\t\tif(!FormUtil.isFromAble(request, \"BE_uitlValue\", bform.getUitlName()))\r\n\t\t\treturn null;\r\n\t\tFormUtil.disableFrom(request, \"BE_uitlValue\");\r\n\t\tif(action == null){\r\n\t\t\ttry{\t\r\n\t\t\t\tAdminFacade.insert(bform);\r\n\t\t\t\trequest.setAttribute(\"SUBMIT_URL\", \"\");\r\n\t\t\t\treturn mapping.findForward(\"ok\");\r\n\t\t\t}catch(Exception e){\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\trequest.setAttribute(\"BlockEditSubmit_Mess\", e.getMessage());\r\n\t\t\t\treturn mapping.findForward(\"error\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(action.equals(\"edit\")){\r\n\t\t\ttry{\t\r\n\t\t\t\tInteger blockId = Integer.valueOf(request.getParameter(\"blockId\"));\r\n\t\t\t\tAdminFacade.update(bform, blockId);\r\n\t\t\t\trequest.setAttribute(\"SUBMIT_URL\", \"welcome.do?action=blockEdit\");\r\n\t\t\t\treturn mapping.findForward(\"ok\");\r\n\t\t\t}catch(Exception e){\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\trequest.setAttribute(\"BlockEditSubmit_Mess\", e.getMessage());\r\n\t\t\t\treturn mapping.findForward(\"error\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public ActionForward exec(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response)\n throws Exception {\n \n \n String mode = request.getParameter(\"mode\");\n String action = request.getParameter(\"action\");\n RequestContext.setPageContext(request);\n\n InstaReportBean reportBean = (InstaReportBean) form;\n if (reportBean==null) {\n reportBean = new InstaReportBean();\n }\n ReportDTO newReportDto = new ReportDTO();\n if ((\"controller\").equalsIgnoreCase(mode)\n && (\"input\").equalsIgnoreCase(action)) {\n \n try {\n //reportBean.resetBean();\n reportBean.resetAll();\n reportBean.setListOfTranType(null);\n reportBean.subTypeMap.clear();\n reportBean.setListOfTranType(reportBean.getListOfTranType());\n reportBean.setTranTypeList(reportBean.getTransactionListForExcel());\n reportBean.setSubTypeMap(reportBean.getMsgSubTypeMapForExcel());\n reportBean.setNewReportDto(newReportDto);\n String appDate = InstaReportUtil.reportDisplayDateFormat(getBusinessDate());\n reportBean.getNewReportDto().setValueDate(appDate);\n return mapping.findForward(\"controllerInput\");\n \n } catch (Exception e) {\n \n logger.error(e.getMessage());\n reportBean.setMessage(e.getMessage());\n reportBean.setMessageType(InstaULC.MSG_TYPE_INFO);\n return mapping.findForward(\"controllerFailure\");\n }\n } else if ((\"controller\").equalsIgnoreCase(mode)\n && (\"submit\").equalsIgnoreCase(action)) {\n try {\n reportBean.generateExcelSheetReport(request);\n String appDate = InstaReportUtil.reportDisplayDateFormat(getBusinessDate());\n reportBean.getNewReportDto().setValueDate(appDate); \n \n return mapping.findForward(\"excelSubmit\");\n } catch (Exception e) {\n logger.error(e.getMessage());\n reportBean.setMessage(e.getMessage());\n reportBean.setMessageType(InstaULC.MSG_TYPE_INFO);\n return mapping.findForward(\"controllerFailure\");\n }\n } else if ((\"controller\").equalsIgnoreCase(mode)\n && (\"reset\").equalsIgnoreCase(action)) {\n try {\n reportBean.resetAll();\n return mapping.findForward(\"controllerInput\");\n } catch (Exception e) {\n logger.error(e.getMessage());\n reportBean.setMessage(e.getMessage());\n reportBean.setMessageType(InstaULC.MSG_TYPE_INFO);\n return mapping.findForward(\"controllerFailure\");\n }\n }\n return mapping.findForward(\"controllerFailure\");\n }",
"public PDAction getFo() {\n/* 187 */ COSDictionary fo = (COSDictionary)this.actions.getDictionaryObject(\"Fo\");\n/* 188 */ PDAction retval = null;\n/* 189 */ if (fo != null)\n/* */ {\n/* 191 */ retval = PDActionFactory.createAction(fo);\n/* */ }\n/* 193 */ return retval;\n/* */ }",
"protected void removeFormBean(ActionMapping mapping,\r\n\t\t\tHttpServletRequest request) {\r\n\t\t// Remove the obsolete form bean\r\n\t\tif (mapping.getAttribute() != null) {\r\n\t\t\tif (\"request\".equals(mapping.getScope())) {\r\n\t\t\t\trequest.removeAttribute(mapping.getAttribute());\r\n\t\t\t} else {\r\n\t\t\t\tHttpSession session = request.getSession();\r\n\r\n\t\t\t\tsession.removeAttribute(mapping.getAttribute());\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public Form getForm() {\n return form;\n }",
"@Override\n\t\tpublic FormTestFacade getForm() {\n\t\t\treturn null;\n\t\t}",
"@Override\n\t\tpublic FormTestFacade getForm() {\n\t\t\treturn null;\n\t\t}",
"public ActionForward unspecified(ActionMapping mapping,\r\n ActionForm form,\r\n HttpServletRequest request,\r\n HttpServletResponse response) throws Exception {\r\n return display(mapping, form, request, response);\r\n }",
"@Override\r\n public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {\r\n if (LOG.isDebugEnabled()) {\r\n LOG.debug(String.format(\"ENTRY %s%n%s\", form.getClass().getSimpleName(), request.getRequestURI()));\r\n }\r\n \r\n ActionForward forward = null;\r\n\r\n Throwable t = (Throwable) request.getAttribute(Globals.EXCEPTION_KEY);\r\n\r\n if (t == null) {\r\n forward = mapping.findForward(KRADConstants.MAPPING_CLOSE);\r\n } else {\r\n forward = processException(mapping, form, request, t);\r\n }\r\n \r\n if (LOG.isDebugEnabled()) {\r\n LOG.debug(String.format(\"EXIT %s\", (forward == null) ? \"null\" : forward.getPath()));\r\n }\r\n\r\n return forward;\r\n }",
"protected final Form getForm() {\n\t\treturn itsForm;\n\t}",
"public ActionForward unspecified(ActionMapping mapping, ActionForm form,\n\t\t\tHttpServletRequest req, HttpServletResponse res)\n\t\t\tthrows IOException, ServletException {\n\t\tAsociarListasForm formulario = (AsociarListasForm) form;\n\t\tint idEnvio = formulario.getIdEnvio();\n\t\tString idCliente = req.getRemoteUser();\n\n\t\ttry {\n\t\t\tformulario.init(req);\n\t\t\tEnvioDao dao = (EnvioDao) FactoriaDao.getInstance().getDao(EnvioDao.class);\n\t\t\tformulario.setListasSeleccionadas(dao.findListas(idCliente, idEnvio));\n\t\t} catch (DaoException e) {\n\t\t\tthrow new ServletException(e);\n\t\t}\n\t\tString inc = (String)req.getParameter(\"inc\")==null?\"\":(String)req.getParameter(\"inc\");\n\t\tif (inc.equals(\"S\"))\n\t\t\treq.setAttribute(\"incompatibles\",\"S\");\n\t\treturn mapping.getInputForward();\n\t}",
"private ActionForward displayAction(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows Exception {\n\t\t\r\n\t\tExceptionDisplayDTO expDTO = new ExceptionDisplayDTO(\"displayPage\",\"\");\r\n\t\texpDisplayDetails.set(expDTO);\r\n\t\t\r\n\t\t//condition to not display search results by default\r\n\t\t/*if(isNavigationDone(request)){\r\n\t\t\tgetPaginatedSearchResults(request,bean,null);\r\n\t\t}*/\r\n\t\t\r\n\t\treturn mapping.findForward(\"displayPage\");\t\t\r\n\t}",
"@Override\r\n\tpublic int getFormId()\r\n\t{\r\n\t\treturn 0;\r\n\t}",
"public ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {\r\n return notify(mapping, form, request, response);\r\n }",
"public ActionForward execute(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response)\r\n\t\tthrows Exception {\r\n\t\t//DataSource ds = (DataSource) getDataSource(request, \"dbaccounting\");\r\n\t\t//Connection conn = null;\r\n\t\tBankReconcileForm bankReconcileForm = (BankReconcileForm) form;\r\n\t\tActionForward forward = null;\r\n\t\tString action = mapping.getParameter();\r\n\t\tHttpSession session = request.getSession();\r\n\t\tUsers users = (Users)session.getAttribute(CommonConstants.USER);\r\n\t\tSet lst = (Set)session.getAttribute(CommonConstants.VIEWACCESS);\r\n\t\t\tif (users!=null) {\r\n\t\t\t\tif (CommonUtil.isHasRoleAccess(lst,request.getServletPath())) {\r\n\t\t\t\t\trequest.setAttribute(\"VIEWS\",lst);\r\n\t\t\t\t\tif (\"\".equalsIgnoreCase(action)) {\r\n\t\t\t\t\t\tforward = mapping.findForward(\"home\");\r\n\t\t\t\t\t} else if (\"LIST\".equalsIgnoreCase(action)) {\r\n\t\t\t\t\t\tforward = performPartialList(mapping, form, request, response);\r\n\t\t\t\t\t} else if (\"FORM\".equalsIgnoreCase(action)) {\r\n\t\t\t\t\t\tforward = performForm(mapping, form, request, response);\r\n\t\t\t\t\t} else if (\"SAVE\".equalsIgnoreCase(action)) {\r\n\t\t\t\t\t\tif (bankReconcileForm.getString(\"subaction\")!=null && bankReconcileForm.getString(\"subaction\").length()>0 && bankReconcileForm.getString(\"subaction\").equalsIgnoreCase(\"refresh\")) {\r\n\t\t\t\t\t\t\tforward = performForm(mapping, form, request, response);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tforward = performSave(mapping, form, request, response);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (\"DETAIL\".equalsIgnoreCase(action)) { \r\n\t\t\t\t\t\tforward = performDetail(mapping, form, request, response);\r\n\t\t\t\t\t} else if (\"DELETE\".equalsIgnoreCase(action)) {\r\n\t\t\t\t\t\tforward = performDelete(mapping, form, request, response);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn forward;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tActionMessages errors = new ActionMessages();\r\n\t\t\t\t\terrors.add(ActionMessages.GLOBAL_MESSAGE,new ActionMessage(\"error.privilage\",request.getContextPath()+mapping.getPath()));\r\n\t\t\t\t\tsaveMessages(request,errors);\t\t\t\t\r\n\t\t\t\t\treturn mapping.findForward(\"home\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\treturn mapping.findForward(\"index\");\r\n\t\t\t}\r\n\t}",
"public ActionForward multiUse(ActionMapping mapping, ActionForm form,\n \t\t\tHttpServletRequest request, HttpServletResponse response)\n \tthrows Exception {\n \t\t\n \t\treturn mapping.findForward(\"backToGeneExp\");\n }",
"public ActionErrors validate(ActionMapping mapping,\r\n\t\t\tHttpServletRequest request) {\n\t\treturn null;\r\n\t}",
"public ActionForward init(ActionMapping mapping, ActionForm form,\n\t\t\tHttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows Exception {\n\t\tlogger.info(\" Started... \");\n //Added by Neetika\n\t\tHttpSession session = request.getSession();\n\t\tUserSessionContext sessionContext = (UserSessionContext) session.getAttribute(Constants.AUTHENTICATED_USER);\n\t\tint forceToRecoPage=0;\n\t\tif(sessionContext.getAccountLevel().equalsIgnoreCase((Constants.DIST_ACCOUNT_LEVEL)))\n\t\t{\n\t\t\tforceToRecoPage= AuthorizationFactory.getAuthorizerImpl()\n\t\t\t.forceToRecoPage(sessionContext.getId());\n\t\t\tlogger.info(\"forceToRecoPage = \"+forceToRecoPage);\n\t\t\tif(forceToRecoPage!=0)\n\t\t\t{\n\t\t\t\trequest.setAttribute(\"disabledLink\", Constants.disableLink);\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t//end neetika\n\t\t/* No dropdowns to populate, Redirect to Change Password JSP. */\n\t\tlogger.info(\" successful redirected to : initSuccess. \");\n\t\tlogger.info(\" Executed... \");\n\t\treturn mapping.findForward(INIT_SUCCESS);\n\t}",
"public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException\n {\n ActionMessages error = new ActionMessages();\n InventariosForm finform = (InventariosForm)form;\n InicioForm fInicio = (InicioForm) request.getSession().getAttribute(\"InicioForm\"); \n finform.setInv_codreg(fInicio.getCod_reg());\n finform.setInv_regdescripcion(fInicio.getRegional()); \n finform.setInv_codfin(fInicio.getCod_fin());\n finform.setInv_findescripcion(fInicio.getFinanciador());\n String usuario = fInicio.getNombreUsuario();\n BDConection bdc = new BDConection();\n ArrayList aCalm;\n ArrayList aCalm2;\n ArrayList aCalm5;\n ArrayList aCalm6;\n ArrayList aCalm8;\n ArrayList aCalm9; \n ArrayList aCalm12; \n if (!(fInicio.getNombreUsuario().equals(\"SALIO\"))) {\n int it = finform.getFila();\n try {\n aCalm5 = bdc.listarOficinas(0,fInicio.getCod_reg());\n request.setAttribute(\"OficinasLista\", aCalm5);\n aCalm6 = bdc.listarFuncionarios(0,fInicio.getCod_reg());\n request.setAttribute(\"FuncionariosLista\", aCalm6);\n aCalm8 = bdc.listarFinanciadores(0);\n request.setAttribute(\"FinanciadoresLista\", aCalm8);\n aCalm9 = bdc.listarProyectos(0);\n request.setAttribute(\"ProyectosLista\", aCalm9);\n aCalm2 = bdc.listarRegionales(0);\n request.setAttribute(\"RegionalesLista\", aCalm2);\n aCalm12 = bdc.listarEstados();\n request.setAttribute(\"EstadosLista\", aCalm12);\n aCalm = bdc.listarInventarios(fInicio.getCod_reg(),1); \n request.setAttribute(\"InventariosLista\", aCalm);\n ArrayList datos = (ArrayList) request.getAttribute(\"InventariosLista\"); \n if (finform.getOperacion()==1)\n { \n InventariosDetalleForm d = new InventariosDetalleForm();\n d = (InventariosDetalleForm) datos.get(it); \n finform.setInv_codbarrad(d.getCodbarrad());\n finform.setInv_codbarra(d.getCodbarra()); \n finform.setInv_fecha(d.getFecha());\n finform.setInv_codofi(d.getCodofi());\n finform.setInv_codfun(d.getCodfun());\n finform.setInv_codubi(d.getCodubi());\n finform.setInv_codfin(d.getCodfin());\n finform.setInv_codpry(d.getCodpry());\n finform.setInv_codreg(d.getCodreg());\n finform.setInv_estado(d.getEstado());\n finform.setInv_mod(d.getMod());\n }\n if (finform.getOperacion()==2)\n {\n try {\n if (!finform.getBoton().equals(\"Cancelar\")) {\n if (finform.getOpcion()!=6) {\n String msgsql=null;\n msgsql = bdc.insertarinventarios(\n finform.getInv_codbarra(),\n finform.getInv_fecha(),\n finform.getInv_codofi(),\n finform.getInv_codfun(),\n finform.getInv_codubi(),\n finform.getInv_codfin(),\n finform.getInv_codpry(),\n finform.getInv_codreg(),\n finform.getInv_estado(),\n fInicio.getTxt_usu(),\n finform.getInv_mod(),\n finform.getOpcion()\n );\n finform.setInv_codbarra(\"\");\n finform.setInv_fecha(\"\");\n finform.setInv_codofi(\"\");\n finform.setInv_codfun(\"\");\n finform.setInv_codubi(\"\");\n finform.setInv_codfin(\"\");\n finform.setInv_codpry(\"\"); \n finform.setInv_codreg(\"\");\n finform.setInv_estado(\"\");\n finform.setInv_mod(\"\");\n if (!msgsql.equals(\"0\")) {\n error.add(\"error\", new ActionMessage(\"error\", msgsql));\n saveErrors( request, error );\n }\n else {\n error.add(\"error\", new ActionMessage(\"error\", \"La transacción fue realizada correctamente\"));\n saveErrors( request, error ); \n }\n }\n else {\n String msgsql=null;\n msgsql = bdc.generarinventarios(fInicio.getCod_reg(),fInicio.getCod_fin(),fInicio.getTxt_usu(),finform.getActas());\n error.add(\"error\", new ActionMessage(\"error\", msgsql));\n saveErrors( request, error );\n }\n }\n else\n {\n finform.setInv_codbarra(\"\");\n finform.setInv_fecha(\"\");\n finform.setInv_codofi(\"\"); \n finform.setInv_codfun(\"\");\n finform.setInv_codubi(\"\");\n finform.setInv_codfin(\"\");\n finform.setInv_codpry(\"\"); \n finform.setInv_codreg(\"\"); \n finform.setInv_estado(\"\"); \n finform.setInv_mod(\"\");\n }\n try {\n aCalm = bdc.listarInventarios(fInicio.getCod_reg(),1); \n request.setAttribute(\"InventariosLista\", aCalm);\n }\n catch (Exception e) {\n error.add(\"error\", new ActionMessage(\"errordb\", \"No se pudo iniciar Inventarios\"));\n error.add(\"error\", new ActionMessage(\"errordb\", e.toString() ));\n e.printStackTrace();\n saveErrors( request, error );\n }\n \n }\n catch (Exception e) {\n error.add(\"error\", new ActionMessage(\"errordb\", \"No se pudo realizar la transaccion.\"));\n error.add(\"error\", new ActionMessage(\"errordb\", e.toString() ));\n e.printStackTrace();\n saveErrors( request, error );\n }\n } \n }\n catch (Exception e) {\n error.add(\"error\", new ActionMessage(\"errordb\", \"No se pudo iniciar Inventarios\"));\n error.add(\"error\", new ActionMessage(\"errordb\", e.toString() ));\n e.printStackTrace();\n saveErrors( request, error );\n }\n }\n return mapping.findForward(\"volver\");\n }",
"public void processFormRequest(OAPageContext pageContext, \n OAWebBean webBean) {\n super.processFormRequest(pageContext, webBean);\n CuxDocinfoManageAMImpl pgAM = \n (CuxDocinfoManageAMImpl)pageContext.getRootApplicationModule();\n if (pageContext.getParameter(\"SaveBTN\") != null) {\n pgAM.commit();\n pageContext.putDialogMessage(new OAException(\"保存成功\", \n OAException.INFORMATION));\n HashMap params = new HashMap(1);\n params.put(\"RequeryFlag\", \"Y\");\n pageContext.forwardImmediately(\"OA.jsp?page=/cux/oracle/apps/cux/docinfo/webui/CuxDocinfoManageResultPG\", \n null, \n OAWebBeanConstants.KEEP_MENU_CONTEXT, \n null, params, true, \n OAWebBeanConstants.ADD_BREAD_CRUMB_YES);\n } else if (pageContext.getParameter(\"CancelBTN\") != null) {\n pgAM.rollback();\n pageContext.forwardImmediately(\"OA.jsp?page=/cux/oracle/apps/cux/docinfo/webui/CuxDocinfoManageResultPG\", \n null, \n OAWebBeanConstants.KEEP_MENU_CONTEXT, \n null, null, true, \n OAWebBeanConstants.ADD_BREAD_CRUMB_YES);\n }\n }",
"@ModelAttribute(\"form\")\n public SearchFiltersLocationForm getForm(PortletRequest request, PortletResponse response) throws PortletException {\n // Portal controller context\n PortalControllerContext portalControllerContext = new PortalControllerContext(this.portletContext, request, response);\n\n return this.service.getForm(portalControllerContext);\n }",
"public ActionForward execute(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response) throws Exception {\n AGSSEditForm aGSSEditForm = (AGSSEditForm) form;// TODO Auto-generated method stub\n HttpSession session = ((HttpServletRequest) request).getSession();\n String forwardName = \"\";\n AirStandardCharges airStandardCharges = new AirStandardCharges();\n GenericCodeDAO genericCodeDAO = new GenericCodeDAO();\n String buttonValue = aGSSEditForm.getButtonValue();\n String standard = aGSSEditForm.getStandard();\n String asFreighted = aGSSEditForm.getAsFrfgted();\n int index = 0;\n AirRatesBean airRatesBean = new AirRatesBean();\n airRatesBean.setStandard(aGSSEditForm.getStandard());\n airRatesBean.setAsFrfgted(aGSSEditForm.getAsFrfgted());\n request.setAttribute(\"airRatesBean\", airRatesBean);\n List agssList = new ArrayList();\n if (session.getAttribute(\"airStandardCharges\") != null) {\n airStandardCharges = (AirStandardCharges) session.getAttribute(\"airStandardCharges\");\n } else {\n airStandardCharges = new AirStandardCharges();\n }\n if (!buttonValue.equals(\"cancel\")) {\n if (asFreighted != null && asFreighted.equalsIgnoreCase(\"on\")) {\n airStandardCharges.setAsFrfgted(\"X\");\n } else if (asFreighted == null) {\n airStandardCharges.setAsFrfgted(null);\n }\n\n\n GenericCode genObj = new GenericCode();\n String type = aGSSEditForm.getChargeType();\n\n forwardName = \"agssEdit\";\n\n\n\n if (standard != null && standard.equalsIgnoreCase(\"on\")) {\n airStandardCharges.setStandard(\"Y\");\n } else if (standard == null) {\n airStandardCharges.setStandard(\"N\");\n }\n if (aGSSEditForm.getAmtPerCft() != null && !aGSSEditForm.getAmtPerCft().equals(\"\")) {\n airStandardCharges.setAmtPerCft(new Double(aGSSEditForm.getAmtPerCft()));\n } else {\n airStandardCharges.setAmtPerCft(0.0);\n }\n if (aGSSEditForm.getAmtPer100lbs() != null && !aGSSEditForm.getAmtPer100lbs().equals(\"\")) {\n airStandardCharges.setAmtPer100lbs(new Double(aGSSEditForm.getAmtPer100lbs()));\n } else {\n airStandardCharges.setAmtPer100lbs(0.0);\n }\n if (aGSSEditForm.getAmtPerCbm() != null && !aGSSEditForm.getAmtPerCbm().equals(\"\")) {\n airStandardCharges.setAmtPerCbm(new Double(aGSSEditForm.getAmtPerCbm()));\n } else {\n airStandardCharges.setAmtPerCbm(0.0);\n }\n if (aGSSEditForm.getAmtPer1000kg() != null && !aGSSEditForm.getAmtPer1000kg().equals(\"\")) {\n airStandardCharges.setAmtPer1000kg(new Double(aGSSEditForm.getAmtPer1000kg()));\n } else {\n airStandardCharges.setAmtPer1000kg(0.0);\n }\n if (aGSSEditForm.getAmount() != null && !aGSSEditForm.getAmount().equals(\"\")) {\n airStandardCharges.setAmount(new Double(aGSSEditForm.getAmount()));\n } else {\n airStandardCharges.setAmount(0.0);\n }\n if (aGSSEditForm.getPercentage() != null && !aGSSEditForm.getPercentage().equals(\"\")) {\n double d = Double.parseDouble(aGSSEditForm.getPercentage());\n airStandardCharges.setPercentage(d / 1000);\n } else {\n airStandardCharges.setPercentage(0.0);\n }\n if (aGSSEditForm.getMinAmt() != null && !aGSSEditForm.getMinAmt().equals(\"\")) {\n airStandardCharges.setMinAmt(new Double(aGSSEditForm.getMinAmt()));\n } else {\n airStandardCharges.setMinAmt(0.0);\n }\n if (aGSSEditForm.getInsuranceRate() != null && !aGSSEditForm.getInsuranceRate().equals(\"\")) {\n airStandardCharges.setInsuranceRate(new Double(aGSSEditForm.getInsuranceRate()));\n } else {\n airStandardCharges.setInsuranceRate(0.0);\n }\n if (aGSSEditForm.getInsuranceAmt() != null && !aGSSEditForm.getInsuranceAmt().equals(\"\")) {\n airStandardCharges.setInsuranceAmt(new Double(aGSSEditForm.getInsuranceAmt()));\n } else {\n airStandardCharges.setInsuranceAmt(0.0);\n }\n if (aGSSEditForm.getTxtItemcreatedon() != null && !aGSSEditForm.getTxtItemcreatedon().equals(\"\")) {\n java.util.Date javaDate = null;\n SimpleDateFormat sdf = new SimpleDateFormat(\"MM/dd/yyyy\");\n javaDate = sdf.parse(aGSSEditForm.getTxtItemcreatedon());\n airStandardCharges.setEffectiveDate(javaDate);\n }\n\n\n session.setAttribute(\"airStandardCharges\", airStandardCharges);\n }\n if (buttonValue.equals(\"edit\")) {\n if (session.getAttribute(\"agssAdd\") != null) {\n agssList = (List) session.getAttribute(\"agssAdd\");\n for (int i = 0; i < agssList.size(); i++) {\n AirStandardCharges airStandard = (AirStandardCharges) agssList.get(i);\n if (airStandard.getChargeCode().getId().equals(airStandardCharges.getChargeCode().getId())\n && airStandard.getChargeType().getId().equals(airStandardCharges.getChargeType().getId())) {\n airStandardCharges.setIndex(airStandard.getIndex());\n agssList.remove(airStandard);\n agssList.add(airStandardCharges);\n break;\n }\n }\n }\n\n session.setAttribute(\"agssAdd\", agssList);\n if (session.getAttribute(\"airStandardCharges\") != null) {\n session.removeAttribute(\"airStandardCharges\");\n }\n forwardName = \"agssAdd\";\n session.setAttribute(\"getUpdateAss\", airStandardCharges);\n } else if (buttonValue.equals(\"cancel\")) {\n if (session.getAttribute(\"airStandardCharges\") != null) {\n session.removeAttribute(\"airStandardCharges\");\n }\n forwardName = \"agssAdd\";\n } else if (buttonValue.equals(\"delete\")) {\n if (session.getAttribute(\"agssAdd\") != null) {\n agssList = (List) session.getAttribute(\"agssAdd\");\n }\n for (int i = 0; i < agssList.size(); i++) {\n AirStandardCharges airStandard = (AirStandardCharges) agssList.get(i);\n if (airStandard.getChargeCode().getId().equals(airStandardCharges.getChargeCode().getId())\n && airStandard.getChargeType().getId().equals(airStandardCharges.getChargeType().getId())) {\n agssList.remove(airStandard);\n break;\n }\n session.setAttribute(\"agssAdd\", agssList);\n }\n if (session.getAttribute(\"airStandardCharges\") != null) {\n session.removeAttribute(\"airStandardCharges\");\n }\n forwardName = \"agssAdd\";\n }\n\n request.setAttribute(\"buttonValue\", buttonValue);\n\n return mapping.findForward(forwardName);\n }",
"public String getForm() {\r\n\t\treturn form;\r\n\t}",
"ActionMap createActionMap() {\n ActionMap am = super.createActionMap();\n if (am != null) {\n am.put(\"selectMenu\", new PostAction((JMenu)menuItem, true)); }\n return am; }"
] | [
"0.66735476",
"0.62579525",
"0.5834576",
"0.55972785",
"0.5582744",
"0.553884",
"0.55386657",
"0.5522076",
"0.5481444",
"0.546239",
"0.5452897",
"0.5410507",
"0.5410507",
"0.5410507",
"0.5410507",
"0.5410507",
"0.5373518",
"0.5372792",
"0.5354938",
"0.5353317",
"0.5347392",
"0.53411555",
"0.5337276",
"0.53177506",
"0.5286668",
"0.5269383",
"0.52612025",
"0.525575",
"0.52548033",
"0.5240309",
"0.5230106",
"0.52196705",
"0.52130693",
"0.5206812",
"0.51955706",
"0.5189014",
"0.5153152",
"0.5149741",
"0.51420915",
"0.51402456",
"0.5131464",
"0.51123106",
"0.51030076",
"0.5089607",
"0.5080941",
"0.5054792",
"0.5045544",
"0.50439423",
"0.50384563",
"0.5033561",
"0.50264996",
"0.50068295",
"0.50047386",
"0.49977094",
"0.49970183",
"0.49962872",
"0.49912784",
"0.49875644",
"0.49810073",
"0.4968158",
"0.4966918",
"0.49604392",
"0.49435323",
"0.4941139",
"0.4939167",
"0.49312374",
"0.49208093",
"0.49180573",
"0.491365",
"0.48991627",
"0.48835537",
"0.48780403",
"0.48778534",
"0.48769215",
"0.48757908",
"0.4866013",
"0.48651403",
"0.48639634",
"0.48592782",
"0.48550284",
"0.4841284",
"0.48295063",
"0.48295063",
"0.4829302",
"0.48173985",
"0.48082063",
"0.48029387",
"0.47888088",
"0.47861466",
"0.4774896",
"0.47708395",
"0.47567922",
"0.47465834",
"0.4733114",
"0.47233054",
"0.4722219",
"0.47176427",
"0.47055736",
"0.47025555",
"0.4698892"
] | 0.80695724 | 0 |
This has been overridden to check the populate property if using a GTActionMapping and if false to not populate the form. The prime reason for the existence of this property is to provide support for the RenderingAction which is 'chained' from the Action. Struts best practise discourages use of Action chaining, however the RenderingAction has a good excuse its the view component and the form shouldnt be repopulated when it is invoked! You shouldnt use action chaining as a methodology for action processing however as its a bad idea. If you think you need to, think very hard about it first, as its perceived need is most likely a flaw in your logic rather than a real need... 20030124AH | protected void processPopulate(HttpServletRequest request,
HttpServletResponse response,
ActionForm form,
ActionMapping mapping)
throws ServletException
{
if(form != null)
{
if(mapping instanceof GTActionMapping)
{ //20030124AH
if( ((GTActionMapping)mapping).isPopulate() == false )
{
return; //Do not pass go. Do not collect $200.
}
}
super.processPopulate(request,response,form,mapping);
}
else
{
return; //No form to populate
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ActionForward populate(ActionMapping mapping, ActionForm form, HttpServletRequest request,\n \t\t\tHttpServletResponse response) throws Exception {\n \n \t\tSystem.out.println(\"<ViralTreatmentPopulateAction populate> ... \");\n \n \t\tViralTreatmentForm viralTreatmentForm = (ViralTreatmentForm) form;\n \n \t\tString aTherapyID = request.getParameter(\"aTherapyID\");\n \n \t\tTherapyManager therapyManager = (TherapyManager) getBean(\"therapyManager\");\n \t\tTherapy therapy = therapyManager.get(aTherapyID);\n \n \t\t// Handle back-arrow on the delete\n \t\tif (therapy == null) {\n \t\t\trequest.setAttribute(Constants.Parameters.DELETED, \"true\");\n \t\t} else {\n \n \t\t\trequest.setAttribute(\"aTherapyID\", aTherapyID);\n \n \t\t\t// Set the otherName and/or the selected name attribute\n \t\t\tif (therapy.getAgent().getNameUnctrlVocab() != null) {\n \t\t\t\tviralTreatmentForm.setName(Constants.Dropdowns.OTHER_OPTION);\n \t\t\t\tviralTreatmentForm.setOtherName(therapy.getAgent().getNameUnctrlVocab());\n \t\t\t} else {\n \t\t\t\tviralTreatmentForm.setName(therapy.getAgent().getName());\n \t\t\t}\n \n \t\t\tif (therapy.getTreatment().getSexDistribution() != null) {\n \t\t\t\tviralTreatmentForm.setType(therapy.getTreatment().getSexDistribution().getType());\n \t\t\t}\n \t\t\tviralTreatmentForm.setAgeAtTreatment(therapy.getTreatment().getAgeAtTreatment());\n \t\t\tviralTreatmentForm.setDosage(therapy.getTreatment().getDosage());\n \n \t\t\tviralTreatmentForm.setRegimen(therapy.getTreatment().getRegimen());\n \t\t\tviralTreatmentForm.setAdministrativeRoute(therapy.getTreatment().getAdministrativeRoute());\n \n if (therapy.getTreatment().getAdminRouteUnctrlVocab() != null) {\n viralTreatmentForm.setAdministrativeRoute(Constants.Dropdowns.OTHER_OPTION);\n viralTreatmentForm.setOtherAdministrativeRoute(therapy.getTreatment().getAdminRouteUnctrlVocab());\n }\n \t\t}\n \n \t\t// Prepopulate all dropdown fields, set the global Constants to the\n \t\t// following\n \t\tthis.dropdown(request, response);\n \n \t\t// Store the Form in session to be used by the JSP\n \t\trequest.getSession().setAttribute(Constants.FORMDATA, viralTreatmentForm);\n \n \t\treturn mapping.findForward(\"submitViralTreatment\");\n \t}",
"protected ActionForward processActionPerform(HttpServletRequest request,\n HttpServletResponse response,\n Action action,\n ActionForm form,\n ActionMapping mapping)\n throws IOException, ServletException\n { //20030502AH - Copied from struts src, with extra code added \n try\n {\n if(mapping instanceof GTActionMapping)\n {\n //20050317AH - mod to also check for asdmin rights where spec'd in mapping\n GTActionMapping gtMapping = (GTActionMapping)mapping;\n boolean needsSession = gtMapping.isRequiresGtSession() ||gtMapping.isRequiresAdmin() \n \t\t\t\t\t\t\t\t\t\t\t\t|| gtMapping.isRequiresP2P() || gtMapping.isRequiresUDDI();\n if( needsSession )\n {\n //We will try to obtain a reference to the IGTSession using the method provided\n //in StaticWebUtils. This will throw a NoSessionException if we have no IGTSession.\n //By putting this check here it will be captured as though it was thrown by the action.\n IGTSession gtasSession = StaticWebUtils.getGridTalkSession(request);\n //NSL20060424 Check for P2P and UDDI requirement\n if (gtMapping.isRequiresP2P() && gtasSession.isNoP2P())\n {\n \tthrow new IllegalStateException(\"P2P functionality access required for mapped path \"+gtMapping.getPath());\n }\n if (gtMapping.isRequiresUDDI() && gtasSession.isNoUDDI())\n {\n \tthrow new IllegalStateException(\"UDDI functionality access required for mapped path \"+gtMapping.getPath());\n }\n if(gtMapping.isRequiresAdmin() && !gtasSession.isAdmin())\n {\n throw new IllegalStateException(\"Admin access required for mapped path \" + gtMapping.getPath());\n }\n }\n }\n return (action.execute(mapping, form, request, response));\n }\n catch (Exception e)\n {\n return (processException(request, response,e, form, mapping));\n }\n \n }",
"protected ActionForm processActionForm(HttpServletRequest request,\n HttpServletResponse response,\n ActionMapping mapping)\n {\n String scope = mapping.getScope();\n if(scope != null)\n {\n try\n {\n if(scope.equals(\"session\"))\n {\n OperationContext opCon = OperationContext.getOperationContext(request);\n if(opCon != null)\n {\n if(_log.isInfoEnabled())\n {\n _log.info(\"Looking for ActionForm in OperationContext[id=\" + opCon.getOperationContextId() + \"]\"); //20030124AH\n }\n ActionForm form = opCon.getActionForm();\n if(form != null)\n {\n if(_log.isInfoEnabled())\n {\n _log.info(\"Found ActionForm in OperationContext\"); //20030124AH\n }\n return form;\n }\n else\n {\n if(_log.isWarnEnabled())\n {\n _log.warn(\"No ActionForm found in OperationContext\"); //20030124AH\n }\n return null; //20030124AH\n }\n }\n }\n }\n catch(OperationException e)\n {\n // OperationExceptions here are normal when we forward from a completed operation\n // to the next action, so we ignore them.\n }\n catch(Throwable t)\n {\n if(_log.isErrorEnabled())\n {\n _log.error(\"Error caught in processActionForm() performing customised ActionForm handling\", t); //20030124AH\n }\n }\n }\n\n if(mapping instanceof GTActionMapping)\n { //20030124AH - Check the mapping to see if we should defer form creation or do it as normal\n if( ((GTActionMapping)mapping).isDeferFormCreation() )\n {\n if(_log.isInfoEnabled())\n {\n _log.info(\"Deferring ActionForm creation\");\n }\n return null;\n }\n }\n //...\n if(_log.isInfoEnabled())\n {\n _log.info(\"Delegating to superclass to obtain ActionForm\"); //20030124AH\n }\n ActionForm form = super.processActionForm(request, response, mapping);\n return form;\n }",
"protected ActionForward performAction(ActionMapping \t\tmapping,\n\t\t\t\t\t\t\t\t\t\t ActionForm\t\t\tform,\n\t\t\t\t\t\t\t\t\t\t HttpServletRequest\trequest,\n\t\t\t\t\t\t\t\t\t\t HttpServletResponse\tresponse)\n\t\tthrows Exception \n\t{\n\t\tString forward = \"success\";\n\t\trequest.setAttribute(ALLOW_EDITS_KEY, \"false\");\n\t\t\n\t\tHttpSession session = request.getSession();\n\t\tArrayList selectedTestIds = new ArrayList();\n\t\tsession.setAttribute(\"selectedTestIds\", selectedTestIds);\n\n\t\tBaseActionForm dynaForm = (BaseActionForm) form;\n\n\t\t// Initialize the form.\n\t\tdynaForm.initialize(mapping);\n\t\t\n\t\tPropertyUtils.setProperty(dynaForm, \"currentDate\", DateUtil.getCurrentDateAsText());\n\t\tPropertyUtils.setProperty(dynaForm, \"sampleTypes\", DisplayListService.getList(ListType.SAMPLE_TYPE_ACTIVE));\n\t\tPropertyUtils.setProperty(dynaForm, \"sampleSources\", DisplayListService.getList(ListType.SAMPLE_SOURCE));\n\t\tPropertyUtils.setProperty(dynaForm, \"initConditionFormErrorsList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_INIT_COND_FORM_ERRORS));\n\t\tPropertyUtils.setProperty(dynaForm, \"initConditionLabelErrorsList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_INIT_COND_LABEL_ERRORS));\n\t\tPropertyUtils.setProperty(dynaForm, \"initConditionMiscList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_INIT_COND_MISC));\n\t\tPropertyUtils.setProperty(dynaForm, \"rejectionReasonFormErrorsList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_REJECTION_FORM_ERRORS));\n\t\tPropertyUtils.setProperty(dynaForm, \"rejectionReasonLabelErrorsList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_REJECTION_LABEL_ERRORS));\n\t\tPropertyUtils.setProperty(dynaForm, \"rejectionReasonMiscList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_REJECTION_MISC));\n PropertyUtils.setProperty(dynaForm, \"genderList\", DisplayListService.getList(ListType.GENDERS));\n PropertyUtils.setProperty(dynaForm, \"cityList\", DisplayListService.getList(ListType.CITY));\n PropertyUtils.setProperty(dynaForm, \"districtList\", DisplayListService.getList(ListType.DISTRICT));\n PropertyUtils.setProperty(dynaForm, \"departmentList\", DisplayListService.getList(ListType.DEPARTMENT));\n PropertyUtils.setProperty(dynaForm, \"patientTypeList\", DisplayListService.getList(ListType.PATIENT_TYPE));\n\n // for backwards compatibility with non-modal version of sample entry\n\t\tPropertyUtils.setProperty(dynaForm, \"initialSampleConditionList\", DisplayListService.getList(ListType.INITIAL_SAMPLE_CONDITION));\n\t\tPropertyUtils.setProperty(dynaForm, \"testSectionList\", DisplayListService.getList(ListType.TEST_SECTION));\n\n\t\tSample\tsample\t= new Sample();\n\n\t\t// Set received date and entered date to today's date\n\t\tDate today = Calendar.getInstance().getTime();\n\t\tString dateAsText = DateUtil.formatDateAsText(today);\n\n\t\tSystemConfiguration sysConfig = SystemConfiguration.getInstance();\n\t\t\n\t\tsample.setReceivedDateForDisplay(dateAsText);\n\t\tsample.setEnteredDateForDisplay(dateAsText);\n\t\tsample.setReferredCultureFlag(sysConfig.getQuickEntryDefaultReferredCultureFlag());\n\t\tsample.setStickerReceivedFlag(sysConfig.getQuickEntryDefaultStickerReceivedFlag());\n\t\t\n\t\t// default nextItemSequence to 1 (for clinical - always 1)\n\t\tsample.setNextItemSequence(sysConfig.getQuickEntryDefaultNextItemSequence());\n\n\t\t// revision is set to 0 on insert\n\t\tsample.setRevision(sysConfig.getQuickEntryDefaultRevision());\n\n\t\tsample.setCollectionTimeForDisplay(sysConfig.getQuickEntryDefaultCollectionTimeForDisplay());\n\n\t\tif (sample.getId() != null && !sample.getId().equals(\"0\"))\n\t\t{\n\t\t\trequest.setAttribute(ID, sample.getId());\n\t\t}\n\n\t\t// populate form from valueholder\n\t\tPropertyUtils.copyProperties(form, sample);\n\n\t\tPropertyUtils.setProperty(form, \"currentDate\",\t\tdateAsText);\n\t\trequest.setAttribute(\"menuDefinition\", \"BatchEntryDefinition\");\n\t\treturn mapping.findForward(forward);\n\t}",
"public ActionForward unspecified(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response)\n throws Exception {\n this.setup(mapping,form,request,response);\n \n return mapping.findForward(\"backToGeneExp\");\n }",
"@Override\n public boolean doAction(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response) {\n ShellReturnSupplierFormBean formBean = (ShellReturnSupplierFormBean) form;\n GasDAO gasDAO = new GasDAO();\n ShellReturnSupplierBean bean = null;\n int shellReturnSupplierId = formBean.getId();\n try {\n bean = gasDAO.getShellReturnSupplier(shellReturnSupplierId);\n } catch (Exception ex) {\n }\n boolean bNew = false;\n if (shellReturnSupplierId == 0) {\n bNew = true;\n } else {\n bNew = false;\n }\n if (bean == null) {\n bean = new ShellReturnSupplierBean();\n }\n\n boolean needUpdate = false;\n if (StringUtil.isEqual(bean.getCreatedDate(), formBean.getCreatedDate())) {\n needUpdate = true;\n }\n\n bean.setId(formBean.getId());\n bean.setCreatedDate(formBean.getCreatedDate());\n bean.setCode(formBean.getCode());\n bean.setNote(formBean.getNote());\n bean.setVendorId(formBean.getVendorId());\n bean.setVehicleId(formBean.getVehicleId());\n bean.setCreatedEmployeeId(QTUtil.getEmployeeId(request.getSession()));\n try {\n if (bNew) {\n int id = gasDAO.insertShellReturnSupplier(bean);\n formBean.setId(id);\n addShellReturnSupplierShell(formBean, needUpdate);\n } else {\n addShellReturnSupplierShell(formBean, needUpdate);\n gasDAO.updateShellReturnSupplier(bean);\n }\n } catch (Exception ex) {\n }\n return true;\n }",
"@Override\r\n\tpublic ActionForward display(ActionMapping mapping, BaseForm form,\r\n\t\t\tString operation, HttpServletRequest request,\r\n\t\t\tHttpServletResponse response) {\r\n\r\n\t\tAuditUtil.getInstance().writeLog(\r\n\t\t\t\tAuditUtil.FILE_TYPE_G4G,\r\n\t\t\t\tnew StringBuffer(this.getClass().getName()).append(\r\n\t\t\t\t\t\tG4GConstants.CALLINGMETHOD).append(\r\n\t\t\t\t\t\tDataUtil.getCallingMethod()).append(\r\n\t\t\t\t\t\tG4GConstants.DISPLAY_STARTS)\r\n\t\t\t\t\t\t.append(G4GConstants.DASHES).append(\r\n\t\t\t\t\t\t\t\trequest.getSession().getId()).toString(),\r\n\t\t\t\tLevel.INFO);\r\n\t\tif (request.getSession().getAttribute(G4GConstants.USERDTO) == null) {\r\n\t\t\tAuditUtil.getInstance().writeLog(\r\n\t\t\t\t\tAuditUtil.FILE_TYPE_G4G,\r\n\t\t\t\t\tnew StringBuffer(this.getClass().getName()).append(\r\n\t\t\t\t\t\t\tG4GConstants.COLON_WITH_SPACES).append(\r\n\t\t\t\t\t\t\tDataUtil.getCurrentMethod()).append(\r\n\t\t\t\t\t\t\tG4GConstants.COLON_WITH_SPACES).append(G4GConstants.DASHES)\r\n\t\t\t\t\t\t\t.append(request.getSession().getId()).append(\r\n\t\t\t\t\t\t\t\t\tG4GConstants.USER_NOT_RECOGNIZE).append(\r\n\t\t\t\t\t\t\t\t\trequest.getSession().getId()).toString(),\r\n\t\t\t\t\tLevel.INFO);\r\n\t\t\treturn mapping.findForward(G4GConstants.HOMEPAGE);\r\n\t\t}\r\n\t\tList<OpenMatchDTO> matchList = new ArrayList<OpenMatchDTO>();\r\n\t\tUserDTO userDTO;\r\n\t\tGameDTO gameDTO = null;\r\n\t\tint playerId = G4GConstants.ZERO;\r\n\t\tGameDetailsForm gameDetailsForm = new GameDetailsForm();\r\n\t\tint gameId =G4GConstants.ZERO;\r\n\t\ttry {\r\n\t\t\tgameId = request.getParameter(G4GConstants.GAMEID) != null ? Integer\r\n\t\t\t\t\t.parseInt(request.getParameter(G4GConstants.GAMEID))\r\n\t\t\t\t\t: G4GConstants.ZERO;\r\n\t\t\tuserDTO = DataUtil.getUserDTO(request);\r\n\t\t\tplayerId = userDTO.getPlayerDTO().getId();\r\n\t\t\tAuditUtil.getInstance().writeLog(\r\n\t\t\t\t\tAuditUtil.FILE_TYPE_G4G,\r\n\t\t\t\t\tnew StringBuffer(this.getClass().getName()).append(\r\n\t\t\t\t\t\t\tCALLINGMETHOD).append(DataUtil.getCallingMethod())\r\n\t\t\t\t\t\t\t.append(DISPLAY_STARTS).append(DASHES).append(\r\n\t\t\t\t\t\t\t\t\tG4GConstants.GETTING_DETAILS).append(\r\n\t\t\t\t\t\t\t\t\trequest.getSession().getId()).toString());\r\n\t\t\t/* Getting game details as per the gameId */\r\n\t\t\tgameDTO = GameServiceDelegator.getGame(gameId);\r\n\t\t\tif(gameDTO == null){\r\n\t\t\t\treturn mapping.findForward(G4GConstants.GAMELOBBY);\r\n\t\t\t}\r\n\t\t\tAuditUtil.getInstance().writeLog(\r\n\t\t\t\t\tAuditUtil.FILE_TYPE_G4G,\r\n\t\t\t\t\tnew StringBuffer(this.getClass().getName()).append(\r\n\t\t\t\t\t\t\tCALLINGMETHOD).append(DataUtil.getCallingMethod())\r\n\t\t\t\t\t\t\t.append(DISPLAY_STARTS).append(DASHES).append(\r\n\t\t\t\t\t\t\t\t\tG4GConstants.THIS_IS_GAME).append(\r\n\t\t\t\t\t\t\t\t\tgameDTO.getGamename()).append(\r\n\t\t\t\t\t\t\t\t\trequest.getSession().getId()).toString());\r\n\r\n\t\t\t/* Getting match details for openMatches tab */\r\n\t\t\tmatchList = TwoPlayerTournamentServiceDelegator\r\n\t\t\t\t\t.getOpenMatchesDetails(gameId, playerId);\r\n\t\t\t/*\r\n\t\t\t * Form field allPlayers id populated with players having this\r\n\t\t\t * gameId\r\n\t\t\t */\r\n\t\t\tgameDetailsForm.setAllPlayers(PlayerServiceDelegator\r\n\t\t\t\t\t.getGameWisePlayersList(gameId));\r\n\t\t\tAuditUtil.getInstance().writeLog(\r\n\t\t\t\t\tAuditUtil.FILE_TYPE_G4G,\r\n\t\t\t\t\tnew StringBuffer(this.getClass().getName()).append(\r\n\t\t\t\t\t\t\tG4GConstants.GAME_ID_IS).append(gameId).toString());\r\n\r\n\t\t\trequest.setAttribute(G4GConstants.GAMEDETAILSFORM, gameDetailsForm);\r\n\t\t}catch(NumberFormatException e) {\r\n\t\t\tAuditUtil.getInstance().writeLog(\r\n\t\t\t\t\tAuditUtil.FILE_TYPE_G4G,\r\n\t\t\t\t\tnew StringBuffer(this.getClass().getName()).append(\r\n\t\t\t\t\t\t\tG4GConstants.COLON_WITH_SPACES).append(\r\n\t\t\t\t\t\t\tDataUtil.getCurrentMethod()).append(\r\n\t\t\t\t\t\t\tG4GConstants.COLON_WITH_SPACES).append(G4GConstants.DASHES)\r\n\t\t\t\t\t\t\t.append(request.getSession().getId()).append(\r\n\t\t\t\t\t\t\t\t\t\"No Game with this id\").append(\r\n\t\t\t\t\t\t\t\t\te.getMessage()).toString(),\r\n\t\t\t\t\tLevel.ERROR);\r\n\t\t\treturn mapping.findForward(G4GConstants.GAMELOBBY);\r\n\t\t} catch (NullPointerException exception) {\r\n\t\t\tAuditUtil.getInstance().writeLog(\r\n\t\t\t\t\tAuditUtil.FILE_TYPE_HIBERNATE,\r\n\t\t\t\t\tnew StringBuffer(this.getClass().getName()).append(\r\n\t\t\t\t\t\t\tG4GConstants.COLON_WITH_SPACES).append(\r\n\t\t\t\t\t\t\tDataUtil.getCurrentMethod()).append(\r\n\t\t\t\t\t\t\tG4GConstants.DASHES).append(exception.getMessage())\r\n\t\t\t\t\t\t\t.append(\r\n\t\t\t\t\t\t\t\t\tDataUtil.getUserDTO(request).getPlayerDTO()\r\n\t\t\t\t\t\t\t\t\t\t\t.getScreenname()).append(\r\n\t\t\t\t\t\t\t\t\trequest.getSession().getId()).toString(),\r\n\t\t\t\t\tLevel.ERROR);\r\n\t\t\tAuditUtil.getInstance().writeLog(\r\n\t\t\t\t\tAuditUtil.FILE_TYPE_G4G,\r\n\t\t\t\t\tnew StringBuffer(this.getClass().getName()).append(\r\n\t\t\t\t\t\t\tG4GConstants.COLON_WITH_SPACES).append(\r\n\t\t\t\t\t\t\tDataUtil.getCurrentMethod()).append(\r\n\t\t\t\t\t\t\tG4GConstants.DASHES).append(exception.getMessage())\r\n\t\t\t\t\t\t\t.append(\r\n\t\t\t\t\t\t\t\t\tDataUtil.getUserDTO(request).getPlayerDTO()\r\n\t\t\t\t\t\t\t\t\t\t\t.getScreenname()).append(\r\n\t\t\t\t\t\t\t\t\trequest.getSession().getId()).toString(),\r\n\t\t\t\t\tLevel.ERROR);\r\n\t\t}\r\n\r\n\t\tAuditUtil.getInstance().writeLog(\r\n\t\t\t\tAuditUtil.FILE_TYPE_G4G,\r\n\t\t\t\tnew StringBuffer(this.getClass().getName()).append(\r\n\t\t\t\t\t\tCALLINGMETHOD).append(DataUtil.getCallingMethod())\r\n\t\t\t\t\t\t.append(DASHES).append(G4GConstants.SET_FORM_FIELDS)\r\n\t\t\t\t\t\t.append(request.getSession().getId()).toString(),\r\n\t\t\t\tLevel.INFO);\r\n\t\trequest.setAttribute(G4GConstants.ALLPLAYERSLIST,\r\n\t\t\t\tPlayerServiceDelegator.getGameWisePlayersList(gameId));\r\n\t\trequest.setAttribute(G4GConstants.MATCHLIST, matchList);\r\n\t\trequest.setAttribute(G4GConstants.GAMEDTO, gameDTO);\r\n\t\t/*if (WidgetsServiceDelegator.getActivePlayers(G4GConstants.MAX_RECORDS,\r\n\t\t\t\tG4GConstants.MAX_PLAYED_IN_DAYS).size() > G4GConstants.ZERO) {\r\n\t\t\trequest.setAttribute(G4GConstants.ACTIVEPLAYERS, WidgetsAjaxImpl\r\n\t\t\t\t\t.getActivePlayers(G4GConstants.MAX_RECORDS,\r\n\t\t\t\t\t\t\tG4GConstants.MAX_PLAYED_IN_DAYS, request));\r\n\t\t} else {\r\n\t\t\trequest.setAttribute(G4GConstants.ACTIVEPLAYERS, null);\r\n\t\t}*/\r\n\t\tGameLobbyPageForm gameLobbyForm = new GameLobbyPageForm();\r\n\t\tList<ActivePlayersDTO> activePlayersList = WidgetsServiceDelegator\r\n\t\t.getActivePlayers(G4GConstants.MAX_RECORDS, G4GConstants.MAX_PLAYED_IN_DAYS);\r\n\t\tgameLobbyForm.setActivePlayers(activePlayersList);\r\n\r\n\t\tList<GameDTO> xbox360GamesList = WidgetsServiceDelegator.getMyLobby(\r\n\t\t\t\tplayerId, G4GConstants.NETWORK_XBOX360_LIST_KEY);\r\n\t\tgameLobbyForm.setXbox360Games(xbox360GamesList);\r\n\r\n\t\tList<GameDTO> ps2GamesList = WidgetsServiceDelegator.getMyLobby(\r\n\t\t\t\tplayerId, G4GConstants.NETWORK_PS2_ID_LIST_KEY);\r\n\t\tgameLobbyForm.setPs2Games(ps2GamesList);\r\n\r\n\t\tList<GameDTO> ps3GamesList = WidgetsServiceDelegator.getMyLobby(\r\n\t\t\t\tplayerId, G4GConstants.NETWORK_PS3_ID_LIST_KEY);\r\n\t\tgameLobbyForm.setPs3Games(ps3GamesList);\r\n\r\n\t\trequest.setAttribute(G4GConstants.GAME_LOBBY_PAGE_FORM, gameLobbyForm);\r\n\t\treturn mapping.findForward(G4GConstants.SUCCESS);\r\n\t}",
"private ActionForward displayAction(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows Exception {\n\t\t\r\n\t\tExceptionDisplayDTO expDTO = new ExceptionDisplayDTO(\"displayPage\",\"\");\r\n\t\texpDisplayDetails.set(expDTO);\r\n\t\t\r\n\t\t//condition to not display search results by default\r\n\t\t/*if(isNavigationDone(request)){\r\n\t\t\tgetPaginatedSearchResults(request,bean,null);\r\n\t\t}*/\r\n\t\t\r\n\t\treturn mapping.findForward(\"displayPage\");\t\t\r\n\t}",
"@Override\n\tpublic ActionForward doExecute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tString action = request.getParameter(\"action1\");\n\t\tif (action == null) action = LIST;\n\t\tif (log.isDebugEnabled()) log.debug(\"action:\" + action);\n\t\tActionForward forward = null;\n\t\tUserDefinedQueryForm theForm = (UserDefinedQueryForm) form;\n\t\ttry {\n\t\t\tif (LIST.equalsIgnoreCase(action)) forward = listAdvanceBacth(mapping, theForm, request, response); // 打开复杂查询列表页面\n\t\t\telse if (\"LISTSIMPLE\".equalsIgnoreCase(action)) forward = listSimpleBacth(mapping, theForm, request, response); // 打开简单查询列表页面\n\t\t\telse if (\"SHOWQUERY\".equalsIgnoreCase(action)) forward = queryAdvance(mapping, theForm, request, response);\n\t\t\telse if (\"SHOWSIMPLE\".equalsIgnoreCase(action)) forward = querySimple(mapping, theForm, request, response);\n\t\t\telse if (\"VALID\".equalsIgnoreCase(action)) forward = validate(mapping, theForm, request, response);\n\t\t\telse if (\"PREVIEWSQL\".equalsIgnoreCase(action)) forward = getSQLForPreview(mapping, theForm, request, response);\n\t\t\telse if (\"VALIDSIMPLE\".equalsIgnoreCase(action)) forward = validateSimple(mapping, theForm, request, response);\n\t\t\telse if (\"ADVANCEOVERVIEW\".equalsIgnoreCase(action)) forward = queryAdvanceOverview(mapping, theForm, request, response);\n\t\t\telse if (\"SIMPLEOVERVIEW\".equalsIgnoreCase(action)) forward = querySimpleOverview(mapping, theForm, request, response);\n\t\t\telse if (\"SAVERESULT\".equalsIgnoreCase(action)) forward = saveResult(mapping, theForm, request, response);\n\t\t\telse if (\"SHOWEXPORTEXCEL\".equalsIgnoreCase(action)) forward = showExportExcel(mapping, theForm, request, response);\n\t\t\telse if (\"EXPORTEXCEL\".equalsIgnoreCase(action)) forward = exportExcel(mapping, theForm, request, response);\n\t\t\telse {\n\t\t\t\trequest.setAttribute(\"err\", new WebException(\"找不到该action方法:\" + action));\n\t\t\t\tforward = mapping.findForward(ERROR);// 找不到合适的action\n\t\t\t}\n\n\t\t\t// else if(\"SAVEPARAM\".equalsIgnoreCase(action))\n\t\t\t// forward=saveQueryParam(mapping, theForm, request, response);\n\t\t\t// //保存查询条件到个人空间\n\t\t}\n\t\tcatch (Exception e) {// 其他系统出错\n\t\t\trequest.setAttribute(\"err\", e);\n\t\t\tforward = mapping.findForward(ERROR);\n\t\t}\n\t\treturn forward;\n\t}",
"public ActionForward init(\n\t\t\tActionMapping mapping,\n\t\t\tActionForm form,\n\t\t\tHttpServletRequest request,\n\t\t\tHttpServletResponse response)\n\t\t\tthrows Exception {\n\t\t\t\tResourceBundle bundle = ResourceBundle.getBundle(\"ApplicationResources\");\n\t\t\t\tUserMstr userBean = (UserMstr)request.getSession().getAttribute(\"USER_INFO\");\n\t\t\t\tKmElementMstrFormBean formBean = (KmElementMstrFormBean)form;\n\t\t\t\tlogger.info(userBean.getUserLoginId() + \" entered initElement method\");\n\t\t\t\tformBean.reset(mapping,request);\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\tKmElementMstrService kmElementService = new KmElementMstrServiceImpl();\n\t\t\t\t\tList firstDropDown;\n\t\t\t\t\tif (userBean.getKmActorId().equals(bundle.getString(\"LOBAdmin\"))||userBean.getKmActorId().equals(bundle.getString(\"Superadmin\"))) {\n\t\t\t\t\t\tfirstDropDown = kmElementService.getAllChildren(userBean.getElementId());\n\t\t\t\t\t}else{\n\t\t\t\t\t\tfirstDropDown = kmElementService.getChildren(userBean.getElementId());\n\t\t\t\t\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\tif (firstDropDown!=null && firstDropDown.size()!=0){\n\t\t\t\t\t\tformBean.setInitialLevel(((KmElementMstr)firstDropDown.get(0)).getElementLevel());\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t\n\t\t\t\t\t\tint initialLevel=Integer.parseInt(kmElementService.getElementLevelId(userBean.getElementId()));\n\t\t\t\t\t\tinitialLevel++;\n\t\t\t\t\t\tformBean.setInitialLevel(initialLevel+\"\");\n\t\t\t\t\t}\n\t\t\t\t\tformBean.setParentId(userBean.getElementId());\n\t\t\t\t\tformBean.setCreateMultiple(null);\n\t\t\t\t\tformBean.setElementPath(\"\");\n\t\t\t\t\trequest.setAttribute(\"elementLevelNames\",kmElementService.getAllElementLevelNames());\n\t\t\t\t\trequest.setAttribute(\"allParentIdString\",kmElementService.getAllParentIdString(\"1\",userBean.getElementId()));\n\t\t\t\t\trequest.setAttribute(\"firstList\",firstDropDown);\n\t\t\t\t\t\n\t\t\t\t} catch (LMSException e) {\n\t\t\t\t\tlogger.error(\"KmException in Loading page for Init Create ELement: \"+e.getMessage());\n\t\t\t\t\t\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlogger.error(\"Exception in Loading page for Init Create ELement: \"+e.getMessage());\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\tlogger.info(userBean.getUserLoginId() + \" exited init Create Element method\");\n\t\t\t\treturn mapping.findForward(\"initialize\");\n\t\t\t\t\n\t\t}",
"@Override\r\n\tpublic ActionForward performAction(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows Exception {\n\t\tExceptionDisplayDTO expDTO = new ExceptionDisplayDTO(\"actionSuccess\",\"\");\r\n\t\texpDisplayDetails.set(expDTO);\r\n\t\t\r\n\t\tUserRegistrationService service = new UserRegistrationService();\r\n\t\tNewUserActionForm newUserBean = (NewUserActionForm)form;\r\n\t\tString strActionFwd = \"actionSuccess\";\r\n\t\t\r\n\t\t//Check if User Performed Approve or Reject Action\r\n\t\tString strPerformedAction = getAction(request); \r\n\t\tif( strPerformedAction != null ){\t\t\t\r\n\t\t\tIExtendedPaginatedList cachedPage = getPaginatedListFromSession(request,\r\n\t\t\t\t\tSessionConstants.SCH_RESULTS_NEWUSER_AFFILIATE_LIST);\r\n\t\t\trestoreSearchCriteria(request, newUserBean, cachedPage);\r\n\t\t\tString[] strIds = getCheckedIds(request);\r\n\t\t\t\r\n\t\t\t//check records are selected before performing approve/disableLogin action\r\n\t\t\tif(strIds == null || strIds.length == 0){\r\n\t\t\t\tdispRecordSelection_ErrorMsg(request,strPerformedAction);\r\n\t\t\t\trequest.setAttribute(\"action\",\"display\");\r\n\t\t\t\tnewUserBean.setPgSearchResults(cachedPage);\r\n\t\t\t\treturn mapping.findForward(strActionFwd);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif( strPerformedAction.equalsIgnoreCase(\"approvelogin\") ){\r\n\t\t\t\t//call DAO method to Approve Login action on strIds\r\n\t\t\t\tint approveCount = service.approveUser_Logins(strIds);\r\n\t\t\t\t// Get new updated search results for current page \r\n\t\t\t\tgetPaginatedSearchResults(request,newUserBean,cachedPage);\r\n\t\t\t\t//display message\r\n\t\t\t\tdispMessage(request,\"\",\r\n\t\t\t\t\t\tnew ActionMessage(\"message.user.login\", new String[]{\"\"+approveCount,\"Approved\"} ));\r\n\t\t\t\t\r\n\t\t\t}else if( strPerformedAction.equalsIgnoreCase(\"disablelogin\")){\r\n\t\t\t\t//call DAO method to Disable Login action on strIds\r\n\t\t\t\tint disableCount = service.disableUser_Logins(strIds);\r\n\t\t\t\t// Get new updated search results for current page \r\n\t\t\t\tgetPaginatedSearchResults(request,newUserBean,cachedPage);\r\n\t\t\t\t//display message\r\n\t\t\t\tdispMessage(request,\"\",\r\n\t\t\t\t\t\tnew ActionMessage(\"message.user.login\", new String[]{\"\"+disableCount,\"Dsiabled\"} ));\r\n\t\t\t}else if( strPerformedAction.equalsIgnoreCase(\"DeleteAffiliate\")){\r\n\t\t\t\t//call DAO method to Delete Login action on strIds\r\n\t\t\t\tint disableCount = service.deleteUser_Logins(strIds);\r\n\t\t\t\t// Get new updated search results for current page \r\n\t\t\t\tgetPaginatedSearchResults(request,newUserBean,cachedPage);\r\n\t\t\t\t//display message\r\n\t\t\t\tdispMessage(request,\"\",\r\n\t\t\t\t\t\tnew ActionMessage(\"message.user.login\", new String[]{\"\"+disableCount,\"Deleted\"} ));\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t// Get Paginated partial list \r\n\t\t\tgetPaginatedSearchResults(request,newUserBean,null);\t\t\t\r\n\t\t}\r\n\t\trequest.setAttribute(\"action\",\"display\");\r\n\t\treturn mapping.findForward(strActionFwd);\r\n\t}",
"@Override\r\n \tpublic ActionForward executeSecureAction(ActionMapping mapping, ActionForm form,\r\n \t\t\tHttpServletRequest request, HttpServletResponse response) throws IOException,\r\n \t\t\tServletException\r\n \t{\r\n \t\tsaveActionErrors(form, request);\r\n \t\t// //Gets the value of the operation parameter.\r\n \t\t// String operation = request.getParameter(Constants.OPERATION);\r\n \t\t//\r\n \t\t// //Sets the operation attribute to be used in the Add/Edit Institute\r\n \t\t// Page.\r\n \t\t// request.setAttribute(Constants.OPERATION, operation);\r\n \t\ttry\r\n \t\t{\r\n \t\t\tfinal IFactory factory = AbstractFactoryConfig.getInstance().getBizLogicFactory();\r\n \t\t\tfinal IBizLogic bizLogic = factory.getBizLogic(Constants.DEFAULT_BIZ_LOGIC);\r\n \r\n \t\t\t// ************* ForwardTo implementation *************\r\n \t\t\t// forwarded from Specimen page\r\n \t\t\tfinal HashMap forwardToHashMap = (HashMap) request.getAttribute(\"forwardToHashMap\");\r\n \t\t\tString specimenId = null;\r\n \t\t\tString specimenLabel = null;\r\n \t\t\tString specimenClass = null;\r\n \t\t\t// -------------Mandar 04-July-06 QuickEvents start\r\n \t\t\tString fromQuickEvent = (String) request.getAttribute(\"isQuickEvent\");\r\n \t\t\tif (fromQuickEvent == null)\r\n \t\t\t{\r\n \t\t\t\tfromQuickEvent = request.getParameter(\"isQuickEvent\");\r\n \t\t\t}\r\n \t\t\tString eventSelected = \"\";\r\n \t\t\tif (fromQuickEvent != null)\r\n \t\t\t{\r\n \t\t\t\tspecimenId = (String) request.getAttribute(Constants.SPECIMEN_ID);\r\n \t\t\t\teventSelected = (String) request.getAttribute(Constants.EVENT_SELECTED);\r\n \t\t\t\tif (eventSelected == null && forwardToHashMap != null)\r\n \t\t\t\t{\r\n \t\t\t\t\tspecimenClass = (String) forwardToHashMap.get(\"specimenClass\");\r\n \t\t\t\t\tspecimenId = (String) forwardToHashMap.get(\"specimenId\");\r\n \t\t\t\t\tif (specimenClass.equalsIgnoreCase(\"Tissue\"))\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\teventSelected = Constants.EVENT_PARAMETERS[14];\r\n \t\t\t\t\t}\r\n \t\t\t\t\telse if (specimenClass.equalsIgnoreCase(\"Molecular\"))\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\teventSelected = Constants.EVENT_PARAMETERS[9];\r\n \t\t\t\t\t}\r\n \t\t\t\t\telse if (specimenClass.equalsIgnoreCase(\"Cell\"))\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\teventSelected = Constants.EVENT_PARAMETERS[1];\r\n \t\t\t\t\t}\r\n \t\t\t\t\telse if (specimenClass.equalsIgnoreCase(\"Fluid\"))\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\teventSelected = Constants.EVENT_PARAMETERS[7];\r\n \t\t\t\t\t}\r\n \r\n \t\t\t\t}\r\n \t\t\t\trequest.setAttribute(Constants.EVENT_SELECTED, eventSelected);\r\n \t\t\t\t// System.out.println(\"::::::::::::::\\n\\n\\n\\n\"+form.getClass().\r\n \t\t\t\t// getName() );\r\n \t\t\t\tListSpecimenEventParametersForm eventForm = (ListSpecimenEventParametersForm) form;\r\n \t\t\t\tif (eventForm == null)\r\n \t\t\t\t{\r\n \t\t\t\t\teventForm = new ListSpecimenEventParametersForm();\r\n \t\t\t\t}\r\n \t\t\t\teventForm.setSpecimenEventParameter(eventSelected);\r\n \t\t\t\teventForm.setSpecimenId(specimenId.trim());\r\n \r\n \t\t\t}\r\n \t\t\t// -------------Mandar 04-July-06 QuickEvents end\r\n \t\t\tif (forwardToHashMap != null)\r\n \t\t\t{\r\n \t\t\t\t// Fetching SpecimenId from HashMap generated by\r\n \t\t\t\t// ForwardToProcessor\r\n \t\t\t\tspecimenId = (String) forwardToHashMap.get(\"specimenId\");\r\n \t\t\t\tspecimenLabel = (String) forwardToHashMap.get(Constants.SPECIMEN_LABEL);\r\n \t\t\t\tLogger.out.debug(\"SpecimenID found in \" + \"forwardToHashMap========>>>>>>\"\r\n \t\t\t\t\t\t+ specimenId);\r\n \t\t\t}\r\n \t\t\t// ************* ForwardTo implementation *************\r\n \r\n \t\t\t// If new SpecimenEvent is added, specimenId in forwardToHashMap\r\n \t\t\t// will be null, following code handles that case\r\n \t\t\tif (specimenId == null)\r\n \t\t\t{\r\n \t\t\t\tfinal String eventId = request.getParameter(\"eventId\");\r\n \r\n \t\t\t\t// Added by Vijay Pande. While cliking on events tab both\r\n \t\t\t\t// specimenId and eventId are getting null. Since there was no\r\n \t\t\t\t// check on eventId it was throwing error for following retrieve\r\n \t\t\t\t// call.\r\n \t\t\t\t// Null check is added for eventId. Fix for bug Id: 4731\r\n \t\t\t\tif (eventId != null)\r\n \t\t\t\t{\r\n \t\t\t\t\tLogger.out.debug(\"Event ID added===>\" + eventId);\r\n \t\t\t\t\t// Retrieving list of SpecimenEvents for added\r\n \t\t\t\t\t// SpecimenEventId\r\n \t\t\t\t\tfinal Object object = bizLogic.retrieve(\r\n \t\t\t\t\t\t\tSpecimenEventParameters.class.getName(), new Long(eventId));\r\n \r\n \t\t\t\t\tif (object != null)\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\t// Getting object of specimenEventParameters from the\r\n \t\t\t\t\t\t// list of SepcimenEvents\r\n \t\t\t\t\t\tfinal SpecimenEventParameters specimenEventParameters = (SpecimenEventParameters) object;\r\n \r\n \t\t\t\t\t\t// getting SpecimenId of SpecimenEventParameters\r\n \t\t\t\t\t\tfinal AbstractSpecimen specimen = specimenEventParameters.getSpecimen();\r\n \t\t\t\t\t\tspecimenId = specimen.getId().toString();\r\n \t\t\t\t\t\t// specimenLabel = specimen.getLabel();\r\n \t\t\t\t\t\tLogger.out.debug(\"Specimen of Event Added====>\"\r\n \t\t\t\t\t\t\t\t+ (specimenEventParameters.getSpecimen()).getId());\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t}\r\n \r\n \t\t\tif (specimenId == null)\r\n \t\t\t{\r\n \t\t\t\tspecimenId = request.getParameter(Constants.SPECIMEN_ID);\r\n \t\t\t\tspecimenLabel = request.getParameter(Constants.SPECIMEN_LABEL);\r\n \t\t\t}\r\n \t\t\tif (specimenId == null)\r\n \t\t\t{\r\n \t\t\t\tspecimenId = (String) request.getAttribute(Constants.SPECIMEN_ID);\r\n \t\t\t}\r\n \r\n \t\t\trequest.setAttribute(Constants.SPECIMEN_ID, specimenId);\r\n \r\n \t\t\tfinal Object object = bizLogic.retrieve(Specimen.class.getName(), new Long(specimenId));\r\n \r\n \t\t\tif (object != null)\r\n \t\t\t{\r\n \t\t\t\tfinal Specimen specimen = (Specimen) object;\r\n \t\t\t\tif (specimenLabel == null)\r\n \t\t\t\t{\r\n \t\t\t\t\tspecimenLabel = specimen.getLabel();\r\n \t\t\t\t}\r\n \t\t\t\t// Setting Specimen Event Parameters' Grid\r\n \r\n \t\t\t\t// Ashish - 4/6/07 --- Since lazy=true, retriving the events\r\n \t\t\t\t// collection.\r\n \t\t\t\tfinal Collection<SpecimenEventParameters> specimenEventCollection = this\r\n \t\t\t\t\t\t.getSpecimenEventParametersColl(specimenId, bizLogic);\r\n \t\t\t\tfinal Collection<ActionApplication> dynamicEventCollection = this\r\n \t\t\t\t\t\t.getDynamicEventColl(specimenId, bizLogic);\r\n \t\t\t\t/**\r\n \t\t\t\t * Name: Chetan Patil Reviewer: Sachin Lale Bug ID: Bug#4180\r\n \t\t\t\t * Patch ID: Bug#4180_1 Description: The values of event\r\n \t\t\t\t * parameter is stored in a Map and in turn the Map is stored in\r\n \t\t\t\t * a List. This is then sorted chronologically, using a date\r\n \t\t\t\t * value form the Map. After sorting the List of Map is\r\n \t\t\t\t * converted into the List of List, which is used on the UI for\r\n \t\t\t\t * displaying values form List on the grid.\r\n \t\t\t\t */\r\n \t\t\t\tif (dynamicEventCollection != null)\r\n \t\t\t\t{\r\n \t\t\t\t\tfinal List<Map<String, Object>> gridData = new ArrayList<Map<String, Object>>();\r\n \r\n \t\t\t\t\tfor (final ActionApplication actionApp : dynamicEventCollection)\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\tfinal Map<String, Object> rowDataMap = new HashMap<String, Object>();\r\n \t\t\t\t\t\tif (actionApp != null)\r\n \t\t\t\t\t\t{\r\n \t\t\t\t\t\t\t//final String[] events = EventsUtil\r\n \t\t\t\t\t\t\t//\t\t.getEvent(eventParameters);\r\n \t\t\t\t\t\t\tlong contId = actionApp.getApplicationRecordEntry().getFormContext()\r\n \t\t\t\t\t\t\t\t\t.getContainerId();\r\n \t\t\t\t\t\t\tList contList = AppUtility\r\n \t\t\t\t\t\t\t\t\t.executeSQLQuery(\"select caption from dyextn_container where identifier=\"\r\n \t\t\t\t\t\t\t\t\t\t\t+ contId);\r\n \t\t\t\t\t\t\tString container = (String) ((List) contList.get(0)).get(0);\r\n \t\t\t\t\t\t\t//final Object container =bizLogic.retrieve(Container.class.getName(),new Long(contId));\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.ID, String.valueOf(actionApp.getId()));\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.EVENT_NAME,\r\n \t\t\t\t\t\t\t\t\tedu.wustl.cab2b.common.util.Utility\r\n \t\t\t\t\t\t\t\t\t\t\t.getFormattedString(container));\r\n \r\n \t\t\t\t\t\t\t// Ashish - 4/6/07 - retrieving User\r\n \t\t\t\t\t\t\t// User user = eventParameters.getUser();\r\n \t\t\t\t\t\t\tfinal User user = this.getUser(actionApp.getId(), bizLogic);\r\n \r\n \t\t\t\t\t\t\trowDataMap.put(Constants.USER_NAME, user.getLastName() + \", \"\r\n \t\t\t\t\t\t\t\t\t+ user.getFirstName());\r\n \r\n \t\t\t\t\t\t\t// rowDataMap.put(Constants.EVENT_DATE,\r\n \t\t\t\t\t\t\t// Utility.parseDateToString\r\n \t\t\t\t\t\t\t// (eventParameters.getTimestamp(),\r\n \t\t\t\t\t\t\t// Constants.TIMESTAMP_PATTERN)); // Sri: Changed\r\n \t\t\t\t\t\t\t// format for bug #463\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.EVENT_DATE, actionApp.getTimestamp());\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.PAGE_OF, \"pageOfDynamicEvent\");// pageOf\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.SPECIMEN_ID, request\r\n \t\t\t\t\t\t\t\t\t.getAttribute(Constants.SPECIMEN_ID));// pageOf\r\n \t\t\t\t\t\t\tgridData.add(rowDataMap);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \r\n \t\t\t\t\tfinal List<List<String>> gridDataList = this.getSortedGridDataList(gridData);\r\n \t\t\t\t\tfinal String[] columnList1 = Constants.EVENT_PARAMETERS_COLUMNS;\r\n \t\t\t\t\tfinal List<String> columnList = new ArrayList<String>();\r\n \t\t\t\t\tfor (final String element : columnList1)\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\tcolumnList.add(element);\r\n \t\t\t\t\t}\r\n \t\t\t\t\tAppUtility.setGridData(gridDataList, columnList, request);\r\n \t\t\t\t\trequest.setAttribute(\r\n \t\t\t\t\t\t\tedu.wustl.simplequery.global.Constants.SPREADSHEET_DATA_LIST,\r\n \t\t\t\t\t\t\tgridDataList);\r\n \t\t\t\t\tfinal Integer identifierFieldIndex = new Integer(0);\r\n \t\t\t\t\trequest.setAttribute(\"identifierFieldIndex\", identifierFieldIndex.intValue());\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tif (request.getAttribute(Constants.SPECIMEN_LABEL) == null)\r\n \t\t\t{\r\n \t\t\t\trequest.setAttribute(Constants.SPECIMEN_LABEL, specimenLabel);\r\n \t\t\t}\r\n \t\t\trequest.setAttribute(Constants.EVENT_PARAMETERS_LIST, new SOPBizLogic()\r\n \t\t\t\t\t.getAllSOPEventFormNames(dynamicEventMap));\r\n \t\t\trequest.getSession().setAttribute(\"dynamicEventMap\", dynamicEventMap);\r\n \r\n \t\t}\r\n \t\tcatch (final Exception e)\r\n \t\t{\r\n \t\t\tthis.logger.error(e.getMessage(), e);\r\n \t\t}\r\n \t\trequest.setAttribute(Constants.MENU_SELECTED, new String(\"15\"));\r\n \t\tString pageOf = (String) request.getParameter(Constants.PAGE_OF);\r\n \t\tif (pageOf == null)\r\n \t\t\tpageOf = (String) request.getAttribute(Constants.PAGE_OF);\r\n \t\trequest.setAttribute(Constants.PAGE_OF, pageOf);\r\n \r\n \t\tif (pageOf.equals(Constants.PAGE_OF_LIST_SPECIMEN_EVENT_PARAMETERS_CP_QUERY))\r\n \t\t{\r\n \t\t\trequest.getSession().setAttribute(\"CPQuery\", \"CPQuery\");\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\tif (request.getSession().getAttribute(\"CPQuery\") != null)\r\n \t\t\t{\r\n \t\t\t\trequest.getSession().removeAttribute(\"CPQuery\");\r\n \t\t\t}\r\n \t\t}\r\n \t\tLong specimenRecEntryEntityId = null;\r\n \t\ttry\r\n \t\t{\r\n \t\t\tif (CatissueCoreCacheManager.getInstance().getObjectFromCache(\r\n \t\t\t\t\tAnnotationConstants.SPECIMEN_REC_ENTRY_ENTITY_ID) != null)\r\n \t\t\t{\r\n \t\t\t\tspecimenRecEntryEntityId = (Long) CatissueCoreCacheManager.getInstance()\r\n \t\t\t\t\t\t.getObjectFromCache(AnnotationConstants.SPECIMEN_REC_ENTRY_ENTITY_ID);\r\n \t\t\t}\r\n \t\t\telse\r\n \t\t\t{\r\n \t\t\t\tspecimenRecEntryEntityId = AnnotationUtil\r\n \t\t\t\t\t\t.getEntityId(AnnotationConstants.ENTITY_NAME_SPECIMEN_REC_ENTRY);\r\n \t\t\t\tCatissueCoreCacheManager.getInstance().addObjectToCache(\r\n \t\t\t\t\t\tAnnotationConstants.SPECIMEN_REC_ENTRY_ENTITY_ID, specimenRecEntryEntityId);\r\n \t\t\t}\r\n \r\n \t\t}\r\n \t\tcatch (final Exception e)\r\n \t\t{\r\n \t\t\tthis.logger.error(e.getMessage(), e);\r\n \t\t}\r\n \t\t// request.setAttribute(\"specimenEntityId\", specimenEntityId);\r\n \t\trequest.setAttribute(AnnotationConstants.SPECIMEN_REC_ENTRY_ENTITY_ID,\r\n \t\t\t\tspecimenRecEntryEntityId);\r\n \t\treturn mapping.findForward(request.getParameter(Constants.PAGE_OF));\r\n \t}",
"public boolean isSetAction() {\n return this.action != null;\n }",
"@Override\r\n\tprotected String doExecute(ActionForm form, HttpServletRequest request,\r\n\t\t\tHttpServletResponse response, ActionMapping mapping)\r\n\t\t\tthrows Exception {\n\t\treturn null;\r\n\t}",
"public int doStartTag() throws JspException \n\t{\n\t\twrite(MessageFormat.format(FORM_START, new Object[] { getActionAddress() }));\n\t\twrite(MessageFormat.format(HIDDEN, new Object[] { ACTION_ID_PARAMETER, getActionID() }));\n\t\twrite(MessageFormat.format(HIDDEN, new Object[] { FINISHED_ADDRESS_PARAMETER, getFinalReturnAddress() }));\n\t\twrite(MessageFormat.format(HIDDEN, new Object[] { WORKFLOW_ID_PARAMETER, getWorkflowID() }));\n\t\treturn EVAL_BODY_INCLUDE;\n\t}",
"public ActionForward execute(ActionMapping mapping, ActionForm form,HttpServletRequest request, HttpServletResponse response) {\r\n\t\tCommunitycreationForm communitycreationForm = (CommunitycreationForm) form;// TODO Auto-generated method stub\r\n\t\t\r\n\t\tEntpMaster entpMaster = new EntpMaster();\r\n\t\tRootMaster rootMaster = new RootMaster();\r\n\t\tString strStatus=\"failure\";\r\n\t\t//System.out.println(\" in action Communitycreation>>>>>!!\");\r\n\t\t\r\n\t\tDataSource ds = getDataSource(request,\"entp\");\r\n\t\t\r\n\t\tString strResult = \"\";\r\n\t\t\r\n\t\t strResult=entpMaster.companyVerify(ds,communitycreationForm.getCommunityName());\r\n\t\t //System.out.println(\"strResult in action Communitycreation>>>>>!!\"+strResult);\r\n\t\t \r\n\t\tif(!strResult.equals(\"success\"))\r\n\t\t{\r\n\t\t\tif(strResult.equals(\"sname\"))\r\n\t\t\t{\r\n\t\t\t\tActionErrors errors = new ActionErrors();\r\n\t\t\t\terrors.add(\"duplicate\", new ActionError(\"errors.company.duplicate\"));\r\n\t\t\t\t\r\n\t\t\t\tif(!errors.isEmpty())\r\n\t\t\t\t{\r\n\t\t\t\t\tsaveErrors(request, errors);\r\n\t\t\t\t}\r\n\t\t\t\tstrStatus=\"failure\";\r\n\t\t\t\treturn mapping.findForward(\"failure\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\tstrStatus=\"success\";\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//System.out.println(\"strStatus in action Communitycreation>>>>>\"+strStatus);\r\n\t\t\r\n\t\tif(strStatus.equalsIgnoreCase(\"success\")){\r\n\t\t\t\r\n\t\t\r\n\t\tVector <String> companyVec = new Vector<String>();\r\n\t\tVector <String> userVec = new Vector<String>();\r\n\t\t\r\n\t\tString creationDate =\"\";\r\n\t\tString creationTime =\"\";\r\n\t\tjava.util.Date dt = new java.util.Date();\r\n\t\tSimpleDateFormat sform = new SimpleDateFormat(\"yyyy-MM-dd, HH:mm:ss,a\");\r\n\t\tString completeRemDate = sform.format(dt);\r\n\t\tStringTokenizer sttotal = new StringTokenizer(completeRemDate, \",\");\r\n\t creationDate = sttotal.nextToken();\r\n\t creationTime = sttotal.nextToken();\r\n\t \r\n\t\t\r\n\t\tcompanyVec.add(communitycreationForm.getCommunityName()); //Company short name\r\n\t\tcompanyVec.add(communitycreationForm.getCommunityName());\t//Company name\r\n\t\tcompanyVec.add(\"Logix Park\");\r\n\t\tcompanyVec.add(\"Logix Park\");\r\n\t\tcompanyVec.add(\"5115\");\r\n\t\tcompanyVec.add(\"94\");\r\n\t\tcompanyVec.add(\"94\");\r\n\t\tcompanyVec.add(\"201301\");\r\n\t\tcompanyVec.add(communitycreationForm.getCommunityName()+\"@mobilemantra.com\");\r\n\t\tcompanyVec.add(\"+91~0568~258047\");\r\n\t\tcompanyVec.add(\"0\");\r\n\t\tcompanyVec.add(\"10\");\r\n\t\tcompanyVec.add(\"0\");\r\n\t\tcompanyVec.add(\"1\");\r\n\t\tcompanyVec.add(\"0000-00-00\");\r\n\t\tcompanyVec.add(\"0\");\r\n\t\tcompanyVec.add(\"1\");\r\n\t\tcompanyVec.add(\"Consumer\");\r\n\t\tcompanyVec.add(\"NotRequired\");\r\n\t\tcompanyVec.add(\"2\");\r\n\t\tcompanyVec.add(communitycreationForm.getRdbgroup()); // RIGHTS ID\r\n\t\tcompanyVec.add(creationDate);\r\n\t\tcompanyVec.add(creationTime);\r\n\t\tcompanyVec.add(\"0\");\r\n\t\tcompanyVec.add(\"1\");\r\n\t\t//System.out.println(\"communitycreationForm.getRdbgroup() in action Communitycreation>>>^^^^^^^>>\"+communitycreationForm.getRdbgroup());\r\n\t\tstrResult=rootMaster.insertCompanyDetail(ds,companyVec);\r\n\t\t\r\n\t\t/*\r\n\t\tVector companyDetailVec=rootMaster.getCompanyDetail(ds,communitycreationForm.getCommunityName());\r\n\t\t\r\n\t\t\tif(strResult.equalsIgnoreCase(\"success\"))\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tuserVec.add(companyDetailVec.elementAt(0).toString());\r\n\t\t\t\tuserVec.add(\"1\");\r\n\t\t\t\tuserVec.add(communitycreationForm.getCommunityName());\r\n\t\t\t\tuserVec.add(communitycreationForm.getCommunityName());\r\n\t\t\t\tuserVec.add(communitycreationForm.getCommunityName());\r\n\t\t\t\tuserVec.add(communitycreationForm.getCommunityName());\r\n\t\t\t\tuserVec.add(communitycreationForm.getCommunityName()+\"@mobilemantra.com\");\r\n\t\t\t\tuserVec.add(\"+911202517690\");\r\n\t\t\t\tuserVec.add(\"+911202517690\");\r\n\t\t\t\tuserVec.add(\"Logix Park\");\r\n\t\t\t\tuserVec.add(\"India\");\r\n\t\t\t\tuserVec.add(\"UP\");\r\n\t\t\t\tuserVec.add(\"NOIDA\");\r\n\t\t\t\tuserVec.add(\"201301\");\r\n\t\t\t\tuserVec.add(\"nophoto.jpg\");\r\n\t\t\t\tuserVec.add(\"IN\");\r\n\t\t\t\tuserVec.add(creationDate);\r\n\t\t\t\tuserVec.add(creationTime);\r\n\t\t\t\tuserVec.add(\"0000-00-00\");\r\n\t\t\t\tuserVec.add(\"00:00:00\");\r\n\t\t\t\tuserVec.add(\"0\");\r\n\t\t\t\tuserVec.add(\"20\");\r\n\t\t\t\tuserVec.add(\"0\");\r\n\t\t\t\tuserVec.add(\"0\");\r\n\t\t\t\tuserVec.add(\"0\");\r\n\t\t\t\tuserVec.add(\"0\");\r\n\t\t\t\tuserVec.add(\"0\");\r\n\t\t\t\tuserVec.add(\"0\");\r\n\t\t\t\tuserVec.add(\"0\");\r\n\t\t\t\tuserVec.add(\"0\");\r\n\t\t\t\tuserVec.add(\"0\");\r\n\t\t\t\tuserVec.add(\"0\");\r\n\t\t\t\tuserVec.add(\"Male\");\r\n\t\t\t\t//System.out.println(\"userVec in action Communitycreation>>>>>\"+userVec);\r\n\t\t\t\tstrResult=rootMaster.insertUserInfo(ds,userVec);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t*/\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn mapping.findForward(strResult);\r\n\t}",
"public ActionForward execute(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response) throws Exception {\n // TODO Auto-generated method stub\n String forwardName = \"\";\n HttpSession session = ((HttpServletRequest) request).getSession(false);\n EditSearchCityForm searchform = (EditSearchCityForm) form;\n String buttonValue = searchform.getButtonValue();\n UnLocationDAO unLocationDAO = new UnLocationDAO();\n\n CitySelectionBean cbs = new CitySelectionBean();\n if (request.getParameter(\"index\") != null) {\n int ind = Integer.parseInt(request.getParameter(\"index\"));\n List cityList = (List) session.getAttribute(\"cityDetails\");\n CitySelectionBean citySelBean = (CitySelectionBean) cityList.get(ind);\n UnLocation unLoc = citySelBean.getUnloaction();\n RefTerminal terminal = null;\n if (session.getAttribute(\"terminal\") == null) {\n terminal = new RefTerminal();\n } else {\n terminal = (RefTerminal) session.getAttribute(\"terminal\");\n }\n terminal.setCountry(unLoc.getCountryId());\n terminal.setState(unLoc.getStateId().getCodedesc());\n\n terminal.setUnLocation(unLoc);\n request.setAttribute(\"buttonValue\", \"completed\");\n session.removeAttribute(\"cityDetails\");\n }\n if (buttonValue != null && buttonValue.equals(\"search\")) {\n\n List city = unLocationDAO.findbyCity(request.getParameter(\"city\"));\n List cityDetails = cbs.getCityDetails(city);\n session.setAttribute(\"cityDetails\", cityDetails);\n\n }\n return mapping.findForward(\"EditSearchpopup\");\n }",
"public ActionForward populateTherapeuticApproaches(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response) throws Exception {\n setCancerModel(request);\n //\n // query caBIO and load clinical protocols information\n // store clinicalProtocol info in a hashmap keyed by NSC#\n //\n final HashMap clinProtocols = new HashMap();\n final HashMap yeastResults = new HashMap();\n final HashMap invivoResults = new HashMap();\n final List therapeuticApprochesColl = new ArrayList();\n \n String modelID = request.getParameter(Constants.Parameters.MODELID);\n AnimalModelManager animalModelManager = (AnimalModelManager) getBean(\"animalModelManager\");\n AnimalModel am = animalModelManager.get(modelID);\n final List therapyColl = am.getTherapyCollection();\n final int cc = (therapyColl != null) ? therapyColl.size() : 0;\n log.info(\"Looking up clinical protocols for \" + cc + \" agents...\");\n \n for (int i = 0; i < cc; i++) {\n Therapy t = (Therapy) therapyColl.get(i);\n final boolean isTherapy = (t.getTherapeuticExperiment() != null) ? t.getTherapeuticExperiment()\n .booleanValue() : false;\n if (isTherapy) {\n therapeuticApprochesColl.add(t);\n }\n Agent a = t.getAgent();\n AgentManager myAgentManager = (AgentManager) getBean(\"agentManager\");\n if (a != null) {\n Long nscNumber = a.getNscNumber();\n if (nscNumber != null) {\n Collection protocols = myAgentManager.getClinicalProtocols(a);\n clinProtocols.put(nscNumber, protocols);\n // get the yeast data\n List yeastStages = myAgentManager.getYeastResults(a);\n yeastResults.put(nscNumber, yeastStages);\n // now get invivo/Xenograft data\n List xenograftResults = QueryManagerSingleton.instance().getInvivoResults(a);\n invivoResults.put(nscNumber, xenograftResults);\n }\n }\n }\n request.getSession().setAttribute(Constants.THERAPEUTIC_APPROACHES_COLL, therapeuticApprochesColl);\n request.getSession().setAttribute(Constants.CLINICAL_PROTOCOLS, clinProtocols);\n request.getSession().setAttribute(Constants.YEAST_DATA, yeastResults);\n request.getSession().setAttribute(Constants.INVIVO_DATA, invivoResults);\n \n setComments(request, Constants.Pages.THERAPEUTIC_APPROACHES);\n \n return mapping.findForward(\"viewTherapeuticApproaches\");\n }",
"protected ActionForward customProcess(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response, String name) throws Throwable {\r\n \treturn performAction(actionMapping, actionForm, request, response);\r\n }",
"public ActionForward execute(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response) throws Exception {\n //forward name\n final String EDIT_USER_PAGE = \"edituser\";\n final String SEARCH_USER_PAGE = \"searchuser\";\n //button action\n final String MORE_INFO = \"moreinfo\";\n final String SEARCH = \"search\";\n final String BUTTON_VALUE = \"buttonValue\";\n //request parameter\n final String USER_LIST = \"userList\";\n final String USER = \"user\";\n final String USER_BEAN = \"suBean\";\n final String MATCH_ONLY = \"match\";\n final String STARTS_WITH = \"starts\";\n final String VIEW = \"view\";\n final String VIEW_MODE_READONLY = \"3\";\n final String VIEW_MODE_EDIT = \"1\";\n final String DATE_FORMAT = \"MM/dd/yyyy\";\n UserManagementForm userManagementForm = (UserManagementForm) form;// TODO Auto-generated method stub\\\n String loginName = userManagementForm.getLoginName();\n HttpSession session = request.getSession();\n String userCreatedDate = userManagementForm.getTxtCal();\n String firstName = userManagementForm.getFirstName();\n String lastName = userManagementForm.getLastName();\n String roleName = userManagementForm.getRoleName();\n String status = userManagementForm.getUserStatus();\n String limit = CommonUtils.isNotEmpty(userManagementForm.getLimit()) ? userManagementForm.getLimit() : \"100\";\n String match = userManagementForm.getMatch();\n String buttonValue = userManagementForm.getButtonValue();\n String forwardName = SEARCH_USER_PAGE;\n UserDAO userDAO = new UserDAO();\n User user = null;\n SearchUserBean suBean = new SearchUserBean();\n suBean.setLoginName(loginName);\n suBean.setTxtCal(userCreatedDate);\n suBean.setFirstName(firstName);\n suBean.setLastName(lastName);\n suBean.setRoleName(roleName);\n suBean.setUserStatus(status);\n suBean.setLimit(limit);\n suBean.setSortBy(userManagementForm.getSortBy());\n suBean.setColumnName(userManagementForm.getColumnName());\n\n suBean.setMatch(!CommonUtils.isEmpty(match) ? match : STARTS_WITH);\n session.setAttribute(\"suBean\", suBean);\n// if (SEARCH.equals(buttonValue)) {\n// Date date = null;\n// if (CommonUtils.isNotEmpty(userCreatedDate)) {\n// date = DateUtils.parseDate(userCreatedDate, DATE_FORMAT);\n// }\n// if (match.equals(MATCH_ONLY)) {\n// List userList = userDAO.findForManagement(loginName, date, firstName, lastName, roleName);\n// session.setAttribute(USER_LIST, userList);\n// } else if (match.equals(STARTS_WITH)) {\n// List userList = userDAO.findForManagementaction(loginName, date, firstName, lastName, roleName);\n// session.setAttribute(USER_LIST, userList);\n// }\n// forwardName = SEARCH_USER_PAGE;\n// } else\n\n if (CommonConstants.EDIT_ACTION.equals(buttonValue)) {\n forwardName = EDIT_USER_PAGE;\n user = userDAO.findById(userManagementForm.getParam());\n session.setAttribute(USER, user);\n request.setAttribute(\"agentInformation\", new UserDAO().findByUserAgentProperty(\"userId.userId\", user.getUserId()));\n request.setAttribute(\"match\", match);\n session.setAttribute(VIEW, VIEW_MODE_EDIT);\n } else if (MORE_INFO.equals(buttonValue)) {\n user = userDAO.findById(userManagementForm.getParam());\n request.setAttribute(VIEW, VIEW_MODE_READONLY);\n session.setAttribute(USER, user);\n forwardName = EDIT_USER_PAGE;\n } else {\n DBUtil dbUtil = new DBUtil();\n request.setAttribute(\"userList\", new UserDAO().getUserList(suBean));\n request.setAttribute(\"statuslist\", dbUtil.getStatusList());\n request.setAttribute(\"rolelist\", dbUtil.getRoleList());\n forwardName = SEARCH_USER_PAGE;\n //session.setAttribute(USER_LIST,userDAO.findAllUsers());\n }\n request.setAttribute(BUTTON_VALUE, buttonValue);\n request.setAttribute(\"palletList\", userDAO.getPalletList());\n request.setAttribute(\"packageList\", userDAO.getPackageList());\n return mapping.findForward(forwardName);\n }",
"ActionMap getActionMap() {\n return createActionMap(); }",
"@Override\r\n\tpublic ActionForward execute(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows Exception {\n\t\t\r\n\t\tPrognosisFormBean formBean = (PrognosisFormBean) form;\r\n String forwardAction = ActionConstant.NONE;\r\n\t\tString command = request.getParameter(\"command\");\r\n\r\n\t\t//session expired checking\r\n\t\tif (request.getSession().getAttribute(MiscConstant.USER_SESSION) == null) {\r\n\t\t\tforwardAction = ActionConstant.SHOW_AJAX_EXPIRED;\r\n\t\t} else {\r\n\t\t\tif (command!=null) {\r\n\t\t\t\t\r\n\t\t\t\tint module = ModuleConstant.PROGNOSIS;\r\n\t\t\t\t\r\n\t\t\t\tif (command.equalsIgnoreCase(ParamConstant.AJAX_GO_TO_CHILD)) {\t\t\r\n\t\t\t\t\t//fetch the data\r\n\t\t\t\t\t\r\n\t\t\t\t\tint patientSystemCaseId = Integer.parseInt(request.getParameter(\"patientSystemCaseId\"));\r\n\t\t\t\t\t\r\n\t\t\t\t\tPrognosis model = new Prognosis();\r\n\t\t\t\t\tmodel.setPatientCaseSystemId(patientSystemCaseId);\r\n\t\t\t\t\t\r\n\t\t\t\t\tHashMap<String,Object> dataMap = new HashMap<String, Object>();\r\n\t\t\t dataMap.put(MapConstant.MODULE, module);\r\n\t\t\t dataMap.put(MapConstant.CLASS_DATA, model);\r\n\t\t\t dataMap.put(MapConstant.ACTION, ActionConstant.GET_DATA);\r\n\t\t\t \r\n\t\t\t ServiceManager service = new ServiceManagerImpl();\r\n\t\t\t Map<String, Object> resultMap = service.executeRequest(dataMap);\r\n\t\t\t\t\t\r\n\t\t\t if (resultMap!=null && !resultMap.isEmpty()) {\r\n\t\t\t\t model = (Prognosis) resultMap.get(MapConstant.CLASS_DATA);\t\t \t\t\r\n\t\t\t \tformBean.populateFormBean(model);\r\n\t\t\t } else {\r\n\t\t\t \tformBean.setPatientCaseSystemId(model.getPatientCaseSystemId());\r\n\t\t\t }\r\n\r\n\t\t\t\t\tformBean.setTransactionStatus(false);\r\n\t\t\t\t\tformBean.setTransactionMessage(MiscConstant.TRANS_MESSSAGE_RESET);\r\n\t\t\t\t\tforwardAction = ActionConstant.SHOW_AJAX_ADD;\t\r\n\t\t\t\t} else if (command.equalsIgnoreCase(ParamConstant.AJAX_SAVE)) {\r\n\t\t\t\t\t//populateModel\r\n\t\t\t\t\tPrognosis model = (Prognosis) formBean.populateModel(formBean);\r\n\t\t\t\t\t\r\n\t\t\t\t\tUser user = (User) request.getSession().getAttribute(MiscConstant.USER_SESSION);\r\n\t\t\t\t\t\r\n\t\t\t\t\tHashMap<String,Object> dataMap = new HashMap<String, Object>();\r\n\t\t\t dataMap.put(MapConstant.MODULE, module);\r\n\t\t\t dataMap.put(MapConstant.CLASS_DATA, model);\r\n\t\t\t dataMap.put(MapConstant.USER_SESSION_DATA, user);\r\n\t\t\t \r\n\t\t\t \r\n\t\t\t if (model.getId()==0) {//diagnosisid in form\r\n\t\t\t \tdataMap.put(MapConstant.ACTION, ActionConstant.SAVE);\r\n\t\t\t } else {\r\n\t\t\t \tdataMap.put(MapConstant.ACTION, ActionConstant.UPDATE);\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t \r\n\t\t\t ServiceManager service = new ServiceManagerImpl();\r\n\t\t\t Map<String, Object> resultMap = service.executeRequest(dataMap);\r\n\t\t\t \r\n\t\t\t if (resultMap!=null && !resultMap.isEmpty()) {\r\n\t\t\t \t//check resultmap action status\r\n\t\t\t \tboolean transactionStatus = (boolean) resultMap.get(MapConstant.TRANSACTION_STATUS);\r\n\r\n\t\t\t \tformBean.setTransactionStatus(transactionStatus);\r\n\t\t\t \t\r\n\t\t\t \t\t\t\r\n\t\t\t \tif (transactionStatus) {\r\n\t\t\t \t\t//show success page\r\n\t\t\t \t\t//add confirmation message\r\n\t\t\t \t\t\t\t \t\t\r\n\t\t\t \t\tif (dataMap.get(MapConstant.ACTION).equals(ActionConstant.SAVE)) {\r\n\t\t\t \t\t\tformBean.setTransactionMessage(MiscConstant.TRANS_MESSSAGE_SAVED);\r\n\t\t\t \t\t\tPIBSUtils.writeLogInfo(logger, MiscConstant.TRANS_MESSSAGE_SAVED+\" - \"+module);\r\n\t\t\t \t\t\t//logger.info(MiscConstant.TRANS_MESSSAGE_SAVED);\r\n\t\t\t \t\t}else {\r\n\t\t\t \t\t\tformBean.setTransactionMessage(MiscConstant.TRANS_MESSSAGE_UPDATED);\r\n\t\t\t \t\t\tPIBSUtils.writeLogInfo(logger, MiscConstant.TRANS_MESSSAGE_UPDATED+\" - \"+module);\r\n\t\t\t \t\t\t//logger.info(MiscConstant.TRANS_MESSSAGE_UPDATED);\r\n\t\t\t \t\t}\r\n\t\t\t \t\t\r\n\r\n\t\t\t \t\t//update the diagnosis id in the form\r\n\t\t\t \t\tservice = null;\r\n\t\t\t \t\tresultMap = null;\r\n\t\t\t \t\t\r\n\t\t\t \t\tmodel = new Prognosis();\r\n\t\t\t\t\t\t\tmodel.setPatientCaseSystemId(formBean.getPatientCaseSystemId());\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tdataMap = new HashMap<String, Object>();\r\n\t\t\t\t\t dataMap.put(MapConstant.MODULE, module);\r\n\t\t\t\t\t dataMap.put(MapConstant.CLASS_DATA, model);\r\n\t\t\t\t\t dataMap.put(MapConstant.ACTION, ActionConstant.GET_DATA);\r\n\t\t\t\t\t \r\n\t\t\t\t\t service = new ServiceManagerImpl();\r\n\t\t\t\t\t resultMap = service.executeRequest(dataMap);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t if (resultMap!=null && !resultMap.isEmpty()) {\r\n\t\t\t\t\t\t model = (Prognosis) resultMap.get(MapConstant.CLASS_DATA);\t\t \t\t\r\n\t\t\t\t\t \tformBean.populateFormBean(model);\r\n\t\t\t\t\t }\r\n\t\t\t \t\t\r\n\t\t\t \t\tforwardAction = ActionConstant.AJAX_SUCCESS;\r\n\t\t\t \t} else {\r\n\t\t\t \t\tformBean.setTransactionMessage(MiscConstant.TRANS_MESSSAGE_ERROR);\r\n\t\t\t \t\t//logger.info(MiscConstant.TRANS_MESSSAGE_ERROR);\r\n\t\t\t \t\tPIBSUtils.writeLogInfo(logger, MiscConstant.TRANS_MESSSAGE_ERROR+\" - \"+module);\r\n\t\t\t \t\tforwardAction = ActionConstant.AJAX_FAILED;\r\n\t\t\t \t}\r\n\t\t\t }\r\n\t\t\t\t\t\r\n\t\t\t\t} \r\n\t\t\t} else {\r\n\t\t\t\t//show main screen\r\n\t\t\t\t forwardAction = ActionConstant.SHOW_AJAX_MAIN;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn mapping.findForward(forwardAction);\r\n\t}",
"public ActionForward init(ActionMapping mapping, ActionForm form,\n\t\t\tHttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows Exception {\n\t\tlogger.info(\" Started... \");\n //Added by Neetika\n\t\tHttpSession session = request.getSession();\n\t\tUserSessionContext sessionContext = (UserSessionContext) session.getAttribute(Constants.AUTHENTICATED_USER);\n\t\tint forceToRecoPage=0;\n\t\tif(sessionContext.getAccountLevel().equalsIgnoreCase((Constants.DIST_ACCOUNT_LEVEL)))\n\t\t{\n\t\t\tforceToRecoPage= AuthorizationFactory.getAuthorizerImpl()\n\t\t\t.forceToRecoPage(sessionContext.getId());\n\t\t\tlogger.info(\"forceToRecoPage = \"+forceToRecoPage);\n\t\t\tif(forceToRecoPage!=0)\n\t\t\t{\n\t\t\t\trequest.setAttribute(\"disabledLink\", Constants.disableLink);\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t//end neetika\n\t\t/* No dropdowns to populate, Redirect to Change Password JSP. */\n\t\tlogger.info(\" successful redirected to : initSuccess. \");\n\t\tlogger.info(\" Executed... \");\n\t\treturn mapping.findForward(INIT_SUCCESS);\n\t}",
"protected ActionForward performAction(ActionMapping mapping,\n ActionForm form, HttpServletRequest request,\n HttpServletResponse response) throws Exception {\n\n String forward = FWD_SUCCESS;\n request.setAttribute(ALLOW_EDITS_KEY, \"true\");\n request.setAttribute(PREVIOUS_DISABLED, \"false\");\n request.setAttribute(NEXT_DISABLED, \"false\");\n\n String id = request.getParameter(ID);\n \n if (StringUtil.isNullorNill(id) || \"0\".equals(id)) {\n isNew = true;\n } else {\n isNew = false;\n }\n \n BaseActionForm dynaForm = (BaseActionForm) form;\n \n ActionMessages errors = dynaForm.validate(mapping, request); \n if (errors != null && errors.size() > 0) {\n // System.out.println(\"Server side validation errors \"\n // + errors.toString());\n saveErrors(request, errors);\n // since we forward to jsp - not Action we don't need to repopulate\n // the lists here\n return mapping.findForward(FWD_FAIL);\n }\n \n String start = (String) request.getParameter(\"startingRecNo\");\n String direction = (String) request.getParameter(\"direction\");\n \n District district = new District();\n //get sysUserId from currentUserId\n district.setSysUserId(currentUserId); \n org.hibernate.Transaction tx = HibernateUtil.getSession().beginTransaction();\n \n // populate value holder from form\n PropertyUtils.copyProperties(district, dynaForm);\n // Get cityId from property \"selectedCityId\"\n String selectedCityId = PropertyUtils\n .getProperty(dynaForm, \"selectedCityId\").toString();\n // Get City object from cityId\n DictionaryDAO dictionaryDAO = new DictionaryDAOImpl();\n Dictionary city = new Dictionary();\n city = dictionaryDAO.getDataForId(selectedCityId);\n \n // Get DictrictEntry from districtName property from form\n String districtName = PropertyUtils\n .getProperty(dynaForm, \"districtName\").toString();\n \n DistrictDAO distDAO = new DistrictDAOImpl();\n \n List<Dictionary> districtEntry = distDAO.getDistrictsEntyByName(districtName);\n \n // Set some property for district\n district.setCity(city);\n district.setDescription(\"\");\n \n try {\n // Check DistrictEntry is already exists or not.\n if (districtEntry.size() == 0) {\n Dictionary newDistrictEntry = new Dictionary();\n newDistrictEntry.setDictEntry(districtName);\n DictionaryCategory dicCategory = new DictionaryCategory();\n DictionaryCategoryDAO dicCategoryDAO = \n new DictionaryCategoryDAOImpl();\n dicCategory = dicCategoryDAO\n .getDictionaryCategoryByName(\"districts\");\n newDistrictEntry.setDictionaryCategory(dicCategory);\n newDistrictEntry.setSysUserId(currentUserId);\n newDistrictEntry.setIsActive(\"Y\");\n dictionaryDAO.insertData(newDistrictEntry);\n district.setDistrictEntry(dictionaryDAO\n .getDictionaryByDictEntry(districtName));\n } else {\n district.setDistrictEntry(districtEntry.get(0));\n }\n if (!isNew) {\n // UPDATE\n distDAO.updateData(district);\n } else {\n // INSERT\n distDAO.insertData(district);\n }\n tx.commit();\n \n } catch (LIMSRuntimeException lre) {\n //bugzilla 2154\n LogEvent.logError(\"DistrictUpdateAction\", \"performAction()\",\n lre.toString());\n tx.rollback();\n errors = new ActionMessages();\n java.util.Locale locale = (java.util.Locale) request.getSession()\n .getAttribute(\"org.apache.struts.action.LOCALE\");\n ActionError error = null;\n if (lre.getException()\n instanceof org.hibernate.StaleObjectStateException) {\n // how can I get popup instead of struts error at the top of\n // page?\n // ActionMessages errors = dynaForm.validate(mapping, request);\n error = new ActionError(\"errors.OptimisticLockException\", null,\n null);\n } else {\n // bugzilla 1482\n if (lre.getException()\n instanceof LIMSDuplicateRecordException) {\n String messageKey = \"district.browse.title\";\n String msg = ResourceLocator.getInstance()\n .getMessageResources().getMessage(locale,\n messageKey);\n error = new ActionError(\"errors.DuplicateRecord\",\n msg, null);\n\n } else {\n error = new ActionError(\"errors.UpdateException\", null,\n null);\n }\n }\n errors.add(ActionMessages.GLOBAL_MESSAGE, error);\n saveErrors(request, errors);\n request.setAttribute(Globals.ERROR_KEY, errors);\n //bugzilla 1485: allow change and try updating again \n //enable save button & disable previous and next\n request.setAttribute(PREVIOUS_DISABLED, \"true\");\n request.setAttribute(NEXT_DISABLED, \"true\");\n forward = FWD_FAIL;\n\n } finally {\n HibernateUtil.closeSession();\n }\n \n if (forward.equals(FWD_FAIL)) {\n return mapping.findForward(forward);\n }\n // initialize the form\n dynaForm.initialize(mapping);\n // repopulate the form from valueholder\n PropertyUtils.copyProperties(dynaForm, district);\n if (\"true\".equalsIgnoreCase(request.getParameter(\"close\"))) {\n forward = FWD_CLOSE;\n }\n\n if (district.getId() != null && !district.getId().equals(\"0\")) {\n request.setAttribute(ID, district.getId());\n\n }\n\n //bugzilla 1400\n if (isNew) {\n forward = FWD_SUCCESS_INSERT;\n }\n //bugzilla 1467 added direction for redirect to NextPreviousAction\n return getForward(mapping.findForward(forward), id, start, direction);\n \n }",
"public ActionForward myAction1(ActionMapping mapping, ActionForm form,\r\n HttpServletRequest request, HttpServletResponse response)\r\n throws Exception {\r\n DataSource ds = null;\r\n TerritoryService territoryService = TerritoryServiceFactory.getTerritoryServiceImpl();\r\n FunctionalNeedReportForm functionalNeedForm = (FunctionalNeedReportForm) form;\r\n ArrayList districtList = new ArrayList();\r\n try {\r\n ds = getDataSource(request);\r\n if (ds == null || \"null\".equals(ds)) {\r\n ds = JNDIDataSource.getConnection();\r\n }\r\n districtList = territoryService.getDistricts(ds);\r\n if (districtList != null && districtList.size() > 0) {\r\n functionalNeedForm.setDistrictList(districtList);\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n return mapping.findForward(SUCCESS);\r\n }",
"@Override\r\n\tpublic ActionForward to_objectNew(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows KANException {\n\t\treturn null;\r\n\t}",
"public ActionForward initNonContext(ActionMapping mapping, ActionForm form,\n\t\t\tHttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows Exception {\n\t\tlogger.info(\" Started... \");\n\n\t\t/*\n\t\t * No dropdowns to populate, Redirect to Change Password JSP for\n\t\t * Non-Context User.\n\t\t */\n\t\tlogger.info(\" successful redirected to : nonContextInitSuccess\");\n\t\tlogger.info(\" Executed... \");\n\t\treturn mapping.findForward(NON_CONTEXT_INIT_SUCCESS);\n\t}",
"@Override\n\tpublic void setAction() {\n\t}",
"public ActionForward execute(ActionMapping actionMapping,\r\n\t\t\tActionForm actionForm, HttpServletRequest httpServletRequest,\r\n\t\t\tHttpServletResponse httpServletResponse) {\n\t\tActionForward retorno = actionMapping\r\n\t\t\t\t.findForward(\"exibirGerarRelatorioRelacaoParcelamento\");\t\r\n\r\n\t\tFachada fachada = Fachada.getInstancia();\r\n\t\t\r\n\t\tGerarRelatorioRelacaoParcelamentoActionForm form = (GerarRelatorioRelacaoParcelamentoActionForm) actionForm;\r\n\t\t\r\n\t\tHttpSession sessao = httpServletRequest.getSession(false);\r\n\t\t\r\n\t\tif (form.getIdUnidadeOrganizacional() != null && !form.getIdUnidadeOrganizacional().equals(\"\")) {\r\n\t\t\t\r\n\t\t\tthis.pesquisarUnidadeOrganizacional(httpServletRequest, form);\r\n\t\t}else{\r\n\t\t\tform.setDescricaoUnidadeOrganizacional(\"\");\r\n\t\t}\r\n\t\t\r\n\t\t// Gerência Regional\r\n\t\tif(sessao.getAttribute(\"gerenciasRegionais\") == null){\r\n\t\t\tFiltroGerenciaRegional filtroGerenciaRegional = new FiltroGerenciaRegional();\r\n\t\t\tfiltroGerenciaRegional.adicionarParametro(new ParametroSimples(\r\n\t\t\t\t\tFiltroGerenciaRegional.INDICADOR_USO,\r\n\t\t\t\t\tConstantesSistema.INDICADOR_USO_ATIVO));\r\n\t\t\tCollection gerenciasRegionais = fachada.pesquisar(filtroGerenciaRegional,\r\n\t\t\t\t\tGerenciaRegional.class.getName());\r\n\t\t\t\r\n\t\t\tif (gerenciasRegionais == null || gerenciasRegionais.isEmpty()) {\r\n\t\t\t\tthrow new ActionServletException(\"atencao.naocadastrado\", null,\r\n\t\t\t\t\t\t\"Gerência Regional\");\r\n\t\t\t} else {\r\n\t\t\t\tsessao.setAttribute(\"gerenciasRegionais\", gerenciasRegionais);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Unidade de Negócio\r\n\t\tif(sessao.getAttribute(\"colecaoUnidadeNegocio\") == null){\r\n\t\t\tFiltroUnidadeNegocio filtroUnidadeNegocio = new FiltroUnidadeNegocio();\r\n\t\t\tfiltroUnidadeNegocio.adicionarParametro(new ParametroSimples(\r\n\t\t\t\t\tFiltroUnidadeNegocio.INDICADOR_USO,\r\n\t\t\t\t\tConstantesSistema.INDICADOR_USO_ATIVO));\r\n\t\t\tCollection colecaoUnidadeNegocio = fachada.pesquisar(filtroUnidadeNegocio,\r\n\t\t\t\t\tUnidadeNegocio.class.getName());\r\n\t\t\t\r\n\t\t\tif (colecaoUnidadeNegocio == null || colecaoUnidadeNegocio.isEmpty()) {\r\n\t\t\t\tthrow new ActionServletException(\"atencao.naocadastrado\", null,\r\n\t\t\t\t\t\t\"Unidade de Negócio\");\r\n\t\t\t} else {\r\n\t\t\t\tsessao.setAttribute(\"colecaoUnidadeNegocio\", colecaoUnidadeNegocio);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(sessao.getAttribute(\"colecaoSituacaoParcelamento\") == null){\r\n\t\t //Pesquisando Situação do parcelamento\r\n\t\t FiltroParcelamentoSituacao filtroParcelamentoSituacao = new FiltroParcelamentoSituacao();\r\n\t \r\n\t\t Collection colecaoSituacaoParcelamento = \r\n\t\t\t fachada.pesquisar(filtroParcelamentoSituacao, \r\n\t \t\t\tParcelamentoSituacao.class.getName()); \r\n\t\t\r\n\t\t if (colecaoSituacaoParcelamento == null || colecaoSituacaoParcelamento.isEmpty()) {\r\n\t\t \tthrow new ActionServletException(\"atencao.entidade_sem_dados_para_selecao\",\r\n\t\t\t\t\tnull, \"Situação do Parcelamento\");\r\n\t\t }\r\n\t\t\r\n\t\t sessao.setAttribute(\"colecaoSituacaoParcelamento\",colecaoSituacaoParcelamento);\r\n\t\t}\r\n\t\t\r\n\t\t// Pesquisando local de instalação\r\n\t\tFiltroParcelamentoMotivoDesfazer filtroParcelamentoMotivoDesfazer = new FiltroParcelamentoMotivoDesfazer();\r\n\r\n\t\tCollection colecaoMotivoDesfazimento = fachada\r\n\t\t\t\t.pesquisar(filtroParcelamentoMotivoDesfazer,\r\n\t\t\t\t\t\tParcelamentoMotivoDesfazer.class.getName());\r\n\r\n\t\tif (colecaoMotivoDesfazimento == null || colecaoMotivoDesfazimento.isEmpty()) {\r\n\t\t\tthrow new ActionServletException(\r\n\t\t\t\t\t\"atencao.entidade_sem_dados_para_selecao\", null, \"Situação do Parcelamento\");\r\n\t\t}\r\n\r\n\t\thttpServletRequest.setAttribute(\"colecaoMotivoDesfazimento\", colecaoMotivoDesfazimento);\r\n\t\t\r\n\t\t\r\n\t\tif(httpServletRequest.getParameter(\"idSituacaoParcelamento\") != null){\r\n\t\t\tInteger idSituacaoParcelamento = new Integer(httpServletRequest.getParameter(\"idSituacaoParcelamento\"));\t\r\n\t\t\tif(idSituacaoParcelamento.equals(ParcelamentoSituacao.DESFEITO)){\r\n\t\t\t\thttpServletRequest.setAttribute(\"Desfeito\", \"sim\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tString idLocalidade = form.getIdLocalidade();\r\n\t\t\r\n\t\tif (idLocalidade != null && !idLocalidade.trim().equals(\"\")) {\r\n\t\t\tFiltroLocalidade filtroLocalidade = new FiltroLocalidade();\r\n\t\t\tfiltroLocalidade.adicionarParametro(new ParametroSimples(\r\n\t\t\t\t\tFiltroLocalidade.ID, idLocalidade));\r\n\r\n\t\t\tCollection colecaoLocalidade = fachada.pesquisar(\r\n\t\t\t\t\tfiltroLocalidade, Localidade.class.getName());\r\n\r\n\t\t\tif (colecaoLocalidade != null && !colecaoLocalidade.isEmpty()) {\r\n\t\t\t\tLocalidade localidade = (Localidade) colecaoLocalidade\r\n\t\t\t\t\t\t.iterator().next();\r\n\r\n\t\t\t\tform.setIdLocalidade(idLocalidade);\r\n\t\t\t\tform.setDescricaoLocalidade(localidade.getDescricao());\r\n\r\n\t\t\t} else {\r\n\t\t\t\tform.setIdLocalidade(\"\");\r\n\t\t\t\tform.setDescricaoLocalidade(\"LOCALIDADE INEXISTENTE\");\r\n\t\t\t\thttpServletRequest.setAttribute(\"localidadeInexistente\",\r\n\t\t\t\t\t\ttrue);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tform.setDescricaoLocalidade(\"\");\r\n\t\t}\r\n\t\t\r\n\t\tString codigoSetorComercial = form.getIdSetorComercial();\r\n\t\t\r\n\t\tif (codigoSetorComercial != null && !codigoSetorComercial.trim().equals(\"\")) {\r\n\t\t\tFiltroSetorComercial filtroSetorComercial = new FiltroSetorComercial();\r\n\t\t\tfiltroSetorComercial.adicionarParametro(new ParametroSimples(\r\n\t\t\t\t\tFiltroSetorComercial.ID_LOCALIDADE, idLocalidade));\r\n\t\t\t\r\n\t\t\tfiltroSetorComercial.adicionarParametro(new ParametroSimples(\r\n\t\t\t\t\tFiltroSetorComercial.CODIGO_SETOR_COMERCIAL, codigoSetorComercial));\r\n\r\n\t\t\tCollection colecaosetoComercial = fachada.pesquisar(\r\n\t\t\t\t\tfiltroSetorComercial, SetorComercial.class.getName());\r\n\r\n\t\t\tif (colecaosetoComercial != null && !colecaosetoComercial.isEmpty()) {\r\n\t\t\t\tSetorComercial setorComercial = (SetorComercial) colecaosetoComercial\r\n\t\t\t\t\t\t.iterator().next();\r\n\r\n\t\t\t\tform.setIdSetorComercial(codigoSetorComercial);\r\n\t\t\t\tform.setDescricaoSetorComercial(setorComercial.getDescricao());\r\n\r\n\t\t\t} else {\r\n\t\t\t\tform.setIdSetorComercial(\"\");\r\n\t\t\t\tform.setDescricaoSetorComercial(\"SETOR COMERCIAL INEXISTENTE\");\r\n\t\t\t\thttpServletRequest.setAttribute(\"setorComercialInexistente\",true);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tform.setDescricaoSetorComercial(\"\");\r\n\t\t}\r\n \r\n\t\t\r\n\t\tthis.pesquisarPerfilImovel(httpServletRequest);\r\n\t\t/*\r\n\t\t * Felipe Santos\r\n\t\t * \r\n\t\t * Não há nenhuma localidade associada a um municipio (muni_idprincipal != null)\r\n\t\t */\r\n//\t\tthis.pesquisarMunicipioAssociado(httpServletRequest);\r\n\t\t\r\n\t\tif(httpServletRequest.getParameter(\"pesqperfilImoveluisarUsuarioResponsavel\")!=null\r\n\t\t\t\t&& httpServletRequest.getParameter(\"pesquisarUsuarioResponsavel\").toString().equalsIgnoreCase(\"SIM\")\r\n\t\t\t\t&& form.getIdUsuarioResponsavel()!=null \r\n\t\t\t\t&& !form.getIdUsuarioResponsavel().equals(\"\")){\r\n\t\t\t\r\n\t\t\tFiltroUsuario filtro = new FiltroUsuario();\r\n\t\t\t\r\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroUsuario.ID, form.getIdUsuarioResponsavel()));\r\n\t\t\t\r\n\t\t\tCollection<Usuario> colecaoUsuariosResponsaveis = fachada.pesquisar(filtro, Usuario.class.getName());\r\n\t\t\t\r\n\t\t\tif(colecaoUsuariosResponsaveis!=null && !colecaoUsuariosResponsaveis.isEmpty()){\r\n\t\t\t\tUsuario usuarioResponsavel = colecaoUsuariosResponsaveis.iterator().next();\r\n\t\t\t\t\r\n\t\t\t\tform.setIdUsuarioResponsavel(usuarioResponsavel.getId().toString());\r\n\t\t\t\tform.setDescricaoUsuarioResponsavel(usuarioResponsavel.getNomeUsuario());\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tform.setIdUsuarioResponsavel(\"\");\r\n\t\t\t\tform.setDescricaoUsuarioResponsavel(\"USUARIO INEXISTENTE\");\r\n\t\t\t\thttpServletRequest.setAttribute(\"usuarioResponsavelInexistente\",true);\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tif(httpServletRequest.getParameter(\"pesquisarUsuarioConfirmacao\")!=null\r\n\t\t\t\t&& httpServletRequest.getParameter(\"pesquisarUsuarioConfirmacao\").toString().equalsIgnoreCase(\"SIM\")\r\n\t\t\t\t&& form.getIdUsuarioConfirmacao()!=null \r\n\t\t\t\t&& !form.getIdUsuarioConfirmacao().equals(\"\")){\r\n\t\t\t\r\n\t\t\tFiltroUsuario filtro = new FiltroUsuario();\r\n\t\t\t\r\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroUsuario.ID, form.getIdUsuarioConfirmacao()));\r\n\t\t\t\r\n\t\t\tCollection<Usuario> colecaoUsuariosConfirmacao = fachada.pesquisar(filtro, Usuario.class.getName());\r\n\t\t\t\r\n\t\t\tif(colecaoUsuariosConfirmacao!=null && !colecaoUsuariosConfirmacao.isEmpty()){\r\n\t\t\t\tUsuario usuarioConfirmacao = colecaoUsuariosConfirmacao.iterator().next();\r\n\t\t\t\t\r\n\t\t\t\tform.setIdUsuarioConfirmacao(usuarioConfirmacao.getId().toString());\r\n\t\t\t\tform.setDescricaoUsuarioConfirmacao(usuarioConfirmacao.getNomeUsuario());\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tform.setIdUsuarioConfirmacao(\"\");\r\n\t\t\t\tform.setDescricaoUsuarioConfirmacao(\"USUARIO INEXISTENTE\");\r\n\t\t\t\thttpServletRequest.setAttribute(\"usuarioConfirmacaoInexistente\",true);\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif(form.getIndicadorConfirmacaoOperadora()==null){\r\n\t\t\tform.setIndicadorConfirmacaoOperadora(\"2\");\r\n\t\t}\r\n\t\t\r\n return retorno;\r\n \r\n\t}",
"public ActionForward execute(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response) throws Exception {\n AGSSEditForm aGSSEditForm = (AGSSEditForm) form;// TODO Auto-generated method stub\n HttpSession session = ((HttpServletRequest) request).getSession();\n String forwardName = \"\";\n AirStandardCharges airStandardCharges = new AirStandardCharges();\n GenericCodeDAO genericCodeDAO = new GenericCodeDAO();\n String buttonValue = aGSSEditForm.getButtonValue();\n String standard = aGSSEditForm.getStandard();\n String asFreighted = aGSSEditForm.getAsFrfgted();\n int index = 0;\n AirRatesBean airRatesBean = new AirRatesBean();\n airRatesBean.setStandard(aGSSEditForm.getStandard());\n airRatesBean.setAsFrfgted(aGSSEditForm.getAsFrfgted());\n request.setAttribute(\"airRatesBean\", airRatesBean);\n List agssList = new ArrayList();\n if (session.getAttribute(\"airStandardCharges\") != null) {\n airStandardCharges = (AirStandardCharges) session.getAttribute(\"airStandardCharges\");\n } else {\n airStandardCharges = new AirStandardCharges();\n }\n if (!buttonValue.equals(\"cancel\")) {\n if (asFreighted != null && asFreighted.equalsIgnoreCase(\"on\")) {\n airStandardCharges.setAsFrfgted(\"X\");\n } else if (asFreighted == null) {\n airStandardCharges.setAsFrfgted(null);\n }\n\n\n GenericCode genObj = new GenericCode();\n String type = aGSSEditForm.getChargeType();\n\n forwardName = \"agssEdit\";\n\n\n\n if (standard != null && standard.equalsIgnoreCase(\"on\")) {\n airStandardCharges.setStandard(\"Y\");\n } else if (standard == null) {\n airStandardCharges.setStandard(\"N\");\n }\n if (aGSSEditForm.getAmtPerCft() != null && !aGSSEditForm.getAmtPerCft().equals(\"\")) {\n airStandardCharges.setAmtPerCft(new Double(aGSSEditForm.getAmtPerCft()));\n } else {\n airStandardCharges.setAmtPerCft(0.0);\n }\n if (aGSSEditForm.getAmtPer100lbs() != null && !aGSSEditForm.getAmtPer100lbs().equals(\"\")) {\n airStandardCharges.setAmtPer100lbs(new Double(aGSSEditForm.getAmtPer100lbs()));\n } else {\n airStandardCharges.setAmtPer100lbs(0.0);\n }\n if (aGSSEditForm.getAmtPerCbm() != null && !aGSSEditForm.getAmtPerCbm().equals(\"\")) {\n airStandardCharges.setAmtPerCbm(new Double(aGSSEditForm.getAmtPerCbm()));\n } else {\n airStandardCharges.setAmtPerCbm(0.0);\n }\n if (aGSSEditForm.getAmtPer1000kg() != null && !aGSSEditForm.getAmtPer1000kg().equals(\"\")) {\n airStandardCharges.setAmtPer1000kg(new Double(aGSSEditForm.getAmtPer1000kg()));\n } else {\n airStandardCharges.setAmtPer1000kg(0.0);\n }\n if (aGSSEditForm.getAmount() != null && !aGSSEditForm.getAmount().equals(\"\")) {\n airStandardCharges.setAmount(new Double(aGSSEditForm.getAmount()));\n } else {\n airStandardCharges.setAmount(0.0);\n }\n if (aGSSEditForm.getPercentage() != null && !aGSSEditForm.getPercentage().equals(\"\")) {\n double d = Double.parseDouble(aGSSEditForm.getPercentage());\n airStandardCharges.setPercentage(d / 1000);\n } else {\n airStandardCharges.setPercentage(0.0);\n }\n if (aGSSEditForm.getMinAmt() != null && !aGSSEditForm.getMinAmt().equals(\"\")) {\n airStandardCharges.setMinAmt(new Double(aGSSEditForm.getMinAmt()));\n } else {\n airStandardCharges.setMinAmt(0.0);\n }\n if (aGSSEditForm.getInsuranceRate() != null && !aGSSEditForm.getInsuranceRate().equals(\"\")) {\n airStandardCharges.setInsuranceRate(new Double(aGSSEditForm.getInsuranceRate()));\n } else {\n airStandardCharges.setInsuranceRate(0.0);\n }\n if (aGSSEditForm.getInsuranceAmt() != null && !aGSSEditForm.getInsuranceAmt().equals(\"\")) {\n airStandardCharges.setInsuranceAmt(new Double(aGSSEditForm.getInsuranceAmt()));\n } else {\n airStandardCharges.setInsuranceAmt(0.0);\n }\n if (aGSSEditForm.getTxtItemcreatedon() != null && !aGSSEditForm.getTxtItemcreatedon().equals(\"\")) {\n java.util.Date javaDate = null;\n SimpleDateFormat sdf = new SimpleDateFormat(\"MM/dd/yyyy\");\n javaDate = sdf.parse(aGSSEditForm.getTxtItemcreatedon());\n airStandardCharges.setEffectiveDate(javaDate);\n }\n\n\n session.setAttribute(\"airStandardCharges\", airStandardCharges);\n }\n if (buttonValue.equals(\"edit\")) {\n if (session.getAttribute(\"agssAdd\") != null) {\n agssList = (List) session.getAttribute(\"agssAdd\");\n for (int i = 0; i < agssList.size(); i++) {\n AirStandardCharges airStandard = (AirStandardCharges) agssList.get(i);\n if (airStandard.getChargeCode().getId().equals(airStandardCharges.getChargeCode().getId())\n && airStandard.getChargeType().getId().equals(airStandardCharges.getChargeType().getId())) {\n airStandardCharges.setIndex(airStandard.getIndex());\n agssList.remove(airStandard);\n agssList.add(airStandardCharges);\n break;\n }\n }\n }\n\n session.setAttribute(\"agssAdd\", agssList);\n if (session.getAttribute(\"airStandardCharges\") != null) {\n session.removeAttribute(\"airStandardCharges\");\n }\n forwardName = \"agssAdd\";\n session.setAttribute(\"getUpdateAss\", airStandardCharges);\n } else if (buttonValue.equals(\"cancel\")) {\n if (session.getAttribute(\"airStandardCharges\") != null) {\n session.removeAttribute(\"airStandardCharges\");\n }\n forwardName = \"agssAdd\";\n } else if (buttonValue.equals(\"delete\")) {\n if (session.getAttribute(\"agssAdd\") != null) {\n agssList = (List) session.getAttribute(\"agssAdd\");\n }\n for (int i = 0; i < agssList.size(); i++) {\n AirStandardCharges airStandard = (AirStandardCharges) agssList.get(i);\n if (airStandard.getChargeCode().getId().equals(airStandardCharges.getChargeCode().getId())\n && airStandard.getChargeType().getId().equals(airStandardCharges.getChargeType().getId())) {\n agssList.remove(airStandard);\n break;\n }\n session.setAttribute(\"agssAdd\", agssList);\n }\n if (session.getAttribute(\"airStandardCharges\") != null) {\n session.removeAttribute(\"airStandardCharges\");\n }\n forwardName = \"agssAdd\";\n }\n\n request.setAttribute(\"buttonValue\", buttonValue);\n\n return mapping.findForward(forwardName);\n }",
"public ActionForward perform(ActionMapping mapping, ActionForm form,\n\t\t\tHttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows IOException, ServletException {\n\t\tif (!checkUser(request))\n\t\t\treturn (mapping.findForward(\"errorUserIon\"));\n\n\t\t// check if this action is allowed\n\t\ttry {\n\t\t\tMapping.begin();\n\t\t\tif (!new SecurityManagerImpl().canAdminSecurity(User.getInstance(request.getSession().getAttribute(\"userLogin\")+ \"\"))) {\n\t\t\t\tthrow new Exception();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tMapping.rollback();\n\t\t\tLogger.getInstance().error(e.getMessage(), CreateUserAction.class,e);\n\t\t\treturn (mapping.findForward(\"errorSecurityIon\"));\n\t\t} finally {\n\t\t\tMapping.rollback();\n\t\t}\n\n\t\tUser currentUser = null;\n\t\ttry {\n\t\t\tcurrentUser = getCurrentUser(request);\n\t\t} catch (MappingException e) {\n\t\t\tMapping.rollback();\n\t\t\tLogger.getInstance().error(e.getMessage(), EditUserAction.class,e);\n\t\t\treturn (mapping.findForward(\"errorSecurityIon\"));\n\t\t} finally {\n\t\t\tMapping.rollback();\n\t\t}\n\t\tboolean isSuperAdmin = isSuperAdmin(request);\n\n\t\t// get the form\n\t\tCreateUserForm sform = (CreateUserForm) form;\n\t\tActionErrors errors = sform.myValidate(request);\n\n\t\t// user need cancel\n\t\tif (request.getParameter(\"cancel\") != null) {\n\t\t\t// Forward to the next page\n\t\t\treturn (mapping.findForward(\"cancel\"));\n\t\t}\n\n\t\ttry {\n\t\t\tVector groups = null;\n\t\t\tMapping.begin();\n\t\t\tif (isSuperAdmin) {\n\t\t\t\tgroups = Group.listAll();\n\t\t\t} else {\n\t\t\t\tgroups = currentUser.listGroups();\n\t\t\t}\n\t\t\tMapping.rollback();\n\t\t\trequest.setAttribute(\"groups\", groups);\n\t\t} catch (Exception e) {\n\t\t\tLogger.getInstance().error(e.getMessage(), CreateUserAction.class,e);\n\t\t\treturn (mapping.findForward(\"errorIon\"));\n\t\t} finally {\n\t\t\tMapping.rollback();\n\t\t}\n\n\t\t// fill data | first time\n\t\tif (sform.getName() == null) {\n\t\t\t// Forward to the view page\n\t\t\treturn (mapping.findForward(\"view\"));\n\t\t}\n\n\t\t// fill data | errors\n\t\tif (errors.size() > 0) {\n\t\t\trequest.setAttribute(ERROR_KEY, errors);\n\t\t\t// Forward to the view page\n\t\t\treturn (mapping.findForward(\"view\"));\n\t\t}\n\n\t\t// all it's ok : update user\n\t\ttry {\n\t\t\t// creation user os\n\t\t\tString userLogin=sform.getLogin();\n\n\t\t\tMapping.begin();\n\t\t\tUser user = null;\n\t\t\ttry {\n\t\t\t\tuser = User.getInstance(userLogin);\n\t\t\t} catch (MappingException e) {\n\t\t\t\tLogger.getInstance().error(\"Test effectué que l'utilisateur n'existe pas\", CreateUserAction.class,e);\n\t\t\t}\n\t\t\tif (user !=null) {// existe déjà\n\t\t\t\tthrow new StandardException(\"L'utilisateur n'existe déjà avec le login \" + userLogin);\n\t\t\t}\n\n\t\t\tuser = User.create(userLogin);\n\t\t\tuser.setMetaData(\"name\", sform.getName());\n\t\t\tuser.setMetaData(\"email\", sform.getEmail());\n\t\t\tuser.setMetaData(\"active\", sform.getActive());\n\n\t\t\tuser.setPassword(org.nextime.ion.commons.Authenticator.createPassword(sform.getPassword()));\n\t\t\tuser.resetGroups();\n\t\t\tif (sform.getGroups() != null) {\n\t\t\t\tfor (int i = 0; i < sform.getGroups().length; i++) {\n\t\t\t\t\tGroup group = Group.getInstance(sform.getGroups()[i]);\n\t\t\t\t\tuser.addGroup(group);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tMapping.commit();\n\n\t\t} catch (StandardException e) {\n\t\t\t// message\n\t\t\terrors = new ActionErrors();\n\t\t\tActionError error = new ActionError(\"error.createUser.userExisted\");\n\t\t\terrors.add(\"login\", error);\n\t\t\trequest.setAttribute(ERROR_KEY, errors);\n\t\t\tLogger.getInstance().error(e.getMessage(), CreateUserAction.class,e);\n\t\t\treturn (mapping.findForward(\"view\"));\n\t\t}\n\t\tcatch (MappingException e) {\n\t\t\tMapping.rollback();\n\t\t\tLogger.getInstance().error(e.getMessage(), CreateUserAction.class,e);\n\t\t\treturn (mapping.findForward(\"errorIon\"));\n\t\t} finally {\n\t\t\tMapping.rollback();\n\t\t}\n\n\t// Forward to the next page\n\t\treturn (mapping.findForward(\"ok\"));\n\t}",
"public ActionForward populateTransplantXenograft(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response) throws Exception {\n setCancerModel(request);\n \n setComments(request, Constants.Pages.XENOGRAFT);\n \n return mapping.findForward(\"viewTransplantXenograft\");\n }",
"boolean hasHas_action();",
"public ActionForward multiUse(ActionMapping mapping, ActionForm form,\n \t\t\tHttpServletRequest request, HttpServletResponse response)\n \tthrows Exception {\n \t\t\n \t\treturn mapping.findForward(\"backToGeneExp\");\n }",
"public ActionForward execute(ActionMapping actionMapping,\r\n\t\t\tActionForm actionForm, HttpServletRequest httpServletRequest,\r\n\t\t\tHttpServletResponse httpServletResponse) {\r\n\r\n\t\tActionForward retorno = actionMapping.findForward(\"inserirCobrancaSituacao\");\r\n\r\n\t\tInserirCobrancaSituacaoActionForm inserirCobrancaSituacaoActionForm = (InserirCobrancaSituacaoActionForm) actionForm;\r\n\t\t\r\n\t\t\r\n\t\t//Motivo de Revisao da Conta\r\n\t\t FiltroContaMotivoRevisao filtroContaMotivoRevisao = new FiltroContaMotivoRevisao();\r\n\t \r\n\t\t filtroContaMotivoRevisao.setCampoOrderBy(FiltroContaMotivoRevisao.ID);\r\n\t \r\n\t\t filtroContaMotivoRevisao.adicionarParametro(new ParametroSimples(\r\n\t\t\t\t FiltroContaMotivoRevisao.INDICADOR_USO,\r\n\t \t\tConstantesSistema.INDICADOR_USO_ATIVO));\r\n\t \r\n\t Collection colecaoPesquisa = null;\r\n\t \r\n\t //Retorna tipo de situacao especial de faturamento\r\n\t colecaoPesquisa = this.getFachada().pesquisar(filtroContaMotivoRevisao,\r\n\t \t\t ContaMotivoRevisao.class.getName());\r\n\t \r\n\t if (colecaoPesquisa == null || colecaoPesquisa.isEmpty()) {\r\n\t //Nenhum registro na tabela leitura_anormalidade_consumo foi encontrado\r\n\t throw new ActionServletException(\r\n\t \"atencao.pesquisa.nenhum_registro_tabela\", null,\r\n\t \"Motivo de Revisão da Conta\");\r\n\t } else {\r\n\t httpServletRequest.setAttribute(\"colecaoContaMotivoRevisao\", colecaoPesquisa);\r\n\t }\r\n\t \r\n\t //Profissão\r\n\t FiltroProfissao filtroProfissao = new FiltroProfissao();\r\n\t filtroProfissao.setCampoOrderBy(FiltroProfissao.ID);\r\n\t filtroProfissao.adicionarParametro(new ParametroSimples(\r\n\t \t\tFiltroProfissao.INDICADOR_USO,\r\n\t \t\t\tConstantesSistema.INDICADOR_USO_ATIVO));\r\n\t Collection colecaoProfissao = null;\r\n\t colecaoProfissao = this.getFachada().pesquisar(filtroProfissao, \r\n\t \t\tProfissao.class.getName());\r\n\t \r\n\t if ( colecaoProfissao == null || colecaoProfissao.isEmpty() ) {\r\n\t \tthrow new ActionServletException (\r\n\t \t\t\t\"atencao.pesquisa.nenhum_registro_tabela\", null,\r\n\t \"Profissão\");\r\n\t } else {\r\n\t \thttpServletRequest.setAttribute(\"colecaoProfissao\", colecaoProfissao );\r\n\t }\r\n\t \r\n\t //Ramo Atividade\r\n\t FiltroRamoAtividade filtroRamoAtividade = new FiltroRamoAtividade();\r\n\t filtroRamoAtividade.setCampoOrderBy(FiltroRamoAtividade.ID);\r\n\t filtroRamoAtividade.adicionarParametro(new ParametroSimples(\r\n\t \t\tFiltroRamoAtividade.INDICADOR_USO,\r\n\t \t\t\tConstantesSistema.INDICADOR_USO_ATIVO));\r\n\t Collection colecaoRamoAtividade = null;\r\n\t colecaoRamoAtividade = this.getFachada().pesquisar(filtroRamoAtividade, \r\n\t \t\tRamoAtividade.class.getName());\r\n\t \r\n\t if ( colecaoRamoAtividade == null || colecaoRamoAtividade.isEmpty() ) {\r\n\t \tthrow new ActionServletException (\r\n\t \t\t\t\"atencao.pesquisa.nenhum_registro_tabela\", null,\r\n\t \"Ramo Atividade\");\r\n\t } else {\r\n\t \thttpServletRequest.setAttribute(\"colecaoRamoAtividade\", colecaoRamoAtividade );\r\n\t }\r\n\t \r\n if (httpServletRequest.getParameter(\"menu\") != null && httpServletRequest.getParameter(\"menu\").equals(\"sim\")) {\r\n \tinserirCobrancaSituacaoActionForm.setIndicadorBloqueioParcelamento(ConstantesSistema.NAO);\r\n \tinserirCobrancaSituacaoActionForm.setIndicadorExigenciaAdvogado(ConstantesSistema.NAO); \r\n \tinserirCobrancaSituacaoActionForm.setIndicadorBloqueioInclusao(ConstantesSistema.NAO);\r\n \tinserirCobrancaSituacaoActionForm.setIndicadorBloqueioRetirada(ConstantesSistema.NAO);\r\n \tinserirCobrancaSituacaoActionForm.setIndicadorSelecaoApenasComPermissao(ConstantesSistema.NAO);\r\n \tinserirCobrancaSituacaoActionForm.setIndicadorPrescricaoImoveisParticulares( new Integer(ConstantesSistema.NAO.toString()));\r\n \tinserirCobrancaSituacaoActionForm.setIndicadorNaoIncluirImoveisEmCobrancaResultado( new Integer(ConstantesSistema.NAO.toString()));\r\n }\r\n \r\n \r\n\t\treturn retorno;\r\n\t}",
"@Override\n\tpublic ActionResult defaultMethod(PortalForm form, HttpServletRequest request, HttpServletResponse response) {\n\t\treturn null;\n\t}",
"public ActionForward execute(ActionMapping actionMapping,\r\n\t\t\tActionForm actionForm, HttpServletRequest httpServletRequest,\r\n\t\t\tHttpServletResponse httpServletResponse) {\r\n\r\n\t\tActionForward retorno = null;\r\n\r\n\t\tInserirQualidadeAguaActionForm form = (InserirQualidadeAguaActionForm) actionForm;\r\n\r\n\t\t// [FS0001 - VALIDAR REFERÊNCIA]\r\n\t\tif ((form.getReferencia() != null && !form.getReferencia().equals(\"\"))) {\r\n\r\n\t\t\tString anoMesReferencia = Util.formatarMesAnoParaAnoMesSemBarra(form.getReferencia());\r\n\t\t\t\r\n\t\t\tSistemaParametro sistemaParametro = this.getFachada().pesquisarParametrosDoSistema();\r\n\t\t\tString anoMesFuturo = \r\n\t\t\t\t\"\"+Util.somaUmMesAnoMesReferencia(sistemaParametro.getAnoMesFaturamento());\r\n\t\t\t\r\n\t\t\tif (Util.compararAnoMesReferencia(anoMesReferencia,anoMesFuturo,\">\")){\r\n\t\t\t\thttpServletRequest.setAttribute(\"nomeCampo\", \"referencia\");\t\r\n\t\t\t\tthrow new ActionServletException(\"atencao.mes_ano_menor\");\r\n\t\t\t} \r\n\r\n\t\t}\r\n\r\n\t\t// Setor Comercial\r\n\r\n\t\tif (form.getIdSetorComercial() != null\r\n\t\t\t\t&& !form.getIdSetorComercial().toString().trim()\r\n\t\t\t\t\t\t.equalsIgnoreCase(\"\")) {\r\n\t\t\tif (form.getIdSetorComercial() != null\r\n\t\t\t\t\t&& !form.getIdLocalidade().toString().trim()\r\n\t\t\t\t\t\t\t.equalsIgnoreCase(\"\")) {\r\n\r\n\t\t\t\tFiltroSetorComercial filtroSetorComercial = new FiltroSetorComercial();\r\n\r\n\t\t\t\tfiltroSetorComercial.limparListaParametros();\r\n\r\n\t\t\t\tfiltroSetorComercial.adicionarParametro(new ParametroSimples(\r\n\t\t\t\t\t\tFiltroSetorComercial.INDICADORUSO,\r\n\t\t\t\t\t\tConstantesSistema.INDICADOR_USO_ATIVO));\r\n\t\t\t\tfiltroSetorComercial.adicionarParametro(new ParametroSimples(\r\n\t\t\t\t\t\tFiltroSetorComercial.ID_LOCALIDADE, new Integer(form\r\n\t\t\t\t\t\t\t\t.getIdLocalidade())));\r\n\t\t\t\tfiltroSetorComercial.adicionarParametro(new ParametroSimples(\r\n\t\t\t\t\t\tFiltroSetorComercial.CODIGO_SETOR_COMERCIAL,\r\n\t\t\t\t\t\tnew Integer(form.getIdSetorComercial())));\r\n\r\n\t\t\t\tCollection colecaoSetorComerciais = this.getFachada()\r\n\t\t\t\t\t\t.pesquisar(filtroSetorComercial,\r\n\t\t\t\t\t\t\t\tSetorComercial.class.getName());\r\n\r\n\t\t\t\tif (colecaoSetorComerciais == null\r\n\t\t\t\t\t\t|| colecaoSetorComerciais.isEmpty()) {\r\n\t\t\t\t\tthrow new ActionServletException(\r\n\t\t\t\t\t\t\t\"atencao.setor_comercial.inexistente\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Verifica qual é o próximo passo para a execução do processo\r\n\t\t// String destinoPagina = httpServletRequest.getParameter(\"destino\");\r\n\r\n\t\treturn retorno;\r\n\r\n\t}",
"@Override\r\n\tprotected String doInit(ActionForm form, HttpServletRequest request,\r\n\t\t\tHttpServletResponse response, ActionMapping mapping) {\n\t\tManageSalaryForm myForm = (ManageSalaryForm) form;\r\n\t\tmySalaryService.firstLoadSearch(myForm);\r\n\t\treturn \"gotoCalculateAllStaff\";\r\n\t}",
"public ActionForward unspecified(ActionMapping mapping, ActionForm form,\r\n HttpServletRequest request, HttpServletResponse response) throws Exception {\r\n return displayProcessErp(mapping, form, request, response);\r\n }",
"public ActionForward toAdd(ActionMapping mapping,\r\n\t\t\tActionForm actionForm, HttpServletRequest request,\r\n\t\t\tHttpServletResponse response) throws Exception {\n\t\t\r\n\t\tList modules = getService().findAll(Module.class);\r\n\t\trequest.setAttribute(\"modules\", modules);\r\n\t\t\r\n//\t\tList columns = scs.findSystemTableColumns(smt);\r\n//\t\trequest.setAttribute(\"columns\", columns);\r\n//\t\t\r\n//\t\tList mainColumns = smcs.findSystemMainTableColumns(smt);\r\n//\t\trequest.setAttribute(\"mainColumns\", mainColumns);\r\n//\t\t\r\n//\t\tList extColumns =secs.findSystemExtendColumns(smt);\r\n//\t\trequest.setAttribute(\"extColumns\", extColumns);\r\n\t\t\r\n\t\treturn mapping.findForward(\"form\");\r\n\t}",
"public ActionForward exec(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response)\n throws Exception {\n \n \n String mode = request.getParameter(\"mode\");\n String action = request.getParameter(\"action\");\n RequestContext.setPageContext(request);\n\n InstaReportBean reportBean = (InstaReportBean) form;\n if (reportBean==null) {\n reportBean = new InstaReportBean();\n }\n ReportDTO newReportDto = new ReportDTO();\n if ((\"controller\").equalsIgnoreCase(mode)\n && (\"input\").equalsIgnoreCase(action)) {\n \n try {\n //reportBean.resetBean();\n reportBean.resetAll();\n reportBean.setListOfTranType(null);\n reportBean.subTypeMap.clear();\n reportBean.setListOfTranType(reportBean.getListOfTranType());\n reportBean.setTranTypeList(reportBean.getTransactionListForExcel());\n reportBean.setSubTypeMap(reportBean.getMsgSubTypeMapForExcel());\n reportBean.setNewReportDto(newReportDto);\n String appDate = InstaReportUtil.reportDisplayDateFormat(getBusinessDate());\n reportBean.getNewReportDto().setValueDate(appDate);\n return mapping.findForward(\"controllerInput\");\n \n } catch (Exception e) {\n \n logger.error(e.getMessage());\n reportBean.setMessage(e.getMessage());\n reportBean.setMessageType(InstaULC.MSG_TYPE_INFO);\n return mapping.findForward(\"controllerFailure\");\n }\n } else if ((\"controller\").equalsIgnoreCase(mode)\n && (\"submit\").equalsIgnoreCase(action)) {\n try {\n reportBean.generateExcelSheetReport(request);\n String appDate = InstaReportUtil.reportDisplayDateFormat(getBusinessDate());\n reportBean.getNewReportDto().setValueDate(appDate); \n \n return mapping.findForward(\"excelSubmit\");\n } catch (Exception e) {\n logger.error(e.getMessage());\n reportBean.setMessage(e.getMessage());\n reportBean.setMessageType(InstaULC.MSG_TYPE_INFO);\n return mapping.findForward(\"controllerFailure\");\n }\n } else if ((\"controller\").equalsIgnoreCase(mode)\n && (\"reset\").equalsIgnoreCase(action)) {\n try {\n reportBean.resetAll();\n return mapping.findForward(\"controllerInput\");\n } catch (Exception e) {\n logger.error(e.getMessage());\n reportBean.setMessage(e.getMessage());\n reportBean.setMessageType(InstaULC.MSG_TYPE_INFO);\n return mapping.findForward(\"controllerFailure\");\n }\n }\n return mapping.findForward(\"controllerFailure\");\n }",
"@Override\r\n\tpublic void action() {\n\t\t\r\n\t}",
"public void initiateAction() {\r\n\t\t// TODO Auto-generated method stub\t\r\n\t}",
"public abstract boolean isPreserveActionParams();",
"public ActionForward doInsertSuggestion(ActionMapping mapping, ActionForm form,\n\t\t\tHttpServletRequest request, HttpServletResponse response) {\n\t\tOtherSuggestionForm otherSuggestionForm = (OtherSuggestionForm) form;// TODO Auto-generated method stub\n\t\tTotherSuggestion item=otherSuggestionForm.getItem();\n\t\tTuser user=(Tuser)request.getSession().getAttribute(\"logineduser\");\n\t\titem.setSuggestionDate(new Date());\n\t\titem.setDepartmentName(user.getEmp().getTdepartment().getName());\n\t\titem.setApproveName(user.getEmp().getName());\n\t\t//更新otherSug\n\t\tList<TotherSuggestion> rs=this.getOtherSugBiz().doSelectByConditions(item);\n\t\tif(rs!=null&&!rs.isEmpty())\n\t\t{\n\t\t\tthis.getOtherSugBiz().doUpdate(item);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.getOtherSugBiz().doInsert(item);\n\t\t}\n\t\tTproposal tp= new Tproposal();\t\t\n\t\ttp.setId(item.getTproposal().getId());\n\t\tboolean flag=true;\n\t\ttp.setState(Tproposal.COMPANY);\n\t\trs=this.getOtherSugBiz().doSelectByConditions(item);\n\t\tfor(TotherSuggestion otherSug:rs)\n\t\t{\n\t\t\tif(otherSug.getSuggestionType()==null||otherSug.getSuggestionType().equals(\"\"))\n\t\t\t{\n\t\t\t\tflag=false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(!otherSug.getSuggestionType().equals(\"推荐实施\"))\n\t\t\t{\n\t\t\t\ttp.setState(Tproposal.DEPARTMENT);\n\t\t\t\t//flag=false;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t/*\n\t\t * 如果全部审批过了,才更新proposal。state\n\t\t */\n\t\tif(flag)\n\t\t{\n\t\t\tif(tp.getState()==1)\n\t\t\t{\n\t\t\t\tthis.doUpdateProposalState(tp);\n\t\t\t\t\n\t\t\t\tString implementDepartments=this.getMainSugBiz().doSelectByProposalID(tp.getId()).getImplementationPartment();\n\t\t\t\tString[] targets=implementDepartments.split(\",\");\n\t\t\t\tfor(int i=0;i<targets.length;i++)\n\t\t\t\t{\n\t\t\t\t\t//String mamangerID=this.getDepartBiz().doSelectManagerByDepartID(Integer.parseInt(targets[i])).getPmangerid();\n\t\t\t\t\tString[] vaves=this.getDepartBiz().doSelectVaves(Integer.parseInt(targets[i]));\n\t\t\t\t\tfor(int j=0;j<vaves.length;j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.getProposalStateBiz().doDelete(new VaveProposalStateId(tp,vaves[j]));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.doInsertProposalState(tp,1);\n\t\t\t}\n\t\t\tthis.getProposalBiz().doUpdateState(tp);\n\t\t\t\n\t\t}\n\t\t//更新计算附表\n\t\tString expectSaving=request.getParameter(\"expectSaving\");\n\t\tif(expectSaving!=null&&!expectSaving.equals(\"\"))\n\t\t{\n\t\t\tthis.doInsertSchedule(request, response, tp.getId());\n\t\t}\t\n\t\treturn mapping.findForward(\"doSearchOutside\");\n\t}",
"public ActionForward populateXenograftDetails(ActionMapping mapping, ActionForm form, HttpServletRequest request,\n HttpServletResponse response) throws Exception {\n String modelID = request.getParameter(\"xModelID\");\n String nsc = request.getParameter(\"nsc\");\n \t\tif(nsc != null && nsc.length()==0) return mapping.findForward(\"viewModelCharacteristics\");\n log.info(\"<populateXenograftDetails> modelID:\" + modelID);\n log.info(\"<populateXenograftDetails> nsc:\" + nsc);\n \t\tXenograftManager mgr = (XenograftManager) getBean(\"xenograftManager\");\n \n Xenograft x = null;\n try {\n x = mgr.get(modelID);\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n setCancerModel(request);\n request.getSession().setAttribute(Constants.XENOGRAFTMODEL, x);\n request.getSession().setAttribute(Constants.NSC_NUMBER, nsc);\n return mapping.findForward(\"viewInvivoDetails\");\n }",
"@Override\n\tpublic void preProcessAction(GwtEvent e) {\n\t\t\n\t}",
"public ActionForward perform(\n\t\tActionMapping mapping,\n\t\tActionForm form,\n\t\tHttpServletRequest request,\n\t\tHttpServletResponse response) {\n\t\t\n\t\tLocale locale = getLocale(request);\n\t\tMessageResources messages = getResources();\n\t\tString action = request.getParameter(\"FormAction\");\n\t\tUserLogin ul = (UserLogin)request.getSession().getAttribute(Constants.USERLOGIN_KEY);\n\t\tif(action == null) action = \"QueryForList\";\n\t\t\n\t\tif (action.equals(\"QueryForList\")) {\n\t\t\tList result = findQueryResult(request);\n\t\t\trequest.setAttribute(\"QryList\", result);\n\t\t} \n\t\t\n\t\tif (action.equals(\"PAConfirm\")) {\n\t\t\tString chk[] =request.getParameterValues(\"chk\");\n\t\t\tTransactionServices ts = new TransactionServices();\t\t\t\t\t\t\t\t\n\n\t\t\tif (chk != null) {\n\t\t\t\ttry {\n\t\t\t\t\tnet.sf.hibernate.Session hs =Hibernate2Session.currentSession();\n\t\t\t\t\tTransaction tx = hs.beginTransaction();\n\t\t\t\t\tint RowSize = java.lang.reflect.Array.getLength(chk);\n\t\t\t\t\tfor (int i = 0; i < RowSize; i++) {\n\t\t\t\t\t\tProjectCostMaster pcm = (ProjectCostMaster)hs.load(ProjectCostMaster.class, new Integer(chk[i]));\n\t\t\t\t\t\tif (pcm.getPAConfirm() == null) {\n\t\t\t\t\t\t\tpcm.setPAConfirm(UtilDateTime.nowTimestamp());\n\t\t\t\t\t\t\ths.update(pcm);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tts.insert(pcm, ul);\n\t\t\t\t\t}\n\t\t\t\t\ttx.commit();\n\t\t\t\t\ths.flush();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tList result = findQueryResult(request);\n\t\t\trequest.setAttribute(\"QryList\", result);\n\t\t}\n\t\tif (action.equals(\"PAUNConfirm\")) {\n\t\t\tString chk[] =request.getParameterValues(\"chk\");\n\t\t\tTransactionServices ts = new TransactionServices();\t\t\t\t\t\t\t\t\n\n\t\t\tif (chk != null) {\n\t\t\t\ttry {\n\t\t\t\t\tnet.sf.hibernate.Session hs =Hibernate2Session.currentSession();\n\t\t\t\t\tTransaction tx = hs.beginTransaction();\n\t\t\t\t\tint RowSize = java.lang.reflect.Array.getLength(chk);\n\t\t\t\t\tfor (int i = 0; i < RowSize; i++) {\n\t\t\t\t\t\tProjectCostMaster pcm = (ProjectCostMaster)hs.load(ProjectCostMaster.class, new Integer(chk[i]));\n\t\t\t\t\t\tif (pcm.getPAConfirm() != null) {\n\t\t\t\t\t\t\tpcm.setPAConfirm(null);\n\t\t\t\t\t\t\ths.update(pcm);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tts.remove(pcm);\n\t\t\t\t\t}\n\t\t\t\t\ttx.commit();\n\t\t\t\t\ths.flush();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tList result = findQueryResult(request);\n\t\t\trequest.setAttribute(\"QryList\", result);\n\t\t}\n\t\tif (action.equals(\"Confirm\")) {\n\t\t\tString chk[] =request.getParameterValues(\"chk\");\n\t\t\tTransactionServices ts = new TransactionServices();\t\t\t\t\t\t\t\t\n\n\t\t\tif (chk != null) {\n\t\t\t\ttry {\n\t\t\t\t\tnet.sf.hibernate.Session hs =Hibernate2Session.currentSession();\n\t\t\t\t\tTransaction tx = hs.beginTransaction();\n\t\t\t\t\tint RowSize = java.lang.reflect.Array.getLength(chk);\n\t\t\t\t\tfor (int i = 0; i < RowSize; i++) {\n\t\t\t\t\t\tProjectCostMaster pcm = (ProjectCostMaster)hs.load(ProjectCostMaster.class, new Integer(chk[i]));\n\t\t\t\t\t\tif (pcm.getApprovalDate() == null) {\n\t\t\t\t\t\t\tpcm.setApprovalDate(UtilDateTime.nowTimestamp());\n\t\t\t\t\t\t\tpcm.setPayStatus(\"confirmed\");\n\t\t\t\t\t\t\ths.update(pcm);\n\t\t\t\t\t\t}\n\t\t\t\t//\t\tts.remove(pcm);\n\t\t\t\t\t}\n\t\t\t\t\ttx.commit();\n\t\t\t\t\ths.flush();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tList result = findQueryResult(request);\n\t\t\trequest.setAttribute(\"QryList\", result);\n\t\t}\n\t\tif (action.equals(\"PostToFA\")) {\n\t\t\tString chk[] =request.getParameterValues(\"chk\");\n\t\t\tif (chk != null) {\n\t\t\t\ttry {\n\t\t\t\t\tnet.sf.hibernate.Session hs =Hibernate2Session.currentSession();\n\t//\t\t\t\tTransaction tx = hs.beginTransaction();\n\t\t\t\t\tint RowSize = java.lang.reflect.Array.getLength(chk);\n\t\t\t\t\tfor (int i = 0; i < RowSize; i++) {\n\t\t\t\t\t\tProjectCostMaster pcm = (ProjectCostMaster)hs.load(ProjectCostMaster.class, new Integer(chk[i]));\n\t\t\t\t\t\tProjectAirFareCost pac = (ProjectAirFareCost)hs.load(ProjectAirFareCost.class, new Integer(chk[i]));\n\t\t\t\t\t//\tif(pac.getReturnDate()!=null){\n\t\t\t\t\t\t\tpcm.setPayStatus(\"Posted\");\n\t\t\t\t\t\t\ths.save(pcm);\n\t\t\t\t\t//\t}\n\t\t\t\t\t}\n\t\t//\t\t\ttx.commit();\n\t\t\t\t\ths.flush();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tList result = findQueryResult(request);\n\t\t\trequest.setAttribute(\"QryList\", result);\n\t\t}\n\t\tif (action.equals(\"ExcelPrint\")) {\n\t\t\tString chk[] =request.getParameterValues(\"chk\");\n\t\t\t\n\t\t\tif (chk != null) {\n\t\t\t\ttry {\n//\t\t\t\t\tGet Excel Template Path =============================================\n\t\t\t\t\tnet.sf.hibernate.Session hs =Hibernate2Session.currentSession();\n\t\t\t\t\t\n\t\t\t\t\tString TemplatePath = GetTemplateFolder();\n\t\t\t\t\tif (TemplatePath == null) return null;\n\t\t\t\t\t\n\t\t\t\t\tint RowSize = java.lang.reflect.Array.getLength(chk);\n\t\t\t\t\t\n\t\t\t\t\t//Start to output the excel file\n\t\t\t\t\tresponse.reset();\n\t\t\t\t\tresponse.setHeader(\"Content-Disposition\", \"attachment;filename=\\\"\"+ SaveToFileName + \"\\\"\");\n\t\t\t\t\tresponse.setContentType(\"application/octet-stream\");\n\t\t\t\t\t\n\t\t\t\t\t//Use POI to read the selected Excel Spreadsheet\n\t\t\t\t\tHSSFWorkbook wb = new HSSFWorkbook(new FileInputStream(TemplatePath+\"\\\\\"+ExcelTemplate));\n\t\t\t\t\t//Select the first worksheet\n\t\t\t\t\tHSSFSheet sheet = wb.getSheet(FormSheetName);\n\t\t\t\t\t\n\t\t\t\t\tDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH);\n\t\t\t\t\tString status =\"\";\n\t\t\t\t\t\t\t\t\n\t\t\t\t\tHSSFCell cell = null;\n\t\t\t\t\t\t\t\n\t\t\t\t\t//List\n\t\t\t\t\tHSSFCellStyle boldTextStyle = sheet.getRow(ListStartRow).getCell((short)0).getCellStyle();\n\t\t\t\t\tHSSFCellStyle dateStyle = sheet.getRow(1).getCell((short)7).getCellStyle();\n\t\t\t\t\tHSSFCellStyle numberFormatStyle = sheet.getRow(ListStartRow).getCell((short)6).getCellStyle();\n\t\t\t\t\t\n\t\t\t\t\tint ExcelRow = ListStartRow;\n\t\t\t\t\t\n\t\t\t\t\tHSSFRow HRow = null;\n\t\t\t\t\tHRow = sheet.createRow(1);\n\t\t\t\t\tcell = HRow.createCell((short)7);\n\t\t\t\t\tcell.setCellValue(new Date());\n\t\t\t\t\tcell.setCellStyle(dateStyle);\n\t\t\t\t\t\n\t\t\t\t\t//in order to make groups\n\t\t\t\t\t\n\t\t\t\t\tshort cellNumber = 0;\n\t\t\t\t\t\n\t\t\t\t\t//write the titles\n\t\t\t\t\tHRow = sheet.createRow(titleRow);\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Ticket Code\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Project ID\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Staff Name\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Description\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Bill To\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Create Date\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Flight No.\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Paid By\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Flight Date\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Confirm Date\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Price\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Vendor\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\n\t\t\t\t\t\n\t\t\t\t\t//write contents\n\t\t\t\t\tfor (int i = 0; i < RowSize; i++) {\n\t\t\t\t\tProjectCostMaster pcm = (ProjectCostMaster)hs.load(ProjectCostMaster.class, new Integer(chk[i]));\n\t\t\t\t\tProjectAirFareCost pac = (ProjectAirFareCost)hs.load(ProjectAirFareCost.class, new Integer(chk[i]));\n\n\t\t\t\t\t\tcellNumber = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tHRow = sheet.createRow(ExcelRow);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getFormCode());\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getProjectMaster()==null ? \"\" : pcm.getProjectMaster().getProjId());\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getUserLogin().getName());\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t cell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getPayType()== null? pcm.getProjectMaster().getProjName() : pcm.getPayType());\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getProjectMaster().getBillTo() == null ? \"\" : pcm.getProjectMaster().getBillTo().getDescription());\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(df.format(pcm.getCreatedate()));\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getRefno());\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getClaimType().equals(\"CN\") ? \"Company\" : \"Customer\");\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(df.format(pcm.getCostdate()));\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getApprovalDate()==null? \"\" : df.format(pcm.getApprovalDate()));\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getTotalvalue());\n\t\t\t\t\t\t\tcell.setCellStyle(numberFormatStyle);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getVendor()==null?\"\":pcm.getVendor().getDescription());\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tpcm.setExportDate(UtilDateTime.nowTimestamp());\n\t\t\t\t\t\t\tExcelRow++;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t//\twriteExportDate(sr);\n\t\t\t\t//\twriteExportDate(sr);\n\t\t\t\t\t//写入Excel工作表\n\t\t\t\t\twb.write(response.getOutputStream());\n\t\t\t\t\t//关闭Excel工作薄对象\n\t\t\t\t\tresponse.getOutputStream().close();\n\t\t\t\t\tresponse.setStatus( HttpServletResponse.SC_OK );\n\t\t\t\t\tresponse.flushBuffer();\n//------------------------------------------\t\t\t\t\t\n\t\t\t\t\t\n\t//\t\t\t\tTransaction tx = hs.beginTransaction();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\ths.flush();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t//\tList result = findQueryResult(request);\n\t\t//\trequest.setAttribute(\"QryList\", result);\n\t\t}\n\t\treturn (mapping.findForward(\"success\"));\n\t}",
"ActionMap createActionMap() {\n ActionMap am = super.createActionMap();\n if (am != null) {\n am.put(\"selectMenu\", new PostAction((JMenu)menuItem, true)); }\n return am; }",
"public void setAction(String action) { this.action = action; }",
"@Override\r\n\tpublic void initActions() {\n\t\t\r\n\t}",
"public ActionForward populateHistopathology(ActionMapping mapping, ActionForm form, HttpServletRequest request,\n HttpServletResponse response) throws Exception {\n setCancerModel(request);\n \n setComments(request, Constants.Pages.HISTOPATHOLOGY);\n \n return mapping.findForward(\"viewHistopathology\");\n }",
"@Override\r\n\tpublic void actionMapper(String action) {\n\t\tProperty prop = javaScriptWindow.propertyTable.getPropertyTable()\r\n\t\t\t\t.getSelectedProperty();\r\n\t\tif (action.equalsIgnoreCase(CommonConstants.SAVEASNEWBUTTON)) {\r\n\t\t\tsaveAsNewButtonAction();\r\n\t\t}\r\n\t\tif (action.equalsIgnoreCase(CommonConstants.NEWBUTTON)) {\r\n\t\t\tnewButtonAction();\r\n\t\t}\r\n\t\tif (action.equalsIgnoreCase(CommonConstants.LOADBUTTON)) {\r\n\t\t\tloadButtonAction();\r\n\r\n\t\t}\r\n\t\tif (action.equalsIgnoreCase(JavaScriptConstants.SEARCHTEXTBOX)) {\r\n\t\t\tsearchTextAction();\r\n\t\t}\r\n\r\n\t\tif (action.equalsIgnoreCase(CommonConstants.RIGHTSIDECENTERTABLE)) {\r\n\t\t\trightSideCenterTableAction();\r\n\t\t}\r\n\t\tif (action.equalsIgnoreCase(CommonConstants.DELETEBUTTON)) {\r\n\t\t\tdeleteButtonAction();\r\n\t\t}\r\n\t}",
"@Override\n\tpublic boolean pickAndExecuteAnAction() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean pickAndExecuteAnAction() {\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic Message doAction() {\n\t\treturn null;\r\n\t}",
"public ActionForward populatePublications(ActionMapping mapping, ActionForm form, HttpServletRequest request,\n HttpServletResponse response) throws Exception {\n setCancerModel(request);\n \n setComments(request, Constants.Pages.PUBLICATIONS);\n \n return mapping.findForward(\"viewPublications\");\n }",
"public void processAction(ActionMapping mapping, ActionForm form, PortletConfig portletConfig,\r\n ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {\r\n\r\n long planTypeId = ParamUtil.getLong(actionRequest, PlanConstants.PLAN_TYPE_ID);\r\n PlansUserSettings userSettings = PlanLocalServiceHelper.getPlanUserSettings(actionRequest, planTypeId);\r\n Set<String> cols = new HashSet<String>();\r\n if (actionRequest.getParameter(\"columns\") == null) {\r\n SessionErrors.add(actionRequest, \"columns can't be empty\");\r\n }\r\n else {\r\n for (String s:actionRequest.getParameterMap().get(\"columns\")) {\r\n \t cols.add(s);\r\n }\r\n PlanType planType = PlanTypeLocalServiceUtil.getPlanType(planTypeId);\r\n for (Columns c: Columns.getPlanTypeColumns(planType)) {\r\n \t String name = c.name();\r\n \t c.setUserSetting(userSettings, cols.contains(name));\r\n }\r\n\r\n PlanLocalServiceHelper.saveUserSettings(actionRequest, userSettings);\r\n }\r\n\r\n \r\n \r\n String redirect = ParamUtil.getString(actionRequest, PlanConstants.REDIRECT);\r\n actionResponse.sendRedirect(redirect);\r\n }",
"@Override\n\tpublic ActionForward doDefault(ActionMapping mapping, ActionForm form,\n\t\t\tHttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows Exception {\n\t\t// TODO Auto-generated method stub\n\t\treturn null;\n\n\t}",
"@Override\r\n\tpublic ActionForward to_objectModify(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows KANException {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic boolean setUp(Action action) {\n\t\tif (action == null)\n\t\t\treturn false;\n\t\t\n\t\t// ACTIONS THAT LEAD TO THIS STATE\n\t\tif (action.ID == StateActionRegistry.A.GO)\n\t\t{\n\t\t\tGo g = (Go) action;\n\t\t\tif (g.owner == null || (g.loc == null && g.locationOf == null))\n\t\t\t\t\treturn false;\n\t\t\towner = g.owner;\n\t\t\tif (g.loc != null)\n\t\t\t{\n\t\t\t\tloc = g.loc;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tlocationOf = g.locationOf;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t\n\t\t// ACTIONS WHOSE PRECOND INCLUDES THIS STATE\n\t\tif (action.ID == StateActionRegistry.A.TAKE)\n\t\t{\n\t\t\tTake t = (Take) action;\n\t\t\tif (t.owner == null || t.taken == null)\n\t\t\t\treturn false;\n\t\t\towner = t.owner;\n\t\t\tlocationOf = t.taken;\n\t\t\treturn true;\n\t\t} else if (action.ID == StateActionRegistry.A.STEAL)\n\t\t{\n\t\t\t\n\t\t\tSteal s = (Steal) action;\n\t\t\tif (s.owner == null || s.stolen == null)\n\t\t\t\treturn false;\n\t\t\towner = s.owner;\n\t\t\tlocationOf = s.stolen;\n\t\t\treturn true;\n\t\t} else if (action.ID == StateActionRegistry.A.ASKTO)\n\t\t{\n\t\t\tAskTo a = (AskTo) action;\n\t\t\tif (a.asker == null || a.askee == null)\n\t\t\t\treturn false;\n\t\t\towner = a.asker;\n\t\t\tlocationOf = a.askee;\n\t\t\treturn true;\n\t\t} else if (action.ID == StateActionRegistry.A.GIVE)\n\t\t{\n\t\t\tGive g = (Give) action;\n\t\t\tif (g.giver == null || g.givee == null || g.obj == null || g.obj.owner != g.giver)\n\t\t\t\treturn false;\n\t\t\towner = g.giver;\n\t\t\tlocationOf = g.givee;\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t\n\t\treturn false;\n\t}",
"@Override\n public void doInit() {\n action = (String) getRequestAttributes().get(\"action\");\n }",
"public ActionForward show(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {\r\n\t\tActionMessages errors = new ActionMessages();\r\n\t\tManagerManager managerManager = ManagerManager.getInstance();\r\n\t\tFirmModifyForm firmModifyForm = (FirmModifyForm) form;\r\n\t\t\r\n\t\ttry {\r\n\t\t\t// Retrieve the firm we want to see (if he exists) \r\n\t\t\tString idFirm = request.getParameter(\"id\");\t\t\t\r\n\t\t\tif(idFirm != null && !\"\".equals(idFirm)) {\r\n\r\n\t\t\t\t// Retrieve the firm to modify\r\n\t\t\t\tFirm firm = managerManager.getFirmManager().retrieve(Long.parseLong(idFirm));\r\n\r\n\t\t\t\t// Reset all form\r\n\t\t\t\tfirmModifyForm.reset();\r\n\r\n\t\t\t\t// Set infos\r\n\t\t\t\tfirmModifyForm.setIdFirmToModify(idFirm);\r\n\t\t\t\tfirmModifyForm.setName(firm.getName());\r\n\t\t\t\tfirmModifyForm.setEmail(firm.getEmail());\r\n\t\t\t\tfirmModifyForm.setFax(firm.getFax());\r\n\t\t\t\tfirmModifyForm.setPhone(firm.getPhone());\r\n\t\t\t\tfirmModifyForm.setWeb(firm.getWebSite());\r\n\t\t\t\tfirmModifyForm.setChildFirms(firm.getChildfirm());\r\n\t\t\t\tfirmModifyForm.setEvents(firm.getEvents());\r\n\t\t\t\t\t\t\r\n\t\t\t\t// Parent firm\r\n\t\t\t\tif(firm.getMotherFirm() != null)\r\n\t\t\t\t\tfirmModifyForm.setIdParentFirm(Long.toString(firm.getMotherFirm().getId()));\r\n\t\t\t\t\r\n\t\t\t\t/*** Set address component ***/\r\n\t\t\t\tif(firm.getAddress() != null) {\r\n\r\n\t\t\t\t\t// Number of street and street\r\n\t\t\t\t\tfirmModifyForm.setAddress(firm.getAddress().getStreet());\r\n\r\n\t\t\t\t\t// Postal code\r\n\t\t\t\t\tfirmModifyForm.setPostalCode(firm.getAddress().getPostalCode());\r\n\r\n\t\t\t\t\t// Department\r\n\t\t\t\t\tif(firm.getAddress().getDepartment() != null)\r\n\t\t\t\t\t\tfirmModifyForm.setIdDepartment(Long.toString(firm.getAddress().getDepartment().getId()));\r\n\r\n\t\t\t\t\t// City\r\n\t\t\t\t\tfirmModifyForm.setCity(firm.getAddress().getCity());\r\n\r\n\t\t\t\t\t// Country\r\n\t\t\t\t\tfirmModifyForm.setCountry(\"\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfirmModifyForm.setParentFirms(ManagerManager.getInstance().getFirmManager().getFirmsLessParentFirms(firm));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Retrieve all departments and set them in the form\r\n\t\t\tfirmModifyForm.setDepartments((List <DepartmentEnum>)managerManager.getEmagineEnumManager().findAll(DepartmentEnum.class));\r\n\r\n\t\t} catch (EMagineException exception) {\r\n\t\t\texception.printStackTrace();\r\n\t\t\taddEMagineExceptionError(errors, exception);\r\n\t\t}\r\n\t\t\r\n // Report back any errors, and exit if any\r\n\t\treturn viewFormIfNoErrors(mapping, request, errors);\r\n\t}",
"public void action() {\n action.action();\n }",
"@Override\r\n\tpublic Action getAction() {\n\t\treturn Action.GRUNINST;\r\n\t}",
"public ActionForward execute(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response) {\r\n\t\tRootMaster rootMaster = new RootMaster();\r\n\t\tString strStatus=\"failure\";\r\n\t\tDataSource dataSource = getDataSource(request,\"entp\");\r\n\t\tFirstCreationForm firstCreationForm = (FirstCreationForm) form;// TODO Auto-generated method stub\r\n\t\tString phoneNo = firstCreationForm.getTxtCPPrefix()+\"~\"+firstCreationForm.getTxtCAreacode()+\"~\"+firstCreationForm.getTxtCPhone();\r\n\t\tString strResult=rootMaster.companyVerify(dataSource,firstCreationForm.getCompanySName(),firstCreationForm.getCompanyEMail(),phoneNo);\r\n\t\tif(!strResult.equals(\"success\"))\r\n\t\t{\r\n\t\t\tif(strResult.equals(\"sname\"))\r\n\t\t\t{\r\n\t\t\t\tActionErrors errors = new ActionErrors();\r\n\t\t\t\terrors.add(\"duplicate\", new ActionError(\"errors.company.duplicate\"));\r\n\t\t\t\t\r\n\t\t\t\tif(!errors.isEmpty())\r\n\t\t\t\t{\r\n\t\t\t\t\tsaveErrors(request, errors);\r\n\t\t\t\t}\r\n\t\t\t\tstrStatus=\"failure\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(strResult.equals(\"mailid\"))\r\n\t\t\t{\r\n\t\t\t\tActionErrors errors = new ActionErrors();\r\n\t\t\t\terrors.add(\"duplicate\", new ActionError(\"errors.company.mailId\"));\r\n\t\t\t\t\r\n\t\t\t\tif(!errors.isEmpty())\r\n\t\t\t\t{\r\n\t\t\t\t\tsaveErrors(request, errors);\r\n\t\t\t\t}\r\n\t\t\t\tstrStatus=\"failure\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(strResult.equals(\"phone\"))\r\n\t\t\t{\r\n\t\t\t\tActionErrors errors = new ActionErrors();\r\n\t\t\t\terrors.add(\"duplicate\", new ActionError(\"errors.company.phone\"));\r\n\t\t\t\t\r\n\t\t\t\tif(!errors.isEmpty())\r\n\t\t\t\t{\r\n\t\t\t\t\tsaveErrors(request, errors);\r\n\t\t\t\t}\r\n\t\t\t\tstrStatus=\"failure\";\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t//end company phone no check\r\n\t\t\r\n\t\tFirstCreationVo firstCreationVo=firstCreationForm.getFirstCreationVO();\r\n\t\tHttpSession session= request.getSession();\r\n\t\tsession.setAttribute(\"companyData\", firstCreationVo);\r\n\t\tstrStatus=\"success\";\r\n\t\t}\r\n\t\treturn mapping.findForward(strStatus);\r\n\t}",
"protected void init_actions()\n {\n action_obj = new CUP$ParserForms$actions(this);\n }",
"public String calcelAction() {\n\t\tthis.setViewOrNewAction(false);\n\t\treturn null;\n\t}",
"public ActionForward execute(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response)\r\n\t\tthrows Exception {\r\n\t\t//DataSource ds = (DataSource) getDataSource(request, \"dbaccounting\");\r\n\t\t//Connection conn = null;\r\n\t\tBankReconcileForm bankReconcileForm = (BankReconcileForm) form;\r\n\t\tActionForward forward = null;\r\n\t\tString action = mapping.getParameter();\r\n\t\tHttpSession session = request.getSession();\r\n\t\tUsers users = (Users)session.getAttribute(CommonConstants.USER);\r\n\t\tSet lst = (Set)session.getAttribute(CommonConstants.VIEWACCESS);\r\n\t\t\tif (users!=null) {\r\n\t\t\t\tif (CommonUtil.isHasRoleAccess(lst,request.getServletPath())) {\r\n\t\t\t\t\trequest.setAttribute(\"VIEWS\",lst);\r\n\t\t\t\t\tif (\"\".equalsIgnoreCase(action)) {\r\n\t\t\t\t\t\tforward = mapping.findForward(\"home\");\r\n\t\t\t\t\t} else if (\"LIST\".equalsIgnoreCase(action)) {\r\n\t\t\t\t\t\tforward = performPartialList(mapping, form, request, response);\r\n\t\t\t\t\t} else if (\"FORM\".equalsIgnoreCase(action)) {\r\n\t\t\t\t\t\tforward = performForm(mapping, form, request, response);\r\n\t\t\t\t\t} else if (\"SAVE\".equalsIgnoreCase(action)) {\r\n\t\t\t\t\t\tif (bankReconcileForm.getString(\"subaction\")!=null && bankReconcileForm.getString(\"subaction\").length()>0 && bankReconcileForm.getString(\"subaction\").equalsIgnoreCase(\"refresh\")) {\r\n\t\t\t\t\t\t\tforward = performForm(mapping, form, request, response);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tforward = performSave(mapping, form, request, response);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (\"DETAIL\".equalsIgnoreCase(action)) { \r\n\t\t\t\t\t\tforward = performDetail(mapping, form, request, response);\r\n\t\t\t\t\t} else if (\"DELETE\".equalsIgnoreCase(action)) {\r\n\t\t\t\t\t\tforward = performDelete(mapping, form, request, response);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn forward;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tActionMessages errors = new ActionMessages();\r\n\t\t\t\t\terrors.add(ActionMessages.GLOBAL_MESSAGE,new ActionMessage(\"error.privilage\",request.getContextPath()+mapping.getPath()));\r\n\t\t\t\t\tsaveMessages(request,errors);\t\t\t\t\r\n\t\t\t\t\treturn mapping.findForward(\"home\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\treturn mapping.findForward(\"index\");\r\n\t\t\t}\r\n\t}",
"private ActionForward performAction(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows Exception {\n\t\t\r\n\t\tTSchool schoolParam = new TSchool();\r\n\t\tFindSchool bean = (FindSchool)form;\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tApplicationContext ctx = SpringContextAware.getApplicationContext();\r\n\t\t\tBeanUtils.copyProperties(schoolParam, bean);\r\n\t\t\t\r\n\t\t\tSchoolContentUploadService service = (SchoolContentUploadService)ctx.getBean(\"schoolContentSerivce\");\r\n\t\t\tList<TSchool> schoolList = service.findAllSchools(schoolParam);\r\n\t\t\t\r\n\t\t\tif (schoolList == null || schoolList.size() == 0)\r\n\t\t\t{\r\n\t\t\t\tActionMessages errors = getErrors(request);\r\n\t\t\t\terrors.add(\"ERROR_NO_RECORDS\", new ActionMessage(\"error.no.content\",\"No Records Found for your search\"));\r\n\t\t\t\treturn mapping.findForward(\"displayPage\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tIExtendedPaginatedList pageList = new PaginatedListImpl();\r\n\t\t\tint pageSize = SEARCH_RESULT_PAGE_SIZE; // Rows per page\r\n\t\t\tpageList.setPageSize(5);\r\n\t\t\t\r\n\t\t\tpageList.setList(schoolList);\r\n\t\t\tbean.setPgSearchResults(pageList);\r\n\t\t\t\t\t\t\r\n\t\t\trequest.setAttribute(\"SCHOOLRESULT\", schoolList);\r\n\t\t\trequest.setAttribute(\"SIZE\", schoolList.size());\r\n\t\t\treturn mapping.findForward(\"success\");\r\n\t\t}\r\n\t\tcatch(Exception ex)\r\n\t\t{\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"@Override\n public void action() {\n }",
"@Override\n public void action() {\n }",
"@Override\n public void action() {\n }",
"@Override\n\tpublic void action() {\n\n\t}",
"@Override\n public String getAction() {\n return null;\n }",
"@Override\n\tpublic void createAction(Model m) {\n\t\t\n\t}",
"protected void onSubmitAction(IModel<StringWrapper> model, AjaxRequestTarget target, Form<?> form) {\n }",
"@Override\n protected void setUpActionBuilder()\n {\n super.setUpActionBuilder();\n actionBuilder.getActionStore().addAction(TEST_ACTION);\n }",
"public void setAction(String action)\n {\n // Check property\n if (action == null) \n { \n action = \"\"; \n }\n \n // If the specified context path already contains\n // a query string, append an ampersand character\n // for further parameter concatenation\n if (action.indexOf(\"=\") != -1)\n {\n action = action + \"&\";\n }\n else\n {\n action = action + \"?\";\n }\n \n // Set property\n this.action = action;\n }",
"public ActionForward display(ActionMapping mapping,\r\n ActionForm form,\r\n HttpServletRequest request,\r\n HttpServletResponse response) {\r\n Logger l = LogUtils.getLogger(getClass());\r\n if (l.isLoggable(Level.FINER)) {\r\n l.entering(getClass().getName(), \"display\", new Object[]{form, request, response});\r\n }\r\n\r\n String forwardString = \"loadResult\";\r\n\r\n try {\r\n // Secure page\r\n securePage(request, form);\r\n\r\n // Load policy header\r\n PolicyHeader policyHeader = getPolicyHeader(request);\r\n\r\n // Load grid header bean\r\n loadGridHeader(request);\r\n\r\n // Try to load import result, if there's no record\r\n // Populate dummy field to display empty grid initially\r\n Record inputRecord = getInputRecord(request);\r\n RecordSet rs = getQuickQuoteManager().loadAllImportResult(policyHeader, inputRecord);\r\n setDataBean(request, rs);\r\n\r\n // Publish out policy_load_event_header_fk and oasis_file_pk in summary record\r\n publishOutputRecord(request, rs.getSummaryRecord());\r\n\r\n // Load lov\r\n loadListOfValues(request, form);\r\n addJsMessages();\r\n }\r\n catch (Exception e) {\r\n forwardString = handleError(AppException.UNEXPECTED_ERROR, \"Failed to load quick quote page.\", e, request, mapping);\r\n }\r\n\r\n ActionForward af = mapping.findForward(forwardString);\r\n if (l.isLoggable(Level.FINER)) {\r\n l.exiting(getClass().getName(), \"display\", af);\r\n }\r\n return af;\r\n }",
"public ActionForward execute(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response)\n throws Exception {\n // Use the overridden getMethodName.\n return super.execute(mapping, form, request, response);\n }",
"public ActionForward unspecified(ActionMapping mapping,\r\n ActionForm form,\r\n HttpServletRequest request,\r\n HttpServletResponse response) throws Exception {\r\n return display(mapping, form, request, response);\r\n }",
"@Override\r\n\tpublic ActionForward executeSecureAction(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response) throws IOException,\r\n\t\t\tServletException, Exception\r\n\t{\r\n\t\tgetOperation(request);\r\n\r\n\t\tSet<AbstractFormContext> formContextCollection = new HashSet<AbstractFormContext>();\r\n\t\tMap<AbstractFormContext, Map<String, Object>> formContextParameterMap = new HashMap<AbstractFormContext, Map<String, Object>>();\r\n\r\n\t\tActionForward actionForward = mapping.findForward(Constants.PAGE_OF_SPP);\r\n\t\t//Save SPP events\r\n\t\tif (Boolean.parseBoolean(request.getParameter(Constants.SAVE_SPP_EVENTS)))\r\n\t\t{\r\n\t\t\tSPPEventProcessor sppEventProcessor = new SPPEventProcessor();\r\n\t\t\tformContextParameterMap = sppEventProcessor.populateFormContextParmaterMap(request\r\n\t\t\t\t\t.getParameterMap());\r\n\t\t\tformContextCollection.addAll(formContextParameterMap.keySet());\r\n\t\t\tboolean isEditOperation = false;\r\n\r\n\t\t\tList<String> listOfError = validateDEData(request, formContextCollection,\r\n\t\t\t\t\tformContextParameterMap, sppEventProcessor);\r\n\r\n\t\t\tif (listOfError.isEmpty())\r\n\t\t\t{\r\n\t\t\t\tfor (AbstractFormContext formContext : formContextCollection)\r\n\t\t\t\t{\r\n\t\t\t\t\tAction action = (Action) formContext;\r\n\r\n\t\t\t\t\t//Generate mock request object required for DE data entry\r\n\t\t\t\t\tMutableHttpRequest httprequest = getMockRequestObject(request,\r\n\t\t\t\t\t\t\tformContextParameterMap, formContext);\r\n\r\n\t\t\t\t\tMap<AbstractFormContext, Long> contextRecordIdMap = new SPPBizLogic()\r\n\t\t\t\t\t\t\t.generateContextRecordIdMap(formContext, action);\r\n\r\n\t\t\t\t\tSet<AbstractFormContext> contextCollection = new HashSet<AbstractFormContext>();\r\n\t\t\t\t\tcontextCollection.add(formContext);\r\n\r\n\t\t\t\t\tMap<AbstractFormContext, Long> contextVsRecordIdMap = sppEventProcessor\r\n\t\t\t\t\t\t\t.insertUpdateDEDataForSPPEvents(httprequest, contextRecordIdMap,\r\n\t\t\t\t\t\t\t\t\tcontextCollection);\r\n\r\n\t\t\t\t\tif (action.getApplicationDefaultValue() == null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tDEIntegration deIntegration = new DEIntegration();\r\n\t\t\t\t\t\tdeIntegration.insertAndHookRecordEntry(formContext, action,\r\n\t\t\t\t\t\t\t\tcontextVsRecordIdMap);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tisEditOperation = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tString[] displayNameParams = {Constants.DEFAULT_VALUES, Constants.SPP_EVENTS_MSG};\r\n\t\t\t\tsetSuccessMsg(request, displayNameParams, isEditOperation);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tsaveActionErrors(request, listOfError);\r\n\t\t\t\tactionForward = mapping.findForward(\"pageOfDisplaySPPDefaultValue\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn actionForward;\r\n\t}",
"@Override\n protected Action preSelectAction(State state, Set<Action> actions){\n // adding available actions into the HTML report:\n htmlReport.addActions(actions);\n return(super.preSelectAction(state, actions));\n }",
"@Override\n public ActionForward execute(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response)\n throws Exception {\n\n HttpSession session = request.getSession(true);\n Materia materia = (Materia) form;\n\n boolean modificada = false;\n\n String id_departamento = (String) session.getAttribute(\"usbid\");\n ArrayList<Materia> materias;\n\n if (materia.getNombre() == null || materia.getCreditos() == null\n || materia.getNombre().equals(\"\") || materia.getCreditos().equals(\"\")) {\n request.setAttribute(\"materia\", materia);\n request.setAttribute(\"campos_vacios\", FAILURE);\n return mapping.findForward(FAILURE);\n }\n\n if (!materia.getCreditos().matches(\"\\\\d+(.\\\\d+)?\")) {\n request.setAttribute(\"materia\", materia);\n request.setAttribute(\"creditos_incorrecto\", materia.getCreditos());\n return mapping.findForward(FAILURE);\n }\n\n if (materia.getCod1() == null) {\n materia.setCod1(\"\");\n }\n\n if (materia.getCod2() == null) {\n materia.setCod2(\"\");\n }\n\n if (materia.getNum2() == null) {\n materia.setNum2(\"\");\n }\n\n if (materia.getNum3() == null) {\n materia.setNum3(\"\");\n }\n\n if (materia.getNum4() == null) {\n materia.setNum4(\"\");\n }\n\n materia.setCodigo(materia.getCod1() + materia.getCod2() + materia.getNum2() + materia.getNum3() + materia.getNum4());\n\n if (materia.getCodigo().length() > 6 || materia.getCodigo().length() < 6) {\n request.setAttribute(\"materia\", materia);\n request.setAttribute(\"codigo_incorrecto\", materia.getCodigo());\n materia.setCod1(null);\n materia.setCod2(null);\n materia.setNum2(null);\n materia.setNum3(null);\n materia.setNum4(null);\n return mapping.findForward(FAILURE);\n\n }\n\n if (materia.getComentarios().equals(\"null\")) {\n modificada = DBMS.getInstance().modificarMateria(materia);\n\n if (modificada) {\n request.setAttribute(\"materia_modificada\", SUCCESS);\n } else {\n request.setAttribute(\"materia_no_modificada\", SUCCESS);\n }\n materias = DBMS.getInstance().listarMateriasOfertadas(id_departamento);\n\n request.setAttribute(\"materias\", materias);\n return mapping.findForward(SUCCESS);\n }\n return mapping.findForward(SUCCESS);\n }",
"@Override\n\tpublic ActionForward update(HttpServletRequest request, HttpServletResponse response) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic ActionForward update(HttpServletRequest request, HttpServletResponse response) {\n\t\treturn null;\n\t}",
"@Override\n public FormMappingOption adjustFormMapping() {\n return formMappingOption;\n }",
"public ActionForward init(ActionMapping mapping, ActionForm form,\n\t\t\tHttpServletRequest request, HttpServletResponse response) {\n\n\t\tHttpSession session = request.getSession();\n\t\tif (session.getAttribute(\"admin\") == null) {\n\t\t\treturn mapping.findForward(\"wrong\");\n\t\t} else {\n\t\t\tMessageService messageService = new MessageService();\n\t\t\tList<Message> msglist = messageService.getMessage();\n\t\t\trequest.setAttribute(\"msglist\", msglist);\n\t\t\tif (session.getAttribute(\"message\") != null) {\n\t\t\t\trequest.removeAttribute(\"message\");\n\t\t\t}\n\t\t\tOrderService orderService = new OrderService();\n\t\t\tint back = orderService.getOrderCount();\n\t\t\trequest.setAttribute(\"count\", back);\n\t\t\treturn mapping.findForward(\"list\");\n\t\t}\n\t}",
"@Override\r\n\tpublic ActionForward modify_object(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows KANException {\n\t\treturn null;\r\n\t}",
"@Override\r\n public void initAction() {\n \r\n }",
"public ActionTypeProperty withOptional(Boolean optional) {\n setOptional(optional);\n return this;\n }",
"public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {\n\t\t\n\t \tCardLookupListForm oform = (CardLookupListForm)form;\n\n\t \tParamsParser.setState( request, Applications.INVENTORY, oform.getAppState());\n\n\t \toform.setStoragetype(null);\n\t fillStoragePlace(oform);\n\t oform.setIsInside(fillAgregate(oform));\n\t fillResource(oform);\n\t fillResourcetypes(oform);\n\t fillManufacturer(oform);\n\t fillOwner(oform);\n\t if(oform.getResource() != null && (oform.getPagetype() == null || \"\".equals(oform.getPagetype()))) {\n\t\t if(\"S\".equals(oform.getPolicy())) {\n\t\t\t oform.setPagetype(\"2\");\n\t\t } else\n\t\t if(\"P\".equals(oform.getPolicy()) || \"B\".equals(oform.getPolicy())) {\n\t\t\t oform.setPagetype(\"3\");\n\t\t }\n\t }\n\t if(request.getParameter(\"pagetype\") != null) {\n\t\t oform.setPagetype(request.getParameter(\"pagetype\"));\n\t } else {\n\t\t oform.setPagetype(\"1\");\n\t\t}\n\t\tsuper.perform( mapping, form, request, response );\n//\t\ttc.finish(\"ACTION\");\n\t\treturn mapping.findForward( \"main\" );\n\t}",
"public ActionForward dropdown(ActionMapping mapping, ActionForm form, HttpServletRequest request,\n \t\t\tHttpServletResponse response) throws Exception {\n \n \t\tSystem.out.println(\"<ViralTreatmentPopulateAction dropdown> ... \");\n \n \t\t// blank out the FORMDATA Constant field\n \t\tViralTreatmentForm viralTreatmentForm = (ViralTreatmentForm) form;\n \t\trequest.getSession().setAttribute(Constants.FORMDATA, viralTreatmentForm);\n \n \t\t// setup dropdown menus\n \t\tthis.dropdown(request, response);\n \n \t\tSystem.out.println(\"<ViralTreatmentPopulateAction> exiting... \");\n \n \t\treturn mapping.findForward(\"submitViralTreatment\");\n \t}",
"@Override\n protected boolean needReadActionToCreateState() {\n return false;\n }",
"@Override\r\n public boolean onPrepareActionMode(ActionMode mode, Menu menu) {\n return false;\r\n }",
"@Override\n public boolean doAction(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response) {\n SearchAdvVendorContactFormBean formBean = (SearchAdvVendorContactFormBean) form;\n VendorContactBean bean = new VendorContactBean();\n\n bean.setVenId(formBean.getVenId());\n bean.setName(formBean.getName());\n bean.setPosition(formBean.getPosition());\n bean.setHandPhone(formBean.getHandPhone());\n bean.setHomePhone(formBean.getHomePhone());\n bean.setOfficePhone(formBean.getOfficePhone());\n bean.setEmail(formBean.getEmail());\n// bean.setBirthday(formBean.getBirthday());\n\n ArrayList vendorContactList = null;\n VendorDAO vendorDAO = new VendorDAO();\n try {\n vendorContactList = vendorDAO.searchAdvVendorContact(bean);\n } catch (Exception ex) {\n LogUtil.error(\"FAILED:VenderContact:searchAdv-\" + ex.getMessage());\n ex.printStackTrace();\n }\n request.setAttribute(Constants.VENDOR_CONTACT_LIST, vendorContactList);\n return true;\n }",
"public boolean prepareActionsIteration() {\n return this.prepareActionsIteration(mDemoId);\n }",
"protected ActionForward suite(ActionMapping mapping,ActionForm form , HttpServletRequest request, HttpServletResponse response, ActionErrors errors,Hashtable hParamProc ) throws ServletException{\r\n \tString signatureMethode =\r\n\t\t\t\"CompocfAction-suite(paramProc, mapping, form , request, response, errors )\";\r\n\r\n\t\tlogBipUser.entry(signatureMethode);\r\n \t//((CentrefraisForm)form).setLibcfrais(libCentreFrais);\r\n logBipUser.exit(signatureMethode);\r\n return mapping.findForward(\"initial\") ;\r\n\t}",
"@Override\n public void formPopulated(FormEvent fe) {\n formObject = FormContext.getCurrentInstance().getFormReference();\n\n formObject.setNGValue(\"purchasestatus\", \"\");\n formObject.setNGValue(\"purchaseremarks\", \"\");\n formObject.setNGValue(\"previousstatus\", \"\");\n formObject.setNGValue(\"returnpo\", \"\");\n\n String previousactivity = formObject.getNGValue(\"previousactivity\");\n if (previousactivity.equalsIgnoreCase(\"Initiator\")\n || previousactivity.equalsIgnoreCase(\"StoreMaker\")\n || previousactivity.equalsIgnoreCase(\"StoreChecker\")\n || previousactivity.equalsIgnoreCase(\"AccountsMaker\")\n || previousactivity.equalsIgnoreCase(\"AccountsChecker\")) {\n formObject.addComboItem(\"purchasestatus\", \"Hold\", \"Hold\");\n formObject.addComboItem(\"purchasestatus\", \"Exception Cleared\", \"Exception Cleared\");\n }\n\n if (previousactivity.equalsIgnoreCase(\"QualityMaker\")\n || previousactivity.equalsIgnoreCase(\"QualityChecker\")) {\n formObject.addComboItem(\"purchasestatus\", \"Hold\", \"Hold\");\n formObject.addComboItem(\"purchasestatus\", \"Replacement or Exchange\", \"Replacement or Exchange\");\n formObject.addComboItem(\"purchasestatus\", \"Purchase Return\", \"Purchase Return\");\n }\n\n formObject.clear(\"proctype\");\n Query = \"select HeadName from supplypoheadmaster order by HeadName asc\";\n System.out.println(\"Query is \" + Query);\n result = formObject.getDataFromDataSource(Query);\n for (int i = 0; i < result.size(); i++) {\n formObject.addComboItem(\"proctype\", result.get(i).get(0), result.get(i).get(0));\n }\n }"
] | [
"0.64066225",
"0.5998093",
"0.5849151",
"0.570937",
"0.5463069",
"0.5391982",
"0.5371211",
"0.5368108",
"0.5345019",
"0.53241813",
"0.5297045",
"0.52947295",
"0.52828425",
"0.52814513",
"0.52425075",
"0.52265143",
"0.5207603",
"0.5202604",
"0.51810014",
"0.51789653",
"0.5163282",
"0.516064",
"0.5156318",
"0.5148697",
"0.5130081",
"0.5122809",
"0.51222616",
"0.5110387",
"0.5095704",
"0.50921744",
"0.50763494",
"0.5075631",
"0.5061118",
"0.50568986",
"0.503926",
"0.5023867",
"0.50192654",
"0.5015524",
"0.50153524",
"0.50108016",
"0.50089836",
"0.5004258",
"0.4999604",
"0.49954784",
"0.499384",
"0.49851695",
"0.49823853",
"0.49823666",
"0.49653316",
"0.49480334",
"0.4945866",
"0.49408248",
"0.49394134",
"0.49341312",
"0.49341312",
"0.49288228",
"0.49252668",
"0.49097604",
"0.49051103",
"0.49015862",
"0.48993778",
"0.48864236",
"0.4877453",
"0.48765194",
"0.48741126",
"0.48739317",
"0.48713323",
"0.48609197",
"0.48588198",
"0.4855743",
"0.48518533",
"0.48518533",
"0.48518533",
"0.48438033",
"0.48374102",
"0.48371217",
"0.4834177",
"0.48324358",
"0.48289007",
"0.4826131",
"0.48236683",
"0.48205099",
"0.48187372",
"0.48124915",
"0.48078355",
"0.48076484",
"0.48076484",
"0.48042268",
"0.48002547",
"0.48001593",
"0.47977272",
"0.4784929",
"0.47828153",
"0.47733724",
"0.4773157",
"0.4757757",
"0.47432503",
"0.47296363",
"0.47295287",
"0.47180316"
] | 0.70618284 | 0 |
/ Overridden to allow us to log some extra info on performance which is also helpful in diagnosing problems. Delegates to superclass to do the actual work. | public void process(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
{
if(_log.isInfoEnabled())
{
_log.info("Started processing action request: " + request.getServletPath());
}
long startTime = System.currentTimeMillis();
processInlineException(request);
super.process(request, response);
long endTime = System.currentTimeMillis();
if(_log.isInfoEnabled())
{
_log.info("Completed processing action request (in approx " + (endTime - startTime) + " ms)");
OperationContext.logActiveContexts(request, _log);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public void setPerformanceInfo() throws Exception;",
"public abstract void logTraceTime();",
"public void testPerformance() {\n \t}",
"public void startMeasuring() {\n\tsuper.startMeasuring();\n}",
"public void assertPerformance() {\n\tsuper.assertPerformance();\n}",
"@Override\n\tpublic void increaseSpeed() {\n\t\tSystem.out.println(\"increaseSpeed\");\n\t\t\n\t}",
"public void logElapsedTime() {\r\n\r\n NumberFormat nf = NumberFormat.getInstance();\r\n\r\n nf.setMaximumFractionDigits(2);\r\n nf.setMinimumFractionDigits(2);\r\n\r\n historyString = new String(\"Elapsed Time = \" + nf.format(getElapsedTime()) + \" sec.\\n\");\r\n writeLog();\r\n }",
"@Override\r\n\tpublic double getSlowness() {\n\t\treturn 10;\r\n\t}",
"@Override\r\n\tpublic void showSpeed() {\n\t\tSystem.out.println(\"i can run at 100km/h\");\r\n\t}",
"public void addPerformance (String methodName, long startTime) {\n if (!isPerformance) {\n return;\n }\n theBrowserMgr.addPerformance(methodName, startTime);\n }",
"protected abstract void trace_pre_updates();",
"public static void performanceStart(String description) {\n String msg = makePerformanceLogText(\"start\", description);\n if (XLOG_ENABLED) {\n Xlog.i(MTK_LOG_TAG, msg);\n } else {\n Log.i(MTK_LOG_TAG, msg);\n }\n }",
"private void divertLog() {\n wr = new StringWriter(1000);\n LogTarget[] lt = { new WriterTarget(wr, fmt) };\n SampleResult.log.setLogTargets(lt);\n }",
"@Test\n\tpublic void testPerformance()\n\t{\n\t\tString\t\ttestName\t= logTestName();\n\n\t\tint\t\tcPass\t\t\t= 5;\n\t\tint\t\tiMax\t\t\t= 1000 * 1000;\n//\t\tint[]\tcThreadList\t\t= { 1, 2, 4, 6, 8 };\n\t\tint[]\tcThreadList\t\t= { 1, 2, 4 };\n\n\t\tStringGroup\t\t\t\tnameList\t\t\t= new StringGroup(testName);\n\t\tLockCounterFamily\t\tcounterFamily\t\t= new LockCounterFamily(nameList);\n\t\tMagicNamedCounter\t\tnamedCounter\t\t= new MagicNamedCounter(counterFamily);\n\t\tfor (int cThread : cThreadList)\n\t\t{\n\t\t\tmeasurePerformance(new SynchronizedCounter(),\tcPass, iMax, cThread);\n\t\t\tmeasurePerformance(new AtomicCounter(),\t\t\tcPass, iMax, cThread);\n\t\t\tmeasurePerformance(new MagicReadCounter(),\t\tcPass, iMax, cThread);\n\t\t\tmeasurePerformance(new PlainWriteCounter(),\t\tcPass, iMax / 20, cThread);\n\t\t\tmeasurePerformance(new MagicWriteCounter(),\tcPass, iMax, cThread);\n\n\t\t\tmeasurePerformance(namedCounter,\t\t\tcPass, iMax, cThread);\n\t\t}\n\t}",
"private void tryToLog(Object proxy, long timeStart, Method method, Object[] args) {\n if (DynamicProxyUtil.LOGGER_ON) {\n long timeStop = System.nanoTime();\n System.out.println(String.format(OUTPUT_FORMAT, timeStop - timeStart, proxy.getClass().getName(),\n PROXIED_OBJECT.getClass().getName() + \"#\" + method.getName(), Arrays.toString(args).replaceAll(\"\\n\",\"\").trim()));\n }\n }",
"public static void startTimeMeasure() {\n \tstartTime = System.nanoTime();\n }",
"@Override\n protected void accelerate() {\n System.out.println(\"Bike Specific Acceleration\");\n }",
"public Object updatePerformance()\r\n/* */ {\r\n\t\t\t\tlogger.info(count++ + \" About to updatePerformance : \" + \"Agent\");\r\n/* 261 */ return this;\r\n/* */ }",
"public static void performanceTester() {\n logger.warn(\"Random Array created as final.\");\n logger.warn(\"Potential for issues within sort methods\");\n final int[] testArray = ArrayCreator.createRandomArray();\n for (int sortNumber = 1 ; sortNumber <= 6 ; sortNumber++) {\n Printer.printMessage(\"\");\n Printer.printMessage(Factory.ReturnSortType(sortNumber));\n long start = System.nanoTime();\n Printer.printMessage(\"Sorted Array : \" + Arrays.toString(ConsoleInteraction.initialiseSorter(sortNumber, testArray)));\n // Want to include a logger here for testArray to make sure it doesn't change (immutable for next loop)\n long finish = System.nanoTime();\n Printer.printMessage(\"Time taken : \" + (finish - start) + \" \" + \"nanoseconds\");\n }\n }",
"public interface Performance {\n void perform();\n}",
"abstract protected void _log(TrackingActivity activity) throws Exception;",
"@Override\n public void warmUp() {\n System.out.println(super.getName() + \" (\" + this.modality() + \") is warming up...\");\n }",
"protected void postRun() {\r\n\t\tthis.calculateFlowBandwidthHops();\r\n\t\tdouble abt = this.ABT();\r\n\t\tdouble agt = this.AGT();\r\n\t\tthis.metrics.add(new ResultMetric(\"ABT\", abt));\r\n\t\tthis.metrics.add(new ResultMetric(\"AGT\", agt));\r\n\t\tthis.metrics.add(new ResultMetric(\"Hops\", this.Hops()));\r\n\t\tthis.metrics.add(new ResultMetric(\"AveHops\", this.Hops()\r\n\t\t\t\t/ this.flows.size()));\r\n\t\tthis.metrics.add(new ResultMetric(\"SuccCount\", this.successfulCount));\r\n\t\tthis.metrics.add(new ResultMetric(\"FailCount\", this.failedCount));\r\n\t\tthis.metrics.add(new ResultMetric(\"ServerNum\", this.dcn\r\n\t\t\t\t.getServerUUIDs().size()));\r\n\t\tthis.metrics.add(new ResultMetric(\"ThroughputPerLink\", abt\r\n\t\t\t\t/ this.dcn.linkCount()));\r\n\t}",
"@Override\n public void log()\n {\n }",
"abstract protected void _log(TrackingEvent event) throws Exception;",
"public SpeedLogEntry(double aSpeed, int aLogGroup){\n\t\tthis(new Date(System.currentTimeMillis()), aSpeed, aLogGroup);\n\t}",
"public void traceStatus() {\n logger.trace(\"jvmThread: {}, jvmMethod: {}\", jvmThread, jvmMethod);\n logger.trace(\"localVariables: {}\", localVariables);\n logger.trace(\"operandStacks: {}\", operandStacks);\n }",
"private static void compute_performances(Server server) {\n System.out.println(\"E[N]: Average number of packets in the buffer/queue: \" + round((double) runningBufferSizeCount / totalTicks));\n System.out.println(\"E[T]: Average sojourn time: \" + round((double) server.getTotalPacketDelay() / totalPackets + (double) serviceTime)\n + \"/packet\");\n System.out.println(\"P(idle): The proportion of time the server is idle: \"\n + round((double) server.getIdleServerCount() / totalTicks * 100) + \"%\");\n if (maxBufferSize >= 0) {\n System.out.println(\"P(loss): The packet loss probability: \" + round((double) droppedPacketCount / totalPackets * 100) + \"%\");\n }\n }",
"public abstract int trace();",
"protected void printExecutionTime(){\n //Do nothing\n }",
"public void logData(){\n }",
"private void optimiseEVProfile()\n\t{\n\t}",
"protected long logTestStart(String methodName) {\n\t\tString startTimeString = new SimpleDateFormat(\"MM/dd/yyyy HH:mm:ss\").format(new Date());\n\t\tlogEntry(\"*** START \" + methodName + \": \" + testProperties.getEnvironmentName() + \" / \" + browser + \" / \"\n\t\t\t\t+ startTimeString);\n\t\treturn System.nanoTime();\n\t}",
"public String getPerformanceTime()\r\n {\r\n return performanceTime;\r\n }",
"void log() {\n\t\tm_drivetrain.log();\n\t\tm_forklift.log();\n\t}",
"void dumpStats() {\n long wallTimeNanos = totalStopwatch.elapsed(TimeUnit.NANOSECONDS);\n long dbtime = 0;\n for (String name : methodCalls.keySet()) {\n long calls = methodCalls.get(name);\n long time = methodTotalTime.get(name);\n dbtime += time;\n long average = time / calls;\n double proportion = (time + 0.0) / (wallTimeNanos + 0.0);\n log.info(name + \" c:\" + calls + \" r:\" + time + \" a:\" + average + \" p:\" + String.format(\"%.2f\", proportion));\n }\n double dbproportion = (dbtime + 0.0) / (wallTimeNanos + 0.0);\n double hitrate = (hit + 0.0) / (hit + miss + 0.0);\n log.info(\"Cache size:\" + utxoCache.size() + \" hit:\" + hit + \" miss:\" + miss + \" rate:\"\n + String.format(\"%.2f\", hitrate));\n bloom.printStat();\n log.info(\"hasTxOut call:\" + hasCall + \" True:\" + hasTrue + \" False:\" + hasFalse);\n log.info(\"Wall:\" + totalStopwatch + \" percent:\" + String.format(\"%.2f\", dbproportion));\n String stats = db.getProperty(\"leveldb.stats\");\n System.out.println(stats);\n\n }",
"public void reportStats() {\n System.out.println(\"Number of requests: \" + (requestCount - warmUpRequests));\n System.out.println(\"Number of hits: \" + hitCount);\n System.out.println(\"hit ratio: \" + (double) hitCount / (requestCount - warmUpRequests));\n System.out.println(\"Average hit cost: \" + (double) hitCost / hitCount);\n }",
"public static /*synchronized*/ void addSelectionResultLog(long start, long end, int resultSize){\n\t\tQUERY_COUNT++;\n\t\tLOG.appendln(\"Query \" + QUERY_COUNT + \": \" + resultSize + \" trajectories in \" + (end-start) + \" ms.\");\n\t\tLOG.appendln(\"Query ends at: \" + end + \" ms.\");\n\t}",
"public String getPerformanceName()\r\n {\r\n return performanceName;\r\n }",
"abstract protected void _log(Source src, OpLevel sev, String msg, Object... args) throws Exception;",
"public SlowQueryReport() {\n super();\n }",
"private void computePerformance(int ticks) {\n System.out.println(\"Avergae number of packets in queue: \" + (_cumulativePacketsInQueue / (double)ticks));\n \n // Average time spent in queue per packet\n System.out.println(\"Average sojurn time: \" + (_totalSojurnTime / (double)_numPacketsProcessed));\n\n // Percentage idle time\n System.out.println(\"Percentage idle time: \" + ((_totalIdleTime / (double)ticks) * 100) + \"%\");\n\n // Packet loss probability\n System.out.println(\"Packet loss proability: \" + ((_numPacketsDropped / (double)(_numPacketsDropped + _numPacketsProcessed)) * 100) + \"%\");\n }",
"@Ignore(\"Google's LRU map max size is not predictable\")\n\t@Override\n\tpublic void statsTest()\n\t{\n\t}",
"public interface PerformanceTest {}",
"public void doGeneralThings() {\n logger.debug(\"Overrided or implememted method - doGeneralThings!\");\n }",
"public abstract void logTraceTime(File file, String description);",
"public static void main(String[] args) {\n testSpeed();\r\n }",
"public abstract void setTotalRunTime();",
"public void run() {\r\n setStartTime();\r\n ///if ( this instanceof AlgorithmHistoryInterface ) {\r\n /// constructLog();\r\n ///}\r\n\r\n runAlgorithm();\r\n\r\n // write out anything that the algorithm put into the (history) logging string(s)\r\n writeLog();\r\n\r\n computeElapsedTime();\r\n\r\n if (Preferences.debugLevel(Preferences.DEBUG_ALGORITHM)) {\r\n logElapsedTime();\r\n }\r\n\r\n notifyListeners(this);\r\n\r\n /// finalize();\r\n }",
"abstract void initiateLog();",
"@Override\r\n\tprotected void processCost() {\n\r\n\t}",
"public abstract void logKenaiUsage(Object... parameters);",
"protected void additionalProcessing() {\n\t}",
"private void logCacheStatus() {\n if (!LOGGER.canLogAtLevel(LogLevel.VERBOSE)) {\n return;\n }\n\n final int size = cache.size();\n final int length = cache.getTotalLength();\n\n LOGGER.atVerbose()\n .addKeyValue(SIZE_KEY, size)\n .addKeyValue(TOTAL_LENGTH_KEY, length)\n .log(\"Cache entry added or updated. Total number of entries: {}; Total schema length: {}\",\n size, length);\n }",
"public void show() {\n\t\t\n\t\tSystem.out.println(\"time (tree setup) = \" + treeSetup + \" ms\");\n\t\tSystem.out.println(\"time (average search) = \" + (totalSearch/(float)countSearch) + \" ms\");\n\t\tSystem.out.println(\"time (average at) = \" + (totalAt/(float)countAt) + \" ms\");\n \t}",
"private void logDeviceInfo() {\n logDeviceLevel();\n }",
"private void logDeviceInfo() {\n logDeviceLevel();\n }",
"public void printMetrics() {\n System.out.println(\"\\nPROG_SIZE = \" + Metrics.getProgSize() + '\\n' + \"EXEC_TIME = \" + Metrics.getExecTime() + \" ms\" + '\\n' + \"EXEC_MOVE = \" + Metrics.getExecMove() + '\\n' + \"DATA_MOVE = \" + Metrics.getDataMove() + '\\n' + \"DATA_READ = \" + Metrics.getDataRead() + '\\n' + \"DATA_WRITE = \" + Metrics.getDataWrite() + '\\n');\n }",
"@Override\r\n\tpublic String log(String info) {\n\t\tlong id=Thread.currentThread().getId();\r\n\t\tCalcThread b=ProCalcManage.getInstance().threadIDMap.get(id);\r\n\t\tsynchronized (b.proinfo.info.log) {\r\n\t\t\tb.proinfo.info.log.add(new LogInfo(new Date(), info));\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn info;\r\n\t}",
"public static void actionLogPreProcessor(ActionSubOperation subOperation, String targetEntity) {\n MDC.put(BEGIN_TIMESTAMP, String.valueOf(System.currentTimeMillis()));\n if (subOperation != null) {\n MDC.put(TARGET_SERVICE_NAME, subOperation.name());\n }\n MDC.put(TARGET_ENTITY, targetEntity);\n }",
"@Override\r\n\tpublic void speed() {\n\t}",
"public static void performanceCountDisable() { }",
"public void tune() {\n\t\tSystem.out.println(\"ting.. ting...\");\n\t}",
"public static void better() {\n System.out.println(\"I am 'efficient'\");\n }",
"@Override\n public void printDetails() {\n super.printDetails(); // uses its superclass version of the method to print the basic attributes\n System.out.print(\"Time: \" + this.getTime()); // printing the time of the event\n }",
"@Override\r\n\tpublic void doWorkFlowAnalysis() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic long usage() {\n\t\t\t\n\t\t\treturn super.usage();\n\t\t}",
"private static double simpleSpeedupRun(String [] args){\n\t\tString applicationPath = convertApplication(args[2], new String[] {\"1\", \"2\"});\n\t\tConfMan configManager;\n\n\t\tconfigManager = new ConfMan(args[1],applicationPath, false);\n\t\t\n\t\tTrace speedupTrace = new Trace(System.out, System.in, \"\", \"\");\n\t\tif(configManager.getTraceActivation(\"config\")){\n\t\t\tspeedupTrace.setPrefix(\"config\");\n\t\t\tconfigManager.printConfig(speedupTrace);\n\t\t}\n\t\tspeedupTrace.setPrefix(\"speedup\");\n\t\t\n\t\t\n\t\tspeedupTrace.printTableHeader(\"Measuring simple speedup\");\n\t\tspeedupTrace.printTableHeader(\"Running without Synthesis\");\n\t\tAmidarSimulationResult resultsOFF = run(configManager, null, false);\n\n\t\t\n\t\t\n\t\tspeedupTrace.printTableHeader(\"Running again with Synthesis\");\n\t\tconfigManager.setSynthesis(true);\n\t\tAmidarSimulationResult resultsON = run(configManager, null, false);\n\n\t\tdouble speedup = (double)resultsOFF.getTicks()/(double)resultsON.getTicks();\n\t\tdouble energySavings = (double)resultsON.getEnergy()/(double)resultsOFF.getEnergy();\n\n\t\tDecimalFormatSymbols symbols = new DecimalFormatSymbols();\n\t\tsymbols.setGroupingSeparator(',');\n\t\tsymbols.setDecimalSeparator('.');\n\t\tDecimalFormat formater = new DecimalFormat(\"#0.000\", symbols);\n\n\t\tif(configManager.getTraceActivation(\"results\")){\n\t\t\tspeedupTrace.setPrefix(\"results\");\n\t\t\tspeedupTrace.printTableHeader(\"Simulated \"+applicationPath+\" - Simple Speedup Measurement\");\n\t\t\tspeedupTrace.println(\"Ticks without synthesis: \"+resultsOFF.getTicks());\n\t\t\tspeedupTrace.println(\"Ticks with synthesis: \"+resultsON.getTicks());\n\t\t\tspeedupTrace.println(\"Speedup: \"+formater.format(speedup));\n\t\t\tspeedupTrace.println();\n\t\t\tspeedupTrace.println(\"Energy without synthesis: \"+formater.format(resultsOFF.getEnergy()));\n\t\t\tspeedupTrace.println(\"Energy with synthesis: \"+formater.format(resultsON.getEnergy()));\n\t\t\tspeedupTrace.println(\"Energy savings: \"+formater.format((1-energySavings)*100) + \"%\");\n\t\t\t\n\t\t\tspeedupTrace.printTableHeader(\"Loop Profiling\");\n\t\t\tresultsON.getProfiler().reportProfile(speedupTrace);\n\t\t\tspeedupTrace.printTableHeader(\"Kernel Profiling\");\n\t\t\tresultsON.getKernelProfiler().reportProfile(speedupTrace, resultsON.getTicks());\n\t\t}\n\t\t\t\n\t\treturn speedup;\n\n\t}",
"public SpeedLogEntry(Date aTime, double aSpeed, int aLogGroup){\n\t\tmTime = aTime;\n\t\tmSpeed = aSpeed;\n mLogGroup = aLogGroup;\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"private void doIt() {\n\t\tlogger.debug(\"hellow this is the first time I use Logback\");\n\t\t\n\t}",
"public void startBatch() {\n\trunTimer.setVerbose(detailedMetrics);\n\trunTimer.start();\n }",
"protected void internalStop() {\n super.internalStop();\n\n // Do the logging here\n log(this);\n }",
"private static String elapsed(long start) {\r\n\treturn \": elapsed : \" + (System.currentTimeMillis() - start) + \" ms \";\r\n }",
"protected void log(Object msg) {\n\t\n\t\tSystem.out.println(\"MusicDataAccessor: \" + msg);\n\t}",
"private double getOEEPerformance(Batch batch) {\n return 1;\n }",
"public abstract long getTrace();",
"protected long logTestStart(String methodName, String comment) {\n\t\tscreenshotAdditionalData = comment;\n\t\tString startTimeString = new SimpleDateFormat(\"MM/dd/yyyy HH:mm:ss\").format(new Date());\n\t\tlogEntry(\"*** START \" + methodName + \" (\" + comment + \"): \" + testProperties.getEnvironmentName() + \" / \"\n\t\t\t\t+ browser + \" / \" + startTimeString);\n\t\treturn System.nanoTime();\n\t}",
"public void logCurrentState(int level, RuleMaps rm, String additionalInformation) throws IOException, Exception {\n\n \n \n if (level == -999 && (printIterationSummary||printDetailEval)) {\n evalContainer.addEvaluationPointMemWise(rm, true, orderCounter.incrementAndGet(), TOP_N_PARSE_PORTION_TO_CHOOSE);\n String toWebChartFile = evalContainer.toWebChartFile();\n String toWebChartFileRole = evalContainer.toWebChartRoleFile();\n System.err.println(\"XML results are written in \\n\\t\" + toWebChartFile + \"\\n\\t \" + toWebChartFileRole);\n String toWrite = tabbingForPrint + level + \"\\t:\" + evalContainer.getCurrentIterationEvalSummary() + \" \" + evalContainer.getEvaluationGoldFile();\n System.err.println(\"> \" + toWrite);\n pwEMPlotReport.println(toWrite);\n pwEMPlotReport.flush();\n pwSummaryForTest.println(\n tabbingForPrint + \"\\t\"\n + evalContainer.getCurrentIterationEvalSummary()\n + \"\\t\\t\"\n + evalContainer.getEvaluationGoldFile()\n + \" \" + additionalInformation\n ); //+ \" \" + getCurrentParams());\n pwSummaryForTest.flush();\n \n }\n\n }",
"@Override\n\tpublic\n\tvoid speed() {\n\t\t\n\t}",
"public void record() {\n stats.record();\n }",
"@Override\n\tpublic int isFast() {\n\t\treturn 2;\n\t}",
"protected void logNonVerbose(StringWriter writer) {\n writeInvocation(perfromedInvocations.get(perfromedInvocations.size() - 1), writer);\n\n // log human consumable trace of activity ids and names\n List<Map<String, String>> activityTrace = collectActivityTrace();\n logActivityTrace(writer, activityTrace);\n }",
"@Override\r\n\tpublic void internalWorked(double work) {\n\r\n\t}",
"@Override\n\t\t\tpublic void internalWorked(double work) {\n\t\t\t\t\n\t\t\t}",
"public void init(FunctionContext context) throws Exception{\n logger.debug(\"In Default PerformanceFunction Init\");\n }",
"public void onLogFPS() {\n }",
"@Override\n public void storePatch(Patch p, int bankNum, int patchNum) {\n if (isTipsMsg()) {\n // show Information\n YamahaDX7Strings.dxShowInformation(toString(),\n YamahaDX7Strings.PERFORMANCE_STRING);\n }\n }",
"private PrecisionAndRecall() {\n\n }",
"private static void _logInfo ()\n {\n System.err.println (\"Logging is enabled using \" + log.getClass ().getName ());\n }",
"public abstract void addPerformanceEntry(PerformanceEntry __e)\n\t\tthrows NullPointerException;",
"private void logOperation(String operation, String function) {\r\n m_logger.debug(\"ObjectPool2 '\" + m_desc + \"' \" + operation + \" \" + function);\r\n }",
"public void doLog() {\n SelfInvokeTestService self = (SelfInvokeTestService)context.getBean(\"selfInvokeTestService\");\n self.selfLog();\n //selfLog();\n }",
"abstract protected void _log(Snapshot snapshot) throws Exception;",
"private void traceVerbose(String info) {\n if (showVerbose && trace) {\n worker.trace(\"-- \" + info + \"\\n\", \"out\", device_id);\n }\n }",
"protected int getTimesOptimized()\r\n {\r\n return timesOptimized;\r\n }",
"public void logPerfElem(long[] times, XSLTestfileInfo fileInfo, String flavor)\n {\n Hashtable attrs = new Hashtable();\n // Add general information about this perf elem\n attrs.put(\"UniqRunid\", testProps.getProperty(\"runId\", \"runId;none\"));\n attrs.put(\"processor\", flavor);\n // idref is the individual filename\n attrs.put(\"idref\", (new File(fileInfo.inputName)).getName());\n // inputName is the actual name we gave to the processor\n attrs.put(\"inputName\", fileInfo.inputName);\n\n // Add all available specific timing data as well\n for (int i = 0; i < times.length; i++)\n {\n // Only log items that have actual timing data\n if (TransformWrapper.TIME_UNUSED != times[i])\n {\n attrs.put(TransformWrapperHelper.getTimeArrayDesc(i), \n new Long(times[i]));\n }\n }\n\n // Log the element out; note formatting matches\n reporter.logElement(Logger.STATUSMSG, \"perf\", attrs, fileInfo.description);\n }",
"public void logSensorData () {\n\t}",
"public static void performanceCountReset() { }",
"public void setCPUTime() {\r\n\t\t\tthis.CPUTime = 0;\r\n\t\t}",
"public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }"
] | [
"0.70495737",
"0.65193653",
"0.6413711",
"0.6136403",
"0.6026827",
"0.59084976",
"0.5889047",
"0.58005023",
"0.57574713",
"0.56892824",
"0.5679583",
"0.55744994",
"0.5569646",
"0.5560178",
"0.5513519",
"0.54960775",
"0.549307",
"0.54853314",
"0.5469545",
"0.5457681",
"0.5451719",
"0.544723",
"0.5445473",
"0.54438907",
"0.5439003",
"0.5419875",
"0.5413248",
"0.5401775",
"0.53945535",
"0.53838885",
"0.53761697",
"0.5370409",
"0.5355889",
"0.53440166",
"0.53402495",
"0.533267",
"0.5329856",
"0.53284144",
"0.5322366",
"0.53195316",
"0.5304076",
"0.529888",
"0.5289921",
"0.52813774",
"0.5277949",
"0.5277015",
"0.5275983",
"0.5267627",
"0.52667564",
"0.5264357",
"0.5262933",
"0.52600294",
"0.52538526",
"0.52467775",
"0.5244682",
"0.52384764",
"0.52384764",
"0.5228168",
"0.5222851",
"0.5207947",
"0.5206038",
"0.51817566",
"0.5179743",
"0.51603353",
"0.5145362",
"0.5145269",
"0.51443017",
"0.51305723",
"0.5128076",
"0.51264507",
"0.51250213",
"0.5122346",
"0.510528",
"0.51051575",
"0.5102726",
"0.5095749",
"0.5094436",
"0.5086974",
"0.508639",
"0.5084759",
"0.50820124",
"0.5080985",
"0.50761104",
"0.50724584",
"0.5070777",
"0.50659406",
"0.50616705",
"0.5058075",
"0.5057953",
"0.50523984",
"0.5049523",
"0.50440896",
"0.50430447",
"0.5042941",
"0.50420535",
"0.50413805",
"0.5037082",
"0.5026413",
"0.5026118",
"0.5025785",
"0.50225186"
] | 0.0 | -1 |
/ Will delegate to superclass implementation to get the path, but before returning it will for our convienience put the returned String into a request attribute under the key PROCESSED_PATH so that we can easily make further use of it later while processing the action. | protected String processPath(HttpServletRequest request,
HttpServletResponse response)
throws IOException
{ //20030305AH - Store result of processPath() in request attribute so can use it later for
//looking up stuff - such as in navigationRenderer...
String path = super.processPath(request, response);
request.setAttribute(PROCESSED_PATH, path);
return path;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String getResourcePath() {\n\t\tString reqResource = getRequest().getResourceRef().getPath();\n\t\treqResource = actualPath(reqResource, 1);\n\t\tLOGGERS.info(\"reqResourcePath---->\" + reqResource);\n\t\treturn reqResource;\n\t}",
"public abstract String getRequestPathInfo();",
"@Override \n public String getPathInfo() {\n if (pathInfo != null) {\n return pathInfo;\n }\n \n StringBuilder buffer = new StringBuilder();\n if (getRequestURIWithoutQuery().length() > 0) {\n if (getScriptName().length() > 0 && getRequestURIWithoutQuery().indexOf(getScriptName()) == 0) {\n buffer.append(getRequestURIWithoutQuery().substring(getScriptName().length()));\n } else {\n buffer.append(getRequestURIWithoutQuery());\n }\n } else {\n buffer.append(getServletPath());\n if (super.getPathInfo() != null) {\n buffer.append(super.getPathInfo());\n }\n }\n return pathInfo = buffer.toString();\n }",
"public abstract String getRequestServletPath();",
"private static String getPath (HttpServletRequest request) {\n String path = request.getServletPath();\n return path != null ? path : request.getPathInfo();\n }",
"@Override\n public String getRequestURI() {\n if (httpRequest instanceof HttpRequestImpl) {\n return strip(context, ((HttpRequestImpl) httpRequest).requestRawPath());\n }\n return strip(context, super.getRequestURI());\n }",
"public String getpathInput() {\r\n\t\treturn pathInput;\r\n\t}",
"private static String getRequestPath(final IWebRequest request) {\n\n String requestPath = request.getPathWithinApplication();\n\n final int fragmentIndex = requestPath.indexOf(';');\n if (fragmentIndex != -1) {\n requestPath = requestPath.substring(0, fragmentIndex);\n }\n\n return requestPath;\n\n }",
"private String getFilePath(String sHTTPRequest) {\n return sHTTPRequest.replaceFirst(\"/\", \"\");\n\n }",
"protected Pose[] getUserDefinedPath() {\n\t\treturn handler.getDesiredPath();\n\t}",
"protected String path() {\n return path(getName());\n }",
"protected String getPath ()\n\t{\n\t\treturn path;\n\t}",
"public String getContextPath() {\n return FxJsfUtils.getRequest().getContextPath();\n }",
"public String getPath() {\n\t\treturn getString(\"path\");\n\t}",
"public String getPath()\r\n/* 26: */ {\r\n/* 27:57 */ return this.path;\r\n/* 28: */ }",
"public String getPathname() {return this.pathname;}",
"public final String path() {\n return string(preparePath(concat(path, SLASH, name)));\n }",
"@Override\n public String execute(HttpServletRequest request) {\n return ConfigManagerPages.getInstance().getProperty(PathPageConstants.REGISTRATION_PAGE_PATH);\n }",
"@Override\n public StringBuffer getRequestURL() {\n //StringBuffer requestURL = super.getRequestURL();\n //System.out.println(\"URL: \" + requestURL.toString());\n return this.requestURL;\n }",
"private char[] getPath() {\n\t\treturn null;\n\t}",
"String getPath() {\r\n\t\treturn path;\r\n\t}",
"public String getEncodedPath() {\n return getEncodedPath(false);\n }",
"@Override\r\n\tprotected String getPath() {\n\t\treturn \"/product/detail.do?param=\";\r\n\t}",
"public String getAppendedPath() {\n return appendedPath;\n }",
"public String getResolvedPath() {\n return null;\r\n }",
"@Override\n\t\tpublic String getServletPath() {\n\t\t\treturn null;\n\t\t}",
"private String toCompletePath(String fullRequest) {\n \n///Parse request for file path\nString requestLine[] = new String[] {\" \", \" \", \" \"};\n requestLine = fullRequest.split(\" \");\nString partialPath = requestLine[1];\n \n//If requested path is just \"/\" or \"\", don't return any path\n if(partialPath.length() <= 1) {\n noFileRequested = true;\n return null;\n }\n \nString completePath;\n//If using my Windows machine, the path is different than the school Linux machines\nif (Windows)\n completePath = \"C:/Users/Michelle/eclipse-workspace/P1\" + partialPath;\nelse\n completePath = \".\" + partialPath;\n \n return completePath;\n}",
"java.lang.String getProcessorpath(int index);",
"public String getpathOutput() {\r\n\t\treturn pathOutput;\r\n\t}",
"public String getPathName()\n {\n return getString(\"PathName\");\n }",
"public PathProcessor getPathProcessor() {\n return this.pathProcessor;\n }",
"public String getLookupPathForRequest(HttpServletRequest request) {\n\t\tif (this.alwaysUseFullPath) {\n\t\t\treturn getPathWithinApplication(request);\n\t\t}\n\t\t// Else, use path within current servlet mapping if applicable\n\t\tString rest = getPathWithinServletMapping(request);\n\t\tif (!\"\".equals(rest)) {\n\t\t\treturn rest;\n\t\t}\n\t\telse {\n\t\t\treturn getPathWithinApplication(request);\n\t\t}\n\t}",
"protected String getRequestedResourceName(HttpServletRequest req) throws ServletException {\n\t\tString name = req.getPathInfo();\n\n\t\tif (StringUtils.isEmpty(name))\n\t\t\tthrow new ServletException(\"No filename specified.\");\n\n\t\twhile (name.startsWith(\"/\"))\n\t\t\tname = name.substring(1);\n\n\t\tif (name!=null && name.startsWith(\"../\"))\n\t\t\tthrow new ServletException(\"Not allowed!\");\n\n\t\treturn name;\n\t}",
"public final String getPath() {\n\t\treturn this.path.toString();\n\t}",
"public String path() {\n return this.path;\n }",
"public String path() {\n return this.path;\n }",
"public String path() {\n\treturn path;\n }",
"protected void setupRequestPathExp(StringBuilder sb, RomanticTransaction tx) {\n final String requestPath = tx.getRequestPath();\n if (requestPath != null) {\n sb.append(\", \").append(requestPath);\n }\n }",
"public String getPath() {\r\n\t\t\treturn path;\r\n\t\t}",
"public String getPath() {\n\t\treturn this.path;\n\t}",
"public String getPath(){\n\t\t\treturn this.path;\n\t\t}",
"public String getPath() {\r\n\t\treturn path;\r\n\t}",
"public String getPath() {\r\n\t\treturn path;\r\n\t}",
"public String getPath() {\r\n\t\treturn path;\r\n\t}",
"public final String getPath() {\n\t return m_path;\n\t}",
"public String getPath() {\n return (path == null || path.equals(\"\")) ? \"/\" : path;\n }",
"public String getPath() {\n if (fileType == HTTP) {\n return fileName.substring(0, fileName.lastIndexOf(\"/\"));\n } else {\n return fileName.substring(0, fileName.lastIndexOf(File.separator));\n }\n }",
"@Override\r\n public String getPath() {\r\n if (VFS.isUriStyle()) {\r\n return absPath + getUriTrailer();\r\n }\r\n return absPath;\r\n }",
"public String customPath() {\n return this.customPath;\n }",
"public java.lang.String getCurrentPath() {\n java.lang.Object ref = currentPath_;\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 currentPath_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getInputPath() {\n\t\treturn inputPath;\n\t}",
"public java.lang.String getPath() {\n\t\t return path;\n\t }",
"public String getPath() {\n\t\treturn path;\n\t}",
"public abstract String getPath(boolean urlEncode, boolean includeOwner) throws\n\t\t\tUnsupportedEncodingException;",
"public String getTermPath() {\r\n return (String) getAttributeInternal(TERMPATH);\r\n }",
"@Override\n\t\tpublic String getRealPath(String path) {\n\t\t\treturn null;\n\t\t}",
"public String getPath() {\n return this.path;\n }",
"public String getPath() {\n return this.path;\n }",
"public String getPath() {\n return this.path;\n }",
"public String getPath() {\n return this.path;\n }",
"public String getPath() {\n return this.path;\n }",
"public String getPath() {\n return this.path;\n }",
"public String getPath() {\n return this.path;\n }",
"public String getPath() {\n return this.path;\n }",
"public String getPath() {\n return this.path;\n }",
"public String getPath() {\n return this.path;\n }",
"public String getPath() {\n return this.path;\n }",
"public String getPath() {\n return this.path;\n }",
"public String getPath() {\n return this.path;\n }",
"String getRequestedUrl();",
"@Override\n\tpublic String getContextPath() {\n\t\treturn contextPath;\n\t}",
"public java.lang.String getCurrentPath() {\n java.lang.Object ref = currentPath_;\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 currentPath_ = s;\n return s;\n }\n }",
"@Override\r\n\tpublic String toString() {\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tfor (String str : this) {\r\n\t\t\tif (sb.length() > 0) {\r\n\t\t\t\tsb.append(PATH_SEPARATOR);\r\n\t\t\t}\r\n\t\t\tsb.append(str);\r\n\t\t}\r\n\t\treturn sb.toString().toLowerCase();\r\n\t}",
"public abstract String getFullPath();",
"public String getPath(){\r\n\t\treturn path;\r\n\t}",
"public String getEncodedNewPagePath() {\r\n \treturn getEncodedPagePath(this.newPagePath);\r\n }",
"public static String getPath(HttpServletRequest request) {\n return request.getRequestURI().substring(request.getContextPath().length());\n }",
"@Override\n\t\tpublic StringBuffer getRequestURL() {\n\t\t\treturn null;\n\t\t}",
"public CustomPath getPath() {\n\t\treturn path;\n\t}",
"String getPath() {\n return this.path;\n }",
"public String getPath() {\r\n return path;\r\n }",
"public String getPath() {\r\n return path;\r\n }",
"public String getPath() {\n return this.path;\n }",
"private String getActionName(String path) {\r\n\t\t// We're guaranteed that the path will start with a slash\r\n\t\tint slash = path.lastIndexOf('/');\r\n\t\treturn path.substring(slash + 1);\r\n\t}",
"public String getPath() {\n\n\t\treturn this.path;\n\n\t}",
"@Override\n\tpublic String getServletPath() {\n\t\treturn null;\n\t}",
"String getPath() {\n return path;\n }",
"public abstract String getPath();",
"public abstract String getPath();",
"@Override\n\tpublic java.lang.String getResumePath() {\n\t\treturn _candidate.getResumePath();\n\t}",
"@Nullable\n public static String getPathInfo (@Nonnull final HttpServletRequest aHttpRequest)\n {\n ValueEnforcer.notNull (aHttpRequest, \"HttpRequest\");\n final String sPathInfo = aHttpRequest.getPathInfo ();\n if (StringHelper.hasNoText (sPathInfo))\n return sPathInfo;\n\n return getWithoutSessionID (sPathInfo);\n }",
"@SuppressWarnings(\"unchecked\")\n public Map<String, String> getMapContextPath() {\n FacesContext facesContext = FacesContext.getCurrentInstance();\n ExternalContext extenalContext = facesContext.getExternalContext();\n HttpServletRequest request = (HttpServletRequest) extenalContext.getRequest();\n return (Map<String, String>) request.getSession().getAttribute(\"MAP_CONTEXT_PATH\");\n //xxx_temp end\n }",
"public static String getContextPath(HttpServletRequest request) {\n String contextPath = (String) request.getAttribute(INCLUDE_CONTEXT_PATH_ATTRIBUTE);\n if (null == contextPath) {\n contextPath = request.getContextPath();\n }\n if (\"/\".equals(contextPath)) {\n // Invalid case, but happens for includes on Jetty: silently adapt it.\n contextPath = \"\";\n }\n return decodeRequestString(request, contextPath);\n }",
"public Optional<URI> getCurrentSourcePath() {\r\n return context.getAssociatedPath();\r\n }",
"public String getPath()\n {\n return path;\n }",
"public String getPath()\n {\n return path;\n }",
"String getContextPath();",
"String getContextPath();",
"String getContextPath();",
"public String getPath()\n\t{\n\t\treturn letter + \":/\";\n\t}"
] | [
"0.68310803",
"0.66105705",
"0.65138656",
"0.65005434",
"0.6110172",
"0.60793674",
"0.602235",
"0.6018547",
"0.5992533",
"0.59879935",
"0.59578454",
"0.5922269",
"0.574928",
"0.5704033",
"0.56529754",
"0.5650856",
"0.5641818",
"0.5572361",
"0.5566249",
"0.55353415",
"0.55225354",
"0.5501121",
"0.5499201",
"0.5486423",
"0.5479351",
"0.54747057",
"0.54737145",
"0.54593873",
"0.544566",
"0.5439201",
"0.5426965",
"0.5426625",
"0.54176533",
"0.5383837",
"0.5382653",
"0.5382653",
"0.5381096",
"0.5366335",
"0.5358352",
"0.53581905",
"0.53552574",
"0.535356",
"0.535356",
"0.535356",
"0.53527194",
"0.5352477",
"0.53514445",
"0.5350352",
"0.53502387",
"0.53477156",
"0.5347504",
"0.5338775",
"0.5337774",
"0.5334333",
"0.53336364",
"0.5330899",
"0.5329015",
"0.5329015",
"0.5329015",
"0.5329015",
"0.5329015",
"0.5329015",
"0.5329015",
"0.5329015",
"0.5329015",
"0.5329015",
"0.5329015",
"0.5329015",
"0.5329015",
"0.53242725",
"0.53223675",
"0.5321398",
"0.5316011",
"0.53147995",
"0.5312165",
"0.5311046",
"0.5309616",
"0.5308866",
"0.5308142",
"0.52991146",
"0.5298546",
"0.5298546",
"0.5298237",
"0.5279056",
"0.52763075",
"0.52656674",
"0.5250916",
"0.5250668",
"0.5250668",
"0.5248057",
"0.5240296",
"0.52293533",
"0.522357",
"0.5222286",
"0.5220448",
"0.5220448",
"0.52121043",
"0.52121043",
"0.52121043",
"0.520614"
] | 0.7237115 | 0 |
/ Will delegate to the superclass to process the mapping, but before returning it to the caller will check to see if it is of the class GTActionMapping, and if so will then check if its logParameters property is set, and if so will call the logRequestDetails method in StaticWebUtils. | protected ActionMapping processMapping( HttpServletRequest request,
HttpServletResponse response,
String path)
throws IOException
{ //20030425AH
ActionMapping mapping = super.processMapping(request, response, path);
if(mapping instanceof GTActionMapping)
{
if( ((GTActionMapping)mapping).isLogParameters() )
{
StaticWebUtils.logRequestDetails(request, _log);
}
}
return mapping;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected ActionForward processActionPerform(HttpServletRequest request,\n HttpServletResponse response,\n Action action,\n ActionForm form,\n ActionMapping mapping)\n throws IOException, ServletException\n { //20030502AH - Copied from struts src, with extra code added \n try\n {\n if(mapping instanceof GTActionMapping)\n {\n //20050317AH - mod to also check for asdmin rights where spec'd in mapping\n GTActionMapping gtMapping = (GTActionMapping)mapping;\n boolean needsSession = gtMapping.isRequiresGtSession() ||gtMapping.isRequiresAdmin() \n \t\t\t\t\t\t\t\t\t\t\t\t|| gtMapping.isRequiresP2P() || gtMapping.isRequiresUDDI();\n if( needsSession )\n {\n //We will try to obtain a reference to the IGTSession using the method provided\n //in StaticWebUtils. This will throw a NoSessionException if we have no IGTSession.\n //By putting this check here it will be captured as though it was thrown by the action.\n IGTSession gtasSession = StaticWebUtils.getGridTalkSession(request);\n //NSL20060424 Check for P2P and UDDI requirement\n if (gtMapping.isRequiresP2P() && gtasSession.isNoP2P())\n {\n \tthrow new IllegalStateException(\"P2P functionality access required for mapped path \"+gtMapping.getPath());\n }\n if (gtMapping.isRequiresUDDI() && gtasSession.isNoUDDI())\n {\n \tthrow new IllegalStateException(\"UDDI functionality access required for mapped path \"+gtMapping.getPath());\n }\n if(gtMapping.isRequiresAdmin() && !gtasSession.isAdmin())\n {\n throw new IllegalStateException(\"Admin access required for mapped path \" + gtMapping.getPath());\n }\n }\n }\n return (action.execute(mapping, form, request, response));\n }\n catch (Exception e)\n {\n return (processException(request, response,e, form, mapping));\n }\n \n }",
"protected ActionForward customProcess(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response, String name) throws Throwable {\r\n \treturn performAction(actionMapping, actionForm, request, response);\r\n }",
"public ActionForward logActionMessageInRouteLog(ActionMapping mapping, ActionForm form, HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws Exception {\n\t\tRouteLogForm routeLogForm = (RouteLogForm) form;\n\n\t\tString documentId = null;\n\t\tif (!org.apache.commons.lang.StringUtils.isEmpty(routeLogForm.getDocumentId())) {\n\t\t\tdocumentId = routeLogForm.getDocumentId();\n\t\t} else if (!org.apache.commons.lang.StringUtils.isEmpty(routeLogForm.getDocId())) {\n\t\t\tdocumentId = routeLogForm.getDocId();\n\t\t} else {\n\t\t\tthrow new WorkflowRuntimeException(\"No paramater provided to fetch document\");\n\t\t}\n\t\t\n\t\tDocumentRouteHeaderValue routeHeader = KEWServiceLocator.getRouteHeaderService().getRouteHeader(documentId);\n\t\t\n\t\t// check user has permission to add a route log message\n\t\tboolean isAuthorizedToAddRouteLogMessage = KEWServiceLocator.getDocumentTypePermissionService()\n\t\t\t\t.canAddRouteLogMessage(GlobalVariables.getUserSession().getPrincipalId(), routeHeader);\n\n\t\tif (!isAuthorizedToAddRouteLogMessage) {\n\t\t\tthrow new InvalidActionTakenException(\"Principal with name '\"\n\t\t\t\t\t+ GlobalVariables.getUserSession().getPrincipalName()\n\t\t\t\t\t+ \"' is not authorized to add route log messages for documents of type '\"\n\t\t\t\t\t+ routeHeader.getDocumentType().getName());\n\t\t}\n\n\t\tLOG.info(\"Logging new action message for user \" + GlobalVariables.getUserSession().getPrincipalName()\n\t\t\t\t+ \", route header \" + routeHeader);\n\t\tKEWServiceLocator.getWorkflowDocumentService().logDocumentAction(\n\t\t\t\tGlobalVariables.getUserSession().getPrincipalId(), routeHeader,\n\t\t\t\trouteLogForm.getNewRouteLogActionMessage());\n\n\t\trouteLogForm.setNewRouteLogActionMessage(\"\");\n\n\t\t// retrieve routeHeader again to pull new action taken\n\t\trouteHeader = KEWServiceLocator.getRouteHeaderService().getRouteHeader(documentId, true);\n\t\tfixActionRequestsPositions(routeHeader);\n\t\trequest.setAttribute(\"routeHeader\", routeHeader);\n\n\t\treturn mapping.findForward(getDefaultMapping());\n\t}",
"protected ActionForward unspecified(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response)\n throws Exception {\n String message =\n messages.getMessage(\"mapping.parameter\", mapping.getPath());\n\n log.error(message);\n\n throw new ServletException(message);\n }",
"@Override\n public void processAction(ActionRequest actionRequest, ActionResponse actionResponse) throws PortletException,\n IOException {\n StringWriter writer = new StringWriter();\n\n // output the parameters on the Action request -\n\n writer.write(HTMLUtil.HR_TAG);\n HTMLUtil.writeMapCompact(writer, PortletRequest.ACTION_PHASE, \"publicParameterMap\",\n actionRequest.getPublicParameterMap());\n writer.write(HTMLUtil.HR_TAG);\n HTMLUtil.writeMapCompact(writer, PortletRequest.ACTION_PHASE, \"privateParameterMap\",\n actionRequest.getPrivateParameterMap());\n writer.write(HTMLUtil.HR_TAG);\n HTMLUtil.writeMapCompact(writer, PortletRequest.ACTION_PHASE, \"parameterMap\", actionRequest.getParameterMap());\n writer.write(HTMLUtil.HR_TAG);\n\n String writtenStuff = writer.toString();\n actionRequest.getPortletSession().setAttribute(\"ActionString\", writtenStuff);\n }",
"public abstract RequestMappingInfo build();",
"protected ActionForm processActionForm(HttpServletRequest request,\n HttpServletResponse response,\n ActionMapping mapping)\n {\n String scope = mapping.getScope();\n if(scope != null)\n {\n try\n {\n if(scope.equals(\"session\"))\n {\n OperationContext opCon = OperationContext.getOperationContext(request);\n if(opCon != null)\n {\n if(_log.isInfoEnabled())\n {\n _log.info(\"Looking for ActionForm in OperationContext[id=\" + opCon.getOperationContextId() + \"]\"); //20030124AH\n }\n ActionForm form = opCon.getActionForm();\n if(form != null)\n {\n if(_log.isInfoEnabled())\n {\n _log.info(\"Found ActionForm in OperationContext\"); //20030124AH\n }\n return form;\n }\n else\n {\n if(_log.isWarnEnabled())\n {\n _log.warn(\"No ActionForm found in OperationContext\"); //20030124AH\n }\n return null; //20030124AH\n }\n }\n }\n }\n catch(OperationException e)\n {\n // OperationExceptions here are normal when we forward from a completed operation\n // to the next action, so we ignore them.\n }\n catch(Throwable t)\n {\n if(_log.isErrorEnabled())\n {\n _log.error(\"Error caught in processActionForm() performing customised ActionForm handling\", t); //20030124AH\n }\n }\n }\n\n if(mapping instanceof GTActionMapping)\n { //20030124AH - Check the mapping to see if we should defer form creation or do it as normal\n if( ((GTActionMapping)mapping).isDeferFormCreation() )\n {\n if(_log.isInfoEnabled())\n {\n _log.info(\"Deferring ActionForm creation\");\n }\n return null;\n }\n }\n //...\n if(_log.isInfoEnabled())\n {\n _log.info(\"Delegating to superclass to obtain ActionForm\"); //20030124AH\n }\n ActionForm form = super.processActionForm(request, response, mapping);\n return form;\n }",
"private void configureMapping(final UrlMappingInfo mapping, final GrailsWebRequest grailsRequest,\n \t\t\tfinal Map<String, Object> savedParams) {\n \t\tGrailsParameterMap params = grailsRequest.getParams();\n \t\tparams.clear();\n \t\tparams.putAll(savedParams);\n \n \t\tmapping.configure(grailsRequest);\n \t}",
"@Override\r\n\tpublic ActionErrors validate(ActionMapping mapping, HttpServletRequest request)\r\n\t{\n\t\treturn super.validate(mapping, request);\r\n\t}",
"public ActionForward execute(ActionMapping mapping, ActionForm form,\n\t\t\tHttpServletRequest req, HttpServletResponse res)\n\t\t\tthrows IOException, ServletException {\n\n\t\tTargetForm aForm = null;\n\t\tActionMessages errors = new ActionMessages();\n\t\tActionForward destination = null;\n\n\t\tif (!this.checkLogon(req)) {\n\t\t\treturn mapping.findForward(\"logon\");\n\t\t}\n\n\t\tif (form != null) {\n\t\t\taForm = (TargetForm) form;\n\t\t} else {\n\t\t\taForm = new TargetForm();\n\t\t}\n\n\t\tif (req.getParameter(\"delete.x\") != null) {\n\t\t\taForm.setAction(TargetAction.ACTION_CONFIRM_DELETE);\n\t\t}\n\n\t\tAgnUtils.logger().info(\"Action: \" + aForm.getAction());\n\n\t\tif (!allowed(\"targets.show\", req)) {\n\t\t\terrors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(\n\t\t\t\t\t\"error.permissionDenied\"));\n\t\t\tsaveErrors(req, errors);\n\t\t\treturn null;\n\t\t}\n\n\t\ttry {\n\t\t\tswitch (aForm.getAction()) {\n\t\t\tcase ACTION_LIST:\n\t\t\t\tdestination = mapping.findForward(\"list\");\n\t\t\t\tbreak;\n\n\t\t\tcase ACTION_VIEW:\n\t\t\t\tif (aForm.getTargetID() != 0) {\n\t\t\t\t\taForm.setAction(TargetAction.ACTION_SAVE);\n\t\t\t\t\tloadTarget(aForm, req);\n\t\t\t\t} else {\n\t\t\t\t\taForm.setAction(TargetAction.ACTION_NEW);\n\t\t\t\t}\n\t\t\t\tdestination = mapping.findForward(\"success\");\n\t\t\t\tbreak;\n\n\t\t\tcase ACTION_SAVE:\n\t\t\t\t// if(req.getParameter(\"save.x\")!=null) {\n\t\t\t\tsaveTarget(aForm, req);\n\t\t\t\t// }\n\t\t\t\tdestination = mapping.findForward(\"success\");\n\t\t\t\tbreak;\n\n\t\t\tcase ACTION_NEW:\n\t\t\t\t// if(req.getParameter(\"save.x\")!=null) {\n\t\t\t\tsaveTarget(aForm, req);\n\t\t\t\taForm.setAction(TargetAction.ACTION_SAVE);\n\t\t\t\t// }\n\t\t\t\tdestination = mapping.findForward(\"success\");\n\t\t\t\tbreak;\n\n\t\t\tcase ACTION_CONFIRM_DELETE:\n\t\t\t\tloadTarget(aForm, req);\n\t\t\t\tdestination = mapping.findForward(\"delete\");\n\t\t\t\taForm.setAction(TargetAction.ACTION_DELETE);\n\t\t\t\tbreak;\n\n\t\t\tcase ACTION_DELETE:\n\t\t\t\tthis.deleteTarget(aForm, req);\n\t\t\t\taForm.setAction(TargetAction.ACTION_LIST);\n\t\t\t\tdestination = mapping.findForward(\"list\");\n\t\t\t\tbreak;\n\n\t\t\tcase ACTION_CREATE_ML:\n\t\t\t\tdestination = mapping.findForward(\"create_ml\");\n\t\t\t\tbreak;\n\n\t\t\tcase ACTION_CLONE:\n\t\t\t\tif (aForm.getTargetID() != 0) {\n\t\t\t\t\tloadTarget(aForm, req);\n\t\t\t\t\tcloneTarget(aForm, req);\n\t\t\t\t\taForm.setAction(TargetAction.ACTION_SAVE);\n\t\t\t\t}\n\t\t\t\tdestination = mapping.findForward(\"success\");\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase ACTION_DELETE_RECIPIENTS_CONFIRM:\n\t\t\t\tloadTarget(aForm, req);\n\t\t\t\tthis.getRecipientNumber(aForm, req);\n\t\t\t\tdestination = mapping.findForward(\"delete_recipients\");\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase ACTION_DELETE_RECIPIENTS:\n\t\t\t\tloadTarget(aForm, req);\n\t\t\t\tthis.deleteRecipients(aForm, req);\t\t\t\t\n\t\t\t\taForm.setAction(TargetAction.ACTION_LIST);\n\t\t\t\tdestination = mapping.findForward(\"list\");\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase ACTION_BACK_TO_MAILINGWIZARD:\n\t\t\t\tdestination = mapping.findForward(\"back_mailingwizard\");\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\tdestination = mapping.findForward(\"list\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tAgnUtils.logger().error(\n\t\t\t\t\t\"execute: \" + e + \"\\n\" + AgnUtils.getStackTrace(e));\n\t\t\terrors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(\n\t\t\t\t\t\"error.exception\"));\n\t\t}\n\t\t\n\t\tif( \"list\".equals(destination.getName())) {\n\t\t\treq.setAttribute(\"targetlist\", loadTargetList(req) );\n\t\t\tsetNumberOfRows(req, aForm);\n\t\t}\n\t\t\n\n\t\t// Report any errors we have discovered back to the original form\n\t\tif (!errors.isEmpty()) {\n\t\t\tsaveErrors(req, errors);\n\t\t\treturn (new ActionForward(mapping.getInput()));\n\t\t}\n\n\t\treturn destination;\n\n\t}",
"abstract protected void _log(TrackingActivity activity) throws Exception;",
"public ActionErrors validate(ActionMapping mapping,\r\n\t\t\tHttpServletRequest request) {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic List<Map<String,String>> dispatchRequest(Map<String, String[]> request) {\n\n\t\t// ********* LOGGING ********* \n\t\tSystem.out.println(\"reached DispatchRequest\");\n\t\tSystem.out.println(\"Request Keys : \");\n\t\tSystem.out.println(request.keySet());\n\t\t// ********* LOGGING ********* \n\n\n\t\tString classPrefix = request.get(\"requestID\")[0]; \n\n\t\t// ********* LOGGING ********* \n\t\tSystem.out.println(\"class name : \"+PACKAGE_NAME+classPrefix+CLASS_SUFFIX);\n\t\t// ********* LOGGING ********* \n\n\t\t// obtain class reference\t\t\n\t\tiManagementRequestHandlerObject = (IManagementRequestHandler) \n\t\t\t\tiReflectionManagerObject.getClass(PACKAGE_NAME+classPrefix+CLASS_SUFFIX);\n\n\t\t// ********* LOGGING *********\n\t\tSystem.out.println(\"object reference : \"+ iManagementRequestHandlerObject);\n\t\t// ********* LOGGING *********\n\n\t\t// Delegate the request to the appropriate class.\n\t\treturn (iManagementRequestHandlerObject.handleManagementRequest(request));\n\n\t}",
"public ActionForward execute(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response)\n throws Exception {\n // Use the overridden getMethodName.\n return super.execute(mapping, form, request, response);\n }",
"@Override\n\tprotected void onHandleIntent(Intent intent) {\n\t\tif (intent != null) {\n\t\t\tfinal String action = intent.getAction();\n\t\t\tif (ACTION_LOG_MESSAGE.equals(action)) {\n\t\t\t\tfinal MessageRecord record = intent.getParcelableExtra(EXTRA_RECORD);\n\t\t\t\thandleActionLog(record);\n\t\t\t}else if(ACTION_LOG_ATTACK.equals(action)){\n\t\t\t\tfinal AttackRecord record = intent.getParcelableExtra(EXTRA_RECORD);\n\t\t\t\thandleActionLog(record);\n\t\t\t}else if(ACTION_LOG_NETWORK.equals(action)){\n\t\t\t\tfinal NetworkRecord record = intent.getParcelableExtra(EXTRA_RECORD);\n\t\t\t\thandleActionLog(record);\n\t\t\t}else if(ACTION_LOG_PORTSCAN.equals(action)){\n\t\t\t\tfinal AttackRecord attackRecord = intent.getParcelableExtra(EXTRA_RECORD);\n\t\t\t\tfinal NetworkRecord networkRecord = intent.getParcelableExtra(EXTRA_RECORD2);\n\t\t\t\tattackRecord.setRecord(networkRecord);\n\n\t\t\t\tMessageRecord messageRecord = new MessageRecord(true);\n\t\t\t\tmessageRecord.setAttack_id(attackRecord.getAttack_id());\n\t\t\t\tmessageRecord.setRecord(attackRecord);\n\t\t\t\t//messageRecord.setId(0);\n\t\t\t\tmessageRecord.setPacket(\"\");\n\t\t\t\tmessageRecord.setTimestamp(intent.getLongExtra(EXTRA_TIMESTAMP, 0));\n\t\t\t\tmessageRecord.setType(MessageRecord.TYPE.RECEIVE);\n\t\t\t\thandleActionLog(attackRecord);\n\t\t\t\thandleActionLog(networkRecord);\n\t\t\t\thandleActionLog(messageRecord);\n\t\t\t} else if(ACTION_LOG_MULTISTAGE.equals(action)) {\n\t\t\t\tfinal AttackRecord attackRecord = intent.getParcelableExtra(EXTRA_RECORD);\n\t\t\t\tfinal NetworkRecord networkRecord = intent.getParcelableExtra(EXTRA_RECORD2);\n\t\t\t\tfinal MessageRecord msgRecord = intent.getParcelableExtra(EXTRA_RECORD3);\n\t\t\t\tmsgRecord.setRecord(attackRecord);\n\t\t\t\tattackRecord.setRecord(networkRecord);\n\n\t\t\t\thandleActionLog(attackRecord);\n\t\t\t\thandleActionLog(networkRecord);\n\t\t\t\thandleActionLog(msgRecord);\n\n\t\t\t}\n\t\t}\n\t}",
"@Override\r\n\tprotected void validateData(ActionMapping arg0, HttpServletRequest arg1) {\n\t\t\r\n\t}",
"private void logUnmappedError(String misrouteInfo)\n\t{\n\t\t//\toriginal.logDebug(misrouteInfo);\n\t}",
"ActionMap getActionMap() {\n return createActionMap(); }",
"private ApplicationActionMap getAppActionMap() {\n\t\treturn Application.getInstance().getContext().getActionMap(this);\n\t}",
"protected void processPopulate(HttpServletRequest request,\n HttpServletResponse response,\n ActionForm form,\n ActionMapping mapping)\n throws ServletException\n {\n if(form != null)\n {\n if(mapping instanceof GTActionMapping)\n { //20030124AH\n if( ((GTActionMapping)mapping).isPopulate() == false )\n {\n return; //Do not pass go. Do not collect $200.\n }\n }\n super.processPopulate(request,response,form,mapping);\n }\n else\n {\n return; //No form to populate\n }\n }",
"@Override\r\n\tpublic void processAction(ActionRequest actionRequest,\r\n\t\t\tActionResponse actionResponse) throws IOException, PortletException {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tsuper.processAction(actionRequest, actionResponse);\r\n\t}",
"private void Log(String action) {\r\n\t}",
"public void processAction(ActionMapping mapping, ActionForm form, PortletConfig portletConfig,\r\n ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {\r\n\r\n long planTypeId = ParamUtil.getLong(actionRequest, PlanConstants.PLAN_TYPE_ID);\r\n PlansUserSettings userSettings = PlanLocalServiceHelper.getPlanUserSettings(actionRequest, planTypeId);\r\n Set<String> cols = new HashSet<String>();\r\n if (actionRequest.getParameter(\"columns\") == null) {\r\n SessionErrors.add(actionRequest, \"columns can't be empty\");\r\n }\r\n else {\r\n for (String s:actionRequest.getParameterMap().get(\"columns\")) {\r\n \t cols.add(s);\r\n }\r\n PlanType planType = PlanTypeLocalServiceUtil.getPlanType(planTypeId);\r\n for (Columns c: Columns.getPlanTypeColumns(planType)) {\r\n \t String name = c.name();\r\n \t c.setUserSetting(userSettings, cols.contains(name));\r\n }\r\n\r\n PlanLocalServiceHelper.saveUserSettings(actionRequest, userSettings);\r\n }\r\n\r\n \r\n \r\n String redirect = ParamUtil.getString(actionRequest, PlanConstants.REDIRECT);\r\n actionResponse.sendRedirect(redirect);\r\n }",
"public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {\r\n Logger l = LogUtils.enterLog(getClass(), \"execute\");\r\n\r\n ActionForward af = null;\r\n Record inputRecord = getInputRecord(request);\r\n\r\n if (l.isLoggable(Level.FINE)) {\r\n l.logp(Level.FINE, getClass().getName(), \"execute\", \"Request URI:\" + request.getRequestURI() + \"', process: '\" + request.getParameter(\"process\") + \"', parameters as Input Record: \" + inputRecord);\r\n String txtXML = request.getParameter(\"txtXML\");\r\n if (!StringUtils.isBlank(txtXML)) {\r\n l.logp(Level.FINE, getClass().getName(), \"execute\", \"txtXML as Input RecordSet: \" + getInputRecordSet(request));\r\n }\r\n }\r\n\r\n boolean isAjaxRequest = isAjaxRequest(request);\r\n try {\r\n String policyNo = \"\";\r\n\r\n if (!StringUtils.isBlank(request.getParameter(RequestIds.POLICY_NO))) {\r\n policyNo = request.getParameter(RequestIds.POLICY_NO);\r\n }\r\n else {\r\n if (RequestStorageManager.getInstance().has(RequestStorageIds.POLICY_NO)) {\r\n policyNo = (String) RequestStorageManager.getInstance().get(RequestStorageIds.POLICY_NO);\r\n }\r\n }\r\n\r\n boolean requestDueToFailure = false;\r\n if (MessageManager.getInstance().hasErrorMessages()) {\r\n requestDueToFailure = true;\r\n }\r\n\r\n // Load the Policy Header even if the policyNo is blank so that if the previous policy was locked, it will be unlocked.\r\n PolicyHeader policyHeader = null;\r\n try {\r\n\r\n //Initialize the save token. Don't do this for Ajax requests because the save token is already set for the page.\r\n if (!isAjaxRequest) {\r\n initializeLoadRequestForSave(request, getTokenConstant());\r\n if (inputRecord.hasField(\"noLoadingDiv\")\r\n && YesNoFlag.getInstance(inputRecord.getStringValue(\"noLoadingDiv\")).booleanValue()) {\r\n request.setAttribute(\"noLoadingDiv\", true);\r\n }\r\n }\r\n\r\n RequestStorageManager.getInstance().set(RequestIds.IS_PREVIEW_REQUEST,\r\n (YesNoFlag.getInstance((String) inputRecord.getFieldValue(RequestIds.IS_PREVIEW_REQUEST, \"N\")).booleanValue()));\r\n\r\n policyHeader = loadPolicyHeader(request);\r\n\r\n handlePreviewRequest(request, policyHeader);\r\n\r\n if (inputRecord.getBooleanValue(\"processRatingB\", false).booleanValue()) {\r\n UserSessionManager.getInstance().getUserSession().set(\"PreviousPolicyHeader\", policyHeader);\r\n }\r\n\r\n // Load the PolicyHeader Oasis Fields for the included policyHeader.jsp.\r\n if (policyHeader != null) {\r\n //For access trail\r\n request.setAttribute(AccessTrailRequestIds.ACCESS_TRAIL_SOURCE_TABLE_NAME, \"POLICY_TERM_HISTORY\");\r\n request.setAttribute(AccessTrailRequestIds.ACCESS_TRAIL_SOURCE_RECORD_NO, policyHeader.getPolicyNo());\r\n request.setAttribute(AccessTrailRequestIds.ACCESS_TRAIL_SOURCE_RECORD_FK, policyHeader.getPolicyTermHistoryId());\r\n\r\n // If the Policy Header is loaded:\r\n // 1. Load the Policy Header specific OasisFields and create field/value beans\r\n securePage(request, form, true, true);\r\n\r\n // record for header fields\r\n Record record = (Record) request.getAttribute(RequestIds.NON_GRID_FIELDS_RECORD);\r\n request.setAttribute(RequestIds.HEADER_FIELDS_RECORD, record);\r\n request.removeAttribute(RequestIds.NON_GRID_FIELDS_RECORD);\r\n\r\n OasisFields fieldsMap = (OasisFields) request.getAttribute(IOasisAction.KEY_FIELDS);\r\n Term currentTerm = policyHeader.getPolicyTerm(policyHeader.getPolicyTermHistoryId());\r\n boolean isWipAvailable = currentTerm.isWipExists();\r\n boolean isOfficialAailable = currentTerm.isOfficialExists();\r\n boolean isEndorsementQuoteAailable = currentTerm.isEndorsementQuoteExists();\r\n boolean isRenewalQuoteAailable = currentTerm.isRenewalQuoteExists();\r\n\r\n OasisFormField field = (OasisFormField) fieldsMap.get(\"policyViewMode\");\r\n String lovSql = \"[NO_ADD_SELECT_OPTION]LIST:\";\r\n if (isOfficialAailable) {\r\n lovSql = lovSql + \"OFFICIAL,Official,\";\r\n }\r\n if (isWipAvailable) {\r\n lovSql = lovSql + \"WIP,WIP,\";\r\n }\r\n if (isEndorsementQuoteAailable) {\r\n //get Endorsment Quote list\r\n RecordSet rs = getPolicyManager().loadAllEndorsementQuote(policyHeader);\r\n Iterator itor = rs.getRecords();\r\n while (itor.hasNext()) {\r\n Record endQuoteRecord = (Record) itor.next();\r\n String endQuoteId = endQuoteRecord.getStringValue(\"endorsementQuoteId\");\r\n lovSql = lovSql + \"ENDQUOTE,Endorsement Quote: \" + endQuoteId + \",\";\r\n }\r\n\r\n }\r\n else if (isRenewalQuoteAailable) {\r\n //get renewal quote list\r\n RecordSet rs = getPolicyManager().loadAllEndorsementQuote(policyHeader);\r\n Iterator itor = rs.getRecords();\r\n while (itor.hasNext()) {\r\n Record endQuoteRecord = (Record) itor.next();\r\n String endQuoteId = endQuoteRecord.getStringValue(\"endorsementQuoteId\");\r\n lovSql = lovSql + \"ENDQUOTE,Renewal Quote: \" + endQuoteId + \",\";\r\n }\r\n }\r\n\r\n if (PolicyAttributesFactory.getInstance().isDisplayQuoteInViewModeEnable(\r\n policyHeader.getLastTransactionInfo().getTransEffectiveFromDate(),\r\n policyHeader.getPolicyCycleCode(),\r\n policyHeader.getQuoteCycleCode(),\r\n policyHeader.getLastTransactionInfo().getTransactionTypeCode(),\r\n policyHeader.getRecordMode(),\r\n policyHeader.getPolicyStatus())) {\r\n Record r = policyHeader.toRecord();\r\n r.setFieldValue(QuoteFields.SELECT_MODE,\r\n QuoteFields.joinSelectMode(QuoteFields.EXCL_SELF, QuoteFields.TERM_SENS, QuoteFields.EXCL_NB,\r\n QuoteFields.EXCL_INVALID, QuoteFields.EXCL_ACCEPTED));\r\n RecordSet rs = getQuoteManager().loadQuoteVersions(r);\r\n\r\n for (int i = 0; i < rs.getRecordList().size(); i ++ ) {\r\n r = rs.getRecordList().get(i);\r\n String text = PolicyAttributesFactory.getInstance().getDisplayQuoteInViewModeText(\r\n policyHeader.getLastTransactionInfo().getTransEffectiveFromDate(),\r\n PolicyFields.getPolicyCycleCode(r),\r\n PolicyFields.getQuoteCycleCode(r),\r\n r);\r\n if (text != null) {\r\n lovSql = lovSql + \"QUOTE:\"+PolicyHeaderFields.getPolicyNo(r) +\r\n \",\" + text + \",\";\r\n }\r\n }\r\n }\r\n field.setLovSql(lovSql);\r\n // 2. Load any list of values for the Policy Header\r\n loadListOfValues(request, form);\r\n // 3. Reset the map attribute to a specific policyHeaderFieldsMap name\r\n request.setAttribute(KEY_PH_FIELDS, fieldsMap);\r\n request.setAttribute(IOasisAction.KEY_HEADER_PAGE_FIELDS, fieldsMap);\r\n //set selected endquote\r\n\r\n //TODO: see workaround below\r\n// request.removeAttribute(IOasisAction.KEY_FIELDS);\r\n// if(policyHeader.getPolicyIdentifier().getPolicyViewMode().isEndquote()){\r\n// request.setAttribute(\"policyViewMode\",\"ENDQUOTE:\"+policyHeader.getLastTransactionId());\r\n// }\r\n }\r\n }\r\n catch (Exception e) {\r\n l.logp(Level.WARNING, getClass().getName(), \"execute\", \"Failed to load the policy information for policyNo '\" + policyNo + \"'\", e);\r\n }\r\n final StringBuffer requestInformation = new StringBuffer();\r\n requestInformation.append(\"URI:'\").append(request.getRequestURI()).append(\"', \");\r\n requestInformation.append(\"process:'\").append(request.getParameter(RequestIds.PROCESS)).append(\"', \");\r\n requestInformation.append(\"UserId:'\").append(UserSessionManager.getInstance().getUserSession().getUserId()).append(\"', \");\r\n if (!StringUtils.isBlank(policyNo)) {\r\n if (policyHeader != null) {\r\n\r\n if (l.isLoggable(Level.INFO)) {\r\n if (!mapping.getPath().endsWith(\"maintainLock\") || l.isLoggable(Level.FINE)) {\r\n requestInformation.append(\"Policy No:'\").append(policyHeader.getPolicyNo()).append(\"', \");\r\n requestInformation.append(\"Policy Id:'\").append(policyHeader.getPolicyId()).append(\"', \");\r\n requestInformation.append(\"Policy Type:'\").append(policyHeader.getPolicyTypeCode()).append(\"', \");\r\n requestInformation.append(\"View Mode:'\").append(policyHeader.getPolicyIdentifier().getPolicyViewMode()).append(\"', \");\r\n requestInformation.append(\"Lock Id:'\").append(policyHeader.getPolicyIdentifier().getPolicyLockId()).append(\"', \");\r\n requestInformation.append(\"IsSelectedTermInWIP:'\").append(policyHeader.isWipB()).append(\"', \");\r\n requestInformation.append(\"Own Lock?\").append(policyHeader.getPolicyIdentifier().ownLock()).append(\"', \");\r\n requestInformation.append(\"Policy History Term Id:'\").append(policyHeader.getPolicyTermHistoryId()).append(\"', \");\r\n requestInformation.append(\"Term Base Id:'\").append(policyHeader.getTermBaseRecordId()).append(\"', \");\r\n requestInformation.append(\"Effective From Date:'\").append(policyHeader.getTermEffectiveFromDate()).append(\"', \");\r\n requestInformation.append(\"Effective To Date:'\").append(policyHeader.getTermEffectiveToDate()).append(\"', \");\r\n requestInformation.append(\"Risk Id:'\").append(inputRecord.getStringValue(\"riskId\", \"\")).append(\"', \");\r\n requestInformation.append(\"Coverage Id:'\").append(inputRecord.getStringValue(\"coverageId\", \"\")).append(\"', \");\r\n requestInformation.append(\"Latest Transaction Id:'\").append(policyHeader.getLastTransactionInfo().getTransactionLogId()).append(\"' \");\r\n\r\n l.logp(Level.INFO, getClass().getName(), \"execute\", \"Request Information: \" + requestInformation.toString());\r\n }\r\n\r\n if (l.isLoggable(Level.FINE)) {\r\n l.logp(Level.FINE, getClass().getName(), \"execute\", \"policyHeader = \" + policyHeader);\r\n }\r\n\r\n }\r\n af = super.execute(mapping, form, request, response);\r\n }\r\n else {\r\n if (requestDueToFailure) {\r\n l.logp(Level.INFO, getClass().getName(), \"execute\", \"Request Information: \" + requestInformation.toString());\r\n // Don't forward to failure page if this request is already the result of a failure.\r\n af = super.execute(mapping, form, request, response);\r\n }\r\n else {\r\n l.logp(Level.INFO, getClass().getName(), \"execute\", \"Request Information: \" + requestInformation.toString());\r\n // Failed to load the PolicyHeader for the requested PolicyNo.\r\n l.logp(Level.WARNING, getClass().getName(), \"execute\", \"Unable to load the policy information for policyNo '\" + policyNo + \"'\");\r\n MessageManager.getInstance().addErrorMessage(\"pm.findpolicy.noData.msg\", new Object[]{policyNo});\r\n if (isAjaxRequest) {\r\n // If this is an Ajax request, write the error\r\n writeAjaxResponse(response, new Record(), true);\r\n }\r\n else {\r\n // Otherwise, return the global forward to the find policy page\r\n af = mapping.findForward(\"loadPolicyFailure\");\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n requestInformation.append(\"Policy No Is Not Provided\");\r\n l.logp(Level.INFO, getClass().getName(), \"execute\", \"Request Information: \" + requestInformation.toString());\r\n af = super.execute(mapping, form, request, response);\r\n }\r\n // Reset notification transaction time\r\n OasisUser oasisUser = UserSessionManager.getInstance().getUserSession().getOasisUser();\r\n if (oasisUser.hasRequestedTransactionTime()) {\r\n oasisUser.setRequestedTransactionTime(null);\r\n }\r\n }\r\n catch (Exception e) {\r\n AppException ae = ExceptionHelper.getInstance().handleException(\"Error loading policy header information.\", e);\r\n l.throwing(getClass().getName(), \"execute\", ae);\r\n String forwardString = handleError(AppException.UNEXPECTED_ERROR, \"Error loading policy header information.\", e, request, mapping);\r\n af = mapping.findForward(forwardString);\r\n }\r\n\r\n // Set all fields in fieldsMap to readonly if there's \"readOnly\" attribute is set to \"Y\" in request.\r\n // The fieldId of this indicator field is defined in EntitlementFields class.\r\n // For some unkown reason, sometime the readOnly attribute is set as String\r\n // Below codes are from safe perspective\r\n Object oReadonly = request.getAttribute(EntitlementFields.READ_ONLY);\r\n boolean isReadonly = false;\r\n if (oReadonly != null) {\r\n if (oReadonly instanceof String) {\r\n isReadonly = YesNoFlag.getInstance((String) oReadonly).booleanValue();\r\n }\r\n else if (oReadonly instanceof YesNoFlag) {\r\n isReadonly = ((YesNoFlag) oReadonly).booleanValue();\r\n }\r\n }\r\n\r\n Object oHanldeLayer = request.getAttribute(EntitlementFields.HANDLE_LAYER);\r\n boolean isHanldeLayer = true;\r\n if (oHanldeLayer != null) {\r\n if (oHanldeLayer instanceof String) {\r\n isHanldeLayer = YesNoFlag.getInstance((String) oHanldeLayer).booleanValue();\r\n }\r\n else if (oHanldeLayer instanceof YesNoFlag) {\r\n isHanldeLayer = ((YesNoFlag) oHanldeLayer).booleanValue();\r\n }\r\n }\r\n\r\n if (isReadonly) {\r\n String [] excludedFieldsList = null;\r\n if (hasAlwaysEnabledFieldIds())\r\n excludedFieldsList = getAlwaysEnabledFieldIds().split(\",\");\r\n setFieldsToReadOnly(request, excludedFieldsList, isHanldeLayer, true);\r\n }\r\n\r\n if (isSaveInProgress()) {\r\n if (isAjaxRequest && MessageManager.getInstance().hasConfirmationPrompts()) {\r\n // The Ajax request was a save request, and did not complete because it requires confirmations.\r\n // Remove the save in-progress session attribute to indicate that the save process has been exited.\r\n updateSessionToken(request,getTokenConstant());\r\n removeSaveInProgressIndicator();\r\n }\r\n else if (request.getAttribute(IOasisAction.KEY_ERROR) == null &&\r\n request.getAttribute(IOasisAction.KEY_VALIDATION_ERROR) == null &&\r\n MessageManager.getInstance().hasErrorMessages() == false\r\n ) {\r\n\r\n saveProcessSucceeded(request, getTokenConstant());\r\n }\r\n else {\r\n updateSessionToken(request, getTokenConstant());\r\n saveProcessFailed(request);\r\n }\r\n } else {\r\n //make sure a new token gets generated when loading a page. this will avoid calling the saveToken() on all the action classes initial load.\r\n //the IS_STRUTS_LOAD_ACTION is to make sure that it is loading for the first time.\r\n if (!isAjaxRequest(request) && request.getAttribute(RequestStorageIds.IS_STRUTS_LOAD_ACTION) == null) {\r\n //saveToken(request, getTokenConstant());\r\n updateCSRFTokenInForwardParameter(request);\r\n }\r\n }\r\n\r\n request.getSession().removeAttribute(RequestStorageIds.IS_STRUTS_LOAD_ACTION);\r\n\r\n request.removeAttribute(RequestStorageIds.IS_STRUTS_LOAD_ACTION);\r\n l.exiting(getClass().getName(), \"execute\", af);\r\n return af;\r\n }",
"public ActionForward unspecified(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response)\n throws Exception {\n this.setup(mapping,form,request,response);\n \n return mapping.findForward(\"backToGeneExp\");\n }",
"@Override\r\n\tpublic ActionForward submit(ActionMapping mapping, BaseForm form,\r\n\t\t\tString operation, HttpServletRequest request,\r\n\t\t\tHttpServletResponse response) {\r\n\t\tAuditUtil.getInstance().writeLog(\r\n\t\t\t\tAuditUtil.FILE_TYPE_G4G,\r\n\t\t\t\tnew StringBuffer(this.getClass().getName()).append(\r\n\t\t\t\t\t\tG4GConstants.COLON_WITH_SPACES)\r\n\t\t\t\t\t\t.append(DataUtil.getCurrentMethod()).append(\r\n\t\t\t\t\t\t\t\tG4GConstants.DASHES).append(\r\n\t\t\t\t\t\t\t\tG4GConstants.SUBMIT_STARTS).toString());\r\n\t\treturn mapping.findForward(G4GConstants.HOMEPAGE);\r\n\t}",
"public void process(HttpServletRequest request,\n HttpServletResponse response)\n throws IOException, ServletException\n {\n if(_log.isInfoEnabled())\n {\n _log.info(\"Started processing action request: \" + request.getServletPath());\n }\n long startTime = System.currentTimeMillis();\n \n processInlineException(request);\n super.process(request, response);\n \n long endTime = System.currentTimeMillis();\n if(_log.isInfoEnabled())\n {\n _log.info(\"Completed processing action request (in approx \" + (endTime - startTime) + \" ms)\");\n OperationContext.logActiveContexts(request, _log);\n }\n }",
"@Override\n protected void handleRequest (@Nonnull final IRequestWebScopeWithoutResponse aRequestScope,\n @Nonnull final UnifiedResponse aUnifiedResponse) throws Exception\n {\n String sKey = aRequestScope.getPathWithinServlet ();\n if (sKey.length () > 0)\n sKey = sKey.substring (1);\n\n SimpleURL aTargetURL = null;\n final GoMappingItem aGoItem = getResolvedGoMappingItem (sKey);\n if (aGoItem == null)\n {\n s_aLogger.warn (\"No such go-mapping item '\" + sKey + \"'\");\n // Goto start page\n aTargetURL = getURLForNonExistingItem (aRequestScope, sKey);\n s_aStatsError.increment (sKey);\n }\n else\n {\n // Base URL\n if (aGoItem.isInternal ())\n {\n final IMenuTree aMenuTree = getMenuTree ();\n if (aMenuTree != null)\n {\n // If it is an internal menu item, check if this internal item is an\n // \"external menu item\" and if so, directly use the URL of the\n // external menu item\n final IRequestManager aARM = ApplicationRequestManager.getRequestMgr ();\n final String sTargetMenuItemID = aARM.getMenuItemFromURL (aGoItem.getTargetURL ());\n\n final IMenuObject aMenuObj = aMenuTree.getItemDataWithID (sTargetMenuItemID);\n if (aMenuObj instanceof IMenuItemExternal)\n {\n aTargetURL = new SimpleURL (((IMenuItemExternal) aMenuObj).getURL ());\n }\n }\n }\n if (aTargetURL == null)\n {\n // Default case - use target link from go-mapping\n aTargetURL = aGoItem.getTargetURL ();\n }\n\n // Callback\n modifyResultURL (aRequestScope, sKey, aTargetURL);\n\n s_aStatsOK.increment (sKey);\n }\n\n // Append all request parameters of this request\n // Don't use the request attributes, as there might be more of them\n final Enumeration <?> aEnum = aRequestScope.getRequest ().getParameterNames ();\n while (aEnum.hasMoreElements ())\n {\n final String sParamName = (String) aEnum.nextElement ();\n final String [] aParamValues = aRequestScope.getRequest ().getParameterValues (sParamName);\n if (aParamValues != null)\n for (final String sParamValue : aParamValues)\n aTargetURL.add (sParamName, sParamValue);\n }\n\n if (s_aLogger.isDebugEnabled ())\n s_aLogger.debug (\"Following go-mapping item '\" + sKey + \"' to \" + aTargetURL.getAsString ());\n else\n if (GlobalDebug.isDebugMode ())\n s_aLogger.info (\"Following go-mapping item '\" + sKey + \"' to \" + aTargetURL.getAsString ());\n\n // Main redirect :)\n aUnifiedResponse.setRedirect (aTargetURL);\n }",
"protected ForwardingMap() {}",
"@Override\r\n\tpublic ActionForward to_objectNew(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows KANException {\n\t\treturn null;\r\n\t}",
"@Override\n protected void append(LoggingEvent event) {\n if (event.getMessage() instanceof WrsAccessLogEvent) {\n WrsAccessLogEvent wrsLogEvent = (WrsAccessLogEvent) event.getMessage();\n\n try {\n HttpServletRequest request = wrsLogEvent.getRequest();\n if (request != null) {\n String pageHash = ((String)MDC.get(RequestLifeCycleFilter.MDC_KEY_BCD_PAGEHASH));\n String requestHash = ((String)MDC.get(RequestLifeCycleFilter.MDC_KEY_BCD_REQUESTHASH));\n String sessionId = ((String)MDC.get(RequestLifeCycleFilter.MDC_KEY_SESSION_ID));\n String requestUrl = request.getRequestURL().toString();\n String reqQuery = request.getQueryString();\n requestUrl += (reqQuery != null ? \"?\" + reqQuery : \"\");\n if (requestUrl.length()> 2000)\n requestUrl = requestUrl.substring(0, 2000);\n String bindingSetName = wrsLogEvent.getBindingSetName();\n if (bindingSetName != null && bindingSetName.length()> 255)\n bindingSetName = bindingSetName.substring(0, 255);\n String requestXML = wrsLogEvent.getRequestDoc()!=null ? Utils.serializeElement(wrsLogEvent.getRequestDoc()) : null;\n\n // log access\n if(AccessSqlLogger.getInstance().isEnabled()) {\n final AccessSqlLogger.LogRecord recordAccess = new AccessSqlLogger.LogRecord(\n sessionId\n , requestUrl\n , pageHash\n , requestHash\n , bindingSetName\n , requestXML\n , wrsLogEvent.getRowCount()\n , wrsLogEvent.getValueCount()\n , wrsLogEvent.getRsStartTime()\n , wrsLogEvent.getRsEndTime()\n , wrsLogEvent.getWriteDuration()\n , wrsLogEvent.getExecuteDuration()\n );\n AccessSqlLogger.getInstance().process(recordAccess);\n }\n }\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }\n }",
"public interface ActionMapperVisitor {\r\n\r\n\t/**\r\n\t * This method creates a new AcquirePermitTile action according to the AcquirePermitTileDTO received,\r\n\t * then maps all the parameters DTO into their corresponding real objects, setting them to the real action created\r\n\t * @param selectedActionDTO is the action selected by the client whose parameters need to be translated\r\n\t * return an AcquirePermitTile action with all the parameters set\r\n\t */\r\n\tpublic AcquirePermitTile map(AcquirePermitTileDTO selectedActionDTO);\r\n\t\r\n\t/**\r\n\t * This method creates a new BuildByKing action according to the BuildByKingDTO received,\r\n\t * then maps all the parameters DTO into their corresponding real objects, setting them to the real action created\r\n\t * @param selectedActionDTO is the action selected by the client whose parameters need to be translated\r\n\t * return a BuildByKing action with all the parameters set\r\n\t */\r\n\tpublic BuildByKing map(BuildByKingDTO selectedActionDTO);\r\n\t\r\n\t/**\r\n\t * This method creates a new BuildByPermitTile action according to the BuildByPermitTileDTO received,\r\n\t * then maps all the parameters DTO into their corresponding real objects, setting them to the real action created\r\n\t * @param selectedActionDTO is the action selected by the client whose parameters need to be translated\r\n\t * @return an BuildByPermitTile action with all the parameters set\r\n\t */\r\n\tpublic BuildByPermitTile map(BuildByPermitTileDTO selectedActionDTO);\r\n\t\r\n\t/**\r\n\t * This method creates a new ChangePermitTiles action according to the ChangePermitTilesDTO received,\r\n\t * then maps all the parameters DTO into their corresponding real objects, setting them to the real action created\r\n\t * @param selectedActionDTO is the action selected by the client whose parameters need to be translated\r\n\t * @return an ChangePermitTiles action with all the parameters set\r\n\t */\r\n\tpublic ChangePermitTiles map(ChangePermitTilesDTO selectedActionDTO);\r\n\t\r\n\t/**\r\n\t * This method creates a new ElectCouncillor action according to the ElectCouncillorDTO received,\r\n\t * then maps all the parameters DTO into their corresponding real objects, setting them to the real action created\r\n\t * @param selectedActionDTO is the action selected by the client whose parameters need to be translated\r\n\t * @return an ElectCouncillor action with all the parameters set\r\n\t */\r\n\tpublic ElectCouncillor map(ElectCouncillorDTO selectedActionDTO);\r\n\t\r\n\t/**\r\n\t * This method creates a new ElectCouncillorByAssistant action according to the ElectCouncillorByAssistantDTO received,\r\n\t * then maps all the parameters DTO into their corresponding real objects, setting them to the real action created\r\n\t * @param selectedActionDTO is the action selected by the client whose parameters need to be translated\r\n\t * @return an ElectCouncillorByAssistant action with all the parameters set\r\n\t */\r\n\tpublic ElectCouncillorByAssistant map(ElectCouncillorByAssistantDTO selectedActionDTO);\r\n\t\r\n\t/**\r\n\t * This method creates a new MakeAnOffer action according to the MakeAnOfferDTO received,\r\n\t * then maps all the parameters DTO into their corresponding real objects, setting them to the real action created\r\n\t * @param selectedActionDTO is the action selected by the client whose parameters need to be translated\r\n\t * @return an MakeAnOffer action with all the parameters set\r\n\t */\r\n\tpublic MakeAnOffer map(MakeAnOfferDTO selectedActionDTO);\r\n\t\r\n\t/**\r\n\t * This method creates a new AcceptAnOffer action according to the AcceptAnOfferDTO received,\r\n\t * then maps all the parameters DTO into their corresponding real objects, setting them to the real action created\r\n\t * @param selectedActionDTO is the action selected by the client whose parameters need to be translated\r\n\t * @return an AcceptAnOffer action with all the parameters set\r\n\t */\r\n\tpublic AcceptAnOffer map(AcceptAnOfferDTO selectedActionDTO);\r\n\t\r\n\t/**\r\n\t * This method creates a new ChooseCityBonusAction action according to the ChooseCityBonusActionDTO received,\r\n\t * then maps all the parameters DTO into their corresponding real objects, setting them to the real action created\r\n\t * @param selectedActionDTO is the action selected by the client whose parameters need to be translated\r\n\t * @return an ChooseCityBonusAction action with all the parameters set\r\n\t */\r\n\tpublic ChooseCityBonusAction map(ChooseCityActionDTO selectedActionDTO);\r\n\t\r\n\t/**\r\n\t * This method creates a new PurchasedPermitTileAction action according to the PurchasedPermitTileActionDTO received,\r\n\t * then maps all the parameters DTO into their corresponding real objects, setting them to the real action created\r\n\t * @param selectedActionDTO is the action selected by the client whose parameters need to be translated\r\n\t * @return an PurchasedPermitTileAction action with all the parameters set\r\n\t */\r\n\tpublic PurchasedPermitTileAction map(PurchasedPermitTileActionDTO selectedActionDTO);\r\n\t\r\n\t/**\r\n\t * This method creates a new PickPermitTileBonusAction action according to the PickPermitTileBonusActionDTO received,\r\n\t * then maps all the parameters DTO into their corresponding real objects, setting them to the real action created\r\n\t * @param selectedActionDTO is the action selected by the client whose parameters need to be translated\r\n\t * @return an PickPermitTileBonusAction action with all the parameters set\r\n\t */\r\n\tpublic PickPermitTileBonusAction map(PickPermitTileActionDTO pickPermitTileActionDTO);\r\n\t\r\n}",
"public ActionForward execute(ActionMapping mapping,\n ActionForm form,\n HttpServletRequest request,\n HttpServletResponse response)\n throws Exception {\n\n // default target to success\n String strTarget = \"success\";\n \n\n String strUrl = request.getParameter(\"url\");\n\n // set the target to failure if we could not retrieve the organ list\n if (StringUtils.hasValue(strUrl)) {\n // put all the servers in the request\n request.setAttribute(\"url\", strUrl);\n } else {\n strTarget = \"error\";\n }\n\n // forward to the appropriate View\n return mapping.findForward(strTarget);\n }",
"@Override\n\tpublic boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object object) throws Exception {\n\t\tlogger.info(request.getRequestURI());\n\t //method\n\t\tlogger.info(request.getMethod());\n\t //ip\n\t\tlogger.info(request.getRemoteAddr());\n\t\tEnumeration enu=request.getParameterNames(); \n\t\twhile(enu.hasMoreElements()){ \n\t\t\tString paraName=(String)enu.nextElement(); \n\t\t\tlogger.info(paraName+\": \"+request.getParameter(paraName));\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"@Override\n\tpublic void processAction(ActionRequest actionRequest, ActionResponse actionResponse)\n\t\t\tthrows IOException, PortletException {\n\t\tsuper.processAction(actionRequest, actionResponse);\n\t}",
"public void printMapping() {\n LogDumper.out(sourceOutputMap);\n }",
"public ActionForward execute(ActionMapping actionMapping,\r\n ActionForm actionForm,\r\n HttpServletRequest request,\r\n HttpServletResponse response) {\r\n return process(actionMapping, actionForm, request, response, null);\r\n }",
"public void mapping() {\n\t\t\n\t}",
"@Override\n public void doInit() {\n action = (String) getRequestAttributes().get(\"action\");\n }",
"public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {\n\n\t\t// Extract attributes we will need\n\t\tAgent agent = null;\n\t\t\n\t\tHttpSession session = request.getSession();\n\t\tActionMessages errors = new ActionMessages();\n\t\trequest.setAttribute(\"maintask\", \"1\");\n\t\t\n\t\t\n\t\tif (request.getParameter(\"loadBarcode\") != null) {\n\t\t\tLFFound found = new LFServiceBean().getFoundItemByBarcode(request.getParameter(\"loadBarcode\"));\n\t\t\tif (found == null) {\n\t\t\t\tActionMessage error = new ActionMessage(\"error.unable.add.item\");\n\t\t\t\terrors.add(ActionMessages.GLOBAL_MESSAGE, error);\n\t\t\t\tsaveMessages(request, errors);\n\t\t\t\treturn (mapping.findForward(\"success\"));\n\t\t\t} else {\n\t\t\t\tresponse.sendRedirect(\"create_found_item.do?barcode=\" + found.getBarcode());\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (request.getParameter(\"taskmanager\") != null) {\n\t\t\tif (session.getAttribute(\"user\") == null) {\n\t\t\t\tresponse.sendRedirect(\"logoff.do\");\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\ttaskManagerSetup(session, request);\n\t\t\t//Forward control to the specified success URI\n\t\t\treturn (mapping.findForward(\"success\"));\n\t\t}\n\n\t\t// Validate the request parameters specified by the user\n\t\tString username = (String) PropertyUtils.getSimpleProperty(form, \"username\");\n\t\tString password = (String) PropertyUtils.getSimpleProperty(form, \"password\");\n\t\tString instance = (String) System.getProperty(\"instance.ref\");\n\t\tString companyCode = request.getParameter(\"companyCode\");\n\t\t\n\t\tSsoUtils ssoUtils = new SamlUtils();//TODO consider spring injection\n\t\tSsoNode ssoNode = ssoUtils.getSsoNode(request);\n\t\t\n\t\t\n\t\tboolean hasSSO=ssoNode.isValidAssertion();\n\t\t\n\t\tif (!hasSSO && username.length() == 0 && password.length() == 0) {\n\t\t\tsession.invalidate();\n\t\t\tresponse.addHeader(\"Pragma\", \"No-cache\");\n\t\t\tresponse.addHeader(\"Cache-Control\", \"no-cache\");\n\t\t\tresponse.addDateHeader(\"Expires\", -1);\n\n\t\t\tString ldapRedirect=PropertyBMO.getValue(PropertyBMO.LDAP_REDIRECT);\n\t\t\tif(request.getParameter(\"bypass\") == null && ldapRedirect!=null && !ldapRedirect.isEmpty()){\n\t\t\t\tresponse.sendRedirect(ldapRedirect);\n\t\t\t}\n\t\t\treturn mapping.findForward(TracingConstants.LOGON);\n\t\t}\n\t\tauthenlog.info(\"Authenticating User: \"+username+\". Company Code: \"+companyCode+\". Instance: \"+instance);\n\t\tif(hasSSO){\n\t\t\tboolean autoProvision = PropertyBMO.isTrue(PropertyBMO.SSO_AUTO_PROVISION);\n\t\t\tagent = SecurityUtils.authUserNoPassword(ssoNode.getUsername(), ssoNode.getCompanycode(), 0, errors, autoProvision, ssoNode);\n\t\t} else {\n\t\t\tagent = SecurityUtils.authUser(username, password, companyCode, 0, errors);\n\t\t}\n\t\t// Report any errors we have discovered back to the original form\n\t\tif (!errors.isEmpty()) {\n\t\t\tsaveMessages(request, errors);\n\t\t\tauthenlog.info(\"User: \"+username+\", Company Code: \"+companyCode+\", Instance: \"+instance+\" Authentication Failed\");\n\t\t\tPropertyUtils.setSimpleProperty(form, \"username\", foobar);\n\t\t\tresponse.addHeader(\"Pragma\", \"No-cache\");\n\t\t\tresponse.addHeader(\"Cache-Control\", \"no-cache\");\n\t\t\tresponse.addDateHeader(\"Expires\", -1);\n\t\t\treturn mapping.findForward(TracingConstants.LOGON);\n\t\t}\n\n\t\tauthenlog.info(\"User: \"+username+\", Company Code: \"+companyCode+\", Instance: \"+instance+\" Authentication Success\");\n\t\t// check to see if password needs to be reset\n\t\t/** SF: If user logged in through LDAP, it should bypass password validation requirements **/\n\t\tif (!hasSSO && (agent.isReset_password() || !SecurityUtils.isPolicyAcceptablePassword(companyCode, password, username, request, true))) {\n\t\t\tsession.setAttribute(\"usertemp\", agent);\n\t\t\tresponse.addHeader(\"Pragma\", \"No-cache\");\n\t\t\tresponse.addHeader(\"Cache-Control\", \"no-cache\");\n\t\t\tresponse.addDateHeader(\"Expires\", -1);\n\t\t\treturn mapping.findForward(TracingConstants.PASS_RESET);\n\t\t}\n\n\t\tint expiredays = agent.getStation().getCompany().getVariable().getPass_expire_days();\n\t\t/** SF: If user logged in through LDAP, it should bypass password expiration requirements **/\n\t\tif (!hasSSO && expiredays > 0) {\n\t\t\tDate lastreset = agent.getLast_pass_reset_date();\n\t\t\tif (lastreset == null || DateUtils.formatDate(lastreset, TracingConstants.DB_DATEFORMAT, null, null).equals(\"0000-00-00\")) {\n\t\t\t\t// first time logon, set it\n\t\t\t\tagent.setLast_pass_reset_date(new Date());\n\t\t\t} else {\n\t\t\t\tlong nowtime = ((new Date()).getTime() / (3600000 * 24));\n\t\t\t\tlong lastresettime = (lastreset.getTime() / (3600000 * 24));\n\t\t\t\tif ((nowtime - lastresettime) > expiredays) {\n\t\t\t\t\t// forward to reset page\n\t\t\t\t\tsession.setAttribute(\"usertemp\", agent);\n\t\t\t\t\tresponse.addHeader(\"Pragma\", \"No-cache\");\n\t\t\t\t\tresponse.addHeader(\"Cache-Control\", \"no-cache\");\n\t\t\t\t\tresponse.addDateHeader(\"Expires\", -1);\n\t\t\t\t\treturn mapping.findForward(TracingConstants.PASS_RESET);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Create the history container object\n\t\tsession.setAttribute(\"historyContainer\", new HistoryContainer());\n\n\t\t// Save our logged-in user in the session\n\t\tsession.setAttribute(\"lastupdate\", new Date());\n\t\t//session.setMaxInactiveInterval(agent.getTimeout() * 60);\n\t\tsession.setAttribute(\"user\", agent);\n\n\t\t// write to database\n\t\tagent.setLast_logged_on(TracerDateTime.getGMTDate());\n\t\tagent.setIs_online(1);\n\t\tSecurityUtils.updateAgentLogin(agent, null, 1, true);\n\n\t\t// load drop down ui properties into session\n\t\tProperties properties = new Properties();\n\t\ttry {\n\t\t\tServletContext sc = getServlet().getServletContext();\n\t\t\tString configfilepath = sc.getRealPath(\"/\") + \"/WEB-INF/classes/\";\n\t\t\tproperties.load(new FileInputStream(configfilepath + \"custom_ui.properties\"));\n\t\t\tsession.setAttribute(\"first_row_menu_text\", properties.getProperty(\"first_row_menu_text\"));\n\t\t\tsession.setAttribute(\"first_row_bg\", properties.getProperty(\"first_row_bg\"));\n\t\t\tsession.setAttribute(\"drop_down_text\", properties.getProperty(\"drop_down_text\"));\n\t\t\tsession.setAttribute(\"drop_down_text_hilite\", properties.getProperty(\"drop_down_text_hilite\"));\n\t\t\tsession.setAttribute(\"drop_down_bg\", properties.getProperty(\"drop_down_bg\"));\n\t\t\tsession.setAttribute(\"drop_down_bg_hilite\", properties.getProperty(\"drop_down_bg_hilite\"));\n\n\t\t} catch (IOException e) {\n\t\t\t// unable to get config\n\t\t\tresponse.addHeader(\"Pragma\", \"No-cache\");\n\t\t\tresponse.addHeader(\"Cache-Control\", \"no-cache\");\n\t\t\tresponse.addDateHeader(\"Expires\", -1);\n\t\t\treturn mapping.findForward(TracingConstants.LOGON);\n\t\t}\n\n\t\t// Remove the obsolete form bean\n\t\tif (mapping.getAttribute() != null) {\n\t\t\tif (\"request\".equals(mapping.getScope()))\n\t\t\t\trequest.removeAttribute(mapping.getAttribute());\n\t\t\telse\n\t\t\t\tsession.removeAttribute(mapping.getAttribute());\n\t\t}\n\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tLinkedHashMap<String, LinkedHashMap<String, String>> map = UserPermissions.renderApplicationLinks(agent);\n\t\tsession.setAttribute(\"menu_links\", map);\n\t\t//Setup the activity list\n\t\tif (map != null && map.get(\"Task Manager\") != null) {\n\t\t\ttaskManagerSetup(session, request);\n\t\t}\n\t\t// prepopulate list\n\t\tTracerUtils.populateLists(session);\n\n\t\tif (UserPermissions.hasPermission(TracingConstants.SYSTEM_COMPONENT_NAME_CBRO_VIEW, agent)) {\n\t\t\t//Setup cbroStationid for the first time\n\t\t\tsession.setAttribute(\"cbroStationID\", \"\" + agent.getStation().getStation_ID());\n\t\t}\n\n\t\t// Forward control to the specified success URI\n\t\tString redirectUrl = (String) session.getAttribute(TracingConstants.SESSION_REDIRECT_URL);\n\t\tif (redirectUrl != null) {\n\t\t\tsession.removeAttribute(TracingConstants.SESSION_REDIRECT_URL);\n\t\t\tresponse.sendRedirect(redirectUrl);\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t\n\t\treturn (mapping.findForward(\"success\"));\n\t}",
"@Override\r\n\tpublic ActionForward modify_object(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows KANException {\n\t\treturn null;\r\n\t}",
"@Override\n public void log(Request request, Response response)\n {\n int committedStatus = response.getCommittedMetaData().getStatus();\n\n // only interested in error cases - bad request & server errors\n if ((committedStatus >= 500) || (committedStatus == 400))\n {\n super.log(request, response);\n }\n else\n {\n System.err.println(\"### Ignored request (response.committed.status=\" + committedStatus + \"): \" + request);\n }\n }",
"@Override\r\n public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {\r\n if (LOG.isDebugEnabled()) {\r\n LOG.debug(String.format(\"ENTRY %s%n%s\", form.getClass().getSimpleName(), request.getRequestURI()));\r\n }\r\n \r\n ActionForward forward = null;\r\n\r\n Throwable t = (Throwable) request.getAttribute(Globals.EXCEPTION_KEY);\r\n\r\n if (t == null) {\r\n forward = mapping.findForward(KRADConstants.MAPPING_CLOSE);\r\n } else {\r\n forward = processException(mapping, form, request, t);\r\n }\r\n \r\n if (LOG.isDebugEnabled()) {\r\n LOG.debug(String.format(\"EXIT %s\", (forward == null) ? \"null\" : forward.getPath()));\r\n }\r\n\r\n return forward;\r\n }",
"@Override\n\tpublic void reset(ActionMapping mapping, HttpServletRequest request) {\n\t\tsuper.reset(mapping, request);\n\t}",
"public ActionForward processResponse(ActionMapping mapping, ActionForm form, HttpServletRequest request,\r\n HttpServletResponse response) throws Exception {\r\n Logger l = LogUtils.enterLog(getClass(), \"processResponse\", new Object[]{mapping, form, request, response});\r\n String forwardString = \"viewAssociatedRisk\";\r\n\r\n try {\r\n // Get PolicyHeader\r\n PolicyHeader policyHeader = getPolicyHeader(request);\r\n String policyNo = policyHeader.getPolicyNo();\r\n\r\n // Check if workflow exists, otherwise throw application exception\r\n WorkflowAgent wa = WorkflowAgentImpl.getInstance();\r\n if (wa.hasWorkflow(policyNo)) {\r\n Record inputRecord = getInputRecord(request);\r\n boolean ibnrNotifyConfirmed = InactiveRiskFields.getIbnrNotifyConfirmed(inputRecord).booleanValue();\r\n if (!ibnrNotifyConfirmed) {\r\n wa.setWorkflowTransitionParameter(policyNo, \"INVALID\");\r\n }\r\n else {\r\n // If there is only one associated risk\r\n if (inputRecord.hasStringValue(InactiveRiskFields.ASSOCIOATED_RISK_COUNT)\r\n && InactiveRiskFields.getAssociatedRiskCount(inputRecord).equals(\"1\")) {\r\n // perform cancel IBNR active risk directly and forward to invokeViewIbnrInactiveRisk step\r\n getIbnrRiskManager().performCancellation(policyHeader, inputRecord);\r\n wa.setWorkflowTransitionParameter(policyNo, \"SINGLEASSO\");\r\n }\r\n else if (inputRecord.hasStringValue(InactiveRiskFields.ASSOCIOATED_RISK_COUNT)\r\n && InactiveRiskFields.getAssociatedRiskCount(inputRecord).equals(\"0\")) { // should not enter this part\r\n wa.setWorkflowTransitionParameter(policyNo, \"INVALID\");\r\n }\r\n\r\n // Set attributes\r\n String transactionLogId = policyHeader.getLastTransactionInfo().getTransactionLogId();\r\n String transEffDate = policyHeader.getLastTransactionInfo().getTransEffectiveFromDate();\r\n String issueCompanyId = policyHeader.getIssueCompanyEntityId();\r\n wa.setWorkflowAttribute(policyNo, TransactionFields.TRANSACTION_LOG_ID, transactionLogId);\r\n wa.setWorkflowAttribute(policyNo, PremiumAccountingFields.TRANS_EFF_DATE, transEffDate);\r\n wa.setWorkflowAttribute(policyNo, PolicyFields.ISSUE_COMPANY_ID, issueCompanyId);\r\n wa.setWorkflowAttribute(policyNo, PolicyFields.POLICY_ID, policyHeader.getPolicyId());\r\n }\r\n\r\n // Get the next state\r\n forwardString = wa.getNextState(policyNo);\r\n setForwardParametersForWorkflow(request, forwardString, policyNo, wa.getWorkflowInstanceIdName());\r\n }\r\n else {\r\n throw new AppException(AppException.UNEXPECTED_ERROR,\r\n \"Failed to determine workflow for IBNR Notify.\");\r\n }\r\n }\r\n catch (Exception e) {\r\n forwardString = handleErrorPopup(AppException.UNEXPECTED_ERROR, \"Failed to process response.\", e, request, mapping);\r\n }\r\n\r\n ActionForward af = mapping.findForward(forwardString);\r\n l.exiting(getClass().getName(), \"processResponse\", af);\r\n return af;\r\n }",
"void logHTTPRequest(HttpServletRequest request, Logger logger, List parameterNamesToObfuscate);",
"public abstract String intercept(ActionInvocation invocation) throws Exception;",
"@Override\n\tprotected void initial(HttpServletRequest req) throws SiDCException, Exception {\n\t\tLogAction.getInstance().initial(logger, this.getClass().getCanonicalName());\n\t}",
"@Override\r\n\tpublic ActionForward to_objectModify(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows KANException {\n\t\treturn null;\r\n\t}",
"public ActionForward execTaskForward( ActionMapping mapping, ActionForm form, HttpServletRequest request,\r\n HttpServletResponse response, WatchedTask task )\r\n throws IOException, ServletException\r\n {\r\n\r\n request.getRequestDispatcher( ( (StrutsWatchedTask) task ).getActionURL() ).forward( request, response );\r\n\r\n return null;\r\n }",
"public ActionForward getInitialValuesForAddSpecialHandling(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {\r\n // return load(mapping, form, request, response);\r\n Logger l = LogUtils.enterLog(getClass(), \"getInitialValuesForAddSpecialHandling\", new Object[]{mapping, form, request, response});\r\n try {\r\n // Secure access to the page, load the Oasis Fields without loading the LOVs,\r\n securePage(request, form);\r\n\r\n // get input\r\n Record inputRecord = getInputRecord(request);\r\n Record initialRecord = getSpecialHandlingManager().getInitialValuesForAddSpecialHandling(inputRecord);\r\n\r\n // get LOV labels for initial values\r\n publishOutputRecord(request, initialRecord);\r\n loadListOfValues(request, form);\r\n getLovLabelsForInitialValues(request, initialRecord);\r\n\r\n // prepare return values\r\n writeAjaxXmlResponse(response, initialRecord, true);\r\n }\r\n catch (Exception e) {\r\n handleErrorForAjax(AppException.UNEXPECTED_ERROR, \"Failed to get initial Special Handling data.\", e, response);\r\n }\r\n\r\n ActionForward af = null;\r\n l.exiting(getClass().getName(), \"getInitialValuesForAddSpecialHandling\", af);\r\n return af;\r\n }",
"public void processAction(ActionRequest request, ActionResponse response) throws PortletException, java.io.IOException {\r\n\r\n }",
"ActionMap createActionMap() {\n ActionMap am = super.createActionMap();\n if (am != null) {\n am.put(\"selectMenu\", new PostAction((JMenu)menuItem, true)); }\n return am; }",
"@Override\n\t\tpublic void onGetWalkingRouteResult(MKWalkingRouteResult arg0, int arg1) {\n\t\t\t\n\t\t}",
"LogAction createLogAction();",
"protected ActionForward performAction(ActionMapping \t\tmapping,\n\t\t\t\t\t\t\t\t\t\t ActionForm\t\t\tform,\n\t\t\t\t\t\t\t\t\t\t HttpServletRequest\trequest,\n\t\t\t\t\t\t\t\t\t\t HttpServletResponse\tresponse)\n\t\tthrows Exception \n\t{\n\t\tString forward = \"success\";\n\t\trequest.setAttribute(ALLOW_EDITS_KEY, \"false\");\n\t\t\n\t\tHttpSession session = request.getSession();\n\t\tArrayList selectedTestIds = new ArrayList();\n\t\tsession.setAttribute(\"selectedTestIds\", selectedTestIds);\n\n\t\tBaseActionForm dynaForm = (BaseActionForm) form;\n\n\t\t// Initialize the form.\n\t\tdynaForm.initialize(mapping);\n\t\t\n\t\tPropertyUtils.setProperty(dynaForm, \"currentDate\", DateUtil.getCurrentDateAsText());\n\t\tPropertyUtils.setProperty(dynaForm, \"sampleTypes\", DisplayListService.getList(ListType.SAMPLE_TYPE_ACTIVE));\n\t\tPropertyUtils.setProperty(dynaForm, \"sampleSources\", DisplayListService.getList(ListType.SAMPLE_SOURCE));\n\t\tPropertyUtils.setProperty(dynaForm, \"initConditionFormErrorsList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_INIT_COND_FORM_ERRORS));\n\t\tPropertyUtils.setProperty(dynaForm, \"initConditionLabelErrorsList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_INIT_COND_LABEL_ERRORS));\n\t\tPropertyUtils.setProperty(dynaForm, \"initConditionMiscList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_INIT_COND_MISC));\n\t\tPropertyUtils.setProperty(dynaForm, \"rejectionReasonFormErrorsList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_REJECTION_FORM_ERRORS));\n\t\tPropertyUtils.setProperty(dynaForm, \"rejectionReasonLabelErrorsList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_REJECTION_LABEL_ERRORS));\n\t\tPropertyUtils.setProperty(dynaForm, \"rejectionReasonMiscList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_REJECTION_MISC));\n PropertyUtils.setProperty(dynaForm, \"genderList\", DisplayListService.getList(ListType.GENDERS));\n PropertyUtils.setProperty(dynaForm, \"cityList\", DisplayListService.getList(ListType.CITY));\n PropertyUtils.setProperty(dynaForm, \"districtList\", DisplayListService.getList(ListType.DISTRICT));\n PropertyUtils.setProperty(dynaForm, \"departmentList\", DisplayListService.getList(ListType.DEPARTMENT));\n PropertyUtils.setProperty(dynaForm, \"patientTypeList\", DisplayListService.getList(ListType.PATIENT_TYPE));\n\n // for backwards compatibility with non-modal version of sample entry\n\t\tPropertyUtils.setProperty(dynaForm, \"initialSampleConditionList\", DisplayListService.getList(ListType.INITIAL_SAMPLE_CONDITION));\n\t\tPropertyUtils.setProperty(dynaForm, \"testSectionList\", DisplayListService.getList(ListType.TEST_SECTION));\n\n\t\tSample\tsample\t= new Sample();\n\n\t\t// Set received date and entered date to today's date\n\t\tDate today = Calendar.getInstance().getTime();\n\t\tString dateAsText = DateUtil.formatDateAsText(today);\n\n\t\tSystemConfiguration sysConfig = SystemConfiguration.getInstance();\n\t\t\n\t\tsample.setReceivedDateForDisplay(dateAsText);\n\t\tsample.setEnteredDateForDisplay(dateAsText);\n\t\tsample.setReferredCultureFlag(sysConfig.getQuickEntryDefaultReferredCultureFlag());\n\t\tsample.setStickerReceivedFlag(sysConfig.getQuickEntryDefaultStickerReceivedFlag());\n\t\t\n\t\t// default nextItemSequence to 1 (for clinical - always 1)\n\t\tsample.setNextItemSequence(sysConfig.getQuickEntryDefaultNextItemSequence());\n\n\t\t// revision is set to 0 on insert\n\t\tsample.setRevision(sysConfig.getQuickEntryDefaultRevision());\n\n\t\tsample.setCollectionTimeForDisplay(sysConfig.getQuickEntryDefaultCollectionTimeForDisplay());\n\n\t\tif (sample.getId() != null && !sample.getId().equals(\"0\"))\n\t\t{\n\t\t\trequest.setAttribute(ID, sample.getId());\n\t\t}\n\n\t\t// populate form from valueholder\n\t\tPropertyUtils.copyProperties(form, sample);\n\n\t\tPropertyUtils.setProperty(form, \"currentDate\",\t\tdateAsText);\n\t\trequest.setAttribute(\"menuDefinition\", \"BatchEntryDefinition\");\n\t\treturn mapping.findForward(forward);\n\t}",
"public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)\r\n {\r\n final org.apache.struts.action.ActionErrors errors = super.validate(mapping, request);\r\n if (errors != null && !errors.isEmpty())\r\n {\r\n // we populate the current form with only the request parameters\r\n Object currentForm = request.getSession().getAttribute(\"form\");\r\n // if we can't get the 'form' from the session, try from the request\r\n if (currentForm == null)\r\n {\r\n currentForm = request.getAttribute(\"form\");\r\n }\r\n if (currentForm != null)\r\n {\r\n final java.util.Map parameters = new java.util.HashMap();\r\n for (final java.util.Enumeration names = request.getParameterNames(); names.hasMoreElements();)\r\n {\r\n final String name = String.valueOf(names.nextElement());\r\n parameters.put(name, request.getParameter(name));\r\n }\r\n try\r\n {\r\n org.apache.commons.beanutils.BeanUtils.populate(currentForm, parameters);\r\n }\r\n catch (java.lang.Exception populateException)\r\n {\r\n // ignore if we have an exception here (we just don't populate).\r\n }\r\n }\r\n }\r\n return errors;\r\n }",
"public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)\r\n {\r\n final org.apache.struts.action.ActionErrors errors = super.validate(mapping, request);\r\n if (errors != null && !errors.isEmpty())\r\n {\r\n // we populate the current form with only the request parameters\r\n Object currentForm = request.getSession().getAttribute(\"form\");\r\n // if we can't get the 'form' from the session, try from the request\r\n if (currentForm == null)\r\n {\r\n currentForm = request.getAttribute(\"form\");\r\n }\r\n if (currentForm != null)\r\n {\r\n final java.util.Map parameters = new java.util.HashMap();\r\n for (final java.util.Enumeration names = request.getParameterNames(); names.hasMoreElements();)\r\n {\r\n final String name = String.valueOf(names.nextElement());\r\n parameters.put(name, request.getParameter(name));\r\n }\r\n try\r\n {\r\n org.apache.commons.beanutils.BeanUtils.populate(currentForm, parameters);\r\n }\r\n catch (java.lang.Exception populateException)\r\n {\r\n // ignore if we have an exception here (we just don't populate).\r\n }\r\n }\r\n }\r\n return errors;\r\n }",
"public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)\r\n {\r\n final org.apache.struts.action.ActionErrors errors = super.validate(mapping, request);\r\n if (errors != null && !errors.isEmpty())\r\n {\r\n // we populate the current form with only the request parameters\r\n Object currentForm = request.getSession().getAttribute(\"form\");\r\n // if we can't get the 'form' from the session, try from the request\r\n if (currentForm == null)\r\n {\r\n currentForm = request.getAttribute(\"form\");\r\n }\r\n if (currentForm != null)\r\n {\r\n final java.util.Map parameters = new java.util.HashMap();\r\n for (final java.util.Enumeration names = request.getParameterNames(); names.hasMoreElements();)\r\n {\r\n final String name = String.valueOf(names.nextElement());\r\n parameters.put(name, request.getParameter(name));\r\n }\r\n try\r\n {\r\n org.apache.commons.beanutils.BeanUtils.populate(currentForm, parameters);\r\n }\r\n catch (java.lang.Exception populateException)\r\n {\r\n // ignore if we have an exception here (we just don't populate).\r\n }\r\n }\r\n }\r\n return errors;\r\n }",
"public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)\r\n {\r\n final org.apache.struts.action.ActionErrors errors = super.validate(mapping, request);\r\n if (errors != null && !errors.isEmpty())\r\n {\r\n // we populate the current form with only the request parameters\r\n Object currentForm = request.getSession().getAttribute(\"form\");\r\n // if we can't get the 'form' from the session, try from the request\r\n if (currentForm == null)\r\n {\r\n currentForm = request.getAttribute(\"form\");\r\n }\r\n if (currentForm != null)\r\n {\r\n final java.util.Map parameters = new java.util.HashMap();\r\n for (final java.util.Enumeration names = request.getParameterNames(); names.hasMoreElements();)\r\n {\r\n final String name = String.valueOf(names.nextElement());\r\n parameters.put(name, request.getParameter(name));\r\n }\r\n try\r\n {\r\n org.apache.commons.beanutils.BeanUtils.populate(currentForm, parameters);\r\n }\r\n catch (java.lang.Exception populateException)\r\n {\r\n // ignore if we have an exception here (we just don't populate).\r\n }\r\n }\r\n }\r\n return errors;\r\n }",
"public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)\r\n {\r\n final org.apache.struts.action.ActionErrors errors = super.validate(mapping, request);\r\n if (errors != null && !errors.isEmpty())\r\n {\r\n // we populate the current form with only the request parameters\r\n Object currentForm = request.getSession().getAttribute(\"form\");\r\n // if we can't get the 'form' from the session, try from the request\r\n if (currentForm == null)\r\n {\r\n currentForm = request.getAttribute(\"form\");\r\n }\r\n if (currentForm != null)\r\n {\r\n final java.util.Map parameters = new java.util.HashMap();\r\n for (final java.util.Enumeration names = request.getParameterNames(); names.hasMoreElements();)\r\n {\r\n final String name = String.valueOf(names.nextElement());\r\n parameters.put(name, request.getParameter(name));\r\n }\r\n try\r\n {\r\n org.apache.commons.beanutils.BeanUtils.populate(currentForm, parameters);\r\n }\r\n catch (java.lang.Exception populateException)\r\n {\r\n // ignore if we have an exception here (we just don't populate).\r\n }\r\n }\r\n }\r\n return errors;\r\n }",
"@Override\n public void doPost(HttpServletRequest request, HttpServletResponse response) {\n String handler = MapReduceServlet.getHandler(request);\n if (handler.startsWith(CONTROLLER_PATH)) {\n if (!checkForTaskQueue(request, response)) {\n return;\n }\n handleController(request, response);\n } else if (handler.startsWith(MAPPER_WORKER_PATH)) {\n if (!checkForTaskQueue(request, response)) {\n return;\n }\n handleMapperWorker(request, response);\n } else if (handler.startsWith(START_PATH)) {\n // We don't add a GET handler for this one, since we're expecting the user \n // to POST the whole XML specification.\n // TODO(frew): Make name customizable.\n // TODO(frew): Add ability to specify a redirect.\n handleStart(\n ConfigurationXmlUtil.getConfigurationFromXml(request.getParameter(\"configuration\")),\n \"Automatically run request\", request);\n } else if (handler.startsWith(COMMAND_PATH)) {\n if (!checkForAjax(request, response)) {\n return;\n }\n handleCommand(handler.substring(COMMAND_PATH.length() + 1), request, response);\n } else {\n throw new RuntimeException(\n \"Received an unknown MapReduce request handler. See logs for more detail.\");\n }\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n response.setContentType(\"application/json;charset=UTF-8\");\r\n response.setHeader(\"Cache-Control\", \"no-cache, no-store, must-revalidate\"); // HTTP 1.1\r\n response.setHeader(\"Pragma\", \"no-cache\"); // HTTP 1.0\r\n response.setDateHeader(\"Expires\", 0); // Proxies.\r\n PrintWriter out = response.getWriter();\r\n\r\n try {\r\n String actionNameParam = request.getPathInfo().substring(1).split(\"/\")[0];\r\n if (actionNameParam != null) {\r\n Set<String> localAddresses = new HashSet<>();\r\n localAddresses.add(InetAddress.getLocalHost().getHostAddress());\r\n for (InetAddress inetAddress : InetAddress.getAllByName(\"localhost\")) {\r\n localAddresses.add(inetAddress.getHostAddress());\r\n }\r\n if (localAddresses.contains(request.getRemoteAddr())) {\r\n LOGGER.log(Level.FINE, \"running from local address\");\r\n isLocalhost = true;\r\n }\r\n\r\n Actions actionToDo = Actions.valueOf(actionNameParam.toUpperCase());\r\n if (UsersController.isLogged(request) || isLocalhost) {\r\n out.print(actionToDo.doPerform(request, response).toString(2));\r\n } else {\r\n JSONObject json = new JSONObject();\r\n json.put(\"error\", \"not logged\");\r\n out.print(json.toString());\r\n }\r\n\r\n } else {\r\n out.print(\"actionNameParam -> \" + actionNameParam);\r\n }\r\n } catch (IOException e1) {\r\n LOGGER.log(Level.SEVERE, e1.getMessage(), e1);\r\n response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r\n response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e1.toString());\r\n out.print(e1.toString());\r\n } catch (SecurityException e1) {\r\n LOGGER.log(Level.SEVERE, e1.getMessage(), e1);\r\n response.setStatus(HttpServletResponse.SC_FORBIDDEN);\r\n } catch (Exception e1) {\r\n LOGGER.log(Level.SEVERE, e1.getMessage(), e1);\r\n response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r\n response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e1.toString());\r\n out.print(e1.toString());\r\n }\r\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException \n {\n final String THIS_METHOD_NAME = \"processRequest() - \";\n \n logger.enter(THIS_METHOD_NAME);\n \n response.setContentType(\"text/html;charset=UTF-8\");\n PrintWriter out = response.getWriter();\n \n /* Global initializations for the rest of the modules */\n doGlobaInit(request,response);\n \n log(THIS_METHOD_NAME + \"Global initializations are done..\");\n \n try {\n \n String controlAction = request.getParameter(\"controlAction\");\n \n log(THIS_METHOD_NAME + \"requestParam controlAction : \"+controlAction);\n \n /* \n * Used for the determining whether or not to display the fields \n * at the first time \n */\n request.setAttribute(\"controlAction\", controlAction);\n \n if(controlAction==null || controlAction.trim().length()<=0)\n {\n //putInSession(request, \"selectedModule\", null);\n actOnNullAction(request, response);\n }\n else if(controlAction.equalsIgnoreCase(\"getFields\"))\n {\n actOnGetFields(request, response);\n }\n else if (controlAction.equalsIgnoreCase(\"getConstraints\"))\n {\n actOnGetConstraints(request, response);\n }\n else if (controlAction.equalsIgnoreCase(\"getConstraintInfo\"))\n {\n actOnGetConstraintInfo(request, response);\n }\n else if(controlAction.equalsIgnoreCase(\"addModule\"))\n {\n //putInSession(request, \"selectedModule\", null);\n actOnAddModule(request, response); \n }\n else if(controlAction.equalsIgnoreCase(\"addField\"))\n {\n actOnAddField(request, response);\n } \n else if(controlAction.equalsIgnoreCase(\"addConstraint\"))\n {\n actOnAddConstraint(request,response);\n }\n else if (controlAction.equalsIgnoreCase(\"export\"))\n {\n actOnExport(request,response);\n }\n \n getServletContext().getRequestDispatcher(\"/admin.jsp\").forward(request, response); \n \n } finally { \n out.close();\n } \n \n logger.exit(THIS_METHOD_NAME);\n }",
"public ActionForward execute(ActionMapping actionMapping,\r\n\t\t\tActionForm actionForm, HttpServletRequest httpServletRequest,\r\n\t\t\tHttpServletResponse httpServletResponse) {\n\t\tActionForward retorno = actionMapping\r\n\t\t\t\t.findForward(\"exibirInformarImovelSituacaoCobranca\");\r\n\r\n\t\tFachada fachada = Fachada.getInstancia();\r\n\t\t\t\t\r\n\t\t// Mudar isso quando tiver esquema de segurança\r\n\t\t// HttpSession sessao = httpServletRequest.getSession(false);\r\n\t\t\r\n\t\tInformarImovelSituacaoCobrancaActionForm informarImovelSituacaoCobrancaActionForm = (InformarImovelSituacaoCobrancaActionForm) actionForm;\r\n\t\t\r\n\t\t\r\n\t\tif (httpServletRequest.getParameter(\"objetoConsulta\") != null ){\r\n\t\t\tInteger idImovel = new Integer(informarImovelSituacaoCobrancaActionForm.getIdImovel()); \r\n\t\t\tif (idImovel != null){\r\n\t\t\t\tString matriculaImovel = fachada.pesquisarInscricaoImovel(idImovel);\r\n\t\t\t\tImovel imovel = fachada.pesquisarImovelComSituacaoAguaEsgoto(idImovel);\r\n\t\t\t\thttpServletRequest.setAttribute(\"imovel\", imovel);\r\n\t\t\t\tif (matriculaImovel != null && !matriculaImovel.equalsIgnoreCase(\"\")){\r\n\t\t\t\t\tString enderecoImovel = fachada.pesquisarEndereco(idImovel);\r\n\t\t\t\t\thttpServletRequest.setAttribute(\"endereco\", enderecoImovel);\r\n\t\t\t\t\thttpServletRequest.setAttribute(\"matriculaImovel\", matriculaImovel);\r\n\t\t\t\t\t\r\n\t\t\t\t\tFiltroImovelCobrancaSituacao filtroImovelCobrancaSituacao = new FiltroImovelCobrancaSituacao();\r\n\t\t\t\t\tfiltroImovelCobrancaSituacao.adicionarParametro(new ParametroSimples(\r\n\t\t\t\t\t\t\tFiltroImovelCobrancaSituacao.IMOVEL_ID, idImovel.toString()));\r\n\t\t\t\t\tfiltroImovelCobrancaSituacao.adicionarCaminhoParaCarregamentoEntidade(\"cobrancaSituacao\");\r\n\t\t\t\t\tfiltroImovelCobrancaSituacao.adicionarCaminhoParaCarregamentoEntidade(\"cliente\");\r\n\t\t\t\t\tfiltroImovelCobrancaSituacao.adicionarCaminhoParaCarregamentoEntidade(\"imovel.ligacaoAguaSituacao\");\r\n\t\t\t\t\tfiltroImovelCobrancaSituacao.adicionarCaminhoParaCarregamentoEntidade(\"imovel.ligacaoEsgotoSituacao\");\r\n\t\t\t\t\tCollection colecaoImovelCobrancaSituacao = fachada.pesquisar(\r\n\t\t\t\t\t\t\tfiltroImovelCobrancaSituacao, ImovelCobrancaSituacao.class.getName());\r\n\t\t\t\t\t\r\n\t\t\t\t\tboolean escondeRetirar = true;\r\n\t\t\t\t\tboolean existeNaoRealizado = false;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (colecaoImovelCobrancaSituacao != null && !colecaoImovelCobrancaSituacao.isEmpty()){\r\n\t\t\t\t\t\thttpServletRequest.setAttribute(\"situacoes\", colecaoImovelCobrancaSituacao);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tfor (Iterator iter = colecaoImovelCobrancaSituacao.iterator(); iter.hasNext();) {\r\n\t\t\t\t\t\t\tImovelCobrancaSituacao imovelCobrancaSituacao = (ImovelCobrancaSituacao) iter.next();\r\n\t\t\t\t\t\t\tif (imovelCobrancaSituacao.getDataRetiradaCobranca() == null) {\r\n\t\t\t\t\t\t\t\texisteNaoRealizado = true;\r\n//\t\t\t\t\t\t\t\tescondeInserir = true;\r\n\t\t\t\t\t\t\t\tShort indicadorRetirada = imovelCobrancaSituacao.getCobrancaSituacao().getIndicadorBloqueioRetirada();\r\n\t\t\t\t\t\t\t\tif (indicadorRetirada == null || indicadorRetirada.equals(new Short(\"2\"))) {\r\n\t\t\t\t\t\t\t\t\tescondeRetirar = false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (existeNaoRealizado == false) { \r\n\t\t\t\t\t\t\tescondeRetirar = true; \r\n\t\t\t\t\t\t} \r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tescondeRetirar = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n//\t\t\t\t\tif (escondeInserir) httpServletRequest.setAttribute(\"escondeInserir\", \"sim\");\r\n\t\t\t\t\tif (escondeRetirar) httpServletRequest.setAttribute(\"escondeRetirar\", \"sim\");\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\thttpServletRequest.setAttribute(\"inexistente\", 1);\r\n\t\t\t\t\thttpServletRequest.setAttribute(\"escondeInserir\", \"sim\");\r\n\t\t\t\t\thttpServletRequest.setAttribute(\"escondeRetirar\", \"sim\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t//o sistema desabilita a primeira vez q entra na tela\r\n\t\t\thttpServletRequest.setAttribute(\"escondeInserir\", \"sim\");\r\n\t\t\thttpServletRequest.setAttribute(\"escondeRetirar\", \"sim\");\r\n\t\t}\r\n\r\n\t\t\r\n\t\treturn retorno;\r\n\r\n\t}",
"@Override\n public void onRouteInfo(BNRGRouteInfo arg0) {\n Log.d(BNRemoteConstants.MODULE_TAG, \"onRouteInfo...... \");\n }",
"public ActionForward execute(ActionMapping actionMapping,\n\t\t\tActionForm actionForm, HttpServletRequest httpServletRequest,\n\t\t\tHttpServletResponse httpServletResponse) {\n\t\tActionForward retorno = actionMapping.findForward(\"telaSucesso\");\n\t\t\n\t\tretorno.getName();\n\t\t\n\t\tIntegracaoComercialHelper helper = new IntegracaoComercialHelper();\n\t\t\n\t\tHttpSession sessao = httpServletRequest.getSession(false);\n\t\t\n\t\tUsuario usuarioLogado = (Usuario) sessao.getAttribute(\"usuarioLogado\");\n\n\t\tAlterarTipoCorteActionForm form = (AlterarTipoCorteActionForm) actionForm;\n\n\t\tFachada fachada = Fachada.getInstancia();\n\t\t\n\t\tif(form.getIdOrdemServico()!=null && !form.getIdOrdemServico().equals(\"\")){\n\t\t\n\t\t\tif (sessao.getAttribute(\"ordemServico\") != null) {\n\t\t\t\t\n\t\t\t\t//pesquisa Ligacao agua\n\t\t\t\tFiltroLigacaoAgua filtroLigacaoAgua = new FiltroLigacaoAgua();\n\t\t\t\tfiltroLigacaoAgua.adicionarParametro(new ParametroSimples(\n\t\t\t\t\t\tFiltroLigacaoAgua.ID, form.getMatriculaImovel()));\n\t\t\t\t\n\t\t\t\tfiltroLigacaoAgua.adicionarCaminhoParaCarregamentoEntidade(FiltroLigacaoAgua.CORTE_TIPO);\n\n\t\t\t\tCollection colecaoLigacao = getFachada().pesquisar(\n\t\t\t\t\t\tfiltroLigacaoAgua, LigacaoAgua.class.getName());\n\n\n\t\t\t\tLigacaoAgua ligacaoAgua = (LigacaoAgua) Util\n\t\t\t\t\t\t.retonarObjetoDeColecao(colecaoLigacao);\n\t\t\t\t\n\t\t\t\t//Pesquisa Imovel\n\t\t\t\tFiltroImovel filtroImovel = new FiltroImovel();\n\t\t\t\tfiltroImovel.adicionarParametro(new ParametroSimples(FiltroImovel.ID,form.getMatriculaImovel()));\n\n\t\t\t\tCollection colecaoImovel = getFachada().pesquisar(filtroImovel,\n\t\t\t\t\t\tImovel.class.getName());\n\n\t\t\t\t\n\n\t\t\t\tImovel imovel = (Imovel) colecaoImovel.iterator().next();\n\t\t\t\t\n\t\t\t\t//pesquisa OS\n\t\t\t\tFiltroOrdemServico filtroOrdemServico = new FiltroOrdemServico();\n\t\t\t\tfiltroOrdemServico.adicionarParametro(new ParametroSimples(FiltroOrdemServico.ID,form.getIdOrdemServico()));\n\t\t\t\tfiltroOrdemServico.adicionarCaminhoParaCarregamentoEntidade(FiltroOrdemServico.SERVICO_TIPO);\n\t\t\t\tfiltroOrdemServico.adicionarCaminhoParaCarregamentoEntidade(\"servicoTipo.debitoTipo\");\n\t\t\t\tfiltroOrdemServico.adicionarCaminhoParaCarregamentoEntidade(\"servicoNaoCobrancaMotivo\");\n \n\t\t\t\tCollection colecaoOrdemServico = fachada.pesquisar(filtroOrdemServico,OrdemServico.class.getName());\n\t\n\t\t\t\tOrdemServico ordemServico = (OrdemServico) colecaoOrdemServico.iterator().next();\n\t\t\t\t\n\t\t\t\thelper.setOrdemServico(ordemServico);\t\n\t\t\t\thelper.setLigacaoAgua(ligacaoAgua);\t\n\t\t\t\thelper.getLigacaoAgua().getCorteTipo().setId(new Integer(form.getTipoCorte()));\n\t\t\t\thelper.getLigacaoAgua().setUltimaAlteracao(form.getDataConcorrencia());\n\t\t\t\thelper.setMatriculaImovel(form.getMatriculaImovel());\n\t\t\t\thelper.setImovel(imovel);\n\n\t\t\t\tString debitoEncontrado = \"false\";\n\t\t\t\t\n\t\t\t\tdebitoEncontrado = (String) sessao.getAttribute(\"debitoEncontrado\");\n\t\t\t\t\n\t\t\t\tif(debitoEncontrado!=null && debitoEncontrado.equals(\"true\") && form.getMotivoNaoCobranca() != null \n\t\t\t\t\t\t&& !form.getMotivoNaoCobranca().equals(\"-1\")){\n\t\t\t\t\t\n\t\t\t\t\tServicoNaoCobrancaMotivo sncm = new ServicoNaoCobrancaMotivo();\n\t\t\t\t\t\n\t\t\t\t\tsncm.setId(new Integer(form.getMotivoNaoCobranca()));\n\t\t\t\t\t\n\t\t\t\t\thelper.getOrdemServico().setServicoNaoCobrancaMotivo(sncm);\n\t\t\t\t\t\n\t\t\t\t}else if(debitoEncontrado!=null && debitoEncontrado.equals(\"true\")){\n\t\t\t\t\t\n\t\t\t\t\tBigDecimal valorAtual = new BigDecimal(0);\n\t\t\t\t\tif (form.getValorDebito() != null) {\n\t\t\t\t\t String valorDebito = form\n\t\t\t\t\t \t.getValorDebito().toString().replace(\".\", \"\");\n\t\t\t\t\t \n\t\t\t\t\t valorDebito = valorDebito.replace(\",\", \".\");\n\t\t\t\t\t \n\t\t\t\t\t valorAtual = new BigDecimal(valorDebito);\n\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\thelper.getOrdemServico().setId(new Integer(form.getIdOrdemServico()));\n\t\t\t\t\thelper.getOrdemServico().getServicoTipo().getDebitoTipo().setId(new Integer(form.getIdTipoDebito()));\n\t\t\t\t\thelper.getOrdemServico().setValorAtual(valorAtual);\n\t\t\t\t\thelper.setQtdParcelas(form.getQuantidadeParcelas());\n\t\t\t\t\thelper.getOrdemServico().setPercentualCobranca(new BigDecimal(form.getPercentualCobranca()));\n\t\t\t\t\thelper.setUsuarioLogado(usuarioLogado);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t }\n\t\t\tif(form.getVeioEncerrarOS().equalsIgnoreCase(\"FALSE\")){\n\t\t\t\thelper.setVeioEncerrarOS(Boolean.FALSE);\n\t\t\t\tfachada.atualizarTipoCorte(helper);\n\t\t\t}else{\n\t\t\t\thelper.setVeioEncerrarOS(Boolean.TRUE);\n\t\t\t\tsessao.setAttribute(\"integracaoComercialHelper\", helper);\n\t\t\t\t\n\t\t\t\tif(sessao.getAttribute(\"menu\") == null){\n\t\t\t\t\tretorno = actionMapping.findForward(\"encerrarOrdemServicoAction\");\n\t\t\t\t}else{\n\t\t\t\t\tretorno = actionMapping.findForward(\"encerrarOrdemServicoPopupAction\");\n\t\t\t\t}\n\t\t\t\tsessao.removeAttribute(\"caminhoRetornoIntegracaoComercial\");\n\t\t\t}\n\t\t\t\t\t\n\t\t}\n\t\tretorno.getName();\n\t\tif(retorno.getName().equalsIgnoreCase(\"telaSucesso\")){\n\n\t\t\tmontarPaginaSucesso(httpServletRequest,\"Tipo do Corte Ligação de Água do imóvel \"+form.getMatriculaImovel()+\" efetuado com sucesso\",\n\t\t\t\t\t\"Atualizar outro Corte de Ligação de Água\",\n\t\t\t\t\t\"exibirAlterarTipoCorteAction.do?menu=sim\");\n\t\t\n\t\t}\n\t return retorno;\n\t}",
"@Override\r\n\tpublic ActionForward add_object(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows KANException {\n\t\treturn null;\r\n\t}",
"protected ForwardingMapEntry() {}",
"public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest,\n\t\t\t\t\tHttpServletResponse httpServletResponse){\n\t\tActionForward retorno = actionMapping.findForward(\"telaSucesso\");\n\n\t\tAtualizarTramiteEspecificacaoActionForm form = (AtualizarTramiteEspecificacaoActionForm) actionForm;\n\n\t\t// Obtém a instância da fachada\n\t\tFachada fachada = Fachada.getInstancia();\n\n\t\t// Obtém a sessão\n\t\tHttpSession sessao = httpServletRequest.getSession(false);\n\n\t\t// Valida o Formulário\n\t\tthis.validarForm(form);\n\n\t\tEspecificacaoTramite especificacaoTramite = (EspecificacaoTramite) sessao.getAttribute(\"especificacaoTramite\");\n\n\t\t// Popula a entidade\n\t\tform.setEspecificacaoTramiteValues(especificacaoTramite);\n\n\t\tfachada.atualizarTramiteEspecificacao(especificacaoTramite);\n\n\t\tmontarPaginaSucesso(httpServletRequest, \"Trâmite por Especificação de id \" + form.getId() + \" atualizada com sucesso.\",\n\t\t\t\t\t\t\"Realizar outra Manutenção de Trâmite por Especificação\", \"exibirFiltrarTramiteEspecificacaoAction.do?menu=sim\");\n\n\t\tsessao.removeAttribute(\"especificacaoTramite\");\n\n\t\treturn retorno;\n\t}",
"public RequestMappingInfo(RequestMappingInfo info, RequestCondition<?> customRequestCondition)\n/* */ {\n/* 100 */ this(info.name, info.patternsCondition, info.methodsCondition, info.paramsCondition, info.headersCondition, info.consumesCondition, info.producesCondition, customRequestCondition);\n/* */ }",
"public ActionForward execute(ActionMapping mapping, ActionForm form,\n\t\t\tHttpServletRequest request, HttpServletResponse response) {\n\t\tAllSearchWorkForm allSearchWorkForm = (AllSearchWorkForm) form;// TODO Auto-generated method stub\n\t\t\n\t\t// 得到搜索的条件\n\t\tString name = allSearchWorkForm.getName();\n\t\tString beginTime = allSearchWorkForm.getBeginTime();\n\t\tString endTime = allSearchWorkForm.getEndTime();\n\t\tString complete = allSearchWorkForm.getComplete();\n\t\t// 中文转码\n\t\ttry {\n\t\t\tname = URLEncoder.encode(name, \"UTF-8\");\n\t\t\tbeginTime = URLEncoder.encode(beginTime, \"UTF-8\");\n\t\t\tendTime = URLEncoder.encode(endTime,\"UTF-8\");\n\t\t\tSystem.out.println(\"name:\"+name);\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn mapping.findForward(\"SearchWork.succeed\");\n\t\t}\n\t\t\n\t\t// 带参数的页面跳转\n\t\tActionRedirect redirect = new ActionRedirect(mapping.findForward(\"SearchWork.succeed\"));\n\t\tredirect.addParameter(\"name\",name);\n\t\tredirect.addParameter(\"begin\", beginTime);\n\t\tredirect.addParameter(\"end\", endTime);\n\t\tredirect.addParameter(\"complete\", complete);\n\t\tredirect.addParameter(\"page\", 1);\n\t\treturn redirect;\n\t}",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n response.setContentType(\"text/html;charset=UTF-8\");\r\n HttpSession session = request.getSession();\r\n\r\n boolean adminSession;\r\n try {\r\n adminSession = (Boolean) session.getAttribute(\"mainAdminSession\");\r\n } catch (Exception e) {\r\n LOGGER.log(Level.INFO, \"Main admin session is null\");\r\n LOGGER.log(Level.INFO, \"Requesting dispatch to forward to: index.jsp\");\r\n request.getRequestDispatcher(\"index.jsp\").forward(request, response);\r\n return;\r\n }\r\n\r\n if (adminSession == false) {\r\n try {\r\n adminSession = (Boolean) session.getAttribute(\"subAdminSession\");\r\n } catch (Exception e) {\r\n LOGGER.log(Level.INFO, \"Sub admin session is null\");\r\n LOGGER.log(Level.INFO, \"Requesting dispatch to forward to: index.jsp\");\r\n request.getRequestDispatcher(\"index.jsp\").forward(request, response);\r\n return;\r\n }\r\n }\r\n\r\n //Check session type\r\n LOGGER.log(Level.INFO, \"Checking session type\");\r\n if (adminSession == false) {\r\n //Admin session not established\r\n LOGGER.log(Level.INFO, \"Admin session not established hence not responding to the request\");\r\n\r\n String path = (String) session.getAttribute(\"home\");\r\n LOGGER.log(Level.INFO, \"Path is: {0}\", path);\r\n String destination = \"/WEB-INF/views\" + path + \".jsp\";\r\n try {\r\n LOGGER.log(Level.INFO, \"Dispatching request to: {0}\", destination);\r\n request.getRequestDispatcher(destination).forward(request, response);\r\n } catch (ServletException | IOException e) {\r\n LOGGER.log(Level.INFO, \"Request dispatch failed\");\r\n }\r\n\r\n } else if (adminSession == true) {\r\n //Admin session established\r\n LOGGER.log(Level.INFO, \"Admin session established hence responding to the request\");\r\n\r\n String path = request.getServletPath();\r\n String destination;\r\n Map<RatingTypeDetail, List<RatingDetails>> ratingTypeAndValuesMap = new HashMap<>();\r\n\r\n switch (path) {\r\n case \"/addRating\":\r\n\r\n //Read in details for the rating\r\n LOGGER.log(Level.INFO, \"Reading in details for the rating\");\r\n rating = new RatingDetails();\r\n rating.setActive(true);\r\n rating.setRatingType(RatingTypeDetail.getRatingType(Short.parseShort(request.getParameter(\"ratingType\"))));\r\n if (rating.getRatingType().equals(RatingTypeDetail.PERCENTAGE)) {\r\n rating.setRating(request.getParameter(\"ratingValue\") + \"%\");\r\n } else {\r\n rating.setRating(request.getParameter(\"ratingValue\"));\r\n }\r\n\r\n //Send the details to the entity manager for recording in the database\r\n LOGGER.log(Level.INFO, \"Sending the details to the entity manager for recording in the database\");\r\n try {\r\n ratingService.addRating(rating);\r\n } catch (InvalidArgumentException e) {\r\n response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r\n response.setContentType(\"text/html;charset=UTF-8\");\r\n response.getWriter().write(bundle.getString(e.getCode()));\r\n LOGGER.log(Level.INFO, bundle.getString(e.getCode()));\r\n }\r\n\r\n //Retrieve the new list of rating records from the database\r\n LOGGER.log(Level.INFO, \"Retrieving the new list of rating records from the database\");\r\n try {\r\n ratingTypeAndValuesMap = ratingService.retrieveRatings();\r\n } catch (InvalidStateException e) {\r\n response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r\n response.setContentType(\"text/html;charset=UTF-8\");\r\n response.getWriter().write(bundle.getString(e.getCode()));\r\n LOGGER.log(Level.INFO, bundle.getString(e.getCode()));\r\n }\r\n\r\n //Avail the ratings session\r\n LOGGER.log(Level.INFO, \"Availing the ratings in session\");\r\n session.setAttribute(\"ratingTypeAndValuesMap\", ratingTypeAndValuesMap);\r\n\r\n //Display the new list of rating records\r\n generateTableBody(ratingTypeAndValuesMap, session, response);\r\n return;\r\n\r\n case \"/editRating\":\r\n\r\n //Read in details for the rating\r\n LOGGER.log(Level.INFO, \"Reading in details for the rating\");\r\n rating = new RatingDetails();\r\n rating.setActive(true);\r\n rating.setId(Short.parseShort(request.getParameter(\"ratingId\")));\r\n rating.setRatingType(RatingTypeDetail.getRatingType(Short.parseShort(request.getParameter(\"ratingType\"))));\r\n if (rating.getRatingType().equals(RatingTypeDetail.PERCENTAGE)) {\r\n rating.setRating(request.getParameter(\"ratingValue\") + \"%\");\r\n } else {\r\n rating.setRating(request.getParameter(\"ratingValue\"));\r\n }\r\n\r\n //Send the details to the entity manager for recording in the database\r\n LOGGER.log(Level.INFO, \"Sending the details to the entity manager for record update in the database\");\r\n try {\r\n ratingService.editRating(rating);\r\n } catch (InvalidArgumentException | InvalidStateException e) {\r\n response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r\n response.setContentType(\"text/html;charset=UTF-8\");\r\n response.getWriter().write(bundle.getString(e.getCode()));\r\n LOGGER.log(Level.INFO, bundle.getString(e.getCode()));\r\n }\r\n\r\n //Retrieve the new list of rating records from the database\r\n LOGGER.log(Level.INFO, \"Retrieving the new list of rating records from the database\");\r\n try {\r\n ratingTypeAndValuesMap = ratingService.retrieveRatings();\r\n } catch (InvalidStateException e) {\r\n response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r\n response.setContentType(\"text/html;charset=UTF-8\");\r\n response.getWriter().write(bundle.getString(e.getCode()));\r\n LOGGER.log(Level.INFO, bundle.getString(e.getCode()));\r\n }\r\n\r\n //Display the new list of rating records\r\n generateTableBody(ratingTypeAndValuesMap, session, response);\r\n return;\r\n\r\n case \"/removeRating\":\r\n\r\n //Send the details to the entity manager for record removal from the database\r\n LOGGER.log(Level.INFO, \"Sending the details to the entity manager for record removal from the database\");\r\n try {\r\n ratingService.removeRating(Short.parseShort(request.getParameter(\"ratingId\")));\r\n } catch (InvalidArgumentException | InvalidStateException e) {\r\n response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r\n response.setContentType(\"text/html;charset=UTF-8\");\r\n response.getWriter().write(bundle.getString(e.getCode()));\r\n LOGGER.log(Level.INFO, bundle.getString(e.getCode()));\r\n }\r\n\r\n //Retrieve the new list of rating records from the database\r\n LOGGER.log(Level.INFO, \"Retrieving the new list of rating records from the database\");\r\n try {\r\n ratingTypeAndValuesMap = ratingService.retrieveRatings();\r\n } catch (InvalidStateException e) {\r\n response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r\n response.setContentType(\"text/html;charset=UTF-8\");\r\n response.getWriter().write(bundle.getString(e.getCode()));\r\n LOGGER.log(Level.INFO, bundle.getString(e.getCode()));\r\n }\r\n\r\n //Display the new list of rating records\r\n generateTableBody(ratingTypeAndValuesMap, session, response);\r\n\r\n return;\r\n }\r\n destination = \"WEB-INF/views\" + path + \".jsp\";\r\n try {\r\n LOGGER.log(Level.INFO, \"Dispatching request to: {0}\", destination);\r\n request.getRequestDispatcher(destination).forward(request, response);\r\n } catch (ServletException | IOException e) {\r\n response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r\n response.setContentType(\"text/html;charset=UTF-8\");\r\n response.getWriter().write(bundle.getString(\"redirection_failed\"));\r\n LOGGER.log(Level.INFO, bundle.getString(\"redirection_failed\"), e);\r\n }\r\n }\r\n }",
"private ACLMessage respondToLogMessage(ACLMessage request, Action a) {\n\t\t\n\t\tLogMessage logMessage = (LogMessage) a.getAction();\t\t\n\t\tString message = logMessage.getMessage();\n\t\tgetLogger().log(Level.INFO, message);\n\t\t\n\t\treturn null;\n\t}",
"@Override\r\n \tpublic ActionForward executeSecureAction(ActionMapping mapping, ActionForm form,\r\n \t\t\tHttpServletRequest request, HttpServletResponse response) throws IOException,\r\n \t\t\tServletException\r\n \t{\r\n \t\tsaveActionErrors(form, request);\r\n \t\t// //Gets the value of the operation parameter.\r\n \t\t// String operation = request.getParameter(Constants.OPERATION);\r\n \t\t//\r\n \t\t// //Sets the operation attribute to be used in the Add/Edit Institute\r\n \t\t// Page.\r\n \t\t// request.setAttribute(Constants.OPERATION, operation);\r\n \t\ttry\r\n \t\t{\r\n \t\t\tfinal IFactory factory = AbstractFactoryConfig.getInstance().getBizLogicFactory();\r\n \t\t\tfinal IBizLogic bizLogic = factory.getBizLogic(Constants.DEFAULT_BIZ_LOGIC);\r\n \r\n \t\t\t// ************* ForwardTo implementation *************\r\n \t\t\t// forwarded from Specimen page\r\n \t\t\tfinal HashMap forwardToHashMap = (HashMap) request.getAttribute(\"forwardToHashMap\");\r\n \t\t\tString specimenId = null;\r\n \t\t\tString specimenLabel = null;\r\n \t\t\tString specimenClass = null;\r\n \t\t\t// -------------Mandar 04-July-06 QuickEvents start\r\n \t\t\tString fromQuickEvent = (String) request.getAttribute(\"isQuickEvent\");\r\n \t\t\tif (fromQuickEvent == null)\r\n \t\t\t{\r\n \t\t\t\tfromQuickEvent = request.getParameter(\"isQuickEvent\");\r\n \t\t\t}\r\n \t\t\tString eventSelected = \"\";\r\n \t\t\tif (fromQuickEvent != null)\r\n \t\t\t{\r\n \t\t\t\tspecimenId = (String) request.getAttribute(Constants.SPECIMEN_ID);\r\n \t\t\t\teventSelected = (String) request.getAttribute(Constants.EVENT_SELECTED);\r\n \t\t\t\tif (eventSelected == null && forwardToHashMap != null)\r\n \t\t\t\t{\r\n \t\t\t\t\tspecimenClass = (String) forwardToHashMap.get(\"specimenClass\");\r\n \t\t\t\t\tspecimenId = (String) forwardToHashMap.get(\"specimenId\");\r\n \t\t\t\t\tif (specimenClass.equalsIgnoreCase(\"Tissue\"))\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\teventSelected = Constants.EVENT_PARAMETERS[14];\r\n \t\t\t\t\t}\r\n \t\t\t\t\telse if (specimenClass.equalsIgnoreCase(\"Molecular\"))\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\teventSelected = Constants.EVENT_PARAMETERS[9];\r\n \t\t\t\t\t}\r\n \t\t\t\t\telse if (specimenClass.equalsIgnoreCase(\"Cell\"))\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\teventSelected = Constants.EVENT_PARAMETERS[1];\r\n \t\t\t\t\t}\r\n \t\t\t\t\telse if (specimenClass.equalsIgnoreCase(\"Fluid\"))\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\teventSelected = Constants.EVENT_PARAMETERS[7];\r\n \t\t\t\t\t}\r\n \r\n \t\t\t\t}\r\n \t\t\t\trequest.setAttribute(Constants.EVENT_SELECTED, eventSelected);\r\n \t\t\t\t// System.out.println(\"::::::::::::::\\n\\n\\n\\n\"+form.getClass().\r\n \t\t\t\t// getName() );\r\n \t\t\t\tListSpecimenEventParametersForm eventForm = (ListSpecimenEventParametersForm) form;\r\n \t\t\t\tif (eventForm == null)\r\n \t\t\t\t{\r\n \t\t\t\t\teventForm = new ListSpecimenEventParametersForm();\r\n \t\t\t\t}\r\n \t\t\t\teventForm.setSpecimenEventParameter(eventSelected);\r\n \t\t\t\teventForm.setSpecimenId(specimenId.trim());\r\n \r\n \t\t\t}\r\n \t\t\t// -------------Mandar 04-July-06 QuickEvents end\r\n \t\t\tif (forwardToHashMap != null)\r\n \t\t\t{\r\n \t\t\t\t// Fetching SpecimenId from HashMap generated by\r\n \t\t\t\t// ForwardToProcessor\r\n \t\t\t\tspecimenId = (String) forwardToHashMap.get(\"specimenId\");\r\n \t\t\t\tspecimenLabel = (String) forwardToHashMap.get(Constants.SPECIMEN_LABEL);\r\n \t\t\t\tLogger.out.debug(\"SpecimenID found in \" + \"forwardToHashMap========>>>>>>\"\r\n \t\t\t\t\t\t+ specimenId);\r\n \t\t\t}\r\n \t\t\t// ************* ForwardTo implementation *************\r\n \r\n \t\t\t// If new SpecimenEvent is added, specimenId in forwardToHashMap\r\n \t\t\t// will be null, following code handles that case\r\n \t\t\tif (specimenId == null)\r\n \t\t\t{\r\n \t\t\t\tfinal String eventId = request.getParameter(\"eventId\");\r\n \r\n \t\t\t\t// Added by Vijay Pande. While cliking on events tab both\r\n \t\t\t\t// specimenId and eventId are getting null. Since there was no\r\n \t\t\t\t// check on eventId it was throwing error for following retrieve\r\n \t\t\t\t// call.\r\n \t\t\t\t// Null check is added for eventId. Fix for bug Id: 4731\r\n \t\t\t\tif (eventId != null)\r\n \t\t\t\t{\r\n \t\t\t\t\tLogger.out.debug(\"Event ID added===>\" + eventId);\r\n \t\t\t\t\t// Retrieving list of SpecimenEvents for added\r\n \t\t\t\t\t// SpecimenEventId\r\n \t\t\t\t\tfinal Object object = bizLogic.retrieve(\r\n \t\t\t\t\t\t\tSpecimenEventParameters.class.getName(), new Long(eventId));\r\n \r\n \t\t\t\t\tif (object != null)\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\t// Getting object of specimenEventParameters from the\r\n \t\t\t\t\t\t// list of SepcimenEvents\r\n \t\t\t\t\t\tfinal SpecimenEventParameters specimenEventParameters = (SpecimenEventParameters) object;\r\n \r\n \t\t\t\t\t\t// getting SpecimenId of SpecimenEventParameters\r\n \t\t\t\t\t\tfinal AbstractSpecimen specimen = specimenEventParameters.getSpecimen();\r\n \t\t\t\t\t\tspecimenId = specimen.getId().toString();\r\n \t\t\t\t\t\t// specimenLabel = specimen.getLabel();\r\n \t\t\t\t\t\tLogger.out.debug(\"Specimen of Event Added====>\"\r\n \t\t\t\t\t\t\t\t+ (specimenEventParameters.getSpecimen()).getId());\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t}\r\n \r\n \t\t\tif (specimenId == null)\r\n \t\t\t{\r\n \t\t\t\tspecimenId = request.getParameter(Constants.SPECIMEN_ID);\r\n \t\t\t\tspecimenLabel = request.getParameter(Constants.SPECIMEN_LABEL);\r\n \t\t\t}\r\n \t\t\tif (specimenId == null)\r\n \t\t\t{\r\n \t\t\t\tspecimenId = (String) request.getAttribute(Constants.SPECIMEN_ID);\r\n \t\t\t}\r\n \r\n \t\t\trequest.setAttribute(Constants.SPECIMEN_ID, specimenId);\r\n \r\n \t\t\tfinal Object object = bizLogic.retrieve(Specimen.class.getName(), new Long(specimenId));\r\n \r\n \t\t\tif (object != null)\r\n \t\t\t{\r\n \t\t\t\tfinal Specimen specimen = (Specimen) object;\r\n \t\t\t\tif (specimenLabel == null)\r\n \t\t\t\t{\r\n \t\t\t\t\tspecimenLabel = specimen.getLabel();\r\n \t\t\t\t}\r\n \t\t\t\t// Setting Specimen Event Parameters' Grid\r\n \r\n \t\t\t\t// Ashish - 4/6/07 --- Since lazy=true, retriving the events\r\n \t\t\t\t// collection.\r\n \t\t\t\tfinal Collection<SpecimenEventParameters> specimenEventCollection = this\r\n \t\t\t\t\t\t.getSpecimenEventParametersColl(specimenId, bizLogic);\r\n \t\t\t\tfinal Collection<ActionApplication> dynamicEventCollection = this\r\n \t\t\t\t\t\t.getDynamicEventColl(specimenId, bizLogic);\r\n \t\t\t\t/**\r\n \t\t\t\t * Name: Chetan Patil Reviewer: Sachin Lale Bug ID: Bug#4180\r\n \t\t\t\t * Patch ID: Bug#4180_1 Description: The values of event\r\n \t\t\t\t * parameter is stored in a Map and in turn the Map is stored in\r\n \t\t\t\t * a List. This is then sorted chronologically, using a date\r\n \t\t\t\t * value form the Map. After sorting the List of Map is\r\n \t\t\t\t * converted into the List of List, which is used on the UI for\r\n \t\t\t\t * displaying values form List on the grid.\r\n \t\t\t\t */\r\n \t\t\t\tif (dynamicEventCollection != null)\r\n \t\t\t\t{\r\n \t\t\t\t\tfinal List<Map<String, Object>> gridData = new ArrayList<Map<String, Object>>();\r\n \r\n \t\t\t\t\tfor (final ActionApplication actionApp : dynamicEventCollection)\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\tfinal Map<String, Object> rowDataMap = new HashMap<String, Object>();\r\n \t\t\t\t\t\tif (actionApp != null)\r\n \t\t\t\t\t\t{\r\n \t\t\t\t\t\t\t//final String[] events = EventsUtil\r\n \t\t\t\t\t\t\t//\t\t.getEvent(eventParameters);\r\n \t\t\t\t\t\t\tlong contId = actionApp.getApplicationRecordEntry().getFormContext()\r\n \t\t\t\t\t\t\t\t\t.getContainerId();\r\n \t\t\t\t\t\t\tList contList = AppUtility\r\n \t\t\t\t\t\t\t\t\t.executeSQLQuery(\"select caption from dyextn_container where identifier=\"\r\n \t\t\t\t\t\t\t\t\t\t\t+ contId);\r\n \t\t\t\t\t\t\tString container = (String) ((List) contList.get(0)).get(0);\r\n \t\t\t\t\t\t\t//final Object container =bizLogic.retrieve(Container.class.getName(),new Long(contId));\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.ID, String.valueOf(actionApp.getId()));\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.EVENT_NAME,\r\n \t\t\t\t\t\t\t\t\tedu.wustl.cab2b.common.util.Utility\r\n \t\t\t\t\t\t\t\t\t\t\t.getFormattedString(container));\r\n \r\n \t\t\t\t\t\t\t// Ashish - 4/6/07 - retrieving User\r\n \t\t\t\t\t\t\t// User user = eventParameters.getUser();\r\n \t\t\t\t\t\t\tfinal User user = this.getUser(actionApp.getId(), bizLogic);\r\n \r\n \t\t\t\t\t\t\trowDataMap.put(Constants.USER_NAME, user.getLastName() + \", \"\r\n \t\t\t\t\t\t\t\t\t+ user.getFirstName());\r\n \r\n \t\t\t\t\t\t\t// rowDataMap.put(Constants.EVENT_DATE,\r\n \t\t\t\t\t\t\t// Utility.parseDateToString\r\n \t\t\t\t\t\t\t// (eventParameters.getTimestamp(),\r\n \t\t\t\t\t\t\t// Constants.TIMESTAMP_PATTERN)); // Sri: Changed\r\n \t\t\t\t\t\t\t// format for bug #463\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.EVENT_DATE, actionApp.getTimestamp());\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.PAGE_OF, \"pageOfDynamicEvent\");// pageOf\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.SPECIMEN_ID, request\r\n \t\t\t\t\t\t\t\t\t.getAttribute(Constants.SPECIMEN_ID));// pageOf\r\n \t\t\t\t\t\t\tgridData.add(rowDataMap);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \r\n \t\t\t\t\tfinal List<List<String>> gridDataList = this.getSortedGridDataList(gridData);\r\n \t\t\t\t\tfinal String[] columnList1 = Constants.EVENT_PARAMETERS_COLUMNS;\r\n \t\t\t\t\tfinal List<String> columnList = new ArrayList<String>();\r\n \t\t\t\t\tfor (final String element : columnList1)\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\tcolumnList.add(element);\r\n \t\t\t\t\t}\r\n \t\t\t\t\tAppUtility.setGridData(gridDataList, columnList, request);\r\n \t\t\t\t\trequest.setAttribute(\r\n \t\t\t\t\t\t\tedu.wustl.simplequery.global.Constants.SPREADSHEET_DATA_LIST,\r\n \t\t\t\t\t\t\tgridDataList);\r\n \t\t\t\t\tfinal Integer identifierFieldIndex = new Integer(0);\r\n \t\t\t\t\trequest.setAttribute(\"identifierFieldIndex\", identifierFieldIndex.intValue());\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tif (request.getAttribute(Constants.SPECIMEN_LABEL) == null)\r\n \t\t\t{\r\n \t\t\t\trequest.setAttribute(Constants.SPECIMEN_LABEL, specimenLabel);\r\n \t\t\t}\r\n \t\t\trequest.setAttribute(Constants.EVENT_PARAMETERS_LIST, new SOPBizLogic()\r\n \t\t\t\t\t.getAllSOPEventFormNames(dynamicEventMap));\r\n \t\t\trequest.getSession().setAttribute(\"dynamicEventMap\", dynamicEventMap);\r\n \r\n \t\t}\r\n \t\tcatch (final Exception e)\r\n \t\t{\r\n \t\t\tthis.logger.error(e.getMessage(), e);\r\n \t\t}\r\n \t\trequest.setAttribute(Constants.MENU_SELECTED, new String(\"15\"));\r\n \t\tString pageOf = (String) request.getParameter(Constants.PAGE_OF);\r\n \t\tif (pageOf == null)\r\n \t\t\tpageOf = (String) request.getAttribute(Constants.PAGE_OF);\r\n \t\trequest.setAttribute(Constants.PAGE_OF, pageOf);\r\n \r\n \t\tif (pageOf.equals(Constants.PAGE_OF_LIST_SPECIMEN_EVENT_PARAMETERS_CP_QUERY))\r\n \t\t{\r\n \t\t\trequest.getSession().setAttribute(\"CPQuery\", \"CPQuery\");\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\tif (request.getSession().getAttribute(\"CPQuery\") != null)\r\n \t\t\t{\r\n \t\t\t\trequest.getSession().removeAttribute(\"CPQuery\");\r\n \t\t\t}\r\n \t\t}\r\n \t\tLong specimenRecEntryEntityId = null;\r\n \t\ttry\r\n \t\t{\r\n \t\t\tif (CatissueCoreCacheManager.getInstance().getObjectFromCache(\r\n \t\t\t\t\tAnnotationConstants.SPECIMEN_REC_ENTRY_ENTITY_ID) != null)\r\n \t\t\t{\r\n \t\t\t\tspecimenRecEntryEntityId = (Long) CatissueCoreCacheManager.getInstance()\r\n \t\t\t\t\t\t.getObjectFromCache(AnnotationConstants.SPECIMEN_REC_ENTRY_ENTITY_ID);\r\n \t\t\t}\r\n \t\t\telse\r\n \t\t\t{\r\n \t\t\t\tspecimenRecEntryEntityId = AnnotationUtil\r\n \t\t\t\t\t\t.getEntityId(AnnotationConstants.ENTITY_NAME_SPECIMEN_REC_ENTRY);\r\n \t\t\t\tCatissueCoreCacheManager.getInstance().addObjectToCache(\r\n \t\t\t\t\t\tAnnotationConstants.SPECIMEN_REC_ENTRY_ENTITY_ID, specimenRecEntryEntityId);\r\n \t\t\t}\r\n \r\n \t\t}\r\n \t\tcatch (final Exception e)\r\n \t\t{\r\n \t\t\tthis.logger.error(e.getMessage(), e);\r\n \t\t}\r\n \t\t// request.setAttribute(\"specimenEntityId\", specimenEntityId);\r\n \t\trequest.setAttribute(AnnotationConstants.SPECIMEN_REC_ENTRY_ENTITY_ID,\r\n \t\t\t\tspecimenRecEntryEntityId);\r\n \t\treturn mapping.findForward(request.getParameter(Constants.PAGE_OF));\r\n \t}",
"@Override\n\tpublic ActionForward doExecute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tString action = request.getParameter(\"action1\");\n\t\tif (action == null) action = LIST;\n\t\tif (log.isDebugEnabled()) log.debug(\"action:\" + action);\n\t\tActionForward forward = null;\n\t\tUserDefinedQueryForm theForm = (UserDefinedQueryForm) form;\n\t\ttry {\n\t\t\tif (LIST.equalsIgnoreCase(action)) forward = listAdvanceBacth(mapping, theForm, request, response); // 打开复杂查询列表页面\n\t\t\telse if (\"LISTSIMPLE\".equalsIgnoreCase(action)) forward = listSimpleBacth(mapping, theForm, request, response); // 打开简单查询列表页面\n\t\t\telse if (\"SHOWQUERY\".equalsIgnoreCase(action)) forward = queryAdvance(mapping, theForm, request, response);\n\t\t\telse if (\"SHOWSIMPLE\".equalsIgnoreCase(action)) forward = querySimple(mapping, theForm, request, response);\n\t\t\telse if (\"VALID\".equalsIgnoreCase(action)) forward = validate(mapping, theForm, request, response);\n\t\t\telse if (\"PREVIEWSQL\".equalsIgnoreCase(action)) forward = getSQLForPreview(mapping, theForm, request, response);\n\t\t\telse if (\"VALIDSIMPLE\".equalsIgnoreCase(action)) forward = validateSimple(mapping, theForm, request, response);\n\t\t\telse if (\"ADVANCEOVERVIEW\".equalsIgnoreCase(action)) forward = queryAdvanceOverview(mapping, theForm, request, response);\n\t\t\telse if (\"SIMPLEOVERVIEW\".equalsIgnoreCase(action)) forward = querySimpleOverview(mapping, theForm, request, response);\n\t\t\telse if (\"SAVERESULT\".equalsIgnoreCase(action)) forward = saveResult(mapping, theForm, request, response);\n\t\t\telse if (\"SHOWEXPORTEXCEL\".equalsIgnoreCase(action)) forward = showExportExcel(mapping, theForm, request, response);\n\t\t\telse if (\"EXPORTEXCEL\".equalsIgnoreCase(action)) forward = exportExcel(mapping, theForm, request, response);\n\t\t\telse {\n\t\t\t\trequest.setAttribute(\"err\", new WebException(\"找不到该action方法:\" + action));\n\t\t\t\tforward = mapping.findForward(ERROR);// 找不到合适的action\n\t\t\t}\n\n\t\t\t// else if(\"SAVEPARAM\".equalsIgnoreCase(action))\n\t\t\t// forward=saveQueryParam(mapping, theForm, request, response);\n\t\t\t// //保存查询条件到个人空间\n\t\t}\n\t\tcatch (Exception e) {// 其他系统出错\n\t\t\trequest.setAttribute(\"err\", e);\n\t\t\tforward = mapping.findForward(ERROR);\n\t\t}\n\t\treturn forward;\n\t}",
"void logHTTPRequest(HttpServletRequest request, Logger logger);",
"protected URLMappingHandler getURLMappingHanlder(final HttpServletRequest httpRequest)\n\t{\n\t\tURLMappingHandler urlMappingHandler = FilterSpringUtil.getSpringBean(httpRequest, \"cmsPageUrlHndlerMapping\",\n\t\t\t\tURLMappingHandler.class);\n\t\tif (urlMappingHandler == null)\n\t\t{\n\t\t\turlMappingHandler = new DefaultCMSPageURLMappingHandler();\n\t\t}\n\t\treturn urlMappingHandler;\n\t}",
"protected ActionForward performAction(ActionMapping mapping,\n ActionForm form, HttpServletRequest request,\n HttpServletResponse response) throws Exception {\n\n String forward = FWD_SUCCESS;\n request.setAttribute(ALLOW_EDITS_KEY, \"true\");\n request.setAttribute(PREVIOUS_DISABLED, \"false\");\n request.setAttribute(NEXT_DISABLED, \"false\");\n\n String id = request.getParameter(ID);\n \n if (StringUtil.isNullorNill(id) || \"0\".equals(id)) {\n isNew = true;\n } else {\n isNew = false;\n }\n \n BaseActionForm dynaForm = (BaseActionForm) form;\n \n ActionMessages errors = dynaForm.validate(mapping, request); \n if (errors != null && errors.size() > 0) {\n // System.out.println(\"Server side validation errors \"\n // + errors.toString());\n saveErrors(request, errors);\n // since we forward to jsp - not Action we don't need to repopulate\n // the lists here\n return mapping.findForward(FWD_FAIL);\n }\n \n String start = (String) request.getParameter(\"startingRecNo\");\n String direction = (String) request.getParameter(\"direction\");\n \n District district = new District();\n //get sysUserId from currentUserId\n district.setSysUserId(currentUserId); \n org.hibernate.Transaction tx = HibernateUtil.getSession().beginTransaction();\n \n // populate value holder from form\n PropertyUtils.copyProperties(district, dynaForm);\n // Get cityId from property \"selectedCityId\"\n String selectedCityId = PropertyUtils\n .getProperty(dynaForm, \"selectedCityId\").toString();\n // Get City object from cityId\n DictionaryDAO dictionaryDAO = new DictionaryDAOImpl();\n Dictionary city = new Dictionary();\n city = dictionaryDAO.getDataForId(selectedCityId);\n \n // Get DictrictEntry from districtName property from form\n String districtName = PropertyUtils\n .getProperty(dynaForm, \"districtName\").toString();\n \n DistrictDAO distDAO = new DistrictDAOImpl();\n \n List<Dictionary> districtEntry = distDAO.getDistrictsEntyByName(districtName);\n \n // Set some property for district\n district.setCity(city);\n district.setDescription(\"\");\n \n try {\n // Check DistrictEntry is already exists or not.\n if (districtEntry.size() == 0) {\n Dictionary newDistrictEntry = new Dictionary();\n newDistrictEntry.setDictEntry(districtName);\n DictionaryCategory dicCategory = new DictionaryCategory();\n DictionaryCategoryDAO dicCategoryDAO = \n new DictionaryCategoryDAOImpl();\n dicCategory = dicCategoryDAO\n .getDictionaryCategoryByName(\"districts\");\n newDistrictEntry.setDictionaryCategory(dicCategory);\n newDistrictEntry.setSysUserId(currentUserId);\n newDistrictEntry.setIsActive(\"Y\");\n dictionaryDAO.insertData(newDistrictEntry);\n district.setDistrictEntry(dictionaryDAO\n .getDictionaryByDictEntry(districtName));\n } else {\n district.setDistrictEntry(districtEntry.get(0));\n }\n if (!isNew) {\n // UPDATE\n distDAO.updateData(district);\n } else {\n // INSERT\n distDAO.insertData(district);\n }\n tx.commit();\n \n } catch (LIMSRuntimeException lre) {\n //bugzilla 2154\n LogEvent.logError(\"DistrictUpdateAction\", \"performAction()\",\n lre.toString());\n tx.rollback();\n errors = new ActionMessages();\n java.util.Locale locale = (java.util.Locale) request.getSession()\n .getAttribute(\"org.apache.struts.action.LOCALE\");\n ActionError error = null;\n if (lre.getException()\n instanceof org.hibernate.StaleObjectStateException) {\n // how can I get popup instead of struts error at the top of\n // page?\n // ActionMessages errors = dynaForm.validate(mapping, request);\n error = new ActionError(\"errors.OptimisticLockException\", null,\n null);\n } else {\n // bugzilla 1482\n if (lre.getException()\n instanceof LIMSDuplicateRecordException) {\n String messageKey = \"district.browse.title\";\n String msg = ResourceLocator.getInstance()\n .getMessageResources().getMessage(locale,\n messageKey);\n error = new ActionError(\"errors.DuplicateRecord\",\n msg, null);\n\n } else {\n error = new ActionError(\"errors.UpdateException\", null,\n null);\n }\n }\n errors.add(ActionMessages.GLOBAL_MESSAGE, error);\n saveErrors(request, errors);\n request.setAttribute(Globals.ERROR_KEY, errors);\n //bugzilla 1485: allow change and try updating again \n //enable save button & disable previous and next\n request.setAttribute(PREVIOUS_DISABLED, \"true\");\n request.setAttribute(NEXT_DISABLED, \"true\");\n forward = FWD_FAIL;\n\n } finally {\n HibernateUtil.closeSession();\n }\n \n if (forward.equals(FWD_FAIL)) {\n return mapping.findForward(forward);\n }\n // initialize the form\n dynaForm.initialize(mapping);\n // repopulate the form from valueholder\n PropertyUtils.copyProperties(dynaForm, district);\n if (\"true\".equalsIgnoreCase(request.getParameter(\"close\"))) {\n forward = FWD_CLOSE;\n }\n\n if (district.getId() != null && !district.getId().equals(\"0\")) {\n request.setAttribute(ID, district.getId());\n\n }\n\n //bugzilla 1400\n if (isNew) {\n forward = FWD_SUCCESS_INSERT;\n }\n //bugzilla 1467 added direction for redirect to NextPreviousAction\n return getForward(mapping.findForward(forward), id, start, direction);\n \n }",
"private ActionForward displayAction(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows Exception {\n\t\t\r\n\t\tExceptionDisplayDTO expDTO = new ExceptionDisplayDTO(\"displayPage\",\"\");\r\n\t\texpDisplayDetails.set(expDTO);\r\n\t\t\r\n\t\t//condition to not display search results by default\r\n\t\t/*if(isNavigationDone(request)){\r\n\t\t\tgetPaginatedSearchResults(request,bean,null);\r\n\t\t}*/\r\n\t\t\r\n\t\treturn mapping.findForward(\"displayPage\");\t\t\r\n\t}",
"protected void doProcess(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\trequest.setCharacterEncoding(\"utf-8\");\r\n\t\tString requestURI = request.getRequestURI();\r\n\t\tString contextPath = request.getContextPath();\r\n\t\tString command = requestURI.substring(contextPath.length());\r\n\t\tAction action = null;\r\n\t\tActionForward forward = null;\r\n\t\t\r\n\t\tif (command.equals(\"/managerLogin.ma\")) {\r\n\t\t\taction = new ManagerLogInAction();\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tforward = action.execute(request, response);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (command.equals(\"/managerLogOut.ma\")) {\r\n\t\t\taction = new ManagerLogOutAction();\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tforward = action.execute(request, response);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (command.equals(\"/memberList.ma\")) {\r\n\t\t\taction = new MemberListAction();\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tforward = action.execute(request, response);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (command.equals(\"/managerDelete.ma\")) {\r\n\t\t\taction = new ManagerDeleteFromMemberAction();\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tforward = action.execute(request, response);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\r\n\t\tif (forward != null) {\r\n\t\t\tif (forward.isRedirect()) {\r\n\t\t\t\tresponse.sendRedirect(forward.getPath());\r\n\t\t\t} else {\r\n\t\t\t\tRequestDispatcher dispatcher = request.getRequestDispatcher(forward.getPath());\r\n\t\t\t\tdispatcher.forward(request, response);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\r\n\t\tpublic ActionMap getHotKeysActionMapper() {\n\t\t\treturn null;\r\n\t\t}",
"public BuildByPermitTile map(BuildByPermitTileDTO selectedActionDTO);",
"@Override\n public void action() {\n System.out.println(\"Matchmaker Behaviour\");\n addBehaviour(new RequestToMatchMakerBehaviour());\n\n }",
"@Override\n\tprotected void init() throws SiDCException, Exception {\n\t\tLogAction.getInstance().debug(\"Request:\" + entity);\n\t}",
"@Override\n\tprotected void init() throws SiDCException, Exception {\n\t\tLogAction.getInstance().debug(\"Request:\" + entity);\n\t}",
"Activity getTransformMappingActivity();",
"public ActionForward execute(ActionMapping mapping,\n ActionForm form,\n HttpServletRequest request,\n HttpServletResponse res)\n throws IOException, ServletException {\n\n // Validate the request parameters specified by the user\n ImportBaseFileForm aForm;\n ActionMessages errors = new ActionMessages();\n\n fileUploadPerformed = false;\n fileRemovePerformed = false;\n\n if (!AgnUtils.isUserLoggedIn(request)) {\n return mapping.findForward(\"logon\");\n }\n if (form != null) {\n aForm = (ImportBaseFileForm) form;\n } else {\n aForm = new ImportBaseFileForm();\n }\n\n try {\n if (AgnUtils.parameterNotEmpty(request, \"remove_file\")) {\n removeStoredCsvFile(request);\n fileRemovePerformed = true;\n } else if (AgnUtils.parameterNotEmpty(request, \"upload_file\") &&\n StringUtils.isEmpty(getCurrentFileName(request)) && (aForm.getCsvFile() != null)) {\n errors.add(storeCsvFile(request, aForm.getCsvFile()));\n }\n aForm.setCurrentFileName(getCurrentFileName(request));\n }\n catch (Exception e) {\n logger.error(\"execute: \" + e, e);\n errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(\"error.exception\", configService.getValue(ConfigService.Value.SupportEmergencyUrl)));\n }\n\n // Report any errors we have discovered back to the original form\n if (!errors.isEmpty()) {\n saveErrors(request, errors);\n }\n\n return null;\n }",
"protected ActionForward annuler(ActionMapping mapping,ActionForm form , HttpServletRequest request, HttpServletResponse response, ActionErrors errors,Hashtable hParamProc ) throws ServletException{\r\n\t\tString sMode = request.getParameter(\"mode\") ;\r\n\t\t\r\n\t\t//page bCompocfAd.jsp\r\n\t\tif (sMode .equals(\"avant\")) \r\n\t\t\t return mapping.findForward(\"avant\") ;\r\n\t\t\r\n\t\telse if (sMode .equals(\"ecran\")) \r\n\t\t\t return mapping.findForward(\"ecran\") ;\r\n\t\t\r\n\t\telse if (sMode .equals(\"initial\")) \r\n\t\t\t return mapping.findForward(\"initial\") ;\r\n\t\t\r\n\t\telse\r\n\t\t return mapping.findForward(\"avant\") ;\r\n\t}",
"public void log(HttpServletRequest request, HttpServletResponse response) {\n\t\tObjectNode ecs = getLoggableMessage(request, response);\n\t\tlog.info(new ObjectMessage(ecs));\n\t}",
"public AcquirePermitTile map(AcquirePermitTileDTO selectedActionDTO);",
"@Override\r\n\tpublic ActionForward display(ActionMapping mapping, BaseForm form,\r\n\t\t\tString operation, HttpServletRequest request,\r\n\t\t\tHttpServletResponse response) {\r\n\r\n\t\tAuditUtil.getInstance().writeLog(\r\n\t\t\t\tAuditUtil.FILE_TYPE_G4G,\r\n\t\t\t\tnew StringBuffer(this.getClass().getName()).append(\r\n\t\t\t\t\t\tG4GConstants.CALLINGMETHOD).append(\r\n\t\t\t\t\t\tDataUtil.getCallingMethod()).append(\r\n\t\t\t\t\t\tG4GConstants.DISPLAY_STARTS)\r\n\t\t\t\t\t\t.append(G4GConstants.DASHES).append(\r\n\t\t\t\t\t\t\t\trequest.getSession().getId()).toString(),\r\n\t\t\t\tLevel.INFO);\r\n\t\tif (request.getSession().getAttribute(G4GConstants.USERDTO) == null) {\r\n\t\t\tAuditUtil.getInstance().writeLog(\r\n\t\t\t\t\tAuditUtil.FILE_TYPE_G4G,\r\n\t\t\t\t\tnew StringBuffer(this.getClass().getName()).append(\r\n\t\t\t\t\t\t\tG4GConstants.COLON_WITH_SPACES).append(\r\n\t\t\t\t\t\t\tDataUtil.getCurrentMethod()).append(\r\n\t\t\t\t\t\t\tG4GConstants.COLON_WITH_SPACES).append(G4GConstants.DASHES)\r\n\t\t\t\t\t\t\t.append(request.getSession().getId()).append(\r\n\t\t\t\t\t\t\t\t\tG4GConstants.USER_NOT_RECOGNIZE).append(\r\n\t\t\t\t\t\t\t\t\trequest.getSession().getId()).toString(),\r\n\t\t\t\t\tLevel.INFO);\r\n\t\t\treturn mapping.findForward(G4GConstants.HOMEPAGE);\r\n\t\t}\r\n\t\tList<OpenMatchDTO> matchList = new ArrayList<OpenMatchDTO>();\r\n\t\tUserDTO userDTO;\r\n\t\tGameDTO gameDTO = null;\r\n\t\tint playerId = G4GConstants.ZERO;\r\n\t\tGameDetailsForm gameDetailsForm = new GameDetailsForm();\r\n\t\tint gameId =G4GConstants.ZERO;\r\n\t\ttry {\r\n\t\t\tgameId = request.getParameter(G4GConstants.GAMEID) != null ? Integer\r\n\t\t\t\t\t.parseInt(request.getParameter(G4GConstants.GAMEID))\r\n\t\t\t\t\t: G4GConstants.ZERO;\r\n\t\t\tuserDTO = DataUtil.getUserDTO(request);\r\n\t\t\tplayerId = userDTO.getPlayerDTO().getId();\r\n\t\t\tAuditUtil.getInstance().writeLog(\r\n\t\t\t\t\tAuditUtil.FILE_TYPE_G4G,\r\n\t\t\t\t\tnew StringBuffer(this.getClass().getName()).append(\r\n\t\t\t\t\t\t\tCALLINGMETHOD).append(DataUtil.getCallingMethod())\r\n\t\t\t\t\t\t\t.append(DISPLAY_STARTS).append(DASHES).append(\r\n\t\t\t\t\t\t\t\t\tG4GConstants.GETTING_DETAILS).append(\r\n\t\t\t\t\t\t\t\t\trequest.getSession().getId()).toString());\r\n\t\t\t/* Getting game details as per the gameId */\r\n\t\t\tgameDTO = GameServiceDelegator.getGame(gameId);\r\n\t\t\tif(gameDTO == null){\r\n\t\t\t\treturn mapping.findForward(G4GConstants.GAMELOBBY);\r\n\t\t\t}\r\n\t\t\tAuditUtil.getInstance().writeLog(\r\n\t\t\t\t\tAuditUtil.FILE_TYPE_G4G,\r\n\t\t\t\t\tnew StringBuffer(this.getClass().getName()).append(\r\n\t\t\t\t\t\t\tCALLINGMETHOD).append(DataUtil.getCallingMethod())\r\n\t\t\t\t\t\t\t.append(DISPLAY_STARTS).append(DASHES).append(\r\n\t\t\t\t\t\t\t\t\tG4GConstants.THIS_IS_GAME).append(\r\n\t\t\t\t\t\t\t\t\tgameDTO.getGamename()).append(\r\n\t\t\t\t\t\t\t\t\trequest.getSession().getId()).toString());\r\n\r\n\t\t\t/* Getting match details for openMatches tab */\r\n\t\t\tmatchList = TwoPlayerTournamentServiceDelegator\r\n\t\t\t\t\t.getOpenMatchesDetails(gameId, playerId);\r\n\t\t\t/*\r\n\t\t\t * Form field allPlayers id populated with players having this\r\n\t\t\t * gameId\r\n\t\t\t */\r\n\t\t\tgameDetailsForm.setAllPlayers(PlayerServiceDelegator\r\n\t\t\t\t\t.getGameWisePlayersList(gameId));\r\n\t\t\tAuditUtil.getInstance().writeLog(\r\n\t\t\t\t\tAuditUtil.FILE_TYPE_G4G,\r\n\t\t\t\t\tnew StringBuffer(this.getClass().getName()).append(\r\n\t\t\t\t\t\t\tG4GConstants.GAME_ID_IS).append(gameId).toString());\r\n\r\n\t\t\trequest.setAttribute(G4GConstants.GAMEDETAILSFORM, gameDetailsForm);\r\n\t\t}catch(NumberFormatException e) {\r\n\t\t\tAuditUtil.getInstance().writeLog(\r\n\t\t\t\t\tAuditUtil.FILE_TYPE_G4G,\r\n\t\t\t\t\tnew StringBuffer(this.getClass().getName()).append(\r\n\t\t\t\t\t\t\tG4GConstants.COLON_WITH_SPACES).append(\r\n\t\t\t\t\t\t\tDataUtil.getCurrentMethod()).append(\r\n\t\t\t\t\t\t\tG4GConstants.COLON_WITH_SPACES).append(G4GConstants.DASHES)\r\n\t\t\t\t\t\t\t.append(request.getSession().getId()).append(\r\n\t\t\t\t\t\t\t\t\t\"No Game with this id\").append(\r\n\t\t\t\t\t\t\t\t\te.getMessage()).toString(),\r\n\t\t\t\t\tLevel.ERROR);\r\n\t\t\treturn mapping.findForward(G4GConstants.GAMELOBBY);\r\n\t\t} catch (NullPointerException exception) {\r\n\t\t\tAuditUtil.getInstance().writeLog(\r\n\t\t\t\t\tAuditUtil.FILE_TYPE_HIBERNATE,\r\n\t\t\t\t\tnew StringBuffer(this.getClass().getName()).append(\r\n\t\t\t\t\t\t\tG4GConstants.COLON_WITH_SPACES).append(\r\n\t\t\t\t\t\t\tDataUtil.getCurrentMethod()).append(\r\n\t\t\t\t\t\t\tG4GConstants.DASHES).append(exception.getMessage())\r\n\t\t\t\t\t\t\t.append(\r\n\t\t\t\t\t\t\t\t\tDataUtil.getUserDTO(request).getPlayerDTO()\r\n\t\t\t\t\t\t\t\t\t\t\t.getScreenname()).append(\r\n\t\t\t\t\t\t\t\t\trequest.getSession().getId()).toString(),\r\n\t\t\t\t\tLevel.ERROR);\r\n\t\t\tAuditUtil.getInstance().writeLog(\r\n\t\t\t\t\tAuditUtil.FILE_TYPE_G4G,\r\n\t\t\t\t\tnew StringBuffer(this.getClass().getName()).append(\r\n\t\t\t\t\t\t\tG4GConstants.COLON_WITH_SPACES).append(\r\n\t\t\t\t\t\t\tDataUtil.getCurrentMethod()).append(\r\n\t\t\t\t\t\t\tG4GConstants.DASHES).append(exception.getMessage())\r\n\t\t\t\t\t\t\t.append(\r\n\t\t\t\t\t\t\t\t\tDataUtil.getUserDTO(request).getPlayerDTO()\r\n\t\t\t\t\t\t\t\t\t\t\t.getScreenname()).append(\r\n\t\t\t\t\t\t\t\t\trequest.getSession().getId()).toString(),\r\n\t\t\t\t\tLevel.ERROR);\r\n\t\t}\r\n\r\n\t\tAuditUtil.getInstance().writeLog(\r\n\t\t\t\tAuditUtil.FILE_TYPE_G4G,\r\n\t\t\t\tnew StringBuffer(this.getClass().getName()).append(\r\n\t\t\t\t\t\tCALLINGMETHOD).append(DataUtil.getCallingMethod())\r\n\t\t\t\t\t\t.append(DASHES).append(G4GConstants.SET_FORM_FIELDS)\r\n\t\t\t\t\t\t.append(request.getSession().getId()).toString(),\r\n\t\t\t\tLevel.INFO);\r\n\t\trequest.setAttribute(G4GConstants.ALLPLAYERSLIST,\r\n\t\t\t\tPlayerServiceDelegator.getGameWisePlayersList(gameId));\r\n\t\trequest.setAttribute(G4GConstants.MATCHLIST, matchList);\r\n\t\trequest.setAttribute(G4GConstants.GAMEDTO, gameDTO);\r\n\t\t/*if (WidgetsServiceDelegator.getActivePlayers(G4GConstants.MAX_RECORDS,\r\n\t\t\t\tG4GConstants.MAX_PLAYED_IN_DAYS).size() > G4GConstants.ZERO) {\r\n\t\t\trequest.setAttribute(G4GConstants.ACTIVEPLAYERS, WidgetsAjaxImpl\r\n\t\t\t\t\t.getActivePlayers(G4GConstants.MAX_RECORDS,\r\n\t\t\t\t\t\t\tG4GConstants.MAX_PLAYED_IN_DAYS, request));\r\n\t\t} else {\r\n\t\t\trequest.setAttribute(G4GConstants.ACTIVEPLAYERS, null);\r\n\t\t}*/\r\n\t\tGameLobbyPageForm gameLobbyForm = new GameLobbyPageForm();\r\n\t\tList<ActivePlayersDTO> activePlayersList = WidgetsServiceDelegator\r\n\t\t.getActivePlayers(G4GConstants.MAX_RECORDS, G4GConstants.MAX_PLAYED_IN_DAYS);\r\n\t\tgameLobbyForm.setActivePlayers(activePlayersList);\r\n\r\n\t\tList<GameDTO> xbox360GamesList = WidgetsServiceDelegator.getMyLobby(\r\n\t\t\t\tplayerId, G4GConstants.NETWORK_XBOX360_LIST_KEY);\r\n\t\tgameLobbyForm.setXbox360Games(xbox360GamesList);\r\n\r\n\t\tList<GameDTO> ps2GamesList = WidgetsServiceDelegator.getMyLobby(\r\n\t\t\t\tplayerId, G4GConstants.NETWORK_PS2_ID_LIST_KEY);\r\n\t\tgameLobbyForm.setPs2Games(ps2GamesList);\r\n\r\n\t\tList<GameDTO> ps3GamesList = WidgetsServiceDelegator.getMyLobby(\r\n\t\t\t\tplayerId, G4GConstants.NETWORK_PS3_ID_LIST_KEY);\r\n\t\tgameLobbyForm.setPs3Games(ps3GamesList);\r\n\r\n\t\trequest.setAttribute(G4GConstants.GAME_LOBBY_PAGE_FORM, gameLobbyForm);\r\n\t\treturn mapping.findForward(G4GConstants.SUCCESS);\r\n\t}",
"@Override\r\n\tpublic void onGetWalkingRouteResult(MKWalkingRouteResult arg0, int arg1) {\n\t\t\r\n\t}",
"public ActionForward execute(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response)\r\n\t\tthrows Exception {\r\n\t\t//DataSource ds = (DataSource) getDataSource(request, \"dbaccounting\");\r\n\t\t//Connection conn = null;\r\n\t\tBankReconcileForm bankReconcileForm = (BankReconcileForm) form;\r\n\t\tActionForward forward = null;\r\n\t\tString action = mapping.getParameter();\r\n\t\tHttpSession session = request.getSession();\r\n\t\tUsers users = (Users)session.getAttribute(CommonConstants.USER);\r\n\t\tSet lst = (Set)session.getAttribute(CommonConstants.VIEWACCESS);\r\n\t\t\tif (users!=null) {\r\n\t\t\t\tif (CommonUtil.isHasRoleAccess(lst,request.getServletPath())) {\r\n\t\t\t\t\trequest.setAttribute(\"VIEWS\",lst);\r\n\t\t\t\t\tif (\"\".equalsIgnoreCase(action)) {\r\n\t\t\t\t\t\tforward = mapping.findForward(\"home\");\r\n\t\t\t\t\t} else if (\"LIST\".equalsIgnoreCase(action)) {\r\n\t\t\t\t\t\tforward = performPartialList(mapping, form, request, response);\r\n\t\t\t\t\t} else if (\"FORM\".equalsIgnoreCase(action)) {\r\n\t\t\t\t\t\tforward = performForm(mapping, form, request, response);\r\n\t\t\t\t\t} else if (\"SAVE\".equalsIgnoreCase(action)) {\r\n\t\t\t\t\t\tif (bankReconcileForm.getString(\"subaction\")!=null && bankReconcileForm.getString(\"subaction\").length()>0 && bankReconcileForm.getString(\"subaction\").equalsIgnoreCase(\"refresh\")) {\r\n\t\t\t\t\t\t\tforward = performForm(mapping, form, request, response);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tforward = performSave(mapping, form, request, response);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (\"DETAIL\".equalsIgnoreCase(action)) { \r\n\t\t\t\t\t\tforward = performDetail(mapping, form, request, response);\r\n\t\t\t\t\t} else if (\"DELETE\".equalsIgnoreCase(action)) {\r\n\t\t\t\t\t\tforward = performDelete(mapping, form, request, response);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn forward;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tActionMessages errors = new ActionMessages();\r\n\t\t\t\t\terrors.add(ActionMessages.GLOBAL_MESSAGE,new ActionMessage(\"error.privilage\",request.getContextPath()+mapping.getPath()));\r\n\t\t\t\t\tsaveMessages(request,errors);\t\t\t\t\r\n\t\t\t\t\treturn mapping.findForward(\"home\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\treturn mapping.findForward(\"index\");\r\n\t\t\t}\r\n\t}",
"abstract protected void _log(TrackingEvent event) throws Exception;",
"private void mappingMethods() throws SecurityException, NoSuchMethodException{\n\t\tmappingMethodGet();\n\t\tmappingMethodSet();\n\t}",
"public final HashMap<String, String> invoke() {\n Serializable serializable = com.iqoption.core.ext.a.s(this.this$0).getSerializable(\"ARG_REDIRECT_PARAMS\");\n if (serializable != null) {\n return (HashMap) serializable;\n }\n throw new TypeCastException(\"null cannot be cast to non-null type java.util.HashMap<kotlin.String, kotlin.String>\");\n }",
"public void processAction (ActionRequest request, ActionResponse response) \n throws PortletException, java.io.IOException {\n throw new PortletException(\"processAction method not implemented\");\n }",
"@Override\n public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception {\n System.out.println(\"Request URL :: \" + request.getRequestURL().toString()\n + \"Sent to Handler :: Current Time = \" + System.currentTimeMillis());\n }",
"@Override\n\tpublic boolean processAction(ActionRequest actionRequest, ActionResponse actionResponse) throws PortletException {\n\t\tString cmd = ParamUtil.getString(actionRequest, Constants.CMD);\n\t\tSystem.out.println(\"CMD=\" + cmd);\n\t\treturn _mvcActionCommand.processAction(actionRequest, actionResponse);\n\t}"
] | [
"0.6292187",
"0.6005824",
"0.5642704",
"0.5602408",
"0.5499607",
"0.53898585",
"0.5309539",
"0.52999413",
"0.5241405",
"0.52339375",
"0.51619124",
"0.51294214",
"0.5126868",
"0.51200676",
"0.51196104",
"0.5100793",
"0.50655484",
"0.5062434",
"0.50529605",
"0.50246066",
"0.5023423",
"0.49903738",
"0.49782774",
"0.49673396",
"0.49610385",
"0.4955992",
"0.49557483",
"0.4949933",
"0.49493894",
"0.4946914",
"0.49468988",
"0.4938542",
"0.49176338",
"0.49128854",
"0.49087885",
"0.48931444",
"0.4891707",
"0.4887127",
"0.4873114",
"0.4872581",
"0.48541057",
"0.48501608",
"0.48498666",
"0.48473072",
"0.48109367",
"0.4807309",
"0.4803743",
"0.47962463",
"0.478124",
"0.4768041",
"0.47282338",
"0.47207385",
"0.4712074",
"0.47098935",
"0.47012484",
"0.4696409",
"0.46894318",
"0.46894318",
"0.46894318",
"0.46894318",
"0.46894318",
"0.4682798",
"0.4676319",
"0.4674596",
"0.4667705",
"0.46635112",
"0.46622884",
"0.46574917",
"0.46543047",
"0.4650903",
"0.46395442",
"0.46391666",
"0.4632726",
"0.46320626",
"0.46217278",
"0.46157104",
"0.46155685",
"0.4613361",
"0.46051973",
"0.46043825",
"0.4594524",
"0.45831448",
"0.45798212",
"0.4575545",
"0.45749244",
"0.45749244",
"0.45679992",
"0.4564406",
"0.4561562",
"0.4556185",
"0.4555996",
"0.45546773",
"0.45543763",
"0.45525807",
"0.4551681",
"0.45508552",
"0.45478997",
"0.45421198",
"0.45389047",
"0.4536966"
] | 0.8328064 | 0 |
Ask the specified Action instance to handle this request. Return the ActionForward instance (if any) returned by the called Action for further processing. Will also check to see if a GTAS Session is available if specified in the mapping. | protected ActionForward processActionPerform(HttpServletRequest request,
HttpServletResponse response,
Action action,
ActionForm form,
ActionMapping mapping)
throws IOException, ServletException
{ //20030502AH - Copied from struts src, with extra code added
try
{
if(mapping instanceof GTActionMapping)
{
//20050317AH - mod to also check for asdmin rights where spec'd in mapping
GTActionMapping gtMapping = (GTActionMapping)mapping;
boolean needsSession = gtMapping.isRequiresGtSession() ||gtMapping.isRequiresAdmin()
|| gtMapping.isRequiresP2P() || gtMapping.isRequiresUDDI();
if( needsSession )
{
//We will try to obtain a reference to the IGTSession using the method provided
//in StaticWebUtils. This will throw a NoSessionException if we have no IGTSession.
//By putting this check here it will be captured as though it was thrown by the action.
IGTSession gtasSession = StaticWebUtils.getGridTalkSession(request);
//NSL20060424 Check for P2P and UDDI requirement
if (gtMapping.isRequiresP2P() && gtasSession.isNoP2P())
{
throw new IllegalStateException("P2P functionality access required for mapped path "+gtMapping.getPath());
}
if (gtMapping.isRequiresUDDI() && gtasSession.isNoUDDI())
{
throw new IllegalStateException("UDDI functionality access required for mapped path "+gtMapping.getPath());
}
if(gtMapping.isRequiresAdmin() && !gtasSession.isAdmin())
{
throw new IllegalStateException("Admin access required for mapped path " + gtMapping.getPath());
}
}
}
return (action.execute(mapping, form, request, response));
}
catch (Exception e)
{
return (processException(request, response,e, form, mapping));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ActionForward execute(ActionMapping actionMapping,\r\n ActionForm actionForm,\r\n HttpServletRequest request,\r\n HttpServletResponse response) {\r\n return process(actionMapping, actionForm, request, response, null);\r\n }",
"ForwardAction createForwardAction();",
"protected ActionForward customProcess(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response, String name) throws Throwable {\r\n \treturn performAction(actionMapping, actionForm, request, response);\r\n }",
"protected ActionForm processActionForm(HttpServletRequest request,\n HttpServletResponse response,\n ActionMapping mapping)\n {\n String scope = mapping.getScope();\n if(scope != null)\n {\n try\n {\n if(scope.equals(\"session\"))\n {\n OperationContext opCon = OperationContext.getOperationContext(request);\n if(opCon != null)\n {\n if(_log.isInfoEnabled())\n {\n _log.info(\"Looking for ActionForm in OperationContext[id=\" + opCon.getOperationContextId() + \"]\"); //20030124AH\n }\n ActionForm form = opCon.getActionForm();\n if(form != null)\n {\n if(_log.isInfoEnabled())\n {\n _log.info(\"Found ActionForm in OperationContext\"); //20030124AH\n }\n return form;\n }\n else\n {\n if(_log.isWarnEnabled())\n {\n _log.warn(\"No ActionForm found in OperationContext\"); //20030124AH\n }\n return null; //20030124AH\n }\n }\n }\n }\n catch(OperationException e)\n {\n // OperationExceptions here are normal when we forward from a completed operation\n // to the next action, so we ignore them.\n }\n catch(Throwable t)\n {\n if(_log.isErrorEnabled())\n {\n _log.error(\"Error caught in processActionForm() performing customised ActionForm handling\", t); //20030124AH\n }\n }\n }\n\n if(mapping instanceof GTActionMapping)\n { //20030124AH - Check the mapping to see if we should defer form creation or do it as normal\n if( ((GTActionMapping)mapping).isDeferFormCreation() )\n {\n if(_log.isInfoEnabled())\n {\n _log.info(\"Deferring ActionForm creation\");\n }\n return null;\n }\n }\n //...\n if(_log.isInfoEnabled())\n {\n _log.info(\"Delegating to superclass to obtain ActionForm\"); //20030124AH\n }\n ActionForm form = super.processActionForm(request, response, mapping);\n return form;\n }",
"public ActionForward unspecified(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response)\n throws Exception {\n this.setup(mapping,form,request,response);\n \n return mapping.findForward(\"backToGeneExp\");\n }",
"public abstract ActionInMatch act();",
"@Override\r\n public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {\r\n if (LOG.isDebugEnabled()) {\r\n LOG.debug(String.format(\"ENTRY %s%n%s\", form.getClass().getSimpleName(), request.getRequestURI()));\r\n }\r\n \r\n ActionForward forward = null;\r\n\r\n Throwable t = (Throwable) request.getAttribute(Globals.EXCEPTION_KEY);\r\n\r\n if (t == null) {\r\n forward = mapping.findForward(KRADConstants.MAPPING_CLOSE);\r\n } else {\r\n forward = processException(mapping, form, request, t);\r\n }\r\n \r\n if (LOG.isDebugEnabled()) {\r\n LOG.debug(String.format(\"EXIT %s\", (forward == null) ? \"null\" : forward.getPath()));\r\n }\r\n\r\n return forward;\r\n }",
"public ActionForward execTaskForward( ActionMapping mapping, ActionForm form, HttpServletRequest request,\r\n HttpServletResponse response, WatchedTask task )\r\n throws IOException, ServletException\r\n {\r\n\r\n request.getRequestDispatcher( ( (StrutsWatchedTask) task ).getActionURL() ).forward( request, response );\r\n\r\n return null;\r\n }",
"void applyAction(Action action, Session session) throws ActionException;",
"@Override\n\tpublic ActionForward doExecute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tString action = request.getParameter(\"action1\");\n\t\tif (action == null) action = LIST;\n\t\tif (log.isDebugEnabled()) log.debug(\"action:\" + action);\n\t\tActionForward forward = null;\n\t\tUserDefinedQueryForm theForm = (UserDefinedQueryForm) form;\n\t\ttry {\n\t\t\tif (LIST.equalsIgnoreCase(action)) forward = listAdvanceBacth(mapping, theForm, request, response); // 打开复杂查询列表页面\n\t\t\telse if (\"LISTSIMPLE\".equalsIgnoreCase(action)) forward = listSimpleBacth(mapping, theForm, request, response); // 打开简单查询列表页面\n\t\t\telse if (\"SHOWQUERY\".equalsIgnoreCase(action)) forward = queryAdvance(mapping, theForm, request, response);\n\t\t\telse if (\"SHOWSIMPLE\".equalsIgnoreCase(action)) forward = querySimple(mapping, theForm, request, response);\n\t\t\telse if (\"VALID\".equalsIgnoreCase(action)) forward = validate(mapping, theForm, request, response);\n\t\t\telse if (\"PREVIEWSQL\".equalsIgnoreCase(action)) forward = getSQLForPreview(mapping, theForm, request, response);\n\t\t\telse if (\"VALIDSIMPLE\".equalsIgnoreCase(action)) forward = validateSimple(mapping, theForm, request, response);\n\t\t\telse if (\"ADVANCEOVERVIEW\".equalsIgnoreCase(action)) forward = queryAdvanceOverview(mapping, theForm, request, response);\n\t\t\telse if (\"SIMPLEOVERVIEW\".equalsIgnoreCase(action)) forward = querySimpleOverview(mapping, theForm, request, response);\n\t\t\telse if (\"SAVERESULT\".equalsIgnoreCase(action)) forward = saveResult(mapping, theForm, request, response);\n\t\t\telse if (\"SHOWEXPORTEXCEL\".equalsIgnoreCase(action)) forward = showExportExcel(mapping, theForm, request, response);\n\t\t\telse if (\"EXPORTEXCEL\".equalsIgnoreCase(action)) forward = exportExcel(mapping, theForm, request, response);\n\t\t\telse {\n\t\t\t\trequest.setAttribute(\"err\", new WebException(\"找不到该action方法:\" + action));\n\t\t\t\tforward = mapping.findForward(ERROR);// 找不到合适的action\n\t\t\t}\n\n\t\t\t// else if(\"SAVEPARAM\".equalsIgnoreCase(action))\n\t\t\t// forward=saveQueryParam(mapping, theForm, request, response);\n\t\t\t// //保存查询条件到个人空间\n\t\t}\n\t\tcatch (Exception e) {// 其他系统出错\n\t\t\trequest.setAttribute(\"err\", e);\n\t\t\tforward = mapping.findForward(ERROR);\n\t\t}\n\t\treturn forward;\n\t}",
"public ActionForward execute(\n\t\tRequest request,\n\t\tResponse response,\n\t\tEIPSession eipsession,\n\t\tActionCfg conf)\n\t\tthrows Exception {\n\t\tEnumeration attnames;\n\t\tMap reqparameters;\n\t\tString nametmp;\n\t\tObject oo;\n\n\t\tif ((attnames = eipsession.getAttributeNames()) != null) {\n\t\t\twhile (attnames.hasMoreElements()) {\n\t\t\t\tnametmp = attnames.nextElement().toString();\n\t\t\t\too = eipsession.getAttribute(nametmp);\n\t\t\t\tif (oo != null)\n\t\t\t\t\trequest.setSAttribute(nametmp, oo);\n\t\t\t}\n\t\t}\n\n\t\tActionForward af = execute(request, response, conf);\n\n\t\tif ((attnames = response.getSResultNames()) != null) {\n\t\t\twhile (attnames.hasMoreElements()) {\n\t\t\t\tnametmp = attnames.nextElement().toString();\n\t\t\t\too = response.getSResult(nametmp);\n\t\t\t\tif (oo != null)\n\t\t\t\t\teipsession.setAttribute(nametmp, oo);\n\t\t\t}\n\t\t}\n\t\treturn af;\n\t}",
"@Override\n\t\tpublic ActionTestFacade getForward() {\n\t\t\treturn null;\n\t\t}",
"protected ActionMapping processMapping( HttpServletRequest request,\n HttpServletResponse response,\n String path)\n throws IOException\n { //20030425AH\n ActionMapping mapping = super.processMapping(request, response, path);\n if(mapping instanceof GTActionMapping)\n {\n if( ((GTActionMapping)mapping).isLogParameters() )\n {\n StaticWebUtils.logRequestDetails(request, _log);\n }\n }\n return mapping;\n }",
"public ActionForward execute(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response)\n throws Exception {\n // Use the overridden getMethodName.\n return super.execute(mapping, form, request, response);\n }",
"public interface ActionManager {\n\n Action.Forward execute(Action action, HttpServletRequest request, HttpServletResponse response) throws PersistentException;\n\n void close();\n}",
"public void performAction(HandlerData actionInfo) throws ActionException;",
"public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {\n\n\t\t// Extract attributes we will need\n\t\tAgent agent = null;\n\t\t\n\t\tHttpSession session = request.getSession();\n\t\tActionMessages errors = new ActionMessages();\n\t\trequest.setAttribute(\"maintask\", \"1\");\n\t\t\n\t\t\n\t\tif (request.getParameter(\"loadBarcode\") != null) {\n\t\t\tLFFound found = new LFServiceBean().getFoundItemByBarcode(request.getParameter(\"loadBarcode\"));\n\t\t\tif (found == null) {\n\t\t\t\tActionMessage error = new ActionMessage(\"error.unable.add.item\");\n\t\t\t\terrors.add(ActionMessages.GLOBAL_MESSAGE, error);\n\t\t\t\tsaveMessages(request, errors);\n\t\t\t\treturn (mapping.findForward(\"success\"));\n\t\t\t} else {\n\t\t\t\tresponse.sendRedirect(\"create_found_item.do?barcode=\" + found.getBarcode());\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (request.getParameter(\"taskmanager\") != null) {\n\t\t\tif (session.getAttribute(\"user\") == null) {\n\t\t\t\tresponse.sendRedirect(\"logoff.do\");\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\ttaskManagerSetup(session, request);\n\t\t\t//Forward control to the specified success URI\n\t\t\treturn (mapping.findForward(\"success\"));\n\t\t}\n\n\t\t// Validate the request parameters specified by the user\n\t\tString username = (String) PropertyUtils.getSimpleProperty(form, \"username\");\n\t\tString password = (String) PropertyUtils.getSimpleProperty(form, \"password\");\n\t\tString instance = (String) System.getProperty(\"instance.ref\");\n\t\tString companyCode = request.getParameter(\"companyCode\");\n\t\t\n\t\tSsoUtils ssoUtils = new SamlUtils();//TODO consider spring injection\n\t\tSsoNode ssoNode = ssoUtils.getSsoNode(request);\n\t\t\n\t\t\n\t\tboolean hasSSO=ssoNode.isValidAssertion();\n\t\t\n\t\tif (!hasSSO && username.length() == 0 && password.length() == 0) {\n\t\t\tsession.invalidate();\n\t\t\tresponse.addHeader(\"Pragma\", \"No-cache\");\n\t\t\tresponse.addHeader(\"Cache-Control\", \"no-cache\");\n\t\t\tresponse.addDateHeader(\"Expires\", -1);\n\n\t\t\tString ldapRedirect=PropertyBMO.getValue(PropertyBMO.LDAP_REDIRECT);\n\t\t\tif(request.getParameter(\"bypass\") == null && ldapRedirect!=null && !ldapRedirect.isEmpty()){\n\t\t\t\tresponse.sendRedirect(ldapRedirect);\n\t\t\t}\n\t\t\treturn mapping.findForward(TracingConstants.LOGON);\n\t\t}\n\t\tauthenlog.info(\"Authenticating User: \"+username+\". Company Code: \"+companyCode+\". Instance: \"+instance);\n\t\tif(hasSSO){\n\t\t\tboolean autoProvision = PropertyBMO.isTrue(PropertyBMO.SSO_AUTO_PROVISION);\n\t\t\tagent = SecurityUtils.authUserNoPassword(ssoNode.getUsername(), ssoNode.getCompanycode(), 0, errors, autoProvision, ssoNode);\n\t\t} else {\n\t\t\tagent = SecurityUtils.authUser(username, password, companyCode, 0, errors);\n\t\t}\n\t\t// Report any errors we have discovered back to the original form\n\t\tif (!errors.isEmpty()) {\n\t\t\tsaveMessages(request, errors);\n\t\t\tauthenlog.info(\"User: \"+username+\", Company Code: \"+companyCode+\", Instance: \"+instance+\" Authentication Failed\");\n\t\t\tPropertyUtils.setSimpleProperty(form, \"username\", foobar);\n\t\t\tresponse.addHeader(\"Pragma\", \"No-cache\");\n\t\t\tresponse.addHeader(\"Cache-Control\", \"no-cache\");\n\t\t\tresponse.addDateHeader(\"Expires\", -1);\n\t\t\treturn mapping.findForward(TracingConstants.LOGON);\n\t\t}\n\n\t\tauthenlog.info(\"User: \"+username+\", Company Code: \"+companyCode+\", Instance: \"+instance+\" Authentication Success\");\n\t\t// check to see if password needs to be reset\n\t\t/** SF: If user logged in through LDAP, it should bypass password validation requirements **/\n\t\tif (!hasSSO && (agent.isReset_password() || !SecurityUtils.isPolicyAcceptablePassword(companyCode, password, username, request, true))) {\n\t\t\tsession.setAttribute(\"usertemp\", agent);\n\t\t\tresponse.addHeader(\"Pragma\", \"No-cache\");\n\t\t\tresponse.addHeader(\"Cache-Control\", \"no-cache\");\n\t\t\tresponse.addDateHeader(\"Expires\", -1);\n\t\t\treturn mapping.findForward(TracingConstants.PASS_RESET);\n\t\t}\n\n\t\tint expiredays = agent.getStation().getCompany().getVariable().getPass_expire_days();\n\t\t/** SF: If user logged in through LDAP, it should bypass password expiration requirements **/\n\t\tif (!hasSSO && expiredays > 0) {\n\t\t\tDate lastreset = agent.getLast_pass_reset_date();\n\t\t\tif (lastreset == null || DateUtils.formatDate(lastreset, TracingConstants.DB_DATEFORMAT, null, null).equals(\"0000-00-00\")) {\n\t\t\t\t// first time logon, set it\n\t\t\t\tagent.setLast_pass_reset_date(new Date());\n\t\t\t} else {\n\t\t\t\tlong nowtime = ((new Date()).getTime() / (3600000 * 24));\n\t\t\t\tlong lastresettime = (lastreset.getTime() / (3600000 * 24));\n\t\t\t\tif ((nowtime - lastresettime) > expiredays) {\n\t\t\t\t\t// forward to reset page\n\t\t\t\t\tsession.setAttribute(\"usertemp\", agent);\n\t\t\t\t\tresponse.addHeader(\"Pragma\", \"No-cache\");\n\t\t\t\t\tresponse.addHeader(\"Cache-Control\", \"no-cache\");\n\t\t\t\t\tresponse.addDateHeader(\"Expires\", -1);\n\t\t\t\t\treturn mapping.findForward(TracingConstants.PASS_RESET);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Create the history container object\n\t\tsession.setAttribute(\"historyContainer\", new HistoryContainer());\n\n\t\t// Save our logged-in user in the session\n\t\tsession.setAttribute(\"lastupdate\", new Date());\n\t\t//session.setMaxInactiveInterval(agent.getTimeout() * 60);\n\t\tsession.setAttribute(\"user\", agent);\n\n\t\t// write to database\n\t\tagent.setLast_logged_on(TracerDateTime.getGMTDate());\n\t\tagent.setIs_online(1);\n\t\tSecurityUtils.updateAgentLogin(agent, null, 1, true);\n\n\t\t// load drop down ui properties into session\n\t\tProperties properties = new Properties();\n\t\ttry {\n\t\t\tServletContext sc = getServlet().getServletContext();\n\t\t\tString configfilepath = sc.getRealPath(\"/\") + \"/WEB-INF/classes/\";\n\t\t\tproperties.load(new FileInputStream(configfilepath + \"custom_ui.properties\"));\n\t\t\tsession.setAttribute(\"first_row_menu_text\", properties.getProperty(\"first_row_menu_text\"));\n\t\t\tsession.setAttribute(\"first_row_bg\", properties.getProperty(\"first_row_bg\"));\n\t\t\tsession.setAttribute(\"drop_down_text\", properties.getProperty(\"drop_down_text\"));\n\t\t\tsession.setAttribute(\"drop_down_text_hilite\", properties.getProperty(\"drop_down_text_hilite\"));\n\t\t\tsession.setAttribute(\"drop_down_bg\", properties.getProperty(\"drop_down_bg\"));\n\t\t\tsession.setAttribute(\"drop_down_bg_hilite\", properties.getProperty(\"drop_down_bg_hilite\"));\n\n\t\t} catch (IOException e) {\n\t\t\t// unable to get config\n\t\t\tresponse.addHeader(\"Pragma\", \"No-cache\");\n\t\t\tresponse.addHeader(\"Cache-Control\", \"no-cache\");\n\t\t\tresponse.addDateHeader(\"Expires\", -1);\n\t\t\treturn mapping.findForward(TracingConstants.LOGON);\n\t\t}\n\n\t\t// Remove the obsolete form bean\n\t\tif (mapping.getAttribute() != null) {\n\t\t\tif (\"request\".equals(mapping.getScope()))\n\t\t\t\trequest.removeAttribute(mapping.getAttribute());\n\t\t\telse\n\t\t\t\tsession.removeAttribute(mapping.getAttribute());\n\t\t}\n\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tLinkedHashMap<String, LinkedHashMap<String, String>> map = UserPermissions.renderApplicationLinks(agent);\n\t\tsession.setAttribute(\"menu_links\", map);\n\t\t//Setup the activity list\n\t\tif (map != null && map.get(\"Task Manager\") != null) {\n\t\t\ttaskManagerSetup(session, request);\n\t\t}\n\t\t// prepopulate list\n\t\tTracerUtils.populateLists(session);\n\n\t\tif (UserPermissions.hasPermission(TracingConstants.SYSTEM_COMPONENT_NAME_CBRO_VIEW, agent)) {\n\t\t\t//Setup cbroStationid for the first time\n\t\t\tsession.setAttribute(\"cbroStationID\", \"\" + agent.getStation().getStation_ID());\n\t\t}\n\n\t\t// Forward control to the specified success URI\n\t\tString redirectUrl = (String) session.getAttribute(TracingConstants.SESSION_REDIRECT_URL);\n\t\tif (redirectUrl != null) {\n\t\t\tsession.removeAttribute(TracingConstants.SESSION_REDIRECT_URL);\n\t\t\tresponse.sendRedirect(redirectUrl);\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t\n\t\treturn (mapping.findForward(\"success\"));\n\t}",
"public ActionForward execute(ActionMapping mapping, ActionForm form,\n\t\t\tHttpServletRequest req, HttpServletResponse res)\n\t\t\tthrows IOException, ServletException {\n\n\t\tTargetForm aForm = null;\n\t\tActionMessages errors = new ActionMessages();\n\t\tActionForward destination = null;\n\n\t\tif (!this.checkLogon(req)) {\n\t\t\treturn mapping.findForward(\"logon\");\n\t\t}\n\n\t\tif (form != null) {\n\t\t\taForm = (TargetForm) form;\n\t\t} else {\n\t\t\taForm = new TargetForm();\n\t\t}\n\n\t\tif (req.getParameter(\"delete.x\") != null) {\n\t\t\taForm.setAction(TargetAction.ACTION_CONFIRM_DELETE);\n\t\t}\n\n\t\tAgnUtils.logger().info(\"Action: \" + aForm.getAction());\n\n\t\tif (!allowed(\"targets.show\", req)) {\n\t\t\terrors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(\n\t\t\t\t\t\"error.permissionDenied\"));\n\t\t\tsaveErrors(req, errors);\n\t\t\treturn null;\n\t\t}\n\n\t\ttry {\n\t\t\tswitch (aForm.getAction()) {\n\t\t\tcase ACTION_LIST:\n\t\t\t\tdestination = mapping.findForward(\"list\");\n\t\t\t\tbreak;\n\n\t\t\tcase ACTION_VIEW:\n\t\t\t\tif (aForm.getTargetID() != 0) {\n\t\t\t\t\taForm.setAction(TargetAction.ACTION_SAVE);\n\t\t\t\t\tloadTarget(aForm, req);\n\t\t\t\t} else {\n\t\t\t\t\taForm.setAction(TargetAction.ACTION_NEW);\n\t\t\t\t}\n\t\t\t\tdestination = mapping.findForward(\"success\");\n\t\t\t\tbreak;\n\n\t\t\tcase ACTION_SAVE:\n\t\t\t\t// if(req.getParameter(\"save.x\")!=null) {\n\t\t\t\tsaveTarget(aForm, req);\n\t\t\t\t// }\n\t\t\t\tdestination = mapping.findForward(\"success\");\n\t\t\t\tbreak;\n\n\t\t\tcase ACTION_NEW:\n\t\t\t\t// if(req.getParameter(\"save.x\")!=null) {\n\t\t\t\tsaveTarget(aForm, req);\n\t\t\t\taForm.setAction(TargetAction.ACTION_SAVE);\n\t\t\t\t// }\n\t\t\t\tdestination = mapping.findForward(\"success\");\n\t\t\t\tbreak;\n\n\t\t\tcase ACTION_CONFIRM_DELETE:\n\t\t\t\tloadTarget(aForm, req);\n\t\t\t\tdestination = mapping.findForward(\"delete\");\n\t\t\t\taForm.setAction(TargetAction.ACTION_DELETE);\n\t\t\t\tbreak;\n\n\t\t\tcase ACTION_DELETE:\n\t\t\t\tthis.deleteTarget(aForm, req);\n\t\t\t\taForm.setAction(TargetAction.ACTION_LIST);\n\t\t\t\tdestination = mapping.findForward(\"list\");\n\t\t\t\tbreak;\n\n\t\t\tcase ACTION_CREATE_ML:\n\t\t\t\tdestination = mapping.findForward(\"create_ml\");\n\t\t\t\tbreak;\n\n\t\t\tcase ACTION_CLONE:\n\t\t\t\tif (aForm.getTargetID() != 0) {\n\t\t\t\t\tloadTarget(aForm, req);\n\t\t\t\t\tcloneTarget(aForm, req);\n\t\t\t\t\taForm.setAction(TargetAction.ACTION_SAVE);\n\t\t\t\t}\n\t\t\t\tdestination = mapping.findForward(\"success\");\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase ACTION_DELETE_RECIPIENTS_CONFIRM:\n\t\t\t\tloadTarget(aForm, req);\n\t\t\t\tthis.getRecipientNumber(aForm, req);\n\t\t\t\tdestination = mapping.findForward(\"delete_recipients\");\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase ACTION_DELETE_RECIPIENTS:\n\t\t\t\tloadTarget(aForm, req);\n\t\t\t\tthis.deleteRecipients(aForm, req);\t\t\t\t\n\t\t\t\taForm.setAction(TargetAction.ACTION_LIST);\n\t\t\t\tdestination = mapping.findForward(\"list\");\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase ACTION_BACK_TO_MAILINGWIZARD:\n\t\t\t\tdestination = mapping.findForward(\"back_mailingwizard\");\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\tdestination = mapping.findForward(\"list\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tAgnUtils.logger().error(\n\t\t\t\t\t\"execute: \" + e + \"\\n\" + AgnUtils.getStackTrace(e));\n\t\t\terrors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(\n\t\t\t\t\t\"error.exception\"));\n\t\t}\n\t\t\n\t\tif( \"list\".equals(destination.getName())) {\n\t\t\treq.setAttribute(\"targetlist\", loadTargetList(req) );\n\t\t\tsetNumberOfRows(req, aForm);\n\t\t}\n\t\t\n\n\t\t// Report any errors we have discovered back to the original form\n\t\tif (!errors.isEmpty()) {\n\t\t\tsaveErrors(req, errors);\n\t\t\treturn (new ActionForward(mapping.getInput()));\n\t\t}\n\n\t\treturn destination;\n\n\t}",
"public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest,\n\t\t\t\t\tHttpServletResponse httpServletResponse){\n\t\tActionForward retorno = actionMapping.findForward(\"telaSucesso\");\n\n\t\tAtualizarTramiteEspecificacaoActionForm form = (AtualizarTramiteEspecificacaoActionForm) actionForm;\n\n\t\t// Obtém a instância da fachada\n\t\tFachada fachada = Fachada.getInstancia();\n\n\t\t// Obtém a sessão\n\t\tHttpSession sessao = httpServletRequest.getSession(false);\n\n\t\t// Valida o Formulário\n\t\tthis.validarForm(form);\n\n\t\tEspecificacaoTramite especificacaoTramite = (EspecificacaoTramite) sessao.getAttribute(\"especificacaoTramite\");\n\n\t\t// Popula a entidade\n\t\tform.setEspecificacaoTramiteValues(especificacaoTramite);\n\n\t\tfachada.atualizarTramiteEspecificacao(especificacaoTramite);\n\n\t\tmontarPaginaSucesso(httpServletRequest, \"Trâmite por Especificação de id \" + form.getId() + \" atualizada com sucesso.\",\n\t\t\t\t\t\t\"Realizar outra Manutenção de Trâmite por Especificação\", \"exibirFiltrarTramiteEspecificacaoAction.do?menu=sim\");\n\n\t\tsessao.removeAttribute(\"especificacaoTramite\");\n\n\t\treturn retorno;\n\t}",
"public ActionForward execute(ActionMapping actionMapping,\r\n\t\t\tActionForm actionForm, HttpServletRequest httpServletRequest,\r\n\t\t\tHttpServletResponse httpServletResponse) {\n\t\tActionForward retorno = actionMapping\r\n\t\t\t\t.findForward(\"exibirInformarImovelSituacaoCobranca\");\r\n\r\n\t\tFachada fachada = Fachada.getInstancia();\r\n\t\t\t\t\r\n\t\t// Mudar isso quando tiver esquema de segurança\r\n\t\t// HttpSession sessao = httpServletRequest.getSession(false);\r\n\t\t\r\n\t\tInformarImovelSituacaoCobrancaActionForm informarImovelSituacaoCobrancaActionForm = (InformarImovelSituacaoCobrancaActionForm) actionForm;\r\n\t\t\r\n\t\t\r\n\t\tif (httpServletRequest.getParameter(\"objetoConsulta\") != null ){\r\n\t\t\tInteger idImovel = new Integer(informarImovelSituacaoCobrancaActionForm.getIdImovel()); \r\n\t\t\tif (idImovel != null){\r\n\t\t\t\tString matriculaImovel = fachada.pesquisarInscricaoImovel(idImovel);\r\n\t\t\t\tImovel imovel = fachada.pesquisarImovelComSituacaoAguaEsgoto(idImovel);\r\n\t\t\t\thttpServletRequest.setAttribute(\"imovel\", imovel);\r\n\t\t\t\tif (matriculaImovel != null && !matriculaImovel.equalsIgnoreCase(\"\")){\r\n\t\t\t\t\tString enderecoImovel = fachada.pesquisarEndereco(idImovel);\r\n\t\t\t\t\thttpServletRequest.setAttribute(\"endereco\", enderecoImovel);\r\n\t\t\t\t\thttpServletRequest.setAttribute(\"matriculaImovel\", matriculaImovel);\r\n\t\t\t\t\t\r\n\t\t\t\t\tFiltroImovelCobrancaSituacao filtroImovelCobrancaSituacao = new FiltroImovelCobrancaSituacao();\r\n\t\t\t\t\tfiltroImovelCobrancaSituacao.adicionarParametro(new ParametroSimples(\r\n\t\t\t\t\t\t\tFiltroImovelCobrancaSituacao.IMOVEL_ID, idImovel.toString()));\r\n\t\t\t\t\tfiltroImovelCobrancaSituacao.adicionarCaminhoParaCarregamentoEntidade(\"cobrancaSituacao\");\r\n\t\t\t\t\tfiltroImovelCobrancaSituacao.adicionarCaminhoParaCarregamentoEntidade(\"cliente\");\r\n\t\t\t\t\tfiltroImovelCobrancaSituacao.adicionarCaminhoParaCarregamentoEntidade(\"imovel.ligacaoAguaSituacao\");\r\n\t\t\t\t\tfiltroImovelCobrancaSituacao.adicionarCaminhoParaCarregamentoEntidade(\"imovel.ligacaoEsgotoSituacao\");\r\n\t\t\t\t\tCollection colecaoImovelCobrancaSituacao = fachada.pesquisar(\r\n\t\t\t\t\t\t\tfiltroImovelCobrancaSituacao, ImovelCobrancaSituacao.class.getName());\r\n\t\t\t\t\t\r\n\t\t\t\t\tboolean escondeRetirar = true;\r\n\t\t\t\t\tboolean existeNaoRealizado = false;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (colecaoImovelCobrancaSituacao != null && !colecaoImovelCobrancaSituacao.isEmpty()){\r\n\t\t\t\t\t\thttpServletRequest.setAttribute(\"situacoes\", colecaoImovelCobrancaSituacao);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tfor (Iterator iter = colecaoImovelCobrancaSituacao.iterator(); iter.hasNext();) {\r\n\t\t\t\t\t\t\tImovelCobrancaSituacao imovelCobrancaSituacao = (ImovelCobrancaSituacao) iter.next();\r\n\t\t\t\t\t\t\tif (imovelCobrancaSituacao.getDataRetiradaCobranca() == null) {\r\n\t\t\t\t\t\t\t\texisteNaoRealizado = true;\r\n//\t\t\t\t\t\t\t\tescondeInserir = true;\r\n\t\t\t\t\t\t\t\tShort indicadorRetirada = imovelCobrancaSituacao.getCobrancaSituacao().getIndicadorBloqueioRetirada();\r\n\t\t\t\t\t\t\t\tif (indicadorRetirada == null || indicadorRetirada.equals(new Short(\"2\"))) {\r\n\t\t\t\t\t\t\t\t\tescondeRetirar = false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (existeNaoRealizado == false) { \r\n\t\t\t\t\t\t\tescondeRetirar = true; \r\n\t\t\t\t\t\t} \r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tescondeRetirar = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n//\t\t\t\t\tif (escondeInserir) httpServletRequest.setAttribute(\"escondeInserir\", \"sim\");\r\n\t\t\t\t\tif (escondeRetirar) httpServletRequest.setAttribute(\"escondeRetirar\", \"sim\");\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\thttpServletRequest.setAttribute(\"inexistente\", 1);\r\n\t\t\t\t\thttpServletRequest.setAttribute(\"escondeInserir\", \"sim\");\r\n\t\t\t\t\thttpServletRequest.setAttribute(\"escondeRetirar\", \"sim\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t//o sistema desabilita a primeira vez q entra na tela\r\n\t\t\thttpServletRequest.setAttribute(\"escondeInserir\", \"sim\");\r\n\t\t\thttpServletRequest.setAttribute(\"escondeRetirar\", \"sim\");\r\n\t\t}\r\n\r\n\t\t\r\n\t\treturn retorno;\r\n\r\n\t}",
"public void processAction(ActionRequest request, ActionResponse response) throws PortletException, java.io.IOException {\r\n\r\n }",
"public javax.accessibility.AccessibleAction getAccessibleAction() {\n try {\n XAccessibleAction unoAccessibleAction = (XAccessibleAction)\n UnoRuntime.queryInterface(XAccessibleAction.class, unoAccessibleContext);\n return (unoAccessibleAction != null) ? \n new AccessibleActionImpl(unoAccessibleAction) : null;\n } catch (com.sun.star.uno.RuntimeException e) {\n return null;\n }\n }",
"public Class<?> getActionClass() {\n return this.action;\n }",
"protected ActionForward performAction(ActionMapping \t\tmapping,\n\t\t\t\t\t\t\t\t\t\t ActionForm\t\t\tform,\n\t\t\t\t\t\t\t\t\t\t HttpServletRequest\trequest,\n\t\t\t\t\t\t\t\t\t\t HttpServletResponse\tresponse)\n\t\tthrows Exception \n\t{\n\t\tString forward = \"success\";\n\t\trequest.setAttribute(ALLOW_EDITS_KEY, \"false\");\n\t\t\n\t\tHttpSession session = request.getSession();\n\t\tArrayList selectedTestIds = new ArrayList();\n\t\tsession.setAttribute(\"selectedTestIds\", selectedTestIds);\n\n\t\tBaseActionForm dynaForm = (BaseActionForm) form;\n\n\t\t// Initialize the form.\n\t\tdynaForm.initialize(mapping);\n\t\t\n\t\tPropertyUtils.setProperty(dynaForm, \"currentDate\", DateUtil.getCurrentDateAsText());\n\t\tPropertyUtils.setProperty(dynaForm, \"sampleTypes\", DisplayListService.getList(ListType.SAMPLE_TYPE_ACTIVE));\n\t\tPropertyUtils.setProperty(dynaForm, \"sampleSources\", DisplayListService.getList(ListType.SAMPLE_SOURCE));\n\t\tPropertyUtils.setProperty(dynaForm, \"initConditionFormErrorsList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_INIT_COND_FORM_ERRORS));\n\t\tPropertyUtils.setProperty(dynaForm, \"initConditionLabelErrorsList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_INIT_COND_LABEL_ERRORS));\n\t\tPropertyUtils.setProperty(dynaForm, \"initConditionMiscList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_INIT_COND_MISC));\n\t\tPropertyUtils.setProperty(dynaForm, \"rejectionReasonFormErrorsList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_REJECTION_FORM_ERRORS));\n\t\tPropertyUtils.setProperty(dynaForm, \"rejectionReasonLabelErrorsList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_REJECTION_LABEL_ERRORS));\n\t\tPropertyUtils.setProperty(dynaForm, \"rejectionReasonMiscList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_REJECTION_MISC));\n PropertyUtils.setProperty(dynaForm, \"genderList\", DisplayListService.getList(ListType.GENDERS));\n PropertyUtils.setProperty(dynaForm, \"cityList\", DisplayListService.getList(ListType.CITY));\n PropertyUtils.setProperty(dynaForm, \"districtList\", DisplayListService.getList(ListType.DISTRICT));\n PropertyUtils.setProperty(dynaForm, \"departmentList\", DisplayListService.getList(ListType.DEPARTMENT));\n PropertyUtils.setProperty(dynaForm, \"patientTypeList\", DisplayListService.getList(ListType.PATIENT_TYPE));\n\n // for backwards compatibility with non-modal version of sample entry\n\t\tPropertyUtils.setProperty(dynaForm, \"initialSampleConditionList\", DisplayListService.getList(ListType.INITIAL_SAMPLE_CONDITION));\n\t\tPropertyUtils.setProperty(dynaForm, \"testSectionList\", DisplayListService.getList(ListType.TEST_SECTION));\n\n\t\tSample\tsample\t= new Sample();\n\n\t\t// Set received date and entered date to today's date\n\t\tDate today = Calendar.getInstance().getTime();\n\t\tString dateAsText = DateUtil.formatDateAsText(today);\n\n\t\tSystemConfiguration sysConfig = SystemConfiguration.getInstance();\n\t\t\n\t\tsample.setReceivedDateForDisplay(dateAsText);\n\t\tsample.setEnteredDateForDisplay(dateAsText);\n\t\tsample.setReferredCultureFlag(sysConfig.getQuickEntryDefaultReferredCultureFlag());\n\t\tsample.setStickerReceivedFlag(sysConfig.getQuickEntryDefaultStickerReceivedFlag());\n\t\t\n\t\t// default nextItemSequence to 1 (for clinical - always 1)\n\t\tsample.setNextItemSequence(sysConfig.getQuickEntryDefaultNextItemSequence());\n\n\t\t// revision is set to 0 on insert\n\t\tsample.setRevision(sysConfig.getQuickEntryDefaultRevision());\n\n\t\tsample.setCollectionTimeForDisplay(sysConfig.getQuickEntryDefaultCollectionTimeForDisplay());\n\n\t\tif (sample.getId() != null && !sample.getId().equals(\"0\"))\n\t\t{\n\t\t\trequest.setAttribute(ID, sample.getId());\n\t\t}\n\n\t\t// populate form from valueholder\n\t\tPropertyUtils.copyProperties(form, sample);\n\n\t\tPropertyUtils.setProperty(form, \"currentDate\",\t\tdateAsText);\n\t\trequest.setAttribute(\"menuDefinition\", \"BatchEntryDefinition\");\n\t\treturn mapping.findForward(forward);\n\t}",
"public ActionForward execute(ActionMapping mapping,\n ActionForm form,\n HttpServletRequest request,\n HttpServletResponse response)\n throws Exception {\n\n // default target to success\n String strTarget = \"success\";\n \n\n String strUrl = request.getParameter(\"url\");\n\n // set the target to failure if we could not retrieve the organ list\n if (StringUtils.hasValue(strUrl)) {\n // put all the servers in the request\n request.setAttribute(\"url\", strUrl);\n } else {\n strTarget = \"error\";\n }\n\n // forward to the appropriate View\n return mapping.findForward(strTarget);\n }",
"ActionMap getActionMap() {\n return createActionMap(); }",
"public ActionForward unspecified(ActionMapping mapping, ActionForm form,\r\n HttpServletRequest request, HttpServletResponse response) throws Exception {\r\n return displayProcessErp(mapping, form, request, response);\r\n }",
"public ActionForward doExecute(\n\t\tActionMapping mapping,\n\t\tActionForm form,\n\t\tHttpServletRequest request,\n\t\tHttpServletResponse response)\n\t\tthrows Exception {\n\n\t\tSearchStudentForm searchForm = (SearchStudentForm) form;\n\t\tif(form == null) {\n\t\t\treturn (mapping.findForward(\"itself\"));\n\t\t}\n\n\t\t// validate the form\n\t\tActionErrors errors = searchForm.validate(mapping, request);\n\t\tif(!errors.isEmpty()) {\n\t\t\tsaveErrors(request, errors);\n\t\t\treturn (mapping.findForward(\"itself\"));\n\t\t}\n\n\t\tStudentManager manager = (StudentManager)servlet.getServletContext().\n\t\t\t\t\t\t\t\tgetAttribute(Constants.STUDENT_DATABASE_KEY);\n\t\tDiplomaManager diplomaManager = (DiplomaManager) servlet.getServletContext().\n\t\t\t\t\t\t\t\tgetAttribute(Constants.DIPLOMA_DATABASE_KEY);\n\n\t\tif(manager == null || diplomaManager==null) {\n\t\t\terrors.add(\"database\",\n\t\t\t new ActionError(\"error.database.missing\"));\n\t\t\tlog.warn(\"SearchUserAction: Database is missing\");\n\t\t}\n\n\t\tif(!errors.isEmpty()) {\n\t\t\tsaveErrors(request, errors);\n\t\t\treturn (mapping.findForward(\"error\"));\n\t\t}\n\n\t\tint diplomaId = Integer.parseInt(searchForm.getDiplomaId());\n\t\tList studentList = manager.searchStudent(searchForm.getIne(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsearchForm.getName(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsearchForm.getFirstname(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdiplomaId);\n\n\t\tif(studentList != null) {\n\t\t\trequest.getSession().setAttribute(\"studentlist\", studentList);\n\t\t}\n\n\t\tList diplomaList = diplomaManager.listDiploma();\n\t\tif(diplomaList != null) {\n\t\t\trequest.setAttribute(\"diplomaList\", diplomaList);\n\t\t}\n\n\t\treturn (mapping.findForward(\"itself\"));\n\t}",
"public void processAction (ActionRequest request, ActionResponse response) \n throws PortletException, java.io.IOException {\n throw new PortletException(\"processAction method not implemented\");\n }",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic ActionForward queryTest(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\treturn mapping.findForward(\"succ\");\r\n\t}",
"public abstract Action getAction();",
"void sendForward(HttpServletRequest request, HttpServletResponse response, String location) throws AccessControlException, ServletException, IOException;",
"private String performTheAction(HttpServletRequest request, HttpServletResponse response) {\r\n\t\tString servletPath = request.getServletPath();\r\n\t\tString action = getActionName(servletPath);\r\n\t\t// Let the logged in user run his chosen action\r\n\t\treturn Action.perform(action, request);\r\n\t}",
"void executeAction(String action, Map params,\n IPSAgentHandlerResponse response);",
"public ActionForward execute(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response)\n throws Exception {\n\n // Create the object that holds the fields from the login page.\n LoginForm validateLogin = (LoginForm) form;\n // Used to define the page to be forwarded to.\n ActionForward findForward = mapping.findForward(\"welcome\");\n User user = new User();\n user.loadFile();\n access = user.compare(validateLogin);\n // If login credentials are valid continue otherwise return to the login page.\n if (access) {\n findForward = mapping.findForward(\"loggedIn\");\n } else {\n findForward = mapping.findForward(\"login\");\n } \n return findForward;\n }",
"private ActionForward performAction(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows Exception {\n\t\t\r\n\t\tTSchool schoolParam = new TSchool();\r\n\t\tFindSchool bean = (FindSchool)form;\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tApplicationContext ctx = SpringContextAware.getApplicationContext();\r\n\t\t\tBeanUtils.copyProperties(schoolParam, bean);\r\n\t\t\t\r\n\t\t\tSchoolContentUploadService service = (SchoolContentUploadService)ctx.getBean(\"schoolContentSerivce\");\r\n\t\t\tList<TSchool> schoolList = service.findAllSchools(schoolParam);\r\n\t\t\t\r\n\t\t\tif (schoolList == null || schoolList.size() == 0)\r\n\t\t\t{\r\n\t\t\t\tActionMessages errors = getErrors(request);\r\n\t\t\t\terrors.add(\"ERROR_NO_RECORDS\", new ActionMessage(\"error.no.content\",\"No Records Found for your search\"));\r\n\t\t\t\treturn mapping.findForward(\"displayPage\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tIExtendedPaginatedList pageList = new PaginatedListImpl();\r\n\t\t\tint pageSize = SEARCH_RESULT_PAGE_SIZE; // Rows per page\r\n\t\t\tpageList.setPageSize(5);\r\n\t\t\t\r\n\t\t\tpageList.setList(schoolList);\r\n\t\t\tbean.setPgSearchResults(pageList);\r\n\t\t\t\t\t\t\r\n\t\t\trequest.setAttribute(\"SCHOOLRESULT\", schoolList);\r\n\t\t\trequest.setAttribute(\"SIZE\", schoolList.size());\r\n\t\t\treturn mapping.findForward(\"success\");\r\n\t\t}\r\n\t\tcatch(Exception ex)\r\n\t\t{\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public PDAction getFo() {\n/* 187 */ COSDictionary fo = (COSDictionary)this.actions.getDictionaryObject(\"Fo\");\n/* 188 */ PDAction retval = null;\n/* 189 */ if (fo != null)\n/* */ {\n/* 191 */ retval = PDActionFactory.createAction(fo);\n/* */ }\n/* 193 */ return retval;\n/* */ }",
"private ActionForward home(ActionMapping mapping, ActionForm form, HttpServletRequest request,\n\t\t\tHttpServletResponse response) {\n\t\treturn new LoginProxy().loginHome(mapping, form, request, response);\n\t}",
"public interface ActionDispatcher {\n\n /**\n * Dispatches the provided action to a proper handler that is responsible for handling of that action.\n * <p/> To may dispatch the incomming action a proper handler needs to be bound\n * to the {@link com.clouway.gad.dispatch.ActionHandlerRepository} to may the dispatch method dispatch the\n * incomming request to it.\n * \n * @param action the action to be handled\n * @param <T> a generic response type\n * @return response from the provided execution\n * @throws ActionHandlerNotBoundException is thrown in cases where no handler has been bound to handle that action\n */\n <T extends Response> T dispatch(Action<T> action) throws ActionHandlerNotBoundException;\n \n}",
"public ActionForward execSchedTask( ActionMapping mapping, ActionForm form, HttpServletRequest request,\r\n HttpServletResponse response )\r\n throws IOException, ServletException\r\n {\r\n\r\n String wAction = request.getParameter( \"wWatchedAction\" );\r\n String forwardExecMode = request.getParameter( \"wModeForward\" );\r\n\r\n try\r\n {\r\n ActionConfig cfg = mapping.getModuleConfig().findActionConfig( wAction );\r\n String taskClass = cfg.getType();\r\n\r\n Class classDesc = Class.forName( taskClass );\r\n WatchedTask batch = (WatchedTask) classDesc.newInstance();\r\n batch.init( form, request );\r\n\r\n Object taskId = WatchedTaskManager.getInstance( request ).regTask( batch );\r\n\r\n // Writes the response\r\n sendAjaxResponse( taskId.toString(), batch, response );\r\n\r\n WatchedTaskManager.getInstance( request ).getWorkQueue().execute( batch );\r\n\r\n }\r\n catch ( Exception e )\r\n {\r\n throw new ServletException( e );\r\n }\r\n\r\n return null;\r\n }",
"public ActionForward unspecified(ActionMapping mapping,\r\n ActionForm form,\r\n HttpServletRequest request,\r\n HttpServletResponse response) throws Exception {\r\n return display(mapping, form, request, response);\r\n }",
"private ActionForward autorizar(ActionMapping mapping, ActionForm form, HttpServletRequest request,\n\t\t\tHttpServletResponse response) {\n\t\treturn new LoginProxy().loginHome(mapping, form, request, response);\n\t}",
"public ActionForward multiUse(ActionMapping mapping, ActionForm form,\n \t\t\tHttpServletRequest request, HttpServletResponse response)\n \tthrows Exception {\n \t\t\n \t\treturn mapping.findForward(\"backToGeneExp\");\n }",
"public ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {\r\n return notify(mapping, form, request, response);\r\n }",
"public A getAction() {\r\n\t\treturn action;\r\n\t}",
"private ActionForward displayAction(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows Exception {\n\t\t\r\n\t\tExceptionDisplayDTO expDTO = new ExceptionDisplayDTO(\"displayPage\",\"\");\r\n\t\texpDisplayDetails.set(expDTO);\r\n\t\t\r\n\t\t//condition to not display search results by default\r\n\t\t/*if(isNavigationDone(request)){\r\n\t\t\tgetPaginatedSearchResults(request,bean,null);\r\n\t\t}*/\r\n\t\t\r\n\t\treturn mapping.findForward(\"displayPage\");\t\t\r\n\t}",
"public Action getAction(String actionName) {\r\n try {\r\n return processModel.getAction(actionName);\r\n } catch (WorkflowException we) {\r\n return null;\r\n }\r\n }",
"public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {\r\n Logger l = LogUtils.enterLog(getClass(), \"execute\");\r\n\r\n ActionForward af = null;\r\n Record inputRecord = getInputRecord(request);\r\n\r\n if (l.isLoggable(Level.FINE)) {\r\n l.logp(Level.FINE, getClass().getName(), \"execute\", \"Request URI:\" + request.getRequestURI() + \"', process: '\" + request.getParameter(\"process\") + \"', parameters as Input Record: \" + inputRecord);\r\n String txtXML = request.getParameter(\"txtXML\");\r\n if (!StringUtils.isBlank(txtXML)) {\r\n l.logp(Level.FINE, getClass().getName(), \"execute\", \"txtXML as Input RecordSet: \" + getInputRecordSet(request));\r\n }\r\n }\r\n\r\n boolean isAjaxRequest = isAjaxRequest(request);\r\n try {\r\n String policyNo = \"\";\r\n\r\n if (!StringUtils.isBlank(request.getParameter(RequestIds.POLICY_NO))) {\r\n policyNo = request.getParameter(RequestIds.POLICY_NO);\r\n }\r\n else {\r\n if (RequestStorageManager.getInstance().has(RequestStorageIds.POLICY_NO)) {\r\n policyNo = (String) RequestStorageManager.getInstance().get(RequestStorageIds.POLICY_NO);\r\n }\r\n }\r\n\r\n boolean requestDueToFailure = false;\r\n if (MessageManager.getInstance().hasErrorMessages()) {\r\n requestDueToFailure = true;\r\n }\r\n\r\n // Load the Policy Header even if the policyNo is blank so that if the previous policy was locked, it will be unlocked.\r\n PolicyHeader policyHeader = null;\r\n try {\r\n\r\n //Initialize the save token. Don't do this for Ajax requests because the save token is already set for the page.\r\n if (!isAjaxRequest) {\r\n initializeLoadRequestForSave(request, getTokenConstant());\r\n if (inputRecord.hasField(\"noLoadingDiv\")\r\n && YesNoFlag.getInstance(inputRecord.getStringValue(\"noLoadingDiv\")).booleanValue()) {\r\n request.setAttribute(\"noLoadingDiv\", true);\r\n }\r\n }\r\n\r\n RequestStorageManager.getInstance().set(RequestIds.IS_PREVIEW_REQUEST,\r\n (YesNoFlag.getInstance((String) inputRecord.getFieldValue(RequestIds.IS_PREVIEW_REQUEST, \"N\")).booleanValue()));\r\n\r\n policyHeader = loadPolicyHeader(request);\r\n\r\n handlePreviewRequest(request, policyHeader);\r\n\r\n if (inputRecord.getBooleanValue(\"processRatingB\", false).booleanValue()) {\r\n UserSessionManager.getInstance().getUserSession().set(\"PreviousPolicyHeader\", policyHeader);\r\n }\r\n\r\n // Load the PolicyHeader Oasis Fields for the included policyHeader.jsp.\r\n if (policyHeader != null) {\r\n //For access trail\r\n request.setAttribute(AccessTrailRequestIds.ACCESS_TRAIL_SOURCE_TABLE_NAME, \"POLICY_TERM_HISTORY\");\r\n request.setAttribute(AccessTrailRequestIds.ACCESS_TRAIL_SOURCE_RECORD_NO, policyHeader.getPolicyNo());\r\n request.setAttribute(AccessTrailRequestIds.ACCESS_TRAIL_SOURCE_RECORD_FK, policyHeader.getPolicyTermHistoryId());\r\n\r\n // If the Policy Header is loaded:\r\n // 1. Load the Policy Header specific OasisFields and create field/value beans\r\n securePage(request, form, true, true);\r\n\r\n // record for header fields\r\n Record record = (Record) request.getAttribute(RequestIds.NON_GRID_FIELDS_RECORD);\r\n request.setAttribute(RequestIds.HEADER_FIELDS_RECORD, record);\r\n request.removeAttribute(RequestIds.NON_GRID_FIELDS_RECORD);\r\n\r\n OasisFields fieldsMap = (OasisFields) request.getAttribute(IOasisAction.KEY_FIELDS);\r\n Term currentTerm = policyHeader.getPolicyTerm(policyHeader.getPolicyTermHistoryId());\r\n boolean isWipAvailable = currentTerm.isWipExists();\r\n boolean isOfficialAailable = currentTerm.isOfficialExists();\r\n boolean isEndorsementQuoteAailable = currentTerm.isEndorsementQuoteExists();\r\n boolean isRenewalQuoteAailable = currentTerm.isRenewalQuoteExists();\r\n\r\n OasisFormField field = (OasisFormField) fieldsMap.get(\"policyViewMode\");\r\n String lovSql = \"[NO_ADD_SELECT_OPTION]LIST:\";\r\n if (isOfficialAailable) {\r\n lovSql = lovSql + \"OFFICIAL,Official,\";\r\n }\r\n if (isWipAvailable) {\r\n lovSql = lovSql + \"WIP,WIP,\";\r\n }\r\n if (isEndorsementQuoteAailable) {\r\n //get Endorsment Quote list\r\n RecordSet rs = getPolicyManager().loadAllEndorsementQuote(policyHeader);\r\n Iterator itor = rs.getRecords();\r\n while (itor.hasNext()) {\r\n Record endQuoteRecord = (Record) itor.next();\r\n String endQuoteId = endQuoteRecord.getStringValue(\"endorsementQuoteId\");\r\n lovSql = lovSql + \"ENDQUOTE,Endorsement Quote: \" + endQuoteId + \",\";\r\n }\r\n\r\n }\r\n else if (isRenewalQuoteAailable) {\r\n //get renewal quote list\r\n RecordSet rs = getPolicyManager().loadAllEndorsementQuote(policyHeader);\r\n Iterator itor = rs.getRecords();\r\n while (itor.hasNext()) {\r\n Record endQuoteRecord = (Record) itor.next();\r\n String endQuoteId = endQuoteRecord.getStringValue(\"endorsementQuoteId\");\r\n lovSql = lovSql + \"ENDQUOTE,Renewal Quote: \" + endQuoteId + \",\";\r\n }\r\n }\r\n\r\n if (PolicyAttributesFactory.getInstance().isDisplayQuoteInViewModeEnable(\r\n policyHeader.getLastTransactionInfo().getTransEffectiveFromDate(),\r\n policyHeader.getPolicyCycleCode(),\r\n policyHeader.getQuoteCycleCode(),\r\n policyHeader.getLastTransactionInfo().getTransactionTypeCode(),\r\n policyHeader.getRecordMode(),\r\n policyHeader.getPolicyStatus())) {\r\n Record r = policyHeader.toRecord();\r\n r.setFieldValue(QuoteFields.SELECT_MODE,\r\n QuoteFields.joinSelectMode(QuoteFields.EXCL_SELF, QuoteFields.TERM_SENS, QuoteFields.EXCL_NB,\r\n QuoteFields.EXCL_INVALID, QuoteFields.EXCL_ACCEPTED));\r\n RecordSet rs = getQuoteManager().loadQuoteVersions(r);\r\n\r\n for (int i = 0; i < rs.getRecordList().size(); i ++ ) {\r\n r = rs.getRecordList().get(i);\r\n String text = PolicyAttributesFactory.getInstance().getDisplayQuoteInViewModeText(\r\n policyHeader.getLastTransactionInfo().getTransEffectiveFromDate(),\r\n PolicyFields.getPolicyCycleCode(r),\r\n PolicyFields.getQuoteCycleCode(r),\r\n r);\r\n if (text != null) {\r\n lovSql = lovSql + \"QUOTE:\"+PolicyHeaderFields.getPolicyNo(r) +\r\n \",\" + text + \",\";\r\n }\r\n }\r\n }\r\n field.setLovSql(lovSql);\r\n // 2. Load any list of values for the Policy Header\r\n loadListOfValues(request, form);\r\n // 3. Reset the map attribute to a specific policyHeaderFieldsMap name\r\n request.setAttribute(KEY_PH_FIELDS, fieldsMap);\r\n request.setAttribute(IOasisAction.KEY_HEADER_PAGE_FIELDS, fieldsMap);\r\n //set selected endquote\r\n\r\n //TODO: see workaround below\r\n// request.removeAttribute(IOasisAction.KEY_FIELDS);\r\n// if(policyHeader.getPolicyIdentifier().getPolicyViewMode().isEndquote()){\r\n// request.setAttribute(\"policyViewMode\",\"ENDQUOTE:\"+policyHeader.getLastTransactionId());\r\n// }\r\n }\r\n }\r\n catch (Exception e) {\r\n l.logp(Level.WARNING, getClass().getName(), \"execute\", \"Failed to load the policy information for policyNo '\" + policyNo + \"'\", e);\r\n }\r\n final StringBuffer requestInformation = new StringBuffer();\r\n requestInformation.append(\"URI:'\").append(request.getRequestURI()).append(\"', \");\r\n requestInformation.append(\"process:'\").append(request.getParameter(RequestIds.PROCESS)).append(\"', \");\r\n requestInformation.append(\"UserId:'\").append(UserSessionManager.getInstance().getUserSession().getUserId()).append(\"', \");\r\n if (!StringUtils.isBlank(policyNo)) {\r\n if (policyHeader != null) {\r\n\r\n if (l.isLoggable(Level.INFO)) {\r\n if (!mapping.getPath().endsWith(\"maintainLock\") || l.isLoggable(Level.FINE)) {\r\n requestInformation.append(\"Policy No:'\").append(policyHeader.getPolicyNo()).append(\"', \");\r\n requestInformation.append(\"Policy Id:'\").append(policyHeader.getPolicyId()).append(\"', \");\r\n requestInformation.append(\"Policy Type:'\").append(policyHeader.getPolicyTypeCode()).append(\"', \");\r\n requestInformation.append(\"View Mode:'\").append(policyHeader.getPolicyIdentifier().getPolicyViewMode()).append(\"', \");\r\n requestInformation.append(\"Lock Id:'\").append(policyHeader.getPolicyIdentifier().getPolicyLockId()).append(\"', \");\r\n requestInformation.append(\"IsSelectedTermInWIP:'\").append(policyHeader.isWipB()).append(\"', \");\r\n requestInformation.append(\"Own Lock?\").append(policyHeader.getPolicyIdentifier().ownLock()).append(\"', \");\r\n requestInformation.append(\"Policy History Term Id:'\").append(policyHeader.getPolicyTermHistoryId()).append(\"', \");\r\n requestInformation.append(\"Term Base Id:'\").append(policyHeader.getTermBaseRecordId()).append(\"', \");\r\n requestInformation.append(\"Effective From Date:'\").append(policyHeader.getTermEffectiveFromDate()).append(\"', \");\r\n requestInformation.append(\"Effective To Date:'\").append(policyHeader.getTermEffectiveToDate()).append(\"', \");\r\n requestInformation.append(\"Risk Id:'\").append(inputRecord.getStringValue(\"riskId\", \"\")).append(\"', \");\r\n requestInformation.append(\"Coverage Id:'\").append(inputRecord.getStringValue(\"coverageId\", \"\")).append(\"', \");\r\n requestInformation.append(\"Latest Transaction Id:'\").append(policyHeader.getLastTransactionInfo().getTransactionLogId()).append(\"' \");\r\n\r\n l.logp(Level.INFO, getClass().getName(), \"execute\", \"Request Information: \" + requestInformation.toString());\r\n }\r\n\r\n if (l.isLoggable(Level.FINE)) {\r\n l.logp(Level.FINE, getClass().getName(), \"execute\", \"policyHeader = \" + policyHeader);\r\n }\r\n\r\n }\r\n af = super.execute(mapping, form, request, response);\r\n }\r\n else {\r\n if (requestDueToFailure) {\r\n l.logp(Level.INFO, getClass().getName(), \"execute\", \"Request Information: \" + requestInformation.toString());\r\n // Don't forward to failure page if this request is already the result of a failure.\r\n af = super.execute(mapping, form, request, response);\r\n }\r\n else {\r\n l.logp(Level.INFO, getClass().getName(), \"execute\", \"Request Information: \" + requestInformation.toString());\r\n // Failed to load the PolicyHeader for the requested PolicyNo.\r\n l.logp(Level.WARNING, getClass().getName(), \"execute\", \"Unable to load the policy information for policyNo '\" + policyNo + \"'\");\r\n MessageManager.getInstance().addErrorMessage(\"pm.findpolicy.noData.msg\", new Object[]{policyNo});\r\n if (isAjaxRequest) {\r\n // If this is an Ajax request, write the error\r\n writeAjaxResponse(response, new Record(), true);\r\n }\r\n else {\r\n // Otherwise, return the global forward to the find policy page\r\n af = mapping.findForward(\"loadPolicyFailure\");\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n requestInformation.append(\"Policy No Is Not Provided\");\r\n l.logp(Level.INFO, getClass().getName(), \"execute\", \"Request Information: \" + requestInformation.toString());\r\n af = super.execute(mapping, form, request, response);\r\n }\r\n // Reset notification transaction time\r\n OasisUser oasisUser = UserSessionManager.getInstance().getUserSession().getOasisUser();\r\n if (oasisUser.hasRequestedTransactionTime()) {\r\n oasisUser.setRequestedTransactionTime(null);\r\n }\r\n }\r\n catch (Exception e) {\r\n AppException ae = ExceptionHelper.getInstance().handleException(\"Error loading policy header information.\", e);\r\n l.throwing(getClass().getName(), \"execute\", ae);\r\n String forwardString = handleError(AppException.UNEXPECTED_ERROR, \"Error loading policy header information.\", e, request, mapping);\r\n af = mapping.findForward(forwardString);\r\n }\r\n\r\n // Set all fields in fieldsMap to readonly if there's \"readOnly\" attribute is set to \"Y\" in request.\r\n // The fieldId of this indicator field is defined in EntitlementFields class.\r\n // For some unkown reason, sometime the readOnly attribute is set as String\r\n // Below codes are from safe perspective\r\n Object oReadonly = request.getAttribute(EntitlementFields.READ_ONLY);\r\n boolean isReadonly = false;\r\n if (oReadonly != null) {\r\n if (oReadonly instanceof String) {\r\n isReadonly = YesNoFlag.getInstance((String) oReadonly).booleanValue();\r\n }\r\n else if (oReadonly instanceof YesNoFlag) {\r\n isReadonly = ((YesNoFlag) oReadonly).booleanValue();\r\n }\r\n }\r\n\r\n Object oHanldeLayer = request.getAttribute(EntitlementFields.HANDLE_LAYER);\r\n boolean isHanldeLayer = true;\r\n if (oHanldeLayer != null) {\r\n if (oHanldeLayer instanceof String) {\r\n isHanldeLayer = YesNoFlag.getInstance((String) oHanldeLayer).booleanValue();\r\n }\r\n else if (oHanldeLayer instanceof YesNoFlag) {\r\n isHanldeLayer = ((YesNoFlag) oHanldeLayer).booleanValue();\r\n }\r\n }\r\n\r\n if (isReadonly) {\r\n String [] excludedFieldsList = null;\r\n if (hasAlwaysEnabledFieldIds())\r\n excludedFieldsList = getAlwaysEnabledFieldIds().split(\",\");\r\n setFieldsToReadOnly(request, excludedFieldsList, isHanldeLayer, true);\r\n }\r\n\r\n if (isSaveInProgress()) {\r\n if (isAjaxRequest && MessageManager.getInstance().hasConfirmationPrompts()) {\r\n // The Ajax request was a save request, and did not complete because it requires confirmations.\r\n // Remove the save in-progress session attribute to indicate that the save process has been exited.\r\n updateSessionToken(request,getTokenConstant());\r\n removeSaveInProgressIndicator();\r\n }\r\n else if (request.getAttribute(IOasisAction.KEY_ERROR) == null &&\r\n request.getAttribute(IOasisAction.KEY_VALIDATION_ERROR) == null &&\r\n MessageManager.getInstance().hasErrorMessages() == false\r\n ) {\r\n\r\n saveProcessSucceeded(request, getTokenConstant());\r\n }\r\n else {\r\n updateSessionToken(request, getTokenConstant());\r\n saveProcessFailed(request);\r\n }\r\n } else {\r\n //make sure a new token gets generated when loading a page. this will avoid calling the saveToken() on all the action classes initial load.\r\n //the IS_STRUTS_LOAD_ACTION is to make sure that it is loading for the first time.\r\n if (!isAjaxRequest(request) && request.getAttribute(RequestStorageIds.IS_STRUTS_LOAD_ACTION) == null) {\r\n //saveToken(request, getTokenConstant());\r\n updateCSRFTokenInForwardParameter(request);\r\n }\r\n }\r\n\r\n request.getSession().removeAttribute(RequestStorageIds.IS_STRUTS_LOAD_ACTION);\r\n\r\n request.removeAttribute(RequestStorageIds.IS_STRUTS_LOAD_ACTION);\r\n l.exiting(getClass().getName(), \"execute\", af);\r\n return af;\r\n }",
"@Override\r\n \tpublic ActionForward executeSecureAction(ActionMapping mapping, ActionForm form,\r\n \t\t\tHttpServletRequest request, HttpServletResponse response) throws IOException,\r\n \t\t\tServletException\r\n \t{\r\n \t\tsaveActionErrors(form, request);\r\n \t\t// //Gets the value of the operation parameter.\r\n \t\t// String operation = request.getParameter(Constants.OPERATION);\r\n \t\t//\r\n \t\t// //Sets the operation attribute to be used in the Add/Edit Institute\r\n \t\t// Page.\r\n \t\t// request.setAttribute(Constants.OPERATION, operation);\r\n \t\ttry\r\n \t\t{\r\n \t\t\tfinal IFactory factory = AbstractFactoryConfig.getInstance().getBizLogicFactory();\r\n \t\t\tfinal IBizLogic bizLogic = factory.getBizLogic(Constants.DEFAULT_BIZ_LOGIC);\r\n \r\n \t\t\t// ************* ForwardTo implementation *************\r\n \t\t\t// forwarded from Specimen page\r\n \t\t\tfinal HashMap forwardToHashMap = (HashMap) request.getAttribute(\"forwardToHashMap\");\r\n \t\t\tString specimenId = null;\r\n \t\t\tString specimenLabel = null;\r\n \t\t\tString specimenClass = null;\r\n \t\t\t// -------------Mandar 04-July-06 QuickEvents start\r\n \t\t\tString fromQuickEvent = (String) request.getAttribute(\"isQuickEvent\");\r\n \t\t\tif (fromQuickEvent == null)\r\n \t\t\t{\r\n \t\t\t\tfromQuickEvent = request.getParameter(\"isQuickEvent\");\r\n \t\t\t}\r\n \t\t\tString eventSelected = \"\";\r\n \t\t\tif (fromQuickEvent != null)\r\n \t\t\t{\r\n \t\t\t\tspecimenId = (String) request.getAttribute(Constants.SPECIMEN_ID);\r\n \t\t\t\teventSelected = (String) request.getAttribute(Constants.EVENT_SELECTED);\r\n \t\t\t\tif (eventSelected == null && forwardToHashMap != null)\r\n \t\t\t\t{\r\n \t\t\t\t\tspecimenClass = (String) forwardToHashMap.get(\"specimenClass\");\r\n \t\t\t\t\tspecimenId = (String) forwardToHashMap.get(\"specimenId\");\r\n \t\t\t\t\tif (specimenClass.equalsIgnoreCase(\"Tissue\"))\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\teventSelected = Constants.EVENT_PARAMETERS[14];\r\n \t\t\t\t\t}\r\n \t\t\t\t\telse if (specimenClass.equalsIgnoreCase(\"Molecular\"))\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\teventSelected = Constants.EVENT_PARAMETERS[9];\r\n \t\t\t\t\t}\r\n \t\t\t\t\telse if (specimenClass.equalsIgnoreCase(\"Cell\"))\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\teventSelected = Constants.EVENT_PARAMETERS[1];\r\n \t\t\t\t\t}\r\n \t\t\t\t\telse if (specimenClass.equalsIgnoreCase(\"Fluid\"))\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\teventSelected = Constants.EVENT_PARAMETERS[7];\r\n \t\t\t\t\t}\r\n \r\n \t\t\t\t}\r\n \t\t\t\trequest.setAttribute(Constants.EVENT_SELECTED, eventSelected);\r\n \t\t\t\t// System.out.println(\"::::::::::::::\\n\\n\\n\\n\"+form.getClass().\r\n \t\t\t\t// getName() );\r\n \t\t\t\tListSpecimenEventParametersForm eventForm = (ListSpecimenEventParametersForm) form;\r\n \t\t\t\tif (eventForm == null)\r\n \t\t\t\t{\r\n \t\t\t\t\teventForm = new ListSpecimenEventParametersForm();\r\n \t\t\t\t}\r\n \t\t\t\teventForm.setSpecimenEventParameter(eventSelected);\r\n \t\t\t\teventForm.setSpecimenId(specimenId.trim());\r\n \r\n \t\t\t}\r\n \t\t\t// -------------Mandar 04-July-06 QuickEvents end\r\n \t\t\tif (forwardToHashMap != null)\r\n \t\t\t{\r\n \t\t\t\t// Fetching SpecimenId from HashMap generated by\r\n \t\t\t\t// ForwardToProcessor\r\n \t\t\t\tspecimenId = (String) forwardToHashMap.get(\"specimenId\");\r\n \t\t\t\tspecimenLabel = (String) forwardToHashMap.get(Constants.SPECIMEN_LABEL);\r\n \t\t\t\tLogger.out.debug(\"SpecimenID found in \" + \"forwardToHashMap========>>>>>>\"\r\n \t\t\t\t\t\t+ specimenId);\r\n \t\t\t}\r\n \t\t\t// ************* ForwardTo implementation *************\r\n \r\n \t\t\t// If new SpecimenEvent is added, specimenId in forwardToHashMap\r\n \t\t\t// will be null, following code handles that case\r\n \t\t\tif (specimenId == null)\r\n \t\t\t{\r\n \t\t\t\tfinal String eventId = request.getParameter(\"eventId\");\r\n \r\n \t\t\t\t// Added by Vijay Pande. While cliking on events tab both\r\n \t\t\t\t// specimenId and eventId are getting null. Since there was no\r\n \t\t\t\t// check on eventId it was throwing error for following retrieve\r\n \t\t\t\t// call.\r\n \t\t\t\t// Null check is added for eventId. Fix for bug Id: 4731\r\n \t\t\t\tif (eventId != null)\r\n \t\t\t\t{\r\n \t\t\t\t\tLogger.out.debug(\"Event ID added===>\" + eventId);\r\n \t\t\t\t\t// Retrieving list of SpecimenEvents for added\r\n \t\t\t\t\t// SpecimenEventId\r\n \t\t\t\t\tfinal Object object = bizLogic.retrieve(\r\n \t\t\t\t\t\t\tSpecimenEventParameters.class.getName(), new Long(eventId));\r\n \r\n \t\t\t\t\tif (object != null)\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\t// Getting object of specimenEventParameters from the\r\n \t\t\t\t\t\t// list of SepcimenEvents\r\n \t\t\t\t\t\tfinal SpecimenEventParameters specimenEventParameters = (SpecimenEventParameters) object;\r\n \r\n \t\t\t\t\t\t// getting SpecimenId of SpecimenEventParameters\r\n \t\t\t\t\t\tfinal AbstractSpecimen specimen = specimenEventParameters.getSpecimen();\r\n \t\t\t\t\t\tspecimenId = specimen.getId().toString();\r\n \t\t\t\t\t\t// specimenLabel = specimen.getLabel();\r\n \t\t\t\t\t\tLogger.out.debug(\"Specimen of Event Added====>\"\r\n \t\t\t\t\t\t\t\t+ (specimenEventParameters.getSpecimen()).getId());\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t}\r\n \r\n \t\t\tif (specimenId == null)\r\n \t\t\t{\r\n \t\t\t\tspecimenId = request.getParameter(Constants.SPECIMEN_ID);\r\n \t\t\t\tspecimenLabel = request.getParameter(Constants.SPECIMEN_LABEL);\r\n \t\t\t}\r\n \t\t\tif (specimenId == null)\r\n \t\t\t{\r\n \t\t\t\tspecimenId = (String) request.getAttribute(Constants.SPECIMEN_ID);\r\n \t\t\t}\r\n \r\n \t\t\trequest.setAttribute(Constants.SPECIMEN_ID, specimenId);\r\n \r\n \t\t\tfinal Object object = bizLogic.retrieve(Specimen.class.getName(), new Long(specimenId));\r\n \r\n \t\t\tif (object != null)\r\n \t\t\t{\r\n \t\t\t\tfinal Specimen specimen = (Specimen) object;\r\n \t\t\t\tif (specimenLabel == null)\r\n \t\t\t\t{\r\n \t\t\t\t\tspecimenLabel = specimen.getLabel();\r\n \t\t\t\t}\r\n \t\t\t\t// Setting Specimen Event Parameters' Grid\r\n \r\n \t\t\t\t// Ashish - 4/6/07 --- Since lazy=true, retriving the events\r\n \t\t\t\t// collection.\r\n \t\t\t\tfinal Collection<SpecimenEventParameters> specimenEventCollection = this\r\n \t\t\t\t\t\t.getSpecimenEventParametersColl(specimenId, bizLogic);\r\n \t\t\t\tfinal Collection<ActionApplication> dynamicEventCollection = this\r\n \t\t\t\t\t\t.getDynamicEventColl(specimenId, bizLogic);\r\n \t\t\t\t/**\r\n \t\t\t\t * Name: Chetan Patil Reviewer: Sachin Lale Bug ID: Bug#4180\r\n \t\t\t\t * Patch ID: Bug#4180_1 Description: The values of event\r\n \t\t\t\t * parameter is stored in a Map and in turn the Map is stored in\r\n \t\t\t\t * a List. This is then sorted chronologically, using a date\r\n \t\t\t\t * value form the Map. After sorting the List of Map is\r\n \t\t\t\t * converted into the List of List, which is used on the UI for\r\n \t\t\t\t * displaying values form List on the grid.\r\n \t\t\t\t */\r\n \t\t\t\tif (dynamicEventCollection != null)\r\n \t\t\t\t{\r\n \t\t\t\t\tfinal List<Map<String, Object>> gridData = new ArrayList<Map<String, Object>>();\r\n \r\n \t\t\t\t\tfor (final ActionApplication actionApp : dynamicEventCollection)\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\tfinal Map<String, Object> rowDataMap = new HashMap<String, Object>();\r\n \t\t\t\t\t\tif (actionApp != null)\r\n \t\t\t\t\t\t{\r\n \t\t\t\t\t\t\t//final String[] events = EventsUtil\r\n \t\t\t\t\t\t\t//\t\t.getEvent(eventParameters);\r\n \t\t\t\t\t\t\tlong contId = actionApp.getApplicationRecordEntry().getFormContext()\r\n \t\t\t\t\t\t\t\t\t.getContainerId();\r\n \t\t\t\t\t\t\tList contList = AppUtility\r\n \t\t\t\t\t\t\t\t\t.executeSQLQuery(\"select caption from dyextn_container where identifier=\"\r\n \t\t\t\t\t\t\t\t\t\t\t+ contId);\r\n \t\t\t\t\t\t\tString container = (String) ((List) contList.get(0)).get(0);\r\n \t\t\t\t\t\t\t//final Object container =bizLogic.retrieve(Container.class.getName(),new Long(contId));\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.ID, String.valueOf(actionApp.getId()));\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.EVENT_NAME,\r\n \t\t\t\t\t\t\t\t\tedu.wustl.cab2b.common.util.Utility\r\n \t\t\t\t\t\t\t\t\t\t\t.getFormattedString(container));\r\n \r\n \t\t\t\t\t\t\t// Ashish - 4/6/07 - retrieving User\r\n \t\t\t\t\t\t\t// User user = eventParameters.getUser();\r\n \t\t\t\t\t\t\tfinal User user = this.getUser(actionApp.getId(), bizLogic);\r\n \r\n \t\t\t\t\t\t\trowDataMap.put(Constants.USER_NAME, user.getLastName() + \", \"\r\n \t\t\t\t\t\t\t\t\t+ user.getFirstName());\r\n \r\n \t\t\t\t\t\t\t// rowDataMap.put(Constants.EVENT_DATE,\r\n \t\t\t\t\t\t\t// Utility.parseDateToString\r\n \t\t\t\t\t\t\t// (eventParameters.getTimestamp(),\r\n \t\t\t\t\t\t\t// Constants.TIMESTAMP_PATTERN)); // Sri: Changed\r\n \t\t\t\t\t\t\t// format for bug #463\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.EVENT_DATE, actionApp.getTimestamp());\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.PAGE_OF, \"pageOfDynamicEvent\");// pageOf\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.SPECIMEN_ID, request\r\n \t\t\t\t\t\t\t\t\t.getAttribute(Constants.SPECIMEN_ID));// pageOf\r\n \t\t\t\t\t\t\tgridData.add(rowDataMap);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \r\n \t\t\t\t\tfinal List<List<String>> gridDataList = this.getSortedGridDataList(gridData);\r\n \t\t\t\t\tfinal String[] columnList1 = Constants.EVENT_PARAMETERS_COLUMNS;\r\n \t\t\t\t\tfinal List<String> columnList = new ArrayList<String>();\r\n \t\t\t\t\tfor (final String element : columnList1)\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\tcolumnList.add(element);\r\n \t\t\t\t\t}\r\n \t\t\t\t\tAppUtility.setGridData(gridDataList, columnList, request);\r\n \t\t\t\t\trequest.setAttribute(\r\n \t\t\t\t\t\t\tedu.wustl.simplequery.global.Constants.SPREADSHEET_DATA_LIST,\r\n \t\t\t\t\t\t\tgridDataList);\r\n \t\t\t\t\tfinal Integer identifierFieldIndex = new Integer(0);\r\n \t\t\t\t\trequest.setAttribute(\"identifierFieldIndex\", identifierFieldIndex.intValue());\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tif (request.getAttribute(Constants.SPECIMEN_LABEL) == null)\r\n \t\t\t{\r\n \t\t\t\trequest.setAttribute(Constants.SPECIMEN_LABEL, specimenLabel);\r\n \t\t\t}\r\n \t\t\trequest.setAttribute(Constants.EVENT_PARAMETERS_LIST, new SOPBizLogic()\r\n \t\t\t\t\t.getAllSOPEventFormNames(dynamicEventMap));\r\n \t\t\trequest.getSession().setAttribute(\"dynamicEventMap\", dynamicEventMap);\r\n \r\n \t\t}\r\n \t\tcatch (final Exception e)\r\n \t\t{\r\n \t\t\tthis.logger.error(e.getMessage(), e);\r\n \t\t}\r\n \t\trequest.setAttribute(Constants.MENU_SELECTED, new String(\"15\"));\r\n \t\tString pageOf = (String) request.getParameter(Constants.PAGE_OF);\r\n \t\tif (pageOf == null)\r\n \t\t\tpageOf = (String) request.getAttribute(Constants.PAGE_OF);\r\n \t\trequest.setAttribute(Constants.PAGE_OF, pageOf);\r\n \r\n \t\tif (pageOf.equals(Constants.PAGE_OF_LIST_SPECIMEN_EVENT_PARAMETERS_CP_QUERY))\r\n \t\t{\r\n \t\t\trequest.getSession().setAttribute(\"CPQuery\", \"CPQuery\");\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\tif (request.getSession().getAttribute(\"CPQuery\") != null)\r\n \t\t\t{\r\n \t\t\t\trequest.getSession().removeAttribute(\"CPQuery\");\r\n \t\t\t}\r\n \t\t}\r\n \t\tLong specimenRecEntryEntityId = null;\r\n \t\ttry\r\n \t\t{\r\n \t\t\tif (CatissueCoreCacheManager.getInstance().getObjectFromCache(\r\n \t\t\t\t\tAnnotationConstants.SPECIMEN_REC_ENTRY_ENTITY_ID) != null)\r\n \t\t\t{\r\n \t\t\t\tspecimenRecEntryEntityId = (Long) CatissueCoreCacheManager.getInstance()\r\n \t\t\t\t\t\t.getObjectFromCache(AnnotationConstants.SPECIMEN_REC_ENTRY_ENTITY_ID);\r\n \t\t\t}\r\n \t\t\telse\r\n \t\t\t{\r\n \t\t\t\tspecimenRecEntryEntityId = AnnotationUtil\r\n \t\t\t\t\t\t.getEntityId(AnnotationConstants.ENTITY_NAME_SPECIMEN_REC_ENTRY);\r\n \t\t\t\tCatissueCoreCacheManager.getInstance().addObjectToCache(\r\n \t\t\t\t\t\tAnnotationConstants.SPECIMEN_REC_ENTRY_ENTITY_ID, specimenRecEntryEntityId);\r\n \t\t\t}\r\n \r\n \t\t}\r\n \t\tcatch (final Exception e)\r\n \t\t{\r\n \t\t\tthis.logger.error(e.getMessage(), e);\r\n \t\t}\r\n \t\t// request.setAttribute(\"specimenEntityId\", specimenEntityId);\r\n \t\trequest.setAttribute(AnnotationConstants.SPECIMEN_REC_ENTRY_ENTITY_ID,\r\n \t\t\t\tspecimenRecEntryEntityId);\r\n \t\treturn mapping.findForward(request.getParameter(Constants.PAGE_OF));\r\n \t}",
"@Override\r\n\tpublic void processAction(ActionRequest actionRequest,\r\n\t\t\tActionResponse actionResponse) throws IOException, PortletException {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tsuper.processAction(actionRequest, actionResponse);\r\n\t}",
"public Action getAction() {\n\treturn action;\n }",
"WebActionResponse processWebAction(String actionName, RequestContext rc) {\n WebActionHandlerRef webActionRef = webObjectRegistry.getWebActionHandlerRef(actionName);\n\n if (webActionRef == null) {\n throw new SnowException(Error.NO_WEB_ACTION, \"WebAction\", actionName);\n }\n\n // --------- Invoke Method --------- //\n Object result = null;\n try {\n result = methodInvoker.invokeWebHandler(webActionRef, rc);\n } catch (Throwable t) {\n throw Throwables.propagate(t);\n }\n // --------- /Invoke Method --------- //\n\n WebActionResponse response = new WebActionResponse(result);\n return response;\n }",
"public Action getAction() {\n return action;\n }",
"protected ActionForward performAction(ActionMapping mapping,\n ActionForm form, HttpServletRequest request,\n HttpServletResponse response) throws Exception {\n\n String forward = FWD_SUCCESS;\n request.setAttribute(ALLOW_EDITS_KEY, \"true\");\n request.setAttribute(PREVIOUS_DISABLED, \"false\");\n request.setAttribute(NEXT_DISABLED, \"false\");\n\n String id = request.getParameter(ID);\n \n if (StringUtil.isNullorNill(id) || \"0\".equals(id)) {\n isNew = true;\n } else {\n isNew = false;\n }\n \n BaseActionForm dynaForm = (BaseActionForm) form;\n \n ActionMessages errors = dynaForm.validate(mapping, request); \n if (errors != null && errors.size() > 0) {\n // System.out.println(\"Server side validation errors \"\n // + errors.toString());\n saveErrors(request, errors);\n // since we forward to jsp - not Action we don't need to repopulate\n // the lists here\n return mapping.findForward(FWD_FAIL);\n }\n \n String start = (String) request.getParameter(\"startingRecNo\");\n String direction = (String) request.getParameter(\"direction\");\n \n District district = new District();\n //get sysUserId from currentUserId\n district.setSysUserId(currentUserId); \n org.hibernate.Transaction tx = HibernateUtil.getSession().beginTransaction();\n \n // populate value holder from form\n PropertyUtils.copyProperties(district, dynaForm);\n // Get cityId from property \"selectedCityId\"\n String selectedCityId = PropertyUtils\n .getProperty(dynaForm, \"selectedCityId\").toString();\n // Get City object from cityId\n DictionaryDAO dictionaryDAO = new DictionaryDAOImpl();\n Dictionary city = new Dictionary();\n city = dictionaryDAO.getDataForId(selectedCityId);\n \n // Get DictrictEntry from districtName property from form\n String districtName = PropertyUtils\n .getProperty(dynaForm, \"districtName\").toString();\n \n DistrictDAO distDAO = new DistrictDAOImpl();\n \n List<Dictionary> districtEntry = distDAO.getDistrictsEntyByName(districtName);\n \n // Set some property for district\n district.setCity(city);\n district.setDescription(\"\");\n \n try {\n // Check DistrictEntry is already exists or not.\n if (districtEntry.size() == 0) {\n Dictionary newDistrictEntry = new Dictionary();\n newDistrictEntry.setDictEntry(districtName);\n DictionaryCategory dicCategory = new DictionaryCategory();\n DictionaryCategoryDAO dicCategoryDAO = \n new DictionaryCategoryDAOImpl();\n dicCategory = dicCategoryDAO\n .getDictionaryCategoryByName(\"districts\");\n newDistrictEntry.setDictionaryCategory(dicCategory);\n newDistrictEntry.setSysUserId(currentUserId);\n newDistrictEntry.setIsActive(\"Y\");\n dictionaryDAO.insertData(newDistrictEntry);\n district.setDistrictEntry(dictionaryDAO\n .getDictionaryByDictEntry(districtName));\n } else {\n district.setDistrictEntry(districtEntry.get(0));\n }\n if (!isNew) {\n // UPDATE\n distDAO.updateData(district);\n } else {\n // INSERT\n distDAO.insertData(district);\n }\n tx.commit();\n \n } catch (LIMSRuntimeException lre) {\n //bugzilla 2154\n LogEvent.logError(\"DistrictUpdateAction\", \"performAction()\",\n lre.toString());\n tx.rollback();\n errors = new ActionMessages();\n java.util.Locale locale = (java.util.Locale) request.getSession()\n .getAttribute(\"org.apache.struts.action.LOCALE\");\n ActionError error = null;\n if (lre.getException()\n instanceof org.hibernate.StaleObjectStateException) {\n // how can I get popup instead of struts error at the top of\n // page?\n // ActionMessages errors = dynaForm.validate(mapping, request);\n error = new ActionError(\"errors.OptimisticLockException\", null,\n null);\n } else {\n // bugzilla 1482\n if (lre.getException()\n instanceof LIMSDuplicateRecordException) {\n String messageKey = \"district.browse.title\";\n String msg = ResourceLocator.getInstance()\n .getMessageResources().getMessage(locale,\n messageKey);\n error = new ActionError(\"errors.DuplicateRecord\",\n msg, null);\n\n } else {\n error = new ActionError(\"errors.UpdateException\", null,\n null);\n }\n }\n errors.add(ActionMessages.GLOBAL_MESSAGE, error);\n saveErrors(request, errors);\n request.setAttribute(Globals.ERROR_KEY, errors);\n //bugzilla 1485: allow change and try updating again \n //enable save button & disable previous and next\n request.setAttribute(PREVIOUS_DISABLED, \"true\");\n request.setAttribute(NEXT_DISABLED, \"true\");\n forward = FWD_FAIL;\n\n } finally {\n HibernateUtil.closeSession();\n }\n \n if (forward.equals(FWD_FAIL)) {\n return mapping.findForward(forward);\n }\n // initialize the form\n dynaForm.initialize(mapping);\n // repopulate the form from valueholder\n PropertyUtils.copyProperties(dynaForm, district);\n if (\"true\".equalsIgnoreCase(request.getParameter(\"close\"))) {\n forward = FWD_CLOSE;\n }\n\n if (district.getId() != null && !district.getId().equals(\"0\")) {\n request.setAttribute(ID, district.getId());\n\n }\n\n //bugzilla 1400\n if (isNew) {\n forward = FWD_SUCCESS_INSERT;\n }\n //bugzilla 1467 added direction for redirect to NextPreviousAction\n return getForward(mapping.findForward(forward), id, start, direction);\n \n }",
"@Override\n\tpublic void processAction(ActionRequest actionRequest, ActionResponse actionResponse)\n\t\t\tthrows IOException, PortletException {\n\t\tsuper.processAction(actionRequest, actionResponse);\n\t}",
"public ActionForward executeAction(ActionMapping aMapping,\r\n ActionForm aForm,\r\n HttpServletRequest aRequest,\r\n HttpServletResponse aResponse) throws Exception {\r\n\t\t\r\n\t\t// local declarations...\r\n\t\tProfileForm form;\r\n\t\tHttpSession httpSession;\r\n\t\tPlayerDAO player;\r\n\t\t\r\n\t\t// get the session...\r\n\t\thttpSession = aRequest.getSession();\r\n\t\t\r\n\t\t// down-cast the action form...\r\n\t\tform = (ProfileForm)aForm;\t\r\n\t\t\r\n\t\t// clear the form...\r\n\t\tform.clear();\r\n\t\t\r\n\t\t// set ctx-indicator...\r\n\t\tform.setCreateNewAccount(false);\r\n\t\tform.setEditProfile(true);\r\n\t\t\r\n\t\t// init the form bean...\r\n\t\tform.init(getUtil(), aRequest, player = NewUtil.getPlayer(aRequest));\r\n\t\t\r\n\t\t// put the calendar months into the session...\r\n\t\tSessionUtils.addToSession(httpSession, getDAOUtils().getMonths(\r\n\t\t\t\tgetLocale(aRequest)), AttributeKeyConstants.CALENDAR_MONTHS);\r\n\t\t\t\t\t\r\n\t\t// refresh lookup-objects on the form bean so the descriptions are\r\n\t\t// available to display on the next screen...\r\n\t\tform.loadObjects(getDAOUtils(), getLocale(aRequest));\r\n\t\tif (player.getCourse() != null) {\r\n\t\t\tform.setHomeCourseDescription(player.getCourse().getDescription());\r\n\t\t}\r\n\t\t\r\n\t\t// return success...\r\n\t\treturn aMapping.findForward(WebConstants.SUCCESS);\r\n\t}",
"public AccessibleAction getAccessibleAction() {\n return this;\n }",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n //processRequest(request, response);\r\n String forward=\"\";\r\n String action = request.getParameter(\"action\");\r\n\r\n forward = \"/createLocacao.jsp\";\r\n\r\n RequestDispatcher view = request.getRequestDispatcher(forward);\r\n view.forward(request, response);\r\n }",
"protected void doProcess(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\trequest.setCharacterEncoding(\"utf-8\");\r\n\t\tString requestURI = request.getRequestURI();\r\n\t\tString contextPath = request.getContextPath();\r\n\t\tString command = requestURI.substring(contextPath.length());\r\n\t\tAction action = null;\r\n\t\tActionForward forward = null;\r\n\t\t\r\n\t\tif (command.equals(\"/managerLogin.ma\")) {\r\n\t\t\taction = new ManagerLogInAction();\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tforward = action.execute(request, response);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (command.equals(\"/managerLogOut.ma\")) {\r\n\t\t\taction = new ManagerLogOutAction();\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tforward = action.execute(request, response);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (command.equals(\"/memberList.ma\")) {\r\n\t\t\taction = new MemberListAction();\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tforward = action.execute(request, response);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (command.equals(\"/managerDelete.ma\")) {\r\n\t\t\taction = new ManagerDeleteFromMemberAction();\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tforward = action.execute(request, response);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\r\n\t\tif (forward != null) {\r\n\t\t\tif (forward.isRedirect()) {\r\n\t\t\t\tresponse.sendRedirect(forward.getPath());\r\n\t\t\t} else {\r\n\t\t\t\tRequestDispatcher dispatcher = request.getRequestDispatcher(forward.getPath());\r\n\t\t\t\tdispatcher.forward(request, response);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n\tpublic ActionForWard execute(HttpServletRequest request) {\n\t\trequest.setAttribute(\"member\",MemberDao.selectMember());\n\t\treturn new ActionForWard(path,redirect);\n\t}",
"public T caseAction(Action object) {\n\t\treturn null;\n\t}",
"@SustainScreen(name = \"Rule Index\", description = \"Index of all business rules in the system\", module = SustainModule.RULE)\n public ActionForward doExecute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) {\n return onSearch(mapping, form, request, response);\n }",
"public ActionForward execute(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows Exception {\r\n\t\tif (isCancelled(request)) {\r\n\t\t\tActionForward af = cancelled(mapping, form, request, response);\r\n\r\n\t\t\tif (af != null) {\r\n\t\t\t\treturn af;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tMessageResources resources = getResources(request);\r\n\r\n\t\t// Identify the localized message for the cancel button\r\n\t\tString edit = resources.getMessage(Locale.ENGLISH, \"button.edit\")\r\n\t\t\t\t.toLowerCase();\r\n\t\tString save = resources.getMessage(Locale.ENGLISH, \"button.save\")\r\n\t\t\t\t.toLowerCase();\r\n\t\tString search = resources.getMessage(Locale.ENGLISH, \"button.search\")\r\n\t\t\t\t.toLowerCase();\r\n\t\tString view = resources.getMessage(Locale.ENGLISH, \"button.view\")\r\n\t\t\t\t.toLowerCase();\r\n\t\tString[] rules = { edit, save, search, view };\r\n\r\n\t\t// Identify the request parameter containing the method name\r\n\t\t// 得到字符串method,制定变量method中存放的是方法名称\r\n\t\tString parameter = mapping.getParameter();\r\n\r\n\t\t// don't set keyName unless it's defined on the action-mapping\r\n\t\t// no keyName -> unspecified will be called\r\n\t\tString keyName = null;\r\n\r\n\t\tif (parameter != null) {\r\n\t\t\t// 从变量method中取出方法名\r\n\t\t\tkeyName = request.getParameter(parameter);\r\n\t\t}\r\n\r\n\t\tif ((keyName == null) || (keyName.length() == 0)) {\r\n\t\t\tfor (int i = 0; i < rules.length; i++) {\r\n\t\t\t\t// apply the rules for automatically appending the method name\r\n\t\t\t\t// 根据请求路径中的信息,来选择处理方法。\r\n\t\t\t\tif (request.getServletPath().indexOf(rules[i]) > -1) {\r\n\t\t\t\t\treturn dispatchMethod(mapping, form, request, response,\r\n\t\t\t\t\t\t\trules[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn this.unspecified(mapping, form, request, response);\r\n\t\t}\r\n\r\n\t\t// Identify the string to lookup\r\n\t\tString methodName = getMethodName(mapping, form, request, response,\r\n\t\t\t\tparameter);\r\n\r\n\t\treturn dispatchMethod(mapping, form, request, response, methodName);\r\n\t}",
"void determineNextAction();",
"public Class getActionClass() {\n return actionClass;\n }",
"@Override\n public void processAction(ActionRequest actionRequest, ActionResponse actionResponse) throws PortletException,\n IOException {\n StringWriter writer = new StringWriter();\n\n // output the parameters on the Action request -\n\n writer.write(HTMLUtil.HR_TAG);\n HTMLUtil.writeMapCompact(writer, PortletRequest.ACTION_PHASE, \"publicParameterMap\",\n actionRequest.getPublicParameterMap());\n writer.write(HTMLUtil.HR_TAG);\n HTMLUtil.writeMapCompact(writer, PortletRequest.ACTION_PHASE, \"privateParameterMap\",\n actionRequest.getPrivateParameterMap());\n writer.write(HTMLUtil.HR_TAG);\n HTMLUtil.writeMapCompact(writer, PortletRequest.ACTION_PHASE, \"parameterMap\", actionRequest.getParameterMap());\n writer.write(HTMLUtil.HR_TAG);\n\n String writtenStuff = writer.toString();\n actionRequest.getPortletSession().setAttribute(\"ActionString\", writtenStuff);\n }",
"public interface Action {\r\n\r\n /**\r\n * Execute the Action based on http request and response\r\n *\r\n * @param req the request\r\n * @param res the response\r\n * @return the jsp page to redirect the user\r\n */\r\n String execute(HttpServletRequest req, HttpServletResponse res);\r\n}",
"Collection<? extends Action> getHas_action();",
"public ActionForward execute(ActionMapping mapping, ActionForm form,\n\t\t\tHttpServletRequest request, HttpServletResponse response) {\n\t\tAllSearchWorkForm allSearchWorkForm = (AllSearchWorkForm) form;// TODO Auto-generated method stub\n\t\t\n\t\t// 得到搜索的条件\n\t\tString name = allSearchWorkForm.getName();\n\t\tString beginTime = allSearchWorkForm.getBeginTime();\n\t\tString endTime = allSearchWorkForm.getEndTime();\n\t\tString complete = allSearchWorkForm.getComplete();\n\t\t// 中文转码\n\t\ttry {\n\t\t\tname = URLEncoder.encode(name, \"UTF-8\");\n\t\t\tbeginTime = URLEncoder.encode(beginTime, \"UTF-8\");\n\t\t\tendTime = URLEncoder.encode(endTime,\"UTF-8\");\n\t\t\tSystem.out.println(\"name:\"+name);\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn mapping.findForward(\"SearchWork.succeed\");\n\t\t}\n\t\t\n\t\t// 带参数的页面跳转\n\t\tActionRedirect redirect = new ActionRedirect(mapping.findForward(\"SearchWork.succeed\"));\n\t\tredirect.addParameter(\"name\",name);\n\t\tredirect.addParameter(\"begin\", beginTime);\n\t\tredirect.addParameter(\"end\", endTime);\n\t\tredirect.addParameter(\"complete\", complete);\n\t\tredirect.addParameter(\"page\", 1);\n\t\treturn redirect;\n\t}",
"public Optional<Action> delegateToHandler(Action action, ModelStateProvider modelStateProvider) {\n\t\tActionHandler handler = actionHandlers.get(action.getKind());\n\t\tif (handler != null) {\n\t\t\thandler.setModelStateProvider(modelStateProvider);\n\t\t\treturn handler.handle(action);\n\t\t}\n\t\treturn Optional.empty();\n\t}",
"public ActionForward execute(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response)\r\n\t\tthrows Exception {\r\n\t\t//DataSource ds = (DataSource) getDataSource(request, \"dbaccounting\");\r\n\t\t//Connection conn = null;\r\n\t\tBankReconcileForm bankReconcileForm = (BankReconcileForm) form;\r\n\t\tActionForward forward = null;\r\n\t\tString action = mapping.getParameter();\r\n\t\tHttpSession session = request.getSession();\r\n\t\tUsers users = (Users)session.getAttribute(CommonConstants.USER);\r\n\t\tSet lst = (Set)session.getAttribute(CommonConstants.VIEWACCESS);\r\n\t\t\tif (users!=null) {\r\n\t\t\t\tif (CommonUtil.isHasRoleAccess(lst,request.getServletPath())) {\r\n\t\t\t\t\trequest.setAttribute(\"VIEWS\",lst);\r\n\t\t\t\t\tif (\"\".equalsIgnoreCase(action)) {\r\n\t\t\t\t\t\tforward = mapping.findForward(\"home\");\r\n\t\t\t\t\t} else if (\"LIST\".equalsIgnoreCase(action)) {\r\n\t\t\t\t\t\tforward = performPartialList(mapping, form, request, response);\r\n\t\t\t\t\t} else if (\"FORM\".equalsIgnoreCase(action)) {\r\n\t\t\t\t\t\tforward = performForm(mapping, form, request, response);\r\n\t\t\t\t\t} else if (\"SAVE\".equalsIgnoreCase(action)) {\r\n\t\t\t\t\t\tif (bankReconcileForm.getString(\"subaction\")!=null && bankReconcileForm.getString(\"subaction\").length()>0 && bankReconcileForm.getString(\"subaction\").equalsIgnoreCase(\"refresh\")) {\r\n\t\t\t\t\t\t\tforward = performForm(mapping, form, request, response);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tforward = performSave(mapping, form, request, response);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (\"DETAIL\".equalsIgnoreCase(action)) { \r\n\t\t\t\t\t\tforward = performDetail(mapping, form, request, response);\r\n\t\t\t\t\t} else if (\"DELETE\".equalsIgnoreCase(action)) {\r\n\t\t\t\t\t\tforward = performDelete(mapping, form, request, response);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn forward;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tActionMessages errors = new ActionMessages();\r\n\t\t\t\t\terrors.add(ActionMessages.GLOBAL_MESSAGE,new ActionMessage(\"error.privilage\",request.getContextPath()+mapping.getPath()));\r\n\t\t\t\t\tsaveMessages(request,errors);\t\t\t\t\r\n\t\t\t\t\treturn mapping.findForward(\"home\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\treturn mapping.findForward(\"index\");\r\n\t\t\t}\r\n\t}",
"public void processAction(CIDAction action);",
"public Action newAction(Object key) {\n\t\tif (key == null)\n\t\t\tthrow new IllegalArgumentException(\"No legal key passed!\");\n\t\tif (super.containsKey(key))\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"Allready kontains a mapping for that key!\");\n\t\tAction action = new ActionForward();\n\t\tsuper.put(key, action);\n\t\tactionList.add(action);\n\t\treturn action;\n\t}",
"public final java_cup.runtime.Symbol CUP$Asintactico$do_action(\n int CUP$Asintactico$act_num,\n java_cup.runtime.lr_parser CUP$Asintactico$parser,\n java.util.Stack CUP$Asintactico$stack,\n int CUP$Asintactico$top)\n throws java.lang.Exception\n {\n /* select the action handler based on the action number */\n switch (CUP$Asintactico$act_num/300)\n {\n /*. . . . . . . . 0 < #action < 300. . . . . . . . . . . .*/\n case 0: \n return CUP$Asintactico$do_action_part00000000(\n CUP$Asintactico$act_num,\n CUP$Asintactico$parser,\n CUP$Asintactico$stack,\n CUP$Asintactico$top);\n /*. . . . . . . . 300 < #action < 600. . . . . . . . . . . .*/\n case 1: \n return CUP$Asintactico$do_action_part00000001(\n CUP$Asintactico$act_num,\n CUP$Asintactico$parser,\n CUP$Asintactico$stack,\n CUP$Asintactico$top);\n /* . . . no valid action number: . . .*/\n default:\n throw new Exception(\"Invalid action number found in internal parse table\");\n\n } /* end of switch */\n }",
"public ActionForward execute(ActionMapping actionMapping,\r\n\t\t\tActionForm actionForm, HttpServletRequest httpServletRequest,\r\n\t\t\tHttpServletResponse httpServletResponse) {\r\n\r\n\t\t// Mudar isso quando tiver esquema de segurança\r\n\t\tHttpSession sessao = httpServletRequest.getSession(false);\r\n\r\n\t\t// Seta o mapeamento de retorno\r\n\t\tActionForward retorno = actionMapping.findForward(\"inserirMotivoNaoGeracaoCobrancaResultado\");\r\n\r\n\t\t// Obtém a instância da fachada\r\n\t\tFachada fachada = Fachada.getInstancia();\r\n\r\n\t\tInserirMotivoNaoGeracaoCobrancaResultadoActionForm form = (InserirMotivoNaoGeracaoCobrancaResultadoActionForm) actionForm;\r\n\t\tform.setIndicadorUso(ConstantesSistema.SIM+\"\");\r\n\r\n\t\t \r\n\t\tif ((httpServletRequest.getParameter(\"desfazer\") != null && httpServletRequest\r\n\t\t\t\t.getParameter(\"desfazer\").equalsIgnoreCase(\"S\"))) {\r\n\t\t\t\r\n\r\n\t\t\tform.setDescricao(\"\");\r\n\r\n\t\t\tif (form.getDescricao() == null\r\n\t\t\t\t\t|| form.getDescricao().equals(\"\")) {\r\n\r\n\t\t\t\tCollection colecaoPesquisa = null;\r\n\r\n\t\t\t\tFiltroMotivoNaoGeracaoCobrancaResultado filtroMotivo = new FiltroMotivoNaoGeracaoCobrancaResultado();\r\n\r\n\t\t\t\tfiltroMotivo.setCampoOrderBy(FiltroMotivoNaoGeracaoCobrancaResultado.DESCRICAO);\r\n\r\n\t\t\t\tcolecaoPesquisa = fachada.pesquisar(filtroMotivo,\r\n\t\t\t\t\t\tMotivoNaoGeracaoCobrancaResultado.class.getName());\r\n\r\n\t\t\t\tif (colecaoPesquisa == null || colecaoPesquisa.isEmpty()) {\r\n\t\t\t\t\tthrow new ActionServletException(\r\n\t\t\t\t\t\t\t\"atencao.pesquisa.nenhum_registro_tabela\", null,\r\n\t\t\t\t\t\t\t\"Motivo de Corte\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsessao.setAttribute(\"colecaoMotivoCorte\", colecaoPesquisa);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Coleção de Motivo Nao Geracao Cobranca Resultado\r\n\t\t\t\tFiltroMotivoNaoGeracaoCobrancaResultado filtroMotivoCombrancao = new FiltroMotivoNaoGeracaoCobrancaResultado();\r\n\t\t\t\tfiltroMotivoCombrancao.setCampoOrderBy(FiltroMotivoNaoGeracaoCobrancaResultado.ID);\r\n\r\n\t\t\t\tCollection colecaoMotivoCombracaResultado = fachada.pesquisar(filtroMotivoCombrancao,\r\n\t\t\t\t\t\tMotivoCorte.class.getName());\r\n\t\t\t\tsessao.setAttribute(\"colecaoMotivoCombracaResultado\", colecaoMotivoCombracaResultado);\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t\r\n\t\treturn retorno;\r\n\t\r\n\t}",
"public SoHandleEventAction getAction() { return eventAction; }",
"public interface Action {\n String execute(HttpServletRequest request);\n}",
"protected Class<? extends ActionStd<S>> getActionClassHook() {\n\t\treturn null;\r\n\t}",
"@Override\n public Action getAction(Actor actor, GameMap map) {\n Location currentLocation = map.locationOf(actor);\n target = getLocation(currentLocation, map);\n\n if (actor.getDisplayChar() == 'P' || actor.getDisplayChar() == 'p') {\n\n }\n\n if (target != null && adjacent(actor, target, map)) {\n return new AttackAction(target);\n }\n\n return super.getAction(actor, map);\n }",
"public ActionDefinition isAction(String name){\n return((ActionDefinition)actionDefs.get(getDefName(name)));\n }",
"public void executeAction( String actionInfo );",
"private ActionProxy prepareActionProxy() throws Exception {\r\n ActionProxy proxy = getActionProxy(\"/mockGetDocumentFileContestAction\");\r\n assertTrue(\"action is of wrong type\", proxy.getAction() instanceof GetDocumentFileContestAction);\r\n\r\n TestHelper.injectSessionMapIntoProxy(proxy);\r\n\r\n return proxy;\r\n }",
"public GameAction runTurnAction() {\r\n // Is the game over? If so return\r\n if (this.isGameOver) {\r\n return this.currentAction;\r\n }\r\n \r\n // Get the next game action for this turn\r\n GameAction currentTurnAction = this.turnActions.get(turnActionLocation);\r\n \r\n // Clear out the return values for this gameAction\r\n currentTurnAction.clearActionReturnValues();\r\n \r\n // Set the currentAction (used for setting return values)\r\n this.currentAction = currentTurnAction;\r\n \r\n // Process the next action for this turn\r\n this.processGameAction(currentTurnAction);\r\n \r\n // Increment the turn action location or loop back to 0\r\n this.turnActionLocation++;\r\n \r\n // Check to make sure we haven't gone over the turn list size\r\n if (this.turnActionLocation >= this.turnActions.size()) {\r\n turnActionLocation = 0;\r\n }\r\n\r\n // Return any necessary values to the caller as a gameAction\r\n return currentTurnAction;\r\n }",
"@Override\r\n\tpublic ReplyObject executePortletActionUsing(String action, SessionInfo sessionInfo, ActionMap actionMap,\r\n\t\t\tMap requestParams, HttpServletRequest request) throws OrbiActionException\r\n\t{\r\n\t\tReplyObject reply = null;\r\n\t\ttry\r\n\t\t{\r\n\r\n\t\t\tif (LoginMasterConstants.UPDATE_PREFERENCE.equals(action))\r\n\t\t\t{\r\n\t\t\t\tMap currentPrefData = getCurrentPreferences(sessionInfo);\r\n\t\t\t\trequestParams.put(\"CURRENT_PREF_DATA\", currentPrefData);\r\n\t\t\t\tif (\"N\".equals(requestParams.get(\"TEMP_UPDATE_PREFERENCE_IND\")))\r\n\t\t\t\t{\r\n\t\t\t\t\treply = executeHostRequest(sessionInfo, actionMap.getHostCode(), requestParams, request);\r\n\t\t\t\t\tif (reply.sErrTxn == null || reply.sErrTxn.length == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tCacheManager cacheManager = CacheManager.getFWInstance();\r\n\t\t\t\t\t\tcacheManager.invalidateCache(request.getSession(), FrameworkConstants.WORKSPACE_META_DATA);\r\n\t\t\t\t\t\tupdatePreferenceInSession(sessionInfo, (List) requestParams.get(\"PREFERENCE_TYPE\"),\r\n\t\t\t\t\t\t\t\t(List) requestParams.get(\"PREFERENCE_VALUES\"), false);\r\n\t\t\t\t\t} else\r\n\t\t\t\t\t\treturn reply;\r\n\t\t\t\t} else\r\n\t\t\t\t{\r\n\t\t\t\t\tCacheManager cacheManager = CacheManager.getFWInstance();\r\n\t\t\t\t\tcacheManager.invalidateCache(request.getSession(), FrameworkConstants.WORKSPACE_META_DATA);\r\n\t\t\t\t\tupdatePreferenceInSession(sessionInfo, (List) requestParams.get(\"PREFERENCE_TYPE\"),\r\n\t\t\t\t\t\t\t(List) requestParams.get(\"PREFERENCE_VALUES\"), true);\r\n\t\t\t\t\treply = executeHostRequest(sessionInfo, actionMap.getHostCode(), requestParams, request);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/**\r\n\t\t\t\t * Convert the header map from reply object and add it to reply object as JSON string.\r\n\t\t\t\t * */\r\n\t\t\t\tJSONObjectBuilderForExtJs.buildFormResultMap(reply);\r\n\r\n\t\t\t} else if (LoginMasterConstants.GET_USER_PREF.equals(action))\r\n\t\t\t{\r\n\t\t\t\treply = executeHostRequest(sessionInfo, actionMap.getHostCode(), requestParams, request);\r\n\r\n\t\t\t} else if (LoginMasterConstants.ACTIVE_TOKEN.equals(action))\r\n\t\t\t{\r\n\t\t\t\treply = extendSession(request);\r\n\t\t\t}\r\n\t\t} catch (ProcessingErrorException procExcep)\r\n\t\t{\r\n\r\n\t\t\tthrow new OrbiActionException(FrameworkConstants.ERROR_SYSTEM_ERROR,\r\n\t\t\t\t\t\"Received processing error while handling action - '\" + action + \"in User Preference action\",\r\n\t\t\t\t\tprocExcep);\r\n\t\t}\r\n\t\treturn reply;\r\n\t}",
"public ActionForward perform(ActionMapping mapping, ActionForm form,\n\t\t\tHttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows IOException, ServletException {\n\t\tif (!checkUser(request))\n\t\t\treturn (mapping.findForward(\"errorUserIon\"));\n\n\t\t// check if this action is allowed\n\t\ttry {\n\t\t\tMapping.begin();\n\t\t\tif (!new SecurityManagerImpl().canAdminSecurity(User.getInstance(request.getSession().getAttribute(\"userLogin\")+ \"\"))) {\n\t\t\t\tthrow new Exception();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tMapping.rollback();\n\t\t\tLogger.getInstance().error(e.getMessage(), CreateUserAction.class,e);\n\t\t\treturn (mapping.findForward(\"errorSecurityIon\"));\n\t\t} finally {\n\t\t\tMapping.rollback();\n\t\t}\n\n\t\tUser currentUser = null;\n\t\ttry {\n\t\t\tcurrentUser = getCurrentUser(request);\n\t\t} catch (MappingException e) {\n\t\t\tMapping.rollback();\n\t\t\tLogger.getInstance().error(e.getMessage(), EditUserAction.class,e);\n\t\t\treturn (mapping.findForward(\"errorSecurityIon\"));\n\t\t} finally {\n\t\t\tMapping.rollback();\n\t\t}\n\t\tboolean isSuperAdmin = isSuperAdmin(request);\n\n\t\t// get the form\n\t\tCreateUserForm sform = (CreateUserForm) form;\n\t\tActionErrors errors = sform.myValidate(request);\n\n\t\t// user need cancel\n\t\tif (request.getParameter(\"cancel\") != null) {\n\t\t\t// Forward to the next page\n\t\t\treturn (mapping.findForward(\"cancel\"));\n\t\t}\n\n\t\ttry {\n\t\t\tVector groups = null;\n\t\t\tMapping.begin();\n\t\t\tif (isSuperAdmin) {\n\t\t\t\tgroups = Group.listAll();\n\t\t\t} else {\n\t\t\t\tgroups = currentUser.listGroups();\n\t\t\t}\n\t\t\tMapping.rollback();\n\t\t\trequest.setAttribute(\"groups\", groups);\n\t\t} catch (Exception e) {\n\t\t\tLogger.getInstance().error(e.getMessage(), CreateUserAction.class,e);\n\t\t\treturn (mapping.findForward(\"errorIon\"));\n\t\t} finally {\n\t\t\tMapping.rollback();\n\t\t}\n\n\t\t// fill data | first time\n\t\tif (sform.getName() == null) {\n\t\t\t// Forward to the view page\n\t\t\treturn (mapping.findForward(\"view\"));\n\t\t}\n\n\t\t// fill data | errors\n\t\tif (errors.size() > 0) {\n\t\t\trequest.setAttribute(ERROR_KEY, errors);\n\t\t\t// Forward to the view page\n\t\t\treturn (mapping.findForward(\"view\"));\n\t\t}\n\n\t\t// all it's ok : update user\n\t\ttry {\n\t\t\t// creation user os\n\t\t\tString userLogin=sform.getLogin();\n\n\t\t\tMapping.begin();\n\t\t\tUser user = null;\n\t\t\ttry {\n\t\t\t\tuser = User.getInstance(userLogin);\n\t\t\t} catch (MappingException e) {\n\t\t\t\tLogger.getInstance().error(\"Test effectué que l'utilisateur n'existe pas\", CreateUserAction.class,e);\n\t\t\t}\n\t\t\tif (user !=null) {// existe déjà\n\t\t\t\tthrow new StandardException(\"L'utilisateur n'existe déjà avec le login \" + userLogin);\n\t\t\t}\n\n\t\t\tuser = User.create(userLogin);\n\t\t\tuser.setMetaData(\"name\", sform.getName());\n\t\t\tuser.setMetaData(\"email\", sform.getEmail());\n\t\t\tuser.setMetaData(\"active\", sform.getActive());\n\n\t\t\tuser.setPassword(org.nextime.ion.commons.Authenticator.createPassword(sform.getPassword()));\n\t\t\tuser.resetGroups();\n\t\t\tif (sform.getGroups() != null) {\n\t\t\t\tfor (int i = 0; i < sform.getGroups().length; i++) {\n\t\t\t\t\tGroup group = Group.getInstance(sform.getGroups()[i]);\n\t\t\t\t\tuser.addGroup(group);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tMapping.commit();\n\n\t\t} catch (StandardException e) {\n\t\t\t// message\n\t\t\terrors = new ActionErrors();\n\t\t\tActionError error = new ActionError(\"error.createUser.userExisted\");\n\t\t\terrors.add(\"login\", error);\n\t\t\trequest.setAttribute(ERROR_KEY, errors);\n\t\t\tLogger.getInstance().error(e.getMessage(), CreateUserAction.class,e);\n\t\t\treturn (mapping.findForward(\"view\"));\n\t\t}\n\t\tcatch (MappingException e) {\n\t\t\tMapping.rollback();\n\t\t\tLogger.getInstance().error(e.getMessage(), CreateUserAction.class,e);\n\t\t\treturn (mapping.findForward(\"errorIon\"));\n\t\t} finally {\n\t\t\tMapping.rollback();\n\t\t}\n\n\t// Forward to the next page\n\t\treturn (mapping.findForward(\"ok\"));\n\t}",
"public ActionForward execute(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response) throws Exception {\n //forward name\n final String EDIT_USER_PAGE = \"edituser\";\n final String SEARCH_USER_PAGE = \"searchuser\";\n //button action\n final String MORE_INFO = \"moreinfo\";\n final String SEARCH = \"search\";\n final String BUTTON_VALUE = \"buttonValue\";\n //request parameter\n final String USER_LIST = \"userList\";\n final String USER = \"user\";\n final String USER_BEAN = \"suBean\";\n final String MATCH_ONLY = \"match\";\n final String STARTS_WITH = \"starts\";\n final String VIEW = \"view\";\n final String VIEW_MODE_READONLY = \"3\";\n final String VIEW_MODE_EDIT = \"1\";\n final String DATE_FORMAT = \"MM/dd/yyyy\";\n UserManagementForm userManagementForm = (UserManagementForm) form;// TODO Auto-generated method stub\\\n String loginName = userManagementForm.getLoginName();\n HttpSession session = request.getSession();\n String userCreatedDate = userManagementForm.getTxtCal();\n String firstName = userManagementForm.getFirstName();\n String lastName = userManagementForm.getLastName();\n String roleName = userManagementForm.getRoleName();\n String status = userManagementForm.getUserStatus();\n String limit = CommonUtils.isNotEmpty(userManagementForm.getLimit()) ? userManagementForm.getLimit() : \"100\";\n String match = userManagementForm.getMatch();\n String buttonValue = userManagementForm.getButtonValue();\n String forwardName = SEARCH_USER_PAGE;\n UserDAO userDAO = new UserDAO();\n User user = null;\n SearchUserBean suBean = new SearchUserBean();\n suBean.setLoginName(loginName);\n suBean.setTxtCal(userCreatedDate);\n suBean.setFirstName(firstName);\n suBean.setLastName(lastName);\n suBean.setRoleName(roleName);\n suBean.setUserStatus(status);\n suBean.setLimit(limit);\n suBean.setSortBy(userManagementForm.getSortBy());\n suBean.setColumnName(userManagementForm.getColumnName());\n\n suBean.setMatch(!CommonUtils.isEmpty(match) ? match : STARTS_WITH);\n session.setAttribute(\"suBean\", suBean);\n// if (SEARCH.equals(buttonValue)) {\n// Date date = null;\n// if (CommonUtils.isNotEmpty(userCreatedDate)) {\n// date = DateUtils.parseDate(userCreatedDate, DATE_FORMAT);\n// }\n// if (match.equals(MATCH_ONLY)) {\n// List userList = userDAO.findForManagement(loginName, date, firstName, lastName, roleName);\n// session.setAttribute(USER_LIST, userList);\n// } else if (match.equals(STARTS_WITH)) {\n// List userList = userDAO.findForManagementaction(loginName, date, firstName, lastName, roleName);\n// session.setAttribute(USER_LIST, userList);\n// }\n// forwardName = SEARCH_USER_PAGE;\n// } else\n\n if (CommonConstants.EDIT_ACTION.equals(buttonValue)) {\n forwardName = EDIT_USER_PAGE;\n user = userDAO.findById(userManagementForm.getParam());\n session.setAttribute(USER, user);\n request.setAttribute(\"agentInformation\", new UserDAO().findByUserAgentProperty(\"userId.userId\", user.getUserId()));\n request.setAttribute(\"match\", match);\n session.setAttribute(VIEW, VIEW_MODE_EDIT);\n } else if (MORE_INFO.equals(buttonValue)) {\n user = userDAO.findById(userManagementForm.getParam());\n request.setAttribute(VIEW, VIEW_MODE_READONLY);\n session.setAttribute(USER, user);\n forwardName = EDIT_USER_PAGE;\n } else {\n DBUtil dbUtil = new DBUtil();\n request.setAttribute(\"userList\", new UserDAO().getUserList(suBean));\n request.setAttribute(\"statuslist\", dbUtil.getStatusList());\n request.setAttribute(\"rolelist\", dbUtil.getRoleList());\n forwardName = SEARCH_USER_PAGE;\n //session.setAttribute(USER_LIST,userDAO.findAllUsers());\n }\n request.setAttribute(BUTTON_VALUE, buttonValue);\n request.setAttribute(\"palletList\", userDAO.getPalletList());\n request.setAttribute(\"packageList\", userDAO.getPackageList());\n return mapping.findForward(forwardName);\n }",
"public ActionForward execute(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response) throws Exception {\n // TODO Auto-generated method stub\n String forwardName = \"\";\n HttpSession session = ((HttpServletRequest) request).getSession(false);\n EditSearchCityForm searchform = (EditSearchCityForm) form;\n String buttonValue = searchform.getButtonValue();\n UnLocationDAO unLocationDAO = new UnLocationDAO();\n\n CitySelectionBean cbs = new CitySelectionBean();\n if (request.getParameter(\"index\") != null) {\n int ind = Integer.parseInt(request.getParameter(\"index\"));\n List cityList = (List) session.getAttribute(\"cityDetails\");\n CitySelectionBean citySelBean = (CitySelectionBean) cityList.get(ind);\n UnLocation unLoc = citySelBean.getUnloaction();\n RefTerminal terminal = null;\n if (session.getAttribute(\"terminal\") == null) {\n terminal = new RefTerminal();\n } else {\n terminal = (RefTerminal) session.getAttribute(\"terminal\");\n }\n terminal.setCountry(unLoc.getCountryId());\n terminal.setState(unLoc.getStateId().getCodedesc());\n\n terminal.setUnLocation(unLoc);\n request.setAttribute(\"buttonValue\", \"completed\");\n session.removeAttribute(\"cityDetails\");\n }\n if (buttonValue != null && buttonValue.equals(\"search\")) {\n\n List city = unLocationDAO.findbyCity(request.getParameter(\"city\"));\n List cityDetails = cbs.getCityDetails(city);\n session.setAttribute(\"cityDetails\", cityDetails);\n\n }\n return mapping.findForward(\"EditSearchpopup\");\n }",
"private void checkSessionAction(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\treq.getRequestDispatcher(\"/jsps/manage/index.jsp\").forward(req, resp);\r\n\t}",
"public void action() {\n action.action();\n }",
"@NonNull\n public Action getAction() {\n return this.action;\n }",
"public ActionForward execute(ActionMapping actionMapping,\n\t\t\tActionForm actionForm, HttpServletRequest httpServletRequest,\n\t\t\tHttpServletResponse httpServletResponse) {\n\t\tActionForward retorno = actionMapping.findForward(\"telaSucesso\");\n\t\t\n\t\tretorno.getName();\n\t\t\n\t\tIntegracaoComercialHelper helper = new IntegracaoComercialHelper();\n\t\t\n\t\tHttpSession sessao = httpServletRequest.getSession(false);\n\t\t\n\t\tUsuario usuarioLogado = (Usuario) sessao.getAttribute(\"usuarioLogado\");\n\n\t\tAlterarTipoCorteActionForm form = (AlterarTipoCorteActionForm) actionForm;\n\n\t\tFachada fachada = Fachada.getInstancia();\n\t\t\n\t\tif(form.getIdOrdemServico()!=null && !form.getIdOrdemServico().equals(\"\")){\n\t\t\n\t\t\tif (sessao.getAttribute(\"ordemServico\") != null) {\n\t\t\t\t\n\t\t\t\t//pesquisa Ligacao agua\n\t\t\t\tFiltroLigacaoAgua filtroLigacaoAgua = new FiltroLigacaoAgua();\n\t\t\t\tfiltroLigacaoAgua.adicionarParametro(new ParametroSimples(\n\t\t\t\t\t\tFiltroLigacaoAgua.ID, form.getMatriculaImovel()));\n\t\t\t\t\n\t\t\t\tfiltroLigacaoAgua.adicionarCaminhoParaCarregamentoEntidade(FiltroLigacaoAgua.CORTE_TIPO);\n\n\t\t\t\tCollection colecaoLigacao = getFachada().pesquisar(\n\t\t\t\t\t\tfiltroLigacaoAgua, LigacaoAgua.class.getName());\n\n\n\t\t\t\tLigacaoAgua ligacaoAgua = (LigacaoAgua) Util\n\t\t\t\t\t\t.retonarObjetoDeColecao(colecaoLigacao);\n\t\t\t\t\n\t\t\t\t//Pesquisa Imovel\n\t\t\t\tFiltroImovel filtroImovel = new FiltroImovel();\n\t\t\t\tfiltroImovel.adicionarParametro(new ParametroSimples(FiltroImovel.ID,form.getMatriculaImovel()));\n\n\t\t\t\tCollection colecaoImovel = getFachada().pesquisar(filtroImovel,\n\t\t\t\t\t\tImovel.class.getName());\n\n\t\t\t\t\n\n\t\t\t\tImovel imovel = (Imovel) colecaoImovel.iterator().next();\n\t\t\t\t\n\t\t\t\t//pesquisa OS\n\t\t\t\tFiltroOrdemServico filtroOrdemServico = new FiltroOrdemServico();\n\t\t\t\tfiltroOrdemServico.adicionarParametro(new ParametroSimples(FiltroOrdemServico.ID,form.getIdOrdemServico()));\n\t\t\t\tfiltroOrdemServico.adicionarCaminhoParaCarregamentoEntidade(FiltroOrdemServico.SERVICO_TIPO);\n\t\t\t\tfiltroOrdemServico.adicionarCaminhoParaCarregamentoEntidade(\"servicoTipo.debitoTipo\");\n\t\t\t\tfiltroOrdemServico.adicionarCaminhoParaCarregamentoEntidade(\"servicoNaoCobrancaMotivo\");\n \n\t\t\t\tCollection colecaoOrdemServico = fachada.pesquisar(filtroOrdemServico,OrdemServico.class.getName());\n\t\n\t\t\t\tOrdemServico ordemServico = (OrdemServico) colecaoOrdemServico.iterator().next();\n\t\t\t\t\n\t\t\t\thelper.setOrdemServico(ordemServico);\t\n\t\t\t\thelper.setLigacaoAgua(ligacaoAgua);\t\n\t\t\t\thelper.getLigacaoAgua().getCorteTipo().setId(new Integer(form.getTipoCorte()));\n\t\t\t\thelper.getLigacaoAgua().setUltimaAlteracao(form.getDataConcorrencia());\n\t\t\t\thelper.setMatriculaImovel(form.getMatriculaImovel());\n\t\t\t\thelper.setImovel(imovel);\n\n\t\t\t\tString debitoEncontrado = \"false\";\n\t\t\t\t\n\t\t\t\tdebitoEncontrado = (String) sessao.getAttribute(\"debitoEncontrado\");\n\t\t\t\t\n\t\t\t\tif(debitoEncontrado!=null && debitoEncontrado.equals(\"true\") && form.getMotivoNaoCobranca() != null \n\t\t\t\t\t\t&& !form.getMotivoNaoCobranca().equals(\"-1\")){\n\t\t\t\t\t\n\t\t\t\t\tServicoNaoCobrancaMotivo sncm = new ServicoNaoCobrancaMotivo();\n\t\t\t\t\t\n\t\t\t\t\tsncm.setId(new Integer(form.getMotivoNaoCobranca()));\n\t\t\t\t\t\n\t\t\t\t\thelper.getOrdemServico().setServicoNaoCobrancaMotivo(sncm);\n\t\t\t\t\t\n\t\t\t\t}else if(debitoEncontrado!=null && debitoEncontrado.equals(\"true\")){\n\t\t\t\t\t\n\t\t\t\t\tBigDecimal valorAtual = new BigDecimal(0);\n\t\t\t\t\tif (form.getValorDebito() != null) {\n\t\t\t\t\t String valorDebito = form\n\t\t\t\t\t \t.getValorDebito().toString().replace(\".\", \"\");\n\t\t\t\t\t \n\t\t\t\t\t valorDebito = valorDebito.replace(\",\", \".\");\n\t\t\t\t\t \n\t\t\t\t\t valorAtual = new BigDecimal(valorDebito);\n\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\thelper.getOrdemServico().setId(new Integer(form.getIdOrdemServico()));\n\t\t\t\t\thelper.getOrdemServico().getServicoTipo().getDebitoTipo().setId(new Integer(form.getIdTipoDebito()));\n\t\t\t\t\thelper.getOrdemServico().setValorAtual(valorAtual);\n\t\t\t\t\thelper.setQtdParcelas(form.getQuantidadeParcelas());\n\t\t\t\t\thelper.getOrdemServico().setPercentualCobranca(new BigDecimal(form.getPercentualCobranca()));\n\t\t\t\t\thelper.setUsuarioLogado(usuarioLogado);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t }\n\t\t\tif(form.getVeioEncerrarOS().equalsIgnoreCase(\"FALSE\")){\n\t\t\t\thelper.setVeioEncerrarOS(Boolean.FALSE);\n\t\t\t\tfachada.atualizarTipoCorte(helper);\n\t\t\t}else{\n\t\t\t\thelper.setVeioEncerrarOS(Boolean.TRUE);\n\t\t\t\tsessao.setAttribute(\"integracaoComercialHelper\", helper);\n\t\t\t\t\n\t\t\t\tif(sessao.getAttribute(\"menu\") == null){\n\t\t\t\t\tretorno = actionMapping.findForward(\"encerrarOrdemServicoAction\");\n\t\t\t\t}else{\n\t\t\t\t\tretorno = actionMapping.findForward(\"encerrarOrdemServicoPopupAction\");\n\t\t\t\t}\n\t\t\t\tsessao.removeAttribute(\"caminhoRetornoIntegracaoComercial\");\n\t\t\t}\n\t\t\t\t\t\n\t\t}\n\t\tretorno.getName();\n\t\tif(retorno.getName().equalsIgnoreCase(\"telaSucesso\")){\n\n\t\t\tmontarPaginaSucesso(httpServletRequest,\"Tipo do Corte Ligação de Água do imóvel \"+form.getMatriculaImovel()+\" efetuado com sucesso\",\n\t\t\t\t\t\"Atualizar outro Corte de Ligação de Água\",\n\t\t\t\t\t\"exibirAlterarTipoCorteAction.do?menu=sim\");\n\t\t\n\t\t}\n\t return retorno;\n\t}",
"@Override\n\tpublic ActionForward select(HttpServletRequest request, HttpServletResponse response) {\n\t\treturn null;\n\t}",
"public PDAction getX() {\n/* 99 */ COSDictionary x = (COSDictionary)this.actions.getDictionaryObject(\"X\");\n/* 100 */ PDAction retval = null;\n/* 101 */ if (x != null)\n/* */ {\n/* 103 */ retval = PDActionFactory.createAction(x);\n/* */ }\n/* 105 */ return retval;\n/* */ }",
"@Override\n\tpublic ActionForward doDefault(ActionMapping mapping, ActionForm form,\n\t\t\tHttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows Exception {\n\t\t// TODO Auto-generated method stub\n\t\treturn null;\n\n\t}",
"public ActionForward execute(ActionMapping mapping, ActionForm form,\n\t\t\tHttpServletRequest request, HttpServletResponse response) {\n\t\tLogoutForm logoutForm = (LogoutForm) form;// TODO Auto-generated method stub\n\t\t\n\t\tLogger log = Logger.getLogger(TextAction.class);\n\t\tTTSReader tts = new TTSReader();\n\t\t\n\t\tlog.info(\"User loged out.\");\n\t\ttts.Spell(\"Good bye. We hope that you have enjoyed the use of our application.\");\n\t\t\n\t\treturn mapping.findForward(\"logout\");\n\t}",
"public ActionForward execute(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response) {\r\n\t\tActionForward actionForward=this.checkPriv(mapping, request, this.getClass().getSimpleName());\r\n\t\tif(actionForward!=null) return actionForward ;\r\n\t\tint days=5;\r\n\t\ttry {\r\n\t\t\tdays=Integer.parseInt(request.getParameter(\"days\"));\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t}\r\n\t\tString vessel=request.getParameter(\"vessel\").toUpperCase().trim();\r\n\t\tUser user=getUser(request);\r\n\t\tHttpSession session=request.getSession();\r\n\t\tsession.setAttribute(\"bookingctngroups\", process.getBookingCtnGroups(days,vessel, user));\r\n\t\treturn mapping.findForward(success);\r\n\t}",
"public java_cup.runtime.Symbol do_action(\n int act_num,\n java_cup.runtime.lr_parser parser,\n java.util.Stack stack,\n int top)\n throws java.lang.Exception\n {\n /* call code in generated class */\n return action_obj.CUP$include$do_action(act_num, parser, stack, top);\n }",
"public ResponseInfo handleRequest(String action, Map<String, String[]> params) {\n\t\tSystem.out.print(\"\\t Parameters: \");\n\t\tfor(String param : params.keySet()) {\n\t\t\tSystem.out.print(\"\\\"\" + param + \": \" + params.get(param)[0] + \"\\\" \");\n\t\t}\n\t\t\n\t\tSystem.out.println(\"\");\n\n\t\tswitch(action) {\n\t\tcase (SHOW_ERROR):\n\t\t\treturn new ResponseInfo(501, \"Intentional Error!\");\n\n\t\tcase(BEGIN_SESSION):\n\t\t\tSystem.out.println(\"Starting Session\");\n\t\t\tfor(String str : params.keySet()) {\n\t\t\t\tSystem.out.println(str);\n\t\t\t}\n\t\t\tint teacherId = Integer.parseInt(params.get(\"teacher_id\")[0]);\n\t\t\tint classId = Integer.parseInt(params.get(\"class_id\")[0]);\n\t\t\tif(classId == -1) {\n\t\t\t\tArrayList<Integer> classes = DatabaseManager.loadTeacherClassIds(teacherId);\n\t\t\t\tif(classes.size() > 0) {\n\t\t\t\t\tclassId = classes.get(0);\n\t\t\t\t}\n\t\n\t\t\t\tSystem.out.println(\"CAUTION: ASSUMING ONE CLASS PER TEACHER. DOES NOT ALLOW TEACHER TO CHOOSE CLASS!\");\n\t\t\t}\n\t\t\treturn GameManager.beginSession(teacherId, classId);\n\n\t\tcase(JOIN_SESSION):\n\t\t\tSystem.out.println(\"Joining Session\");\n\t\t\tint joinSessionId = Integer.parseInt(params.get(\"id\")[0]);\n\t\t\treturn GameManager.joinSession(joinSessionId);\n\t\t\tcase(CHECK_SESSION):\n\t\t\t\tint checkSession_Id = Integer.parseInt(params.get(\"id\")[0]);\n\t\t\tboolean hasSession = GameManager.checkSession(checkSession_Id);\n\t\t\treturn new ResponseInfo(200, hasSession + \"\");\n\t\t\tcase(LOGIN):\n\t\t\t\tString username = params.get(\"username\")[0];\n\t\t\tString password = params.get(\"password\")[0];\n\t\n\t\t\tint loginId = DatabaseManager.doLogin(username, password);\n\t\t\tif(loginId == -1) {\n\t\t\t\treturn new ResponseInfo(400, \"Invalid Login\");\n\t\t\t} else {\n\t\t\t\treturn new ResponseInfo(200, loginId + \"\");\n\t\t\t}\n\n\t\tcase(GET_STUDENT_INFO):\n\t\t\treturn new ResponseInfo(400, \"GET STUDENT INFO NOT IMPLEMENTED\");\n\n\t\tcase(GET_PERSON_INFO):\n\t\t\treturn new ResponseInfo(400, \"GET PERSON INFO NOT IMPLEMENTED\");\n\n\t\tcase(GET_PERSON_NAME):\n\t\t\tint personNameId = Integer.parseInt(params.get(\"id\")[0]);\n\t\t\tString name = DatabaseManager.getPersonName(personNameId);\n\t\t\treturn new ResponseInfo(200, name);\n\n\t\tcase(IS_TEACHER) :\n\t\t\tint givenIsTeacherId = Integer.parseInt(params.get(\"id\")[0]);\n\t\t\tboolean isTeacher = DatabaseManager.verifyTeacher(givenIsTeacherId);\n\t\t\treturn new ResponseInfo(200, isTeacher + \"\");\n\n\t\tcase (CHECK_BOARD_UPDATE):\n\t\t\tint givenCheckBoardId = Integer.parseInt(params.get(\"id\")[0]);\n\t\t\tboolean needUpdate = GameManager.checkNeedUpdate(givenCheckBoardId);\n\t\t\treturn new ResponseInfo(200, needUpdate + \"\");\n\n\t\tcase(GET_BOARD_STATE):\n\t\t\tint givenGetBoardStateId = Integer.parseInt(params.get(\"id\")[0]);\n\t\t\tString boardStateXML = GameManager.getBoardStateXML(givenGetBoardStateId);\n\t\t\tif(boardStateXML == null) {\n\t\t\t\treturn new ResponseInfo(400, \"No session containing id: \" + givenGetBoardStateId);\n\t\t\t} else {\n\t\t\t\treturn new ResponseInfo(200, boardStateXML);\n\t\t\t}\n\n\t\tcase(DATABASE_TEST) :\n\t\t\tDatabaseManager.InitializeDB();\n\t\t\treturn new ResponseInfo(200, \"Tried to do a thing. Check TomCat Output.\");\n\n\t\tcase(SUBMIT_CHAIN):\n\t\t\tint submitChainId = Integer.parseInt(params.get(\"id\")[0]);\n\t\t\tString chainXML = params.get(\"chain_xml\")[0];\n\n\t\t\tChain chain = Chain.generateChainFromXML(chainXML);\n\t\t\treturn GameManager.submitChain(submitChainId, chain);\n\n\t\tcase(GET_STUDENT_DECK):\n\t\t\tint getDeckStudentId = Integer.parseInt(params.get(\"id\")[0]);\n\t\t\tint getDeckClassId = Integer.parseInt(params.get(\"classId\")[0]);\n\t\t\tint getDeckAssignmentId = Integer.parseInt(params.get(\"assignmentId\")[0]);\n\t\t\tif(getDeckClassId == -1) {\n\t\t\t\tSystem.out.println(\"USING DEFAULT CLASS FOR STUDENT IN GET STUDENT DECK.\");\n\t\t\t\tgetDeckClassId = DatabaseManager.getClassContainingStudent(getDeckStudentId);\n\t\t\t\tif(getDeckClassId == -1) {\n\t\t\t\t\treturn new ResponseInfo(400, \"Could not find class containing student with id #\" + getDeckStudentId);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(getDeckAssignmentId == -1) {\n\t\t\t\tgetDeckAssignmentId = DatabaseManager.getCurrentAssignmentIDForClass(getDeckClassId);\n\t\t\t}\n\t\t\tString studentDeckXML = getStudentDeckXML(getDeckStudentId, getDeckClassId, getDeckAssignmentId);\n\t\t\treturn new ResponseInfo(200, studentDeckXML);\n\n\t\tcase(GET_TEAM_DECK):\n\t\t\tint getTeamDeckStudentId = Integer.parseInt(params.get(\"id\")[0]);\n\t\t\tint getTDeckClassId = GameManager.getActiveClassId(getTeamDeckStudentId);\n\t\t\tif(getTDeckClassId == -1) {\n\t\t\t\treturn new ResponseInfo(400, \"Could not find class containing student with id #\" + getTeamDeckStudentId);\n\t\t\t}\n\t\t\tint getTeamDeckTeamId = GameManager.getActiveTeamWithStudentId(getTeamDeckStudentId);\n\t\t\tif(getTeamDeckTeamId == -1) {\n\t\t\t\treturn new ResponseInfo(400, \"Could not find team containing student with id #\" + getTeamDeckStudentId);\n\t\t\t}\n\t\t\tString teamDeckXML = getTeamDeckXML(getTeamDeckTeamId, getTDeckClassId);\n\t\t\treturn new ResponseInfo(200, teamDeckXML);\n\n\t\tcase(STUDENT_ADD_CARD):\n\t\t\tint addCard_StudentId = Integer.parseInt(params.get(\"id\")[0]);\n\t\t\tint addCard_ClassId = Integer.parseInt(params.get(\"classId\")[0]);\n\t\t\tString addCard_Type = params.get(\"cardType\")[0];\n\t\t\tString addCard__Body = params.get(\"bodyText\")[0];\n\t\t\tint addCard_PageStart = Integer.parseInt(params.get(\"pageStart\")[0]);\n\t\t\tint addCard_PageEnd = Integer.parseInt(params.get(\"pageEnd\")[0]);\n\t\t\tint addCard_EditId = Integer.parseInt(params.get(\"editId\")[0]);\n\t\n\t\t\tif(addCard_ClassId == -1) {\n\t\t\t\tSystem.out.println(\"USING DEFAULT CLASS FOR ADD STUDENT CARD.\");\n\t\t\t\taddCard_ClassId = DatabaseManager.getClassContainingStudent(addCard_StudentId);\n\t\t\t\tif(addCard_ClassId == -1) {\n\t\t\t\t\treturn new ResponseInfo(400, \"Could not find class containing student with id #\" + addCard_StudentId);\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tint addCard_AssignmentId = DatabaseManager.getCurrentAssignmentIDForClass(addCard_ClassId);\n\t\n\t\t\tif(addCard_EditId == -1) {\n\t\t\t\tDatabaseManager.addCardForStudent(\n\t\t\t\t\t\taddCard_StudentId,\n\t\t\t\t\t\taddCard_ClassId,\n\t\t\t\t\t\taddCard_AssignmentId,\n\t\t\t\t\t\taddCard_Type,\n\t\t\t\t\t\taddCard__Body,\n\t\t\t\t\t\taddCard_PageStart,\n\t\t\t\t\t\taddCard_PageEnd\n\t\t\t\t\t\t);\n\t\t\t\treturn new ResponseInfo(200, \"Card Added\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tDatabaseManager.updateCardForStudent(\n\t\t\t\t\t\taddCard_EditId,\n\t\t\t\t\t\taddCard_StudentId,\n\t\t\t\t\t\taddCard_ClassId,\n\t\t\t\t\t\taddCard_Type,\n\t\t\t\t\t\taddCard__Body,\n\t\t\t\t\t\taddCard_PageStart,\n\t\t\t\t\t\taddCard_PageEnd\n\t\t\t\t\t\t);\n\t\t\t\treturn new ResponseInfo(200, \"Card Updated\");\n\t\t\t}\n\n\t\tcase(GET_TEAM_POSITION):\n\t\t\tint getTeamPosition_studentId = Integer.parseInt(params.get(\"id\")[0]);\n\t\n\t\t\tString ret = getTeamPos(getTeamPosition_studentId);\n\t\n\t\t\treturn new ResponseInfo(200, ret);\n\n\n\t\tcase(GET_CLASS_ARGUMENT_CARD_DECK):\n\t\t\tint getClassArgDeck_studentId = Integer.parseInt(params.get(\"id\")[0]);\n\t\t\treturn GameManager.getClassArgumentCardXML(getClassArgDeck_studentId);\n\n\t\tcase(GET_CHAIN_FOR_ARGUMENT):\n\t\t\tint getChainForArg_ArgCardID = Integer.parseInt(params.get(\"argument_card_id\")[0]);\n\t\t\tChain getChainForArg_Chain = DatabaseManager.getChainForArgumentCard(getChainForArg_ArgCardID);\n\t\n\t\t\tString retStr = \"\";\n\t\t\tif(getChainForArg_Chain == null) {\n\t\t\t\tretStr = \"null\";\n\t\t\t} else {\n\t\t\t\tretStr = getChainForArg_Chain.generateChainXML();\n\t\t\t}\n\t\n\t\t\tSystem.out.println(\"\\nReturning: \" + retStr + \"\\n\");\n\t\t\treturn new ResponseInfo(200, retStr);\n\n\t\tcase(GET_BOARD_CARD):\n\t\t\tint getBoardCard_studentId = Integer.parseInt(params.get(\"id\")[0]);\n\t\t\tint getBoardCard_teamId = GameManager.getActiveTeamWithStudentId(getBoardCard_studentId);\n\t\n\t\t\tString getBoardCard_ret = getBoardCardXML(getBoardCard_teamId, getBoardCard_studentId); \t\n\t\t\treturn new ResponseInfo(200, getBoardCard_ret);\n\n\t\tcase(PASS_ON_CHALLENGE):\n\t\t\tint passOnChallenge_StudentId = Integer.parseInt(params.get(\"id\")[0]);\n\t\t\treturn GameManager.passOnChallenge(passOnChallenge_StudentId);\n\n\t\tcase(SUBMIT_WINNING_CHAIN):\n\t\t\tint submitWinningChain_StudentId = Integer.parseInt(params.get(\"id\")[0]);\n\t\t\tint submitWinningChain_ChainAccessor = Integer.parseInt(params.get(\"chain_accessor\")[0]);\n\t\t\tString submitWinningChain_ChainXML = params.get(\"chain_xml\")[0];\n\t\t\tChain submit_WinningChain_Chain = Chain.generateChainFromXML(submitWinningChain_ChainXML);\n\t\n\t\t\treturn GameManager.submitWinningChain(submitWinningChain_StudentId, submitWinningChain_ChainAccessor, submit_WinningChain_Chain);\n\n\t\tcase(UPDATE_TEAM_POSITION):\n\t\t\tint updateTeamPos_studentId = Integer.parseInt(params.get(\"id\")[0]);\n\t\t\tint posX = Integer.parseInt(params.get(\"posX\")[0]);\n\t\t\tint posY = Integer.parseInt(params.get(\"posY\")[0]);\n\t\n\t\n\t\t\tif(setTeamPos(updateTeamPos_studentId, posX, posY)) {\n\t\t\t\treturn new ResponseInfo(200, \"Success\");\n\t\t\t}\n\t\t\treturn new ResponseInfo(500, \"Failure Updating Team Pos: \" + Integer.toString(updateTeamPos_studentId));\n\t\t\n\t\tcase(GET_CLASS_STUDENTS):\n\t\t\tint getClassStudents_id = Integer.parseInt(params.get(\"id\")[0]);\n\t\t\tif (!DatabaseManager.verifyTeacher(getClassStudents_id)) {\n\t\t\t\treturn new ResponseInfo(400, \"No Class Found With Teacher Id: \" + getClassStudents_id);\n\t\t\t}\n\t\t\treturn GameManager.getStudentList(getClassStudents_id);\n\t\t\n\t\tcase(LAUNCH_NEW_ASSIGNMENT):\n\t\t\tint launchNewAssignment_TeacherId = Integer.parseInt(params.get(\"id\")[0]);\n\t\t\tString launchNewAssignment_AssignmentXML = params.get(\"assignment_info\")[0].trim();\n\t\t\treturn GameManager.launchNewAssignment(launchNewAssignment_TeacherId, launchNewAssignment_AssignmentXML);\n\n\t\tcase(GET_CARD_TYPES):\n\t\t\tint getCardTypes_Id = Integer.parseInt(params.get(\"id\")[0]);\n\t\t\tString typesXML = getCardTypeListXML(getCardTypes_Id);\n\t\t\tif(typesXML == null) {\n\t\t\t\treturn new ResponseInfo(400, \"Error Obtaining Card Types\");\n\t\t\t}\n\t\t\treturn new ResponseInfo(200, typesXML);\n\n\t\tcase(GET_TEAM_NAME):\n\t\t\tint getStudent_Id = Integer.parseInt(params.get(\"id\")[0]);\n\t\t\tint team_id = DatabaseManager.getTeamContainingStudent(getStudent_Id);\n\t\t\tString team_name = DatabaseManager.getTeamName(team_id);\n\t\t\tif(team_name == null) {\n\t\t\t\treturn new ResponseInfo(400, \"Error Obtaining Team Name\");\n\t\t\t}\n\n\t\t\treturn new ResponseInfo(200, team_name);\n\n\t\tcase(GET_FULL_CLASS_INFO):\n\t\t\tint getFullClassInfo_Id = Integer.parseInt(params.get(\"id\")[0]);\n\t\t\tint getFullClassInfo_ClassId = DatabaseManager.getClassIdForPerson(getFullClassInfo_Id, -1);\n\t\t\tif(getFullClassInfo_ClassId < 0) {\n\t\t\t\treturn new ResponseInfo(200, \"No Class Found for Person with ID: \" + getFullClassInfo_Id);\n\t\t\t}\n\t\t\t\n\t\t\tString getFullClassInfo_XML = DatabaseManager.getFullClassInfo(getFullClassInfo_ClassId);\n\t\t\treturn new ResponseInfo(200, getFullClassInfo_XML);\n\t\t\t\n\t\tdefault:\n\t\t\treturn new ResponseInfo(500, \"Unrecognized Action: \" + action);\n\n\t\t}\n\t}",
"public interface ActionHandler {\n ModelApiResponse handleActionChoice(ActionChoice choice);\n List<AvailableActions> getActionsCurrentlyAvailable();\n}",
"protected ActionForward annuler(ActionMapping mapping,ActionForm form , HttpServletRequest request, HttpServletResponse response, ActionErrors errors,Hashtable hParamProc ) throws ServletException{\r\n\t\tString sMode = request.getParameter(\"mode\") ;\r\n\t\t\r\n\t\t//page bCompocfAd.jsp\r\n\t\tif (sMode .equals(\"avant\")) \r\n\t\t\t return mapping.findForward(\"avant\") ;\r\n\t\t\r\n\t\telse if (sMode .equals(\"ecran\")) \r\n\t\t\t return mapping.findForward(\"ecran\") ;\r\n\t\t\r\n\t\telse if (sMode .equals(\"initial\")) \r\n\t\t\t return mapping.findForward(\"initial\") ;\r\n\t\t\r\n\t\telse\r\n\t\t return mapping.findForward(\"avant\") ;\r\n\t}"
] | [
"0.5975075",
"0.5813603",
"0.5713297",
"0.5475877",
"0.53971845",
"0.528728",
"0.52715766",
"0.52389437",
"0.5234113",
"0.5215233",
"0.51921475",
"0.515517",
"0.5154823",
"0.51333576",
"0.51318157",
"0.51267254",
"0.5088897",
"0.5087309",
"0.5047174",
"0.500584",
"0.49970582",
"0.49526915",
"0.49444818",
"0.48990345",
"0.4897274",
"0.4887906",
"0.4880471",
"0.48682922",
"0.48618916",
"0.486004",
"0.48582566",
"0.48535666",
"0.48471105",
"0.48188743",
"0.48188737",
"0.4811151",
"0.48105365",
"0.4795361",
"0.47862986",
"0.47843105",
"0.47811416",
"0.4773076",
"0.4765385",
"0.47581947",
"0.47549286",
"0.4751014",
"0.47304136",
"0.4703292",
"0.46950078",
"0.46931052",
"0.46843848",
"0.46779954",
"0.46749175",
"0.46597937",
"0.46535954",
"0.46468213",
"0.46438166",
"0.46362782",
"0.46336767",
"0.46328622",
"0.4624996",
"0.46009248",
"0.45971146",
"0.4593",
"0.45866004",
"0.45805627",
"0.45683053",
"0.45651987",
"0.4561647",
"0.45484385",
"0.45449448",
"0.45386776",
"0.45361567",
"0.45328736",
"0.45326075",
"0.45324185",
"0.45319736",
"0.4531003",
"0.4515793",
"0.4504794",
"0.44923553",
"0.44919616",
"0.4487589",
"0.44824412",
"0.4481092",
"0.44690394",
"0.446822",
"0.44646847",
"0.4460085",
"0.4459471",
"0.4453059",
"0.44516012",
"0.4445854",
"0.4444183",
"0.44357908",
"0.44314754",
"0.44128805",
"0.44104525",
"0.4410426",
"0.44102222"
] | 0.6825954 | 0 |
/ access modifiers changed from: packageprivate | public final int zzb() {
return this.zzc.zzc() + this.zza + this.zzb;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private stendhal() {\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n protected void prot() {\n }",
"public void method_4270() {}",
"@Override\n public void func_104112_b() {\n \n }",
"private void m50366E() {\n }",
"private void kk12() {\n\n\t}",
"public final void mo51373a() {\n }",
"@Override\n public void perish() {\n \n }",
"public abstract void mo70713b();",
"public void m23075a() {\n }",
"public void mo38117a() {\n }",
"private MApi() {}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"public abstract void mo56925d();",
"private void someUtilityMethod() {\n }",
"private void someUtilityMethod() {\n }",
"public void mo21779D() {\n }",
"public abstract void mo27386d();",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"void m1864a() {\r\n }",
"public abstract Object mo26777y();",
"public void mo21825b() {\n }",
"protected boolean func_70814_o() { return true; }",
"public final void mo91715d() {\n }",
"public abstract void mo27385c();",
"public void mo97908d() {\n }",
"public void mo21782G() {\n }",
"private TMCourse() {\n\t}",
"private test5() {\r\n\t\r\n\t}",
"private Util() { }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"protected void mo6255a() {\n }",
"private abstract void privateabstract();",
"public void mo21877s() {\n }",
"public void mo21787L() {\n }",
"private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"private Utils() {}",
"private Utils() {}",
"private Utils() {}",
"private Utils() {}",
"public void mo21791P() {\n }",
"private MetallicityUtils() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"public void mo55254a() {\n }",
"public abstract void mo6549b();",
"public void mo23813b() {\n }",
"@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.426 -0500\", hash_original_method = \"26D71A046B8A5E21DEFC65FB89CD9FDA\", hash_generated_method = \"2293476E78FCC8BDA181F927AEA93BD1\")\n \nprivate void copyTables ()\n {\n if (prefixTable != null) {\n prefixTable = (Hashtable)prefixTable.clone();\n } else {\n prefixTable = new Hashtable();\n }\n if (uriTable != null) {\n uriTable = (Hashtable)uriTable.clone();\n } else {\n uriTable = new Hashtable();\n }\n elementNameTable = new Hashtable();\n attributeNameTable = new Hashtable();\n declSeen = true;\n }",
"public void mo44053a() {\n }",
"public void smell() {\n\t\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 }",
"public void mo115190b() {\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}",
"public void mo21785J() {\n }",
"public void mo21793R() {\n }",
"public void mo21878t() {\n }",
"public void mo56167c() {\n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"public abstract String mo118046b();",
"public void mo115188a() {\n }",
"private SourcecodePackage() {}",
"public abstract String mo41079d();",
"void mo57277b();",
"public void mo6944a() {\n }",
"public abstract void mo42329d();",
"public abstract void mo30696a();",
"private final zzgy zzgb() {\n }",
"private Utils() {\n\t}",
"private Utils() {\n\t}",
"protected boolean func_70041_e_() { return false; }",
"zzafe mo29840Y() throws RemoteException;",
"private Singletion3() {}",
"public abstract void mo42331g();",
"public abstract void mo35054b();",
"public abstract String mo13682d();",
"public void mo21786K() {\n }",
"public void mo3376r() {\n }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"public void mo3749d() {\n }",
"public void mo21794S() {\n }",
"public void mo12628c() {\n }",
"private Infer() {\n\n }",
"public void mo9848a() {\n }",
"public abstract void mo27464a();",
"private OMUtil() { }",
"@Override\n\tpublic void ligar() {\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}",
"private NativeSupport() {\n\t}",
"public void mo2740a() {\n }",
"@Override\n public boolean isPrivate() {\n return true;\n }"
] | [
"0.7151384",
"0.6686185",
"0.65583766",
"0.64826417",
"0.64304984",
"0.6385171",
"0.6383977",
"0.63483983",
"0.633059",
"0.62765336",
"0.6263506",
"0.6250637",
"0.62373245",
"0.62338716",
"0.6228648",
"0.61975765",
"0.61975765",
"0.6194941",
"0.618365",
"0.61799717",
"0.6157145",
"0.6152681",
"0.61520094",
"0.6116934",
"0.61095953",
"0.61080873",
"0.6088326",
"0.6082195",
"0.6072662",
"0.6068906",
"0.6056682",
"0.60562724",
"0.60556823",
"0.60513276",
"0.60499626",
"0.6047135",
"0.60444874",
"0.6036964",
"0.60240126",
"0.60240126",
"0.60240126",
"0.60240126",
"0.60198665",
"0.60196465",
"0.6018061",
"0.60165036",
"0.60056704",
"0.6002412",
"0.59990937",
"0.5997667",
"0.599644",
"0.59957576",
"0.5991334",
"0.5991334",
"0.5991334",
"0.5991334",
"0.5991334",
"0.5991334",
"0.5991334",
"0.5990928",
"0.59876156",
"0.59876156",
"0.59846693",
"0.59827363",
"0.5973123",
"0.5958725",
"0.59580827",
"0.59533185",
"0.5951521",
"0.5947354",
"0.5946934",
"0.59443045",
"0.59423304",
"0.59402597",
"0.5937596",
"0.59375507",
"0.5926791",
"0.5926043",
"0.5926043",
"0.59259754",
"0.59135544",
"0.59104025",
"0.5904478",
"0.59043425",
"0.59041864",
"0.58994097",
"0.58964294",
"0.58939105",
"0.58936906",
"0.5890244",
"0.5882699",
"0.58786327",
"0.5877569",
"0.5876326",
"0.5875925",
"0.58734876",
"0.5867297",
"0.5867297",
"0.58666396",
"0.58664894",
"0.58640105"
] | 0.0 | -1 |
/ access modifiers changed from: packageprivate | public final int zzc() {
return this.zzc.zzc() + this.zza;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private stendhal() {\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n protected void prot() {\n }",
"public void method_4270() {}",
"@Override\n public void func_104112_b() {\n \n }",
"private void m50366E() {\n }",
"private void kk12() {\n\n\t}",
"public final void mo51373a() {\n }",
"@Override\n public void perish() {\n \n }",
"public abstract void mo70713b();",
"public void m23075a() {\n }",
"public void mo38117a() {\n }",
"private MApi() {}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"public abstract void mo56925d();",
"private void someUtilityMethod() {\n }",
"private void someUtilityMethod() {\n }",
"public void mo21779D() {\n }",
"public abstract void mo27386d();",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"void m1864a() {\r\n }",
"public abstract Object mo26777y();",
"public void mo21825b() {\n }",
"protected boolean func_70814_o() { return true; }",
"public final void mo91715d() {\n }",
"public abstract void mo27385c();",
"public void mo97908d() {\n }",
"public void mo21782G() {\n }",
"private TMCourse() {\n\t}",
"private test5() {\r\n\t\r\n\t}",
"private Util() { }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"protected void mo6255a() {\n }",
"private abstract void privateabstract();",
"public void mo21877s() {\n }",
"public void mo21787L() {\n }",
"private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"private Utils() {}",
"private Utils() {}",
"private Utils() {}",
"private Utils() {}",
"private MetallicityUtils() {\n\t\t\n\t}",
"public void mo21791P() {\n }",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"public void mo55254a() {\n }",
"public abstract void mo6549b();",
"public void mo23813b() {\n }",
"@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.426 -0500\", hash_original_method = \"26D71A046B8A5E21DEFC65FB89CD9FDA\", hash_generated_method = \"2293476E78FCC8BDA181F927AEA93BD1\")\n \nprivate void copyTables ()\n {\n if (prefixTable != null) {\n prefixTable = (Hashtable)prefixTable.clone();\n } else {\n prefixTable = new Hashtable();\n }\n if (uriTable != null) {\n uriTable = (Hashtable)uriTable.clone();\n } else {\n uriTable = new Hashtable();\n }\n elementNameTable = new Hashtable();\n attributeNameTable = new Hashtable();\n declSeen = true;\n }",
"public void mo44053a() {\n }",
"public void smell() {\n\t\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 }",
"public void mo115190b() {\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}",
"public void mo21785J() {\n }",
"public void mo21793R() {\n }",
"public void mo21878t() {\n }",
"public void mo56167c() {\n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"public abstract String mo118046b();",
"public void mo115188a() {\n }",
"private SourcecodePackage() {}",
"public abstract String mo41079d();",
"void mo57277b();",
"public void mo6944a() {\n }",
"public abstract void mo42329d();",
"public abstract void mo30696a();",
"private final zzgy zzgb() {\n }",
"private Utils() {\n\t}",
"private Utils() {\n\t}",
"protected boolean func_70041_e_() { return false; }",
"zzafe mo29840Y() throws RemoteException;",
"private Singletion3() {}",
"public abstract void mo42331g();",
"public abstract void mo35054b();",
"public abstract String mo13682d();",
"public void mo21786K() {\n }",
"public void mo3376r() {\n }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"public void mo3749d() {\n }",
"public void mo21794S() {\n }",
"public void mo12628c() {\n }",
"private Infer() {\n\n }",
"public void mo9848a() {\n }",
"private OMUtil() { }",
"public abstract void mo27464a();",
"@Override\n\tpublic void ligar() {\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}",
"private NativeSupport() {\n\t}",
"public void mo2740a() {\n }",
"@Override\n public boolean isPrivate() {\n return true;\n }"
] | [
"0.71513015",
"0.6686406",
"0.6558315",
"0.6482832",
"0.6430476",
"0.63856333",
"0.63838816",
"0.63487375",
"0.6330605",
"0.62764114",
"0.626384",
"0.62509346",
"0.6237325",
"0.62340367",
"0.6228612",
"0.6197973",
"0.6197973",
"0.61952",
"0.6183631",
"0.61797863",
"0.6157397",
"0.6152618",
"0.61521906",
"0.6116792",
"0.61100185",
"0.61080855",
"0.6088319",
"0.6082373",
"0.6072587",
"0.60691696",
"0.60570836",
"0.60564214",
"0.6056027",
"0.60505396",
"0.6050144",
"0.60472345",
"0.6044647",
"0.6036982",
"0.6024398",
"0.6024398",
"0.6024398",
"0.6024398",
"0.6020334",
"0.60201526",
"0.6018423",
"0.6016204",
"0.6005956",
"0.6002279",
"0.5999404",
"0.59974486",
"0.59964895",
"0.5995736",
"0.5991695",
"0.5991695",
"0.5991695",
"0.5991695",
"0.5991695",
"0.5991695",
"0.5991695",
"0.599113",
"0.5987661",
"0.5987661",
"0.5984926",
"0.5983099",
"0.5973421",
"0.59589046",
"0.5958243",
"0.5953439",
"0.59510964",
"0.59475076",
"0.5946366",
"0.5943994",
"0.59424007",
"0.59403396",
"0.5937576",
"0.59374106",
"0.5926433",
"0.59263766",
"0.59263766",
"0.5925841",
"0.5913479",
"0.5910542",
"0.59044325",
"0.5904201",
"0.59039",
"0.58995575",
"0.58967894",
"0.5894089",
"0.58939654",
"0.58905286",
"0.5882918",
"0.58785903",
"0.58777314",
"0.5876467",
"0.5876147",
"0.587332",
"0.58671093",
"0.58671093",
"0.58666575",
"0.5866619",
"0.58632815"
] | 0.0 | -1 |
/ access modifiers changed from: packageprivate | public final Object[] zze() {
return this.zzc.zze();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private stendhal() {\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n protected void prot() {\n }",
"public void method_4270() {}",
"@Override\n public void func_104112_b() {\n \n }",
"private void m50366E() {\n }",
"private void kk12() {\n\n\t}",
"public final void mo51373a() {\n }",
"@Override\n public void perish() {\n \n }",
"public abstract void mo70713b();",
"public void m23075a() {\n }",
"public void mo38117a() {\n }",
"private MApi() {}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"public abstract void mo56925d();",
"private void someUtilityMethod() {\n }",
"private void someUtilityMethod() {\n }",
"public void mo21779D() {\n }",
"public abstract void mo27386d();",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"void m1864a() {\r\n }",
"public abstract Object mo26777y();",
"public void mo21825b() {\n }",
"protected boolean func_70814_o() { return true; }",
"public final void mo91715d() {\n }",
"public abstract void mo27385c();",
"public void mo97908d() {\n }",
"public void mo21782G() {\n }",
"private TMCourse() {\n\t}",
"private test5() {\r\n\t\r\n\t}",
"private Util() { }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"protected void mo6255a() {\n }",
"private abstract void privateabstract();",
"public void mo21877s() {\n }",
"public void mo21787L() {\n }",
"private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"private Utils() {}",
"private Utils() {}",
"private Utils() {}",
"private Utils() {}",
"private MetallicityUtils() {\n\t\t\n\t}",
"public void mo21791P() {\n }",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"public void mo55254a() {\n }",
"public abstract void mo6549b();",
"public void mo23813b() {\n }",
"@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.426 -0500\", hash_original_method = \"26D71A046B8A5E21DEFC65FB89CD9FDA\", hash_generated_method = \"2293476E78FCC8BDA181F927AEA93BD1\")\n \nprivate void copyTables ()\n {\n if (prefixTable != null) {\n prefixTable = (Hashtable)prefixTable.clone();\n } else {\n prefixTable = new Hashtable();\n }\n if (uriTable != null) {\n uriTable = (Hashtable)uriTable.clone();\n } else {\n uriTable = new Hashtable();\n }\n elementNameTable = new Hashtable();\n attributeNameTable = new Hashtable();\n declSeen = true;\n }",
"public void mo44053a() {\n }",
"public void smell() {\n\t\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 }",
"public void mo115190b() {\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}",
"public void mo21785J() {\n }",
"public void mo21793R() {\n }",
"public void mo21878t() {\n }",
"public void mo56167c() {\n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"public abstract String mo118046b();",
"public void mo115188a() {\n }",
"private SourcecodePackage() {}",
"public abstract String mo41079d();",
"void mo57277b();",
"public void mo6944a() {\n }",
"public abstract void mo42329d();",
"public abstract void mo30696a();",
"private final zzgy zzgb() {\n }",
"private Utils() {\n\t}",
"private Utils() {\n\t}",
"protected boolean func_70041_e_() { return false; }",
"zzafe mo29840Y() throws RemoteException;",
"private Singletion3() {}",
"public abstract void mo42331g();",
"public abstract void mo35054b();",
"public abstract String mo13682d();",
"public void mo21786K() {\n }",
"public void mo3376r() {\n }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"public void mo3749d() {\n }",
"public void mo21794S() {\n }",
"public void mo12628c() {\n }",
"private Infer() {\n\n }",
"public void mo9848a() {\n }",
"private OMUtil() { }",
"public abstract void mo27464a();",
"@Override\n\tpublic void ligar() {\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}",
"private NativeSupport() {\n\t}",
"public void mo2740a() {\n }",
"@Override\n public boolean isPrivate() {\n return true;\n }"
] | [
"0.71513015",
"0.6686406",
"0.6558315",
"0.6482832",
"0.6430476",
"0.63856333",
"0.63838816",
"0.63487375",
"0.6330605",
"0.62764114",
"0.626384",
"0.62509346",
"0.6237325",
"0.62340367",
"0.6228612",
"0.6197973",
"0.6197973",
"0.61952",
"0.6183631",
"0.61797863",
"0.6157397",
"0.6152618",
"0.61521906",
"0.6116792",
"0.61100185",
"0.61080855",
"0.6088319",
"0.6082373",
"0.6072587",
"0.60691696",
"0.60570836",
"0.60564214",
"0.6056027",
"0.60505396",
"0.6050144",
"0.60472345",
"0.6044647",
"0.6036982",
"0.6024398",
"0.6024398",
"0.6024398",
"0.6024398",
"0.6020334",
"0.60201526",
"0.6018423",
"0.6016204",
"0.6005956",
"0.6002279",
"0.5999404",
"0.59974486",
"0.59964895",
"0.5995736",
"0.5991695",
"0.5991695",
"0.5991695",
"0.5991695",
"0.5991695",
"0.5991695",
"0.5991695",
"0.599113",
"0.5987661",
"0.5987661",
"0.5984926",
"0.5983099",
"0.5973421",
"0.59589046",
"0.5958243",
"0.5953439",
"0.59510964",
"0.59475076",
"0.5946366",
"0.5943994",
"0.59424007",
"0.59403396",
"0.5937576",
"0.59374106",
"0.5926433",
"0.59263766",
"0.59263766",
"0.5925841",
"0.5913479",
"0.5910542",
"0.59044325",
"0.5904201",
"0.59039",
"0.58995575",
"0.58967894",
"0.5894089",
"0.58939654",
"0.58905286",
"0.5882918",
"0.58785903",
"0.58777314",
"0.5876467",
"0.5876147",
"0.587332",
"0.58671093",
"0.58671093",
"0.58666575",
"0.5866619",
"0.58632815"
] | 0.0 | -1 |
Inflate the layout for this fragment | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_menu, container, false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}",
"@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }",
"@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }",
"protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}",
"@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }",
"@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }"
] | [
"0.6739604",
"0.67235583",
"0.6721706",
"0.6698254",
"0.6691869",
"0.6687986",
"0.66869223",
"0.6684548",
"0.66766286",
"0.6674615",
"0.66654444",
"0.66654384",
"0.6664403",
"0.66596216",
"0.6653321",
"0.6647136",
"0.66423255",
"0.66388357",
"0.6637491",
"0.6634193",
"0.6625158",
"0.66195583",
"0.66164845",
"0.6608733",
"0.6596594",
"0.65928894",
"0.6585293",
"0.65842897",
"0.65730995",
"0.6571248",
"0.6569152",
"0.65689117",
"0.656853",
"0.6566686",
"0.65652984",
"0.6553419",
"0.65525705",
"0.65432084",
"0.6542382",
"0.65411425",
"0.6538022",
"0.65366334",
"0.65355957",
"0.6535043",
"0.65329415",
"0.65311074",
"0.65310687",
"0.6528645",
"0.65277404",
"0.6525902",
"0.6524516",
"0.6524048",
"0.65232015",
"0.65224624",
"0.65185034",
"0.65130377",
"0.6512968",
"0.65122765",
"0.65116245",
"0.65106046",
"0.65103024",
"0.6509013",
"0.65088093",
"0.6508651",
"0.6508225",
"0.6504662",
"0.650149",
"0.65011525",
"0.6500686",
"0.64974767",
"0.64935696",
"0.6492234",
"0.6490034",
"0.6487609",
"0.6487216",
"0.64872116",
"0.6486594",
"0.64861935",
"0.6486018",
"0.6484269",
"0.648366",
"0.6481476",
"0.6481086",
"0.6480985",
"0.6480396",
"0.64797544",
"0.647696",
"0.64758915",
"0.6475649",
"0.6474114",
"0.6474004",
"0.6470706",
"0.6470275",
"0.64702207",
"0.6470039",
"0.6467449",
"0.646602",
"0.6462256",
"0.64617974",
"0.6461681",
"0.6461214"
] | 0.0 | -1 |
Construct a MethodType with just a name | private MethodType(String name) {
super(name);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static MethodBuilder constructor(String name) {\n\t\treturn new MethodBuilder().returnType(\"\").name(name);\n\t}",
"Method createMethod();",
"Method createMethod();",
"public static MethodType fromMethod(MethodSymbol method) {\n return new MethodType(method);\n }",
"public static MethodType fromParameters(String name, Type... paramTypes) {\n MethodType type = new MethodType(name);\n type.paramTypes = Arrays.copyOf(paramTypes, paramTypes.length);\n return type;\n }",
"NamedType createNamedType();",
"H create(Method method);",
"public Type type(String name);",
"HxMethod createConstructor(final String... parameterTypes);",
"private JavaType(String name) {\n this.name = name;\n }",
"Type createType();",
"Type createType();",
"Type createType();",
"public MLMethod createMethod() {\n\t\tif (this.methodType == null) {\n\t\t\tthrow new EncogError(\n\t\t\t\t\t\"Please call selectMethod first to choose what type of method you wish to use.\");\n\t\t}\n\t\tMLMethodFactory methodFactory = new MLMethodFactory();\n\t\tMLMethod method = methodFactory.create(methodType, methodArgs, dataset\n\t\t\t\t.getNormHelper().calculateNormalizedInputCount(), this.config\n\t\t\t\t.determineOutputCount(dataset));\n\t\treturn method;\n\t}",
"private static QualifiedName makePrimitiveInstanceMethodName(String methodName, String primitiveTypeName) {\r\n \r\n if(methodName == null || primitiveTypeName == null) {\r\n throw new IllegalArgumentException(\"makePrimitiveInstanceMethodName must not be passed null values\");\r\n }\r\n \r\n // Trivial case: If we are given the name of a primitive type in CAL form (eg, \"Int\")\r\n // then we don't need to do any particular work to get things into the correct form.\r\n if(Character.isUpperCase(primitiveTypeName.charAt(0))) {\r\n return QualifiedName.make(CAL_Prelude.MODULE_NAME, methodName + primitiveTypeName);\r\n }\r\n \r\n // Non-trivial case: we need to convert the first character of the primitive type name\r\n // to upper-case.\r\n StringBuilder buffer = new StringBuilder(methodName.length() + primitiveTypeName.length());\r\n buffer.append(methodName);\r\n buffer.append(Character.toUpperCase(primitiveTypeName.charAt(0)));\r\n buffer.append(primitiveTypeName.substring(1));\r\n \r\n return QualifiedName.make(CAL_Prelude.MODULE_NAME, buffer.toString());\r\n }",
"HxMethod createMethod(final String returnType,\n final String methodName,\n final String... parameterTypes);",
"private AnalysisMethodEnum(String name) {\n\t\tthis.methodName = name;\n\t}",
"public MethodBuilder type(String type) {\n\t\tthis.type = type;\n\t\treturn this;\n\t}",
"private JCMethodDecl makeMethod(DiagnosticPosition diagPos, MethodSymbol mth, JCBlock mthBody, boolean isBound) {\n // build the parameter list\n ListBuffer<JCVariableDecl> params = ListBuffer.lb();\n for (VarSymbol vsym : mth.getParameters()) {\n Type vtype = vsym.asType();\n if (isBound) {\n VarMorphInfo vmi = typeMorpher.varMorphInfo(vsym);\n vtype = vmi.getMorphedType();\n }\n params.append(make.VarDef(\n make.Modifiers(0L), \n vsym.name, \n toJava.makeTypeTree(vtype, diagPos), \n null // no initial value\n ));\n }\n \n // make the method\n JCModifiers mods = make.Modifiers(Flags.PUBLIC | (mthBody==null? Flags.ABSTRACT : 0L));\n mods = JavafxToJava.addAccessAnnotationModifiers(mth.flags(), mods, (JavafxTreeMaker)make);\n return make.at(diagPos).MethodDef(\n mods, \n toJava.functionName(mth, false, isBound), \n toJava.makeReturnTypeTree(diagPos, mth, isBound), \n List.<JCTypeParameter>nil(), \n params.toList(), \n List.<JCExpression>nil(), \n mthBody, \n null);\n }",
"public Method(String name, Type returnType, Type[] argumentTypes) {\n/* 98 */ this(name, Type.getMethodDescriptor(returnType, argumentTypes));\n/* */ }",
"private MethodType(MethodSymbol method) {\n super(method.getName());\n declarer = method.getDeclaringClass();\n typeParams = Arrays.copyOf(method.getTypeParameters(), method.getTypeParameters().length);\n paramTypes = Arrays.copyOf(method.getParameterTypes(), method.getParameterTypes().length);\n }",
"private CommandType(String name) {\n\t\t\n\t\tthis.name = name;\n\t}",
"public JMethod(SourceInfo info, String name, JDeclaredType enclosingType,\n JType returnType, boolean isAbstract, boolean isStatic, boolean isFinal,\n boolean isPrivate) {\n super(info);\n this.name = StringInterner.get().intern(name);\n this.enclosingType = enclosingType;\n this.returnType = returnType;\n this.isAbstract = isAbstract;\n this.isStatic = isStatic;\n this.isFinal = isFinal;\n this.isPrivate = isPrivate;\n }",
"MethodStart createMethodStart();",
"static Identifier makeClassMethod(final QualifiedName name) {\r\n if (name == null) {\r\n return null;\r\n } else {\r\n return new Identifier(Category.CLASS_METHOD, name);\r\n }\r\n }",
"private MethodClass() {\r\n super(IMethodClass.TYPE_ID);\r\n }",
"public void testCreateEmptyMethod() {\n IDOMMethod method = this.domFactory.createMethod();\n method.setName(\"foo\");\n assertSourceEquals(\"source code incorrect\", \"public void foo() {\\n\" + \"}\\n\", method.getContents());\n }",
"public static StackManipulation of(JavaInstance.MethodType methodType) {\n Type[] parameterType = new Type[methodType.getParameterTypes().size()];\n int index = 0;\n for (TypeDescription typeDescription : methodType.getParameterTypes()) {\n parameterType[index++] = Type.getType(typeDescription.getDescriptor());\n }\n return new MethodTypeConstant(Type.getMethodType(Type.getType(methodType.getReturnType().getDescriptor()), parameterType));\n }",
"protected MethodNameRecord(){}",
"default HxMethod createMethod(final Class<?> returnType,\n final String methodName,\n final Class<?>... parameterTypes) {\n return createMethod(returnType.getName(),\n methodName,\n getHaxxor().toNormalizedClassnames(parameterTypes));\n }",
"public static PyActorMethod<Object> of(String methodName) {\n return of(methodName, Object.class);\n }",
"protected ResourceMethod defineMethod( String theName, JavaType theReturnType, HttpVerb theHttpVerb, String theMethodPath ) {\r\n\t\treturn new ResourceMethod( theName, theReturnType, theHttpVerb, theMethodPath, this );\r\n\t}",
"HxMethod createConstructor(final HxType... parameterTypes);",
"TypeDef createTypeDef();",
"ShipmentMethodType createShipmentMethodType();",
"com.google.protobuf.ByteString getMethodNameBytes();",
"com.google.protobuf.ByteString getMethodNameBytes();",
"HxMethod createMethod(final HxType returnType,\n final String methodName,\n final HxType... parameterTypes);",
"public MethodBuilder() {\n\t\tvisibility = \"public\";\n\t\treturnType = \"void\";\n\t\tname = \"foo\";\n\t\trule = \"\";\n\t\ttype = \"\";\n\t\tparameters = new ArrayList<String>();\n\t\tcommands = new ArrayList<String>();\n\t}",
"public static CommandType createClass(String name) {\n\t\t\n\t\tif(counter < MAX) {\n\t\t\tcounter ++;\n\t\t\treturn new CommandType(name);\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Es können keine CommandType Objekte mehr erstellt werden!\");\n\t\t\treturn null;\n\t\t}\n\t\t\t\n\t}",
"@Pure\n private static @Nonnull String createMethodCallWithMethodName(@Nonnull MethodInformation method, @Nonnull String methodName) {\n return methodName + FiniteIterable.of(method.getElement().getParameters()).map(parameter -> parameter.getSimpleName().toString()).join(Brackets.ROUND);\n }",
"HxType createType(final String className);",
"public Builder clearMethodName() {\r\n\t\t\t\tbitField0_ = (bitField0_ & ~0x00000001);\r\n\t\t\t\tmethodName_ = getDefaultInstance().getMethodName();\r\n\t\t\t\tonChanged();\r\n\t\t\t\treturn this;\r\n\t\t\t}",
"public org.python.types.Type __new__(org.python.types.Type cls);",
"public $type $name () {\n }",
"protected MethodTypeConstant()\n {\n super(CONSTANT_METHODTYPE);\n }",
"public static JMethodName from(String fqn) {\n\t\tif (fqn == null || fqn.isEmpty()) return null;\n\t\treturn new JMethodName(fqn);\n\t}",
"protected MethodTypeConstant(Type methodType) {\n this.methodType = methodType;\n }",
"public interface NameFactory\n{\n /**\n * Returns a unique (descriptive?) parameter name for the specified\n * type.\n *\n * @param sig - signature of the declaring method\n * @param n - the parameter number whose name we want.\n * @return a made up name for the n'th parameter\n */\n public String getParameterName(Signature sig, int n);\n}",
"private void createMethod(MethodNode method, StringBuffer completion) {\n int insertedModifiers = method.getModifiers() & ~(Opcodes.ACC_NATIVE | Opcodes.ACC_ABSTRACT | Opcodes.ACC_PUBLIC);\n ASTNode.printModifiers(insertedModifiers, completion);\n\n //// Type parameters\n // ignore too difficult and not really needed for Groovy\n\n// GenericsType[] typeVariableBindings = method.getGenericsTypes();\n// if(typeVariableBindings != null && typeVariableBindings.length != 0) {\n// completion.append('<');\n// for (int i = 0; i < typeVariableBindings.length; i++) {\n// if(i != 0) {\n// completion.append(',');\n// completion.append(' ');\n// }\n// createTypeVariable(typeVariableBindings[i], completion);\n// }\n// completion.append('>');\n// completion.append(' ');\n// }\n\n //// Return type\n createType(method.getReturnType(), completion, false);\n completion.append(' ');\n\n //// Selector\n completion.append(method.getName());\n\n completion.append('(');\n\n ////Parameters\n Parameter[] parameters = method.getParameters();\n int length = parameters.length;\n for (int i = 0; i < length; i++) {\n if(i != 0) {\n completion.append(',');\n completion.append(' ');\n }\n createType(parameters[i].getType(), completion, true);\n completion.append(' ');\n completion.append(parameters[i].getName());\n }\n\n completion.append(')');\n\n //// Exceptions\n ClassNode[] exceptions = method.getExceptions();\n\n if (exceptions != null && exceptions.length > 0){\n completion.append(' ');\n completion.append(\"throws\");\n completion.append(' ');\n for(int i = 0; i < exceptions.length ; i++){\n if(i != 0) {\n completion.append(' ');\n completion.append(',');\n }\n createType(exceptions[i], completion, false);\n }\n }\n }",
"static Identifier makeTypeCons(final QualifiedName name) {\r\n if (name == null) {\r\n return null;\r\n } else {\r\n return new Identifier(Category.TYPE_CONSTRUCTOR, name);\r\n }\r\n }",
"abstract protected Set<Method> createMethods();",
"public Method(String name, String desc) {\n/* 82 */ this.name = name;\n/* 83 */ this.desc = desc;\n/* */ }",
"public MethodInfoImpl() {\n }",
"public Builder clearMethodName() {\n bitField0_ = (bitField0_ & ~0x00000004);\n methodName_ = getDefaultInstance().getMethodName();\n onChanged();\n return this;\n }",
"public Builder clearMethodName() {\n bitField0_ = (bitField0_ & ~0x00000004);\n methodName_ = getDefaultInstance().getMethodName();\n onChanged();\n return this;\n }",
"public Type(String name) {\n\t\tsuper(name);\n\t\tsetSize();\n\t}",
"private String replaceFullNameWithConstructor(String typeName) {\r\n\t\tint pos = typeName.lastIndexOf('.');\r\n\t\treturn JavascriptKeywords.CONSTRUCTOR + typeName.substring(pos);\r\n\t}",
"public MethodDecl(int _line_, int _pos_, \n IType _type_, String _name_,\n List<Formal> _formals_, List<VarDecl> _varDecls_,\n List<IStatement> _statements_)\n {\n super(_line_, _pos_);\n \n setType(_type_);\n\n setName(_name_);\n\n setFormals(_formals_);\n\n setVarDecls(_varDecls_);\n\n setStatements(_statements_);\n\n setExp(null);\n\n }",
"public Method addMethod(String sName, String sSig)\n {\n ensureLoaded();\n Method method = new Method(sName, sSig, m_flags.isInterface());\n m_tblMethod.put(method.getIdentity(), method);\n setModified(true);\n return method;\n }",
"public String getMethodName(Class<?> type, String methodName, Class<?>... params);",
"Method addMethod(PositionString name, Symbol resultType, Iterator<Variable> parameters,\n\t\t\tModifier modifier) throws\n\t\t\tDuplicateIdentifierException, ShadowedIdentifierException, WrongModifierException, InvalidIdentifierException;",
"public static String demangleMethod(String name) {\n return demangleName(name, false);\n }",
"ClassType memberClassNamed(String name);",
"CodeType createCodeType();",
"default HxMethod createConstructor(final Class<?>... parameterTypes) {\n return createConstructor(getHaxxor().toNormalizedClassnames(parameterTypes));\n }",
"TypeDefinition createTypeDefinition();",
"public X10MethodInstance createMethodInstance(Type container, Name name, List<Type> typeArgs, List<Type> argTypes, Context context) {\n try {\n return xts.findMethod(container, xts.MethodMatcher(container, name, typeArgs, argTypes, context));\n } catch (SemanticException e) {\n throw new InternalCompilerError(\"Unable to find required method instance\", container.position(), e);\n }\n }",
"public RandomVariableMethods getMethod(String methodType)\n {\n if(methodType.equalsIgnoreCase(\"poisson\"))\n {\n return new MethodPoisson();\n }\n return null;\n }",
"BOpMethod createBOpMethod();",
"public static JavaType createForCStruct(String name) {\n return new JavaType(name);\n }",
"HxMethod createMethodReference(final String declaringType,\n final String returnType,\n final String methodName,\n final String... parameterTypes);",
"public abstract Method createDefaultCaseMethod(IClassDefinition cdef);",
"public Builder setMethodName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n methodName_ = value;\n onChanged();\n return this;\n }",
"public Builder setMethodName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n methodName_ = value;\n onChanged();\n return this;\n }",
"java.lang.String getMethodName();",
"java.lang.String getMethodName();",
"java.lang.String getMethodName();",
"java.lang.String getMethodName();",
"public static StackManipulation of(MethodDescription.InDefinedShape methodDescription) {\n return new MethodTypeConstant(Type.getMethodType(methodDescription.getDescriptor()));\n }",
"String typeName();",
"MessageType createMessageType();",
"InstrumentedType withMethod(MethodDescription.Token token);",
"public Builder setMethodName(java.lang.String value) {\r\n\t\t\t\tif (value == null) {\r\n\t\t\t\t\tthrow new NullPointerException();\r\n\t\t\t\t}\r\n\t\t\t\tbitField0_ |= 0x00000001;\r\n\t\t\t\tmethodName_ = value;\r\n\t\t\t\tonChanged();\r\n\t\t\t\treturn this;\r\n\t\t\t}",
"public MethodPredicate withName(String name) {\n this.name = name;\n return this;\n }",
"MethodName getMethod();",
"com.google.protobuf.ByteString\n getMethodNameBytes();",
"com.google.protobuf.ByteString\n getMethodNameBytes();",
"protected ResourceMethod defineMethod( String theName, Type theReturnType, HttpVerb theHttpVerb, String theMethodPath ) {\r\n\t\treturn this.defineMethod(theName, new JavaType( theReturnType ), theHttpVerb, theMethodPath);\r\n\t}",
"MethodType getMethodType();",
"StructureType createStructureType();",
"public interface MethodFactory extends ModuleSupportable\n{\n\t/**\n\tUsed to identify this interface when finding it with the Monitor.\n\t**/\n\tpublic static final String MODULE = \n\t \"com.splicemachine.db.iapi.store.access.conglomerate.MethodFactory\";\n\n\t/**\n\tReturn the default properties for this access method.\n\t**/\n\tProperties defaultProperties();\n\n\t/**\n\tReturn whether this access method implements the implementation\n\ttype given in the argument string.\n\t**/\n\tboolean supportsImplementation(String implementationId);\n\n\t/**\n\tReturn the primary implementation type for this access method.\n\tAlthough an access method may implement more than one implementation\n\ttype, this is the expected one. The access manager will put the\n\tprimary implementation type in a hash table for fast access.\n\t**/\n\tString primaryImplementationType();\n\n\t/**\n\tReturn whether this access method supports the format supplied in\n\tthe argument.\n\t**/\n\tboolean supportsFormat(UUID formatid);\n\n\t/**\n\tReturn the primary format that this access method supports.\n\tAlthough an access method may support more than one format, this\n\tis the usual one. the access manager will put the primary format\n\tin a hash table for fast access to the appropriate method.\n\t**/\n\tUUID primaryFormat();\n}",
"public static MethodBuilder method() {\n\t\treturn new MethodBuilder();\n\t}",
"FieldType createFieldType();",
"String getMethodName();",
"String getMethodName();",
"Type() {\n }",
"IOperationable create(String operationType);",
"public Formal(Type type, String name) {\n\t\tsuper(type.getLine());\n\t\tthis.type = type;\n\t\tthis.name = name;\n\t}",
"PermissionType createPermissionType();"
] | [
"0.6994712",
"0.6757471",
"0.6757471",
"0.64633495",
"0.6388096",
"0.63542193",
"0.6095563",
"0.60811424",
"0.60230523",
"0.60078526",
"0.5975524",
"0.5975524",
"0.5975524",
"0.59655756",
"0.5924197",
"0.5900035",
"0.58557785",
"0.58470565",
"0.5828486",
"0.57763296",
"0.5775484",
"0.57695293",
"0.5737234",
"0.57216334",
"0.5714771",
"0.5645823",
"0.5634027",
"0.56078184",
"0.55998015",
"0.5570042",
"0.55636126",
"0.55605054",
"0.55574065",
"0.5534903",
"0.5518786",
"0.551406",
"0.551406",
"0.5499843",
"0.54788285",
"0.54634076",
"0.54472375",
"0.5433605",
"0.5425918",
"0.54185104",
"0.5415603",
"0.5413434",
"0.54071254",
"0.54063946",
"0.53921026",
"0.53811556",
"0.5380846",
"0.53783035",
"0.537383",
"0.5345439",
"0.5341191",
"0.5341191",
"0.53274876",
"0.5311736",
"0.5310032",
"0.5293779",
"0.52897036",
"0.52856314",
"0.5281726",
"0.52772033",
"0.525578",
"0.5231501",
"0.52282894",
"0.52222097",
"0.51919824",
"0.5180722",
"0.5170952",
"0.516909",
"0.51668215",
"0.5163379",
"0.5163379",
"0.514813",
"0.514813",
"0.514813",
"0.514813",
"0.51344347",
"0.5128825",
"0.5125417",
"0.51211166",
"0.5118217",
"0.51145875",
"0.50970113",
"0.5081929",
"0.5081929",
"0.5046163",
"0.503652",
"0.50361484",
"0.5036073",
"0.50262797",
"0.5022672",
"0.501772",
"0.501772",
"0.50109273",
"0.50108045",
"0.49951702",
"0.498613"
] | 0.7462211 | 0 |
Construct a MethodType from its declaring method | private MethodType(MethodSymbol method) {
super(method.getName());
declarer = method.getDeclaringClass();
typeParams = Arrays.copyOf(method.getTypeParameters(), method.getTypeParameters().length);
paramTypes = Arrays.copyOf(method.getParameterTypes(), method.getParameterTypes().length);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static MethodType fromMethod(MethodSymbol method) {\n return new MethodType(method);\n }",
"Method createMethod();",
"Method createMethod();",
"public static StackManipulation of(JavaInstance.MethodType methodType) {\n Type[] parameterType = new Type[methodType.getParameterTypes().size()];\n int index = 0;\n for (TypeDescription typeDescription : methodType.getParameterTypes()) {\n parameterType[index++] = Type.getType(typeDescription.getDescriptor());\n }\n return new MethodTypeConstant(Type.getMethodType(Type.getType(methodType.getReturnType().getDescriptor()), parameterType));\n }",
"private MethodType(String name) {\n super(name);\n }",
"public MLMethod createMethod() {\n\t\tif (this.methodType == null) {\n\t\t\tthrow new EncogError(\n\t\t\t\t\t\"Please call selectMethod first to choose what type of method you wish to use.\");\n\t\t}\n\t\tMLMethodFactory methodFactory = new MLMethodFactory();\n\t\tMLMethod method = methodFactory.create(methodType, methodArgs, dataset\n\t\t\t\t.getNormHelper().calculateNormalizedInputCount(), this.config\n\t\t\t\t.determineOutputCount(dataset));\n\t\treturn method;\n\t}",
"H create(Method method);",
"private JCMethodDecl makeMethod(DiagnosticPosition diagPos, MethodSymbol mth, JCBlock mthBody, boolean isBound) {\n // build the parameter list\n ListBuffer<JCVariableDecl> params = ListBuffer.lb();\n for (VarSymbol vsym : mth.getParameters()) {\n Type vtype = vsym.asType();\n if (isBound) {\n VarMorphInfo vmi = typeMorpher.varMorphInfo(vsym);\n vtype = vmi.getMorphedType();\n }\n params.append(make.VarDef(\n make.Modifiers(0L), \n vsym.name, \n toJava.makeTypeTree(vtype, diagPos), \n null // no initial value\n ));\n }\n \n // make the method\n JCModifiers mods = make.Modifiers(Flags.PUBLIC | (mthBody==null? Flags.ABSTRACT : 0L));\n mods = JavafxToJava.addAccessAnnotationModifiers(mth.flags(), mods, (JavafxTreeMaker)make);\n return make.at(diagPos).MethodDef(\n mods, \n toJava.functionName(mth, false, isBound), \n toJava.makeReturnTypeTree(diagPos, mth, isBound), \n List.<JCTypeParameter>nil(), \n params.toList(), \n List.<JCExpression>nil(), \n mthBody, \n null);\n }",
"MethodStart createMethodStart();",
"MethodType getMethodType();",
"public static StackManipulation of(MethodDescription.InDefinedShape methodDescription) {\n return new MethodTypeConstant(Type.getMethodType(methodDescription.getDescriptor()));\n }",
"InstrumentedType withMethod(MethodDescription.Token token);",
"private void createMethod(MethodNode method, StringBuffer completion) {\n int insertedModifiers = method.getModifiers() & ~(Opcodes.ACC_NATIVE | Opcodes.ACC_ABSTRACT | Opcodes.ACC_PUBLIC);\n ASTNode.printModifiers(insertedModifiers, completion);\n\n //// Type parameters\n // ignore too difficult and not really needed for Groovy\n\n// GenericsType[] typeVariableBindings = method.getGenericsTypes();\n// if(typeVariableBindings != null && typeVariableBindings.length != 0) {\n// completion.append('<');\n// for (int i = 0; i < typeVariableBindings.length; i++) {\n// if(i != 0) {\n// completion.append(',');\n// completion.append(' ');\n// }\n// createTypeVariable(typeVariableBindings[i], completion);\n// }\n// completion.append('>');\n// completion.append(' ');\n// }\n\n //// Return type\n createType(method.getReturnType(), completion, false);\n completion.append(' ');\n\n //// Selector\n completion.append(method.getName());\n\n completion.append('(');\n\n ////Parameters\n Parameter[] parameters = method.getParameters();\n int length = parameters.length;\n for (int i = 0; i < length; i++) {\n if(i != 0) {\n completion.append(',');\n completion.append(' ');\n }\n createType(parameters[i].getType(), completion, true);\n completion.append(' ');\n completion.append(parameters[i].getName());\n }\n\n completion.append(')');\n\n //// Exceptions\n ClassNode[] exceptions = method.getExceptions();\n\n if (exceptions != null && exceptions.length > 0){\n completion.append(' ');\n completion.append(\"throws\");\n completion.append(' ');\n for(int i = 0; i < exceptions.length ; i++){\n if(i != 0) {\n completion.append(' ');\n completion.append(',');\n }\n createType(exceptions[i], completion, false);\n }\n }\n }",
"private MethodClass() {\r\n super(IMethodClass.TYPE_ID);\r\n }",
"public Method(String name, Type returnType, Type[] argumentTypes) {\n/* 98 */ this(name, Type.getMethodDescriptor(returnType, argumentTypes));\n/* */ }",
"abstract protected Set<Method> createMethods();",
"protected MethodTypeConstant(Type methodType) {\n this.methodType = methodType;\n }",
"ShipmentMethodType createShipmentMethodType();",
"@Test\n public void fromMethodResolverAndType() {\n\n MethodResolver methodResolver = MethodResolver.fromType(Person.class);\n\n assertThat(methodResolver).isNotNull();\n assertThat(methodResolver.getReferenceType()).isEqualTo(Person.class);\n }",
"public Method getResolvedFactoryMethod()\n/* */ {\n/* 293 */ synchronized (this.constructorArgumentLock) {\n/* 294 */ Object candidate = this.resolvedConstructorOrFactoryMethod;\n/* 295 */ return (candidate instanceof Method) ? (Method)candidate : null;\n/* */ }\n/* */ }",
"public Method getMethod();",
"Method getMethod();",
"Method getMethod();",
"HxMethod createMethod(final String returnType,\n final String methodName,\n final String... parameterTypes);",
"public interface ResolvedMethodLikeDeclaration extends ResolvedDeclaration, ResolvedTypeParametrizable, HasAccessSpecifier {\n\n /**\n * The package name of the declaring type.\n */\n default String getPackageName() {\n return declaringType().getPackageName();\n }\n\n /**\n * The class(es) wrapping the declaring type.\n */\n default String getClassName() {\n return declaringType().getClassName();\n }\n\n /**\n * The qualified name of the method composed by the qualfied name of the declaring type\n * followed by a dot and the name of the method.\n */\n default String getQualifiedName() {\n return declaringType().getQualifiedName() + \".\" + this.getName();\n }\n\n /**\n * The signature of the method.\n */\n default String getSignature() {\n StringBuilder sb = new StringBuilder();\n sb.append(getName());\n sb.append(\"(\");\n for (int i = 0; i < getNumberOfParams(); i++) {\n if (i != 0) {\n sb.append(\", \");\n }\n sb.append(getParam(i).describeType());\n }\n sb.append(\")\");\n return sb.toString();\n }\n\n /**\n * The qualified signature of the method. It is composed by the qualified name of the declaring type\n * followed by the signature of the method.\n */\n default String getQualifiedSignature() {\n return declaringType().getId() + \".\" + this.getSignature();\n }\n\n /**\n * The type in which the method is declared.\n */\n ResolvedReferenceTypeDeclaration declaringType();\n\n /**\n * Number of params.\n */\n int getNumberOfParams();\n\n /**\n * Get the ParameterDeclaration at the corresponding position or throw IllegalArgumentException.\n */\n ResolvedParameterDeclaration getParam(int i);\n\n /**\n * Utility method to get the last ParameterDeclaration. It throws UnsupportedOperationException if the method\n * has no parameters.\n * The last parameter can be variadic and sometimes it needs to be handled in a special way.\n */\n default ResolvedParameterDeclaration getLastParam() {\n if (getNumberOfParams() == 0) {\n throw new UnsupportedOperationException(\"This method has no typeParametersValues, therefore it has no a last parameter\");\n }\n return getParam(getNumberOfParams() - 1);\n }\n\n /**\n * Has the method or construcor a variadic parameter?\n * Note that when a method has a variadic parameter it should have an array type.\n */\n default boolean hasVariadicParameter() {\n if (getNumberOfParams() == 0) {\n return false;\n } else {\n return getParam(getNumberOfParams() - 1).isVariadic();\n }\n }\n\n @Override\n default Optional<ResolvedTypeParameterDeclaration> findTypeParameter(String name) {\n for (ResolvedTypeParameterDeclaration tp : this.getTypeParameters()) {\n if (tp.getName().equals(name)) {\n return Optional.of(tp);\n }\n }\n return declaringType().findTypeParameter(name);\n }\n\n /**\n * Number of exceptions listed in the throws clause.\n */\n int getNumberOfSpecifiedExceptions();\n\n /**\n * Type of the corresponding entry in the throws clause.\n *\n * @throws IllegalArgumentException if the index is negative or it is equal or greater than the value returned by\n * getNumberOfSpecifiedExceptions\n * @throws UnsupportedOperationException for those types of methods of constructor that do not declare exceptions\n */\n ResolvedType getSpecifiedException(int index);\n\n default List<ResolvedType> getSpecifiedExceptions() {\n if (getNumberOfSpecifiedExceptions() == 0) {\n return Collections.emptyList();\n } else {\n List<ResolvedType> exceptions = new LinkedList<>();\n for (int i = 0; i < getNumberOfSpecifiedExceptions(); i++) {\n exceptions.add(getSpecifiedException(i));\n }\n return exceptions;\n }\n }\n}",
"Type createType();",
"Type createType();",
"Type createType();",
"InstrumentedType withEnclosingMethod(MethodDescription.InDefinedShape enclosingMethod);",
"public static MethodType fromParameters(String name, Type... paramTypes) {\n MethodType type = new MethodType(name);\n type.paramTypes = Arrays.copyOf(paramTypes, paramTypes.length);\n return type;\n }",
"default HxMethod createMethod(final Class<?> returnType,\n final String methodName,\n final Class<?>... parameterTypes) {\n return createMethod(returnType.getName(),\n methodName,\n getHaxxor().toNormalizedClassnames(parameterTypes));\n }",
"public MethodDecl(int _line_, int _pos_, \n IType _type_, String _name_,\n List<Formal> _formals_, List<VarDecl> _varDecls_,\n List<IStatement> _statements_)\n {\n super(_line_, _pos_);\n \n setType(_type_);\n\n setName(_name_);\n\n setFormals(_formals_);\n\n setVarDecls(_varDecls_);\n\n setStatements(_statements_);\n\n setExp(null);\n\n }",
"public RandomVariableMethods getMethod(String methodType)\n {\n if(methodType.equalsIgnoreCase(\"poisson\"))\n {\n return new MethodPoisson();\n }\n return null;\n }",
"protected ResourceMethod defineMethod( String theName, JavaType theReturnType, HttpVerb theHttpVerb, String theMethodPath ) {\r\n\t\treturn new ResourceMethod( theName, theReturnType, theHttpVerb, theMethodPath, this );\r\n\t}",
"protected MethodTypeConstant()\n {\n super(CONSTANT_METHODTYPE);\n }",
"ResourceMethod getMethodType();",
"HxMethod createMethod(final HxType returnType,\n final String methodName,\n final HxType... parameterTypes);",
"HxMethod createMethodReference(final String declaringType,\n final String returnType,\n final String methodName,\n final String... parameterTypes);",
"@Override\n public ASTNode visitMethod(CoolParser.MethodContext ctx) {\n List<FormalNode> parameters = new LinkedList<>();\n for (var formal : ctx.formal()) {\n parameters.add((FormalNode) visitFormal(formal));\n }\n\n return new MethodNode(\n ctx.id,\n new IdNode(ctx.id),\n parameters,\n new TypeNode(ctx.returnType),\n (ExprNode) ctx.expr().accept(this));\n }",
"MethodName getMethod();",
"ClassMember getMethod () { return method; }",
"default HxMethod createMethodReference(final Class<?> declaringType,\n final Class<?> returnType,\n final String methodName,\n final Class<?>... parameterTypes) {\n return createMethodReference(\n declaringType.getName(),\n returnType.getName(),\n methodName,\n getHaxxor().toNormalizedClassnames(parameterTypes)\n );\n }",
"MethodType (ClassMember m, Type r, ExpressionList args) {\r\n this (m.name, r, args);\r\n method = m;\r\n }",
"public static MethodBuilder method() {\n\t\treturn new MethodBuilder();\n\t}",
"public interface MethodInfo {\n\t/**\n\t * Returns the class which declared the method.\n\t */\n\tpublic ClassInfo declaringClass();\n\n\t/**\n\t * Returns the index into the constant pool of the name of the method.\n\t */\n\tpublic int nameIndex();\n\n\t/**\n\t * Returns the index into the constant pool of the type of the method.\n\t */\n\tpublic int typeIndex();\n\n\t/**\n\t * Sets the index into the constant pool of the name of the method.\n\t */\n\tpublic void setNameIndex(int index);\n\n\t/**\n\t * Set the index into the constant pool of the type of the method.\n\t * \n\t * @param index\n\t * The index into the constant pool of the type of the method.\n\t */\n\tpublic void setTypeIndex(int index);\n\n\t/**\n\t * Set the modifiers of the method. The values correspond to the constants\n\t * in the Modifiers class.\n\t * \n\t * @param modifiers\n\t * A bit vector of modifier flags for the method.\n\t * @see Modifiers\n\t */\n\tpublic void setModifiers(int modifiers);\n\n\t/**\n\t * Get the modifiers of the method. The values correspond to the constants\n\t * in the Modifiers class.\n\t * \n\t * @return A bit vector of modifier flags for the method.\n\t * @see Modifiers\n\t */\n\tpublic int modifiers();\n\n\t/**\n\t * Get the indices into the constant pool of the types of the exceptions\n\t * thrown by the method.\n\t * \n\t * @return The indices into the constant pool of the types of the exceptions\n\t * thrown by the method.\n\t */\n\tpublic int[] exceptionTypes();\n\n\t/**\n\t * Get the maximum height of the operand stack.\n\t * \n\t * @return The maximum height of the operand stack.\n\t */\n\tpublic int maxStack();\n\n\t/**\n\t * Set the maximum height of the operand stack.\n\t * \n\t * @param maxStack\n\t * The maximum height of the operand stack.\n\t */\n\tpublic void setMaxStack(int maxStack);\n\n\t/**\n\t * Get the maximum number of locals used in the method.\n\t * \n\t * @return The maximum number of locals used in the method.\n\t */\n\tpublic int maxLocals();\n\n\t/**\n\t * Set the maximum number of locals used in the method.\n\t * \n\t * @param maxLocals\n\t * The maximum number of locals used in the method.\n\t */\n\tpublic void setMaxLocals(int maxLocals);\n\n\t/**\n\t * Get the byte code array of the method.\n\t * \n\t * @return The byte code array of the method.\n\t */\n\tpublic byte[] code();\n\n\t/**\n\t * Set the byte code array of the method.\n\t * \n\t * @param code\n\t * The byte code array of the method.\n\t */\n\tpublic void setCode(byte[] code);\n\n\t/**\n\t * Get the line number debug info of the instructions in the method.\n\t * \n\t * @return The line numbers of the instructions in the method. The array\n\t * will be of size 0 if the method has no line number debug info.\n\t */\n\tpublic LineNumberDebugInfo[] lineNumbers();\n\n\t/**\n\t * Set the line number debug info of the instructions in the method.\n\t * \n\t * @param lineNumbers\n\t * The line numbers of the instructions in the method. The array\n\t * will be of size 0 if the method has no line number debug info.\n\t */\n\tpublic void setLineNumbers(LineNumberDebugInfo[] lineNumbers);\n\n\t/**\n\t * Get the local variable debug information for the method.\n\t * \n\t * @return The local variables in the method. The array will be of size 0 if\n\t * the method has no local variable debug info.\n\t */\n\tpublic LocalDebugInfo[] locals();\n\n\t/**\n\t * Set the local variables in the method.\n\t * \n\t * @param locals\n\t * The local variables in the method.\n\t */\n\tpublic void setLocals(LocalDebugInfo[] locals);\n\n\t/**\n\t * Get the exception handlers in the method.\n\t * \n\t * @return The exception handlers in the method.\n\t */\n\tpublic Catch[] exceptionHandlers();\n\n\t/**\n\t * Set the exception handlers in the method.\n\t * \n\t * @param exceptions\n\t * The exception handlers in the method.\n\t */\n\tpublic void setExceptionHandlers(Catch[] exceptions);\n\n\t/**\n\t * Creates a clone of this <tt>MethodInfo</tt> except that its declaring\n\t * class does not know about it.\n\t */\n\tpublic Object clone();\n}",
"Methodsig getMethod();",
"MethodInvocation getImplicitInvocationType();",
"public MethodBuilder type(String type) {\n\t\tthis.type = type;\n\t\treturn this;\n\t}",
"Type getMethodParameterType() throws IllegalArgumentException;",
"ProcedureDecl createProcedureDecl();",
"public JMethod(SourceInfo info, String name, JDeclaredType enclosingType,\n JType returnType, boolean isAbstract, boolean isStatic, boolean isFinal,\n boolean isPrivate) {\n super(info);\n this.name = StringInterner.get().intern(name);\n this.enclosingType = enclosingType;\n this.returnType = returnType;\n this.isAbstract = isAbstract;\n this.isStatic = isStatic;\n this.isFinal = isFinal;\n this.isPrivate = isPrivate;\n }",
"public MethodInfoImpl() {\n }",
"public static Method getMethod(String method) throws IllegalArgumentException {\n/* 119 */ return getMethod(method, false);\n/* */ }",
"HxMethod createConstructor(final String... parameterTypes);",
"static <T> ConvertibleType<T> of(Method getter, TypedMap<T> annotations) {\n return new ConvertibleType<T>(getter.getGenericReturnType(), annotations, getter);\n }",
"TypeDef createTypeDef();",
"TypeDefinition createTypeDefinition();",
"Class<H> getMethodClass();",
"static ApexQualifiedName ofMethod(ASTMethod node) {\n ASTUserEnum enumParent = node.ancestors(ASTUserEnum.class).first();\n if (enumParent != null) {\n ApexQualifiedName baseName = enumParent.getQualifiedName();\n\n return new ApexQualifiedName(baseName.nameSpace, baseName.classes, getOperationString(node));\n }\n\n ASTUserClassOrInterface<?> parent = node.ancestors(ASTUserClassOrInterface.class).firstOrThrow();\n if (parent instanceof ASTUserTrigger) {\n ASTUserTrigger trigger = (ASTUserTrigger) parent;\n String ns = trigger.getNamespace();\n String targetObj = trigger.getTargetName();\n\n return new ApexQualifiedName(StringUtils.isEmpty(ns) ? \"c\" : ns, new String[]{\"trigger\", targetObj}, trigger.getImage()); // uses a reserved word as a class name to prevent clashes\n\n } else {\n ApexQualifiedName baseName = parent.getQualifiedName();\n\n return new ApexQualifiedName(baseName.nameSpace, baseName.classes, getOperationString(node));\n }\n }",
"public void visit(MethodDecl n) \n\t{\n\t\tClassSymbolTable cst = (ClassSymbolTable) currentScope;\n\t\n\t\tString returnType = getTypeStr(n.t);\n\t\tString name = n.i.toString();\n\t\tString[] paramNames = new String[n.fl.size()+1];\n\t\tString[] paramTypes = new String[n.fl.size()+1];\n\t\t\n\t\t//Add \"this\" parameter of the class type to the first arg\n\t\tparamNames[0] = \"this\";\n\t\tparamTypes[0] = cst.getName();\n\t\t\n\t\tn.t.accept(this);\n\t\tn.i.accept(this);\n \n\t\t//Check for redef in method arguments\n\t\tHashSet<String> methodArgs = new HashSet<String>();\n\t\n\t\tfor ( int i = 0; i < n.fl.size(); i++ ) \n\t\t{\n\t\t\tif(!methodArgs.add(n.fl.elementAt(i).i.toString()))\n\t\t\t{\n\t\t\t\tredefError(n.fl.elementAt(i).i.toString(), n.fl.elementAt(i).i.lineNum, n.fl.elementAt(i).i.charNum);\n\t\t\t}\n\t\t\tparamNames[n.fl.size()-i] = n.fl.elementAt(i).i.toString();\n\t\t\tparamTypes[n.fl.size()-i] = getTypeStr(n.fl.elementAt(i).t);\n\t\t\tn.fl.elementAt(i).accept(this);\n\t\t}\n\t\t\n\t\tcst.addMethod(name, paramNames, paramTypes, returnType);\n\t\tcurrentScope = cst.enterScope(name);\n\t\t\n\t\tfor ( int i = 0; i < n.vl.size(); i++ ) \n\t\t{\n\t\t\tn.vl.elementAt(i).accept(this);\n\t\t}\n\t\t\n\t\tfor ( int i = 0; i < n.sl.size(); i++ ) \n\t\t{\n\t\t\tn.sl.elementAt(i).accept(this);\n\t\t}\n \n\t\tn.e.accept(this);\n\t\t\n\t\tcurrentScope = currentScope.exitScope();\n\t}",
"static Identifier makeClassMethod(final QualifiedName name) {\r\n if (name == null) {\r\n return null;\r\n } else {\r\n return new Identifier(Category.CLASS_METHOD, name);\r\n }\r\n }",
"@Override\n public VarTypes getType(Analyzer analyzer) throws InvalidMethodException, InvalidTypeException {\n VarTypes returnType = analyzer.getSignature(callee).getReturnType();\n if (returnType == VarTypes.VOID) {\n throw new InvalidTypeException(VarTypes.VOID.getName());\n }\n return returnType;\n }",
"public static MethodModel createMethodModel(CompilationController controller, ExecutableElement method) {\n Parameters.notNull(\"controller\", controller); // NOI18N\n Parameters.notNull(\"method\", method); // NOI18N\n List<MethodModel.Variable> parameters = new ArrayList<MethodModel.Variable>();\n for (VariableElement variableElement : method.getParameters()) {\n String type = getTypeName(variableElement.asType());\n String name = variableElement.getSimpleName().toString();\n try{\n parameters.add(MethodModel.Variable.create(type, name));\n }catch(IllegalArgumentException iae){\n //in case of illegal arguments, for ex. illegal parameter/method name\n return null;\n }\n }\n List<String> exceptions = new ArrayList<String>();\n for (TypeMirror typeMirror : method.getThrownTypes()) {\n exceptions.add(getTypeName(typeMirror));\n }\n MethodModel mm = null;\n try{\n mm = MethodModel.create(\n method.getSimpleName().toString(),\n getTypeName(method.getReturnType()),\n //TODO: RETOUCHE get body of method\n \"\",\n parameters,\n exceptions,\n method.getModifiers()\n );\n }catch(IllegalArgumentException iae){\n return null;\n }\n return mm;\n }",
"public interface MethodFactory extends ModuleSupportable\n{\n\t/**\n\tUsed to identify this interface when finding it with the Monitor.\n\t**/\n\tpublic static final String MODULE = \n\t \"com.splicemachine.db.iapi.store.access.conglomerate.MethodFactory\";\n\n\t/**\n\tReturn the default properties for this access method.\n\t**/\n\tProperties defaultProperties();\n\n\t/**\n\tReturn whether this access method implements the implementation\n\ttype given in the argument string.\n\t**/\n\tboolean supportsImplementation(String implementationId);\n\n\t/**\n\tReturn the primary implementation type for this access method.\n\tAlthough an access method may implement more than one implementation\n\ttype, this is the expected one. The access manager will put the\n\tprimary implementation type in a hash table for fast access.\n\t**/\n\tString primaryImplementationType();\n\n\t/**\n\tReturn whether this access method supports the format supplied in\n\tthe argument.\n\t**/\n\tboolean supportsFormat(UUID formatid);\n\n\t/**\n\tReturn the primary format that this access method supports.\n\tAlthough an access method may support more than one format, this\n\tis the usual one. the access manager will put the primary format\n\tin a hash table for fast access to the appropriate method.\n\t**/\n\tUUID primaryFormat();\n}",
"public static MethodBuilder constructor(String name) {\n\t\treturn new MethodBuilder().returnType(\"\").name(name);\n\t}",
"void addMethod(Method method);",
"public abstract jq_Method getDefiningMethod();",
"HxMethod createConstructor(final HxType... parameterTypes);",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic boolean visit(MethodDeclaration node) {\r\n\t\tIMethodBinding imb = node.resolveBinding();\r\n\t\tIJavaElement ije = imb.getJavaElement();\r\n\t\tif (ije instanceof IMethod) {\r\n\t\t\tIMethod im = (IMethod) ije;\r\n\t\t\tList<SingleVariableDeclaration> para_list = node.parameters();\r\n\t\t\tIRGeneratorHelper.HandleMethodDeclaration(java_project, graph_manager, node.getBody(), ele_factory,\r\n\t\t\t\t\tstmt_factory, imb, im, it, para_list, super_class_element, type_declare_resource, type_declare);\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public X10MethodInstance createMethodInstance(Type container, Name name, List<Type> typeArgs, List<Type> argTypes, Context context) {\n try {\n return xts.findMethod(container, xts.MethodMatcher(container, name, typeArgs, argTypes, context));\n } catch (SemanticException e) {\n throw new InternalCompilerError(\"Unable to find required method instance\", container.position(), e);\n }\n }",
"private ConstrainedMethod findMethodMetaData(Method method) {\n\n\t\tList<ConstrainedParameter> parameterConstraints = getParameterMetaData( method );\n\t\tboolean isCascading = method.isAnnotationPresent( Valid.class );\n\t\tSet<MetaConstraint<?>> constraints =\n\t\t\t\tconvertToMetaConstraints( findConstraints( method, ElementType.METHOD ), method );\n\n\t\treturn new ConstrainedMethod(\n\t\t\t\tConfigurationSource.ANNOTATION,\n\t\t\t\tnew MethodConstraintLocation( method ),\n\t\t\t\tparameterConstraints,\n\t\t\t\tconstraints,\n\t\t\t\tisCascading\n\t\t);\n\t}",
"public Type visit(MethodDecl n) {\n\t\tn.t.accept(this);\n\n\t\tString identificador = n.i.toString();\n\t\tthis.currMethod = this.currClass.getMethod(identificador);\n\t\tType tipoMetodo = this.currMethod.type();\n\n\t\tn.i.accept(this);\n\t\tfor (int i = 0; i < n.fl.size(); i++) {\n\t\t\tn.fl.elementAt(i).accept(this);\n\t\t}\n\t\tfor (int i = 0; i < n.vl.size(); i++) {\n\t\t\tn.vl.elementAt(i).accept(this);\n\t\t}\n\t\tfor (int i = 0; i < n.sl.size(); i++) {\n\t\t\tn.sl.elementAt(i).accept(this);\n\t\t}\n\t\tif (!(this.symbolTable.compareTypes(n.e.accept(this), tipoMetodo))) {\n\t\t\t//Erro\n\t\t\tSystem.out.println(\"O retorno do método \" + this.currMethod.getId() + \" é do tipo errado\");\n\t\t}\n\t\treturn null;\n\t}",
"protected ResourceMethod defineMethod( String theName, Type theReturnType, HttpVerb theHttpVerb, String theMethodPath ) {\r\n\t\treturn this.defineMethod(theName, new JavaType( theReturnType ), theHttpVerb, theMethodPath);\r\n\t}",
"private IMethod findMethod(IType type, String sourceMethod) throws JavaModelException {\n\t\tIMethod[] methods = type.getMethods();\r\n\t\tfor (IMethod method : methods) {\r\n\t\t\tif (sourceMethod.equals(method.getElementName())) {\r\n\t\t\t\treturn method;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"private <T> MethodDispatcherInfo createMethodDispatcherInfo (final Class<T> cls, final Method method) {\n\t\tif (!CompletableFuture.class.isAssignableFrom (method.getReturnType ())) {\r\n\t\t\tthrow new IllegalArgumentException (\"Method \" + cls.getCanonicalName () + \"#\" + method.getName () + \" should return \" + CompletableFuture.class.getCanonicalName ());\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tfinal MethodHandle methodHandle = MethodHandles.lookup ().unreflect (method);\r\n\t\t\t\r\n\t\t\treturn new MethodDispatcherInfo (new MethodReference (cls, method.getName (), Arrays.asList (method.getParameterTypes ())), methodHandle);\r\n\t\t} catch (IllegalAccessException e) {\r\n\t\t\tthrow new RuntimeException (e);\r\n\t\t}\r\n\t}",
"public void translateInstantiation( MethodTranslator method, New newInsn );",
"org.hl7.fhir.CodeableConcept addNewMethod();",
"public void addMethodDeclaration(MethodDeclaration method) {\n methodDeclarations.add(method);\n }",
"Method addMethod(PositionString name, Symbol resultType, Iterator<Variable> parameters,\n\t\t\tModifier modifier) throws\n\t\t\tDuplicateIdentifierException, ShadowedIdentifierException, WrongModifierException, InvalidIdentifierException;",
"public org.python.types.Type __new__(org.python.types.Type cls);",
"public static <R> PyActorMethod<R> of(String methodName, Class<R> returnType) {\n return new PyActorMethod<>(methodName, returnType);\n }",
"NamedType createNamedType();",
"protected Method buildMethod(Class methodClass, String methodName, Class[] methodParameterTypes) throws DescriptorException {\n try {\n return Helper.getDeclaredMethod(methodClass, methodName, methodParameterTypes);\n } catch (NoSuchMethodException exception) {\n throw DescriptorException.noSuchMethodWhileInitializingInstantiationPolicy(methodClass.getName() + \".\" + methodName, this.getDescriptor(), exception);\n } catch (SecurityException exception) {\n throw DescriptorException.securityWhileInitializingInstantiationPolicy(methodClass.getName() + \".\" + methodName, this.getDescriptor(), exception);\n }\n }",
"FunctionDecl createFunctionDecl();",
"public MethodBuilder() {\n\t\tvisibility = \"public\";\n\t\treturnType = \"void\";\n\t\tname = \"foo\";\n\t\trule = \"\";\n\t\ttype = \"\";\n\t\tparameters = new ArrayList<String>();\n\t\tcommands = new ArrayList<String>();\n\t}",
"public Object visit(Method node){\n ClassTreeNode treeNode = classMap.get(currentClass);\n treeNode.getMethodSymbolTable().add(node.getName(), node);\n //System.out.println(\"Adding method \" + node.getName() + \" to \" + currentClass);\n treeNode.getVarSymbolTable().enterScope();\n super.visit(node);\n return null;\n }",
"protected MethodStructEntry createMethodStructureInformation(DetailedTypeStructEntry typeStructEntry, MethodDefinition method) {\n\t\tList<TypeDefinition> returnTypeList = method.getReturnTypeDefinition(true);\n\t\tif (returnTypeList != null) {\n\t\t\tfor (TypeDefinition returnType : returnTypeList) {\n\t\t\t\tif (returnType == null) continue;\n\t\t\t\tif (returnType.isDetailedType()) typeStructEntry.addUsedType((DetailedTypeDefinition)returnType);\n\t\t\t}\n\t\t}\n\n\t\t// Scan the throw types of the method\n\t\tList<TypeReference> throwTypeReferenceList = method.getThrowTypeList();\n\t\tif (throwTypeReferenceList != null) {\n\t\t\tfor (TypeReference throwTypeReference : throwTypeReferenceList) {\n\t\t\t\tthrowTypeReference.resolveBinding();\n\t\t\t\tif (throwTypeReference.isResolved()) {\n\t\t\t\t\tTypeDefinition throwType = (TypeDefinition)throwTypeReference.getDefinition(); \n\t\t\t\t\tif (throwType.isDetailedType()) typeStructEntry.addUsedType((DetailedTypeDefinition)throwType);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tMethodStructEntry currentEntry = new MethodStructEntry(method);\n\t\tcurrentEntry.initializeStructureInformation();\n\t\t// Scan the parameters of the method\n\t\tList<VariableDefinition> parameterList = method.getParameterList();\n\t\tif (parameterList != null) {\n\t\t\tfor (VariableDefinition parameter : parameterList) {\n\t\t\t\tList<TypeDefinition> oneParameterTypes = parameter.getTypeDefinition(true);\n\t\t\t\tif (oneParameterTypes != null) {\n\t\t\t\t\tfor (TypeDefinition parameterType : oneParameterTypes) {\n\t\t\t\t\t\tif (parameterType == null) continue;\n\t\t\t\t\t\tif (parameterType.isDetailedType()) {\n\t\t\t\t\t\t\ttypeStructEntry.addUsedType((DetailedTypeDefinition)parameterType);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcurrentEntry.addParameterType(parameterType);\n\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// Scan the body of the method\n\t\tList<NameReference> referenceList = referenceCreator.createReferences(method);\n\t\tscanReferenceInMethodBody(typeStructEntry, currentEntry, referenceList);\n\t\treturn currentEntry;\n\t}",
"public static CanCache forMethod(MethodDescription.InDefinedShape methodDescription) {\n if (methodDescription.isTypeInitializer()) {\n return CanCacheIllegal.INSTANCE;\n } else if (methodDescription.isConstructor()) {\n return new ForConstructor(methodDescription);\n } else {\n return new ForMethod(methodDescription);\n }\n }",
"static Method getDefinitionMethod(ContainerRequestContext requestContext) {\n if (!(requestContext.getUriInfo() instanceof ExtendedUriInfo)) {\n throw new IllegalStateException(\"Could not get Extended Uri Info. Incompatible version of Jersey?\");\n }\n\n ExtendedUriInfo uriInfo = (ExtendedUriInfo) requestContext.getUriInfo();\n ResourceMethod matchedResourceMethod = uriInfo.getMatchedResourceMethod();\n Invocable invocable = matchedResourceMethod.getInvocable();\n return invocable.getDefinitionMethod();\n }",
"@Nullable\n abstract Method getMethod();",
"public Method addMethod(String sName, String sSig)\n {\n ensureLoaded();\n Method method = new Method(sName, sSig, m_flags.isInterface());\n m_tblMethod.put(method.getIdentity(), method);\n setModified(true);\n return method;\n }",
"TypeImport createTypeImport();",
"public void testCreateEmptyMethod() {\n IDOMMethod method = this.domFactory.createMethod();\n method.setName(\"foo\");\n assertSourceEquals(\"source code incorrect\", \"public void foo() {\\n\" + \"}\\n\", method.getContents());\n }",
"protected void createGetSignatureMethod() {\n MethodVisitor cv = m_cw.visitMethod(\n ACC_PUBLIC,\n GET_SIGNATURE_METHOD_NAME,\n GET_SIGNATURE_METHOD_SIGNATURE,\n null,\n null\n );\n cv.visitFieldInsn(\n GETSTATIC, m_joinPointClassName,\n SIGNATURE_FIELD_NAME, FIELD_SIGNATURE_IMPL_CLASS_SIGNATURE\n );\n cv.visitInsn(ARETURN);\n cv.visitMaxs(0, 0);\n }",
"BOpMethod createBOpMethod();",
"TypeDecl createTypeDecl();",
"MethodType (String m, Type r, ExpressionList args) {\r\n name = m;\r\n return_type = r;\r\n arguments = args;\r\n body = null;\r\n }",
"public AmbiguousMethodException() {\n super();\n }",
"@Override\n\tpublic Object visitMethodDecl(MethodDecl myMethod) {\n\t\tif (!currentClass.methodTable.containsKey(myMethod.name)) {\n\t\t\tcurrentClass.methodTable.put(myMethod.name, myMethod);\n\t\t}\n\t\telse {\n\t\t\terrorMsg.error(myMethod.pos, \"Error: duplicate method declaration: \" + myMethod.name);\n\t\t\treturn null;\n\t\t}\n\n\t\t// no need to traverse subnodes, nothing lower down that we need to do anything with\n\t\treturn null;\n\t}",
"public static PyActorMethod<Object> of(String methodName) {\n return of(methodName, Object.class);\n }"
] | [
"0.76130146",
"0.68689036",
"0.68689036",
"0.6375459",
"0.6197827",
"0.5992154",
"0.59424376",
"0.5907172",
"0.5880572",
"0.5846136",
"0.5802276",
"0.5794801",
"0.56895375",
"0.5660668",
"0.5595911",
"0.5533857",
"0.55280924",
"0.54930365",
"0.5470828",
"0.54545546",
"0.5451961",
"0.5445503",
"0.5445503",
"0.5425646",
"0.5394671",
"0.53796166",
"0.53796166",
"0.53796166",
"0.5374444",
"0.53614205",
"0.53427285",
"0.53400713",
"0.5310403",
"0.5296505",
"0.5231781",
"0.52310723",
"0.5223894",
"0.52178746",
"0.51749384",
"0.51664233",
"0.5160388",
"0.51566154",
"0.51563394",
"0.51495814",
"0.5143275",
"0.5137109",
"0.5133766",
"0.51245856",
"0.512419",
"0.5109262",
"0.5101307",
"0.50751865",
"0.5056599",
"0.5046519",
"0.5027712",
"0.5013141",
"0.5005653",
"0.5000864",
"0.49744302",
"0.49608028",
"0.49604815",
"0.495929",
"0.49482787",
"0.49448803",
"0.49339673",
"0.49274954",
"0.49254274",
"0.4924457",
"0.49093148",
"0.48949692",
"0.48878932",
"0.48682436",
"0.4860489",
"0.4855816",
"0.48483488",
"0.4846223",
"0.48431247",
"0.4819788",
"0.48178205",
"0.47959965",
"0.47859874",
"0.47832802",
"0.47745687",
"0.4760592",
"0.47604027",
"0.47581232",
"0.4757747",
"0.4741195",
"0.47376448",
"0.4734953",
"0.47298014",
"0.47223786",
"0.47172",
"0.47059837",
"0.47021577",
"0.46937767",
"0.46923545",
"0.46887565",
"0.4676264",
"0.46739045"
] | 0.6693151 | 3 |
Build a MethodType from its name and parameter types | public static MethodType fromParameters(String name, Type... paramTypes) {
MethodType type = new MethodType(name);
type.paramTypes = Arrays.copyOf(paramTypes, paramTypes.length);
return type;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private MethodType(String name) {\n super(name);\n }",
"HxMethod createMethod(final String returnType,\n final String methodName,\n final String... parameterTypes);",
"public static StackManipulation of(JavaInstance.MethodType methodType) {\n Type[] parameterType = new Type[methodType.getParameterTypes().size()];\n int index = 0;\n for (TypeDescription typeDescription : methodType.getParameterTypes()) {\n parameterType[index++] = Type.getType(typeDescription.getDescriptor());\n }\n return new MethodTypeConstant(Type.getMethodType(Type.getType(methodType.getReturnType().getDescriptor()), parameterType));\n }",
"HxMethod createConstructor(final String... parameterTypes);",
"public static MethodType fromMethod(MethodSymbol method) {\n return new MethodType(method);\n }",
"private MethodType(MethodSymbol method) {\n super(method.getName());\n declarer = method.getDeclaringClass();\n typeParams = Arrays.copyOf(method.getTypeParameters(), method.getTypeParameters().length);\n paramTypes = Arrays.copyOf(method.getParameterTypes(), method.getParameterTypes().length);\n }",
"HxMethod createMethod(final HxType returnType,\n final String methodName,\n final HxType... parameterTypes);",
"public Method(String name, Type returnType, Type[] argumentTypes) {\n/* 98 */ this(name, Type.getMethodDescriptor(returnType, argumentTypes));\n/* */ }",
"Type getMethodParameterType() throws IllegalArgumentException;",
"public String getMethodName(Class<?> type, String methodName, Class<?>... params);",
"public static MethodBuilder constructor(String name) {\n\t\treturn new MethodBuilder().returnType(\"\").name(name);\n\t}",
"Method createMethod();",
"Method createMethod();",
"public MethodBuilder type(String type) {\n\t\tthis.type = type;\n\t\treturn this;\n\t}",
"default HxMethod createMethod(final Class<?> returnType,\n final String methodName,\n final Class<?>... parameterTypes) {\n return createMethod(returnType.getName(),\n methodName,\n getHaxxor().toNormalizedClassnames(parameterTypes));\n }",
"public Type type(String name);",
"private JCMethodDecl makeMethod(DiagnosticPosition diagPos, MethodSymbol mth, JCBlock mthBody, boolean isBound) {\n // build the parameter list\n ListBuffer<JCVariableDecl> params = ListBuffer.lb();\n for (VarSymbol vsym : mth.getParameters()) {\n Type vtype = vsym.asType();\n if (isBound) {\n VarMorphInfo vmi = typeMorpher.varMorphInfo(vsym);\n vtype = vmi.getMorphedType();\n }\n params.append(make.VarDef(\n make.Modifiers(0L), \n vsym.name, \n toJava.makeTypeTree(vtype, diagPos), \n null // no initial value\n ));\n }\n \n // make the method\n JCModifiers mods = make.Modifiers(Flags.PUBLIC | (mthBody==null? Flags.ABSTRACT : 0L));\n mods = JavafxToJava.addAccessAnnotationModifiers(mth.flags(), mods, (JavafxTreeMaker)make);\n return make.at(diagPos).MethodDef(\n mods, \n toJava.functionName(mth, false, isBound), \n toJava.makeReturnTypeTree(diagPos, mth, isBound), \n List.<JCTypeParameter>nil(), \n params.toList(), \n List.<JCExpression>nil(), \n mthBody, \n null);\n }",
"HxMethod createConstructor(final HxType... parameterTypes);",
"private String[] getParameterTypeNames(MethodNode method) {\n GenericsMapper mapper = null;\n ClassNode declaringClass = method.getDeclaringClass();\n if (declaringClass.getGenericsTypes() != null && declaringClass.getGenericsTypes().length > 0) {\n if (!mappers.containsKey(declaringClass)) {\n ClassNode thiz = getClassNode();\n mapper = GenericsMapper.gatherGenerics(findResolvedType(thiz, declaringClass), declaringClass);\n } else {\n mapper = mappers.get(declaringClass);\n }\n }\n Parameter[] parameters = method.getParameters();\n String[] paramTypeNames = new String[parameters.length];\n for (int i = 0; i < paramTypeNames.length; i++) {\n ClassNode paramType = parameters[i].getType();\n if (mapper != null && paramType.getGenericsTypes() != null && paramType.getGenericsTypes().length > 0) {\n paramType = VariableScope.resolveTypeParameterization(mapper, VariableScope.clone(paramType));\n }\n paramTypeNames[i] = paramType.getName();\n if (paramTypeNames[i].startsWith(\"[\")) {\n int cnt = Signature.getArrayCount(paramTypeNames[i]);\n String sig = Signature.getElementType(paramTypeNames[i]);\n String qualifier = Signature.getSignatureQualifier(sig);\n String simple = Signature.getSignatureSimpleName(sig);\n StringBuilder sb = new StringBuilder();\n if (qualifier.length() > 0) {\n sb.append(qualifier).append(\".\");\n }\n sb.append(simple);\n for (int j = 0; j < cnt; j++) {\n sb.append(\"[]\");\n }\n paramTypeNames[i] = sb.toString();\n }\n }\n return paramTypeNames;\n }",
"public ParameterType getType();",
"Type createType();",
"Type createType();",
"Type createType();",
"private static Method _getMethodForClass(Class targetClass, String methodName, String[] paramTypeNames)\n throws ClassNotFoundException, NoSuchMethodException\n {\n int numParams = (paramTypeNames != null ? paramTypeNames.length : 0);\n Class[] paramTypes = new Class[numParams];\n ClassLoader loader = targetClass.getClassLoader();\n for (int i = 0; i<numParams; i++)\n {\n\tString typeName = paramTypeNames[i];\n\tif (typeName.equals(\"int\"))\n\t paramTypes[i] = Integer.TYPE;\n\telse if (typeName.equals(\"double\"))\n\t paramTypes[i] = Double.TYPE;\n\telse if (typeName.equals(\"boolean\"))\n\t paramTypes[i] = Boolean.TYPE;\n\telse if (loader == null)\n\t paramTypes[i] = Class.forName(paramTypeNames[i]);\n\telse\n\t paramTypes[i] = loader.loadClass(paramTypeNames[i]);\n }\n Method method = targetClass.getMethod(methodName, paramTypes);\n return method;\n }",
"NamedType createNamedType();",
"HxMethod createMethodReference(final String declaringType,\n final String returnType,\n final String methodName,\n final String... parameterTypes);",
"public MLMethod createMethod() {\n\t\tif (this.methodType == null) {\n\t\t\tthrow new EncogError(\n\t\t\t\t\t\"Please call selectMethod first to choose what type of method you wish to use.\");\n\t\t}\n\t\tMLMethodFactory methodFactory = new MLMethodFactory();\n\t\tMLMethod method = methodFactory.create(methodType, methodArgs, dataset\n\t\t\t\t.getNormHelper().calculateNormalizedInputCount(), this.config\n\t\t\t\t.determineOutputCount(dataset));\n\t\treturn method;\n\t}",
"AnnotationProvider getMethodAnnotationProvider(String methodName, Class... parameterTypes);",
"private void createMethod(MethodNode method, StringBuffer completion) {\n int insertedModifiers = method.getModifiers() & ~(Opcodes.ACC_NATIVE | Opcodes.ACC_ABSTRACT | Opcodes.ACC_PUBLIC);\n ASTNode.printModifiers(insertedModifiers, completion);\n\n //// Type parameters\n // ignore too difficult and not really needed for Groovy\n\n// GenericsType[] typeVariableBindings = method.getGenericsTypes();\n// if(typeVariableBindings != null && typeVariableBindings.length != 0) {\n// completion.append('<');\n// for (int i = 0; i < typeVariableBindings.length; i++) {\n// if(i != 0) {\n// completion.append(',');\n// completion.append(' ');\n// }\n// createTypeVariable(typeVariableBindings[i], completion);\n// }\n// completion.append('>');\n// completion.append(' ');\n// }\n\n //// Return type\n createType(method.getReturnType(), completion, false);\n completion.append(' ');\n\n //// Selector\n completion.append(method.getName());\n\n completion.append('(');\n\n ////Parameters\n Parameter[] parameters = method.getParameters();\n int length = parameters.length;\n for (int i = 0; i < length; i++) {\n if(i != 0) {\n completion.append(',');\n completion.append(' ');\n }\n createType(parameters[i].getType(), completion, true);\n completion.append(' ');\n completion.append(parameters[i].getName());\n }\n\n completion.append(')');\n\n //// Exceptions\n ClassNode[] exceptions = method.getExceptions();\n\n if (exceptions != null && exceptions.length > 0){\n completion.append(' ');\n completion.append(\"throws\");\n completion.append(' ');\n for(int i = 0; i < exceptions.length ; i++){\n if(i != 0) {\n completion.append(' ');\n completion.append(',');\n }\n createType(exceptions[i], completion, false);\n }\n }\n }",
"public interface NameFactory\n{\n /**\n * Returns a unique (descriptive?) parameter name for the specified\n * type.\n *\n * @param sig - signature of the declaring method\n * @param n - the parameter number whose name we want.\n * @return a made up name for the n'th parameter\n */\n public String getParameterName(Signature sig, int n);\n}",
"List<Type> getTypeParameters();",
"Type getParameterType(Type[] types, String path);",
"Method addMethod(PositionString name, Symbol resultType, Iterator<Variable> parameters,\n\t\t\tModifier modifier) throws\n\t\t\tDuplicateIdentifierException, ShadowedIdentifierException, WrongModifierException, InvalidIdentifierException;",
"@Pure\n private static @Nonnull String createMethodCallWithMethodName(@Nonnull MethodInformation method, @Nonnull String methodName) {\n return methodName + FiniteIterable.of(method.getElement().getParameters()).map(parameter -> parameter.getSimpleName().toString()).join(Brackets.ROUND);\n }",
"public JMethod(SourceInfo info, String name, JDeclaredType enclosingType,\n JType returnType, boolean isAbstract, boolean isStatic, boolean isFinal,\n boolean isPrivate) {\n super(info);\n this.name = StringInterner.get().intern(name);\n this.enclosingType = enclosingType;\n this.returnType = returnType;\n this.isAbstract = isAbstract;\n this.isStatic = isStatic;\n this.isFinal = isFinal;\n this.isPrivate = isPrivate;\n }",
"String provideType();",
"@Test\n public void fromMethodResolverAndType() {\n\n MethodResolver methodResolver = MethodResolver.fromType(Person.class);\n\n assertThat(methodResolver).isNotNull();\n assertThat(methodResolver.getReferenceType()).isEqualTo(Person.class);\n }",
"default HxMethod createConstructor(final Class<?>... parameterTypes) {\n return createConstructor(getHaxxor().toNormalizedClassnames(parameterTypes));\n }",
"TypeInfo[] typeParams();",
"private static QualifiedName makePrimitiveInstanceMethodName(String methodName, String primitiveTypeName) {\r\n \r\n if(methodName == null || primitiveTypeName == null) {\r\n throw new IllegalArgumentException(\"makePrimitiveInstanceMethodName must not be passed null values\");\r\n }\r\n \r\n // Trivial case: If we are given the name of a primitive type in CAL form (eg, \"Int\")\r\n // then we don't need to do any particular work to get things into the correct form.\r\n if(Character.isUpperCase(primitiveTypeName.charAt(0))) {\r\n return QualifiedName.make(CAL_Prelude.MODULE_NAME, methodName + primitiveTypeName);\r\n }\r\n \r\n // Non-trivial case: we need to convert the first character of the primitive type name\r\n // to upper-case.\r\n StringBuilder buffer = new StringBuilder(methodName.length() + primitiveTypeName.length());\r\n buffer.append(methodName);\r\n buffer.append(Character.toUpperCase(primitiveTypeName.charAt(0)));\r\n buffer.append(primitiveTypeName.substring(1));\r\n \r\n return QualifiedName.make(CAL_Prelude.MODULE_NAME, buffer.toString());\r\n }",
"private static String getMethodSignature(Class[] paramTypes, Class retType) {\n StringBuffer sbuf = new StringBuffer();\n sbuf.append('(');\n for (int i = 0; i < paramTypes.length; i++) {\n sbuf.append(getClassSignature(paramTypes[i]));\n }\n sbuf.append(')');\n sbuf.append(getClassSignature(retType));\n return sbuf.toString();\n }",
"Setter buildParameterSetter(Type[] types, String path);",
"default HxMethod createMethodReference(final Class<?> declaringType,\n final Class<?> returnType,\n final String methodName,\n final Class<?>... parameterTypes) {\n return createMethodReference(\n declaringType.getName(),\n returnType.getName(),\n methodName,\n getHaxxor().toNormalizedClassnames(parameterTypes)\n );\n }",
"public static StackManipulation of(MethodDescription.InDefinedShape methodDescription) {\n return new MethodTypeConstant(Type.getMethodType(methodDescription.getDescriptor()));\n }",
"@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\tprivate static Map<Method, AssistedConstructor<?>> createMethodMapping(TypeLiteral<?> factoryType,\n\t\t\tTypeLiteral<?> implementationType) {\n\t\tList<AssistedConstructor<?>> constructors = Lists.newArrayList();\n\n\t\tfor (Constructor<?> constructor : implementationType.getRawType().getDeclaredConstructors()) {\n\t\t\tif (constructor.getAnnotation(AssistedInject.class) != null) {\n\t\t\t\t\n\t\t\t\tAssistedConstructor assistedConstructor = new AssistedConstructor(constructor,\n\t\t\t\t\t\timplementationType.getParameterTypes(constructor));\n\t\t\t\tconstructors.add(assistedConstructor);\n\t\t\t}\n\t\t}\n\n\t\tif (constructors.isEmpty()) {\n\t\t\treturn ImmutableMap.of();\n\t\t}\n\n\t\tMethod[] factoryMethods = factoryType.getRawType().getMethods();\n\n\t\tif (constructors.size() != factoryMethods.length) {\n\t\t\tthrow newConfigurationException(\"Constructor mismatch: %s has %s @AssistedInject \"\n\t\t\t\t\t+ \"constructors, factory %s has %s creation methods\", implementationType, constructors.size(),\n\t\t\t\t\tfactoryType, factoryMethods.length);\n\t\t}\n\n\t\tMap<ParameterListKey, AssistedConstructor> paramsToConstructor = Maps.newHashMap();\n\n\t\tfor (AssistedConstructor c : constructors) {\n\t\t\tif (paramsToConstructor.containsKey(c.getAssistedParameters())) {\n\t\t\t\tthrow new RuntimeException(\"Duplicate constructor, \" + c);\n\t\t\t}\n\t\t\tparamsToConstructor.put(c.getAssistedParameters(), c);\n\t\t}\n\n\t\tMap<Method, AssistedConstructor<?>> result = Maps.newHashMap();\n\t\tfor (Method method : factoryMethods) {\n\t\t\tif (!method.getReturnType().isAssignableFrom(implementationType.getRawType())) {\n\t\t\t\tthrow newConfigurationException(\"Return type of method %s is not assignable from %s\", method,\n\t\t\t\t\t\timplementationType);\n\t\t\t}\n\n\t\t\tList<Type> parameterTypes = Lists.newArrayList();\n\t\t\tfor (TypeLiteral<?> parameterType : factoryType.getParameterTypes(method)) {\n\t\t\t\tparameterTypes.add(parameterType.getType());\n\t\t\t}\n\t\t\tParameterListKey methodParams = new ParameterListKey(parameterTypes);\n\n\t\t\tif (!paramsToConstructor.containsKey(methodParams)) {\n\t\t\t\tthrow newConfigurationException(\"%s has no @AssistInject constructor that takes the \"\n\t\t\t\t\t\t+ \"@Assisted parameters %s in that order. @AssistInject constructors are %s\",\n\t\t\t\t\t\timplementationType, methodParams, paramsToConstructor.values());\n\t\t\t}\n\n\t\t\tmethod.getParameterAnnotations();\n\t\t\tfor (Annotation[] parameterAnnotations : method.getParameterAnnotations()) {\n\t\t\t\tfor (Annotation parameterAnnotation : parameterAnnotations) {\n\t\t\t\t\tif (parameterAnnotation.annotationType() == Assisted.class) {\n\t\t\t\t\t\tthrow newConfigurationException(\"Factory method %s has an @Assisted parameter, which \"\n\t\t\t\t\t\t\t\t+ \"is incompatible with the deprecated @AssistedInject annotation. Please replace \"\n\t\t\t\t\t\t\t\t+ \"@AssistedInject with @Inject on the %s constructor.\", method, implementationType);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tAssistedConstructor matchingConstructor = paramsToConstructor.remove(methodParams);\n\n\t\t\tresult.put(method, matchingConstructor);\n\t\t}\n\t\treturn result;\n\t}",
"char[][] getTypeParameterNames();",
"TypeDef createTypeDef();",
"TypeDefinition createTypeDefinition();",
"private JavaType(String name) {\n this.name = name;\n }",
"Getter buildParameterGetter(Type[] types, String path);",
"Type buildType( ClassLoader classloader ) \r\n throws IntrospectionException, IOException;",
"public MethodDecl(int _line_, int _pos_, \n IType _type_, String _name_,\n List<Formal> _formals_, List<VarDecl> _varDecls_,\n List<IStatement> _statements_)\n {\n super(_line_, _pos_);\n \n setType(_type_);\n\n setName(_name_);\n\n setFormals(_formals_);\n\n setVarDecls(_varDecls_);\n\n setStatements(_statements_);\n\n setExp(null);\n\n }",
"public interface MethodFactory extends ModuleSupportable\n{\n\t/**\n\tUsed to identify this interface when finding it with the Monitor.\n\t**/\n\tpublic static final String MODULE = \n\t \"com.splicemachine.db.iapi.store.access.conglomerate.MethodFactory\";\n\n\t/**\n\tReturn the default properties for this access method.\n\t**/\n\tProperties defaultProperties();\n\n\t/**\n\tReturn whether this access method implements the implementation\n\ttype given in the argument string.\n\t**/\n\tboolean supportsImplementation(String implementationId);\n\n\t/**\n\tReturn the primary implementation type for this access method.\n\tAlthough an access method may implement more than one implementation\n\ttype, this is the expected one. The access manager will put the\n\tprimary implementation type in a hash table for fast access.\n\t**/\n\tString primaryImplementationType();\n\n\t/**\n\tReturn whether this access method supports the format supplied in\n\tthe argument.\n\t**/\n\tboolean supportsFormat(UUID formatid);\n\n\t/**\n\tReturn the primary format that this access method supports.\n\tAlthough an access method may support more than one format, this\n\tis the usual one. the access manager will put the primary format\n\tin a hash table for fast access to the appropriate method.\n\t**/\n\tUUID primaryFormat();\n}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic void createParameterTypes(AST ast, AbstractTypeDeclaration td,\r\n\t\t\tMethodDeclaration md, String umlTypeName,\r\n\t\t\tString umlQualifiedTypeName, String umlPropertyName,\r\n\t\t\tString sourceDirectoryPackageName) {\r\n\t\tType chosenType = getChosenType(ast, umlTypeName, umlQualifiedTypeName,\r\n\t\t\t\tsourceDirectoryPackageName);\r\n\r\n\t\tSingleVariableDeclaration variableDeclaration = ast\r\n\t\t\t\t.newSingleVariableDeclaration();\r\n\t\tvariableDeclaration.setType(chosenType);\r\n\t\tvariableDeclaration.setName(ast.newSimpleName(umlPropertyName));\r\n\t\tmd.parameters().add(variableDeclaration);\r\n\t}",
"InstrumentedType withMethod(MethodDescription.Token token);",
"protected MethodTypeConstant(Type methodType) {\n this.methodType = methodType;\n }",
"HxType createType(final String className);",
"abstract protected Set<Method> createMethods();",
"public X10MethodInstance createMethodInstance(Type container, Name name, List<Type> typeArgs, List<Type> argTypes, Context context) {\n try {\n return xts.findMethod(container, xts.MethodMatcher(container, name, typeArgs, argTypes, context));\n } catch (SemanticException e) {\n throw new InternalCompilerError(\"Unable to find required method instance\", container.position(), e);\n }\n }",
"H create(Method method);",
"MethodType getMethodType();",
"HxMethod createConstructorReference(final String declaringType,\n final String... parameterTypes);",
"@Override\n public boolean evaluate(@Nonnull MethodInformation methodInformation) {\n boolean matches = namePattern.matcher(methodInformation.getName()).matches();\n final @Nonnull @NonNullableElements List<? extends VariableElement> methodParameters = methodInformation.getElement().getParameters();\n if (parameters.length == methodParameters.size()) {\n for (int i = 0; i < methodParameters.size(); i++) {\n final @Nonnull String nameOfDeclaredType = ProcessingUtility.getQualifiedName(methodParameters.get(i).asType());\n ProcessingLog.debugging(\"name of type: $\", nameOfDeclaredType);\n final @Nonnull String parameter = parameters[i];\n if (!parameter.equals(\"?\")) {\n matches = matches && nameOfDeclaredType.equals(parameter);\n }\n }\n } else {\n matches = false;\n }\n return matches;\n }",
"private void init() {\n\t\t// pick to pieces method signature description\n\t\tthis.argTypes = Type.getArgumentTypes(this.desc);\n\t\tthis.newArgTypes = new LinkedList<Type>();\n\t\tfor (Type t : this.argTypes) {\n\t\t\tthis.newArgTypes.add(t);\n\t\t\tif(t.getSort() == Type.OBJECT && !TaintTrackerConfig.isString(t))\n\t\t\t\tcontinue;\n//\t\t\tdetermine proper taint for each argument and append it to newArgTypes\n\t\t\tif (t.getSort() == Type.ARRAY) {\n\t\t\t\tif (t.getElementType().getSort() != Type.OBJECT || TaintTrackerConfig.isString(t.getElementType())) {\n\t\t\t\t\tif (t.getDimensions() > 1) {\n\t\t\t\t\t\tthis.newArgTypes.add(Type.getType(TaintTrackerConfig.TAINT_DESC));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.newArgTypes.add(Type.getType(TaintTrackerConfig.TAINT_DESC_ARR));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.newArgTypes.add(Type.getType(TaintTrackerConfig.TAINT_DESC));\n\t\t\t}\n\t\t}\n\t\tthis.newReturnType = Type.getReturnType(desc);\n\t\tif (this.newReturnType.getSort() != Type.VOID && this.newReturnType.getSort() != Type.OBJECT) {\n\t\t\tTaintWrapper<?,?> returnType = TaintTrackerConfig.wrapReturnType(Type.getReturnType(desc));\n\t\t\tif(returnType != null)\n\t\t\t\tthis.newReturnType = Type.getType(returnType.getClass());\n\t\t}\n\t\telse if( (this.newReturnType.getSort() == Type.OBJECT && TaintTrackerConfig.isString(this.newReturnType))\n\t\t|| (this.newReturnType.getSort() == Type.ARRAY && TaintTrackerConfig.isString(this.newReturnType.getElementType())) ){\n\t\t\tTaintWrapper<?,?> returnType = TaintTrackerConfig.wrapReturnType(Type.getReturnType(desc));\n\t\t\tif(returnType != null)\n\t\t\t\tthis.newReturnType = Type.getType(returnType.getClass());\n\t\t}\n\t\t\n\t\tType[] newArgs = new Type[newArgTypes.size()];\n\t\tnewArgTypes.toArray(newArgs);\n\t\tthis.newDesc = Type.getMethodDescriptor(newReturnType, newArgs);\n\t}",
"protected MethodTypeConstant()\n {\n super(CONSTANT_METHODTYPE);\n }",
"public interface ResolvedMethodLikeDeclaration extends ResolvedDeclaration, ResolvedTypeParametrizable, HasAccessSpecifier {\n\n /**\n * The package name of the declaring type.\n */\n default String getPackageName() {\n return declaringType().getPackageName();\n }\n\n /**\n * The class(es) wrapping the declaring type.\n */\n default String getClassName() {\n return declaringType().getClassName();\n }\n\n /**\n * The qualified name of the method composed by the qualfied name of the declaring type\n * followed by a dot and the name of the method.\n */\n default String getQualifiedName() {\n return declaringType().getQualifiedName() + \".\" + this.getName();\n }\n\n /**\n * The signature of the method.\n */\n default String getSignature() {\n StringBuilder sb = new StringBuilder();\n sb.append(getName());\n sb.append(\"(\");\n for (int i = 0; i < getNumberOfParams(); i++) {\n if (i != 0) {\n sb.append(\", \");\n }\n sb.append(getParam(i).describeType());\n }\n sb.append(\")\");\n return sb.toString();\n }\n\n /**\n * The qualified signature of the method. It is composed by the qualified name of the declaring type\n * followed by the signature of the method.\n */\n default String getQualifiedSignature() {\n return declaringType().getId() + \".\" + this.getSignature();\n }\n\n /**\n * The type in which the method is declared.\n */\n ResolvedReferenceTypeDeclaration declaringType();\n\n /**\n * Number of params.\n */\n int getNumberOfParams();\n\n /**\n * Get the ParameterDeclaration at the corresponding position or throw IllegalArgumentException.\n */\n ResolvedParameterDeclaration getParam(int i);\n\n /**\n * Utility method to get the last ParameterDeclaration. It throws UnsupportedOperationException if the method\n * has no parameters.\n * The last parameter can be variadic and sometimes it needs to be handled in a special way.\n */\n default ResolvedParameterDeclaration getLastParam() {\n if (getNumberOfParams() == 0) {\n throw new UnsupportedOperationException(\"This method has no typeParametersValues, therefore it has no a last parameter\");\n }\n return getParam(getNumberOfParams() - 1);\n }\n\n /**\n * Has the method or construcor a variadic parameter?\n * Note that when a method has a variadic parameter it should have an array type.\n */\n default boolean hasVariadicParameter() {\n if (getNumberOfParams() == 0) {\n return false;\n } else {\n return getParam(getNumberOfParams() - 1).isVariadic();\n }\n }\n\n @Override\n default Optional<ResolvedTypeParameterDeclaration> findTypeParameter(String name) {\n for (ResolvedTypeParameterDeclaration tp : this.getTypeParameters()) {\n if (tp.getName().equals(name)) {\n return Optional.of(tp);\n }\n }\n return declaringType().findTypeParameter(name);\n }\n\n /**\n * Number of exceptions listed in the throws clause.\n */\n int getNumberOfSpecifiedExceptions();\n\n /**\n * Type of the corresponding entry in the throws clause.\n *\n * @throws IllegalArgumentException if the index is negative or it is equal or greater than the value returned by\n * getNumberOfSpecifiedExceptions\n * @throws UnsupportedOperationException for those types of methods of constructor that do not declare exceptions\n */\n ResolvedType getSpecifiedException(int index);\n\n default List<ResolvedType> getSpecifiedExceptions() {\n if (getNumberOfSpecifiedExceptions() == 0) {\n return Collections.emptyList();\n } else {\n List<ResolvedType> exceptions = new LinkedList<>();\n for (int i = 0; i < getNumberOfSpecifiedExceptions(); i++) {\n exceptions.add(getSpecifiedException(i));\n }\n return exceptions;\n }\n }\n}",
"public static String getFormalTypeName(String jniName) {\n \t\tif (jniName.charAt(0) == '[') {\n \t\t\t// It is an array\n \t\t\tint dims = jniName.lastIndexOf('[')+1;\t// Number of dimensions\n \t\t\tint startType = dims;\n \t\t\tStringBuffer fName = new StringBuffer(jniName.length()+(2*dims)); \n\t\t\tif (jniName.charAt(startType) == 'L')\n\t\t\t\tfName.append(jniName.substring(startType+1, jniName.length()-1));\t// For \"[Ljava.lang.String;\" return \"java.lang.String\"\n \t\t\telse if (jniName.length() == startType+1) {\n \t\t\t\t// Possible primitive\n \t\t\t\tClass type = (Class) MAP_SHORTSIG_TO_TYPE.get(jniName.substring(startType, startType+1));\n \t\t\t\tif (type != null) {\n \t\t\t\t\tfName.append(type.getName());\n \t\t\t\t} else\n \t\t\t\t\treturn \"\";\t// Invalid if no 'L' and not a primitive. //$NON-NLS-1$\n \t\t\t} else\n \t\t\t\treturn \"\";\t// Invalid, must be either a primitive or 'L' type. //$NON-NLS-1$\n \t\t\twhile(dims-- > 0) {\n \t\t\t\tfName.append(\"[]\"); //$NON-NLS-1$\n \t\t\t}\n \t\t\treturn fName.toString();\n \t\t} else if (jniName.length() == 1) {\n \t\t\t// Possible primitive.\n \t\t\tClass type = (Class) MAP_SHORTSIG_TO_TYPE.get(jniName);\n \t\t\tif (type != null) {\n \t\t\t\treturn type.getName();\n \t\t\t}\n \t\t}\n \t\t\n \t\t// If got here then just a name as is.\n \t\treturn jniName;\n \t}",
"public static String demangleMethod(String name) {\n return demangleName(name, false);\n }",
"Hashtable createTypeMapping()\n {\n Hashtable mapping = new Hashtable();\n \n mapping.put(TypeFactory.getType(\"Double\"), \n new ParameterFactory() \n {\n public Parameter getParameter(Object o) \n {\n StratmasDecimal sObj = (StratmasDecimal) o;\n if (isBadDecimal(sObj)) {\n return null;\n } else {\n return new StratmasDecimalParameter((StratmasDecimal) o);\n }\n }\n });\n mapping.put(TypeFactory.getType(\"double\", \"http://www.w3.org/2001/XMLSchema\"), \n new ParameterFactory() \n {\n public Parameter getParameter(Object o) \n {\n StratmasDecimal sObj = (StratmasDecimal) o;\n if (isBadDecimal(sObj)) {\n return null;\n } else {\n return new StratmasDecimalParameter((StratmasDecimal) o);\n }\n }\n });\n mapping.put(TypeFactory.getType(\"NonNegativeInteger\"), \n new ParameterFactory() \n {\n public Parameter getParameter(Object o) \n {\n return new StratmasIntegerParameter((StratmasInteger) o);\n }\n });\n // Ground type type hiearchy.\n mapping.put(TypeFactory.getType(\"anyType\", \"http://www.w3.org/2001/XMLSchema\"), \n new ParameterFactory() \n {\n public Parameter getParameter(Object o) \n {\n return null;\n }\n });\n\n return mapping;\n }",
"private AnalysisMethodEnum(String name) {\n\t\tthis.methodName = name;\n\t}",
"Type type();",
"Type type();",
"public final Method mo19982a(Class<?> cls, String str, Class<?>... clsArr) {\n C12932j.m33818b(cls, \"target\");\n C12932j.m33818b(str, \"name\");\n C12932j.m33818b(clsArr, \"parameterTypes\");\n Method declaredMethod = cls.getDeclaredMethod(str, (Class[]) Arrays.copyOf(clsArr, clsArr.length));\n C12932j.m33815a((Object) declaredMethod, \"target.getDeclaredMethod(name, *parameterTypes)\");\n return declaredMethod;\n }",
"public void buildTypeParamInfo() {\n\t\twriter.writeTypeParamInfo();\n\t}",
"TypeDescription resolve(TypeDescription instrumentedType, TypeDescription.Generic parameterType);",
"protected ResourceMethod defineMethod( String theName, JavaType theReturnType, HttpVerb theHttpVerb, String theMethodPath ) {\r\n\t\treturn new ResourceMethod( theName, theReturnType, theHttpVerb, theMethodPath, this );\r\n\t}",
"private interface TypeCreator<T> {\n\t\tT createType();\n\t}",
"public Method getMethodByParameters(String name, Class<?>... args) {\r\n \t\t\r\n \t\t// Find the correct method to call\r\n \t\tfor (Method method : getMethods()) {\r\n \t\t\tif (Arrays.equals(method.getParameterTypes(), args)) {\r\n \t\t\t\treturn method;\r\n \t\t\t}\r\n \t\t}\r\n \t\t\r\n \t\t// That sucks\r\n \t\tthrow new RuntimeException(\"Unable to find \" + name + \" in \" + source.getName());\r\n \t}",
"public MethodBuilder() {\n\t\tvisibility = \"public\";\n\t\treturnType = \"void\";\n\t\tname = \"foo\";\n\t\trule = \"\";\n\t\ttype = \"\";\n\t\tparameters = new ArrayList<String>();\n\t\tcommands = new ArrayList<String>();\n\t}",
"MethodName getMethod();",
"private CommandType(String name) {\n\t\t\n\t\tthis.name = name;\n\t}",
"public abstract void add(T input, List<Method> methods, List<String> dateTypes);",
"@Override\n public ASTNode visitMethod(CoolParser.MethodContext ctx) {\n List<FormalNode> parameters = new LinkedList<>();\n for (var formal : ctx.formal()) {\n parameters.add((FormalNode) visitFormal(formal));\n }\n\n return new MethodNode(\n ctx.id,\n new IdNode(ctx.id),\n parameters,\n new TypeNode(ctx.returnType),\n (ExprNode) ctx.expr().accept(this));\n }",
"public interface MethodInfo {\n\t/**\n\t * Returns the class which declared the method.\n\t */\n\tpublic ClassInfo declaringClass();\n\n\t/**\n\t * Returns the index into the constant pool of the name of the method.\n\t */\n\tpublic int nameIndex();\n\n\t/**\n\t * Returns the index into the constant pool of the type of the method.\n\t */\n\tpublic int typeIndex();\n\n\t/**\n\t * Sets the index into the constant pool of the name of the method.\n\t */\n\tpublic void setNameIndex(int index);\n\n\t/**\n\t * Set the index into the constant pool of the type of the method.\n\t * \n\t * @param index\n\t * The index into the constant pool of the type of the method.\n\t */\n\tpublic void setTypeIndex(int index);\n\n\t/**\n\t * Set the modifiers of the method. The values correspond to the constants\n\t * in the Modifiers class.\n\t * \n\t * @param modifiers\n\t * A bit vector of modifier flags for the method.\n\t * @see Modifiers\n\t */\n\tpublic void setModifiers(int modifiers);\n\n\t/**\n\t * Get the modifiers of the method. The values correspond to the constants\n\t * in the Modifiers class.\n\t * \n\t * @return A bit vector of modifier flags for the method.\n\t * @see Modifiers\n\t */\n\tpublic int modifiers();\n\n\t/**\n\t * Get the indices into the constant pool of the types of the exceptions\n\t * thrown by the method.\n\t * \n\t * @return The indices into the constant pool of the types of the exceptions\n\t * thrown by the method.\n\t */\n\tpublic int[] exceptionTypes();\n\n\t/**\n\t * Get the maximum height of the operand stack.\n\t * \n\t * @return The maximum height of the operand stack.\n\t */\n\tpublic int maxStack();\n\n\t/**\n\t * Set the maximum height of the operand stack.\n\t * \n\t * @param maxStack\n\t * The maximum height of the operand stack.\n\t */\n\tpublic void setMaxStack(int maxStack);\n\n\t/**\n\t * Get the maximum number of locals used in the method.\n\t * \n\t * @return The maximum number of locals used in the method.\n\t */\n\tpublic int maxLocals();\n\n\t/**\n\t * Set the maximum number of locals used in the method.\n\t * \n\t * @param maxLocals\n\t * The maximum number of locals used in the method.\n\t */\n\tpublic void setMaxLocals(int maxLocals);\n\n\t/**\n\t * Get the byte code array of the method.\n\t * \n\t * @return The byte code array of the method.\n\t */\n\tpublic byte[] code();\n\n\t/**\n\t * Set the byte code array of the method.\n\t * \n\t * @param code\n\t * The byte code array of the method.\n\t */\n\tpublic void setCode(byte[] code);\n\n\t/**\n\t * Get the line number debug info of the instructions in the method.\n\t * \n\t * @return The line numbers of the instructions in the method. The array\n\t * will be of size 0 if the method has no line number debug info.\n\t */\n\tpublic LineNumberDebugInfo[] lineNumbers();\n\n\t/**\n\t * Set the line number debug info of the instructions in the method.\n\t * \n\t * @param lineNumbers\n\t * The line numbers of the instructions in the method. The array\n\t * will be of size 0 if the method has no line number debug info.\n\t */\n\tpublic void setLineNumbers(LineNumberDebugInfo[] lineNumbers);\n\n\t/**\n\t * Get the local variable debug information for the method.\n\t * \n\t * @return The local variables in the method. The array will be of size 0 if\n\t * the method has no local variable debug info.\n\t */\n\tpublic LocalDebugInfo[] locals();\n\n\t/**\n\t * Set the local variables in the method.\n\t * \n\t * @param locals\n\t * The local variables in the method.\n\t */\n\tpublic void setLocals(LocalDebugInfo[] locals);\n\n\t/**\n\t * Get the exception handlers in the method.\n\t * \n\t * @return The exception handlers in the method.\n\t */\n\tpublic Catch[] exceptionHandlers();\n\n\t/**\n\t * Set the exception handlers in the method.\n\t * \n\t * @param exceptions\n\t * The exception handlers in the method.\n\t */\n\tpublic void setExceptionHandlers(Catch[] exceptions);\n\n\t/**\n\t * Creates a clone of this <tt>MethodInfo</tt> except that its declaring\n\t * class does not know about it.\n\t */\n\tpublic Object clone();\n}",
"TypeImport createTypeImport();",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Type.cpp\", line = 545,\n FQN=\"llvm::Module::getTypeByName\", NM=\"_ZNK4llvm6Module13getTypeByNameENS_9StringRefE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Type.cpp -nm=_ZNK4llvm6Module13getTypeByNameENS_9StringRefE\")\n //</editor-fold>\n public StructType /*P*/ getTypeByName(StringRef Name) /*const*/ {\n return getContext().pImpl.NamedStructTypes.lookup(new StringRef(Name));\n }",
"MethodType (String m, Type r, ExpressionList args) {\r\n name = m;\r\n return_type = r;\r\n arguments = args;\r\n body = null;\r\n }",
"void generateWriteParam2WhereCondition(Builder methodBuilder, SQLiteModelMethod method, String paramName, TypeName paramTypeName);",
"public static ParameterExpression parameter(Class type, String name) { throw Extensions.todo(); }",
"com.google.protobuf.ByteString getMethodNameBytes();",
"com.google.protobuf.ByteString getMethodNameBytes();",
"public void testCreateMethodWithParameters() {\n IDOMMethod method = this.domFactory.createMethod();\n method.setName(\"foo\");\n method.setParameters(new String[] { \"String\", \"int\", \"char[]\" }, new String[] { \"name\", \"number\", \"buffer\" });\n assertSourceEquals(\"source code incorrect\", \"public void foo(String name, int number, char[] buffer) {\\n\" + \"}\\n\", method.getContents());\n }",
"BParameterTyping createBParameterTyping();",
"@Override\n\tpublic String visitMethodCall(MethodCallContext ctx) {\n\t\tint childrenNo=ctx.children.size();\n\t\tParseTree lastChild=ctx.children.get(childrenNo-1);\n\t\tString returnType;\n\t\tString methodName;\n\t\tif(lastChild instanceof TerminalNode){\n\t\t\tList<String> argTypes=new ArrayList<>();\n\t\t\tStack<String> ids=new Stack<>();\n\t\t\tParseTree n=ctx.children.get(childrenNo-2);\n\t\t\tif (childrenNo<=4){\n\t\t\t\tif(!(n instanceof TerminalNode)){\n\t\t\t\t\tmethodName=ctx.getChild(childrenNo-4).getText();\n\t\t\t\t\tMethodRecord mRec=(MethodRecord) table.lookup(methodName);\n\t\t\t\t\tif (mRec==null)throw new RuntimeException(\"method \"+methodName+ \" is not declared\");\n\t\t\t\t\tList<VarRecord> paramList=(List<VarRecord>) mRec.getParameters();\n\t\t\t\t\tList<ParseTree> arguments= new ArrayList<>();\n\t\t\t\t\tfor(int i=0;i<=n.getChildCount();i+=2){\n\t\t\t\t\t\targuments.add(n.getChild(i));\n\t\t\t\t\t}\n\t\t\t\t\tif(paramList.size()!=arguments.size())throw new RuntimeException(\"Incorrect number of arguments\");\n\t\t\t\t\telse for(int i=0;i<=paramList.size()-1;i++){\n\t\t\t\t\t\tString actualType=visit(arguments.get(i));\n\t\t\t\t\t\tString declaredType=paramList.get(i).getReturnType();\n\t\t\t\t\t\tif(!actualType.equals(declaredType)) throw new RuntimeException(\"Incorrect argument type\");\n\t\t\t\t\t}//checking arguments complete\n\t\t\t\t\treturn mRec.getReturnType();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tClassRecord cRec;\n\t\t\t\t\t\tmethodName=ctx.getChild(childrenNo-3).getText();\n\t\t\t\t\t\tcRec=(ClassRecord) table.lookup(methodName);\n\t\t\t\t\t\tMethodRecord mRec=cRec.getMethod(methodName);\n\t\t\t\t\t\tif (mRec==null)throw new RuntimeException(\"method \"+methodName+ \" is not declared\");\n\t\t\t\t\t\treturn mRec.getReturnType();\n\t\t\t\t\t}\n\t\t\t}else \n\t\t\tif(!(n instanceof TerminalNode)){\n\t\t\t\tmethodName=ctx.getChild(childrenNo-4).getText();\n\t\t\t\t//checking charAt(i) \n\t\t\t\tif(methodName.equals(\"charAt\")){\n\t\t\t\t\tif(n.getChildCount()!=1) throw new RuntimeException(\"Incorrect number of arguments on charAt()function\");\n\t\t\t\t\telse {\n\t\t\t\t\t\tString charArgType=visit(n);\t\t//check argument type is int\n\t\t\t\t\t\tif (!charArgType.equals(\"int\")) throw new RuntimeException(\"ARgument i on function charAt(i) must be of type int\");\n\t\t\t\t\t}\n\t\t\t\t\tString objectType=table.lookup(ctx.getChild(childrenNo-6).getText()).getReturnType();\n\t\t\t\t\tif (!objectType.equals(\"String\")) throw new RuntimeException(\".charAt(i) is applicable only to Strings\");\n\t\t\t\t}\n\t\t\t\tfor(int i=0;i<=n.getChildCount();i+=2){\n\t\t\t\t\targTypes.add(visit(n.getChild(i)));\n\t\t\t\t}\n\t\t\tfor(int i=childrenNo-4;i>=0;i-=2){\n\t\t\t\tids.push(ctx.getChild(i).getText());\n\t\t\t}\n\t\t\t}else{ \n\t\t\t\t//checking .length()\n\t\t\t\tmethodName=ctx.getChild(childrenNo-3).getText();\n\t\t\t\tif(methodName.equals(\"length\")){\n\t\t\t\t\tString objectType=table.lookup(ctx.getChild(childrenNo-5).getText()).getReturnType();\n\t\t\t\t\tif (!objectType.equals(\"String\")) throw new RuntimeException(\".length() is applicale only to Strings\");\n\t\t\t\t}\n\t\t\t\targTypes=null;\n\t\t\t\tfor(int i=childrenNo-3;i>=0;i-=2){\n\t\t\t\t\tids.push(ctx.getChild(i).getText());\n\t\t\t\t}\n\t\t\t}\n\t\t\tint count=ids.size();\n\t\t\tClassRecord cRec=null;\n\t\t\tRecord r;\n\t\t\tfor(int i=0;i<=count-2;i++){\n\t\t\t\tString key=ids.pop();\n\t\t\t\tr= table.lookup(key);\t\t\t\t\n\t\t\t\tcRec=(ClassRecord)table.lookup(r.Type);\n\t\t\t\tif (cRec==null) throw new RuntimeException(\"Class \"+key+\" is not declared\");\t\t\t\t\n\t\t\t}\n\t\t\t//last item in stack is the method Identifier\n\t\t\tMethodRecord mRec=cRec.getMethod(ids.pop());\n\t\t\tif (mRec==null)throw new RuntimeException(\"Method not declared in class \"+cRec.getName());\n\t\t\treturnType=mRec.getReturnType();\n\t\t\tif(methodName.equals(\"charAt\")) returnType=\"char\";\n\t\t\tif(methodName.equals(\"length\"))returnType=\"int\";\n\t\t\t//checking arguments \n\t\t\tif(argTypes==null) return returnType;\n\t\t\telse {\t\t\t\t\n\t\t\t\tList<VarRecord> parameters=(List<VarRecord>) mRec.getParameters();\n\t\t\t\tif(parameters.size()!=argTypes.size()) throw new RuntimeException(\"Incorect number of arguments on method call\");\n\t\t\t\telse{\n\t\t\t\t\tfor(int i=0;i<argTypes.size();i++){\n\t\t\t\t\t\tif(!argTypes.get(i).equals((parameters.get(i).getReturnType()))) throw new RuntimeException (\"incorrect argument type\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} return returnType;\n\t\t}\telse \t\t\t\t\t\t// last node is a RuleNode\n\t\t\t{\n\t\t\t\tif (childrenNo==3){\t\t\t\t\t\n\t\t\t\tString leftType=visit(ctx.getChild(0)); //also checks the first method for undeclared ids\n\t\t\t\t//ClassRecord cRec=(ClassRecord) table.lookup(ctx.getChild(0).getText());\n\t\t\t\tParseTree node=ctx.getChild(2);\n\t\t\t\t//checking charAt function\n\t\t\t\tif((node.getChildCount()==4)&&(node.getChild(3) instanceof TerminalNode)){\t\t\t\n\t\t\t\t\tif (node.getChild(0).getText().equals(\"charAt\")){\n\t\t\t\t\t\tif (!leftType.equals(\"String\")) throw new RuntimeException(\"charAt() only applicable to Strings\");\n\t\t\t\t\t\tString argType=visit(node.getChild(2));\n\t\t\t\t\t\tif (!argType.equals(\"int\")) throw new RuntimeException(\"Incorrect argument in charAt()\");\n\t\t\t\t\t\treturn \"char\";\n\t\t\t\t\t}\n\t\t\t\t}else if(node.getChildCount()==3&&((node.getChild(2) instanceof TerminalNode))){\n\t\t\t\t\tif(node.getChild(0).getText().equals(\"length\")){\n\t\t\t\t\t\tif (!leftType.equals(\"String\")) throw new RuntimeException(\"length() only applicable to Strings\");\n\t\t\t\t\t\telse return \"int\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t{String mName=ctx.getChild(2).getChild(0).getText();\n\t\t\t\tClassRecord tempCR=(ClassRecord) table.lookup(ctx.getChild(0).getChild(0).getText());\n\t\t\t\tMethodRecord mRec=tempCR.getMethod(mName);\n\t\t\t\tif(mRec==null)throw new RuntimeException(\"method \"+mName+\" is not declared in class \"+tempCR.getName());\n\t\t\t\treturn mRec.getReturnType(); //visit the last methodCall in the chain \n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (childrenNo==5){\n\t\t\t\t\tString leftType=visit(ctx.getChild(1)); //also checks the first method for undeclared ids\n\t\t\t\t\tParseTree node=ctx.getChild(4);\n\t\t\t\t\t//checking charAt function\n\t\t\t\t\tif((node.getChildCount()==4)&&(node.getChild(3) instanceof TerminalNode)){\t\t\t\n\t\t\t\t\t\tif (node.getChild(0).getText().equals(\"charAt\")){\n\t\t\t\t\t\t\tif (!leftType.equals(\"String\")) throw new RuntimeException(\"charAt() only applicable to Strings\");\n\t\t\t\t\t\t\telse return visit(node);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(node.getChildCount()==3&&((node.getChild(2) instanceof TerminalNode))){\n\t\t\t\t\t\tif(node.getChild(0).getText().equals(\"length\")){\n\t\t\t\t\t\t\tif (!leftType.equals(\"String\")) throw new RuntimeException(\"length() only applicable to Strings\");\n\t\t\t\t\t\t\telse return visit(node);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tClassRecord cR=(ClassRecord)table.lookup(leftType);\n\t\t\t\t\tMethodRecord mRec=cR.getMethod(node.getChild(0).getText());\n\t\t\t\t\treturn mRec.getReturnType(); //visit the last methodCall in the chain \n\t\t\t\t}\n\t\t\t}\n\t\treturn null; //debuggin purposes. should be unreachable\n\t}",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();"
] | [
"0.63287026",
"0.60647947",
"0.59050703",
"0.590131",
"0.5829944",
"0.5715457",
"0.5694369",
"0.5682014",
"0.5656001",
"0.564811",
"0.56217855",
"0.5617289",
"0.5617289",
"0.55927384",
"0.55884546",
"0.55867994",
"0.5572907",
"0.53946686",
"0.5385781",
"0.53431636",
"0.5341776",
"0.5341776",
"0.5341776",
"0.53402966",
"0.5334545",
"0.5279131",
"0.5244695",
"0.5183501",
"0.51103693",
"0.51010466",
"0.5096954",
"0.50581026",
"0.50557244",
"0.50462013",
"0.5041475",
"0.50413114",
"0.50392455",
"0.500097",
"0.49950925",
"0.49922246",
"0.4986477",
"0.49772432",
"0.4969924",
"0.49677733",
"0.4966338",
"0.49487138",
"0.4945832",
"0.49343345",
"0.4929611",
"0.49091312",
"0.49002898",
"0.48668236",
"0.48660508",
"0.4860058",
"0.4846903",
"0.4841808",
"0.48360866",
"0.48320848",
"0.48260915",
"0.4817322",
"0.4802121",
"0.47860098",
"0.47789732",
"0.47661233",
"0.47519776",
"0.47273263",
"0.47266567",
"0.47148407",
"0.46836203",
"0.46829736",
"0.46784642",
"0.46784642",
"0.46687838",
"0.46681803",
"0.46679285",
"0.4654226",
"0.46502778",
"0.46464685",
"0.46452624",
"0.4642301",
"0.4641194",
"0.46262923",
"0.4623239",
"0.46112615",
"0.46103913",
"0.45900908",
"0.458774",
"0.45857215",
"0.4585672",
"0.4578151",
"0.4578151",
"0.4575774",
"0.45751956",
"0.45722958",
"0.45713207",
"0.45713207",
"0.45713207",
"0.45713207",
"0.45713207",
"0.45713207"
] | 0.69992614 | 0 |
Build a MethodType from an existing MethodSymbol | public static MethodType fromMethod(MethodSymbol method) {
return new MethodType(method);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private MethodType(MethodSymbol method) {\n super(method.getName());\n declarer = method.getDeclaringClass();\n typeParams = Arrays.copyOf(method.getTypeParameters(), method.getTypeParameters().length);\n paramTypes = Arrays.copyOf(method.getParameterTypes(), method.getParameterTypes().length);\n }",
"private JCMethodDecl makeMethod(DiagnosticPosition diagPos, MethodSymbol mth, JCBlock mthBody, boolean isBound) {\n // build the parameter list\n ListBuffer<JCVariableDecl> params = ListBuffer.lb();\n for (VarSymbol vsym : mth.getParameters()) {\n Type vtype = vsym.asType();\n if (isBound) {\n VarMorphInfo vmi = typeMorpher.varMorphInfo(vsym);\n vtype = vmi.getMorphedType();\n }\n params.append(make.VarDef(\n make.Modifiers(0L), \n vsym.name, \n toJava.makeTypeTree(vtype, diagPos), \n null // no initial value\n ));\n }\n \n // make the method\n JCModifiers mods = make.Modifiers(Flags.PUBLIC | (mthBody==null? Flags.ABSTRACT : 0L));\n mods = JavafxToJava.addAccessAnnotationModifiers(mth.flags(), mods, (JavafxTreeMaker)make);\n return make.at(diagPos).MethodDef(\n mods, \n toJava.functionName(mth, false, isBound), \n toJava.makeReturnTypeTree(diagPos, mth, isBound), \n List.<JCTypeParameter>nil(), \n params.toList(), \n List.<JCExpression>nil(), \n mthBody, \n null);\n }",
"public static StackManipulation of(JavaInstance.MethodType methodType) {\n Type[] parameterType = new Type[methodType.getParameterTypes().size()];\n int index = 0;\n for (TypeDescription typeDescription : methodType.getParameterTypes()) {\n parameterType[index++] = Type.getType(typeDescription.getDescriptor());\n }\n return new MethodTypeConstant(Type.getMethodType(Type.getType(methodType.getReturnType().getDescriptor()), parameterType));\n }",
"Method createMethod();",
"Method createMethod();",
"public static Type forSymbol( String symbol ) {\n CheckArg.isNotNull(symbol, \"symbol\");\n return TYPE_BY_SYMBOL.get(symbol.toUpperCase().trim());\n }",
"public static StackManipulation of(MethodDescription.InDefinedShape methodDescription) {\n return new MethodTypeConstant(Type.getMethodType(methodDescription.getDescriptor()));\n }",
"@SuppressWarnings(\"unused\")\n private void initSymbolTable() {\n MethodType I_V = new MethodType(Type.Int, Type.Void);\n MethodType I_R = new MethodType(Type.Int, Type.Real);\n MethodType I_S = new MethodType(Type.Int, Type.String);\n MethodType I_D = new MethodType(Type.Int, Type.NodeSet);\n MethodType R_I = new MethodType(Type.Real, Type.Int);\n MethodType R_V = new MethodType(Type.Real, Type.Void);\n MethodType R_R = new MethodType(Type.Real, Type.Real);\n MethodType R_D = new MethodType(Type.Real, Type.NodeSet);\n MethodType R_O = new MethodType(Type.Real, Type.Reference);\n MethodType I_I = new MethodType(Type.Int, Type.Int);\n MethodType D_O = new MethodType(Type.NodeSet, Type.Reference);\n MethodType D_V = new MethodType(Type.NodeSet, Type.Void);\n MethodType D_S = new MethodType(Type.NodeSet, Type.String);\n MethodType D_D = new MethodType(Type.NodeSet, Type.NodeSet);\n MethodType A_V = new MethodType(Type.Node, Type.Void);\n MethodType S_V = new MethodType(Type.String, Type.Void);\n MethodType S_S = new MethodType(Type.String, Type.String);\n MethodType S_A = new MethodType(Type.String, Type.Node);\n MethodType S_D = new MethodType(Type.String, Type.NodeSet);\n MethodType S_O = new MethodType(Type.String, Type.Reference);\n MethodType B_O = new MethodType(Type.Boolean, Type.Reference);\n MethodType B_V = new MethodType(Type.Boolean, Type.Void);\n MethodType B_B = new MethodType(Type.Boolean, Type.Boolean);\n MethodType B_S = new MethodType(Type.Boolean, Type.String);\n MethodType D_X = new MethodType(Type.NodeSet, Type.Object);\n MethodType R_RR = new MethodType(Type.Real, Type.Real, Type.Real);\n MethodType I_II = new MethodType(Type.Int, Type.Int, Type.Int);\n MethodType B_RR = new MethodType(Type.Boolean, Type.Real, Type.Real);\n MethodType B_II = new MethodType(Type.Boolean, Type.Int, Type.Int);\n MethodType S_SS = new MethodType(Type.String, Type.String, Type.String);\n MethodType S_DS = new MethodType(Type.String, Type.Real, Type.String);\n MethodType S_SR = new MethodType(Type.String, Type.String, Type.Real);\n MethodType O_SO = new MethodType(Type.Reference, Type.String, Type.Reference);\n\n MethodType D_SS =\n new MethodType(Type.NodeSet, Type.String, Type.String);\n MethodType D_SD =\n new MethodType(Type.NodeSet, Type.String, Type.NodeSet);\n MethodType B_BB =\n new MethodType(Type.Boolean, Type.Boolean, Type.Boolean);\n MethodType B_SS =\n new MethodType(Type.Boolean, Type.String, Type.String);\n MethodType S_SD =\n new MethodType(Type.String, Type.String, Type.NodeSet);\n MethodType S_DSS =\n new MethodType(Type.String, Type.Real, Type.String, Type.String);\n MethodType S_SRR =\n new MethodType(Type.String, Type.String, Type.Real, Type.Real);\n MethodType S_SSS =\n new MethodType(Type.String, Type.String, Type.String, Type.String);\n\n /*\n * Standard functions: implemented but not in this table concat().\n * When adding a new function make sure to uncomment\n * the corresponding line in <tt>FunctionAvailableCall</tt>.\n */\n\n // The following functions are inlined\n\n _symbolTable.addPrimop(\"current\", A_V);\n _symbolTable.addPrimop(\"last\", I_V);\n _symbolTable.addPrimop(\"position\", I_V);\n _symbolTable.addPrimop(\"true\", B_V);\n _symbolTable.addPrimop(\"false\", B_V);\n _symbolTable.addPrimop(\"not\", B_B);\n _symbolTable.addPrimop(\"name\", S_V);\n _symbolTable.addPrimop(\"name\", S_A);\n _symbolTable.addPrimop(\"generate-id\", S_V);\n _symbolTable.addPrimop(\"generate-id\", S_A);\n _symbolTable.addPrimop(\"ceiling\", R_R);\n _symbolTable.addPrimop(\"floor\", R_R);\n _symbolTable.addPrimop(\"round\", R_R);\n _symbolTable.addPrimop(\"contains\", B_SS);\n _symbolTable.addPrimop(\"number\", R_O);\n _symbolTable.addPrimop(\"number\", R_V);\n _symbolTable.addPrimop(\"boolean\", B_O);\n _symbolTable.addPrimop(\"string\", S_O);\n _symbolTable.addPrimop(\"string\", S_V);\n _symbolTable.addPrimop(\"translate\", S_SSS);\n _symbolTable.addPrimop(\"string-length\", I_V);\n _symbolTable.addPrimop(\"string-length\", I_S);\n _symbolTable.addPrimop(\"starts-with\", B_SS);\n _symbolTable.addPrimop(\"format-number\", S_DS);\n _symbolTable.addPrimop(\"format-number\", S_DSS);\n _symbolTable.addPrimop(\"unparsed-entity-uri\", S_S);\n _symbolTable.addPrimop(\"key\", D_SS);\n _symbolTable.addPrimop(\"key\", D_SD);\n _symbolTable.addPrimop(\"id\", D_S);\n _symbolTable.addPrimop(\"id\", D_D);\n _symbolTable.addPrimop(\"namespace-uri\", S_V);\n _symbolTable.addPrimop(\"function-available\", B_S);\n _symbolTable.addPrimop(\"element-available\", B_S);\n _symbolTable.addPrimop(\"document\", D_S);\n _symbolTable.addPrimop(\"document\", D_V);\n\n // The following functions are implemented in the basis library\n _symbolTable.addPrimop(\"count\", I_D);\n _symbolTable.addPrimop(\"sum\", R_D);\n _symbolTable.addPrimop(\"local-name\", S_V);\n _symbolTable.addPrimop(\"local-name\", S_D);\n _symbolTable.addPrimop(\"namespace-uri\", S_V);\n _symbolTable.addPrimop(\"namespace-uri\", S_D);\n _symbolTable.addPrimop(\"substring\", S_SR);\n _symbolTable.addPrimop(\"substring\", S_SRR);\n _symbolTable.addPrimop(\"substring-after\", S_SS);\n _symbolTable.addPrimop(\"substring-before\", S_SS);\n _symbolTable.addPrimop(\"normalize-space\", S_V);\n _symbolTable.addPrimop(\"normalize-space\", S_S);\n _symbolTable.addPrimop(\"system-property\", S_S);\n\n // Extensions\n _symbolTable.addPrimop(\"nodeset\", D_O);\n _symbolTable.addPrimop(\"objectType\", S_O);\n _symbolTable.addPrimop(\"cast\", O_SO);\n\n // Operators +, -, *, /, % defined on real types.\n _symbolTable.addPrimop(\"+\", R_RR);\n _symbolTable.addPrimop(\"-\", R_RR);\n _symbolTable.addPrimop(\"*\", R_RR);\n _symbolTable.addPrimop(\"/\", R_RR);\n _symbolTable.addPrimop(\"%\", R_RR);\n\n // Operators +, -, * defined on integer types.\n // Operators / and % are not defined on integers (may cause exception)\n _symbolTable.addPrimop(\"+\", I_II);\n _symbolTable.addPrimop(\"-\", I_II);\n _symbolTable.addPrimop(\"*\", I_II);\n\n // Operators <, <= >, >= defined on real types.\n _symbolTable.addPrimop(\"<\", B_RR);\n _symbolTable.addPrimop(\"<=\", B_RR);\n _symbolTable.addPrimop(\">\", B_RR);\n _symbolTable.addPrimop(\">=\", B_RR);\n\n // Operators <, <= >, >= defined on int types.\n _symbolTable.addPrimop(\"<\", B_II);\n _symbolTable.addPrimop(\"<=\", B_II);\n _symbolTable.addPrimop(\">\", B_II);\n _symbolTable.addPrimop(\">=\", B_II);\n\n // Operators <, <= >, >= defined on boolean types.\n _symbolTable.addPrimop(\"<\", B_BB);\n _symbolTable.addPrimop(\"<=\", B_BB);\n _symbolTable.addPrimop(\">\", B_BB);\n _symbolTable.addPrimop(\">=\", B_BB);\n\n // Operators 'and' and 'or'.\n _symbolTable.addPrimop(\"or\", B_BB);\n _symbolTable.addPrimop(\"and\", B_BB);\n\n // Unary minus.\n _symbolTable.addPrimop(\"u-\", R_R);\n _symbolTable.addPrimop(\"u-\", I_I);\n }",
"private MethodType(String name) {\n super(name);\n }",
"SymbolImageType createSymbolImageType();",
"InstrumentedType withMethod(MethodDescription.Token token);",
"public MLMethod createMethod() {\n\t\tif (this.methodType == null) {\n\t\t\tthrow new EncogError(\n\t\t\t\t\t\"Please call selectMethod first to choose what type of method you wish to use.\");\n\t\t}\n\t\tMLMethodFactory methodFactory = new MLMethodFactory();\n\t\tMLMethod method = methodFactory.create(methodType, methodArgs, dataset\n\t\t\t\t.getNormHelper().calculateNormalizedInputCount(), this.config\n\t\t\t\t.determineOutputCount(dataset));\n\t\treturn method;\n\t}",
"private void createMethod(MethodNode method, StringBuffer completion) {\n int insertedModifiers = method.getModifiers() & ~(Opcodes.ACC_NATIVE | Opcodes.ACC_ABSTRACT | Opcodes.ACC_PUBLIC);\n ASTNode.printModifiers(insertedModifiers, completion);\n\n //// Type parameters\n // ignore too difficult and not really needed for Groovy\n\n// GenericsType[] typeVariableBindings = method.getGenericsTypes();\n// if(typeVariableBindings != null && typeVariableBindings.length != 0) {\n// completion.append('<');\n// for (int i = 0; i < typeVariableBindings.length; i++) {\n// if(i != 0) {\n// completion.append(',');\n// completion.append(' ');\n// }\n// createTypeVariable(typeVariableBindings[i], completion);\n// }\n// completion.append('>');\n// completion.append(' ');\n// }\n\n //// Return type\n createType(method.getReturnType(), completion, false);\n completion.append(' ');\n\n //// Selector\n completion.append(method.getName());\n\n completion.append('(');\n\n ////Parameters\n Parameter[] parameters = method.getParameters();\n int length = parameters.length;\n for (int i = 0; i < length; i++) {\n if(i != 0) {\n completion.append(',');\n completion.append(' ');\n }\n createType(parameters[i].getType(), completion, true);\n completion.append(' ');\n completion.append(parameters[i].getName());\n }\n\n completion.append(')');\n\n //// Exceptions\n ClassNode[] exceptions = method.getExceptions();\n\n if (exceptions != null && exceptions.length > 0){\n completion.append(' ');\n completion.append(\"throws\");\n completion.append(' ');\n for(int i = 0; i < exceptions.length ; i++){\n if(i != 0) {\n completion.append(' ');\n completion.append(',');\n }\n createType(exceptions[i], completion, false);\n }\n }\n }",
"public void startMethod (Symbol methodName, java.lang.Object[] args) throws G2AccessException;",
"ShipmentMethodType createShipmentMethodType();",
"public Method getResolvedFactoryMethod()\n/* */ {\n/* 293 */ synchronized (this.constructorArgumentLock) {\n/* 294 */ Object candidate = this.resolvedConstructorOrFactoryMethod;\n/* 295 */ return (candidate instanceof Method) ? (Method)candidate : null;\n/* */ }\n/* */ }",
"public Operation createOperation(String symbol) throws InstantiationException, IllegalAccessException {\n checkForNull(symbol);\n\n if (map.containsKey(symbol)) {\n return (Operation) map.get(symbol).newInstance();\n } else {\n return null;\n }\n }",
"HxMethod createMethod(final String returnType,\n final String methodName,\n final String... parameterTypes);",
"public JMethod(SourceInfo info, String name, JDeclaredType enclosingType,\n JType returnType, boolean isAbstract, boolean isStatic, boolean isFinal,\n boolean isPrivate) {\n super(info);\n this.name = StringInterner.get().intern(name);\n this.enclosingType = enclosingType;\n this.returnType = returnType;\n this.isAbstract = isAbstract;\n this.isStatic = isStatic;\n this.isFinal = isFinal;\n this.isPrivate = isPrivate;\n }",
"Methodsig getMethod();",
"H create(Method method);",
"protected MethodTypeConstant(Type methodType) {\n this.methodType = methodType;\n }",
"public interface MethodInfo {\n\t/**\n\t * Returns the class which declared the method.\n\t */\n\tpublic ClassInfo declaringClass();\n\n\t/**\n\t * Returns the index into the constant pool of the name of the method.\n\t */\n\tpublic int nameIndex();\n\n\t/**\n\t * Returns the index into the constant pool of the type of the method.\n\t */\n\tpublic int typeIndex();\n\n\t/**\n\t * Sets the index into the constant pool of the name of the method.\n\t */\n\tpublic void setNameIndex(int index);\n\n\t/**\n\t * Set the index into the constant pool of the type of the method.\n\t * \n\t * @param index\n\t * The index into the constant pool of the type of the method.\n\t */\n\tpublic void setTypeIndex(int index);\n\n\t/**\n\t * Set the modifiers of the method. The values correspond to the constants\n\t * in the Modifiers class.\n\t * \n\t * @param modifiers\n\t * A bit vector of modifier flags for the method.\n\t * @see Modifiers\n\t */\n\tpublic void setModifiers(int modifiers);\n\n\t/**\n\t * Get the modifiers of the method. The values correspond to the constants\n\t * in the Modifiers class.\n\t * \n\t * @return A bit vector of modifier flags for the method.\n\t * @see Modifiers\n\t */\n\tpublic int modifiers();\n\n\t/**\n\t * Get the indices into the constant pool of the types of the exceptions\n\t * thrown by the method.\n\t * \n\t * @return The indices into the constant pool of the types of the exceptions\n\t * thrown by the method.\n\t */\n\tpublic int[] exceptionTypes();\n\n\t/**\n\t * Get the maximum height of the operand stack.\n\t * \n\t * @return The maximum height of the operand stack.\n\t */\n\tpublic int maxStack();\n\n\t/**\n\t * Set the maximum height of the operand stack.\n\t * \n\t * @param maxStack\n\t * The maximum height of the operand stack.\n\t */\n\tpublic void setMaxStack(int maxStack);\n\n\t/**\n\t * Get the maximum number of locals used in the method.\n\t * \n\t * @return The maximum number of locals used in the method.\n\t */\n\tpublic int maxLocals();\n\n\t/**\n\t * Set the maximum number of locals used in the method.\n\t * \n\t * @param maxLocals\n\t * The maximum number of locals used in the method.\n\t */\n\tpublic void setMaxLocals(int maxLocals);\n\n\t/**\n\t * Get the byte code array of the method.\n\t * \n\t * @return The byte code array of the method.\n\t */\n\tpublic byte[] code();\n\n\t/**\n\t * Set the byte code array of the method.\n\t * \n\t * @param code\n\t * The byte code array of the method.\n\t */\n\tpublic void setCode(byte[] code);\n\n\t/**\n\t * Get the line number debug info of the instructions in the method.\n\t * \n\t * @return The line numbers of the instructions in the method. The array\n\t * will be of size 0 if the method has no line number debug info.\n\t */\n\tpublic LineNumberDebugInfo[] lineNumbers();\n\n\t/**\n\t * Set the line number debug info of the instructions in the method.\n\t * \n\t * @param lineNumbers\n\t * The line numbers of the instructions in the method. The array\n\t * will be of size 0 if the method has no line number debug info.\n\t */\n\tpublic void setLineNumbers(LineNumberDebugInfo[] lineNumbers);\n\n\t/**\n\t * Get the local variable debug information for the method.\n\t * \n\t * @return The local variables in the method. The array will be of size 0 if\n\t * the method has no local variable debug info.\n\t */\n\tpublic LocalDebugInfo[] locals();\n\n\t/**\n\t * Set the local variables in the method.\n\t * \n\t * @param locals\n\t * The local variables in the method.\n\t */\n\tpublic void setLocals(LocalDebugInfo[] locals);\n\n\t/**\n\t * Get the exception handlers in the method.\n\t * \n\t * @return The exception handlers in the method.\n\t */\n\tpublic Catch[] exceptionHandlers();\n\n\t/**\n\t * Set the exception handlers in the method.\n\t * \n\t * @param exceptions\n\t * The exception handlers in the method.\n\t */\n\tpublic void setExceptionHandlers(Catch[] exceptions);\n\n\t/**\n\t * Creates a clone of this <tt>MethodInfo</tt> except that its declaring\n\t * class does not know about it.\n\t */\n\tpublic Object clone();\n}",
"private static OperatorBuilder binary(String symbol, DoubleBinaryOperator binaryOp, Type type) {\n if (binaryOp == null) {\n throw new IllegalArgumentException(\"operator argument must not be null\");\n }\n if (type.arity() != 2) {\n throw new IllegalArgumentException(\"type argument must be INFIXL, INFIXN, or INFIXR\");\n }\n // XXX ensure valid symbol\n return new OperatorBuilder(null, binaryOp, symbol, 10, type);\n }",
"Method addMethod(PositionString name, Symbol resultType, Iterator<Variable> parameters,\n\t\t\tModifier modifier) throws\n\t\t\tDuplicateIdentifierException, ShadowedIdentifierException, WrongModifierException, InvalidIdentifierException;",
"public void build() throws HelperCodeException {\n MethodNode constructorNode = null;\n if(!TypeUtil.isAccess(methodNode.access, Opcodes.ACC_STATIC) && !methodNode.name.contains(\"<init>\")) {\n //1. make instance for the instance of the class\n //ClassNode classNode = TypeTableBuilder.getMethodClassNode(methodNode);\n if(!ClassNodeUtil.isClassNodeBuilderable(classNode))\n throw new HelperCodeException(\"not able to build classNode\");\n constructorNode = ClassNodeUtil.getSimpleConstructor(classNode);\n if(constructorNode != null) {\n String classname = classNode.name.substring(classNode.name.lastIndexOf(\".\") + 1);\n classname = classname.substring(classname.lastIndexOf(\"/\") + 1);\n String stmt = makeNewVoidConstructorStmt(classname, \"c\");//fixme\n if(!TypeUtil.isAccess(constructorNode.access, Opcodes.ACC_PUBLIC))\n throw new HelperCodeException(\"classnode is non-public\");\n addImport(classNode.name);\n stmts.add(stmt);\n } else\n throw new HelperCodeException(\"unable to found a classnode constructor\");\n } else {\n //what if the method is static\n\n //what if it\n }\n\n for (Type pt : Type.getMethodType(methodNode.desc).getArgumentTypes()) {\n //fixme, only support primitive and string object now.\n int sort = pt.getSort();\n if (sort > Type.DOUBLE) {\n if (sort == Type.OBJECT) {\n //if it is in standard library\n HelperMethod item = null;\n if(TypeUtil.isStandardLibrary(pt.getClassName())) {\n item = StandardLibraryClasses.getHelper(pt);\n //fixme for instance helper\n } else {\n item = InstanceHelperClasses.getInstanceHelper(pt);\n }\n\n if (item != null) {\n Type methodType = Type.getMethodType(item.desc);\n methodArguments.add(methodType);\n methods.add(item);\n continue;\n }\n }\n //fixme\n InstanceHelperBuilder.addunsuported(pt);\n throw new HelperCodeException(\"doesn't support this type now\");\n } else\n methodArguments.add(pt);\n }\n\n int number_of_string_arg = 0;\n for(Type t: methodArguments) {\n if(t.getSort() == Type.METHOD) {\n for(Type mt: t.getArgumentTypes()) {\n if(mt.getSort() == Type.OBJECT)\n number_of_string_arg += 1;\n }\n }\n if(t.getSort() == Type.OBJECT)\n number_of_string_arg += 1;\n }\n if(number_of_string_arg > 1) {\n //is_args_valid_for_building = false;\n throw new HelperCodeException(\"fail to build argument\");\n }\n\n if(number_of_string_arg == 1) {\n this.isFileString = true;\n }\n\n System.out.println(\"The size of the stmts in build, before methodArgument: \" + stmts.size());\n makeMethodBody(methodArguments);\n }",
"HxMethod createMethod(final HxType returnType,\n final String methodName,\n final HxType... parameterTypes);",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp\", line = 7045,\n FQN=\"(anonymous namespace)::SparcV9ABIInfo::CoerceBuilder::getType\", NM=\"_ZNK12_GLOBAL__N_114SparcV9ABIInfo13CoerceBuilder7getTypeEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.codegen/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp -nm=_ZNK12_GLOBAL__N_114SparcV9ABIInfo13CoerceBuilder7getTypeEv\")\n //</editor-fold>\n public Type /*P*/ getType() /*const*/ {\n if (Elems.size() == 1) {\n return Elems.front$Const();\n } else {\n return StructType.get(Context, new ArrayRef<Type /*P*/ >(Elems, true));\n }\n }",
"default HxMethod createMethod(final Class<?> returnType,\n final String methodName,\n final Class<?>... parameterTypes) {\n return createMethod(returnType.getName(),\n methodName,\n getHaxxor().toNormalizedClassnames(parameterTypes));\n }",
"Method getMethod();",
"Method getMethod();",
"protected Method getMethod(String mangledName)\n {\n return (Method) _methodMap.get(mangledName);\n }",
"public static MethodType fromParameters(String name, Type... paramTypes) {\n MethodType type = new MethodType(name);\n type.paramTypes = Arrays.copyOf(paramTypes, paramTypes.length);\n return type;\n }",
"public SymbolType getSymbolType() {\n return symbolType;\n }",
"public Method getMethod();",
"CarrierShipmentMethod createCarrierShipmentMethod();",
"abstract protected Set<Method> createMethods();",
"InstrumentedType withEnclosingMethod(MethodDescription.InDefinedShape enclosingMethod);",
"protected MethodTypeConstant()\n {\n super(CONSTANT_METHODTYPE);\n }",
"public Method(String name, Type returnType, Type[] argumentTypes) {\n/* 98 */ this(name, Type.getMethodDescriptor(returnType, argumentTypes));\n/* */ }",
"MethodType getMethodType();",
"private static boolean matchName(@NotNull PsiMethod method, @NotNull IHasParameterInfos targetMethodInfo, @NotNull String targetMethodName, boolean isConstructor) {\n if (targetMethodName.startsWith(\"@\")) {\n IType returnType = ((IGosuMethodInfo) targetMethodInfo).getReturnType();\n if ((returnType.equals(JavaTypes.BOOLEAN()) || returnType.equals(JavaTypes.pBOOLEAN()) &&\n !method.getName().equals(\"is\" + targetMethodName.substring(1)))) {\n return true;\n }\n if (!method.getName().equals(\"get\" + targetMethodName.substring(1)) && !method.getName().equals(\"set\" + targetMethodName.substring(1))) {\n return true;\n }\n } else if (!targetMethodName.equals(method.getName()) && !(isConstructor && \"construct\".equals(method.getName()))) {\n return true;\n }\n return false;\n }",
"org.hl7.fhir.CodeableConcept addNewMethod();",
"MethodStart createMethodStart();",
"public interface ResolvedMethodLikeDeclaration extends ResolvedDeclaration, ResolvedTypeParametrizable, HasAccessSpecifier {\n\n /**\n * The package name of the declaring type.\n */\n default String getPackageName() {\n return declaringType().getPackageName();\n }\n\n /**\n * The class(es) wrapping the declaring type.\n */\n default String getClassName() {\n return declaringType().getClassName();\n }\n\n /**\n * The qualified name of the method composed by the qualfied name of the declaring type\n * followed by a dot and the name of the method.\n */\n default String getQualifiedName() {\n return declaringType().getQualifiedName() + \".\" + this.getName();\n }\n\n /**\n * The signature of the method.\n */\n default String getSignature() {\n StringBuilder sb = new StringBuilder();\n sb.append(getName());\n sb.append(\"(\");\n for (int i = 0; i < getNumberOfParams(); i++) {\n if (i != 0) {\n sb.append(\", \");\n }\n sb.append(getParam(i).describeType());\n }\n sb.append(\")\");\n return sb.toString();\n }\n\n /**\n * The qualified signature of the method. It is composed by the qualified name of the declaring type\n * followed by the signature of the method.\n */\n default String getQualifiedSignature() {\n return declaringType().getId() + \".\" + this.getSignature();\n }\n\n /**\n * The type in which the method is declared.\n */\n ResolvedReferenceTypeDeclaration declaringType();\n\n /**\n * Number of params.\n */\n int getNumberOfParams();\n\n /**\n * Get the ParameterDeclaration at the corresponding position or throw IllegalArgumentException.\n */\n ResolvedParameterDeclaration getParam(int i);\n\n /**\n * Utility method to get the last ParameterDeclaration. It throws UnsupportedOperationException if the method\n * has no parameters.\n * The last parameter can be variadic and sometimes it needs to be handled in a special way.\n */\n default ResolvedParameterDeclaration getLastParam() {\n if (getNumberOfParams() == 0) {\n throw new UnsupportedOperationException(\"This method has no typeParametersValues, therefore it has no a last parameter\");\n }\n return getParam(getNumberOfParams() - 1);\n }\n\n /**\n * Has the method or construcor a variadic parameter?\n * Note that when a method has a variadic parameter it should have an array type.\n */\n default boolean hasVariadicParameter() {\n if (getNumberOfParams() == 0) {\n return false;\n } else {\n return getParam(getNumberOfParams() - 1).isVariadic();\n }\n }\n\n @Override\n default Optional<ResolvedTypeParameterDeclaration> findTypeParameter(String name) {\n for (ResolvedTypeParameterDeclaration tp : this.getTypeParameters()) {\n if (tp.getName().equals(name)) {\n return Optional.of(tp);\n }\n }\n return declaringType().findTypeParameter(name);\n }\n\n /**\n * Number of exceptions listed in the throws clause.\n */\n int getNumberOfSpecifiedExceptions();\n\n /**\n * Type of the corresponding entry in the throws clause.\n *\n * @throws IllegalArgumentException if the index is negative or it is equal or greater than the value returned by\n * getNumberOfSpecifiedExceptions\n * @throws UnsupportedOperationException for those types of methods of constructor that do not declare exceptions\n */\n ResolvedType getSpecifiedException(int index);\n\n default List<ResolvedType> getSpecifiedExceptions() {\n if (getNumberOfSpecifiedExceptions() == 0) {\n return Collections.emptyList();\n } else {\n List<ResolvedType> exceptions = new LinkedList<>();\n for (int i = 0; i < getNumberOfSpecifiedExceptions(); i++) {\n exceptions.add(getSpecifiedException(i));\n }\n return exceptions;\n }\n }\n}",
"ClassMember getMethod () { return method; }",
"public Object visit(Method node){\n ClassTreeNode treeNode = classMap.get(currentClass);\n treeNode.getMethodSymbolTable().add(node.getName(), node);\n //System.out.println(\"Adding method \" + node.getName() + \" to \" + currentClass);\n treeNode.getVarSymbolTable().enterScope();\n super.visit(node);\n return null;\n }",
"@DebuggerTargetObjectIface(\"Symbol\")\npublic interface TargetSymbol extends TargetObject {\n\n\tString DATA_TYPE_ATTRIBUTE_NAME = PREFIX_INVISIBLE + \"data_type\";\n\tString SIZE_ATTRIBUTE_NAME = PREFIX_INVISIBLE + \"size\";\n\tString NAMESPACE_ATTRIBUTE_NAME = PREFIX_INVISIBLE + \"namespace\";\n\n\t/**\n\t * Get the type of this symbol\n\t * \n\t * @return a future completing with the type\n\t */\n\t@TargetAttributeType(name = DATA_TYPE_ATTRIBUTE_NAME, fixed = true, hidden = true)\n\tpublic default TargetDataType getDataType() {\n\t\treturn getTypedAttributeNowByName(DATA_TYPE_ATTRIBUTE_NAME, TargetDataType.class,\n\t\t\tTargetDataType.UNDEFINED1);\n\t}\n\n\t/**\n\t * Get the type of this symbol converted to a Ghidra data type\n\t * \n\t * @return a future completing with the type\n\t */\n\tpublic default CompletableFuture<DataType> getGhidraDataType(\n\t\t\tTargetDataTypeConverter converter) {\n\t\treturn converter.convertTargetDataType(getDataType()).thenApply(dt -> dt);\n\t}\n\n\t/**\n\t * Get the type of this symbol converted to a Ghidra data type\n\t * \n\t * <p>\n\t * WARNING: Each call to this variant creates a new {@link TargetDataTypeConverter}, and so does\n\t * not take full advantage of its internal cache.\n\t * \n\t * @see #getGhidraDataType(TargetDataTypeConverter)\n\t */\n\tpublic default CompletableFuture<DataType> getGhidraDataType(DataTypeManager dtm) {\n\t\treturn getGhidraDataType(new TargetDataTypeConverter(dtm));\n\t}\n\n\t/**\n\t * Get the type of this symbol converted to a Ghidra data type, without using a\n\t * {@link DataTypeManager}\n\t *\n\t * <p>\n\t * It is better to use variants with a {@link DataTypeManager} directly, rather than using no\n\t * manager and cloning to one later. The former will select types suited to the data\n\t * organization of the destination manager. Using no manager and cloning later will use\n\t * fixed-size types.\n\t * \n\t * @see #getGhidraDataType(DataTypeManager)\n\t */\n\tpublic default CompletableFuture<DataType> getGhidraDataType() {\n\t\treturn getGhidraDataType((DataTypeManager) null);\n\t}\n\n\t/**\n\t * Determine whether the symbol has a constant value\n\t * \n\t * <p>\n\t * Constant symbols include but are not limited to C enumeration constants. Otherwise, the\n\t * symbol's value refers to an address, which stores a presumably non-constant value.\n\t * \n\t * @return true if constant, or false if not or unspecified\n\t */\n\tpublic default boolean isConstant() {\n\t\treturn getValue().isConstantAddress();\n\t}\n\n\t/**\n\t * Get the value of the symbol\n\t * \n\t * <p>\n\t * If the symbol is a constant, then the returned address will be in the constant space.\n\t * \n\t * @return the address or constant value of the symbol, or {@link Address#NO_ADDRESS} if\n\t * unspecified\n\t */\n\t@Override\n\t// NB. TargetObject defines this attribute\n\tpublic default Address getValue() {\n\t\treturn getTypedAttributeNowByName(VALUE_ATTRIBUTE_NAME, Address.class, Address.NO_ADDRESS);\n\t}\n\n\t/**\n\t * If known, get the size of the symbol in bytes\n\t * \n\t * <p>\n\t * The size of a symbol is usually not required at runtime, so a user should be grateful if this\n\t * is known. If it is not known, or the symbol does not have a size, this method returns 0.\n\t * \n\t * @return the size of the symbol, or 0 if unspecified\n\t */\n\t@TargetAttributeType(\n\t\tname = SIZE_ATTRIBUTE_NAME,\n\t\tfixed = true,\n\t\thidden = true)\n\tpublic default long getSize() {\n\t\treturn getTypedAttributeNowByName(SIZE_ATTRIBUTE_NAME, Long.class, 0L);\n\t}\n\n\t/**\n\t * Get the namespace for this symbol.\n\t * \n\t * <p>\n\t * While it is most common for a symbol to be an immediate child of its namespace, that is not\n\t * necessarily the case. This method is a reliable and type-safe means of obtaining that\n\t * namespace.\n\t * \n\t * @return a reference to the namespace\n\t */\n\t@TargetAttributeType(\n\t\tname = NAMESPACE_ATTRIBUTE_NAME,\n\t\trequired = true,\n\t\tfixed = true,\n\t\thidden = true)\n\tpublic default TargetSymbolNamespace getNamespace() {\n\t\treturn getTypedAttributeNowByName(NAMESPACE_ATTRIBUTE_NAME, TargetSymbolNamespace.class,\n\t\t\tnull);\n\t}\n}",
"MethodName getMethod();",
"public Method addMethod(String sName, String sSig)\n {\n ensureLoaded();\n Method method = new Method(sName, sSig, m_flags.isInterface());\n m_tblMethod.put(method.getIdentity(), method);\n setModified(true);\n return method;\n }",
"MethodInvocation getImplicitInvocationType();",
"public interface IConstructorFunctionSymbol {\n\n public IConstructorInfo getConstructorInfo();\n \n}",
"private static OperatorBuilder unary(String symbol, DoubleUnaryOperator unaryOp, Type type) {\n if (unaryOp == null) {\n throw new IllegalArgumentException(\"operator argument must not be null\");\n }\n if (type.arity() != 1) {\n throw new IllegalArgumentException(\"type argument must be PREFIX or POSTFIX\");\n }\n // XXX ensure valid symbol\n return new OperatorBuilder(unaryOp, null, symbol, 90, type);\n }",
"private IMethod findMethod(IType type, String sourceMethod) throws JavaModelException {\n\t\tIMethod[] methods = type.getMethods();\r\n\t\tfor (IMethod method : methods) {\r\n\t\t\tif (sourceMethod.equals(method.getElementName())) {\r\n\t\t\t\treturn method;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"private static QualifiedName makePrimitiveInstanceMethodName(String methodName, String primitiveTypeName) {\r\n \r\n if(methodName == null || primitiveTypeName == null) {\r\n throw new IllegalArgumentException(\"makePrimitiveInstanceMethodName must not be passed null values\");\r\n }\r\n \r\n // Trivial case: If we are given the name of a primitive type in CAL form (eg, \"Int\")\r\n // then we don't need to do any particular work to get things into the correct form.\r\n if(Character.isUpperCase(primitiveTypeName.charAt(0))) {\r\n return QualifiedName.make(CAL_Prelude.MODULE_NAME, methodName + primitiveTypeName);\r\n }\r\n \r\n // Non-trivial case: we need to convert the first character of the primitive type name\r\n // to upper-case.\r\n StringBuilder buffer = new StringBuilder(methodName.length() + primitiveTypeName.length());\r\n buffer.append(methodName);\r\n buffer.append(Character.toUpperCase(primitiveTypeName.charAt(0)));\r\n buffer.append(primitiveTypeName.substring(1));\r\n \r\n return QualifiedName.make(CAL_Prelude.MODULE_NAME, buffer.toString());\r\n }",
"public ASTMethod(ASTNode node, Class clz, MetaMethod method, boolean isGDK) {\n super(node);\n this.clz = clz;\n this.method = method;\n this.isGDK = isGDK;\n }",
"private void initMethodMap(Class<?> type, Set<Class<?>> closeList, List<Method> methodList) {\n\t\tcloseList.add(type);\n\t\t\n\t\tfor(Method method : type.getMethods()) {\n\t\t\t// check if there is a field annotation\n\t\t\tif(method.isAnnotationPresent(Field.class)) {\n\t\t\t\tString key = getKeyFromMethodName(method.getName());\n\t\t\t\tif(!key.equalsIgnoreCase(\"id\")) {\n\t\t\t\t\tList<Method> methods = null;\n\t\t\t\t\tif(methodList != null) {\n\t\t\t\t\t\tmethods = new ArrayList<Method>(methodList);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmethods = new ArrayList<Method>();\n\t\t\t\t\t}\n\t\t\t\t\tmethods.add(method);\n\t\t\t\t\t_methodMap.put(key, methods);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// check if there is an index embedded annotation\n\t\t\t\tif(method.isAnnotationPresent(IndexedEmbedded.class)) {\n\t\t\t\t\tClass<?> subtype = method.getReturnType();\n\t\t\t\t\t// check if return type is searchable and close list does not contain subtype\t\t\n\t\t\t\t\tif(Searchable.class.isAssignableFrom(subtype) && !closeList.contains(subtype)) {\n\t\t\t\t\t\t// recursion\n\t\t\t\t\t\tList<Method> methods = null;\n\t\t\t\t\t\tif(methodList != null) {\n\t\t\t\t\t\t\tmethods = new ArrayList<Method>(methodList);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tmethods = new ArrayList<Method>();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmethods.add(method);\n\t\t\t\t\t\tinitMethodMap(subtype, closeList, methods);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Pure\n private static @Nonnull String createMethodCallWithMethodName(@Nonnull MethodInformation method, @Nonnull String methodName) {\n return methodName + FiniteIterable.of(method.getElement().getParameters()).map(parameter -> parameter.getSimpleName().toString()).join(Brackets.ROUND);\n }",
"private MCTypeReference<? extends MCTypeSymbol> initTypeRef(ASTPort node, StringBuilder typeName, ASTType astType) {\n if (node.getType().get() instanceof ASTRange) {\n return initTypeRefASTRange(node, typeName, (ASTRange) astType);\n }\n else if (node.getType().get() instanceof ASTRanges) {\n return initTypeRefASTRanges(node, typeName, (ASTRanges) astType);\n }\n Log.debug(node.getName().isPresent() ? node.getName().get() : \"unnamed port\" + \" \" + astType.toString(), \"info\");\n return initTypeRefGeneralType(node, typeName, astType);\n }",
"private MethodClass() {\r\n super(IMethodClass.TYPE_ID);\r\n }",
"public X10MethodInstance createMethodInstance(Type container, Name name, List<Type> typeArgs, List<Type> argTypes, Context context) {\n try {\n return xts.findMethod(container, xts.MethodMatcher(container, name, typeArgs, argTypes, context));\n } catch (SemanticException e) {\n throw new InternalCompilerError(\"Unable to find required method instance\", container.position(), e);\n }\n }",
"public static MethodBuilder constructor(String name) {\n\t\treturn new MethodBuilder().returnType(\"\").name(name);\n\t}",
"public RandomVariableMethods getMethod(String methodType)\n {\n if(methodType.equalsIgnoreCase(\"poisson\"))\n {\n return new MethodPoisson();\n }\n return null;\n }",
"HxMethod createMethodReference(final String declaringType,\n final String returnType,\n final String methodName,\n final String... parameterTypes);",
"com.google.protobuf.ByteString\n getSymbolBytes();",
"public abstract Type typeCheck(SymbolTable stable) throws TypeCheckError;",
"public MethodBuilder type(String type) {\n\t\tthis.type = type;\n\t\treturn this;\n\t}",
"protected Method buildMethod(Class methodClass, String methodName, Class[] methodParameterTypes) throws DescriptorException {\n try {\n return Helper.getDeclaredMethod(methodClass, methodName, methodParameterTypes);\n } catch (NoSuchMethodException exception) {\n throw DescriptorException.noSuchMethodWhileInitializingInstantiationPolicy(methodClass.getName() + \".\" + methodName, this.getDescriptor(), exception);\n } catch (SecurityException exception) {\n throw DescriptorException.securityWhileInitializingInstantiationPolicy(methodClass.getName() + \".\" + methodName, this.getDescriptor(), exception);\n }\n }",
"public MethodTranslator getMethodTranslator( ClassTranslator owner, Signature sig ) throws NoSuchMethodException;",
"MethodType (ClassMember m, Type r, ExpressionList args) {\r\n this (m.name, r, args);\r\n method = m;\r\n }",
"private void isMethod() {\n ArrayAdapter<String> isVariable = new ArrayAdapter<>(this, isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr);\n isNameExpr.isMethod(isNameExpr);\n isNameExpr.isMethod((isParameter, isParameter, isParameter, isParameter) -> {\n isNameExpr = isNameExpr.isMethod(isNameExpr.isMethod(isNameExpr), isNameExpr);\n isMethod(isNameExpr);\n isNameExpr = isNameExpr;\n });\n }",
"public void visit(MethodDecl n) \n\t{\n\t\tClassSymbolTable cst = (ClassSymbolTable) currentScope;\n\t\n\t\tString returnType = getTypeStr(n.t);\n\t\tString name = n.i.toString();\n\t\tString[] paramNames = new String[n.fl.size()+1];\n\t\tString[] paramTypes = new String[n.fl.size()+1];\n\t\t\n\t\t//Add \"this\" parameter of the class type to the first arg\n\t\tparamNames[0] = \"this\";\n\t\tparamTypes[0] = cst.getName();\n\t\t\n\t\tn.t.accept(this);\n\t\tn.i.accept(this);\n \n\t\t//Check for redef in method arguments\n\t\tHashSet<String> methodArgs = new HashSet<String>();\n\t\n\t\tfor ( int i = 0; i < n.fl.size(); i++ ) \n\t\t{\n\t\t\tif(!methodArgs.add(n.fl.elementAt(i).i.toString()))\n\t\t\t{\n\t\t\t\tredefError(n.fl.elementAt(i).i.toString(), n.fl.elementAt(i).i.lineNum, n.fl.elementAt(i).i.charNum);\n\t\t\t}\n\t\t\tparamNames[n.fl.size()-i] = n.fl.elementAt(i).i.toString();\n\t\t\tparamTypes[n.fl.size()-i] = getTypeStr(n.fl.elementAt(i).t);\n\t\t\tn.fl.elementAt(i).accept(this);\n\t\t}\n\t\t\n\t\tcst.addMethod(name, paramNames, paramTypes, returnType);\n\t\tcurrentScope = cst.enterScope(name);\n\t\t\n\t\tfor ( int i = 0; i < n.vl.size(); i++ ) \n\t\t{\n\t\t\tn.vl.elementAt(i).accept(this);\n\t\t}\n\t\t\n\t\tfor ( int i = 0; i < n.sl.size(); i++ ) \n\t\t{\n\t\t\tn.sl.elementAt(i).accept(this);\n\t\t}\n \n\t\tn.e.accept(this);\n\t\t\n\t\tcurrentScope = currentScope.exitScope();\n\t}",
"CodeType createCodeType();",
"public Method addMethod(String sSig)\n {\n int of = sSig.indexOf('(');\n return addMethod(sSig.substring(0, of), sSig.substring(of));\n }",
"Symbol resolve(String name);",
"private void isMethod() {\n if (isNameExpr != null) {\n isNameExpr.isMethod();\n isNameExpr = null;\n }\n }",
"private OperationType methodSignatureMapping() {\n String methodName = this.methodSignature.getName();\n try {\n MethodNameMapping methodNameMapping = SpiOrIocUtils.getBean(applicationContext, MethodNameMapping.class);\n assignOperationType(methodNameMapping, methodName);\n return operationType == null ? doDefaultMapping(methodName) : operationType;\n } catch (GetBeanException gbe) {\n if (logger.isErrorEnabled()) {\n logger.error(\"get the method name mapping from spi or spring ioc happen error. \" +\n \"demote the default mapping\", gbe);\n }\n return doDefaultMapping(methodName);\n }\n }",
"public interface MethodFactory extends ModuleSupportable\n{\n\t/**\n\tUsed to identify this interface when finding it with the Monitor.\n\t**/\n\tpublic static final String MODULE = \n\t \"com.splicemachine.db.iapi.store.access.conglomerate.MethodFactory\";\n\n\t/**\n\tReturn the default properties for this access method.\n\t**/\n\tProperties defaultProperties();\n\n\t/**\n\tReturn whether this access method implements the implementation\n\ttype given in the argument string.\n\t**/\n\tboolean supportsImplementation(String implementationId);\n\n\t/**\n\tReturn the primary implementation type for this access method.\n\tAlthough an access method may implement more than one implementation\n\ttype, this is the expected one. The access manager will put the\n\tprimary implementation type in a hash table for fast access.\n\t**/\n\tString primaryImplementationType();\n\n\t/**\n\tReturn whether this access method supports the format supplied in\n\tthe argument.\n\t**/\n\tboolean supportsFormat(UUID formatid);\n\n\t/**\n\tReturn the primary format that this access method supports.\n\tAlthough an access method may support more than one format, this\n\tis the usual one. the access manager will put the primary format\n\tin a hash table for fast access to the appropriate method.\n\t**/\n\tUUID primaryFormat();\n}",
"private static Method _getMethodForClass(Class targetClass, String methodName, String[] paramTypeNames)\n throws ClassNotFoundException, NoSuchMethodException\n {\n int numParams = (paramTypeNames != null ? paramTypeNames.length : 0);\n Class[] paramTypes = new Class[numParams];\n ClassLoader loader = targetClass.getClassLoader();\n for (int i = 0; i<numParams; i++)\n {\n\tString typeName = paramTypeNames[i];\n\tif (typeName.equals(\"int\"))\n\t paramTypes[i] = Integer.TYPE;\n\telse if (typeName.equals(\"double\"))\n\t paramTypes[i] = Double.TYPE;\n\telse if (typeName.equals(\"boolean\"))\n\t paramTypes[i] = Boolean.TYPE;\n\telse if (loader == null)\n\t paramTypes[i] = Class.forName(paramTypeNames[i]);\n\telse\n\t paramTypes[i] = loader.loadClass(paramTypeNames[i]);\n }\n Method method = targetClass.getMethod(methodName, paramTypes);\n return method;\n }",
"public static Method getMethod(String method) throws IllegalArgumentException {\n/* 119 */ return getMethod(method, false);\n/* */ }",
"protected ResourceMethod defineMethod( String theName, JavaType theReturnType, HttpVerb theHttpVerb, String theMethodPath ) {\r\n\t\treturn new ResourceMethod( theName, theReturnType, theHttpVerb, theMethodPath, this );\r\n\t}",
"Target getTargetMethod(MethodNode method) {\n if (!this.classNode.methods.contains(method)) {\n throw new IllegalArgumentException(\"Invalid target method supplied to getTargetMethod()\");\n }\n \n String targetName = method.name + method.desc;\n Target target = this.targetMethods.get(targetName);\n if (target == null) {\n target = new Target(this.classNode, method);\n this.targetMethods.put(targetName, target);\n }\n return target;\n }",
"HxMethod createConstructor(final String... parameterTypes);",
"@Override\n\tpublic String visitMethodCall(MethodCallContext ctx) {\n\t\tint childrenNo=ctx.children.size();\n\t\tParseTree lastChild=ctx.children.get(childrenNo-1);\n\t\tString returnType;\n\t\tString methodName;\n\t\tif(lastChild instanceof TerminalNode){\n\t\t\tList<String> argTypes=new ArrayList<>();\n\t\t\tStack<String> ids=new Stack<>();\n\t\t\tParseTree n=ctx.children.get(childrenNo-2);\n\t\t\tif (childrenNo<=4){\n\t\t\t\tif(!(n instanceof TerminalNode)){\n\t\t\t\t\tmethodName=ctx.getChild(childrenNo-4).getText();\n\t\t\t\t\tMethodRecord mRec=(MethodRecord) table.lookup(methodName);\n\t\t\t\t\tif (mRec==null)throw new RuntimeException(\"method \"+methodName+ \" is not declared\");\n\t\t\t\t\tList<VarRecord> paramList=(List<VarRecord>) mRec.getParameters();\n\t\t\t\t\tList<ParseTree> arguments= new ArrayList<>();\n\t\t\t\t\tfor(int i=0;i<=n.getChildCount();i+=2){\n\t\t\t\t\t\targuments.add(n.getChild(i));\n\t\t\t\t\t}\n\t\t\t\t\tif(paramList.size()!=arguments.size())throw new RuntimeException(\"Incorrect number of arguments\");\n\t\t\t\t\telse for(int i=0;i<=paramList.size()-1;i++){\n\t\t\t\t\t\tString actualType=visit(arguments.get(i));\n\t\t\t\t\t\tString declaredType=paramList.get(i).getReturnType();\n\t\t\t\t\t\tif(!actualType.equals(declaredType)) throw new RuntimeException(\"Incorrect argument type\");\n\t\t\t\t\t}//checking arguments complete\n\t\t\t\t\treturn mRec.getReturnType();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tClassRecord cRec;\n\t\t\t\t\t\tmethodName=ctx.getChild(childrenNo-3).getText();\n\t\t\t\t\t\tcRec=(ClassRecord) table.lookup(methodName);\n\t\t\t\t\t\tMethodRecord mRec=cRec.getMethod(methodName);\n\t\t\t\t\t\tif (mRec==null)throw new RuntimeException(\"method \"+methodName+ \" is not declared\");\n\t\t\t\t\t\treturn mRec.getReturnType();\n\t\t\t\t\t}\n\t\t\t}else \n\t\t\tif(!(n instanceof TerminalNode)){\n\t\t\t\tmethodName=ctx.getChild(childrenNo-4).getText();\n\t\t\t\t//checking charAt(i) \n\t\t\t\tif(methodName.equals(\"charAt\")){\n\t\t\t\t\tif(n.getChildCount()!=1) throw new RuntimeException(\"Incorrect number of arguments on charAt()function\");\n\t\t\t\t\telse {\n\t\t\t\t\t\tString charArgType=visit(n);\t\t//check argument type is int\n\t\t\t\t\t\tif (!charArgType.equals(\"int\")) throw new RuntimeException(\"ARgument i on function charAt(i) must be of type int\");\n\t\t\t\t\t}\n\t\t\t\t\tString objectType=table.lookup(ctx.getChild(childrenNo-6).getText()).getReturnType();\n\t\t\t\t\tif (!objectType.equals(\"String\")) throw new RuntimeException(\".charAt(i) is applicable only to Strings\");\n\t\t\t\t}\n\t\t\t\tfor(int i=0;i<=n.getChildCount();i+=2){\n\t\t\t\t\targTypes.add(visit(n.getChild(i)));\n\t\t\t\t}\n\t\t\tfor(int i=childrenNo-4;i>=0;i-=2){\n\t\t\t\tids.push(ctx.getChild(i).getText());\n\t\t\t}\n\t\t\t}else{ \n\t\t\t\t//checking .length()\n\t\t\t\tmethodName=ctx.getChild(childrenNo-3).getText();\n\t\t\t\tif(methodName.equals(\"length\")){\n\t\t\t\t\tString objectType=table.lookup(ctx.getChild(childrenNo-5).getText()).getReturnType();\n\t\t\t\t\tif (!objectType.equals(\"String\")) throw new RuntimeException(\".length() is applicale only to Strings\");\n\t\t\t\t}\n\t\t\t\targTypes=null;\n\t\t\t\tfor(int i=childrenNo-3;i>=0;i-=2){\n\t\t\t\t\tids.push(ctx.getChild(i).getText());\n\t\t\t\t}\n\t\t\t}\n\t\t\tint count=ids.size();\n\t\t\tClassRecord cRec=null;\n\t\t\tRecord r;\n\t\t\tfor(int i=0;i<=count-2;i++){\n\t\t\t\tString key=ids.pop();\n\t\t\t\tr= table.lookup(key);\t\t\t\t\n\t\t\t\tcRec=(ClassRecord)table.lookup(r.Type);\n\t\t\t\tif (cRec==null) throw new RuntimeException(\"Class \"+key+\" is not declared\");\t\t\t\t\n\t\t\t}\n\t\t\t//last item in stack is the method Identifier\n\t\t\tMethodRecord mRec=cRec.getMethod(ids.pop());\n\t\t\tif (mRec==null)throw new RuntimeException(\"Method not declared in class \"+cRec.getName());\n\t\t\treturnType=mRec.getReturnType();\n\t\t\tif(methodName.equals(\"charAt\")) returnType=\"char\";\n\t\t\tif(methodName.equals(\"length\"))returnType=\"int\";\n\t\t\t//checking arguments \n\t\t\tif(argTypes==null) return returnType;\n\t\t\telse {\t\t\t\t\n\t\t\t\tList<VarRecord> parameters=(List<VarRecord>) mRec.getParameters();\n\t\t\t\tif(parameters.size()!=argTypes.size()) throw new RuntimeException(\"Incorect number of arguments on method call\");\n\t\t\t\telse{\n\t\t\t\t\tfor(int i=0;i<argTypes.size();i++){\n\t\t\t\t\t\tif(!argTypes.get(i).equals((parameters.get(i).getReturnType()))) throw new RuntimeException (\"incorrect argument type\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} return returnType;\n\t\t}\telse \t\t\t\t\t\t// last node is a RuleNode\n\t\t\t{\n\t\t\t\tif (childrenNo==3){\t\t\t\t\t\n\t\t\t\tString leftType=visit(ctx.getChild(0)); //also checks the first method for undeclared ids\n\t\t\t\t//ClassRecord cRec=(ClassRecord) table.lookup(ctx.getChild(0).getText());\n\t\t\t\tParseTree node=ctx.getChild(2);\n\t\t\t\t//checking charAt function\n\t\t\t\tif((node.getChildCount()==4)&&(node.getChild(3) instanceof TerminalNode)){\t\t\t\n\t\t\t\t\tif (node.getChild(0).getText().equals(\"charAt\")){\n\t\t\t\t\t\tif (!leftType.equals(\"String\")) throw new RuntimeException(\"charAt() only applicable to Strings\");\n\t\t\t\t\t\tString argType=visit(node.getChild(2));\n\t\t\t\t\t\tif (!argType.equals(\"int\")) throw new RuntimeException(\"Incorrect argument in charAt()\");\n\t\t\t\t\t\treturn \"char\";\n\t\t\t\t\t}\n\t\t\t\t}else if(node.getChildCount()==3&&((node.getChild(2) instanceof TerminalNode))){\n\t\t\t\t\tif(node.getChild(0).getText().equals(\"length\")){\n\t\t\t\t\t\tif (!leftType.equals(\"String\")) throw new RuntimeException(\"length() only applicable to Strings\");\n\t\t\t\t\t\telse return \"int\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t{String mName=ctx.getChild(2).getChild(0).getText();\n\t\t\t\tClassRecord tempCR=(ClassRecord) table.lookup(ctx.getChild(0).getChild(0).getText());\n\t\t\t\tMethodRecord mRec=tempCR.getMethod(mName);\n\t\t\t\tif(mRec==null)throw new RuntimeException(\"method \"+mName+\" is not declared in class \"+tempCR.getName());\n\t\t\t\treturn mRec.getReturnType(); //visit the last methodCall in the chain \n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (childrenNo==5){\n\t\t\t\t\tString leftType=visit(ctx.getChild(1)); //also checks the first method for undeclared ids\n\t\t\t\t\tParseTree node=ctx.getChild(4);\n\t\t\t\t\t//checking charAt function\n\t\t\t\t\tif((node.getChildCount()==4)&&(node.getChild(3) instanceof TerminalNode)){\t\t\t\n\t\t\t\t\t\tif (node.getChild(0).getText().equals(\"charAt\")){\n\t\t\t\t\t\t\tif (!leftType.equals(\"String\")) throw new RuntimeException(\"charAt() only applicable to Strings\");\n\t\t\t\t\t\t\telse return visit(node);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(node.getChildCount()==3&&((node.getChild(2) instanceof TerminalNode))){\n\t\t\t\t\t\tif(node.getChild(0).getText().equals(\"length\")){\n\t\t\t\t\t\t\tif (!leftType.equals(\"String\")) throw new RuntimeException(\"length() only applicable to Strings\");\n\t\t\t\t\t\t\telse return visit(node);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tClassRecord cR=(ClassRecord)table.lookup(leftType);\n\t\t\t\t\tMethodRecord mRec=cR.getMethod(node.getChild(0).getText());\n\t\t\t\t\treturn mRec.getReturnType(); //visit the last methodCall in the chain \n\t\t\t\t}\n\t\t\t}\n\t\treturn null; //debuggin purposes. should be unreachable\n\t}",
"public static MethodBuilder method() {\n\t\treturn new MethodBuilder();\n\t}",
"public void translateStaticPush( MethodTranslator method );",
"private void addMethod(MethodNode methodNode){\n\t\t\tString[] exceptions = new String[methodNode.exceptions.size()];\n\t\t\tmethodNode.exceptions.toArray(exceptions);\n\t\t\tMethodVisitor mv = cv.visitMethod(methodNode.access, methodNode.name, methodNode.desc, methodNode.signature, exceptions);\n\n\t\t\tmethodNode.instructions.resetLabels();\n\t\t\t// SimpleRemapper -> maps old name to new name\n\t\t\t// updates owners and descriptions appropriately\n\t\t\tmethodNode.accept(new RemappingMethodAdapter(methodNode.access, methodNode.desc, mv, new SimpleRemapper(classToMerge.name, baseClassName)));\n\t\t}",
"public static PyActorMethod<Object> of(String methodName) {\n return of(methodName, Object.class);\n }",
"void setMethod(org.hl7.fhir.CodeableConcept method);",
"default HxMethod createMethodReference(final Class<?> declaringType,\n final Class<?> returnType,\n final String methodName,\n final Class<?>... parameterTypes) {\n return createMethodReference(\n declaringType.getName(),\n returnType.getName(),\n methodName,\n getHaxxor().toNormalizedClassnames(parameterTypes)\n );\n }",
"private ELOperandToken readMethodToken() {\r\n \t\tfState = STATE_METHOD;\r\n \t\tint endOfToken = index;\r\n \t\t\r\n \t\t// read the method parameters\r\n \t\tif (!skipMethodParameters()) \r\n \t\t\treturn ELOperandToken.EOF;\r\n \t\t\r\n \t\t// skip spaces between the method's name and it's parameters\r\n \t\tif (!skipSpaceChars())\r\n \t\t\treturn ELOperandToken.EOF;\r\n \t\t// read the method name\r\n \t\tif (!skipMethodName())\r\n \t\t\treturn ELOperandToken.EOF;\r\n \t\t\r\n \t\treturn (endOfToken - index > 0 ? new ELOperandToken(index, endOfToken - index, getCharSequence(index, endOfToken - index), ELOperandToken.EL_METHOD_TOKEN) : ELOperandToken.EOF);\r\n \t}",
"public void setSolvingMethodType(String solvingMethodType)\n/* */ {\n/* 195 */ this.solvingMethodType = solvingMethodType;\n/* */ }",
"public void translateInstantiation( MethodTranslator method, New newInsn );",
"ProcedureDecl createProcedureDecl();",
"public String getSolvingMethodType()\n/* */ {\n/* 183 */ return this.solvingMethodType;\n/* */ }",
"public Method getMethod(String sSig)\n {\n ensureLoaded();\n return (Method) m_tblMethod.get(sSig);\n }",
"@Test\n public void fromMethodResolverAndType() {\n\n MethodResolver methodResolver = MethodResolver.fromType(Person.class);\n\n assertThat(methodResolver).isNotNull();\n assertThat(methodResolver.getReferenceType()).isEqualTo(Person.class);\n }",
"void addMethod(Method method);",
"public static native short getRemoteMethodInfo(short objID, short methodID);",
"private AnalysisMethodEnum(String name) {\n\t\tthis.methodName = name;\n\t}"
] | [
"0.61976695",
"0.5880837",
"0.5808551",
"0.5782151",
"0.5782151",
"0.5772363",
"0.56052095",
"0.54855955",
"0.5434625",
"0.5396532",
"0.53416646",
"0.5233401",
"0.51586634",
"0.5133922",
"0.51252204",
"0.50142246",
"0.49830225",
"0.4983015",
"0.49803865",
"0.49436995",
"0.49346682",
"0.49305323",
"0.4926041",
"0.49124035",
"0.49115756",
"0.48949134",
"0.4894398",
"0.48747185",
"0.48645484",
"0.48631716",
"0.48631716",
"0.4843956",
"0.48245713",
"0.48120385",
"0.47884429",
"0.4778408",
"0.47782993",
"0.47754815",
"0.47726274",
"0.47584292",
"0.47538462",
"0.47483188",
"0.4745886",
"0.47426724",
"0.47381783",
"0.4719734",
"0.47101867",
"0.4706375",
"0.46964732",
"0.4678233",
"0.46666336",
"0.46561545",
"0.46524855",
"0.4640506",
"0.4629014",
"0.46255425",
"0.45964253",
"0.45952597",
"0.45925063",
"0.4591249",
"0.45901757",
"0.45857093",
"0.4578635",
"0.4578289",
"0.4572745",
"0.45654282",
"0.4563695",
"0.45561606",
"0.45561573",
"0.45488742",
"0.45473045",
"0.45402747",
"0.45396876",
"0.4539416",
"0.45389017",
"0.4536229",
"0.44783437",
"0.44763082",
"0.4475217",
"0.44736093",
"0.44627774",
"0.44570932",
"0.4447562",
"0.4446717",
"0.44413963",
"0.44325918",
"0.44298297",
"0.4423388",
"0.4418907",
"0.44175032",
"0.44159842",
"0.440997",
"0.44070864",
"0.44051293",
"0.43861628",
"0.43780282",
"0.43759218",
"0.43751335",
"0.43706205",
"0.4360929"
] | 0.71423596 | 0 |
Determines if this MethodType is equivalent to another Type | public boolean isEquivalentTo(Type other) {
if (other instanceof MethodType) {
return sameSignature((MethodType)other);
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean replacementfor(Type o);",
"public abstract boolean isTypeCorrect();",
"boolean isMoreSpecific (MethodType type) throws OverloadingAmbiguous {\r\n boolean status = false;\r\n\r\n try {\r\n for (int i = 0, size = arguments.size (); i < size; i++) {\r\n\tIdentifier this_arg = (Identifier) arguments.elementAt (i);\r\n\tIdentifier target_arg = (Identifier) type.arguments.elementAt (i);\r\n\r\n\tint type_diff = this_arg.type.compare (target_arg.type);\r\n\tif (type_diff == 0)\r\n\t continue;\r\n\telse if (type_diff > 0) {\r\n\t if (status == true) throw new OverloadingAmbiguous ();\r\n\t} else {\r\n\t if (i != 0) throw new OverloadingAmbiguous ();\r\n\t status = true;\r\n\t}\r\n }\r\n } catch (OverloadingAmbiguous ex) {\r\n throw ex;\r\n } catch (TypeMismatch ex) {\r\n throw new OverloadingAmbiguous ();\r\n }\r\n\r\n return status;\r\n }",
"public boolean sameSignature(MethodType other) {\n return name.equals(name) &&\n Arrays.equals(typeParams, other.typeParams) &&\n Arrays.equals(paramTypes, other.paramTypes);\n }",
"private boolean methodEqueals(Method m1, Method m2) {\n\t\tif (m1.getName() == m2.getName()) {\n\t\t\tif (!m1.getReturnType().equals(m2.getReturnType()))\n\t\t\t\treturn false;\n\t\t\tClass<?>[] params1 = m1.getParameterTypes();\n\t\t\tClass<?>[] params2 = m2.getParameterTypes();\n\t\t\tif (params1.length == params2.length) {\n\t\t\t\tfor (int i = 0; i < params1.length; i++) {\n\t\t\t\t\tif (params1[i] != params2[i])\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public boolean is( Type type ) {\n return this.type == type;\n }",
"public boolean uniSameAs(Type other, TypeFixer fixer) throws LookupException;",
"public boolean overrideEquivalent(MethodType other) {\n return this.sameSubsignature(other) || other.sameSubsignature(this);\n }",
"@Override\n public boolean isSameType(Type t) {\n if (t instanceof FuncType) {\n final FuncType other = (FuncType) t;\n return ret.isSameType(other.ret)\n && Arrays.equals(params, other.params);\n }\n return false;\n }",
"public static boolean IsA(VariableType type1, VariableType type2, SymbolTable symbolTable) {\n\t\t// TODO Auto-generated method stub\n\t\tif(type1.type==FourType.Boolean || type1.type==FourType.Integer || type1.type==FourType.IntegerArray)\n\t\t\treturn type1.type==type2.type;\n\t\tif(type1.type==FourType.Object)\n\t\t{\n\t\t\tif(type2.type!=FourType.Object)\n\t\t\t\treturn false;\n\t\t\tif(type1.name==type2.name)\n\t\t\t\treturn true;\n\t\t\tClassItem classItem=symbolTable.SearchClass(type1.name);\n\t\t\tif(classItem==null)\n\t\t\t\treturn false;\n\t\t\treturn IsA(new VariableType(FourType.Object,classItem.parentName),type2,symbolTable);\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tdefault boolean equivalentTo(Tree otherTree) {\n\t\tif (this == otherTree)\n\t\t\treturn true;\n\t\t\n\t\tif (otherTree == null || this.getKind() != otherTree.getKind() || this.hashCode() != otherTree.hashCode())\n\t\t\treturn false;\n\t\t\n\t\t\n\t\tCatchTree other = (CatchTree) otherTree;\n\t\t\n\t\tif (!Tree.equivalentTo(this.getBlock(), other.getBlock()))\n\t\t\treturn false;\n\t\t\n\t\tif (!Tree.equivalentTo(this.getParameter(), other.getParameter()))\n\t\t\treturn false;\n\t\t\n\t\tif (!Tree.equivalentTo(this.getType(), other.getType()))\n\t\t\treturn false;\n\t\t\n\t\treturn true;\n\t}",
"public final boolean isEqualTo (Type type)\n {\n if (this == type)\n return true;\n\n if (!(type instanceof TypeTerm))\n return false;\n\n TypeTerm typeTerm = (TypeTerm)type;\n \n if (kind() != typeTerm.kind() || name() != typeTerm.name() || arity() != typeTerm.arity())\n return false;\n\n for (int i=arity(); i-->0;)\n if (!argument(i).isEqualTo(typeTerm.argument(i)))\n return false;\n\n return true;\n }",
"Type1Equivalent getType1Equivalent();",
"@Override\n boolean doIsAssignableFromNonUnionType(SoyType srcType) {\n return false;\n }",
"public abstract boolean doEquivalent(T t, T t2);",
"protected abstract boolean canConvert(Class<?> parameterType, Class<?> originalArgumentType);",
"private static boolean isUserDefinedMethod(final Method method) {\n if (!method.equals(OBJECT_EQUALS)\n && !method.equals(OBJECT_HASH_CODE)\n && !method.equals(OBJECT_GET_CLASS)\n && !method.equals(OBJECT_TO_STRING)\n && !method.equals(OBJECT_CLONE)\n && !method.equals(OBJECT_WAIT_1)\n && !method.equals(OBJECT_WAIT_2)\n && !method.equals(OBJECT_WAIT_3)\n && !method.equals(OBJECT_NOTIFY)\n && !method.equals(OBJECT_NOTIFY_ALL)\n && !method.getName().startsWith(TransformationConstants.SYNTHETIC_MEMBER_PREFIX)\n && !method.getName().startsWith(TransformationConstants.ORIGINAL_METHOD_PREFIX)\n && !method.getName().startsWith(TransformationConstants.ASPECTWERKZ_PREFIX)) {\n return true;\n } else {\n return false;\n }\n }",
"public boolean equivalentInteractions(InteractionObject first, InteractionObject second) {\n\t\tboolean result = \n\t\t\tfirst.getType() == second.getType() &&\n\t\t\tfirst.getIndex() == second.getIndex();\n\t\treturn result;\n\t}",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"private boolean match(Type t, Type original) {\n\t\t\t\treturn original.getSort() == Type.METHOD && original.getSort() == t.getSort();\n\t\t\t}",
"public static boolean typesAreEquivalent(int sourceType, int destType) {\n boolean result = false;\n if (sourceType == destType) {\n result = true;\n }\n if (sourceType == Types.DECIMAL && destType == Types.NUMERIC) {\n result = true;\n }\n if (sourceType == Types.NUMERIC && destType == Types.DECIMAL) {\n result = true;\n }\n if (sourceType == Types.BOOLEAN && destType == Types.BIT) {\n result = true;\n }\n if (sourceType == Types.BIT && destType == Types.BOOLEAN) {\n result = true;\n }\n return result;\n }",
"boolean _is_equivalent(org.omg.CORBA.Object other);",
"private static boolean isOriginalTsType(TsType type) {\n if (type instanceof TsType.BasicType) {\n TsType.BasicType basicType = (TsType.BasicType)type;\n return !(basicType.name.equals(\"null\") || basicType.name.equals(\"undefined\"));\n }\n return true;\n }",
"@Override\n public abstract boolean isAssignableBy(TypeUsage other);",
"public boolean equals(Type type) {\n if (type != null) {\n if (type == this) return true;\n\n if (getPackage() == type.getPackage() && type.getTypeName().equals(getTypeName())) {\n return !isParameterized() || type.typeParameters.matches(typeParameters);\n } else return false;\n } else return false;\n }",
"public boolean equivalent(DataType dataType) {\n return equals(dataType);\n }",
"abstract public boolean isTyped();",
"public static boolean areSame(AnnotatedTypeMirror t1, AnnotatedTypeMirror t2) {\n return t1.toString().equals(t2.toString());\n }",
"private static boolean isErased(Types types, AnnotatedTypeMirror t1, AnnotatedTypeMirror t2) {\n return types.isSameType(\n types.erasure(t1.getUnderlyingType()), t2.getUnderlyingType());\n }",
"public boolean sameSubsignature(MethodType other) {\n return sameSignature(other) || sameSignature(other.erase());\n }",
"public static boolean isJDBCTypeEquivalent(int existingType, int jdbcTypeId) {\r\n // Any type matches itself.\r\n if (existingType == jdbcTypeId)\r\n return true;\r\n\r\n // To a numeric type\r\n if (isNumericType(existingType)) {\r\n if (isNumericType(jdbcTypeId))\r\n return true;\r\n\r\n if (isCharacterType(jdbcTypeId))\r\n return true;\r\n\r\n return false;\r\n }\r\n\r\n // To character type.\r\n if (isCharacterType(existingType)) {\r\n\r\n if (isCharacterType(jdbcTypeId))\r\n return true;\r\n\r\n if (isNumericType(jdbcTypeId))\r\n return true;\r\n\r\n\r\n switch (jdbcTypeId) {\r\n case Types.DATE:\r\n case Types.TIME:\r\n case Types.TIMESTAMP:\r\n return true;\r\n default:\r\n break;\r\n }\r\n \r\n return false;\r\n\r\n }\r\n\r\n // To binary type\r\n if (isBinaryType(existingType)) {\r\n\r\n if (isBinaryType(jdbcTypeId))\r\n return true;\r\n\r\n return false;\r\n }\r\n\r\n // To DATE, TIME\r\n if (existingType == Types.DATE || existingType == Types.TIME) {\r\n if (isCharacterType(jdbcTypeId))\r\n return true;\r\n\r\n if (jdbcTypeId == Types.TIMESTAMP)\r\n return true;\r\n\r\n return false;\r\n }\r\n\r\n // To TIMESTAMP\r\n if (existingType == Types.TIMESTAMP) {\r\n if (isCharacterType(jdbcTypeId))\r\n return true;\r\n\r\n if (jdbcTypeId == Types.DATE)\r\n return true;\r\n\r\n return false;\r\n }\r\n\r\n // To CLOB\r\n if (existingType == Types.CLOB && isCharacterType(jdbcTypeId))\r\n return true;\r\n\r\n return false;\r\n }",
"public static boolean areCorrespondingTypeVariables(Elements elements, AnnotatedTypeVariable type1, AnnotatedTypeVariable type2) {\n final TypeParameterElement type1ParamElem = (TypeParameterElement) type1.getUnderlyingType().asElement();\n final TypeParameterElement type2ParamElem = (TypeParameterElement) type2.getUnderlyingType().asElement();\n\n\n if (type1ParamElem.getGenericElement() instanceof ExecutableElement\n && type2ParamElem.getGenericElement() instanceof ExecutableElement) {\n final ExecutableElement type1Executable = (ExecutableElement) type1ParamElem.getGenericElement();\n final ExecutableElement type2Executable = (ExecutableElement) type2ParamElem.getGenericElement();\n\n final TypeElement type1Class = (TypeElement) type1Executable.getEnclosingElement();\n final TypeElement type2Class = (TypeElement) type2Executable.getEnclosingElement();\n\n boolean methodIsOverriden = elements.overrides(type1Executable, type2Executable, type1Class)\n || elements.overrides(type2Executable, type1Executable, type2Class);\n if (methodIsOverriden) {\n boolean haveSameIndex = type1Executable.getTypeParameters().indexOf(type1ParamElem) ==\n type2Executable.getTypeParameters().indexOf(type2ParamElem);\n return haveSameIndex;\n }\n }\n\n return false;\n }",
"public static TypeBinaryExpression typeEqual(Expression expression, Class type) { throw Extensions.todo(); }",
"private boolean areSameType(String s1, String s2) {\n\t\treturn((isMatrix(s1) && isMatrix(s2)) || (isOperator(s1) && isOperator(s2)) || (isNumber(s1) && isNumber(s2)));\n\t}",
"final boolean is(Class<?> type) {\n return type.isAssignableFrom(targetType());\n }",
"public boolean assignableTo(Type other) throws LookupException;",
"public boolean equals(JavaMethodSignature sig) {\n\t\t//if their signatures aren't the same length, we've got problems\n\t\tif (this.sig.size() != sig.sig.size())\n\t\t\treturn false;\n\t\t\n\t\t//signatures are the same length, let's run through the parameters\n\t\tfor (int i = 0; i < this.sig.size(); i++) {\n\t\t\tif (this.sig.get(i).type != sig.sig.get(i).type)\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"public abstract boolean isSameType(final Inhabitant inhabitant);",
"@Override\r\n\tpublic boolean isAssignableFrom(TypeWrapper typeWrapper) {\n\t\treturn true;\r\n\t}",
"private boolean methodsMatch(Method method,\n CallStatement.CallStatementEntry entry) throws EngineException {\n if (!method.getName().equals(entry.getName())) {\n return false;\n }\n if (method.getParameterTypes().length != parameters.size()) {\n return false;\n }\n Class[] parameterTypes = method.getParameterTypes();\n for (int index = 0; index < parameters.size(); index++) {\n Class parameterType = parameterTypes[index];\n Object parameterValue = parameters.get(index);\n if (!parameterType.isAssignableFrom(parameterValue.getClass())) {\n return false;\n }\n }\n \n for (int index = 0; index < parameters.size(); index++) {\n Class parameterType = parameterTypes[index];\n Object parameterValue = parameters.get(index);\n parameters.set(index, parameterType.cast(parameterValue));\n }\n return true;\n }",
"public interface MagicType extends Type {\n\n\t/**\n\t * Given that we are a type specified in a replacement rule (e.g. a Var or\n\t * Atom), can we consume a submatch of the given type in the match?\n\t *\n\t * Alternatively, we could have overriden .equals().\n\t */\n\tboolean replacementfor(Type o);\n}",
"@Override\n public abstract boolean isAssignableBy(ResolvedType other);",
"@Nullable\n private Boolean isOverriding(MethodJavaSymbol overridee, JavaType.ClassJavaType classType) {\n if (getParametersTypes().size() != overridee.getParametersTypes().size()) {\n return false;\n }\n for (int i = 0; i < getParametersTypes().size(); i++) {\n JavaType paramOverrider = getParametersTypes().get(i);\n if (paramOverrider.isTagged(JavaType.UNKNOWN)) {\n // FIXME : complete symbol table should not have unknown types and generics should be handled properly for this.\n return null;\n }\n // Generics type should have same erasure see JLS8 8.4.2\n\n JavaType overrideeType = overridee.getParametersTypes().get(i);\n if (classType instanceof JavaType.ParametrizedTypeJavaType) {\n overrideeType = ((JavaType.ParametrizedTypeJavaType) classType).typeSubstitution.substitutedType(overrideeType);\n if (overrideeType == null) {\n overrideeType = overridee.getParametersTypes().get(i);\n }\n }\n if (!paramOverrider.erasure().equals(overrideeType.erasure())) {\n return false;\n }\n }\n // we assume code is compiling so no need to check return type at this point.\n return true;\n }",
"@Override public boolean accepts(Type other) {\n if(!(other instanceof FixArray)) return false;\n FixArray that = (FixArray) other;\n return this.length == that.length\n && this.indexType().equals(that.indexType())\n && this.elemType.accepts(that.elemType);\n }",
"public boolean returnTypeMatch(Method m, String retType) {\n Class ret = m.getReturnType();\n Class retTypeClass = checkIfPrimitive(retType);\n if (retTypeClass == null);\n try {\n retTypeClass = Class.forName(retType);\n } catch (ClassNotFoundException e) {\n //do nothing. If return type is incorrect, it will be caught by\n // another test in verifier.\n }\n if(retTypeClass != null) //this may happen if retType is\n return retTypeClass.equals(ret);//non-primitive and invalid\n else return false;\n }",
"boolean hasSurrogateType();",
"@Override\n \tprotected boolean checkDelegateMethod(Method input) {\n \t\tif (!domain.checkElementType(target, input.getGenericReturnType())) {\n \t\t\treturn false;\n \t\t}\n \n \t\tClass<?>[] delegateParams = input.getParameterTypes();\n \n \t\t// must have first argument of type of the setter container\n \t\tif (!(delegateParams.length == 1 && domain.checkClassifierType(\n \t\t\t\ttarget.getEContainingClass(), delegateParams[0]))) {\n \t\t\treturn false;\n \t\t}\n \n \t\treturn true;\n \t}",
"private boolean check(TokenType tokType) {\r\n if(tokens.get(position).returnType() != tokType) {\r\n return false;\r\n }\r\n return true;\r\n }",
"public boolean isNot( Type type ) {\n return this.type != type;\n }",
"public boolean isEqual(Object objectname1, Object objectname2, Class<?> voClass) {\n\t\treturn false;\n\t}",
"public boolean typeSameAs(String type1, String type2) {\n return BmmDefinitions.typeNameAsFlatList(type1).toString().equalsIgnoreCase(BmmDefinitions.typeNameAsFlatList(type2).toString());\n }",
"private void checkTypes(Variable first, Variable second) throws OutmatchingParameterType {\n VariableVerifier.VerifiedTypes firstType = first.getType();\n VariableVerifier.VerifiedTypes secondType = second.getType();\n\n if (!firstType.equals(secondType)) {\n throw new OutmatchingParameterType();\n }\n }",
"public boolean isTypeParameter() {\n return isTypeParameter;\n }",
"private static boolean validateMethod(Method method) {\n for (Class<?> param : method.getParameterTypes()) {\n if (null == OvsDbConverter.get(param))\n return false;\n }\n return true;\n }",
"@Override\n public final boolean isReferenceType() {\n return true;\n }",
"final boolean is(Vector vector) {\n return vector.is(targetType());\n }",
"abstract protected boolean checkType(String myType);",
"private void isMethod() {\n if (isNameExpr != null) {\n isNameExpr.isMethod();\n isNameExpr = null;\n }\n }",
"boolean method_107(boolean var1, class_81 var2);"
] | [
"0.644226",
"0.64356405",
"0.6199259",
"0.6072713",
"0.6054282",
"0.6036052",
"0.5989137",
"0.5840127",
"0.5771566",
"0.5754106",
"0.5739868",
"0.57213616",
"0.5693857",
"0.56377894",
"0.55960417",
"0.55780005",
"0.5496709",
"0.54748803",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54709154",
"0.54688245",
"0.5446547",
"0.543817",
"0.5431357",
"0.54073745",
"0.5402075",
"0.5381271",
"0.53722984",
"0.53678226",
"0.53594285",
"0.53577065",
"0.53143734",
"0.52923805",
"0.52823836",
"0.52783316",
"0.5266967",
"0.52636164",
"0.5247051",
"0.52327645",
"0.5200362",
"0.51961446",
"0.51916176",
"0.51680285",
"0.51677656",
"0.51649624",
"0.51476556",
"0.5146702",
"0.51447266",
"0.5129972",
"0.51260793",
"0.5115655",
"0.5107464",
"0.51070285",
"0.5098889",
"0.5098783",
"0.50697494",
"0.50681704",
"0.50621146",
"0.50506437",
"0.50369126"
] | 0.7823567 | 0 |
Determines if this MethodType has the same signature as another | public boolean sameSignature(MethodType other) {
return name.equals(name) &&
Arrays.equals(typeParams, other.typeParams) &&
Arrays.equals(paramTypes, other.paramTypes);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean sameSubsignature(MethodType other) {\n return sameSignature(other) || sameSignature(other.erase());\n }",
"public boolean equals(JavaMethodSignature sig) {\n\t\t//if their signatures aren't the same length, we've got problems\n\t\tif (this.sig.size() != sig.sig.size())\n\t\t\treturn false;\n\t\t\n\t\t//signatures are the same length, let's run through the parameters\n\t\tfor (int i = 0; i < this.sig.size(); i++) {\n\t\t\tif (this.sig.get(i).type != sig.sig.get(i).type)\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"public boolean isEquivalentTo(Type other) {\n if (other instanceof MethodType) {\n return sameSignature((MethodType)other);\n }\n return false;\n }",
"boolean isMoreSpecific (MethodType type) throws OverloadingAmbiguous {\r\n boolean status = false;\r\n\r\n try {\r\n for (int i = 0, size = arguments.size (); i < size; i++) {\r\n\tIdentifier this_arg = (Identifier) arguments.elementAt (i);\r\n\tIdentifier target_arg = (Identifier) type.arguments.elementAt (i);\r\n\r\n\tint type_diff = this_arg.type.compare (target_arg.type);\r\n\tif (type_diff == 0)\r\n\t continue;\r\n\telse if (type_diff > 0) {\r\n\t if (status == true) throw new OverloadingAmbiguous ();\r\n\t} else {\r\n\t if (i != 0) throw new OverloadingAmbiguous ();\r\n\t status = true;\r\n\t}\r\n }\r\n } catch (OverloadingAmbiguous ex) {\r\n throw ex;\r\n } catch (TypeMismatch ex) {\r\n throw new OverloadingAmbiguous ();\r\n }\r\n\r\n return status;\r\n }",
"private boolean methodEqueals(Method m1, Method m2) {\n\t\tif (m1.getName() == m2.getName()) {\n\t\t\tif (!m1.getReturnType().equals(m2.getReturnType()))\n\t\t\t\treturn false;\n\t\t\tClass<?>[] params1 = m1.getParameterTypes();\n\t\t\tClass<?>[] params2 = m2.getParameterTypes();\n\t\t\tif (params1.length == params2.length) {\n\t\t\t\tfor (int i = 0; i < params1.length; i++) {\n\t\t\t\t\tif (params1[i] != params2[i])\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public boolean overrideEquivalent(MethodType other) {\n return this.sameSubsignature(other) || other.sameSubsignature(this);\n }",
"boolean hasSignature();",
"boolean hasSignature();",
"@Override\n public boolean isSameType(Type t) {\n if (t instanceof FuncType) {\n final FuncType other = (FuncType) t;\n return ret.isSameType(other.ret)\n && Arrays.equals(params, other.params);\n }\n return false;\n }",
"@java.lang.Override\n public boolean hasSignature() {\n return instance.hasSignature();\n }",
"boolean checkSignature(long sig0, long sig1, long sig2) throws Exception {\n Integer[] sig = new Integer[3];\n\t /* Get signature */\n readSignature(sig);\n\t /* Compare signature */\n if (sig[0] != sig0 || sig[1] != sig1 || sig[2] != sig2) {\n throw new Exception(\"Signature does not match selected device! \");\n }\n return true; // Indicate supported command.\n }",
"private boolean match(Type t, Type original) {\n\t\t\t\treturn original.getSort() == Type.METHOD && original.getSort() == t.getSort();\n\t\t\t}",
"@Override\n \tprotected boolean checkDelegateMethod(Method input) {\n \t\tif (!domain.checkElementType(target, input.getGenericReturnType())) {\n \t\t\treturn false;\n \t\t}\n \n \t\tClass<?>[] delegateParams = input.getParameterTypes();\n \n \t\t// must have first argument of type of the setter container\n \t\tif (!(delegateParams.length == 1 && domain.checkClassifierType(\n \t\t\t\ttarget.getEContainingClass(), delegateParams[0]))) {\n \t\t\treturn false;\n \t\t}\n \n \t\treturn true;\n \t}",
"boolean overrides(MethodDeclaration sub, MethodDeclaration sup);",
"public boolean containsIndistinguishableMethod(\n MethodSignature signature) {\n List<MethodSignature> list = methodTable.get(signature.getSymbol());\n\n if (list != null)\n for (MethodSignature existing : list)\n if (existing.isIndistinguishable(signature)) return true;\n\n return false;\n }",
"private static boolean isUserDefinedMethod(final Method method) {\n if (!method.equals(OBJECT_EQUALS)\n && !method.equals(OBJECT_HASH_CODE)\n && !method.equals(OBJECT_GET_CLASS)\n && !method.equals(OBJECT_TO_STRING)\n && !method.equals(OBJECT_CLONE)\n && !method.equals(OBJECT_WAIT_1)\n && !method.equals(OBJECT_WAIT_2)\n && !method.equals(OBJECT_WAIT_3)\n && !method.equals(OBJECT_NOTIFY)\n && !method.equals(OBJECT_NOTIFY_ALL)\n && !method.getName().startsWith(TransformationConstants.SYNTHETIC_MEMBER_PREFIX)\n && !method.getName().startsWith(TransformationConstants.ORIGINAL_METHOD_PREFIX)\n && !method.getName().startsWith(TransformationConstants.ASPECTWERKZ_PREFIX)) {\n return true;\n } else {\n return false;\n }\n }",
"protected boolean isMethodOverridden() {\n DetailAST current = ast;\n Boolean result = null;\n for (; current != null && result == null; current = current.getParent()) {\n switch (current.getType()) {\n case TokenTypes.METHOD_DEF:\n result = findAnnotations(current).contains(NullnessAnnotation.OVERRIDE);\n break;\n case TokenTypes.LAMBDA:\n result = true;\n break;\n default:\n }\n }\n if (result == null) {\n result = false;\n }\n return result;\n }",
"boolean hasSig();",
"boolean hasMethodName();",
"boolean hasMethodName();",
"boolean hasMethodName();",
"boolean hasMethod();",
"boolean hasMethod();",
"boolean hasMethod();",
"public boolean hasSignature() {\n return signatureBuilder_ != null || signature_ != null;\n }",
"public boolean isParameterized() {\n\t\treturn this.typeSignatures != null && this.typeArguments != null;\n\t}",
"private boolean hasExplicitInvocant() {\n PsiElement signatureContainer = getSignatureContent();\n return signatureContainer != null && signatureContainer.getFirstChild() instanceof PsiPerlMethodSignatureInvocant;\n }",
"private boolean overlaps(MethodDeclaration decl, ITextSelection selection) {\r\n\t\t\t\t\r\n\t\t\t\tIComparableTextSelection declSelection = new ComparisonTextSelection(decl.getStartPosition(),decl.getLength());\r\n\t\t\t\treturn !declSelection.compareTo(selection).equals(IComparableTextSelection.COMPARISON.NO_OVERLAP);\r\n\t\t\t}",
"boolean isSetMethod();",
"private void isMethod() {\n if (isNameExpr != null) {\n isNameExpr.isMethod();\n isNameExpr = null;\n }\n }",
"public boolean hasInvocationKind() {\n return ((bitField0_ & 0x00000004) != 0);\n }",
"public boolean hasSignature() {\n return signature_ != null;\n }",
"public boolean hasInvocationKind() {\n return ((bitField0_ & 0x00000004) != 0);\n }",
"private void checkTypes(Variable first, Variable second) throws OutmatchingParameterType {\n VariableVerifier.VerifiedTypes firstType = first.getType();\n VariableVerifier.VerifiedTypes secondType = second.getType();\n\n if (!firstType.equals(secondType)) {\n throw new OutmatchingParameterType();\n }\n }",
"public boolean appliesTo(ISignature signature) {\n\t\tif (NUMBER_EXPECTED_PARAMETERS != signature.getNumberParameters()) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// check that parameters are not null\r\n\t\tfor (int i = 0; i < NUMBER_EXPECTED_PARAMETERS; i++) {\r\n\t\t\tif (null == signature.get(i)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// check types of parameters\r\n\t\tif (!WasPackage.Literals.WAS_NODE_UNIT\r\n\t\t\t\t.isSuperTypeOf(signature.get(NODE_UNIT_PARAMETER_INDEX))) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (!WasPackage.Literals.WAS_NODE_UNIT.isSuperTypeOf(signature\r\n\t\t\t\t.get(DMGR_NODE_UNIT_PARAMETER_INDEX))) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}",
"public boolean equivalentInteractions(InteractionObject first, InteractionObject second) {\n\t\tboolean result = \n\t\t\tfirst.getType() == second.getType() &&\n\t\t\tfirst.getIndex() == second.getIndex();\n\t\treturn result;\n\t}",
"org.apache.calcite.avatica.proto.Common.SignatureOrBuilder getSignatureOrBuilder();",
"boolean isSame(MethodInvocation propagator) {\r\n\t\treturn this == propagator;\r\n\t}",
"private boolean methodsMatch(Method method,\n CallStatement.CallStatementEntry entry) throws EngineException {\n if (!method.getName().equals(entry.getName())) {\n return false;\n }\n if (method.getParameterTypes().length != parameters.size()) {\n return false;\n }\n Class[] parameterTypes = method.getParameterTypes();\n for (int index = 0; index < parameters.size(); index++) {\n Class parameterType = parameterTypes[index];\n Object parameterValue = parameters.get(index);\n if (!parameterType.isAssignableFrom(parameterValue.getClass())) {\n return false;\n }\n }\n \n for (int index = 0; index < parameters.size(); index++) {\n Class parameterType = parameterTypes[index];\n Object parameterValue = parameters.get(index);\n parameters.set(index, parameterType.cast(parameterValue));\n }\n return true;\n }",
"private boolean areSameType(String s1, String s2) {\n\t\treturn((isMatrix(s1) && isMatrix(s2)) || (isOperator(s1) && isOperator(s2)) || (isNumber(s1) && isNumber(s2)));\n\t}",
"@java.lang.Override\n public boolean hasSignature() {\n return ((bitField0_ & 0x00000010) != 0);\n }",
"@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Method)) {\r\n return false;\r\n }\r\n Method other = (Method) object;\r\n if ((this.idmethod == null && other.idmethod != null) || (this.idmethod != null && !this.idmethod.equals(other.idmethod))) {\r\n return false;\r\n }\r\n return true;\r\n }",
"@Nullable\n private Boolean isOverriding(MethodJavaSymbol overridee, JavaType.ClassJavaType classType) {\n if (getParametersTypes().size() != overridee.getParametersTypes().size()) {\n return false;\n }\n for (int i = 0; i < getParametersTypes().size(); i++) {\n JavaType paramOverrider = getParametersTypes().get(i);\n if (paramOverrider.isTagged(JavaType.UNKNOWN)) {\n // FIXME : complete symbol table should not have unknown types and generics should be handled properly for this.\n return null;\n }\n // Generics type should have same erasure see JLS8 8.4.2\n\n JavaType overrideeType = overridee.getParametersTypes().get(i);\n if (classType instanceof JavaType.ParametrizedTypeJavaType) {\n overrideeType = ((JavaType.ParametrizedTypeJavaType) classType).typeSubstitution.substitutedType(overrideeType);\n if (overrideeType == null) {\n overrideeType = overridee.getParametersTypes().get(i);\n }\n }\n if (!paramOverrider.erasure().equals(overrideeType.erasure())) {\n return false;\n }\n }\n // we assume code is compiling so no need to check return type at this point.\n return true;\n }",
"@Override\n public boolean evaluate(@Nonnull MethodInformation methodInformation) {\n boolean matches = namePattern.matcher(methodInformation.getName()).matches();\n final @Nonnull @NonNullableElements List<? extends VariableElement> methodParameters = methodInformation.getElement().getParameters();\n if (parameters.length == methodParameters.size()) {\n for (int i = 0; i < methodParameters.size(); i++) {\n final @Nonnull String nameOfDeclaredType = ProcessingUtility.getQualifiedName(methodParameters.get(i).asType());\n ProcessingLog.debugging(\"name of type: $\", nameOfDeclaredType);\n final @Nonnull String parameter = parameters[i];\n if (!parameter.equals(\"?\")) {\n matches = matches && nameOfDeclaredType.equals(parameter);\n }\n }\n } else {\n matches = false;\n }\n return matches;\n }",
"private boolean samePosition(ITarget t1, ITarget t2) {\n assert t1.getTag() == t2.getTag() : \"Programmer error; tags must match.\";\n switch (t1.getTag()) {\n case JPL_MINOR_BODY:\n case MPC_MINOR_PLANET:\n case NAMED:\n\n // SUPER SUPER SKETCHY\n // The .equals logic in NonSiderealTarget actually does what we want here, at\n // least according to the old implementation here. So we'll leave it for now.\n // This will be easier with the new model.\n return t1.equals(t2);\n\n case SIDEREAL:\n final HmsDegTarget hms1 = (HmsDegTarget) t1;\n final HmsDegTarget hms2 = (HmsDegTarget) t2;\n return hasSameCoordinates(hms1, hms2) &&\n hasSameProperMotion(hms1, hms2) &&\n hasSameTrackingDetails(hms1, hms2);\n\n default:\n throw new Error(\"Unpossible target tag: \" + t1.getTag());\n }\n }",
"private boolean checkMethodSignature(final Method method, final List<WaveItem<?>> wParams) {\r\n boolean isCompliant = false;\r\n\r\n final Type[] mParams = method.getGenericParameterTypes();\r\n\r\n if (wParams.isEmpty() && Wave.class.isAssignableFrom(ClassUtility.getClassFromType(mParams[0]))) {\r\n isCompliant = true;\r\n } else if (mParams.length - 1 == wParams.size()) {\r\n\r\n // Flag used to skip a method not compliant\r\n boolean skipMethod = false;\r\n // Check each parameter\r\n for (int i = 0; !skipMethod && i < mParams.length - 1 && !isCompliant; i++) {\r\n if (ClassUtility.getClassFromType(mParams[i]).isAssignableFrom(ClassUtility.getClassFromType(wParams.get(i).getItemType()))) {\r\n // This method has not the right parameters\r\n skipMethod = true;\r\n }\r\n if (i == mParams.length - 2\r\n && Wave.class.isAssignableFrom(ClassUtility.getClassFromType(mParams[i + 1]))) {\r\n // This method is compliant with wave type\r\n isCompliant = true;\r\n }\r\n }\r\n }\r\n return isCompliant;\r\n }",
"private boolean matchesMethod (final Object method, \n\t\tfinal int expectedModifiers, final int optionalModifiers, \n\t\tfinal String expectedReturnType)\n\t{\n\t\tboolean matches = false; \n\n\t\tif (method != null)\n\t\t{\n\t\t\tModel model = getModel();\n\t\t\tint modifiers = model.getModifiers(method);\n\n\t\t\tmatches = (((modifiers == expectedModifiers) || \n\t\t\t\t(modifiers == (expectedModifiers | optionalModifiers))) &&\n\t\t\t\texpectedReturnType.equals(model.getType(method)));\n\t\t}\n\n\t\treturn matches;\n\t}",
"int getSignatureType();",
"static boolean equal (String s1, String s2) {\r\n if (s1==errorSignature) return true;\r\n if (s2==errorSignature) return true;\r\n if (s1==null || s1.length()==0)\r\n return s2==null || s2.length()==0;\r\n return s1.equals (s2);\r\n }",
"private static boolean validateReturnType(Method method, Class<?> expected) {\n Class<?> returnType = method.getReturnType();\n if (returnType == void.class) {\n return false;\n }\n if (returnType != expected) {\n String expectedType = \"'\" + expected.getName() + \"'\";\n if (expected != void.class) {\n expectedType = \"'void' or \" + expectedType;\n }\n throw new IllegalStateException(method.getDeclaringClass().getName()\n + \".\"\n + method.getName()\n + \" must have return type of \"\n + expectedType);\n }\n return true;\n }",
"public static int isMethod() {\n return isNameExpr;\n }",
"private static boolean matchName(@NotNull PsiMethod method, @NotNull IHasParameterInfos targetMethodInfo, @NotNull String targetMethodName, boolean isConstructor) {\n if (targetMethodName.startsWith(\"@\")) {\n IType returnType = ((IGosuMethodInfo) targetMethodInfo).getReturnType();\n if ((returnType.equals(JavaTypes.BOOLEAN()) || returnType.equals(JavaTypes.pBOOLEAN()) &&\n !method.getName().equals(\"is\" + targetMethodName.substring(1)))) {\n return true;\n }\n if (!method.getName().equals(\"get\" + targetMethodName.substring(1)) && !method.getName().equals(\"set\" + targetMethodName.substring(1))) {\n return true;\n }\n } else if (!targetMethodName.equals(method.getName()) && !(isConstructor && \"construct\".equals(method.getName()))) {\n return true;\n }\n return false;\n }",
"@Override\n public boolean verifySignature(byte[] signature) {\n try {\n Element[] sig = derDecode(signature);\n CL04SignPublicPairingKeySerParameter pk = (CL04SignPublicPairingKeySerParameter) pairingKeySerParameter;\n Pairing pairing = PairingFactory.getPairing(pairingKeySerParameter.getParameters());\n Element a = sig[0];\n Element b = sig[1];\n Element c = sig[2];\n List<Element> A = IntStream.range(3, 3 + messages.size()).mapToObj(i -> sig[i]).collect(Collectors.toList());\n List<Element> B = IntStream.range(3 + messages.size(), 3 + 2 * messages.size()).mapToObj(i -> sig[i]).collect(Collectors.toList());\n return aFormedCorrectly(pairing, a, A, pk) && bFormedCorrectly(pairing, a, b, A, B, pk) && cFormedCorrectly(pairing, a, b, c, B, pk);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return false;\n\n }",
"public boolean overrides(Member other) {\r\n\t\treturn getSimpleName().equals(other.getSimpleName());\r\n\t}",
"public boolean isMethodNameKnown() {\n\t\tif (methodName == null || methodName.equals(\"<unknown>\"))\n\t\t\treturn false;\n\t\treturn true;\n\t}",
"private static boolean isErased(Types types, AnnotatedTypeMirror t1, AnnotatedTypeMirror t2) {\n return types.isSameType(\n types.erasure(t1.getUnderlyingType()), t2.getUnderlyingType());\n }",
"public boolean verifySignature() {\r\n\t\t\r\n\t\tString data;\r\n\t\t\r\n\t\tif(isTypeCreation){\r\n\t\t\t\r\n\t\t\tdata = StringUtil.getStringFromKey(creator) + name +\r\n\t\t\t\t\tdescription + begin + end+end_subscription+\r\n\t\t\t\t\tlocation+min_capacity+max_capacity;\r\n\t\t\treturn StringUtil.verifyECDSASig(creator, data, signature);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tdata = StringUtil.getStringFromKey(subscriber)+id_event;\r\n\t\t\treturn StringUtil.verifyECDSASig(subscriber, data, signature);\r\n\t\t}\r\n//\t\tSystem.out.println(\"signature \"+signature);\r\n\t\t\r\n\t}",
"public MethodSignature getMatchingMethod(\n String methodName,\n SequenceType arguments,\n SequenceType typeArguments,\n List<ShadowException> errors) {\n boolean hasTypeArguments = typeArguments != null;\n MethodSignature candidate = null;\n\n for (MethodSignature signature : recursivelyGetMethodOverloads(methodName)) {\n MethodType methodType = signature.getMethodType();\n\n if (methodType.isParameterized()) {\n if (hasTypeArguments) {\n SequenceType parameters = methodType.getTypeParameters();\n try {\n if (parameters.canAccept(typeArguments, SubstitutionKind.TYPE_PARAMETER)) {\n signature = signature.replace(parameters, typeArguments);\n } else continue;\n } catch (InstantiationException ignored) {\n }\n }\n }\n\n // the list of method signatures starts with the closest (current class) and then adds parents\n // and outer classes\n // always stick with the current if you can\n // (only replace if signature is a subtype of candidate but candidate is not a subtype of\n // signature)\n if (signature.canAccept(arguments)) {\n if (candidate == null\n || (signature.getParameterTypes().isSubtype(candidate.getParameterTypes())\n && !candidate.getParameterTypes().isSubtype(signature.getParameterTypes())))\n candidate = signature;\n else if (!candidate.getParameterTypes().isSubtype(signature.getParameterTypes())) {\n ErrorReporter.addError(\n errors,\n Error.INVALID_ARGUMENTS,\n \"Ambiguous reference to \" + methodName + \" with arguments \" + arguments,\n arguments);\n return null;\n }\n }\n }\n\n if (candidate == null)\n ErrorReporter.addError(\n errors,\n Error.INVALID_METHOD,\n \"No definition of \" + methodName + \" with arguments \" + arguments + \" in this context\",\n arguments);\n\n return candidate;\n }",
"private boolean argumentsEquals(Command other) {\n return Arrays.equals(this.arguments, other.arguments);\n }",
"public int isMethod() {\n return isNameExpr;\n }",
"public boolean hasMethodName() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public boolean hasMethodName() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public static boolean areCorrespondingTypeVariables(Elements elements, AnnotatedTypeVariable type1, AnnotatedTypeVariable type2) {\n final TypeParameterElement type1ParamElem = (TypeParameterElement) type1.getUnderlyingType().asElement();\n final TypeParameterElement type2ParamElem = (TypeParameterElement) type2.getUnderlyingType().asElement();\n\n\n if (type1ParamElem.getGenericElement() instanceof ExecutableElement\n && type2ParamElem.getGenericElement() instanceof ExecutableElement) {\n final ExecutableElement type1Executable = (ExecutableElement) type1ParamElem.getGenericElement();\n final ExecutableElement type2Executable = (ExecutableElement) type2ParamElem.getGenericElement();\n\n final TypeElement type1Class = (TypeElement) type1Executable.getEnclosingElement();\n final TypeElement type2Class = (TypeElement) type2Executable.getEnclosingElement();\n\n boolean methodIsOverriden = elements.overrides(type1Executable, type2Executable, type1Class)\n || elements.overrides(type2Executable, type1Executable, type2Class);\n if (methodIsOverriden) {\n boolean haveSameIndex = type1Executable.getTypeParameters().indexOf(type1ParamElem) ==\n type2Executable.getTypeParameters().indexOf(type2ParamElem);\n return haveSameIndex;\n }\n }\n\n return false;\n }",
"public boolean hasMethodName() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public boolean hasMethodName() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"@Override\n public boolean equals(Object other) {\n if (other instanceof Command) {\n return (this.getCommandName().equals(((Command) other).getCommandName())\n && this.argumentsEquals((Command) other) && this\n .commandDocumentation().equals(\n ((Command) other).commandDocumentation()));\n }\n return false;\n }",
"private boolean isOverloaded(){\n\t\tif(((double) this.contains) / this.table.length > .6){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isEquivalentForFunctionDeclaration(Type t) {\n if (t.isAddressSpaceQualified()) {\n return false;\n }\n Type tu=t.unqualify();\n\n // Should be an array\n if (!tu.isPointer()) {\n return false;\n }\n\n // Check element type compatibility\n return getPointedType().isEquivalentForFunctionDeclaration(tu.getPointedType());\n }",
"public boolean matches(Method method, Class<?> targetClass)\n/* */ {\n/* 133 */ return ((targetClass != null) && (matchesPattern(ClassUtils.getQualifiedMethodName(method, targetClass)))) || \n/* 134 */ (matchesPattern(ClassUtils.getQualifiedMethodName(method)));\n/* */ }",
"boolean hasHttpMethod();",
"@Override\n public boolean equals(Object obj)\n {\n if (this == obj)\n return true;\n if (obj == null)\n return false;\n if (getClass() != obj.getClass())\n return false;\n TypeReference other = (TypeReference) obj;\n if (typeArgs == null)\n {\n if (other.typeArgs != null)\n return false;\n } else if (!typeArgs.equals(other.typeArgs))\n return false;\n if (typeName == null)\n {\n if (other.typeName != null)\n return false;\n } else if (!typeName.equals(other.typeName))\n return false;\n return true;\n }",
"boolean hasSameAs();",
"abstract protected boolean checkMethod();",
"public List<SemanticError> checkMethodInheritance() {\n\t\tList<SemanticError> errors = new LinkedList<>();\n\n\t\tif (superClass == null)\n\t\t\treturn errors;\n\t\t\n\t\tint max = -1;\n\n\t\tfor (String key : superClass.methods.keySet()) {\n\t\t\tVSOPMethod m = superClass.methods.get(key);\n\t\t\tmax = Math.max(max, m.ord);\n\t\t\tVSOPMethod old = methods.putIfAbsent(key, m);\n\n\t\t\tif(old != null)\n\t\t\t\told.ord = m.ord;\n\t\t\t\t\n\t\t\tif (old != null && (!m.args.equals(old.args) || m.returnType != old.returnType))\n\t\t\t\terrors.add(new SemanticError(m.ln, m.col,\n\t\t\t\t\t\tString.format(\"method %s is redefined in class %s with wrong signature\", m.id, this.id)));\n\n\t\t}\n\n\t\tfor(VSOPMethod m: methods().values()) {\n\t\t\tif(m.ord == -1) {\n\t\t\t\tmax++;\n\t\t\t\tm.ord = max;\n\t\t\t}\n\t\t}\n\n\t\treturn errors;\n\t}",
"private boolean isMethod() {\n return !line.contains(\"=\") && !line.contains(\".\") && !semicolon && line.contains(\"(\");\n }",
"private ContractMethod findMatchedInstance(List arguments) {\n List<ContractMethod> matchedMethod = new ArrayList<>();\n\n if(this.getInputs().size() != arguments.size()) {\n for(ContractMethod method : this.getNextContractMethods()) {\n if(method.getInputs().size() == arguments.size()) {\n matchedMethod.add(method);\n }\n }\n } else {\n matchedMethod.add(this);\n }\n\n if(matchedMethod.size() == 0) {\n throw new IllegalArgumentException(\"Cannot find method with passed parameters.\");\n }\n\n if(matchedMethod.size() != 1) {\n LOGGER.warn(\"It found a two or more overloaded function that has same parameter counts. It may be abnormally executed. Please use *withSolidityWrapper().\");\n }\n\n return matchedMethod.get(0);\n }",
"public boolean uniSameAs(Type other, TypeFixer fixer) throws LookupException;",
"public static boolean areSame(AnnotatedTypeMirror t1, AnnotatedTypeMirror t2) {\n return t1.toString().equals(t2.toString());\n }",
"public boolean supportsCallee(SootMethod method);",
"public final boolean isEqualTo (Type type)\n {\n if (this == type)\n return true;\n\n if (!(type instanceof TypeTerm))\n return false;\n\n TypeTerm typeTerm = (TypeTerm)type;\n \n if (kind() != typeTerm.kind() || name() != typeTerm.name() || arity() != typeTerm.arity())\n return false;\n\n for (int i=arity(); i-->0;)\n if (!argument(i).isEqualTo(typeTerm.argument(i)))\n return false;\n\n return true;\n }",
"public boolean matches(Constructor constructor) {\n Class<?>[] constructorParameterTypes = constructor.getParameterTypes();\n if (constructorParameterTypes.length == prototypeParameterTypes.length) {\n for (int i = 0; i < prototypeParameterTypes.length; i++) {\n if (!constructorParameterTypes[i].equals(prototypeParameterTypes[i])) {\n return false;\n }\n }\n return true;\n } else\n return false;\n }",
"private void isMethod() {\n ArrayAdapter<String> isVariable = new ArrayAdapter<>(this, isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr);\n isNameExpr.isMethod(isNameExpr);\n isNameExpr.isMethod((isParameter, isParameter, isParameter, isParameter) -> {\n isNameExpr = isNameExpr.isMethod(isNameExpr.isMethod(isNameExpr), isNameExpr);\n isMethod(isNameExpr);\n isNameExpr = isNameExpr;\n });\n }",
"public boolean hasMethodName() {\r\n\t\t\treturn ((bitField0_ & 0x00000001) == 0x00000001);\r\n\t\t}",
"public boolean hasMethodName() {\r\n\t\t\t\treturn ((bitField0_ & 0x00000001) == 0x00000001);\r\n\t\t\t}",
"public boolean isMethod() {\n return isNameExpr;\n }",
"@Test\n\tpublic void testChangeMethodParameters() {\n\t\tDeclarationListDelta delta = createClassDelta(\n\t\t\t\t\"int someMethod(String x) { return 0;} \",\n\t\t\t\t\"int someMethod(int x) { return 0;}\");\n\n\t\tassertEquals(1, delta.getAddedDeclarations().size());\n\t\tassertEquals(0, delta.getChangedDeclarations().size());\n\t\tassertEquals(1, delta.getRemovedDeclarations().size());\n\n\t\tString removedMethod = methodSignature(delta.getRemovedDeclarations()\n\t\t\t\t.get(0));\n\t\tassertEquals(\"int someMethod(String)\", removedMethod);\n\n\t\tString addedMethod = methodSignature(delta.getAddedDeclarations()\n\t\t\t\t.get(0));\n\t\tassertEquals(\"int someMethod(int)\", addedMethod);\n\t}",
"private boolean check(TokenType tokType) {\r\n if(tokens.get(position).returnType() != tokType) {\r\n return false;\r\n }\r\n return true;\r\n }",
"public boolean equalsBacktraceData(BacktraceData bd) {\n\t\ttry {\n\t\t\tString bdFileName = new Path(bd.getFile()).lastSegment();\n\t\t\tif (bd.getMethod().equals(methodName)\n\t\t\t\t\t&& bdFileName.equals(fileName))\n\t\t\t\treturn true;\n\t\t\treturn false;\n\t\t} catch (NullPointerException e) {\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean hasSig() {\n return sigBuilder_ != null || sig_ != null;\n }",
"private static boolean validateMethod(Method method) {\n for (Class<?> param : method.getParameterTypes()) {\n if (null == OvsDbConverter.get(param))\n return false;\n }\n return true;\n }",
"boolean renameMethod(Method method) {\n\t\tmethod.setReturnType(modelProperties.renameType(method.getReturnType()));\n\n\t\tfor (int i = 0; i < method.getParameters().size(); i++) {\n\t\t\tParameter parameter = method.getParameters().get(i);\n\t\t\tFullyQualifiedJavaType parameterType = parameter.getType();\n\t\t\tFullyQualifiedJavaType newParameterType = modelProperties.renameType(parameterType);\n\t\t\tif (parameterType != newParameterType) {\n\t\t\t\tParameter newParam = new Parameter(newParameterType, parameter.getName(), parameter.isVarargs());\n\t\t\t\tfor (String annotation : parameter.getAnnotations()) {\n\t\t\t\t\tnewParam.addAnnotation(annotation);\n\t\t\t\t}\n\t\t\t\tmethod.getParameters().set(i, newParam);\n\t\t\t\tlog.debug(\"set new parameter: [{}][{}]\", parameter, newParam);\n\t\t\t}\n\t\t}\n\n\t\tmodelProperties.renameAnnotations(method.getAnnotations());\n\t\tmapperProperties.renameAnnotations(method.getAnnotations());\n\n\t\treturn true;\n\t}",
"public int isMethod() {\n LayoutManager isVariable = isMethod();\n if (isNameExpr == null) {\n return isNameExpr;\n }\n final View isVariable = isMethod(isIntegerConstant, isNameExpr.isMethod(), true, true);\n return isNameExpr == null ? isNameExpr : isMethod(isNameExpr);\n }",
"public boolean verifyExistsMethod(Method methodToVerify) { // ANA: mudei para public\n\n\t\tfor (Method m : arrayMethods) {\n\t\t\tif (m.getName_method() == methodToVerify.getName_method())\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean areLinesIdentical(Field[] line1, Field[] line2) {\n\t\tif (line1.length != line2.length) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (int i=0; i<line1.length; i++) {\n\t\t\tField f1 = line1[i];\n\t\t\tField f2 = line2[i];\n\t\t\tboolean ident = f1.isEmpty() || f2.isEmpty() || f1.getSymbol() == f2.getSymbol();\n\t\t\tif (!ident) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public native boolean signatureImage() throws MagickException;",
"org.apache.calcite.avatica.proto.Common.Signature getSignature();",
"private void isMethod(Context isParameter) {\n try {\n MediaPlayer isVariable = isNameExpr.isMethod(isNameExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr);\n isNameExpr.isMethod();\n isNameExpr.isMethod(isIntegerConstant);\n isNameExpr.isMethod();\n isNameExpr.isMethod();\n } catch (Exception isParameter) {\n isNameExpr.isMethod(isNameExpr, isNameExpr.isMethod());\n }\n }",
"boolean isMethodMatch(@NonNull MethodElement methodElement, @NonNull MatchContext matchContext);",
"@Override\n public boolean equals(Object o) {\n boolean result = (o instanceof PLambda);\n if (result) {\n result = parameters.size() == ((PLambda) o).parameters.size() && body.equals(((PLambda) o).body);\n }\n return result;\n }",
"public boolean isSetReturnType() {\n return this.returnType != null;\n }"
] | [
"0.74611825",
"0.7349369",
"0.7117203",
"0.7028777",
"0.69180185",
"0.66214496",
"0.6154001",
"0.6154001",
"0.5924306",
"0.571706",
"0.56239897",
"0.55480623",
"0.54623294",
"0.5421684",
"0.5397177",
"0.53881335",
"0.5387765",
"0.5386566",
"0.53819245",
"0.53819245",
"0.53819245",
"0.535854",
"0.535854",
"0.535854",
"0.5315484",
"0.5268006",
"0.52410156",
"0.5231981",
"0.52303034",
"0.5227124",
"0.52259",
"0.5216771",
"0.5187807",
"0.5181804",
"0.51803255",
"0.517972",
"0.51764977",
"0.51752263",
"0.51745665",
"0.5172803",
"0.5169064",
"0.5168763",
"0.51647365",
"0.51154464",
"0.51105523",
"0.5096993",
"0.5043888",
"0.50349605",
"0.5013201",
"0.5012187",
"0.49989408",
"0.49905133",
"0.49779665",
"0.49697948",
"0.49643528",
"0.49539346",
"0.49527347",
"0.4952334",
"0.49469042",
"0.4932971",
"0.49273968",
"0.49273968",
"0.49106273",
"0.4902911",
"0.4902911",
"0.48915243",
"0.4889481",
"0.4887969",
"0.48851582",
"0.48817796",
"0.4871726",
"0.48697212",
"0.48680457",
"0.48664656",
"0.48654446",
"0.48588014",
"0.48555142",
"0.48481",
"0.4844481",
"0.4841785",
"0.4840058",
"0.48375294",
"0.4836314",
"0.48304877",
"0.48180878",
"0.48136964",
"0.4811963",
"0.4810807",
"0.4808606",
"0.48001695",
"0.47848132",
"0.4781258",
"0.47682953",
"0.4767026",
"0.47615865",
"0.47564316",
"0.4753611",
"0.47507954",
"0.4747262",
"0.474524"
] | 0.8086463 | 0 |
Determines if this MethodType has the same subsignature as another | public boolean sameSubsignature(MethodType other) {
return sameSignature(other) || sameSignature(other.erase());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean sameSignature(MethodType other) {\n return name.equals(name) &&\n Arrays.equals(typeParams, other.typeParams) &&\n Arrays.equals(paramTypes, other.paramTypes);\n }",
"public boolean equals(JavaMethodSignature sig) {\n\t\t//if their signatures aren't the same length, we've got problems\n\t\tif (this.sig.size() != sig.sig.size())\n\t\t\treturn false;\n\t\t\n\t\t//signatures are the same length, let's run through the parameters\n\t\tfor (int i = 0; i < this.sig.size(); i++) {\n\t\t\tif (this.sig.get(i).type != sig.sig.get(i).type)\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"public boolean isEquivalentTo(Type other) {\n if (other instanceof MethodType) {\n return sameSignature((MethodType)other);\n }\n return false;\n }",
"public boolean overrideEquivalent(MethodType other) {\n return this.sameSubsignature(other) || other.sameSubsignature(this);\n }",
"boolean isMoreSpecific (MethodType type) throws OverloadingAmbiguous {\r\n boolean status = false;\r\n\r\n try {\r\n for (int i = 0, size = arguments.size (); i < size; i++) {\r\n\tIdentifier this_arg = (Identifier) arguments.elementAt (i);\r\n\tIdentifier target_arg = (Identifier) type.arguments.elementAt (i);\r\n\r\n\tint type_diff = this_arg.type.compare (target_arg.type);\r\n\tif (type_diff == 0)\r\n\t continue;\r\n\telse if (type_diff > 0) {\r\n\t if (status == true) throw new OverloadingAmbiguous ();\r\n\t} else {\r\n\t if (i != 0) throw new OverloadingAmbiguous ();\r\n\t status = true;\r\n\t}\r\n }\r\n } catch (OverloadingAmbiguous ex) {\r\n throw ex;\r\n } catch (TypeMismatch ex) {\r\n throw new OverloadingAmbiguous ();\r\n }\r\n\r\n return status;\r\n }",
"private boolean methodEqueals(Method m1, Method m2) {\n\t\tif (m1.getName() == m2.getName()) {\n\t\t\tif (!m1.getReturnType().equals(m2.getReturnType()))\n\t\t\t\treturn false;\n\t\t\tClass<?>[] params1 = m1.getParameterTypes();\n\t\t\tClass<?>[] params2 = m2.getParameterTypes();\n\t\t\tif (params1.length == params2.length) {\n\t\t\t\tfor (int i = 0; i < params1.length; i++) {\n\t\t\t\t\tif (params1[i] != params2[i])\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"boolean hasSignature();",
"boolean hasSignature();",
"boolean overrides(MethodDeclaration sub, MethodDeclaration sup);",
"private static boolean shouldStop(AnnotatedTypeMirror sup, AnnotatedTypeMirror sub) {\n // Check if it's the same type\n // if sup is primitive, but not sub\n if (sup.getKind().isPrimitive() && !sub.getKind().isPrimitive()) {\n /// XXX shouldn't this be \"return false\"?\n return true;\n }\n if (sup.getKind().isPrimitive() && sub.getKind().isPrimitive()) {\n return sup.getKind() == sub.getKind();\n }\n // if both are declared\n if (sup.getKind() == TypeKind.DECLARED && sub.getKind() == TypeKind.DECLARED) {\n AnnotatedDeclaredType supdt = (AnnotatedDeclaredType) sup;\n AnnotatedDeclaredType subdt = (AnnotatedDeclaredType) sub;\n\n // Check if it's the same name\n if (!supdt.getUnderlyingType().asElement().equals(\n subdt.getUnderlyingType().asElement()))\n return false;\n\n return true;\n }\n\n if (sup.getKind() == TypeKind.ARRAY && sub.getKind() == TypeKind.ARRAY) {\n AnnotatedArrayType supat = (AnnotatedArrayType) sup;\n AnnotatedArrayType subat = (AnnotatedArrayType) sub;\n return shouldStop(supat.getComponentType(), subat.getComponentType());\n }\n // horrible horrible hack\n // Types.isSameType() doesn't work for type variables or wildcards\n return sup.getUnderlyingType().toString().equals(sub.getUnderlyingType().toString());\n }",
"@java.lang.Override\n public boolean hasSignature() {\n return instance.hasSignature();\n }",
"@Override\n public boolean isSameType(Type t) {\n if (t instanceof FuncType) {\n final FuncType other = (FuncType) t;\n return ret.isSameType(other.ret)\n && Arrays.equals(params, other.params);\n }\n return false;\n }",
"boolean hasSig();",
"public boolean hasSignature() {\n return signatureBuilder_ != null || signature_ != null;\n }",
"private boolean overlaps(MethodDeclaration decl, ITextSelection selection) {\r\n\t\t\t\t\r\n\t\t\t\tIComparableTextSelection declSelection = new ComparisonTextSelection(decl.getStartPosition(),decl.getLength());\r\n\t\t\t\treturn !declSelection.compareTo(selection).equals(IComparableTextSelection.COMPARISON.NO_OVERLAP);\r\n\t\t\t}",
"private boolean isOverloaded(){\n\t\tif(((double) this.contains) / this.table.length > .6){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean verifySignature() {\r\n\t\t\r\n\t\tString data;\r\n\t\t\r\n\t\tif(isTypeCreation){\r\n\t\t\t\r\n\t\t\tdata = StringUtil.getStringFromKey(creator) + name +\r\n\t\t\t\t\tdescription + begin + end+end_subscription+\r\n\t\t\t\t\tlocation+min_capacity+max_capacity;\r\n\t\t\treturn StringUtil.verifyECDSASig(creator, data, signature);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tdata = StringUtil.getStringFromKey(subscriber)+id_event;\r\n\t\t\treturn StringUtil.verifyECDSASig(subscriber, data, signature);\r\n\t\t}\r\n//\t\tSystem.out.println(\"signature \"+signature);\r\n\t\t\r\n\t}",
"boolean checkSignature(long sig0, long sig1, long sig2) throws Exception {\n Integer[] sig = new Integer[3];\n\t /* Get signature */\n readSignature(sig);\n\t /* Compare signature */\n if (sig[0] != sig0 || sig[1] != sig1 || sig[2] != sig2) {\n throw new Exception(\"Signature does not match selected device! \");\n }\n return true; // Indicate supported command.\n }",
"public List<SemanticError> checkMethodInheritance() {\n\t\tList<SemanticError> errors = new LinkedList<>();\n\n\t\tif (superClass == null)\n\t\t\treturn errors;\n\t\t\n\t\tint max = -1;\n\n\t\tfor (String key : superClass.methods.keySet()) {\n\t\t\tVSOPMethod m = superClass.methods.get(key);\n\t\t\tmax = Math.max(max, m.ord);\n\t\t\tVSOPMethod old = methods.putIfAbsent(key, m);\n\n\t\t\tif(old != null)\n\t\t\t\told.ord = m.ord;\n\t\t\t\t\n\t\t\tif (old != null && (!m.args.equals(old.args) || m.returnType != old.returnType))\n\t\t\t\terrors.add(new SemanticError(m.ln, m.col,\n\t\t\t\t\t\tString.format(\"method %s is redefined in class %s with wrong signature\", m.id, this.id)));\n\n\t\t}\n\n\t\tfor(VSOPMethod m: methods().values()) {\n\t\t\tif(m.ord == -1) {\n\t\t\t\tmax++;\n\t\t\t\tm.ord = max;\n\t\t\t}\n\t\t}\n\n\t\treturn errors;\n\t}",
"@Override\n public boolean verifySignature(byte[] signature) {\n try {\n Element[] sig = derDecode(signature);\n CL04SignPublicPairingKeySerParameter pk = (CL04SignPublicPairingKeySerParameter) pairingKeySerParameter;\n Pairing pairing = PairingFactory.getPairing(pairingKeySerParameter.getParameters());\n Element a = sig[0];\n Element b = sig[1];\n Element c = sig[2];\n List<Element> A = IntStream.range(3, 3 + messages.size()).mapToObj(i -> sig[i]).collect(Collectors.toList());\n List<Element> B = IntStream.range(3 + messages.size(), 3 + 2 * messages.size()).mapToObj(i -> sig[i]).collect(Collectors.toList());\n return aFormedCorrectly(pairing, a, A, pk) && bFormedCorrectly(pairing, a, b, A, B, pk) && cFormedCorrectly(pairing, a, b, c, B, pk);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return false;\n\n }",
"public boolean overrides(Member other) {\r\n\t\treturn getSimpleName().equals(other.getSimpleName());\r\n\t}",
"@java.lang.Override\n public boolean hasSignature() {\n return ((bitField0_ & 0x00000010) != 0);\n }",
"public boolean containsIndistinguishableMethod(\n MethodSignature signature) {\n List<MethodSignature> list = methodTable.get(signature.getSymbol());\n\n if (list != null)\n for (MethodSignature existing : list)\n if (existing.isIndistinguishable(signature)) return true;\n\n return false;\n }",
"org.apache.calcite.avatica.proto.Common.SignatureOrBuilder getSignatureOrBuilder();",
"private boolean match(Type t, Type original) {\n\t\t\t\treturn original.getSort() == Type.METHOD && original.getSort() == t.getSort();\n\t\t\t}",
"public boolean appliesTo(ISignature signature) {\n\t\tif (NUMBER_EXPECTED_PARAMETERS != signature.getNumberParameters()) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// check that parameters are not null\r\n\t\tfor (int i = 0; i < NUMBER_EXPECTED_PARAMETERS; i++) {\r\n\t\t\tif (null == signature.get(i)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// check types of parameters\r\n\t\tif (!WasPackage.Literals.WAS_NODE_UNIT\r\n\t\t\t\t.isSuperTypeOf(signature.get(NODE_UNIT_PARAMETER_INDEX))) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (!WasPackage.Literals.WAS_NODE_UNIT.isSuperTypeOf(signature\r\n\t\t\t\t.get(DMGR_NODE_UNIT_PARAMETER_INDEX))) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}",
"public boolean hasSignature() {\n return signature_ != null;\n }",
"@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Method)) {\r\n return false;\r\n }\r\n Method other = (Method) object;\r\n if ((this.idmethod == null && other.idmethod != null) || (this.idmethod != null && !this.idmethod.equals(other.idmethod))) {\r\n return false;\r\n }\r\n return true;\r\n }",
"public boolean hasInvocationKind() {\n return ((bitField0_ & 0x00000004) != 0);\n }",
"protected boolean isMethodOverridden() {\n DetailAST current = ast;\n Boolean result = null;\n for (; current != null && result == null; current = current.getParent()) {\n switch (current.getType()) {\n case TokenTypes.METHOD_DEF:\n result = findAnnotations(current).contains(NullnessAnnotation.OVERRIDE);\n break;\n case TokenTypes.LAMBDA:\n result = true;\n break;\n default:\n }\n }\n if (result == null) {\n result = false;\n }\n return result;\n }",
"private boolean hasExplicitInvocant() {\n PsiElement signatureContainer = getSignatureContent();\n return signatureContainer != null && signatureContainer.getFirstChild() instanceof PsiPerlMethodSignatureInvocant;\n }",
"public boolean hasInvocationKind() {\n return ((bitField0_ & 0x00000004) != 0);\n }",
"boolean overlap(AbstractNote other) {\n return this.type == other.type &&\n this.octave == other.octave;\n }",
"public boolean hasSig() {\n return sigBuilder_ != null || sig_ != null;\n }",
"@Test\n public void testIsSubSet() {\n System.out.println(\"isSubSet\");\n ArrayList<Integer> arr1 = new ArrayList<>();\n arr1.add(12);\n arr1.add(10);\n arr1.add(23);\n ArrayList<Integer> arr2 = new ArrayList<>();\n arr2.add(10);\n arr2.add(23);\n Collections.sort(arr1);\n ArrayListRecursive instance = new ArrayListRecursive(arr1, arr2);\n boolean expResult = true;\n boolean result = instance.isSubSet();\n assertEquals(expResult, result);\n }",
"boolean hasIsEquivalent();",
"@Override public boolean accepts(Type other) {\n if(!(other instanceof FixArray)) return false;\n FixArray that = (FixArray) other;\n return this.length == that.length\n && this.indexType().equals(that.indexType())\n && this.elemType.accepts(that.elemType);\n }",
"@Override\n public boolean equals(Object other)\n {\n if (!(other instanceof ParameterDefn))\n return false;\n return ( ((ParameterDefn)other).paramName.equalsIgnoreCase(paramName) && ((ParameterDefn)other).len == len &&\n ((ParameterDefn)other).lowerBound == lowerBound && ((ParameterDefn)other).upperBound == upperBound );\n }",
"@Override\n \tprotected boolean checkDelegateMethod(Method input) {\n \t\tif (!domain.checkElementType(target, input.getGenericReturnType())) {\n \t\t\treturn false;\n \t\t}\n \n \t\tClass<?>[] delegateParams = input.getParameterTypes();\n \n \t\t// must have first argument of type of the setter container\n \t\tif (!(delegateParams.length == 1 && domain.checkClassifierType(\n \t\t\t\ttarget.getEContainingClass(), delegateParams[0]))) {\n \t\t\treturn false;\n \t\t}\n \n \t\treturn true;\n \t}",
"boolean isSame(MethodInvocation propagator) {\r\n\t\treturn this == propagator;\r\n\t}",
"public boolean isParameterized() {\n\t\treturn this.typeSignatures != null && this.typeArguments != null;\n\t}",
"public boolean equalsBacktraceData(BacktraceData bd) {\n\t\ttry {\n\t\t\tString bdFileName = new Path(bd.getFile()).lastSegment();\n\t\t\tif (bd.getMethod().equals(methodName)\n\t\t\t\t\t&& bdFileName.equals(fileName))\n\t\t\t\treturn true;\n\t\t\treturn false;\n\t\t} catch (NullPointerException e) {\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean hasSuboperation() {\n return fieldSetFlags()[4];\n }",
"public boolean equalStack(StackClass otherStack){\n \tif(this.size != otherStack.size)\n \treturn false;\n \telse{\n \twhile(!this.isEmpty()){\n \tif(this.pop() != otherStack.pop())\n \treturn false;\n \t} \n \t}\n \treturn true;\n\t}",
"@Property\n public boolean reverse_has_the_same_size_as_original(@ForAll List<?> original) {\n return Lists.reverse(original).size() == original.size();\n }",
"static boolean equal (String s1, String s2) {\r\n if (s1==errorSignature) return true;\r\n if (s2==errorSignature) return true;\r\n if (s1==null || s1.length()==0)\r\n return s2==null || s2.length()==0;\r\n return s1.equals (s2);\r\n }",
"private boolean argumentsEquals(Command other) {\n return Arrays.equals(this.arguments, other.arguments);\n }",
"@Override\n public boolean equals(Object other) {\n if (other instanceof Command) {\n return (this.getCommandName().equals(((Command) other).getCommandName())\n && this.argumentsEquals((Command) other) && this\n .commandDocumentation().equals(\n ((Command) other).commandDocumentation()));\n }\n return false;\n }",
"boolean hasMethodName();",
"boolean hasMethodName();",
"boolean hasMethodName();",
"@Override\n public boolean equals(Object o) {\n boolean result = (o instanceof PLambda);\n if (result) {\n result = parameters.size() == ((PLambda) o).parameters.size() && body.equals(((PLambda) o).body);\n }\n return result;\n }",
"boolean hasMethod();",
"boolean hasMethod();",
"boolean hasMethod();",
"public boolean mojeEquals(Obj o1, Obj o2) {\r\n\t\t//System.out.println(o1.getName() + \" \" + o2.getName());\r\n\t\tboolean sameRight = true; // 21.06.2020. provera prava pristupa\r\n\t\tboolean sameName = true;\t// 22.06.2020. ako nisu metode ne moraju da imaju isto ime\r\n\t\tboolean sameArrayType = true; //22.6.2020 ako je parametar niz mora isti tip niza da bude\r\n\t\t\r\n\t\tif (o1.getKind() == Obj.Meth && o2.getKind() == Obj.Meth) {\r\n\t\t\tsameRight = o1.getFpPos() == o2.getFpPos()+10; \r\n\t\t\tsameName = o1.getName().equals(o2.getName());\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (o1.getType().getKind() == Struct.Array && o2.getType().getKind() == Struct.Array) {\r\n\t\t\t\tif (!(o1.getType().getElemType() == o2.getType().getElemType())) { // ZA KLASE MOZDA TREBA equals\r\n\t\t\t\t\tsameArrayType = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// 16.08.2020.\r\n//\t\tif (o1.getType().getKind() == Struct.Class || o1.getType().getKind() == Struct.Interface)\r\n//\t\t\treturn true;\r\n\t\t\r\n\t\t\r\n\t\treturn o1.getKind() == o2.getKind() \r\n\t\t\t\t&& sameName\r\n\t\t\t\t&& o1.getType().equals(o2.getType())\r\n\t\t\t\t&& /*adr == other.adr*/ o1.getLevel() == o2.getLevel()\r\n\t\t\t\t&& equalsCompleteHash(o1.getLocalSymbols(), o2.getLocalSymbols())\r\n\t\t\t\t&& sameRight // 21.06.2020. provera prava pristupa\r\n\t\t\t\t&& sameArrayType; //22.6.2020 ako je parametar niz mora isti tip niza da bude\r\n\t}",
"public boolean supportsCallee(SootMethod method);",
"private boolean isSubSequence(char str1[], char str2[]) {\n int j = 0;\n int m = str1.length;\n int n = str2.length;\n for (int i=0; i<n&&j<m; i++)\n if (str1[j] == str2[i])\n j++;\n return (j==m);\n }",
"public boolean equivalentInteractions(InteractionObject first, InteractionObject second) {\n\t\tboolean result = \n\t\t\tfirst.getType() == second.getType() &&\n\t\t\tfirst.getIndex() == second.getIndex();\n\t\treturn result;\n\t}",
"public boolean hasMoreElements () {\r\n if (same_name_methods_index == 0) {\r\n if (!methods.hasMoreElements ()) return false;\r\n\r\n same_name_methods = (java.util.Vector) methods.nextElement ();\r\n same_name_methods_index = same_name_methods.size ();\r\n }\r\n\r\n return true;\r\n }",
"public boolean hasSig() {\n return sig_ != null;\n }",
"private static boolean isUserDefinedMethod(final Method method) {\n if (!method.equals(OBJECT_EQUALS)\n && !method.equals(OBJECT_HASH_CODE)\n && !method.equals(OBJECT_GET_CLASS)\n && !method.equals(OBJECT_TO_STRING)\n && !method.equals(OBJECT_CLONE)\n && !method.equals(OBJECT_WAIT_1)\n && !method.equals(OBJECT_WAIT_2)\n && !method.equals(OBJECT_WAIT_3)\n && !method.equals(OBJECT_NOTIFY)\n && !method.equals(OBJECT_NOTIFY_ALL)\n && !method.getName().startsWith(TransformationConstants.SYNTHETIC_MEMBER_PREFIX)\n && !method.getName().startsWith(TransformationConstants.ORIGINAL_METHOD_PREFIX)\n && !method.getName().startsWith(TransformationConstants.ASPECTWERKZ_PREFIX)) {\n return true;\n } else {\n return false;\n }\n }",
"public boolean matches(Constructor constructor) {\n Class<?>[] constructorParameterTypes = constructor.getParameterTypes();\n if (constructorParameterTypes.length == prototypeParameterTypes.length) {\n for (int i = 0; i < prototypeParameterTypes.length; i++) {\n if (!constructorParameterTypes[i].equals(prototypeParameterTypes[i])) {\n return false;\n }\n }\n return true;\n } else\n return false;\n }",
"private void isMethod() {\n if (isNameExpr != null) {\n isNameExpr.isMethod();\n isNameExpr = null;\n }\n }",
"static boolean isOuterMethodCall(AST node)\n {\n JavaNode call = getLastMethodCall((JavaNode) node);\n\n if (call.getPreviousSibling().getType() == JavaTokenTypes.LPAREN)\n {\n return false;\n }\n\n JavaNode expr = call.getParent();\n\n // if the topmost parent is no ELIST we know we can savely wrap and\n // align\n return getChainParent(expr).getType() != JavaTokenTypes.ELIST;\n }",
"abstract boolean hasFunctionSelfArgument(Object definedOn);",
"public static boolean isBlocksInSameRegion(MethodNode mth, BlockNode firstBlock, BlockNode secondBlock) {\n\t\tRegion region = mth.getRegion();\n\t\tif (region == null) {\n\t\t\treturn false;\n\t\t}\n\t\tIContainer firstContainer = getBlockContainer(region, firstBlock);\n\t\tif (firstContainer instanceof IRegion) {\n\t\t\tif (firstContainer instanceof IBranchRegion) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tList<IContainer> subBlocks = ((IRegion) firstContainer).getSubBlocks();\n\t\t\treturn subBlocks.contains(secondBlock);\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isProperSuperset(/*@ non_null @*/ JMLObjectSet<E> s2) {\n return s2.isProperSubset(this);\n }",
"public boolean hasSig() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"boolean isSuperclass(Concept x, Concept y);",
"@Pure\n\tprotected boolean isSubTypeOf(EObject context, JvmTypeReference subType, JvmTypeReference superType) {\n\t\tif (isTypeReference(superType) && isTypeReference(subType)) {\n\t\t\tStandardTypeReferenceOwner owner = new StandardTypeReferenceOwner(services, context);\n\t\t\tLightweightTypeReferenceFactory factory = new LightweightTypeReferenceFactory(owner, false);\n\t\t\tLightweightTypeReference reference = factory.toLightweightReference(subType);\n\t\t\treturn reference.isSubtypeOf(superType.getType());\n\t\t}\n\t\treturn false;\n\t}",
"public boolean hasSig() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"@Override\n public final boolean equals(Object obj) {\n if (!(obj instanceof UniqueID))\n return false;\n UniqueID castObj = (UniqueID)obj;\n return this.leastSigBits == castObj.leastSigBits && this.mostSigBits == castObj.mostSigBits;\n }",
"public boolean isIdentical(FeRangeElement other) {\n\tDean.shouldImplement();\n\treturn false;\n/*\nudanax-top.st:20673:FeVirtualDataHolder methodsFor: 'accessing'!\n{BooleanVar} isIdentical: other {FeRangeElement}\n\t\"This can do a version comparison (which seems a bit extreme).\"\n\tDean shouldImplement.\n\t^false \"fodder\"!\n*/\n}",
"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}",
"@Check\n \tpublic void checkOperatorOverloadsNamesMatch(Name name) {\n \t\t\n \t\tif (name.eContainer() instanceof Def && name.eContainer().eContainer() instanceof Def) {\n \t\t\tDef parent = (Def) name.eContainer().eContainer();\n \t\t\tif (parent.isOverload()) {\n \t\t\t\t// Convert to list of strings to be able to make comparison\n \t\t\t\tArrayList<String> parentNames = new ArrayList<String>();\n \t\t\t\tfor (Name n : parent.getName())\n \t\t\t\t\tparentNames.add(n.getName().getS());\n \t\t\t\t\n \t\t\t\tif (!parentNames.contains(name.getName().getS())) {\n \t\t\t\t\tStringBuilder parentNamesSB = new StringBuilder();\n \t\t\t\t\tIterator<Name> i = parent.getName().iterator();\n \t\t\t\t\twhile (i.hasNext()) {\n \t\t\t\t\t parentNamesSB.append(i.next().getName().getS());\n \t\t\t\t\t if (i.hasNext())\n \t\t\t\t\t \tparentNamesSB.append(\", \");\n \t\t\t\t\t}\n \t\t\t\t\tString msg = String.format(\"Oper name \\\"%1$s\\\" does not occur in parent overload name \\\"%2$s\\\"\", name.getName().getS(), parentNamesSB.toString());\n \t\t\t\t\twarning(msg, GFPackage.Literals.NAME__NAME);\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t}\n \t\t\n \t}",
"public final boolean isEqualTo (Type type)\n {\n if (this == type)\n return true;\n\n if (!(type instanceof TypeTerm))\n return false;\n\n TypeTerm typeTerm = (TypeTerm)type;\n \n if (kind() != typeTerm.kind() || name() != typeTerm.name() || arity() != typeTerm.arity())\n return false;\n\n for (int i=arity(); i-->0;)\n if (!argument(i).isEqualTo(typeTerm.argument(i)))\n return false;\n\n return true;\n }",
"boolean hasSameAs();",
"boolean isSetMethod();",
"@Override\n public boolean equals(Object other) {\n if (other.getClass() == getClass()) {\n return hashCode() == other.hashCode();\n }\n\n return false;\n }",
"private boolean samePosition(ITarget t1, ITarget t2) {\n assert t1.getTag() == t2.getTag() : \"Programmer error; tags must match.\";\n switch (t1.getTag()) {\n case JPL_MINOR_BODY:\n case MPC_MINOR_PLANET:\n case NAMED:\n\n // SUPER SUPER SKETCHY\n // The .equals logic in NonSiderealTarget actually does what we want here, at\n // least according to the old implementation here. So we'll leave it for now.\n // This will be easier with the new model.\n return t1.equals(t2);\n\n case SIDEREAL:\n final HmsDegTarget hms1 = (HmsDegTarget) t1;\n final HmsDegTarget hms2 = (HmsDegTarget) t2;\n return hasSameCoordinates(hms1, hms2) &&\n hasSameProperMotion(hms1, hms2) &&\n hasSameTrackingDetails(hms1, hms2);\n\n default:\n throw new Error(\"Unpossible target tag: \" + t1.getTag());\n }\n }",
"private static boolean haveSameSkeleton(JsonObject object1, JsonObject object2){\n\t\tboolean res = (object1.entrySet().size() == object2.entrySet().size());\n\t\tSystem.err.println(res);\n\t\tif (res){\n\t\t\tfor(java.util.Map.Entry<String, JsonElement> entry : object1.entrySet()){\n\t\t\t\tif (!object2.has(entry.getKey())) return false;\n\t\t\t}\n\t\t\treturn true;\t\t\t\n\t\t}\n\t\telse return false;\n\t}",
"private static boolean matchName(@NotNull PsiMethod method, @NotNull IHasParameterInfos targetMethodInfo, @NotNull String targetMethodName, boolean isConstructor) {\n if (targetMethodName.startsWith(\"@\")) {\n IType returnType = ((IGosuMethodInfo) targetMethodInfo).getReturnType();\n if ((returnType.equals(JavaTypes.BOOLEAN()) || returnType.equals(JavaTypes.pBOOLEAN()) &&\n !method.getName().equals(\"is\" + targetMethodName.substring(1)))) {\n return true;\n }\n if (!method.getName().equals(\"get\" + targetMethodName.substring(1)) && !method.getName().equals(\"set\" + targetMethodName.substring(1))) {\n return true;\n }\n } else if (!targetMethodName.equals(method.getName()) && !(isConstructor && \"construct\".equals(method.getName()))) {\n return true;\n }\n return false;\n }",
"public boolean hasSameSides(Property prop) {\n // this code provided by Dave Houtman [2020] personal communication\n return this.getXLength() == prop.getXLength() && this.getYWidth() == prop.getYWidth();\n }",
"public boolean equals(Object obj) {\n\n if (!this.getClass().equals(obj.getClass())) {\n System.out.println(\"different classes\");\n return false;\n }\n\n Proto cmd = (Proto)obj;\n for (String key : cmd.getArguments().keySet()) {\n if (this.getArguments().containsKey(key)) {\n if(!this.getArguments().containsValue(cmd.getArgument(key))) {\n return false;\n }\n } else {\n return false;\n }\n }\n return true;\n }",
"public org.apache.calcite.avatica.proto.Common.SignatureOrBuilder getSignatureOrBuilder() {\n return getSignature();\n }",
"@Override\n public boolean isSubroutineParameter(int index) {\n return false;\n }",
"public boolean isSub() {\n\t\treturn this.sub;\n\t}",
"public boolean isSeen(TypeReference type, boolean withSuper) {\n if (type == null) {\n throw new IllegalArgumentException(\"The argument type may not be null\");\n }\n\n if (withSuper) {\n return seenTypes.containsKey(type);\n } else {\n if (seenTypes.containsKey(type)) {\n if (seenTypes.get(type).get(0).type.equals(type)) {\n return true;\n }\n }\n return false;\n\n }\n }",
"@Test\r\n public void testIsSubset1() {\r\n Assert.assertEquals(false, set1.isSubset(set2));\r\n }",
"@Override\n public boolean equals(Object obj)\n {\n if (this == obj)\n return true;\n if (obj == null)\n return false;\n if (getClass() != obj.getClass())\n return false;\n TypeReference other = (TypeReference) obj;\n if (typeArgs == null)\n {\n if (other.typeArgs != null)\n return false;\n } else if (!typeArgs.equals(other.typeArgs))\n return false;\n if (typeName == null)\n {\n if (other.typeName != null)\n return false;\n } else if (!typeName.equals(other.typeName))\n return false;\n return true;\n }",
"org.apache.calcite.avatica.proto.Common.Signature getSignature();",
"abstract protected boolean checkMethod();",
"public boolean match(MindObject other){\n return other.isSubtypeOf(this) || isSubtypeOf(other);\n }",
"@Nullable\n private Boolean isOverriding(MethodJavaSymbol overridee, JavaType.ClassJavaType classType) {\n if (getParametersTypes().size() != overridee.getParametersTypes().size()) {\n return false;\n }\n for (int i = 0; i < getParametersTypes().size(); i++) {\n JavaType paramOverrider = getParametersTypes().get(i);\n if (paramOverrider.isTagged(JavaType.UNKNOWN)) {\n // FIXME : complete symbol table should not have unknown types and generics should be handled properly for this.\n return null;\n }\n // Generics type should have same erasure see JLS8 8.4.2\n\n JavaType overrideeType = overridee.getParametersTypes().get(i);\n if (classType instanceof JavaType.ParametrizedTypeJavaType) {\n overrideeType = ((JavaType.ParametrizedTypeJavaType) classType).typeSubstitution.substitutedType(overrideeType);\n if (overrideeType == null) {\n overrideeType = overridee.getParametersTypes().get(i);\n }\n }\n if (!paramOverrider.erasure().equals(overrideeType.erasure())) {\n return false;\n }\n }\n // we assume code is compiling so no need to check return type at this point.\n return true;\n }",
"private void isMethod() {\n ArrayAdapter<String> isVariable = new ArrayAdapter<>(this, isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr);\n isNameExpr.isMethod(isNameExpr);\n isNameExpr.isMethod((isParameter, isParameter, isParameter, isParameter) -> {\n isNameExpr = isNameExpr.isMethod(isNameExpr.isMethod(isNameExpr), isNameExpr);\n isMethod(isNameExpr);\n isNameExpr = isNameExpr;\n });\n }",
"public boolean isAncestor(RMShape aShape) { return aShape==_parent || (_parent!=null && _parent.isAncestor(aShape)); }",
"private void checkTypes(Variable first, Variable second) throws OutmatchingParameterType {\n VariableVerifier.VerifiedTypes firstType = first.getType();\n VariableVerifier.VerifiedTypes secondType = second.getType();\n\n if (!firstType.equals(secondType)) {\n throw new OutmatchingParameterType();\n }\n }",
"private boolean areSameType(String s1, String s2) {\n\t\treturn((isMatrix(s1) && isMatrix(s2)) || (isOperator(s1) && isOperator(s2)) || (isNumber(s1) && isNumber(s2)));\n\t}",
"public boolean overlaps(Shape2D s)\r\n {\r\n if (isPhasing)\r\n return false;\r\n \r\n return super.overlaps(s);\r\n }"
] | [
"0.73656213",
"0.7289576",
"0.65301365",
"0.6505204",
"0.64806616",
"0.624113",
"0.60629857",
"0.60629857",
"0.5971832",
"0.5914775",
"0.5773028",
"0.5481579",
"0.54659253",
"0.5419296",
"0.5386758",
"0.53813183",
"0.5361645",
"0.53071165",
"0.52929294",
"0.52925146",
"0.5277741",
"0.52684444",
"0.52593917",
"0.52159935",
"0.52084774",
"0.5203662",
"0.51866114",
"0.5183849",
"0.51733464",
"0.51699424",
"0.5152618",
"0.51394504",
"0.5125841",
"0.5115784",
"0.5110965",
"0.50978696",
"0.5093455",
"0.50899476",
"0.5088166",
"0.5074794",
"0.50701797",
"0.5068742",
"0.50324374",
"0.5024493",
"0.50237596",
"0.5006535",
"0.5004854",
"0.49945325",
"0.49763533",
"0.49763533",
"0.49763533",
"0.4954439",
"0.4941431",
"0.4941431",
"0.4941431",
"0.49377108",
"0.49234647",
"0.48818633",
"0.4867087",
"0.48662677",
"0.48651868",
"0.48490965",
"0.48415965",
"0.48363298",
"0.48307636",
"0.4829871",
"0.48291",
"0.4827972",
"0.4820608",
"0.4813336",
"0.48014492",
"0.48010823",
"0.47894758",
"0.47775608",
"0.47632897",
"0.4751257",
"0.47497776",
"0.4747089",
"0.47464955",
"0.47424385",
"0.4729313",
"0.47176707",
"0.4716256",
"0.4715745",
"0.47094998",
"0.47064292",
"0.47058967",
"0.4704621",
"0.47021025",
"0.46945816",
"0.46845505",
"0.4684485",
"0.468306",
"0.46817952",
"0.46769744",
"0.46768913",
"0.46758908",
"0.46710253",
"0.46691236",
"0.46619415"
] | 0.78942716 | 0 |
Determines if this MethodType is override equivalent with another | public boolean overrideEquivalent(MethodType other) {
return this.sameSubsignature(other) || other.sameSubsignature(this);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected boolean isMethodOverridden() {\n DetailAST current = ast;\n Boolean result = null;\n for (; current != null && result == null; current = current.getParent()) {\n switch (current.getType()) {\n case TokenTypes.METHOD_DEF:\n result = findAnnotations(current).contains(NullnessAnnotation.OVERRIDE);\n break;\n case TokenTypes.LAMBDA:\n result = true;\n break;\n default:\n }\n }\n if (result == null) {\n result = false;\n }\n return result;\n }",
"boolean overrides(MethodDeclaration sub, MethodDeclaration sup);",
"boolean isOverride();",
"public boolean isEquivalentTo(Type other) {\n if (other instanceof MethodType) {\n return sameSignature((MethodType)other);\n }\n return false;\n }",
"@Nullable\n private Boolean isOverriding(MethodJavaSymbol overridee, JavaType.ClassJavaType classType) {\n if (getParametersTypes().size() != overridee.getParametersTypes().size()) {\n return false;\n }\n for (int i = 0; i < getParametersTypes().size(); i++) {\n JavaType paramOverrider = getParametersTypes().get(i);\n if (paramOverrider.isTagged(JavaType.UNKNOWN)) {\n // FIXME : complete symbol table should not have unknown types and generics should be handled properly for this.\n return null;\n }\n // Generics type should have same erasure see JLS8 8.4.2\n\n JavaType overrideeType = overridee.getParametersTypes().get(i);\n if (classType instanceof JavaType.ParametrizedTypeJavaType) {\n overrideeType = ((JavaType.ParametrizedTypeJavaType) classType).typeSubstitution.substitutedType(overrideeType);\n if (overrideeType == null) {\n overrideeType = overridee.getParametersTypes().get(i);\n }\n }\n if (!paramOverrider.erasure().equals(overrideeType.erasure())) {\n return false;\n }\n }\n // we assume code is compiling so no need to check return type at this point.\n return true;\n }",
"public boolean overrides(Member other) {\r\n\t\treturn getSimpleName().equals(other.getSimpleName());\r\n\t}",
"public void override() {\n isOverridden = true;\n }",
"public boolean isOverridden() {\n return (isOverridden || topSwitch.get());\n }",
"public static boolean doesOverride(final PsiMethod psiMethod) {\r\n boolean isOverride = false;\r\n final PsiAnnotation[] annotations = psiMethod.getAnnotations();\r\n if (annotations.length != 0) {\r\n for (@NotNull final PsiAnnotation annotation : annotations) {\r\n if (annotation.getQualifiedName().equals(\"Override\")) {\r\n isOverride = true;\r\n }\r\n }\r\n }\r\n\r\n final PsiMethod[] superMethods = psiMethod.findDeepestSuperMethods();\r\n return isOverride || (superMethods.length != 0);\r\n }",
"@Override\n\tprotected boolean checkOverride(IEventInstance eventInstance, Operand operand) {\n\t\treturn false;\n\t}",
"boolean isMoreSpecific (MethodType type) throws OverloadingAmbiguous {\r\n boolean status = false;\r\n\r\n try {\r\n for (int i = 0, size = arguments.size (); i < size; i++) {\r\n\tIdentifier this_arg = (Identifier) arguments.elementAt (i);\r\n\tIdentifier target_arg = (Identifier) type.arguments.elementAt (i);\r\n\r\n\tint type_diff = this_arg.type.compare (target_arg.type);\r\n\tif (type_diff == 0)\r\n\t continue;\r\n\telse if (type_diff > 0) {\r\n\t if (status == true) throw new OverloadingAmbiguous ();\r\n\t} else {\r\n\t if (i != 0) throw new OverloadingAmbiguous ();\r\n\t status = true;\r\n\t}\r\n }\r\n } catch (OverloadingAmbiguous ex) {\r\n throw ex;\r\n } catch (TypeMismatch ex) {\r\n throw new OverloadingAmbiguous ();\r\n }\r\n\r\n return status;\r\n }",
"public boolean sameSubsignature(MethodType other) {\n return sameSignature(other) || sameSignature(other.erase());\n }",
"private boolean canOverride(MethodJavaSymbol overridee) {\n if (overridee.isPackageVisibility()) {\n return overridee.outermostClass().owner().equals(outermostClass().owner());\n }\n return !overridee.isPrivate();\n }",
"public boolean isMethodFromBaseClass() {\n return m_isBaseClass.isSelected();\n }",
"public void addOverride(JMethod toAdd) {\n assert canBePolymorphic();\n overrides = Lists.add(overrides, toAdd);\n }",
"public boolean sameSignature(MethodType other) {\n return name.equals(name) &&\n Arrays.equals(typeParams, other.typeParams) &&\n Arrays.equals(paramTypes, other.paramTypes);\n }",
"@Override // com.google.common.base.Equivalence\n public boolean doEquivalent(Object a, Object b) {\n return false;\n }",
"private boolean isOverloaded(){\n\t\tif(((double) this.contains) / this.table.length > .6){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"private boolean methodEqueals(Method m1, Method m2) {\n\t\tif (m1.getName() == m2.getName()) {\n\t\t\tif (!m1.getReturnType().equals(m2.getReturnType()))\n\t\t\t\treturn false;\n\t\t\tClass<?>[] params1 = m1.getParameterTypes();\n\t\t\tClass<?>[] params2 = m2.getParameterTypes();\n\t\t\tif (params1.length == params2.length) {\n\t\t\t\tfor (int i = 0; i < params1.length; i++) {\n\t\t\t\t\tif (params1[i] != params2[i])\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isOverrideAmount() {\n return overrideAmount;\n }",
"public boolean isVirtual();",
"public boolean isVirtual();",
"public boolean hasOverrideFor(String fontKey) {\n return super.hasValueFor(fontKey);\n }",
"private void forEachOverridenMethod(final ClassTypingContext ctc, final CtMethod<?> thisMethod, Set<String> distintTypesSet, final CtConsumer<CtMethod<?>> outputConsumer) {\n\t\tfinal CtQuery q = ctc.getAdaptationScope()\n\t\t\t.map(new AllTypeMembersFunction(CtMethod.class).distinctSet(distintTypesSet));\n\t\tq.\tforEach(new CtConsumer<CtMethod<?>>() {\n\t\t\t@Override\n\t\t\tpublic void accept(CtMethod<?> thatMethod) {\n\t\t\t\tif (thisMethod == thatMethod) {\n\t\t\t\t\t//do not return scope method\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t//check whether method is overridden by searched method\n\t\t\t\t/*\n\t\t\t\t * note: we are in super inheritance hierarchy of type declaring input `method`, so we do not have to check isSubTypeOf.\n\t\t\t\t * Check for isSubSignature is enough\n\t\t\t\t */\n\t\t\t\tif (ctc.isSubSignature(thisMethod, thatMethod)) {\n\t\t\t\t\toutputConsumer.accept(thatMethod);\n\t\t\t\t\tif (query.isTerminated()) {\n\t\t\t\t\t\tq.terminate();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}",
"private static boolean isUserDefinedMethod(final Method method) {\n if (!method.equals(OBJECT_EQUALS)\n && !method.equals(OBJECT_HASH_CODE)\n && !method.equals(OBJECT_GET_CLASS)\n && !method.equals(OBJECT_TO_STRING)\n && !method.equals(OBJECT_CLONE)\n && !method.equals(OBJECT_WAIT_1)\n && !method.equals(OBJECT_WAIT_2)\n && !method.equals(OBJECT_WAIT_3)\n && !method.equals(OBJECT_NOTIFY)\n && !method.equals(OBJECT_NOTIFY_ALL)\n && !method.getName().startsWith(TransformationConstants.SYNTHETIC_MEMBER_PREFIX)\n && !method.getName().startsWith(TransformationConstants.ORIGINAL_METHOD_PREFIX)\n && !method.getName().startsWith(TransformationConstants.ASPECTWERKZ_PREFIX)) {\n return true;\n } else {\n return false;\n }\n }",
"public boolean isOverridenBy(final CorrectiveAction correctiveAction)\n {\n return isOveridingCallScriptCorrectiveAction(correctiveAction)\n || (correctiveAction instanceof RestartAgentCorrectiveAction);\n }",
"boolean hasMethod();",
"boolean hasMethod();",
"boolean hasMethod();",
"public void myMethod(){\n\t\t\tsuper.myMethod();\n\t\t\tSystem.out.println(\"Overriding method\");\n\t\t }",
"public abstract boolean doEquivalent(T t, T t2);",
"public static boolean hasHook(Object obj, String methodN) {\n try {\n Method myMethods[] = findMethods(obj.getClass());\n for (int i = 0; i < myMethods.length; i++) {\n if (methodN.equals(myMethods[i].getName())) {\n // check if it's overriden\n Class<?> declaring = myMethods[i].getDeclaringClass();\n Class<?> parentOfDeclaring = declaring.getSuperclass();\n // this works only if the base class doesn't extend\n // another class.\n\n // if the method is declared in a top level class\n // like BaseInterceptor parent is Object, otherwise\n // parent is BaseInterceptor or an intermediate class\n if (!\"java.lang.Object\".\n equals(parentOfDeclaring.getName())) {\n return true;\n }\n }\n }\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n return false;\n }",
"@Override\n public boolean exists()\n {\n return orig.exists();\n }",
"private boolean overlaps(MethodDeclaration decl, ITextSelection selection) {\r\n\t\t\t\t\r\n\t\t\t\tIComparableTextSelection declSelection = new ComparisonTextSelection(decl.getStartPosition(),decl.getLength());\r\n\t\t\t\treturn !declSelection.compareTo(selection).equals(IComparableTextSelection.COMPARISON.NO_OVERLAP);\r\n\t\t\t}",
"boolean replacementfor(Type o);",
"@Override\n\tdefault boolean equivalentTo(Tree otherTree) {\n\t\tif (this == otherTree)\n\t\t\treturn true;\n\t\t\n\t\tif (otherTree == null || this.getKind() != otherTree.getKind() || this.hashCode() != otherTree.hashCode())\n\t\t\treturn false;\n\t\t\n\t\t\n\t\tCatchTree other = (CatchTree) otherTree;\n\t\t\n\t\tif (!Tree.equivalentTo(this.getBlock(), other.getBlock()))\n\t\t\treturn false;\n\t\t\n\t\tif (!Tree.equivalentTo(this.getParameter(), other.getParameter()))\n\t\t\treturn false;\n\t\t\n\t\tif (!Tree.equivalentTo(this.getType(), other.getType()))\n\t\t\treturn false;\n\t\t\n\t\treturn true;\n\t}",
"boolean isSetMethod();",
"public void addOverrides(List<JMethod> toAdd) {\n assert canBePolymorphic();\n overrides = Lists.addAll(overrides, toAdd);\n }",
"public boolean overridesSet(){\n return overrides.stream().anyMatch(k->!k.dontAllowSet());\n }",
"@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Method)) {\r\n return false;\r\n }\r\n Method other = (Method) object;\r\n if ((this.idmethod == null && other.idmethod != null) || (this.idmethod != null && !this.idmethod.equals(other.idmethod))) {\r\n return false;\r\n }\r\n return true;\r\n }",
"private boolean overwrite(Object target, Object delta) {\n Method[] methods = target.getClass().getMethods();\n\n for(Method toMethod: methods){\n if(toMethod.getDeclaringClass().equals(target.getClass())\n && toMethod.getName().startsWith(\"set\")){\n\n String toName = toMethod.getName();\n String fromName = toName.replace(\"set\", \"get\");\n\n try {\n Method fromMethod = delta.getClass().getMethod(fromName);\n Object value = fromMethod.invoke(delta, (Object[])null);\n if(value != null){\n toMethod.invoke(target, value);\n }\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n }\n }\n return true;\n }",
"@Override // com.google.common.base.Equivalence\n public boolean doEquivalent(Object a, Object b) {\n return a.equals(b);\n }",
"boolean isDerived();",
"public boolean isSubstitute();",
"private boolean match(Type t, Type original) {\n\t\t\t\treturn original.getSort() == Type.METHOD && original.getSort() == t.getSort();\n\t\t\t}",
"public boolean supportsCallee(SootMethod method);",
"private boolean isModuleOverriding(\n final ModularConfigurationModule<T> module,\n final ModularConfigurationModule<T> otherModule\n ) {\n for (ModularConfigurationBlock<T> block : blocks) {\n for (ModularConfigurationModule<T> existingModule : block.getFiles()) {\n if (existingModule == module) {\n return true;\n } else if (existingModule == otherModule) {\n return false;\n }\n }\n }\n return false; // Neither are stored. Weird!\n }",
"boolean getIsVirtual();",
"abstract protected boolean checkMethod();",
"public List<SemanticError> checkMethodInheritance() {\n\t\tList<SemanticError> errors = new LinkedList<>();\n\n\t\tif (superClass == null)\n\t\t\treturn errors;\n\t\t\n\t\tint max = -1;\n\n\t\tfor (String key : superClass.methods.keySet()) {\n\t\t\tVSOPMethod m = superClass.methods.get(key);\n\t\t\tmax = Math.max(max, m.ord);\n\t\t\tVSOPMethod old = methods.putIfAbsent(key, m);\n\n\t\t\tif(old != null)\n\t\t\t\told.ord = m.ord;\n\t\t\t\t\n\t\t\tif (old != null && (!m.args.equals(old.args) || m.returnType != old.returnType))\n\t\t\t\terrors.add(new SemanticError(m.ln, m.col,\n\t\t\t\t\t\tString.format(\"method %s is redefined in class %s with wrong signature\", m.id, this.id)));\n\n\t\t}\n\n\t\tfor(VSOPMethod m: methods().values()) {\n\t\t\tif(m.ord == -1) {\n\t\t\t\tmax++;\n\t\t\t\tm.ord = max;\n\t\t\t}\n\t\t}\n\n\t\treturn errors;\n\t}",
"public Boolean invoke(SNode it) {\n boolean enumConstant = SNodeOperations.isInstanceOf(classifier, CONCEPTS.AnonymousClass$Bt) && SNodeOperations.getModel(classifier) == null;\n return canBeOverridden(it) && ((SLinkOperations.getTarget(it, LINKS.visibility$Yyua) != null) || enumConstant || packagesAreTheSame(superClassifier, classifier));\n }",
"public interface EqualsOverride<T>\r\n{\r\n boolean isEqual(T t1, T t2);\r\n}",
"public boolean equals(JavaMethodSignature sig) {\n\t\t//if their signatures aren't the same length, we've got problems\n\t\tif (this.sig.size() != sig.sig.size())\n\t\t\treturn false;\n\t\t\n\t\t//signatures are the same length, let's run through the parameters\n\t\tfor (int i = 0; i < this.sig.size(); i++) {\n\t\t\tif (this.sig.get(i).type != sig.sig.get(i).type)\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"private void isMethod() {\n if (isNameExpr != null) {\n isNameExpr.isMethod();\n isNameExpr = null;\n }\n }",
"private boolean hasExplicitInvocant() {\n PsiElement signatureContainer = getSignatureContent();\n return signatureContainer != null && signatureContainer.getFirstChild() instanceof PsiPerlMethodSignatureInvocant;\n }",
"public boolean isIdentical(FeRangeElement other) {\n\tDean.shouldImplement();\n\treturn false;\n/*\nudanax-top.st:20673:FeVirtualDataHolder methodsFor: 'accessing'!\n{BooleanVar} isIdentical: other {FeRangeElement}\n\t\"This can do a version comparison (which seems a bit extreme).\"\n\tDean shouldImplement.\n\t^false \"fodder\"!\n*/\n}",
"private boolean isOveridingCallScriptCorrectiveAction(final CorrectiveAction correctiveAction)\n {\n return (correctiveAction instanceof CallScriptCorrectiveAction)\n && ((CallScriptCorrectiveAction) correctiveAction)\n .getOveridesInvokeMethodCorrectiveAction();\n }",
"private boolean isMethod() {\n return !line.contains(\"=\") && !line.contains(\".\") && !semicolon && line.contains(\"(\");\n }",
"public List<JMethod> getOverrides() {\n return overrides;\n }",
"public boolean hasMethod() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public BooleanProperty getOverrideProperty() {\n return overrideProperty;\n }",
"boolean isSame(MethodInvocation propagator) {\r\n\t\treturn this == propagator;\r\n\t}",
"@Override\r\n\t\tpublic boolean implementEquals(Object obj) {\n\t\t\treturn false;\r\n\t\t}",
"public void setOverrideProperty(BooleanProperty overrideProperty) {\n this.overrideProperty = overrideProperty;\n }",
"boolean _is_equivalent(org.omg.CORBA.Object other);",
"public int isMethod() {\n return isNameExpr;\n }",
"public boolean hasMethod() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"@JsonProperty(\"overrideWikitext\")\n public boolean isOverridingWikitext() {\n return overrideWikitext;\n }",
"@Override\n public boolean updateBase(TFollowPersonVo source, TFollowPersonVo target) {\n\n return dao.updateBase(source, target) > 0 ? true : false;\n\n }",
"boolean hasMethodName();",
"boolean hasMethodName();",
"boolean hasMethodName();",
"private static interface WithObjectOverrides {\n\n public boolean equals(Object obj);\n\n public int hashCode();\n\n public String toString();\n }",
"@Override\n\tboolean isRegistedMethodNotNeed() {\n\t\treturn true;\n\t}",
"boolean hasBodyFormatOverride();",
"default boolean isVarArgs() {\n\t\t// Check whether the MethodHandle refers to a Method or Contructor (not Field)\n\t\tif (getReferenceKind() >= REF_invokeVirtual) {\n\t\t\treturn ((getModifiers() & MethodHandles.Lookup.VARARGS) != 0);\n\t\t}\n\t\treturn false;\n\t}",
"public boolean is_overwrite() {\n\t\treturn _overwrite;\n\t}",
"boolean hasIsEquivalent();",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic boolean visit(MethodDeclaration node) {\r\n\t\tIMethodBinding imb = node.resolveBinding();\r\n\t\tIJavaElement ije = imb.getJavaElement();\r\n\t\tif (ije instanceof IMethod) {\r\n\t\t\tIMethod im = (IMethod) ije;\r\n\t\t\tList<SingleVariableDeclaration> para_list = node.parameters();\r\n\t\t\tIRGeneratorHelper.HandleMethodDeclaration(java_project, graph_manager, node.getBody(), ele_factory,\r\n\t\t\t\t\tstmt_factory, imb, im, it, para_list, super_class_element, type_declare_resource, type_declare);\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public String isMethod() {\n return isNameExpr;\n }",
"@Override\n public void method1() {\n\n // we have 2 method (this method1 and method2 from A) in this class. Not the abstract.\n }",
"@Override\n public boolean visit (MethodDeclaration methodDeclaration) {\n /* get the reversed order of statements from the body */\n Block body = (Block) ASTNode.copySubtree(methodDeclaration.getAST(), getReverse(methodDeclaration.getBody()));\n\n /* set new body, name and return type */\n SimpleName name = methodDeclaration.getAST().newSimpleName(\"rev_\" + methodDeclaration.getName().getFullyQualifiedName());\n rewriter.set(methodDeclaration, MethodDeclaration.BODY_PROPERTY, body, null);\n rewriter.set(methodDeclaration, MethodDeclaration.NAME_PROPERTY, name, null);\n rewriter.set(methodDeclaration, MethodDeclaration.RETURN_TYPE2_PROPERTY, methodDeclaration.getAST().newPrimitiveType(PrimitiveType.VOID), null);\n\n return true;\n }",
"boolean isInstrumentDerived();",
"private void isMethod() {\n ArrayAdapter<String> isVariable = new ArrayAdapter<>(this, isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr);\n isNameExpr.isMethod(isNameExpr);\n isNameExpr.isMethod((isParameter, isParameter, isParameter, isParameter) -> {\n isNameExpr = isNameExpr.isMethod(isNameExpr.isMethod(isNameExpr), isNameExpr);\n isMethod(isNameExpr);\n isNameExpr = isNameExpr;\n });\n }",
"public boolean equivalentInteractions(InteractionObject first, InteractionObject second) {\n\t\tboolean result = \n\t\t\tfirst.getType() == second.getType() &&\n\t\t\tfirst.getIndex() == second.getIndex();\n\t\treturn result;\n\t}",
"int getOverriddenCount();",
"public static boolean allowOverwrite() {\n\t\tif ((xml != null) && (overwrite != null) && overwrite.equals(\"no\")) return false;\n\t\treturn true;\n\t}",
"@Override\n boolean doIsAssignableFromNonUnionType(SoyType srcType) {\n return false;\n }",
"@Override\n\tpublic void methodDiff() {\n\t\tSystem.out.println(\"this is ConcreteProductB\");\n\t}",
"@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null) return false;\n if (!(o instanceof Autogen{{class_name}})) return false;\n Autogen{{class_name}} other = (Autogen{{class_name}}) o;\n\n {{#properties}}\n {\n {{#type}}\n Function3<{{> type}}",
"public boolean isMethod() {\n return isNameExpr;\n }",
"public void setAllowOverridingReturnValue(final boolean newAllowOverridingReturnValue) {\n allowOverridingReturnValue = newAllowOverridingReturnValue;\n }",
"public static int isMethod() {\n return isNameExpr;\n }",
"@Override\n public abstract boolean equals(Object abc);",
"public boolean isExtending()\n {\n return this.extending;\n }",
"public boolean uniSameAs(Type other, TypeFixer fixer) throws LookupException;",
"public boolean hasCustom();",
"public void setAllowOverridingParameter(final boolean newAllowOverridingParameter) {\n allowOverridingParameter = newAllowOverridingParameter;\n }",
"public boolean func_82789_a(ItemStack stack1, ItemStack stack2) { return stack2.func_77969_a(new ItemStack(ItemsTC.ingots, 1, 0)) ? true : super\n/* 84 */ .func_82789_a(stack1, stack2); }",
"@Override\n\tpublic void myMethod2() {\n\t\t\n\t}"
] | [
"0.7664831",
"0.74540704",
"0.7450556",
"0.6810779",
"0.680869",
"0.65066594",
"0.64269316",
"0.6412376",
"0.6356108",
"0.6332711",
"0.63128084",
"0.625071",
"0.6236602",
"0.61353683",
"0.5945631",
"0.58689797",
"0.57534486",
"0.57344455",
"0.56827015",
"0.56309533",
"0.55143255",
"0.55143255",
"0.5439547",
"0.54236716",
"0.53938067",
"0.53761756",
"0.53247416",
"0.53247416",
"0.53247416",
"0.5311939",
"0.5309196",
"0.52940834",
"0.5293306",
"0.5286058",
"0.5271654",
"0.52696246",
"0.5246246",
"0.52436167",
"0.5216729",
"0.5211761",
"0.52093065",
"0.52037615",
"0.52028114",
"0.51983523",
"0.5194425",
"0.5186744",
"0.51591736",
"0.51581436",
"0.5151934",
"0.51290566",
"0.51076835",
"0.50602615",
"0.50368524",
"0.50303006",
"0.5027922",
"0.5017156",
"0.5005088",
"0.4997486",
"0.49906853",
"0.49690607",
"0.49583998",
"0.49525338",
"0.49478826",
"0.4943479",
"0.49408418",
"0.4938053",
"0.4933432",
"0.49185476",
"0.4910839",
"0.4902334",
"0.4902334",
"0.4902334",
"0.48831534",
"0.48789778",
"0.4876599",
"0.48761752",
"0.48676458",
"0.4862349",
"0.48560885",
"0.4854136",
"0.48424307",
"0.48396263",
"0.4835972",
"0.48094594",
"0.48081186",
"0.48038387",
"0.48027384",
"0.47964188",
"0.47934645",
"0.4790094",
"0.4782996",
"0.4782127",
"0.47810113",
"0.4776492",
"0.47698683",
"0.4765311",
"0.4764734",
"0.4755176",
"0.47546965",
"0.47536555"
] | 0.7959158 | 0 |
todo: need code expert subsystem | public void setTested(boolean tested) {
isTested = tested;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void smell() {\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\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"public void mo38117a() {\n }",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"private void kk12() {\n\n\t}",
"public void gored() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"protected void mo6255a() {\n }",
"@Override\n\tprotected void interr() {\n\t}",
"public void mo4359a() {\n }",
"@Override\n protected void prot() {\n }",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"private static void cajas() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\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 method_4270() {}",
"protected boolean func_70814_o() { return true; }",
"@Override\n public void func_104112_b() {\n \n }",
"public abstract void mo70713b();",
"private void strin() {\n\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"public void mo55254a() {\n }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"private void m50366E() {\n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"public void mo6081a() {\n }",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"public abstract void mo56925d();",
"@Override\r\n\tprotected void processInit() {\n\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 public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public void mo21791P() {\n }",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"public void mo3376r() {\n }",
"private void init() {\n\n\t}",
"@Override\n protected void getExras() {\n }",
"public void mo21877s() {\n }",
"private void level7() {\n }",
"@Override\r\n\tprotected void processInit() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"public abstract void mo27385c();",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"public void mo12930a() {\n }",
"public void mo21793R() {\n }",
"@Override\n protected void init() {\n }",
"void mo57277b();",
"public abstract void mo27386d();",
"private void poetries() {\n\n\t}",
"public void mo9848a() {\n }",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"public void mo21779D() {\n }",
"public void mo21825b() {\n }",
"private void sub() {\n\n\t}",
"public abstract void mo6549b();",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}",
"public void identify() {\n\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"public void Tyre() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"public void redibujarAlgoformers() {\n\t\t\n\t}",
"public void mo21794S() {\n }",
"public void mo115190b() {\n }",
"public void mo12628c() {\n }",
"@Override\r\n\tvoid func04() {\n\t\t\r\n\t}",
"public void mo44053a() {\n }",
"private void init() {\n\n\n\n }",
"void mo21072c();",
"@Override\r\n\t\t\t\tpublic void autInitProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void autInitProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"void mo57278c();",
"public void mo1531a() {\n }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}"
] | [
"0.6177914",
"0.6172399",
"0.61473954",
"0.61152375",
"0.6108922",
"0.60955626",
"0.6073166",
"0.6004108",
"0.5996019",
"0.5994796",
"0.5973617",
"0.5919125",
"0.59182936",
"0.5912749",
"0.58922607",
"0.58607584",
"0.58485585",
"0.5846281",
"0.58432436",
"0.58340335",
"0.5827847",
"0.5827847",
"0.5827847",
"0.5827847",
"0.5827847",
"0.5827847",
"0.5827847",
"0.5818229",
"0.580735",
"0.5794922",
"0.5794922",
"0.5787431",
"0.57869804",
"0.5785186",
"0.57810587",
"0.57800245",
"0.57786876",
"0.57478565",
"0.5742622",
"0.5740107",
"0.5732128",
"0.5730421",
"0.5729539",
"0.57257134",
"0.57246715",
"0.57157576",
"0.56981456",
"0.5691946",
"0.56700337",
"0.566599",
"0.566599",
"0.56523293",
"0.56523293",
"0.56471354",
"0.56459916",
"0.5633569",
"0.5631",
"0.56260043",
"0.5619832",
"0.5619073",
"0.5618447",
"0.5614691",
"0.5611603",
"0.5603277",
"0.5588907",
"0.5586076",
"0.5579055",
"0.5575878",
"0.55732083",
"0.5569009",
"0.5558524",
"0.55580896",
"0.55564207",
"0.5552696",
"0.555212",
"0.55496556",
"0.55467325",
"0.55429584",
"0.55429584",
"0.55429584",
"0.55429584",
"0.55429584",
"0.55328494",
"0.5531547",
"0.55291235",
"0.55285347",
"0.55209607",
"0.5520241",
"0.5517201",
"0.55167645",
"0.55156636",
"0.5512561",
"0.5509589",
"0.5505339",
"0.5504258",
"0.5504258",
"0.5501621",
"0.5498705",
"0.5495226",
"0.54951733",
"0.5492089"
] | 0.0 | -1 |
Creates new form sobre | public sobre() {
initComponents();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"FORM createFORM();",
"public static Result newForm() {\n return ok(newForm.render(palletForm, setOfArticleForm));\n }",
"public static void create(Formulario form){\n daoFormulario.create(form);\n }",
"public FormInserir() {\n initComponents();\n }",
"@GetMapping(value = \"/create\") // https://localhost:8080/etiquetasTipoDisenio/create\n\tpublic String create(Model model) {\n\t\tetiquetasTipoDisenio etiquetasTipoDisenio = new etiquetasTipoDisenio();\n\t\tmodel.addAttribute(\"title\", \"Registro de una nuev entrega\");\n\t\tmodel.addAttribute(\"etiquetasTipoDisenio\", etiquetasTipoDisenio); // similar al ViewBag\n\t\treturn \"etiquetasTipoDisenio/form\"; // la ubicacion de la vista\n\t}",
"public frmNewArtist() {\n initComponents();\n lblID.setText(Controller.Agent.ManageController.getNewArtistID());\n lblGreeting.setText(\"Dear \"+iMuzaMusic.getLoggedUser().getFirstName()+\", please use the form below to add an artist to your ranks.\");\n \n }",
"public Form(){ \n\t\tsuper(tag(Form.class)); \n\t}",
"public SalidaCajaForm() {\n\t\tinicializarComponentes();\n }",
"public frm_tutor_subida_prueba() {\n }",
"public abstract void addEditorForm();",
"public void onNew() {\t\t\n\t\tdesignWidget.addNewForm();\n\t}",
"public void createAd(/*Should be a form*/){\n Ad ad = new Ad();\n User owner = this.user;\n Vehicle vehicle = this.vehicle;\n String \n// //ADICIONAR\n ad.setOwner();\n ad.setVehicle();\n ad.setDescription();\n ad.setPics();\n ad.setMain_pic();\n }",
"@RequestMapping(method = RequestMethod.GET)\n \tpublic String createForm(Model model, ForgotLoginForm form) {\n \t\tmodel.addAttribute(\"form\", form);\n \t\treturn \"forgotlogin/index\";\n \t}",
"@RequestMapping(\"/book/new\")\n public String newBook(Model model){\n model.addAttribute(\"book\", new Book ());\n return \"bookform\";\n }",
"@Command\n\tpublic void nuevoAnalista(){\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\n\n\t\t//parametros.put(\"recordMode\", \"NEW\");\n\t\tllamarFormulario(\"formularioAnalistas.zul\", null);\n\t}",
"@RequestMapping(value = \"/newrecipe\", method = RequestMethod.GET)\n\tpublic String newRecipeForm(Model model) {\n\t\tmodel.addAttribute(\"recipe\", new Recipe()); //empty recipe object\n\t\tmodel.addAttribute(\"categories\", CatRepo.findAll());\n\t\treturn \"newrecipe\";\n\t}",
"@Override\n\tpublic void onFormCreate(AbstractForm arg0, DataMsgBus arg1) {\n\t}",
"@GetMapping(\"/producto/nuevo\")\n\tpublic String nuevoProductoForm(Model model) {\n\t\tmodel.addAttribute(\"producto\", new Producto());\n\t\treturn \"app/producto/form\";\n\t}",
"private void azzeraInsertForm() {\n\t\tviewInserimento.getCmbbxTipologia().setSelectedIndex(-1);\n\t\tviewInserimento.getTxtFieldDataI().setText(\"\");\n\t\tviewInserimento.getTxtFieldValore().setText(\"\");\n\t\tviewInserimento.getTxtFieldDataI().setBackground(Color.white);\n\t\tviewInserimento.getTxtFieldValore().setBackground(Color.white);\n\t}",
"@RequestMapping(\"/recipe/new\")\n public String newRecipe(Model model){\n model.addAttribute(\"recipe\", new RecipeCommand());\n \n return \"recipe/recipeForm\";\n }",
"@RequestMapping(value={\"/projects/add\"}, method= RequestMethod.GET)\r\n\tpublic String createProjectForm(Model model) {\r\n\t\tUser loggedUser= sessionData.getLoggedUser();\r\n\t\tmodel.addAttribute(\"loggedUser\", loggedUser);\r\n\t\tmodel.addAttribute(\"projectForm\", new Project());\r\n\t\treturn \"addProject\";\r\n\t}",
"public String nuevo() {\n\n\t\tLOG.info(\"Submitado formulario, accion nuevo\");\n\t\tString view = \"/alumno/form\";\n\n\t\t// las validaciones son correctas, por lo cual los datos del formulario estan en\n\t\t// el atributo alumno\n\n\t\t// TODO simular index de la bbdd\n\t\tint id = this.alumnos.size();\n\t\tthis.alumno.setId(id);\n\n\t\tLOG.debug(\"alumno: \" + this.alumno);\n\n\t\t// TODO comprobar edad y fecha\n\n\t\talumnos.add(alumno);\n\t\tview = VIEW_LISTADO;\n\t\tmockAlumno();\n\n\t\t// mensaje flash\n\t\tFacesContext facesContext = FacesContext.getCurrentInstance();\n\t\tExternalContext externalContext = facesContext.getExternalContext();\n\t\texternalContext.getFlash().put(\"alertTipo\", \"success\");\n\t\texternalContext.getFlash().put(\"alertMensaje\", \"Alumno \" + this.alumno.getNombre() + \" creado con exito\");\n\n\t\treturn view + \"?faces-redirect=true\";\n\t}",
"@RequestMapping(\"enviar\")\n\tpublic String abrirForm() {\n\t\treturn \"contato/form\";\n\t}",
"@RequestMapping(params = \"new\", method = RequestMethod.GET)\n\t@PreAuthorize(\"hasRole('ADMIN')\")\n\tpublic String createProductForm(Model model) { \t\n \t\n\t\t//Security information\n\t\tmodel.addAttribute(\"admin\",security.isAdmin()); \n\t\tmodel.addAttribute(\"loggedUser\", security.getLoggedInUser());\n\t\t\n\t model.addAttribute(\"product\", new Product());\n\t return \"products/newProduct\";\n\t}",
"@Override\n\tpublic void createForm(ERForm form) {\n\t\t\tString sql = \"insert into project1.reimbursementInfo (userName, fullName, thedate, eventstartdate, thelocation, description, thecost, gradingformat, passingpercentage, eventtype, filename,status,reason) values (?,?,?,?,?,?,?,?,?,?,?,?,?);\";\n\t\t\ttry {PreparedStatement stmt = conn.prepareCall(sql);\n\t\t\t//RID should auto increment, so this isnt necessary\n\t\t\t\n\t\t\tstmt.setString(1, form.getUserName());\n\t\t\tstmt.setString(2, form.getFullName());\n\t\t\tstmt.setDate(3, Date.valueOf(form.getTheDate()));\n\t\t\tstmt.setDate(4, Date.valueOf(form.getEventStartDate()));\n\t\t\tstmt.setString(5, form.getTheLocation());\n\t\t\tstmt.setString(6, form.getDescription());\n\t\t\tstmt.setDouble(7, form.getTheCost());\n\t\t\tstmt.setString(8, form.getGradingFormat());\n\t\t\tstmt.setString(9, form.getPassingPercentage());\n\t\t\tstmt.setString(10, form.getEventType());\n\t\t\tstmt.setString(11, form.getFileName());\n\t\t\tstmt.setString(12, \"pending\");\n\t\t\tstmt.setString(13, \"\");\n\t\t\tstmt.executeUpdate();\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Token(save = true, validate = false)\n @Execute\n public HtmlResponse createpage(final SuggestBadWordEditForm form) {\n form.initialize();\n form.crudMode = CrudMode.CREATE;\n return asHtml(path_AdminSuggestbadword_EditJsp);\n }",
"@GetMapping(\"/createRegistro\")\n\tpublic String crearValidacion(Model model) {\n\t\tList<Barrio> localidades = barrioService.obtenerBarrios();\n\t\tmodel.addAttribute(\"localidades\",localidades);\n\t\tmodel.addAttribute(\"persona\",persona);\n\t\tmodel.addAttribute(\"validacion\",validacion);\n\t\tmodel.addAttribute(\"registro\",registro);\n\t\tmodel.addAttribute(\"barrio\",barrio);\n\t\treturn \"RegistroForm\";\n\t}",
"public FormUtama() {\n initComponents();\n }",
"@Override\r\n protected void createDbContentCreateEdit() {\n DbContentCreateEdit dbContentCreateEdit = new DbContentCreateEdit();\r\n dbContentCreateEdit.init(null);\r\n form.getModelObject().setDbContentCreateEdit(dbContentCreateEdit);\r\n dbContentCreateEdit.setParent(form.getModelObject());\r\n ruServiceHelper.updateDbEntity(form.getModelObject()); \r\n }",
"@GetMapping(\"/create\")\n public ModelAndView create(@ModelAttribute(\"form\") final CardCreateForm form) {\n return getCreateForm(form);\n }",
"@RequestMapping(\"/save\")\n\tpublic String createProjectForm(Project project, Model model) {\n\t\t\n\tproRep.save(project);\n\tList<Project> getall = (List<Project>) proRep.getAll();\n\tmodel.addAttribute(\"projects\", getall);\n\t\n\treturn \"listproject\";\n\t\t\n\t}",
"public Form(){\n\t\ttypeOfLicenseApp = new TypeOfLicencsApplication();\n\t\toccupationalTrainingList = new ArrayList<OccupationalTraining>();\n\t\taffiadavit = new Affidavit();\n\t\tapplicationForReciprocity = new ApplicationForReciprocity();\n\t\teducationBackground = new EducationBackground();\n\t\toccupationalLicenses = new OccupationalLicenses();\n\t\tofficeUseOnlyInfo = new OfficeUseOnlyInfo();\n\t}",
"public SignUpForm(Context ctx) {\n super(ctx);\n init();\n }",
"public TorneoForm() {\n initComponents();\n }",
"public String actionCreateNew() {\r\n \t\tsetBook(new Book());\r\n \t\treturn \"new\";\r\n \t}",
"public frmAfiliado() {\n initComponents();\n \n }",
"public Form getCreationForm() throws ProcessManagerException {\r\n try {\r\n Action creation = processModel.getCreateAction();\r\n return processModel.getPublicationForm(creation.getName(), currentRole,\r\n getLanguage());\r\n } catch (WorkflowException e) {\r\n throw new ProcessManagerException(\"SessionController\",\r\n \"processManager.ERR_NO_CREATION_FORM\", e);\r\n }\r\n }",
"@RequestMapping(\"/new\")\n\tpublic String displayProjectForm(Model model) {\n\t\tProject aproject = new Project();\n\t//Iterable<Employee> employees = \tpro.getall();\n\t\n\t\tmodel.addAttribute(\"project\", aproject);\n\n\t\t//model.addAttribute(\"allEmployees\", employees);\n\t\t\n\t\t\n\t\treturn \"newproject\";\n\t\t\n\t}",
"public void clickCreate() {\n\t\tbtnCreate.click();\n\t}",
"public Form_soal() {\n initComponents();\n tampil_soal();\n }",
"public String formCreated()\r\n {\r\n return formError(\"201 Created\",\"Object was created\");\r\n }",
"public FormularioPregunta() {\n initComponents();\n \n setLocationRelativeTo(this);\n }",
"public abstract void addSelectorForm();",
"@GetMapping(\"/students/new\")\r\n\tpublic String createStudentForm(Model model) {\n\t\tStudent student =new Student();\r\n\t\tmodel.addAttribute(\"student\",student);\r\n\t\treturn \"create_student\";\r\n\t}",
"public FormFuncionario(FormMenu telaPai) {\n initComponents();\n this.telaPai = telaPai;\n\n txtNome.setText(\"Nome\");\n lblNome.setVisible(false);\n txtSobrenome.setText(\"Sobrenome\");\n lblSobrenome.setVisible(false);\n campoMensagem.setVisible(false);\n lblMensagem.setVisible(false);\n\n }",
"public creacionempresa() {\n initComponents();\n mostrardatos();\n }",
"@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}",
"public FormCadastroAutomovel() {\n initComponents();\n }",
"public MechanicForm() {\n initComponents();\n }",
"@GetMapping(\"/add\")\n public String showSocioForm(Model model, Persona persona) {\n List<Cargo> cargos = cargoService.getCargos();\n model.addAttribute(\"cargos\", cargos);\n return \"/backoffice/socioForm\";\n }",
"public Formulario() {\n initComponents();\n }",
"@GetMapping(\"/add\")\n\tpublic String showFormForAdd(Model model) {\n\t\tMemo memo = new Memo();\n\t\t\n\t\t// load categories for select options\n\t\tMap<String, String> mapCategories = generateMapCategories();\n\t\t\n\t\t// add to the model\n\t\tmodel.addAttribute(\"memo\", memo);\n\t\tmodel.addAttribute(\"categories\", mapCategories);\n\t\t\n\t\treturn \"add\";\n\t}",
"public static Result startNewForm() {\r\n\t\tString formName = ChangeOrderForm.NAME;\r\n\t\tDecision firstDecision = CMSGuidedFormFill.startNewForm(formName,\r\n\t\t\t\tCMSSession.getEmployeeName(), CMSSession.getEmployeeId());\r\n\t\treturn ok(backdrop.render(firstDecision));\r\n\t}",
"public Ventaform() {\n initComponents();\n }",
"private void initFormulario() {\n btnCadastro = findViewById(R.id.btnCadastro);\n editNome = findViewById(R.id.editNome);\n editEmail = findViewById(R.id.editEmail);\n editSenhaA = findViewById(R.id.editSenha);\n editSenhaB = findViewById(R.id.editSenhaB);\n chTermo = findViewById(R.id.chTermos);\n isFormOk = false;\n }",
"public static AssessmentCreationForm openFillCreationForm(Assessment assm) {\n openCreationSearchForm(Roles.STAFF, WingsTopMenu.WingsStaffMenuItem.P_ASSESSMENTS, Popup.Create);\n\n Logger.getInstance().info(\"Fill out the required fields with valid data\");\n AssessmentCreationForm creationForm = new AssessmentCreationForm();\n creationForm.fillAssessmentInformation(new User(Roles.STAFF), assm);\n\n return new AssessmentCreationForm();\n }",
"@GetMapping(\"/students/new\")\n\tpublic String createStudentForm(Model model) throws ParseException\n\t{\n\t\t\n\t\tStudent student=new Student(); //To hold form Data.\n\t\t\n\t\tmodel.addAttribute(\"student\",student);\n\t\t\n\t\t// go to create_student.html page\n\t\treturn \"create_student\";\n\t}",
"public void crearProgramaFormacion(String nombre, String descripcion, Date fechaI, Date fechaF, Date fechaA, String url) throws ProgramaFormacionExcepcion;",
"@PostMapping( value = \"/new\", params = \"auto\" )\n public String createEventFormAutoPopulate( @ModelAttribute CreateEventForm createEventForm )\n {\n // provide default values to make user submission easier\n createEventForm.setSummary( \"A new event....\" );\n createEventForm.setDescription( \"This was autopopulated to save time creating a valid event.\" );\n createEventForm.setWhen( new Date() );\n\n // make the attendee not the current user\n CalendarUser currentUser = userContext.getCurrentUser();\n int attendeeId = currentUser.getId() == 0 ? 1 : 0;\n CalendarUser attendee = calendarService.getUser( attendeeId );\n createEventForm.setAttendeeEmail( attendee.getEmail() );\n\n return \"events/create\";\n }",
"public BtxDetailsKcFormDefinition() {\n super();\n }",
"public createNew(){\n\t\tsuper(\"Create\"); // title for the frame\n\t\t//layout as null\n\t\tgetContentPane().setLayout(null);\n\t\t//get the background image\n\t\ttry {\n\t\t\tbackground =\n\t\t\t\t\tnew ImageIcon (ImageIO.read(getClass().getResource(\"Wallpaper.jpg\")));\n\t\t}//Catch for file error\n\t\tcatch (IOException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tJOptionPane.showMessageDialog(null, \n\t\t\t\t\t\"ERROR: File(s) Not Found\\n Please Check Your File Format\\n\"\n\t\t\t\t\t\t\t+ \"and The File Name!\");\n\t\t}\n\t\t//Initialize all of the compenents \n\t\tlblBackground = new JLabel (background);\n\t\tlblTitle = new JLabel (\"Create Menu\");\n\t\tlblTitle.setFont(new Font(\"ARIAL\",Font.ITALIC, 30));\n\t\tlblName = new JLabel(\"Please Enter Your First Name.\");\n\t\tlblLastName= new JLabel (\"Please Enter Your Last Name.\");\n\t\tlblPhoneNumber = new JLabel (\"Please Enter Your Phone Number.\");\n\t\tlblAddress = new JLabel (\"Please Enter Your Address.\");\n\t\tlblMiddle = new JLabel (\"Please Enter Your Middle Name (Optional).\");\n\t\tbtnCreate = new JButton (\"Create\");\n\t\tbtnBack = new JButton (\"Back\");\n\t\t//set the font\n\t\tlblName.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\t\tlblLastName.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\t\tlblPhoneNumber.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\t\tlblAddress.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\t\tlblMiddle.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\n\t\t//add action listener\n\t\tbtnCreate.addActionListener(this);\n\t\tbtnBack.addActionListener(this);\n\t\t//set bounds for all the components\n\t\tbtnCreate.setBounds(393, 594, 220, 36);\n\t\ttxtMiddle.setBounds(333, 249, 342, 36);\n\t\ttxtName.setBounds(333, 158, 342, 36);\n\t\ttxtLastName.setBounds(333, 339, 342, 36);\n\t\ttxtPhoneNumber.setBounds(333, 429, 342, 36);\n\t\ttxtAddress.setBounds(333, 511, 342, 36);\n\t\tbtnBack.setBounds(6,716,64,36);\n\t\tlblTitle.setBounds(417, 0, 182, 50);\n\t\tlblMiddle.setBounds(333, 201, 342, 36);\n\t\tlblName.setBounds(387, 110, 239, 36);\n\t\tlblLastName.setBounds(387, 297, 239, 36);\n\t\tlblPhoneNumber.setBounds(369, 387, 269, 36);\n\t\tlblAddress.setBounds(393, 477, 215, 30);\n\t\tbtnBack.setBounds(6,716,64,36);\n\t\tlblTitle.setBounds(417, 0, 182, 50);\n\t\tlblBackground.setBounds(0, 0, 1000, 1000);\n\t\t//add components to frame\n\t\tgetContentPane().add(btnCreate);\n\t\tgetContentPane().add(txtMiddle);\n\t\tgetContentPane().add(txtLastName);\n\t\tgetContentPane().add(txtAddress);\n\t\tgetContentPane().add(txtPhoneNumber);\n\t\tgetContentPane().add(txtName);\n\t\tgetContentPane().add(lblMiddle);\n\t\tgetContentPane().add(lblLastName);\n\t\tgetContentPane().add(lblAddress);\n\t\tgetContentPane().add(lblPhoneNumber);\n\t\tgetContentPane().add(lblName);\n\t\tgetContentPane().add(btnBack);\n\t\tgetContentPane().add(lblTitle);\n\t\tgetContentPane().add(lblBackground);\n\t\t//set size, visible and action for close\n\t\tsetSize(1000,1000);\n\t\tsetVisible(true);\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\n\n\t}",
"@GetMapping(\"/cliente/new\")\n\tpublic String newCliente(Model model) {\n\t\tmodel.addAttribute(\"cliente\", new Cliente());\n\t\tControllerHelper.setEditMode(model, false);\n\t\t\n\t\t\n\t\treturn \"cadastro-cliente\";\n\t\t\n\t}",
"public void limpiarCamposFormBusqueda() {\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n BotonCancelar = new javax.swing.JButton();\n BotonAceptar = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n CampoNombre = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Crear Tema\");\n setIconImage(null);\n setModal(true);\n setResizable(false);\n\n BotonCancelar.setText(\"Cancelar\");\n BotonCancelar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n BotonCancelarActionPerformed(evt);\n }\n });\n\n BotonAceptar.setText(\"Aceptar\");\n BotonAceptar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n BotonAceptarActionPerformed(evt);\n }\n });\n\n jLabel1.setText(\"Introduce el nombre del tema:\");\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 .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(BotonCancelar)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 21, Short.MAX_VALUE)\n .addComponent(BotonAceptar))\n .addComponent(CampoNombre, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 167, Short.MAX_VALUE))\n .addGap(32, 32, 32))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(CampoNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 53, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(BotonAceptar)\n .addComponent(BotonCancelar))\n .addGap(24, 24, 24))\n );\n\n pack();\n }",
"protected RespostaFormularioPreenchido() {\n // for ORM\n }",
"public FormularioCliente() {\n initComponents();\n }",
"public Gui_lectura_consumo() {\n initComponents();\n centrarform();\n consumo_capturado.setEditable(false);\n limpiarCajas();\n \n \n }",
"public void createAgendamento() {\n\n if (tbagendamento.getTmdataagendamento().after(TimeControl.getDateIni())) {\n if (agendamentoLogic.createTbagendamento(tbagendamento)) {\n AbstractFacesContextUtils.redirectPage(PagesUrl.URL_AGENDAMENTO_LIST);\n AbstractFacesContextUtils.addMessageInfo(\"Agendamento cadastrado com sucesso.\");\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"Falhar ao realizado cadastro do agendamento.\");\n }\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"verifique se a data de agendamento esta correta.\");\n }\n }",
"@Override\n\tpublic void create(CreateCoinForm form) throws Exception {\n\t}",
"@RequestMapping(value = { \"/new\"}, method = RequestMethod.GET)\n\tpublic String newEntity(ModelMap model) {\n\t\tENTITY entity = createEntity();\n\n\t\tmodel.addAttribute(\"entity\", entity);\n\t\tmodel.addAttribute(\"edit\", false);\n\t\tmodel.addAttribute(\"loggedinuser\", getPrincipal());\n\t\treturn viewBaseLocation + \"/form\";\n\t}",
"public static FormV1 createEntity() {\n FormV1 formV1 = new FormV1()\n .customerId(DEFAULT_CUSTOMER_ID)\n .formType(DEFAULT_FORM_TYPE);\n return formV1;\n }",
"public FormPermisos() {\n initComponents();\n setLocationRelativeTo(null);\n setTitle(\"INTERFACE-PERMISOS\");\n }",
"@RequestMapping(\"showForm\")\n\tpublic String showForm( Model theModel) {\n\t\t\n\t\t//create a student\n\t\tStudent theStudent = new Student();\n\t\t\n\t\t//add student to the model\n\t\ttheModel.addAttribute(\"student\", theStudent);\n\t\t\n\t\treturn \"student-form\";\n\t}",
"protected void nuevo(){\n wp = new frmEspacioTrabajo();\n System.runFinalization();\n inicializar();\n }",
"public frmAddIncidencias() {\n initComponents();\n }",
"public formPrincipal() {\n initComponents();\n }",
"public frmPrincipal() {\n initComponents(); \n inicializar();\n \n }",
"public CadastroProdutoNew() {\n initComponents();\n }",
"@GetMapping(\"/showFormForAdd\")\n public String showFormForAdd(Model theModel) {\n Categories theCategories = new Categories();\n theModel.addAttribute(\"categories\", theCategories);\n //theModel.addAttribute(\"update\", false);\n return \"loaisanpham-form\"; }",
"public String newBoleta() {\n\t\tresetForm();\n\t\treturn \"/boleta/insert.xhtml\";\n\t}",
"public FormCompra() {\n initComponents();\n }",
"Documento createDocumento();",
"Compuesta createCompuesta();",
"public JFrmPagoCuotaAnulacion() {\n setTitle(\"JFrmPagoCuotaAnulacion\");\n initComponents();\n }",
"private void fillCreateOrEditForm(String name, String branch) {\n waitForElementVisibility(xpathFormHeading);\n String actual = assertAndGetAttributeValue(xpathFormHeading, \"innerText\");\n assertEquals(actual, FORM_HEADING,\n \"Actual heading '\" + actual + \"' should be same as expected heading '\" + FORM_HEADING\n + \"'.\");\n logger.info(\"# User is on '\" + actual + \"' form\");\n assertAndType(xpathNameTF, name);\n logger.info(\"# Entered staff name: \" + name);\n selectByVisibleText(xpathSelectBranch, branch);\n logger.info(\"# Select branch name: \" + branch);\n }",
"@RequestMapping(method = RequestMethod.POST, value = {\"\",\"/\"})\r\n\tpublic ResponseEntity<FormularioDTO> add(@RequestBody @Valid Formulario formulario) throws AuthenticationException {\r\n\t\tformulario.setInstituicao(new Instituicao(authService.getDados().getInstituicaoId()));\r\n\t\treturn new ResponseEntity<>(formularioService.create(formulario), HttpStatus.CREATED);\r\n\t}",
"public ServerskaForma() {\n initComponents();\n \n \n \n }",
"@GetMapping(\"/form\")\n public String form(@RequestParam(name = \"id\", required = false, defaultValue = \"0\") int id, Model model) {\n Categoria categoria = new Categoria();\n if (id != 0) {\n categoria = categoriaService.findById(id);\n }\n model.addAttribute(\"categoria\", categoria);\n return FORM_VIEW;\n }",
"@GetMapping(\"/restaurante/new\")\n\tpublic String newRestaurante(Model model) {\n\t\tmodel.addAttribute(\"restaurante\", new Restaurante());\n\t\tControllerHelper.setEditMode(model, false);\n\t\tControllerHelper.addCategoriasToRequest(categoriaRestauranteRepository, model);\n\t\t\n\t\treturn \"restaurante-cadastro\";\n\t\t\n\t}",
"public FrmInsertar() {\n initComponents();\n }",
"@Override\n\tpublic Pane generateForm() {\n\t\treturn painelPrincipal;\n\t}",
"@GetMapping(\"/addPharmacist\")\n public String pharmacistForm(Model model) {\n model.addAttribute(\"pharmacist\", new Pharmacist());\n return \"addPharmacist\";\n }",
"@GetMapping(\"/new\")\n public ModelAndView addAttributesForm() {\n return new ModelAndView(\"/sessions/session-create.html\");\n }",
"public FormImportar() {\n initComponents();\n }",
"@Override\n\tprotected Fragment createFragment() {\n\t\treturn new FormFragment();\n\t}",
"@GetMapping(\"/admin/addCompany\")\n public String addCompanyForm(Model model){\n model.addAttribute(\"company\", new Company());\n model.addAttribute(\"Countries\", adminRepository.getCountries());\n return \"addCompany\";\n }",
"private void createInputBloodDonationForm( HttpServletRequest req, HttpServletResponse resp )\n throws ServletException, IOException {\n String path = req.getServletPath();\n req.setAttribute( \"path\", path );\n req.setAttribute( \"title\", path.substring( 1 ) );\n \n BloodDonationLogic logic = LogicFactory.getFor(\"BloodDonation\");\n req.setAttribute( \"bloodDonationColumnNames\", logic.getColumnNames().subList(1, logic.getColumnNames().size()));\n req.setAttribute( \"bloodDonationColumnCodes\", logic.getColumnCodes().subList(1, logic.getColumnCodes().size()));\n req.setAttribute(\"bloodGroupList\", Arrays.asList(BloodGroup.values()));\n req.setAttribute(\"rhdList\", Arrays.asList(RhesusFactor.values()));\n BloodBankLogic bloodBankLogic = LogicFactory.getFor(\"BloodBank\");\n List<String> bloodBankIDs = new ArrayList<>();\n bloodBankIDs.add(\"\");\n for (BloodBank bb : bloodBankLogic.getAll()) {\n bloodBankIDs.add(bb.getId().toString());\n }\n req.setAttribute( \"bloodBankIDs\", bloodBankIDs);\n req.setAttribute( \"request\", toStringMap( req.getParameterMap() ) );\n \n if (errorMessage != null && !errorMessage.isEmpty()) {\n req.setAttribute(\"errorMessage\", errorMessage);\n }\n //clear the error message if when reload the page\n errorMessage = \"\";\n \n req.getRequestDispatcher( \"/jsp/CreateRecord-BloodDonation.jsp\" ).forward( req, resp );\n }",
"@GetMapping(\"/directorForm\")\n public String addDirectors(Model model) {\n\n model.addAttribute(\"newDirector\", new Director());\n return \"directorForm\";\n }",
"private void fillCreateOrEditForm(String name, int branchId) {\n waitForElementVisibility(xpathFormHeading);\n String actual = assertAndGetAttributeValue(xpathFormHeading, \"innerText\");\n assertEquals(actual, FORM_HEADING,\n \"Actual heading '\" + actual + \"' should be same as expected heading '\" + FORM_HEADING\n + \"'.\");\n logger.info(\"# User is on '\" + actual + \"' form\");\n assertAndType(xpathNameTF, name);\n logger.info(\"# Entered staff name: \" + name);\n selectByValue(xpathSelectBranch, \"number:\" + branchId);\n logger.info(\"# Select branch id: \" + branchId);\n }",
"public ProfilsFIForm() {\r\n\t\tsuper();\r\n\t}"
] | [
"0.74101937",
"0.6990298",
"0.66776824",
"0.6394003",
"0.6370148",
"0.6268859",
"0.6268257",
"0.6239992",
"0.6178434",
"0.61091983",
"0.60988975",
"0.605212",
"0.6046528",
"0.60374725",
"0.6033329",
"0.60257655",
"0.6015373",
"0.6013131",
"0.60094297",
"0.60089177",
"0.6004111",
"0.5981544",
"0.5964114",
"0.5951341",
"0.5946711",
"0.59153813",
"0.58953863",
"0.58833194",
"0.58768874",
"0.58659774",
"0.5849674",
"0.5849391",
"0.5835481",
"0.5835426",
"0.58279413",
"0.58004063",
"0.57995516",
"0.5780112",
"0.57786596",
"0.5775752",
"0.5774949",
"0.5764632",
"0.5763507",
"0.574935",
"0.5749228",
"0.57356155",
"0.57304084",
"0.57302254",
"0.57246935",
"0.5716959",
"0.5715399",
"0.57069755",
"0.5705925",
"0.5702435",
"0.56983805",
"0.5695863",
"0.5679269",
"0.56677264",
"0.56423116",
"0.5641114",
"0.56317955",
"0.5628087",
"0.56212497",
"0.5620409",
"0.56169623",
"0.5609497",
"0.560228",
"0.5596877",
"0.5582604",
"0.55817014",
"0.55792177",
"0.55779654",
"0.55748236",
"0.55744684",
"0.5558544",
"0.55523735",
"0.55503994",
"0.5549695",
"0.5542459",
"0.5535824",
"0.5532722",
"0.5530461",
"0.553001",
"0.5524829",
"0.55241704",
"0.5523575",
"0.55207354",
"0.55182475",
"0.55119705",
"0.5510124",
"0.5509916",
"0.5500039",
"0.54944843",
"0.5492419",
"0.5487906",
"0.5475104",
"0.5471386",
"0.5471185",
"0.54693246",
"0.5458215"
] | 0.5473728 | 96 |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
jPanel2 = new javax.swing.JPanel();
jLabel2 = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jLabel1 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
jLabel9 = new javax.swing.JLabel();
jLabel10 = new javax.swing.JLabel();
jLabel11 = new javax.swing.JLabel();
jLabel12 = new javax.swing.JLabel();
setClosable(true);
setIconifiable(true);
setTitle("Sobre");
setPreferredSize(new java.awt.Dimension(730, 488));
jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
jLabel2.setText("Anbal S. B. S. Costa, Carolina Barros, Jociane M. Rocha, Jonathan Campos, Marcielli Oliveira, Michael Natã, Raquel Gomes");
jLabel5.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel5.setText("INTEGRANTES DO GRUPO:");
jLabel3.setText("Etec Prof. Marcos Uchôas dos Santos Penchel");
jLabel1.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel1.setText("SISTEMA: ");
jLabel4.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel4.setText("INSTITUIÇÃO:");
jLabel6.setText("SearchFor TCC's");
jLabel7.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel7.setText("PROFESSOR ORIENTADOR:");
jLabel8.setText("Emerson Salomão");
jLabel9.setText("Cadastro de Cronogramas e Trabalhos de Graduação de todos os cursos, anos e períodos.");
jLabel10.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel10.setText("SOBRE:");
jLabel11.setText("Search = Procurar, For = por/para, TCC's = Trabalhos de Graduação/Cronogramas");
jLabel12.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel12.setText("SIGNIFICADO:");
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel1)
.addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 533, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel5)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 624, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel4)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 580, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel7)
.addComponent(jLabel8)
.addComponent(jLabel9)
.addComponent(jLabel10)
.addComponent(jLabel11)
.addComponent(jLabel12))
.addContainerGap(20, Short.MAX_VALUE))
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel6)
.addGap(18, 18, 18)
.addComponent(jLabel12)
.addGap(4, 4, 4)
.addComponent(jLabel11)
.addGap(18, 18, 18)
.addComponent(jLabel10)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel9)
.addGap(18, 18, 18)
.addComponent(jLabel5)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel2)
.addGap(18, 18, 18)
.addComponent(jLabel7)
.addGap(3, 3, 3)
.addComponent(jLabel8)
.addGap(18, 18, 18)
.addComponent(jLabel4)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel3)
.addContainerGap(29, Short.MAX_VALUE))
);
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(56, 56, 56)
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(79, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addContainerGap(59, Short.MAX_VALUE)
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(66, 66, 66))
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
setBounds(90, 90, 799, 488);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Form() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public frmRectangulo() {\n initComponents();\n }",
"public form() {\n initComponents();\n }",
"public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }",
"public FormListRemarking() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n \n }",
"public FormPemilihan() {\n initComponents();\n }",
"public GUIForm() { \n initComponents();\n }",
"public FrameForm() {\n initComponents();\n }",
"public TorneoForm() {\n initComponents();\n }",
"public FormCompra() {\n initComponents();\n }",
"public muveletek() {\n initComponents();\n }",
"public Interfax_D() {\n initComponents();\n }",
"public quanlixe_form() {\n initComponents();\n }",
"public SettingsForm() {\n initComponents();\n }",
"public Soru1() {\n initComponents();\n }",
"public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }",
"public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }",
"public soal2GUI() {\n initComponents();\n }",
"public EindopdrachtGUI() {\n initComponents();\n }",
"public MechanicForm() {\n initComponents();\n }",
"public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }",
"public quotaGUI() {\n initComponents();\n }",
"public BloodDonationGUI() {\n initComponents();\n }",
"public PatientUI() {\n initComponents();\n }",
"public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }",
"public Oddeven() {\n initComponents();\n }",
"public myForm() {\n\t\t\tinitComponents();\n\t\t}",
"public Magasin() {\n initComponents();\n }",
"public intrebarea() {\n initComponents();\n }",
"public RadioUI()\n {\n initComponents();\n }",
"public NewCustomerGUI() {\n initComponents();\n }",
"public ZobrazUdalost() {\n initComponents();\n }",
"public FormUtama() {\n initComponents();\n }",
"public p0() {\n initComponents();\n }",
"public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }",
"public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }",
"public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }",
"public form2() {\n initComponents();\n }",
"public kunde() {\n initComponents();\n }",
"public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}",
"public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }",
"public MusteriEkle() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\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, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }",
"public frmMain() {\n initComponents();\n }",
"public frmMain() {\n initComponents();\n }",
"public DESHBORDPANAL() {\n initComponents();\n }",
"public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }",
"public frmVenda() {\n initComponents();\n }",
"public Botonera() {\n initComponents();\n }",
"public FrmMenu() {\n initComponents();\n }",
"public OffertoryGUI() {\n initComponents();\n setTypes();\n }",
"public JFFornecedores() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\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 .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }",
"public EnterDetailsGUI() {\n initComponents();\n }",
"public vpemesanan1() {\n initComponents();\n }",
"public Kost() {\n initComponents();\n }",
"public UploadForm() {\n initComponents();\n }",
"public frmacceso() {\n initComponents();\n }",
"public FormHorarioSSE() {\n initComponents();\n }",
"public HW3() {\n initComponents();\n }",
"public Managing_Staff_Main_Form() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }",
"public sinavlar2() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\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, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"public P0405() {\n initComponents();\n }",
"public MiFrame2() {\n initComponents();\n }",
"public IssueBookForm() {\n initComponents();\n }",
"public Choose1() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }",
"public GUI_StudentInfo() {\n initComponents();\n }",
"public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }",
"public JFrmPrincipal() {\n initComponents();\n }",
"public bt526() {\n initComponents();\n }",
"public Pemilihan_Dokter() {\n initComponents();\n }",
"public Ablak() {\n initComponents();\n }",
"@Override\n\tprotected void initUi() {\n\t\t\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}",
"public Pregunta23() {\n initComponents();\n }",
"public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }",
"public AvtekOkno() {\n initComponents();\n }",
"public busdet() {\n initComponents();\n }",
"public ViewPrescriptionForm() {\n initComponents();\n }",
"public Ventaform() {\n initComponents();\n }",
"public Kuis2() {\n initComponents();\n }",
"public POS1() {\n initComponents();\n }",
"public CreateAccount_GUI() {\n initComponents();\n }",
"public Carrera() {\n initComponents();\n }",
"public EqGUI() {\n initComponents();\n }",
"public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\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, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }",
"public nokno() {\n initComponents();\n }",
"public dokter() {\n initComponents();\n }",
"public ConverterGUI() {\n initComponents();\n }",
"public hitungan() {\n initComponents();\n }",
"public Modify() {\n initComponents();\n }",
"public frmAddIncidencias() {\n initComponents();\n }",
"public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }"
] | [
"0.73195183",
"0.7290407",
"0.7290407",
"0.7290407",
"0.72855854",
"0.7248445",
"0.7213232",
"0.72084314",
"0.7195551",
"0.71902007",
"0.71835697",
"0.7158979",
"0.71473545",
"0.70928645",
"0.70807934",
"0.70575565",
"0.6987147",
"0.6976941",
"0.69544566",
"0.69541115",
"0.6943778",
"0.6942792",
"0.6935224",
"0.6931817",
"0.6928287",
"0.69246083",
"0.6924253",
"0.69117594",
"0.6910518",
"0.68936557",
"0.68927425",
"0.6891522",
"0.68911785",
"0.6889459",
"0.68826854",
"0.68823767",
"0.6880858",
"0.6878632",
"0.68753785",
"0.68741786",
"0.68710285",
"0.68593234",
"0.6856001",
"0.6855885",
"0.685485",
"0.68537056",
"0.68532616",
"0.68519884",
"0.68519884",
"0.6843908",
"0.6836617",
"0.68361354",
"0.68289286",
"0.68281245",
"0.6826939",
"0.682426",
"0.68220174",
"0.68170464",
"0.6816829",
"0.68109316",
"0.6808785",
"0.6808737",
"0.6808307",
"0.6807784",
"0.6801649",
"0.67936075",
"0.67933095",
"0.67924714",
"0.67911524",
"0.67894745",
"0.67889065",
"0.6787865",
"0.6781763",
"0.6766413",
"0.67660075",
"0.6765137",
"0.6756547",
"0.6756297",
"0.67528564",
"0.6752207",
"0.67416096",
"0.67398196",
"0.6737052",
"0.6736384",
"0.6734045",
"0.67276424",
"0.6726131",
"0.6721189",
"0.6715488",
"0.671506",
"0.67148006",
"0.6708023",
"0.67061347",
"0.67027885",
"0.6701509",
"0.670121",
"0.6699335",
"0.66989076",
"0.6694664",
"0.6690946",
"0.6688705"
] | 0.0 | -1 |
Sets the IconID of the player | public void setIconId(int iconId) {
this.iconId = iconId;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void changeIcon(Icon icon) {\r\n this.iconId = icon.getId();\r\n }",
"@Override\n\tpublic void setIcon(int resId) {\n\t\t\n\t}",
"@Override\n\tpublic void setIconId(long iconId) {\n\t\t_scienceApp.setIconId(iconId);\n\t}",
"public void setIcon(Image i) {icon = i;}",
"public void setIcon(FSIcon icon) {\n this.icon = icon;\n }",
"public void setAvatar(int avatar) {\n\t\tthis.avatar = new ImageIcon(FileIO.readImageFile(this,\"/images/Player\" + avatar + \".png\"));\n\t\tthis.setIcon(this.avatar);\n\t}",
"public void setIcon(URL icon)\r\n {\r\n\tthis.icon = icon;\r\n }",
"public void setIconImageID(ImageID iconImageID)\n {\n this.iconImageID = iconImageID;\n\n if (!fullScreen && !settingsPanel)\n setIconImage(ImageUtils.scaleImageWithinBounds(\n ImageLoader.getImage(iconImageID), 12, 12));\n else\n setIconImage(ImageLoader.getImage(iconImageID));\n }",
"private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"iconeframe.png\")));\n }",
"private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"iconeframe.png\")));\n }",
"public void setWeatherIcon(String iconID) {\n final ImageView weatherImageView = findViewById(R.id.weatherIconImgV);\n int icon = getDrawableByIcon(iconID);\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n weatherImageView.setImageDrawable(getResources().getDrawable(icon, getApplicationContext().getTheme()));\n } else {\n weatherImageView.setImageDrawable(getResources().getDrawable(icon));\n }\n }",
"public void setIcon(Integer icon) {\n switch (icon) {\n case 0:\n this.icon = Icon.Schutzengel;\n break;\n case 1:\n this.icon = Icon.Person;\n break;\n case 2:\n this.icon = Icon.Institution;\n break;\n case 3:\n this.icon = Icon.Krankenhaus;\n break;\n case 4:\n this.icon = Icon.Polizei;\n break;\n default:\n this.icon = Icon.Feuerwehr;\n break;\n }\n }",
"public void setIcon(Bitmap icon) {\n\t\tmIcon = icon;\n\t}",
"public void setIconIndex(int value) {\n this.iconIndex = value;\n }",
"public void setIcon(int resId) {\n mIconId = resId;\n if (mIconView != null) {\n if (resId > 0) {\n mIconView.setImageResource(mIconId);\n } else if (resId == 0) {\n mIconView.setVisibility(View.GONE);\n }\n }\n }",
"public void setIcon(String icon) {\n this.icon = icon;\n }",
"public void setIcon(String icon) {\n this.icon = icon;\n }",
"public void setIcon(Icon icon) {\n\t\t_coolBar.setIcon(icon);\n\t}",
"public void setIcon(final String icon) {\n\t\tthis.icon = icon;\n\t}",
"public static void setVolatileUrlDrawable(ImageView icon,\n\t\t\tAccountClient starvingTheFoxPlayer) {\n\t\t\n\t}",
"@Override\n\tpublic void setIcon(Drawable icon) {\n\t\t\n\t}",
"public void setIcon(Button buttonPlayed){\n if(game.getPlayerTurn() == player1){\n buttonPlayed.setBackgroundResource(drawable.o);\n buttonPlayed.setEnabled(false);\n }\n else{\n buttonPlayed.setBackgroundResource(drawable.cross);\n buttonPlayed.setEnabled(false);\n }\n }",
"private void setImageButtonImage(int typeIconId) {\n ImageButton btn = (ImageButton) findViewById(R.id.btn_typeIcon);\n\n TypeIcon typeIcon = MainActivity.getTypeIconById(typeIconId);\n\n // Gets the id of the actual image to display, using the name of the TypeIcon\n String name = typeIcon.getDrawablePath();\n final int id = getResources().getIdentifier(name, \"drawable\", getPackageName());\n btn.setImageResource(id);\n\n iconId = typeIconId;\n }",
"public int getIconId(){\n return mIconId;\n }",
"public void setIconLiftRes(int resId) {\n\t\tif (View.VISIBLE == icon_lift.getVisibility()) {\n\t\t\ticon_lift.setImageResource(resId);\n\t\t}\n\t}",
"private void setIcon() {\n this.setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"logo.ico\")));\n }",
"public void setID(final PlayerID ID)\r\n\t{\r\n\t\tthis.ID = ID;\r\n\t}",
"private void setIcon() {\n \n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"iconabc.png\")));\n }",
"private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"icon.png\")));\n }",
"public boolean setIcons(String token, int iconID) throws RemoteException {\n return mainScreenProvider.setIcons(token, iconID);\n }",
"private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"podologia32x32.png\")));\n }",
"private void setIcon(){\n this.setIconImage(new ImageIcon(getClass().getResource(\"/Resources/Icons/Icon.png\")).getImage());\n }",
"public void setStateIcon(Integer stateIcon) {\n this.stateIcon = stateIcon;\n }",
"public void setIcone(String icone) {\n this.icone = icone;\n }",
"private void changePlayPauseIcon(int which) {\n switch (which) {\n case 1://play\n mBinding.imageViewPlay.setImageResource(R.drawable.play_circle_icon);\n break;\n case 2://pause\n mBinding.imageViewPlay.setImageResource(R.drawable.pause_circle_icon);\n break;\n }\n }",
"private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"img/icon.png\")));\n }",
"public void setIconHandler(String iconHandler)\n {\n this.iconHandler = iconHandler;\n }",
"void setIcon(Dialog dialog);",
"public void setMainIcon(IconReference ref);",
"private void SetIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"Icon.png.png\")));\n }",
"public void setIcon(@DrawableRes final int icon) {\n post(() -> {\n Drawable drawable = ResourcesCompat.getDrawable(getResources(),icon,null);\n int padding = (getWidth() / 2) - (drawable.getIntrinsicWidth() / 2);\n setCompoundDrawablesWithIntrinsicBounds(icon, 0, 0, 0);\n setPadding(padding, 0, 0, 0);\n });\n }",
"private void setICon() {\r\n \r\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"IconImage_1.png\")));\r\n }",
"public void setIcon(char c) {\r\n\ticon = c;\r\n\t}",
"private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"../Imagens/icon.png\")));\n }",
"public void setCurrentPlayerIs(int currentPlayerInt){\n\t\tcurrentPlayerIs = currentPlayerInt;\n\t\trepaint();\n\t}",
"public void updateIcon(boolean isPlaying) {\n\t\tplay_button.setImageResource(isPlaying ? R.drawable.ic_pause\n\t\t\t\t: R.drawable.ic_play);\n\t}",
"private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"radarlogoIcon.png\")));\n }",
"public void resetMarker() {\n if(marker != null)\n marker.setIcon(BitmapDescriptorFactory.fromResource(GameSettings.getPlayerMarkerImage()));\n }",
"public void setCustomMarker(int resourceId) {\n if(marker != null)\n marker.setIcon(BitmapDescriptorFactory.fromResource(resourceId));\n }",
"public void changeIcon() {\n\t\t\tint choice = rand.nextInt(list.length);\n\t\t\tString iconName = list[choice].getName();\n\t\t\ticon = new ImageIcon(helpIconBase + File.separator + iconName);\n\t\t\tDimension dim = new Dimension(icon.getIconWidth() * 2, HEIGHT);\n\t\t\tsetPreferredSize(dim);\n\t\t\tsetMinimumSize(dim);\n\t\t}",
"public void setImage(String userId){\n\t\tImageIcon icon = new ImageIcon(\"image/\" + userId + \".png\");\n\t\ticon.setImage(icon.getImage().getScaledInstance(icon.getIconWidth(),\n\t\ticon.getIconHeight(), Image.SCALE_DEFAULT));\n\t\tplayerImage = icon.getImage();\n\t\tpaint(this.getGraphics());\n\t}",
"void setPlayerId(int playerId);",
"public void setIconMode(IconMode currentInventoryMode);",
"@Override\n public void setIconURI(String arg0)\n {\n \n }",
"private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"/Icons/logo musica.png\")));\n }",
"public void setIcon(Bitmap icon) {\n mBundle.putParcelable(KEY_ICON, icon);\n }",
"public final void setIcon(@Nullable Drawable icon) {\n mIcon = icon;\n }",
"public void setSprites(final int playerID) {\n idleSprite = CharacterSprites.getIdleSprite(playerID);\n runningSprite = CharacterSprites.getRunningSprite(playerID);\n }",
"public void setIcon(String icon) {\n this.icon = icon == null ? null : icon.trim();\n }",
"public void setIcon(String icon) {\n this.icon = icon == null ? null : icon.trim();\n }",
"private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"MainLogo.png\")));\n }",
"public Builder setIcon(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n icon_ = value;\n onChanged();\n return this;\n }",
"public char setIcon(char icon) {\n char previous = this.icon;\n this.icon = icon;\n return previous;\n }",
"public void setPlayerID(int playerID) {\n\t\tthis.playerID = playerID;\n\t}",
"public Builder setIcon(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n icon_ = value;\n onChanged();\n return this;\n }",
"private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"croissant.png\")));\n }",
"public void setDeleteIcon(int resId) {\n this.mIcDelete = resId;\n if (mImgDelete != null) {\n mImgDelete.setImageResource(mIcDelete);\n }\n }",
"public void setXpeIcon(String value) {\n setAttributeInternal(XPEICON, value);\n }",
"public Object updateProfileIconId(long iconId) {\n return client.sendRpcAndWait(SERVICE, \"updateProfileIconId\", iconId);\n }",
"private void setIcon(){\r\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"images.png\")));\r\n }",
"public final void mo1245a(int i) {\n this.f1768l.icon = i;\n }",
"public void setTeachingAvatar(){\n\t\tavatar.setIcon(new ImageIcon(\"img/Asking.png\"));\n\t}",
"public void setCurrPlayer(int i) {\n if (currPlayer == -1) {\n currPlayer = i;\n }\n }",
"public void setCurrentPlayerPokemon(int newID)\r\n {\r\n currentPlayerPokemon = newID;\r\n }",
"public void updateMute() {\n if (game.isMuted()) {\n mute.setIcon(muted);\n } else {\n mute.setIcon(unmuted);\n }\n }",
"public void setIcon (playn.core.Image... icons) {\n assert icons.length > 0;\n List<BufferedImage> images = new ArrayList<BufferedImage>();\n for (playn.core.Image icon : icons) images.add(((JavaImage)icon).bufferedImage());\n _frame.setIconImages(images);\n }",
"public void setIcons(CKDataModel data) {\r\n\r\n\t//CKDrawerTab icons = new CKDrawerTab(CharacterIcons, DrawerSides.LEFT, 0.0, 0.0, 350.0, 170.0, \"ckSnapInterpreter/headshot.png\");\r\n\t\r\n\t\tCKGridActor[] players = data.getTeam().getCharacters();\r\n\t\tSystem.out.println(\"This team is named \" + data.getTeam().toString() + \" and has \" + data.getTeam().getCharacters().length + \" players.\"); //team.tostring\r\n\t\tEffect effect = new DropShadow();//new Glow(.8);\r\n\r\n\t\tfor (CKGridActor p : players ) \r\n\t\t\tif(p != null) {\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n \t\t\t\t\r\n\t\t\t\t\tButton b = new Button(p.getName(), new ImageView(p.getFXPortrait()));\r\n\t\t\t\t\tb.setContentDisplay(ContentDisplay.TOP);\r\n\t\t\t\t\tb.setOnAction(e -> { data.setPlayer(p); });\r\n\t\t\t\t\t\r\n\t\t\t\t\tdata.getActivePlayerProperty()\r\n\t\t\t\t\t\t.registerObserver(\r\n\t\t\t\t\t\t\te->{\r\n\t\t\t\t\t\t\t\tif(e==p)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tb.setEffect(effect);\r\n\t\t\t\t\t\t\t\t\tdata.setPlayer(p);\r\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"I was picked\"+e);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tb.setEffect(null);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\r\n \t\t\t\tthis.getChildren().add(b);\r\n \t\t\t\tthis.setAlignment(Pos.CENTER);\r\n\t\t\t\t}\r\n\t\t\t\tcatch (NullPointerException n) {\r\n\t\t\t\t\tSystem.out.println(\"Character Icon asset was not found\" + n);\r\n\t\t\t\t}\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t//return this;\r\n\t}",
"@SuppressLint(\"NewApi\")\n\tvoid changeIcon()\n\t{\n\n\t\tif (CropImage.isExplicitCameraPermissionRequired(this)) {\n\t\t\trequestPermissions(new String[]{Manifest.permission.CAMERA,Manifest.permission.WRITE_EXTERNAL_STORAGE}, CropImage.CAMERA_CAPTURE_PERMISSIONS_REQUEST_CODE);\n\t\t} else {\n\t\t\tCropImage.startPickImageActivity(this);\n\t\t}\n\n\n\t}",
"private void SetIcon() {\n \n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"appIcon.png\")));\n }",
"public void changeIcon(){\r\n\t\tif (pacman.direction.equals(\"up\")){\r\n\t\t\tif (mouthOpen)\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/UpClosed.png\"));\r\n\t\t\telse\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/UpOpened.png\"));\r\n\t\t}\r\n\t\tif (pacman.direction.equals(\"down\")){\r\n\t\t\tif (mouthOpen)\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/DownClosed.png\"));\r\n\t\t\telse\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/DownOpened.png\"));\r\n\t\t}\r\n\t\tif (pacman.direction.equals(\"left\")){\r\n\t\t\tif (mouthOpen)\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/LeftClosed.png\"));\r\n\t\t\telse\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/LeftOpened.png\"));\r\n\t\t}\r\n\t\tif (pacman.direction.equals(\"right\")){\r\n\t\t\tif (mouthOpen)\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/RightClosed.png\"));\r\n\t\t\telse\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/RightOpened.png\"));\r\n\t\t}\r\n\t\t\r\n\t\tmouthOpen = !mouthOpen;\r\n\t}",
"public void setTabIcon(ChatPanel chatPanel, Icon icon)\n {\n int index = this.chatTabbedPane.indexOfComponent(chatPanel);\n if (index > -1)\n this.chatTabbedPane.setIconAt(index, icon);\n }",
"public void registerIcons(IIconRegister iconRegister) {\n/* 51 */ this.itemIcon = iconRegister.registerIcon(\"forgottenrelics:Soul_Tome\");\n/* */ }",
"public void setSmallIcon(ImageDescriptor icon) {\n if (icon != iconSmall) {\n ImageDescriptor oldIcon = iconSmall;\n iconSmall = icon;\n listeners.firePropertyChange(PROPERTY_SMALL_ICON, oldIcon, icon);\n }\n }",
"private void setIconImage(ImageIcon imageIcon) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"private void setIconImage(ImageIcon imageIcon) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"@Override\n\tpublic void setIconURL(ToolIconURL iconURL) {\n\t\tthis.iconURL = iconURL;\n\t}",
"public void setIconReightRes(int resId) {\n\t\tif (View.VISIBLE == icon_reight.getVisibility()) {\n\t\t\ticon_reight.setImageResource(resId);\n\t\t}\n\t}",
"public final void setIcon(Icon icon) {\r\n if (icon instanceof ImageIcon) {\r\n super.setIcon(new DropDownIcon((ImageIcon) icon));\r\n }\r\n else {\r\n super.setIcon(icon);\r\n }\r\n }",
"public void setIncorrectAvatar(){\n\t\tavatar.setIcon(new ImageIcon(\"img/Incorrect.png\"));\n\t}",
"public void SetID(int id) {\n TextureID = id;\n }",
"private void changeCurrentIcon(Icon icon) {\r\n\t\ttabbedPane.setIconAt(tabbedPane.getSelectedIndex(), icon);\r\n\t}",
"void setIcon(){\n URL pathIcon = getClass().getResource(\"/sigepsa/icono.png\");\n Toolkit kit = Toolkit.getDefaultToolkit();\n Image img = kit.createImage(pathIcon);\n setIconImage(img);\n }",
"@Override\n\tpublic long getIconId() {\n\t\treturn _scienceApp.getIconId();\n\t}",
"private void iconImage() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"icon.jpg\")));\n }",
"public void setID(final char iid) {\n this.id = iid;\n }",
"public void setPlayer(Player _player) { // beallit egy ezredest az adott mapElementre, ha az rajta van\n player = _player;\n }",
"public void ChangeIcons(int iButton){\n\t\tif(iButton == 0){\n\t\t\tjbFavorites.setSelected(true);\n\t\t\tjbSongs.setSelected(false);\n\t\t\tjbPartyList.setSelected(false);\n\t\t}\n\t\tif(iButton == 1){\n\t\t\tjbFavorites.setSelected(false);\n\t\t\tjbSongs.setSelected(true);\n\t\t\tjbPartyList.setSelected(false);\n\t\t}\n\t\t\n\t\tif(iButton == 2){\n\t\t\tjbFavorites.setSelected(false);\n\t\t\tjbSongs.setSelected(false);\n\t\t\tjbPartyList.setSelected(true);\n\t\t}\n\t\tif(iButton == 3){\n\t\t\tjbFavorites.setSelected(false);\n\t\t\tjbSongs.setSelected(false);\n\t\t\tjbPartyList.setSelected(false);\n\t\t}\n\t}",
"@Override\n public int getMuteIcon() {\n return R.drawable.ic_audio_alarm_mute;\n //End modify by yeqing.lv for XR6873798 un-use frameworks resource on 2018/08/25\n }",
"private void setIcons(){\n\t\tfinal List<BufferedImage> icons = new ArrayList<BufferedImage>();\n\t\ttry {\n\t\t\ticons.add(ImageLoader.getBufferedImage(SMALL_ICON_PATH));\n\t\t\ticons.add(ImageLoader.getBufferedImage(BIG_ICON_PATH));\n\t\t} catch (IOException e) {\n\t\t\tmanager.handleException(e);\n\t\t}\n\t\tif(icons.size() > 0)\n\t\t\tsetIconImages(icons);\n\t}",
"public void setLargeIcon(ImageDescriptor icon) {\n if (icon != iconLarge) {\n ImageDescriptor oldIcon = iconLarge;\n iconLarge = icon;\n listeners.firePropertyChange(PROPERTY_LARGE_ICON, oldIcon,\n iconLarge);\n }\n }"
] | [
"0.7031507",
"0.6986593",
"0.6734065",
"0.67250866",
"0.6519797",
"0.6507774",
"0.64641565",
"0.64513546",
"0.63665384",
"0.63665384",
"0.6363219",
"0.6349814",
"0.6349424",
"0.6347903",
"0.63056064",
"0.6298078",
"0.6298078",
"0.6293273",
"0.6213915",
"0.6173602",
"0.6168946",
"0.6158944",
"0.6157627",
"0.61510056",
"0.6124472",
"0.6119052",
"0.60756505",
"0.60683197",
"0.60575384",
"0.6049483",
"0.6048089",
"0.60272247",
"0.5996206",
"0.5995721",
"0.59951884",
"0.5960211",
"0.5953871",
"0.594909",
"0.5940528",
"0.5937761",
"0.5937395",
"0.5928183",
"0.592703",
"0.5923696",
"0.58878905",
"0.58810276",
"0.58648044",
"0.58597964",
"0.58542913",
"0.58441055",
"0.58309895",
"0.5830607",
"0.5822599",
"0.5815666",
"0.58140814",
"0.5800128",
"0.5783092",
"0.5767674",
"0.57622224",
"0.57622224",
"0.575278",
"0.57463336",
"0.5730593",
"0.57304144",
"0.5725848",
"0.57171905",
"0.57093227",
"0.5691801",
"0.56587607",
"0.5657181",
"0.56528646",
"0.5647271",
"0.56470555",
"0.563047",
"0.56231207",
"0.56138533",
"0.56089383",
"0.5578518",
"0.55780876",
"0.5573753",
"0.5571686",
"0.55640966",
"0.555407",
"0.5545439",
"0.5545439",
"0.55412984",
"0.5527619",
"0.5524802",
"0.5489151",
"0.5487963",
"0.54874223",
"0.54852337",
"0.54696834",
"0.5468481",
"0.54661846",
"0.545896",
"0.54533607",
"0.5443454",
"0.54430306",
"0.5432734"
] | 0.7238285 | 0 |
Sets the rating of the player | public void setRating(int rating) {
this.rating = rating;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setRating(int rating);",
"public void setRating(int rating)\n {\n this.rating = rating;\n }",
"public void setRating(int rating) {\n this.rating = rating;\n }",
"public void setRating(Integer rating) {\r\n this.rating = rating;\r\n }",
"public void setRating(double rating){\n\t\tthis.rating = rating;\n\t}",
"public void setRating(int rating) {\n this.rating = rating;\n if (this.rating < 0) {\n this.rating = 0;\n }\n }",
"public void setRating(Rating rating) {\n double boundedRating = this.boundedRating(rating);\n this.normalisedRating = this.normaliseRating(boundedRating);\n this.ratingCount++;\n }",
"public void setPlayerRating(long playerRating, IServerCallback callback) {\n\n try {\n JSONObject data = new JSONObject();\n data.put(Parameter.playerRating.name(), playerRating);\n\n ServerCall sc = new ServerCall(ServiceName.matchMaking, ServiceOperation.SET_PLAYER_RATING, data, callback);\n _client.sendRequest(sc);\n } catch (JSONException ignored) {\n }\n }",
"public void setRating(float rating) {\n this.rating = rating;\n }",
"public void setRating(Integer value)\n\t{\n\t}",
"public void setRating(int rating) {\n if (rating > starCount) {\n rating = starCount;\n }\n int lastRating = this.rating;\n this.rating = rating;\n for (int i = 0; i < getChildCount(); i++) {\n ImageView iv = (ImageView) getChildAt(i);\n if (i < rating) {\n iv.setImageResource(checkedStarDrawable);\n } else {\n iv.setImageResource(normalStarDrawable);\n }\n }\n if (listener != null && lastRating != rating) {\n listener.onRatingChanged(rating, starCount);\n }\n }",
"public void setRating(int rating) {\n\t\tthis.rating = rating;\n\t}",
"public void setRating(double rating) {\n\t\tthis.rating = rating;\n\t}",
"public void setRating(float r) {\n\t\trating = r;\n\t}",
"public void setRating(double rating) throws RatingWasAlreadySetExecption {\n if (!isRated) {\n this.rating = rating;\n this.isRated = true;\n } else {\n throw new RatingWasAlreadySetExecption(\"Rating was set on an already rated tweet!\", this, rating);\n }\n\n }",
"public void setMyRating(double myRating) {\n this.myRating = myRating;\n }",
"public void setHotOrNotRating(int rating) {\r\n this.rating += rating;\r\n ratingCount++;\r\n }",
"public void setRating(java.lang.String rating) {\n this.rating = rating;\n }",
"public static void setRatings (double irating){\n\t\t\t//ratings = irating;\n\t\t\tr = irating;\n\t}",
"void updateRating(String name, String park, double rating);",
"@Test\n public void testSetRating() {\n final double delta = 0.0;\n final double expectedRating1 = 70.0;\n final double expectedRating2 = 65.0;\n final double expectedRating3 = 85.5;\n movie1.setRating(expectedRating1);\n movie2.setRating(expectedRating2);\n movie3.setRating(expectedRating1);\n movie4.setRating(expectedRating3);\n movie1.setRating(expectedRating2);\n assertEquals(expectedRating2, movie1.getRating(), delta);\n assertEquals(expectedRating2, movie2.getRating(), delta);\n assertEquals(expectedRating1, movie3.getRating(), delta);\n assertEquals(expectedRating3, movie4.getRating(), delta);\n }",
"public Builder setRating(double value) {\n \n rating_ = value;\n onChanged();\n return this;\n }",
"public void setUserRating(String userRating) {\n this.userRating = userRating;\n }",
"public void setRating(final String num)\n {\n maxPref = getActivity().getSharedPreferences(num, 1); //get the preferences\n editor = maxPref.edit(); //open them for editing\n\n maxBar.setOnRatingBarChangeListener(new RatingBar.OnRatingBarChangeListener() {\n @Override\n public void onRatingChanged(RatingBar ratingBar, float rating, boolean fromUser) {\n editor.putFloat(num, maxBar.getRating()); //get the new rating and put it in num\n editor.commit(); //commit the changes\n }\n });\n }",
"public void vote(int rating) {\n\t\tnew WebTraceTask(this, String.valueOf(rating)).execute(WebTraceTask.VOTE);\n\t}",
"public static void setRating(Context context, int id, int rating){\n\n MovieSqlHelper movieDB = new MovieSqlHelper(context);\n ContentValues values=new ContentValues();\n values.put(DBConstants.RATING_C, rating);\n movieDB.getWritableDatabase().update(DBConstants.MOVIES_T,values,DBConstants.ID_C+\"=?\",new String[]{\"\"+id});\n movieDB.close();\n\n }",
"public void setComment(String comment, int rating);",
"private void updateUserRatingStars(Long currentKey) {\r\n\t\tSwagItemRating swagItemRatingForKey = loginInfo.getSwagItemRating(currentKey);\r\n\t\tInteger userRating = (swagItemRatingForKey==null) ? 0 : swagItemRatingForKey.getUserRating();\r\n\t\t\r\n\t\tfor (int i = 0; i < 5; i++) {\r\n\t\t\tif (i<userRating) {\r\n\t\t\t\tstarImages.get(i).setSrc(\"/images/starOn.gif\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tstarImages.get(i).setSrc(\"/images/starOff.gif\");\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public boolean setRating(int newRating) {\n\t\tif (newRating != this.rating && newRating <= 5 && this.rating >= 1) {\n\t\t\tthis.rating = newRating;\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public void setRatings(Rating[] ratings) {\n this.ratings = ratings;\n }",
"public void ratings(){\n SimpleActivity activity = getSimpleActivity();\n RatingBar ratingBar = (RatingBar) activity.findViewById(R.id.ratingBar);\n friendsPreference = PreferenceManager.getDefaultSharedPreferences(activity);\n if (friendsPreference.getFloat(friendNameFragment+\"Rating\", 0)!=0) {\n ratingBar.setRating(friendsPreference.getFloat(friendNameFragment+\"Rating\", 0));\n }\n }",
"public void setStars(float stars) {\n this.stars = stars;\n }",
"Integer rateSong(User user, Song toRate, Integer rating)\n\t\tthrows IllegalArgumentException, IndexOutOfBoundsException, NullPointerException;",
"public void setScore(){\n\t\t//get player's score and change it to the string\n\t\tthis.scoreLabel.setSize(scoreLabel.getPreferredSize().width, \n\t\t\t\tscoreLabel.getPreferredSize().height);\n\t\tthis.scoreLabel.setText(String.valueOf(this.player.getScore()));\n\t}",
"public void setRatingValue(String ratingValue) {\n this.ratingValue = ratingValue;\n }",
"public void setRating(int row) {\n\t\tint x = row; //x is used for a simpler line of code below (represents current row of excel sheet +1)\r\n\t\tlong daysOffset = daysSince1900(5);\r\n\t\t\r\n\t\tthis.rating = \"=IF(MIN(P\"+x+\":Q\"+x+\")>\"+daysOffset+\",-9,(SUM(R\"+x+\":W\"+x+\")-MAX(R\"+x+\":W\"+x+\")+MIN(R\"+x+\":W\"+x+\")-STDEV.S(R\"+x+\":W\"+x+\"))/6)\";\r\n\t}",
"public boolean setMovieRating(Movie movie, RatingEnum rating){\n if(movie == null) return false;\n movie.rating = rating;\n return true;\n }",
"public void setRate();",
"public void setNewScore(String player, int score) {\n\t\t\n\t}",
"public Rating(String game, String player, int rating, Date ratedOn) {\n this.game = game;\n this.player = player;\n this.rating = rating;\n this.ratedOn = ratedOn;\n }",
"public void setObjectiveScore(String name, Player player, int value) {\n scoreboard.getObjective(name).getScore(player.getName()).setScore(value);\n }",
"public void setRateStar(int value, Dialog dialog) {\n\t\tImageView[] imgViewArr = new ImageView[] { (ImageView) dialog.findViewById(R.id.ratingview1),\n\t\t\t\t(ImageView) dialog.findViewById(R.id.ratingview2), (ImageView) dialog.findViewById(R.id.ratingview3) };\n\n\t\tfor (int i = 0; i < value; ++i) {\n\t\t\timgViewArr[i].setImageResource(R.drawable.star_found);\n\t\t}\n\n\t\tfor (int i = value; i < 3; ++i) {\n\t\t\timgViewArr[i].setImageResource(R.drawable.star_lost);\n\t\t}\n\n\t}",
"public void setRate(int rate) { this.rate = rate; }",
"public void setRatingID(int ratingID) {\n this.ratingID = ratingID;\n }",
"public float getRating() {\n return rating;\n }",
"public float getRating() {\n return rating;\n }",
"SpeechAwardPoints(int rating){\n\n currentPoints = rating;\n feedback = \"Your current rating is: \" + currentPoints + \"%\";\n }",
"public void setScore(java.lang.Integer value);",
"public void updateRating(String name, double newRating) {\n\t\tfor(Movie movie: this.movieList) {\n\t\t\tif(movie.getName().equals(name)) movie.setRating(newRating);\n\t\t}\n\t}",
"@Override\r\n\tpublic void updateDriverRate(int score, String driverID) {\n\t\t\r\n\t}",
"void editRating(String rid, Rating2 rating2);",
"public float getRating() {\n\t\treturn rating;\n\t}",
"private void editRating() throws MovieDAOException {\n String title = displayNameAndGetTitle();\n\n // get rating\n String newRating = view.getNewRating();\n\n // edit rating\n DVD updatedDVD = service.editRating(title, newRating);\n \n view.displayInfo(updatedDVD);\n }",
"public abstract void setRate();",
"public void setRate(Integer rate) {\r\n this.rate = rate;\r\n }",
"void setScoreValue(int scoreValue);",
"public static void updateRating(){\r\n System.out.println('\\n'+\"Update Rating\");\r\n System.out.println(movies);\r\n System.out.println('\\n'+ \"Which movies ratings would you like to update\");\r\n String movieTitle = s.nextLine();\r\n boolean movieFound = false;\r\n // Searching for the name of the movie in the list\r\n for(Movie names:movies ){\r\n //if the movie title is in teh list change rating\r\n if (movieTitle.equals(names.getName())){\r\n System.out.println(names.getName() + \" has a current rating of \"+ names.getRating()+'\\n'+ \"What would you like to change it to?\");\r\n double newRating = s.nextInt();\r\n s.nextLine();\r\n names.setRating(newRating);\r\n System.out.println(\"You have changed the rating of \"+ names.getName()+ \" to \"+ names.getRating());\r\n movieFound = true;\r\n break;\r\n }\r\n }\r\n //if movie titile not in the current list\r\n if (!movieFound){\r\n System.out.println(\"This moves is not one you have previously watched. Please add it first.\");\r\n }\r\n }",
"public double getRating() {\n return rating_;\n }",
"public void setRating(java.lang.String[] rating) {\n this.rating = rating;\n }",
"public double getRating() {\n return rating_;\n }",
"public void setPlayer(Player player) {\n this.currentPlayer = player;\n }",
"public double getRating() {\n\t\treturn rating;\n\t}",
"public void setISOSpeedRatings(Integer value)\n\t{\n\t}",
"public void setMinRating(int minRating) {\n this.minRating = minRating;\n }",
"public Builder setRate(int value) {\n \n rate_ = value;\n onChanged();\n return this;\n }",
"public void setPlayer(Player player) {\r\n this.player = player;\r\n }",
"protected void setScore(int s)\r\n\t{\r\n\t\tGame.score = s;\r\n\t}",
"public void setPlayer(Player player) {\n this.player = player;\n }",
"public void setScore (int newScore)\n {\n this.score = newScore;\n }",
"public double getRating(){\n\t\treturn this.rating;\n\t}",
"public void handleRating() {\r\n Users rater = ui.getUser();\r\n newRating = ratingEJB.findByUserAndRecipe(rater, recipe);\r\n boolean edit = false; // determine whether we need to edit\r\n\r\n // No rating for this user exists\r\n if (newRating == null && rating > 0 && rating <= 5) {\r\n newRating = new RecipeRating();\r\n newRating.setRater(rater);\r\n newRating.setRecipe(recipe);\r\n newRating.setRatingDate(new Date().getTime());\r\n } // A rating exists\r\n else {\r\n edit = true;\r\n }\r\n\r\n switch (rating) {\r\n case 1:\r\n this.newRating.setRatingValue(RatingValue.ONE_STAR);\r\n break;\r\n case 2:\r\n this.newRating.setRatingValue(RatingValue.TWO_STARS);\r\n break;\r\n case 3:\r\n this.newRating.setRatingValue(RatingValue.THREE_STARS);\r\n break;\r\n case 4:\r\n this.newRating.setRatingValue(RatingValue.FOUR_STARS);\r\n break;\r\n case 5:\r\n this.newRating.setRatingValue(RatingValue.FIVE_STARS);\r\n break;\r\n }// end switch\r\n\r\n if (edit) {\r\n this.newRating = ratingEJB.editRecipeRating(newRating);\r\n } else {\r\n this.newRating = ratingEJB.createRecipeRating(newRating);\r\n }\r\n }",
"public float getRating() {\n return this.rating;\n }",
"public static void updateDriverRating(RatingActivity view, String driverID, boolean giveThumbsUp){\n App.getDbManager().getDriver(driverID, ((resultData, err) -> {\n if (err == null) {\n Driver tmpDriver = (Driver) resultData.get(\"user\");\n if(giveThumbsUp){\n tmpDriver.setNumThumbsUp(tmpDriver.getNumThumbsUp() + 1);\n }\n else{\n tmpDriver.setNumThumbsDown(tmpDriver.getNumThumbsDown()+1);\n }\n //Rating algorithm\n tmpDriver.setRating((tmpDriver.getNumThumbsUp() / (tmpDriver.getNumThumbsDown() +\n tmpDriver.getNumThumbsUp())) * 100);\n App.getDbManager().updateDriver(driverID,tmpDriver, (resultData1, err1) -> {\n if (err1 != null) {\n view.finish();\n }\n });\n }\n\n }));\n }",
"public void setPlayer(Player player) {\n this.player = player;\n }",
"double getRating();",
"public void setScore(int score) {this.score = score;}",
"public void setPlayer(Player player) {\n\t\tthis.player = player;\r\n\t}",
"@Min(0)\n @Max(5)\n public int getRating() {\n return rating;\n }",
"public void ratePoItem(int pid, String bid, int rating, String review) throws Exception {\n String query = \"UPDATE POItem SET rating = ?, review = ? WHERE id = ? AND bid = ?\";\n try (Connection con = this.ds.getConnection();\n PreparedStatement p = con.prepareStatement(query)) {\n p.setInt(1, rating);\n p.setString(2, review);\n p.setInt(3, pid);\n p.setString(4, bid);\n p.executeUpdate();\n }\n }",
"public boolean updateRating(String t, int r)\n\t{\n\t\tif(r<0 || r>100 || !containsMovie(t))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t//update rating\n\t\tIterator<Movie> itr = list_of_movies.iterator();\n\t\twhile(itr.hasNext())\n\t\t{\n\t\t\tMovie temp_movie = itr.next();\n\t\t\tif(temp_movie.getTitle().equals(t))\n\t\t\t{\n\t\t\t\ttemp_movie.setRating(r);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn true;\n\t}",
"@Override\n\tpublic void setPlayer(Player player) {\n\n\t}",
"public void setPlayer(Sprite player) {\n\t\tthis.player = player;\n\t}",
"public Integer getRating() {\n return this.rating;\n }",
"public int getStarRating(){\n return starRating;\n }",
"public void updatePlayer(Player player) {\n Duration playDuration = Duration.ofMinutes(player.getStatistic(Statistic.PLAY_ONE_MINUTE) / 20 / 60);\n int hoursPlayed = Math.toIntExact(playDuration.toHours());\n this.objective.getScore(player.getName()).setScore(hoursPlayed);\n }",
"public void updateFeedback(UserProfile up, String itemCode, String rating) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n\n String query = \"UPDATE userItems \"\n + \"SET rating = ? \"\n + \"WHERE itemCode = ?\";\n try {\n ps = connection.prepareStatement(query);\n ps.setString(1, rating);\n ps.setString(2, itemCode);\n ps.executeUpdate();\n } catch (SQLException se) {\n System.out.println(\"ERROR: Could not execute SQL statement in: \" + \"Item.changeRating()\");\n System.out.println(\"ERROR: Could not execute SQL statement: \" + se);\n } finally {\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n up.updateRating(itemCode, rating);\n\n }",
"public void incrementPlayerRating(long increment, IServerCallback callback) {\n try {\n JSONObject data = new JSONObject();\n data.put(Parameter.playerRating.name(), increment);\n\n ServerCall sc = new ServerCall(ServiceName.matchMaking, ServiceOperation.INCREMENT_PLAYER_RATING, data, callback);\n _client.sendRequest(sc);\n\n } catch (JSONException ignored) {\n }\n }",
"public void setPlayer(Player player) {\n\t\t\tthis.player = player;\n\t\t}",
"public void setSumratings(int sumratings) {\n\tthis.sumratings = sumratings;\n}",
"@Override\r\n\t\t\t\t\tpublic void onRatingChanged(RatingBar ratingBar,\r\n\t\t\t\t\t\t\tfloat rating, boolean fromUser) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(rating==1.0f){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\ttxtRatingtType.setText(\"POOR\");\r\n\t\t\t\t\t\t}else if(rating==2.0f){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\ttxtRatingtType.setText(\"FAIR\");\r\n\t\t\t\t\t\t}else if(rating==3.0f){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\ttxtRatingtType.setText(\"OK\");\r\n\t\t\t\t\t\t}else if(rating==4.0f){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\ttxtRatingtType.setText(\"GOOD\");\r\n\t\t\t\t\t\t}else if(rating==5.0f){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\ttxtRatingtType.setText(\"GREAT\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tedtComments.setEnabled(true);\r\n\t\t\t\t\t\tbtnSubmit.setEnabled(true);\r\n\r\n\t\t\t\t\t}",
"public void fixTeacherRating()\n {\n // put your code here\n if(profQuality < 5)\n profQuality++;\n }",
"public static void rate(Long propID, String userID, Integer newRatingValue)\r\n\t\t\tthrows ServiceException {\r\n\t\tRating rating = ofy.find(Rating.class, buildID(userID, propID));\r\n\r\n\t\t/*\r\n\t\t * if there was no previous rating and the new value indicates a rating\r\n\t\t * deletion, or if the previous rating and the new rating are the same,\r\n\t\t * then there is nothing to do. So, notify the client that it sent a\r\n\t\t * pointless update.\r\n\t\t */\r\n\t\tif ((rating == null && newRatingValue == null)\r\n\t\t\t\t|| ((rating != null && newRatingValue != null) && rating.eval == newRatingValue\r\n\t\t\t\t\t\t.intValue())) {\r\n\t\t\tthrow new ServiceException(\"cannot update rating: old rating (\"\r\n\t\t\t\t\t+ rating.eval + \") is the same as new rating (\"\r\n\t\t\t\t\t+ newRatingValue + \")\");\r\n\t\t}\r\n\r\n\t\tLock lock = Lock.getNodeLock(propID);\r\n\t\ttry {\r\n\t\t\tlock.lock();\r\n\r\n\t\t\tProposition prop = ofy.get(Proposition.class, propID);\r\n\r\n\t\t\t/* if the user has previously rated back out previous rating */\r\n\t\t\tif (rating != null) {\r\n\t\t\t\tprop.ratingSum -= rating.eval;\r\n\t\t\t\tprop.ratingCount--;\r\n\t\t\t}\r\n\t\t\t/*\r\n\t\t\t * otherwise create a new rating object to hold new rating (note\r\n\t\t\t * that in the case where rating == null we always need a new rating\r\n\t\t\t * object here because we have ruled out the case where both rating\r\n\t\t\t * == null and newRatingValue == null by throwing the exception\r\n\t\t\t * above)\r\n\t\t\t */\r\n\t\t\telse {\r\n\t\t\t\trating = new Rating();\r\n\t\t\t\trating.setID(userID, propID);\r\n\t\t\t}\r\n\r\n\t\t\tif (newRatingValue != null) {\r\n\t\t\t\t/* update the proposition with the new evaluation */\r\n\t\t\t\tprop.ratingSum += newRatingValue;\r\n\t\t\t\tprop.ratingCount++;\r\n\r\n\t\t\t\t/* save the new evaluation */\r\n\t\t\t\trating.eval = newRatingValue;\r\n\t\t\t\tofy.put(rating);\r\n\t\t\t} else {\r\n\t\t\t\t/*\r\n\t\t\t\t * if newRatingValue == null we need to delete the rating object\r\n\t\t\t\t * (note this will only happen when there was already a rating\r\n\t\t\t\t * object in the database because we ruled out the possibility\r\n\t\t\t\t * of (rating == null && newRating == null) by throwing\r\n\t\t\t\t * exception above)\r\n\t\t\t\t */\r\n\t\t\t\tofy.delete(rating);\r\n\t\t\t}\r\n\t\t\t/*\r\n\t\t\t * notice that I do not call the ArgMapServiceImpl.updateNode()\r\n\t\t\t * function here because I do not want to have the updated time\r\n\t\t\t * change. The updated time is used by the live refresh system to\r\n\t\t\t * determine when a client refresh is needed, and I don't want to\r\n\t\t\t * trigger a client refresh because, at the moment I'm not even\r\n\t\t\t * sending the ratingSum to the client (and don't plan to) (it's\r\n\t\t\t * marked 'transient', so it doesn't get sent.)\r\n\t\t\t */\r\n\t\t\tofy.put(prop);\r\n\r\n\t\t\t/*\r\n\t\t\t * TODO need to queue a task to recalculate the scores for all the\r\n\t\t\t * nodes that depend on this node's score or average rating.\r\n\t\t\t */\r\n\t\t} finally {\r\n\t\t\tlock.unlock();\r\n\t\t}\r\n\t}",
"public void setPlayer(int play)\n {\n this.player=play;\n }",
"public double getRating(){\n\t\treturn this.user_rating;\n\t}",
"public int getRating()\n {\n return this.rating;\n }",
"public static void setPlayerScore(int score)\r\n\t{\r\n\t\tGame.playerScore = score;\r\n\t}",
"public void setBonusScore() {\r\n count = count+50;\r\n }",
"private void Rating(int minAge)\r\n {\r\n this.minAge = minAge;\r\n }",
"public int getRating() {\n\t\treturn this.rating;\n\t}",
"public void setPlayer(Player player) {\n\t\tthis.player = player;\n\t}"
] | [
"0.7996652",
"0.7656259",
"0.7576576",
"0.75511503",
"0.75425327",
"0.7527052",
"0.75146186",
"0.75071746",
"0.7491356",
"0.74465966",
"0.74028957",
"0.7381676",
"0.73657364",
"0.723165",
"0.7123901",
"0.7002954",
"0.6962576",
"0.6944791",
"0.69018245",
"0.6783756",
"0.67402357",
"0.66819906",
"0.6573362",
"0.65478206",
"0.6391347",
"0.6389741",
"0.63494873",
"0.63096344",
"0.61979586",
"0.6183861",
"0.6155065",
"0.6122069",
"0.61078185",
"0.60706127",
"0.6062617",
"0.6061882",
"0.6050688",
"0.60492605",
"0.603119",
"0.6025338",
"0.6020059",
"0.60158587",
"0.5998232",
"0.59872216",
"0.5966524",
"0.5966524",
"0.59264195",
"0.59235466",
"0.59221727",
"0.5917915",
"0.5910251",
"0.5907376",
"0.5906568",
"0.58986366",
"0.5884671",
"0.5882174",
"0.5847573",
"0.58423805",
"0.58396184",
"0.58349746",
"0.583162",
"0.5826581",
"0.58211094",
"0.58110327",
"0.5810838",
"0.58086026",
"0.5807644",
"0.57998914",
"0.5795793",
"0.5793433",
"0.579296",
"0.5792394",
"0.5784531",
"0.5780558",
"0.577673",
"0.5770884",
"0.5769073",
"0.5760963",
"0.5760288",
"0.5757712",
"0.5754961",
"0.57477534",
"0.5734683",
"0.573008",
"0.57234055",
"0.5714463",
"0.57122403",
"0.5690358",
"0.56898695",
"0.56887794",
"0.56799084",
"0.5674002",
"0.56716686",
"0.5671477",
"0.56670016",
"0.5660904",
"0.5660722",
"0.5659227",
"0.5658671",
"0.5657698"
] | 0.76463073 | 2 |
set increment the amount of matches played | public void setMatches() {
this.matches++;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void incrementTimesPlayed() {\r\n\t\ttimesPlayed++;\r\n\t}",
"public void increaseTurnCount()\n\t{\n\t\tturnNumber++;\n\t\tthis.currentPlayerID++;\n\t\tthis.currentPlayerID = this.currentPlayerID % this.playerList.size();\n\t}",
"public void addMatch() {\n totalMatches ++;\n }",
"public void increaseScore(){\n this.inc.seekTo(0);\n this.inc.start();\n this.currentScore++;\n }",
"public void incGamesPlayed() {\n gamesPlayed++;\n }",
"public int getMatchIncrement() {\n return getIntegerProperty(\"Increment\");\n }",
"private void increaseCurrentPlayerIndex() {\n\t\tcurrentPlayer++;\n\t\tif(currentPlayer>3)\n\t\t\tcurrentPlayer=0;\n\t}",
"public void incrTurn(){\n this.turn++;\n }",
"public void incrementNumAttacked( ){\n this.numAttacked++;\n }",
"public void incrementCount() {\n\t\tcount++;\n\t}",
"public void incrementCount() {\n count++;\n }",
"public void incrementD_CurrentNumberOfTurns() {\n d_CurrentNumberOfTurns++;\n }",
"private static void setCounter() {++counter;}",
"public void incrementWin(){wins += 1;}",
"public void incrementCount(){\n count+=1;\n }",
"void incrementCount();",
"public void increaseWins(){\n this.numberOfWins=this.numberOfWins+1;\n }",
"public static void incrementScore() {\n\t\tscore++;\n\t}",
"public void incrementScore(int inc){\n\t\tscoreboard.incrementScore(inc);\n\t}",
"public void increase()\n {\n setCount(getCount() + 1);\n }",
"public void incrementScore(int increment) {\n score = score + increment;\n }",
"public void incCount() { }",
"public void setOneNewWanted () {\r\n numWanted ++;\r\n }",
"public void increasecounter() {\n\t\tmPref.edit().putInt(PREF_CONVERTED, counter + 1).commit();\r\n\t}",
"public void nextPlayer() {\r\n if (currentPlayer == totalPlayer) {\r\n currentPlayer = 1;\r\n } else {\r\n currentPlayer++;\r\n }\r\n }",
"public void setWins() {\r\n this.wins++;\r\n }",
"public void increaseNumHits() {\n\t\tthis.numHits += 1;\n\t}",
"private void incrementCounter()\r\n\t{\r\n\t\tthis.counter++;\r\n\t}",
"public void increseHitCount() {\n\r\n\t}",
"public static void incrementActivityScore() {\n\t\tmActivityScore++;\n\t\tsaveScore();\n\t}",
"public void increase() {\r\n\r\n\t\tincrease(1);\r\n\r\n\t}",
"public void incrementScore(int amount){\n\t\tthis.score += amount;\n\t}",
"public void increment() {\r\n\t\tcurrentSheeps++;\r\n\t}",
"public void increaseCount(){\n myCount++;\n }",
"public static void incTestCount() {\n mTestCount++;\n }",
"public void increment(){\n\t\twordCount += 1;\n\t}",
"private void incrPositiveCount(){\n m_PositiveCount++;\n }",
"public void IncrementCounter()\r\n {\r\n \tsetCurrentValue( currentValue.add(BigInteger.ONE)); \r\n \r\n log.debug(\"counter now: \" + currentValue.intValue() );\r\n \r\n }",
"public int incrementNumberWins()\n\t{\n\t\treturn myNumberWins++;\n\t}",
"public void increase(int number) {\r\n this.count += number;\r\n }",
"public void increase(int number) {\r\n this.count += number;\r\n }",
"public void incrementFrameNumber()\n {\n\tframeNumber++;\n }",
"void increaseScore(){\n\t\t currentScore = currentScore + 10;\n\t\t com.triviagame.Trivia_Game.finalScore = currentScore;\n\t }",
"public void addOneToScore() {\r\n score++;\r\n }",
"public void incrMine() {\r\n\t\tthis.mineCount++;\r\n\t}",
"public void increment() {\n increment(1);\n }",
"public void addCount()\n {\n \tcount++;\n }",
"@Override\n public void updateScore(int winner)\n {\n if (winner == 0)\n {\n playerOneScore++;\n }\n else\n {\n playerTwoScore++;\n }\n }",
"public void incrementNumMoves() {\n\t\tthis.moveMade = true;\n\t\tthis.numMoves++;\n\t}",
"public void increase(String nickname) {\n\t\tint oldValue = this.getScore(nickname);\n\t\tscoreboard.replace(nickname, oldValue, oldValue + 1);\n\t}",
"private void increaseAttempts() {\n attempts++;\n }",
"public void incPieceCount () {\n m_PieceCount++;\n\t}",
"public void incrementLoopCount() {\n this.loopCount++;\n }",
"private int scoreCounter(int result) {\n result +=1;\n return result;\n }",
"public void incrementCount () {\n count = count + 1; // == count++ == count += 1 \n if (count == modulus) {\n count = 0;\n }\n }",
"public static void playerWonInc(){\r\n\t\t_playerWon++;\r\n\t}",
"public void incCounter()\n {\n counter++;\n }",
"public static void NextTurn() {\n if (num_of_players == turn)\n turn=0;\n turn++;\n }",
"public void increaseCount(View view) {\n count++;\n display(count);\n }",
"public void setnombreMatch(int nombre_match);",
"public void incrementMoves()\n {\n moves ++;\n }",
"public void incCounter(){\n counter++;\n }",
"private void increaseScore() {\n this.game.getPlayers().values().forEach(ship -> {\n ship.increaseScore();\n if (ship.getScore() % 5 == 0) {\n this.asteroidsLimit++;\n }\n });\n }",
"private void incrementCounters() {\n // update score by 5 every second\n ++scoreTimer;\n if (scoreTimer > scoreInterval) {\n score += 5;\n scoreTimer = 0;\n }\n\n // update speed by 100% every second\n ++speedTimer;\n if (speedTimer > speedInterval) {\n currentSpeed *= speedFactor;\n ++gameLevel;\n speedTimer = 0;\n }\n\n // increment rock timer (we create a new rock every 2 seconds)\n ++rockTimer;\n }",
"void increaseStarsBy(final int amount);",
"public void increaseRound() {\n\t\tif(this.activePlayer==this.player1) {\n\t\t\tthis.setScorePlayer1(this.getScorePlayer1()+1);\n\t\t}else {\n\t\t\tthis.setScorePlayer2(this.getScorePlayer2()+1);\n\t\t}\n\t\t//On check si c'est le dernier round\n\t\tif (round != ROUNDMAX) {\n\t\tthis.round++;\n\t\t//On change un round sur deux le premier joueur de la manche\n\t\t\n\t\tif (0==round%2) {\n\t\t\t\n\t\t\tthis.setActivePlayer(player2);\n\t\t}else {\n\t\t\n\t\t\tthis.setActivePlayer(player1);\n\t\t}\n\t\t}else {\n\t\t\t//Sinon la partie est gagne\n\t\t\tdraw.win = true;\n\t\t}\n\t\t}",
"public void incrementCoinCount() {\n coinCount++;\n System.out.println(\"Rich! Coin count = \" + coinCount);\n }",
"public int incrementPlayerTurn() {\r\n\t\tthis.playerTurn++;\r\n\t\tif ( playerTurn >= 3 ) {\r\n\t\t\tthis.playerTurn = 0;\r\n\t\t}\r\n\t\t\r\n\t\treturn this.playerTurn;\r\n\t}",
"public void changeCount(final int c) {\n\t\tcount += c;\n\t}",
"public void startNewMatch() {\n // Limpia el score de cada jugador y los pone en no listo\n for (Player p : players) {\n p.resetScore();\n p.setReady(false);\n }\n }",
"public void incDraws() {\n draws++;\n }",
"public void incrementCount(View view) {\n\t\tcounterModel.incrementCounter();\n\t\tcurrentCountTextView.setText(Integer.toString(counterModel.getCount()));\n\t}",
"public void increment() {\n sync.increment();\n }",
"public void increaseCount()\n {\n minesLeft++;\n repaint();\n if (minesLeft == 0 && minesFound == numMines)\n {\n endGame(true); //This could only trigger if the player had flagged too many squares,\n }\t\t\t\t\t\t//then went back and removed the erroneous ones.\n }",
"public void incrementNumberGames(TypeOfGames type) {\n statistics.get(type).incrementNumberGames();\n }",
"@Override\n public void setNrPlayers(int value) {\n this.nrPlayers = value;\n }",
"public void scoringTrick(){\n wizardRule();\n winner.tricksWon++;\n winner = new Player();\n }",
"public void inc(){\n this.current += 1;\n }",
"private void numberResults ()\r\n {\r\n int partIndex = 0;\r\n\r\n for (Result result : connection.getResultMap().keySet()) {\r\n ScorePart scorePart = (ScorePart) result.getUnderlyingObject();\r\n scorePart.setId(++partIndex);\r\n }\r\n }",
"public int incrementScore(int player) {\n switch (player) {\n case PLAYER_A:\n return ++scoreA;\n case PLAYER_B:\n return ++scoreB;\n }\n return -1;\n }",
"public static void increment() {\n\t\tcount.incrementAndGet();\n//\t\tcount++;\n\t}",
"public void setUpdateOften(int i){\n countNum = i;\n }",
"int getRepeatCount();",
"public void incrementNumberOfWins(TypeOfGames type) {\n statistics.get(type).incrementNumberOfWins();\n }",
"public void Increase()\n {\n Increase(1);\n }",
"public void addScore()\n {\n score += 1;\n }",
"public void setBonusScore() {\r\n count = count+50;\r\n }",
"public void incrementScore(int val) {\n score += val;\n }",
"public void increaseResult(View view){\n int viewID = view.getId();\n switch (viewID){\n case R.id.moreTeamOne:\n result1++;\n resultText1.setText(String.valueOf(result1));\n break;\n case R.id.moreTeamTwo:\n result2++;\n resultText2.setText(String.valueOf(result2));\n break;\n }\n }",
"public void incrementerTest() {\n\t\tthis.nbTests++;\n\t}",
"public void newPlayer() {\r\n\t\tthis.nbMonster ++;\r\n\t\tthis.nbPlayer ++;\r\n\t}",
"public void incOWins() {\n oWins++;\n }",
"public void increment() {\n\t\tif (m_bYear) {\n\t\t\tm_value++;\n\t\t\tif (m_value > 9999)\n\t\t\t\tm_value = 0;\n\t\t} else {\n\t\t\tm_value++;\n\t\t\tif (m_value > 11)\n\t\t\t\tm_value = 0;\n\n\t\t}\n\t\trepaint();\n\t}",
"public void setPassCounter()\r\n {\r\n passCounter++;\r\n\r\n }",
"void updateFrequencyCount() {\n //Always increments by 1 so there is no need for a parameter to specify a number\n this.count++;\n }",
"public void increment() {\n mNewNotificationCount.setValue(mNewNotificationCount.getValue() + 1);\n }",
"@Test\r\n\tpublic void incrementScoretest() \r\n\t{\r\n\t\tscoreBehavior.incrementScore();\r\n\t\tassertEquals(1, scoreBehavior.score());\r\n\t\t\r\n\t\tscoreBehavior.incrementScore();\r\n\t\tassertEquals(2, scoreBehavior.score());\r\n\t}",
"@Override\n public synchronized void increment() {\n count++;\n }",
"public void count() {\n\t\talgae = -1;\n\t\tcrab = -1;\n\t\tbigFish = -1;\n\t\tfor(GameObjects o: objects) {\n\t\t\tswitch(o.toString()) {\n\t\t\tcase \"algae\":\n\t\t\t\talgae +=1;\n\t\t\t\tbreak;\n\t\t\tcase \"crab\":\n\t\t\t\tcrab +=1;\n\t\t\t\tbreak;\n\t\t\tcase \"big fish\":\n\t\t\t\tbigFish +=1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"public void rankMatches();"
] | [
"0.7376734",
"0.72186923",
"0.70536554",
"0.6917256",
"0.6822253",
"0.68016607",
"0.67838436",
"0.6698912",
"0.66637",
"0.66353",
"0.6628029",
"0.6587708",
"0.65824443",
"0.6557914",
"0.6544803",
"0.653943",
"0.65266937",
"0.6492967",
"0.64900315",
"0.6488212",
"0.6468115",
"0.6451177",
"0.6430823",
"0.6429277",
"0.64199734",
"0.64149964",
"0.63865083",
"0.63850415",
"0.6384625",
"0.63840806",
"0.63765246",
"0.63753986",
"0.63672346",
"0.63533795",
"0.63497084",
"0.6346297",
"0.6345724",
"0.63345486",
"0.6326921",
"0.63027006",
"0.63027006",
"0.6301728",
"0.6289624",
"0.6288485",
"0.62786937",
"0.6275883",
"0.6270946",
"0.6264386",
"0.62562776",
"0.6251911",
"0.62432146",
"0.622887",
"0.62122524",
"0.6209031",
"0.6205602",
"0.62025666",
"0.6146143",
"0.6143033",
"0.61393017",
"0.61259806",
"0.61135864",
"0.61120516",
"0.61012036",
"0.61007774",
"0.6089838",
"0.6088936",
"0.6087282",
"0.6075761",
"0.60742515",
"0.6069539",
"0.6067123",
"0.60540485",
"0.60467947",
"0.6041702",
"0.6038509",
"0.60367036",
"0.60359573",
"0.6035787",
"0.6035314",
"0.60302985",
"0.60114294",
"0.6010575",
"0.6010479",
"0.59885556",
"0.59850293",
"0.59845483",
"0.5967581",
"0.5966026",
"0.5963357",
"0.59517103",
"0.59478337",
"0.5946719",
"0.59305745",
"0.5928992",
"0.5925023",
"0.59237367",
"0.5906281",
"0.58848035",
"0.5871834",
"0.5858803"
] | 0.80215544 | 0 |
increment the number op wins of the player | public void setWins() {
this.wins++;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void incrementWin(){wins += 1;}",
"private void wins(Player player){\n int win = 1;\n player.setWins(win);\n }",
"public void incOWins() {\n oWins++;\n }",
"public int incrementNumberWins()\n\t{\n\t\treturn myNumberWins++;\n\t}",
"public static void playerWonInc(){\r\n\t\t_playerWon++;\r\n\t}",
"public void increaseWins(){\n this.numberOfWins=this.numberOfWins+1;\n }",
"@Override\n public void updateScore(int winner)\n {\n if (winner == 0)\n {\n playerOneScore++;\n }\n else\n {\n playerTwoScore++;\n }\n }",
"public int addWin() {\n\t\treturn ++this.numWins;\n\t}",
"int getWins() {return _wins;}",
"public void setWins(int value) {\n this.wins = value;\n }",
"public int addWinningGame() {\n\t\tgamesWon++;\n\t\treturn gamesWon;\n\t}",
"public void incGamesPlayed() {\n gamesPlayed++;\n }",
"public int getWins() {\n return wins;\n }",
"public int wins(String team) {\n return 0;\n }",
"public int getWins() {\n return wins;\n }",
"public void incrementTimesPlayed() {\r\n\t\ttimesPlayed++;\r\n\t}",
"public int incrementPlayerTurn() {\r\n\t\tthis.playerTurn++;\r\n\t\tif ( playerTurn >= 3 ) {\r\n\t\t\tthis.playerTurn = 0;\r\n\t\t}\r\n\t\t\r\n\t\treturn this.playerTurn;\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 win(int wager){\n bankroll += wager;\n }",
"public void increaseRound() {\n\t\tif(this.activePlayer==this.player1) {\n\t\t\tthis.setScorePlayer1(this.getScorePlayer1()+1);\n\t\t}else {\n\t\t\tthis.setScorePlayer2(this.getScorePlayer2()+1);\n\t\t}\n\t\t//On check si c'est le dernier round\n\t\tif (round != ROUNDMAX) {\n\t\tthis.round++;\n\t\t//On change un round sur deux le premier joueur de la manche\n\t\t\n\t\tif (0==round%2) {\n\t\t\t\n\t\t\tthis.setActivePlayer(player2);\n\t\t}else {\n\t\t\n\t\t\tthis.setActivePlayer(player1);\n\t\t}\n\t\t}else {\n\t\t\t//Sinon la partie est gagne\n\t\t\tdraw.win = true;\n\t\t}\n\t\t}",
"public void incrementNumberOfWins(TypeOfGames type) {\n statistics.get(type).incrementNumberOfWins();\n }",
"public int incrementScore(int player) {\n switch (player) {\n case PLAYER_A:\n return ++scoreA;\n case PLAYER_B:\n return ++scoreB;\n }\n return -1;\n }",
"public void setWins(int wins) {\n if (wins > 0) {\n this.wins = wins;\n }\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 void incXWins() {\n xWins++;\n }",
"public void increaseTurnCount()\n\t{\n\t\tturnNumber++;\n\t\tthis.currentPlayerID++;\n\t\tthis.currentPlayerID = this.currentPlayerID % this.playerList.size();\n\t}",
"public void incrTurn(){\n this.turn++;\n }",
"public void scoringTrick(){\n wizardRule();\n winner.tricksWon++;\n winner = new Player();\n }",
"public int getWinner() {return winner();}",
"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 void wonPoint(String playerName) {\n if (playerName.equals(player1Name))\n this.player1Score += 1;\n else\n this.player2Score += 1;\n }",
"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 incrementNumAttacked( ){\n this.numAttacked++;\n }",
"public short getWins() {\n\n return m_wins;\n }",
"public int getNumWins() {\n\t\treturn this.numWins;\n\t}",
"public static void enemyWonInc(){\r\n\t\t_enemyWon++;\r\n\t}",
"public int getF_Wins() {\n return f_wins;\n }",
"public void incrementMoves()\n {\n moves ++;\n }",
"public int winner() {\n if (player1Wins())\n return 1;\n if (player2Wins())\n return 2;\n return -1; // No one has won\n }",
"public void win(int player)\r\n\t{\r\n\t\taccountValue[player]+=pool;\r\n\t\tendRund();\r\n\t}",
"public void tellPlayerResult(int winner) {\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 Win(Player player){\n player.setBalance(player.getBalance() + player.getWager() * 1.5);\n System.out.println();\n System.out.println(player.getName() + \" wins!\");\n System.out.println(player.getName() + \"'s\" + \" balance is now \" + player.getBalance());\n }",
"public int wins(String team) {\n return getTeamByName(team).wins;\r\n }",
"public int getTotalOfwins() {\n return statistics.get(TypeOfGames.SIMGAME).getNumberOfWins()\n + statistics.get(TypeOfGames.EASYCOMPUTERGAME).getNumberOfWins()\n + statistics.get(TypeOfGames.HARDCOMPUTERGAME).getNumberOfWins();\n }",
"public int getWinner() {\n for (int i = 0; i < nrOfPlayers(); i++) {\n if (players.get(i).isFinished()) {\n\n // PLAYERLISTENER : Trigger playerEvent for player that WON\n for (PlayerListener listener : playerListeners) {\n PlayerEvent event = new PlayerEvent(this, players.get(i).getColour(), PlayerEvent.WON);\n listener.playerStateChanged(event);\n }\n return i;\n }\n }\n return -1;\n }",
"public void winGame() {\n this.isWinner = true;\n }",
"@Override\n\tpublic void win() {\n\t\t\n\t\tfround[fighter1]++;\n\t fplatz[fighter1]=Math.round((float)fplatz[fighter1]/2); \n\t \n\t\tnextRound();\n\t}",
"@Override\n\tpublic void updateWinAvGames(Player player) {\n\t\tint gamesWon = 0;\n\t\tList<Game> games = listGames(player);\n\t\tfor (int i=0;i<games.size();i++) { \n\t\t\tif(games.get(i).isWon())\n\t\t\t\tgamesWon++;\n\t\t}\n\t\tdouble winAverage=(double) gamesWon / (double) games.size();\n\t\tplayer.setWinAvg(winAverage);\n\t}",
"public void scoring(){\n for (int i=0; i< players.size(); i++){\n Player p = players.get(i);\n p.setScore(10*p.getTricksWon());\n if(p.getTricksWon() < p.getBid() || p.getTricksWon() > p.getBid()){\n int diff = Math.abs(p.getTricksWon() - p.getBid());\n p.setScore(p.getScore() - (10*diff));\n }\n if(p.getTricksWon() == p.getBid()){\n p.setScore(p.getScore() + 20);\n }\n }\n }",
"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 void win(int points, int extra)\n {\n this.roundsWins++;\n this.points += points;\n this.extras += extra;\n int[] record = {this.getFingers(), points, extra};\n this.roundHistory.add(record);\n }",
"public static void NextTurn() {\n if (num_of_players == turn)\n turn=0;\n turn++;\n }",
"public void updateScore(){\r\n if (this.isArtist || winners.contains(this)) {\r\n this.score += pointsGainedLastRound;\r\n }\r\n pointsGainedLastRound = 0;\r\n placeLastRound = 0;\r\n }",
"public int get_uWins()\r\n {\r\n return uWins;\r\n }",
"public void increaseScore(){\n this.inc.seekTo(0);\n this.inc.start();\n this.currentScore++;\n }",
"public void increase(String nickname) {\n\t\tint oldValue = this.getScore(nickname);\n\t\tscoreboard.replace(nickname, oldValue, oldValue + 1);\n\t}",
"private void increaseCurrentPlayerIndex() {\n\t\tcurrentPlayer++;\n\t\tif(currentPlayer>3)\n\t\t\tcurrentPlayer=0;\n\t}",
"public static void incrementScore() {\n\t\tscore++;\n\t}",
"public int getWinner() {\n return winner;\n }",
"public String win() {\r\n\t\tint blackCount = 0;\r\n\t\tint whiteCount = 0;\r\n\t\tfor (int i=0; i<piece.size(); i++) {\r\n\t\t\tif (piece.get(order[i]).chessPlayer.equals(\"black\")) {\r\n\t\t\t\tblackCount++;\r\n\t\t\t} else if (piece.get(order[i]).chessPlayer.equals(\"white\")) {\r\n\t\t\t\twhiteCount++;\r\n\t\t\t} else continue;\r\n\t\t}\r\n\t\tif (blackCount == 0) {\r\n\t\t\treturn \"white\";\r\n\t\t} else if (whiteCount == 0) {\r\n\t\t\treturn \"black\";\r\n\t\t} else return null;\r\n\t}",
"public int get_cWins()\r\n {\r\n return cWins;\r\n }",
"public void incrementScore(int inc){\n\t\tscoreboard.incrementScore(inc);\n\t}",
"public int getWinRecord()\n {\n return gamesWon;\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}",
"public static void incPieceCountTest() {\n \tOthelloBoard Board = new OthelloBoard(BOARD_SIZE,BOARD_SIZE);\n \tBoard.setBoard();\n \tBoard.incPieceCount();\n \tSystem.out.println(Board.getPieceCount());\n \tSystem.out.println(Board.move(\n \t\t\tOUTPUT_DECPIECE_TEST_X, OUTPUT_DECPIECE_TEST_Y, Board.WHITE_PIECE));\n \tBoard.m_Pieces[TEST_PIECE_X][TEST_PIECE_Y]=Board.WHITE_PIECE;\n \tSystem.out.println(\"\");\n \tSystem.out.println(\"\");\n\t\tBoard.checkWin();\n\t\tSystem.out.println(\"Valid inputs\");\n\t\tSystem.out.println(\"OthelloBoard.checkWin() - Begin\");\n\t\tSystem.out.println(\"Expected output: false\");\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"Actual output: \" + Board.checkWin());\n \tSystem.out.println(\"\");\n \t}",
"public void incrementNumMoves() {\n\t\tthis.moveMade = true;\n\t\tthis.numMoves++;\n\t}",
"public void updateMoves(){\r\n\t\tthis.moves = getMoves() + 1;\r\n\t}",
"public void incrementD_CurrentNumberOfTurns() {\n d_CurrentNumberOfTurns++;\n }",
"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 }",
"public int getOWins() {\n return oWins;\n }",
"private void addWin(LeagueTableEntry entry) {\r\n\t\tentry.setWins(entry.getWins() + 1);\r\n\t\tentry.setPoints(entry.getPoints() + 3);\r\n\t}",
"public void setWinner(int num){\r\n \twinner = num;\r\n }",
"@Override\n public int getWinner()\n {\n return currentPlayer;\n }",
"public static Integer getBotWins() {\n return humanVsBot.OWins + botVsHuman.XWins;\n }",
"void gameWin(Player player);",
"public int getOpponentScore(){\n return this.oppoScore;\n }",
"public String setWins(int Player){\n\t\t\tint winsUpdater = winsTracker[Player].getPlayer();\n\t\t\twinsUpdater++;\n\t\t\t\n\t\t\tfor(int i = 0; i<winsTracker.length;i++){\n\t\t\t\tif(i==Player){\n\n\t\t\t\t\twinsTracker[Player].setPlayer(winsUpdater);\n\t\t\t\t\tPlayer++;\n\t\t\t\t\treturn \"Player \"+Player+\"'s wins \" +winsUpdater;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn \"null\";\n\t\t}",
"public void nextPlayer() {\r\n if (currentPlayer == totalPlayer) {\r\n currentPlayer = 1;\r\n } else {\r\n currentPlayer++;\r\n }\r\n }",
"public void winAccountant()\r\n {\r\n switch (Win)\r\n {case 1: //A tie with scissors\r\n ties++; uSci++; cSci++;\r\n break;\r\n case 2: //A tie with paper\r\n ties++; uPap++; cPap++;\r\n break;\r\n case 3: //A tie with rock\r\n ties++; uRock++; cRock++;\r\n break;\r\n case 4: //A win for user with Scissors\r\n uWins++; uSci++; uSciW++;\r\n cPap++;\r\n break;\r\n case 5: //A win for user with Paper\r\n uWins++; uPap++; uPapW++;\r\n cRock++;\r\n break;\r\n case 6: //A win for user with Rock\r\n uWins++; uRock++; uRockW++;\r\n cSci++;\r\n break;\r\n case 7: //A win for Comp with Scissors\r\n cWins++; cSci++; cSciW++;\r\n uPap++;\r\n break;\r\n case 8: //A win for Comp with Paper\r\n cWins++; cPap++; cPapW++;\r\n uRock++;\r\n break;\r\n case 9: //A win for Comp with Rock\r\n cWins++; cRock++; cRockW++;\r\n uSci++;\r\n break;\r\n default: JOptionPane.showMessageDialog(null,\r\n \"Error: Unknown Win Value - WinCalc.winAccountant 207\", \r\n \"digiRPS - Error\", \r\n JOptionPane.ERROR_MESSAGE);\r\n break;}\r\n \r\n // Update the last three wins\r\n winThree=winTwo;\r\n winTwo=winOne;\r\n winOne=Win;\r\n \r\n }",
"public void gameWon()\n {\n ScoreBoard endGame = new ScoreBoard(\"You Win!\", scoreCounter.getValue());\n addObject(endGame, getWidth()/2, getHeight()/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 }",
"public void getScores(){\n String p1 = \"Player 1 has \" + Integer.toString(player1.getWins());\n String p2 = \"Player 2 has \" + Integer.toString(player2.getWins());\n String winner = \"tie\";\n if(player1.getWins()>player2.getWins()){\n winner = player1.getName() + \" wins!!!!\";\n }\n else if(player2.getWins()>player1.getWins()){\n winner = player2.getName() + \" Wins!!!\";\n }\n JOptionPane.showMessageDialog(null, (p1 + \"\\n\" + p2 + \"\\n\" + winner));\n }",
"public int getUserWonNumber() {\n\t\tint result = -1;\n\t\ttry {\n\t\t\tthis.rs = smt.executeQuery(\"SELECT count(id) FROM tp.gamerecord WHERE winner = (SELECT id FROM tp.player WHERE isAI = false)\");\n\t\t\tif(this.rs.next()) {\n\t\t\t\tresult = rs.getInt(1);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err.println(\"Query is Failed!\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn result;\n\t}",
"private void increaseScore() {\n this.game.getPlayers().values().forEach(ship -> {\n ship.increaseScore();\n if (ship.getScore() % 5 == 0) {\n this.asteroidsLimit++;\n }\n });\n }",
"public void updateWithPointWonBy(Player player) {\n if(managerTennisMatch.statusTennisMatch == \"ClassicalGame\") {\n if (player == player1) {\n managerTennisMatch.checkScoreAndUpdateGame(player, player2);\n } else {\n managerTennisMatch.checkScoreAndUpdateGame(player, player1);\n }\n } else if(managerTennisMatch.statusTennisMatch == \"TieBreakInProgress\") {\n player.setScore(player.getScore() + 1);\n if((player1.getScore() >= 7 && player1.getScore() - player2.getScore() >= 2) || (player2.getScore() >= 7 && player2.getScore() - player1.getScore() >= 2)) {\n tennisSetList.get(tennisSetList.size() - 1).getBaseGameList().add(new TieBreakGame(player));\n player1.setScore(0);\n player2.setScore(0);\n }\n } else {\n return;\n }\n }",
"public int wins(String team) {\n return wins[findTeamIndex(team)];\n }",
"public int totalGames() {\n return wins + losses + draws;\n }",
"public int trickWinner(){\n Card.NUMBER one = player1Play.getValue();\n Card.NUMBER two = player2Play.getValue();\n Card.NUMBER three = player3Play.getValue();\n Card.NUMBER four = player4Play.getValue();\n Card.SUIT oneSuit = player1Play.getSuit();\n Card.SUIT twoSuit = player2Play.getSuit();\n Card.SUIT threeSuit = player3Play.getSuit();\n Card.SUIT fourSuit = player4Play.getSuit();\n int[] value = new int[4];\n value[0] = Card.getValsVal(one, oneSuit, currentTrumpSuit);\n value[1] = Card.getValsVal(two, twoSuit, currentTrumpSuit);\n value[2] = Card.getValsVal(three, threeSuit, currentTrumpSuit);\n value[3] = Card.getValsVal(four, fourSuit, currentTrumpSuit);\n if(player1Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[0] += 10;\n }\n if(player2Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[1] += 10;\n }\n if(player3Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[2] += 10;\n }\n if(player4Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[3] += 10;\n }\n if(player1Play.getSuit() == currentTrumpSuit || value[0] == 7){\n value[0] += 20;\n }\n if(player2Play.getSuit() == currentTrumpSuit || value[1] == 7){\n value[1] += 20;\n }\n if(player3Play.getSuit() == currentTrumpSuit || value[2] == 7){\n value[2] += 20;\n }\n if(player4Play.getSuit() == currentTrumpSuit || value[3] == 7){\n value[3] += 20;\n }\n int winner = 0;\n int winVal = 0;\n for(int i = 0; i < 4; i++){\n if(value[i] > winVal){\n winVal = value[i];\n winner = i;\n }\n }\n return winner;\n }",
"public void incrementCoinCount() {\n coinCount++;\n System.out.println(\"Rich! Coin count = \" + coinCount);\n }",
"public int getWinner();",
"void win(Player player);",
"public int getNumPlayed()\n\t{\n\t\treturn numPlayed;\n\t}",
"public boolean topPlayerWon() {\n return winner == 2;\n }",
"private int winnerMoves(int combinedMoveCounter) {\n return (int) (Math.ceil((double) combinedMoveCounter / 2.0));\n }",
"private void getNumPlayers() {\n\t\tSystem.out.println(\"How many people are playing? (must be between \"+MIN_PLAYERS+\" and \"+MAX_PLAYERS+\")\");\n\t\tnumPlayers = GetInput.getInstance().anInteger(MIN_PLAYERS, MAX_PLAYERS);\n\t}",
"public int getWinner()\n {\n //Loops to get the winner\n for(int i = 0; i < NUM_PLAYERS; i++){\n if(isPlayerWinner(i)) return i; //This player is a winner\n }\n return -1; //no one is a winner so far\n }",
"private void paintWin(Graphics g) {\n\t\tif (gameWon){\n\t\t\tFont textFont = new Font(\"Monotype Corsiva\", Font.PLAIN, 30);\n\t\t\tg.setFont(textFont);\n\t\t\tif (winningPlayer == USER){\n\t\t\t\t//If player won\n\t\t\t\tg.drawString(\"You WON!\", DIMENSIONS_SIZE/2 - 50, DIMENSIONS_SIZE/2);\n\t\t\t\tplayerWins++;\n\t\t\t}\n\t\t\tif (winningPlayer == AI){\n\t\t\t\t//If player lost\n\t\t\t\tg.drawString(\"You LOST!\", DIMENSIONS_SIZE/2 - 50, DIMENSIONS_SIZE/2);\n\t\t\t\taiWins++;\n\t\t\t}\n\t\t}\n\t\tif (gameTie){\n\t\t\t//If it's a tie\n\t\t\tFont textFont = new Font(\"Monotype Corsiva\", Font.PLAIN, 30);\n\t\t\tg.setFont(textFont);\n\t\t\tg.drawString(\"It's a tie!\", DIMENSIONS_SIZE/2 - 50, DIMENSIONS_SIZE/2);\n\t\t\ttieGames++;\n\t\t}\n\t}",
"public void getWinnerRPS(int w) {\n switch(w) {\n case -1: // Error testing\n System.out.println(\"Error: Game not evaluated properly\");\n break;\n case 0: // Implement code for a draw\n //System.out.println(\"It's a draw!\");\n gameString = \"Both drew with \";\n gameString += addRPSPlayed(game.getPlayerPlays());\n break;\n case 1: // Implement code for player won\n //System.out.println(\"Player Won!\");\n gameString = \"Player Won with \";\n pScore++;\n gameString += addRPSPlayed(game.getPlayerPlays());\n break;\n case 2: // Implement code for computer won\n //System.out.println(\"Computer Won!\");\n gameString = \"Computer Won with \";\n cScore++;\n gameString += addRPSPlayed(game.getComputerPlays());\n break;\n }\n game.resetGame();\n }",
"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}"
] | [
"0.79844624",
"0.78883433",
"0.7792216",
"0.7743519",
"0.77274877",
"0.758497",
"0.75715274",
"0.74542236",
"0.7347628",
"0.7277514",
"0.72181463",
"0.7197276",
"0.71376556",
"0.7074415",
"0.7060264",
"0.6992812",
"0.6911719",
"0.6888573",
"0.68829954",
"0.6856888",
"0.68561083",
"0.6843779",
"0.6829239",
"0.67767453",
"0.67394644",
"0.6736265",
"0.67349356",
"0.6727639",
"0.6629183",
"0.6625419",
"0.66232246",
"0.661959",
"0.66182417",
"0.65971214",
"0.6575616",
"0.6558799",
"0.6554597",
"0.65317744",
"0.6522704",
"0.6516493",
"0.6511617",
"0.64991325",
"0.64985627",
"0.64843947",
"0.6445515",
"0.6443456",
"0.6440862",
"0.63988173",
"0.6395337",
"0.63933116",
"0.6358817",
"0.63498026",
"0.63458014",
"0.63356733",
"0.63283604",
"0.63254935",
"0.6322959",
"0.63135296",
"0.6309062",
"0.6300928",
"0.6295817",
"0.62898237",
"0.62882936",
"0.62850934",
"0.6280613",
"0.6278925",
"0.62783283",
"0.6261654",
"0.62571114",
"0.6237153",
"0.6230571",
"0.6223395",
"0.6209747",
"0.6208277",
"0.6207962",
"0.619214",
"0.618591",
"0.6170288",
"0.6168487",
"0.6165897",
"0.6164422",
"0.6160847",
"0.6152317",
"0.61500823",
"0.6147291",
"0.6142604",
"0.61377513",
"0.61299074",
"0.6125071",
"0.61218077",
"0.611441",
"0.6112312",
"0.61039835",
"0.610312",
"0.6097118",
"0.60903215",
"0.60854304",
"0.60851026",
"0.60791785",
"0.606068"
] | 0.79010576 | 1 |
increment the number of losses the player has made to total. | public void setLoses() {
this.losses++;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void increaseWins(){\n this.numberOfWins=this.numberOfWins+1;\n }",
"public void incOWins() {\n oWins++;\n }",
"public void incrementNumAttacked( ){\n this.numAttacked++;\n }",
"public void incrementWin(){wins += 1;}",
"public int incrementNumberWins()\n\t{\n\t\treturn myNumberWins++;\n\t}",
"public static void playerWonInc(){\r\n\t\t_playerWon++;\r\n\t}",
"private void addLoss(LeagueTableEntry entry) {\r\n\t\tentry.setLosses(entry.getLosses() + 1);\r\n\t}",
"@Override\n public void updateScore(int winner)\n {\n if (winner == 0)\n {\n playerOneScore++;\n }\n else\n {\n playerTwoScore++;\n }\n }",
"public void setWins() {\r\n this.wins++;\r\n }",
"public void increaseCount()\n {\n minesLeft++;\n repaint();\n if (minesLeft == 0 && minesFound == numMines)\n {\n endGame(true); //This could only trigger if the player had flagged too many squares,\n }\t\t\t\t\t\t//then went back and removed the erroneous ones.\n }",
"public void incGamesPlayed() {\n gamesPlayed++;\n }",
"public int losses(String team) {\n\n return 0;\n }",
"public void updatePlayerScore()\n\t{\n\t\tthis.score = (int)(getBalance() - 500) - (getNumberOfLoans()*500); \n\t}",
"public static void enemyWonInc(){\r\n\t\t_enemyWon++;\r\n\t}",
"public int getLosses() {\n return losses;\n }",
"private void increaseScore() {\n this.game.getPlayers().values().forEach(ship -> {\n ship.increaseScore();\n if (ship.getScore() % 5 == 0) {\n this.asteroidsLimit++;\n }\n });\n }",
"public void win(int wager){\n bankroll += wager;\n }",
"public void incXWins() {\n xWins++;\n }",
"public int getLosses() {\n return losses;\n }",
"public void increaseTurnCount()\n\t{\n\t\tturnNumber++;\n\t\tthis.currentPlayerID++;\n\t\tthis.currentPlayerID = this.currentPlayerID % this.playerList.size();\n\t}",
"public void addScore()\n {\n score += 1;\n }",
"public void incrementCoinCount() {\n coinCount++;\n System.out.println(\"Rich! Coin count = \" + coinCount);\n }",
"public void incDraws() {\n draws++;\n }",
"public void increaseScore(){\n this.inc.seekTo(0);\n this.inc.start();\n this.currentScore++;\n }",
"public void gameOver() {\n this.lives --;\n this.alive = false;\n }",
"public void incrementNumberOfWins(TypeOfGames type) {\n statistics.get(type).incrementNumberOfWins();\n }",
"public static void incrementScore() {\n\t\tscore++;\n\t}",
"public int addWin() {\n\t\treturn ++this.numWins;\n\t}",
"public void incrementKills() {\n stats.put(killsKey, (Integer)stats.get(killsKey)+1);\n }",
"public void incrementTimesPlayed() {\r\n\t\ttimesPlayed++;\r\n\t}",
"public void incrementScore(int amount){\n\t\tthis.score += amount;\n\t}",
"public void setLosses(int value) {\n this.losses = value;\n }",
"public void addOneToScore() {\r\n score++;\r\n }",
"public void increment() {\r\n\t\tcurrentSheeps++;\r\n\t}",
"public void incrMine() {\r\n\t\tthis.mineCount++;\r\n\t}",
"public int addWinningGame() {\n\t\tgamesWon++;\n\t\treturn gamesWon;\n\t}",
"private void wins(Player player){\n int win = 1;\n player.setWins(win);\n }",
"public void score(){\r\n\t\tint playerLocation = player.getLocationX();\r\n\t\tint obstacleX = obstacle.getLocationX();\r\n\t\tint obstacleY = obstacle.getLocationY();\r\n\r\n\r\n\t\tstr =\"\" + countCoins;\r\n\r\n\t\t//if you hit a coin, the number of points goes up by one.\r\n\t\tif(obstacleY == 280 && obstacleX==300 && playerLocation == 250){\r\n\t\t\tcountCoins++;\r\n\t\t}\r\n\t\tif(obstacleY== 450 && obstacleX==300 && playerLocation ==450){\r\n\t\t\tcountCoins++;\r\n\t\t}\r\n\r\n\t\t//if you hit the green monster, you lose one point.\r\n\t\tif((obstacleX-50) == 250 && (obstacleY-240) == 250 && playerLocation ==250){\r\n\t\t\tcountCoins--;\r\n\t\t}\r\n\r\n\t\t//if you hit the blue monster, you lose 3 points.\r\n\t\tif((obstacleX+180) == 480 && (obstacleY+180) == 250 && playerLocation ==450){\r\n\t\t\tcountCoins-=3;\r\n\t\t}\r\n\t}",
"private void scoreloss() {\n \tif (playerturn%2==0) {\n \tscoreplayer1 = scoreplayer1-1;}\n if(playerturn%2==1) {\n \tscoreplayer2 = scoreplayer2-1;\n }\n }",
"public void incrementTotal() {\n\t\t\ttotal++;\n\t\t}",
"public void incrementDeaths() {\n stats.put(deathsKey, (Integer)stats.get(deathsKey)+1);\n }",
"public void incrTurn(){\n this.turn++;\n }",
"private void Lose(Player player){\n player.setBalance(player.getBalance() - player.getWager());\n System.out.println();\n System.out.println(player.getName() + \" lost :/\");\n System.out.println(player.getName() + \"'s\" + \" balance is now \" + player.getBalance());\n }",
"public void updateScoreEnemies(int enemiesDestroyed) {\n\t\tscore = (int) (score + (enemiesDestroyed * VALUE_ENEMY));\n\t}",
"public static void adjustScoreIncrement() {\n\t\tint extraPoints = 0;\n\t\tif (!Snake.warpWallOn) {\n\t\t\textraPoints++;\n\t\t}\n\t\tif (Block.blocksOn) {\n\t\t\textraPoints++;\n\t\t}\n\t\tif (Snake.snakeGrowsQuickly) {\n\t\t\textraPoints++;\n\t\t}\n\t\tif (Snake.snakeGrowsReallyQuickly) {\n\t\t\textraPoints+=3;\n\t\t}\n\t\t// increment equals all the bonuses, starting at a minimum of 1. This decreases if user switches to easier modes. Bigness and Fastness are reduced by 1 each here to keep the amount of increase down; it could be pumped up for a really high-scoring game\n\t\tincrement = extraPoints + SnakeGame.getBigness()-1 + SnakeGame.getFastness()-1 + Snake.snakeSize/10 ;\n\t}",
"public void incrementD_CurrentNumberOfTurns() {\n d_CurrentNumberOfTurns++;\n }",
"public void incrementNumMoves() {\n\t\tthis.moveMade = true;\n\t\tthis.numMoves++;\n\t}",
"public void incrementMoves()\n {\n moves ++;\n }",
"public int incrementScore(int player) {\n switch (player) {\n case PLAYER_A:\n return ++scoreA;\n case PLAYER_B:\n return ++scoreB;\n }\n return -1;\n }",
"public void updateLives() {\r\n\r\n\t\tif (enhanced == true && (numScore >= 4000 && numLiveUpdated == 0) || (numScore >= 8000 && numLiveUpdated == 1)\r\n\t\t\t\t|| (numScore >= 12000 && numLiveUpdated == 2)) {\r\n\t\t\tlives += 1;\r\n\t\t\tnumLiveUpdated += 1;\r\n\t\t}\r\n\r\n\t}",
"void increaseScore(){\n\t\t currentScore = currentScore + 10;\n\t\t com.triviagame.Trivia_Game.finalScore = currentScore;\n\t }",
"public void updateScore(int playerScore){\n\t\tscore += playerScore;\n\t\tscoreTotalLabel.setText(\"\" + score);\n\t}",
"public void incrementAmountBought() {\n amountBought++;\n }",
"public void incrementCount() {\n\t\tcount++;\n\t}",
"public void incrementCount(){\n count+=1;\n }",
"public void counterAddup(){\n\t\tfor (int i=0; i<window.size(); i++){\n\t\t\tif ( window.get(i).acked == false ){\n\t\t\t\twindow.get(i).counter = window.get(i).counter+1;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn ;\n\t}",
"int getWins() {return _wins;}",
"protected int incModCount() {\n\n if (LOG.isDebugEnabled()) {\n\n Throwable trace = new Throwable(\"Stack Trace\");\n StackTraceElement elements[] = trace.getStackTrace();\n\n Logging.logCheckedDebug(LOG,\"Modification #\" + (getModCount() + 1) + \" to PeerAdv@\" + Integer.toHexString(System.identityHashCode(this))\n + \" caused by : \" + \"\\n\\t\" + elements[1] + \"\\n\\t\" + elements[2]);\n\n }\n\n return modCount.incrementAndGet();\n }",
"public void updateMoves(){\r\n\t\tthis.moves = getMoves() + 1;\r\n\t}",
"@Override\r\n\tpublic int increase() throws Exception {\n\t\treturn 0;\r\n\t}",
"public void incrementTotal(){\n total++;\n }",
"private void incrPositiveCount(){\n m_PositiveCount++;\n }",
"public void addCount()\n {\n \tcount++;\n }",
"public void updateScore(){\r\n if (this.isArtist || winners.contains(this)) {\r\n this.score += pointsGainedLastRound;\r\n }\r\n pointsGainedLastRound = 0;\r\n placeLastRound = 0;\r\n }",
"public void setBonusScore() {\r\n count = count+50;\r\n }",
"private void incrementCounters() {\n // update score by 5 every second\n ++scoreTimer;\n if (scoreTimer > scoreInterval) {\n score += 5;\n scoreTimer = 0;\n }\n\n // update speed by 100% every second\n ++speedTimer;\n if (speedTimer > speedInterval) {\n currentSpeed *= speedFactor;\n ++gameLevel;\n speedTimer = 0;\n }\n\n // increment rock timer (we create a new rock every 2 seconds)\n ++rockTimer;\n }",
"private void incrNegativeCount(){\n m_NegativeCount++;\n }",
"public void increase() {\r\n\r\n\t\tincrease(1);\r\n\r\n\t}",
"public void newPlayer() {\r\n\t\tthis.nbMonster ++;\r\n\t\tthis.nbPlayer ++;\r\n\t}",
"public void incrementCount() {\n count++;\n }",
"public void buyLife() {\n this.lives++;\n livesWereBought++;\n\n }",
"public void reduceCount()\n {\n minesLeft--;\n repaint();\n if (minesLeft == 0 && minesFound == numMines)\n {\n endGame(true);\n }\n }",
"public void wonPoint(String playerName) {\n if (playerName.equals(player1Name))\n this.player1Score += 1;\n else\n this.player2Score += 1;\n }",
"public void increaseNumHits() {\n\t\tthis.numHits += 1;\n\t}",
"public void addPoints(int earnedPoints) {score = score + earnedPoints;}",
"public void increaseCount(){\n myCount++;\n }",
"public void increase(String nickname) {\n\t\tint oldValue = this.getScore(nickname);\n\t\tscoreboard.replace(nickname, oldValue, oldValue + 1);\n\t}",
"public int checkNoOfExplosivesPlayerHolds () { return noOfExplosives; }",
"public void incrementScore(int inc){\n\t\tscoreboard.incrementScore(inc);\n\t}",
"void gainHealth(int points) {\n this.health += points;\n }",
"public void increaseScore(int p) {\n score += p;\n //Minden novelesnel megnezzuk, hogy elertuk-e a gyozelem szukseges pandaszamot.\n if(score >= 25 && game.getSelectedMode() == Game.GameMode.FinitPanda){\n //Ha elertuk, szolunk a jateknak hogy vege.\n game.SaveHighScore(score);\n game.gameOver();\n }\n }",
"public void increase() {\n balance.multiply(1.001);\n }",
"private void UpdateAdds() {\n Adds = (Level + CurrentHealth)/10;\n }",
"public void incPieceCount () {\n m_PieceCount++;\n\t}",
"public void updateHealth(int healthLost){\n\t\thealth -= healthLost;\n\t\thealthLeftLabel.setText(\"\" + health);\n\t}",
"public void incCount() { }",
"public void increseHitCount() {\n\r\n\t}",
"private void addPlayerSheild() {\n this.playerShield += 1;\n }",
"public void increase()\n {\n setCount(getCount() + 1);\n }",
"protected void incrementHunger()\n {\n food_level--;\n if(food_level <= 0) {\n setDead();\n }\n }",
"public int losses(String team) {\n return loss[findTeamIndex(team)];\n }",
"public void addPoints(int turnTotal)\n {\n currentScore += turnTotal;\n \n if (currentScore >= PigGame.GOAL)\n {\n gamesWon++;\n }\n }",
"public void growStats() {\r\n\t\tLIFE += increment;\r\n\t\tSTRENGTH += increment;\r\n\t}",
"public void scoring(){\n for (int i=0; i< players.size(); i++){\n Player p = players.get(i);\n p.setScore(10*p.getTricksWon());\n if(p.getTricksWon() < p.getBid() || p.getTricksWon() > p.getBid()){\n int diff = Math.abs(p.getTricksWon() - p.getBid());\n p.setScore(p.getScore() - (10*diff));\n }\n if(p.getTricksWon() == p.getBid()){\n p.setScore(p.getScore() + 20);\n }\n }\n }",
"public void addScore(){\n\n // ong nuoc 1\n if(birdS.getX() == waterPipeS.getX1() +50){\n bl = true;\n }\n if (bl == true && birdS.getX() > waterPipeS.getX1() + 50){\n score++;\n bl = false;\n }\n\n //ong nuoc 2\n if(birdS.getX() == waterPipeS.getX2() +50){\n bl = true;\n }\n if (bl == true && birdS.getX() > waterPipeS.getX2() + 50){\n score++;\n bl = false;\n }\n\n // ong nuoc 3\n if(birdS.getX() == waterPipeS.getX3() +50){\n bl = true;\n }\n if (bl == true && birdS.getX() > waterPipeS.getX3() + 50){\n score++;\n bl = false;\n }\n\n }",
"public void nextPlayer() {\r\n if (currentPlayer == totalPlayer) {\r\n currentPlayer = 1;\r\n } else {\r\n currentPlayer++;\r\n }\r\n }",
"public void incrementScore(int increment) {\n score = score + increment;\n }",
"public void incrementAmount() { amount++; }",
"public void scoringTrick(){\n wizardRule();\n winner.tricksWon++;\n winner = new Player();\n }",
"public int totalGames() {\n return wins + losses + draws;\n }"
] | [
"0.7250421",
"0.7215219",
"0.7110975",
"0.7076121",
"0.70566475",
"0.6943656",
"0.6857131",
"0.6829505",
"0.68228203",
"0.6773736",
"0.6767756",
"0.67604035",
"0.67318875",
"0.666528",
"0.6646865",
"0.66234577",
"0.66041476",
"0.65784514",
"0.6539926",
"0.6539591",
"0.6505484",
"0.649643",
"0.648302",
"0.64507675",
"0.64498335",
"0.64453524",
"0.6436291",
"0.6429629",
"0.64286554",
"0.6400599",
"0.6391935",
"0.6381544",
"0.6366954",
"0.6347829",
"0.6335224",
"0.6321343",
"0.63144714",
"0.6305122",
"0.62918955",
"0.629043",
"0.6284694",
"0.627792",
"0.6273728",
"0.6267167",
"0.6264775",
"0.6244303",
"0.62437105",
"0.62383807",
"0.6219377",
"0.62178004",
"0.62173223",
"0.62093884",
"0.6205736",
"0.6194383",
"0.6192485",
"0.6188125",
"0.6183123",
"0.61776984",
"0.61753505",
"0.61689264",
"0.6162831",
"0.61580324",
"0.61578476",
"0.61351854",
"0.6131119",
"0.612599",
"0.6123722",
"0.61174405",
"0.6115616",
"0.6104697",
"0.6087806",
"0.60805047",
"0.6075157",
"0.60691005",
"0.606736",
"0.60668623",
"0.606398",
"0.6058136",
"0.60570794",
"0.60498655",
"0.60433394",
"0.60423815",
"0.6041448",
"0.60409194",
"0.6039289",
"0.60355693",
"0.6033217",
"0.6032244",
"0.6024064",
"0.60156703",
"0.60145193",
"0.60103136",
"0.6007562",
"0.6001636",
"0.5998533",
"0.5990825",
"0.5990206",
"0.5984099",
"0.5969283",
"0.59570044"
] | 0.71232617 | 2 |
Change the icon of the player | public void changeIcon(Icon icon) {
this.iconId = icon.getId();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void changePlayPauseIcon(int which) {\n switch (which) {\n case 1://play\n mBinding.imageViewPlay.setImageResource(R.drawable.play_circle_icon);\n break;\n case 2://pause\n mBinding.imageViewPlay.setImageResource(R.drawable.pause_circle_icon);\n break;\n }\n }",
"public void setIcon(Image i) {icon = i;}",
"private void setIcon() {\n \n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"iconabc.png\")));\n }",
"public void setIcon(char c) {\r\n\ticon = c;\r\n\t}",
"public void changeIcon(){\r\n\t\tif (pacman.direction.equals(\"up\")){\r\n\t\t\tif (mouthOpen)\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/UpClosed.png\"));\r\n\t\t\telse\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/UpOpened.png\"));\r\n\t\t}\r\n\t\tif (pacman.direction.equals(\"down\")){\r\n\t\t\tif (mouthOpen)\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/DownClosed.png\"));\r\n\t\t\telse\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/DownOpened.png\"));\r\n\t\t}\r\n\t\tif (pacman.direction.equals(\"left\")){\r\n\t\t\tif (mouthOpen)\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/LeftClosed.png\"));\r\n\t\t\telse\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/LeftOpened.png\"));\r\n\t\t}\r\n\t\tif (pacman.direction.equals(\"right\")){\r\n\t\t\tif (mouthOpen)\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/RightClosed.png\"));\r\n\t\t\telse\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/RightOpened.png\"));\r\n\t\t}\r\n\t\t\r\n\t\tmouthOpen = !mouthOpen;\r\n\t}",
"public void setIcon(URL icon)\r\n {\r\n\tthis.icon = icon;\r\n }",
"private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"iconeframe.png\")));\n }",
"private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"iconeframe.png\")));\n }",
"public void setIcon(String icon) {\n this.icon = icon;\n }",
"public void setIcon(String icon) {\n this.icon = icon;\n }",
"public void updateIcon(boolean isPlaying) {\n\t\tplay_button.setImageResource(isPlaying ? R.drawable.ic_pause\n\t\t\t\t: R.drawable.ic_play);\n\t}",
"private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"icon.png\")));\n }",
"public void setIcon(Icon icon) {\n\t\t_coolBar.setIcon(icon);\n\t}",
"public void setIcon(Button buttonPlayed){\n if(game.getPlayerTurn() == player1){\n buttonPlayed.setBackgroundResource(drawable.o);\n buttonPlayed.setEnabled(false);\n }\n else{\n buttonPlayed.setBackgroundResource(drawable.cross);\n buttonPlayed.setEnabled(false);\n }\n }",
"public void setIcon(FSIcon icon) {\n this.icon = icon;\n }",
"private void setIcon(){\n this.setIconImage(new ImageIcon(getClass().getResource(\"/Resources/Icons/Icon.png\")).getImage());\n }",
"private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"/Icons/logo musica.png\")));\n }",
"@Override\n\tpublic void setIcon(Drawable icon) {\n\t\t\n\t}",
"private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"img/icon.png\")));\n }",
"@Override\n\tpublic void setIcon(int resId) {\n\t\t\n\t}",
"private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"croissant.png\")));\n }",
"public void changeIcon() {\n\t\t\tint choice = rand.nextInt(list.length);\n\t\t\tString iconName = list[choice].getName();\n\t\t\ticon = new ImageIcon(helpIconBase + File.separator + iconName);\n\t\t\tDimension dim = new Dimension(icon.getIconWidth() * 2, HEIGHT);\n\t\t\tsetPreferredSize(dim);\n\t\t\tsetMinimumSize(dim);\n\t\t}",
"private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"../Imagens/icon.png\")));\n }",
"private void setIcon() {\n this.setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"logo.ico\")));\n }",
"private void iconImage() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"icon.jpg\")));\n }",
"public void setIcon(final String icon) {\n\t\tthis.icon = icon;\n\t}",
"private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"podologia32x32.png\")));\n }",
"public void setIconMode(IconMode currentInventoryMode);",
"private void SetIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"Icon.png.png\")));\n }",
"public void setAvatar(int avatar) {\n\t\tthis.avatar = new ImageIcon(FileIO.readImageFile(this,\"/images/Player\" + avatar + \".png\"));\n\t\tthis.setIcon(this.avatar);\n\t}",
"void setIcon(){\n URL pathIcon = getClass().getResource(\"/sigepsa/icono.png\");\n Toolkit kit = Toolkit.getDefaultToolkit();\n Image img = kit.createImage(pathIcon);\n setIconImage(img);\n }",
"public void updateMute() {\n if (game.isMuted()) {\n mute.setIcon(muted);\n } else {\n mute.setIcon(unmuted);\n }\n }",
"private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"radarlogoIcon.png\")));\n }",
"public interface PluginIcons {\n\n Icon playFirst = IconLoader.getIcon(\"/icons/play_first.svg\", PluginIcons.class);\n Icon playPrevious = IconLoader.getIcon(\"/icons/play_back.svg\", PluginIcons.class);\n Icon play = IconLoader.getIcon(\"/icons/toolWindowRun.svg\", PluginIcons.class);\n Icon pause = IconLoader.getIcon(\"/icons/pause.svg\", PluginIcons.class);\n Icon playNext = IconLoader.getIcon(\"/icons/play_forward.svg\", PluginIcons.class);\n Icon playLast = IconLoader.getIcon(\"/icons/play_last.svg\", PluginIcons.class);\n Icon volume = IconLoader.getIcon(\"/icons/volume_up.svg\", PluginIcons.class);\n Icon volumeOff = IconLoader.getIcon(\"/icons/volume_off.svg\", PluginIcons.class);\n Icon autoPlayOff = IconLoader.getIcon(\"/icons/infinity.svg\", PluginIcons.class);\n Icon autoPlayOn = IconLoader.getIcon(\"/icons/infinity_on.svg\", PluginIcons.class);\n Icon showCodeOff = IconLoader.getIcon(\"/icons/showCode.svg\", PluginIcons.class);\n Icon showCodeOn = IconLoader.getIcon(\"/icons/showCode_on.svg\", PluginIcons.class);\n Icon jumpToCode = IconLoader.getIcon(\"/icons/stepOutCodeBlock.svg\", PluginIcons.class);\n Icon playCodecast = IconLoader.getIcon(\"/icons/play_codecast.svg\", PluginIcons.class);\n Icon refresh = IconLoader.getIcon(\"/icons/refresh.svg\", PluginIcons.class);\n}",
"public abstract String getIcon(int current_turn);",
"java.lang.String getGameIconUrl();",
"public void setIcon(Bitmap icon) {\n\t\tmIcon = icon;\n\t}",
"public char setIcon(char icon) {\n char previous = this.icon;\n this.icon = icon;\n return previous;\n }",
"private void setIcon(){\r\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"images.png\")));\r\n }",
"private void SetIcon() {\n \n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"appIcon.png\")));\n }",
"public void nextIcon() {\n Profile profile = null;\n String playerPicked = playerList.getSelectionModel().getSelectedItem();\n try {\n profile = Profile.readProfile(playerPicked);\n profile.setLevel();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n playerIcon.setOpacity(1);\n currentIndex++;\n if (currentIndex == 0) {\n playerIcon.setImage(icon0);\n } else if (currentIndex == 1) {\n playerIcon.setImage(icon1);\n if (!profilePicLevelCheck(currentIndex, profile.getLevel())) {\n playerIcon.setOpacity(0.5);\n }\n\n } else if (currentIndex == 2) {\n if (!profilePicLevelCheck(currentIndex, profile.getLevel())) {\n playerIcon.setOpacity(0.5);\n }\n playerIcon.setImage(icon2);\n\n } else if (currentIndex == 3) {\n playerIcon.setImage(icon3);\n if (!profilePicLevelCheck(currentIndex, profile.getLevel())) {\n playerIcon.setOpacity(0.5);\n }\n\n } else if (currentIndex == 4) {\n playerIcon.setImage(icon4);\n if (!profilePicLevelCheck(currentIndex, profile.getLevel())) {\n playerIcon.setOpacity(0.5);\n }\n\n } else if (currentIndex == 5) {\n playerIcon.setImage(icon5);\n if (!profilePicLevelCheck(currentIndex, profile.getLevel())) {\n playerIcon.setOpacity(0.5);\n }\n\n } else if (currentIndex == 6) {\n playerIcon.setImage(icon6);\n if (!profilePicLevelCheck(currentIndex, profile.getLevel())) {\n playerIcon.setOpacity(0.5);\n }\n\n } else if (currentIndex == 7) {\n playerIcon.setImage(icon0);\n currentIndex = 0;\n playerIcon.setOpacity(1);\n }\n }",
"public static void setVolatileUrlDrawable(ImageView icon,\n\t\t\tAccountClient starvingTheFoxPlayer) {\n\t\t\n\t}",
"@SuppressLint(\"NewApi\")\n\tvoid changeIcon()\n\t{\n\n\t\tif (CropImage.isExplicitCameraPermissionRequired(this)) {\n\t\t\trequestPermissions(new String[]{Manifest.permission.CAMERA,Manifest.permission.WRITE_EXTERNAL_STORAGE}, CropImage.CAMERA_CAPTURE_PERMISSIONS_REQUEST_CODE);\n\t\t} else {\n\t\t\tCropImage.startPickImageActivity(this);\n\t\t}\n\n\n\t}",
"private void setICon() {\r\n \r\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"IconImage_1.png\")));\r\n }",
"@Override\n\tpublic void onCompletion(MediaPlayer mp) {\n\t\tbuttonPlayPause.setImageResource(R.drawable.icon_play);\n\t}",
"public void setMainIcon(IconReference ref);",
"@Override\n public void setIconURI(String arg0)\n {\n \n }",
"public void changeImageMule(){\n\t\tsetIcon(imgm);\n\t}",
"@Override\r\n\t\tpublic void requestIcon(String arg0) {\n\t\t\t\r\n\t\t}",
"public void setIcon(Integer icon) {\n switch (icon) {\n case 0:\n this.icon = Icon.Schutzengel;\n break;\n case 1:\n this.icon = Icon.Person;\n break;\n case 2:\n this.icon = Icon.Institution;\n break;\n case 3:\n this.icon = Icon.Krankenhaus;\n break;\n case 4:\n this.icon = Icon.Polizei;\n break;\n default:\n this.icon = Icon.Feuerwehr;\n break;\n }\n }",
"public void setIcone(String icone) {\n this.icone = icone;\n }",
"private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"MainLogo.png\")));\n }",
"public String getIcon() {\n\t\treturn \"icon\";\n\t}",
"private void changeCurrentIcon(Icon icon) {\r\n\t\ttabbedPane.setIconAt(tabbedPane.getSelectedIndex(), icon);\r\n\t}",
"public void showIcon(){\n\n lockScreenImageView.animate()\n .alpha(1.0f)\n .setDuration(iconHidingAnimationTime);\n shiftIconToScreenSide(2, -delta/2,\n screenWidth - iconWidth - delta/2);\n }",
"void setIcon(Dialog dialog);",
"public char getPermanentIcon() {\n\t\tif(!playerMapped)\r\n\t\t\treturn ' ';\r\n\t\treturn permanentIcon;\t//TODO: this the part that will need to change if the permanent icon isn't the right one to display.)\r\n\t}",
"@Override\n public int getMuteIcon() {\n return R.drawable.ic_audio_alarm_mute;\n //End modify by yeqing.lv for XR6873798 un-use frameworks resource on 2018/08/25\n }",
"public void showButtonIcon( boolean b ) {\n if ( b ) {\n URL url = getClass().getClassLoader().getResource( \"images/Play16.gif\" );\n Icon icon = null;\n if ( url != null )\n icon = new ImageIcon( url );\n _run_btn.setIcon( icon );\n\n url = getClass().getClassLoader().getResource( \"images/Zoom16.gif\" );\n icon = null;\n if ( url != null )\n icon = new ImageIcon( url );\n _trace_btn.setIcon( icon );\n\n url = getClass().getClassLoader().getResource( \"images/Edit16.gif\" );\n icon = null;\n if ( url != null )\n icon = new ImageIcon( url );\n _edit_btn.setIcon( icon );\n\n url = getClass().getClassLoader().getResource( \"images/Information16.gif\" );\n icon = null;\n if ( url != null )\n icon = new ImageIcon( url );\n _props_btn.setIcon( icon );\n\n url = getClass().getClassLoader().getResource( \"images/Properties16.gif\" );\n icon = null;\n if ( url != null )\n icon = new ImageIcon( url );\n _options_btn.setIcon( icon );\n\n url = getClass().getClassLoader().getResource( \"images/Refresh16.gif\" );\n icon = null;\n if ( url != null )\n icon = new ImageIcon( url );\n _reload_btn.setIcon( icon );\n }\n else {\n _run_btn.setIcon( null );\n _trace_btn.setIcon( null );\n _edit_btn.setIcon( null );\n _props_btn.setIcon( null );\n _options_btn.setIcon( null );\n _reload_btn.setIcon( null );\n }\n }",
"public void setIconIndex(int value) {\n this.iconIndex = value;\n }",
"private void updateIcon(MarketIndex index) throws IOException {\n\n if(index.getImage()==null){\n String url = \"https://etoro-cdn.etorostatic.com/market-avatars/\"+index.getSymbol().toLowerCase()+\"/150x150.png\";\n byte[] bytes = utils.getBytesFromUrl(url);\n if(bytes!=null){\n if(bytes.length>0){\n byte[] scaled = utils.scaleImage(bytes, Application.STORED_ICON_WIDTH, Application.STORED_ICON_HEIGHT);\n index.setImage(scaled);\n }\n }else{ // Icon not found on etoro, symbol not managed on eToro or icon has a different name? Use standard icon.\n Image img = utils.getDefaultIndexIcon();\n bytes = utils.imageToByteArray(img);\n byte[] scaled = utils.scaleImage(bytes, Application.STORED_ICON_WIDTH, Application.STORED_ICON_HEIGHT);\n index.setImage(scaled);\n }\n }\n\n }",
"String getIcon();",
"String getIcon();",
"@Source(\"update.gif\")\n\tpublic DataResource updateIconDisabledResource();",
"public Builder setIcon(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n icon_ = value;\n onChanged();\n return this;\n }",
"protected Image loadIcon() {\n /*\n * Icon by http://www.artua.com/, retrieved here:\n * http://www.iconarchive.com/show/star-wars-icons-by-artua.html\n */\n return new ImageLoader().loadIcon(\"moon.png\");\n }",
"public Builder setIcon(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n icon_ = value;\n onChanged();\n return this;\n }",
"private void updatePreferenceIcon() {\n int alarmVolume = mAudioManager.getStreamVolume(AudioManager.STREAM_ALARM);\n if (mPreference != null) {\n mPreference.showIcon(alarmVolume == 0 ?R.drawable.ic_audio_alarm_mute : R.drawable.ic_audio_alarm);\n }\n }",
"@Override\n public void onCompletion(MediaPlayer mp) {\n buttonPlayPause.setImageResource(R.mipmap.play);\n }",
"public void registerIcons(IIconRegister iconRegister) {\n/* 51 */ this.itemIcon = iconRegister.registerIcon(\"forgottenrelics:Soul_Tome\");\n/* */ }",
"public void setTeachingAvatar(){\n\t\tavatar.setIcon(new ImageIcon(\"img/Asking.png\"));\n\t}",
"public void establecerIcono(){\n ActionBar actionBar = getSupportActionBar();\n\n //Establecemos el icono en la ActionBar\n actionBar.setIcon(R.mipmap.ic_be_score);\n actionBar.setDisplayShowHomeEnabled(true);\n\n // Activar flecha ir atrás (ir a la Parent Activity declarada en el manifest)\n //actionBar.setDisplayHomeAsUpEnabled(true);\n }",
"public void lightIcons() {\n teamPhoto.setImage((new Image(\"/Resources/Images/emptyTeamLogo.png\")));\n copyIcon.setImage((new Image(\"/Resources/Images/black/copy_black.png\")));\n helpPaneIcon.setImage((new Image(\"/Resources/Images/black/help_black.png\")));\n if (user.getUser().getProfilePhoto() == null) {\n accountPhoto.setImage((new Image(\"/Resources/Images/black/big_profile_black.png\")));\n }\n }",
"public String getIcon(int current_turn){\r\n if(isBlue()){\r\n return \"BluePlus.png\";\r\n }\r\n return \"RedPlus.png\";\r\n }",
"private void changeIcon(SingleDocumentModel model) {\n\t\tif (model.isModified()) {\n\t\t\tsetIconAt(models.indexOf(model), createIcon(\"icons/red.png\"));\n\t\t}else {\n\t\t\tsetIconAt(models.indexOf(model), createIcon(\"icons/green.png\"));\n\t\t}\n\t}",
"public void setIcons(CKDataModel data) {\r\n\r\n\t//CKDrawerTab icons = new CKDrawerTab(CharacterIcons, DrawerSides.LEFT, 0.0, 0.0, 350.0, 170.0, \"ckSnapInterpreter/headshot.png\");\r\n\t\r\n\t\tCKGridActor[] players = data.getTeam().getCharacters();\r\n\t\tSystem.out.println(\"This team is named \" + data.getTeam().toString() + \" and has \" + data.getTeam().getCharacters().length + \" players.\"); //team.tostring\r\n\t\tEffect effect = new DropShadow();//new Glow(.8);\r\n\r\n\t\tfor (CKGridActor p : players ) \r\n\t\t\tif(p != null) {\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n \t\t\t\t\r\n\t\t\t\t\tButton b = new Button(p.getName(), new ImageView(p.getFXPortrait()));\r\n\t\t\t\t\tb.setContentDisplay(ContentDisplay.TOP);\r\n\t\t\t\t\tb.setOnAction(e -> { data.setPlayer(p); });\r\n\t\t\t\t\t\r\n\t\t\t\t\tdata.getActivePlayerProperty()\r\n\t\t\t\t\t\t.registerObserver(\r\n\t\t\t\t\t\t\te->{\r\n\t\t\t\t\t\t\t\tif(e==p)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tb.setEffect(effect);\r\n\t\t\t\t\t\t\t\t\tdata.setPlayer(p);\r\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"I was picked\"+e);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tb.setEffect(null);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\r\n \t\t\t\tthis.getChildren().add(b);\r\n \t\t\t\tthis.setAlignment(Pos.CENTER);\r\n\t\t\t\t}\r\n\t\t\t\tcatch (NullPointerException n) {\r\n\t\t\t\t\tSystem.out.println(\"Character Icon asset was not found\" + n);\r\n\t\t\t\t}\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t//return this;\r\n\t}",
"public void setFrameIcon()\n {\n URL imageURL = HelpWindow.class.getResource(\"/resources/images/frameicon.png\");\n Image img = Toolkit.getDefaultToolkit().getImage(imageURL);\n \n if(imageURL != null)\n {\n ImageIcon icon = new ImageIcon(img);\n super.setIconImage(icon.getImage());//window icon\n }\n }",
"public void nextCarIcon() {\n Profile profile = null;\n String playerPicked = playerList.getSelectionModel().getSelectedItem();\n try {\n profile = Profile.readProfile(playerPicked);\n profile.setLevel();\n } catch (IOException e) {\n e.printStackTrace();\n }\n carIcon.setOpacity(1);\n currentIndexCar++;\n if (currentIndexCar == 0) {\n carIcon.setImage(carIcon0);\n } else if (currentIndexCar == 1) {\n carIcon.setImage(carIcon1);\n if (!carIconLevelCheck(\"truck\", profile.getLevel())) {\n carIcon.setOpacity(0.5);\n }\n } else if (currentIndexCar == 2) {\n carIcon.setImage(carIcon2);\n if (!carIconLevelCheck(\"bike\", profile.getLevel())) {\n carIcon.setOpacity(0.5);\n }\n } else if (currentIndexCar == 3) {\n if (!carIconLevelCheck(\"sportscar\", profile.getLevel())) {\n carIcon.setOpacity(0.5);\n }\n carIcon.setImage(carIcon3);\n } else if (currentIndexCar == 4) {\n currentIndexCar = 0;\n carIcon.setImage(carIcon0);\n carIcon.setOpacity(1);\n }\n }",
"Icon getIcon();",
"java.lang.String getIcon();",
"java.lang.String getIcon();",
"public LiveBtn() {\n\t\tsuper(\"L\");\n\t\tURL iconUrlLive = getClass().getResource(\"/res/icons/record.png\");\n\t\tif (iconUrlLive != null) {\n\t\t\tImageIcon icon = new ImageIcon(iconUrlLive);\n\t\t\tImage img = icon.getImage();\n\t\t\tImage newimg = img.getScaledInstance(20, 20, java.awt.Image.SCALE_SMOOTH);\n\t\t\tImageIcon newIcon = new ImageIcon(newimg);\n\t\t\tthis.setIcon(newIcon);\n\t\t\tthis.setText(\"\");\n\t\t\tthis.setBorderPainted(false);\n\t\t}\n\t}",
"public void iconSetup(){\r\n chessboard.addRedIcon(\"Assets/PlusR.png\");\r\n chessboard.addRedIcon(\"Assets/TriangleR.png\");\r\n chessboard.addRedIcon(\"Assets/ChevronR.png\");\r\n chessboard.addRedIcon(\"Assets/SunR.png\"); \r\n chessboard.addRedIcon(\"Assets/ArrowR.png\");\r\n \r\n chessboard.addBlueIcon(\"Assets/PlusB.png\");\r\n chessboard.addBlueIcon(\"Assets/TriangleB.png\");\r\n chessboard.addBlueIcon(\"Assets/ChevronB.png\");\r\n chessboard.addBlueIcon(\"Assets/SunB.png\");\r\n chessboard.addBlueIcon(\"Assets/ArrowB.png\");\r\n }",
"public void setIcon(String icon) {\n this.icon = icon == null ? null : icon.trim();\n }",
"public void setIcon(String icon) {\n this.icon = icon == null ? null : icon.trim();\n }",
"private void updateTurnIconCharacteristic() {\n String editTextValue = ((EditText) view.findViewById(R.id.turnIconEditText)).getText().toString();\n String turnIcon = \"\";\n try {\n turnIcon = Integer.toHexString(Integer.parseInt(editTextValue));\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n\n //Set visibility and the turnIcon\n turnIconCharacteristic_value[16] = visibility;\n turnIconCharacteristic_value[17] = Byte.parseByte(turnIcon);\n turnIconCharacteristic.setValue(turnIconCharacteristic_value);\n }",
"public void setIcon (playn.core.Image... icons) {\n assert icons.length > 0;\n List<BufferedImage> images = new ArrayList<BufferedImage>();\n for (playn.core.Image icon : icons) images.add(((JavaImage)icon).bufferedImage());\n _frame.setIconImages(images);\n }",
"public String getIcon() {\n return icon;\n }",
"public String getIcon() {\n return icon;\n }",
"public String getIcon() {\n return icon;\n }",
"public String getIcon() {\n return icon;\n }",
"public void setXpeIcon(String value) {\n setAttributeInternal(XPEICON, value);\n }",
"public void setIconMode(IconMode mode){\n\t\tcurrentMode = mode;\n\t\t\n\t\tif (mode==IconMode.Text)\n\t\t{\n\t\t\tsuper.setWidget(titlelab);\n\t\t\tsuper.setHeight(\"30px\");\n\t\t\t\n\t\t} \n\t\tif (mode==IconMode.Image)\n\t\t{\n\t\t\t//set if not loading\n\t\t\tif (loadedPic){\n\t\t\t\tsuper.setWidget(Picture);\n\t\t\t\tsuper.setHeight(\"100px\");\n\t\t\t}\n\t\t\t\n\t\t} \n\t\tif (mode==IconMode.CaptionedImage)\n\t\t{\n\t\t\t\n\t\t} \n\t}",
"private void setIcons() {\r\n \t\r\n \tbackground = new ImageIcon(\"images/image_mainmenu.png\").getImage();\r\n \tstart = new ImageIcon(\"images/button_start.png\");\r\n \thowto = new ImageIcon(\"images/button_howtoplay.png\");\r\n \toptions = new ImageIcon(\"images/button_options.png\");\r\n \tlboards = new ImageIcon(\"images/button_lboards.png\");\r\n \texit = new ImageIcon(\"images/button_exit.png\");\t\r\n }",
"public Icon getIcon();",
"public void setSmallIcon(ImageDescriptor icon) {\n if (icon != iconSmall) {\n ImageDescriptor oldIcon = iconSmall;\n iconSmall = icon;\n listeners.firePropertyChange(PROPERTY_SMALL_ICON, oldIcon, icon);\n }\n }",
"private void muerte(){\r\n\t\t for(Icon i:sprites.elementAt(4))\r\n\t \t {\r\n\t \t\t grafico.setIcon(i);\r\n\t \t\t try {\r\n\t\t\t\tThread.sleep(300);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t \t }\r\n\t \t grafico.setIcon(null);\r\n\t}",
"private void setIcon(String icon, boolean isSmall) {\n org.netbeans.modules.j2ee.dd.api.common.Icon oldIcon = getIcon();\n if (oldIcon==null) {\n if (icon!=null) {\n try {\n org.netbeans.modules.j2ee.dd.api.common.Icon newIcon = (org.netbeans.modules.j2ee.dd.api.common.Icon) createBean(\"Icon\");\n if (isSmall) newIcon.setSmallIcon(icon);\n else newIcon.setLargeIcon(icon);\n setIcon(newIcon);\n } catch(ClassNotFoundException ex){}\n }\n } else {\n if (icon==null) {\n if (isSmall) {\n oldIcon.setSmallIcon(null);\n if (oldIcon.getLargeIcon()==null) setIcon(null);\n } else {\n oldIcon.setLargeIcon(null);\n if (oldIcon.getSmallIcon()==null) setIcon(null);\n }\n } else {\n if (isSmall) oldIcon.setSmallIcon(icon);\n else oldIcon.setLargeIcon(icon);\n }\n } \n }",
"private void volumeIconChanger() {\n\t\tif (volume == 0.0) {\n\t\t\tmuteIcon.setVisible(true);\n\t\t\tvolumeLowIcon.setVisible(false);\n\t\t\tvolumeMidIcon.setVisible(false);\n\t\t\tvolumeHighIcon.setVisible(false);\n\t\t} else if (volume > 0 && volume <= 0.3) {\n\t\t\tmuteIcon.setVisible(false);\n\t\t\tvolumeLowIcon.setVisible(true);\n\t\t\tvolumeMidIcon.setVisible(false);\n\t\t\tvolumeHighIcon.setVisible(false);\n\t\t} else if (volume > 0.3 && volume <= 0.7) {\n\t\t\tmuteIcon.setVisible(false);\n\t\t\tvolumeLowIcon.setVisible(false);\n\t\t\tvolumeMidIcon.setVisible(true);\n\t\t\tvolumeHighIcon.setVisible(false);\n\t\t} else if (volume > 0.7 && volume <= 1) {\n\t\t\tmuteIcon.setVisible(false);\n\t\t\tvolumeLowIcon.setVisible(false);\n\t\t\tvolumeMidIcon.setVisible(false);\n\t\t\tvolumeHighIcon.setVisible(true);\n\t\t}\n\t}",
"private void setIcon(ViewHolder holder, String heroIconName){\n if(heroIconName.equals(\"genji\"))holder.mIconView.setImageResource(R.mipmap.icon_genji);\n if(heroIconName.equals(\"mccree\"))holder.mIconView.setImageResource(R.mipmap.icon_mccree);\n if(heroIconName.equals(\"pharah\"))holder.mIconView.setImageResource(R.mipmap.icon_pharah);\n if(heroIconName.equals(\"reaper\"))holder.mIconView.setImageResource(R.mipmap.icon_reaper);\n if(heroIconName.equals(\"soldier76\"))holder.mIconView.setImageResource(R.mipmap.icon_soldier76);\n if(heroIconName.equals(\"sombra\"))holder.mIconView.setImageResource(R.mipmap.icon_sombra);\n if(heroIconName.equals(\"tracer\"))holder.mIconView.setImageResource(R.mipmap.icon_tracer);\n if(heroIconName.equals(\"bastion\"))holder.mIconView.setImageResource(R.mipmap.icon_bastion);\n if(heroIconName.equals(\"hanzo\"))holder.mIconView.setImageResource(R.mipmap.icon_hanzo);\n if(heroIconName.equals(\"junkrat\"))holder.mIconView.setImageResource(R.mipmap.icon_junkrat);\n if(heroIconName.equals(\"mei\"))holder.mIconView.setImageResource(R.mipmap.icon_mei);\n if(heroIconName.equals(\"torbjorn\"))holder.mIconView.setImageResource(R.mipmap.icon_torbjorn);\n if(heroIconName.equals(\"widowmaker\"))holder.mIconView.setImageResource(R.mipmap.icon_widowmaker);\n if(heroIconName.equals(\"d.va\"))holder.mIconView.setImageResource(R.mipmap.icon_dva);\n if(heroIconName.equals(\"reinhardt\"))holder.mIconView.setImageResource(R.mipmap.icon_reinhardt);\n if(heroIconName.equals(\"roadhog\"))holder.mIconView.setImageResource(R.mipmap.icon_roadhog);\n if(heroIconName.equals(\"winston\"))holder.mIconView.setImageResource(R.mipmap.icon_winston);\n if(heroIconName.equals(\"zarya\"))holder.mIconView.setImageResource(R.mipmap.icon_zarya);\n if(heroIconName.equals(\"ana\"))holder.mIconView.setImageResource(R.mipmap.icon_ana);\n if(heroIconName.equals(\"lucio\"))holder.mIconView.setImageResource(R.mipmap.icon_lucio);\n if(heroIconName.equals(\"mercy\"))holder.mIconView.setImageResource(R.mipmap.icon_mercy);\n if(heroIconName.equals(\"symmetra\"))holder.mIconView.setImageResource(R.mipmap.icon_symmetra);\n if(heroIconName.equals(\"zenyatta\"))holder.mIconView.setImageResource(R.mipmap.icon_zenyatta);\n }"
] | [
"0.7329738",
"0.7268725",
"0.69517696",
"0.6945128",
"0.68804634",
"0.68798065",
"0.68730736",
"0.68730736",
"0.6865951",
"0.6865951",
"0.68551433",
"0.6853191",
"0.6775455",
"0.67745095",
"0.6747055",
"0.6737808",
"0.67118865",
"0.67102504",
"0.6699497",
"0.66897124",
"0.6684803",
"0.6680213",
"0.6670134",
"0.6665369",
"0.6662215",
"0.6654541",
"0.66489875",
"0.66473645",
"0.6616055",
"0.6605835",
"0.65668446",
"0.6566149",
"0.6551206",
"0.6547279",
"0.65374553",
"0.65306604",
"0.6512973",
"0.65037024",
"0.6488765",
"0.6477685",
"0.64280987",
"0.6427055",
"0.6390701",
"0.6390179",
"0.6387006",
"0.6379997",
"0.6367367",
"0.6356508",
"0.6338827",
"0.6321818",
"0.62956136",
"0.6290242",
"0.62753093",
"0.6267172",
"0.6223751",
"0.6208913",
"0.61987305",
"0.61963856",
"0.6191661",
"0.61878985",
"0.6180794",
"0.6180154",
"0.6180154",
"0.61756486",
"0.61732644",
"0.6158528",
"0.61429155",
"0.61323965",
"0.61197245",
"0.61143225",
"0.60994697",
"0.6089224",
"0.6078102",
"0.60734695",
"0.60674345",
"0.6062781",
"0.6055142",
"0.6030426",
"0.6026397",
"0.60180813",
"0.60180813",
"0.6012739",
"0.60049856",
"0.5992006",
"0.5992006",
"0.59860927",
"0.5981983",
"0.59794706",
"0.59794706",
"0.59794706",
"0.59794706",
"0.59773487",
"0.5962196",
"0.5949134",
"0.5945366",
"0.59431446",
"0.5921971",
"0.5920787",
"0.5891589",
"0.58906794"
] | 0.68774384 | 6 |
set the id of the player | public void setId(int id) {
this.id = id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setPlayerId(int playerId);",
"public void setPlayerId(String s) {\n\t\tplayerId = s;\n\t}",
"public Builder setPlayerId(long value) {\n \n playerId_ = value;\n onChanged();\n return this;\n }",
"public void setPlayerId(Integer playerId) {\n this.PlayerId = playerId;\n }",
"public Builder setPlayerId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n playerId_ = value;\n onChanged();\n return this;\n }",
"java.lang.String getPlayerId();",
"public int getId() {\n return playerId;\n }",
"public void setID(final PlayerID ID)\r\n\t{\r\n\t\tthis.ID = ID;\r\n\t}",
"int getPlayerId();",
"int getPlayerId();",
"public void setPlayer(Player player) {\n this.currentPlayer = player;\n }",
"public int getIdPlayer() {\n\t\treturn idPlayer;\n\t}",
"private void setId(int value) {\n \n id_ = value;\n }",
"Player(int id, String name){\n\t\tthis();\n\t\tthis.id = id;\n\t\tthis.name = name;\n\t}",
"private void setId(int value) {\n \n id_ = value;\n }",
"public void setPlayer(Player player) {\r\n this.player = player;\r\n }",
"public String getId() {\n\t\treturn this.playerid;\n\t}",
"long getPlayerId();",
"public int getPlayerId() {\r\n\t\treturn playerId;\r\n\t}",
"public int getPlayerId();",
"public void setPlayer(Player player) {\n this.player = player;\n }",
"public void setPlayer(Player player) {\n this.player = player;\n }",
"void setId(ID id);",
"public String getPlayerId() {\n\t\treturn playerId;\n\t}",
"void setId(int id);",
"public void setPlayer(int play)\n {\n this.player=play;\n }",
"public void setPlayer(Player _player) { // beallit egy ezredest az adott mapElementre, ha az rajta van\n player = _player;\n }",
"public long getPlayerId() {\n return playerId_;\n }",
"void setId(String id);",
"void setId(String id);",
"void setId(String id);",
"public void assignId(int id);",
"private void setPlayer() {\n player = Player.getInstance();\n }",
"void setId(int val);",
"private void setId(int value) {\n \n id_ = value;\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"public void setPlayer(String player) {\r\n this.player = player;\r\n }",
"public void setId(int id){\r\n this.id = id;\r\n }",
"public void setId(ID id){\r\n\t\tthis.id = id;\r\n\t}",
"public long getPlayerId() {\n return playerId_;\n }",
"public void setPlayer(Player player) {\n\t\tthis.player = player;\r\n\t}",
"public void setCurrentPlayerPokemon(int newID)\r\n {\r\n currentPlayerPokemon = newID;\r\n }",
"public void setId(Object id) {\n this.id = id;\n }",
"public void setId(Object id) {\n this.id = id;\n }",
"public void setId(final int id);",
"public void setId (String id);",
"void setId(int id) {\n this.id = id;\n }",
"public void setId(ID id)\n {\n this.id = id;\n }",
"void setId(final String id);",
"public void setId(int value) {\r\n this.id = value;\r\n }",
"void setId(java.lang.String id);",
"public PlayerID getID()\r\n\t{\r\n\t\treturn ID;\r\n\t}",
"public void setId(int id){ this.id = id; }",
"public void setId(String anId) {\n _theId = anId;\n }",
"public void setPlayerID(int playerID) {\n\t\tthis.playerID = playerID;\n\t}",
"public void setId(String id) {\n }",
"public void setId(String id)\r\n/* 19: */ {\r\n/* 20:17 */ this.id = id;\r\n/* 21: */ }",
"public void setId(String id);",
"public void setId(String id);",
"@Override\n\tpublic void setPlayer(Player player) {\n\n\t}",
"public void setPlayer(Player p) {\n\t\tplayer = p;\n\t}",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(final String id);",
"public void setId(final String id);",
"public void setId (String id)\n {\n _id = id;\n }",
"public void setId(java.lang.String value) {\n this.id = value;\n }",
"public void setId(java.lang.String value) {\n this.id = value;\n }",
"public void setId(java.lang.String value) {\n this.id = value;\n }",
"public int getPlayerID() {\r\n return playerID;\r\n }",
"public void setId(int id) { this.id = id; }",
"public void setId(int id) { this.id = id; }",
"public void setId(int id)\n {\n this.id=id;\n }",
"public void setId(int id);",
"public void setId(int id);",
"public void setId(int value) {\n this.id = value;\n }",
"public int getPlayerID() {\r\n\t\treturn playerID;\r\n\t}",
"public int getPlayerID() {\r\n\t\treturn playerID;\r\n\t}",
"void setId(Integer id);",
"public void setPlayer(Player player) {\n\t\tthis.player = player;\n\t}",
"public void setId(long id);",
"public void setId(long id);",
"public void setId(long id);",
"public void setId(long id);",
"public void setId(java.lang.String param) {\n localIdTracker = true;\n\n this.localId = param;\n }",
"public void setId(java.lang.String param) {\n localIdTracker = true;\n\n this.localId = param;\n }",
"public void setId (int id) {\r\n\t\tthis.id=id;\r\n\t}",
"@Override\n\tpublic void setId(int id) {\n\n\t}",
"@Override\r\n\tpublic void setId(String id) {\n\t\t\r\n\t}"
] | [
"0.8420678",
"0.7577188",
"0.72982246",
"0.7243349",
"0.71774673",
"0.7142288",
"0.71233344",
"0.7097574",
"0.7040928",
"0.7040928",
"0.6940916",
"0.69079",
"0.69029033",
"0.6897169",
"0.6891108",
"0.6821764",
"0.68178844",
"0.68166584",
"0.67938036",
"0.6784199",
"0.6769097",
"0.6742293",
"0.67329264",
"0.6730058",
"0.6727708",
"0.67124546",
"0.6709475",
"0.66953355",
"0.66897005",
"0.66897005",
"0.66897005",
"0.6681486",
"0.66785616",
"0.6676849",
"0.666216",
"0.666216",
"0.666216",
"0.666216",
"0.666216",
"0.666216",
"0.666216",
"0.6660955",
"0.6649118",
"0.66470605",
"0.664519",
"0.6645097",
"0.66428506",
"0.66409516",
"0.66409516",
"0.6638382",
"0.66156864",
"0.6613801",
"0.660912",
"0.6608935",
"0.66087556",
"0.65852076",
"0.657895",
"0.65758854",
"0.6574863",
"0.6574393",
"0.6573173",
"0.65550566",
"0.65513045",
"0.65513045",
"0.6544492",
"0.6542815",
"0.65351164",
"0.65351164",
"0.65351164",
"0.65351164",
"0.65351164",
"0.65351164",
"0.65351164",
"0.65351164",
"0.65351164",
"0.6534546",
"0.6534546",
"0.6526944",
"0.6522838",
"0.6522838",
"0.6522838",
"0.6521882",
"0.6521354",
"0.6521354",
"0.65210056",
"0.65171313",
"0.65171313",
"0.65167284",
"0.6515335",
"0.6515335",
"0.65123487",
"0.65088665",
"0.65085125",
"0.65085125",
"0.65085125",
"0.65085125",
"0.65009636",
"0.65009636",
"0.6499829",
"0.64985895",
"0.6491028"
] | 0.0 | -1 |
Making json object request | public void postAPICall() {
/**
* String Request
*/
JSONObject mJsonObjectRequest = null;
try {
mJsonObjectRequest = new JSONObject(parameters);
} catch (JSONException e) {
e.printStackTrace();
}
JsonRequest<JSONArray> request = new JsonRequest<JSONArray>(Request.Method.POST,
(AppConstants.APP_WEBSERVICE_API_URL + GlobalKeys.ORDER_STATUS_INFO).trim(),
mJsonObjectRequest.toString(),
new Response.Listener<JSONArray>() {
@Override
public void onResponse(JSONArray jsonArray) {
System.out.println(jsonArray.toString());
responseListener.onSuccessOfResponse(jsonArray.toString());
}
},
new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError volleyError) {
try {
Response<JSONObject> errorResponse = Response.error(volleyError);
String errorString = new String(errorResponse.error.networkResponse.data,
HttpHeaderParser
.parseCharset(errorResponse.error.networkResponse.headers));
JSONObject errorJsonObj = new JSONObject(errorString);
WebserviceAPIErrorHandler.getInstance()
.VolleyErrorHandler(volleyError, mActivity);
responseListener.onFailOfResponse(errorJsonObj);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} catch (JSONException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
}
}) {
@Override
protected Response<JSONArray> parseNetworkResponse(NetworkResponse networkResponse) {
try {
String jsonString = new String(networkResponse.data,
HttpHeaderParser
.parseCharset(networkResponse.headers));
return Response.success(new JSONArray(jsonString),
HttpHeaderParser
.parseCacheHeaders(networkResponse));
} catch (UnsupportedEncodingException e) {
return Response.error(new ParseError(e));
} catch (JSONException je) {
return Response.error(new ParseError(je));
}
}
@Override
public Map<String, String> getHeaders() throws AuthFailureError {
Map<String, String> params = new HashMap<String, String>();
params.put(GlobalKeys.HEADER_KEY_CONTENT_TYPE,
GlobalKeys.HEADER_VALUE_CONTENT_TYPE);
params.put(GlobalKeys.ACCEPT_KEY_CONTENT_TYPE,
GlobalKeys.HEADER_VALUE_CONTENT_TYPE);
params.put(GlobalKeys.AUTHTOKEN, auth_token);
params.put(GlobalKeys.USERID, userId);
return params;
}
};
// Adding request to request queue
if (ParkingAppController.getInstance() != null) {
ParkingAppController.getInstance().addToRequestQueue(
request, GlobalKeys.ORDER_STATUS_INFO);
}
// set request time-out
request.setRetryPolicy(new DefaultRetryPolicy(
AppConstants.ONE_SECOND * 20, 0,
DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private <T> JSONObject getJSONFromObject(T request) throws IOException, JSONException {\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);\n String temp = null;\n temp = mapper.writeValueAsString(request);\n JSONObject j = new JSONObject(temp);\n\n return j;\n }",
"void sendJson(Object data);",
"private ObjectNode makeRequest(final String api) {\n ObjectNode req = JSON.objectNode();\n req.put(\"api\", api);\n return req;\n }",
"@GET\n @Path(\"{name}/object\")\n public JsonObject jsonObject(@PathParam(\"name\") String name) {\n return new JsonObject().put(\"Hello\", name);\n }",
"public abstract VKRequest mo118416a(JSONObject jSONObject);",
"protected abstract Object buildJsonObject(R response);",
"protected abstract JSONObject build();",
"void generateJSON(JSONObject object, String name);",
"public abstract T zzb(JSONObject jSONObject);",
"private JsonObject getNewRequestBody(String[] arguments, int tickets, String uuid) throws NumberFormatException {\n JsonObject obj = new JsonObject();\n obj.addProperty(\"userid\", Integer.parseInt(arguments[2]));\n obj.addProperty(\"eventid\", Integer.parseInt(arguments[0]));\n obj.addProperty(\"tickets\", tickets);\n obj.addProperty(\"uuid\", uuid);\n\n return obj;\n }",
"protected Response createInsertingrequest(String urlFA,JSONObject jsonObject,HttpBasicAuthFilter auth,String type){\n ClientConfig config = new ClientConfig();\n Client client = ClientBuilder.newClient(config);\n WebTarget target;\n target = client.target(getBaseURI(urlFA));\n //Response plainAnswer =null; \n target.register(auth);\n \n Invocation.Builder invocationBuilder =target.request(MediaType.APPLICATION_JSON);\n MultivaluedHashMap<String,Object> mm=new MultivaluedHashMap<String,Object>();\n mm.add(\"content-type\", MediaType.APPLICATION_JSON);\n mm.add(\"Accept\", \"application/json\");\n mm.add(\"charsets\", \"utf-8\");\n invocationBuilder.headers(mm);\n //preliminary operation of request creation ended\n Response plainAnswer=null;\n switch(type){\n case \"post\":\n {\n plainAnswer=invocationBuilder\n .post(Entity.entity(jsonObject.toString(), MediaType.APPLICATION_JSON_TYPE));\n break;\n }\n case \"put\":\n {\n plainAnswer =invocationBuilder\n .put(Entity.entity(jsonObject.toString(), MediaType.APPLICATION_JSON));\n break;\n }\n }\n return plainAnswer;\n }",
"private JSON() {\n\t}",
"public static JSONObject createJSONObject(RequirementForm req)\r\n{\r\n\tString keys[] = {\"id\", \"nameReq\",\"nameGroup\",\"startDate\",\"endDate\",\"process\",\"statusReq\", \"lateDate\", \"stage\" };\r\n \r\n\tJSONObject uc = new JSONObject(keys);\r\n uc.getObject().put(keys[0], String.valueOf(req.getId()));\r\n uc.getObject().put(keys[1], CommonUtil.convertNVLFor(req.getNameReq()));\r\n uc.getObject().put(keys[2], req.getNameGroup());\r\n uc.getObject().put(keys[3], req.getStartDate());\r\n uc.getObject().put(keys[4], req.getEndDate());\r\n uc.getObject().put(keys[5], String.valueOf(req.getProcess()));\r\n uc.getObject().put(keys[6], String.valueOf(req.getStatusReq()));\r\n uc.getObject().put(keys[7], String.valueOf(req.getLateDate()));\r\n uc.getObject().put(keys[8], String.valueOf(req.getStage()));\r\n\r\n return uc; \r\n}",
"public JsonRequestSerializer() {\n this(JNC.GSON);\n }",
"String getJson();",
"String getJson();",
"String getJson();",
"public abstract Object toJson();",
"JSONObject toJson();",
"JSONObject toJson();",
"String getJSON();",
"JsonObject raw();",
"public String getJson();",
"public void createRequest(final String query, JsonHttpResponseHandler handler) {\n try {\n String url = getApiUrl(\"\");\n client.get(url + URLEncoder.encode(query, \"utf-8\"), handler);\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n }",
"@Override\n public JSONObject getRequestJSON() throws JSONException {\n return null;\n }",
"void mo59932a(String str, JSONObject jSONObject);",
"void mo28373a(JSONObject jSONObject);",
"private ObjectNode makeRequest(final String api, final JsiiObjectRef objRef) {\n ObjectNode req = makeRequest(api);\n req.set(\"objref\", objRef.toJson());\n return req;\n }",
"@Test\n\tpublic void test_1_post(){\n\t\tJSONObject request = new JSONObject();\n\t\trequest.put(\"name\", \"Rahul\");\n\t\trequest.put(\"job\", \"Engineer\");\n\t\tSystem.out.println(request.toJSONString());\n\t\t\n\t\tgiven().\n\t\t header(\"Content-Type\",\"application/json\").\n\t\t accept(ContentType.JSON).\n\t\t body(request.toJSONString()).\n\t\t when().\n\t\t \tpost(\"https://reqres.in/api/users/2\").\n\t\t then().\n\t\t statusCode(201);\n\t\t \n\t\t\n\t}",
"public JSONObject buildJson() {\n Map<String, String> reqData = new HashMap<>();\n reqData.put(\"id\", id);\n reqData.put(\"summary\", summary);\n reqData.put(\"location\", location);\n reqData.put(\"description\", description);\n reqData.put(\"color\", color);\n reqData.put(\"emailReminderMinutes\", Integer.toString(emailReminderMinutes));\n reqData.put(\"repetitionInterval\", Integer.toString(repetitionInterval));\n reqData.put(\"startDate\", startDate);\n reqData.put(\"endDate\", endDate);\n return new JSONObject(reqData);\n }",
"@Test\r\n\tpublic void test01_post() {\n\t\tJSONObject obj=new JSONObject();\r\n\t\tobj.put(\"Gazi1\", \"7979893089\");\r\n\t\tobj.put(\"Reshma\", \"6291172991\");\r\n\t\t\r\n\t\t\r\n\t\t//System.out.println(obj.toJSONString());\r\n\t\tgiven().header(\"Content-Type\",\"Application/JSON\")\r\n\t\t.contentType(ContentType.JSON).accept(ContentType.JSON)\r\n\t\t.body(obj.toJSONString()).when().post(\"https://reqres.in/api/users\").then()\r\n\t\t.statusCode(201);\r\n\t\t\r\n\t}",
"@Override\n public Object createRequestBody() {\n int[] arr = {1,2,3,4,5,6,7,8,9};\n Tree root = TreeUtility.buildTree(arr);\n return root;\n }",
"void mo26099a(String str, JSONObject jSONObject);",
"void mo16412a(String str, JSONObject jSONObject);",
"private static JsonObject getJsonObject(String request_url) {\n JsonObject jsonResponse = new JsonParser().parse(NetworkUtils.getResponseBody(request_url)).getAsJsonObject();\n return jsonResponse;\n }",
"@Override\n\tprotected JSONObject doJSONRequest(JSONObject request) throws JSONRPCException {\n\t\ttry {\n\n\t\t\tString data = request.toString();\n\t\t\tsocket.sendData(data.getBytes());\n\t\t\t\n\t\t\tJSONObject result = new JSONObject();\n\t\t\tJSONObject resultOK = new JSONObject();\n\t\t\tresultOK.put(\"result\", \"OK\");\n\t\t\tresult.put(JSONRPCConstants.RESULT_KEY, resultOK);\n\t\t\t\n\t\t\treturn result;\n\t\t} catch (Exception e) {\n\t\t\tthrow new JSONRPCException(e.getMessage());\n\t\t}\n\t}",
"private JsonObject postAsJson(URL url, String json) {\n // System.out.format(\"postAsJson URL: %s JSON: \\n%s\\n\", url.toString(), json);\n HttpsURLConnection urlConnection;\n InputStream inputStream = null;\n OutputStream outputStream = null;\n JsonObject jsonObject = null;\n try {\n urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.setRequestProperty(\"Cache-Control\", \"no-cache\");\n urlConnection.setRequestProperty(\"Accept\", \"application/json\");\n urlConnection.setRequestProperty(\"User-Agent\", \"Jediverse CLI\");\n urlConnection.setUseCaches(false);\n urlConnection.setRequestMethod(Literals.POST.name());\n if (settingsJsonObject != null) {\n String authorization = String.format(\"Bearer %s\", Utils.getProperty(settingsJsonObject, Literals.access_token.name()));\n urlConnection.setRequestProperty(\"Authorization\", authorization);\n // System.out.format(\"Setting authorization header: %s\\n\", authorization);\n }\n if (json != null) {\n urlConnection.setRequestProperty(\"Content-type\", \"application/json; charset=UTF-8\");\n urlConnection.setDoOutput(true);\n urlConnection.setRequestProperty(\"Content-length\", Integer.toString(json.length()));\n outputStream = urlConnection.getOutputStream();\n outputStream.write(json.getBytes());\n outputStream.flush();\n int responseCode = urlConnection.getResponseCode();\n System.out.format(\"Response code: %d\\n\", responseCode);\n }\n urlConnection.setInstanceFollowRedirects(true);\n inputStream = urlConnection.getInputStream();\n InputStreamReader isr = new InputStreamReader(inputStream);\n jsonObject = gson.fromJson(isr, JsonObject.class);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n Utils.close(inputStream, outputStream);\n }\n return jsonObject;\n }",
"@Get(\"json\")\n public Representation toJSON() {\n \tString status = getRequestFlag(\"status\", \"valid\");\n \tString access = getRequestFlag(\"location\", \"all\");\n\n \tList<Map<String, String>> metadata = null;\n\n \tString msg = \"no metadata matching query found\";\n\n \ttry {\n \t\tmetadata = getMetadata(status, access,\n \t\t\t\tgetRequestQueryValues());\n \t} catch(ResourceException r){\n \t\tmetadata = new ArrayList<Map<String, String>>();\n \tif(r.getCause() != null){\n \t\tmsg = \"ERROR: \" + r.getCause().getMessage();\n \t}\n \t}\n\n\t\tString iTotalDisplayRecords = \"0\";\n\t\tString iTotalRecords = \"0\";\n\t\tif (metadata.size() > 0) {\n\t\t\tMap<String, String> recordCounts = (Map<String, String>) metadata\n\t\t\t\t\t.remove(0);\n\t\t\tiTotalDisplayRecords = recordCounts.get(\"iTotalDisplayRecords\");\n\t\t\tiTotalRecords = recordCounts.get(\"iTotalRecords\");\n\t\t}\n\n\t\tMap<String, Object> json = buildJsonHeader(iTotalRecords,\n\t\t\t\tiTotalDisplayRecords, msg);\n\t\tList<ArrayList<String>> jsonResults = buildJsonResults(metadata);\n\n\t\tjson.put(\"aaData\", jsonResults);\n\n\t\t// Returns the XML representation of this document.\n\t\treturn new StringRepresentation(JSONValue.toJSONString(json),\n\t\t\t\tMediaType.APPLICATION_JSON);\n }",
"private static JSONObject buildResourceObject(String type, Resource resource) throws JSONException, IllegalArgumentException {\n if (resource == null) {\n throw new IllegalArgumentException(\"Missing Resource\");\n }\n if (type == null) {\n throw new IllegalArgumentException(\"Missing resource type\");\n }\n if (resource.getId() == null) {\n throw new IllegalArgumentException(\"Missing resource id\");\n }\n\n JSONObject jsonResource = new JSONObject();\n jsonResource.put(KEY_ID, resource.getId());\n jsonResource.put(KEY_TYPE, type);\n jsonResource.put(KEY_ATTRIBUTES, new JSONObject());\n return jsonResource;\n }",
"public static JSONObject readJsonObject(HttpServletRequest request) {\n StringBuffer sb = new StringBuffer();\n String line = null;\n try {\n\t //get the body information from request which is a kind JSON file.\n BufferedReader reader = request.getReader(); \n while ((line = reader.readLine()) != null) {\n \t sb.append(line);\n }\n reader.close();\n return new JSONObject(sb.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }",
"private static JSONObject createUrlMetadataRequestObject(String url, int txPower, int rssi) {\n JSONObject jsonObject = new JSONObject();\n try {\n JSONArray urlJsonArray = new JSONArray();\n JSONObject urlJsonObject = new JSONObject();\n urlJsonObject.put(\"url\", url);\n urlJsonObject.put(\"txpower\", txPower);\n urlJsonObject.put(\"rssi\", rssi);\n urlJsonArray.put(urlJsonObject);\n jsonObject.put(\"objects\", urlJsonArray);\n } catch (JSONException ex) {\n Log.d(TAG, \"error: \" + ex);\n }\n return jsonObject;\n }",
"void onRequest(Member member, Map<String, ?> input, JSONObject output);",
"T fromJson(Object source);",
"private <T> HttpEntity createHttpEntityForJson(T body) {\r\n\t\tString dataForEntity;\r\n\t\tif (!(body instanceof String)) {\r\n\t\t\tdataForEntity = gson.toJson(body);\r\n\t\t} else {\r\n\t\t\tdataForEntity = (String) body;\r\n\t\t}\r\n\t\t// try {\r\n\t\treturn new StringEntity(dataForEntity, Charset.forName(\"utf-8\"));\r\n\t\t// } catch (UnsupportedEncodingException e) {\r\n\t\t// e.printStackTrace();\r\n\t\t// }\r\n\t\t// return null;\r\n\t}",
"public interface ApiObject {\n\n String toJson();\n\n Object fromJson(JsonObject json);\n}",
"@Override\r\n\tprotected String requestText() {\n\t\tActualizarClienteRequest actualizarClienteRequest = new ActualizarClienteRequest();\r\n\t\tactualizarClienteRequest.setCliente(codigo);\r\n\t\tactualizarClienteRequest.setFechaAniversario(fechAniv);\r\n\t\tactualizarClienteRequest.setObservaciones(observaciones);\r\n\t\tactualizarClienteRequest.setRazonComercial(razonComercial);\r\n\t\tactualizarClienteRequest.setReferencia(referencia);\r\n\t\tactualizarClienteRequest.setUsuario(usuario);\r\n\t\t\r\n\t\tString request = JSONHelper.serializar(actualizarClienteRequest);\r\n\t\treturn request;\r\n\t}",
"public JSONObject perform(String req_type, String req_json) {\n\t\tContentCatalog CC = (ContentCatalog)Framework.getService(ContentCatalog.class);\n\t\ttry {\n\t\t\t\n\t\t\tMethod perform = null;\n\t\t\t\n\t\t\t// decompilation approach\n\t\t\t//Method perform = ContentCatalog.class.getDeclaredMethod(INSTANCE.getPerformName(), new Class[] {String.class, String.class, int.class, int.class});\n\t\t\t\n\t\t\t// enumeration approach \n\t\t\tClass[] signature = {String.class, String.class, int.class, int.class};\n\t\t\tMethod[] methods = ContentCatalog.class.getDeclaredMethods();\n\t\t\tfor (int i = 0; i < methods.length; i++) {\n\t\t\t\tClass[] params = methods[i].getParameterTypes();\n\t\t\t\tif ( params.length == signature.length ) {\n\t\t\t\t\tint j;\n\t\t\t\t for (j = 0; j < signature.length && params[j].isAssignableFrom( signature[j] ); j++ ) {}\n\t\t\t\t if ( j == signature.length ) {\n\t\t\t\t \tperform = methods[i];\n\t\t\t\t \tbreak;\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (perform != null) {\n\t\t\t\tJSONObject json = (JSONObject) perform.invoke(CC, new Object[] { req_type, req_json, new Integer(200), new Integer(5)});\n\t\t\t\treturn json;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn new JSONObject();\n\t\t\t}\n\t\t\t\n\t\t} catch (Throwable t) {\n\t\t\tthrow new RuntimeException(t.toString());\n\t\t}\n\t}",
"public JSONPostUtility(String requestURL)\n throws IOException {\n //call super constructor\n super(requestURL, \"POST\");\n //set the content type\n super.addHeader(\"Content-Type\", \"application/json;charset=\" + super.charset);\n super.addHeader(\"Accept\", \"application/json\");\n }",
"Person addPerson(JSONObject person);",
"public void setReqJson(java.lang.String value) {\n this.req_json = value;\n }",
"String toJSON();",
"JSONStreamAware processRequest(HttpServletRequest paramHttpServletRequest)\r\n/* 18: */ {\r\n/* 19:19 */ JSONObject localJSONObject = new JSONObject();\r\n/* 20:20 */ localJSONObject.put(\"host\", paramHttpServletRequest.getRemoteHost());\r\n/* 21:21 */ localJSONObject.put(\"address\", paramHttpServletRequest.getRemoteAddr());\r\n/* 22:22 */ return localJSONObject;\r\n/* 23: */ }",
"public abstract void fromJson(JSONObject jsonObject);",
"@Override\r\n\tpublic JSONObject buildJson() {\n\t\tJSONObject json = new JSONObject();\r\n\t\ttry {\r\n\t\t\tsetInt(json,d_type,type);\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogUtil.log.error(e.getMessage(),e);\r\n\t\t}\r\n\t\treturn json;\r\n\t}",
"@Override\r\n\tprotected String requestText() {\n\t\tGuardarSustentoRequest guardarSustentoRequest = new GuardarSustentoRequest();\r\n\t\tguardarSustentoRequest.setCodigoActvidad(codigoActvidad);\r\n\t\tguardarSustentoRequest.setCodigoCliente(codigoCliente);\r\n\t\tguardarSustentoRequest.setCodigoPLan(codigoPLan);\r\n\t\tguardarSustentoRequest.setDescripcionActividad(descripcionActividad);\r\n\t\tguardarSustentoRequest.setFechaVisita(fechaVisita);\r\n\t\tguardarSustentoRequest.setTipoActividad(tipoActividad);\r\n\t\tguardarSustentoRequest.setUsuario(usuario);\r\n\t\tString request = JSONHelper.serializar(guardarSustentoRequest);\r\n\t\treturn request;\r\n\t}",
"public abstract String toJson();",
"KijiDataRequest getClientRequest();",
"public void postRequest() {\n apiUtil = new APIUtil();\n // As this is an API call , we are not setting up any base url but defining the individual calls\n apiUtil.setBaseURI(configurationReader.get(\"BaseURL\"));\n //This is used to validate the get call protected with basic authentication mechanism\n basicAuthValidation();\n scenario.write(\"Request body parameters are :-\");\n SamplePOJO samplePOJO = new SamplePOJO();\n samplePOJO.setFirstName(scenarioContext.getContext(\"firstName\"));\n samplePOJO.setLastName(scenarioContext.getContext(\"lastName\"));\n\n ObjectMapper objectMapper = new ObjectMapper();\n try {\n apiUtil.setRequestBody(objectMapper.writeValueAsString(samplePOJO));\n } catch (JsonProcessingException e) {\n e.printStackTrace();\n }\n }",
"@Test\n\tpublic void test_04() {\n\n\t\t//Json data configuration\n\t\tcomplexobjectinformationclass childdataobject = new complexobjectinformationclass();\n\t\tcomplexobjectclass dataobject = new complexobjectclass();\n\n\t\tchilddataobject.setEmail(\"[email protected]\");\n\t\tchilddataobject.setPhone(\"12300000\");\n\t\tchilddataobject.setAddress(\"Bangladesh\");\n\n\t\tdataobject.setId(\"2\");\n\t\tdataobject.setAuthor(\"ataure\");\n\t\tdataobject.setTitle(\"This is title\");\n\t\tdataobject.setinformation(childdataobject);\n\n\n\t\t//Request body\n\t\tResponse reponse = given().\n\t\t\t\twhen().\n\t\t\t\tcontentType(ContentType.JSON).\n\t\t\t\tbody(dataobject).\n\t\t\t\tpost(\"http://localhost:3000/posts\");\n\n\t\tSystem.out.println(\"updated response data \"+ reponse.asString());\t\t\n\t}",
"@Test(enabled=false)\n\tpublic void objectPost() {\t\n\t\tPosts posts = new Posts(\"3\", \"Seahawks\", \"Wilson\");\n\t\t\n\t\tResponse res = given().\n\t\twhen().\n\t\tcontentType(ContentType.JSON).\n\t\tbody(posts).\n\t\tpost(\"http://localhost:3000/posts/\");\n\t\n\t\tSystem.out.println(\"Response as object: \"+res.asString());\n\t}",
"protected JSONObject getObjectFor(\n String method,\n String[] fields,\n Map<String, String> params\n ) throws IOException, JSONException {\n return this.getJSONObject(this.getUrlFor(method, fields, params));\n }",
"public JSONModel() {\n jo = new JSONObject();\n }",
"@Override\r\n JSONObject doPerform(HttpServletRequest req, HttpServletResponse response) throws Exception {\r\n JSONObject jo = new JSONObject();\r\n try {\r\n JSONObject json;\r\n if (req.getMethod().equals(\"POST\")) {\r\n String js = IOUtils.toString(req.getInputStream(), \"UTF-8\");\r\n json = new JSONObject(js);\r\n } else {\r\n json = new JSONObject(req.getParameter(\"json\"));\r\n }\r\n OfferRecord or = OfferRecord.fromJSON(json);\r\n JSONObject ret = new JSONObject(SolrIndexerCommiter.indexJSON(new JSONObject(JSON.toJSONString(or)), \"offersCore\"));\r\n\r\n// Indexer indexer = new Indexer();\r\n// indexer.indexWanted(or.doc_code,\r\n// UsersController.toKnihovna(req).getCode(),\r\n// or.chci);\r\n return ret;\r\n\r\n } catch (Exception ex) {\r\n LOGGER.log(Level.SEVERE, null, ex);\r\n jo.put(\"error\", ex.toString());\r\n }\r\n return jo;\r\n\r\n }",
"@GET\n @Path(value=\"/{a}/{b}\")\n @Produces(\"application/json\")\n public String getJSON(@PathParam(value=\"a\") int a,@PathParam(value=\"b\") int b) {\n //TODO return proper representation object\n int c = a + b;\n return \"{\\\"result\\\":\\\"\"+c+\"\\\"}\";\n }",
"@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n\t@Override\n\tpublic void doWithRequest(ClientHttpRequest request) throws IOException {\n\t\trequest.getHeaders().set( \"Accept\", \"application/json\" );\n\t\trequest.getHeaders().set(\"Content-Type\", MediaType.APPLICATION_JSON.toString());\n\t\tif (headerAttrs != null) {\n\t\t\tfor (String key : headerAttrs.keySet()) {\n\t\t\t\tString value = headerAttrs.get(key);\n\t\t\t\trequest.getHeaders().set(key, value);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// next if there is a body add it to request\n\t\tif (requestBody != null){\n\t\t\tAssert.notEmpty(messageConverters, \"'messageConverters' must not be empty\");\n\t\t\tClass<?> requestType = requestBody.getClass();\n\t\t\tfor (HttpMessageConverter messageConverter : messageConverters) {\n\t\t\t\tif (messageConverter.canWrite(requestType, MediaType.APPLICATION_JSON)) {\n\t\t\t\t\tmessageConverter.write(requestBody, MediaType.APPLICATION_JSON, request);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"protected JSONObject getJsonRepresentation() throws Exception {\n\n JSONObject jsonObj = new JSONObject();\n jsonObj.put(\"name\", getName());\n return jsonObj;\n }",
"public void test_01() {\n\t\tpostobject jsonobjectdata = new postobject();\n\n\t\tjsonobjectdata.setID(\"5\");\n\t\tjsonobjectdata.settitle(\"updated Mr\");\n\t\tjsonobjectdata.setfirst_name(\"updated Rahaman\");\n\t\tjsonobjectdata.setauthor(\"updated Ata\");\n\n\t\tResponse reponse = given().\n\t\t\t\tbody(jsonobjectdata).\n\t\t\t\twhen().\n\t\t\t\tcontentType(ContentType.JSON).\n\t\t\t\tput(\"http://localhost:3000/posts/05\");\n\n\t\tSystem.out.println(\"updated response data \"+ reponse.asString());\t\t\n\t}",
"JSONObject post(String url) {\n String json = \"\";\n try {\n URL address = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) address.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n json = \"{\\\"result\\\":\";\n Scanner scan = new Scanner(address.openStream());\n while (scan.hasNext())\n json += scan.nextLine();\n scan.close();\n json += \"}\";\n } catch (Exception e) {\n System.out.println(\"Failed to send the following request : \" + url);\n }\n return new JSONObject(json);\n }",
"public Response() {\n objectMap = new JSONObject<>();\n }",
"@BodyParser.Of(play.mvc.BodyParser.Json.class)\n public static Result create() throws JsonParseException, JsonMappingException, IOException {\n JsonNode json = request().body().asJson();\n Thing thing = mapper.treeToValue(json, Thing.class);\n thing.save();\n return ok(mapper.valueToTree(thing));\n }",
"public JSONObject insertIntoJson(ClientModel m){\n JSONObject json = new JSONObject();\n\n //inserting key value pairs in json object\n if(!m.getFristName().equals(\"None\")){\n json.put(\"firstName\", m.getFristName());\n }\n\n if(!m.getLastName().equals(\"None\")){\n json.put(\"lastName\", m.getLastName());\n }\n\n if(!m.getAddres().equals(\"None\")){\n json.put(\"address\", m.getAddres());\n }\n\n if(m.getAge() > 0){\n json.put(\"age\", m.getAge());\n }\n\n if(m.getSalary() > 0){\n json.put(\"salary\", \"$\" + m.getSalary());\n }\n\n return json; //return the json object\n }",
"public T getRequestData();",
"protected JSONObject doRequest(String method, Object[] params) throws JSONRPCException\r\n\t{\n\t\tJSONArray jsonParams = new JSONArray();\r\n\t\tfor (int i=0; i<params.length; i++)\r\n\t\t{\r\n\t\t\tjsonParams.put(params[i]);\r\n\t\t}\r\n\t\t\r\n\t\t//Create the json request object\r\n\t\tJSONObject jsonRequest = new JSONObject();\r\n\t\ttry \r\n\t\t{\r\n\t\t\t//id hard-coded at 1 for now\r\n\t\t\tjsonRequest.put(\"id\", 1);\r\n\t\t\tjsonRequest.put(\"method\", method);\r\n\t\t\tjsonRequest.put(\"params\", jsonParams);\r\n\t\t}\r\n\t\tcatch (JSONException e1)\r\n\t\t{\r\n\t\t\tthrow new JSONRPCException(\"Invalid JSON request\", e1);\r\n\t\t}\r\n\t\treturn doJSONRequest(jsonRequest);\r\n\t}",
"public JSONObject mo56289a_() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"api_endpoint\", mo56263a());\n } catch (JSONException unused) {\n }\n f2302w.mo56245a(jSONObject, \"timestamp\", mo56265c());\n f2303x.mo56245a(jSONObject, \"cart\", mo56278d());\n return jSONObject;\n }",
"Answerable(JSONObject object) throws JSONFormatException {\n JSONSpec.testObject(jsonSpec, object);\n\n JSONObject definition = (JSONObject) object.get(\"definition\");\n this.name = (String) definition.get(\"name\");\n\n JSONArray questions = (JSONArray) definition.get(\"questions\");\n JSONArray completed = (JSONArray) object.get(\"completed\");\n questions.forEach(question -> addQuestionFromJSON((JSONObject) question));\n completed.forEach(responses -> addCompletedFromJSON((JSONArray) responses));\n }",
"private String executeRequest(URL url, String json, boolean post) throws IOException{\n\t\tURLConnection urlConnection = url.openConnection();\n\t\turlConnection.setDoOutput(post); //false if post\n\t\turlConnection.setRequestProperty(\"Content-Type\", \"application/json; charset=utf-8\");\n\t\turlConnection.connect();\n\t\tOutputStream outputStream = urlConnection.getOutputStream();\n\t\toutputStream.write((json).getBytes(\"UTF-8\"));\n\t\toutputStream.flush();\n\t\t\n\t\t//Get Response\n InputStream in = urlConnection.getInputStream();\n BufferedReader rd = new BufferedReader(new InputStreamReader(in));\n String line;\n StringBuffer response = new StringBuffer();\n while((line = rd.readLine()) != null) {\n response.append(line);\n response.append('\\r');\n }\n rd.close();\n return response.toString();\n\t}",
"private JsonObject OnGoingRideObject()\n {\n OnGoingRideRequestModel requestModel = new OnGoingRideRequestModel();\n requestModel.setUserId(UserId);\n return new Gson().toJsonTree(requestModel).getAsJsonObject();\n }",
"@GET\n @Produces(\"application/json\")\n public String getJson() {\n //TODO return proper representation object\n throw new UnsupportedOperationException();\n }",
"public void jsonPresentation () {\n System.out.println ( \"****** Json Data Module ******\" );\n ArrayList<Book> bookArrayList = new ArrayList<Book>();\n String jsonData = \"\";\n ObjectMapper mapper = new ObjectMapper();\n bookArrayList = new Request().postRequestBook();\n try {\n jsonData = mapper.writeValueAsString(bookArrayList);\n } catch (JsonProcessingException e) {\n System.out.println(\"Error: \"+ e);\n }\n System.out.println(jsonData);\n ClientEntry.showMenu ( );\n }",
"private static JSONObject getDataObject(JSONObject obj)\n\t{\n\t\tJSONObject objData = new JSONObject();\n\t\tobjData.put(\"data\", obj);\n\t\treturn objData;\n\t}",
"String toJSONString(Object data);",
"public interface BaseFormModel {\n JSONObject toJson();\n}",
"private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n\n // If the URL is null, then return early.\n if (url == null) {\n return jsonResponse;\n }\n\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(10000 /* milliseconds */);\n urlConnection.setConnectTimeout(15000 /* milliseconds */);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // If the request was successful (response code 200),\n // then read the input stream and parse the response.\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error response code: \" + urlConnection.getResponseCode());\n }\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problem retrieving the posts JSON results.\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n inputStream.close();\n }\n }\n\n\n return jsonResponse;\n }",
"public void mo15090a(JSONObject jSONObject) {\n }",
"@Test\n public void canRepresentAsJson() throws Exception {\n final RtReleaseAsset asset = new RtReleaseAsset(\n new FakeRequest().withBody(\"{\\\"asset\\\":\\\"release\\\"}\"),\n release(),\n 1\n );\n MatcherAssert.assertThat(\n asset.json().getString(\"asset\"),\n Matchers.equalTo(\"release\")\n );\n }",
"@Override\n\tpublic JSONObject readFrom(Class<JSONObject> arg0, Type arg1, Annotation[] arg2, MediaType arg3,\n\t\t\tMultivaluedMap<String, String> arg4, InputStream arg5) throws IOException, WebApplicationException {\n\t\ttry {\n\t\t\treturn new JSONObject(IOUtils.toString(arg5));\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n public String getJSON() {\n throw new UnsupportedOperationException();\n }",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n public String getJson() {\n //TODO return proper representation object\n throw new UnsupportedOperationException();\n }",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n public String getJson() {\n //TODO return proper representation object\n throw new UnsupportedOperationException();\n }",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n public String getJson() {\n //TODO return proper representation object\n throw new UnsupportedOperationException();\n }",
"@Test\n void caloricIngredient() throws Exception {\n String request = \"{\\\"name\\\": \\\"Ensalada\\\", \\\"ingredients\\\": [\" +\n createIngredient(\"Calabaza\", 100) + \",\" +\n createIngredient(\"Cebolla\", 70) +\n \"]}\";\n this.mockMvc.perform(\n post(\"/calculate\")\n .contentType(MediaType.APPLICATION_JSON)\n .content(request))\n .andDo(print()).andExpect(status().isOk())\n .andExpect(jsonPath(\"$.caloric.name\").value(\"Cebolla\"));\n }",
"private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n\n // If the URL is null, then return early.\n if (url == null) {\n return jsonResponse;\n }\n\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(10000);\n urlConnection.setConnectTimeout(15000);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // If the request was successful (response code 200),\n // then read the input stream and parse the response.\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error response code: \" + urlConnection.getResponseCode());\n }\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problem retrieving the Guardian JSON results.\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n inputStream.close();\n }\n }\n return jsonResponse;\n }",
"@POST( CONTROLLER )\n VersionedObjectKey createObject( @Body CreateObjectRequest request );",
"@Override\r\n\tprotected String requestText() {\n\t\tConsultarIndiceEjecucionAnioRequest consultarIndiceEjecucionAnioRequest = new ConsultarIndiceEjecucionAnioRequest();\r\n\t\tconsultarIndiceEjecucionAnioRequest.setPeriodo(periodo);\r\n\t\tString request = JSONHelper.serializar(consultarIndiceEjecucionAnioRequest);\r\n\t\treturn request;\r\n\t}",
"public int processingContract(String json,List<Object[]> list);",
"public JSONObject makeJSONOffer(JSONObject angebot, JSONObject nachfrage) {\n\t\tJSONObject json = new JSONObject();\n\t\tJSONObject json2 = new JSONObject();\n\t\ttry {\n\t\t\tjson.put(\"Handel anbieten\", json2);\n\t\t\tjson2.put(\"Angebot\", angebot);\n\t\t\tjson2.put(\"Nachfrage\", nachfrage);\n\t\t} catch (JSONException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn json;\n\t}",
"@Test\n public void fromJson() throws VirgilException, WebAuthnException {\n AuthenticatorMakeCredentialOptions options = AuthenticatorMakeCredentialOptions.fromJSON(MAKE_CREDENTIAL_JSON);\n AttestationObject attObj = authenticator.makeCredential(options);\n }",
"@Test\n public void oneSpartanPojo(){\n Response response = given().accept(ContentType.JSON)\n .and().pathParam(\"id\", 15)\n .and().get(\"http://18.232.145.26:8000/api/spartans/{id}\");\n\n // Verify response status code should be 200\n Assert.assertEquals(response.statusCode(), 200 , \"Verify status code : \");\n\n // Convert Json to POJO( Our custom Spartan java class )\n Spartan spartan15 = response.body().as(Spartan.class);\n System.out.println(\"spartan15 = \" + spartan15);\n System.out.println(\"spartan15.getNames() = \" + spartan15.getName());\n System.out.println(\"spartan15.getId() = \" + spartan15.getId());\n\n\n }",
"protected JSONObject getJsonRepresentation() throws Exception {\r\n\r\n JSONObject jsonObj = new JSONObject();\r\n jsonObj.put(\"note\", note);\r\n return jsonObj;\r\n }",
"@GET\n @Produces({MediaType.APPLICATION_JSON})\n public Message getJSON_Ankit() {\n return new Message(\"Hello World, Jersey\");\n }",
"void request(RequestParams params);"
] | [
"0.6601783",
"0.6585028",
"0.64613676",
"0.63550174",
"0.63262516",
"0.627357",
"0.6179144",
"0.6080242",
"0.59795433",
"0.597698",
"0.5932794",
"0.5914675",
"0.59124583",
"0.5873004",
"0.5833772",
"0.5833772",
"0.5833772",
"0.5799525",
"0.5774401",
"0.5774401",
"0.57509357",
"0.5739551",
"0.57053673",
"0.56621104",
"0.56390965",
"0.5631818",
"0.5623892",
"0.56082505",
"0.5581038",
"0.55789846",
"0.55733514",
"0.55635035",
"0.55528",
"0.55501384",
"0.5548385",
"0.55302775",
"0.55289006",
"0.55286616",
"0.55135465",
"0.5505302",
"0.5503082",
"0.5497957",
"0.54955524",
"0.5491155",
"0.54569066",
"0.5444231",
"0.5439065",
"0.5425979",
"0.5422858",
"0.5419545",
"0.54146737",
"0.5408625",
"0.5398466",
"0.5390486",
"0.53897876",
"0.5378791",
"0.53727716",
"0.53722876",
"0.5371487",
"0.5367148",
"0.53654563",
"0.5357979",
"0.5348047",
"0.5347801",
"0.5334385",
"0.53234863",
"0.5322171",
"0.5319108",
"0.53053117",
"0.5303323",
"0.530282",
"0.53020513",
"0.5301854",
"0.52979356",
"0.5297598",
"0.52888364",
"0.5284407",
"0.5281854",
"0.5280433",
"0.52794856",
"0.52779984",
"0.5276832",
"0.5274988",
"0.5272782",
"0.52726287",
"0.5264331",
"0.52567977",
"0.5249783",
"0.5249783",
"0.5249783",
"0.5244918",
"0.5242218",
"0.5237651",
"0.523242",
"0.52127826",
"0.5210299",
"0.5209038",
"0.51908416",
"0.51868474",
"0.5184199",
"0.5181964"
] | 0.0 | -1 |
The Factory for the model. It provides a create method for each nonabstract class of the model. | public interface ExploitationFactory extends EFactory {
/**
* The singleton instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
ExploitationFactory eINSTANCE = exploitation.impl.ExploitationFactoryImpl.init();
/**
* Returns a new object of class '<em>Exploitation</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Exploitation</em>'.
* @generated
*/
Exploitation createExploitation();
/**
* Returns a new object of class '<em>Ressource</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Ressource</em>'.
* @generated
*/
Ressource createRessource();
/**
* Returns a new object of class '<em>Surface</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Surface</em>'.
* @generated
*/
Surface createSurface();
/**
* Returns a new object of class '<em>Parcelle</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Parcelle</em>'.
* @generated
*/
Parcelle createParcelle();
/**
* Returns a new object of class '<em>Elevage</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Elevage</em>'.
* @generated
*/
Elevage createElevage();
/**
* Returns a new object of class '<em>Culture</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Culture</em>'.
* @generated
*/
Culture createCulture();
/**
* Returns a new object of class '<em>Environment</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Environment</em>'.
* @generated
*/
Environment createEnvironment();
/**
* Returns the package supported by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the package supported by this factory.
* @generated
*/
ExploitationPackage getExploitationPackage();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Model createModel();",
"Model createModel();",
"Model createModel();",
"Model createModel();",
"Model createModel();",
"Model createModel();",
"Model createModel();",
"TestModelFactory getTestModelFactory();",
"public UsermodelFactoryImpl() {\r\n\t\tsuper();\r\n\t}",
"public SqliteModelFactoryImpl()\n {\n super();\n }",
"public PetrinetmodelFactoryImpl() {\r\n\t\tsuper();\r\n\t}",
"ModelsFactory getModelsFactory();",
"public ParsedmodelFactoryImpl() {\n\t\tsuper();\n\t}",
"protected abstract IModel<T> createModel(T object);",
"public interface ConfigModelFactory\n{\n\t/**\n\t * Create an instance of the <code>ConfigModel</code>\n\t *\n\t * @return an instance of the configuration model\n\t */\n\tConfigModel createInstanceOfConfigModel();\n\n\t/**\n\t * Create an instance of the <code>InstanceModel</code>\n\t *\n\t * @return an instance of the instance model\n\t */\n\tInstanceModel createInstanceOfInstanceModel();\n\n\t/**\n\t * Create an instance of the <code>CsticModel</code>\n\t *\n\t * @return an instance of the characteristic model\n\t */\n\tCsticModel createInstanceOfCsticModel();\n\n\t/**\n\t * Create an instance of the <code>CsticValueModel</code>\n\t *\n\t * @param valueType\n\t * The containing Cstic value type\n\t * @return an instance of the characteristic value model\n\t */\n\tCsticValueModel createInstanceOfCsticValueModel(int valueType);\n\n\t/**\n\t * Create an instance of the <code>CsticGroupModel</code>\n\t *\n\t * @return an instance of the characteristic group model\n\t */\n\tCsticGroupModel createInstanceOfCsticGroupModel();\n\n\n\t/**\n\t * Create an instance of the <code>PriceModel</code>\n\t *\n\t * @return an instance of the price model\n\t */\n\tPriceModel createInstanceOfPriceModel();\n\n\t/**\n\t * Create an instance of the <code>SolvableConflictModel</code>\n\t *\n\t * @return an instance of the Solvable Conflict Model\n\t */\n\tSolvableConflictModel createInstanceOfSolvableConflictModel();\n\n\t/**\n\t * Create an instance of the <code>ConflictingAssumptionModel</code>\n\t *\n\t * @return an instance of the Conflicting Assumption Model\n\t */\n\tConflictingAssumptionModel createInstanceOfConflictingAssumptionModel();\n\n\t/**\n\t * Create an instance of the <code>PriceModel</code>\n\t *\n\t * @return an instance of the price model\n\t */\n\tPriceModel getZeroPriceModel();\n\n\t/**\n\t * Create an instance of the <code>PriceSummaryModel</code>\n\t *\n\t * @return an instance of the price summary model\n\t */\n\tPriceSummaryModel createInstanceOfPriceSummaryModel();\n\n\t/**\n\t * @return a builder to construct {@link ProductConfigMessage} objects\n\t */\n\tdefault ProductConfigMessageBuilder createProductConfigMessageBuilder()\n\t{\n\t\treturn new ProductConfigMessageBuilder();\n\t}\n\n\t/**\n\t * Create an instance of the <code>ProductConfigMessage</code><br>\n\t * uses the <code>DEFAULT</code> ProductConfigMessageSourceSubType\n\t *\n\t * @param message\n\t * localized message\n\t * @param key\n\t * message key, should be unique together with message source\n\t * @param severity\n\t * message severity\n\t * @param source\n\t * message source, should be unique together with message key\n\t * @return a message instance\n\t * @deprecated since 18.08.0 - use {@link ProductConfigMessageBuilder} instead\n\t */\n\t@Deprecated(since = \"1808\", forRemoval=true)\n\tdefault ProductConfigMessage createInstanceOfProductConfigMessage(final String message, final String key,\n\t\t\tfinal ProductConfigMessageSeverity severity, final ProductConfigMessageSource source)\n\t{\n\t\treturn createInstanceOfProductConfigMessage(message, key, severity, source, ProductConfigMessageSourceSubType.DEFAULT);\n\t}\n\n\t/**\n\t * Create an instance of the <code>ProductConfigMessage</code><br>\n\t *\n\t * @param message\n\t * localized message\n\t * @param key\n\t * message key, should be unique together with message source\n\t * @param severity\n\t * message severity\n\t * @param source\n\t * message source, should be unique together with message key\n\t * @param subType\n\t * optional sub type of the message source\n\t * @return a message instance\n\t * @deprecated since 18.08.0 - use {@link ProductConfigMessageBuilder} instead\n\t */\n\t@Deprecated(since = \"1808\", forRemoval=true)\n\tProductConfigMessage createInstanceOfProductConfigMessage(String message, String key, ProductConfigMessageSeverity severity,\n\t\t\tProductConfigMessageSource source, ProductConfigMessageSourceSubType subType);\n\n\n\t/**\n\t * Create an instance of the <code>VariantConditionModel</code>\n\t *\n\t * @return an instance of the variant condition model\n\t */\n\tVariantConditionModel createInstanceOfVariantConditionModel();\n\n\t/**\n\t * @return class name of the {@link PriceSummaryModel} implementation\n\t */\n\tString getTargetClassNamePriceSummaryModel();\n\n\n\t/**\n\t * @return class name of the {@link PriceModel} implementation\n\t */\n\tString getTargetClassNamePriceModel();\n\n\t/**\n\t * @return class name of the {@link CsticGroupModel} implementation\n\t */\n\tString getTargetClassNameCsticGroupModel();\n\n\t/**\n\t * @return class name of the {@link CsticValueModel} implementation\n\t */\n\tString getTargetClassNameCsticValueModel();\n\n\t/**\n\t * @return class name of the {@link CsticModel} implementation\n\t */\n\tString getTargetClassNameCsticModel();\n\n\t/**\n\t * @return class name of the {@link InstanceModel} implementation\n\t */\n\tString getTargetClassNameInstanceModel();\n\n\t/**\n\t * @return class name of the {@link ConfigModel} implementation\n\t */\n\tString getTargetClassNameConfigModel();\n\n\t/**\n\t * @return class name of the {@link SolvableConflictModel} implementation\n\t */\n\tString getTargetClassNameSolvableConflictModel();\n\n\t/**\n\t * @return class name of the {@link ConflictingAssumptionModel} implementation\n\t */\n\tString getTargetClassNameConflictingAssumptionModel();\n\n\t/**\n\t * @return class name of the {@link VariantConditionModel} implementation\n\t */\n\tString getTargetClassNameVariantConditionModel();\n}",
"@Override\n\tpublic Model create() {\n\t\treturn null;\n\t}",
"public Factory() {\n\t\tsuper();\n\t}",
"public interface ModelFactory <ModelObject> {\n public void createElement(ModelObject object);\n}",
"EisModel createEisModel();",
"BehaviouralModelFactory getBehaviouralModelFactory();",
"CsticModel createInstanceOfCsticModel();",
"public abstract void create();",
"InstanceModel createInstanceOfInstanceModel();",
"public M create(P model);",
"void create(Model model) throws Exception;",
"public void create(){}",
"public static MusicModel createModel() {\n return new MusicModelImpl();\n }",
"public interface AbstractFactory {\n /**\n * Create cpu cpu.\n *\n * @return the cpu\n */\n Cpu createCpu();\n\n /**\n * Create main board main board.\n *\n * @return the main board\n */\n MainBoard createMainBoard();\n}",
"public Model createBaseModel() {\n return ModelFactory.createDefaultModel();\n }",
"public interface AbstractFactory<T> {\n /**\n * Create a new Object of type T\n * @return the created object\n */\n T create();\n}",
"private ConcreteFactory() {}",
"DataModel createDataModel();",
"public Factory() {\n\t\tclassMap = new TreeMap<String,Class<T> >();\n\t}",
"public static StaticFactoryInsteadOfConstructors create(){\n return new StaticFactoryInsteadOfConstructors();\n }",
"public interface Factory<T> {\n T create();\n}",
"T create();",
"T create();",
"@Override\r\n\tpublic void create() {\n\t\t\r\n\t}",
"public static SqliteModelFactory init()\n {\n try\n {\n SqliteModelFactory theSqliteModelFactory = (SqliteModelFactory)EPackage.Registry.INSTANCE.getEFactory(SqliteModelPackage.eNS_URI);\n if (theSqliteModelFactory != null)\n {\n return theSqliteModelFactory;\n }\n }\n catch (Exception exception)\n {\n EcorePlugin.INSTANCE.log(exception);\n }\n return new SqliteModelFactoryImpl();\n }",
"interface Factory {\r\n /**\r\n * Create an instance of an agenda view model with the given saved\r\n * instance state.\r\n *\r\n * @param savedInstanceState previously saved state of the view model\r\n * @return the created agenda view model\r\n */\r\n AgendaViewModel create(Bundle savedInstanceState);\r\n }",
"private EntityFactory() {}",
"Klassenstufe createKlassenstufe();",
"public interface Factory {\n Product create();\n}",
"public <T> T createModel(Class<T> clazz) throws CreateModelException {\n return createModel(clazz, true);\n }",
"@Override\n\tpublic void create() {\n\n\t}",
"public abstract void create(T t);",
"For createFor();",
"CreateEventViewModelFactory() {\n super(Storage.class, Authenticator.class);\n }",
"public static Factory factory() {\n return ext_dbf::new;\n }",
"public interface Factory {\r\n}",
"PriceModel createInstanceOfPriceModel();",
"ZenModel createZenModel();",
"public ObjectifyFactory factory() {\n return ofy().factory();\n }",
"@Override\n\tpublic void create() {\n\t\t\n\t}",
"public interface Creator<T> {\n\t\tpublic T create() throws APIException;\n\n\t\tpublic void destroy(T t);\n\n\t\tpublic boolean isValid(T t);\n\n\t\tpublic void reuse(T t);\n\t}",
"public EntityFactoryImpl() {\n\t\tsuper();\n\t}",
"DomainModel createDomainModel();",
"@Override\n\tpublic void create () {\n\n\t}",
"public interface Factory {\n LeiFeng createLeiFeng();\n}",
"public void create() {\n\t\t\n\t}",
"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}",
"@Override\r\n\tpublic void create() {\n\r\n\t}",
"@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 static PetrinetmodelFactory init() {\r\n\t\ttry {\r\n\t\t\tPetrinetmodelFactory thePetrinetmodelFactory = (PetrinetmodelFactory)EPackage.Registry.INSTANCE.getEFactory(PetrinetmodelPackage.eNS_URI);\r\n\t\t\tif (thePetrinetmodelFactory != null) {\r\n\t\t\t\treturn thePetrinetmodelFactory;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception exception) {\r\n\t\t\tEcorePlugin.INSTANCE.log(exception);\r\n\t\t}\r\n\t\treturn new PetrinetmodelFactoryImpl();\r\n\t}",
"protected abstract ENTITY createEntity();",
"public static UsermodelFactory init() {\r\n\t\ttry {\r\n\t\t\tUsermodelFactory theUsermodelFactory = (UsermodelFactory)EPackage.Registry.INSTANCE.getEFactory(UsermodelPackage.eNS_URI);\r\n\t\t\tif (theUsermodelFactory != null) {\r\n\t\t\t\treturn theUsermodelFactory;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception exception) {\r\n\t\t\tEcorePlugin.INSTANCE.log(exception);\r\n\t\t}\r\n\t\treturn new UsermodelFactoryImpl();\r\n\t}",
"ConfigModel createInstanceOfConfigModel();",
"public abstract T create(T obj);",
"public static Factory factory() {\n return ext_h::new;\n }",
"public interface DebuggerModelFactory\n\t\textends ExtensionPoint, ConfigurableFactory<DebuggerObjectModel> {\n\n\t/**\n\t * Get the priority for selecting this factory by default for the given program\n\t * \n\t * <p>\n\t * A default factory is selected when the current factory and the last successful factory are\n\t * incompatible with the current program, or if this is the very first time connecting. Of those\n\t * factories compatible with the current program, the one with the highest priority (larger\n\t * numerical value) is selected. If none are compatible, then the current selection is left as\n\t * is.\n\t * \n\t * <p>\n\t * Note that negative priorities imply the factory is not compatible with the given program or\n\t * local system.\n\t * \n\t * @param program the current program, or null\n\t * @return the priority, higher values mean higher priority\n\t */\n\tdefault int getPriority(Program program) {\n\t\treturn 0;\n\t}\n\n\t/**\n\t * Check if this factory is compatible with the local system and given program.\n\t * \n\t * <p>\n\t * <b>WARNING:</b> Implementations should not likely override this method. If one does, it must\n\t * behave in the same manner as given in this default implementation: If\n\t * {@link #getPriority(Program)} would return a non-negative result for the program, then this\n\t * factory is compatible with that program. If negative, this factory is not compatible.\n\t * \n\t * @param program the current program, or null\n\t * @return true if compatible\n\t */\n\tdefault boolean isCompatible(Program program) {\n\t\treturn getPriority(program) >= 0;\n\t}\n}",
"public Model doCreateModel() {\n Model m = m_baseModelName == null ? maker.createFreshModel() : maker.createModel( m_baseModelName );\n return new OntModelImpl( this, m );\n }",
"public interface IFactory {\n IUser createUser();\n IDepartment createDepartment();\n}",
"public static ParsedmodelFactory init() {\n\t\ttry {\n\t\t\tParsedmodelFactory theParsedmodelFactory = (ParsedmodelFactory)EPackage.Registry.INSTANCE.getEFactory(\"http://parsedmetadata/1.0\"); \n\t\t\tif (theParsedmodelFactory != null) {\n\t\t\t\treturn theParsedmodelFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new ParsedmodelFactoryImpl();\n\t}",
"public interface SerializerFactory<T> {\n\t\n\t/** the method creates a new MessageSerializer.\n\t * \n\t * @return new object that implements the MessageSerializer interface. \n\t */\n MessageSerializer<T> create();\n}",
"public PiviFactoryImpl() {\r\n\t\tsuper();\r\n\t}",
"Factory<? extends T> buildPersonFactory(String type);",
"public PedidoFactoryImpl() {\n\t\tsuper();\n\t}",
"public ProyectoFactoryImpl() {\r\n\t\tsuper();\r\n\t}",
"public interface Creator {\n public abstract Item factoryMethod();\n public abstract Item factoryMethod(String name);\n public abstract Item factoryMethod(String name, List<Flower> flowerList);\n}",
"public abstract ProductFactory getFactory();",
"public Model() {\n\t}",
"public Model() {\n\t}",
"public LanterneFactoryImpl() {\n\t\tsuper();\n\t}",
"public interface Factory {\n Animal createAnimal();\n}",
"public interface AbstractFactory {\n Bmw produceBmw();\n Benz produceBenz();\n}",
"public MystFactoryImpl()\r\n {\r\n super();\r\n }",
"public PertFactory() {\n for (Object[] o : classTagArray) {\n addStorableClass((String) o[1], (Class) o[0]);\n }\n }",
"public interface IFactory<T extends MaterialCastingRecipe> {\n T create(ResourceLocation id, String group, @Nullable Ingredient cast, int itemCost, IMaterialItem result,\n boolean consumed, boolean switchSlots);\n }",
"private VegetableFactory() {\n }",
"protected MoneyFactory() {\n\t}",
"public EnotationFactoryImpl() {\n\t\tsuper();\n\t}",
"public Model() {\n this(DSL.name(\"model\"), null);\n }",
"public EcoreFactoryImpl() {\r\n\t\tsuper();\r\n\t}",
"public TypeAdapterFactory() {\n\t\tif (modelPackage == null) {\n\t\t\tmodelPackage = TypePackage.eINSTANCE;\n\t\t}\n\t}",
"interface Create {}",
"public GameDomainFactory() {\r\n\t\t\r\n\t\tCreateGameDomain = new HashMap<String, GameDomainFactory.gameDomainCreator>();\r\n\t\tCreateGameDomain.put(\"TicTacToe\" , new ticTacToeCreator());\r\n\t\tCreateGameDomain.put(\"Reversi\", new CreatorReversi());\r\n\t}",
"public abstract <T> T create(Object object, Class<T> clazz);",
"public EcoreFactoryImpl() {\n super();\n }",
"public static Factory factory() {\n return text::new;\n }",
"public FvFactoryImpl() {\n\t\tsuper();\n\t}",
"public abstract Product productFactory(String type);"
] | [
"0.71565163",
"0.71565163",
"0.71565163",
"0.71565163",
"0.71565163",
"0.71565163",
"0.71565163",
"0.70742077",
"0.7051943",
"0.6983852",
"0.69748455",
"0.6965496",
"0.69568366",
"0.69481784",
"0.6860293",
"0.6811446",
"0.6807123",
"0.6756206",
"0.6694741",
"0.6656823",
"0.6654312",
"0.6640736",
"0.6595195",
"0.6580549",
"0.65715563",
"0.6555794",
"0.6534009",
"0.648342",
"0.64748156",
"0.6450784",
"0.6445946",
"0.64300567",
"0.6421489",
"0.64043415",
"0.6400982",
"0.63907266",
"0.63907266",
"0.6368747",
"0.6349325",
"0.63468486",
"0.6345672",
"0.63069546",
"0.6302681",
"0.6292132",
"0.6289528",
"0.6275873",
"0.6264616",
"0.6250081",
"0.623463",
"0.62291795",
"0.62248415",
"0.6222761",
"0.6219561",
"0.62143695",
"0.62126905",
"0.62034976",
"0.61920136",
"0.61674654",
"0.61650974",
"0.6154887",
"0.61427796",
"0.61426824",
"0.6140671",
"0.61348015",
"0.6117416",
"0.6079516",
"0.6065549",
"0.60619617",
"0.60616994",
"0.6044366",
"0.60355604",
"0.60280776",
"0.6026859",
"0.6021375",
"0.60200113",
"0.60140157",
"0.60013527",
"0.5987638",
"0.5981197",
"0.59794974",
"0.59472996",
"0.59472996",
"0.59399843",
"0.5938128",
"0.59361154",
"0.59327817",
"0.59254813",
"0.59222776",
"0.5919654",
"0.59025806",
"0.5900669",
"0.5895235",
"0.5894421",
"0.5892311",
"0.5877348",
"0.58726925",
"0.5863833",
"0.58636236",
"0.5861607",
"0.585989",
"0.58558"
] | 0.0 | -1 |
Returns a new object of class 'Exploitation'. | Exploitation createExploitation(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"ExploitationPackage getExploitationPackage();",
"public interface ExploitationFactory extends EFactory {\r\n\t/**\r\n\t * The singleton instance of the factory.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t */\r\n\tExploitationFactory eINSTANCE = exploitation.impl.ExploitationFactoryImpl.init();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Exploitation</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Exploitation</em>'.\r\n\t * @generated\r\n\t */\r\n\tExploitation createExploitation();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Ressource</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Ressource</em>'.\r\n\t * @generated\r\n\t */\r\n\tRessource createRessource();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Surface</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Surface</em>'.\r\n\t * @generated\r\n\t */\r\n\tSurface createSurface();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Parcelle</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Parcelle</em>'.\r\n\t * @generated\r\n\t */\r\n\tParcelle createParcelle();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Elevage</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Elevage</em>'.\r\n\t * @generated\r\n\t */\r\n\tElevage createElevage();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Culture</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Culture</em>'.\r\n\t * @generated\r\n\t */\r\n\tCulture createCulture();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Environment</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Environment</em>'.\r\n\t * @generated\r\n\t */\r\n\tEnvironment createEnvironment();\r\n\r\n\t/**\r\n\t * Returns the package supported by this factory.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the package supported by this factory.\r\n\t * @generated\r\n\t */\r\n\tExploitationPackage getExploitationPackage();\r\n\r\n}",
"public Expense() {\n\t\tsuper();\n\t}",
"public Expense(){\n\n }",
"public Invitation(){}",
"Elevage createElevage();",
"private ParticleMesh createExplosion() {\r\n ParticleMesh pMesh = ParticleFactory.buildParticles(\"explosion\", 30);\r\n pMesh.setEmissionDirection(new Vector3f(0.0f, 1.0f, 0.0f));\r\n pMesh.setMaximumAngle(3.1415927f);\r\n pMesh.setMinimumAngle(0);\r\n pMesh.getParticleController().setSpeed(0.1f);\r\n pMesh.setMinimumLifeTime(20.0f);\r\n pMesh.setMaximumLifeTime(150.0f);\r\n pMesh.setStartSize(15);\r\n pMesh.setEndSize(2);\r\n pMesh.getParticleController().setControlFlow(false);\r\n pMesh.getParticleController().setRepeatType(Controller.RT_CLAMP);\r\n pMesh.warmUp(80);\r\n pMesh.setInitialVelocity(2.5f);\r\n pMesh.setStartColor(new ColorRGBA(1.0f, 0.312f, 0.121f, 1.0f));\r\n pMesh.setEndColor(new ColorRGBA(1.0f, 0.24313726f, 0.03137255f, 0.0f));\r\n pMesh.setRenderState(ts);\r\n pMesh.setRenderState(bs);\r\n pMesh.setRenderState(zs);\r\n\r\n rootNode.attachChild(pMesh);\r\n rootNode.updateRenderState();\r\n \r\n explosions.add(pMesh);\r\n \r\n return pMesh;\r\n }",
"public Invitation() {\n }",
"public void createExpense(ExpenseBE expenseBE) {\n\n }",
"public void createExpReward() {\n try {\n int exp = RandomBenefitModel.getExpReward(encounter, characterVM.getDistance());\n if (exp > 0) characterVM.addExp(exp);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }",
"public Date getExpDate() {\n return this.expDate;\n }",
"protected abstract AbstractExtendedDepictor createExtendedDepictor();",
"@Override\r\n\tpublic Explore getNewInstance() {\n\t\treturn new ZYDCExplore();\r\n\t}",
"public Expression() {\r\n }",
"public Investment() {\r\n\t\t\r\n\t}",
"Exp\ngetExp2();",
"public interface ExpressionsFactory {\n\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\tExpressionsFactory INSTANCE = org.dresdenocl.essentialocl.expressions.impl.ExpressionsFactoryImpl.eINSTANCE;\n\n\t/**\n\t * Returns a new object of class '<em>Variable Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Variable Exp</em>'.\n\t * @generated\n\t */\n\tVariableExp createVariableExp();\n\n\t/**\n\t * Returns a new object of class '<em>Variable</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Variable</em>'.\n\t * @generated\n\t */\n\tVariable createVariable();\n\n\t/**\n\t * Returns a new object of class '<em>Unlimited Natural Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Unlimited Natural Exp</em>'.\n\t * @generated\n\t */\n\tUnlimitedNaturalExp createUnlimitedNaturalExp();\n\n\t/**\n\t * Returns a new object of class '<em>Type Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Type Literal Exp</em>'.\n\t * @generated\n\t */\n\tTypeLiteralExp createTypeLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>Tuple Literal Part</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Tuple Literal Part</em>'.\n\t * @generated\n\t */\n\tTupleLiteralPart createTupleLiteralPart();\n\n\t/**\n\t * Returns a new object of class '<em>Tuple Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Tuple Literal Exp</em>'.\n\t * @generated\n\t */\n\tTupleLiteralExp createTupleLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>String Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>String Literal Exp</em>'.\n\t * @generated\n\t */\n\tStringLiteralExp createStringLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>Real Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Real Literal Exp</em>'.\n\t * @generated\n\t */\n\tRealLiteralExp createRealLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>Property Call Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Property Call Exp</em>'.\n\t * @generated\n\t */\n\tPropertyCallExp createPropertyCallExp();\n\n\t/**\n\t * Returns a new object of class '<em>Operation Call Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Operation Call Exp</em>'.\n\t * @generated\n\t */\n\tOperationCallExp createOperationCallExp();\n\n\t/**\n\t * Returns a new object of class '<em>Undefined Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Undefined Literal Exp</em>'.\n\t * @generated\n\t */\n\tUndefinedLiteralExp createUndefinedLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>Let Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Let Exp</em>'.\n\t * @generated\n\t */\n\tLetExp createLetExp();\n\n\t/**\n\t * Returns a new object of class '<em>Iterator Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Iterator Exp</em>'.\n\t * @generated\n\t */\n\tIteratorExp createIteratorExp();\n\n\t/**\n\t * Returns a new object of class '<em>Iterate Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Iterate Exp</em>'.\n\t * @generated\n\t */\n\tIterateExp createIterateExp();\n\n\t/**\n\t * Returns a new object of class '<em>Invalid Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Invalid Literal Exp</em>'.\n\t * @generated\n\t */\n\tInvalidLiteralExp createInvalidLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>Integer Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Integer Literal Exp</em>'.\n\t * @generated\n\t */\n\tIntegerLiteralExp createIntegerLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>If Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>If Exp</em>'.\n\t * @generated\n\t */\n\tIfExp createIfExp();\n\n\t/**\n\t * Returns a new object of class '<em>Boolean Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Boolean Literal Exp</em>'.\n\t * @generated\n\t */\n\tBooleanLiteralExp createBooleanLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>Collection Item</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Collection Item</em>'.\n\t * @generated\n\t */\n\tCollectionItem createCollectionItem();\n\n\t/**\n\t * Returns a new object of class '<em>Collection Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Collection Literal Exp</em>'.\n\t * @generated\n\t */\n\tCollectionLiteralExp createCollectionLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>Collection Range</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Collection Range</em>'.\n\t * @generated\n\t */\n\tCollectionRange createCollectionRange();\n\n\t/**\n\t * Returns a new object of class '<em>Enum Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Enum Literal Exp</em>'.\n\t * @generated\n\t */\n\tEnumLiteralExp createEnumLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>Expression In Ocl</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Expression In Ocl</em>'.\n\t * @generated\n\t */\n\tExpressionInOcl createExpressionInOcl();\n\n}",
"public Loyalty() {}",
"Emote.Factory getEmoteFactory();",
"private Equation createEquation() throws MainApplicationException {\r\n\t\tEquation equation = new Equation(false,\r\n\t\t\t\t\"a+b=c\", \r\n\t\t\t\tfalse, \r\n\t\t\t\tnew Parametre(), \r\n\t\t\t\t\"Insérer Propriété\",\r\n\t\t\t\t\"Insérer commentaire\");\r\n\t\tequation.setIsModifiable(true);\r\n\t\treturn equation;\r\n\t}",
"public Education() {}",
"Exp\ngetExp1();",
"private static Object createNewInstance(String implement, String header, String expression) {\n\n\t\t// a feeble attempt at preventing arbitrary code execution\n\t\t// by limiting expressions to a single statement.\n\t\t// Otherwise the expression can be something like:\n\t\t// \tf(); } Object f() { System.exit(0); return null\n\t\tif (expression.contains(\";\"))\n\t\t\treturn null;\n\n\t\t// since we might create multiple expressions, we need their names to be unique\n\t\tString className = \"MyExpression\" + classNum++;\n\n\t\t// if we compile the class susseccfully, try and instantiate it\n\t\tif (writeAndCompile(className, implement, header, expression)) {\n\t\t\ttry {\n\t\t\t\tFile classFile = new File(path + className + \".class\");\n\t\t\t\t// load the class into the JVM, and try and get an instance of it\n\t\t\t\t//Class<?> newClass = ClassLoader.getSystemClassLoader().loadClass(className);\n\n\t\t\t\tURLClassLoader classLoader = URLClassLoader.newInstance(new URL[] { classFile.toURI().toURL() });\n\t\t\t\tClass<?> newClass = Class.forName(className, true, classLoader);\n\n\t\t\t\t// delete the class file, so we leave no trace\n\t\t\t\t// this is okay because we already loaded the class\n\t\t\t\ttry {\n\t\t\t\t\tclassFile.delete();\n\n\t\t\t\t// meh, we tried\n\t\t\t\t} catch (Exception e) {}\n\n\t\t\t\treturn newClass.newInstance();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\t//System.out.println(\"Couldn't load class\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Couldn't write / compile source\");\n\t\t}\n\n\t\t// the class didn't compile\n\t\treturn null;\n\t}",
"public void setMyExp(MyExp me);",
"public void setExpId(int expId) {\n this.expId = expId;\n }",
"@Override\n\tpublic Univent copy() {\n\t\treturn new AddExpToHeroesEvent(amount);\n\t}",
"EClass createEClass();",
"public void setExp(int exp) {\r\n\t\tthis.exp = exp;\r\n\t}",
"public Expressao getExp() {\n\t\treturn exp;\n\t}",
"@Override\n\tprotected Employee factoryMethod() {\n\t\treturn new Developer();\n\t}",
"public andrewNamespace.xsdconfig.EmployeeDocument.Employee addNewEmployee()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n andrewNamespace.xsdconfig.EmployeeDocument.Employee target = null;\r\n target = (andrewNamespace.xsdconfig.EmployeeDocument.Employee)get_store().add_element_user(EMPLOYEE$0);\r\n return target;\r\n }\r\n }",
"EisModel createEisModel();",
"public Exhibitions(String coords,String name, String artisticForm, String price) {\r\n super(coords, name);\r\n this.artisticForm = artisticForm;\r\n this.price = price;\r\n }",
"public static Inventarisation createEntity(EntityManager em) {\n Inventarisation inventarisation = new Inventarisation()\n .date(DEFAULT_DATE);\n return inventarisation;\n }",
"public static ExplossionCollect createExplossionCollect(Activity activity) {\n ViewGroup rootView = (ViewGroup) activity.findViewById(Window.ID_ANDROID_CONTENT);\n ExplossionCollect explosionField = new ExplossionCollect(activity);\n rootView.addView(explosionField, new ViewGroup.LayoutParams(\n ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));\n return explosionField;\n }",
"public ParticleMesh getExplosion() {\r\n for (int x = 0, tSize = explosions.size(); x < tSize; x++) {\r\n ParticleMesh e = explosions.get(x);\r\n if (!e.isActive()) {\r\n return e;\r\n }\r\n }\r\n return createExplosion();\r\n }",
"Expression() { }",
"LetExp createLetExp();",
"public static NewExpression new_(Class type) { throw Extensions.todo(); }",
"public ExperimentBean getExperiment(Object exp) {\n Experiment experiment;\n ExperimentBean newExperimentBean;\n\n if (exp instanceof Experiment) {\n experiment = (Experiment) exp;\n newExperimentBean = this.createExperimentBean(experiment);\n this.experimentMap.put(newExperimentBean.getId(), newExperimentBean);\n }\n\n else {\n if (this.experimentMap.get((String) exp) != null) {\n newExperimentBean = this.experimentMap.get(exp);\n } else {\n experiment = this.getOpenBisClient().getExperimentById((String) exp);\n newExperimentBean = this.createExperimentBean(experiment);\n this.experimentMap.put(newExperimentBean.getId(), newExperimentBean);\n }\n }\n return newExperimentBean;\n }",
"public static TypeExamen createEntity(EntityManager em) {\n TypeExamen typeExamen = new TypeExamen()\n .libelle(DEFAULT_LIBELLE);\n return typeExamen;\n }",
"public void setExp(int exp) {\n \t\tthis.exp = exp;\n \t}",
"public static Exercise createEntity(EntityManager em) {\n Exercise exercise = new Exercise()\n .minutes(DEFAULT_MINUTES);\n return exercise;\n }",
"private void createRequestExpense() {\n ExpensesRequest expensesRequestSuperCLass = new ExpensesRequest();\n ArrayList<ExpensesRequest.ExpenseList> expenseLists = new ArrayList<>();\n ExpensesRequest.ExpenseList expensesRequest = new ExpensesRequest().new ExpenseList();\n expensesRequest.setAmount(edittextExpesneAmount.getText().toString());\n expensesRequest.setClientId(Utility.getInstance().getclientRegId(mContext));\n String currentDate = edittextExpenseDate.getText().toString();\n String currentTime = new SimpleDateFormat(\"HH:mm\", Locale.getDefault()).format(new Date());\n Date date = null;\n try {\n date = new SimpleDateFormat(\"dd/MM/yyyy HH:mm\").parse(currentDate + \" \" + currentTime);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n String expeId = \"\";\n expensesRequest.setExpendDate(date);\n expensesRequest.setExpenditureId(expeId);\n transactionIdToast = expeId;\n expensesRequest.setTransactionId(expeId);\n expensesRequest.setPurpose(edittextExpensePurpose.getText().toString());\n expensesRequest.setExpenseType(edittextExpenseName.getText().toString());\n expenseLists.add(expensesRequest);\n expensesRequestSuperCLass.setRegId(Utility.getInstance().getclientRegId(mContext));\n expensesRequestSuperCLass.setExpenseListArrayList(expenseLists);\n if (Utility.getInstance().isOnline(mContext)) {\n boolean valueStatus = validateExpense();\n if (valueStatus) {\n Utility.getInstance().showProgressDialogue(mContext);\n mPresenter.postExpense(expensesRequestSuperCLass, 1);\n }\n edittextExpenseName.setText(\"\");\n edittextExpesneAmount.setText(\"\");\n edittextExpensePurpose.setText(\"\");\n }\n }",
"Affectation createAffectation();",
"@Override\r\n\tpublic RandomGenerator_Exponential clone() {\r\n\t\tRandomGenerator_Exponential rg = new RandomGenerator_Exponential();\r\n\t\trg.lambda=lambda;\r\n\t\treturn rg;\r\n\t}",
"public static ExpensesFragment newInstance() {\n ExpensesFragment fragment = new ExpensesFragment();\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 }",
"private ExpressionTools(){\n\t\t\n\t}",
"public double getExp() {\n return exp;\n }",
"public static EnotationFactory init() {\n\t\ttry {\n\t\t\tEnotationFactory theEnotationFactory = (EnotationFactory)EPackage.Registry.INSTANCE.getEFactory(EnotationPackage.eNS_URI);\n\t\t\tif (theEnotationFactory != null) {\n\t\t\t\treturn theEnotationFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new EnotationFactoryImpl();\n\t}",
"public EnergyEntity createEnergyEntity(final EnergyEntityType type,\r\n final EnergyEntityInput input) {\r\n return switch (type) {\r\n case CONSUMER -> new Consumer((ConsumerInput) input);\r\n case DISTRIBUTOR -> new Distributor((DistributorInput) input);\r\n case PRODUCER -> new Producer((ProducerInput) input);\r\n };\r\n }",
"public EnotationFactoryImpl() {\n\t\tsuper();\n\t}",
"Expression createExpression();",
"ISSeedModifications createISSeedModifications();",
"public Investigator() {}",
"public int getExpId() {\n return expId;\n }",
"Expression getExp();",
"public Entity newEntity() { return newMyEntity(); }",
"public Entity newEntity() { return newMyEntity(); }",
"public Expense(String costCategory, String name, int price, Date date) {\n\t\t\tthis.costCategory = costCategory;\n\t\t\tthis.name = name;\n\t\t\tthis.price = price;\n\t\t\tthis.date = date;\n\t\t}",
"ObligacionDeber createObligacionDeber();",
"public void addExpense(Expense exp) {\n ContentValues values = new ContentValues();\n SQLiteDatabase db = getWritableDatabase();\n\n values.put(COLUMN_NAME, exp.get_name());\n values.put(COLUMN_DATE, exp.get_date());\n db.insert(TABLE_EXPENSES, null, values);\n db.close();\n }",
"public Employee() {\n this.isActivated = false;\n this.salt = CryptographicHelper.getInstance().generateRandomString(32);\n\n this.address = new Address();\n this.reports = new ArrayList<>();\n }",
"public GeneralizedEpisodeCounterWithExpiry()\n {\n }",
"private static Experience getExperience(List<String> row) {\n\t\treturn new Experience(getFeatures(row), getOutcome(row));\n\t}",
"public ExamIF newGeneratedExam(String version) {\n\t\treturn new Exam(false, version);\n\t}",
"public ExpressionDistributionChart(ExpSet expSet)\r\n\t{\r\n\t\tsuper(\"Distribution of Expressions\");\r\n\t\tthis.expSet = expSet;\r\n\t}",
"private IOferta buildOfertaEjemplo2() {\n\t\tPredicate<Compra> condicion = Predicates.compose(\n\t\t\t\tnew PredicadoDiaSemana(Calendar.THURSDAY),\n\t\t\t\tnew ExtraerFechaCreacion());\n\t\tFunction<Compra, Float> descuento = Functions.compose(\n\t\t\t\tnew DescuentoPorcentual(10.0f), \n\t\t\t\tnew ExtraerTotalBrutoProductos(new PredicadoRubro(\"11\")));\n\t\treturn new OfertaDinero(\"10% descuento comida los jueves\", condicion,\n\t\t\t\tdescuento);\n\t}",
"public Excellon ()\n {}",
"Etf()\n {\n super();\n extended = 'A';\n price = 2176.33;\n number = 10;\n }",
"public static Invite createEntity(EntityManager em) {\n Invite invite = new Invite()\n .nom(DEFAULT_NOM)\n .prenom(DEFAULT_PRENOM)\n .mail(DEFAULT_MAIL)\n .mdp(DEFAULT_MDP)\n .login(DEFAULT_LOGIN)\n .points(DEFAULT_POINTS);\n return invite;\n }",
"Hurt createHurt();",
"@Override\n\tpublic IProduct factoryMethod() {\n\t\treturn new Toy();\n\t}",
"public CMObject newInstance();",
"public ExpertiseEntity() {\n }",
"Oracion createOracion();",
"public ExpressionsAdapterFactory()\r\n {\r\n if (modelPackage == null)\r\n {\r\n modelPackage = ExpressionsPackage.eINSTANCE;\r\n }\r\n }",
"public Expense(String name, double amount, int month) {\n this.name = name;\n this.amount = amount;\n this.month = month;\n }",
"AExpArgs createAExpArgs();",
"public static EnergyEntityFactory getInstance() {\r\n if (instance == null) {\r\n instance = new EnergyEntityFactory();\r\n }\r\n return instance;\r\n }",
"AttackImpactFactory getAttackImpactFactory();",
"public static Expediente createEntity(EntityManager em) {\n Expediente expediente = new Expediente()\n .horarioEntrada(DEFAULT_HORARIO_ENTRADA)\n .horarioSaida(DEFAULT_HORARIO_SAIDA)\n .diaSemana(DEFAULT_DIA_SEMANA);\n return expediente;\n }",
"public Espai(){}",
"public static LocalDate generateExpiration() {\n LocalDate today = LocalDate.now(); //gives us the information at the moment the program is running\n int expYear = today.getYear() + 5;\n LocalDate exp = LocalDate.of(expYear, today.getMonth(), today.getDayOfMonth());\n return exp;\n }",
"public Equipas() {\r\n\t\t\r\n\t}",
"public static Enseigner createEntity(EntityManager em) {\n Enseigner enseigner = new Enseigner().dateDebut(DEFAULT_DATE_DEBUT).dateFin(DEFAULT_DATE_FIN);\n return enseigner;\n }",
"public TemSourceAccountingLine createNewAdvanceAccountingLine() {\n try {\n TemSourceAccountingLine accountingLine = getAdvanceAccountingLineClass().newInstance();\n accountingLine.setFinancialDocumentLineTypeCode(TemConstants.TRAVEL_ADVANCE_ACCOUNTING_LINE_TYPE_CODE);\n accountingLine.setCardType(TemConstants.ADVANCE); // really, card type is ignored but it is validated so we have to set something\n accountingLine.setFinancialObjectCode(this.getParameterService().getParameterValueAsString(TravelAuthorizationDocument.class, TemConstants.TravelAuthorizationParameters.TRAVEL_ADVANCE_OBJECT_CODE, KFSConstants.EMPTY_STRING));\n return accountingLine;\n }\n catch (IllegalAccessException iae) {\n throw new RuntimeException(\"unable to create a new source accounting line for advances\", iae);\n }\n catch (InstantiationException ie) {\n throw new RuntimeException(\"unable to create a new source accounting line for advances\", ie);\n }\n }",
"protected Enemy copy()\r\n\t{\r\n\t\treturn new DwarfEnemy();\r\n\t}",
"private static LineOfCredit createLineOfCreditObjectForPost() {\n\n\t\tLineOfCredit lineOfCredit = new LineOfCredit();\n\n\t\tCalendar now = Calendar.getInstance();\n\n\t\tString notes = \"Line of credit note created via API \" + now.getTime();\n\t\tlineOfCredit.setId(\"LOC\" + now.getTimeInMillis());\n\t\tlineOfCredit.setStartDate(now.getTime());\n\t\tnow.add(Calendar.MONTH, 6);\n\t\tlineOfCredit.setExpiryDate(now.getTime());\n\t\tlineOfCredit.setNotes(notes);\n\t\tlineOfCredit.setAmount(new Money(100000));\n\n\t\treturn lineOfCredit;\n\t}",
"public Notification createExpense(HttpServletRequest request) {\n Notification notification = new Notification();\n ExpenseDAO expenseDAO = new ExpenseDAO();\n TagDAO tagDAO = new TagDAO();\n Expense expense = new Expense();\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"MM/dd/yyyy\");\n Date expenseDate = new Date();\n BigDecimal amount;\n\n try {\n expenseDate = simpleDateFormat.parse(request.getParameter(\"expenseDate\"));\n } catch (ParseException e) {\n log.error(\"[\" + className + \"] createExpense: Error in parsing expenseDate\");\n }\n\n HashSet<String> uniqueStringList = new HashSet<String>();\n HashSet<Tag> tagSet = new HashSet<Tag>();\n String tagStringList = request.getParameter(\"tagString\");\n tagStringList = tagStringList.replace(\" \", \"\");\n\n if (tagStringList != null) {\n String[] tagStringTokenizeList = tagStringList.split(\",\");\n\n for (String tagName : tagStringTokenizeList) {\n uniqueStringList.add(tagName);\n }\n\n for (String tagName : uniqueStringList) {\n Tag tag = tagDAO.getByDisplayName(tagName);\n\n if (tag == null) {\n log.error(\"tag is null;\");\n Tag createTag = new Tag();\n createTag.setName(tagName);\n createTag.setDisplayName(tagName);\n tagDAO.create(createTag);\n tag = tagDAO.getByDisplayName(tagName);\n }\n\n tagSet.add(tag);\n }\n }\n\n amount = new BigDecimal(request.getParameter(\"amount\"));\n\n expense.setDate(expenseDate);\n expense.setDescription(request.getParameter(\"description\"));\n expense.setAmount(amount);\n expense.setTags(tagSet);\n\n try {\n expenseDAO.create(expense);\n notification.setNotificationType(NotificationType.SUCCESS);\n notification.setMessage(\"Expense created successfully.\");\n log.info(\"[\" + className + \"] createExpense: created Expense\");\n } catch (Exception e) {\n notification.setNotificationType(NotificationType.DANGER);\n notification.setMessage(\"Something went wrong with creating expense. Please try again.\");\n log.error(\"[\" + className + \"] createExpense: failed creating expense\");\n }\n\n return notification;\n }",
"public DDbExchangeRate() {\n super(DModConsts.F_EXR);\n initRegistry();\n }",
"public Object ae() {\n try {\n return this.ad.newInstance();\n } catch (IllegalAccessException | InstantiationException e) {\n throw new RuntimeException();\n }\n }",
"public static Invite createUpdatedEntity(EntityManager em) {\n Invite invite = new Invite()\n .nom(UPDATED_NOM)\n .prenom(UPDATED_PRENOM)\n .mail(UPDATED_MAIL)\n .mdp(UPDATED_MDP)\n .login(UPDATED_LOGIN)\n .points(UPDATED_POINTS);\n return invite;\n }",
"public final Statistic newInstance() {\n Statistic s = new Statistic();\n s.myNumMissing = myNumMissing;\n s.firstx = firstx;\n s.max = max;\n s.min = min;\n s.myConfidenceLevel = myConfidenceLevel;\n s.myJsum = myJsum;\n s.myValue = myValue;\n s.setName(getName());\n s.num = num;\n s.sumxx = sumxx;\n s.moments = Arrays.copyOf(moments, moments.length);\n if (getSaveOption()) {\n s.save(getSavedData());\n s.setSaveOption(true);\n }\n return (s);\n }",
"public PersistentObject newPersistentObject() {\r\n return new Chm62edtHabitatSyntaxaPersist();\r\n }",
"public Exercicio(){\n \n }",
"public EatTime() {\n }",
"public Proposal withExpirationDate(java.util.Date expirationDate) {\n setExpirationDate(expirationDate);\n return this;\n }",
"public InterestRateMonteCarloProductFactory(final LocalDate referenceDate) {\n\t\tsuper();\n\t\tthis.referenceDate = referenceDate;\n\t}",
"long getExpirations();"
] | [
"0.68882",
"0.67014843",
"0.66879386",
"0.63055",
"0.6183492",
"0.61402816",
"0.58933914",
"0.57455266",
"0.5722121",
"0.5512942",
"0.5472787",
"0.5430547",
"0.54252243",
"0.5404387",
"0.53867555",
"0.5333226",
"0.5331831",
"0.5322889",
"0.5314336",
"0.5310223",
"0.5301034",
"0.52884376",
"0.5273433",
"0.52602553",
"0.52474433",
"0.52275497",
"0.5224306",
"0.5204903",
"0.5203921",
"0.5199751",
"0.5191615",
"0.5175584",
"0.517168",
"0.5154484",
"0.5149335",
"0.5142639",
"0.5140651",
"0.5132645",
"0.5128945",
"0.51112676",
"0.51105136",
"0.5109561",
"0.51076823",
"0.50762546",
"0.5073734",
"0.5071146",
"0.50684476",
"0.50618154",
"0.5046287",
"0.5045247",
"0.5033072",
"0.50235313",
"0.5023504",
"0.5022408",
"0.5015629",
"0.5009292",
"0.50066453",
"0.50019217",
"0.50019217",
"0.5000588",
"0.49995014",
"0.49953285",
"0.49915847",
"0.49898583",
"0.49836656",
"0.4980016",
"0.4979676",
"0.49789816",
"0.49607578",
"0.49607256",
"0.49507582",
"0.4949012",
"0.49448833",
"0.49270973",
"0.49258897",
"0.49126",
"0.49032488",
"0.49026212",
"0.49022225",
"0.49001747",
"0.49000597",
"0.48990372",
"0.48975143",
"0.48939508",
"0.48905757",
"0.48884434",
"0.48857737",
"0.48854607",
"0.4882005",
"0.4875916",
"0.48696315",
"0.48673725",
"0.48671743",
"0.48644856",
"0.48577645",
"0.48573965",
"0.48456606",
"0.48415074",
"0.48413312",
"0.48396796"
] | 0.8667244 | 0 |
Returns a new object of class 'Ressource'. | Ressource createRessource(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract T createRessource();",
"public Object makeResource();",
"Resource createResource();",
"ObjectResource createObjectResource();",
"public OLWMTSSource(){\n\t\tsuper();\n\t}",
"public ResourceFactory(){}",
"protected Resource newResource()\n\t{\n\t\tPackageResource packageResource = PackageResource.get(getScope(), getName(), getLocale(),\n\t\t\tgetStyle());\n\t\tif (packageResource != null)\n\t\t{\n\t\t\tlocale = packageResource.getLocale();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new IllegalArgumentException(\"package resource [scope=\" + getScope() + \",name=\" +\n\t\t\t\tgetName() + \",locale=\" + getLocale() + \"style=\" + getStyle() + \"] not found\");\n\t\t}\n\t\treturn packageResource;\n\t}",
"Network_Resource createNetwork_Resource();",
"private Resource() {}",
"public static Resource getInstance() {\n if (singleInstance == null) {\n // lazy initialization of Resource class\n singleInstance = Resource.loadFromFile();\n }\n return singleInstance;\n }",
"protected Resource getResource() {\n return resource;\n }",
"public SourceInterestMapResource() {\n }",
"public CarroResource() {\r\n }",
"@Override\n \tpublic Representation getResource() throws Exception {\n \t\tJsonRepresentation result = null;\n \t\t// Rcupre l'identifiant unique de la ressource demande.\n \t\tString interId = (String) this.getRequestAttributes().get(\"interId\");\n \t\tString srcId = (String) this.getRequestAttributes().get(\"sourceId\");\n \t\tSystem.out.println(srcId);\n \t\t// Rcupration des sources de l'intervention\n \t\tList<Source> sources = Interventions.getInstance().getIntervention(interId).getSources();\n \n \t\tSource source = null;\n \t\t\n \t\t// Si on demande un source prcis\n \t\tif (srcId != null) {\n \t\t\t// Recherche du source demand\n \t\t\tfor (int i = 0; i < sources.size(); i++) {\n \t\t\t\tif (sources.get(i).getUniqueID().equals(srcId)) {\n \t\t\t\t\tsource = sources.get(i);\n \t\t\t\t}\n \t\t\t}\n \t\t\t// Si le source n'est pas trouv\n \t\t\tif (source == null) {\n \t\t\t\tresult = null;\n \t\t\t\tgetResponse().setStatus(Status.CLIENT_ERROR_NOT_ACCEPTABLE);\n \t\t\t} else {\n \t\t\t\tresult = new JsonRepresentation(source.toJSON());\n \t\t\t}\n \t\t// Si on veut tous les sources\n \t\t} else if (srcId == null) {\n \t\t\t\n \t\t\tJSONArray jsonAr = new JSONArray(); //Cration d'une liste Json\n \t\t\tfor(int i=0; i< sources.size();i++){\n\t\t\t\tjsonAr.put(sources.get(i).toJSON()); // On ajoute un jsonObject contenant le source dans le jsonArray\n \t\t\t}\n \t\t\t\n \t\t\tresult = new JsonRepresentation(jsonAr); // On cre la reprsentation de la liste\n \t\t}\n \n \t\t// Retourne la reprsentation, le code status indique au client si elle est valide\n \t\treturn result;\n \t}",
"public abstract IResource getResource();",
"public Resources(Name alias) {\n this(alias, RESOURCES);\n }",
"public Resource() {\n }",
"public Resource() {\n }",
"public synchronized Resource createResource(QName str) throws ModelException {\n\n // check whether we have it in the registry\n Resource r = (Resource)rmap.get(str);\n // System.err.println(\"Creating resource: \" + str + \", in rmap=\" + r);\n\n if(r == null) {\n r = new ResourceImpl(/*getUnusedNodeID(),*/ str);\n rmap.put(str, r);\n }\n return r;\n }",
"ResourceAPI createResourceAPI();",
"public IResource getResource();",
"private ResourceFactory() {\r\n\t}",
"Resource getResource() {\n\t\treturn resource;\n\t}",
"protected IResource getResource() {\r\n \t\tIEditorInput input = fTextEditor.getEditorInput();\r\n \t\treturn (IResource) ((IAdaptable) input).getAdapter(IResource.class);\r\n \t}",
"public GenericResource() {\n }",
"public Resources(String alias) {\n this(DSL.name(alias), RESOURCES);\n }",
"public GenericResource() {\r\n }",
"public interface Resource { \n /**\n * @return the time, in <code>millis</code>, at which this resource was\n * last modified.\n */\n public long lastModified();\n\n /**\n * @return the URI that this resource corresponds to.\n */\n public String getURI();\n\n /**\n * @return the <code>InputStream</code> corresponding to this resource.\n * @throws IOException\n */\n public InputStream getInputStream() throws IOException;\n \n \n /**\n * @return the <code>Resource</code> corresponding to the given relative URI.\n * @param uri a URI.\n * @throws IOException\n */ \n public Resource getRelative(String uri) throws IOException;\n \n}",
"public Resources() {\n }",
"public Resource getResource(){\n return res;\n }",
"private ResourceManager() {}",
"public LinksResource() {\n }",
"@Pure\n\tprotected IResourceFactory getResourceFactory() {\n\t\treturn this.resourceFactory;\n\t}",
"public abstract T getCreatedResource();",
"public GenericResource()\r\n {\r\n }",
"public static ResourcesHolder getInstance() {\n\t\tif (instance==null)\n\t\t{\n\t\t\tinstance=new ResourcesHolder();\n\t\t}\n\t\treturn instance;\n\n\n\t}",
"public interface ResourceFactory {\n\n /**\n * This function makes an instance of a predefined class which the\n * pool should consist of. The function should handle all initializing\n * of the object.\n * @return A pool object.\n */\n public Object makeResource();\n\n /**\n * This function closes a pool object. This could be closing of an\n * database connection or termination of a thread.\n */\n public void closeResource(Object resource);\n\n public String debugName();\n\n int maxWaitSecBeforeCreatingNewResource();\n}",
"public GenericResource()\n {\n }",
"Resource getResource();",
"protected abstract T getResource(Coordinate coord);",
"Reuse getReuse();",
"public TarefaResource() {\r\n }",
"public LocationAwareSeekableRODIterator createNewResource() {\n if(numIterators() > 0)\n throw new ReviewedGATKException(\"BUG: Tried to create multiple iterators over streaming ROD interface\");\n RMDTrack track = builder.createInstanceOfTrack(fileDescriptor);\n LocationAwareSeekableRODIterator iter = new SeekableRODIterator(track.getHeader(),track.getSequenceDictionary(),referenceSequenceDictionary,genomeLocParser,track.getIterator());\n return (flashbackData) ? new FlashBackIterator(iter) : iter;\n }",
"public Resources() {\n this(DSL.name(\"Resources\"), null);\n }",
"public Diaryresource() {\r\n\t}",
"public static ResourceFactory get() {\r\n\t\treturn single;\r\n\t}",
"public interface IRessource {\n\t\n\tpublic boolean getIpTables(Paquet paquet);\n\tpublic Paquet getNetwork(Paquet paquet);\n\tpublic Paquet routingPacket(Paquet paquet);\n\t\n\tpublic Paquet unGetIpTables(Paquet paquet);\n\tpublic Paquet unGetNetwork(Paquet paquet);\n\tpublic Paquet unRoutingPacket(Paquet paquet);\n\n}",
"public ResourceVO getResource() {\n\treturn resource;\n}",
"Service_Resource createService_Resource();",
"public ModelResource() {\n }",
"public ResManager()\n {\n }",
"public JhoveResources() {\n\t\tsuper();\n\t}",
"public CarResource() {\n }",
"@Override\n @Path(\"{name}\")\n public CacheResource getCacheResource(@PathParam(\"name\") String sName)\n {\n ResourceConfig configResource = m_config.getResources().get(sName);\n if (configResource == null)\n {\n // register pass-through resource for the specified cache name\n configResource = new ResourceConfig();\n configResource.setCacheName(sName);\n configResource.setKeyClass(String.class);\n configResource.setValueClass(StaticContent.class);\n configResource.setQueryConfig(new QueryConfig().setDirectQuery(new DirectQuery(Integer.MAX_VALUE)));\n configResource.setMaxResults(Integer.MAX_VALUE);\n\n m_config.getResources().put(sName, configResource);\n Logger.info(\"Configured pass-through resource for cache: \" + sName);\n }\n\n return instantiateCacheResourceInternal(configResource);\n }",
"Device_Resource createDevice_Resource();",
"public ResourcePoolImpl() {\r\n this((ResourcePool) null);\r\n }",
"public Resource getResource(Request request);",
"public ProductResource() {\n }",
"public S_RESOURCEObj() {\r\n }",
"public BoletajeResource() {\n }",
"public Resource createResourceFromUri(String uri)\n\t{\n\t\turi = this.replaceNamespacePrefixes(uri);\n\t\treturn this.model.createResource(uri);\n\t}",
"Object create(Object source);",
"public ResourceAdapter getResourceAdapter() {\n log.finest(\"getResourceAdapter()\");\n return ra;\n }",
"public interface IResourceSource\n{\n /**\n * Get resource location based on resource name.\n *\n * @param name Name of resource to be searched\n * @return URL of resource\n */\n public URL getResourceLocation( String name );\n\n /**\n * Get resource locations based on resource name.\n *\n * @param name Name of resources to be searched\n * @return Enumeration of URLs of resources\n */\n public Enumeration getResourceLocations( String name );\n\n /**\n * Get resource path this resource source references. Each entry including the last must be\n * terminated with a semicolon.\n *\n * @return Resource path this resource source references\n */\n public String getResourcePath();\n}",
"public ConnectionConfiguration getResource(){\n\t\t\n\t\t// code for round robin assignment of resources.\n\t\t// flips between one and zero.\n\t\tIterator<String> iterator = resources.getAvailableResources();\n\t\t\t\t\t\t\n\t\twhile (iterator.hasNext()) {\n\t\t\tplugins.add( iterator.next() );\n\t\t\tnumberOfConnections++;\n\t\t}\n\t\t\t\t\t\t\n\t\tConnectionConfiguration config = resources.getResourceFromName(plugins.get(flip)).configuration;\n\t\tflip = (flip + 1) % numberOfConnections;\n\t\tplugins.clear();\n\t\tnumberOfConnections = 0;\n\t\t\n\t\treturn config;\n\t}",
"public Resource getResource() {\n return resource;\n }",
"public AddResource() {\n }",
"public T getResource() throws ResourcePoolException{\n\t\tT resource = null;\n\t\tsynchronized(this.lock){\n\t\t\tint index=0;\n\t\t\t//true prove if have the resource which have not in use\n\t\t\t//current size > 0 prove the resource pool have the resource\n\t\t\tif(this.currentSize>0){\n\t\t\t\tfor(ResourceStatus<T> resourceStatus:this.resourcesStatus){\n\t\t\t\t\tif(resourceStatus!=null){\n\t\t\t\t\t\tif(!resourceStatus.isInUse()){\n\t\t\t\t\t\t\tresource=resourceStatus.getResource();\n\t\t\t\t\t\t\tresourceStatus.setInUse(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(resource==null){\n\t\t\t\tif(this.currentSize<this.maxResources){\n\t\t\t\t\tfor(ResourceStatus<T> resourceStatus:this.resourcesStatus){\n\t\t\t\t\t\tif(resourceStatus==null){\n\t\t\t\t\t\t\tresource=this.resourceSource.getResource();\n\t\t\t\t\t\t\tif(resource!=null){\n\t\t\t\t\t\t\t\tResourceStatus<T> oneStatus=new ResourceStatus<T>();\n\t\t\t\t\t\t\t\toneStatus.setResource(resource);\n\t\t\t\t\t\t\t\toneStatus.setInUse(true);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tthis.resourcesStatus[index]=oneStatus;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tthis.currentSize++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tthrow new ResourcePoolException(\"The resource pool is max,current:\"+this.currentSize);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn resource;\n\t}",
"public static JRDataSource getDataSource() {\n\t\treturn new CustomDataSource(1000);\n\t}",
"public interface ResourceReader<E> {\n /**\n * get resource types supported by this ResourceReader\n * @return types of resource which this ResourceReader understands (String array)\n */\n String [] getSupportedTypes();\n\n /**\n * Identification for vendor of this ResourceReader\n * @return string\n */\n String getProviderString();\n\n /**\n * Create appropriate Object from given Resource (for example Image if Resource.getType() returns \"gif\")\n * @param data Resource\n * @return Object\n */\n E create(Resource data);\n}",
"public <T> Config.Resource<T> toResource(Path path) {\n if (this.exists(path)) {\n return new Config.Resource.Filesystem<>(path);\n }\n return new Config.Resource.NotFound<>(path, this);\n }",
"public ResourceUtils() {\r\n //stub\r\n }",
"@Override \n public Object clone() {\n try {\n Resource2Builder result = (Resource2Builder)super.clone();\n result.self = result;\n return result;\n } catch (CloneNotSupportedException e) {\n throw new InternalError(e.getMessage());\n }\n }",
"public WebDataSource() {}",
"com.yandex.ydb.rate_limiter.Resource getResource();",
"public static ResourcesManager getInstance() {\n\n if (instance == null) {\n instance = new ResourcesManager();\n }\n return instance;\n\n }",
"public static ResourceManager getInstance() {\n if (instance == null)\n instance = new ResourceManager();\n return instance;\n }",
"ServiceDataResource createServiceDataResource();",
"public Resource getTargetResource();",
"public StorageResource() {\n }",
"public RessourceFer(Case position) {\n super(position);\n }",
"public Resource getTargetResource() {\n Resource target = (Resource) getResource();\n edu.hkust.clap.monitor.Monitor.loopBegin(626);\nwhile (target instanceof ResourceFrame) { \nedu.hkust.clap.monitor.Monitor.loopInc(626);\n{\n target = ((ResourceFrame) target).getResource();\n }} \nedu.hkust.clap.monitor.Monitor.loopEnd(626);\n\n return target;\n }",
"public static Resource getResource(TransactionalEditingDomain domain, EObject eObject) {\n\n\t\tif (eObject.eIsProxy()) {\n\n\t\t\tURI uri = EcoreUtil.getURI(eObject).trimFragment();\n\n\t\t\tResourceSet resourceSet = domain.getResourceSet();\n\n\t\t\tResource resource = resourceSet.getResource(uri, false);\n\n\t\t\tif (resource == null)\n\t\t\t\tresource = resourceSet.createResource(uri);\n\n\t\t\treturn resource;\n\n\t\t} else\n\t\t\treturn eObject.eResource();\n\t}",
"public abstract Source getSource();",
"public WifisResource() {\r\n\r\n }",
"public Jedis getResource() {\n\t\tif (jedisPool == null) {\n\t\t\tsynchronized (this) {\n\t\t\t\tif (jedisPool == null){\n\t\t\t\t\tjedisPool = new JedisPool(jedisPoolConfig, host, port);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn jedisPool.getResource();\n\t}",
"public static ObjectRepository getRepository() {\n\t\tif (_instance == null) {\n\t\t\tsynchronized (ObjectRepository.class) {\n\t\t\t\tif (_instance == null) {\n\t\t\t\t\t_instance = new ObjectRepository();\n\t\t\t\t\tif (config == null) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconfig = new PropertiesConfiguration(\n\t\t\t\t\t\t\t\t\t\"object.properties\");\n\t\t\t\t\t\t} catch (final ConfigurationException e) {\n\t\t\t\t\t\t\tSystem.err\n\t\t\t\t\t\t\t\t\t.println(\"Configuration Exception - Not able to locate object.properties\");\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\treturn _instance;\n\t}",
"public Source source(Class<? extends JsonConvertible> clazz) {\n Key key = Key.from(clazz);\n return new Source(this, key);\n }",
"private ResourcePackage() {}",
"public ResourceManager getResourceManager ()\n {\n return _rsrcmgr;\n }",
"private ResourceSet createResourceSet() {\r\n \t\t// create the container resource set\r\n \t\tResourceSet resourceSet = new ResourceSetImpl();\r\n \t\t// Register the appropriate resource factory to handle all file\r\n \t\t// extensions.\r\n \t\tresourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap()\r\n \t\t\t\t.put(Resource.Factory.Registry.DEFAULT_EXTENSION, new XMIResourceFactoryImpl() {\r\n \t\t\t\t\tpublic Resource createResource(URI uri) {\r\n \t\t\t\t\t\treturn new XMIResourceImpl(uri) {\r\n \t\t\t\t\t\t\tprotected boolean useUUIDs() {\r\n \t\t\t\t\t\t\t\treturn true;\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t};\r\n \t\t\t\t\t}\r\n \t\t\t\t});\r\n \t\t\r\n \t\tActivator.fTracer.traceDebug(\"new Resourceset created: \" + resourceSet);\r\n \t\treturn resourceSet;\r\n \t}",
"public MyPathResource() {\r\n }",
"public BookSearchResource() {\n }",
"public QuoteResource() {\n }",
"public ProfileResource() {\n }",
"public Gps_dataResource() {\n }",
"Source createDatasourceHttp(Source ds, Provider prov) throws RepoxException;",
"@Override\n public Map<String, Object> getResource() {\n List<Customer> customerList = customerRepository.findAllByName(\"toto\");\n Map<String,Object> model = new HashMap<String,Object>();\n model.put(\"id\", UUID.randomUUID().toString());\n model.put(\"content\", \"Hello World\");\n return model;\n }",
"public static ResourceManager getResourceManager()\r\n {\r\n if (_instance == null)\r\n _instance = new ResourceManager();\r\n\r\n return _instance;\r\n }",
"public interface IResource {\n\n\t/**\n\t * An optional attribute that identifies the Resource-element.\n\t */\n\tpublic URI getId();\n\n\tpublic boolean setId(URI id);\n\n\t/**\n\t * An optional attribute. If present, it provides a relative URI template for the identifier of the resource. The\n\t * resource's base URI is given by the Resource-element's parent Resource- or Resources-element. The value of the\n\t * path-attribute may be static or may contain embedded template parameters.\n\t */\n\tpublic String getPath();\n\n\tpublic boolean setPath(String path);\n\n\t/**\n\t * An optional attribute whose type is a space-separated list of URIs. Each value in the list identifies a\n\t * ResourceType-element that defines a set of methods supported by the resource.\n\t */\n\tpublic List<URI> getType();\n\n\tpublic boolean setType(List<URI> type);\n\n\tpublic boolean addType(URI type);\n\n\t/**\n\t * Defines the media type for the query component of the resourve URI. Defaults to\n\t * 'application/x-www-form-urlencoded' if not specified which results in query strings being formatted as specified.\n\t */\n\tpublic String getQueryType();\n\n\tpublic boolean setQueryType(String queryType);\n\n\t/**\n\t * A Resource-element contains zero or more Doc-elements.\n\t */\n\tpublic List<IDoc> getDocs();\n\n\tpublic boolean addDoc(IDoc doc);\n\n\t/**\n\t * A Resource-element contains zero or more Param-elements with one of the following values for its style-attriute:\n\t * template, matrix, query, header.\n\t */\n\tpublic List<IParam> getParams();\n\n\tpublic boolean addParam(IParam param);\n\n\t/**\n\t * A Resource-element contains zero or more Method-elements, each of which describes the input to and output from an\n\t * HTTP protocol method that can be applied to the resource. Such locally-defined methods are added to any methods\n\t * included in ResourceType-elements referred to using the type-attribute.\n\t */\n\tpublic List<IMethod> getMethods();\n\n\tpublic boolean addMethod(IMethod method);\n\n\t/**\n\t * A Resource-element contains zero or more Resource-elements that describe sub-resources. Such sub-resources\n\t * inherit matrix and template parameters from the parent resource since their URI is relative to that of the parent\n\t * resource but they do not inherit query or header parameters specified globally for the parent resource.\n\t */\n\tpublic List<IResource> getResources();\n\n\tpublic boolean addResource(IResource resource);\n\n\tpublic String toString();\n\n}"
] | [
"0.8106545",
"0.6797406",
"0.6558475",
"0.64902407",
"0.6460598",
"0.6455115",
"0.62389755",
"0.61702603",
"0.60665435",
"0.60224974",
"0.60191137",
"0.599122",
"0.595206",
"0.5935624",
"0.59206873",
"0.59135693",
"0.5871041",
"0.5871041",
"0.58523816",
"0.5836533",
"0.58102924",
"0.5796927",
"0.5761144",
"0.5755362",
"0.5749592",
"0.57408416",
"0.57398534",
"0.5736233",
"0.5689676",
"0.56785023",
"0.56720227",
"0.5662884",
"0.56563896",
"0.56287444",
"0.56266433",
"0.5617104",
"0.5616863",
"0.56139886",
"0.5605679",
"0.55507606",
"0.5544395",
"0.5536671",
"0.5533927",
"0.5531103",
"0.5523894",
"0.5521097",
"0.55101544",
"0.5496067",
"0.5493766",
"0.5481639",
"0.54713017",
"0.54693335",
"0.5469215",
"0.5465326",
"0.5454941",
"0.54383105",
"0.5434271",
"0.5427723",
"0.54211664",
"0.5411213",
"0.54022944",
"0.5398515",
"0.5383768",
"0.5372839",
"0.536712",
"0.5356125",
"0.53529096",
"0.5347011",
"0.5339004",
"0.532246",
"0.5316796",
"0.53104424",
"0.52988017",
"0.52961195",
"0.52906436",
"0.5282407",
"0.5280815",
"0.5278798",
"0.52594477",
"0.5257098",
"0.5256373",
"0.5239512",
"0.5237544",
"0.5230367",
"0.5229537",
"0.5220025",
"0.5214581",
"0.52101666",
"0.52069354",
"0.51995325",
"0.519788",
"0.519402",
"0.51930517",
"0.5182577",
"0.51809496",
"0.517108",
"0.5170775",
"0.5164174",
"0.51607305",
"0.5160593"
] | 0.8513825 | 0 |
Returns a new object of class 'Surface'. | Surface createSurface(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Surface(){\r\n\t\tsuper(SURFACE_TAG,\"\");\r\n\t\tthis.setRef(\"CG\");\r\n\t}",
"void createSurface(SurfaceTexture surfaceTexture);",
"public org.landxml.schema.landXML11.SurfaceDocument.Surface addNewSurface()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.SurfaceDocument.Surface target = null;\r\n target = (org.landxml.schema.landXML11.SurfaceDocument.Surface)get_store().add_element_user(SURFACE$0);\r\n return target;\r\n }\r\n }",
"public Surface getSurface() {\n \t\treturn surface;\n \t}",
"public org.landxml.schema.landXML11.SurfaceDocument.Surface getSurface()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.SurfaceDocument.Surface target = null;\r\n target = (org.landxml.schema.landXML11.SurfaceDocument.Surface)get_store().find_element_user(SURFACE$0, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target;\r\n }\r\n }",
"void mo21067a(Surface surface);",
"public Surface surface()\n { return _srf;\n }",
"@Override\n\t\tpublic Surface3D createSurface(ParameterList faultRepresentationParams) {\n\t\t\treturn null;\n\t\t}",
"void createPlanetSurface(int width, int height) {\r\n\t\trenderer.surface = new PlanetSurface();\r\n\t\trenderer.surface.width = width;\r\n\t\trenderer.surface.height = height;\r\n\t\trenderer.surface.computeRenderingLocations();\r\n\t\tui.allocationPanel.buildings = renderer.surface.buildings;\r\n\t}",
"public SurfaceControl.Builder makeSurface(SurfaceSession s) {\n return this.mWmService.makeSurfaceBuilder(s).setParent(this.mWindowingLayer);\n }",
"public Surface(Bitmap bitmap) {\n this(CreateBitmapInstance(bitmap));\n }",
"private Surface getPreviewSurface() {\n return surface_texture;\n }",
"public EGLSurface createWindowSurface(Object surface) {\n if (!(surface instanceof Surface) && !(surface instanceof SurfaceTexture)) {\n throw new RuntimeException(\"invalid surface: \" + surface);\n }\n\n // Create a window surface, and attach it to the Surface we received.\n int[] surfaceAttribs = {\n EGL10.EGL_NONE\n };\n EGLSurface eglSurface = argonEGL.eglCreateWindowSurface(argonGLDisplay, mEGLConfig, surface,\n surfaceAttribs);\n checkEglError(\"eglCreateWindowSurface\");\n if (eglSurface == null) {\n throw new RuntimeException(\"surface was null\");\n }\n return eglSurface;\n }",
"public Surface(String ref){\r\n\t\tthis();\r\n\t\taddAttribute(new PointingElement(\"ref\",ref));\r\n\t}",
"private native void nativeSurfaceInit(Object surface);",
"public native void Initialize(Surface surface);",
"public GL createSurface(SurfaceHolder holder) {\r\n if (MotoConfig.KEY_LOG) {\r\n Log.w(\"EglHelper\", \"createSurface() tid=\" + Thread.currentThread().getId());\r\n }\r\n /*\r\n * Check preconditions.\r\n */\r\n if (mEgl == null) {\r\n throw new RuntimeException(\"egl not initialized\");\r\n }\r\n if (mEglDisplay == null) {\r\n throw new RuntimeException(\"eglDisplay not initialized\");\r\n }\r\n if (mEglConfig == null) {\r\n throw new RuntimeException(\"mEglConfig not initialized\");\r\n }\r\n /*\r\n * The window size has changed, so we need to create a new\r\n * surface.\r\n */\r\n if (mEglSurface != null && mEglSurface != EGL10.EGL_NO_SURFACE) {\r\n\r\n /*\r\n * Unbind and destroy the old EGL surface, if\r\n * there is one.\r\n */\r\n mEgl.eglMakeCurrent(mEglDisplay, EGL10.EGL_NO_SURFACE,\r\n EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT);\r\n mEGLWindowSurfaceFactory.destroySurface(mEgl, mEglDisplay, mEglSurface);\r\n }\r\n\r\n /*\r\n * Create an EGL surface we can render into.\r\n */\r\n mEglSurface = mEGLWindowSurfaceFactory.createWindowSurface(mEgl,\r\n mEglDisplay, mEglConfig, holder);\r\n\r\n if (mEglSurface == null || mEglSurface == EGL10.EGL_NO_SURFACE) {\r\n int error = mEgl.eglGetError();\r\n if (error == EGL10.EGL_BAD_NATIVE_WINDOW) {\r\n Log.e(\"EglHelper\", \"createWindowSurface returned EGL_BAD_NATIVE_WINDOW.\");\r\n }\r\n return null;\r\n }\r\n\r\n /*\r\n * Before we can issue GL commands, we need to make sure\r\n * the context is current and bound to a surface.\r\n */\r\n if (!mEgl.eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface, mEglContext)) {\r\n throw new EglMakeCurrentException(\"eglMakeCurrent\");\r\n }\r\n\r\n GL gl = mEglContext.getGL();\r\n if (mGLWrapper != null) {\r\n gl = mGLWrapper.wrap(gl);\r\n }\r\n\r\n return gl;\r\n }",
"public static Room surface() {\r\n Room outside = new Room(\"Surface\", \"surface\", Room.roomSize.SMALL, Room.roomType.EXTERIOR, \"The outdoors\", null, null, null);\r\n \r\n Trait result = new Trait(\"Ant Hill\", 1, TraitBuilder.room_change());\r\n result.setDesc(\"antHill\");\r\n Task embiggen = new Task(\"Dig a new entrance\", 2, \"Digging\",\r\n null,\r\n new Trait[]{new Trait(\"Ant\", 0, TraitBuilder.reqGreaterThanCreationLink())},\r\n new Trait[]{result},\r\n \"Start an ant hill\");\r\n outside.getTasks().add(embiggen);\r\n\r\n return outside;\r\n }",
"public Surface(String frame,String origin,String units,float a,float b,float c,float axisAX,float axisAY,float axisAZ,float axisBX,float axisBY,float axisBZ,float axisCX,float axisCY,float axisCZ){\r\n\t\tthis(frame,origin,units,a,units,b,units,c,frame,axisAX,axisAY,axisAZ,frame,axisBX,axisBY,axisBZ,frame,axisCX,axisCY,axisCZ);\r\n\t}",
"SurfaceTexture mo17006a();",
"void createDummyPbufferSurface();",
"SurfaceTexture mo17015a();",
"@Override\n public void onSurfaceCreated(GL10 unused, EGLConfig config) {\n GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);\n\n mTriangle = new Triangle();\n mSquare = new Square();\n }",
"public SurfaceControl.Builder makeOverlay() {\n return this.mWmService.makeSurfaceBuilder(this.mSession).setParent(this.mOverlayLayer);\n }",
"private native static void initSurface(long instance, long avi);",
"@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 }",
"public static Camera open() { \n return new Camera(); \n }",
"Fog createFog();",
"protected Surface getOutputSurface() { return null; }",
"public RenderEngine() {\n\t\twindow = Window.getInstance();\n\t\t\n\t\ttestEntity = new Entity(\"skull/skull.obj\", \"./res/models/skull/skull.png\", new Vector3f(0,0,0), new Vector3f(0,0,0));\n\t\ttestEntity.getWorldTransform().setScaling(new Vector3f(0.01f,0.01f,0.01f));\n\t\t\n\t\ttestEntity2 = new Entity(\"dummy/dummy.obj\", \"./res/models/dummy/dummy.jpg\", new Vector3f(0,8,0), new Vector3f(0,0,0));\n\t\ttestEntity2.getWorldTransform().setScaling(new Vector3f(0.05f,0.05f,0.05f));\n\t\t\n\t\ttestLight = new Light(new Vector3f(-5,5,-5), new Vector3f(1,1,1));\n\t\ttestLight.getWorldTransform().setScaling(new Vector3f(0.1f,0.1f,0.1f));\n\t\t\n\t\tsky = new SkyDome();\n\t\t\n\t}",
"@Override\n public void onSurfaceCreated(GL10 unused, EGLConfig config) {\n GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);\n \n // initialize a triangle\n mTriangle = new Triangle();\n // initialize a rect\n mRect = new Rect(mContext.getResources());\n\n mPicture = new Picture(mContext.getResources());\n mBlackAndWhitePicture = new BlackAndWhitePicture(mContext.getResources());\n }",
"@Override\n\tpublic void onSurfaceCreated(GL10 gl, EGLConfig arg1) {\n\t\tcirculo = new Circulo(0.8f, 360, false);\n\t\tcruz = new cruz();\n\t\tray = new ray();\n\t\tgl.glClearColor(235f / 255, 124f / 255, 20f / 255, 0); // color de fondo\n\t}",
"public int get_surface_type() {\n return surface_type;\n }",
"SurfaceEntity createRoadEntity(Tile tile) {\r\n\t\tSurfaceEntity result = new SurfaceEntity();\r\n\t\tresult.tile = tile;\r\n\t\tresult.tile.alpha = alpha;\r\n\t\tresult.type = SurfaceEntityType.ROAD;\r\n\t\treturn result;\r\n\t}",
"@FromString\n public static SurfaceName of(String name) {\n return new SurfaceName(name);\n }",
"public void setSurface(org.landxml.schema.landXML11.SurfaceDocument.Surface surface)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.SurfaceDocument.Surface target = null;\r\n target = (org.landxml.schema.landXML11.SurfaceDocument.Surface)get_store().find_element_user(SURFACE$0, 0);\r\n if (target == null)\r\n {\r\n target = (org.landxml.schema.landXML11.SurfaceDocument.Surface)get_store().add_element_user(SURFACE$0);\r\n }\r\n target.set(surface);\r\n }\r\n }",
"public SurfaceTextureManager() {\n mTextureRender = new STextureRender();\n mTextureRender.surfaceCreated();\n\n mSurfaceTexture = new SurfaceTexture(mTextureRender.getTextureId());\n\n // This doesn't work if this object is created on the thread that CTS started for\n // these test cases.\n //\n // The CTS-created thread has a Looper, and the SurfaceTexture constructor will\n // create a Handler that uses it. The \"frame available\" message is delivered\n // there, but since we're not a Looper-based thread we'll never see it. For\n // this to do anything useful, OutputSurface must be created on a thread without\n // a Looper, so that SurfaceTexture uses the main application Looper instead.\n //\n // Java language note: passing \"this\" out of a constructor is generally unwise,\n // but we should be able to get away with it here.\n mSurfaceTexture.setOnFrameAvailableListener(this);\n }",
"public EGLSurface createOffscreenSurface(int width, int height) {\n int[] surfaceAttribs = {\n EGL10.EGL_WIDTH, width,\n EGL10.EGL_HEIGHT, height,\n EGL10.EGL_NONE\n };\n EGLSurface eglSurface = argonEGL.eglCreatePbufferSurface(argonGLDisplay, mEGLConfig,\n surfaceAttribs);\n checkEglError(\"eglCreatePbufferSurface\");\n if (eglSurface == null) {\n throw new RuntimeException(\"surface was null\");\n }\n return eglSurface;\n }",
"public GraphicsPrimitive makePrimitive(SurfaceType paramSurfaceType1, CompositeType paramCompositeType, SurfaceType paramSurfaceType2) {\n/* 122 */ return null;\n/* */ }",
"@Override\n\tpublic void surfaceCreated(SurfaceHolder holder) {\n\t\tLog.e(TAG,\"Surface Created\");\n\t\tcamera = Camera.open();\n\t}",
"void init(){\n if(DEBUG) Log.d(TAG, \"Creating GlHelper and Surface\");\n mGLHelper = new GLHelper();\n int mDefaultTextureID = 10001;\n SurfaceTexture st = new SurfaceTexture(mDefaultTextureID);\n st.setDefaultBufferSize(mWidth, mHeight);\n mGLHelper.init(st);\n\n textureID = mGLHelper.createOESTexture();\n sTexture = new SurfaceTexture(textureID);\n sTexture.setOnFrameAvailableListener(this);\n surface = new Surface(sTexture);\n }",
"@Override\n\tpublic void onSurfaceCreated(GL10 unused, EGLConfig config) {\n\t\tGLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);\n\n\t\tmTriangle = new M15_OpenGLES20Triangle();\n\t\tmQuadrat = new M15_OpenGLES20Quadrat();\n\t}",
"public MainFrame(Surface surface) {\n _drawSurface = surface;\n \n initComponents();\n triunghiSurface.add(_drawSurface);\n _drawSurface.setX1(50);\n _drawSurface.setY1(150);\n _drawSurface.setColor(Color.RED);\n _drawSurface.setSize(triunghiSurface.getWidth(), triunghiSurface.getHeight());\n \n // adaugam listen-erii slide-urilor\n \n SliderListener s1 = new SliderListener(this);\n SliderListener s2 = new SliderListener(this);\n slider_cateta_1.addChangeListener(s1);\n slider_cateta_2.addChangeListener(s2);\n }",
"public Camera() {\r\n this(1, 1);\r\n }",
"public Material create();",
"protected DrawSurface() {\n\t\taiDrawingOrder = new Object[] { RANGE_CURSOR_DRAWSURFACE, GRID_DRAWSURFACE, GRAPH_DRAWSURFACE,\n\t\t\t\tCURSOR_DRAWSURFACE, ZOOM_DRAWSURFACE, };\n\n\t\t// we know that we paint all our own pixels.\n\t\tsetOpaque(false);\n\n\t\t// default background\n\t\tsetBackground(Color.BLACK);\n\n\t\t// give us the same default front as a JPanel\n\t\tsetFont(UIManager.getFont(\"Panel.font\"));\n\n\t\t/*\n\t\t * We create our own cursor because the default cross-hair cursor has\n\t\t * some weird display issues - it seems to fade into some waterfall\n\t\t * graphs, and seems to interact with the green FFT line to produce red\n\t\t * pixels. Weird.\n\t\t */\n\t\tsetCursor(DEFAULT_CROSSHAIR_CURSOR);\n\n\t\tPeralexLibsBundle.addLocaleListener(this); // do after components have\n\t\t\t\t\t\t\t\t\t\t\t\t\t// been initialised\n\t}",
"public void setSurfaceProperty(SurfaceProperty surfaceProperty) {\n\t\tthis.surfaceProperty = surfaceProperty;\n\t}",
"public native boolean createARX(Surface s, SurfaceTexture st, Bitmap bitmap);",
"public interface SurfaceCallback {\n\n\n void onSurfaceCreated(Surface surface);\n\n\n void onSurfaceChanged(Surface surface,int width, int height);\n\n\n void onSurfaceDestroy();\n}",
"public Card build() {\n return new Card(frontFace, backFace);\n }",
"public WorldScene makeScene() {\n // WorldCanvas c = new WorldCanvas(300, 300);\n WorldScene s = new WorldScene(this.width, this.height);\n s.placeImageXY(newImg, this.width / 2, this.height / 2);\n return s;\n }",
"public void set_surface_type(int st) {\n surface_type = st;\n }",
"public Card(FrontFace frontFace, BackFace backFace) {\n this.frontFace = frontFace;\n this.backFace = backFace;\n }",
"@Override // com.android.server.wm.WindowContainer\n public SurfaceControl.Builder makeChildSurface(WindowContainer child) {\n SurfaceControl.Builder b = this.mWmService.makeSurfaceBuilder(child != null ? child.getSession() : getSession()).setContainerLayer();\n if (child == null) {\n return b;\n }\n return b.setName(child.getName()).setParent(this.mWindowingLayer);\n }",
"private void onSurfaceReceived() {\n List<Surface> surfaceList = new ArrayList<Surface>();\n surfaceList.add(targetSurface);\n try {\n cameraDevice.createCaptureSession(surfaceList, new CameraCaptureSession.StateCallback() {\n @Override\n public void onConfigured(CameraCaptureSession session) {\n onSurfaceConfigured(session);\n }\n\n @Override\n public void onConfigureFailed(CameraCaptureSession session) {\n System.out.println(\"CAMERA CONFIGURE FAILED\");\n }\n }, null);\n } catch(Exception e) {\n System.out.println(\"FAILED TO START CAPTURE SESSION\");\n e.printStackTrace();\n }\n }",
"public SurfaceView createLocalUI(Context context) {\n SurfaceView surfaceV = RtcEngine.CreateRendererView(context);\n surfaceV.setZOrderOnTop(true);\n surfaceV.setZOrderMediaOverlay(true);\n mRtcEngine.setupLocalVideo(new VideoCanvas(surfaceV));\n surfaceV.layout(0, 0, 20, 10);\n return surfaceV;\n }",
"@Override\n public LocalGame createLocalGame() {\n return new LocalGameActual();\n }",
"public static EglBase create() {\n return create(null /* shaderContext */, CONFIG_PLAIN);\n }",
"public Fish create(){\n\t\tMovementStyle style = new NoMovement();\n\t\treturn new Shark(style);\n\t}",
"public MaxwellFisheyeLensSurface()\n\t{\n\t\tthis(\n\t\t\t\t1.0,\t// refractive-index ratio\n\t\t\t\t0.0,\t// transparent tunnel radius\n\t\t\t\t1.0,\t// transmission coefficient\n\t\t\t\ttrue\t// shadow-throwing\n\t\t\t);\n\t}",
"public GameScreen newGame() {\n gameScreen = new GameScreen(this);\n return gameScreen;\n }",
"public static void create() {\r\n render();\r\n }",
"@Override\n public void onSurfaceCreated(GL10 unused, EGLConfig config) {\n GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);\n \n // Do backface culling\n GLES20.glEnable(GLES20.GL_CULL_FACE);\n GLES20.glFrontFace(GLES20.GL_CCW);\n // Why using GL_BACK won't work is a mystery\n GLES20.glCullFace(GLES20.GL_BACK);\n // Enable depth buffer\n GLES20.glEnable(GLES20.GL_DEPTH_TEST);\n GLES20.glDepthFunc(GLES20.GL_LEQUAL);\n GLES20.glDepthMask(true);\n \n for (int i = 0; i < NUM_CARS; i++) {\n mCarBody[i] = new CarBody((float) Math.random(),\n (float) Math.random(),\n (float) Math.random());\n mCarWheels[i] = new CarWheels();\n }\n \n // Create transformation matrices for each car\n for (int i = 0; i < NUM_CARS; i++) {\n mCarXOffsets[i] = (i % NUM_LANES) * 1.1f;\n mCarZOffsets[i] = ((i / NUM_LANES) * -2) + ((i % NUM_LANES) * 1.3f);\n }\n \n road = new Square(0.6f, 0.6f, 0.6f);\n land = new Square(0.1f, 0.6f, 0.1f);\n sky = new Square(0.6f, 0.6f, 0.9f);\n background = new Sprite(mActivityContext);\n \n }",
"@Override\n public void onSurfaceCreated(GL10 gl, EGLConfig config) {\n gl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); // Set color's clear-value to black\n gl.glClearDepthf(1.0f); // Set depth's clear-value to farthest\n gl.glEnable(GL10.GL_DEPTH_TEST); // Enables depth-buffer for hidden surface removal\n gl.glDepthFunc(GL10.GL_LEQUAL); // The type of depth testing to do\n gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST); // nice perspective view\n gl.glShadeModel(GL10.GL_SMOOTH); // Enable smooth shading of color\n gl.glDisable(GL10.GL_DITHER); // Disable dithering for better performance\n \n // You OpenGL|ES initialization code here\n\n \n \n }",
"@Override\r\n\tpublic void surfaceCreated(GL10 gl) {\n\t\tgl.glDisable(GL10.GL_DITHER);\r\n\t\t\r\n\t\t// One-time OpenGL initialization based on context...\r\n gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT,\r\n GL10.GL_NICEST);\r\n\t\t\r\n gl.glClearColor(0, 0, 0, 1); \r\n gl.glEnable(GL10.GL_CULL_FACE);\r\n gl.glCullFace(GL10.GL_BACK);\r\n gl.glEnable(GL10.GL_DEPTH_TEST);\r\n gl.glEnable(GL10.GL_LIGHTING);\r\n gl.glDepthFunc(GL10.GL_LEQUAL);\r\n gl.glShadeModel(GL10.GL_SMOOTH);\r\n \r\n if(scene != null && use_vbos) {\r\n \t\t// TODO messy...\r\n \t\tscene.forgetHardwareBuffers();\r\n \t\tscene.generateHardwareBuffers(gl);\r\n }\r\n }",
"public Surface(int var1, int var2, int var3, Component var4) {\n super();\n this.interlace = false;\n this.loggedIn = false;\n this.field_731 = var4;\n this.field_744 = var2;\n this.field_746 = var1;\n this.field_726 = this.field_723 = var1;\n this.field_727 = this.field_724 = var2;\n this.field_725 = var1 * var2;\n this.pixels = new int[var1 * var2];\n this.spritePixels = new int[var3][];\n this.field_742 = new boolean[var3];\n this.spriteColoursUsed = new byte[var3][];\n this.spriteColourList = new int[var3][];\n this.field_736 = new int[var3];\n this.field_737 = new int[var3];\n this.spriteWidthFull = new int[var3];\n this.field_741 = new int[var3];\n this.field_738 = new int[var3];\n this.field_739 = new int[var3];\n if(var1 > 1 && var2 > 1 && var4 != null) {\n this.field_728 = new DirectColorModel(32, 16711680, '\\uff00', 255);\n int var5 = this.field_723 * this.field_724;\n int var6 = 0;\n if(field_759 || var6 < var5) {\n do {\n this.pixels[var6] = 0;\n ++var6;\n } while(var6 < var5);\n }\n\n this.field_732 = var4.createImage(this);\n this.method_219();\n var4.prepareImage(this.field_732, var4);\n this.method_219();\n var4.prepareImage(this.field_732, var4);\n this.method_219();\n var4.prepareImage(this.field_732, var4);\n }\n\n }",
"Layer createLayer();",
"java.util.List getSurfaceRefs();",
"protected HLook createLook()\n {\n return new HGraphicLook()\n {\n };\n }",
"public net.opengis.gml.x32.AbstractSurfacePatchType addNewAbstractSurfacePatch()\n {\n synchronized (monitor())\n {\n check_orphaned();\n net.opengis.gml.x32.AbstractSurfacePatchType target = null;\n target = (net.opengis.gml.x32.AbstractSurfacePatchType)get_store().add_element_user(ABSTRACTSURFACEPATCH$0);\n return target;\n }\n }",
"public void onSurfaceCreated(GL10 unused, EGLConfig config)\n {\n GLES20.glClearColor(1.0f, 0.2f, 0.2f, 1.0f);\n //mSquare = ne\n bigStar = new Star(0.2f);\n //bigStar.setColor(0,0,1,0.5f);\n for (int i = 0; i < instantiateNumber; i++)\n {\n symbols.add(new Star(0.1f));\n //symbols.get(i).setColor(0, (i * 0.015f),0);\n trail.add(new Vec2(0,0));\n }\n }",
"OBJECT createOBJECT();",
"@Override\n\tpublic void onSurfaceCreated(GL10 gl, EGLConfig config) {\n Bitmap bm = this.getDrawingBitmap();\n\n\t\tsquare.loadGLTexture(gl, this.context, bm);\n\t\t\n\t\tgl.glEnable(GL10.GL_TEXTURE_2D);\t\t\t//Enable Texture Mapping ( NEW )\n\t\tgl.glShadeModel(GL10.GL_SMOOTH); \t\t\t//Enable Smooth Shading\n\t\tgl.glClearColor(0.0f, 0.0f, 0.0f, 0.5f); \t//Black Background\n\t\tgl.glClearDepthf(1.0f); \t\t\t\t\t//Depth Buffer Setup\n\t\tgl.glEnable(GL10.GL_DEPTH_TEST); \t\t\t//Enables Depth Testing\n\t\tgl.glDepthFunc(GL10.GL_LEQUAL); \t\t\t//The Type Of Depth Testing To Do\n\t\t\n\t\t//Really Nice Perspective Calculations\n\t\tgl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST); \n\n\t}",
"public PlayerWL() {\n super();\n rotateYAxis = 0;\n positionZ = 0;\n positionX = 0;\n camera = new PerspectiveCamera(true);\n camera.getTransforms().addAll(\n new Rotate(0, Rotate.Y_AXIS),\n new Rotate(-10, Rotate.X_AXIS),\n new Translate(0, 0, 0));\n cameraGroup = new Group(camera);\n camera.setRotationAxis(new Point3D(0, 1, 0));\n }",
"public void onSurfaceCreated(GL10 glUnused, EGLConfig config) {\n Log.i(Focus.TAG, \"onSurfaceCreated, thread is \" + Thread.currentThread());\n\n root = new Root();\n renderable = new Triangle();\n\n try {\n shader = new ShaderLoader(context).load(\"plain\");\n renderable = new Triangle();\n renderable.setShaderProgram(shader);\n Log.i(Focus.TAG, \"shader found, id: \" + shader);\n } catch (IOException ex) {\n Log.e(Focus.TAG, \"error creating shader\", ex);\n }\n\n }",
"@Override\n\tpublic void create() {\n\t\tthis.mesh = new Mesh(VertexDataType.VertexArray, false, 4, 6, \n\t\t\t\tnew VertexAttribute(VertexAttributes.Usage.Position, 3, \"attr_position\"));\n\n\t\tmesh.setVertices(new float[] {\n\t\t\t\t-8192f, -512f, 0,\n\t\t\t\t8192f, -512f, 0,\n\t\t\t\t8192f, 512f, 0,\n\t\t\t\t-8192f, 512f, 0\n\t\t});\n\t\tmesh.setIndices(new short[] {0, 1, 2, 2, 3, 0});\n\n\t\t// creates the camera\n\t\tcamera = new OrthographicCamera(CoordinateConverter.getCameraWidth(), CoordinateConverter.getCameraHeight());\n\n\t\t// Sets the positions of the camera\n\t\tcamera.position.set(CoordinateConverter.getCameraWidth()/2, CoordinateConverter.getCameraHeight()/2, 0);\n\t\tcamera.update();\n\n\t\t// Sets how much of the map that is shown on the screen\n\t\tglViewport = new Rectangle(0, 0, CoordinateConverter.getCameraWidth(), CoordinateConverter.getCameraHeight());\n\t\t\n\t}",
"@Override\n\tpublic void create() {\n\t\tassetManager = new AssetManager();\n\t\tassetManager.load(ROLIT_BOARD_MODEL, Model.class);\n\t\tassetManager.load(ROLIT_BALL_MODEL, Model.class);\n\t\t\n\t\t//construct the lighting\n\t\tenvironment = new Environment();\n\t\tenvironment.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.4f, 0.4f, 0.4f, 1f));\n\t\tenvironment.add(new DirectionalLight().set(0.8f, 0.8f, 0.8f, -1f, -0.8f, -0.2f));\n\t\t\n\t\tmodelBatch = new ModelBatch();\n\t\t\n\t\tcam = new PerspectiveCamera(67f, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());\n\t\t\n\t\tGdx.input.setInputProcessor(new InputHandler());\n\t}",
"Player createPlayer();",
"protected Drawing createDrawing() {\n return new StandardDrawing();\n }",
"private void clearSurface(SurfaceHolder holder) {\n\t\tSurface surface = holder.getSurface();\n\t\tEglCore eglCore = new EglCore();\n\t\tWindowSurface win = new WindowSurface(eglCore, surface, false);\n\t\twin.makeCurrent();\n\t\tGLES20.glClearColor(0, 0, 0, 0);\n\t\tGLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT);\n\t\twin.swapBuffers();\n\t\twin.release();\n\t\teglCore.release();\n\t}",
"protected CameraInstance createCameraInstance() {\n CameraInstance cameraInstance = new CameraInstance(getContext());\n cameraInstance.setCameraSettings(cameraSettings);\n return cameraInstance;\n }",
"public void onSurfaceCreated(GL10 gl, EGLConfig config)\n {\n }",
"Plane getPlane();",
"protected void createCameraPreview() {\n try {\n SurfaceTexture texture = textureView.getSurfaceTexture();\n assert texture != null;\n texture.setDefaultBufferSize(imageDimension.getWidth(), imageDimension.getHeight());\n Surface surface = new Surface(texture);\n captureRequestBuilder = cameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_PREVIEW);\n captureRequestBuilder.addTarget(surface);\n cameraDevice.createCaptureSession(Collections.singletonList(surface), new CameraCaptureSession.StateCallback(){\n @Override\n public void onConfigured(@NonNull CameraCaptureSession cameraCaptureSession) {\n if (null == cameraDevice) {\n return;\n }\n cameraCaptureSessions = cameraCaptureSession;\n updatePreview();\n }\n @Override\n public void onConfigureFailed(@NonNull CameraCaptureSession cameraCaptureSession) {\n Toast.makeText(MainActivity.this, \"Configuration change\", Toast.LENGTH_SHORT).show();\n }\n }, null);\n } catch (CameraAccessException e) {\n Toast.makeText(MainActivity.this, \"Camera Surface failed to load.\", Toast.LENGTH_SHORT).show();\n e.printStackTrace();\n }\n }",
"public boolean isSurfaceWorld()\n {\n return false;\n }",
"@Override\n\tpublic void create() {\n\t\tthis.playScreen = new PlayScreen<EntityUnknownGame>(this);\n\t\tsetScreen(this.playScreen);\n\t\t\n\t\t//this.shadowMapTest = new ShadowMappingTest<EntityUnknownGame>(this);\n\t\t//setScreen(this.shadowMapTest);\n\t\t\n\t\t//this.StillModelTest = new StillModelTest<EntityUnknownGame>(this);\n\t\t//setScreen(this.StillModelTest);\n\t\t\n//\t\tthis.keyframedModelTest = new KeyframedModelTest<EntityUnknownGame>(this);\n//\t\tsetScreen(this.keyframedModelTest);\n\t}",
"@Override\n\tpublic void surfaceCreated(SurfaceHolder arg0) {\n\t\t\n\t}",
"public RenderSystem() {\n super(SystemType.RENDER);\n bufferBuffer =\n new MasterBuffer(\n voide.resources.Resources\n .get()\n .getResource(\"voide.packed_texture\", Texture.class)\n .getTextureId()\n );\n master =\n new MasterRenderer(Constants.GAME_WIDTH, Constants.GAME_HEIGHT);\n }",
"public android.renderscript.Element create() { throw new RuntimeException(\"Stub!\"); }",
"public T caseFloorSurfaceType(FloorSurfaceType object) {\n\t\treturn null;\n\t}",
"public Game()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1, false); \n Greenfoot.start(); //Autostart the game\n Greenfoot.setSpeed(50); // Set the speed to 30%\n setBackground(bgImage);// Set the background image\n \n //Create instance\n \n Airplane gameplayer = new Airplane ();\n addObject (gameplayer, 100, getHeight()/2);\n \n }",
"public Texture() {\n }",
"public WorldScene makeScene() {\n WorldScene scene = new WorldScene(this.width * GamePiece.GAMEPIECE_SIZE,\n this.height * GamePiece.GAMEPIECE_SIZE);\n WorldImage row = new EmptyImage();\n for (int i = 0; i < this.width; i++) {\n WorldImage column = new EmptyImage();\n for (int j = 0; j < this.height; j++) {\n column = new AboveImage(column, this.board.get(i).get(j)\n .drawPiece(this.board.get(powerRow).get(powerCol), this.radius));\n }\n row = new BesideImage(row, column);\n }\n scene.placeImageXY(row, (this.width * GamePiece.GAMEPIECE_SIZE) / 2,\n (this.height * GamePiece.GAMEPIECE_SIZE) / 2);\n return scene;\n }",
"public void surfaceCreated(SurfaceHolder holder) {\n\t\tthis.camera = Camera.open();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tcamera.setDisplayOrientation(90);\r\n\t\t\tcamera.setPreviewDisplay(holder);\r\n\t\t} catch (IOException e) {\r\n\t\t\tcamera.release();\r\n\t\t\tcamera = null;\r\n\t\t\tToast.makeText(this.getContext(), \"Error \"+e.toString(), Toast.LENGTH_LONG).show();\r\n\t\t}\r\n\t\t\t\t\t\t\r\n\t}",
"public void set_as_bezier() {\n surface_type = 1;\n }",
"public Camera() {\n\t\treset();\n\t}",
"@Override\n\t\tpublic void create() {\n\t\t\tcannon = new CannonLogic();\n\t\t\tlines = new LineLogic();\n\t\t\tboxes = new BoxLogic();\n\t\t\tcontroller = new PlayerController();\n\t\t\tshapeList = new ArrayList<Shape>();\n\t\t\t\n\t\t\tGdx.gl11.glEnableClientState(GL11.GL_VERTEX_ARRAY);\n\t\t\tGdx.gl11.glClearColor(0.4f, 0.6f, 1.0f, 1.0f);\n\t\t\tvertexBuffer = BufferUtils.newFloatBuffer(8);\n\t\t\tvertexBuffer.put(new float[] {-50,-50, -50,50, 50,-50, 50,50});\n\t\t\tvertexBuffer.rewind();\n\t\t}",
"public CameraSurfaceView(Context context, AttributeSet attrs) {\n\t\tsuper(context, attrs);\n\t\tinit();\n\t}",
"public void onSurfaceCreated(EGLConfig config) {\r\n Log.i(TAG, \"onSurfaceCreated\");\r\n GLES20.glClearColor(0.8f, 0.8f, 0.8f, 0.5f); // Dark background so text\r\n // shows up well.\r\n\r\n vertexShader = loadGLShader(GLES20.GL_VERTEX_SHADER, R.raw.light_vertex);\r\n gridShader = loadGLShader(GLES20.GL_FRAGMENT_SHADER, R.raw.grid_fragment);\r\n passthroughShader = loadGLShader(GLES20.GL_FRAGMENT_SHADER, R.raw.passthrough_fragment);\r\n\r\n\r\n for (GLSelectableObject cube : cubes) {\r\n cube.onSurfaceCreated(vertexShader, gridShader, passthroughShader);\r\n }\r\n\r\n floor.onSurfaceCreated(vertexShader, gridShader, passthroughShader);\r\n GLES20.glEnable(GLES20.GL_DEPTH_TEST);\r\n\r\n checkGLError(\"onSurfaceCreated\");\r\n }",
"public void surfaceCreated(SurfaceHolder holder) {\n mSurface = holder.getSurface();\n startARX();\n }"
] | [
"0.74981767",
"0.7089636",
"0.6911741",
"0.6718978",
"0.6661016",
"0.6438331",
"0.63282174",
"0.6308633",
"0.62905264",
"0.6255711",
"0.61321145",
"0.60505784",
"0.60480994",
"0.6027804",
"0.6005289",
"0.6004913",
"0.59380186",
"0.5931378",
"0.58841896",
"0.58422726",
"0.58097726",
"0.58031017",
"0.5747713",
"0.5735986",
"0.5688523",
"0.5664611",
"0.56558514",
"0.56468076",
"0.5626614",
"0.56087524",
"0.5566518",
"0.55587107",
"0.5549292",
"0.5538287",
"0.5537938",
"0.55374664",
"0.5531091",
"0.5530722",
"0.55231273",
"0.54761636",
"0.54693127",
"0.5450198",
"0.54420036",
"0.54367656",
"0.5430023",
"0.537624",
"0.5371794",
"0.5362466",
"0.5358216",
"0.5355887",
"0.5333993",
"0.5333797",
"0.53210276",
"0.5316329",
"0.53152525",
"0.5313933",
"0.5286144",
"0.52849907",
"0.5277283",
"0.52764386",
"0.5257227",
"0.52520174",
"0.5242592",
"0.5222534",
"0.5210865",
"0.5194537",
"0.5194225",
"0.51912194",
"0.51831144",
"0.51688355",
"0.51656955",
"0.5163916",
"0.51617134",
"0.514436",
"0.514",
"0.5135097",
"0.5130122",
"0.51273304",
"0.5108796",
"0.5099269",
"0.50987315",
"0.50973254",
"0.5096366",
"0.5074279",
"0.5066503",
"0.5061138",
"0.50516343",
"0.50503653",
"0.5047911",
"0.50431514",
"0.50366884",
"0.50351304",
"0.50249356",
"0.50062764",
"0.5005735",
"0.49914846",
"0.4990931",
"0.4983715",
"0.4979773",
"0.4975061"
] | 0.81643105 | 0 |
Returns a new object of class 'Parcelle'. | Parcelle createParcelle(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public Movie createFromParcel(Parcel in) {\n return new Movie(in);\n }",
"@Override\n\t\tpublic NewDoc createFromParcel(Parcel source) {\n\t\t\treturn new NewDoc(source);\n\t\t}",
"@Override\n public SpesaObject createFromParcel(Parcel in) {\n return new SpesaObject(in);\n }",
"@Override // android.os.Parcelable.Creator\n public final /* synthetic */ lw createFromParcel(Parcel parcel) {\n return new lw(parcel, (byte) 0);\n }",
"public C1748jj createFromParcel(Parcel parcel) {\n int G = C0721a.m714G(parcel);\n int i = 0;\n int i2 = 0;\n int i3 = 0;\n String str = null;\n IBinder iBinder = null;\n Scope[] scopeArr = null;\n Bundle bundle = null;\n while (parcel.dataPosition() < G) {\n int F = C0721a.m713F(parcel);\n switch (C0721a.m720aH(F)) {\n case 1:\n i = C0721a.m728g(parcel, F);\n break;\n case 2:\n i2 = C0721a.m728g(parcel, F);\n break;\n case 3:\n i3 = C0721a.m728g(parcel, F);\n break;\n case 4:\n str = C0721a.m736o(parcel, F);\n break;\n case 5:\n iBinder = C0721a.m737p(parcel, F);\n break;\n case 6:\n scopeArr = (Scope[]) C0721a.m722b(parcel, F, Scope.CREATOR);\n break;\n case 7:\n bundle = C0721a.m738q(parcel, F);\n break;\n default:\n C0721a.m721b(parcel, F);\n break;\n }\n }\n if (parcel.dataPosition() == G) {\n return new C1748jj(i, i2, i3, str, iBinder, scopeArr, bundle);\n }\n throw new C0721a.C0722a(\"Overread allowed size end=\" + G, parcel);\n }",
"@Override\n\t\tpublic Bpartner createFromParcel(Parcel in) {\n\t\t\treturn new Bpartner(in);\n\t\t}",
"public Item createFromParcel(Parcel source) {\n Item item = new Item();\n item.name = source.readString(); \n item.description = source.readString(); \n item.type = source.readString(); \n item.value = source.readString(); \n return item; \n }",
"public CMObject newInstance();",
"@Override\n\t\tpublic Info createFromParcel(Parcel source) {\n\t\t\treturn new Info(source);\n\t\t}",
"public C0902id createFromParcel(Parcel parcel) {\n String str = null;\n int n = C0173a.m313n(parcel);\n HashSet hashSet = new HashSet();\n int i = 0;\n C0900ib ibVar = null;\n String str2 = null;\n C0900ib ibVar2 = null;\n String str3 = null;\n while (parcel.dataPosition() < n) {\n int m = C0173a.m311m(parcel);\n switch (C0173a.m292M(m)) {\n case 1:\n i = C0173a.m305g(parcel, m);\n hashSet.add(Integer.valueOf(1));\n break;\n case 2:\n str3 = C0173a.m312m(parcel, m);\n hashSet.add(Integer.valueOf(2));\n break;\n case 4:\n C0900ib ibVar3 = (C0900ib) C0173a.m294a(parcel, m, (Creator<T>) C0900ib.CREATOR);\n hashSet.add(Integer.valueOf(4));\n ibVar2 = ibVar3;\n break;\n case 5:\n str2 = C0173a.m312m(parcel, m);\n hashSet.add(Integer.valueOf(5));\n break;\n case 6:\n C0900ib ibVar4 = (C0900ib) C0173a.m294a(parcel, m, (Creator<T>) C0900ib.CREATOR);\n hashSet.add(Integer.valueOf(6));\n ibVar = ibVar4;\n break;\n case 7:\n str = C0173a.m312m(parcel, m);\n hashSet.add(Integer.valueOf(7));\n break;\n default:\n C0173a.m298b(parcel, m);\n break;\n }\n }\n if (parcel.dataPosition() == n) {\n return new C0902id(hashSet, i, str3, ibVar2, str2, ibVar, str);\n }\n throw new C0174a(\"Overread allowed size end=\" + n, parcel);\n }",
"public static Livro criarLivro() {\n\n\t\tLivro livro = new Livro();\n\n\t\tString codigo = Console.recuperaTexto(\"Informe o código:\");\n\t\tlivro.setCodigo(codigo);\n\t\tString titulo = Console.recuperaTexto(\"Informe o título:\");\n\t\tlivro.setTitulo(titulo);\n\n\t\tArrayList<String> autores = new ArrayList<>();\n\t\tInteger quantidade = Console.recuperaInteiro(\"Quantos autores?\");\n\t\tfor (int i = 0; i < quantidade; i++) {\n\t\t\tString autor = Console.recuperaTexto(\"Informe o autor \" + (i + 1) + \":\");\n\t\t\tautores.add(autor);\n\t\t}\n\t\tlivro.setAutores(autores);\n\n\t\tString isbn = Console.recuperaTexto(\"Informe o ISBN:\");\n\t\tlivro.setIsbn(isbn);\n\t\tInteger ano = Console.recuperaInteiro(\"Informe o ano:\");\n\t\tlivro.setAno(ano);\n\n\t\treturn livro;\n\n\t}",
"public a createFromParcel(Parcel parcel) {\n int i = 0;\n int b = b.b(parcel);\n int i2 = 0;\n int i3 = 0;\n while (parcel.dataPosition() < b) {\n int a = b.a(parcel);\n switch (b.a(a)) {\n case 1:\n i2 = b.e(parcel, a);\n break;\n case 2:\n i = b.e(parcel, a);\n break;\n case 1000:\n i3 = b.e(parcel, a);\n break;\n default:\n b.b(parcel, a);\n break;\n }\n }\n if (parcel.dataPosition() == b) {\n return new a(i3, i2, i);\n }\n throw new a(\"Overread allowed size end=\" + b, parcel);\n }",
"@Override\n\t\tpublic photo createFromParcel(Parcel in) {\n\t\t\t return new photo(in);\n\t\t}",
"@Override\n\t\tpublic CharacterSheet createFromParcel(Parcel source) {\n\t\t\tCharacterSheet sheet = new CharacterSheet();\n\t\t\tsheet.name = source.readString();\n\t\t\tsheet.color = source.readInt();\n\t\t\tsheet.description = source.readString();\n\t\t\tsheet.level = source.readInt();\n\t\t\tsheet.fileAbsolutePath = source.readString();\n\t\t\tsheet.fileTimeStamp = source.readLong();\n\t\t\tsheet.iconPath = source.readString();\n\t\t\treturn sheet;\n\t\t}",
"public ParcelableDocDetail createFromParcel(Parcel source) {\n\t\t\treturn new ParcelableDocDetail(source);\n\t\t}",
"public Contact(Parcel in){\n\n readFromParcel(in);\n\n }",
"@Override\n public MyResponse createFromParcel(Parcel source) {\n return new MyResponse(source);\n }",
"@Override\n public Stanza createFromParcel(Parcel source) {\n return new Stanza(source);\n }",
"public cf createFromParcel(Parcel parcel) {\n int b = b.b(parcel);\n int i = 0;\n String str = null;\n int i2 = 0;\n short s = (short) 0;\n double d = 0.0d;\n double d2 = 0.0d;\n float f = 0.0f;\n long j = 0;\n int i3 = 0;\n int i4 = -1;\n while (parcel.dataPosition() < b) {\n int a = b.a(parcel);\n switch (b.a(a)) {\n case 1:\n str = b.j(parcel, a);\n break;\n case 2:\n j = b.g(parcel, a);\n break;\n case 3:\n s = b.d(parcel, a);\n break;\n case 4:\n d = b.i(parcel, a);\n break;\n case 5:\n d2 = b.i(parcel, a);\n break;\n case 6:\n f = b.h(parcel, a);\n break;\n case 7:\n i2 = b.e(parcel, a);\n break;\n case 8:\n i3 = b.e(parcel, a);\n break;\n case 9:\n i4 = b.e(parcel, a);\n break;\n case 1000:\n i = b.e(parcel, a);\n break;\n default:\n b.b(parcel, a);\n break;\n }\n }\n if (parcel.dataPosition() == b) {\n return new cf(i, str, i2, s, d, d2, f, j, i3, i4);\n }\n throw new a(\"Overread allowed size end=\" + b, parcel);\n }",
"public Livro() {\n\n\t}",
"public PolygonOptions createFromParcel(Parcel parcel) {\n ArrayList arrayList = null;\n float f = 0.0f;\n int i = 0;\n int zzaY = zzb.zzaY(parcel);\n ArrayList arrayList2 = new ArrayList();\n boolean z = false;\n boolean z2 = false;\n boolean z3 = false;\n int i2 = 0;\n int i3 = 0;\n float f2 = 0.0f;\n List list = null;\n while (parcel.dataPosition() < zzaY) {\n int zzaX = zzb.zzaX(parcel);\n switch (zzb.zzdc(zzaX)) {\n case 2:\n list = zzb.zzc(parcel, zzaX, LatLng.CREATOR);\n break;\n case 3:\n zzb.zza(parcel, zzaX, (List) arrayList2, getClass().getClassLoader());\n break;\n case 4:\n f2 = zzb.zzl(parcel, zzaX);\n break;\n case 5:\n i3 = zzb.zzg(parcel, zzaX);\n break;\n case 6:\n i2 = zzb.zzg(parcel, zzaX);\n break;\n case 7:\n f = zzb.zzl(parcel, zzaX);\n break;\n case 8:\n z3 = zzb.zzc(parcel, zzaX);\n break;\n case 9:\n z2 = zzb.zzc(parcel, zzaX);\n break;\n case 10:\n z = zzb.zzc(parcel, zzaX);\n break;\n case 11:\n i = zzb.zzg(parcel, zzaX);\n break;\n case 12:\n arrayList = zzb.zzc(parcel, zzaX, PatternItem.CREATOR);\n break;\n default:\n zzb.zzb(parcel, zzaX);\n break;\n }\n }\n if (parcel.dataPosition() == zzaY) {\n return new PolygonOptions(list, arrayList2, f2, i3, i2, f, z3, z2, z, i, arrayList);\n }\n throw new zza(\"Overread allowed size end=\" + zzaY, parcel);\n }",
"@Override\n public NoteInfo createFromParcel(Parcel parcel) {\n\n return new NoteInfo(parcel);\n }",
"public Reparto(){\n\t\t\n\t}",
"public ProductoCreable newInstance(int codigo, String nombre){\r\n \r\n }",
"private Driver(Parcel in) {\n super(in);\n }",
"Reproducible newInstance();",
"public TransitRouteLine createFromParcel(Parcel parcel) {\n return new TransitRouteLine(parcel);\n }",
"public Libro() {\r\n }",
"@Override\n public DownLoadResumeInfoBean createFromParcel(Parcel source) {\n DownLoadResumeInfoBean downLoadResumeInfoBean = new DownLoadResumeInfoBean();\n downLoadResumeInfoBean.operate_time = source.readString();\n downLoadResumeInfoBean.resume_number = source.readString();\n downLoadResumeInfoBean.name = source.readString();\n downLoadResumeInfoBean.echo_yes = source.readString();\n downLoadResumeInfoBean.sex = source.readString();\n downLoadResumeInfoBean.year = source.readString();\n downLoadResumeInfoBean.work_beginyear = source.readString();\n downLoadResumeInfoBean.high_education = source.readString();\n downLoadResumeInfoBean.location = source.readString();\n downLoadResumeInfoBean.pic_filekey = source.readString();\n downLoadResumeInfoBean.user_id = source.readString();\n downLoadResumeInfoBean.resume_id = source.readString();\n downLoadResumeInfoBean.moremajor = source.readString();\n downLoadResumeInfoBean.operate_name = source.readString();\n downLoadResumeInfoBean.isnew = source.readString();\n return downLoadResumeInfoBean;\n }",
"public SavedState createFromParcel(Parcel parcel) {\r\n return new SavedState(parcel, null);\r\n }",
"@Override\n public User createFromParcel(Parcel in) {\n return new User(in);\n }",
"public final BusPath createFromParcel(Parcel parcel) {\n return new BusPath(parcel);\n }",
"public Poem(){}",
"public Column createFromParcel(Parcel parcel) {\n return new Column(parcel);\n }",
"public Plato(){\n\t\t\n\t}",
"public AgeRangeEntity createFromParcel(Parcel parcel) {\n int i = 0;\n int zzaq = zza.zzaq(parcel);\n HashSet hashSet = new HashSet();\n int i2 = 0;\n int i3 = 0;\n while (parcel.dataPosition() < zzaq) {\n int zzap = zza.zzap(parcel);\n switch (zza.zzcj(zzap)) {\n case 1:\n i3 = zza.zzg(parcel, zzap);\n hashSet.add(Integer.valueOf(1));\n break;\n case 2:\n i2 = zza.zzg(parcel, zzap);\n hashSet.add(Integer.valueOf(2));\n break;\n case 3:\n i = zza.zzg(parcel, zzap);\n hashSet.add(Integer.valueOf(3));\n break;\n default:\n zza.zzb(parcel, zzap);\n break;\n }\n }\n if (parcel.dataPosition() == zzaq) {\n return new AgeRangeEntity(hashSet, i3, i2, i);\n }\n throw new zza.zza(\"Overread allowed size end=\" + zzaq, parcel);\n }",
"@Override\n\t\tpublic Categoria createFromParcel(Parcel source) {\n\t\t\treturn new Categoria(source);\n\t\t}",
"public Partage() {\n }",
"public RubyObject createObject() {\n\t\treturn (RubyObject) RGSSProjectHelper.getInterpreter(project).runScriptlet(\"return RPG::Troop::Page.new\");\n\t}",
"public EmoticonBO( Parcel source )\n {\n readFromParcel( source );\n }",
"@Override\n\t\tpublic Album createFromParcel(Parcel source) {\n\t\t\treturn new Album(source);\n\t\t}",
"public Corrida(){\n\n }",
"private Vehicle createNewVehicle() {\n\t\tString make = generateMake();\n\t\tString model = generateModel();\n\t\tdouble weight = generateWeight(model);\n\t\tdouble engineSize = generateEngineSize(model);\n\t\tint numberOfDoors = generateNumberOfDoors(model);\n\t\tboolean isImport = generateIsImport(make);\n\t\t\n\t\tVehicle vehicle = new Vehicle(make, model, weight, engineSize, numberOfDoors, isImport);\n\t\treturn vehicle;\t\t\n\t}",
"public Purp() {\n }",
"public o000000ooo createFromParcel(Parcel parcel) {\n return new o000000ooo((AccessMessage) parcel.readValue(AccessMessage.class.getClassLoader()));\n }",
"@Override\n public ProductCategories createFromParcel(Parcel parcel_in) {\n return new ProductCategories(parcel_in);\n }",
"Compleja createCompleja();",
"public Produto() {}",
"@Override\n\n public newTack createFromParcel(Parcel in) {\n\n return new newTack(in);\n\n }",
"RentalObject createRentalObject();",
"protected modelCartelera(Parcel in) {\n nombre = in.readString();\n descripcion = in.readString();\n id = in.readInt();\n //imagenCartelera = in.readInt();\n }",
"private Person(final Parcel in) {\n super();\n readFromParcel(in);\n }",
"public final QScanResultEntity createFromParcel(Parcel parcel) {\n QScanResultEntity qScanResultEntity = new QScanResultEntity();\n qScanResultEntity.packageName = parcel.readString();\n qScanResultEntity.softName = parcel.readString();\n qScanResultEntity.version = parcel.readString();\n qScanResultEntity.versionCode = parcel.readInt();\n qScanResultEntity.path = parcel.readString();\n qScanResultEntity.apkType = parcel.readInt();\n qScanResultEntity.certMd5 = parcel.readString();\n qScanResultEntity.size = parcel.readInt();\n qScanResultEntity.type = parcel.readInt();\n qScanResultEntity.advice = parcel.readInt();\n qScanResultEntity.malwareid = parcel.readInt();\n qScanResultEntity.name = parcel.readString();\n qScanResultEntity.label = parcel.readString();\n qScanResultEntity.discription = parcel.readString();\n qScanResultEntity.url = parcel.readString();\n return qScanResultEntity;\n }",
"@Override\r\n\t\tpublic GooglePlaces createFromParcel(Parcel source) {\n\t\t\treturn new GooglePlaces(source);\r\n\t\t}",
"private static Relative m147582a(Parcel parcel) {\n return new Relative(parcel);\n }",
"@Override\n\t\tpublic LoginDto createFromParcel(Parcel source) {\n\t\t\tLoginDto td = new LoginDto();\n\t\t\ttd.custNo = source.readString();\n\t\t\ttd.leftTimes = source.readString();\n\t\t\ttd.contentCode = source.readInt();\n\t\t\ttd.contentMsg = source.readString();\n\t\t\treturn td;\n\t\t}",
"protected ParkingSpace(Parcel in) {\n address = in.readParcelable(Address.class.getClassLoader());\n owner = in.readParcelable(User.class.getClassLoader());\n parkingImageUrl = in.readString();\n specialInstruction = in.readString();\n parkingID = in.readString();\n }",
"private Domain(Parcel in){\n this.IdDomain = in.readLong();\n this.IdCategoryRoot = in.readLong();\n this.Name = in.readString();\n this.Description = in.readString();\n this.ImageURL = in.readString();\n }",
"public /* bridge */ /* synthetic */ java.lang.Object createFromParcel(android.os.Parcel r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: android.location.GpsClock.1.createFromParcel(android.os.Parcel):java.lang.Object, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.1.createFromParcel(android.os.Parcel):java.lang.Object\");\n }",
"public AudioEntity createFromParcel(Parcel in) {\n AudioEntity audioEntity = new AudioEntity();\n audioEntity.readFromParcel(in);\n return audioEntity;\n }",
"public T newInstance();",
"@Override\n public EditHistory createFromParcel(Parcel in) {\n return new EditHistory(in);\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 Locale create() {\n BaseLocale base = _locbld.getBaseLocale();\n LocaleExtensions ext = _locbld.getLocaleExtensions();\n return Locale.getInstance(base.getLanguage(), base.getScript(), base.getRegion(), base.getVariant(), ext);\n }",
"public /* bridge */ /* synthetic */ java.lang.Object createFromParcel(android.os.Parcel r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: android.telephony.SmsCbCmasInfo.1.createFromParcel(android.os.Parcel):java.lang.Object, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telephony.SmsCbCmasInfo.1.createFromParcel(android.os.Parcel):java.lang.Object\");\n }",
"public GPS newInstace(@Nullable Bundle bundle){\n return new GPS();\n }",
"private Pipeline getPipelineObject() throws Exception{\n String populatorClassname = \"\";\n try { \n populatorClassname = getStringProperty(ParameterList.POP_PIPELINE, false).replaceAll(\"\\\\s\", \"\");\n Class<?> populatorClass = Class.forName(populatorClassname);\n Constructor<?> populatorConstructor = populatorClass.getConstructor();\n return (Pipeline)populatorConstructor.newInstance();\n } \n catch (ClassNotFoundException e) {\n throw new ClassNotFoundException(\"Error loading the pipeline. Class \" + populatorClassname + \" not found\", e);\n } \n }",
"public Carrier() {\n }",
"public Mapper newInstance() {\n Mapper mapper;\n\n mapper = new Mapper(name, parser.newInstance(), oag.newInstance());\n mapper.setLogging(logParsing, logAttribution);\n return mapper;\n }",
"protected final MareaPesca createInstance() {\n MareaPesca mareaPesca = new MareaPesca();\n return mareaPesca;\n }",
"public CampLease( ) {}",
"@Test\n public void testParcel() {\n CellIdentityNr cellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n\n // WHEN write the object to parcel and create another object with that parcel\n Parcel parcel = Parcel.obtain();\n cellIdentityNr.writeToParcel(parcel, 0 /* type */);\n parcel.setDataPosition(0);\n CellIdentityNr anotherCellIdentityNr = CellIdentityNr.CREATOR.createFromParcel(parcel);\n\n // THEN the new object is equal to the old one\n assertThat(anotherCellIdentityNr).isEqualTo(cellIdentityNr);\n assertThat(anotherCellIdentityNr.getType()).isEqualTo(CellInfo.TYPE_NR);\n assertThat(anotherCellIdentityNr.getNrarfcn()).isEqualTo(NRARFCN);\n assertThat(anotherCellIdentityNr.getPci()).isEqualTo(PCI);\n assertThat(anotherCellIdentityNr.getTac()).isEqualTo(TAC);\n assertTrue(Arrays.equals(anotherCellIdentityNr.getBands(), BANDS));\n assertThat(anotherCellIdentityNr.getOperatorAlphaLong()).isEqualTo(ALPHAL);\n assertThat(anotherCellIdentityNr.getOperatorAlphaShort()).isEqualTo(ALPHAS);\n assertThat(anotherCellIdentityNr.getMccString()).isEqualTo(MCC_STR);\n assertThat(anotherCellIdentityNr.getMncString()).isEqualTo(MNC_STR);\n assertThat(anotherCellIdentityNr.getNci()).isEqualTo(NCI);\n }",
"@DISPID(-2147417603)\n @PropGet\n com4j.Com4jObject constructor();",
"public Carrera(){\n }",
"Vehicle createVehicle();",
"Vehicle createVehicle();",
"public void getFromParcel(Parcel in)\n {\n this.clear();\n\n //Récupération du nombre d'objet\n int size = in.readInt();\n\n //On repeuple la liste avec de nouveau objet\n for(int i = 0; i < size; i++)\n {\n MeteoData meteoData = new MeteoData();\n meteoData.setDateDebut(in.readString());\n meteoData.setDateFin(in.readString());\n meteoData.setTemperature(in.readString());\n meteoData.setSymbole(in.readString());\n meteoData.setWindSpeed(in.readString());\n meteoData.setWindDirection(in.readString());\n meteoData.setWindDescription(in.readString());\n meteoData.setClouds(in.readString());\n meteoData.setHumidity(in.readString());\n this.add(meteoData);\n }\n\n\n }",
"Instance createInstance();",
"@Override\n public ImageData createFromParcel(Parcel source) {\n return new ImageData(source); // using parcelable constructor\n }",
"public void newRigakuParcel(IRegisteredParcel regParcel) {\n\t\t\n\t\tBodyType b = regParcel.getBody();\t\t\t\t\t\t\n\t\tif ((b instanceof EndXtalExperimentType) | \n\t\t \t(b instanceof BeginXtalExperimentType)) {\n\t\t\tif (this.standAloneMode) {\n\t\t\t\tlog.debug(\"Parcel \"+ b.getClass().getName() + \" created for JPG \");\n\t\t\t\tParcel expParcel = ParcelUtil.newParcel(ParcelTypeEnum.PLUGIN);\n\t\t\t\texpParcel.setBody(b);\n\t\t\t\tsuper.setNewParcel(expParcel);\t\t\t\t\n\t\t\t} else {\n\t\t\t\tlog.debug(\"Experiment start/stop parcel not created for JPG: StandAlone mode is \" + this.standAloneMode);\n\t\t\t}\n\t\t} else {\n\t\t\ttry {\n\t\t\t\tgetNewJPGParcel(regParcel);\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tlog.debug(e.getMessage());\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\tlog.debug(e.getMessage());\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\t\t\n\t}",
"P createP();",
"public Prova() {}",
"private ScheduleWaypoint(Parcel in) {\n\n buddies = new ArrayList<Schedule>();\n\n in.readParcelable(Schedule.class.getClassLoader());\n in.readList(buddies, Course.class.getClassLoader());\n }",
"VehicleClass() {}",
"public static OpenFrgament newInstance() {\n OpenFrgament fragment = new OpenFrgament();\n// Bundle args = new Bundle();\n//\n// fragment.setArguments(args);\n return fragment;\n }",
"public Vehicle(){}",
"public RailRoad() {}",
"@Override\n public Productor getProductor() {\n return new ProductorImp1();\n }",
"public LocalResidenciaColaborador() {\n //ORM\n }",
"public final /* synthetic */ java.lang.Object createFromParcel(android.os.Parcel r11) {\n /*\n r10 = this;\n int r0 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.validateObjectHeader(r11)\n r1 = 0\n r2 = 0\n r4 = r2\n r7 = r4\n r9 = r7\n r5 = 0\n r6 = 0\n r8 = 0\n L_0x000c:\n int r1 = r11.dataPosition()\n if (r1 >= r0) goto L_0x0059\n int r1 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readHeader(r11)\n int r2 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.getFieldId(r1)\n r3 = 2\n if (r2 == r3) goto L_0x004f\n r3 = 3\n if (r2 == r3) goto L_0x004a\n r3 = 4\n if (r2 == r3) goto L_0x0045\n r3 = 5\n if (r2 == r3) goto L_0x003b\n r3 = 7\n if (r2 == r3) goto L_0x0036\n r3 = 8\n if (r2 == r3) goto L_0x0031\n com.google.android.gms.common.internal.safeparcel.SafeParcelReader.skipUnknownField(r11, r1)\n goto L_0x000c\n L_0x0031:\n java.lang.String r9 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createString(r11, r1)\n goto L_0x000c\n L_0x0036:\n boolean r8 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readBoolean(r11, r1)\n goto L_0x000c\n L_0x003b:\n android.os.Parcelable$Creator<com.google.android.gms.drive.DriveId> r2 = com.google.android.gms.drive.DriveId.CREATOR\n android.os.Parcelable r1 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createParcelable(r11, r1, r2)\n r7 = r1\n com.google.android.gms.drive.DriveId r7 = (com.google.android.gms.drive.DriveId) r7\n goto L_0x000c\n L_0x0045:\n int r6 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readInt(r11, r1)\n goto L_0x000c\n L_0x004a:\n int r5 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readInt(r11, r1)\n goto L_0x000c\n L_0x004f:\n android.os.Parcelable$Creator r2 = android.os.ParcelFileDescriptor.CREATOR\n android.os.Parcelable r1 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createParcelable(r11, r1, r2)\n r4 = r1\n android.os.ParcelFileDescriptor r4 = (android.os.ParcelFileDescriptor) r4\n goto L_0x000c\n L_0x0059:\n com.google.android.gms.common.internal.safeparcel.SafeParcelReader.ensureAtEnd(r11, r0)\n com.google.android.gms.drive.Contents r11 = new com.google.android.gms.drive.Contents\n r3 = r11\n r3.<init>(r4, r5, r6, r7, r8, r9)\n return r11\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.drive.zzc.createFromParcel(android.os.Parcel):java.lang.Object\");\n }",
"public static GestorPersonas instanciar(){\n \n if(gestor == null){\n gestor = new GestorPersonas();\n }\n return gestor;\n }",
"@Override\n public PrimitiveSegment createFromParcel(Parcel in) {\n in.readInt();\n return new PrimitiveSegment(in);\n }",
"private static Occupation m147578a(Parcel parcel) {\n return new Occupation(parcel);\n }",
"public Contract create(){\n\t\treturn new Contract();\n\t}",
"public static Object createTaskObject(){\n try {\n\n return taskModel.make()\n .load(ClassLoader.getSystemClassLoader(), ClassLoadingStrategy.Default.WRAPPER)\n .getLoaded()\n .newInstance();\n\n\n } catch (InstantiationException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n\n return null;\n }",
"public void crearAutomovil(){\r\n automovil = new Vehiculo();\r\n automovil.setMarca(\"BMW\");\r\n automovil.setModelo(2010);\r\n automovil.setPlaca(\"TWS435\");\r\n }",
"public Partie charger() {\n Partie partie = new Partie(0,\"pseudo\");\n try {\n FileInputStream fileStream = new FileInputStream(\"savePartie\");\n ObjectInputStream objectStream = new ObjectInputStream(fileStream);\n partie.setPseudo((String)objectStream.readObject());\n partie.niveau = (int)objectStream.readObject();\n objectStream.close();\n fileStream.close();\n } catch ( IOException | ClassNotFoundException e) {\n e.printStackTrace();\n }\n return partie;\n }",
"public Position create() {\n\t\tfinal Actor actorLogged = this.actorService.findActorLogged();\n\t\tAssert.notNull(actorLogged);\n\t\tthis.actorService.checkUserLoginCompany(actorLogged);\n\n\t\tPosition result;\n\n\t\tresult = new Position();\n\t\tfinal Collection<Problem> problems = new HashSet<>();\n\t\tfinal Collection<Application> applications = new HashSet<>();\n\n\t\t// R4\n\t\tfinal String ticker = \"\"; //Será generado en el reconstruct\n\n\t\tresult.setTicker(ticker);\n\t\tresult.setProblems(problems);\n\t\tresult.setApplications(applications);\n\t\tresult.setIsFinalMode(false);\n\t\tresult.setIsCancelled(false);\n\n\t\treturn result;\n\t}",
"@Nonnull\n public List<Parcel> getParcels() {\n return parcels;\n }",
"public Camp newEntity() { return new Camp(); }"
] | [
"0.6670964",
"0.6654922",
"0.663755",
"0.65029436",
"0.63781756",
"0.6324053",
"0.62846285",
"0.6097956",
"0.60761803",
"0.6038642",
"0.602165",
"0.5967717",
"0.5947233",
"0.59403294",
"0.5938954",
"0.59368646",
"0.59121996",
"0.5898167",
"0.587801",
"0.5780931",
"0.5779363",
"0.57690185",
"0.57410645",
"0.5739924",
"0.5739593",
"0.5736718",
"0.5729419",
"0.57121104",
"0.5705948",
"0.5696612",
"0.566556",
"0.5644887",
"0.561878",
"0.55905867",
"0.55883163",
"0.5579151",
"0.5576075",
"0.5558074",
"0.5554249",
"0.55480754",
"0.55379736",
"0.55142856",
"0.5501476",
"0.54769176",
"0.5467389",
"0.5456792",
"0.54553914",
"0.54532987",
"0.54475504",
"0.54332733",
"0.54232013",
"0.5417306",
"0.5411007",
"0.54089934",
"0.5408308",
"0.5401952",
"0.5382722",
"0.5377475",
"0.53659153",
"0.5359189",
"0.53540415",
"0.53446853",
"0.5344679",
"0.5341784",
"0.53355885",
"0.532933",
"0.5327788",
"0.53249806",
"0.5316772",
"0.531027",
"0.5308868",
"0.5306527",
"0.5304649",
"0.52698594",
"0.5264349",
"0.5264349",
"0.52637714",
"0.5254241",
"0.5247934",
"0.5245251",
"0.5236493",
"0.52341336",
"0.5230274",
"0.5223787",
"0.5220291",
"0.52124727",
"0.5203586",
"0.51991796",
"0.51927024",
"0.5183924",
"0.51812303",
"0.5178211",
"0.5176965",
"0.51621395",
"0.5157987",
"0.5156757",
"0.51508015",
"0.51497614",
"0.514374",
"0.51433086"
] | 0.85065424 | 0 |
Returns a new object of class 'Elevage'. | Elevage createElevage(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Eleve() {\r\n\t\tsuper();\r\n\t}",
"public synchronized static Everbie getEverbie(){\n \t\tif (!Everbie.exists()){\n \t\t\teverbie = new Everbie(DEFAULT_NAME, DEFAULT_RACE);\n \t\t}\n \t\treturn everbie;\n \t}",
"public Fahrzeug erzeuge() {\n\t\t\n\t\treturn new DieselAuto();\n\t\t\n\t}",
"public static Elevator getInstance() {\n if (mInstance == null) {\n mInstance = new Elevator();\n return mInstance;\n } else\n return mInstance;\n }",
"public Elevator() {\n\t\t\n \tsuper(\"Elevator\", RobotConstants.ELEVATOR_P, RobotConstants.ELEVATOR_I, RobotConstants.ELEVATOR_D);\n \t\t\n\t\t// TODO Auto-generated constructor stub\n\t}",
"Lehrkraft createLehrkraft();",
"public Eagle(Eagle e) {\n super(e.weight, e.food, e.tame);\n setPoint(e.pos);\n }",
"public Livre() {\r\n super();\r\n }",
"protected Ente getEnteTest()\n\t{\t\t\n\t\ttry{\n\t\t\tEnte ente = new Ente();\n\t\t\tente.setUid(uidEnte);\n\t\t\treturn ente;\n\t\t} catch(NullPointerException npe){\n\t\t\treturn null;\n\t\t}\t\t\n\t}",
"protected BrowserTestObject iE() \n\t{\n\t\treturn new BrowserTestObject(\n getMappedTestObject(\"iE\"));\n\t}",
"protected BrowserTestObject iE() \n\t{\n\t\treturn new BrowserTestObject(\n getMappedTestObject(\"iE\"));\n\t}",
"public Spiel()\n {\n \tspieler = new Spieler();\n \t//landkarte = new Landkarte(5);\n //landkarte.raeumeAnlegen(spieler);\n\n \tlandkarte = levelGen.generate(spieler, 5, 6, 4, 10);\n\n parser = new Parser();\n }",
"public static Elevator getInstance() {\r\n return instance;\r\n }",
"@Override\n\tpublic Employee createEmployee() {\n\t\treturn new Manager(name, age);\n\t}",
"public synchronized static void createEverbie (String name, Race race){\n \t\tif(!Everbie.exists()){\n \t\t\teverbie = new Everbie(name, race);\n \t\t}\n \t}",
"public Equipas() {\r\n\t\t\r\n\t}",
"public Object ae() {\n try {\n return this.ad.newInstance();\n } catch (IllegalAccessException | InstantiationException e) {\n throw new RuntimeException();\n }\n }",
"Vaisseau_Vaisseau createVaisseau_Vaisseau();",
"Vaisseau_Vaisseau createVaisseau_Vaisseau();",
"Vaisseau_Vaisseau createVaisseau_Vaisseau();",
"Vaisseau_Vaisseau createVaisseau_Vaisseau();",
"Vaisseau createVaisseau();",
"public static Unit siege(){\n\t\tUnit unit = new Unit(\"Siege\", \"C_W_Siege\", 15, 5, 12, 14, 4);\n\t\tunit.addWep(new Weapon(\"Warhammer\",10,5));\n\t\tunit.addActive(ActiveType.SLAM);\n\t\tunit.addActive(ActiveType.POWER);\n\t\tunit.addPassive(PassiveType.ALERT);\n\t\treturn unit;\n\t}",
"public EnsembleLettre() {\n\t\t\n\t}",
"SpaceInvaderTest_test_AuDebut_JeuSpaceInvaderEstVide createSpaceInvaderTest_test_AuDebut_JeuSpaceInvaderEstVide();",
"public Elevator() {\n\t\tthis.motor = new Motor(this);\n\t\tthis.door = new Door(false);\n\t\tthis.elevatorButtons = new HashMap<Integer, ElevatorButton>();\n\t\t\n\t\tgenerateElevatorButtons();\n\n\t\tstate = new ElevatorState(Floor.MINIMUM_FLOOR_NUM, Direction.STATIONARY, Floor.MINIMUM_FLOOR_NUM);\n\t}",
"public andrewNamespace.xsdconfig.EmployeeDocument.Employee addNewEmployee()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n andrewNamespace.xsdconfig.EmployeeDocument.Employee target = null;\r\n target = (andrewNamespace.xsdconfig.EmployeeDocument.Employee)get_store().add_element_user(EMPLOYEE$0);\r\n return target;\r\n }\r\n }",
"@Override\n\tprotected Employee factoryMethod() {\n\t\treturn new Developer();\n\t}",
"public Livro() {\n\n\t}",
"public static XepLoai createEntity(EntityManager em) {\n XepLoai xepLoai = new XepLoai()\n .tenXepLoai(DEFAULT_TEN_XEP_LOAI);\n return xepLoai;\n }",
"public Egrga() {\r\n\t}",
"private ParticleMesh createExplosion() {\r\n ParticleMesh pMesh = ParticleFactory.buildParticles(\"explosion\", 30);\r\n pMesh.setEmissionDirection(new Vector3f(0.0f, 1.0f, 0.0f));\r\n pMesh.setMaximumAngle(3.1415927f);\r\n pMesh.setMinimumAngle(0);\r\n pMesh.getParticleController().setSpeed(0.1f);\r\n pMesh.setMinimumLifeTime(20.0f);\r\n pMesh.setMaximumLifeTime(150.0f);\r\n pMesh.setStartSize(15);\r\n pMesh.setEndSize(2);\r\n pMesh.getParticleController().setControlFlow(false);\r\n pMesh.getParticleController().setRepeatType(Controller.RT_CLAMP);\r\n pMesh.warmUp(80);\r\n pMesh.setInitialVelocity(2.5f);\r\n pMesh.setStartColor(new ColorRGBA(1.0f, 0.312f, 0.121f, 1.0f));\r\n pMesh.setEndColor(new ColorRGBA(1.0f, 0.24313726f, 0.03137255f, 0.0f));\r\n pMesh.setRenderState(ts);\r\n pMesh.setRenderState(bs);\r\n pMesh.setRenderState(zs);\r\n\r\n rootNode.attachChild(pMesh);\r\n rootNode.updateRenderState();\r\n \r\n explosions.add(pMesh);\r\n \r\n return pMesh;\r\n }",
"public Agent createNewAgent() throws MaceException{\r\n\t\tAgent agent = new Agent(\"n\" + maxAgentId, Agent.AGENT_BUYER);\r\n\t\taddAgent(agent);\r\n\t\tmaxAgentId++;\r\n\t\treturn agent;\r\n\t}",
"protected Enemy copy()\r\n\t{\r\n\t\treturn new DwarfEnemy();\r\n\t}",
"public static Livro criarLivro() {\n\n\t\tLivro livro = new Livro();\n\n\t\tString codigo = Console.recuperaTexto(\"Informe o código:\");\n\t\tlivro.setCodigo(codigo);\n\t\tString titulo = Console.recuperaTexto(\"Informe o título:\");\n\t\tlivro.setTitulo(titulo);\n\n\t\tArrayList<String> autores = new ArrayList<>();\n\t\tInteger quantidade = Console.recuperaInteiro(\"Quantos autores?\");\n\t\tfor (int i = 0; i < quantidade; i++) {\n\t\t\tString autor = Console.recuperaTexto(\"Informe o autor \" + (i + 1) + \":\");\n\t\t\tautores.add(autor);\n\t\t}\n\t\tlivro.setAutores(autores);\n\n\t\tString isbn = Console.recuperaTexto(\"Informe o ISBN:\");\n\t\tlivro.setIsbn(isbn);\n\t\tInteger ano = Console.recuperaInteiro(\"Informe o ano:\");\n\t\tlivro.setAno(ano);\n\n\t\treturn livro;\n\n\t}",
"public YellowTea() {\n super();\n this.setName(\"Yellow Tea\");\n this.setPrice(3.50);\n\n this.brewFirstLiquid = new BrewHotWater();\n this.brewSecondLiquid = new BrewNoLiquid();\n this.brewThirdLiquid = new BrewNoLiquid();\n\n System.out.println(\"Brewing Yellow Tea...\");\n }",
"public Elevator(int elevatorID) {\n this.elevatorID = elevatorID;\n currentFloor = 0;\n }",
"protected Entity createEntity()\n\t{\n\t\tLane lane = getLane();\n\t\t//sanity check\n\t\tif( lane instanceof PedestrianLane){\n\t\t\tPedestrianLane pLane = (PedestrianLane) lane;\n\t\t\t\n\t\t\t//create the pedestrian\n\t\t\t//Range of values within the lane a Pedestrian can be spawned at\n\t\t\tdouble rangeMin = Pedestrian.PEDESTRIAN_WIDTH/2;\n\t\t\tdouble rangeMax = PedestrianLane.LANE_WIDTH - Pedestrian.PEDESTRIAN_WIDTH/2;\n\t\t\t\n\t\t\tdouble randRange = rangeMin + (rangeMax - rangeMin)*Utils.random();\n\t\t\t\n\t\t\tdouble x = pLane.x() - randRange*Math.sin(pLane.dirRad());\n\t\t\tdouble y = pLane.y() + randRange*Math.cos(pLane.dirRad());\n\t\t\t\n\t\t\tif (x == pLane.x()) {\n\t\t\t\tx -= 7.5*Math.sin(pLane.dirRad());\n\t\t\t} else if (x == pLane.x() -PedestrianLane.LANE_WIDTH*Math.sin(pLane.dirRad())) {\n\t\t\t\tx += 7.5*Math.sin(pLane.dirRad());\n\t\t\t}\n\t\t\tif (y == pLane.y()) {\n\t\t\t\ty += 7.5*Math.cos(pLane.dirRad());\n\t\t\t} else if (y == pLane.y() +PedestrianLane.LANE_WIDTH*Math.cos(pLane.dirRad())) {\n\t\t\t\ty -= 7.5*Math.cos(pLane.dirRad());\n\t\t\t}\n\t\t\t\n\t\t\tPedestrian p = new Pedestrian(x, y, pLane.dirDeg(), pLane);\n\t\t\treturn p;\n\t\t\t} else {\n\t\t\t\tSystem.err.println(\"ERROR: Can't add a pedestrian to a non pedestrian lane\");\n\t\t\t\treturn null;\n\t\t\t}\n\n\t}",
"public static EglBase create() {\n return create(null /* shaderContext */, CONFIG_PLAIN);\n }",
"static RodUpgrades newInstance(int num) {\n RodUpgrades f = new RodUpgrades();\n\n return f;\n }",
"Vaisseau_ordonneeLaPlusHaute createVaisseau_ordonneeLaPlusHaute();",
"@Override\r\n\tpublic Explore getNewInstance() {\n\t\treturn new ZYDCExplore();\r\n\t}",
"public Elevator() {\n boolean elevatorInvert = false;\n boolean elevatorPhase = false;\n spx = new SpectrumVictorSPX(Constants.ELEVATOR_SPX);\n srx = new LeaderTalonSRX(Constants.ELEVATOR_SRX, spx);\n srx.setNeutralMode(NeutralMode.Brake);\n srx.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative);\n srx.setSensorPhase(elevatorPhase);\n srx.setInverted(elevatorInvert);\n\n // Enable Soft Limits\n srx.configForwardSoftLimitEnable(false);\n srx.configForwardSoftLimitThreshold(posUpLimit);\n srx.configForwardLimitSwitchSource(LimitSwitchSource.FeedbackConnector, LimitSwitchNormal.NormallyOpen);\n \n srx.configReverseSoftLimitEnable(false);\n srx.configReverseSoftLimitThreshold(posDownLimit);\n srx.configReverseLimitSwitchSource(LimitSwitchSource.FeedbackConnector, LimitSwitchNormal.NormallyOpen);\n\n srx.setStatusFramePeriod(StatusFrameEnhanced.Status_13_Base_PIDF0, 10);\n srx.setStatusFramePeriod(StatusFrameEnhanced.Status_10_MotionMagic, 10);\n\n // Set Ramp Rate and voltage compensation\n srx.configClosedloopRamp(0.25);\n srx.configVoltageCompSaturation(11.5);\n srx.enableVoltageCompensation(true);\n setMotionMagicParams();\n }",
"public Lemur(){\r\n //Call to super class\r\n super();\r\n //Set variables\r\n location = \"Madagascar\";\r\n classification = \"Prosimians\";\r\n coat = \"Fur\";\r\n dominantRole = \"Female\";\r\n grooming = \"Use their teeth as a comb\";\r\n age = rand.nextInt((20-1)+1)+1;\r\n weight = Math.random()*((7-1)+1)+1;\r\n }",
"public Bike createCityBike() {\n Wheels cityWheels = new Wheels(559,50f,10000); //Räder des Stadtrads erstellen\n Gears cityGears = new Gears(3,1,5000); //Gangschaltung des Stadtrads erstellen\n Bike newCityBike = new Bike(cityGears, cityWheels, \"Stahl\", \"CB105\", true, true, 30000); //Stadtrad erstellen\n return newCityBike; //Stadtrad zurückgeben\n}",
"public Expense() {\n\t\tsuper();\n\t}",
"private void createEnemy()\n {\n scorpion = new Enemy(\"Giant Scorpion\", 5, 10); \n rusch = new Enemy(\"Mr. Rusch\", 10, 1000);\n skeleton = new Enemy(\"Skeleton\", 10, 50);\n zombie = new Enemy(\"Zombie\", 12, 25);\n ghoul = new Enemy(\"Ghoul\", 15, 45);\n ghost = new Enemy(\"Ghost\", 400, 100);\n cthulu = new Enemy(\"Cthulu\", 10000000, 999999);\n concierge = new Enemy(\"Concierge\", 6, 100);\n wookie = new Enemy(\"Savage Wookie\", 100, 300);\n }",
"Hurt createHurt();",
"public EmployeeLanguage(Language name, LanguageLevel level) {\n this.name=name;\n this.level=level;\n }",
"protected GuiTestObject terraced() \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"terraced\"));\n\t}",
"public abstract LivingObject createLife(Cell locat);",
"public EmployeeSeller(String name, int age, float sallary, float quantityHours, float percentage) {\n super(name, age, sallary, quantityHours);\n this.percentage = percentage;\n }",
"public RubyObject createObject() {\n\t\treturn (RubyObject) RGSSProjectHelper.getInterpreter(project).runScriptlet(\"return RPG::Troop::Page.new\");\n\t}",
"Vaisseau_longueur createVaisseau_longueur();",
"public Axe() {\n\t\t\tthis.name = \"Axe\";\n\t\t\tthis.damage = 20;\n\t\t}",
"public LogEvent newInstance()\n {\n return new LogEvent();\n }",
"public Entity newEntity() { return newMyEntity(); }",
"public Entity newEntity() { return newMyEntity(); }",
"private Etapa nuevaEtapa(Etapa e) {\n if(debug) {\n System.out.println(\"**********************nuevaEtapa\");\n }\n \n Etapa ret = new Etapa();\n ret.i = e.i;\n ret.k = e.k+1;\n \n return ret;\n }",
"public WOComponent newDirector() {\n EOEditingContext ec = ERXEC.newEditingContext();\n EOEnterpriseObject director = ERXEOControlUtilities.createAndInsertObject(ec, \"Talent\");\n \n // Let's throw to a regular edit page\n EditPageInterface epi = (EditPageInterface)D2W.factory().pageForConfigurationNamed(\"EditTalent\", session());\n epi.setObject(director);\n epi.setNextPageDelegate(new CreateDirectorDelegate(movie(), context().page()));\n return (WOComponent)epi;\n }",
"public static Fragmento_Exterior newInstance()\n {\n return new Fragmento_Exterior();\n }",
"public Vague3()\n\t{\n\t\ttabEnnemi= new Ennemi[16];\n\t\tfor(int indice=0; indice<10; indice++)\n\t\t{\n\t\t\tthis.tabEnnemi[indice]=new EnnemiGEA();\n\t\t}\n\t\tfor(int indice=10; indice<15; indice++)\n\t\t{\n\t\t\tthis.tabEnnemi[indice]=new EnnemiTC();\n\t\t}\n\t\tthis.tabEnnemi[15]=new EnnemiBoss1();\n\t}",
"public static SiegeLesions createEntity(EntityManager em) {\n SiegeLesions siegeLesions = new SiegeLesions().typeSiegeDeLesions(DEFAULT_TYPE_SIEGE_DE_LESIONS);\n return siegeLesions;\n }",
"public PiecePenguin layEgg(){\n // if this piece hasn't laid max eggs yet - allow it create new piece\n if( this.numEggs < MAX_EGGS){\n this.incrementNumEggs();\n // this creates a new piece that has not laid any eggs\n // and has not attacked any pieces yet it will belong to this team so pass in Color\n return new PiecePenguin(this.symbol, this.color,0,0);\n }\n else{\n return null;\n }\n }",
"public SimpleEVD<T> eig() {\n return new SimpleEVD(mat);\n }",
"public Emrld() {\n super(\n new Color(211, 242, 163),\n new Color(151, 225, 150),\n new Color(108, 192, 139),\n new Color(76, 155, 130),\n new Color(33, 122, 121),\n new Color(16, 89, 101),\n new Color(7, 64, 80)\n\n );\n\n\n }",
"@Override\n\tprotected CarreteraEntrante creaCarreteraEntrante(Carretera carretera) {\n\t\treturn new CarreteraEntrante(carretera);\n\t}",
"public Empfänger() {\t\t\t\t\t// std. Konstruktor\r\n\t\t}",
"public static TypeExamen createEntity(EntityManager em) {\n TypeExamen typeExamen = new TypeExamen()\n .libelle(DEFAULT_LIBELLE);\n return typeExamen;\n }",
"private static Dog createGolderRetriver(){\n try {\n UtilityMethods.print(\"Creating golden retriver for you...!\"); \n DogGenerator dogGenerator = new DogGenerator();\n DogBuilder goldenRetriver = new GoldenRetriverBuilder();\n dogGenerator.setDogBuilder(goldenRetriver);\n dogGenerator.constructDog(\n \"Animal\", \n \"Male\",\n 20,\n \"Carnivores\"\n );\n Dog goldenRetriverdog = dogGenerator.getDog();\n UtilityMethods.print(\"\\n\"); \n goldenRetriverdog.eat();\n UtilityMethods.print(\"\\n\"); \n goldenRetriverdog.speak();\n UtilityMethods.print(\"\\n\"); \n goldenRetriverdog.walk();\n UtilityMethods.print(\"\\n\"); \n return goldenRetriverdog; \n } catch (Exception e) {\n UtilityMethods.print(e.getMessage()); \n }\n return null; \n }",
"Employee() {\n\t}",
"SpaceInvaderTest_VaisseauAvance_DeplacerVaisseauVersLaGauche createSpaceInvaderTest_VaisseauAvance_DeplacerVaisseauVersLaGauche();",
"public Energy(String name){\n this.name = name;\n }",
"@Override\n\tpublic Univent copy() {\n\t\treturn new AddExpToHeroesEvent(amount);\n\t}",
"public Angel createAngel(final String angelType) throws IOException {\n if (angelType.equals(\"DamageAngel\")) {\n return new DamageAngel();\n }\n if (angelType.equals(\"DarkAngel\")) {\n return new DarkAngel();\n }\n if (angelType.equals(\"Dracula\")) {\n return new Dracula();\n }\n if (angelType.equals(\"GoodBoy\")) {\n return new GoodBoy();\n }\n if (angelType.equals(\"LevelUpAngel\")) {\n return new LevelUpAngel();\n }\n if (angelType.equals(\"LifeGiver\")) {\n return new LifeGiver();\n }\n if (angelType.equals(\"SmallAngel\")) {\n return new SmallAngel();\n }\n if (angelType.equals(\"Spawner\")) {\n return new Spawner();\n }\n if (angelType.equals(\"TheDoomer\")) {\n return new TheDoomer();\n }\n if (angelType.equals(\"XPAngel\")) {\n return new XPAngel();\n }\n return null;\n }",
"@Override\n\tpublic Location newInstance() {\n\t\treturn new Location(this.X,this.Y,0);\n\t}",
"public Elevator() {\n currentFloor = 1;\n elevatorState = IDLE;\n request = null;\n }",
"public BoxModel getEnergyModel()\r\n/* 111: */ {\r\n/* 112:118 */ BoxModel boxes = new BoxModel();\r\n/* 113:119 */ boxes.add(new Box(0.1875F, 0.3125F, 0.3125F, 0.8125F, 0.6875F, 0.6875F));\r\n/* 114:120 */ boxes.add(new Box(0.3125F, 0.1875F, 0.3125F, 0.6875F, 0.8125F, 0.6875F));\r\n/* 115:121 */ boxes.add(new Box(0.3125F, 0.3125F, 0.1875F, 0.6875F, 0.6875F, 0.8125F));\r\n/* 116:122 */ boxes.add(new Box(0.25F, 0.25F, 0.25F, 0.75F, 0.75F, 0.75F));\r\n/* 117:123 */ return boxes;\r\n/* 118: */ }",
"public EngineClass clone()\n {\n EngineClass cloneEngineClass = new EngineClass( this );\n return cloneEngineClass;\n }",
"public TechnicalLead(String name){\n super(name);\n baseSalary = super.getBaseSalary() * 1.3; // baseSalary for businessLead x 1.3 baseSalary of technical group\n this.maxHeadCount = 4; // set max employee to 4\n this.curHeadCount = 0;\n employee = new SoftwareEngineer[this.maxHeadCount];\n }",
"private static Dog createLabrador(){\n try {\n UtilityMethods.print(\"Creating labrador for you...!\"); \n DogGenerator dogGenerator = new DogGenerator();\n DogBuilder labradorDogBuilder = new LabradorBuilder();\n dogGenerator.setDogBuilder(labradorDogBuilder);\n dogGenerator.constructDog(\n \"Animal\",\n \"Male\",\n 20,\n \"Carnivores\"\n );\n Dog labradordog = dogGenerator.getDog();\n UtilityMethods.print(\"\\n\"); \n labradordog.eat();\n UtilityMethods.print(\"\\n\"); \n labradordog.speak();\n UtilityMethods.print(\"\\n\"); \n labradordog.walk();\n UtilityMethods.print(\"\\n\"); \n return labradordog;\n } catch (Exception e) {\n UtilityMethods.print(e.getMessage()); \n }\n return null;\n }",
"public Partage() {\n }",
"public Lane() {\n\t}",
"Vaisseau_ordonneeLaPlusBasse createVaisseau_ordonneeLaPlusBasse();",
"public com.paulesson.elevator.db.entities.Elevator toDBEntity(){\n com.paulesson.elevator.db.entities.Elevator entity = new com.paulesson.elevator.db.entities.Elevator();\n entity.setId(dbId);\n entity.setName(name);\n entity.setLoad(load.get());\n entity.setStatus(direction.get());\n entity.setCurrentFloor(currentFloor.get());\n return entity;\n }",
"public static OpenFrgament newInstance() {\n OpenFrgament fragment = new OpenFrgament();\n// Bundle args = new Bundle();\n//\n// fragment.setArguments(args);\n return fragment;\n }",
"EisModel createEisModel();",
"public static ListSteelGrade createEntity(EntityManager em) {\n ListSteelGrade listSteelGrade = new ListSteelGrade()\n .code(DEFAULT_CODE)\n .name(DEFAULT_NAME)\n .fullName(DEFAULT_FULL_NAME)\n .steelDensity(DEFAULT_STEEL_DENSITY)\n .thermExpCoef(DEFAULT_THERM_EXP_COEF)\n .isCurrentFlag(DEFAULT_IS_CURRENT_FLAG)\n .description(DEFAULT_DESCRIPTION)\n .dateCreate(DEFAULT_DATE_CREATE)\n .dateEdit(DEFAULT_DATE_EDIT)\n .creator(DEFAULT_CREATOR)\n .editor(DEFAULT_EDITOR);\n return listSteelGrade;\n }",
"public Expense(){\n\n }",
"@Override\n protected AVLTreeNode<E> createTreeNode(E value) {\n return new AVLTreeNode<E>(tree, this, value);\n }",
"public Artikel ladeArtikel() throws IOException, ClassNotFoundException {\n \n Artikel artikel = liesArtikel(ois); //liesArtikel(ois);\n \n return artikel;\n }",
"Etf()\n {\n super();\n extended = 'A';\n price = 2176.33;\n number = 10;\n }",
"EzlemurFactory getEzlemurFactory();",
"public Toy(String mainColor, String material, String origin, double price, int[] ageDelta) {\n this.type = getClass().getSuperclass().getSimpleName();\n this.name = getClass().getSimpleName();\n this.mainColor = mainColor;\n this.material = material;\n this.origin = origin;\n this.price = price;\n this.ageDelta = ageDelta;\n }",
"Exploitation createExploitation();",
"public EarthGeometry(){\n\t\tgcl1 = new GeodeticCalculator();\n\t\trnd1 = new Random(56789);\n\t}",
"public Employee(){\n\t\t\n\t}",
"public Employee(){\n\t\t\n\t}",
"public Sheep()\n {\n super(\"Sheep\",3,2,0); \n \n // tagline = \"Whatever\";\n maxHealth = 5;\n currentHealth = maxHealth;\n equip(new Cloth());\n equip(new SheepClaws());\n \n \n \n engaged = false;\n aggression = 1;\n special = 0;\n hostileRange = 2;\n }",
"public Manager getEmployee() {\n\t\treturn new Manager();\n\t}"
] | [
"0.6632287",
"0.5935724",
"0.58607024",
"0.5786297",
"0.57706684",
"0.5730459",
"0.57154506",
"0.56553286",
"0.55999297",
"0.55961794",
"0.55961794",
"0.5550827",
"0.5502182",
"0.549806",
"0.54886454",
"0.54788667",
"0.5461167",
"0.5457875",
"0.5457875",
"0.5457875",
"0.5457875",
"0.5456524",
"0.5455997",
"0.54389477",
"0.54193836",
"0.54092354",
"0.5389015",
"0.53775704",
"0.53595495",
"0.53495073",
"0.53472495",
"0.5331522",
"0.53248745",
"0.5320334",
"0.53108555",
"0.53104454",
"0.5299432",
"0.5294022",
"0.5293409",
"0.5267632",
"0.52675205",
"0.52647793",
"0.52584726",
"0.52565926",
"0.52511346",
"0.52384293",
"0.5234185",
"0.5228996",
"0.5218446",
"0.5218434",
"0.5213249",
"0.52119225",
"0.5210907",
"0.52087003",
"0.5200692",
"0.51955444",
"0.5194978",
"0.5194978",
"0.5193308",
"0.5182856",
"0.51814485",
"0.5176293",
"0.5168387",
"0.5164591",
"0.515621",
"0.5152918",
"0.51528424",
"0.51506317",
"0.51443523",
"0.51415575",
"0.51408297",
"0.51383984",
"0.5127957",
"0.5127611",
"0.5127526",
"0.5125448",
"0.51216745",
"0.512051",
"0.5117639",
"0.5113682",
"0.5110099",
"0.51079196",
"0.50985044",
"0.5081989",
"0.5075513",
"0.50738585",
"0.50719845",
"0.5069965",
"0.50692827",
"0.5068297",
"0.50659174",
"0.5064777",
"0.505985",
"0.5054428",
"0.5046091",
"0.50447094",
"0.5041634",
"0.5041634",
"0.5038856",
"0.5037298"
] | 0.8704459 | 0 |
Returns a new object of class 'Culture'. | Culture createCulture(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Locale create() {\n BaseLocale base = _locbld.getBaseLocale();\n LocaleExtensions ext = _locbld.getLocaleExtensions();\n return Locale.getInstance(base.getLanguage(), base.getScript(), base.getRegion(), base.getVariant(), ext);\n }",
"Language create(Language language);",
"public abstract DataType<T> newInstance(String format, Locale locale);",
"public Language() {\r\n\t}",
"Generalization createGeneralization();",
"@Override\n\tpublic Culture findById(String id) {\n\t\treturn (Culture) session.getCurrentSession().createCriteria(Culture.class).add(Restrictions.eq(\"id\", id)).uniqueResult();\n\t}",
"public Locale getBaseLocale() {\n if (_extensions == LocaleExtensions.EMPTY_EXTENSIONS) {\n return this;\n }\n return getInstance(_baseLocale.getLanguage(), _baseLocale.getScript(),\n _baseLocale.getRegion(), _baseLocale.getVariant(), LocaleExtensions.EMPTY_EXTENSIONS);\n }",
"public WhileLanguageFactoryImpl()\r\n {\r\n super();\r\n }",
"public static JChineseConvertor getInstance() {\r\n\t\tif (instance == null) {\r\n\t\t\ttry {\r\n\t\t\t\tinstance = new JChineseConvertor(DEF_SRC_FILE);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tthrow new IllegalStateException(\"Can not create new instance of JChineseConvertor : \" + e.getMessage(), e);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn instance;\r\n\t}",
"public static Currency createCurrency (String country) {\n\n\t\tswitch(country.toUpperCase()) {\n\t\t\n\t\tcase \"INDIA\" : \n\t\t\treturn new Rupee(); \n\t\t\n\t\tcase \"SINGAPORE\" : \n\t\t\treturn new SGDDollar(); \n\t\t\n\t\tcase \"US\" : \n\t\t\treturn new USDollar();\n\t\t\n\t\tdefault : \n\t\t\tthrow new IllegalArgumentException(\"No such currency\");\n\t\t}\n\t}",
"public Localizer() {\n processor = new ComponentProcessor();\n }",
"@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<Culture> findAllCulture() {\n\t\treturn session.openSession().createQuery(\" from Culture\").list();\n\t}",
"private Contest newContest(long id, long forumId, Limit limit, List languages) {\n\t\tContest contest = new Contest();\n\t\tcontest.setId(id);\n\t\tcontest.setDescription(\"desc\" + id);\n\t\tcontest.setLimit(limit);\n\t\tcontest.setLanguages(languages);\n\t\tcontest.setTitle(\"title\" + id);\n\t\tcontest.setForumId(forumId);\n\t\tcontest.setStartTime(new Date(id * 1000));\n\t\tcontest.setEndTime(new Date(id * 2000));\n\t\treturn contest;\n\t}",
"public static LocalizationProvider getInstance() {\r\n\t\treturn instance;\r\n\t}",
"public interface LocaleProvider {\n\tLocale getLocale();\n}",
"public Langs() {\n this(DSL.name(\"langs\"), null);\n }",
"public Category newCategory() {\n\t\tCategory page = new Category();\r\n\t\tpage.setWpPublished(DateUtils.now());\r\n\t\tpage.setWpWeight(0);\r\n\t\treturn page;\r\n\t}",
"public DataType<T> newInstance(Locale locale) {\r\n return newInstance(null, locale);\r\n }",
"public CurrencyConversion() {\n }",
"public static WhileLanguageFactory init()\r\n {\r\n try\r\n {\r\n WhileLanguageFactory theWhileLanguageFactory = (WhileLanguageFactory)EPackage.Registry.INSTANCE.getEFactory(WhileLanguagePackage.eNS_URI);\r\n if (theWhileLanguageFactory != null)\r\n {\r\n return theWhileLanguageFactory;\r\n }\r\n }\r\n catch (Exception exception)\r\n {\r\n EcorePlugin.INSTANCE.log(exception);\r\n }\r\n return new WhileLanguageFactoryImpl();\r\n }",
"CLanguage getClanguage();",
"private LocalizationProvider() {\r\n\t\tthis.language = DEFAULT_LANGUAGE;\r\n\t\tthis.bundle = ResourceBundle.getBundle(\"hr.fer.zemris.java.hw11.jnotepadapp.local.languages\",\r\n\t\t\t\tLocale.forLanguageTag(language));\r\n\t}",
"public ILoLoString translate() {\n return new MtLoLoString(); \n }",
"public LocaleFormatter() {\r\n super(2);\r\n }",
"public Language(String lang) {\n\t\tif (INSTANCE == null) {\n\t\t\tif (lang.equals(\"en\")) {\n\t\t\t\tINSTANCE = ResourceBundle.getBundle(\"myBundle\",Locale.ENGLISH);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tINSTANCE = ResourceBundle.getBundle(\"myBundle\",Locale.FRANCE);\n\t\t\t}\n\t\t}\n\t}",
"public OldSwedishCurrency()\r\n\t{\r\n\t\tthis(0, 0, 0);\r\n\t}",
"public Language() {\n strings = new TreeSet<>(EMPTY_SET);\n }",
"public static PersianChronology getInstance() {\n return getInstance(DateTimeZone.getDefault(), new PersianChronologyBirashk());\n }",
"@Override\n\t\tpublic Categoria createFromParcel(Parcel source) {\n\t\t\treturn new Categoria(source);\n\t\t}",
"private void init() {\n\t\t\n\t\tPropertiesManager propertiesManager = PropertiesManager.getInstance();\n\t\tFile localeDirectory = new File(propertiesManager.getProperty(\"locale.directory\", LOCALE_DIRECTORY));\n\n\t\tlocales = new ArrayList<Locale>();\n\n\t\ttry {\n\t\t\t\n\t\t\tClassUtils.addClassPathFile(localeDirectory);\n\t\t\t\n\t\t\t// Находим все доступные локали\n\t\t\tlocales = findAvailableLocales(localeDirectory);\n\n\t\t} catch(Exception ignore) {}\n\n\t\tfallbackLocale = Locale.ENGLISH;\n\t\tcontrol = new Control();\n\n\t\tif(!locales.contains(Locale.ENGLISH)) {\n\t\t\tlocales.add(0, fallbackLocale);\n\t\t}\n\n\t\tdefaultLocale = locales.get(locales.indexOf(Locale.ENGLISH));\n\t\t\n\t\tString language = propertiesManager.getProperty(\"locale.language\", \"\");\n\t\tString country = propertiesManager.getProperty(\"locale.country\", \"\");\n\t\tString variant = propertiesManager.getProperty(\"locale.variant\", \"\");\n\t\t\n\t\tLocale locale = new Locale(language, country, variant);\n\t\t\n\t\tif(locales.contains(locale)) {\n\t\t\tlocale = locales.get(locales.indexOf(locale));\n\t\t} else {\n\t\t\tlocale = defaultLocale;\n\t\t}\n\n\t\tsetLocale(locale);\n\t\t\n\t\tif(FontEditor.DEBUG) {\n\t\t\t\n\t\t\tfor(Locale l : locales) {\n\t\t\t\tSystem.out.println(\"locale found -> \" + l.getDisplayLanguage(Locale.ENGLISH));\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"Total locale(s) found: \" + locales.size());\n\t\t\tSystem.out.println();\n\t\t}\n//System.out.println(\">>> \" + getValue(\"shitd\"));\n\t}",
"protected static AvailableLocale convertAvailableLocale(final File langFile) throws IOException {\r\n\t\t// Pourquoi il ne charge pas le fichier par défaut en ISO ??\r\n\t\tfinal Properties props = new Properties();\r\n\t\tprops.load(new InputStreamReader(new FileInputStream(langFile), Charset.forName(PROPERTIES_ENCODING)));\r\n\r\n\t\t// Détermination de la locale\r\n\t\tfinal String[] localeStr = props.getProperty(\"locale\").split(\"_\");\r\n\t\tLocale locale = null;\r\n\t\tif (localeStr.length == 1) locale = new Locale(localeStr[0]);\r\n\t\telse if (localeStr.length == 2) locale = new Locale(localeStr[0], localeStr[1]);\r\n\t\telse {\r\n\t\t\tLOGGER.error(\"String {} is not a valid locale. Found in file {}\", props.getProperty(\"locale\"), langFile);\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\t// Object regroupant la locale, l'icone, le nom de la langue.\r\n\t\tfinal AvailableLocale avalaibleLocale = new AvailableLocale();\r\n\t\tavalaibleLocale.setIcon(props.getProperty(\"icon\"));\r\n\t\tavalaibleLocale.setLanguage(props.getProperty(\"language\"));\r\n\t\tavalaibleLocale.setLocale(locale);\r\n\r\n\t\treturn avalaibleLocale;\r\n\t}",
"public static Construtor construtor() {\n return new Construtor();\n }",
"public static Language createEntity(EntityManager em) {\n Language language = new Language()\n .title(DEFAULT_TITLE);\n return language;\n }",
"public LocaleAieon() \r\n\t{\r\n\t\tthis( Locale.getDefault() );\r\n\t}",
"public CMObject newInstance();",
"public Language(String name) {\n this.name = name;\n }",
"public interface LocaleContext {\n Locale getLocale();\n}",
"Language(Locale locale) {\n this.locale = locale;\n }",
"public EmployeeLanguage(Language name, LanguageLevel level) {\n this.name=name;\n this.level=level;\n }",
"public Country() {}",
"public Language(String lang) {\n this.lang = lang;\n /*\n lexerFactory = new LexerFactory();\n generatorFactory = new GeneratorFactory();\n parserFactory = new ParserFactory();\n */\n }",
"public LocaleAieon( String name ) \r\n\t{\r\n\t\tsuper( name, S_LOCALE );\r\n\t\tLocale locale = Locale.getDefault();\r\n\t\tsuper.set( S_LOCALE, locale.getLanguage() );\r\n\t\tsuper.set( Attributes.COUNTRY.name(), locale.getCountry() );\r\n\t\tsuper.set( Attributes.VARIANT.name(), locale.getVariant() );\r\n\t}",
"public static LanguageModel create(String corpusFilePath) throws Exception {\n if (lm_ == null) {\n lm_ = new LanguageModel(corpusFilePath);\n }\n return lm_;\n }",
"private LangUtilities() {\n }",
"public LocaleTest(final String name) {\n super(name);\n }",
"Traditional createTraditional();",
"private static AbstractConversion getStandardConversion() {\n\n\t\tif (standardConversion == null) {\n\t\t\tstandardConversion = new BasicConversion();\n\t\t}\n\t\treturn standardConversion;\n\t}",
"public static Locale getLocale() {\n return localeInfo.get();\n }",
"public Locale getLocale()\n/* */ {\n/* 487 */ return getULocale().toLocale();\n/* */ }",
"private JComboBox getCBoxTargetLanguage() {\n if( CBoxTargetLanguage == null ) {\n CBoxTargetLanguage = new JComboBox();\n Locale availableLocales[] = Locale.getAvailableLocales();\n List buildIns = language.getBuildInLocales();\n List externals = language.getExternalLocales();\n TreeMap tm = new TreeMap();\n for (int i = 0; i < availableLocales.length; i++) {\n if( availableLocales[i].getCountry().length() > 0 ) {\n // for now we concentrate on the main languages ;)\n continue;\n }\n String langCode = availableLocales[i].getLanguage();\n // if( availableLocales[i].getCountry().length() > 0 ) {\n // langCode += \"_\" + availableLocales[i].getCountry();\n // }\n String newOrChangeStr;\n boolean isExternal = false;\n boolean isNew = false;\n if( externals.contains(availableLocales[i]) ) {\n newOrChangeStr = \"external\";\n isExternal = true;\n } else if( buildIns.contains(availableLocales[i]) ) {\n newOrChangeStr = \"build-in\";\n } else {\n newOrChangeStr = \"create\";\n isNew = true;\n }\n String localeDesc = availableLocales[i].getDisplayName() + \" (\" + newOrChangeStr+ \") (\"+ langCode + \")\";\n ComboBoxEntry cbe = new ComboBoxEntry(availableLocales[i], isExternal, isNew, localeDesc);\n tm.put(cbe, cbe);\n }\n // get sorted\n for( Iterator i=tm.keySet().iterator(); i.hasNext(); ) {\n CBoxTargetLanguage.addItem(i.next());\n }\n }\n return CBoxTargetLanguage;\n }",
"public Locale getLocale( IDescriptor descriptor ) \r\n\t{\r\n\t\tString country = descriptor.get( Attributes.COUNTRY.name() );\r\n\t\tif( country == null )\r\n\t\t\tcountry = Locale.getDefault().getCountry();\r\n\t\tString language = descriptor.get( Attributes.LANGUAGE.name() );\r\n\t\tif( language == null )\r\n\t\t\treturn new Locale( country );\r\n\t\tString variant = descriptor.get( Attributes.VARIANT.name() );\r\n\t\treturn new Locale( country, language, variant );\r\n\t}",
"public PageGeneratorLanguareFactoryImpl()\n {\n super();\n }",
"private static Language makeLanguage(File file, boolean isAdditional) throws IllegalAccessException, InstantiationException {\n Objects.requireNonNull(file, \"file cannot be null\");\n if (!file.getName().endsWith(\".xml\")) {\n throw new RuleFilenameException(file);\n }\n String[] parts = file.getName().split(\"-\");\n boolean startsWithRules = parts[0].equals(\"rules\");\n boolean secondPartHasCorrectLength = parts.length == 3 &&\n (parts[1].length() == \"en\".length() || parts[1].length() == \"ast\".length() || parts[1].length() == \"en_US\".length());\n if (!startsWithRules || !secondPartHasCorrectLength) {\n throw new RuleFilenameException(file);\n }\n //TODO: when the XML file is mergeable with\n // other rules (check this in the XML Rule Loader by using rules[@integrate='add']?),\n // subclass the existing language,\n //and adjust the settings if any are set in the rule file default configuration set\n\n Language newLanguage;\n if (Languages.isLanguageSupported(parts[1])) {\n Language baseLanguage = Languages.getLanguageForShortCode(parts[1]).getClass().newInstance();\n newLanguage = new ExtendedLanguage(baseLanguage, parts[2].replace(\".xml\", \"\"), file);\n } else {\n newLanguage = new Language() {\n @Override\n public Locale getLocale() {\n return new Locale(getShortCode());\n }\n\n @Override\n public Contributor[] getMaintainers() {\n return null;\n }\n\n @Override\n public String getShortCode() {\n if (parts[1].length() == 2) {\n return parts[1];\n }\n return parts[1].split(\"_\")[0]; //en as in en_US\n }\n\n @Override\n public String[] getCountries() {\n if (parts[1].length() == 2) {\n return new String[]{\"\"};\n }\n return new String[]{parts[1].split(\"_\")[1]}; //US as in en_US\n }\n\n @Override\n public String getName() {\n return parts[2].replace(\".xml\", \"\");\n }\n\n @Override\n public List<Rule> getRelevantRules(ResourceBundle messages, UserConfig userConfig, Language motherTongue, List<Language> altLanguages) {\n return Collections.emptyList();\n }\n\n @Override\n public List<String> getRuleFileNames() {\n List<String> ruleFiles = new ArrayList<>();\n ruleFiles.add(file.getAbsolutePath());\n return ruleFiles;\n }\n\n @Override\n public boolean isExternal() {\n return isAdditional;\n }\n };\n }\n return newLanguage;\n }",
"protected final MareaPesca createInstance() {\n MareaPesca mareaPesca = new MareaPesca();\n return mareaPesca;\n }",
"public LocalizationFragment() {\n }",
"public static Category create(String name) {\n Category category = categories.get(name);\n\n if (category == null) {\n Category newCategory = new Category(name);\n categories.put(newCategory.getName(), newCategory);\n return newCategory;\n } else {\n return category;\n }\n }",
"private LocaleManager() {\n\t\t\n\t\tinit();\n\t}",
"public static Currency getInstance(Locale locale) {\n String code = java.util.Currency.getInstance(locale).getCurrencyCode();\n return new Currency(code);\n }",
"public Translation() {\n\n this(0, 0, 0);\n }",
"public static Company createCompany() {\r\n\t\treturn createCompany(1, \"Pepcus\", \"Software\", \"PEP\", new Date(), \"Special\", \"This is search help\");\r\n\t}",
"public Node createTranslation(String edition, Locale locale, ObjectNode object);",
"public Object createObject() {\n final DecimalFormat format = (DecimalFormat) super.createObject();\n if (getParameter(\"pattern\") != null) {\n format.applyPattern((String) getParameter(\"pattern\"));\n }\n if (getParameter(\"localizedPattern\") != null) {\n format.applyLocalizedPattern((String) getParameter(\"localizedPattern\"));\n }\n return format;\n }",
"public LanguageDao() {\r\n\t\tsuper(Language.class);\r\n\t}",
"Parse createParse();",
"public static Univers get(){\n if (instance == null)\n {\n instance = new Univers();\n }\n return instance;\n }",
"public T newInstance();",
"public abstract DataType<T> newInstance(String format);",
"Gradian createGradian();",
"public clTranslation(String resource) {\n this.resource = resource;\n locale = Locale.getDefault();\n loadResource();\n }",
"private LanguagesettingsPackage() {}",
"Language findByName(String name);",
"public Currency() {\n // Instances built via this constructor have undefined behavior.\n }",
"public static PageGeneratorLanguareFactory init()\n {\n try\n {\n PageGeneratorLanguareFactory thePageGeneratorLanguareFactory = (PageGeneratorLanguareFactory)EPackage.Registry.INSTANCE.getEFactory(PageGeneratorLanguarePackage.eNS_URI);\n if (thePageGeneratorLanguareFactory != null)\n {\n return thePageGeneratorLanguareFactory;\n }\n }\n catch (Exception exception)\n {\n EcorePlugin.INSTANCE.log(exception);\n }\n return new PageGeneratorLanguareFactoryImpl();\n }",
"public static CategoriesReader create(String file) {\n if (file.endsWith((CommonFileExtensions.CSV_EXTENSION))) {\n return new CSVCategoriesReader(file);\n } else if (file.endsWith(CommonFileExtensions.XML_EXTENSION)) {\n return new XMLCategoriesReader(file);\n } else if (file.endsWith(CommonFileExtensions.JSON_EXTENSION)) {\n return new JSONCategoriesReader(file);\n }\n return null;\n }",
"public abstract String construct();",
"public interface Translator\n{\n Locale SWEDISH = Locale.forLanguageTag(\"sv\");\n\n List<Locale> supportedLanguages();\n Map<Locale, List<Locale>> supportedDirections();\n Translation translate(Translation message);\n String pageTranslationURL(String sourceURL, Translation message);\n}",
"protected Locale getArchLocale()\n\t{\n\t\tLocale locale = null;\n\t\ttry {\n\t\t\tfinal ContextoSesion sessionContext = ContextoLocator.getInstance().getContextoSesion();\n\t\t\tObject value, o = sessionContext.getCtxValue(ConstantesSesion.ARCH_LOCALE);\n\t\t\tif (o instanceof IDato) {\n\t\t\t\tvalue = ((IDato) o).getValor();\n\t\t\t} else {\n\t\t\t\tvalue = o;\n\t\t\t}\n\t\t\tif (value instanceof Locale) {\n\t\t\t\tlocale = (Locale) value;\n\t\t\t} else if (value instanceof String) {\n\t\t\t\tlocale = StringUtils.parseLocaleString((String)value);\n\t\t\t}\n\t\t} catch (PersistenciaException e) {\t}\n\t\treturn locale;\n\t}",
"DotLanguageFactory getDotLanguageFactory();",
"Concierto createConcierto();",
"public VizualizerFactoryImpl()\n {\n super();\n }",
"public CinemaDate() {\n }",
"public LanguageManager(Context context) {this.mContext = context;}",
"public interface TransFactory {\n public Object translate(Object obj, String type);\n}",
"public static TokenizerFactory<Word> factory()\n/* */ {\n/* 111 */ return new ArabicTokenizerFactory(false);\n/* */ }",
"public @NotNull Category newCategory();",
"protected ICUResourceBundle(){}",
"CsticModel createInstanceOfCsticModel();",
"java.lang.String getLocale();",
"public AbstractLocalizationProvider() {\r\n\t\tsuper();\r\n\t\tthis.listeners = new ArrayList<>();\r\n\t}",
"public String toLanguageTag() {\n if (this.languageTag != null) {\n return this.languageTag;\n }\n Object object = LanguageTag.parseLocale(this.baseLocale, this.localeExtensions);\n CharSequence charSequence = new StringBuilder();\n Object object22 = ((LanguageTag)object).getLanguage();\n if (((String)object22).length() > 0) {\n ((StringBuilder)charSequence).append(LanguageTag.canonicalizeLanguage((String)object22));\n }\n if (((String)(object22 = ((LanguageTag)object).getScript())).length() > 0) {\n ((StringBuilder)charSequence).append(\"-\");\n ((StringBuilder)charSequence).append(LanguageTag.canonicalizeScript((String)object22));\n }\n if (((String)(object22 = ((LanguageTag)object).getRegion())).length() > 0) {\n ((StringBuilder)charSequence).append(\"-\");\n ((StringBuilder)charSequence).append(LanguageTag.canonicalizeRegion((String)object22));\n }\n for (Object object22 : ((LanguageTag)object).getVariants()) {\n ((StringBuilder)charSequence).append(\"-\");\n ((StringBuilder)charSequence).append((String)object22);\n }\n for (Object object3 : ((LanguageTag)object).getExtensions()) {\n ((StringBuilder)charSequence).append(\"-\");\n ((StringBuilder)charSequence).append(LanguageTag.canonicalizeExtension((String)object3));\n }\n if (((String)(object = ((LanguageTag)object).getPrivateuse())).length() > 0) {\n if (((StringBuilder)charSequence).length() > 0) {\n ((StringBuilder)charSequence).append(\"-\");\n }\n ((StringBuilder)charSequence).append(\"x\");\n ((StringBuilder)charSequence).append(\"-\");\n ((StringBuilder)charSequence).append((String)object);\n }\n charSequence = ((StringBuilder)charSequence).toString();\n synchronized (this) {\n if (this.languageTag == null) {\n this.languageTag = charSequence;\n }\n return this.languageTag;\n }\n }",
"public Country (String instanceName)\n {\n name = instanceName;\n }",
"public DefaultLocalesManager() {\r\n\t}",
"MoneyParseContext createChild() {\r\n return new MoneyParseContext(locale, text, textIndex, textErrorIndex, currency, amount);\r\n }",
"public City() {\n\t}",
"public City() {\n\t}",
"Compleja createCompleja();",
"Case createCase();",
"public static LanguageModel create(String corpusFilePath, boolean considerExtra) throws Exception {\n\t\tif(lm_ == null ){\n\t\t\tlm_ = new LanguageModel(corpusFilePath, considerExtra);\n\t\t}\n\t\treturn lm_;\n\t}",
"public static synchronized LocaleManager getInstance() {\n\t\t\n\t\tif(manager == null) {\n\t\t\tmanager = new LocaleManager();\n\t\t}\n\t\t\n\t\treturn manager;\n\t}",
"protected Resource newResource()\n\t{\n\t\tPackageResource packageResource = PackageResource.get(getScope(), getName(), getLocale(),\n\t\t\tgetStyle());\n\t\tif (packageResource != null)\n\t\t{\n\t\t\tlocale = packageResource.getLocale();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new IllegalArgumentException(\"package resource [scope=\" + getScope() + \",name=\" +\n\t\t\t\tgetName() + \",locale=\" + getLocale() + \"style=\" + getStyle() + \"] not found\");\n\t\t}\n\t\treturn packageResource;\n\t}"
] | [
"0.65931463",
"0.59068245",
"0.54076004",
"0.53204477",
"0.5245379",
"0.52377",
"0.51059455",
"0.5064821",
"0.50644785",
"0.5057132",
"0.50365853",
"0.49986252",
"0.49741295",
"0.49646106",
"0.49258798",
"0.49233153",
"0.48792392",
"0.48660052",
"0.48623794",
"0.483935",
"0.48260215",
"0.48181313",
"0.4816559",
"0.4808691",
"0.47937375",
"0.47908667",
"0.47797605",
"0.47793007",
"0.47710413",
"0.47674102",
"0.4760267",
"0.47292584",
"0.4725529",
"0.47110063",
"0.47097328",
"0.47018358",
"0.4665464",
"0.46530598",
"0.4650652",
"0.46405306",
"0.4640452",
"0.462996",
"0.46097353",
"0.45972753",
"0.45835105",
"0.45566857",
"0.45512658",
"0.45371446",
"0.45351434",
"0.4527715",
"0.45235872",
"0.45152017",
"0.45132396",
"0.4503254",
"0.4494998",
"0.44929174",
"0.44771352",
"0.44748145",
"0.44593802",
"0.44522545",
"0.44512677",
"0.44474116",
"0.44453692",
"0.44420442",
"0.4431226",
"0.44310862",
"0.44281417",
"0.44155744",
"0.44112515",
"0.4410623",
"0.4409507",
"0.4408023",
"0.44071114",
"0.4402224",
"0.44018716",
"0.4388188",
"0.43836945",
"0.43826798",
"0.43806776",
"0.43789545",
"0.43733934",
"0.43707886",
"0.43705693",
"0.4359316",
"0.43551376",
"0.43412557",
"0.4339045",
"0.43370533",
"0.43339458",
"0.43308416",
"0.432723",
"0.43241066",
"0.43176258",
"0.431726",
"0.431726",
"0.43136612",
"0.43082178",
"0.43036094",
"0.43011007",
"0.42986408"
] | 0.8107739 | 0 |
Returns a new object of class 'Environment'. | Environment createEnvironment(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic Environment getEnvironment() {\n\t\tif (environment == null) {\n\t\t\tenvironment = new StandardEnvironment();\n\t\t}\n\t\treturn environment;\n\t}",
"public void create(Environment environment);",
"public Environment environment()\n {\n return theEnv;\n }",
"public static TrackableEnvironment createEnvironment() {\n return null;\n }",
"public Environment getEnvironment()\n\t{\n\t\treturn environment;\n\t}",
"EnvironmentmmFactory getEnvironmentmmFactory();",
"@Override\n\tpublic Environment<String, V> getEnvironment() {\n\t\treturn null;\n\t}",
"public static ApplicationEnvironment getEnvironment (){\n\t\treturn _applicationEnvironment;\n\t}",
"public interface RealEnvironment extends Environment {\n\n}",
"public Environment getEnvironment() {\n \n \t\treturn this.environment;\n \t}",
"public MyEnvironment() {\n\t\t\t\tscan = new Scanner(System.in);\n\t\t\t\tscanClosed = false;\n\t\t\t\tmultilineSymbol = '|';\n\t\t\t\tpromptSymbol = '>';\n\t\t\t\tmorelinesSymbol = '\\\\';\n\t\t\t\tcommands = new TreeMap<>();\n\t\t\t\tcommands.put(\"cat\", new CatShellCommand());\n\t\t\t\tcommands.put(\"charsets\", new CharsetsShellCommand());\n\t\t\t\tcommands.put(\"copy\", new CopyShellCommand());\n\t\t\t\tcommands.put(\"exit\", new ExitShellCommand());\n\t\t\t\tcommands.put(\"hexdump\", new HexdumpShellCommand());\n\t\t\t\tcommands.put(\"ls\", new LsShellCommand());\n\t\t\t\tcommands.put(\"mkdir\", new MkdirShellCommand());\n\t\t\t\tcommands.put(\"tree\", new TreeShellCommand());\n\t\t\t\tcommands.put(\"symbol\", new SymbolShellCommand());\n\t\t\t\tcommands.put(\"help\", new HelpShellCommand());\n\t\t\t\tcommands.put(\"cd\", new CdShellCommand());\n\t\t\t\tcommands.put(\"pwd\", new PwdShellCommand());\n\t\t\t\tcommands.put(\"dropd\", new DropdShellCommand());\n\t\t\t\tcommands.put(\"pushd\", new PushdShellCommand());\n\t\t\t\tcommands.put(\"listd\", new ListdShellCommand());\n\t\t\t\tcommands.put(\"popd\", new PopdShellCommand());\n\t\t\t\tcommands.put(\"massrename\", new MassrenameShellCommand());\n\t\t\t\tcurrentDirectory = Paths.get(\".\");\n\t\t\t\tsharedData = new HashMap<>();\n\t\t\t}",
"Properties getEnvironment();",
"Properties getEnvironment();",
"EnvEntry createEnvEntry();",
"<T> T newInstance(URI description) throws EnvironmentException;",
"public String getEnvironment() {\n return environment;\n }",
"@Override\n public Environment getEnvironment(int w, int h)\n {\n return master.getEnvironment(w, h);\n }",
"public Env getEnv() {\n\t\treturn _env;\n\t}",
"public FxEnvironment getEnvironment() {\n return CacheAdmin.getFilteredEnvironment();\n }",
"public Verif() {\n\t\tenv = new Environ();\n\t}",
"public envio() {\r\n }",
"public interface Environment {\n\tpublic Object resolveVariable(String name);\n\tpublic List<String> getRegisteredVariableNames();\n}",
"private static Map<String, Environment> getEnvironments() {\n Map<String, Environment> environmentMap = new HashMap<String, Environment>();\n Environment prodEnv = new Environment();\n prodEnv.setName(PROD_1);\n prodEnv.setPassword(PROD_1_PASSWORD);\n\n Environment sandBoxEnv = new Environment();\n sandBoxEnv.setName(SND_1);\n sandBoxEnv.setPassword(SND_1_PASSWORD);\n\n environmentMap.put(PROD_1, prodEnv);\n environmentMap.put(SND_1, sandBoxEnv);\n return environmentMap;\n }",
"EnvironmentLoader getEnvironmentLoader();",
"@SuppressWarnings(\"unchecked\")\n\tprotected final SituatedEnvironment<?,?,?,?,IT> getEnvironment() {\n\t\tEnvironment env = Kernel.getSingleton().getEnvironment();\n\t\tif (env instanceof SituatedEnvironment) {\n\t\t\treturn (SituatedEnvironment<?,?,?,?,IT>)env;\n\t\t}\n\t\treturn null;\n\t}",
"public static SecureEnvironment getInstance() {\n // if the security manager has been changed, see if the caller is allowed to access it\n checkAccess();\n return instance;\n }",
"public Continuous2D getEnvironment() {\n return environment;\n }",
"public TicTacToeEnvironmentInterface() {\n\t}",
"public PythonInterpreter getEnvironment(String name) {return environments.get(name);}",
"String getEnvironment();",
"public TreeMap<String,String> \n getEnvironment()\n {\n return pEnvironment;\n }",
"public Map<String, String> getEnvironment();",
"@Override\n public Environment getEnvironment(XYCoord coord)\n {\n return master.getEnvironment(coord);\n }",
"Environment getEnvironment() {\n return recordingEnv;\n }",
"public interface Environment {\n public Iterable<EventGraphObject> getTriggers(Object function);\n public boolean hasChanged(Object trigger);\n public boolean isInitialised(EventGraphObject trigger);\n public void registerEventSource(EventSource source);\n public void setStickyInGraph(EventGraphObject source, boolean sticky);\n public <T> void addListener(Object source, EventGraphObject sink);\n public <T> void removeListener(Object source, EventGraphObject sink);\n public <T> void addWakeupOrdering(Object source, EventGraphObject wakeupTarget);\n public void wakeupThisCycle(Function target);\n public void fireAfterChangingListeners(Function target);\n public long getEventTime();\n public EventGraphObject getTerminationEvent();\n}",
"public static TestEnvironment getEnvironment(String name) {\n return (TestEnvironment) envMap.get(name);\n }",
"public EnvironmentFrame getEnvironmentFrame() {\n\t\treturn myEnvFrame;\n\t}",
"public Environment(Environment e){\r\n\t\tthis.creatureList = new ArrayList<Creature>();\r\n\t\tsandboxMap = new int[e.sandboxMap.length][e.sandboxMap[0].length];\r\n\t\tfor (int i = 0; i < sandboxMap.length; i++){\r\n\t\t\tfor (int j = 0; j < sandboxMap[i].length; j++){\r\n\t\t\t\tsandboxMap[i][j] = e.sandboxMap[i][j];\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public SetEnvCommand() {\n }",
"public static KapConfig getInstanceFromEnv() {\n return wrap(KylinConfig.getInstanceFromEnv());\n }",
"void setEnvironment(Environment environment) {\n this.environment = environment;\n }",
"public Environment(final Turtle turtle) {\n this(turtle, null);\n }",
"public static it.vmt.gh.sb.model.Environment createEnvironment(\n\t\tlong environmentId) {\n\n\t\treturn getService().createEnvironment(environmentId);\n\t}",
"@Before\n public void setupEnvironment() {\n TestEnvironment testEnvironment;\n switch (mode) {\n case CLUSTER:\n // This only works because of the quirks we built in the TestEnvironment.\n // We should refactor this in the future!!!\n testEnvironment = MINI_CLUSTER_RESOURCE.getTestEnvironment();\n testEnvironment.getConfig().disableObjectReuse();\n testEnvironment.setAsContext();\n break;\n case CLUSTER_OBJECT_REUSE:\n // This only works because of the quirks we built in the TestEnvironment.\n // We should refactor this in the future!!!\n testEnvironment = MINI_CLUSTER_RESOURCE.getTestEnvironment();\n testEnvironment.getConfig().enableObjectReuse();\n testEnvironment.setAsContext();\n break;\n case COLLECTION:\n new CollectionTestEnvironment().setAsContext();\n break;\n }\n }",
"void setEnvironment(Properties properties);",
"public void createEnvironment() {\n //create a list of collidable objects and a list of sprite objects\n List<Collidable> collidables = new ArrayList<Collidable>();\n List<Sprite> spriteList = new ArrayList<Sprite>();\n //update the game's environment to be the collidables list.\n this.environment = new GameEnvironment(collidables);\n //update the game's sprites collection to be the list of sprites.\n this.sprites = new SpriteCollection(spriteList);\n }",
"public EnvironmentExporter() {\r\n super();\r\n fExporterList = new ArrayList<AbstractExporter>();\r\n fExporterList.add(new GlobalVariableExporter());\r\n fExporterList.add(new DatabaseConfigurationExporter());\r\n fExporterList.add(new WebServiceExporter());\r\n fExporterList.add(new BusinessCalendarExporter());\r\n }",
"public static Environment getWorldInstance(int width, int height)\r\n\t{\r\n\t\t//check if an instance exists\r\n\t\tif(e == null)\r\n\t\t\t//if not, synchronize to prevent duplicate instantiation\r\n\t\t\tsynchronized(Environment.class) {\r\n\t\t\t\t//if an instance still doesn't exits, make a new one\r\n\t\t\t\tif(e == null)\r\n\t\t\t\t\te = new Environment(width, height);\r\n\t\t\t}\r\n\t\t//return the instance of Environment\r\n\t\treturn e;\r\n\t}",
"public interface EnvironmentAware extends Aware{\n void setEnvironment(Environment ev);\n}",
"public Item(Environment e) {\n\t\tthis(0,0,e);\n }",
"protected PersistenceEnvironment<ReadBuffer> createPersistenceEnv(File fileActive, File fileSnapshot,\n File fileTrash)\n throws IOException\n {\n return new BerkeleyDBEnvironment(fileActive, fileSnapshot, fileTrash);\n }",
"public void setEnvironment(Object environment) {\n this.environment = environment;\n }",
"public Factory(BaseProcessingEnvImpl env) {\n _env = env;\n }",
"public Environment getActorEnvironment() {\r\n\t\treturn actorEnv;\r\n\t}",
"public synchronized Map<String, String> getEnvironment() throws Fault {\n if (env == null) {\n // reconstitute environment\n // this may result in a Fault, which is okay\n reload();\n }\n return PropertyArray.getProperties(env);\n }",
"EnvVariablesType createEnvVariablesType();",
"public void setEnvironment(Map<String, String> environment);",
"File prepareEnvironment();",
"@Override\n public Environment getEnvironment(String organization, String uuid) throws APIManagementException {\n Environment env = APIUtil.getReadOnlyEnvironments().get(uuid);\n if (env == null) {\n env = apiMgtDAO.getEnvironment(organization, uuid);\n if (env == null) {\n String errorMessage =\n String.format(\"Failed to retrieve Environment with UUID %s. Environment not found\", uuid);\n throw new APIMgtResourceNotFoundException(errorMessage, ExceptionCodes\n .from(ExceptionCodes.GATEWAY_ENVIRONMENT_NOT_FOUND, String.format(\"UUID '%s'\", uuid)));\n }\n }\n return env;\n }",
"public interface EnvironmentRunner {\n void run(Environment environment, Config config);\n}",
"public String getEnvironment(){\n\n String env = null;\n try {\n env = System.getProperty(\"env\");\n if(env !=null)\n return env;\n else\n return prop.getProperty(ENVIRONMENT_KEY);\n\n }catch(Exception e)\n {\n return prop.getProperty(ENVIRONMENT_KEY);\n }\n }",
"public String getEnv() {\n\n return env;\n }",
"@Override\r\n public InitialContextFactory createInitialContextFactory(Hashtable<?, ?> environment)\r\n {\r\n if (activated == null && environment != null) {\r\n Object icf = environment.get(Context.INITIAL_CONTEXT_FACTORY);\r\n if (icf != null) {\r\n Class<?> icfClass;\r\n if (icf instanceof Class) {\r\n icfClass = (Class<?>) icf;\r\n } else if (icf instanceof String) {\r\n icfClass = resolveClassName((String) icf, getClass().getClassLoader());\r\n } else {\r\n throw new IllegalArgumentException(\"Invalid value type for environment key [\" +\r\n Context.INITIAL_CONTEXT_FACTORY + \"]: \" + icf.getClass().getName());\r\n }\r\n if (!InitialContextFactory.class.isAssignableFrom(icfClass)) {\r\n throw new IllegalArgumentException(\r\n \"Specified class does not implement [\" + InitialContextFactory.class.getName() + \"]: \" + icf);\r\n }\r\n try {\r\n return (InitialContextFactory) icfClass.newInstance();\r\n } catch (Throwable ex) {\r\n throw new IllegalStateException(\"Cannot instantiate specified InitialContextFactory: \" + icf, ex);\r\n }\r\n }\r\n }\r\n\r\n // Default case...\r\n return new InitialContextFactory()\r\n {\r\n @Override\r\n @SuppressWarnings(\"unchecked\")\r\n public Context getInitialContext(Hashtable<?, ?> environment)\r\n {\r\n return new SimpleNamingContext(\"\", boundObjects, (Hashtable<String, Object>) environment);\r\n }\r\n };\r\n }",
"public static EvalEnv convObs(Environment observation)\n {\n \n EvalEnv result = new EvalEnv();\n return result;\n }",
"public abstract SAMEnvironmentDetails createSAMEnvironment(String envName,\n\t\t\tString description, List<ServiceEnvironmentMapping> services);",
"public Map<String, String> getEnv()\n {\n return env;\n }",
"public int[][] getEnvironment() {\n return this.environment;\n }",
"ExpressionVisitor(RuntimeEnv environment) {\r\n this.environment = environment;\r\n }",
"@Override\n public RegionServerEnvironment createEnvironment(RegionServerCoprocessor instance, int priority,\n int sequence, Configuration conf) {\n return instance.getClass().isAnnotationPresent(CoreCoprocessor.class)\n ? new RegionServerEnvironmentForCoreCoprocessors(instance, priority, sequence, conf,\n this.rsServices)\n : new RegionServerEnvironment(instance, priority, sequence, conf, this.rsServices);\n }",
"public void createEnvironment(String path) {\n environmentManager = new EnvironmentManager();\n environmentManager.createEnvironment(path);\n }",
"public interface Environment extends ImportProvider {\n /** Searches for the best available import with the given {@code identifier}. */\n Optional<Import> search(String identifier);\n\n /**\n * Returns all files in the package of a given {@code packageName}.\n *\n * <p>This uses the actual {@code package} declaration at the top of Java files, and will\n * therefore properly detect files of the same package in different directories.\n */\n Set<ParsedFile> filesInPackage(String packageName);\n}",
"public SingletonApplicationEnvironment(String applicationName) throws SIMPLTranslationException\n \t{\n \t\tthis(null, applicationName, null);\n \t}",
"public Builder fromEnvironment(Configuration globalConfiguration) {\n\t\t\tString krb5Config = System.getProperty(JAVA_SECURITY_KRB5_CONF);\r\n\t\t\tif(krb5Config != null && krb5Config.length() != 0) {\r\n\t\t\t\tkrb5ConfPath = new File(krb5Config);\r\n\t\t\t\tif(!krb5ConfPath.exists()) {\r\n\t\t\t\t\tthrow new IllegalStateException(\"java.security.krb5.conf refers to a non-existent file\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// FUTURE: check the well-known paths\r\n\t\t\t// - $JAVA_HOME/lib/security\r\n\t\t\t// - %WINDIR%\\krb5.ini (Windows)\r\n\t\t\t// - /etc/krb5.conf (Linux)\r\n\r\n\t\t\treturn this;\r\n\t\t}",
"public void setEnvironment(Configuration config) {\n _environment = config;\n }",
"public GameEnvironment getGameEnvironment() {\r\n return this.gameE;\r\n }",
"public Game() { \n // Create the new environment. Must be done in the same\n // method as the game loop\n env = new Env();\n \n // Sets up the camera\n env.setCameraXYZ(25, 50, 55);\n env.setCameraPitch(pitch);\n\n // Turn off the default controls\n env.setDefaultControl(false);\n\n // Make the room 50 x 50.\n env.setRoom(new Room());\n creatures = new ArrayList<Creature>();\n }",
"public interface EnvironmentProvider {\n\n /**\n * Query if user provided input stream (e.g. stdin) has queued input.\n *\n * @return True if input has queued input.\n * @throws JVMIOException Thrown in case of IO errors.\n */\n public abstract boolean inReady() throws JVMIOException;\n\n /**\n * Read a single line without termination character(s) from user provided\n * input stream (e.g. stdin).\n *\n * @return Contents of the line read.\n * @throws JVMIOException Thrown in case of IO errors.\n */\n public abstract String inReadLine() throws JVMIOException;\n\n /**\n * Write to standard output.\n *\n * @param msg Message to write.\n */\n public abstract void outWrite(final String msg);\n\n /**\n * Write to standard error.\n *\n * @param msg Message to write.\n */\n public abstract void errWrite(final String msg);\n\n /**\n * Display a message to the user, before querying for input.\n *\n * @param msg Message to display.\n */\n public abstract void promptForInput(final String msg);\n\n /**\n * Display a question to the user, before forcing to select one of the\n * provided answers.\n *\n * @param question Question to display.\n * @param answers Non-empty list of questions to select from.\n * @return Answer selected by the user.\n * @throws JVMIOException Thrown in case of IO errors.\n */\n public abstract String promptSelectionFromAnswers(final String question, final List<String> answers) throws JVMIOException;\n\n /**\n * Get the tabulator character to use.\n *\n * @return Tabulator character.\n */\n public abstract String getTab();\n\n /**\n * Get system dependent newline character sequence.\n *\n * @return Newline character sequence.\n */\n public abstract String getEndl();\n\n /**\n * Get identifier for the operating system that setlX runs on.\n *\n * @return Identifier for the operating system executing setlX.\n */\n public abstract String getOsID();\n\n /**\n * Allows modification of filename/path when reading files from within setlX.\n *\n * @param fileName Filename as passed to setlX via input/source code.\n * @return Filename to use when opening for read/write.\n */\n public abstract String filterFileName(final String fileName);\n\n /**\n * Allows modification of library-path when loading libraries from within setlX.\n *\n * @param name Filename as expected by setlX.\n * @return Filename to use when opening for read/write.\n */\n public abstract String filterLibraryName(final String name);\n\n /**\n * Get the stack size in kb to request from the VM for each new thread.\n *\n * @return Stack size in kb to request from the VM.\n */\n public abstract int getStackSizeWishInKb();\n\n /**\n * Get the stack size in kb to request from the VM for each new 'medium' thread.\n *\n * @return Stack size in kb to request from the VM.\n */\n public abstract int getMediumStackSizeWishInKb();\n\n /**\n * Get the stack size in kb to request from the VM for each new 'small' thread.\n *\n * @return Stack size in kb to request from the VM.\n */\n public abstract int getSmallStackSizeWishInKb();\n}",
"interface WithEnvironmentVariables {\n /**\n * Specifies environmentVariables.\n * @param environmentVariables Batch AI service sets the following environment variables for all jobs: AZ_BATCHAI_INPUT_id, AZ_BATCHAI_OUTPUT_id, AZ_BATCHAI_NUM_GPUS_PER_NODE. For distributed TensorFlow jobs, following additional environment variables are set by the Batch AI Service: AZ_BATCHAI_PS_HOSTS, AZ_BATCHAI_WORKER_HOSTS\n * @return the next definition stage\n */\n WithCreate withEnvironmentVariables(List<EnvironmentSetting> environmentVariables);\n }",
"private int getEnvironment() {\n\n if (ServiceBaseGlobal.env != null) {\n return ServiceBaseGlobal.env.getValue();\n }\n return ProjectUtil.Environment.dev.getValue();\n }",
"public void setEnvironment(String environment1) {\n this.environment = environment1;\n }",
"public InitialContextFactory createInitialContextFactory(Hashtable<?,?> environment) {\n\t\tif (activated == null && environment != null) {\n\t\t\tObject icf = environment.get(Context.INITIAL_CONTEXT_FACTORY);\n\t\t\tif (icf != null) {\n\t\t\t\tClass<?> icfClass = null;\n\t\t\t\tif (icf instanceof Class) {\n\t\t\t\t\ticfClass = (Class<?>) icf;\n\t\t\t\t}\n\t\t\t\telse if (icf instanceof String) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\ticfClass = Classes.getClass(getClass().getClassLoader(), (String)icf);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (ClassNotFoundException e) {\n\t\t\t\t\t\tthrow new IllegalArgumentException(\"Invalid class \" + icf, e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthrow new IllegalArgumentException(\"Invalid value type for environment key [\" +\n\t\t\t\t\t\t\tContext.INITIAL_CONTEXT_FACTORY + \"]: \" + icf.getClass().getName());\n\t\t\t\t}\n\t\t\t\tif (!InitialContextFactory.class.isAssignableFrom(icfClass)) {\n\t\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\t\"Specified class does not implement [\" + InitialContextFactory.class.getName() + \"]: \" + icf);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\treturn (InitialContextFactory) icfClass.newInstance();\n\t\t\t\t}\n\t\t\t\tcatch (Throwable ex) {\n\t\t\t\t\tIllegalStateException ise =\n\t\t\t\t\t\t\tnew IllegalStateException(\"Cannot instantiate specified InitialContextFactory: \" + icf);\n\t\t\t\t\tise.initCause(ex);\n\t\t\t\t\tthrow ise;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Default case...\n\t\treturn new InitialContextFactory() {\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tpublic Context getInitialContext(Hashtable<?,?> environment) {\n\t\t\t\treturn new SimpleNamingContext(\"\", boundObjects, (Hashtable<String, Object>) environment);\n\t\t\t}\n\t\t};\n\t}",
"TipoEnvio getTipoEnvio();",
"public static EvalEnv genExampleEnv2()\n {\n EvalEnv result = new EvalEnv();\n result.createVariable(Boolean.class, true);\n result.createVariable(Boolean.class, true);\n for (int x = 0; x < Environment.HalfObsWidth * 2; x++)\n {\n for (int y = 0; y < Environment.HalfObsHeight * 2; y++)\n {\n result.createVariable(Integer.class, 0);\n }\n }\n\n for (int i = 0; i < 5; i++)\n {\n result.createVariable(Integer.class, -1);\n result.createVariable(Float.class, -100.0);\n result.createVariable(Float.class, 10.0);\n }\n return result;\n }",
"public Script() {\n\n fs = System.getProperty(\"file.separator\");\n ps = System.getProperty(\"path.separator\");\n\n try {\n env = new Environment();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public T caseModelEnvironment(ModelEnvironment object) {\n\t\treturn null;\n\t}",
"protected PythonInterpreter registerEnv(String key) {\n\t\tPythonInterpreter p;\n\t\tif (environments.containsKey(key)) {p= environments.get(key);}\n\t\telse {\n\t\t\tp = new PythonInterpreter();\n\t\t\tenvironments.put(key, p);\n\t\t}\n\t\treturn p;\n\t}",
"public EnvironmentStateManager getEnvironmentStateManager() {\n\t\treturn environmentStateManager;\n\t}",
"public ExecutionEnvironment getExecutionEnvironment() {\n return executionEnvironment;\n }",
"public State createState(Environment environmentIn, State oldState)\n\t{\n\t\treturn new MarioState(environmentIn, oldState);\n\t}",
"public void setGameEnvironment(GameEnvironment gameEnvironment) {\r\n this.gameE = gameEnvironment;\r\n }",
"@Bean\n public EnvConfig envConfig(Environment environment) {\n EnvConfig envConfigBean = new EnvConfig();\n envConfigBean.setEnvironment(environment);\n return envConfigBean;\n }",
"@SuppressWarnings(\"unchecked\")\n public WildFlyInitialContext(final Hashtable<?, ?> environment) throws NamingException {\n rootContext = new WildFlyRootContext(new FastHashtable<>((Hashtable<String, Object>) environment));\n }",
"public static it.vmt.gh.sb.model.Environment getEnvironment(\n\t\t\tlong environmentId)\n\t\tthrows com.liferay.portal.kernel.exception.PortalException {\n\n\t\treturn getService().getEnvironment(environmentId);\n\t}",
"public String getEnvironmentName() {\n return this.environmentName;\n }",
"private static void loadTestEnv() {\n\n\t\tPropertyReader reader = new PropertyReader(GlobalContext.getAppDir(), Constants.FILENAME_TESTENV);\n\n\t\tTestEnv env = new TestEnv();\n\t\tenv.setDefaultHostName(reader.getProperty(Constants.DEFAULT_HOST_NAME));\n\t\tenv.setDefaultHostOS(reader.getProperty(Constants.DEFAULT_HOST_OS));\n\t\tenv.setDefaultCredentials(reader.getProperty(Constants.DEFAULT_CREDENTIALS));\n\t\tenv.setDefaultBrowser(reader.getProperty(Constants.DEFAULT_BROWSER));\n\t\tenv.setAppServer(reader.getProperty(Constants.APP_SERVER));\n\t\tenv.setDatabaseServer(reader.getProperty(Constants.DATABASE_SERVER));\n\t\tenv.setEmailReceipients(reader.getProperty(Constants.EMAIL_RECEIPIENTS));\n\t\tenv.setEmailSender(reader.getProperty(Constants.EMAIL_SENDER));\n\n\t\t// sets to global context.\n\t\tGlobalContext.setTestEnv(env);\n\t}",
"public ResourceenvironmentAdapterFactory() {\n if (modelPackage == null) {\n modelPackage = ResourceenvironmentPackage.eINSTANCE;\n }\n }",
"public void setEnvironment(PanelEnvironment aEnvironment) \r\n\t{\r\n\t\tthis.panelEnvironment = aEnvironment;\r\n\t\tif( this.panelEnvironment == null ) {\r\n\t\t\tthis.panelEnvironment = new NullPanelEnvironment();\r\n\t\t}\r\n\t}",
"public EnvironmentUtilities(Environment environment, double gamma) {\n this.environment = environment;\n this.gamma = gamma;\n int noOfRows = environment.getRows();\n int noOfCols = environment.getColumns();\n environmentUtilities = new ActionUtility[noOfRows][noOfCols];\n for(int i = 0; i < noOfRows; i++){\n for(int j = 0; j <noOfCols; j++) {\n environmentUtilities[i][j] = new ActionUtility(null, 0.00);\n }\n }\n }",
"public final EObject entryRuleOperationEnvironment() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleOperationEnvironment = null;\n\n\n try {\n // InternalMappingDsl.g:4706:61: (iv_ruleOperationEnvironment= ruleOperationEnvironment EOF )\n // InternalMappingDsl.g:4707:2: iv_ruleOperationEnvironment= ruleOperationEnvironment EOF\n {\n newCompositeNode(grammarAccess.getOperationEnvironmentRule()); \n pushFollow(FOLLOW_1);\n iv_ruleOperationEnvironment=ruleOperationEnvironment();\n\n state._fsp--;\n\n current =iv_ruleOperationEnvironment; \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }"
] | [
"0.73038095",
"0.70078963",
"0.6799271",
"0.6623502",
"0.66079825",
"0.65105045",
"0.64702624",
"0.6466732",
"0.64015573",
"0.63775635",
"0.6206663",
"0.6174986",
"0.6174986",
"0.6162573",
"0.6028011",
"0.6020392",
"0.5967386",
"0.59614426",
"0.59457916",
"0.59313685",
"0.59294695",
"0.591826",
"0.5906614",
"0.5904911",
"0.5885392",
"0.58847743",
"0.5879944",
"0.5875578",
"0.58518225",
"0.58240783",
"0.5821436",
"0.5817844",
"0.5806959",
"0.58039534",
"0.5798825",
"0.57784164",
"0.57605684",
"0.5724917",
"0.5721134",
"0.57181233",
"0.5702029",
"0.56976944",
"0.5694129",
"0.5693531",
"0.5677121",
"0.56484914",
"0.56484866",
"0.56383115",
"0.56020236",
"0.5591503",
"0.5589941",
"0.5586019",
"0.55840456",
"0.55551344",
"0.54904073",
"0.5449405",
"0.5440523",
"0.5420066",
"0.54114735",
"0.5355575",
"0.5348905",
"0.5313182",
"0.53057885",
"0.5287959",
"0.52766114",
"0.52673084",
"0.52362996",
"0.52343035",
"0.5221709",
"0.52137035",
"0.518774",
"0.51816976",
"0.51695716",
"0.51607066",
"0.5157673",
"0.5151512",
"0.5144636",
"0.5133118",
"0.51291484",
"0.5119977",
"0.5117481",
"0.50940126",
"0.5090133",
"0.5087498",
"0.50841033",
"0.5080436",
"0.5075016",
"0.50649786",
"0.5053216",
"0.5026003",
"0.5014129",
"0.5010707",
"0.50060093",
"0.5002122",
"0.5000169",
"0.49903402",
"0.49850667",
"0.4983989",
"0.49804732"
] | 0.7959965 | 1 |
Returns the package supported by this factory. | ExploitationPackage getExploitationPackage(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"PackageType getRequiredPackage();",
"public PackageNode getPackage();",
"java.lang.String getPackage();",
"public String getPackageName();",
"public String getPackageName() {\n return pkg;\n }",
"String getPackageName();",
"public DsByteString getPackage() {\n return m_strPackage;\n }",
"java.lang.String getPackageName();",
"public String getPackageName() {\n\t\treturn pkgField.getText();\n\t}",
"private static String getPackage() {\n\t\tPackage pkg = EnergyNet.class.getPackage();\n\n\t\tif (pkg != null) {\n\t\t\tString packageName = pkg.getName();\n\n\t\t\treturn packageName.substring(0, packageName.length() - \".api.energy\".length());\n\t\t}\n\n\t\treturn \"ic2\";\n\t}",
"io.deniffel.dsl.useCase.useCase.Package getPackage();",
"public String getPackageInfomartion() {\n\t\treturn packageInfomartion;\n\t}",
"protected abstract String getPackageName();",
"default String getPackageName() {\n return declaringType().getPackageName();\n }",
"public String getPackageName() {\n return packageName.get();\n }",
"String getPackager();",
"public Short getPackageType() {\n\t\treturn packageType;\n\t}",
"public static String getPackageName() {\n return CELibHelper.sPackageName;\n }",
"String getPackage() {\n return mPackage;\n }",
"public String getBasePackage() {\n\t\treturn this.basePackage;\n\t}",
"String pkg();",
"public static String getPackageName() {\n return mPackageName;\n }",
"public String getAppPackage() {\n\t\treturn fnh.getOutputAppPackage();\n\t}",
"public abstract String getTargetPackage();",
"public abstract String getTargetPackage();",
"public java.lang.Boolean getServicePackageInfoSupported() {\r\n return servicePackageInfoSupported;\r\n }",
"EisPackage getEisPackage();",
"private String getPkgName () {\n return context.getPackageName();\n }",
"@NonNull\n RepoPackage getPackage();",
"public UMLPackageBean getPackage() {\n return umlPkg;\n }",
"public String getPackagedJava();",
"public String getPackageName() {\n return packageName;\n }",
"public String getPackageName() {\n return packageName;\n }",
"PiviPackage getPiviPackage();",
"public Package.Builder getBuilder() {\n return pkgBuilder;\n }",
"public String getPackageName() {\n\t\treturn this.PackageName;\n\t}",
"public String getPackaging();",
"public String getPackageName() {\n\t\treturn packageName;\n\t}",
"public String getPackage() {\n return carrierPackage;\n }",
"public abstract String packageName();",
"PackageConfiguration getPackageConfiguration();",
"protected final Product getProduct() {\n Product.Builder product = new Product.Builder()\n .implementationTitle(getClass())\n .implementationVersion(getClass());\n Optional.ofNullable(getClass().getPackage())\n .flatMap(p -> Optional.ofNullable(p.getSpecificationVersion()))\n .map(specVersion -> \"(specification \" + specVersion + \")\")\n .ifPresent(product::comment);\n return product.build();\n }",
"public String getPackageName() {\n JavaType.FullyQualified fq = TypeUtils.asFullyQualified(qualid.getType());\n if (fq != null) {\n return fq.getPackageName();\n }\n String typeName = getTypeName();\n int lastDot = typeName.lastIndexOf('.');\n return lastDot < 0 ? \"\" : typeName.substring(0, lastDot);\n }",
"public PersistedBmmPackage getPackage(String packageName) {\n return packages.get(packageName.toUpperCase());\n }",
"public abstract String getAndroidPackage();",
"NfrPackage getNfrPackage();",
"@NonNull\n public String getPackageName() {\n return mPackageName;\n }",
"public String getBasePackage() {\n\t\treturn DataStore.getInstance().getBasePackage();\n\t}",
"public static String getBukkitPackage() {\n return Bukkit.getServer().getClass().getPackage().getName().split(\"\\\\.\")[3];\n }",
"boolean hasPackageName();",
"public String getPackageName() {\n Object ref = packageName_;\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 packageName_ = s;\n }\n return s;\n }\n }",
"ApiPackage getApiPackage();",
"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 String getPackageName() {\n if (mPackageName == null) {\n try {\n mPackageName = mSessionBinder.getPackageName();\n } catch (RemoteException e) {\n Log.d(TAG, \"Dead object in getPackageName.\", e);\n }\n }\n return mPackageName;\n }",
"public String getPackageName() {\n Object ref = packageName_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n packageName_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }",
"IrSpecificPackage getIrSpecificPackage();",
"public String getPackages() {\n\t\treturn this.packages;\n\t}",
"public String getPackageName() {\n return mAppEntry.info.packageName;\n }",
"com.google.protobuf.ByteString\n getPackageBytes();",
"public static String getCraftBukkitPackage() {\n \t\t// Ensure it has been initialized\n \t\tgetMinecraftPackage();\n \t\treturn CRAFTBUKKIT_PACKAGE;\n \t}",
"NgtPackage getNgtPackage();",
"public String getProductPack() {\n return (String)getAttributeInternal(PRODUCTPACK);\n }",
"public String getModelPackageStr() {\n\t\tString thepackage = getModelXMLTagValue(\"package\");\n\t\treturn thepackage != null ? thepackage + \".\" : \"\";\n\t}",
"VmPackage getVmPackage();",
"String packageName() {\n return name;\n }",
"private PackageService getPackageService() {\n\t\treturn packageService;\n\t}",
"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}",
"ParkingPackage getParkingPackage();",
"public int getWMCPackaged(){\r\n\t\t \r\n\t\treturn mccabe.getWMCPackage();\t\t\r\n\t}",
"private BasePackage getPackageModel()\r\n {\r\n return packageCartService.getBasePackage();\r\n }",
"PackageClause getPackageClause();",
"NassishneidermanPackage getNassishneidermanPackage();",
"public String getPackageDesc() {\n\t\treturn packageDesc;\n\t}",
"public String getPkgId() {\n return pkgId;\n }",
"public String getVersionsSupported();",
"public static String getMinecraftPackage() {\n \t\t// Speed things up\n \t\tif (MINECRAFT_FULL_PACKAGE != null) {\n \t\t\treturn MINECRAFT_FULL_PACKAGE;\n \t\t}\n \n \t\tfinal Server craftServer = Bukkit.getServer();\n \n \t\t// This server should have a \"getHandle\" method that we can use\n \t\tif (craftServer != null) {\n \t\t\ttry {\n \t\t\t\tfinal Class<?> craftClass = craftServer.getClass();\n \t\t\t\tfinal Method getHandle = craftClass.getMethod(\"getHandle\");\n \n \t\t\t\tfinal Class<?> returnType = getHandle.getReturnType();\n \t\t\t\tfinal String returnName = returnType.getCanonicalName();\n \n \t\t\t\t// The return type will tell us the full package, regardless of\n \t\t\t\t// formating\n \t\t\t\tCRAFTBUKKIT_PACKAGE = getPackage(craftClass.getCanonicalName());\n \t\t\t\tMINECRAFT_FULL_PACKAGE = getPackage(returnName);\n \t\t\t\treturn MINECRAFT_FULL_PACKAGE;\n \n \t\t\t} catch (final SecurityException e) {\n \t\t\t\tthrow new RuntimeException(\n \t\t\t\t\t\t\"Security violation. Cannot get handle method.\", e);\n \t\t\t} catch (final NoSuchMethodException e) {\n \t\t\t\tthrow new IllegalStateException(\n \t\t\t\t\t\t\"Cannot find getHandle() method on server. Is this a modified CraftBukkit version?\",\n \t\t\t\t\t\te);\n \t\t\t}\n \n \t\t} else {\n \t\t\tthrow new IllegalStateException(\n \t\t\t\t\t\"Could not find Bukkit. Is it running?\");\n \t\t}\n \t}",
"protected EPackage getEPackage() {\r\n return Wps10Package.eINSTANCE;\r\n }",
"CommunicationsprogramsPackage getCommunicationsprogramsPackage();",
"Shipment_Package getShipment_Package();",
"TggPackage getTggPackage();",
"List<String> getSystemPackages();",
"public boolean isPackage()\n {\n ensureLoaded();\n return m_flags.isPackage();\n }",
"public String getSupportedVersion() {\n return supportedVersion;\n }",
"ICpPackInfo getPackInfo();",
"TypePackage getTypePackage();",
"public String getPackingType() {\n return (String)getAttributeInternal(PACKINGTYPE);\n }",
"GramaticaPackage getGramaticaPackage();",
"default String getPackageId() {\n return getIdentifier().getPackageId();\n }",
"Quality_requirements_metamodelPackage getQuality_requirements_metamodelPackage();",
"MatchModelPackage getMatchModelPackage();",
"public String getProjectPackageName() {\n\t\treturn projectPackageName;\n\t}",
"ICpPack getPack();",
"public PackageName getRootPackageName() {\n return rootPackageName;\n }",
"public GeoPackage getGeoPackage() {\n\t\treturn this.geoPackage;\n\t}",
"ReactNativePackage getReactNativePackage();",
"HiphopsPackage getHiphopsPackage();",
"protected UMLPackage getUMLPackage() {\r\n return currentPackage;\r\n }",
"MystPackage getMystPackage();",
"public Short getPackageSeries() {\n\t\treturn packageSeries;\n\t}",
"public String getPackageId()\n {\n return packageId;\n }",
"ThingMLPackage getThingMLPackage();"
] | [
"0.7031596",
"0.6824025",
"0.6818806",
"0.6752645",
"0.67181015",
"0.6704875",
"0.6698022",
"0.6678774",
"0.6635858",
"0.6556546",
"0.65183675",
"0.6501405",
"0.6496429",
"0.6481852",
"0.6376274",
"0.63505894",
"0.6338929",
"0.63388515",
"0.6327788",
"0.6314242",
"0.63126606",
"0.6282504",
"0.6273947",
"0.625018",
"0.625018",
"0.6246106",
"0.6218379",
"0.62113875",
"0.61974704",
"0.6187816",
"0.6176801",
"0.6166096",
"0.6166096",
"0.61538076",
"0.61370236",
"0.61311126",
"0.6119505",
"0.6110087",
"0.6095738",
"0.60568917",
"0.60403836",
"0.6006883",
"0.5988912",
"0.59846574",
"0.5971428",
"0.596663",
"0.59435695",
"0.59422004",
"0.5939782",
"0.5931478",
"0.59234554",
"0.59193766",
"0.5917696",
"0.5896124",
"0.58916557",
"0.5884717",
"0.5883739",
"0.5870814",
"0.58519596",
"0.584893",
"0.58416474",
"0.584001",
"0.5839548",
"0.5827061",
"0.5818055",
"0.58170223",
"0.5803712",
"0.5787864",
"0.5782273",
"0.5762003",
"0.57582545",
"0.575813",
"0.5757836",
"0.5753817",
"0.5746635",
"0.57362497",
"0.57329035",
"0.57273763",
"0.57260066",
"0.57190484",
"0.57188034",
"0.57182175",
"0.57047856",
"0.57030493",
"0.5689773",
"0.56865156",
"0.56835216",
"0.5674978",
"0.56738055",
"0.56653726",
"0.56578237",
"0.5646589",
"0.56433535",
"0.5642557",
"0.563893",
"0.5638249",
"0.56340986",
"0.563228",
"0.56135017",
"0.5610743",
"0.5606374"
] | 0.0 | -1 |
Sliding window Time complexity : O(2n) = O(n)O(2n)=O(n) Space complexity : O(min(m, n))O(min(m,n)). Same as the previous approach. | public int lengthOfLongestSubstring(String s) {
int[] chars = new int[128];
int left = 0;
int right = 0;
int res = 0;
while (right < s.length()) {
char r = s.charAt(right);
chars[r]++;
while (chars[r] > 1) {
char l = s.charAt(left);
chars[l]--;
left++;
}
res = Math.max(res, right - left + 1);
right++;
}
return res;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static ArrayList<Integer> maxSlidingWindow(int[] nums, int k) {\n ArrayList<Integer> ans = new ArrayList<Integer>();\n Deque<Integer> deque = new ArrayDeque<Integer>();\n if (nums.length == 0) {\n return ans;\n }\n for (int i = 0; i < k - 1; i++) {\n inQueue(deque, nums[i]);\n }\n\n for(int i = k - 1; i < nums.length; i++) {\n inQueue(deque, nums[i]);//入队过程中,如果入队大则删去前面all。否则跟随。\n\n ans.add(deque.peekFirst());\n// System.out.println( nums[i - k + 1]+\"\"+deque);//[3,-1,-3]\n outQueue(deque, nums[i - k + 1]);//滑动过程中每次都把前面的一个筛去\n// System.out.println( nums[i - k + 1]+\"\"+deque);//[-1,-3]\n// 1[3, -1]\n// 1[3, -1]\n// 3[3, -1, -3]\n// 3[-1, -3]\n// -1[5]\n// -1[5]\n// -3[5, 3]\n// -3[5, 3]\n }\n\n return ans;\n\n }",
"private static int[] maxSlidingWindow(int[] nums, int k) {\n int n = nums.length;\n if (n == 0 || k == 0) { return new int[0]; }\n if (k == 1) {\n return nums;\n }\n\n int[] left = new int[n];\n int[] right = new int[n];\n left[0] = nums[0];\n right[n - 1] = nums[n - 1];\n\n for (int i = 1; i < n; i++) {\n if (i % k == 0) {\n left[i] = nums[i]; // block_start\n } else {\n left[i] = Math.max(left[i - 1], nums[i]);\n }\n\n int j = n - i - 1;\n if ((j + 1) % k == 0) {\n right[j] = nums[j]; // block_end\n } else {\n right[j] = Math.max(right[j + 1], nums[j]);\n }\n }\n\n int[] output = new int[n - k + 1];\n for (int i = 0; i < output.length; i++) {\n output[i] = Math.max(right[i], left[i + k - 1]);\n }\n return output;\n }",
"public int[] maxSlidingWindow(int[] nums, int k) {\n if (nums == null || k <= 0) {\n return new int[0];\n }\n int len = nums.length;\n int []res=new int[len-k+1];\n int ri = 0;\n Deque<Integer> map= new ArrayDeque();\n for(int i=0;i<len;i++){\n // remove numbers out of range k\n if (map.size()>0 && map.peek() < i - k + 1) {\n map.poll();\n }\n // remove smaller numbers in k range as they are useless\n while(map.size()>0 && nums[map.peekLast()]<nums[i]){\n map.pollLast();\n }\n map.offerLast(i);\n if(i+1>=k){\n res[ri++]=nums[map.peek()];\n }\n }\n return res;\n }",
"public int[] maxSlidingWindow_1(int[] nums, int k) {\n\t\tint maxIndex = 0;\n\t\tint currStorePtr=0;\n\t\tfor(int i=0;i<nums.length;i++){\n\t\t\tif(i<= maxIndex +k-1){\n\t\t\t\tif(nums[i]>=nums[maxIndex]) {\n\t\t\t\t\tmaxIndex =i;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tmaxIndex =i-k+1;\n\t\t\t\tfor(int j=i-k+1;j<=i;j++){\n\t\t\t\t\tif(nums[j]>=nums[maxIndex]) maxIndex =j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tnums[currStorePtr]=nums[maxIndex];\n\n\t\t\tif(i>=k-1){\n\t\t\t\tcurrStorePtr++;\n\t\t\t}\n\t\t}\n\t\treturn Arrays.copyOfRange(nums,0,currStorePtr);\n\t}",
"WindowedStream<T> timeSlidingWindow(long millis, long slide);",
"public int[] maxSlidingWindow(int[] nums, int k) {\n if (nums.length == 0)\n return nums;\n \n int[] output = new int[nums.length-k+1];\n \n for (int i=0; i+k-1 < nums.length; i++) {\n int max = nums[i];\n for (int j=1; j<k; j++) {\n if (nums[i+j] > max)\n max = nums[i+j];\n }\n output[i] = max;\n }\n \n return output;\n }",
"static void maxSlidingWindow(int a[], int w, int b[]) {\n\t\tLinkedList<Integer> queue = new LinkedList<Integer>();\r\n\t\t\r\n\t\tfor(int i = 0; i < w; i++) {\r\n\t\t\twhile(!queue.isEmpty() && a[queue.getLast()] < a[i]) {\r\n\t\t\t\tqueue.removeLast();\r\n\t\t\t}\r\n\t\t\tqueue.add(i);\r\n\t\t}\r\n\t\tfor(int i = w; i < a.length; i++) {\r\n\t\t\tSystem.out.println(\"i: \" + i + \", queue: \" + queue + \", max: \" + a[queue.getFirst()]);\r\n\t\t\tb[i-w] = a[queue.getFirst()]; //the front always keep the largest index\r\n\t\t\t\r\n\t\t\twhile(!queue.isEmpty() && a[queue.getLast()] < a[i]) { //remove smaller elements\r\n\t\t\t\tqueue.removeLast();\r\n\t\t\t}\r\n\t\t\tqueue.add(i);\r\n\t\t\twhile(queue.getFirst() <= i - w) { //pop up obseleted index\r\n\t\t\t\tqueue.removeFirst();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//XXX do not forget this!!!\r\n\t\tb[a.length-w] = a[queue.getFirst()];\r\n\t\t\r\n\t}",
"public double[] medianSlidingWindow(int[] nums, int k) {\n Comparator<Integer> comparator = (a, b) -> nums[a] != nums[b] ? Integer.compare(nums[a], nums[b]) : a - b;\n \n minHeap = new TreeSet<>(comparator);\n \n maxHeap = new TreeSet<>(comparator.reversed());\n \n int n = nums.length;\n \n double output[] = new double[n - k + 1];\n \n int left = 0;\n \n //This works like a sliding window.\n //In each window we calculate the median using the above steps in comments\n for(int right = 0; right < n; right++){\n \n //Remove the indices of the element from the left as the window progresses\n if(right >= k){\n \n minHeap.remove(right - k);\n maxHeap.remove(right - k);\n }\n \n //Add the element to min heap first\n minHeap.add(right);\n \n //Remove the first element from the min heap and add that to maxHeap\n maxHeap.add(minHeap.pollFirst());\n \n //It will balance the sizes if maxHeap > minHeap\n balanceHeaps();\n \n if(right >= k - 1){\n \n output[left++] = getMedian(nums, k);\n } \n }\n \n return output;\n \n }",
"public static void main(String[] args) {\n int[] nums = {1,3,-1,-3,5,3,6,7};\n int k = 3;\n\n int[] output = maxSlidingWindow(nums, k);\n Arrays.stream(output).forEach(n -> System.out.print(n + \" \"));\n }",
"public static int[] maxSlidingWindow(int[] nums, int k) {\n if (nums == null || k <= 0) {\n return new int[0];\n }\n int[] result = new int[nums.length-k+1];\n int resultIndex = 0;\n // store index\n Deque<Integer> queue = new LinkedList<>();\n for (int index = 0; index < nums.length; index++) {\n // remove numbers out of range k\n while (!queue.isEmpty() && queue.peek() < index - k + 1) {\n queue.poll();\n }\n // remove smaller numbers in k range as they are useless\n while (!queue.isEmpty() && nums[queue.peekLast()] < nums[index]) {\n queue.pollLast();\n }\n // q contains index... r contains content\n queue.offer(index);\n if (index >= k - 1) {\n result[resultIndex++] = nums[queue.peek()];\n }\n }\n return result;\n }",
"public SlidingWindow(long sizeMs, long rangeMs){\n this.sizeMs = sizeMs;\n this.rangeMs = rangeMs;\n }",
"public static void window() {\n\n System.out.println(\"# 1\");\n\n List<String> data = Utils.getData();\n Observable.fromIterable(data)\n .window(2)\n .subscribe((windowStream) -> windowStream.subscribe(new MyObserver<>()));\n\n System.out.println(\"# 2\");\n\n Observable.fromIterable(data)\n .window(2, 3)\n .subscribe((windowStream) -> windowStream.subscribe(new MyObserver<>()));\n\n System.out.println(\"# 3\");\n\n Observable.fromIterable(data)\n .window(2, 3, 1)\n .subscribe((windowStream) -> windowStream.subscribe(new MyObserver<>()));\n\n System.out.println(\"# 4\");\n\n Observable.fromIterable(data)\n .window(100, 100, TimeUnit.MICROSECONDS)\n .subscribe((windowStream) -> windowStream.subscribe(new MyObserver<>()));\n\n System.out.println(\"# 5\");\n\n Observable.fromIterable(data)\n .window((emitter) -> emitter.onNext(1))\n .subscribe((windowStream) -> windowStream.subscribe(new MyObserver<>()));\n\n /*\n Mose of the window operators are similar to buffer.\n */\n }",
"private static void moveWindow() {\n // sort the window array\n int[] windowInstance = window.clone();\n Arrays.sort(windowInstance);\n // use median to update distance readings\n prevDist = dist;\n dist = windowInstance[windowInstance.length / 2];\n // shift window by 1 sample, newest sample at the end \n for (int i = 0; i < window.length - 1; i++) {\n window[i] = window[i + 1];\n }\n window[window.length - 1] = readUsDistance();\n // for testing purpose:\n //System.out.println(Arrays.toString(windowInstance) + \" median: \" + dist);\n }",
"static void countDistinct(int arr[], int k) \n {\n HashMap<Integer, Integer> hM = new HashMap<Integer, Integer>(); \n \n // Traverse the first window and store count \n // of every element in hash map \n for (int i = 0; i < k; i++) \n hM.put(arr[i], hM.getOrDefault(arr[i], 0) + 1); \n \n // Print count of first window \n System.out.println(hM.size()); \n \n // Traverse through the remaining array \n for (int i = k; i < arr.length; i++) { \n \n // Remove first element of previous window \n // If there was only one occurrence \n if (hM.get(arr[i - k]) == 1) { \n hM.remove(arr[i - k]); \n } \n \n else // reduce count of the removed element \n hM.put(arr[i - k], hM.get(arr[i - k]) - 1); \n \n // Add new element of current window \n // If this element appears first time, \n // set its count as 1, \n hM.put(arr[i], hM.getOrDefault(arr[i], 0) + 1); \n \n // Print count of current window \n System.out.println(hM.size()); \n } \n }",
"public static int f2(int N) { \n int x = 0; //O(1)\n for(int i = 0; i < N; i++) // O(n)\n // O(n)`\n for(int j = 0; j < i; j++) \n x++;\n return x;\n }",
"public int[] shift(int n) {\n\t\tif(n > 0){\r\n\t\t\tfor(int i = 0; i < n; i++){ \r\n\t int last = arr[arr.length-1]; \r\n\t for(int j = arr.length-1; j > 0; j--){ \r\n\t arr[j] = arr[j-1]; \r\n\t } \r\n\t arr[0] = last;\r\n\t }\r\n\t\t\treturn arr;\r\n\t\t}\r\n\t\t//shift left if negative\r\n\t\telse {\r\n\t\t\tint absVal = Math.abs(n);\r\n\t\t\t//This outer for loop helps repeat the number of shifts over and over again\r\n\t\t\tfor(int i = 0; i < absVal; i++){ \r\n\t\t\t\t//Storing the First element\r\n\t\t int first = arr[0];\r\n\t\t //This inner loop shifts only once\r\n\t\t for(int j = 0; j < arr.length-1; j++){ \r\n\t\t \tarr[j] = arr[j+1]; \r\n\t\t }\r\n\t\t arr[arr.length - 1] = first; \r\n\t\t }\r\n\t\t\t return arr;\r\n\t\t}\r\n\t}",
"while (hi < s.length()) {\n if (/* maximum window - window is valid; min window - window is NOT valid */) {\n //move hi forward for one step + update count\n hi++;\n }",
"WindowedStream<T> timeWindow(long millis);",
"static int minimumSwaps2(int[] arr) {\n Map<Integer, Integer> backward = new HashMap<>();\n Map<Integer, Integer> forward = new HashMap<>();\n for (int i = 0; i < arr.length; i++) {\n int move = i + 1 - arr[i];\n if (move > 0)\n forward.put(arr[i], move);\n else if (move < 0)\n backward.put(arr[i], move);\n }\n\n //count swap in pairs\n int pairs = 0;\n for (Integer bk : backward.keySet()) {\n for (Integer fk : forward.keySet()) {\n if (backward.get(bk) * (-1) == forward.get(fk)) {\n pairs = pairs + 1;\n continue;\n }\n }\n }\n //count swap others\n int swapCount = forward.size() + backward.size() - (2 * pairs);\n if (swapCount > 0) swapCount = swapCount - 1;\n\n System.out.println(String.format(\n \"forward(%d):%s\\nbackeward(%d):%s\\neach: %d, swap: %d\"\n , forward.size(), forward, backward.size(), backward,\n pairs, swapCount\n ));\n\n return swapCount + pairs;\n }",
"public int findLatestStep(int[] arr, int m) {\n int last = -1 ;\n Set<Integer> list = new HashSet<>();\n int n = arr.length;\n int num = 1;\n for (int i = 0; i < n; i++) {\n num <<= 1;\n }\n for (int i = 0; i < arr.length; i++) {\n int tmp = arr[i];\n\n int con = move(tmp);\n num = num|con;\n\n int copy = num;\n\n list = check(copy,n);\n\n for (int x :\n list) {\n if (x == m)\n last = i+1;\n }\n\n\n }\n return last;\n\n }",
"WindowedStream<T> windowAll();",
"@Override\n\tpublic void smooth(int n) {\n\n\t\tint arr[][] = new int[this.frame.length][this.frame[0].length];\n\n\t\tif (n <= 2) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (n%2 == 0) {\n\t\t\tn--;\n\t\t}\n\n\t\tfor (int i = 0; i < this.frame.length; i++) {\n\t\t\tfor (int j = 0; j < this.frame[0].length; j++) {\n\t\t\t\tint counter = 0;\n\t\t\t\tint avg = 0;\n\n\t\t\t\tfor (int a = i-(n/2); a<= i+(n/2); a++) {\n\t\t\t\t\tfor (int b = j-(n/2); b<= j+(n/2); b++) {\n\t\t\t\t\t\tif (isInside(this.frame, a, b)) {\n\t\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\t\tavg += this.frame[a][b];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tarr[i][j] = avg/(counter);\n\t\t\t}\n\t\t}\n\n\t\tthis.frame = arr;\n\t}",
"static List<TrafficElement> computeTheMaximumOfASlidingWindow(TrafficElement traffic[], int w) {\n List<TrafficElement> result = new ArrayList<>();\n\n Deque<TrafficElement> queue = new ArrayDeque<>();\n ArrayDeque<TrafficElement> max = new ArrayDeque<>();\n\n for (int i = 0; i < traffic.length; i++) {\n queue.addLast(traffic[i]);\n addToTheMax(max, traffic[i]);\n\n while (traffic[i].timestamp - queue.peek().timestamp > w) {\n TrafficElement element = queue.removeFirst();\n if (element == max.peek()) max.removeFirst();\n\n }\n\n result.add(new TrafficElement(traffic[i].timestamp, max.peek().volume));\n\n }\n\n return result;\n }",
"static int minimumSwaps(int[] arr) {\n int arrLen = arr.length;\n int minSwaps = 0;\n boolean visited[] = new boolean[arrLen];\n for ( int i = 0; i < arrLen ; i++){\n if ( arr[i] == i+1){\n visited[i] = true;\n continue;\n }\n else if ( !visited[arr[i] - 1]){\n visited[i] = true;\n int temp = arr[i];\n int hops = 1;\n while ( temp != i+1 ){\n visited[temp - 1] = true;\n temp = arr[temp -1];\n hops++;\n }\n minSwaps += hops - 1;\n }\n }\n return minSwaps;\n }",
"public int climbStairs(int n) {\n if (n < 1) {\n return 0;\n }\n int prev = 1; // case i == 0;\n int next = 1; // case i == 1;\n for (int i = 2; i <= n; i++) {\n int cur = prev + next; // which means f[i] = f[i - 1] + f[i - 2] \n prev = next;\n next = cur;\n }\n return next;\n }",
"private final int m()\n\t { int n = 0;\n\t int i = 0;\n\t while(true)\n\t { if (i > j) return n;\n\t if (! cons(i)) break; i++;\n\t }\n\t i++;\n\t while(true)\n\t { while(true)\n\t { if (i > j) return n;\n\t if (cons(i)) break;\n\t i++;\n\t }\n\t i++;\n\t n++;\n\t while(true)\n\t { if (i > j) return n;\n\t if (! cons(i)) break;\n\t i++;\n\t }\n\t i++;\n\t }\n\t }",
"static int countWaysUtil(int n, int m) \n\t { \n\t int res[] = new int[n]; \n\t res[0] = 1; res[1] = 1; \n\t for (int i=2; i<n; i++) \n\t { \n\t res[i] = 0; \n\t for (int j=1; j<=m && j<=i; j++) \n\t res[i] += res[i-j]; \n\t } \n\t return res[n-1]; \n\t }",
"private int partition(int first, int n) {\n int pivotIndex = first;\n int last = first + n - 1;\n int pivotValue = a[first++];\n while (first <= last) {\n\t while (first <= last && a[first] <= pivotValue)\n\t first++;\n\t while (last >= first && a[last] > pivotValue)\n last--;\n if (first < last) \n\t swap(first, last);\n }\n swap(pivotIndex, last);\n return last;\n }",
"public int slidingWindow_withLength_k(int[] customers, int[] mood, int k) {\n\n k = k > mood.length ? mood.length : k;\n int sum = 0;\n\n for (int i = 0; i < k; i++) {\n if (mood[i] == 0) {\n sum += customers[i];\n }\n }\n return sum;\n }",
"static boolean SlidingWindowDetails(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"SlidingWindowDetails\")) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NONE_);\n r = consumeTokens(b, 0, K_WINDOW, DOLLAR_SIGN);\n r = r && VarName(b, l + 1);\n r = r && SlidingWindowDetails_3(b, l + 1);\n r = r && consumeToken(b, K_IN);\n r = r && ExprSingle(b, l + 1);\n r = r && WindowStartCondition(b, l + 1);\n r = r && WindowEndCondition(b, l + 1);\n exit_section_(b, l, m, r, false, FLWORExprRecover_parser_);\n return r;\n }",
"private int minJumps(int[] arr) {\n int n = arr.length;\n if (n == 1) {\n return 0;\n }\n\n //map to hold the values in the array and the indexes where they are located in\n Map<Integer, List<Integer>> map = new HashMap<>();\n\n for (int i = 0; i < arr.length; i++) {\n /*\n method checks if arr[i] exists in the map, if so, we add the current index to the list of indexes where\n arr[i] is present, otherwise we make a new entry for arr[i]\n */\n map.computeIfAbsent(arr[i], v -> new ArrayList<>()).add(i);\n }\n\n //Queue to hold the indexes j we can jump to starting from 0\n Queue<Integer> queue = new LinkedList<>();\n queue.add(0); //add the first index into the queue\n int steps = 0;\n\n while (!queue.isEmpty()) {\n steps++;\n int size = queue.size();\n\n for (int i = 0; i < size; i++) {\n int j = queue.remove(); //the current index\n\n //jump to j + 1\n if (j + 1 < n && map.containsKey(arr[j + 1])) {\n if (j + 1 == n - 1) {\n return steps;\n }\n queue.add(j + 1);\n }\n\n //jump to j - 1\n if (j - 1 >= 0 && map.containsKey(arr[j - 1])) {\n queue.add(j - 1);\n }\n\n //jump to index k --> arr[j] == arr[k]\n if (map.containsKey(arr[j])) {\n //search through the list of indexes where arr[j] is present\n for (int k : map.get(arr[j])) {\n if (k != j) {\n //if one of the indexes is the last index, we've gotten to the end, otherwise we add the index to the queue\n if (k == n - 1) {\n return steps;\n }\n queue.add(k);\n }\n }\n }\n //remove the value of arr[j] from the map to avoid overlap\n map.remove(arr[j]);\n }\n }\n return steps;\n }",
"public int[] squareUp(int n) {\r\n int[]arreglo=new int[(n*n)]; // O(1)\r\n if(n==0){ // O(1)\r\n return arreglo; // O(1)\r\n }\r\n for(int i=n-1;i<arreglo.length;i=i+n){ // O(n)\r\n for (int j=i;j>=i-(i/n);j--){ // O(1)\r\n arreglo[j]=1+(i-j); // O(1)\r\n }\r\n }\r\n return arreglo; // O(1)\r\n}",
"static int trappingWater(int arr[], int n) {\r\n\r\n // Your code here\r\n /** *** tle\r\n for(int i=1;i<n-1;i++){\r\n int l=arr[i];\r\n for (int j = 0; j < i; j++) {\r\n l=l < arr[j] ? arr[j] : l;\r\n }\r\n int r=arr[i];\r\n for (int j = i+1; j <n ; j++) {\r\n r=r < arr[j] ? arr[j] : r;\r\n }\r\n\r\n s=s+(l>r? r:l) -arr[i];\r\n }\r\n return s;\r\n\r\n //////////////////////////////////////////////\r\n SC=O(N)\r\n if(n<=2)\r\n return 0;\r\n int[] left=new int[n];\r\n int[] right=new int[n];\r\n left[0]=0;\r\n int leftmax=arr[0];\r\n for (int i = 1; i <n ; ++i) {\r\n left[i]=leftmax;\r\n leftmax=Math.max(leftmax,arr[i]);\r\n }\r\n right[n-1]=0;\r\n int mxright=arr[n-1];\r\n for (int i = n-2; i >=0 ; --i) {\r\n right[i]=mxright;\r\n mxright=Math.max(mxright,arr[i]);\r\n }\r\n int s=0;\r\n for (int i = 1; i < n-1; ++i) {\r\n if(arr[i]<left[i] && arr[i]<right[i]){\r\n s+=Math.min(left[i],right[i])-arr[i];\r\n }\r\n }\r\n return s;\r\n /////////////////////////////////////////////////////\r\n **/\r\n\r\n if(n<=2)\r\n return 0;\r\n\r\n int leftMax = arr[0];\r\n int rightMax = arr[n-1];\r\n\r\n int left = 1;\r\n int right = n-2;\r\n int water = 0;\r\n\r\n while(left <= right) {\r\n if (leftMax < rightMax) {\r\n if (arr[left] >= leftMax) {\r\n leftMax = arr[left];\r\n } else\r\n water = water + (leftMax - arr[left]);\r\n\r\n //leftMax = Math.max(leftMax, arr[left]);\r\n left++;\r\n } else {\r\n if (arr[right] > rightMax) {\r\n rightMax = arr[right];\r\n }\r\n\r\n water = water + (rightMax - arr[right]);\r\n right--;\r\n }\r\n }\r\n return water;\r\n\r\n }",
"private static void findStrongestMMAFighter(int[] arr, int k)\n\t{\n\n\t\tDeque<Integer> dq = new LinkedList<Integer>();\n\t\t// Dequeue first element will be the largest one always\n\t\tint i = 0;\n\t\t// We have to process first k elements separately\n\t\tfor (; i < k; i++)\n\t\t{\n\t\t\twhile (!dq.isEmpty() && arr[i] >= arr[dq.peekLast()])\n\t\t\t{\n\t\t\t\tdq.removeLast();\n\t\t\t}\n\t\t\tdq.addLast(i);\n\n\t\t}\n\t\tfor (; i < arr.length; i++)\n\t\t{\n\n\t\t\t// First element will always be larger\n\t\t\tSystem.out.print(arr[dq.peekFirst()] + \" \");\n\n\t\t\t// remove elements which are not in current window\n\t\t\twhile (!dq.isEmpty() && dq.peekFirst() <= i - k)\n\t\t\t{\n\t\t\t\tdq.removeFirst();\n\t\t\t}\n\t\t\t// Remove unwanted elements\n\t\t\twhile (!dq.isEmpty() && arr[i] > arr[dq.peekLast()])\n\t\t\t{\n\t\t\t\tdq.removeLast();\n\t\t\t}\n\t\t\tdq.addLast(i);\n\t\t}\n\t\tif (!dq.isEmpty())\n\t\t\tSystem.out.print(arr[dq.peek()] + \" \");\n\n\t}",
"public static int f1(int N) {\n int x = 0; //O(1)\n for(int i = 0; i < N; i++) // O(n) \n x++; \n return x; \n \n }",
"private void updateWindow(long time) {\n for (long nextSecond = secondStart + NANO_IN_SECOND; end != null\n && nextSecond < time; nextSecond += NANO_IN_SECOND) {\n int count = 0;\n while (start != null && start.time < nextSecond) {\n count++;\n start = start.next;\n }\n lastSecondCount -= count;\n secondStart = nextSecond;\n updateLastSecond(count);\n if (start == null)\n end = null;\n }\n }",
"public static void mst(int n)\r\n {\r\n \r\n boolean[]visited=new boolean[n+1];\r\n \r\n //sort queue with considering weight as a key\r\n PriorityQueue<Node>queue=new PriorityQueue<>(new Comparator<Node>(){\r\n public int compare(Node n1,Node n2)\r\n {\r\n return n1.weight-n2.weight;\r\n }\r\n });\r\n \r\n visited[1]=true;\r\n \r\n for(Edge e:list[1])\r\n {\r\n queue.add(new Node(e.weight,e.vertex,1));\r\n }\r\n \r\n while(queue.size()!=0)\r\n {\r\n Node node=queue.poll();\r\n \r\n int weight=node.weight;\r\n int curr=node.curr;\r\n int parent=node.parent;\r\n \r\n if(visited[curr])\r\n continue;\r\n \r\n visited[curr]=true;\r\n arr.add(new Node(weight,curr,parent));\r\n ans+=weight;\r\n \r\n for(Edge e:list[curr])\r\n {\r\n queue.add(new Node(e.weight,e.vertex,curr));\r\n }\r\n \r\n }\r\n \r\n }",
"static long gridlandMetro(long n, int m, int k, int[][] track) {\n Map<Integer, Stack<int[]>> map = new HashMap<>();\n for (int i = 0; i < k; i++) {\n int r = track[i][0];\n int c1 = track[i][1];\n int c2 = track[i][2];\n Stack<int[]> stack = map.get(r);\n if (stack == null) {\n stack = new Stack<>();\n stack.push(new int[] { c1, c2 });\n map.put(r, stack);\n } else {\n int[] c = stack.peek();\n if (c[1] >= c1)\n c[1] = Math.max(c[1], c2);\n else\n stack.push(new int[] { c1, c2 });\n }\n }\n return (long) n * m - map.values().stream().flatMap(Collection::stream).mapToLong(c -> c[1] - c[0] + 1).sum();\n}",
"private int getShiftAmount(int hashWindowSize) {\n int shiftAmount = 1;\n int i = 32;\n\n while (i > 0 && hashWindowSize % i != 0) {\n shiftAmount *= 2;\n i /= 2;\n }\n\n shiftAmount = shiftAmount % 32;\n\n return shiftAmount;\n }",
"private int iterativeFib(int n) {\r\n int backVal = 0, frontVal = 1;\r\n \r\n for (int i = 1; i < n - 1; i++) {\r\n int temp = frontVal + backVal;\r\n backVal = frontVal;\r\n frontVal = temp;\r\n }\r\n \r\n return frontVal + backVal;\r\n }",
"int countSusbset(int n, int w){\n //i.e target sum achieved\n if(w == 0){\n return 1;\n }\n \n //if sum not achieved and no items left\n if(n == 0){\n return 0;\n }\n \n //if item is gretart than target weight, we have to exclude it\n if(arr[n-1] > w){\n return countSusbset(n-1, w)\n }else{ \n return countSusbset(n-1, w) + countSusbset(n-1, w - arr[n-1]);\n }\n}",
"public int minMoves2(int[] nums) {\n int median = quickSelect(nums, nums.length/2 + 1, 0, nums.length-1);\n int minMoves = 0;\n for(int i : nums){\n minMoves += Math.abs(i-median);\n }\n return minMoves;\n }",
"public String minWindow(String S, String T) {\n\t int tt = T.length();\n\t // set up a hashmap for T and also keep track of occurance\n\t HashMap<Character, Integer> needFind = new HashMap<Character, Integer>();\n\t HashMap<Character, Integer> hasFound = new HashMap<Character, Integer>();\n\t for (int i=0; i<tt; ++i) {\n\t hasFound.put(T.charAt(i), 0);\n\t if (needFind.containsKey(T.charAt(i))) {\n\t needFind.put(T.charAt(i), needFind.get(T.charAt(i))+1);\n\t } else {\n\t needFind.put(T.charAt(i), 1);\n\t }\n\t }\n\t // sliding window as needed\n\t int right = 0, found = 0, left = 0;\n\t ArrayList<Integer> nexts = new ArrayList<Integer>();\n\t String window = \"\";\n\t int winSize = Integer.MAX_VALUE;\n\t while (right < S.length()) {\n\t char c = S.charAt(right);\n\t if (!needFind.containsKey(c)) { // not a match\n\t ++right;\n\t continue;\n\t }\n\n\t nexts.add(right);\n\t ++right;\n\t hasFound.put(c, hasFound.get(c)+1);\n\t if (hasFound.get(c) <= needFind.get(c)) ++found;\n\n\t if (found >= tt) { // got a window\n\t // move left?\n\t char ll = S.charAt(nexts.get(left));\n\t while (hasFound.get(ll) > needFind.get(ll)) {\n\t hasFound.put(ll, hasFound.get(ll)-1);\n\t ++left;\n\t ll = S.charAt(nexts.get(left));\n\t }\n\t // smaller window?\n\t if (right - nexts.get(left) < winSize) {\n\t winSize = right - nexts.get(left);\n\t window = S.substring(nexts.get(left), right);\n\t }\n\t }\n\t }\n\t System.out.println(window);\n\t return window;\t\n\t}",
"static double[] runningMedian(int[] a) {\r\n int n = a.length;\r\n\r\n double[] medianArr = new double[n];\r\n int i = 0;\r\n\r\n // max-heap\r\n PriorityQueue<Integer> max = new PriorityQueue<Integer>(Collections.reverseOrder());\r\n \r\n // min-heap\r\n PriorityQueue<Integer> min = new PriorityQueue<Integer>();\r\n\r\n double median = 0.0;\r\n\r\n for(int j=0; j<n; j++) {\r\n int x = a[j];\r\n if(min.size() == max.size()) {\r\n if(x < median) {\r\n max.add(x);\r\n median = (double)max.peek();\r\n medianArr[i] = median;\r\n i += 1;\r\n } else {\r\n min.add(x);\r\n median = (double)min.peek();\r\n medianArr[i] = median;\r\n i += 1;\r\n }\r\n } else if (max.size() > min.size()) {\r\n if(x < median) {\r\n min.add(max.remove());\r\n max.add(x);\r\n } else {\r\n min.add(x);\r\n }\r\n median = (double)(max.peek() + min.peek())/2;\r\n medianArr[i] = median;\r\n i += 1;\r\n } else {\r\n if(x > median) {\r\n max.add(min.remove());\r\n min.add(x);\r\n } else {\r\n max.add(x);\r\n }\r\n median = (double)(max.peek() + min.peek())/2;\r\n medianArr[i] = median;\r\n i += 1;\r\n }\r\n }\r\n\r\n return medianArr;\r\n }",
"public static double findMedianSortedArraysBinary(int[] nums1, int[] nums2) {\n int m = nums1.length;\n int n = nums2.length;\n if (n == 0) {\n return getMedian(nums1);\n }\n if (m == 0) {\n return getMedian(nums2);\n }\n if (m > n) {\n // Make sure the first array is the shorter one\n return findMedianSortedArraysBinary(nums2, nums1);\n }\n // Init the start curser with the first and the last point of the shorter array\n int start = 0;\n int end = m;\n\n // Loop until start and end met\n while (start <= end) {\n // The `nums1` index will be the center between `start` and `end`\n int i = (start + end) / 2;\n // The `nums2` index will be the complement of `i` from the total length\n // m+n+1(the amount of gaps)\n int j = (m + n + 1) / 2 - i;\n if (j > 0 && i < m && nums1[i] < nums2[j - 1]) {\n // If the left max of `nums2` is still larger than right min of `nums1`\n // we move start curser to the right position of the middle\n start = i + 1;\n\n } else if (i > 0 && j < n && nums2[j] < nums1[i - 1]) {\n // If the left max of `nums1` is still larger than right min of `nums2`\n // we move end curser to the left position of the middle\n end = i - 1;\n } else {\n // find the max value of left\n int maxLeft = 0;\n if (i == 0) {\n // if i-1 out of index\n maxLeft = nums2[j - 1];\n } else if (j == 0) {\n // if j-1 out of index\n maxLeft = nums1[i - 1];\n } else {\n maxLeft = Math.max(nums1[i - 1], nums2[j - 1]);\n }\n if ((m + n) % 2 == 1) {\n // If total length is odd\n // The max value of left is the median\n return maxLeft;\n }\n // find the min value of right\n int minRight = 0;\n if (i == m) {\n // If i out of index\n minRight = nums2[j];\n } else if (j == n) {\n // If j out of index\n minRight = nums1[i];\n } else {\n minRight = Math.min(nums1[i], nums2[j]);\n }\n // If total length is even\n return (maxLeft + minRight) / 2.0;\n }\n }\n // If no answer found, we give the answer of 0.0\n return 0.0;\n }",
"private static String minWindowCaseII(String s, String t) {\n if(s.length() == 0 || t.length() == 0) {\n return \"\";\n }\n\n HashMap<Character, Integer> uniqueCharsInT = new HashMap<>();\n HashMap<Character, Integer> uniqueCharsInCurrWindowInS = new HashMap<>();\n\n for(char c : t.toCharArray()) {\n uniqueCharsInT.put(c, uniqueCharsInT.getOrDefault(c, 0) + 1);\n }\n\n List<Pair<Integer, Character>> filteredS = new ArrayList<>();\n for(int i = 0; i < s.length(); i++) {\n if(uniqueCharsInT.containsKey(s.charAt(i))) {\n filteredS.add(new Pair<>(i, s.charAt(i)));\n }\n }\n int[] ans = new int[] {-1, 0, 0}; // window length, left, right\n int left = 0, right = 0, uniqueCharsInTCount = uniqueCharsInT.size(), uniqueCharsInCurrWindowCount = 0;\n\n\n while(right < filteredS.size()) {\n char rightChar = filteredS.get(right).getValue();\n uniqueCharsInCurrWindowInS.put(rightChar, uniqueCharsInCurrWindowInS.getOrDefault(uniqueCharsInCurrWindowInS, 0) + 1);\n\n if(uniqueCharsInT.get(rightChar).intValue() == uniqueCharsInCurrWindowInS.get(rightChar).intValue()) {\n uniqueCharsInCurrWindowCount++;\n }\n\n while(left <= right && uniqueCharsInCurrWindowCount == uniqueCharsInTCount) {\n char leftChar = filteredS.get(left).getValue();\n\n int start = filteredS.get(left).getKey();\n int end = filteredS.get(right).getKey();\n if(ans[0] == -1 || end - start + 1 < ans[0]) {\n ans[0] = end - start + 1;\n ans[1] = start;\n ans[2] = end;\n }\n\n uniqueCharsInCurrWindowInS.put(leftChar, uniqueCharsInCurrWindowInS.get(leftChar) - 1);\n if(uniqueCharsInT.containsKey(leftChar) && uniqueCharsInT.get(leftChar).intValue() > uniqueCharsInCurrWindowInS.get(leftChar).intValue()) {\n uniqueCharsInCurrWindowCount--;\n }\n\n left++;\n }\n\n right++;\n }\n\n return ans[0] == -1 ? \"\" : s.substring(ans[1], ans[2] + 1);\n }",
"static int minimumSwaps(int[] arr) {\n int length = arr.length;\n int swaps = 0;\n int ind = 0;\n int temp = 0;\n int count = 0;\n for(int i=0;i<length;i++)\n {\n if(i+1 != arr[i])\n {\n count++;\n ind = index(arr,i+1,i);\n if(ind != -1){\n temp = arr[i];\n arr[i] = arr[ind];\n arr[ind] = temp;\n }\n }\n }\n\n return count;\n }",
"private static int partition(int[] input, int start, int end) {\n int pivot = input[start];\n int i = start;\n int j = end;\n\n while (i < j) {\n while (i < j && input[--j] >= pivot) ; // empty loop body\n if (i < j) input[i] = input[j];\n\n while (i < j && input[++i] <= pivot) ; // empty loop body\n if (i < j) input[j] = input[i];\n }\n\n input[j] = pivot;\n return j;\n }",
"public static int f5(int N) { \n int x = 0;\n // log(n)\n for(int i = N; i > 0; i = i/2)\n // O(n) + O(n/2) + O(n/4)\n x += f1(i);\n \n return x; \n \n }",
"private void computeWeights(double w_m) {\n\t\t// Initialise\n\t\tdouble m = Math.floor(lambda);\n\t\tif (!flag) return;\n\t\t\n\t\t// Down\n\t\tint j = (int) m;\n\t\twhile (j > leftTruncation) {\n\t\t\tweights[j-1-leftTruncation] = (j / lambda) * weights[j-leftTruncation];\n\t\t\tj = j - 1;\n\t\t}\n\t\t\n\t\t// Up\n\t\tif (lambda >= 400) {\n\t\t\tj = (int) m;\n\t\t\twhile (j < rightTruncation) {\n\t\t\t\tweights[j+1-leftTruncation] = (lambda / (j+1)) * weights[j-leftTruncation];\n\t\t\t\tj = j + 1;\n\t\t\t}\n\t\t} else {\n\t\t\t// Special\n\t\t\tif (rightTruncation > 600) {\n\t\t\t\tflag = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tj = (int) m;\n\t\t\twhile (j < rightTruncation) {\n\t\t\t\tdouble q = lambda / (j + 1);\n\t\t\t\tif (weights[j-leftTruncation] > (underflow / q)) {\n\t\t\t\t\tweights[j+1-leftTruncation] = q * weights[j-leftTruncation];\n\t\t\t\t\tj = j + 1;\n\t\t\t\t} else {\n\t\t\t\t\trightTruncation = j;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Compute W\n\t\ttotalWeight = 0;\n\t\tint s = leftTruncation;\n\t\tint t = rightTruncation;\n\t\twhile (s < t) {\n\t\t\tif (weights[s-leftTruncation] <= weights[t-leftTruncation]) {\n\t\t\t\ttotalWeight += weights[s-leftTruncation];\n\t\t\t\ts = s + 1;\n\t\t\t} else {\n\t\t\t\ttotalWeight += weights[t-leftTruncation];\n\t\t\t\tt = t - 1;\n\t\t\t}\n\t\t}\n\t\ttotalWeight += weights[s-leftTruncation];\n\t\t\n\t}",
"public static int degreeOfArray(List<Integer> arr) { arr.length = n\n // num of Keys = k\n // O(n + k)\n // max value count = m\n //\n PriorityQueue<Node> pq = new PriorityQueue<>((i, j)-> j.count - i.count);\n Map<Integer, NodePosition> posMap = new HashMap<>();\n Map<Integer, Node> countMap = new HashMap<>();\n // [1, 2, 3, 4, 5, 6]\n for (int i = 0; i < arr.size(); i++) {\n int cur = arr.get(i);\n\n if (!countMap.containsKey(cur)) {\n countMap.put(cur, new Node(cur, 1));\n } else {\n Node curNode = countMap.get(cur);\n curNode.count++;\n countMap.put(cur, curNode);\n }\n\n if (!posMap.containsKey(cur)) {\n posMap.put(cur, new NodePosition(i, i));\n } else {\n NodePosition curNodePos = posMap.get(cur);\n curNodePos.endIndex = i;\n posMap.put(cur, curNodePos);\n }\n }\n //Iterator<Map.Entry<Integer, Node> it = new Iterator<>(countMap);\n for (Map.Entry<Integer, Node> e : countMap.entrySet()) {\n pq.add(e.getValue());\n }\n\n // [1, 2, 1, 3 ,2]\n // 1 , 2 , 3\n Node curNode = pq.remove();\n int maxCount = curNode.count;\n\n int minRange = posMap.get(curNode.num).endIndex - posMap.get(curNode.num).startIndex;\n\n while (!pq.isEmpty() && maxCount == pq.peek().count) {\n curNode = pq.remove();\n NodePosition nPos = posMap.get(curNode.num);\n minRange = Math.min(minRange, nPos.endIndex - nPos.startIndex);\n }\n\n return minRange + 1;\n }",
"private void sampleOfTheGeneratedWindowedAggregate() {\n Iterator<Integer[]> iterator = null;\n\n // builder3\n Integer[] rows = iterator.next();\n\n int prevStart = -1;\n int prevEnd = -1;\n\n for ( int i = 0; i < rows.length; i++ ) {\n // builder4\n Integer row = rows[i];\n\n int start = 0;\n int end = 100;\n if ( start != prevStart || end != prevEnd ) {\n // builder5\n int actualStart = 0;\n if ( start != prevStart || end < prevEnd ) {\n // builder6\n // recompute\n actualStart = start;\n // implementReset\n } else { // must be start == prevStart && end > prevEnd\n actualStart = prevEnd + 1;\n }\n prevStart = start;\n prevEnd = end;\n\n if ( start != -1 ) {\n for ( int j = actualStart; j <= end; j++ ) {\n // builder7\n // implementAdd\n }\n }\n // implementResult\n // list.add(new Xxx(row.deptno, row.empid, sum, count));\n }\n }\n // multiMap.clear(); // allows gc\n // source = Linq4j.asEnumerable(list);\n }",
"static int logTime(int[] n, int start, int end, int val) {\n if(n == null || n.length == 0) return -1;\n int mid = (start + end) / 2;\n if(val < n[mid]) logTime(n, 0, mid, val);\n if(val > n[mid]) logTime(n, mid + 1, n.length, val);\n return n[mid];\n }",
"public int minMoves2(int[] nums) {\n\t // Arrays.sort(nums); use quick select algo to find median in linear time\n\t int median = median(nums);\n\t int moves = 0;\n\t for (int n : nums) {\n\t moves += Math.abs(n-median);\n\t }\n\t return moves;\n\t }",
"public static int findMaxSumSubArray(int k, int[] arr) {\n int windowSum = 0, maxSum = Integer.MIN_VALUE;\n int windowStart = 0;\n for (int windowEnd = 0; windowEnd < arr.length; windowEnd++) {\n windowSum += arr[windowEnd]; // add the next element\n // slide the window, we don't need to slide if we've not hit the required window size of 'k'\n if (windowEnd >= k - 1) {\n maxSum = Math.max(maxSum, windowSum);\n windowSum -= arr[windowStart]; // subtract the element going out\n windowStart++; // slide the window ahead\n }\n }\n return maxSum;\n }",
"static int linearLogTime(int[] n, int[] m) {\n if(n == null || n.length == 0 || m == null || m.length == 0) return -1;\n int sum = 0;\n for(int i = 0; i < n.length; ++i) {\n sum += logTime(m, 0, m.length, 15);\n }\n return sum;\n }",
"public static int minJumps(int[] arr) {\n Map<Integer, List<Integer>> map = new HashMap<>();\n int n = arr.length;\n int step = 0;\n\n for (int i = 0; i < n; i++) {\n if (!map.containsKey(arr[i])) {\n map.put(arr[i], new ArrayList<>());\n }\n\n map.get(arr[i]).add(i);\n }\n\n Queue<Integer> queue = new LinkedList<>();\n boolean[] visited = new boolean[n];\n queue.offer(0);\n\n while (!queue.isEmpty()) {\n int size = queue.size();\n for (int i = 0; i < size; i++) {\n int pos = queue.poll();\n\n if (pos == n - 1) {\n return step;\n }\n\n if (pos - 1 >= 0 && !visited[pos - 1]) {\n queue.offer(pos - 1);\n visited[pos - 1] = true;\n }\n\n if (pos + 1 < n && !visited[pos + 1]) {\n queue.offer(pos + 1);\n visited[pos + 1] = true;\n }\n\n for (int next: map.get(arr[pos])) {\n if (!visited[next]) {\n queue.offer(next);\n }\n }\n\n // 优化,对于 [7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,11] 避免重复将7加入queue\n map.get(arr[pos]).clear();\n }\n step++;\n }\n\n return 0;\n }",
"public int[] exclusiveTime(int n, List<String> logs) {\n Stack<Integer> s = new Stack<Integer>();\n \n int[] timeForFunctions = new int[n];\n \n // pre means the start of the interval\n int pre = 0;\n for (String l : logs) {\n String[] arr = l.split(\":\");\n int curTime = Integer.parseInt(arr[2]);\n \n if (arr[1].equals(\"start\")) {\n if (!s.isEmpty()) timeForFunctions[s.peek()] += curTime - pre;\n \n s.push(Integer.parseInt(arr[0]));\n pre = curTime;\n } else {\n int curFunctionId = s.pop();\n timeForFunctions[curFunctionId] += curTime - pre + 1;\n \n // arr[2] is end of current interval, belong to current interval. That's why we have +1 here\n pre = curTime + 1;\n // pre means the start of next interval, so we need to +1\n }\n }\n \n return timeForFunctions;\n }",
"public static void getLeastNumbers_2(int[] input, int[] output) {\n int start = 0;\n int end = input.length - 1;\n int k = output.length;\n int index = partition(input, start, end);\n while(index != k - 1) {\n if(index > k - 1) {\n end = index - 1;\n index = partition(input, start, end);\n }\n else {\n start = index + 1;\n index = partition(input, start, end);\n }\n }\n \n for(int i = 0; i < k; ++i)\n output[i] = input[i];\n }",
"static int maxIndexDiff(int arr[], int n) { \n int max = 0;\n int i = 0;\n int j = n - 1;\n while (i <= j) {\n if (arr[i] <= arr[j]) {\n if (j - i > max) {\n max = j - i;\n }\n i += 1;\n j = n - 1;\n }\n else {\n j -= 1;\n }\n }\n return max;\n // Your code here\n \n }",
"public static String minimum_window(String s, String t) {\n // Write your code here\n if(s.length() < t.length()){\n return \"-1\";\n }\n String result = \"\";\n int n = s.length();\n int m = t.length();\n char[] freq1 = new char[128];\n char[] freq2 = new char[128];\n\n for(char c : t.toCharArray()){\n freq1[c]++;\n }\n\n int len = n+1;\n int cnt = 0;\n int l = 0;\n\n for(int i = 0 ; i< s.length(); i++){\n char temp = s.charAt(i);\n freq2[temp]++;\n if(freq1[temp]!=0 && freq2[temp] <= freq1[temp]){\n cnt++;\n }\n\n if(cnt >= m){\n while(freq2[s.charAt(l)] > freq1[s.charAt(l)] || freq1[s.charAt(l)] == 0){\n if(freq2[s.charAt(l)] > freq1[s.charAt(l)]){\n freq2[s.charAt(l)]--;\n }\n l++;\n }\n if(len > i - l + 1){\n len = i-l+1;\n result = s.substring(l,l+len);\n }\n }\n\n\n }\n return result.length() == 0 ? \"-1\": result;\n }",
"public int[][] generateMatrix(int n) {\n\t \n\t int matrix[][] = new int[n][n];\n\t int count = n * n +1;\n int topRow = 0;\n int bottomRow = n-1;\n int leftmostColumn = 0;\n int rightmostColumn = n -1;\n int added = 0;\n\t \n\t \n\t while(leftmostColumn <= rightmostColumn && topRow<= bottomRow && added <= count){\n \n \n \tif(added != count){\n for(int i = leftmostColumn; i <= rightmostColumn;i++){\n \t matrix[topRow][i] = added +1;\n // #arrList.add(matrix[topRow][i]);\n added = added+1;\n /* if(added == count)\n \tbreak;*/\n }\n topRow = topRow +1;\n \t}\n \n \n \tif(added != count){\t\n for(int j = topRow; j <= bottomRow;j++){\n //arrList.add(matrix[j][rightmostColumn]);\n \t matrix[j][rightmostColumn] = added+1;\n added = added+1;\n /*if(added == count)\n \tbreak;*/\n }\n rightmostColumn = rightmostColumn -1;\n \t} \n \t\n \t\n \tif(added != count){\t\n for(int k = rightmostColumn; k >= leftmostColumn; k--){\n \t matrix[bottomRow][k] = added +1;\n //arrList.add(matrix[bottomRow][k]);\n added = added+1;\n /*if(added == count)\n \tbreak;*/\n }\n bottomRow = bottomRow -1;\n \t}\n \t\n \t\n \tif(added != count){\t\n for(int l = bottomRow; l >= topRow ;l--){\n // arrList.add(matrix[l][leftmostColumn]);\n \t matrix[l][leftmostColumn] = added +1;\n added = added+1;\n /*if(added == count)\n \tbreak;*/\n }\n leftmostColumn = leftmostColumn +1;\n \t}\n \n }\n\t \n\t return matrix;\n \n}",
"static void miniMaxSum(int[] arr) {\n long minSum=0,maxSum=0;\n int temp=0;\n for(int k=0; k<arr.length-1; k++) {\n for(int i=0; i <arr.length-k-1;i++) {\n if(arr[i]>arr[i+1] ) {\n temp=arr[i];\n arr[i]=arr[i+1];\n arr[i+1]=temp;\n }\n }\n }\n for(int i=1;i<arr.length;i++){\n minSum+=arr[i-1];\n maxSum+=arr[i];\n }\n System.out.print(minSum+\" \"+maxSum);\n\n }",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int T = sc.nextInt();\n for(int i = 0 ; i < T; i++) {\n int n = sc.nextInt();\n int a = sc.nextInt();\n int b = sc.nextInt();\n PriorityQueue<Integer> queue = new PriorityQueue<Integer>();\n int[][] m = new int[n][n];\n //n^2 * log(n)\n for(int row = 0; row < n; row++) {\n for(int col = 0; col < n; col++) {\n if(row == 0 && col == 0 && n != 1) {\n continue;\n }else if(row == 0) {\n m[row][col] = m[row][col - 1] + a;\n }else if(col == 0) {\n m[row][col] = m[row-1][col] + b;\n }else {\n m[row][col] = m[row-1][col-1] + a + b;\n }\n\n if(row + col == (n -1)) {\n pool.add(m[row][col]); //log(n)\n }\n }\n }\n //O(n*log(n))\n for (Integer item:pool) {\n queue.add(item); //O(logn)\n }\n while(!queue.isEmpty()) {\n System.out.print(queue.poll() + \" \"); //O(1)\n }\n System.out.println();\n queue.clear();\n pool.clear();\n }\n }",
"private int partition(int[] arr, int start, int end) {\n\t\tint bounary = arr[start];\r\n\t\twhile(start<end) {\r\n\t\t\twhile(start<end&&arr[end]>=bounary) {\r\n\t\t\t\tend--;\r\n\t\t\t}\r\n\t\t\tarr[start] = arr[end];\r\n\t\t\twhile(start<end&&arr[start]<=bounary) {\r\n\t\t\t\tstart++;\r\n\t\t\t}\r\n\t\t\tarr[end] = arr[start];\r\n\t\t}\r\n\t\tarr[start] = bounary;\r\n\t\treturn start;\r\n\t}",
"public int findMin(int[] nums) {\n\t\t// corner\n\t\tif (nums.length == 1) {\n\t\t\treturn nums[0];\n\t\t}\n\t\t// Not rotated.\n\t\tif (nums[0] < nums[nums.length - 1]) {\n\t\t\treturn nums[0];\n\t\t}\n\n\t\t// Binary Search.\n\t\tint left = 0;\n\t\tint right = nums.length - 1;\n\t\t// int right = nums.length; // NG! (R = M version)\n\t\twhile (left <= right) {\n\t\t\t// while (left < right) { // NG! (R = M version)\n\t\t\tint mid = left + (right - left) / 2;\n\n\t\t\t// Find the valley.\n\t\t\t// nums[mid + 1] could cause array index out of bound when nums[mid] is the last\n\t\t\t// element.\n\t\t\t// However, for this problem, when nums[mid] is the second to the last, it\n\t\t\t// returns and\n\t\t\t// nums[mid] never reaches to the last element.\n\t\t\t// R = M version is NG because nums[mid] skips the second to the last and hits\n\t\t\t// the last\n\t\t\t// element depending on the case, in which case, nums[mid + 1] causes array\n\t\t\t// index out of bound.\n\t\t\tif (nums[mid] > nums[mid + 1]) {\n\t\t\t\treturn nums[mid + 1];\n\t\t\t}\n\t\t\t// Assert nums[mid] < nums[mid + 1] (no duplicates)\n\n\t\t\t// nums[mid - 1] could cause array index out of bound when the target is the\n\t\t\t// first element or\n\t\t\t// the second element.\n\t\t\t// However, for this problem, the code above returns when mid is equal to 0.\n\t\t\t// To be exact, when you use R = M - 1 version, mid is approaching index 0 as\n\t\t\t// the following:\n\t\t\t// 1. 2 -> 0 -> 1\n\t\t\t// 2. 3 -> 1 -> 0\n\t\t\t// ex) 1. [ 5, 1, 2, 3, 4 ], 2. [ 6, 1, 2, 3, 4, 5]\n\t\t\t// For case 1, the code above returns when mid is equal to 0, and nums[-1] never\n\t\t\t// occurs.\n\t\t\t// For case 2, the code below returns when mid is equal to 1, and nums[-1] never\n\t\t\t// occurs.\n\t\t\t//\n\t\t\t// Be careful!\n\t\t\t// Not rotated array can cause nums[-1] here for both of the two cases above\n\t\t\t// because\n\t\t\t// the code above does not return when mid is equal to 0, which causes index out\n\t\t\t// of bound here.\n\t\t\t// So, eliminate this case in advance.\n\t\t\tif (nums[mid - 1] > nums[mid]) {\n\t\t\t\treturn nums[mid];\n\t\t\t}\n\n\t\t\t// If the mid does not hit the valley, then keep searching.\n\t\t\t// I don't know why nums[mid] > nums[0] is ok in the LeetCode solution yet.\n\t\t\t// (No need to explore any further)\n\t\t\tif (nums[mid] > nums[left]) {\n\t\t\t\t// The min is in the right subarray.\n\t\t\t\tleft = mid + 1;\n\t\t\t} else {\n\t\t\t\t// The min is in the left subarray.\n\t\t\t\tright = mid - 1;\n\t\t\t\t// right = mid; // NG! (R = M version)\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}",
"public static void main(String[] args) {\n\t\tSlidingWindowMaximum slt = new SlidingWindowMaximum();\n\t\tint[] nums = {1,3,-1,-3,5,3,6,7};\n\t\tint k =3;\n\t\tint[] res = slt.maxSlidingWindow(nums, k);\n\t\tfor (int i= 0; i<res.length;i++){\n\t\t\tSystem.out.print(res[i]+\",\");\n\t\t}\n\t}",
"public static int findMinSubArray(int S, int[] arr) {\n int windowSum = 0, minLength = Integer.MAX_VALUE;\n int windowStart = 0;\n for (int windowEnd = 0; windowEnd < arr.length; windowEnd++) {\n windowSum += arr[windowEnd]; // add the next element\n // shrink the window as small as possible until the 'windowSum' is smaller than 'S'\n while (windowSum >= S) {\n minLength = Math.min(minLength, windowEnd - windowStart + 1);\n windowSum -= arr[windowStart]; // subtract the element going out\n windowStart++; // slide the window ahead\n }\n }\n\n return minLength == Integer.MAX_VALUE ? 0 : minLength;\n }",
"public int hammingWeight2(int n) {\n int count = 0;\n for (int i = n; i != 0; i &= (i - 1)) {\n count++;\n }\n return count;\n }",
"static double[] runningMedian(int[] a) {\n\n double[] doubles = new double[a.length];\n ArrayList<Integer> integers = new ArrayList<>();\n\n //Fila de prioridade\n PriorityQueue<Integer> maxHeap = new PriorityQueue<>(Collections.reverseOrder());\n PriorityQueue<Integer> minHeap = new PriorityQueue<>();\n\n double median = 0;\n\n for (int i = 0; i < a.length; i++) {\n if (a[i] <= median) {\n maxHeap.add(a[i]);\n } else {\n minHeap.add(a[i]);\n }\n\n if (minHeap.size() > maxHeap.size()+1) {\n maxHeap.add(minHeap.peek());\n minHeap.remove();\n }\n if (maxHeap.size() > minHeap.size()+1) {\n minHeap.add(maxHeap.peek());\n maxHeap.remove();\n }\n\n if (minHeap.size() == maxHeap.size()) {\n median = (maxHeap.peek() + minHeap.peek())/2.0;\n } else if(minHeap.size() > maxHeap.size()) {\n median = (double) minHeap.peek();\n } else if (minHeap.size() < maxHeap.size()) {\n median = (double) maxHeap.peek();\n }\n doubles[i] = median;\n }\n\n return doubles;\n }",
"public static void main(String[] args) {\nScanner s=new Scanner(System.in);\nint n=s.nextInt();\nint a[]=new int[n];\nint x=0;\nfor(int i=1;i<=n;i++)\n{\n\tif(i%2!=0)\n\t{\n\t\ta[x++]=i;\n\t}\n}\nint sum=0;\nsum=a[0];\nfor(int i=0;i<x;i++)\n{\n\tif((i+1)<x)\n\t{\n\tif(i%2==0)\n\t\tsum=sum+a[i+1];\n\telse\n\t\tsum=sum-a[i+1];\n\t}\n}\nSystem.out.println(sum);\n\t}",
"static int trappingWater(int arr[], int n) { \n // initialize output\n int result = 0;\n\n // maximum element on left and right\n int left_max = 0, right_max = 0;\n\n // indices to traverse the array\n int lo = 0, hi = n - 1;\n\n while (lo <= hi) {\n if (arr[lo] < arr[hi]) {\n if (arr[lo] > left_max)\n // update max in left\n left_max = arr[lo];\n else\n // water on curr element = max - curr\n result += left_max - arr[lo];\n lo++;\n }\n else {\n if (arr[hi] > right_max)\n // update right maximum\n right_max = arr[hi];\n else\n result += right_max - arr[hi];\n hi--;\n }\n }\n\n return result;\n }",
"public BaseWindowedBolt<T> ingestionTimeWindow(Time size, Time slide) {\n long s = size.toMilliseconds();\n long l = slide.toMilliseconds();\n ensurePositiveTime(s, l);\n ensureSizeGreaterThanSlide(s, l);\n\n setSizeAndSlide(s, l);\n this.windowAssigner = SlidingIngestionTimeWindows.of(s, l);\n return this;\n }",
"public static int insertionSort(int[] array)\n {\n int totalShifts = 0;\n int nSorted = 1; // the first n items are sorted\n int n = array.length; // total number of items in the array\n while (nSorted < n)\n {\n // get the next item\n int newInt = array[nSorted];\n int i = 0;\n // locate its position in smaller array\n // equivalent to for (int i)\n // thus can't use i for a different loop\n for (i = 0; i < nSorted; i++){\n\n // if you find a smaller item in there, exchange the two\n if (array[i] > newInt){\n array[nSorted] = array[i];\n array[i] = newInt; \n // make sure exchanging the two didnt make a new imbalance, continue searching through\n newInt = array[nSorted];\n totalShifts++;\n }\n \tnSorted++;\n \t}\n }\n // print total number of shifts\n System.out.print(totalShifts);\n return totalShifts;\n }",
"public static void merge(int inputArray[], int start, int mid, int end) {\n // must account for first marker being pos 0\n int tempArray[] = new int[end - start + 1];\n\n // index counter for l array\n int leftMarker = start;\n // index counter for r array\n int rightMarker = mid + 1;\n // index counter for temporary array\n int k = 0;\n\n // while L isn't past midpoint and R isn't past end\n // fill out tempArray based on which value is higher\n while (leftMarker <= mid && rightMarker <= end) {\n if (inputArray[leftMarker] < inputArray[rightMarker]) {\n tempArray[k] = inputArray[leftMarker];\n leftMarker = leftMarker + 1;\n } else {\n tempArray[k] = inputArray[rightMarker];\n rightMarker = rightMarker + 1;\n }\n k = k + 1;\n }\n\n // Only one condition must be true to break out of above loop\n // we could theoretically make it to the end of left array\n // without making it to the end of right array\n if (leftMarker <= mid) {\n while (leftMarker <= mid) {\n tempArray[k] = inputArray[leftMarker];\n leftMarker = leftMarker + 1;\n k = k + 1;\n\n }\n } else if (rightMarker <= end) {\n while (rightMarker <= end) {\n tempArray[k] = inputArray[rightMarker];\n rightMarker = rightMarker + 1;\n k = k + 1;\n }\n }\n\n // copy over the temp array into inputArray\n for (int i = 0; i < tempArray.length; i++) {\n // we add \"start\" to i so that\n // we only write to the \"window\"'s location\n // and the window frame will move from left to right and expand\n // as the recursion proceeds\n inputArray[i + start] = tempArray[i];\n }\n }",
"public Board twin() {\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tif (board[i][j] != 0) {\n\t\t\t\t\tif (i < (n-1) && board[i+1][j] != 0)\n\t\t\t\t\t\treturn move(i, j, i+1, j);\n\t\t\t\t\tif (j < (n-1) && board[i][j+1] != 0)\n\t\t\t\t\t\treturn move(i, j, i, j+1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"static int[] sol1(int[]a, int n){\r\n\t\tMap <Integer,Integer> map= new HashMap();\r\n\t\tfor (int i = 0; i< a.length; i++){\r\n\t\t\tmap.put(a[i],i);\r\n\t\t}\r\n\t\tArrays.sort(a);\r\n\t\tint i = 0; \r\n\t\tint j = a.length -1;\r\n\t\twhile (i <= j){\r\n\t\t\tif(a[i]+a[j]>n) j--;\r\n\t\t\telse if (a[i]+a[j]<n) i++;\r\n\t\t\telse break;\r\n\t\t}\r\n\t\tint[] ans= {map.get(a[i]),map.get(a[j])};\r\n\t\treturn ans;\r\n\t}",
"private static int[] p1(int[] ar, int n) {\n int[] p1 = new int[n];\n Arrays.fill(p1, -1);\n Stack<Integer> st = new Stack<>();\n for (int i = 0; i < n; i++) {\n while (st.size() != 0 && ar[i] <= ar[st.peek()]) {\n st.pop();\n }\n if (st.size() != 0) {\n p1[i] = st.peek();\n }\n st.push(i);\n }\n return p1;\n }",
"public int steps(int n) {\n\n\t\tint steps = 0;\n\t\tQueue<Integer> q = new ArrayDeque<>();\n\n\t\tSet<Integer> set = new HashSet<>();\n\n\t\tq.add(n);\n\t\tset.add(n);\n\n\t\twhile (!q.isEmpty()) {\n\t\t\tint size = q.size();\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tint curr = q.poll();\n\t\t\t\tif (curr == 1)\n\t\t\t\t\treturn steps;\n\n\t\t\t\tif (!set.contains(curr-1)) {\n\t\t\t\t\tq.add(curr - 1);\n\t\t\t\t\tset.add(curr-1);\n\t\t\t\t}\n\n\t\t\t\tif (curr % 2 == 0 && !set.contains(curr / 2)) {\n\t\t\t\t\tq.add(curr / 2);\n\t\t\t\t\tset.add(curr / 2);\n\t\t\t\t}\n\n\t\t\t\tif (curr % 3 == 0 && !set.contains(curr / 3)) {\n\t\t\t\t\tq.add(curr / 3);\n\t\t\t\t\tset.add(curr / 3);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tsteps++;\n\n\t\t}\n\n\t\treturn steps;\n\n\t}",
"@Test\n\tpublic void testRunningMedian() {\n\t\tQueue<Integer> h1 = new PriorityQueue<>(Comparator.reverseOrder());\n\t\t// min-heap\n\t\tQueue<Integer> h2 = new PriorityQueue<>();\n\n\t\tint[] stream = {13, 189, 23, 26, 1, 9, 89, 67, 87, 12, 1, 23, 45, 67, 81};\n\n\t\tfor (int val : stream) {\n\t\t\tif (h1.isEmpty() || val <= h1.peek()) {\n\t\t\t\th1.add(val);\n\t\t\t} else {\n\t\t\t\th2.add(val);\n\t\t\t}\n\n\t\t\t// re-balance the heaps\n\t\t\tif (h1.size() - h2.size() > 1) {\n\t\t\t\th2.add(h1.poll());\n\t\t\t} else if (h2.size() - h1.size() > 1) {\n\t\t\t\th1.add(h2.poll());\n\t\t\t}\n\n\t\t\tint runningMedian;\n\t\t\tif (h1.size() == h2.size()) {\n\t\t\t\trunningMedian = (h1.peek() + h2.peek()) / 2;\n\t\t\t} else {\n\t\t\t\tQueue<Integer> mh = h1.size() - h2.size() == 1 ? h1 : h2;\n\t\t\t\trunningMedian = mh.peek();\n\n\t\t\t}\n\t\t\tSystem.out.println(\"Running median is: \" + runningMedian);\n\t\t}\n\n\n\t}",
"static Integer partition(List<Integer> arr,Integer start,Integer end){\n\t\tint pivot = arr.get(end);\n\t\tint partitionIndex = start;\n\t\tfor(int i=start;i<end;i++){\n\t\t\tif(arr.get(i)<=pivot){\n\t\t\t\tint temp = arr.get(i);\n\t\t\t\tarr.set(i, arr.get(partitionIndex));\n\t\t\t\tarr.set(partitionIndex,temp);\n\t\t\t\tpartitionIndex++;\n\t\t\t}\n\t\t}\n\t\tint temp = arr.get(end);\n\t\tarr.set(end, arr.get(partitionIndex));\n\t\tarr.set(partitionIndex, temp);\n\t\treturn partitionIndex;\n\t}",
"public int[] seriesUp(int n) {\n int[] arr = new int[n * (n+1) / 2];\n int num = n, counter = 1;\n \n \n for (int i = arr.length - 1; i >= 0; i--) {\n if (num == 0) {\n num = n - counter;\n counter++;\n }\n arr[i] = num;\n num--;\n }\n \n return arr;\n }",
"int countSusbset(int n, int w){\n int dp[][] = new int[n+1][w+1];\n for(int i=0;i<=n;i++){\n for(int j=0;j<=w;j++){\n //when no items are there and target sum is 0, only one empty subset is possible\n if(i == 0 && j == 0){\n dp[i][j] = 1;\n }\n //no items left and target sum is greater than 0, no set is possible\n else if(i == 0 && j > 0){\n dp[i][j] = 0; \n }\n //if target sum is 0, no matter how many items we have , only one empty subset is possible\n else if(j == 0){\n dp[i][j] = 1;\n }\n //since item > target sum, so exclude\n else if(arr[i-1] > j){\n dp[i][j] = dp[i-1][j];\n }else{\n //two cases include and exclude\n dp[i][j] = dp[i-1][j] + dp[i-1][j - arr[i-1]];\n }\n }\n }\n return dp[n][w];\n}",
"public synchronized Measurement[] consumeWindow(){\n Measurement[] m=new Measurement[windowSize];\n double mean=0;\n /*\n Checking if there are enough items to be consumed is a synchronized operation.\n */\n while(toBeConsumed<windowSize){\n //System.out.println(\"Not enough value\");\n try{\n wait();\n }\n catch (InterruptedException e){\n System.out.println(\"The thread was teared down\");\n }\n }\n //System.out.println(\"Consumer woke up\");\n for(int i=0;i<windowSize;i++)\n m[i]=buf[(startIdx+i)%size];\n\n /*\n Updating values of toBeConsumed is a synchronized operation. Notify to the producer that the buffer\n is no more full.\n */\n /*\n 50% overlap\n */\n toBeConsumed-=windowSize/2;\n notifyAll();\n /*\n Shift the window forward\n */\n startIdx=(startIdx+windowSize/2)%size;\n return m;\n }",
"public int hammingWeight(int n) {\r\n int res=0;\r\n while(n!=0)\r\n {\r\n n=n & (n-1);\r\n res++;\r\n }\r\n return res;\r\n }",
"private void quickSortM(int[] arr, int start, int end) {\n\t\tif(start>=end)\r\n\t\t\treturn ;\r\n\t\tint bounary = partition(arr,start,end);\r\n\t\tquickSortM(arr,start,bounary-1);\r\n\t\tquickSortM(arr, bounary+1, end);\r\n\t}",
"private static void getSmallestSubArrayWithSum(int[] arr, int requiredSum){\n\n int size = Integer.MAX_VALUE;\n int start = -1, end = -1;\n int windowStart = 0, windowEnd = 0;\n int currentSum = 0;\n for(windowEnd = 0; windowEnd < arr.length; windowEnd++){\n\n currentSum += arr[windowEnd];\n if(currentSum > requiredSum){\n //shrink the window from start, until it is greater than requiredsum\n while(windowStart <= windowEnd && currentSum > requiredSum){\n currentSum -= arr[windowStart++];\n }\n }\n if(currentSum == requiredSum){\n int subArraySize = windowEnd - windowStart + 1;\n if(size > subArraySize){\n size = subArraySize;\n start = windowStart;\n end = windowEnd;\n }\n }\n }\n System.out.println(\"size=\"+ size + \", start=\"+ start+\", end=\"+ end);\n }",
"public int minimumSwaps(int[] arr){\n\t\t/*\n\t\t * for each element check it's ideal position then swap with ideal position, if swap needed swap and increment swap count.\n\t\t */\n\t\tint swapCount = 0;\n\t\tif(arr==null || arr.length <2){\n\t\t\treturn swapCount;\n\t\t}\n\t\tfor(int i=0; i<arr.length; i++){\n\t\t\tint element = arr[i];\n\t\t\tint idealIndex = element-1;\n\t\t\tif(i!=idealIndex) {\n\t\t\t\tint temp = arr[i];\n\t\t\t\tarr[i] = arr[idealIndex];\n\t\t\t\tarr[idealIndex] = temp;\n\t\t\t\tswapCount++;\n\t\t\t}\n\t\t}\n\t\treturn swapCount;\n\t}",
"int prevInt(int origin, int bound);",
"static int webknapSackRecur(int W, int wt[], int val[], int n) {\n // Base Case\n if (n == 0 || W == 0)\n return 0;\n\n // wt[i] represents the weight of the ith item\n // If weight of the nth item is more than Knapsack capacity W, then\n // this item cannot be included in the optimal solution\n if (wt[n - 1] > W)\n return webknapSackRecur(W, wt, val, n - 1);\n\n // Return the maximum of two cases:\n // (1) nth item included\n // (2) not included\n else return max(val[n - 1] + webknapSackRecur(W - wt[n - 1], wt, val, n - 1),\n webknapSackRecur(W, wt, val, n - 1)\n );\n }",
"WindowedStream<T> calendarWindow(String window, int count, TimeZone timeZone);",
"private static int partition(int[] arr, int left, int right) {\n\t\t\n\t\tint pivot = arr[(left + right) / 2];\n\t\t\n\t\twhile(left <= right) {\n\t\t\twhile(arr[left] < pivot) {\n\t\t\t\tleft++;\n\t\t\t}\n\t\t\twhile(arr[right] > pivot) {\n\t\t\t\tright--;\n\t\t\t}\n\t\t\tif(left <= right) { // once we find element > pivot on left and element < pivot on right :: swap\n\t\t\t\tswap(arr, left, right);\n\t\t\t\tleft++;\n\t\t\t\tright--;\n\t\t\t}\n\t\t}\n\t\treturn left;\n\t}",
"public S getStreamingWindowState(int i)\n {\n if (i == -1) {\n return lastExpiredWindowState;\n }\n if (i >= getWindowSize()) {\n throw new ArrayIndexOutOfBoundsException();\n }\n int index = (currentCursor + 1 + i) % windowSize;\n return states.get(index);\n }",
"private static int findNeed(int currN) { \n int lo = 0, hi = shopList.length-1; \n \n \n while (lo < hi) { \n int mid = (lo + hi) / 2; \n \n if (shopList[mid] < currN) { \n lo = mid + 1; \n } else { \n hi = mid; \n } \n } \n return shopList[lo]; \n }",
"private static ArrayList<ArrayList<Integer>> generatePartition(int n) {\n \tArrayList<ArrayList<Integer>> partitions = new ArrayList<>();\n \t// store the partition in non-increasing order, each value should be larger than 1\n \tInteger[] partition = new Integer[n];\n \t// the first partition is n itself\n \tpartition[0] = n;\n \tpartitions.add(new ArrayList<Integer>(Arrays.asList(Arrays.copyOf(partition, 1))));\n \t// if all value are 2, then it can not partition any further\n \tint k = 0;\n \twhile (partition[0] > 2) {\n \t\t// generate next partition\n \t\tint remain = 0;\n \t\t// find the rightmost value which is larger than 2\n \t\twhile (partition[k] < 3) {\n \t\t\tremain += partition[k];\n \t\t\tk--;\n \t\t}\n \t\tpartition[k]--;\n \t\tremain++;\n \t\t// if remain is more, divide it in different values of size partition[k]\n \t\twhile (remain > partition[k]) {\n \t\t\tpartition[k + 1] = partition[k];\n \t\t\tremain -= partition[k];\n \t\t\tk++;\n \t\t}\n \t\tpartition[k + 1] = remain;\n \t\tk++;\n \t\t// ignore all partitions contain value 1\n \t\tif (partition[k] > 1) {\n \t\t\tpartitions.add(new ArrayList<Integer>(Arrays.asList(Arrays.copyOf(partition, k + 1))));\n \t\t}\n \t}\n \treturn partitions;\n }",
"public int maxEvents(int[] arrival, int[] duration) {\n int[][] events = new int[arrival.length][2];\n for (int i = 0; i < arrival.length; i++) {\n events[i] = new int[] {arrival[i], arrival[i] + duration[i]};\n }\n\n // events = [[1, 3], [3, 5], [3, 4], [5, 7], [7, 8]]\n // use start as a sweep line, from left to right\n // 1. create arrays to record all start points, and ends points\n // 2. sort starts and ends \n // 3. sweep starts and ends from left to right\n // time: O(nlogn), space: O(n)\n\n int[] starts = new int[events.length];\n int[] ends = new int[events.length];\n for (int i = 0; i < events.length; i++) {\n starts[i] = events[i][0];\n ends[i] = events[i][1];\n }\n\n Arrays.sort(starts);\n Arrays.sort(ends);\n\n int results = 0;\n int end = 0;\n for (int i = 0; i < events.length; i++) {\n if (starts[i] < ends[end]) {\n results++;\n } else {\n end++;\n }\n }\n return results;\n}",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in); \n int n = sc.nextInt();\n int[] array = new int[n];\n for(int i = 0;i < n; i++) {\n array[i] = sc.nextInt();\n }\n sc.close();\n \n int start = -1, end = -1;\n int misplaced = 0;\n \n for(int i = 0; i < n - 1; i++) {\n if(array[i] > array[i + 1]) {\n misplaced++;\n if(start < 0) {\n start = i;\n }\n }\n }\n \n for(int i = n - 1; i > 0; i--) {\n if(array[i] < array[i-1]) {\n end = i;\n break;\n }\n }\n \n if(misplaced < 1) {\n System.out.println(\"no\");\n return;\n }\n else if(misplaced == 1 || misplaced == 2) {\n if(misplaced == 1) //case where two neighbors swap themselves\n end = start + 1;\n boolean leftValidator = (start == 0 || array[end] >= array[start - 1]) && array[end] <= array[start + 1];\n boolean rightValidator = \n (end == n - 1 || array[start] <= array[end + 1]) && array[start] >= array[end -1];\n if(leftValidator && rightValidator) {\n System.out.println(\"yes\");\n System.out.println(\"swap \"+(start+1)+\" \"+(end+1));\n }\n else{\n System.out.println(\"no\");\n }\n return;\n }\n else{\n boolean leftValidator = start == 0 || array[end] >= array[start - 1];\n boolean rightValidator = end == n -1 || array[start] <= array[end + 1];\n if(!leftValidator || !rightValidator){\n System.out.println(\"no\");\n return;\n }\n int pre = array[end];\n for(int i = end - 1; i >= start; i--) {\n if(array[i] < pre) {\n System.out.println(\"no\");\n return;\n }\n pre = array[i];\n }\n \n System.out.println(\"yes\");\n System.out.println(\"reverse \"+(start+1)+\" \"+(end+1));\n }\n \n /**\n //I am such an idot cause I first understood the question wrongly\n //If the array was supposed to be consecutively ascending order, then the code below would've worked\n \n int min = Integer.MAX_VALUE;\n int start = -1, end = -1;\n int left = 0, right = n - 1;\n int misplaced = 0;\n \n for(int i : array) { //find the min value\n min = Math.min(min, i);\n }\n \n while(left <= right) { //find how many elements are misplaced and the index of first misplaced element\n if(array[left] != min + left) { //and the index of the last misplaced element\n misplaced++;\n if(start < 0) {\n start = left;\n }\n }\n left++;\n if(left <= right && array[right] != min + right) { //left != right for the case where the array is odd\n misplaced++;\n if(end < 0) {\n end = right;\n }\n }\n right--;\n }\n \n if(misplaced < 2) {\n System.out.println(\"no\");\n return;\n }\n else if(misplaced == 2) {\n if(min + start == array[end] && min + end == array[start]) {\n System.out.println(\"yes\");\n System.out.println(\"swap \"+(start+1)+\" \"+(end+1));\n }\n else{\n System.out.println(\"no\");\n }\n return;\n }\n else{\n for(int i = start, j = 0; i <= end; i++, j++) {\n if(array[i] != min + end - j) {\n System.out.println(\"no\");\n return;\n }\n }\n \n System.out.println(\"yes\");\n System.out.println(\"reverse \"+(start+1)+\" \"+(end+1));\n }\n **/\n \n }",
"public abstract int findColForWindow(int x);",
"int partition(int arr[], int low, int high, SequentialTransition sq,ArrayList<StackPane> list,double speed) \n\t {\n\t\t\tint step;\n//\t\t\tint n = arr.length;\n\t int pivot = arr[high]; \n\t int i = (low-1);\n\t for (int j=low; j<high; j++) \n\t { \n\t if (arr[j] <= pivot) \n\t { \n\t i++; \n\t int temp = arr[i]; \n\t arr[i] = arr[j]; \n\t arr[j] = temp; \n\t step = j - i;\n\t sq.getChildren().add(FillBeforeSwap(list.get(i), list.get(j),speed));\n\t sq.getChildren().add(swapMe(list.get(i), list.get(j), step, list, speed));\n\t sq.getChildren().add(FillAfterSwap(list.get(j), list.get(i), speed));\n\t } \n\t } \n\t int temp = arr[i+1]; \n\t arr[i+1] = arr[high]; \n\t arr[high] = temp; \n\t step = (high) - (i+1);\n\t sq.getChildren().add(FillBeforeSwap(list.get(i+1), list.get(high), speed));\n\t sq.getChildren().add(swapMe(list.get(i+1), list.get(high), step, list, speed));\n\t sq.getChildren().add(FillAfterSwap(list.get(i+1), list.get(high), speed));\n\t \n\t return i+1; \n\t }",
"static int minimumSwaps(int[] arr) {\r\n int result = 0;\r\n \r\n // Gets the length of the input array\r\n int size = arr.length;\r\n \r\n // Cycles through the input array\r\n for (int i = 0; i < size; i++) {\r\n // Checks if the element is in the right position\r\n if (arr[i] != i+1) {\r\n result += 1; // The element ISN'T in the right position. A new swap is needed!\r\n \r\n // Cycles through the remaining input array\r\n for (int j = i+1; j < size; j++) {\r\n if (arr[j] == i+1) { // Gets the element that should be in the place of arr[i] and swaps it!\r\n int swap = arr[j];\r\n arr[j] = arr[i];\r\n arr[i] = swap;\r\n break;\r\n }\r\n } \r\n }\r\n }\r\n \r\n return result;\r\n}",
"public int climbStairs(int n) {\n if (n < 1) {\n return 0;\n }\n int[] visited = new int[n + 1];\n visited[0] = 1;\n visited[1] = 1;\n for (int i = 2; i < n + 1; i++) {\n visited[i] = visited[i - 1] + visited[i - 2];\n }\n return visited[n];\n }"
] | [
"0.6047944",
"0.601484",
"0.59583694",
"0.5939462",
"0.58846045",
"0.5868619",
"0.5828132",
"0.5814571",
"0.5591999",
"0.55733275",
"0.5415999",
"0.51176715",
"0.50720835",
"0.5046278",
"0.50398725",
"0.5008571",
"0.4947594",
"0.4938317",
"0.49163195",
"0.48589733",
"0.48064956",
"0.47945616",
"0.47872588",
"0.4756175",
"0.4744902",
"0.47364625",
"0.4724725",
"0.4714628",
"0.4699949",
"0.46799108",
"0.4679108",
"0.46763438",
"0.4673168",
"0.46582553",
"0.46516567",
"0.46270737",
"0.46220654",
"0.461267",
"0.4601703",
"0.4593715",
"0.45926142",
"0.45882693",
"0.4581892",
"0.45800585",
"0.457988",
"0.45730945",
"0.45722967",
"0.45479593",
"0.45438072",
"0.45377418",
"0.45371288",
"0.45361748",
"0.4529769",
"0.45033732",
"0.4498348",
"0.4494797",
"0.44818404",
"0.44571203",
"0.44416448",
"0.44397983",
"0.44369835",
"0.44258916",
"0.44216028",
"0.44182873",
"0.44180974",
"0.4414538",
"0.43998805",
"0.43981043",
"0.43977225",
"0.43973324",
"0.43972218",
"0.4389154",
"0.43876237",
"0.43818486",
"0.43769315",
"0.43664345",
"0.43659207",
"0.43623737",
"0.4358589",
"0.4357148",
"0.43569618",
"0.43559736",
"0.43454748",
"0.43443853",
"0.43342212",
"0.43293956",
"0.43216354",
"0.43200195",
"0.4319646",
"0.43133014",
"0.43027034",
"0.4302664",
"0.42974362",
"0.4293129",
"0.4292001",
"0.4289426",
"0.42830864",
"0.42749026",
"0.4269804",
"0.42697185",
"0.42671967"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
@Transactional
public void callProc(String proc, List<String> paras) {
Session session = getHibernateTemplate().getSessionFactory().openSession();
// Transaction tx = session.beginTransaction();
SQLQuery q = session.createSQLQuery("{call " + proc + " }");
if (paras != null) {
int i = 0;
for (String para : paras) {
q.setString(i++, para);
}
}
q.executeUpdate();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
@Transactional
public List callProcR(String proc, List<String> paras) {
Session session = getHibernateTemplate().getSessionFactory().openSession();
// Transaction tx = session.beginTransaction();
SQLQuery q = session.createSQLQuery("{call " + proc + "(?) }");
if (paras != null) {
int i = 0;
for (String para : paras) {
q.setString(i++, para);
}
}
return q.list();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
calculate the sekante or if the angle is small a distance | private static double calculateSekante(double left, double right) {
// if there was only a small change in angle , should be unnecessary
if (Math.abs(newangle) < deviationAngle) {
distance = (left + right) / 2.0;
// isLine = false;
return distance;
}
// compute radius
double r = 0.5 * (left + right) / newangle;
radius = r;
InputHandler.stepForward("ra." + radius);
// compute distance with the center pos
distance = 2.0 * (r) * Math.sin(newangle / 2.0);
return (distance);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double calculateSine(double angle);",
"public double calculateArcSine(double angle);",
"private double distantziaKalkulatu() {\r\n\t\tdouble lurrarenRadioa = 6371;// kilometrotan Lurraren radioa\r\n\t\tdouble dLat = Math.toRadians(terLat - latitudea); //\r\n\t\tdouble dLng = Math.toRadians(termLong - longitudea);\r\n\t\tdouble sindLat = Math.sin(dLat / 2);\r\n\t\tdouble sindLng = Math.sin(dLng / 2);\r\n\t\tdouble va1 = Math.pow(sindLat, 2)\r\n\t\t\t\t+ Math.pow(sindLng, 2) * Math.cos(Math.toRadians(terLat)) * Math.cos(Math.toRadians(latitudea));\r\n\t\tdouble va2 = 2 * Math.atan2(Math.sqrt(va1), Math.sqrt(1 - va1));\r\n\t\tdouble distancia = lurrarenRadioa * va2;\r\n\r\n\t\treturn distancia;\r\n\t}",
"public double calculateHyperbolicSine(double angle);",
"private double calculaPerimetro(){\r\n double perimetro;\r\n perimetro=(float) ((2*(cir.getY()-cir.getX()))*Math.PI);\r\n return perimetro;\r\n }",
"@Override\n public int calculerPerimetre() {\n return (int)(rayon * 2 * Math.PI);\n }",
"private int obliczDowoz() {\n int x=this.klient.getX();\n int y=this.klient.getY();\n double odl=Math.sqrt((Math.pow((x-189),2))+(Math.pow((y-189),2)));\n int kilometry=(int)(odl*0.5); //50 gr za kilometr\n return kilometry;\n }",
"public double calculateSine(double angle, String angleType);",
"public double getDistance(){\n return sensor.getVoltage()*100/2.54 - 12;\n }",
"public double calculateArcSine(double angle, String angleType);",
"public double getCircunference(){\n return 2.0 * radius * Math.PI; \n }",
"public float getTheDistance(){\n\t\t\n\t\tdistance = sonic.getDistance();\n\t\tSystem.out.println(\"value:\"+ distance);\n\t\t//considering the test results we see after 23 cm we see the +1cm precision and below 23cm we see + 5cm range \n\t\tif (distance<=25){\n\t\treturn (distance-7);\n\t\t}\n\t\telse{return (distance-3);}\n\t}",
"private int DirectionCalculation(int angle)\r\n\t{\t\r\n\t\treturn (int) ((angle/14.28)+1); //Angle divided by (100/(parts-1)) = 1-8\r\n\t}",
"double getSquareDistance();",
"public double perimetre()\n\t{\n\t\treturn 2*Math.PI*rayon;\n\t}",
"private float angleDistance(float from, float to) {\n float d = to - from;\n if (d > Math.PI) {\n return d - (float) Math.PI;\n }\n if (d < -Math.PI) {\n return d + (float) Math.PI;\n }\n return d;\n }",
"double cosTheta();",
"public double threatCircle() {\t\r\n\t\tdouble miles = 20.0f * Math.pow(1.8, 2*getMagnitude()-5);\r\n\t\tdouble km = (miles * kmPerMile);\r\n\t\treturn km;\r\n\t}",
"private double hitungG_pelukis(){\r\n return Math.sqrt(Math.pow(super.getRadius(),2)+Math.pow(tinggi,2));\r\n }",
"public static double normalizeAngle(double a, double center)\r\n/* 25: */ {\r\n/* 26: 91 */ return a - 6.283185307179586D * FastMath.floor((a + 3.141592653589793D - center) / 6.283185307179586D);\r\n/* 27: */ }",
"public double calcKa() {\n return 0;\n }",
"private double calculaDiametro(){\r\n double diametro;\r\n diametro=((cir.getY()-cir.getX())*2);\r\n return diametro;\r\n }",
"double getAngle();",
"double getAngle();",
"public int getAngleTolerance() {\n return angleTolerance;\n }",
"public static float standardizeAngle(float angle) {\n float result = modulo(angle, FastMath.TWO_PI);\n if (result >= FastMath.PI) {\n result -= FastMath.TWO_PI;\n }\n\n assert result >= -FastMath.PI : result;\n assert result < FastMath.PI : result;\n return result;\n }",
"public double getStartAngle();",
"private double calculateSpiralDistanceFromCentre(double phi)\n\t{\n\t\treturn a*Math.exp(b*phi);\n\t}",
"private double degToRadian(double angle)\n\t{\n\t\treturn angle/180*Math.PI;\n\t}",
"private int getBearing() {\n\t\treturn 0;\r\n\t}",
"public double theta() { return Math.atan2(y, x); }",
"private double getWinkel(Vector a, Vector b) {\n\t\tdouble zaehler = a.multiply(b);\n\t\tdouble nenner = a.getNorm() * b.getNorm();\n\t\t// nenner += 0.0001;\n\t\tdouble returnvalue = zaehler / nenner;\n\t\treturnvalue = Math.acos(returnvalue);\n\t\treturnvalue = Math.toDegrees(returnvalue);\n\n\t\treturn returnvalue;\n\t}",
"public double\ntValue(double distance)\n{\n\treturn (distance/this.length());\n}",
"boolean needToAim(double angle);",
"public double passAlign() {\n \tdouble angle;\n \tif (MasterController.ourSide == TeamSide.LEFT) {\n \t\tangle = angleToX();\n \t} else {\n \t\tangle = angleToNegX();\n \t}\n \tdouble amount = -0.7 * angle;\n\t\tDebug.log(\"Angle: %f, Rotating: %f\", angle, amount);\n\t\trotate(amount); // TODO: Test if works as expected\n\t\treturn amount;\n\t}",
"public float getXAngle(){\n Point project=new Point(0,accel.y,accel.z);\n\n float angl=(float)Math.asin(project.y / project.module())* PreferenceHelper.sensetivity;\n //float angl=(float)Math.acos(accel.z/accel.module())*100f;\n if(Float.isNaN(angl)) angl=0.5f;\n return (float)(Math.rint( toFlowX(angl)/1.0) * 1.0);\n }",
"double angMomentum();",
"private float calculateAngle() {\r\n\r\n\t\tdouble angleTemp = Math.atan2(Target.getY() - y, Target.getX() - x);\r\n\t\t// I needed to use wikipedia to get this i\r\n\t\t// did not learn this in math and needed\r\n\t\t// to use a couplle youtube tutorials to\r\n\t\t// find out how to do the math in java\r\n\t\t// aswell thank fully one had the exact\r\n\t\t// way of doing this\r\n\t\treturn (float) Math.toDegrees(angleTemp) + 90;\r\n\t}",
"public float calculateCelestialAngle(long par1, float par3)\n {\n return 0.5F;\n }",
"private double getAngleDisplacement(SkeletonNode root, int f) {\r\n\r\n\t\t/**------------------------------------------------------**/\r\n\t\tdouble ang = 0;\r\n\t\tint ang_counter = 0;\r\n\t\t/**------------------------------------------------------**/\r\n\t\t/**||||||||||||||||||||||||||||||||||||||||||||||||||||||**/\r\n\t\t/**------------------------------------------------------**/\r\n\t\tSkeletonNode parent =\troot.getParent();\r\n\t\tif(parent==null) return ang;\r\n\t\tString root_name = \t\troot.getName();\r\n\t\t/**------------------------------------------------------**/\r\n\t\t/**||||||||||||||||||||||||||||||||||||||||||||||||||||||**/\r\n\t\t/**------------------------------------------------------**/\r\n\t\tint group_size = ControlVariables.third_level_ang_filter_size;\r\n\t\tint group_size_half = (group_size/2)+(group_size % 2);\r\n\t\tint total_filter_size_i = (group_size_half*2) +\r\n\t\t\t\t(Math.min(f-group_size_half, 0)) +\r\n\t\t\t\t(Math.min(skeletonNodes.length - (f+group_size_half+1), 0));\r\n\t\t/**------------------------------------------------------**/\r\n\t\t/**||||||||||||||||||||||||||||||||||||||||||||||||||||||**/\r\n\t\t/**------------------------------------------------------**/\r\n\t\tfor(int j = f-group_size_half; j < f; j++) {\r\n\t\t\tif(j < 0) continue;\r\n\t\t\telse {\r\n\r\n\t\t\t\tSkeletonNode root_j_1 = skeletonWrappers[j+1].getFromHash(root_name);\r\n\t\t\t\tSkeletonNode parent_j_1 = root_j_1.getParent();\r\n\r\n\t\t\t\tSkeletonNode root_j = skeletonWrappers[j].getFromHash(root_name);\r\n\t\t\t\tSkeletonNode parent_j = root_j.getParent();\r\n\r\n\r\n\t\t\t\tdouble [] r_j = root_j.getPoint();\r\n\t\t\t\tdouble [] p_j = parent_j.getPoint();\r\n\r\n\t\t\t\tdouble [] r_j_1 = root_j_1.getPoint();\r\n\t\t\t\tdouble [] p_j_1 = parent_j_1.getPoint();\r\n\r\n\t\t\t\tdouble [] par_diff = VectorTools.sub(p_j, p_j_1);\r\n\t\t\t\tr_j_1 = VectorTools.add(par_diff, r_j_1);\r\n\r\n\t\t\t\tang += VectorTools.ang(r_j_1, p_j, r_j);\r\n\t\t\t\tang_counter++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t/**------------------------------------------------------**/\r\n\t\t/**||||||||||||||||||||||||||||||||||||||||||||||||||||||**/\r\n\t\t/**------------------------------------------------------**/\r\n\t\tfor(int j = f; j < f+group_size_half; j++) {\r\n\t\t\tif((j+1) >= skeletonWrappers.length) continue;\r\n\t\t\telse {\r\n\r\n\t\t\t\tSkeletonNode root_j_1 = skeletonWrappers[j+1].getFromHash(root_name);\r\n\t\t\t\tSkeletonNode parent_j_1 = root_j_1.getParent();\r\n\r\n\t\t\t\tSkeletonNode root_j = skeletonWrappers[j].getFromHash(root_name);\r\n\t\t\t\tSkeletonNode parent_j = root_j.getParent();\r\n\r\n\r\n\t\t\t\tdouble [] r_j = root_j.getPoint();\r\n\t\t\t\tdouble [] p_j = parent_j.getPoint();\r\n\r\n\t\t\t\tdouble [] r_j_1 = root_j_1.getPoint();\r\n\t\t\t\tdouble [] p_j_1 = parent_j_1.getPoint();\r\n\r\n\t\t\t\tdouble [] par_diff = VectorTools.sub(p_j, p_j_1);\r\n\t\t\t\tr_j_1 = VectorTools.add(par_diff, r_j_1);\r\n\r\n\t\t\t\tang += VectorTools.ang(r_j_1, p_j, r_j);\r\n\t\t\t\tang_counter++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t/**------------------------------------------------------**/\r\n\t\t/**||||||||||||||||||||||||||||||||||||||||||||||||||||||**/\r\n\t\t/**------------------------------------------------------**/\r\n\t\tif(total_filter_size_i != ang_counter) {\r\n\t\t\tSystem.out.println(total_filter_size_i);\r\n\t\t\tSystem.out.println(ang_counter);\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\treturn((1.0)/(ang_counter+0.0))*ang;\r\n\t\t/**------------------------------------------------------**/\r\n\t}",
"private double getDistance() {\n\t\tfinal double h2 = 86.7;\n\t\t// h1: height of top of camera\n\t\tfinal double h1 = 17.6;\n\n\t\t// a1: angle of camera (relative to chasis)\n\t\tfinal double a1 = 36.175;\n\t\t// a2: angle of target relative to a1\n\t\tfinal double a2 = ty.getDouble(0.0);\n\n\t\t// distance: distance from camera to base of target\n\t\tfinal double distance = ((h2 - h1) / Math.tan(Math.toRadians(a1 + a2)));\n\n\t\tfinal double d = Math.sqrt(Math.pow(h2 - h1, 2) + Math.pow(distance, 2));\n\t\tSmartDashboard.putNumber(\"Py Distance\", d);\n\n\t\treturn (distance);\n\n\t}",
"public double dlugoscOkregu() {\n\t\treturn 2 * Math.PI * promien;\n\t}",
"double getDegreesCoolingPerMBPerK();",
"public float perimetro(){\r\n return 2*(float)Math.PI*radio;\r\n }",
"private static double calculateSin(double dy, double distance) {\n if (distance > 0)\n return (dy) / distance;\n else\n return 0.0;\n }",
"private static double angulo(Point2D.Double p2,Point2D.Double p1){\n \t\n return Math.atan2(p2.x - p1.x, p2.y - p1.y);\n }",
"public double normalizeBearing( double angle )\n {\n while ( angle > 180 )\n {\n angle -= 360;\n }\n while ( angle < -180 )\n {\n angle += 360;\n }\n return angle;\n }",
"private double d(Point a, Point b){\n\t\treturn Math.sqrt(Math.pow(b.getX()-a.getX(),2) + Math.pow(a.getY() - b.getY(), 2));\r\n\t}",
"public void setAngle( double a ) { angle = a; }",
"public static double GetDistance(double lat1, double lon1, double lat2, double lon2) {\n double radLat1 = rad(lat1);\n double radLat2 = rad(lat2);\n double a = radLat1 - radLat2;\n double b = rad(lon1) - rad(lon2);\n double s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) +\n Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));\n s = s * EARTH_RADIUS;//km\n// Log.e(\"s\", \"s=\" + s);\n return s;\n }",
"double getPerimetro();",
"public double ang()\n {\n \treturn Math.atan(y/x);\n }",
"double normaliseBearing(double ang) {\r\n\t\tif (ang > PI)\r\n\t\t\tang -= 2 * PI;\r\n\t\tif (ang < -PI)\r\n\t\t\tang += 2 * PI;\r\n\t\treturn ang;\r\n\t}",
"private float angleFromSunToZenith(float solarTime, float solarDeclination, float latitude) {\r\n\t return (float)(\r\n \t\tMath.PI / 2 - \r\n \t\tMath.asin(\r\n\t\t\t\tMath.sin(latitude) * Math.sin(solarDeclination) - \r\n\t\t\t\tMath.cos(latitude) * Math.cos(solarDeclination) * Math.cos(Math.PI * solarTime / 12.0)\r\n \t\t)\r\n\t );\r\n\t}",
"public double getDistance() { \n\t\treturn Math.pow(input.getAverageVoltage(), exp) * mul; \n\t}",
"AngleSmaller createAngleSmaller();",
"public double getAngle();",
"public double calculateArcSine(double oppositeSide, double hypotenuseSide, String angleType);",
"private double calc_E(KeplerElements a) {\n\t\tdouble sqrome2 = Math.sqrt(1.0 - a.e * a.e);\r\n\t\tdouble cta = Math.cos(a.ta);\r\n\t\tdouble sta = Math.sin(a.ta);\r\n\t\tdouble sine0 = (sqrome2 * sta) / (1.0 + a.e * cta);\r\n\t\tdouble cose0 = (a.e + cta) / (1.0 + a.e * cta);\r\n\t\tdouble e0 = Math.atan2(sine0, cose0);\r\n\t\treturn e0;\r\n\r\n\t}",
"public double darDistancia( )\n {\n return distanciaMediaSol;\n }",
"@Override\n\tpublic float calculateCelestialAngle(long par1, float par3) {\n\t\treturn 2.0F;\n\t}",
"public double betweenAngle(Coordinates a, Coordinates b, Coordinates origin);",
"public double getMyAngle() {\n return myAngle- STARTING_ANGLE;\n }",
"private float normalize(float angle) {\n\t\tfloat a = angle;\n\t\twhile (a > 180)\n\t\t\ta -= 360;\n\t\twhile (a < -180)\n\t\t\ta += 360;\n\t\treturn a;\n\t}",
"public void calcularQuinA(){\n sueldoQuinAd = sueldoMensual /2;\n\n }",
"public double sacarDinero(double platita){\r\n if (getMonto() >= platita){\r\n setMonto(getMonto() - platita);\r\n return platita;\r\n }\r\n return 0;\r\n }",
"double adjust_angle_rotation(double angle) {\n double temp;\n temp=angle;\n if(temp>90) {\n temp=180-temp;\n }\n return temp;\n }",
"public double getAngle()\n {\n return (AngleAverage);\n }",
"private double getSatelliteSemiEyeWidth() {\r\n double ret = 0D;\r\n\r\n ret = Math.toDegrees(Math.acos(rhoE / rhoS));\r\n return ret;\r\n }",
"private long getDistanceFromSecondMark(){\n long numSecsElapsed = (long)Math.floor(timeElapsed / WorkoutStatic.ONE_SECOND);\n return timeElapsed - numSecsElapsed * WorkoutStatic.ONE_SECOND;\n }",
"public double getMatkojenKeskinopeus() {\n return getMatkojenpituus() / (getMatkojenkesto() / 60);\n }",
"public double smallerAngle(Point point) {\n \tVector vectorToPoint = vectorTo(point);\n \tdouble angleToBall = facingVector.angleDegrees(vectorToPoint);\n \tdouble unsignedAngle = Math.abs(angleToBall);\n \tdouble angleSign = Math.signum(angleToBall);\n \tif (unsignedAngle > 90) {\n \t\t// becomes -60 if it was 120\n \t\t// and 60 if it was -120\n \t\tangleToBall = -angleSign * (180 - unsignedAngle);\n \t}\n \treturn angleToBall;\n }",
"private void calcularDistanciaRecorrer(){\r\n\t\tfloat diferenciax = siguientePunto.x - posicion.x;\r\n\t\tfloat diferenciay = siguientePunto.y - posicion.y;\r\n\t\tdistanciaRecorrer = (float) Math.sqrt(diferenciax*diferenciax+diferenciay*diferenciay);\r\n\t}",
"public static int convertAngle(double angle) {\n // Using convertDistance method to calculate constant rotation of the robot + scaling\n return convertDistance((Math.PI * BASE_WIDTH * angle / 360.0) * 100) / 100;\n }",
"public double calculateTheta (double angleA, double angleB){\n\t\tif(LocalizationLab.fallingEdge == false){\n\t\t\tdeltaTheta = 37 - (0.5)*(angleA+angleB);\n\t\t}\n\t\telse{\n\t\t\tdeltaTheta = 220 - (0.5)*(angleA+angleB);\n\t\t}\n\t\treturn deltaTheta;\n\t}",
"public double calculateSine(double oppositeSide, double hypotenuseSide, String angleType);",
"@Override\r\n protected double getToleranceForAssertions(final double longitude, final double latitude) {\r\n final double delta = abs(longitude - centralMeridian)/2 +\r\n abs(latitude - latitudeOfOrigin);\r\n if (delta > 40) {\r\n return 0.5;\r\n }\r\n if (delta > 15) {\r\n return 0.1;\r\n }\r\n return super.getToleranceForAssertions(longitude, latitude);\r\n }",
"public double getAngle() { return angle; }",
"@Override\n\tdouble dienTich() {\n\t\tdouble p = chuVi() / 2;\n\t\treturn Math.sqrt(p*(p-canhA)*(p-canhB)*(p-canhC));\n\t}",
"public double getSecondAngle(){\r\n\t\treturn Math.atan( \r\n\t\t\t\t(\r\n\t\t\t\t\t\tthis.getSecondObject().getCenterY()\r\n\t\t\t\t\t\t- this.getFirstObject().getCenterY()\r\n\t\t\t\t)\r\n\t\t\t\t/ (\r\n\t\t\t\t\t\tthis.getSecondObject().getCenterX()\r\n\t\t\t\t\t\t- this.getFirstObject().getCenterX()\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t}",
"public double getCircumference()\r\n\t{\r\n\t\tdouble cir = 2*Math.PI*radius;\r\n\t\treturn cir;\r\n\t}",
"public double speed() {\n /* dx = sin(angle) * speed\n dy = cos(angle-180) * speed = -cos(angle)\n sqrt((dx)^2 + (-dy)^2 = sin(angle)^2*speed^2 + cos(angle)^2*speed^2)=\n sqrt(speed^2 *(cos(angle)^2+sin(angle)^2) = sqrt(speed^2*1)=speed\n */\n //distance math functions\n //to calculate the square root of the sum of squares of numbers passed to it as arguments.\n return Math.hypot(this.dx, this.dy);\n }",
"public double geltokiArtekoDistantzia(Geltokia gel) {\r\n\t\t\r\n\t\tdouble lurrarenRadioa = 6371;// kilometrotan Lurraren radioa\r\n\t\tdouble dLat = Math.toRadians(this.latitudea - gel.latitudea); \r\n\t\tdouble dLng = Math.toRadians(this.longitudea - gel.longitudea);\r\n\t\tdouble sindLat = Math.sin(dLat / 2);\r\n\t\tdouble sindLng = Math.sin(dLng / 2);\r\n\t\tdouble va1 = Math.pow(sindLat, 2)\r\n\t\t\t\t+ Math.pow(sindLng, 2) * Math.cos(Math.toRadians(this.latitudea)) * Math.cos(Math.toRadians(gel.latitudea));\r\n\t\tdouble va2 = 2 * Math.atan2(Math.sqrt(va1), Math.sqrt(1 - va1));\r\n\t\tdouble distancia = lurrarenRadioa * va2;\r\n\r\n\t\treturn distancia;\r\n\t}",
"double getDistance();",
"double getCalibratedLevelAngle();",
"AngleResource inclination();",
"public double getTheta(){\n return Math.atan(this.y / this.x);\n }",
"public static double rotation()\r\n\t{\r\n\t\treturn -(mxp.getAngle()/45);\r\n\t}",
"double normaliseHeading(double ang) {\r\n\t\tif (ang > 2 * PI)\r\n\t\t\tang -= 2 * PI;\r\n\t\tif (ang < 0)\r\n\t\t\tang += 2 * PI;\r\n\t\treturn ang;\r\n\t}",
"private float distance(double startLat, double startLon,\n double endLat, double endLon) {\n // Based on http://www.ngs.noaa.gov/PUBS_LIB/inverse.pdf\n // using the \"Inverse Formula\" (section 4)\n int MAXITERS = 20;\n // Convert lat/long to radians\n startLat *= Math.PI / 180.0;\n endLat *= Math.PI / 180.0;\n startLon *= Math.PI / 180.0;\n endLon *= Math.PI / 180.0;\n double a = 6378137.0; // WGS84 major axis\n double b = 6356752.3142; // WGS84 semi-major axis\n double f = (a - b) / a;\n double aSqMinusBSqOverBSq = (a * a - b * b) / (b * b);\n double L = endLon - startLon;\n double A = 0.0;\n double U1 = Math.atan((1.0 - f) * Math.tan(startLat));\n double U2 = Math.atan((1.0 - f) * Math.tan(endLat));\n double cosU1 = Math.cos(U1);\n double cosU2 = Math.cos(U2);\n double sinU1 = Math.sin(U1);\n double sinU2 = Math.sin(U2);\n double cosU1cosU2 = cosU1 * cosU2;\n double sinU1sinU2 = sinU1 * sinU2;\n double sigma = 0.0;\n double deltaSigma = 0.0;\n double cosSqAlpha = 0.0;\n double cos2SM = 0.0;\n double cosSigma = 0.0;\n double sinSigma = 0.0;\n double cosLambda = 0.0;\n double sinLambda = 0.0;\n double lambda = L; // initial guess\n for (int iter = 0; iter < MAXITERS; iter++) {\n double lambdaOrig = lambda;\n cosLambda = Math.cos(lambda);\n sinLambda = Math.sin(lambda);\n double t1 = cosU2 * sinLambda;\n double t2 = cosU1 * sinU2 - sinU1 * cosU2 * cosLambda;\n double sinSqSigma = t1 * t1 + t2 * t2; // (14)\n sinSigma = Math.sqrt(sinSqSigma);\n cosSigma = sinU1sinU2 + cosU1cosU2 * cosLambda; // (15)\n sigma = Math.atan2(sinSigma, cosSigma); // (16)\n double sinAlpha = (sinSigma == 0) ? 0.0 :\n cosU1cosU2 * sinLambda / sinSigma; // (17)\n cosSqAlpha = 1.0 - sinAlpha * sinAlpha;\n cos2SM = (cosSqAlpha == 0) ? 0.0 :\n cosSigma - 2.0 * sinU1sinU2 / cosSqAlpha; // (18)\n double uSquared = cosSqAlpha * aSqMinusBSqOverBSq; // defn\n A = 1 + (uSquared / 16384.0) * // (3)\n (4096.0 + uSquared *\n (-768 + uSquared * (320.0 - 175.0 * uSquared)));\n double B = (uSquared / 1024.0) * // (4)\n (256.0 + uSquared *\n (-128.0 + uSquared * (74.0 - 47.0 * uSquared)));\n double C = (f / 16.0) *\n cosSqAlpha *\n (4.0 + f * (4.0 - 3.0 * cosSqAlpha)); // (10)\n double cos2SMSq = cos2SM * cos2SM;\n deltaSigma = B * sinSigma * // (6)\n (cos2SM + (B / 4.0) *\n (cosSigma * (-1.0 + 2.0 * cos2SMSq) -\n (B / 6.0) * cos2SM *\n (-3.0 + 4.0 * sinSigma * sinSigma) *\n (-3.0 + 4.0 * cos2SMSq)));\n lambda = L +\n (1.0 - C) * f * sinAlpha *\n (sigma + C * sinSigma *\n (cos2SM + C * cosSigma *\n (-1.0 + 2.0 * cos2SM * cos2SM))); // (11)\n double delta = (lambda - lambdaOrig) / lambda;\n if (Math.abs(delta) < 1.0e-12) {\n break;\n }\n }\n float distance = (float) (b * A * (sigma - deltaSigma));\n return distance;\n }",
"double getAngle(int id);",
"public static double kmtoml(double km) {\n return km / mila;\n\n }",
"double distanceSq (double px, double py);",
"static double angle(PointDouble a, PointDouble o, PointDouble b) {\n Vec oa = vector(o, a), ob = vector(o, b);\n return Math.acos(dot(oa, ob) / (norm(oa) * norm(ob)));\n }",
"private double span(double a, double s) {\n\t\tdouble ay = f(a,s);\r\n\t\tLog.d(TAG, \"span: ay = \" + ay);\r\n\t\tdouble by;\r\n\t\tdouble k;\r\n\t\tif (ay > 0) {\r\n\t\t\tby = f(a+1,s);\r\n\t\t\tk = (by-ay);\r\n\t\t\tLog.d(TAG, \"span: ay > 0\");\r\n\t\t} else {\r\n\t\t\tby = f(a-1,s);\r\n\t\t\tk = (ay-by);\r\n\t\t\tLog.d(TAG, \"span: ay < 0\");\r\n\t\t}\r\n\t\tLog.d(TAG, \"span: by = \" + by);\r\n\t\tLog.d(TAG, \"span: k = \" + k);\r\n\t\tdouble b = a - 1.2/k*ay;\r\n\t\tif (b < Math.sqrt(-g*50)+1) {\r\n\t\t\tb = Math.ceil(Math.sqrt(-g*50)+1);\r\n\t\t}\r\n\t\tLog.d(TAG, \"span: b = \" + b);\r\n\t\tby = f(b,s);\r\n\t\tLog.d(TAG, \"span: by = \" + by);\r\n\t\tif (ay*by>0) {\r\n\t\t\tLog.d(TAG, \"span: ay*by > 0\");\r\n\t\t\tif (ay>0) {\r\n\t\t\t\tLog.d(TAG, \"span: ay > 0\");\r\n\t\t\t\treturn span(a+2,s);\r\n\t\t\t} else {\r\n\t\t\t\tLog.d(TAG, \"span: ay < 0\");\r\n\t\t\t\treturn span(a-2,s);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tLog.d(TAG, \"span: ay*by < 0\");\r\n\t\t\treturn iterator(a,b,ay,by, s);\r\n\t\t}\r\n\t}",
"public Double getMinParallacticAngle(boolean includeSetup) {\n initCircumstances();\n return getMin(continuousPa((includeSetup ? circV : circS).get(Circumstance.PARALLACTIC_ANGLE)));\n }",
"public abstract void steer(double angle);",
"private double distance (double lata, double lona, double latb, double lonb) { \r\n return Math.acos(Math.sin(lata)*Math.sin(latb)+Math.cos(lata)*Math.cos(latb)*Math.cos(lonb-lona))*6371;\r\n }",
"int calDeg(int u){\n int ans=0;\n for (int i=0;i<n;i++){\n ans+=a[u][i];\n }\n return ans;\n }",
"public double findAngle() {\n return 0d;\n }"
] | [
"0.63484377",
"0.62115693",
"0.6134753",
"0.6024838",
"0.6000445",
"0.59713167",
"0.59226555",
"0.5894545",
"0.5873095",
"0.5867177",
"0.5842787",
"0.58324504",
"0.57807666",
"0.5748205",
"0.57389265",
"0.56627053",
"0.56574565",
"0.56566876",
"0.5656226",
"0.56067616",
"0.5597618",
"0.55648005",
"0.5559985",
"0.5559985",
"0.554984",
"0.55477923",
"0.5536609",
"0.5521846",
"0.55093336",
"0.5505341",
"0.550116",
"0.54941225",
"0.5492996",
"0.54853475",
"0.5485074",
"0.54780525",
"0.54744714",
"0.54613394",
"0.5421052",
"0.5416753",
"0.5413598",
"0.54123485",
"0.5411073",
"0.5407383",
"0.5405183",
"0.54051673",
"0.5397496",
"0.53920394",
"0.53847563",
"0.53841937",
"0.538201",
"0.5380289",
"0.53795063",
"0.537425",
"0.5371094",
"0.53708607",
"0.53601694",
"0.5356492",
"0.53493834",
"0.53463143",
"0.5337564",
"0.53313035",
"0.5328329",
"0.53179425",
"0.5316071",
"0.53151405",
"0.53151137",
"0.53125393",
"0.53090036",
"0.5307399",
"0.5304698",
"0.5294108",
"0.5286332",
"0.5284039",
"0.5282246",
"0.5281961",
"0.5280563",
"0.5278183",
"0.5276646",
"0.5265749",
"0.52613384",
"0.5258686",
"0.52586335",
"0.5255771",
"0.525272",
"0.52495855",
"0.52453446",
"0.5238211",
"0.5238076",
"0.52295434",
"0.5226708",
"0.52262014",
"0.5222635",
"0.5221674",
"0.5215877",
"0.5205454",
"0.52052945",
"0.5200373",
"0.51962817",
"0.5194861"
] | 0.6789163 | 0 |
// convert the degree Tachocount in a distance(meter) | static public double convertTachoCountToDistance(double TachoCount) {
return TachoCount = (TachoCount * 0.5 * wheeldiameter * Math.PI / 180);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double convert(double distance, LengthUnit units)\r\n {\r\n return this.toMetersConversionFactor * distance /\r\n units.toMetersConversionFactor;\r\n }",
"public static double convertDistance(double distance) {\n // Compute and return the correct value (in degrees)\n return (360.0 * distance / (WHEEL_CIRC));\n }",
"public double convertDistance(double lat, double value){\n double earthRadius = 6378.137;\n double pi = Math.PI;\n double oneKMeter = (1/((2*pi/360)*earthRadius));\n\n return value * oneKMeter;\n }",
"public String getDistance(ExerciseEntry exerciseEntry){\n\n //get exerciseEntry distance\n double miles= exerciseEntry.getmDistance();\n\n //if its miles return Distance in Miles\n if(unitType.length()==5){\n return Integer.toString((int) miles )+\" Miles\";\n }\n //if unitType is Kilometers convert distance to kilometers and get String\n else{\n Double kilometers= miles*1.60934;\n return Integer.toString(kilometers.intValue())+\" Kilometers\";\n }\n }",
"private int convertProgressToMeters(int progress) {\n return progress * METERS_PER_PROGRESS;\n }",
"public static int convertDistance(double distance) {\n // Using arc length formula to calculate the distance + scaling\n return (int) ((180 * distance) / (Math.PI * WHEEL_RAD) * 100) / 100;\n }",
"public static double convertFromDegrees(double degreeMeasure, double countsPerRevolution) {\n return (countsPerRevolution / 360) * degreeMeasure;\n }",
"private static Double convertToMeters(Double Ins) {\n double meters;\n meters = Ins / 39.37;\n return meters;\n }",
"public float getTheDistance(){\n\t\t\n\t\tdistance = sonic.getDistance();\n\t\tSystem.out.println(\"value:\"+ distance);\n\t\t//considering the test results we see after 23 cm we see the +1cm precision and below 23cm we see + 5cm range \n\t\tif (distance<=25){\n\t\treturn (distance-7);\n\t\t}\n\t\telse{return (distance-3);}\n\t}",
"public static double distance(LatLng one, LatLng two, char unit) {\n double theta = one.longitude - two.longitude;\n double dist = Math.sin(deg2rad(one.latitude)) * Math.sin(deg2rad(two.latitude)) + Math.cos(deg2rad(one.latitude)) * Math.cos(deg2rad(two.latitude)) * Math.cos(deg2rad(theta));\n dist = Math.acos(dist);\n dist = rad2deg(dist);\n dist = dist * 60 * 1.1515;\n if (unit == 'K') {\n dist = dist * 1.609344;\n } else if (unit == 'N') {\n dist = dist * 0.8684;\n }\n return (dist);\n }",
"public double toMetersPerSecond(){\n\t\tdouble mps = mph * 1609.34/3600;\n\t\treturn mps;\n\t}",
"public static double lengthToDegrees(double distance, @TurfUnitCriteria String units) {\n return radiansToDegrees(lengthToRadians(distance, units));\n }",
"private String calculateDistancePerAmount() {\n double distance = parser(getTextFromEditText(R.id.distanceEdit));\n double fuel = parser(getTextFromEditText(R.id.fuelEdit));\n double value = distance / fuel;\n return rounder(value);\n }",
"public static double feetToMeters(double foot){\r\n\t\t\r\n\t\tdouble meter = 0.305 * foot;\r\n\t\t\r\n\t\treturn meter;\r\n\t}",
"public static double centiToMeter(double num) { return (num/Math.pow(10,2)); }",
"public static int convertDistance(double distance) {\n return (int) ((180.0 * distance) / (Math.PI * WHEEL_RAD));\n }",
"public static double convertmiTOkm (double mi) {\n\tdouble km=mi*1.60934;\n\treturn km;\n}",
"public static int calcDistance( GeocodingResult[] from, GeocodingResult[] to, String metric) {\n\n double latA = from[0].geometry.location.lat;\n double longA = from[0].geometry.location.lng;\n\n double latB = to[0].geometry.location.lat;\n double longB = to[0].geometry.location.lng;\n\n double theDistance = (Math.sin(Math.toRadians(latA)) *\n Math.sin(Math.toRadians(latB)) +\n Math.cos(Math.toRadians(latA)) *\n Math.cos(Math.toRadians(latB)) *\n Math.cos(Math.toRadians(longA - longB)));\n\n if (metric.charAt(0) == 'm') {\n return new Double((Math.toDegrees(Math.acos(theDistance))) * 69.09).intValue();\n }\n\n return new Double((Math.toDegrees(Math.acos(theDistance))) * 69.09 * 1.6093).intValue();\n\n }",
"public static double kmtoml(double km) {\n return km / mila;\n\n }",
"public void calculateDistance() {\n SensorEventListener mSensorEventListener = new SensorEventListener() {\n @Override\n public void onSensorChanged(SensorEvent sensorEvent) {\n mAngle = (Math.acos(sensorEvent.values[2] / 9.8)) * (180/Math.PI) - 5;\n mAngle = Math.toRadians(mAngle);\n mDistance = mHeight * Math.tan(mAngle);\n }\n\n @Override\n public void onAccuracyChanged(Sensor sensor, int i) {\n\n }\n };\n mSensorManager.registerListener(mSensorEventListener, mAccelerometer,\n SensorManager.SENSOR_DELAY_UI);\n\n // Calculating the distance.\n mDistance = mHeight * Math.tan(mAngle);\n // Rounding it up to 2 decimal places\n DecimalFormat df = new DecimalFormat(\"#.##\");\n mDistance = Double.valueOf(df.format(mDistance));\n String distanceString = Double.toString(mDistance);\n\n // Update the distance TextView\n TextView distanceView = (TextView) findViewById(R.id.distanceText);\n String text = distanceString + \" cm\";\n distanceView.setText(text);\n distanceView.setTextSize(36);\n }",
"private static int convertDistance(double radius, double distance) {\n \t\treturn (int) ((180.0 * distance) / (Math.PI * radius));\n \t}",
"public double getDistance(){\n return sensor.getVoltage()*100/2.54 - 12;\n }",
"double getDistance();",
"public static double meterToFoot(final double meter) {\n return meter / METERS_PER_FOOT;\n }",
"public static int readUsDistance() {\n usSensor.fetchSample(usData, 0);\n // extract from buffer, cast to int, and filter\n return filter((int) (usData[0] * 100.0));\n }",
"private static int convertDistance(double radius, double distance) {\n return (int) ((180.0 * distance) / (Math.PI * radius));\n }",
"@Override\n\tdouble dienTich() {\n\t\tdouble p = chuVi() / 2;\n\t\treturn Math.sqrt(p*(p-canhA)*(p-canhB)*(p-canhC));\n\t}",
"public static double footToMeter(final double foot) {\n return foot * METERS_PER_FOOT;\n }",
"public double getDistanceMoyenne() {\n\t\treturn getDistanceTotale () / 12;\n\t}",
"public static int toApproximateMeters(int microdegrees, int latitude){\n\t\treturn (int)((long)microdegrees * 11 / LONGITUDINAL_MULTIPLIER[latitude/1000000] );\n\t}",
"public float getDistance();",
"private static double distance(double lat1, double lon1, double lat2, double lon2, String unit) {\n double theta = lon1 - lon2;\n double dist = Math.sin(deg2rad(lat1)) * Math.sin(deg2rad(lat2)) + Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) * Math.cos(deg2rad(theta));\n dist = Math.acos(dist);\n dist = rad2deg(dist);\n dist = dist * 60 * 1.1515;\n if (unit.equals(\"K\")) {\n dist = dist * 1.609344;\n } else if (unit.equals(\"N\")) {\n dist = dist * 0.8684;\n }\n //default miles\n return (dist);\n }",
"private static double convertToDegree(String source) {\n String[] degMinSec = source.split(\",\");\n String[] degSrc = degMinSec[0].split(\"/\");\n String[] minSrc = degMinSec[1].split(\"/\");\n String[] secSrc = degMinSec[2].split(\"/\");\n\n double deg = Double.parseDouble(degSrc[0]) / Double.parseDouble(degSrc[1]);\n double min = Double.parseDouble(minSrc[0]) / Double.parseDouble(minSrc[1]);\n double sec = Double.parseDouble(secSrc[0]) / Double.parseDouble(secSrc[1]);\n\n return deg + (min / 60) + (sec / (60 * 60)); // Fold degrees, minutes and seconds together\n }",
"public double getDistance() {\n\t\t// miles = miles/hr * s / (s/hr)\n\t\treturn (double)speed/10.0 * duration / 3600.0;\n\t}",
"public int distanceInMeters (double degLon1, double degLat1\n , double degLon2, double degLat2) {\n\n double radLonDelta = Math.toRadians(degLon2-degLon1);\n double radLat1 = Math.toRadians(degLat1);\n double radLat2 = Math.toRadians(degLat2);\n\n double d = issAverageOrbit\n *Math.acos(Math.sin(radLat1)\n *Math.sin(radLat2)\n +Math.cos(radLat1)\n *Math.cos(radLat2)\n *Math.cos(radLonDelta));\n return (int) Math.round(d);\n }",
"private static int convertDistance(double radius, double distance) {\n\t\treturn (int) ((180.0 * distance) / (Math.PI * radius));\n\t}",
"double getDistanceInMiles();",
"double getDegreesCoolingPerMBPerK();",
"public int getTotDistance(){\r\n\t \treturn this.totDistance;\r\n\t }",
"public static double metersToFeet(double meter){\r\n\t\t\r\n\t\tdouble foot = Math.round((meter / 0.305)*1000.0)/1000.0;\r\n\t\t\r\n\t\treturn foot;\r\n\t}",
"public ArrayList<String> Distance(String from, float amount, String[] units) {\n\t\tfrom = findFrom(from);\n\t\tif (from.equals(\"meter\")) {\n\t\t\tArrayList<String> kaduvil = new ArrayList<String>();\n\t\t\tkaduvil.add(\"\" + amount + \" \" + units[0] );\n\t\t\tkaduvil.add(\"\" + amount / 1000 + \" \" + units[1] );\n\t\t\tkaduvil.add(\"\" + amount * 39.37007874 + \" \" + units[2] );\n\t\t\treturn kaduvil;\n\t\t} else {\n\t\t\tif (from.equals(\"inches\")) {\n\t\t\t\treturn Distance(\"meter\", amount / 39.37007874f, units);\n\t\t\t} else {\n\t\t\t\treturn Distance(\"meter\", amount * 1000, units);\n\t\t\t}\n\t\t}\n\t}",
"public int rawDistance() {\r\n\t\tus.fetchSample(usData, 0); // acquire data\r\n\t\tdistance=(int) (usData[0] * 100.0);// extract from buffer, cast to int and add to total\r\n\t\t\t\r\n\t\treturn distance; \r\n\t}",
"protected static float toMillimeters(int unit, float value) {\n \t\tswitch (unit) {\n \t\tcase CSSPrimitiveValue.CSS_CM:\n \t\t\treturn (value * 10);\n \t\tcase CSSPrimitiveValue.CSS_MM:\n \t\t\treturn value;\n \t\tcase CSSPrimitiveValue.CSS_IN:\n \t\t\treturn (value * 25.4f);\n \t\tcase CSSPrimitiveValue.CSS_PT:\n \t\t\treturn (value * 25.4f / 72);\n \t\tcase CSSPrimitiveValue.CSS_PC:\n \t\t\treturn (value * 25.4f / 6);\n \t\tdefault:\n \t\t\tthrow new DOMException(DOMException.INVALID_ACCESS_ERR, \"\");\n \t\t}\n \t}",
"private void changeDistance() {\n kilometers = sb.getProgress();\n TextView textView = (TextView) findViewById(R.id.distanceText);\n textView.setText(kilometers + \" km\");\n }",
"public int readDistance() {\r\n\t\tint newDistance=0;\r\n\t\tint filterCount = 0;\r\n\t\twhile(filterCount<US_FILTER) {\r\n\t\t\tus.fetchSample(usData, 0); // acquire data\r\n\t\t\tnewDistance=(int) (usData[0] * 100.0);// extract from buffer, cast to int and add to total\r\n\t\t\t\r\n\t\t\tif(newDistance<=distance+US_ERROR && newDistance>=distance-US_ERROR) {\r\n\t\t\t\tfilterCount++;\r\n\t\t\t}else {\r\n\t\t\t\tfilterCount=0;\r\n\t\t\t}\r\n\t\t\tdistance=newDistance;\r\n\t\t}\r\n\t\treturn distance; \r\n\t}",
"public double\ntValue(double distance)\n{\n\treturn (distance/this.length());\n}",
"public static Double distanceToSeconds(Double distance, Double speed){\n\t\t//speed = distance/time;\n\t\t//distance must be in meters.\n\t\t\n\t\tDouble time = 0.0;\n\t\tif (speed == 0.0){\n\t\t\tspeed = 1.3; // average walking speed\n\t\t}\n\t\ttime = distance/speed;\n\t\treturn time;\n\t}",
"public Double getDistanceByUnit(final DistanceUnit distanceUnit, final double distanceInKm);",
"private String getDistanceUnit(int distance) {\n switch (distance) {\n case DISTANCE_KM:\n return getResourceString(R.string.val_km);\n case DISTANCE_MILES:\n return getResourceString(R.string.val_m);\n }\n\n return \"\";\n }",
"private long getDistanceFromSecondMark(){\n long numSecsElapsed = (long)Math.floor(timeElapsed / WorkoutStatic.ONE_SECOND);\n return timeElapsed - numSecsElapsed * WorkoutStatic.ONE_SECOND;\n }",
"private double distance(double lat1, double lon1, double lat2, double lon2) {\n double theta = lon1 - lon2;\r\n double dist = Math.sin(deg2rad(lat1)) * Math.sin(deg2rad(lat2)) + Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) * Math.cos(deg2rad(theta));\r\n dist = Math.acos(dist);\r\n dist = rad2deg(dist);\r\n dist = dist * 60 * 1.1515;\r\n dist = dist * 1.609344;\r\n return (dist); // return distance in kilometers\r\n }",
"private float angleDistance(float from, float to) {\n float d = to - from;\n if (d > Math.PI) {\n return d - (float) Math.PI;\n }\n if (d < -Math.PI) {\n return d + (float) Math.PI;\n }\n return d;\n }",
"public double getDistanceTotale() {\n\t\treturn distanceTotale;\n\t}",
"private KilometersPerHour() {}",
"private static double getDistance(final WayNodeOSM a, final WayNodeOSM b) {\n \t\tdouble latA = a.getLatitude()/180*Math.PI;\n \t\tdouble latB = b.getLatitude()/180*Math.PI;\n \t\tdouble lonDif = (b.getLongitude() - a.getLongitude())/180*Math.PI;\n \t\treturn (Math.acos((Math.sin(latA) * Math.sin(latB)) + (Math.cos(latA) * Math.cos(latB) * Math.cos(lonDif))) * 6367500);\n \t}",
"public static void convert(\n final Distance input, final Distance output) {\n convert(input, output.getUnit(), output);\n }",
"public static double degreeToRadians(double num) { return (num*0.0174533); }",
"private long convertMahToDc(double powerMah) {\n return (long) (powerMah * 36 + 0.5);\n }",
"private int DirectionCalculation(int angle)\r\n\t{\t\r\n\t\treturn (int) ((angle/14.28)+1); //Angle divided by (100/(parts-1)) = 1-8\r\n\t}",
"private int obliczDowoz() {\n int x=this.klient.getX();\n int y=this.klient.getY();\n double odl=Math.sqrt((Math.pow((x-189),2))+(Math.pow((y-189),2)));\n int kilometry=(int)(odl*0.5); //50 gr za kilometr\n return kilometry;\n }",
"public static float kmToMiles(long steps){\n float miles;\n float distance = (float) (steps * 78) / (float) 100000;\n miles = (float) (distance / 1.609344);\n return miles;\n }",
"public double considerTransport(double convertFoodCarbonToTransportCarbon) {\n double transportMiles = convertFoodCarbonToTransportCarbon * 2.314;\n return transportMiles;\n }",
"private double distantziaKalkulatu() {\r\n\t\tdouble lurrarenRadioa = 6371;// kilometrotan Lurraren radioa\r\n\t\tdouble dLat = Math.toRadians(terLat - latitudea); //\r\n\t\tdouble dLng = Math.toRadians(termLong - longitudea);\r\n\t\tdouble sindLat = Math.sin(dLat / 2);\r\n\t\tdouble sindLng = Math.sin(dLng / 2);\r\n\t\tdouble va1 = Math.pow(sindLat, 2)\r\n\t\t\t\t+ Math.pow(sindLng, 2) * Math.cos(Math.toRadians(terLat)) * Math.cos(Math.toRadians(latitudea));\r\n\t\tdouble va2 = 2 * Math.atan2(Math.sqrt(va1), Math.sqrt(1 - va1));\r\n\t\tdouble distancia = lurrarenRadioa * va2;\r\n\r\n\t\treturn distancia;\r\n\t}",
"public static double inchesToMillimeters(double inches) {\n return inches * 25.4;\n }",
"public static long toMilesPerHour(double kilometersPerHour) {\n\t\t\tdouble milesPerHour = 0;\n\t\t\tlong output = 0;\n\t\t\tlong iPart;\n\t\t\tdouble fPart;\n\t\t\tif(kilometersPerHour < 0){\n\t\t\t\toutput = -1;\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(kilometersPerHour > 0){\n\t\t\t\tmilesPerHour = kilometersPerHour * 0.62137;\n\t\t\t\tiPart = (long) milesPerHour;\n\t\t\t\tfPart = milesPerHour - iPart;\n\t\t\t\tif(fPart > 0 && fPart < 0.5) {\n\t\t\t\t\toutput = iPart;\n\t\t\t\t}\n\t\t\t\telse if(fPart > 0.5 && fPart <= 0.99d){\n\t\t\t\t\toutput = iPart+1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t//System.out.println(kilometersPerHour + \" \" + output);\n\n\t\t\t\n\t\t\treturn output;\n\t\t}",
"public static double t2c(double t, double pathLength) {\n return -(Math.log(t / 100D) / pathLength);\n }",
"public static double centimeterToMeter(final double centimeter) {\n return centimeter * METERS_PER_CENTIMETER;\n }",
"public BigDecimal berechneDistanzInKilometer(//\n\t\t\tfinal MatchStandort standortVon, //\n\t\t\tfinal MatchStandort standortNach) {\n\t\treturn BigDecimal.valueOf(GeoCalc.kilometerBerechnen(standortVon, standortNach));\n\t}",
"public double distance(){\n return DistanceTraveled;\n }",
"public double teaspoonsToMilliliters(double teaspoons){\n return teaspoons * 4.92892;\n }",
"private int computingDistance(Human human) {\n\n double coefficient = 1;\n if (human instanceof AmbulanceTeam) {\n coefficient = 0.90;\n } else if (human instanceof PoliceForce) {\n coefficient = 0.95;\n } else if (human instanceof FireBrigade) {\n coefficient = 0.97;\n } else {//human is instance of Civilian\n coefficient = 1;\n }\n\n\n return (int) (coefficient * Util.distance(human.getPosition(worldInfo.getRawWorld()).getLocation(worldInfo.getRawWorld()), worldInfo.getLocation(agentInfo.me())));\n }",
"public static int calculateDistanceInKilometer(double srcLat, double srcLng,double dstLat, double dstLng) {\n double latDistance = Math.toRadians(srcLat - dstLat);\n double lngDistance = Math.toRadians(srcLng - dstLng);\n\n double a = Math.sin(latDistance / 2) * Math.sin(latDistance / 2)\n + Math.cos(Math.toRadians(srcLat)) * Math.cos(Math.toRadians(dstLat))\n * Math.sin(lngDistance / 2) * Math.sin(lngDistance / 2);\n\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n\n return (int) (Math.round(AVERAGE_RADIUS_OF_EARTH_KM * c));\n\t }",
"public static double inchToMeter(final double inch) {\n return inch * METERS_PER_INCH;\n }",
"public static double getKilometer(double number) {\n\t\tdouble asKilometer = 0;\n\n\t\tasKilometer = number * 1.6;\n\n\t\treturn asKilometer;\n\t}",
"public static double distanceInMeter(double lat1, double long1, double lat2, double long2) {\n\t\t// Compute difference of latitude, longitude and convert to radians\n\t\tdouble diffLat = Math.toRadians(lat2 - lat1);\n\t\tdouble diffLong = Math.toRadians(long2 - long1);\n\t\t\n\t\t// Convert single latitude values to radiant\n\t\tlat1 = Math.toRadians(lat1);\n\t\tlat2 = Math.toRadians(lat2);\n\t\t\n\t\tdouble diffLatSin = Math.sin(diffLat/2);\n\t\tdouble diffLongSin = Math.sin(diffLong/2);\n\t\t\n\t\tdouble a = \tdiffLatSin * diffLatSin +\n\t\t\t\t\tdiffLongSin * diffLongSin *\n\t\t\t\t\tMath.cos(lat1) * Math.cos(lat2);\n\t\t\n\t\tdouble greatCircleDistanceRad = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n\t\t\n\t\treturn EARTH_RADIUS * greatCircleDistanceRad;\n\t}",
"public static double getTuition(int degree, boolean time){\r\n //3&6\r\n double tuition = 0; \r\n if(degree == 1){\r\n tuition = 12462;\r\n }\r\n else if(degree == 2){\r\n tuition = 11354;\r\n }\r\n else if(degree == 3){ \r\n if(time){\r\n tuition = 25354;\r\n }\r\n else{\r\n tuition = 20660;\r\n }\r\n }\r\n else if(degree == 4){\r\n tuition = 35922;\r\n } \r\n else if(degree == 5){\r\n tuition = 26794;\r\n }\r\n else{ \r\n if(time){\r\n tuition = 40740;\r\n } \r\n else{\r\n tuition = 33298;\r\n }\r\n }\r\n return tuition;\r\n }",
"public static double meterToInch(final double meter) {\n return meter / METERS_PER_INCH;\n }",
"public static double getPossibilityDegree(int distance) {\r\n\t\treturn DELTAS[distance];\r\n\t}",
"public double convertTo(double fromMeasurement) {\n return fromMeasurement * factor;\n }",
"public float GetDistance(String sensor_name)\n {\n double distance = 0;\n // TODO List: read the value of the sonor sensor, and convert it to centimeter.\n if (sensor_name == str_sensor_door)\n {\n distance = sensor_door.getDistance(DistanceUnit.CM);\n RobotLog.vv(\"DoorDistanceToGlyph\", \"%4.1f\", distance);\n }\n else if (sensor_name == str_sensor_tray)\n {\n\n distance = sensor_tray.getDistance(DistanceUnit.CM);\n RobotLog.vv(\"TrayDistanceToGlyph\", \"%5.2f\", distance);\n }\n else\n {\n\n distance = sensor_sonar_front.getDistance();\n RobotLog.vv(\"SonarDistanceToGlyph\", \"%5.1f\", distance);\n }\n\n return (float) distance;\n }",
"private int degreeFromCoefficients(int numOfCoefficients) {\n return (int) (0.5*(-1 + (int)(Math.sqrt(1+8*numOfCoefficients))))-1;\n }",
"private static double convertBearingTo360(double dBearing){\n\t\t\n\t\t//dOut = output\n\t\t\n\t\tdouble dOut;\n\t\t\n\t\tdOut = dBearing;\n\t\t\n\t\twhile(dOut>360){\n\t\t\tdOut=dOut-360.;\n\t\t}\n\t\twhile(dOut<0){\n\t\t\tdOut=dOut+360.;\n\t\t}\n\t\t\n\t\treturn dOut;\n\t}",
"public static void main(String [] args){\n // input data\n int secsTrip1=480; //this displays the total seconds it took on the first trip\n int secsTrip2=3220; //this displays the total seconds it took on the second trip\n int countsTrip1=1561; //displays the rotation of trip1\n int countsTrip2=9037; //displays the rotation of trip2\n \n //These are constant variables (also for storing purposes)\n double wheelDiameter=27.0, //the wheel diameter has to be accounted for in the countsTrips\n PI=3.14159, //\n feetPerMile=5280, //recongize how many feet are in 1 mile\n inchesPerFoot=12, //recongize how many inches in 1 foot\n secondsPerMinute=60; //recognize how many sec in 1 min\n double distanceTrip1, distanceTrip2,totalDistance; \n // above recognize that the values of each will have multiple digits\n \n System.out.println(\"Trip 1 took \"+\n (secsTrip1/secondsPerMinute)+\" minutes and had \"+\n countsTrip1+\" counts.\");\n System.out.println(\"Trip 2 took \"+\n (secsTrip2/secondsPerMinute)+\" minutes and had \"+\n countsTrip2+\" counts.\");\n \n //Running the calculations and storing the values\n // I will be calculating the distance of trip 1 & 2 and the total distance\n distanceTrip1=countsTrip1*wheelDiameter*PI;\n // Above gives distance in inches\n //(for each count, a rotation of the wheel travels\n //the diameter in inches times PI)\n distanceTrip1/=inchesPerFoot*feetPerMile; // Converts to distance in miles\n distanceTrip2=countsTrip2*wheelDiameter*PI/inchesPerFoot/feetPerMile;\n totalDistance=distanceTrip1+distanceTrip2;\n System.out.println(\"Trip 1 was \"+distanceTrip1+\" miles\");\n System.out.println(\"Trip 2 was \"+distanceTrip2+\" miles\");\n System.out.println(\"The total distance was \"+totalDistance+\" miles\");\n \n \n }",
"public static void main(String[] args) {\n//The integers used in this program\n int secsTrip1 = 480; //initializes secsTrip1 480, which states the number of seconds of trip 1\n int secsTrip2 = 3220; //initializes secsTrip2 3220, which states the number of seconds of trip 2\n int countsTrip1 = 1561; //initializes countTrip1 1561, which states the number of counts of trip 1\n int countsTrip2 = 9037; //initializes countTrip2 9037, which states the number of count of trip 2\n \n //The operations used in this program \n double wheelDiameter = 27.0; //Initializes wheelDiameter as 27.0 \n double PI = 3.14159; // States Pi as a constant\n int feetPerMile = 5280; //States the conversion factor of feetPerMile\n int inchesPerFoot = 12; //States the conversion factor of inchesPerFoot\n int secondsPerMinute = 60; //States the conversion factor of secondsPerMinute\n double distanceTrip1, distanceTrip2, totalDistance; //Declares distanceTrip1, distanceTrip2, totalDistance as double\n \n //Outputs of the program\n //Prints out the time it took for trip 1 and the counts it had \n System.out.println(\"Trip 1 took \" + (secsTrip1/secondsPerMinute) + \" minutes and had \" + countsTrip1 + \" counts.\"); \n //Prints out the time it took for trip 1 and the counts it had\n System.out.println(\"Trip 2 took \" + (secsTrip2/secondsPerMinute) + \" minutes and had \" + countsTrip2 + \" counts.\");\n \n distanceTrip1 = countsTrip1 * wheelDiameter * PI; // Gives distance in inches\n distanceTrip1 /= inchesPerFoot * feetPerMile; // Gives distance in miles\n distanceTrip2 = countsTrip2 * wheelDiameter * PI / inchesPerFoot / feetPerMile;\n totalDistance = distanceTrip1 + distanceTrip2;\n\n //Print out the output data.\n System.out.println(\"Trip 1 was \"+distanceTrip1+\" miles\");\n System.out.println(\"Trip 2 was \"+distanceTrip2+\" miles\");\n System.out.println(\"The total distance was \"+totalDistance+\" miles\");\n\n\n\n}",
"public static double centiMetresPerSecondToMetrePerSecond(double num) { return (num/100); }",
"@Override\n\t\tpublic int getDegree(Direction direction) {\n\t\t\treturn 0;\n\t\t}",
"public double teaspoonsToMilligrams(double teaspoons){\n return teaspoons * 5687.50;\n }",
"public static int convertDistance(double radius, double distance) {\n return (int) ((180.0 * distance) / (Math.PI * radius));\n }",
"public Float toDegrees(String ref) {\n //EXIF data should is in DMS format, need to convert from DMS to degrees for Google Maps\n //Credit to http://android-er.blogspot.co.uk/2010/01/convert-exif-gps-info-to-degree-format.html\n\n if (ref.equals(null) || ref.equals(\"\")) {\n return 0.0f;\n }\n\n Float result = null;\n String[] DMS = ref.split(\",\", 3);\n\n String[] stringD = DMS[0].split(\"/\", 2);\n Double D0 = Double.valueOf(stringD[0]);\n Double D1 = Double.valueOf(stringD[1]);\n Double FloatD = D0 / D1;\n\n String[] stringM = DMS[1].split(\"/\", 2);\n Double M0 = Double.valueOf(stringM[0]);\n Double M1 = Double.valueOf(stringM[1]);\n Double FloatM = M0 / M1;\n\n String[] stringS = DMS[2].split(\"/\", 2);\n Double S0 = Double.valueOf(stringS[0]);\n Double S1 = Double.valueOf(stringS[1]);\n Double FloatS = S0 / S1;\n\n result = new Float(FloatD + (FloatM / 60) + (FloatS / 3600));\n\n return result;\n }",
"public static double millimetersToInches(double millimeters) {\n return millimeters / 25.4;\n }",
"public static double feetPerSecondToCentiMetresPerSecond(double num) { return (num*30.48); }",
"@Test\n public void getAmountDescription_total_distanceGoal_meterDistance() {\n Goal goal = new Goal(2, 49.572, GoalType.Walk, \"2018-09-28\", \"2017-01-12\",\n 0.77777);\n // Create the real and expected total amount descriptions\n description = goal.getAmountDescription(\"total\");\n expectedDescription = \"778 m\";\n\n // Check the 2 Strings are the same\n assertEquals(expectedDescription, description);\n }",
"public void calcDistance() {\n if (DataManager.INSTANCE.getLocation() != null && location.getLength() == 2) {\n Log.e(\"asdf\", DataManager.INSTANCE.getLocation().getLength() + \"\");\n Log.e(\"asdf\", DataManager.INSTANCE.getLocation().getLength() + \"\");\n double dLat = Math.toRadians(location.getLatitude() - DataManager.INSTANCE.getLocation().getLatitude()); // deg2rad below\n double dLon = Math.toRadians(location.getLongitude() - DataManager.INSTANCE.getLocation().getLongitude());\n double a =\n Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.cos(Math.toRadians(location.getLatitude()))\n * Math.cos(Math.toRadians(location.getLatitude()))\n * Math.sin(dLon / 2)\n * Math.sin(dLon / 2);\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n double d = KM_IN_RADIUS * c; // Distance in km\n distance = (float) d;\n } else distance = null;\n }",
"public static String printConversion(double kilometersPerHour) {\n\t\t\t// TODO Write an implementation for this method declaration\n\t\t\tString result;\n\t\t\tdouble milesPerHour;\n\t\t\tlong iPart;\n\t\t\tdouble fPart;\n\t\t\tlong output = 0;\n\t\t\tif(kilometersPerHour < 0) {\n\t\t\t\tresult = \"Invalid Value\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmilesPerHour = 0.62137 * kilometersPerHour;\n\t\t\t\tiPart = (long) milesPerHour;\n\t\t\t\tfPart = milesPerHour - iPart;\n\t\t\t\tif(fPart > 0 && fPart < 0.5) {\n\t\t\t\t\toutput = iPart;\n\t\t\t\t}\n\t\t\t\telse if(fPart > 0.5 && fPart <=0.99d) {\n\t\t\t\t\toutput = iPart+1;\n\t\t\t\t}\n\t\t\t\tresult = Double.toString(kilometersPerHour) + \" km/h\" + \" = \" + Long.toString(output) + \" mi/h\";\t\t\t\t\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}",
"static long convertMahToDeciCoulombs(double powerMah) {\n return (long) (powerMah * (10 * 3600 / 1000) + 0.5);\n }",
"public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n\n double convertNum = 1.6;\n\n System.out.println(\"Give me distance number in kilometer please!\");\n\n int userInput = sc.nextInt();\n\n System.out.println(\"The distance is: \" + (userInput*convertNum));\n }",
"public double convertFrom(double toMeasurement) {\n return toMeasurement / factor;\n }",
"public float getMetric(){\n float distance = 0.0f;\n MeasurementService.DataPoint prv = center;\n\n for(MeasurementService.DataPoint d : list){\n distance += Math.sqrt(\n Math.pow(prv.getX() - d.getX(),2) +\n Math.pow(prv.getY() - d.getY(),2)\n );\n prv = d;\n }\n\n return distance;\n }",
"private float matchingDegree(OntologyResult match) {\n switch (match) {\n case Exact:\n return 1.0f;\n case Subsumption:\n return 0.8f;\n case PlugIn:\n return 0.6f;\n case Structural:\n return 0.5f;\n case NotMatched:\n return 0.0f;\n default:\n return 0.0f;\n }\n }",
"public double convert(double amount, Unit u);"
] | [
"0.61445814",
"0.6046331",
"0.59753346",
"0.5869201",
"0.5860325",
"0.5839431",
"0.583359",
"0.57515764",
"0.5719355",
"0.57024145",
"0.5638899",
"0.5626807",
"0.5619123",
"0.5618446",
"0.56113815",
"0.55989546",
"0.5587361",
"0.5528625",
"0.5490346",
"0.5458368",
"0.5456091",
"0.544351",
"0.5433349",
"0.5427606",
"0.5413403",
"0.54090965",
"0.54022497",
"0.537612",
"0.5374013",
"0.5351161",
"0.533263",
"0.5332443",
"0.53250116",
"0.5321807",
"0.5316062",
"0.53149384",
"0.5313495",
"0.53036904",
"0.52791536",
"0.52699995",
"0.5248921",
"0.52478087",
"0.52344435",
"0.52244985",
"0.52179563",
"0.52095586",
"0.52055526",
"0.51971966",
"0.518769",
"0.5182349",
"0.518072",
"0.5176818",
"0.5176707",
"0.51698524",
"0.5166108",
"0.5156937",
"0.51490253",
"0.5145839",
"0.51399624",
"0.5136072",
"0.51320463",
"0.51282895",
"0.51245433",
"0.5115048",
"0.5115039",
"0.51145715",
"0.51144016",
"0.51140356",
"0.50920033",
"0.509129",
"0.50887066",
"0.50867355",
"0.508645",
"0.50811",
"0.5078825",
"0.5076281",
"0.5073717",
"0.5054826",
"0.50509155",
"0.50485295",
"0.5046671",
"0.5031027",
"0.50306374",
"0.5027436",
"0.5022452",
"0.499812",
"0.49905652",
"0.49897352",
"0.4988742",
"0.49885476",
"0.49878666",
"0.49865556",
"0.49837846",
"0.49817502",
"0.4977321",
"0.4976718",
"0.4975209",
"0.496743",
"0.49636897",
"0.49626252"
] | 0.7229476 | 0 |
Lee un caracter desde la consogit la return msj El mensaje a mostrar | public static char leerCaracter() {
char letra = sc.nextLine().charAt(0); // Lee una cadena y obtiene el primer caracter
return letra;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public String getMessage() {\n String chuoi=\"\";\n if (maCD.length()!=5)\n chuoi=\"MaCD bao gom 5 ki tu\";\n else if (soBaiHat<10)\n chuoi=\"So bai hat phai lon hon 10 bai\";\n return\n chuoi;\n }",
"private String pedirCasilla(String mensaje) {\n char columna;\n int fila;\n String casilla;\n do {\n casilla = ManejoInfo.getTextoSimple(\"la casilla \" + mensaje);\n columna = casilla.charAt(0);\n fila = Character.getNumericValue(casilla.charAt(1));\n if (!validarColum(columna) && fila >= 9) {\n System.out.println(\"\\nIngrese una casilla valida!\\n\");\n }\n } while (!validarColum(columna) && fila >= 9);\n return casilla;\n }",
"private String quitarCaracteresNoImprimibles(String mensaje) {\n String newMensaje = \"\";\n int codigoLetra = 0;\n for (char letra : mensaje.toCharArray()) {\n codigoLetra = (int) letra;\n if (codigoLetra >= 32 && codigoLetra <= 128) {\n newMensaje += letra;\n }\n }\n return newMensaje;\n }",
"public static void mesajiSenVer(String mesaj){\n System.out.println(mesaj);\n }",
"public String procesarMensaje(String mensaje) {\n int max = 95;//numero maximo de caracteres por mensaje\n String strMenAux = mensaje;\n\n strMenAux = eliminarEspaciosMayoresA1(strMenAux);\n strMenAux = eliminarEspaciosInicialesFinales(strMenAux);\n\n strMenAux = quitarCaracteresNoImprimibles(strMenAux);\n\n int intLonMensaje = strMenAux.length();\n\n if (intLonMensaje <= max) {\n return strMenAux;\n } else {\n strMenAux = limitarTamanoMensaje(mensaje, max);\n return strMenAux;\n }\n }",
"public static String lerInformacaoString(Scanner sc, String msg) {\n\t\t//moste msg\n\t\tSystem.out.println(msg);\n\t\t//entrada recebe a msg\n\t\tString entrada = sc.nextLine();\n\t\treturn entrada;\n\t}",
"public String comunica() {\r\n// ritorna una stringa\r\n// posso usare il metodo astratto \r\n return msg + AggiungiQualcosa();\r\n }",
"String sayHI(String msg){\n return msg + \"juga nama saya\" + this.nama;\n }",
"void prosegui(String messaggio);",
"void stampaMessaggio(String messaggio);",
"private String limitarTamanoMensaje(String mensaje, int max) {\n int lon = mensaje.length();\n String strTexto = \"\";\n if (lon > max) {\n for (int i = 0; i < max; i++) {\n strTexto += mensaje.charAt(i);\n }\n } else {\n strTexto = mensaje;\n }\n return strTexto;\n }",
"String[] chiediScommessa();",
"public String enviaSMS(String mensagem)\r\n\t{\r\n\t\treturn mensagem;\r\n\t}",
"@Override\n\tpublic boolean verificarMensaje(String mensaje) {\n\t\tboolean reenvio = false;\n\t\tSystem.out.println(mensaje.length());\n\t\tSystem.out.println(\"Mensaje recibido: \"+ mensaje);\n\t\tString lectura = mensaje.substring(0, 12);\n\t\tSystem.out.println(\"Inicio de trama: \"+lectura);\n\t\tif (lectura.equals(inicioTrama)) {\n\t\t\tlectura = mensaje.substring(12, 14);\n\t\t\tSystem.out.println(\"Tpo de trama: \"+lectura);\n\t\t\tif (lectura.equals(\"01\")) {\n\t\t\t\treenvio = tipoTrama01(mensaje);\n\t\t\t}\n\t\t}\n\t\treturn reenvio;\n\t}",
"public void afficherMessage () {\r\n System.out.println(\"(\"+valeur+\", \"+type+\")\"); \r\n }",
"java.lang.String getMsg();",
"@Override\n\tpublic String printMes() throws RemoteException{\n\t\tString mes=\"welcome you!\";\n\t\treturn mes;\n\t}",
"public static String lireMessageAuClavier() throws IOException {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString messa = sc.nextLine();\n\t\treturn messa;\n\t}",
"public String getMessage(){\n return saisieMessage.getText();\n }",
"public void writeMassege() {\n m = ChatClient.message;\n jtaChatHistory.setText(\"You : \" + m);\n //writeMassageServer();\n }",
"void message(){\n\t\tSystem.out.println(\"Hello dude as e dey go \\\\ we go see for that side\");\n\t\tSystem.out.print (\" \\\"So it is what it is\\\" \");\n\n\t}",
"private String message() {\r\n if (markers.size() == 0) return \"\";\r\n String s = \"expecting \";\r\n boolean first = true;\r\n for (Marker m : markers) {\r\n if (! first) s = s + \", \";\r\n first = false;\r\n s = s + m.toString().toLowerCase().replaceAll(\"_\",\" \");\r\n }\r\n return s;\r\n }",
"@Override\n public String comer(String c)\n {\n c=\"Gato No puede Comer Nada\" ;\n \n return c;\n }",
"private String SuppressionMot(String Mot, String Texte) throws InterruptedException {\n\t\tboolean trouve = false;\n\t\tString newCh =\"\";\n\t\tint i =0;\n\t\tif(Texte.equalsIgnoreCase(Mot)) { \t// Recherche dans le message si le mot est présent. \n\t\t\tnewCh=Texte.replaceAll(Mot, \"**\");\t// Remplace le mot par un espace. \n\t\t\ttrouve= true;\n\t\t} else {\n\t\t\tnewCh = Texte;\t//Sinon, on remplace la nouvelle chaîne de caractères par l'ancienne. \n\t\t}\n\t\treturn newCh;\t//Retourne la nouvelle chaîne de caractère modifiée ou pas. \n\t}",
"private String getMessageDaide(){\n\t\tString message;\n\t\tmessage = \"Bonjour et bienvenue dans votre application de Gestion de l'amortissement.\\n\\n\" +\n\t\t\"Pour pouvoir generer un tableau d'amortissement il vous faudra connaitre au\\nminimum \" +\n\t\t\"3 valeurs coherentes les unes avec les autres parmis : \\n\" +\n\t\t\" - le montant emprunte\\n\" +\n\t\t\" - le taux d'emprunt\\n\" +\n\t\t\" - la duree du remboursement\\n\" +\n\t\t\" - l'annuitee maximale\\n\\n\" +\n\t\t\"Cependant, si vous souhaitez generer un tableau a partir de 4 valeurs, \\ncelles-ci devront\" +\n\t\t\" etre strictement exactes, au risque de produire une erreur.\\n\\n\" +\n\t\t\"Veuillez ensuite saisir vos valeurs ainsi que le type de remboursement \\nqui vous \" +\n\t\t\"convient puis cliquez sur valider pour generer le tableau \\nd'amortissement, ainsi que la \" +\n\t\t\"valeur inconnue si vous n'en aviez saisi que 3.\\n\\n\" +\n\t\t\"Vous avez de plus la possibilite d'exporter votre tableau d'amortissement au \\nformat Excel (.xls)\" +\n\t\t\"grace au bouton Export.\";\n\t\treturn message;\n\t}",
"private void greenord(String m) {\n\n\t\tSystem.out.println(\"Course name is\"+m);\n\t}",
"public void choixduJeu() {\n afficheMessage(\"*- Choisissez le jeu auquel vous voulez jouer : \\n- R pour Recherche +/-\\n- M pour Mastermind\");\n choixJeu = Console.saisieListeDeChoix(\"R|M\");\n afficheMessage(\"*- Choisissez le mode de jeu auquel vous voulez jouer :\\n- C pour Challenger,\\n- U pour Duel\\n- D pour Defense\");\n choixModeJeu = Console.saisieListeDeChoix(\"C|U|D\");\n }",
"private String eliminarEspaciosMayoresA1(String mensaje) {\n //Elimina todos los espacios mayores a 1 que se encuentren dentro del mensaje\n Pattern patron = Pattern.compile(\"[ ]+\");\n Matcher encaja = patron.matcher(mensaje);\n String resultado = encaja.replaceAll(\" \");\n return resultado;\n }",
"public String selectMessage() {\r\n\r\n\t\tswitch (choice) {\r\n\t\tcase 1: {\r\n\t\t\treturn \"Stimat(a) \" + invoice.getClient().getName() + \" \" + invoice.getClient().getSurname()\r\n\t\t\t\t\t+ \"\\nFactura dvs. la \" + invoice.getSupplier().getFirmName() + \" a fost emisa.\" + \"\\nAveti de plata \"\r\n\t\t\t\t\t+ invoice.getTotalValue() + \" RON, pana in data de \" + new SimpleDateFormat(\"dd.MM.yyyy\").format(invoice.getMaturityDate()) + \"\\n\\nVa multumim !\";\r\n\t\t}\r\n\t\tcase 2: {\r\n\t\t\treturn \"Stimat(a) \" + invoice.getClient().getName() + \" \" + invoice.getClient().getSurname()\r\n\t\t\t\t\t+ \"\\nFactura dvs. la \" + invoice.getSupplier().getFirmName() + \" a fost emisa.\"\r\n\t\t\t\t\t+ \"\\nFactura a fost platita. S-au extras \" + invoice.getTotalValue() + \" RON din contul dvs.\"\r\n\t\t\t\t\t+ \"\\n\\nVa multumim !\";\r\n\t\t}\r\n\t\tcase 3: {\r\n\t\t\treturn \"Stimat(a) \" + invoice.getClient().getName() + \" \" + invoice.getClient().getSurname()\r\n\t\t\t\t\t+ \"\\nAveti de plata 3 facturi restante la\" + invoice.getSupplier().getFirmName()\r\n\t\t\t\t\t+ \"\\nFurnizorul a oprit furnizarea de servicii pana platiti una dintre cele 3 facturi restante\\n\\nVa multumim !\";\r\n\t\t}\r\n\t\tcase 4: {\r\n\t\t\treturn \"Stimat(a) \" + invoice.getClient().getName() + \" \" + invoice.getClient().getSurname()\r\n\t\t\t\t\t+ \"\\nFactura dvs. din data de \"+new SimpleDateFormat(\"dd.MM.yyyy\").format(invoice.getReleaseDate())+\" a fost platita. S-au extras \" + invoice.getTotalValue() + \" RON din contul dvs.\"\r\n\t\t\t\t\t+ \"\\n\\nVa multumim !\";\r\n\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"private String encodageMot(String message) {\n if (message == null || message.equals(\"\")) {\n throw new AssertionError(\"Texte non saisie\");\n } \n return transformWords(message, 1); \n }",
"public abstract String mensajeEliminarCelula(int f, int c);",
"static void MichelMethod() {\n String CSI = \"\\u001B[\";\n System.out.print(CSI + \"32\" + \"m\");\n\n System.out.println(\"This is the group U calculator.\");\n System.out.println(\"Thanks for your preference!\");\n System.out.println(CSI + \"m\");\n\n }",
"public void mensagemErro(String m) {\r\n Alert alerta = new Alert(Alert.AlertType.ERROR);\r\n alerta.setTitle(\"ERRO!\");\r\n alerta.setHeaderText(null);\r\n alerta.setContentText(m);\r\n alerta.showAndWait();\r\n }",
"public void verificarMensagem(String m){\r\n\t\tboolean verificaM =\tmensagem.getText().equals(m);\r\n\t\tAssert.assertTrue(verificaM);\r\n\t\tlogPrint(\"Mensagem apareceu\");\r\n\t}",
"private String decodageMot(String message) {\n if (message == null || message.equals(\"\")) {\n throw new AssertionError(\"Texte non saisie\");\n } \n return transformWords(message, 2);\n }",
"public static void main (String []args){\n\t\t\n\t\tString hola =\"RV SIGUIENTE MENSAJE\";\n\t\tint num = hola.indexOf(\"RV\");\n\t\tif (hola.indexOf(\"RV\")!=-1){\n\t\t\tSystem.out.println(\"CONTIENE RV\");\n\n\t\t}else{\n\t\t\tSystem.out.println(\"NO CONTIENE RV\");\n\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}",
"private void showMessage(String string) {\n\n }",
"private static void ecrire (char car)\r\n\t{\n\t\tif (car >= ' ')\r\n\t\t{\r\n\t\t\tSystem.out.println (\"Caractere : \" + car );\r\n\t\t}\r\n\t\t// Sinon si c'est un caractere de controle, on affiche son code ascci\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println (\"Controle : code \" + (int) car);\r\n\t\t}\r\n\t}",
"public void displayMessage(String m){\n\t\tJOptionPane.showMessageDialog(null, m, \"Perfect !\", JOptionPane.INFORMATION_MESSAGE);\n\t}",
"public void enviarMensagem(String mensagem) {\n //Painel.COMPUTADOR_TRANSMISSOR.limparTextoCamadas();//Limpando texto do Computador Transmissor\n //Painel.COMPUTADOR_RECEPTOR.limparTextoCamadas();//Limpando texto do Computador Receptor\n\n //Painel.COMPUTADOR_TRANSMISSOR.limparTela();//Limpando texto da Tela\n //Painel.COMPUTADOR_RECEPTOR.limparTela();//Limpando texto da Tela\n\n //this.id_temporizador = 1;\n //this.idQuadroEsperado = 1;\n //MeioDeComunicacao.inicarTransmissao();\n\n adicionarMensagem(\"Msg Enviada: \" + mensagem);//Adiciona a mensagem enviada no Computador Transmissor\n\n aplicacaoTransmissora.aplicacaoTransmissora(mensagem);//Enviando a mensagem para aplicacao transmissora\n }",
"public void Makan()\n\t{\n\tSystem.out.println(\"Harimau Makan Daging dan minum susu\");\n\tSystem.out.println();\n\t}",
"public void receberMensagem(String msg);",
"public String getMessage() {\n\t//TODO fix the removing of the color char one a move\n\t\tString message = this.message.substring(position, Math.min(this.message.length(), (width - 2) + position));\n\t\tchar COLORCHAR = '&';\n\t\tif (message.charAt(0) == COLORCHAR) {\n\t\t\tcolor = ChatColor.getByChar(message.charAt(1));\n\t\t} else {\n\t\t\tmessage = message.substring(1);\n\t\t\tmessage = \"\" + color + message;\n\t\t}\n\n\t\tif (message.charAt(message.length() - 1) == COLORCHAR) {\n\t\t\tmessage = message.substring(0, message.length() - 2);\n\t\t\tmessage = message + \" \";\n\t\t}\n\t\treturn message;\n\n\t}",
"public void showMsg(String str);",
"public String getMsgcont() {\n return msgcont;\n }",
"@Override\n\tpublic void smile() {\n\t\tSystem.out.println(\"黄种人-笑\");\n\t}",
"private static String getOutputMsg(String line){\n String[] arr = line.split(\" \");\n return arr[0] + \"|\" + arr[3].replace(\"[\",\"\");\n }",
"@Override\n\tpublic String maju() {\n\t\tif (gigiMasuk) {\n\t\t\treturn super.maju();\n\t\t}else {\n\t\t\treturn \"..............\";\n\t\t}\n\t}",
"public boolean hide(String m) {\n int maxPix = currentIm.getRows() * currentIm.getCols();\n \n \n if(m.length() > 999999 || m.length() <= 0 || m.length() > maxPix || m.length()+3 > maxPix+3){\n //Set message to nnn as No.\n for(int ii = 0; ii < 4; ii = ii + 1){\n int rgb= currentIm.getPixel(0, ii);\n double red= DM.getRed(rgb);\n double blue= DM.getBlue(rgb);\n double green= DM.getGreen(rgb);\n int alpha= DM.getAlpha(rgb);\n \n //Covert values to char\n int charValue = (int)'n';\n int msgChar1 = charValue/100;\n \n int msgChar2 = 0;\n if(charValue > 99){\n msgChar2 = (charValue-100)/10;\n }else{\n msgChar2 = (charValue)/10;\n }\n \n int msgChar3 = charValue%10;\n \n \n //Check the current values versus the upper limit which is 255 and then reduce by 10 where\n //appropriate and set the end values to zero.\n red = readyPixel(red);\n blue = readyPixel(blue);\n green = readyPixel(green);\n \n //Actually hide the characters now.\n red = red + msgChar1;\n green = green + msgChar2;\n blue = blue + msgChar3;\n \n currentIm.setPixel(0, ii,\n (alpha << 24) | ((int)red << 16) | ((int)green << 8) | \n (int)blue);\n }\n return false;\n }else{\n //Encode That A Message Is Present\n //Use yyy as Yes.\n for(int ii = 0; ii < 3; ii = ii + 1){\n int rgb= currentIm.getPixel(0, ii);\n double red= DM.getRed(rgb);\n double blue= DM.getBlue(rgb);\n double green= DM.getGreen(rgb);\n int alpha= DM.getAlpha(rgb);\n \n //Covert values to char\n int charValue = (int)'y';\n int msgChar1 = charValue/100;\n \n int msgChar2 = 0;\n if(charValue > 99){\n msgChar2 = (charValue-100)/10;\n }else{\n msgChar2 = (charValue)/10;\n }\n \n int msgChar3 = charValue%10;\n \n \n //Check the current values versus the upper limit which is 255 and then reduce by 10 where\n //appropriate and set the end values to zero.\n red = readyPixel(red);\n blue = readyPixel(blue);\n green = readyPixel(green);\n \n //Actually hide the characters now.\n red = red + msgChar1;\n green = green + msgChar2;\n blue = blue + msgChar3;\n \n currentIm.setPixel(0, ii,\n (alpha << 24) | ((int)red << 16) | ((int)green << 8) | \n (int)blue);\n }\n \n //Loop through the entire message and encode it.\n for(int ii = 3; ii < (3+m.length()); ii = ii + 1){\n \n int rgb= currentIm.getPixel(0, ii);\n double red= DM.getRed(rgb);\n double blue= DM.getBlue(rgb);\n double green= DM.getGreen(rgb);\n int alpha= DM.getAlpha(rgb);\n \n //Check the current values versus the upper limit which is 255 and then reduce by 10 where\n //appropriate and set the end values to zero.\n red = readyPixel(red);\n blue = readyPixel(blue);\n green = readyPixel(green);\n \n if(ii < 3 + m.length()){\n //Covert values to char\n int charValue = (int)(m.charAt(ii-3));\n int msgChar1 = charValue/100;\n \n int msgChar2 = 0;\n if(charValue > 99){\n msgChar2 = (charValue-100)/10;\n }else{\n msgChar2 = (charValue)/10;\n }\n \n int msgChar3 = charValue%10;\n \n //Actually hide the characters now.\n red = red + msgChar1;\n green = green + msgChar2;\n blue = blue + msgChar3;\n \n currentIm.setPixel(ii,\n (alpha << 24) | ((int)red << 16) | ((int)green << 8) | \n (int)blue);\n }\n }\n \n //Insert the terminal values '~'\n for(int ii = (3+m.length()); ii < ((3+m.length())+1); ii = ii +1){\n int rgb= currentIm.getPixel(0, ii);\n double red= DM.getRed(rgb);\n double blue= DM.getBlue(rgb);\n double green= DM.getGreen(rgb);\n int alpha= DM.getAlpha(rgb);\n \n //Check the current values versus the upper limit which is 255 and then reduce by 10 where\n //appropriate and set the end values to zero.\n red = readyPixel(red);\n blue = readyPixel(blue);\n green = readyPixel(green);\n \n if(ii == (3+m.length())){\n int charValue = (int)'~';\n int msgChar1 = charValue/100;\n \n int msgChar2 = 0;\n if(charValue > 99){\n msgChar2 = (charValue-100)/10;\n }else{\n msgChar2 = (charValue)/10;\n }\n \n int msgChar3 = charValue%10;\n \n red = red + msgChar1;\n green = green + msgChar2;\n blue = blue + msgChar3;\n \n currentIm.setPixel(ii,\n (alpha << 24) | ((int)red << 16) | ((int)green << 8) | \n (int)blue);\n }\n \n \n }//Next FOR \n }//Close Else\n return true;\n }",
"public String getTxt_marca() {\r\n\t\treturn txt_marca.getText();\r\n\t}",
"public void exibeMensagem(String mensagem) {\n JOptionPane.showMessageDialog(null, mensagem);\n }",
"@Override\n public void escreverMensagem(String mensagem) {\n chat.appendText(mensagem);\n }",
"@Override\n\tpublic void message() {\n\t\tSystem.out.println(\"스마트폰으로 문자하기\");\n\t}",
"private void mostrarMensagemDeErro(String informacao) {\n\t\tJOptionPane.showMessageDialog(null, informacao, \"Aten��o\",\n\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\n\t}",
"@Override\r\n\tpublic String sonido() {\n\t\treturn \"Miauu\";\r\n\t}",
"private String repMessageCharacter() {\n\t\tString temp = \"\";\n\t\tString interpret = \"\";\n\t\tint messL = message.length();\n\t\tint polyL = polybius.length;\n\t\tint polyR = polybius[0].length;\n\t\tif(this.key != \"\") {\n\t\t\timpArray = new String[messL];\n\t\t\tfor(int i = 0; i < messL; i++) {\n\t\t\t\ttemp = \"\" + message.charAt(i);\n\t\t\t\tfor(int j = 0; j < polyL;j++) {\n\t\t\t\t\tfor(int k = 0; k < polyR; k++) {\n\t\t\t\t\t\tif(temp.equalsIgnoreCase(polybius[j][k])) {\n\t\t\t\t\t\t\timpArray[i] = columnRowIndex(j,k);\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\tfor(int i = 0; i < message.length(); i++) {\n\t\t\t\tinterpret += impArray[i];\n\t\t\t}\n\t\t}else {\n\t\t\tinterpret = \"\";\n\t\t}\n\t\t//System.out.println(interpret);\n\t\treturn interpret;\n\t}",
"public String getMes() {\n\t\treturn mes;\n\t}",
"public String getMessage(int i){\n\t\treturn this.listePlayer.get(i).toString()+\" is in cell \"+this.index+\", \"+this.listePlayer.get(i).toString()\n\t\t+\" throws \"+dice+\", reaches cell \" +this.consequence(this.diceGet());\t\n\t}",
"private void exibe_mensagem(String msg){\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();\n }",
"@Override\n public String getMessage() {\n return \" ** I'm a friendly ENEMY! **\";\n }",
"public abstract String mensajeCrearCelula();",
"public void m() {\n String str;\n d a2 = d.a((Context) this);\n int c2 = a2.c();\n String d2 = a2.d();\n if (c2 > 0 && !TextUtils.isEmpty(d2)) {\n a2.a();\n this.f6131d.setVisibility(0);\n if (c2 > 1) {\n str = getString(R.string.recently_reject_message, new Object[]{d2, Integer.valueOf(c2)});\n } else {\n str = getString(R.string.recently_reject_message_one, new Object[]{d2});\n }\n this.e.setText(str);\n }\n }",
"@Override\n\tpublic void envia(String mensagem) {\n\t\tSystem.out.println(\"Mensagem enviada por SMS\");\n\t\tSystem.out.println(mensagem);\n\t}",
"private String geraMensagem(Mensagem msg) {\n\t\treturn new StringBuilder()\n\t\t\t.append(msg.remetente.nome)\n\t\t\t.append(\" enviou para \")\n\t\t\t.append(msg.destinatario.nome)\n\t\t\t.append(\" uma mensagem suspeita.\")\n\t\t\t.toString();\n\t}",
"private void MensajeInf(String strMensaje){\n javax.swing.JOptionPane obj =new javax.swing.JOptionPane();\n String strTit;\n strTit=\"Mensaje del sistema Zafiro\";\n obj.showMessageDialog(this,strMensaje,strTit,javax.swing.JOptionPane.INFORMATION_MESSAGE);\n }",
"public String getMessage()\r\n/* 22: */ {\r\n/* 23:23 */ return this.a.a();\r\n/* 24: */ }",
"private String getMessage(){\n\t\t\treturn textArea.getText();\n\t}",
"String getMessage();",
"String getMessage();",
"String getMessage();",
"public String returnMessage () {\n String msg = getString(R.string.result, score);\n if (score > 7) {\n msg += \"\\n\" + getString(R.string.fabulous);\n }\n else if (score >= 5 && score <= 7) {\n msg += \"\\n\" + getString(R.string.good_job);\n }\n else {\n msg += \"\\n\" + getString(R.string.try_again);\n }\n return msg;\n }",
"void msgDisplay(String s);",
"public void writeMessage(String s) {\n isActive = true;\n start = System.currentTimeMillis();\n message = s;\n\n //attempt at typing effect for text\n final Animation animation = new Transition() {\n {\n setCycleDuration(Duration.millis(duration / 2 * 1000));\n }\n\n @Override\n protected void interpolate(double frac) {\n final int lenght = message.length();\n final int n = Math.round(lenght * (float) frac);\n printMessage = message.substring(0, n);\n }\n };\n animation.play();\n }",
"private void txt_observacionesKeyTyped(java.awt.event.KeyEvent evt) {\n if (txt_observaciones.getText().length()>= 500){\n\n evt.consume();\n JOptionPane.showMessageDialog(rootPane,\"Alcanzo el maximo de caracteres (500 caracteres)\");\n }\n }",
"public String reveal() { \n String message = \"\";\n \n if(verifyMessagePresence()){\n for(int ii = 3; ii < terminalLocation(); ii = ii + 1){\n message = message + (char)(getHidden(ii));\n }\n }else{\n return null;\n }\n return message;\n }",
"public void Jomijoma()\n {\n System.out.println(\"Ami dadar jomi joma paya geci\");\n }",
"private void showMsg1(String string) { TODO Auto-generated method stub\n//\n }",
"private void showMsg1(String string) { TODO Auto-generated method stub\n//\n }",
"public String pedirDato(String mensaje) \r\n\t{\r\n\t\treturn (JOptionPane.showInputDialog(null, mensaje,\"Elija una opcion\",JOptionPane.INFORMATION_MESSAGE));\r\n\t}",
"public String getMensaje()\r\n/* 633: */ {\r\n/* 634:710 */ return this.mensaje;\r\n/* 635: */ }",
"@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di cuocere il pollo\";\r\n }",
"@Test\n\t\t\tpublic void checkAlphanumeric() {\n\t\t\t\tMessage msgjunit = new Message();\n\t\t\t\tString msg = msgjunit.getMessage();\n\n\t\t\t\tif (msg != null) {\n\t\t\t\t\tmsg = msg;\n\t\t\t\t} else {\n\t\t\t\t\tmsg = \"This is a message\";\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tInteger.parseInt(msg);\n\t\t\t\t\tSystem.out.println(\"Message is a not string:\" + \" \" + msg );\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\tSystem.out.println(\"Message is a string:\" + \" \" + msg);\n\t\t\t\t}\n\t\t\t}",
"private String getMsgCmd/* */(String msg) {\n return msg.substring(0); // NO SUB... for now :)\n }",
"@Override\r\n\tpublic void falar(String mensagem) {\r\n\t\tSystem.out.println(\"[ \"+getNome()+\" ] \"+mensagem);\r\n\t}",
"public void exibirMsgs() {\n StringBuilder s = new StringBuilder();\n for (MensagemSistema msgSis : mensagens) {\n switch (msgSis.getTipo()) {\n case ConstantsControl.MSG_ALERT:\n s.append(\"[Alerta]: \\n\").append(msgSis.getMsg()).append(\"\\n\");\n break;\n case ConstantsControl.MSG_INFO:\n s.append(\"[Informação]: \\n\").append(msgSis.getMsg()).append(\"\\n\");\n break;\n case ConstantsControl.MSG_ERRO:\n s.append(\"[Erro]: \\n\").append(msgSis.getMsg()).append(\"\\n\");\n break;\n case ConstantsControl.MSG_SUCESSO:\n s.append(\"[Sucesso]: \\n\").append(msgSis.getMsg()).append(\"\\n\");\n break;\n }\n\n }\n JMessageUtil.showMensagensSistema(new javax.swing.JFrame(), s.toString());\n mensagens.clear();\n }",
"@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di friggere un uovo\";\r\n }",
"public void maximo(java.awt.event.KeyEvent evt, int tamanio, String txt){\n if (txt.length()== tamanio){\r\n evt.consume();\r\n JOptionPane.showMessageDialog(null,\"¡Sólo puede ingresar \"+ tamanio +\" carácteres!\",\"Mensaje del Sistema\",JOptionPane.ERROR_MESSAGE);\r\n }\r\n }",
"@Override\n\tpublic String getText() {\n\t\treturn \"MMS: \" + text;\n\t}",
"static int type_of_mvi(String passed){\n\t\tif(passed.charAt(4)!='M')\n\t\t\treturn 1;\n\t\telse if(general_registers.contains(passed.charAt(4)))\n\t\t\treturn 2;\n\t\telse\n\t\t\treturn 0;\n\t}",
"public void mostrarJet(){\r\n \r\n System.out.println(\"clase hija jet de vehiculo con motor \");\r\n System.out.println(\"LA CANTIDAD DE MOTORES ES : \" + this.cantidaddeMotores);\r\n\r\n\r\n System.out.println(\"***************************************************\");\r\n System.out.println(\"*************H**E**R**E**D**A**********************\");\r\n System.out.println(\"|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|\");\r\n }",
"private void mostrarMensaje(final String mensajeAMostrar) {\n //mostrar el mensaje del subproceso de ejecucion despachador de eventos\n SwingUtilities.invokeLater(\n new Runnable() {//clase interna para asegurar que la giu se actualice apropiadamente\n public void run()//actualiza areaPantalla \n {\n areaPantalla.append(mensajeAMostrar);\n areaPantalla.setCaretPosition(\n areaPantalla.getText().length());\n\n }\n }//fin de la clase interna\n );//fin de la llamada a SwingUtilities.invokeLater\n }",
"public void letras() {\n caracteres = 32 - txtMensaje.getText().length(); //Indica la catidad de carcteres\n //disponibles. En el LCD solo se permite imprimir 32 caracteres.\n\n if (caracteres <= 0) { //Si la cantidad de caracteres se ha agotado... \n lbCaracteres.setText(\"Caracteres disponibles: 0\"); //Se imprime que la cantidad de \n //caracteres disponibles es 0\n String cadena = \"\"; //Se declara la variable que guardará el mensaje a enviar\n cadena = txtMensaje.getText(); //Se asigna el texto del TextField a la variable cadena\n cadena = cadena.substring(0, 32); //Se evita que por alguna razón la variable contenga\n //más de 32 caracteres, utilizando el substring que crea un string a partir de uno mayor.\n txtMensaje.setText(cadena); //se regresa la cadena con 32 caracteres al TextField\n } else {\n //Si la cantidad de caracteres disponibles es ayor a 0 solamente se imprimirá la cantidad\n //de caracteres disponibles\n lbCaracteres.setText(\"Caracteres disponibles: \" + (caracteres));\n }\n }",
"private void muestraResultado(float vimc, String msg){\n //Mensaje en notificacion de Toast\n // Toast.makeText(this, vimc+ msg, Toast.LENGTH_SHORT).show();\n\n //Mensaje con alert\n AlertDialog.Builder vent = new AlertDialog.Builder(this);\n //Modificar las propiedades del de vent\n vent.setTitle(\"Resultado\");\n String cad = String.valueOf(vimc);\n vent.setMessage(\"IMC: \" + vimc+\"\\n\"+msg);\n //Crear boton de modal\n vent.setPositiveButton(\"Aceptar\", null);\n //Crear modal\n vent.create();\n //Mostarr en la poantalla\n vent.show();\n txtA.setText(null);\n txtP.setText(null);\n }",
"public static void main(String[] args) {\n\t\tString p = \"Sim\";\n\t\tdo {\n\t\t\tp = JOptionPane.showInputDialog(\"Você gostaria de receber uma mensagem?\");\n\t\t\t\n\t\t\tif(p.equals(\"Não\")) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Vai, diz que sim :(\");\n\t\t\t}else {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Feliz Natal,\\n que o Menino Jesus possa nascer \\n na manjedoura do coração de cada um ^^ \\n By: Valdeci Junior @_junior_dev\");\n//\t\t\t\tJOptionPane.showMessageDialog(null, \"By: Valdeci Junior @_junior_dev\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}while(p.equals(\"Não\"));\n\t\t\n\t\t\n\n\t}",
"@Override\n public void printMessage(String msg) {\n if (msg.contains(\"Turno di :\")) {\n inTurno = false;\n for (boolean b : pawnEnabled) {\n b = true;\n }\n }\n final String msgapp = editString(msg);\n Platform.runLater(() -> {\n if (textArea != null) {\n textArea.appendText(msgapp + \"\\n\");\n }\n });\n\n }",
"public void sendMessage() {\n String userMessage = textMessage.getText();\n if (!userMessage.isBlank()) {//проверяю а есть ли что то в текстовом поле\n textMessage.clear();//очищаю текстовое поле на форме\n\n //пока оставлю\n //sb.append(userMessage).append(\"\\n\");\n\n //в общее поле добавляю сообщение\n areaMessage.appendText(userMessage+\"\\n\");\n }\n\n }",
"public static void main(String[] args) {\n String matriz = \"ABCDEFGHIJLMNOPQRSTUVWXYZ\";\n Ejercicio1 c = new Ejercicio1();\n String retorno;\n String mensaje = JOptionPane.showInputDialog(\"Digite el mensaje\");\n// Convierte el mensaje a mayusculas\n mensaje = mensaje.toUpperCase();\n c.llenaMatriz(matriz);\n retorno = c.aTap(mensaje);\n JOptionPane.showMessageDialog(null, retorno);\n\n //Fin de la Primera parte del examen\n /*\n Inicio de la Segunda parte del examen\n */\n /*\n String[] lista = {\" auto \", \" pato \", \" palo \", \" poto \", \" amar \", \" amor \",\n \" loca \", \" loco \", \" polo \", \" poco \", \" poca \", \" rota \", \" roto \"};\n AdminPalabras admin = new AdminPalabras( lista );\n String[] letras = {\" escalopa \", \" automotor\", \" percatado\"};\n for(int i = 0; i < letras . length ; i ++) {\n int cont = admin .ContarPalabrasPosibles(letras [i ]);\n JOptionPane.showMessageDialog(null,letras [i] + \": \" + cont );\n }*/\n //Fin de la Segunda parte del Examen\n }",
"public void afficherMessage();",
"private String getTurnMessage(){\n if (board.turn ==0)\n return \"Black's turn\";\n else\n return \"White's turn\";\n }",
"static String cetak_nama1() {\n return \"Nama Saya : Aprianto\";\r\n }"
] | [
"0.66816014",
"0.6443745",
"0.637836",
"0.62368685",
"0.6171196",
"0.6126997",
"0.6117686",
"0.59909534",
"0.58885616",
"0.58645934",
"0.582383",
"0.58147365",
"0.5768514",
"0.5767425",
"0.5760013",
"0.570838",
"0.56966746",
"0.5681898",
"0.56803554",
"0.5626486",
"0.5625666",
"0.56170505",
"0.5598375",
"0.55898714",
"0.55843323",
"0.5575175",
"0.55666536",
"0.5561871",
"0.5553413",
"0.55456185",
"0.55329865",
"0.5526353",
"0.5522125",
"0.5513227",
"0.5510302",
"0.5506977",
"0.5505835",
"0.55017525",
"0.5501076",
"0.5492673",
"0.54871005",
"0.5482151",
"0.5471866",
"0.5468082",
"0.5466775",
"0.5462984",
"0.5460083",
"0.54575825",
"0.5454474",
"0.54476273",
"0.54473937",
"0.54397",
"0.5430053",
"0.5427058",
"0.5423344",
"0.54185766",
"0.5411883",
"0.54065156",
"0.5394377",
"0.5385854",
"0.53801817",
"0.5380166",
"0.53759617",
"0.5375644",
"0.5373055",
"0.53720546",
"0.53701156",
"0.5363159",
"0.5363159",
"0.5363159",
"0.5359202",
"0.53440064",
"0.53405327",
"0.53384864",
"0.5329844",
"0.5325842",
"0.53181523",
"0.53181523",
"0.5314057",
"0.53097063",
"0.53091586",
"0.5296782",
"0.52948457",
"0.52945364",
"0.52940273",
"0.5292146",
"0.5291786",
"0.52851415",
"0.5283324",
"0.52780235",
"0.5275024",
"0.52691036",
"0.5267379",
"0.52634114",
"0.52550787",
"0.52540845",
"0.52510554",
"0.52483904",
"0.52453774",
"0.52367735"
] | 0.5431981 | 52 |
Lee un entero desde la consola | public static int leerEntero() {
int entero = Integer.parseInt(sc.nextLine()); // Lee una cadena y convierte a entero
return entero;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void txt_montoKeyReleased(java.awt.event.KeyEvent evt) {\n if (evt.getKeyCode()==KeyEvent.VK_ENTER){\n insertarRubro();\n } \n }",
"private void teclouEnter() {\n //menu principal\n if (this.getFocusOwner() == listaMenuPrincipal) {\n if (listaMenuPrincipal.getSelectedIndex() == 0 || listaMenuPrincipal.getSelectedIndex() == 1) {\n LoginGerenteSupervisor janelaLoginGerenteSupervisor = new LoginGerenteSupervisor(this, true);\n janelaLoginGerenteSupervisor.setLocationRelativeTo(null);\n janelaLoginGerenteSupervisor.setVisible(true);\n //supervisor\n if (listaMenuPrincipal.getSelectedIndex() == 0) {\n if (janelaLoginGerenteSupervisor.loginSupervisor(true)) {\n panelSubMenu.setVisible(true);\n ((CardLayout) panelCard.getLayout()).show(panelCard, \"cardSupervisor\");\n listaSubMenuSupervisor.requestFocus();\n listaSubMenuSupervisor.setSelectedIndex(0);\n }\n }\n //gerente\n if (listaMenuPrincipal.getSelectedIndex() == 1) {\n if (janelaLoginGerenteSupervisor.loginGerente(true)) {\n panelSubMenu.setVisible(true);\n ((CardLayout) panelCard.getLayout()).show(panelCard, \"cardGerente\");\n listaSubMenuGerente.requestFocus();\n listaSubMenuGerente.setSelectedIndex(0);\n }\n }\n }\n //saida temporaria\n if (listaMenuPrincipal.getSelectedIndex() == 2) {\n if ((SessaoUsuario.statusCaixa == SC_ABERTO)) {\n int escolha = JOptionPane.showOptionDialog(this, \"Deseja fechar o caixa temporariamente?\", \"Pergunta do Sistema\",\n JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE,\n null, opcoesResposta, null);\n if (escolha == JOptionPane.YES_OPTION) {\n try {\n NfceControllerGenerico<NfceMovimentoVO> movimentoController = new NfceControllerGenerico<>();\n SessaoUsuario.movimento.setStatusMovimento(\"T\");\n SessaoUsuario.usuario = null;\n movimentoController.atualizar(SessaoUsuario.movimento);\n\n telaPadrao();\n\n MovimentoAberto ma = new MovimentoAberto(this, true);\n ma.setLocationRelativeTo(null);\n ma.setVisible(true);\n telaPadrao();\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(this, \"Erro ao registrar a saída temporária.\\n\" + ex.getMessage(), \"Aviso do Sistema\", JOptionPane.ERROR_MESSAGE);\n }\n }\n } else {\n JOptionPane.showMessageDialog(this, \"Status do caixa não permite saída temporária.\", \"Aviso do Sistema\", JOptionPane.WARNING_MESSAGE);\n }\n }\n }\n //menu principal - submenu supervisor\n if (this.getFocusOwner() == listaSubMenuSupervisor) {\n //inicia movimento\n if (listaSubMenuSupervisor.getSelectedIndex() == 0) {\n iniciaMovimento();\n }\n //encerra movimento\n if (listaSubMenuSupervisor.getSelectedIndex() == 1) {\n encerraMovimento();\n }\n //suprimento\n if (listaSubMenuSupervisor.getSelectedIndex() == 3) {\n suprimento();\n }\n //sangria\n if (listaSubMenuSupervisor.getSelectedIndex() == 4) {\n sangria();\n }\n\n }\n //menu principal - submenu gerente\n if (this.getFocusOwner() == listaSubMenuGerente) {\n //inicia movimento\n if (listaSubMenuGerente.getSelectedIndex() == 0) {\n iniciaMovimento();\n }\n //encerra movimento\n if (listaSubMenuGerente.getSelectedIndex() == 1) {\n encerraMovimento();\n }\n //suprimento\n if (listaSubMenuGerente.getSelectedIndex() == 3) {\n suprimento();\n }\n //sangria\n if (listaSubMenuGerente.getSelectedIndex() == 4) {\n sangria();\n }\n }\n //menu operacoes\n if (this.getFocusOwner() == listaMenuOperacoes) {\n //carrega dav\n if (listaMenuOperacoes.getSelectedIndex() == 0) {\n if (SessaoUsuario.statusCaixa == SC_ABERTO) {\n CarregaOrcamento janelaCarregaOrcamento = new CarregaOrcamento(this, true);\n janelaCarregaOrcamento.setLocationRelativeTo(null);\n janelaCarregaOrcamento.setVisible(true);\n if (!janelaCarregaOrcamento.cancelado) {\n dav = janelaCarregaOrcamento.getOrcamento();\n if (dav != null) {\n fechaMenuOperacoes();\n try {\n carregaDAV();\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, \"Erro ao carregar o orçamento.\\n\" + e.getMessage(), \"Erro do Sistema\", JOptionPane.ERROR_MESSAGE);\n }\n }\n }\n } else {\n JOptionPane.showMessageDialog(this, \"Já existe uma venda em andamento.\", \"Aviso do Sistema\", JOptionPane.INFORMATION_MESSAGE);\n }\n }\n\n //seleciona certificado digital\n if (listaMenuOperacoes.getSelectedIndex() == 1) {\n if (SessaoUsuario.statusCaixa != SC_VENDA_EM_ANDAMENTO) {\n selecionaCertificado();\n } else {\n JOptionPane.showMessageDialog(this, \"Existe uma venda em andamento.\", \"Aviso do Sistema\", JOptionPane.INFORMATION_MESSAGE);\n }\n }\n\n //consulta status serviço\n if (listaMenuOperacoes.getSelectedIndex() == 2) {\n SessaoUsuario.statusServico();\n }\n\n }\n }",
"void redirectToEnterKey();",
"@Override\r\n\tpublic void enter() {\n\t\t\r\n\t}",
"private final static void pulsaEnter() {\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"\\nPulsa Enter para continuar...\");\n\t\tkb.nextLine();\n\t}",
"@Override\r\n public void handle(KeyEvent ke){\n if (ke.getCode().equals(KeyCode.ENTER) || ke.getCode().equals(KeyCode.TAB)){ \r\n //Valida que el evento se haya generado en el campo de busqueda\r\n if(((Node)ke.getSource()).getId().equals(\"tf_buscar\")){ \r\n //Solicita los datos y envia la Respuesta a imprimirse en la Pantalla\r\n Datos.setLog_cguias(new log_CGuias()); \r\n boolean boo = Ln.getInstance().check_log_CGuias_caja(tf_buscar.getText()); \r\n numGuias = 0;\r\n if(boo){\r\n Datos.setRep_log_cguias(Ln.getInstance().find_log_CGuias(tf_buscar.getText(), \"\", \"ncaja\", Integer.parseInt(rows)));\r\n loadTable(Datos.getRep_log_cguias()); \r\n }\r\n else{\r\n change_im_val(0, im_checkg); \r\n Gui.getInstance().showMessage(\"El Nro. Guia NO existe en la \" + ScreenName, \"A\");\r\n tf_nroguia.requestFocus();\r\n }\r\n tf_buscar.setVisible(false); //establece el textField como oculto al finalizar\r\n }\r\n }\r\n }",
"public void enter();",
"@Override\n public void actionPerformed(ActionEvent e) { // Acionado qnd aperta ENTER\n String string = \"\";\n // Fechar janela de login\n setVisible(false);\n\n String usuario = textField.getText();\n String senha = passwordField.getText();\n\n // Usuário pressionou ENTER no JTextField textField[0]\n if (e.getSource() == textField || e.getSource() == passwordField) {\n if (usuario.equals(\"Daniel\")) {\n if (senha.equals(\"Daniel21\")) {\n JOptionPane.showMessageDialog(null, \"Entrou no sistema!\", \"Usuário: \" + usuario,\n JOptionPane.INFORMATION_MESSAGE);\n } else {\n JOptionPane.showMessageDialog(null, \"Senha Incorreta!\", \"ERRO\", JOptionPane.ERROR_MESSAGE);\n }\n } else {\n JOptionPane.showMessageDialog(null, \"Usuário Inválido!\", \"ERRO\", JOptionPane.ERROR_MESSAGE);\n }\n }\n\n // mostrar janela de login\n setVisible(true);\n }",
"@FXML\r\n void enterPressed(KeyEvent event) {\r\n if(event.getCode() == KeyCode.ENTER){//sprawdzenie czy wcisinieto enter\r\n connectSerialPort();//wywolanie wyzej zdefiniowanej metody - nawiaza polaczenie + otworzenie okna glownego aplikacji\r\n }\r\n }",
"@Override\n public void keyPressed(KeyEvent e) {\n if (e.getSource().equals(txtMensaje)\n && e.getKeyCode() == KeyEvent.VK_ENTER\n && !txtMensaje.getText().trim().isEmpty()) {\n hiloCliente.enviarMensajeChat(txtMensaje.getText().trim());\n txtMensaje.setText(\"\");\n }\n }",
"public void keyPressed (KeyEvent tecla){\n presionada=tecla.getKeyCode(); //Así se guarda la tecla 'presionada'\n if(presionada== KeyEvent.VK_ESCAPE){\n System.exit(0);\n }else if(tecla.isControlDown()&&presionada==KeyEvent.VK_H){ //isControlDown() es muy útil para combinaciones con CTRL\n JOptionPane.showMessageDialog(null,\"Lo sentimos. Sin usuario y/o contraseña deberás ponerte en contanto con el administrador del sistema\",\"\",1); \n }else if (presionada== KeyEvent.VK_ENTER){\n validateLogin();\n }\n }",
"public static void enterToContinue()\r\n\t{\r\n\t\tScanner keyboard = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Press enter to continue the game : \");\r\n\t\tkeyboard.nextLine();\r\n\t}",
"public static void letra(){\n\t\tScanner sc=new Scanner(System.in);\n\t\tchar letra;\n\t\tSystem.out.println(\"Introduzca una letra: \");\n\t\tletra=sc.next().charAt(0);\n\t\t\n\t\tswitch(letra){\n\t\t\tcase 'a': case 'A':\n\t\t\tcase 'e':case 'E':\n\t\t\tcase 'i':case'I':\n\t\t\tcase 'o': case'O':\n\t\t\tcase'u': case 'U':\n\t\t\t\tSystem.out.println(\"Es una vocal\");\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Es una consonante.\");\n\t\t}\n\t\t\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\r\n\t\t\t\tif (e.getKeyCode()==e.VK_ENTER) {\r\n\t\t\t\t\ttfPreco.requestFocus();\r\n\t\t\t\t}\r\n\t\t\t}",
"public void menu(){\n System.out.println(\"---------------------------Login------------------------------------\");\n \n System.out.println(\"Usuario:\");\n respuesta = scanner.nextLine();\n System.out.println(\"Contraseña:\");\n respuesta2 = scanner.nextLine();\n Usuario user = new Usuario();\n user.setNombre(respuesta);\n user.setPassword(respuesta2);\n idUser=modelo.validarUsuario(user);\n if(idUser<0){\n System.err.println(\"Usuario invalido\");\n \n }else{\n \n menuInterno();\n \n }\n//\n// menuInterno();\n// \n }",
"@Override\n\tpublic void enter() {\n\t}",
"@Override\n\tpublic void enter() {\n\t\tMessenger.register(this, Message.KEY_DOWN, Message.Move, Message.Scale, Message.Rotate);\n\t}",
"@Override\r\n\tpublic void keyReleased(KeyEvent e) {\n\t\tif(e.getKeyCode()==KeyEvent.VK_ENTER) {\r\n\t\t\tcriterio = combo_campos.getSelectedIndex();\r\n\t\t\tparametro = getTf_busqueda().getText().toString();\r\n\t\t\t\r\n\t\t\tconstruirTabla(\"bus\");\r\n\t\t}\r\n\t}",
"@UiHandler(\"go\")\n void connexion(ClickEvent e) {\n loginField.setFocus(false);\n passwordField.setFocus(false);\n domains.setFocus(false);\n\n String login = loginField.getText();\n String password = passwordField.getText();\n login(login, password, domains.getValue(domains.getSelectedIndex()));\n\n\n }",
"@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\r\n\t\t\t\tif (e.getKeyCode()==e.VK_ENTER) {\r\n\t\t\t\t\ttfNota.requestFocus();\r\n\t\t\t\t}\r\n\t\t\t}",
"public void keyPressed(KeyEvent e) {\r\n\r\n\t\tif(e == null || e.getKeyCode()==KeyEvent.VK_ENTER){\r\n\t\t\t//System.out.println(\"keypressed: Enter\");\r\n\t\t\tif (!input.getText().equals(\"\")) {\r\n\t\t\t\tinput.setEditable(false);\r\n\t\t\t\tquote[1] = Long.toString(System.currentTimeMillis());\r\n\t\t\t\tquote[0]=input.getText();\r\n\r\n\t\t\t\tinput.setText(\"\");\r\n\t\t\t\tquote[0] = quote[0].trim();\r\n\t\t\t\taddText(\"> \"+quote[0]+\"\\n\");\r\n\t\t\t\t\r\n\t\t\t\tmDispatcher.newInput(quote);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setEditable(false);\r\n\t\t\t\tinput.setText(\"\");\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void setEnterAction(OnEnter et){\n this.enterText = et;\n }",
"void enter();",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tSystem.out.println(\"entre no butão\");\n\t\t\t}",
"public void mouseEntered(MouseEvent e) {\n\t\tadaptee.botGuardarComo_mouseEntered(e);\n\t}",
"@Override\n\t\t\tpublic void handle(KeyEvent event) {\n\t\t\t\tif(event.getCode().equals(KeyCode.ENTER)){\n\t\t\t\t\tPlatform.runLater(()->{dodaj.fire(); sifra.requestFocus();});\n\t\t\t\t}\n\t\t\t}",
"protected void enterPressed()\n\t{\n\t\t// Call the enter method if the enter key was pressed\n\t\tif (showCaret)\n\t\t\tonSubmit(text.getText().substring(0, text.getText().length() - 1));\n\t\telse onSubmit(text.getText());\n\t}",
"@Override\r\n\t\t\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\t\tint tecla=arg0.getKeyCode();\r\n\t\t\t\tswitch(tecla)\r\n\t\t\t\t{\r\n\t\t\t\tcase 10://enter\r\n\t\t\t\t\tpacman.getLaberinto().getJuego().comenzar();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 38:\r\n\t\t\t\t\tpacman.setEstrategia(new EstrategiaIrHaciaArriba(pacman));\r\n\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 40:\r\n\t\t\t\t\tpacman.setEstrategia(new EstrategiaIrHaciaAbajo(pacman));\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 37:\r\n\t\t\t\t\tpacman.setEstrategia(new EstrategiaIrALaIzquierda(pacman));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 39:\r\n\t\t\t\t\tpacman.setEstrategia(new EstrategiaIrALaDerecha(pacman));\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t}",
"public void keyPressed(KeyEvent e) {\n if (e.getKeyCode()==KeyEvent.VK_ENTER){\n enter();\n } \n }",
"public void ingresoTermino() {\n System.out.println(\"......................\");\n System.out.println(\"Ingreso de Termino Academico\");\n Entrada entrada = new Entrada();\n Termino termino;\n do {\n termino = new Termino(entrada.Entera(\"Ingrese año : \"), entrada.Entera(\"Ingrese número:\"));\n if (Termino.terminos.contains(termino)) {//valida que el termino instanciado no este ya registrado, es decir que no este en el arraylIST (de clase) termino\n System.out.println(\"Termino ya existe ingrese otro\");\n }\n } while (Termino.terminos.contains(termino));\n Termino.terminos.add(termino);\n System.out.println(\"Termino ingresado\");\n }",
"protected void enter() {\n \tresult.setForeground(red);\n \tif (entered == true) {\n \t\tshow(current);\n \t}\n \tentered = true;\n \tstack.add(current);\n \tcurrent = 0;\n }",
"@Override\n public void onClick(View v) {\n String mensaje = input.getText().toString();\n\n //Si el mensaje esta vacio...\n if(mensaje.trim().equals(\"\")){\n //Mostramos un error\n Toast.makeText(MainActivity.this,\n R.string.error_vacio,\n Toast.LENGTH_SHORT).show();\n //Y no hacemos nada\n return;\n }\n //Crear un intent hacia el Activity OtroActivity\n Intent myIntent = new Intent(MainActivity.this,\n OtroActivity.class);\n\n //Se envia el mensaje por medio de LLAVE_TEXTO\n myIntent.putExtra(Constantes.LLAVE_TEXTO, mensaje);\n\n //Se envia el intent\n startActivity(myIntent);\n }",
"public void esperarRecogidaIngrediente(){\n enter();\n if ( ingredienteact != -1 )\n estanquero.await();\n leave();\n }",
"@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\tif(e.getKeyCode()==KeyEvent.VK_ENTER)\n\t\t{\n\t\t\t\n\t\t\tString info=\"服务器 对 客户端说: \"+jtf.getText();\n\t\t\tif(jtf.getText().equals(\"\"))\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(this, \"对不起,发送的内容不能为空...\");\n\t\t\t}else\n\t\t\t{\n\t\t\t\tjta.append(info+\"\\r\\n\");\n\t\t\t\tjta.setCaretPosition(jta.getText().length());\n\t\t\t\tif(jtf.getText().equals(\"bye\"))\n\t\t\t\t{\n\t\t\t\t\tinfo=new String(\"bye\");\n\t\t\t\t}\n\t\t\t\tjtf.setText(\"\");\n\t\t\t\tif(info.equals(\"bye\"))\n\t\t\t\t{\n\t\t\t\t\tint response=JOptionPane.showConfirmDialog(this,\"您确定要强行关闭客户端和服务器吗?\");\n\t\t\t\t\tif(response==0)\n\t\t\t\t\t{\n\t\t\t\t\t\tms.SendMessage(info);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tms.SendMessage(info);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"public void intro(){Scanner teclado = new Scanner(System.in);\nSystem.out.println(\"Introduzca la unidad de medida a la que transformar \"\n + \"pies, cm o yardas\");\nSystem.out.println(\"o escriba salir si quiere volver al primer menu\");\nopcion=teclado.nextLine();}",
"private void menuCliente(String username){\n a_armazena.juntaCatalogos();\n a_armazena.JuntaProdutos();\n ArrayList<String> encs=b_dados.buscapraClassificar(username);\n if(!encs.isEmpty())\n menuClassifica(encs,username);\n Scanner s = new Scanner(System.in);\n int opcao = 0;\n String op=\"\";\n\n try{\n do{\n System.out.println(\"Escolha o que pretende fazer\");\n System.out.println(\"1 - Ver Lojas\");\n System.out.println(\"2 - Consultar Dados Pessoais\");\n System.out.println(\"3 - Historico de Encomendas\");\n System.out.println(\"4 - Ver estado de encomenda\");\n\n\n System.out.println(\"0 - Retroceder\");\n\n opcao = s.nextInt();\n System.out.print(\"\\n\");\n\n switch(opcao){\n case 0:\n break;\n case 1:\n verLojas(b_dados.getUtilizadores().get(username).getCodUtilizador());\n break;\n case 2:\n consultadadosUtilizador(username);\n break;\n case 3:\n b_dados.buscaHistoricoDisplay(b_dados.buscaHistoricoUtilizador(b_dados.getUtilizadores().get(username).getCodUtilizador()));\n break;\n case 4:\n System.out.println(\"As encomendas que ainda não foram entregues são\");\n b_dados.displayencsnaoentregues(username);\n EstadoEncomenda();\n break;\n default:\n System.out.print(\"Opção inválida\\n\\n\");\n break;\n\n }\n }while(opcao != 0);\n }\n catch (UtilizadorNaoExisteException e){\n System.out.println(e.getMessage());\n menuCliente(username);\n }\n catch(InputMismatchException e){\n System.out.println(\"Entrada inválida\");\n menuCliente(username);\n\n }\n }",
"public EnteroGrande(long entero) {\n\t\tthis.valor= Long.toString(entero);\n\t}",
"private TextField textFieldMensagem(int posX, int posY) {\n TextField entradaTexto = new TextField();//Criando uma nova entrada de Texto\n entradaTexto.setPrefWidth(230);//Adicionando Largura\n entradaTexto.setPrefHeight(26);//Adicionando Altura\n entradaTexto.setLayoutX(posX);//Adicioanndo posicao X\n entradaTexto.setLayoutY(posY);//Adicionando posicao Y\n entradaTexto.setFocusTraversable(false);//Desabilita o foco inicial\n entradaTexto.setPromptText(\"Digite e aperte ENTER\");//Adicionando texto base\n entradaTexto.setPadding(new Insets(0,30,0,5));\n\n //Adiciona um funcao ao apertar botao [ENTER]\n entradaTexto.setOnKeyReleased((KeyEvent key) -> {\n if (key.getCode() == KeyCode.ENTER) {\n this.enviarMensagem(entradaTexto.getText());\n entradaTexto.setText(\"\");//Limpa a caixa de Texto\n }\n });\n\n return entradaTexto;\n }",
"public void enterPressed(View view) {\n // Initialize intent\n Intent intent = new Intent(this, LobbyActivity.class);\n// Intent intent = new Intent(this, ChatActivity.class);\n// intent.putExtra(PEER_NAME, \"Mock\");\n String username = editText.getText().toString();\n intent.putExtra(USER_NAME, username);\n\n // Save username on data storage\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(USER_NAME, username);\n\n // Go to the ChatActivity after commit of username to storage\n if (editor.commit()) {\n startActivity(intent);\n }\n }",
"public void keyPressed(KeyEvent e) {\n\t\taux1.getUser().setText(aux1.getNombre().getText().toString()+aux1.getApellido1().getText().toString());\n\t\t\n\t}",
"@Override\n public void input() {\n super.input();\n Scanner sc = new Scanner(System.in);\n System.out.printf(\"Nhập số trang sách giáo khoa: \");\n amountPage = Integer.valueOf(sc.nextLine());\n System.out.printf(\"Nhập tình trạng sách giáo khoa: \");\n status = sc.nextLine();\n System.out.printf(\"Nhập số lượng mượn: \");\n amountBorrow= Integer.valueOf(sc.nextLine());\n }",
"@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tSystem.out.println(\"ENTREI ermano\");\n\t\t\t\t\n\t\t\t}",
"private void submenuCliente(){\n Scanner s = new Scanner(System.in);\n int opcao = 0;\n\n try{\n do{\n System.out.println(\"1 - Criar Conta\");\n System.out.println(\"2 - Já possui conta? Log In\");\n System.out.println(\"3 - Associar conta\");\n System.out.println(\"0 - Sair\");\n\n opcao = s.nextInt();\n System.out.print(\"\\n\");\n\n switch(opcao){\n case 1:\n registoCliente();\n break;\n case 2:\n loginCliente();\n break;\n case 3:\n associarContaCliente();\n break;\n case 0:\n break;\n\n default:\n System.out.println(\"Opção inválida\");\n break;\n }\n } while (opcao != 0);\n }\n catch(InputMismatchException e){\n System.out.println(\"Entrada inválida\");\n menuInicial();\n\n }\n }",
"private void clickEnter(){\n\t\tString commandInput = textInput.getText();\n\t\tString feedback;\n\n\t\tif (commandIsClear(commandInput)) {\n\t\t\tusedCommands.addFirst(commandInput);\n\t\t\tclearLinkedDisplay();\n\n\t\t} else {\n\t\t\tif (commandInput.trim().isEmpty()) {\n\t\t\t\tfeedback = \"Empty command\";\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\tusedCommands.addFirst(commandInput);\n\t\t\t\t\tParser parser = new Parser(commandInput);\n\t\t\t\t\tTask currentTask = parser.parseInput();\n\t\t\t\t\t\n\t\t\t\t\tif (currentTask.getOpCode() == OPCODE.EXIT) {\n\t\t\t\t\t\tWindow frame = findWindow(widgetPanel);\n\t\t\t\t\t\tframe.dispatchEvent(new WindowEvent(frame, WindowEvent.WINDOW_CLOSING));\n\t\t\t\t\t\tframe.dispose();\n\t\t\t\t\t}\n\t\t\t\t\tif (currentTask.getOpCode() == OPCODE.HELP) {\n\t\t\t\t\t\tfeedback = currentTask.getHelpMessage();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfeedback = GUIAbstract.getLogic().executeTask(currentTask);\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tfeedback = e.getMessage();\n\t\t\t\t}\n\t\t\t}\n\t\t\tlinkedDisplay.displayFeedback(feedback);\n\t\t\tfor (TasksWidget widget : linkedOptionalDisplays) {\n\t\t\t\twidget.doActionOnClick();\n\t\t\t}\n\t\t}\n\t\tclearTextInput();\n\t}",
"public void menuEntregueTrans(String username){\n Scanner s= new Scanner(System.in);\n ArrayList<Historico> encs=b_dados.buscaEncomendaEntregueTrans(username);\n if (encs.isEmpty()){\n System.out.println(\"Não existem encomendas por entregar.\");\n }\n else {\n do {\n b_dados.buscaHistoricoDisplay(encs);\n System.out.println(\"0 - Retroceder\");\n System.out.println(\"Digite o código de encomenda que deseja sinalizar como entregue:\");\n String opcao = s.nextLine();\n if(opcao.equals(\"0\"))\n break;\n int check=0;\n for(Historico h:encs){\n if(h.getcodEncomenda().equals(opcao)){\n h.setDate();\n b_dados.addHistorico(h);\n b_dados.removeEntrega(h);\n b_dados.addClassifica(h.getcodEncomenda());\n check=1;\n break;\n }\n }\n if(check==0)\n System.out.println(\"Código inválido ou não exite.\");\n encs=b_dados.buscaEncomendaEntregueTrans(username);\n }while(!encs.isEmpty());\n if (encs.isEmpty())\n System.out.println(\"Não existem mais encomendas por entregar\");\n\n }\n }",
"@Override\n /**\n * Método que se centra en el campo email cuando se entra en el LoginView\n */\n public void enter(ViewChangeEvent event) {\n user.focus();\n }",
"@Override\n public void mousePressed(MouseEvent e) {\n if(e.getButton() == 1) {\n campo.abrir();\n } else {\n campo.alternarMarcacao();\n }\n }",
"@Override\r\n\t\t\tpublic void keyPressed(KeyEvent arg0) {\r\n\t\t\t\tif (arg0.getKeyCode()==arg0.VK_ENTER) {\r\n\t\t\t\t\ttxtFornecedor.requestFocus();\r\n\t\t\t\t}\r\n\t\t\t}",
"public void salir() {\n\t\tgetUi().salir();\r\n\t}",
"public void pedirPalabra() {\r\n\r\n Scanner entradaEscaner = new Scanner(System.in);\r\n palabra = entradaEscaner.nextLine();\r\n }",
"private void tencarFinestra(){\n Stage secondaryStage = (Stage)Panel.getScene().getWindow(); \n this.passwd = encripta(pfNou2.getText()); \n secondaryStage.close();\n \n }",
"@Override\n\t\t\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t\t\tif (e.getKeyChar() == KeyEvent.VK_ENTER) getActionNewParticipant().actionPerformed(null);\n\t\t\t\t\t}",
"@Override\n public void onClick(View v) {\n //EditText vacìo.\n\n etCardName.setText(\"\");\n etCardCVV.setText(\"\");\n etCardNumber.setText(\"\");\n etCardValidThru.setText(\"\"); //esperame miro el codigo\n\n Toast.makeText(getApplicationContext(),\"Pagado Exitosamente\",Toast.LENGTH_SHORT).show();\n Toast.makeText(getApplicationContext(),\"Brindanos tus Comentarios Para Nuestras Mejoras\",Toast.LENGTH_SHORT).show();\n //aqui pegas el codigo para abrir la otra activity\n startActivity(new Intent(Pago.this,Coomentarios.class));\n finish();\n\n\n//si ya sale amigo solo le agregare un evento mas q me envie a una nueva actividad desde el mismo si\n\n\n }",
"public String enterPressed();",
"public void keyPressed(KeyEvent e) {\n if(e.getKeyCode()==KeyEvent.VK_ENTER){\n\n }\n }",
"public void ler()\n {\n lerDados( AxellIO.readLine(\"\") );\n }",
"public static void toContinue() {\n System.out.println(EOF + \"Presiona ENTER para continuar...\");\n new Scanner(System.in).nextLine();\n }",
"public void caminar(){\n if(this.robot.getOrden() == true){\n System.out.println(\"Ya tengo la orden, caminare a la cocina para empezar a prepararla.\");\n this.robot.asignarEstadoActual(this.robot.getEstadoCaminar());\n }\n }",
"public static void menuEmpleado() throws ClienteException, PersistenciaException, DniException, VehiculoException, DireccionException, VentaException, PersonaException {\n boolean salir = false;\n int opcion;\n\n while (!salir) {\n System.out.println(\"\\n1. Realizar ventas\");\n System.out.println(\"2. Gestionar clientes\");\n System.out.println(\"3. Salir\\n\");\n\n try {\n System.out.print(\"Introduzca una de las opciones: \");\n opcion = teclado.nextInt();\n teclado.nextLine();\n System.out.println(\"\");\n\n switch (opcion) {\n case 1:\n menuVentas();\n break;\n case 2:\n menuClientes();\n break;\n case 3:\n salir = true;\n break;\n default:\n System.out.println(\"Solo numeros entre 1 y 3\");\n }\n } catch (InputMismatchException e) {\n System.out.println(\"Debe insertar una opcion correcta\");\n teclado.next();\n }\n }\n }",
"@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tif (e.getKeyCode() == KeyEvent.VK_ENTER && e.isControlDown())\r\n\t\t\t\t{\r\n\t\t\t\t\tSend();\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}",
"@Override\n public boolean onKey(View v, int keyCode, KeyEvent event) {\n if ((event.getAction() == KeyEvent.ACTION_DOWN) &&\n (keyCode == KeyEvent.KEYCODE_ENTER)) {\n irMapa();\n return true;\n }\n return false;\n }",
"public int menu(){\n System.out.println(\"Elija una opción:\");\n\t\tSystem.out.println(\"1. Registrar un nuevo carro\");//Le damos todas las opciones disponibles\n\t\tSystem.out.println(\"2. Eliminar un carro del registro\");\n\t\tSystem.out.println(\"3. Mostrar espacios disponibles\");\n System.out.println(\"4. Mostrar el registro completo\");\n System.out.println(\"5. Mostrar las estadisticas del parqueo\");\n System.out.println(\"6. Agregar mas espacios de parqueo\");\n System.out.println(\"7. Salir/n/n\");\n\n boolean paso = false;\n int option = 0;\n while (paso == false){//Aplicamos un metodo para que escriba el \n try {\n String optionString = scan.nextLine();//Recibimos el valor como String para evitar un bug con el metodo nextLine()\n option = Integer.parseInt(optionString);//Lo cambiamos a int\n paso = true;\n } catch (Exception e) {\n System.out.println(\"Ingrese un valor correcto, por favor\");\n }\n }\n return option;//regresamos el valor convertido\n }",
"public void actionPerformed(ActionEvent e) { \n enter();\n }",
"public GerenciadorSimples() throws Exception {\n\n Scanner ler = new Scanner(System.in);\n int opcaoMenu;\n while (true) {\n\n try {\n System.out.println(\"\\n=================== =================== LEILÃO DE ENTREGAS =================== ===================\");\n System.out.println(\"1 - Carregar Entradas \");\n System.out.println(\"2 - Calcular Entregas Busca Profunda\");\n System.out.println(\"6 - Mostrar Rotas \");\n System.out.println(\"7 - Limpar tela \");\n System.out.println(\"0 - Sair \");\n opcaoMenu = ler.nextInt();\n\n switch (opcaoMenu) {\n case 1:\n menuArquivos();\n break;\n case 2:\n calcularRota();\n break;\n case 3:\n mostrarRota();\n break;\n case 4:\n limparTela();\n break;\n case 0:\n System.out.println(\"Saindo ...\");\n System.exit(0);\n break;\n }\n } catch (Exception e) {\n System.out.println(\"Ops! Ocorreu algo errado, tente novamente.\");\n }\n }\n }",
"@Override\r\n public void keyReleased(KeyEvent e) {\n if(e.getKeyCode()==10){ //enter key code is 10\r\n // System.out.println(\"you have pressed enter button\");\r\n String contentToSend=messageInput.getText(); //type kia hua msg nikalna\r\n messageArea.append(\"Me :\"+contentToSend+\"\\n\");\r\n out.println(contentToSend); //msg ko send krna\r\n out.flush();\r\n messageInput.setText(\"\"); //clear hoker isme text ho jayga\r\n messageInput.requestFocus();\r\n }\r\n \r\n }",
"public void solicitarDatos() {\r\n System.out.println(\"Dime el nombre del cliente: \");\r\n this.setNombre(lector.nextLine());\r\n System.out.println(\"Dime el primer apellido: \");\r\n this.setPrimerApellido(lector.nextLine());\r\n System.out.println(\"Dime el segundo apellido: \");\r\n this.setSegundoApellido(lector.nextLine());\r\n System.out.println(\"Dime la edad: \");\r\n this.setEdad(lector.nextInt());\r\n }",
"private void limpiar() {\n txtNombre.setText(\"\");\n txtDescripcion.setText(\"\");\n this.accion = \"Guardar\";\n }",
"private void controladorLogin(Controlador controlador){\n this.contLogin = controlador.getLogin();\n login.setControlContinuar(contLogin);\n }",
"public void hilera (javafx.scene.input.KeyEvent keyEvent) {\r\n char car = keyEvent.getCharacter().charAt(0);\r\n \r\n if(j==1){\r\n if ((car < 'a' || car > 'z') && (car < 'A' || car > 'Z') ) {\r\n keyEvent.consume();\r\n }\r\n \r\n if(hilera.getText().length()>=1){ \r\n keyEvent.consume();\r\n } \r\n \r\n }else{\r\n if ((car < '0' || car > '9') ) {\r\n keyEvent.consume();\r\n }\r\n if(hilera.getText().length()>=1){ \r\n keyEvent.consume(); \r\n } \r\n }\r\n \r\n if(hilera.getText().length()==0){ \r\n abreParentesis.setDisable(false); \r\n }\r\n if(hilera.getText().length()>=0){ \r\n abreParentesis.setDisable(true);\r\n System.out.println(\"pee\");\r\n }\r\n if(hilera.getText().length()==0){ \r\n abreParentesis.setDisable(false); \r\n }\r\n \r\n \r\n }",
"public static void pressEnterToContinue() {\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.println(\"Press Enter to continue...\");\n\t\tinput.nextLine();\n\t}",
"protected void botonAceptarPulsado() {\n\t\tString pass = this.vista.getClave();\n\t\tchar[] arrayC = campoClave.getPassword();\n\t\tString clave = new String(arrayC);\n\t\tclave = Vista.md5(clave);\n\t\t\n\t\tif (pass.equals(clave)) {\n\t\t\tarrayC = campoClaveNueva.getPassword();\n\t\t\tString pass1 = new String(arrayC);\n\t\t\t\n\t\t\tarrayC = campoClaveRepita.getPassword();\n\t\t\tString pass2 = new String(arrayC);\n\t\t\t\n\t\t\tif (pass1.equals(pass2)) {\n\t\t\t\tif (this.vista.cambiarClave(pass1)) {\n\t\t\t\t\tthis.vista.msg(this, \"Contraseña maestra cambiada con éxito\");\n\t\t\t\t\tthis.setVisible(false);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.vista.error(this, \"Error al cambiar la contraseña maestra\");\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.vista.error(this, \"Las contraseñas no coinciden\");\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthis.vista.error(this, \"Contraseña incorrecta\");\n\t\t}\n\t}",
"@When(\"^acionar o Botao de ENTRAR$\")\n\tpublic void acionar_o_Botao_de_ENTRAR() throws Throwable {\n\t\t\n\t\tPageObject_Login.ButtonEntrar();\t\n\t\t\n\t}",
"public static void imprimirMenuCliente() {\r\n\tSystem.out.println(\"---------------------------menu---------------------------\");\r\n\tSystem.out.println(\"opciones: (ingrese la letra)\");\r\n\tSystem.out.println(\"A: despliega la opción comprar entrada\");\r\n System.out.println(\"B: despliega la opción informacion usuario\");\r\n System.out.println(\"C: despliega la opción devolucion entrada\");\r\n System.out.println(\"D: despliega la opción cartelera\");\r\n\tSystem.out.println(\"E: Salir\");\r\n\tSystem.out.println(\"----------------------------------------------------------\");\r\n \r\n }",
"public void salir() {\n LoginManager.getInstance().logOut();\n irInicio();\n }",
"public String interact() {\n return suara;\n }",
"public void pulisciInput(){\n nomeVarTextField.setText(\"\");\n tipoVarComboBox.setSelectedIndex(-1);\n if(modalita == TRIGGER) triggerComboBox.setSelectedIndex(-1); \n else proceduraComboBox.setSelectedIndex(-1);\n }",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tmapa.encerrarTurno(0);\r\n\t\t\t\t\r\n\t\t\t}",
"public void TipoCliente() {\n\tint cambio=1;\n\tString tipoCliente=\"\";\n\tdo {\n\t\ttry {\n\t\t\ttipoCliente = (JOptionPane.showInputDialog(null, \"Selecciona el tipo de cliente\", null, JOptionPane.PLAIN_MESSAGE,null, new Object[]\n\t\t\t\t\t{ \"Selecciona\",\"Docente\", \"Administrativo\"}, \"Selecciona\")).toString() ;\n\t\t\t\n\t\t\tif(tipoCliente.equalsIgnoreCase(\"Docente\")) {\n\t\t\t\tingresaDocente();\n\t\t\t\tsetTipoCliente(\"Docente\");\n\t\t\t\t\n\t\t\t}else if(tipoCliente.equalsIgnoreCase(\"Administrativo\")) {\n\t\t\t\tingresaAdministrativo();\n\t\t\t\tsetTipoCliente(\"Administrativo\");\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(null,\"Escoge una de las dos opciones\");\n\t\t\t}\n\t} catch (Exception e) {\n\t\tJOptionPane.showMessageDialog(null, \"Debes escoger una opcion\");\n\t\tcambio=0;\n\t}\n\t} while (tipoCliente==\"Selecciona\"||tipoCliente==null||cambio==0);\t\n}",
"void botGuardarComo_mouseEntered(MouseEvent e) {\n\t\tImageIcon cursor = new ImageIcon(\"../imagenes/cursores/punteroAct.gif\");\n\t\tImage image = cursor.getImage();\n\t\tCursor puntero = Toolkit.getDefaultToolkit().createCustomCursor(image, new Point(8, 8), \"img\");\n\t\tthis.setCursor(puntero);\n\n\t}",
"public void keyPressed(KeyEvent e)\n {\n // tecla O que mueve la nave Guardian hacia la izquierda\n if (e.getKeyCode() == KeyEvent.VK_O) {\n moverIzquierda = true;\n }\n // tecla P que mueve la nave Guardian hacia la derecha\n if (e.getKeyCode() == KeyEvent.VK_P) {\n moverDerecha = true;\n }\n // tecla Espacio dispara\n if (e.getKeyCode() == KeyEvent.VK_SPACE) {\n disparar = true;\n }\n }",
"static String kembali(String pesan){\n input = new Scanner(System.in);\n System.out.print(pesan);\n System.out.println(\"\\n[ENTER]\");\n input.nextLine();\n Menu();\n\n return pesan;\n }",
"public void limpiar() {\n\t//txtBuscar.setText(\"\");\n\n\t// codTemporal.setText(\"\");\n\thabilita(true, false, false, false, false, true, false, true, true);\n }",
"private void esqueceu() {\n\n //Declaração de Objetos\n Veterinario veterinario = new Veterinario();\n\n //Declaração de Variaveis\n int crmv;\n String senha;\n\n //Atribuição de Valores\n try {\n crmv = Integer.parseInt(TextCrmv.getText());\n senha = TextSenha.getText();\n \n //Atualizando no Banco\n veterinario.Vdao.atualizarAnimalSenhaPeloCrmv(senha, crmv);\n \n } catch (NumberFormatException ex) {\n JOptionPane.showMessageDialog(null, \"APENAS NUMEROS NO CRMV!\");\n }\n JOptionPane.showMessageDialog(null, \"SUCESSO AO ALTERAR SENHA!\");\n\n }",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n \t Robot r;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tr = new Robot();\r\n\t\t\t\t int keyCode = KeyEvent.VK_ENTER; // the A key\r\n\t\t\t\t r.keyPress(keyCode);\t\t\t\t \r\n\t\t\t\t} catch (AWTException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}",
"@Override\n public void manejarLogin() {\n loginPresenter.validarLogin(etxtEmail.getText().toString(),etxtPass.getText().toString());\n }",
"public void changerJoueur() {\r\n\t\t\r\n\t}",
"private void Screentocharge() {\r\n\r\n\t\t\t\t\r\n\t\tJTextField nombre = new JTextField();\r\n\t\tJTextField edad = new JTextField();\r\n\t\tJTextField raza = new JTextField();\r\n\t\tJTextField cuento = new JTextField();\r\n\t\tChoice tipo = new Choice();\r\n\t\t\t\t\t\t\r\n\t\ttipo.add(\"Perro\");\r\n\t\ttipo.add(\"Gato\");\r\n\t\ttipo.add(\"Conejo\");\r\n\t\t\r\n\t\tedad.addKeyListener(new KeyAdapter()\r\n\t\t{\r\n\t\t public void keyTyped(KeyEvent e)\r\n\t\t {\r\n\t\t char caracter = e.getKeyChar();\r\n\t\t if(((caracter<'0')||(caracter>'9'))&&(caracter!='\\b'))\r\n\t\t {\r\n\t\t e.consume(); \r\n\t\t }\r\n\t\t }\r\n\t\t});\r\n\t\t\r\n\t\tObject[] message = { \"Tipo:\", tipo, \"Nombre:\", nombre, \"Edad\", edad, \"Raza\", raza, \"Causa\", cuento };\r\n\r\n\t\tUIManager.put(\"OptionPane.minimumSize\",new Dimension(500,400));\r\n\t\tint option = JOptionPane.showConfirmDialog(null, message, \"Ingreso de Pasiente\", JOptionPane.OK_CANCEL_OPTION);\r\n\t\tif (option == JOptionPane.OK_OPTION) {\t\r\n\t\t\tif (edad.getText().equals(\"\")) {\r\n\t\t\t\tedad.setText(\"0\");\r\n\t\t\t\treturnAnimal(tipo.getSelectedItem(), nombre.getText(), raza.getText(), \r\n\t\t\t\t\t\tInteger.valueOf(edad.getText()), cuento.getText());\r\n\t\t\t}\r\n\t\t\t returnAnimal(tipo.getSelectedItem(), nombre.getText(), raza.getText(), \r\n\t\t\t\t\t\t\tInteger.valueOf(edad.getText()), cuento.getText());\r\n\t\t}\r\n\t\t\r\n\t\tnombre = null;\r\n\t\tedad =null;\r\n\t\traza = null;\r\n\t\tcuento = null;\r\n\t\ttipo =null;\r\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tenterField.setEditable(editable);\t//将文本域置为可编辑的状态\r\n\t\t\t}",
"@Override\r\n\tpublic void hacerSonido() {\n\t\tSystem.out.print(\"miau,miau -- o depende\");\r\n\t\t\r\n\t}",
"public void menuEncomendasTrans(String username){\n ArrayList<Encomenda> encs=b_dados.buscaEncomendasTransportadora(username);\n if(encs.isEmpty()){\n System.out.println(\"Não existem encomendas disponiveis na sua localização\");\n }\n else{\n Scanner s=new Scanner(System.in);\n while(!encs.isEmpty()) {\n b_dados.buscaEncomendasDisplay(encs);\n System.out.println(\"Digite o código de encomenda que a sua empresa está pronta a entregar\");\n String opcao = s.nextLine();\n int check=0;\n for (Encomenda e : encs) {\n if (e.getcodEncomenda().equals(opcao)) {\n String cod = b_dados.getTrasnportadoras().get(username).getCodEmpresa();\n String nome = b_dados.getTrasnportadoras().get(username).getNome();\n double kms=b_dados.getTrasnportadoras().get(username).getGps().distLocalizacao(b_dados.getLoja(e.getcodLoja()).getGps())+ b_dados.getTrasnportadoras().get(username).getGps().distLocalizacao(b_dados.getUtilizador(e.getcodUtilizador()).getGps());\n b_dados.novaEntrega(cod, nome, e.getcodEncomenda(), e.getcodUtilizador(), e.getcodLoja(), e.getPeso(), e.getLinhas(),kms);\n b_dados.removeEncomendaDisponivel(e);\n check=1;\n encs=b_dados.buscaEncomendasTransportadora(username);\n break;\n }\n }\n if(check==0){\n System.out.println(\"Código errado ou não existe!\");\n }\n }\n System.out.println(\"Não existem mais encomendas disponiveis!\");\n }\n }",
"public void keyPressed(KeyEvent e) {\n\t\t\t\tif (e.getKeyCode() == KeyEvent.VK_ENTER){\n\t\t\t\t\tsend(txtMessage.getText());\n\t\t\t\t}\n\t\t\t}",
"public static void main(String[] args) {\n\t\tString out =\"n\";\n\t\twhile (!out.equals(\"o\") && !out.equals(\"O\"))\n\t\t{\n\t\t\tScanner keyboard = new Scanner(System.in);\n\t\tSystem.out.print(\"Veuillez saisir la somme : \");\n\t\t\n\t\tint x = keyboard.nextInt();\n\t\t\n\t\tSystem.out.print(\"e pour euro d pour dollar : \");\n\t\tkeyboard = new Scanner(System.in);\n\t\tString s = keyboard.nextLine();\n\t\t\n\t\t\n\t\t\tif (s.equals(\"e\") || s.equals(\"E\"))\n\t\t\t\tSystem.out.println(\"la somme en dinar est : \" + x*211);\n\t\t\telse \n\t\t\t{\n\t\t\t\tif (s.equals(\"d\") || s.equals(\"D\"))\n\t\t\t\t\tSystem.out.println(\"la somme en dinar est : \" + x*180);\n\t\t\t\telse \n\t\t\t\t\tSystem.out.println(\"Symbole non reconu \");\n\t\t\t}\n\t\t\tkeyboard = new Scanner(System.in);\n\t\t\t\n\t\t\tSystem.out.print(\"Voulez vous sortir? n(Non) ou o(Oui) : \");\n\t\t\tout = keyboard.nextLine();\n\t\t\t\n\t\t}\n\t}",
"public Login(Main pai) {\n this.pai = pai;\n initComponents();\n senhaBox.setEchoChar('*');\n \n loginBox.setText(\"[email protected]\");\n senhaBox.setText(\"eymar\");\n }",
"public void clickEnter(View v) {\r\n\t\t\r\n\t\tif (ipAdresse.getText().toString().length() != 0 && port.getText().toString().length() != 0) {\r\n\t\t\tIntent startClient = new Intent(ClientStartUp.this, MainClient.class);\r\n\t\t\tstartClient.putExtra(\"ip\", ipAdresse.getText().toString());\r\n\t\t\tstartClient.putExtra(\"port\", port.getText().toString());\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tString ip2save = ipAdresse.getText().toString();\r\n\t\t\t\tString port2save = port.getText().toString();\r\n\t\t\t\t\r\n\t\t\t\tint i;\r\n\t\t\t\tfor (i=4;i>=0;i--) {\r\n\t\t\t\t\tif (ip2save.toString().equals(previousIP[i].toString())) {\r\n\t\t\t\t\t\ttry {\t\t\t\t\r\n\t\t\t\t\t\t\tTheDatabase ex1 = new TheDatabase(this);\r\n\t\t\t\t\t\t\tex1.open();\r\n\t\t\t\t\t\t\tex1.deleteEntry(previousIP[i]);\r\n\t\t\t\t\t\t\tex1.close();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t}catch (Exception e) {\r\n\t\t\t\t\t\t\tString error = e.toString();\r\n\t\t\t\t\t\t\tDialog d = new Dialog(this);\r\n\t\t\t\t\t\t\td.setTitle(\"Error!\");\r\n\t\t\t\t\t\t\tTextView tv = new TextView(this);\r\n\t\t\t\t\t\t\ttv.setText(error);\r\n\t\t\t\t\t\t\td.setContentView(tv);\r\n\t\t\t\t\t\t\td.show();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tTheDatabase entry = new TheDatabase(ClientStartUp.this);\r\n\t\t\t\tentry.open();\r\n\t\t\t\tentry.createEntry(ip2save, port2save);\r\n\t\t\t\tentry.close();\r\n\t\t\t}catch (Exception e) {\r\n\t\t\t\tString error = e.toString();\r\n\t\t\t\tDialog d = new Dialog(this);\r\n\t\t\t\td.setTitle(\"Error\");\r\n\t\t\t\tTextView tv = new TextView(this);\r\n\t\t\t\ttv.setText(error);\r\n\t\t\t\td.setContentView(tv);\r\n\t\t\t\td.show();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tstartActivity(startClient);\r\n\t\t} else {\r\n\t\t\tToast.makeText(getApplicationContext(), \"Enter a valid IP and/or PORT\", Toast.LENGTH_LONG).show();\r\n\t\t}\r\n\t}",
"private void loginCliente(){\n Scanner s = new Scanner(System.in); int contador = 0;\n String username,pass,k;\n try{\n do{\n System.out.println(\"Introduza o seu username\");\n username= s.nextLine();\n System.out.println(\"Introduza a sua password\");\n pass = s.nextLine();\n contador++;\n k = b_dados.checkUserPassUtil(username,pass);\n if(k.equals(\"NOK\")) System.out.println(\"Dados de acesso inválidos ou não registado\\n\");\n }while(k.equals(\"NOK\")&& contador < 3);\n if(k.equals(\"NOK\")) //menuInicial();\n return;\n\n else menuCliente(username);\n }\n catch(InputMismatchException e){\n System.out.println(\"Entrada inválida\");\n menuInicial();\n return;\n\n }\n }",
"public void Login() throws Exception {\r\n\t\tib.leituraUsuario(mapaUsuario);\r\n\t\ttry {\r\n\t\t\tBufferedReader entrada = new BufferedReader(new InputStreamReader(System.in));\r\n\r\n\t\t\tSystem.out.println(\"Informe o Login:\");\r\n\t\t\tString usuario = entrada.readLine();\r\n\r\n\t\t\tSystem.out.println(\"Informe a senha:\");\r\n\t\t\tString senha = entrada.readLine();\r\n\r\n\t\t\tif ((mapaUsuario.containsKey(usuario))\r\n\t\t\t\t\t&& (mapaUsuario.get(usuario).getSenha().equals(senha))) {\r\n\r\n\t\t\t\tif ((mapaUsuario.containsKey(usuario))\r\n\t\t\t\t\t\t&& (mapaUsuario.get(usuario).getTipo().equals(\"0\"))) {\r\n\t\t\t\t\tmenuAdmin();\r\n\r\n\t\t\t\t} else if ((mapaUsuario.containsKey(usuario))\r\n\t\t\t\t\t\t&& (mapaUsuario.get(usuario).getTipo().equals(\"1\"))) {\r\n\t\t\t\t\tmenuCorretor();\r\n\r\n\t\t\t\t} else if ((mapaUsuario.containsKey(usuario))\r\n\t\t\t\t\t\t&& (mapaUsuario.get(usuario).getTipo().equals(\"2\"))) {\r\n\t\t\t\t\tmenuSecretario();\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\r\n\t\t\t\tSystem.out.println(\"Usuario e/ou senha invalido(s)!\");\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t\tLogin();\r\n\t\t\t}\r\n\r\n\t\t} catch (InputMismatchException e) {\r\n\r\n\t\t\ts.nextLine();\r\n\t\t\tSystem.out.println(\"Você informou algum caracter inválido(s)! \");\r\n\r\n\t\t} catch (NullPointerException b) {\r\n\r\n\t\t\tSystem.out.println(\"Erro!\");\r\n\t\t\tSystem.out.println(b.getMessage());\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic void add(Enter enter) {\n\t\tsession.insert(\"enter.insert\", enter);\r\n\t}",
"public void menuLojas() {\n int ciclo = 0;\n while (ciclo == 0) {\n try {\n System.out.println(\"O que pretende fazer?\");\n System.out.println(\"\\t1 -> Declarar uma encomenda como pronta!\");\n System.out.println(\"\\t2 -> Adicionar produtos à lista de produtos\");\n System.out.println(\"\\t3 -> Remover produtos da lista de produtos\");\n System.out.println(\"\\t4 -> Alterar o tamanho da fila\");\n System.out.println(\"\\t5 -> Ver os produtos prontos para entregar\");\n System.out.println(\"\\t6 -> Alterar dados\");\n System.out.println(\"\\t0 -> Logout\");\n int opcao = Input.lerInt();\n switch (opcao) {\n case 1:\n this.prontarEnc();\n break;\n case 2:\n this.adicionaProdutos();\n System.out.println(\"Produto adicionado!\");\n this.controller.gravar();\n break;\n case 3:\n this.removeProdutos();\n System.out.println(\"Produto Removido!\");\n this.controller.gravar();\n break;\n case 4:\n System.out.println(\"Quantas pessoas estao de momento na fila?\");\n int tamanho_fila = Input.lerInt();\n this.controller.qtsPessoasAtual(tamanho_fila);\n this.controller.gravar();\n break;\n case 5:\n System.out.println(\"Produtos prontos para entregar:\");\n Collection<String> h = this.controller.historicoEncomendas();\n for (String s : h) {\n System.out.println(\"\\t\" + s);\n }\n try {\n System.out.println(\"Escreva o id de uma das compras para mais detalhes ou 0 para sair\");\n String id = Input.lerString();\n String encomenda = this.controller.getEncomenda(id);\n System.out.println(encomenda);\n } catch (EntidadeNaoExisteException exc) {\n System.out.println(exc.getMessage());\n }\n break;\n case 6:\n boolean sair = this.alteraDadosLoja();\n if(sair) ciclo = 1;\n break;\n case 0:\n ciclo = 1;\n break;\n default:\n System.out.println(\"Ups! Opção Inválida. A opção \" + opcao + \" não existe!\");\n break;\n }\n } catch (ListaVaziaException | IOException exc) {\n System.out.println(\"Ups! \" + exc.getMessage());\n }\n }\n }",
"public CARGOS_REGISTRO() {\n initComponents();\n InputMap map2 = txtNombre.getInputMap(JTextField.WHEN_FOCUSED); \n map2.put(KeyStroke.getKeyStroke(KeyEvent.VK_V, Event.CTRL_MASK), \"null\");\n InputMap maps = TxtSue.getInputMap(JTextField.WHEN_FOCUSED); \n maps.put(KeyStroke.getKeyStroke(KeyEvent.VK_V, Event.CTRL_MASK), \"null\");\n InputMap map3 = txtFun.getInputMap(JTextField.WHEN_FOCUSED); \n map3.put(KeyStroke.getKeyStroke(KeyEvent.VK_V, Event.CTRL_MASK), \"null\");\n this.setLocationRelativeTo(null);\n this.txtFun.setLineWrap(true);\n this.lblId.setText(Funciones.extraerIdMax());\n\t\tsexo.addItem(\"Administrativo\");\n\t\tsexo.addItem(\"Operativo\");\n sexo.addItem(\"Tecnico\");\n sexo.addItem(\"Servicios\");\n \n }",
"public void jugar(){\n\t\tdo {\n\t\t\t\n\t\t\tSystem.out.printf(\"\\n-------- HANGMAN --------\\n\");\n\t\t\tdibujar();\n\t\t\tSystem.out.printf(\"\\n Errores: %d \\n\\n\", partida.getErrores());\n\t\t\tescribir();\n\t\t\tSystem.out.printf(\"Ingrese una letra: \\n\");\n\t\t\tlectura = entrada.nextLine();\n\t\t\tletra = lectura.charAt(0);\n\t\t\tpartida.accionar(letra);\n\t\t\t\n\t\t} while(!partida.parada());\n\t\t\n\t\t//Aquí se dibuja el estado final del juego.\n\t\t\n\t\tSystem.out.printf(\"\\n-------- HANGMAN --------\\n\");\n\t\tdibujar();\n\t\tSystem.out.printf(\"\\n Errores: %d \\n\\n\", partida.getErrores());\n\t\tescribir();\n\t\tSystem.out.printf(\"\\nTerminó el juego!!\\n\");\n\t\tif(partida.getErrores() == 10){\n\t\t\tSystem.out.printf(\"\\nPerdiste!!\\n\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.printf(\"\\nGanaste!!\\n\");\n\t\t}\n\t}"
] | [
"0.6506318",
"0.6412167",
"0.6385773",
"0.63167816",
"0.6313918",
"0.620705",
"0.6162849",
"0.61592174",
"0.61165977",
"0.6107122",
"0.6099023",
"0.6097658",
"0.6089484",
"0.6086741",
"0.60435224",
"0.6008266",
"0.5956998",
"0.595595",
"0.5920152",
"0.591682",
"0.59090364",
"0.5869174",
"0.586331",
"0.5815052",
"0.578733",
"0.5786718",
"0.5786626",
"0.57646143",
"0.57447416",
"0.572102",
"0.5715848",
"0.5714108",
"0.5710772",
"0.570599",
"0.5695341",
"0.56870055",
"0.5683917",
"0.56826484",
"0.56774706",
"0.5669019",
"0.56661564",
"0.56640047",
"0.5656242",
"0.56562114",
"0.56492853",
"0.56482524",
"0.5645954",
"0.5645345",
"0.563571",
"0.56313",
"0.56258965",
"0.56223786",
"0.561852",
"0.5610663",
"0.56049603",
"0.5601832",
"0.5601448",
"0.5572192",
"0.55689204",
"0.55686116",
"0.5566559",
"0.5565956",
"0.55644035",
"0.55604494",
"0.5556715",
"0.55537444",
"0.55506283",
"0.5545356",
"0.5541982",
"0.5538617",
"0.55357975",
"0.5534759",
"0.5533875",
"0.5531734",
"0.5520941",
"0.55196154",
"0.5517839",
"0.55135244",
"0.551254",
"0.55085605",
"0.5505055",
"0.5503066",
"0.54982245",
"0.548603",
"0.54833555",
"0.54826957",
"0.54803306",
"0.54792094",
"0.54752505",
"0.54749256",
"0.54742867",
"0.54732585",
"0.5471217",
"0.54706824",
"0.54695266",
"0.5465517",
"0.54654896",
"0.5464783",
"0.5463198",
"0.5462725"
] | 0.66600126 | 0 |
To change body of generated methods, choose Tools | Templates. | @Override
public void actionPerformed(ActionEvent e) {
if(e.getSource()==backButton){
HomeFrame frame=new HomeFrame();
frame.setTitle("Home Form");
frame.setVisible(true);
frame.setBounds(10,10,370,500);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setResizable(false);
this.dispose();
}
else if(e.getSource()==addButton){
if(!debit.isSelected() && !credit.isSelected()){
JOptionPane.showMessageDialog(this, "Please select type of payment.");
}else{
try {
AddMoneyFrame frame;
frame = new AddMoneyFrame();
frame.setTitle("Verification Form");
frame.setVisible(true);
frame.setBounds(10,10,370,500);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setResizable(false);
this.dispose();
} catch (ParseException ex) {
Logger.getLogger(WalletFrame.class.getName()).log(Level.SEVERE, null, ex);
} catch(Exception ex){
System.err.print(ex);
}
}
}
else{
throw new UnsupportedOperationException("Not supported yet.");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void generateCode()\n {\n \n }",
"public void method_201() {}",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void billGenerate() {\n\t\t\r\n\t}",
"public void generate() {\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\r\n\tpublic void method() {\n\t\r\n\t}",
"@Override\n\tpublic void dosomething() {\n\t\t\n\t}",
"@Override\n public void startMethodGeneration() {\n byteArrayOut.addMethodStatus();\n }",
"public void mo97908d() {\n }",
"@Override\n\tpublic void anular() {\n\n\t}",
"public void method_202() {}",
"@Override\r\npublic int method() {\n\treturn 0;\r\n}",
"public void mo21793R() {\n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"public void mo21825b() {\n }",
"public Methods() {\n // what is this doing? -PMC\n }",
"public void mo21782G() {\n }",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"public void mo115188a() {\n }",
"public void mo21779D() {\n }",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n\tpublic void myMethod() {\n\t\t\n\t}",
"public void mo115190b() {\n }",
"@Override\n\tpublic void randomMethod(String name) {\n\t\t\n\t}",
"public void mo56167c() {\n }",
"public void myPublicMethod() {\n\t\t\n\t}",
"public void mo21795T() {\n }",
"public void mo3749d() {\n }",
"@Override\n\tpublic void verkaufen() {\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void Method1() {\n\t\t\r\n\t}",
"public void method(){}",
"public void foo() {\r\n\t}",
"public void method_199() {}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"protected void generateMethods(ClassContext classContext, IData data, String bean, SourceWriter sw) {\n }",
"public void mo21791P() {\n }",
"public void mo6944a() {\n }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"public void method_4270() {}",
"public void mo9137b() {\n }",
"@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}",
"@Override\n public void perish() {\n \n }",
"public void method_115() {}",
"public void mo21785J() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}",
"public void mo38117a() {\n }",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void method1() {\n\t}",
"public void mo44053a() {\n }",
"public void method1()\r\n\t{\r\n\t}",
"public void mo2740a() {\n }",
"@Override\n\tprotected void generatePrimitives(SoAction action) {\n\n\t}",
"public void mo97906c() {\n }",
"@Override\n\tpublic void pathGenerated() {\n\n\t}",
"public void mo5248a() {\n }",
"public void mo21784I() {\n }",
"public void mo3376r() {\n }",
"@Override\n\tvoid methodabstract() {\n\t\t\n\t}",
"public void mo21789N() {\n }",
"@Override\n public int getMethodCount()\n {\n return 1;\n }",
"public void mo21878t() {\n }",
"public abstract void mo42331g();",
"@Override\n public void memoria() {\n \n }",
"@Override\n\tpublic void function() {\n\t\t\n\t}",
"public void mo21794S() {\n }",
"@Override\n\tpublic void nghe() {\n\n\t}",
"public E16_OverloadJavaDoc() {\n System.out.println(\"Planting a seedling\");\n }",
"public void method_193() {}",
"public void mo5251b() {\n }",
"public void mo5382o() {\n }",
"public void mo21792Q() {\n }",
"public void method_200() {}",
"public void mo1406f() {\n }",
"public void mo5097b() {\n }",
"@Override\r\n\tvoid func04() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void Method2() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"BOpMethod createBOpMethod();",
"public abstract void generate();",
"@Override\n\tpublic void some() {\n\t\t\n\t}",
"@Override\n\tpublic void dosomething2() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"public void mo21788M() {\n }",
"protected abstract void generate();",
"@Override\n\tpublic void name() {\n\t\t\n\t}",
"@Override\n\tpublic void name() {\n\t\t\n\t}",
"@Override\n\tpublic void name1() {\n\t\t\n\t}",
"@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:33:59.809 -0500\", hash_original_method = \"AC0A5CAC5D79A50D0A1A1A7D60109A25\", hash_generated_method = \"DDCD510819A32FF7BD9558A5CE176D29\")\n \nprivate ContactMethods() {}",
"public void mo2471e() {\n }",
"public void mo23813b() {\n }",
"public void smell() {\n\t\t\n\t}",
"public void mo21877s() {\n }",
"public void mo1405e() {\n }"
] | [
"0.718194",
"0.6990495",
"0.6909162",
"0.6770658",
"0.67677736",
"0.67383415",
"0.67383415",
"0.66908675",
"0.6644771",
"0.6635065",
"0.6614288",
"0.6606189",
"0.66053754",
"0.65955913",
"0.65865415",
"0.6576358",
"0.65579724",
"0.6523271",
"0.6513185",
"0.6509412",
"0.6505844",
"0.6470151",
"0.6460109",
"0.64494777",
"0.6447199",
"0.64428234",
"0.64403343",
"0.6432469",
"0.6424916",
"0.64159524",
"0.6413637",
"0.64069986",
"0.64065486",
"0.64018244",
"0.6399451",
"0.63932234",
"0.63923055",
"0.63914484",
"0.63880086",
"0.6385972",
"0.63852316",
"0.63847554",
"0.6375749",
"0.63624346",
"0.6356315",
"0.63522875",
"0.63480127",
"0.6344783",
"0.63427377",
"0.6339642",
"0.6332672",
"0.632976",
"0.63274395",
"0.6312996",
"0.6312996",
"0.6306445",
"0.630125",
"0.62999046",
"0.6295212",
"0.62922305",
"0.62908816",
"0.62873554",
"0.6282307",
"0.62796694",
"0.6269042",
"0.6263937",
"0.6262952",
"0.62619126",
"0.6260648",
"0.62511814",
"0.6250807",
"0.6246583",
"0.6242399",
"0.6240811",
"0.6230026",
"0.62298626",
"0.6216954",
"0.6216875",
"0.6211841",
"0.6198349",
"0.6196915",
"0.61968625",
"0.6196519",
"0.61962354",
"0.6196184",
"0.61939406",
"0.6193701",
"0.61864245",
"0.6185327",
"0.61841667",
"0.617329",
"0.6169778",
"0.616636",
"0.616636",
"0.6165609",
"0.61652625",
"0.6160399",
"0.6159831",
"0.6159331",
"0.615703",
"0.6153357"
] | 0.0 | -1 |
Created by Shawn on 2015/6/1. | public interface ProductRepository extends JpaRepository<Product, Long>,JpaSpecificationExecutor<Product> {
Page<Product> findByTitle(String title, Pageable pageable);
Page<Product> findByTitleAndRecommendOrHot(String title, Pageable pageable);
@Query(value = "select id, name,(select count(1) from t_product where typeId=t.id) count from t_product_type t ", nativeQuery = true)
List findProductTypeCount();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"public void gored() {\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}",
"private static void cajas() {\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\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"private void poetries() {\n\n\t}",
"public final void mo51373a() {\n }",
"protected boolean func_70814_o() { return true; }",
"private void kk12() {\n\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"private void strin() {\n\n\t}",
"public void mo38117a() {\n }",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"private void m50366E() {\n }",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"public void mo4359a() {\n }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n public void init() {\n\n }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"private void init() {\n\n\t}",
"public void skystonePos4() {\n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"public void mo21877s() {\n }",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public void skystonePos6() {\n }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\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\tprotected void doF8() {\n\t\t\r\n\t}",
"@Override\n public void init() {\n }",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"public void mo6081a() {\n }",
"public void m23075a() {\n }",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"public void mo21779D() {\n }",
"public void method_4270() {}",
"private void init() {\n\n\n\n }",
"public void Tyre() {\n\t\t\r\n\t}",
"public void mo12628c() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {}",
"@Override\n void init() {\n }",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\n protected void init() {\n }",
"@Override\n\tpublic void init() {\n\t}",
"private void m50367F() {\n }",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n public void init() {}",
"static void feladat9() {\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\n protected void getExras() {\n }",
"public void skystonePos5() {\n }",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo12930a() {\n }",
"public abstract void mo56925d();"
] | [
"0.6084503",
"0.604976",
"0.5939785",
"0.59293365",
"0.59057575",
"0.5848162",
"0.5848162",
"0.582568",
"0.57834655",
"0.57712317",
"0.57710165",
"0.57698864",
"0.57507765",
"0.5750727",
"0.5740772",
"0.5728338",
"0.5715742",
"0.57040316",
"0.57009023",
"0.56987464",
"0.56908166",
"0.56867427",
"0.56842786",
"0.567213",
"0.56627536",
"0.5659474",
"0.5659474",
"0.5659474",
"0.5659474",
"0.5659474",
"0.5650859",
"0.5636516",
"0.56095934",
"0.5601113",
"0.55950415",
"0.5584755",
"0.5563033",
"0.5551982",
"0.5550154",
"0.55267614",
"0.55188316",
"0.5510843",
"0.5499505",
"0.5499505",
"0.5498025",
"0.5496328",
"0.5496328",
"0.5496328",
"0.5481117",
"0.5478292",
"0.5470753",
"0.54684573",
"0.54684573",
"0.54553854",
"0.5451065",
"0.5451065",
"0.5451065",
"0.5451065",
"0.5451065",
"0.5451065",
"0.5451065",
"0.54501325",
"0.54501325",
"0.54501325",
"0.54489905",
"0.544387",
"0.54374504",
"0.5435379",
"0.5435379",
"0.5435379",
"0.5432336",
"0.54251426",
"0.5420936",
"0.54191726",
"0.54179126",
"0.54179126",
"0.54148716",
"0.5412946",
"0.54125077",
"0.54113865",
"0.54025316",
"0.5400162",
"0.5394829",
"0.5391924",
"0.53850675",
"0.53847975",
"0.5382037",
"0.53800005",
"0.5379999",
"0.53790635",
"0.53764474",
"0.53734684",
"0.53707206",
"0.5368997",
"0.5366429",
"0.53639936",
"0.5353871",
"0.53515726",
"0.53470147",
"0.5345528",
"0.53445303"
] | 0.0 | -1 |
/ 30: / 31: | public void think()
/* 32: */ {
/* 33: 29 */ think_blocking();
/* 34: */ } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Period mo20733e();",
"private int normalizeTime() {\n int currentTimeSeconds = (int) (System.currentTimeMillis() / 1000);\n\n // The graphing interval in minutes\n // TODO not hardcoded :3\n int interval = 30;\n\n // calculate the devisor denominator\n int denom = interval * 60;\n\n return (int) Math.round((currentTimeSeconds - (denom / 2d)) / denom) * denom;\n }",
"void milestone4(int inputSeconds){\n int days = inputSeconds / 86400;\n int seconds = inputSeconds % 86400;\n int hours = seconds / 3600;\n seconds = seconds % 3600;\n int minutes = seconds / 60;\n seconds = seconds % 60;\n\n System.out.println(\"Day/s: \" + days);\n System.out.println(\"Hour/s: \" + hours);\n System.out.println(\"Minute/s: \" + minutes);\n System.out.println(\"Second/s: \" + seconds);\n }",
"public int interval() {\n return 30;\n }",
"@Test public void shouldGive240MinFor950cent() {\r\n // Three hours: $1.5+2.0+3.0\r\n assertEquals( 4 * 60 /*minutes*/ , rs.calculateTime(950) ); \r\n }",
"@Override\n protected int func_150123_b(int p_150123_1_)\n {\n return 60;\n }",
"int getPeriod();",
"public int mo36g() {\n return 4;\n }",
"@Test\n public void Keypad() {\n Assert.assertEquals(11, Computation.keypadTime(\"91566165\",\"639485712\"));\n Assert.assertEquals(1, Computation.keypadTime(\"5111\",\"752961348\"));\n }",
"int main()\n{\n cin>>a.h>>a.m>>a.s>>b.h>>b.m>>b.s;\n int x=a.s-b.s;\n int y=a.m-b.m;\n int z=a.h-b.h;\n if(y<0){\n y+=60;\n z--;\n }\n if(x<0){\n x+=60;\n y--;\n }\n cout<<z<<\":\"<<y<<\":\"<<x;\n}",
"public int mo36g() {\n return 8;\n }",
"protected int getNumberOfPeriods()\n {\n return 2;\n }",
"public int getHowManyInPeriod();",
"@Test public void Year_2__month__day()\t\t\t\t\t\t\t{tst_date_(\"03/31/2001\"\t\t\t\t, \"2001-03-31\");}",
"public void hora()\n {\n horaTotal = HoraSalida - HoraLlegada;\n\n }",
"public int mo36g() {\n return 2;\n }",
"public int getAvpfRrInterval();",
"public abstract Integer mo36210m();",
"void mo1506m();",
"public void normalize(){\r\n /*//cambios 30 de agosto\r\n if (firstExtreme<0&&secondExtreme<0){\r\n firstExtreme=-firstExtreme;\r\n secondExtreme=-secondExtreme;\r\n }\r\n //fin cambios 30 de agosto*/\r\n if (firstExtreme>secondExtreme){\r\n double auxExtreme = firstExtreme;\r\n char auxLimit = feIncluded;\r\n firstExtreme = secondExtreme;\r\n secondExtreme = auxExtreme;\r\n feIncluded = seIncluded==']'?'[':'(';\r\n seIncluded = auxLimit=='['?']':')';\r\n }\r\n }",
"private static int m31084a(zzss zzss) {\n int a = zzss.mo32193a(5);\n if (a == 31) {\n return zzss.mo32193a(6) + 32;\n }\n return a;\n }",
"@Test public void shouldGive120MinFor350cent() {\r\n // Two hours: $1.5+2.0\r\n assertEquals( 2 * 60 /*minutes*/ , rs.calculateTime(350) ); \r\n }",
"void mo1507n();",
"static com.tencent.mm.plugin.appbrand.jsapi.b.a.a nI(java.lang.String r4) {\n /*\n r0 = 0;\n r1 = r4.length();\n r2 = 5;\n r1 = java.lang.Math.min(r1, r2);\n r1 = java.lang.Math.max(r0, r1);\n r1 = r4.substring(r0, r1);\n r2 = r1.toLowerCase();\n r1 = -1;\n r3 = r2.hashCode();\n switch(r3) {\n case 99228: goto L_0x003a;\n case 3704893: goto L_0x0025;\n case 104080000: goto L_0x002f;\n default: goto L_0x001e;\n };\n L_0x001e:\n r0 = r1;\n L_0x001f:\n switch(r0) {\n case 0: goto L_0x0045;\n case 1: goto L_0x0048;\n case 2: goto L_0x004b;\n default: goto L_0x0022;\n };\n L_0x0022:\n r0 = MONTH;\n L_0x0024:\n return r0;\n L_0x0025:\n r3 = \"year\";\n r2 = r2.equals(r3);\n if (r2 == 0) goto L_0x001e;\n L_0x002e:\n goto L_0x001f;\n L_0x002f:\n r0 = \"month\";\n r0 = r2.equals(r0);\n if (r0 == 0) goto L_0x001e;\n L_0x0038:\n r0 = 1;\n goto L_0x001f;\n L_0x003a:\n r0 = \"day\";\n r0 = r2.equals(r0);\n if (r0 == 0) goto L_0x001e;\n L_0x0043:\n r0 = 2;\n goto L_0x001f;\n L_0x0045:\n r0 = YEAR;\n goto L_0x0024;\n L_0x0048:\n r0 = MONTH;\n goto L_0x0024;\n L_0x004b:\n r0 = DAY;\n goto L_0x0024;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.mm.plugin.appbrand.jsapi.b.a.a.nI(java.lang.String):com.tencent.mm.plugin.appbrand.jsapi.b.a$a\");\n }",
"protected String mo3406c() {\n return \"Minute\";\n }",
"@Test public void shouldGive180MinFor650cent() {\r\n // Three hours: $1.5+2.0+3.0\r\n assertEquals( 3 * 60 /*minutes*/ , rs.calculateTime(650) ); \r\n }",
"@Test public void Day_1__month__year()\t\t\t\t\t\t\t{tst_date_(\"03-31-02\"\t\t\t\t, \"2002-03-31\");}",
"int getAgeYearsRelativeToReferencePoint(Calendar anchorTime, Calendar testTime);",
"long mo20406a();",
"public static int numDaysInMonth(int month){\r\n switch (month) {\r\n case 1:\r\n case 3:\r\n case 5:\r\n case 7:\r\n case 9:\r\n case 11:\r\n return 31;\r\n case 2:\r\n return 29;\r\n\r\n default:\r\n return 30\r\n }\r\n}",
"public int getLBR_ProtestDays();",
"private void convertLabelsToInt(){\n String sec = tSec.getText();\n sec = sec.replaceAll(\"[^0-9\\\\s+]\", \"\");\n seconds = Integer.parseInt(sec.trim());\n \n String min = tMin.getText();\n min = min.replaceAll(\"[^0-9\\\\s+]\", \"\");\n minutes = Integer.parseInt(min.trim());\n \n String hour = tHours.getText();\n hour = hour.replaceAll(\"[^0-9\\\\s+]\", \"\");\n hours = Integer.parseInt(hour.trim());\n }",
"int getSatMod(){\n return getPercentageValue(\"satMod\");\n }",
"long mo309d();",
"@Test(timeout = 4000)\n public void test036() throws Throwable {\n Range range0 = Range.of(3132L);\n Range range1 = Range.of(3132L);\n range0.equals(range1);\n long long0 = range0.getEnd();\n assertSame(range0, range1);\n assertEquals(3132L, long0);\n }",
"public static void main(String[] args) {\n\t\tint mon=2;\r\n\t\tswitch(mon){\r\n\t\tcase 1:System.out.println(mon + \"=31\");break;\r\n\t\tcase 2:System.out.println(mon + \"=28\");break;\r\n\t\tcase 3:System.out.println(mon + \"=31\");break;\r\n\t\tcase 4:System.out.println(mon + \"=30\");break;\r\n\t\tcase 5:System.out.println(mon + \"=31\");break;\r\n\t\tcase 6:System.out.println(mon + \"=30\");break;\r\n\t\tcase 7:System.out.println(mon + \"=31\");break;\r\n\t\tcase 8:System.out.println(mon + \"=31\");break;\r\n\t\tcase 9:System.out.println(mon + \"=30\");break;\r\n\t\tcase 10:System.out.println(mon + \"=31\");break;\r\n\t\tcase 11:System.out.println(mon + \"=30\");break;\r\n\t\tcase 12:System.out.println(mon + \"=31\");break;\r\n\t\t}\r\n\t}",
"@Test public void shouldGive60MinFor150cent() {\r\n // First hour: $1.5\r\n assertEquals( 60 /*minutes*/, rs.calculateTime(150) ); \r\n }",
"@Test public void Time_len_6()\t\t\t\t\t\t\t\t\t{tst_time_(\"041526\"\t\t\t\t\t, \"04:15:26.000\");}",
"private KilometersPerHour() {}",
"public static String timeInWords(final int h, final int m) {\n\n\t\tif(m == 0) {\n\t\t\treturn getFromNumber(h).getWord() + \" \" + minuteInWord(m);\n\t\t} else if (m > 30) {\n\t\t\treturn minuteInWord(60 - m) + \" to \" + getFromNumber(h + 1).getWord();\n\t\t} else {\n\t\t\treturn minuteInWord(m) + \" past \" + getFromNumber(h).getWord();\n\t\t}\n\n }",
"private void m3935R() {\n int i;\n int i2;\n if (mo4322L() == 1) {\n i2 = mo4758r() - mo4756p();\n i = mo4754o();\n } else {\n i2 = mo4741h() - mo4752n();\n i = mo4757q();\n }\n m3945n(i2 - i);\n }",
"int mo1505l();",
"@Test\n public void fixedTests() {\n assertEquals(69978 , Day02.parseInt(\"sixty nine thousand nine hundred seventy eight\"));\n }",
"public int getInterdigitInterval();",
"@Test public void Year_0__month__day()\t\t\t\t\t\t\t{tst_date_(\"2001-03-31\"\t\t\t\t, \"2001-03-31\");}",
"@Test public void Ago()\t\t\t\t\t\t\t\t\t\t{tst_date_(\"1 month ago\"\t\t\t, \"2012-01-27\");}",
"private int K(int t)\n {\n if(t<=19)\n return 0x5a827999;\n else if(t<=39)\n return 0x6ed9eba1;\n else if(t<=59)\n return 0x8f1bbcdc;\n else \n return 0xca62c1d6;\n }",
"public static void main(String[] args) {\n byte month=0;\n boolean days28 = month ==2;\n boolean days30 = month==4||month==6||month==9||month==11;\n boolean days31 = days28==false&&days30==false;\n if (days28){\n System.out.println(\"it has 28 days\");\n }\n if (days30){\n System.out.println(\"it has 30 days\");\n }\n if (days31){\n System.out.println(\"it has 31 days\");\n }\n\n }",
"public void mo12202n() {\n this.f10959n = -1;\n }",
"@Test\n public void testSplitTime(){\n \tCountDownTimer s = new CountDownTimer();\n \ts.splitTime(3975);\n \tassertEquals(s.toString(), \"1:06:15\");\n \t\n \ts.splitTime(45);\n \tassertEquals(s.toString(), \"0:00:45\");\n \t\n }",
"@Test\n public void modTimeTest() {\n // TODO: test modTime\n }",
"public void mo1531a() {\n }",
"@Test\n\tpublic void repeatingIndexOfLastDigitTest() {\n\t\tAssert.assertTrue(ifn.repeatingIndexOfLastDigit() == 60);\n\t}",
"private static int m24353e(int i) {\n return i - (i >> 2);\n }",
"protected EditorLanguage timeDiff(String varStart, String varEnd)\n\t{\n\t\treturn text('(').text(varEnd).text(\" - \").text(varStart).text(\") / 1000.0\");\n\t}",
"public void TicTac()\n {\n if(minutos<=59)\n {\n minutos=minutos+1;\n \n }\n else\n {\n minutos=00;\n horas+=1;\n \n }\n if(horas>23)\n {\n horas=00;\n \n }\n else\n {\n minutos+=1;\n }\n }",
"int mo23521Ly();",
"public static void main(String[] args) {\n for (int t =0; t<=30; t++) {\n\t if (t<10) {\n\t System.out.println(\"The time is 07:\" + \"0\" +t);\n }else {\n\t System.out.println(\"The time is 07:\" +t);\n }\n\t\n\t}\n\tint min = 0;\n\twhile (min<=30) {\n\t\tif (min <10) {\n\t\t\t System.out.println(\"The time is 07:\" + \"0\" +min);\t\n\t\t}else {\n\t\t\t System.out.println(\"The time is 07:\" +min);\n\t\t}\n\tmin++;\n\t}\n\tint minute = 0;\n\tdo {\n\t\tif (minute<10) {\n\t\t\t System.out.println(\"The time is 07:\" + \"0\" +minute);\n\t\t}else {\n\t\t\t System.out.println(\"The time is 07:\" +minute);\n\t\t}\n\tminute++;\n\t}while (minute<31);\n\t}",
"public int method_2436() {\r\n return 16;\r\n }",
"@Override\n protected long advanceH(final long k) {\n return 5 * k - 2;\n }",
"long mo1154d();",
"private void parseIntoInterval(DefaultTimeInterval ti, String token) {\r\n\t\ttoken = token.toUpperCase();\r\n\t\tint interval = 0;\r\n\t\tif (token.indexOf(MIN_INTERVAL_STR) > 0) {\r\n\t\t\tinterval = new Integer(token.substring(0, token\r\n\t\t\t\t\t.indexOf(MIN_INTERVAL_STR))).intValue();\r\n\t\t\tti._numberOfIntervals[MIN_INTERVAL] += interval;\r\n\t\t} else if (token.indexOf(HOUR_INTERVAL_STR) > 0) {\r\n\t\t\tinterval = new Integer(token.substring(0, token\r\n\t\t\t\t\t.indexOf(HOUR_INTERVAL_STR))).intValue();\r\n\t\t\tti._numberOfIntervals[HOUR_INTERVAL] += interval;\r\n\t\t} else if (token.indexOf(DAY_INTERVAL_STR) > 0) {\r\n\t\t\tinterval = new Integer(token.substring(0, token\r\n\t\t\t\t\t.indexOf(DAY_INTERVAL_STR))).intValue();\r\n\t\t\tti._numberOfIntervals[DAY_INTERVAL] += interval;\r\n\t\t} else if (token.indexOf(WEEK_INTERVAL_STR) > 0) {\r\n\t\t\tinterval = new Integer(token.substring(0, token\r\n\t\t\t\t\t.indexOf(WEEK_INTERVAL_STR))).intValue();\r\n\t\t\tti._numberOfIntervals[WEEK_INTERVAL] += interval;\r\n\t\t} else if (token.indexOf(MONTH_INTERVAL_STR) > 0) {\r\n\t\t\tinterval = new Integer(token.substring(0, token\r\n\t\t\t\t\t.indexOf(MONTH_INTERVAL_STR))).intValue();\r\n\t\t\tti._numberOfIntervals[MONTH_INTERVAL] += interval;\r\n\t\t} else if (token.indexOf(YEAR_INTERVAL_STR) > 0) {\r\n\t\t\tinterval = new Integer(token.substring(0, token\r\n\t\t\t\t\t.indexOf(YEAR_INTERVAL_STR))).intValue();\r\n\t\t\tti._numberOfIntervals[YEAR_INTERVAL] += interval;\r\n\t\t} else if (token.indexOf(DECADE_INTERVAL_STR) > 0) {\r\n\t\t\tinterval = new Integer(token.substring(0, token\r\n\t\t\t\t\t.indexOf(DECADE_INTERVAL_STR))).intValue();\r\n\t\t\tti._numberOfIntervals[DECADE_INTERVAL] += interval;\r\n\t\t} else if (token.indexOf(CENTURY_INTERVAL_STR) > 0) {\r\n\t\t\tinterval = new Integer(token.substring(0, token\r\n\t\t\t\t\t.indexOf(CENTURY_INTERVAL_STR))).intValue();\r\n\t\t\tti._numberOfIntervals[CENTURY_INTERVAL] += interval;\r\n\t\t}\r\n\t}",
"public int a() {\n return 366;\n }",
"@Test\n public void testDAM31102001() {\n testDAM31001001();\n }",
"public double getMon6031() {\r\n\t\treturn mon6031;\r\n\t}",
"private int getOffset() {\n\t\tint offset = ((35 + ((year-1) / 4) - ((year-1) / 100) + ((year-1) / 400) + (year-1)) + 1) % 7;\n\t\tif (!name.contentEquals(\"January\") && !name.contentEquals(\"February\") && leap(year)) {\n\t\t\toffset++;\n\t\t}\n\t\tswitch(name) {\n\t\tcase \"February\":\n\t\t\toffset += 31;\n\t\t\tbreak;\n\t\tcase \"March\":\n\t\t\toffset += 59;\n\t\t\tbreak;\n\t\tcase \"April\":\n\t\t\toffset += 90;\n\t\t\tbreak;\n\t\tcase \"May\":\n\t\t\toffset += 120;\n\t\t\tbreak;\n\t\tcase \"June\":\n\t\t\toffset += 151;\n\t\t\tbreak;\n\t\tcase \"July\":\n\t\t\toffset += 181;\n\t\t\tbreak;\n\t\tcase \"August\":\n\t\t\toffset += 212;\n\t\t\tbreak;\n\t\tcase \"September\":\n\t\t\toffset += 243;\n\t\t\tbreak;\n\t\tcase \"October\":\n\t\t\toffset += 273;\n\t\t\tbreak;\n\t\tcase \"November\":\n\t\t\toffset += 304;\n\t\t\tbreak;\n\t\tcase \"December\":\n\t\t\toffset += 334;\n\t\t\tbreak;\n\t\t}\n\t\treturn offset % 7;\n\t}",
"int getTonicNote(){\n String lastnote=\"\";\n int result;\n lastnote += Strinput.toCharArray()[Strinput.length()-4];\n lastnote += Strinput.toCharArray()[Strinput.length()-3];\n result = Integer.parseInt(lastnote);\n if(result<72){\n return result-60;\n }else{\n return result-12-60;\n }\n }",
"public void mo12930a() {\n }",
"static void m14930d(String str) {\n int b = m14929b();\n int d = C3205z0.INFO.mo12550d();\n }",
"public static void main(String [] args){//inicio del main\r\n\r\n Scanner sc= new Scanner(System.in); \r\n\r\nSystem.out.println(\"ingrese los segundos \");//mesaje\r\nint num=sc.nextInt();//total de segundos\r\nint hor=num/3600;//total de horas en los segundos\r\nint min=(num-(3600*hor))/60;//total de min en las horas restantes\r\nint seg=num-((hor*3600)+(min*60));//total de segundo sen los miniutos restantes\r\nSystem.out.println(\"Horas: \" + hor + \" Minutos: \" + min + \" Segundos: \" + seg);//salida del tiempo\r\n\r\n}",
"@Test(timeout = 4000)\n public void test31() throws Throwable {\n JDayChooser jDayChooser0 = new JDayChooser(true);\n jDayChooser0.setMaxDayCharacters(12);\n jDayChooser0.isWeekOfYearVisible();\n jDayChooser0.getSelectedDay();\n jDayChooser0.setEnabled(true);\n jDayChooser0.getUIClassID();\n KeyEvent keyEvent0 = new KeyEvent(jDayChooser0, 12, (-2472L), 12, 12, 'l');\n jDayChooser0.keyTyped(keyEvent0);\n jDayChooser0.keyPressed(keyEvent0);\n SystemColor systemColor0 = SystemColor.activeCaptionBorder;\n jDayChooser0.setDecorationBackgroundColor(systemColor0);\n assertEquals(14, jDayChooser0.getDay());\n assertEquals(0, jDayChooser0.getMaxDayCharacters());\n }",
"public int getDuration( ) {\nreturn numberOfPayments / MONTHS;\n}",
"public int getDuration()\r\n/* 70: */ {\r\n/* 71: 71 */ return this.duration;\r\n/* 72: */ }",
"public abstract Integer mo36212o();",
"private int toTime(int i) {\n int count = 0;\n\n //hours units\n count += toLeds((i / 6000) % 10);\n //hours tens\n count += toLeds(((i / 6000) % 100) / 10);\n\n //minutes units\n count += toLeds((i / 60) % 10);\n //minutes tens\n count += toLeds(((i / 60) % 100) / 10);\n\n //seconds units\n count += toLeds((i % 60) % 10);\n //seconds tens\n count += toLeds(((i % 60) % 100) / 10);\n\n return count;\n }",
"double getPeriod();",
"public int diff21(int n) {\n int dif = 21 - n;\n if (n > 21){\n dif = (n -21) * 2;\n }\n\n return dif;\n}",
"@Test\n public void checkDivisibilityByHundred() {\n LeapYear leapYear = new LeapYear();\n boolean flag = leapYear.isItDivisibleByHundred(1600);\n assertTrue(flag);\n }",
"static String solve(int year){\n int beforeYear=1919, specialYear=1918, specialDay=28, sumDay=0, programmerDay=256;\n boolean leapYear=false;\n String result = null;\n if (year < beforeYear) {\n leapYear = year%4 == 0 ? true:false;\n } else {\n leapYear = (year%400 == 0 || (year%4 == 0 && year%100 != 0)) ? true : false;\n }\n for(int i=1; i < 13; i++) {\n int temp = i;\n\n if ((temp&=0x1) == 1 || i==8) {\n sumDay = sumDay + 31;\n } else {\n if (i == 2) {\n if (year == specialYear) {\n sumDay = sumDay + 15;\n } else {\n sumDay = sumDay + (leapYear ? specialDay + 1 : specialDay);\n }\n } else {\n sumDay = sumDay + 30;\n }\n }\n if ((programmerDay - sumDay) <= 30) {\n\n result = (programmerDay - sumDay) +\".\" + \"0\" + (i+1) + \".\"+ year;\n\n// try {\n// Date date = targetFmt.parse(temp1);\n//\n// return targetFmt2.parse(String.valueOf(date)).toString();\n// } catch (ParseException e) {\n// e.printStackTrace();\n// }\n return result;\n }\n }\n return result;\n }",
"void mo30290d(long j);",
"Season(String months)\n {\n span = months;\n }",
"BigInteger getPeriod();",
"private static String calcYMD(int[] age){\n\t\treturn age[2]+\" years \" + age[1] + \" months \" + age[0] + \" days \";\n\t}",
"public void EasterMath(int year)\n {\n a = year%19;\n b = Math.floor(year/100);\n c = year%100;\n d = Math.floor((b/4));\n e = b%4;\n f = Math.floor((b+8)/25);\n g = Math.floor((b-f+1)/3);\n h = (19*a+b-d-g+15)%30;\n i = Math.floor(c/4);\n k = c%4;\n l = (32 + 2* e + 2 * i - h - k)%7;\n m = Math.floor((a+11*h+22*l)/451);\n month = (int) Math.floor((h+l-7*m+114)/31);\n day = (int) (((h+l-7*m+114)%31)+1);\n }",
"@Test\n public void testFindRate_PositiveResult_Mon9to12() {\n System.out.println(\"FindRate-positive result mon 0900-1200\");\n AssertRateFound(\"2015-07-06T09:00:00Z\", \"2015-07-06T20:59:00Z\", 1500); \n }",
"public static void main(String[] args) {\n int i =2003;\n long d = 13220100526L;\n System.out.println(new Date(d));\n System.out.println(i / 20 + (i % 20 > 0 ? 1 : 0));\n }",
"public static void main(String[] args) {\n\t\tString[]pp ={\"日\",\"一\",\"二\",\"三\",\"四\",\"五\",\"六\"};\r\n\t\tfor (int i = 0;i<pp.length;i++){\r\n\t\t\tSystem.out.print(pp[i]+\"\\t\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println();\r\n\t\tString s = new String(); int year; int month=12;int sum=0;int mm;int a1=0;\r\n\t\tString q = new String();String Blank = \"\";String e = \"\";\r\n\t\ts=JOptionPane.showInputDialog(\"請輸入年分\");\r\n\t\tq=JOptionPane.showInputDialog(\"請輸入月分\");\r\n\t\t\r\n\t\tyear=Integer.parseInt(s);\r\n\t\tmm=Integer.parseInt(q);\r\n\t\tint[][][] aa = new int[year][month][];\r\n\t\tfor(int y = 1752 ; y<=aa.length;y++){\r\n\t\tfor (int i = 0;i<aa[y-1].length;i++){\r\n\t\t\tswitch(i){\r\n\t\t\tcase 0: case 2: case 4: case 6: case 7: case 9: case 11:\r\n\t\t\taa[y-1][i]=new int[31];\r\n\t\t\tbreak;\r\n\t\t\tcase 3: case 5: case 8: case 10:\r\n\t\t\taa[y-1][i]=new int[30];\r\n\t\t\tbreak;\r\n\t\t\tcase 1:\r\n\t\t\t\tif (y % 4 == 0){\r\n\t\t\t\t\tif (y % 100 == 0){\r\n\t\t\t\t\t\tif (y % 400 == 0){\r\n\t\t\t\t\t\t\taa[y-1][1]=new int[29];\r\n\t\t\t\t\t\t\t// 29\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\taa[y-1][1]=new int[28];\r\n\t\t\t\t\t\t\t// 28\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\taa[y-1][1]=new int[28];\r\n\t\t\t\t\t\t// 28\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\taa[y-1][1]=new int[28];\r\n\t\t\t\t\t// 28\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t}\t\r\n\t\t\tfor(int m = 0 ; m < aa[y-1].length;m++){\r\n\t\t\t\tfor(int d = 0; d< aa[y-1][m].length;d++){\r\n\t\t\t\t\tsum+=1;\r\n\t\t\t\t\taa[y-1][m][d]=d+1;\r\n\t\t\t\t}\r\n\t\t}\r\n\t\t}\t\t\r\n\t\tfor ( int r=mm;r<=aa[year-1].length;r++){\r\n\t\t\tfor(int i =0;i<aa[year-1][r-1].length;i++){\r\n\t\t\t\ta1++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tsum=sum-256-a1;\r\n\t\t\r\n\t\t\r\n\t\r\n\tfor (int b = 0;b<((sum-3)%7);b++){\r\n\t\t\t\tBlank=Blank + \"\\t\";\r\n\t}\r\n\t\t\r\n\t\t\r\n\t\tfor (int a = 0;a<aa[year-1][mm-1].length;a++){\r\n\t\t\tif(((sum-3)%7+a+1)%7==0){\r\n\t\t\te=e+(aa[year-1][mm-1][a]+\"\\t\" +\"\\n\");\t\t\r\n\t\t\t}else{\r\n\t\t\te=e+(aa[year-1][mm-1][a]+\"\\t\");\t\r\n\t\t\t}\r\n\t}\r\n\t\tSystem.out.println(Blank+e);\r\n\t}",
"public void uneSecondeDePlus() {\n\t\tthis.s = s+1 > 59 ? 0 : s+1;\n\t}",
"public Integer getPresentDays()\r\n/* 48: */ {\r\n/* 49:51 */ return this.presentDays;\r\n/* 50: */ }",
"@Test\n public void checkDivisibilityByFourHundred() {\n LeapYear leapYear = new LeapYear();\n boolean flag = leapYear.isItDivisibleByFourHundred(1600);\n assertTrue(flag);\n }",
"public int getSecondR() {\n/* 48 */ return this.secondR;\n/* */ }",
"@Override\n\tpublic int horas_trabajo() {\n\t\treturn 1000;\n\t}",
"private void normalGmtStringToMinutes() {\n int i = Integer.parseInt(gmtString.substring(4, 6));\n offsetMinutes = i * 60;\n i = Integer.parseInt(gmtString.substring(7));\n offsetMinutes += i;\n if (gmtString.charAt(3) == MINUS) {\n offsetMinutes *= -1;\n }\n }",
"int pacemodulator() {\n int buckpacedirector = ((rand.nextInt() >> rightshift) & 7);\n int rbuckpacedirector = 0;\n\n rbuckpacedirector = switch (buckpacedirector)\n {\n case 0 -> 2;\n case 1 -> 3;\n case 2 -> 4;\n case 3 -> 5;\n case 4 -> 6;\n case 5 -> 7;\n case 6 -> 8;\n default -> 1;\n };\n return rbuckpacedirector;\n }",
"String canonHr(String s) {\n List<String> l = StringUtil.breakAt(s, \":\");\n if (l.size() == 2) {\n return l.get(0) + \":\" + l.get(1).toUpperCase();\n }\n return s.toUpperCase();\n }",
"private static double getTwoDigitMills(Period period) {\n return (double) Math.round(period.getMillis() / 10d);\n }",
"private int daysInMonth(int month)\r\n {\n \r\n \tif (month == 4 || month == 5 || month == 9 || month == 11)\r\n \t{\r\n \t\treturn 30;\r\n \t}\r\n \tif (month == 2)\r\n \t{\r\n \t\tif (leapYear(year))\r\n \t\t{\r\n \t\t\treturn 29;\r\n \t\t}\r\n \t\telse \r\n \t\t{\r\n \t\t\treturn 28;\r\n \t\t}\r\n \t}\r\n \telse\r\n \t{\r\n \t\treturn 31;\r\n \t}\r\n }",
"public abstract long mo9229aD();",
"public interface ITimeUnits {\r\n\r\n\t//Las constantes deben coincidir con los valores de base de datos.\r\n\tpublic static final int HOUR=1;\r\n\tpublic static final int MINUTE=2;\r\n\tpublic static final int DAY=3;\r\n\t\r\n\tpublic static final String SHOUR=\"Horas\";\r\n\tpublic static final String SMINUTE=\"Minutos\";\r\n\tpublic static final String SDAY=\"Días\";\r\n}",
"public static int offset_group() {\n return (24 / 8);\n }",
"protected long m8217a(long j) {\n return (j * 1000000) / ((long) this.f7048i);\n }"
] | [
"0.58123296",
"0.5408091",
"0.5296399",
"0.5293057",
"0.51881385",
"0.51842034",
"0.5079915",
"0.5076881",
"0.5054898",
"0.5010471",
"0.5004682",
"0.50012267",
"0.49471682",
"0.49352333",
"0.4921015",
"0.49166724",
"0.48979965",
"0.48919165",
"0.48887467",
"0.48849365",
"0.48666975",
"0.48604488",
"0.48576826",
"0.48426998",
"0.48411813",
"0.4837726",
"0.4826068",
"0.4819891",
"0.48176116",
"0.48128495",
"0.48072445",
"0.47954333",
"0.47925156",
"0.47894827",
"0.47877967",
"0.47849497",
"0.47789085",
"0.47719932",
"0.4771464",
"0.47708267",
"0.4767871",
"0.47608545",
"0.47462624",
"0.4746244",
"0.47364172",
"0.4733786",
"0.47319517",
"0.47316375",
"0.47207385",
"0.4714822",
"0.47136563",
"0.47086906",
"0.4700484",
"0.46998572",
"0.46908975",
"0.4689282",
"0.46796435",
"0.467897",
"0.46781698",
"0.4676435",
"0.46757033",
"0.46634948",
"0.4661609",
"0.46549213",
"0.46500507",
"0.46381152",
"0.4637047",
"0.46369123",
"0.46164674",
"0.4613997",
"0.4613437",
"0.4612281",
"0.46113962",
"0.4607124",
"0.4605805",
"0.4604927",
"0.4601083",
"0.45994437",
"0.45981082",
"0.45908618",
"0.45876265",
"0.4587188",
"0.45841357",
"0.45783845",
"0.45731473",
"0.45730236",
"0.45712438",
"0.4571108",
"0.45641032",
"0.45584202",
"0.4557269",
"0.45553285",
"0.4551495",
"0.45513505",
"0.45463338",
"0.45457268",
"0.45452592",
"0.45426634",
"0.45424616",
"0.45398486",
"0.4537719"
] | 0.0 | -1 |
/ 35: / 36: | public void think_blocking()
/* 37: */ {
/* 38: 33 */ Scanner in = new Scanner(System.in);
/* 39: */ Object localObject;
/* 40:143 */ for (;; ((Iterator)localObject).hasNext())
/* 41: */ {
/* 42: 38 */ System.out.print("Next action ([move|land|attk] id; list; exit): ");
/* 43: */
/* 44: 40 */ String[] cmd = in.nextLine().split(" ");
/* 45: */
/* 46: 42 */ System.out.print("Processing command... ");
/* 47: 43 */ System.out.flush();
/* 48: */
/* 49: 45 */ this.game.updateSimFrame();
/* 50: */
/* 51: */
/* 52: */
/* 53: */
/* 54: */
/* 55: */
/* 56: 52 */ MapView<Integer, Base.BasicView> bases = this.game.getAllBases();
/* 57: 53 */ MapView<Integer, Plane.FullView> planes = this.game.getMyPlanes();
/* 58: 54 */ MapView<Integer, Plane.BasicView> ennemy_planes = this.game.getEnnemyPlanes();
/* 59: */
/* 60: 56 */ List<Command> coms = new ArrayList();
/* 61: */ try
/* 62: */ {
/* 63: 59 */ boolean recognized = true;
/* 64: 60 */ switch ((localObject = cmd[0]).hashCode())
/* 65: */ {
/* 66: */ case 3004906:
/* 67: 60 */ if (((String)localObject).equals("attk")) {}
/* 68: */ break;
/* 69: */ case 3127582:
/* 70: 60 */ if (((String)localObject).equals("exit")) {
/* 71: */ break label914;
/* 72: */ }
/* 73: */ break;
/* 74: */ case 3314155:
/* 75: 60 */ if (((String)localObject).equals("land")) {
/* 76: */ break;
/* 77: */ }
/* 78: */ break;
/* 79: */ case 3322014:
/* 80: 60 */ if (((String)localObject).equals("list")) {}
/* 81: */ case 3357649:
/* 82: 60 */ if ((goto 793) && (((String)localObject).equals("move")))
/* 83: */ {
/* 84: 64 */ if (cmd.length != 2) {
/* 85: */ break label804;
/* 86: */ }
/* 87: 66 */ int id = Integer.parseInt(cmd[1]);
/* 88: 67 */ Base.BasicView b = (Base.BasicView)bases.get(Integer.valueOf(id));
/* 89: 68 */ Coord.View c = null;
/* 90: 70 */ if (b == null)
/* 91: */ {
/* 92: 71 */ if (this.game.getCountry().id() != id)
/* 93: */ {
/* 94: 73 */ System.err.println("This id isn't corresponding neither to a base nor your country");
/* 95: */ break label804;
/* 96: */ }
/* 97: 77 */ c = this.game.getCountry().position();
/* 98: */ }
/* 99: */ else
/* 100: */ {
/* 101: 79 */ c = b.position();
/* 102: */ }
/* 103: 81 */ for (Plane.FullView p : planes.valuesView()) {
/* 104: 82 */ coms.add(new MoveCommand(p, c));
/* 105: */ }
/* 106: */ break label804;
/* 107: 87 */ int id = Integer.parseInt(cmd[1]);
/* 108: 88 */ Base.BasicView b = (Base.BasicView)bases.get(Integer.valueOf(id));
/* 109: 89 */ AbstractBase.View c = null;
/* 110: 91 */ if (b == null)
/* 111: */ {
/* 112: 92 */ if (this.game.getCountry().id() != id)
/* 113: */ {
/* 114: 94 */ System.err.println("You can't see this base, move around it before you land");
/* 115: */ break label804;
/* 116: */ }
/* 117: 98 */ c = this.game.getCountry();
/* 118: */ }
/* 119: */ else
/* 120: */ {
/* 121:100 */ c = b;
/* 122: */ }
/* 123:102 */ for (Plane.FullView p : planes.valuesView()) {
/* 124:103 */ coms.add(new LandCommand(p, c));
/* 125: */ }
/* 126: */ break label804;
/* 127:108 */ Plane.BasicView ep = (Plane.BasicView)ennemy_planes.get(Integer.valueOf(Integer.parseInt(cmd[1])));
/* 128:109 */ if (ep == null)
/* 129: */ {
/* 130:111 */ System.err.println("Bad id, this plane does not exists");
/* 131: */ }
/* 132: */ else
/* 133: */ {
/* 134:114 */ for (Plane.FullView p : planes.valuesView()) {
/* 135:115 */ coms.add(new AttackCommand(p, ep));
/* 136: */ }
/* 137: */ break label804;
/* 138:118 */ System.out.println();
/* 139:119 */ System.out.println(">> My planes:");
/* 140:120 */ for (Plane.FullView p : planes.valuesView()) {
/* 141:121 */ System.out.println(p);
/* 142: */ }
/* 143:122 */ System.out.println(">> Ennemy planes:");
/* 144:123 */ for (Plane.BasicView p : ennemy_planes.valuesView()) {
/* 145:124 */ System.out.println(p);
/* 146: */ }
/* 147:125 */ System.out.println(">> Visible bases :");
/* 148:126 */ for (Base.FullView b : this.game.getVisibleBase().valuesView()) {
/* 149:127 */ System.out.println(b);
/* 150: */ }
/* 151:128 */ System.out.println(">> Your Country");
/* 152:129 */ System.out.println(this.game.getCountry());
/* 153: */ }
/* 154: */ }
/* 155:130 */ break;
/* 156: */ }
/* 157:132 */ recognized = false;
/* 158:133 */ System.err.println("Unrecognized command!");
/* 159: */ label804:
/* 160:135 */ if (recognized) {
/* 161:136 */ System.out.println("Processed");
/* 162: */ }
/* 163: */ }
/* 164: */ catch (IllegalArgumentException e)
/* 165: */ {
/* 166:139 */ System.out.println("Command failed: " + e);
/* 167:140 */ System.err.println("Command failed: " + e);
/* 168: */ }
/* 169:143 */ localObject = coms.iterator(); continue;Command c = (Command)((Iterator)localObject).next();
/* 170:144 */ this.game.sendCommand(c);
/* 171: */ }
/* 172: */ label914:
/* 173:148 */ in.close();
/* 174:149 */ this.game.quit(0);
/* 175: */ } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int mo36g() {\n return 4;\n }",
"public int mo36g() {\n return 8;\n }",
"public int mo36g() {\n return 2;\n }",
"public int method_2436() {\r\n return 16;\r\n }",
"private int K(int t)\n {\n if(t<=19)\n return 0x5a827999;\n else if(t<=39)\n return 0x6ed9eba1;\n else if(t<=59)\n return 0x8f1bbcdc;\n else \n return 0xca62c1d6;\n }",
"@Test\n public void Keypad() {\n Assert.assertEquals(11, Computation.keypadTime(\"91566165\",\"639485712\"));\n Assert.assertEquals(1, Computation.keypadTime(\"5111\",\"752961348\"));\n }",
"@Override\n protected long advanceH(final long k) {\n return 5 * k - 2;\n }",
"private static String m10f() {\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"sh\");\n stringBuilder.append(\"el\");\n stringBuilder.append(\"la\");\n return stringBuilder.toString();\n }",
"public abstract Integer mo36210m();",
"public void uneHeureDePlus() {\n\t\tthis.h = h+1 > 23 ? 0 : h+1 ;\n\t}",
"public int mo3836t() {\n return this.f1467ap;\n }",
"public int mo34973b() {\n return 48;\n }",
"void mo33731Pw();",
"private static int m31084a(zzss zzss) {\n int a = zzss.mo32193a(5);\n if (a == 31) {\n return zzss.mo32193a(6) + 32;\n }\n return a;\n }",
"private void m3935R() {\n int i;\n int i2;\n if (mo4322L() == 1) {\n i2 = mo4758r() - mo4756p();\n i = mo4754o();\n } else {\n i2 = mo4741h() - mo4752n();\n i = mo4757q();\n }\n m3945n(i2 - i);\n }",
"public void kast() {\n\t\t// vaelg en tilfaeldig side\n\t\tdouble tilfaeldigtTal = Math.random();\n\t\tvaerdi = (int) (tilfaeldigtTal * 6 + 1);\n\t}",
"@Test(timeout = 4000)\n public void test36() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"20l}V*vRPT!yP9\");\n assertEquals(\"20l}v*vrb!yp9\", string0);\n }",
"public int method_1143(int var1) {\r\n return this.height / 4 + 0 + (24 * var1 - 24) + this.field_987;\r\n }",
"int main()\n{\n cin>>a.h>>a.m>>a.s>>b.h>>b.m>>b.s;\n int x=a.s-b.s;\n int y=a.m-b.m;\n int z=a.h-b.h;\n if(y<0){\n y+=60;\n z--;\n }\n if(x<0){\n x+=60;\n y--;\n }\n cout<<z<<\":\"<<y<<\":\"<<x;\n}",
"int getAlphaMod(){\n return getPercentageValue(\"alphaMod\");\n }",
"public abstract long mo9755t();",
"@Test(timeout = 4000)\n public void test38() throws Throwable {\n PipedReader pipedReader0 = new PipedReader();\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(pipedReader0);\n streamTokenizer0.nval = 744.4583836715912;\n String string0 = SQLUtil.renderNumber(streamTokenizer0);\n streamTokenizer0.ordinaryChar((-45));\n String string1 = SQLUtil.normalize(\"744.4583836715912\", false);\n assertTrue(string1.equals((Object)string0));\n }",
"@Test(timeout = 4000)\n public void test40() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"8B{6r2FfF_D<R@pp\");\n assertEquals(\"8b{6r2fff_d<r@p\", string0);\n }",
"public static void testTalletUlige() {\n\n if (21 % 2 == 0) {\n System.out.println(\"** \" + 21 + \" er et lige tal.\");\n }\n else\n System.out.println(\"** \" + 21 + \" er et ulige tal.\");\n }",
"public static String m13823m() {\n return f12476h;\n }",
"private int hash2(T key) { //first two char length\r\n\r\n if(key.toString().length() ==1){ //in the case that the key is only one char long\r\n return key.toString().charAt(0)%newTable.length;\r\n }\r\n return (26 * key.toString().charAt(0)+key.toString().charAt(1))% newTable.length;\r\n\r\n }",
"dkj mo4367a(dkk dkk);",
"public short mo34e() {\n return 41;\n }",
"long mo20406a();",
"public java.lang.CharSequence getVar36() {\n return var36;\n }",
"public short mo34e() {\n return 140;\n }",
"public static void main(String[] args) {\n\t\tint num=(int) (Math.random()*36 ) ;\r\n\t\tSystem.out.println( Math.random());WW\r\n\t\tSystem.out.println(num);\r\n\t}",
"long mo1636a(long j, alb alb);",
"public abstract C3635j mo9738d();",
"public abstract long mo9748m();",
"int pacemodulator() {\n int buckpacedirector = ((rand.nextInt() >> rightshift) & 7);\n int rbuckpacedirector = 0;\n\n rbuckpacedirector = switch (buckpacedirector)\n {\n case 0 -> 2;\n case 1 -> 3;\n case 2 -> 4;\n case 3 -> 5;\n case 4 -> 6;\n case 5 -> 7;\n case 6 -> 8;\n default -> 1;\n };\n return rbuckpacedirector;\n }",
"public abstract int mo9736c(int i);",
"private void m81856t() {\n try {\n String c = m81844c(C6969H.m41409d(\"G738BEA0DBA32BD20E319AF5CEBF5C6\"));\n if (!TextUtils.isEmpty(c)) {\n this.f58084p = Integer.parseInt(c);\n }\n } catch (Exception e) {\n WebUtil.m68654a(C6969H.m41409d(\"G5C91D93EBA3CAE2EE71A95\"), e.getMessage());\n }\n }",
"int stepHash(int hashKey,int length)\n\t{\n\t\tdouble constant = (Math.sqrt(2)-1)/2;\n\t\tint step = (int) Math.floor((length * ((constant* hashKey) - Math.floor(constant* hashKey)))); \n\t\tif (step == 0){//if step value = 0 (frequent at low values of length, step =1\n\t\t\treturn 1; //while this could be problematic, at small values of n, this is trivial\n\t\t}\n\t\tif (step % 2 == 0){ //if step is even\n\t\t\tstep++; //add 1 to make it odd\n\t\t}\n\t\treturn step;//mod value is not applied at the base hashLevel. It is in the insert/find/reinset respectively\n\t}",
"public java.lang.CharSequence getVar36() {\n return var36;\n }",
"int getTonicNote(){\n String lastnote=\"\";\n int result;\n lastnote += Strinput.toCharArray()[Strinput.length()-4];\n lastnote += Strinput.toCharArray()[Strinput.length()-3];\n result = Integer.parseInt(lastnote);\n if(result<72){\n return result-60;\n }else{\n return result-12-60;\n }\n }",
"private int hash3(T key) { //last char + length of word\r\n char lastchar = key.toString().charAt( key.toString().length()-1 );\r\n return (lastchar + key.toString().length())%newTable.length;\r\n }",
"public abstract int mo123249h();",
"private byte m1654g() {\n char charAt;\n do {\n int i = this.f2519d;\n if (i >= this.f2518c) {\n return 12;\n }\n CharSequence charSequence = this.f2516a;\n this.f2519d = i + 1;\n charAt = charSequence.charAt(i);\n this.f2520e = charAt;\n } while (charAt != ';');\n return 12;\n }",
"short digits();",
"public long Time33Hash(String key) {\n\t\tlong hash = 0;\n\t\tchar[] cArr = key.toCharArray();\n\n\t\tfor (int i = 0; i < cArr.length; ++i) {\n\t\t\thash = (hash * 33) + cArr[i];\n\t\t}\n\n\t\treturn hash;\n\t}",
"public static int i()\r\n/* 25: */ {\r\n/* 26: 48 */ return 9;\r\n/* 27: */ }",
"private int funcaoHash(int x) {\n\t\treturn (x % 37);\n\t}",
"public void ex() {\n int inches = 86; \n int pie = 12; //1 pie = 12 inches \n //Operaciones para obtener la cantidad de pies e inches\n int cant = inches / pie; \n int res = inches % pie;\n //Muestra de resultados\n System.out.println(inches + \" pulgadas es equivalente a\\n \" + \n cant + \" pies \\n \" + res + \" pulgadas \");\n }",
"@Override\n\tpublic int horsePower() {\n\t\treturn 336;\n\t}",
"private C1201f m6938h() {\n C1219t b = C1217q.m6361a().m6364b();\n return b != null ? b.f3525f : null;\n }",
"private int aleatorizarNumero() {\n\t\tint aux;\n\t\taux = r.getIntRand(13) + 1;\n\t\treturn aux;\n\t}",
"@Test(timeout = 4000)\n public void test41() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"4m9%dXDPbb\");\n assertEquals(\"4m9%dxdpb\", string0);\n }",
"double normalizeHeading(double h) {\n double nh = h;\n if( h>-180 && h<180 ) {\n } else if( h <= -180 ) {\n nh = h+360;\n } else if( h > 180 ) {\n nh = h-360;\n }\n return nh;\n }",
"public static void main(String[] args) {\n\n\n\n\n Scanner sc = new Scanner(System.in);\n\n System.out.println(\"4 basamakli bir sayi giriniz\");\n\n\n int sayi = sc.nextInt();\n int kalan = sayi - ((sayi / 10) );\n\n \n int onlar = sayi%10;\n System.out.println( sayi- sayi/10 *10 );\n\n\n\n\n\n }",
"public void mo9233aH() {\n }",
"private byte m1655h() {\n char charAt;\n int i = this.f2519d;\n while (true) {\n int i2 = this.f2519d;\n if (i2 <= 0) {\n break;\n }\n CharSequence charSequence = this.f2516a;\n int i3 = i2 - 1;\n this.f2519d = i3;\n char charAt2 = charSequence.charAt(i3);\n this.f2520e = charAt2;\n if (charAt2 == '<') {\n return 12;\n }\n if (charAt2 == '>') {\n break;\n } else if (charAt2 == '\\\"' || charAt2 == '\\'') {\n do {\n int i4 = this.f2519d;\n if (i4 <= 0) {\n break;\n }\n CharSequence charSequence2 = this.f2516a;\n int i5 = i4 - 1;\n this.f2519d = i5;\n charAt = charSequence2.charAt(i5);\n this.f2520e = charAt;\n } while (charAt != charAt2);\n }\n }\n this.f2519d = i;\n this.f2520e = '>';\n return 13;\n }",
"public abstract long mo9743h();",
"private int getAttackAngle() {\n\t\treturn (160 - (level * 10));\n\t}",
"String mo21078i();",
"public abstract Integer mo36212o();",
"public int getSnakeStartLength();",
"private int h1(int p){\n\t\t return p % table.length;\n\t}",
"public String tri4(int h){\n\t\tString S = \"\";\n\t\tint H = h;\n\t\tint HH = H;\n\t\tint Counter = 0;\n\t\tint UsingCounter = Counter;\n\n\t\twhile (H > 0){\n\t\t\tHH = H;\n\t\t\twhile (UsingCounter > 0){\n\t\t\t\tS = S + \" \";\n\t\t\t\tUsingCounter = UsingCounter - 1;}\n\t\t\twhile (HH > 0) {\n\t\t\t\tS = S + \"*\";\n\t\t\t\tHH = HH - 1;}\n\t\t\tCounter = Counter + 1;\n\t\t\tUsingCounter = Counter;\n\t\t\tS = S + \"\\n\";\n\t\t\tH = H - 1;}\n\n\t\treturn S; }",
"public static void m22735h() {\n if (f20301b.mo18963a()) {\n f20301b.mo18962a(C7268n.m22763a().mo18998b());\n }\n }",
"public final void mo7596sH(String str) {\n }",
"public int hash2 ( String key )\n {\n int hashVal = 0;\n if(key != null){\n for( int i = 0; i < key.length(); i++ )\n hashVal = (37 * hashVal) + key.charAt(i);\n //if(hashVal != 0)\n return hashVal % tableSize;\n //else\n // return 0;\n }\n else{\n //System.out.println(\"Key is null\");\n return 0;\n }\n }",
"private int e(String paramString, int paramInt)\r\n/* 628: */ {\r\n/* 629:624 */ int i1 = paramString.length();\r\n/* 630:625 */ int i2 = 0;\r\n/* 631:626 */ int i3 = 0;\r\n/* 632:627 */ int i4 = -1;\r\n/* 633:628 */ int i5 = 0;\r\n/* 634:631 */ for (; i3 < i1; i3++)\r\n/* 635: */ {\r\n/* 636:632 */ char c1 = paramString.charAt(i3);\r\n/* 637:634 */ switch (c1)\r\n/* 638: */ {\r\n/* 639: */ case '§': \r\n/* 640:636 */ if (i3 < i1 - 1)\r\n/* 641: */ {\r\n/* 642:637 */ char c2 = paramString.charAt(++i3);\r\n/* 643:638 */ if ((c2 == 'l') || (c2 == 'L')) {\r\n/* 644:639 */ i5 = 1;\r\n/* 645:640 */ } else if ((c2 == 'r') || (c2 == 'R') || (c(c2))) {\r\n/* 646:641 */ i5 = 0;\r\n/* 647: */ }\r\n/* 648: */ }\r\n/* 649:643 */ break;\r\n/* 650: */ case '\\n': \r\n/* 651:646 */ i3--;\r\n/* 652:647 */ break;\r\n/* 653: */ case ' ': \r\n/* 654:649 */ i4 = i3;\r\n/* 655: */ default: \r\n/* 656:651 */ i2 += a(c1);\r\n/* 657:652 */ if (i5 != 0) {\r\n/* 658:653 */ i2++;\r\n/* 659: */ }\r\n/* 660: */ break;\r\n/* 661: */ }\r\n/* 662:657 */ if (c1 == '\\n')\r\n/* 663: */ {\r\n/* 664:658 */ i3++;i4 = i3;\r\n/* 665: */ }\r\n/* 666: */ else\r\n/* 667: */ {\r\n/* 668:662 */ if (i2 > paramInt) {\r\n/* 669: */ break;\r\n/* 670: */ }\r\n/* 671: */ }\r\n/* 672: */ }\r\n/* 673:667 */ if ((i3 != i1) && (i4 != -1) && (i4 < i3)) {\r\n/* 674:668 */ return i4;\r\n/* 675: */ }\r\n/* 676:670 */ return i3;\r\n/* 677: */ }",
"@Test(timeout = 4000)\n public void test60() throws Throwable {\n PipedWriter pipedWriter0 = new PipedWriter();\n PipedReader pipedReader0 = new PipedReader(pipedWriter0);\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(pipedReader0);\n streamTokenizer0.nval = 752.0;\n String string0 = SQLUtil.renderNumber(streamTokenizer0);\n assertEquals(\"752\", string0);\n }",
"public int a(char paramChar)\r\n/* 484: */ {\r\n/* 485:481 */ if (paramChar == '§') {\r\n/* 486:482 */ return -1;\r\n/* 487: */ }\r\n/* 488:485 */ if (paramChar == ' ') {\r\n/* 489:486 */ return 4;\r\n/* 490: */ }\r\n/* 491:489 */ int i1 = \"\".indexOf(paramChar);\r\n/* 492:490 */ if ((paramChar > 0) && (i1 != -1) && (!this.k)) {\r\n/* 493:491 */ return this.d[i1];\r\n/* 494: */ }\r\n/* 495:495 */ if (this.e[paramChar] != 0)\r\n/* 496: */ {\r\n/* 497:496 */ int i2 = this.e[paramChar] >>> 4;\r\n/* 498:497 */ int i3 = this.e[paramChar] & 0xF;\r\n/* 499:499 */ if (i3 > 7)\r\n/* 500: */ {\r\n/* 501:500 */ i3 = 15;\r\n/* 502:501 */ i2 = 0;\r\n/* 503: */ }\r\n/* 504:503 */ i3++;\r\n/* 505: */ \r\n/* 506:505 */ return (i3 - i2) / 2 + 1;\r\n/* 507: */ }\r\n/* 508:508 */ return 0;\r\n/* 509: */ }",
"public int hamming() {\n return ham;\n }",
"C3676k mo12649b();",
"public void operacionletradni(int dni, int result){\n this.result=dni%23;}",
"public void mo3946e() {\n m25427g();\n }",
"private void m4823s() {\n float f = this.f6613u;\n if (f > 100.0f || f < 0.0f) {\n throw new IllegalArgumentException(\"Invalid percentage.\");\n }\n float j = (float) m4814j();\n this.f6595c.setY((float) ((int) (j - ((f / 100.0f) * j))));\n }",
"void mo33732Px();",
"public long mo9743h() {\n return mo9760w();\n }",
"static int getAnchor(int a){\n return a-((a-1)%3);\n }",
"private final void m46511P() {\n C15593cd.m50346a(this.f40707H.f44224a, this.f40705F, \"aeh2\");\n }",
"@Override\n\tpublic void challenge17() {\n\n\t}",
"public abstract long mo9229aD();",
"int method20()\n {\n return 579190;\n }",
"private char hallarLetra() {\r\n\t\tchar[] letra= {'T','R','W','A','G','M','Y','F','P','D','X',\r\n\t\t\t\t\t'B','N','J','Z','S','Q','V','H','L','C','K','E'};\r\n\t\treturn letra[numeroDNI%23];\r\n\t}",
"long mo49a();",
"@Test\n public void testTakeNumberFromString224() { // FlairImage: 224\n assertEquals(\"From: FlairImage line: 225\", 123, takeNumberFromString(\"123\")); \n assertEquals(\"From: FlairImage line: 226\", 0, takeNumberFromString(\"123a\")); \n assertEquals(\"From: FlairImage line: 227\", -123, takeNumberFromString(\"-123\")); \n assertEquals(\"From: FlairImage line: 228\", 0, takeNumberFromString(\"--123\")); \n assertEquals(\"From: FlairImage line: 229\", 0, takeNumberFromString(\"pz4\")); \n }",
"public int getSecondR() {\n/* 48 */ return this.secondR;\n/* */ }",
"@Test(timeout = 4000)\n public void test30() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"+wH9QT=gN*}929gG\");\n assertEquals(\"+wh9qt=gn*}929g\", string0);\n }",
"void mo1943l();",
"private byte m1656i() {\n char charAt;\n int i = this.f2519d;\n while (true) {\n int i2 = this.f2519d;\n if (i2 < this.f2518c) {\n CharSequence charSequence = this.f2516a;\n this.f2519d = i2 + 1;\n char charAt2 = charSequence.charAt(i2);\n this.f2520e = charAt2;\n if (charAt2 == '>') {\n return 12;\n }\n if (charAt2 == '\\\"' || charAt2 == '\\'') {\n do {\n int i3 = this.f2519d;\n if (i3 >= this.f2518c) {\n break;\n }\n CharSequence charSequence2 = this.f2516a;\n this.f2519d = i3 + 1;\n charAt = charSequence2.charAt(i3);\n this.f2520e = charAt;\n } while (charAt != charAt2);\n }\n } else {\n this.f2519d = i;\n this.f2520e = '<';\n return 13;\n }\n }\n }",
"public short mo34e() {\n return 15;\n }",
"public static void main(String[] args) {\n// System.out.println(Math.floor(12.34));/\n// System.out.println(Math.(12.34));/\n// System.out.println(Math.ceil(12.34));/\n// System.out.println(Math.ceil(12.34));/\n int start=5;\n int end=66;\n int i=start+(int)(Math.round(Math.random()*(end-start)) );\n System.out.println(i);\n }",
"@Test(timeout = 4000)\n public void test38() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"BnqiEV[^a>`-s`25}M\");\n assertEquals(\"bnqief[^a>`-s`25}m\", string0);\n }",
"public int hash3 ( String key )\n {\n int hashVal = 0;\n if(key != null){\n for( int i = 0; i < key.length(); i++ ){\n hashVal = (37 * hashVal) + key.charAt(i);}\n hashVal %= tableSize;\n if(hashVal<0)\n hashVal += tableSize; \n if(hashVal != 0)\n return hashVal;\n else\n return 0;\n }\n else\n {\n //System.out.println(\"Key is null\");\n return 0;\n }\n }",
"public long mo9743h() {\n return mo9773w();\n }",
"public void setVar36(java.lang.CharSequence value) {\n this.var36 = value;\n }",
"private int hash1(K key) {\n int h = 0;\n int seed = 31;//素数\n String s = key.toString();\n for (int i = 0; i != s.length(); ++i) {\n h = seed * h + s.charAt(i);\n }\n return h % length;\n }",
"@Test public void Time_len_6()\t\t\t\t\t\t\t\t\t{tst_time_(\"041526\"\t\t\t\t\t, \"04:15:26.000\");}",
"bdm mo1784a(akh akh);",
"public int aa() {\n return this.am * 121064660;\n }",
"private String m20344d(String str) {\n String valueOf = String.valueOf(Math.abs(str.hashCode() % 100));\n return this.f17416e + File.separator + valueOf;\n }",
"public static void main(String[] args) {\r\n long randomNumber = System.currentTimeMillis();\r\n // Get number less than 26\r\n randomNumber = randomNumber % 26;\r\n \r\n // add 65 to the number\r\n randomNumber += 65;\r\n System.out.println((char) randomNumber);\r\n }"
] | [
"0.64945644",
"0.6488681",
"0.6187714",
"0.58974814",
"0.55210495",
"0.55024576",
"0.5396204",
"0.5338721",
"0.5242571",
"0.52399516",
"0.51958615",
"0.5167079",
"0.51472825",
"0.51135916",
"0.5098261",
"0.5085783",
"0.5083903",
"0.506599",
"0.5065861",
"0.5065794",
"0.5063531",
"0.50612503",
"0.506015",
"0.50458926",
"0.5029747",
"0.50284326",
"0.5024067",
"0.50070214",
"0.5005921",
"0.5002821",
"0.49884844",
"0.49773473",
"0.49705306",
"0.49699154",
"0.49665955",
"0.4963451",
"0.4959882",
"0.49598134",
"0.4957805",
"0.4948996",
"0.49476564",
"0.49446732",
"0.49431753",
"0.49421677",
"0.4939725",
"0.49391183",
"0.49274835",
"0.4923623",
"0.49035785",
"0.49035552",
"0.48962784",
"0.4887032",
"0.48837715",
"0.48828578",
"0.48770022",
"0.4876844",
"0.48766592",
"0.487232",
"0.48705602",
"0.48701853",
"0.48631606",
"0.48600334",
"0.48587987",
"0.48578",
"0.48537835",
"0.48518923",
"0.4848808",
"0.48430815",
"0.4839929",
"0.48305896",
"0.4830109",
"0.48231104",
"0.48209554",
"0.4811569",
"0.48084822",
"0.48024705",
"0.47985327",
"0.47984758",
"0.47970325",
"0.4795966",
"0.4795653",
"0.47936207",
"0.47920534",
"0.47870177",
"0.47848418",
"0.4783374",
"0.47793272",
"0.47785097",
"0.47753218",
"0.4766984",
"0.47663808",
"0.47660884",
"0.47651038",
"0.4764214",
"0.4762183",
"0.4754803",
"0.4751809",
"0.4751005",
"0.47508812",
"0.47420016",
"0.47417307"
] | 0.0 | -1 |
/ 176: / 177: | public void think_async()
/* 178: */ {
/* 179:153 */ Scanner in = new Scanner(System.in);
/* 180: */
/* 181: */
/* 182: */
/* 183: */
/* 184: */
/* 185: */
/* 186: */
/* 187: */
/* 188: */
/* 189: */
/* 190: */
/* 191: */
/* 192: */
/* 193: */
/* 194: */
/* 195: */
/* 196:170 */ Thread updater = new Thread()
/* 197: */ {
/* 198:157 */ public volatile boolean active = true;
/* 199: */
/* 200: */ public void run()
/* 201: */ {
/* 202:161 */ while (this.active) {
/* 203:162 */ synchronized (this)
/* 204: */ {
/* 205:163 */ ConsoleAI.this.game.updateSimFrame();
/* 206: */ }
/* 207: */ }
/* 208: */ }
/* 209:170 */ };
/* 210:171 */ updater.start();
/* 211: */ Plane.FullView p;
/* 212:232 */ for (;; p.hasNext())
/* 213: */ {
/* 214:184 */ System.out.print("Next action ([move|land|attk] id; exit to quit): ");
/* 215: */
/* 216: */
/* 217:187 */ String[] cmd = in.nextLine().split(" ");
/* 218: */
/* 219: */
/* 220: */
/* 221: */
/* 222: */
/* 223: */
/* 224: */
/* 225: */
/* 226: */
/* 227:197 */ MapView<Integer, Base.BasicView> bases = this.game.getAllBases();
/* 228:198 */ MapView<Integer, Plane.FullView> planes = this.game.getMyPlanes();
/* 229:199 */ MapView<Integer, Plane.BasicView> ennemy_planes = this.game.getEnnemyPlanes();
/* 230: */
/* 231: */
/* 232: */
/* 233: */
/* 234:204 */ List<Command> coms = new ArrayList();
/* 235: */ String str;
/* 236:206 */ switch ((str = cmd[0]).hashCode())
/* 237: */ {
/* 238: */ case 3004906:
/* 239:206 */ if (str.equals("attk")) {}
/* 240: */ break;
/* 241: */ case 3127582:
/* 242:206 */ if (str.equals("exit")) {
/* 243: */ break label505;
/* 244: */ }
/* 245: */ break;
/* 246: */ case 3314155:
/* 247:206 */ if (str.equals("land")) {
/* 248: */ break;
/* 249: */ }
/* 250: */ case 3357649:
/* 251:206 */ if ((goto 451) && (str.equals("move")))
/* 252: */ {
/* 253:210 */ Base.BasicView b = (Base.BasicView)bases.get(Integer.valueOf(Integer.parseInt(cmd[1])));
/* 254:211 */ for (Plane.FullView p : planes.valuesView()) {
/* 255:212 */ coms.add(new MoveCommand(p, b.position()));
/* 256: */ }
/* 257: */ break label459;
/* 258:216 */ Base.BasicView b = (Base.BasicView)bases.get(Integer.valueOf(Integer.parseInt(cmd[1])));
/* 259:217 */ if ((b instanceof Base.FullView))
/* 260: */ {
/* 261:218 */ for (??? = planes.valuesView().iterator(); ???.hasNext();)
/* 262: */ {
/* 263:218 */ p = (Plane.FullView)???.next();
/* 264:219 */ coms.add(new LandCommand(p, (Base.FullView)b));
/* 265: */ }
/* 266: */ }
/* 267: */ else
/* 268: */ {
/* 269:221 */ System.err.println("You can't see this base, move around it before you land");
/* 270: */ break label459;
/* 271:225 */ for (Plane.FullView p : planes.valuesView()) {
/* 272:226 */ coms.add(new AttackCommand(p, (Plane.BasicView)ennemy_planes.get(Integer.valueOf(Integer.parseInt(cmd[1])))));
/* 273: */ }
/* 274: */ }
/* 275: */ }
/* 276:227 */ break;
/* 277: */ }
/* 278:229 */ System.err.println("Unrecognized command!");
/* 279: */ label459:
/* 280:232 */ p = coms.iterator();
/* 281:232 */ continue;Command c = (Command)p.next();
/* 282:233 */ this.game.sendCommand(c);
/* 283: */ }
/* 284: */ label505:
/* 285:255 */ in.close();
/* 286:256 */ updater.active = false;
/* 287: */ try
/* 288: */ {
/* 289:258 */ updater.join();
/* 290: */ }
/* 291: */ catch (InterruptedException e)
/* 292: */ {
/* 293:260 */ e.printStackTrace();
/* 294: */ }
/* 295: */ } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void method_4270() {}",
"public int method_2436() {\r\n return 16;\r\n }",
"private void m50366E() {\n }",
"void mo33732Px();",
"public void skystonePos4() {\n }",
"public void mo21879u() {\n }",
"public void mo21877s() {\n }",
"private void m50367F() {\n }",
"public void mo12628c() {\n }",
"public void mo21794S() {\n }",
"public void mo21779D() {\n }",
"public void mo21782G() {\n }",
"public void mo21783H() {\n }",
"public void mo21787L() {\n }",
"public void mo38117a() {\n }",
"public void mo3749d() {\n }",
"public int p_()\r\n/* 463: */ {\r\n/* 464:477 */ return 64;\r\n/* 465: */ }",
"public void skystonePos6() {\n }",
"public void mo21786K() {\n }",
"protected void method_2665() {\r\n super.method_2427(awt.field_4171);\r\n this.method_2440(true);\r\n this.method_2521(class_872.field_4244);\r\n }",
"void m1864a() {\r\n }",
"public void mo21878t() {\n }",
"public void mo23813b() {\n }",
"protected float m()\r\n/* 234: */ {\r\n/* 235:247 */ return 0.03F;\r\n/* 236: */ }",
"public void mo21880v() {\n }",
"public void m23075a() {\n }",
"public void mo21780E() {\n }",
"protected float l()\r\n/* 72: */ {\r\n/* 73: 84 */ return 0.0F;\r\n/* 74: */ }",
"public abstract long mo9229aD();",
"public int p_()\r\n/* 96: */ {\r\n/* 97:117 */ return 64;\r\n/* 98: */ }",
"public int getBlockLength()\r\n/* 45: */ {\r\n/* 46:107 */ return -32;\r\n/* 47: */ }",
"public int n_()\r\n/* 429: */ {\r\n/* 430:442 */ return this.a.length + 4;\r\n/* 431: */ }",
"public void mo3376r() {\n }",
"public void mo21781F() {\n }",
"long getUnknown72();",
"public abstract String mo118046b();",
"public void mo55254a() {\n }",
"public void mo21793R() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public int arn() {\n return 383;\n }",
"public void mo21792Q() {\n }",
"public int getMobCap()\r\n/* 24: */ {\r\n/* 25:41 */ return this.f;\r\n/* 26: */ }",
"private void kk12() {\n\n\t}",
"public void mo12930a() {\n }",
"public abstract String mo13682d();",
"void mo12637b();",
"public void mo21791P() {\n }",
"void mo1943l();",
"public void mo9233aH() {\n }",
"public void mo21785J() {\n }",
"public int getInternalBlockLength()\r\n/* 40: */ {\r\n/* 41: 95 */ return 32;\r\n/* 42: */ }",
"public void mo56167c() {\n }",
"public int g()\r\n/* 173: */ {\r\n/* 174:198 */ return 0;\r\n/* 175: */ }",
"private View m3984P() {\n return mo4729d(this.f3143x ? mo4732e() - 1 : 0);\n }",
"public void mo115190b() {\n }",
"protected float j()\r\n/* 67: */ {\r\n/* 68: 80 */ return 1.5F;\r\n/* 69: */ }",
"public void mo21788M() {\n }",
"public int m224a() {\n return 1;\n }",
"void mo21073d();",
"protected String[] mo1613b() {\r\n return f4638d;\r\n }",
"private void m27464b() {\n this.f25306u = 0;\n this.f25307v = 0;\n if (this.f25277aa) {\n this.f25306u = (int) this.f25288c.measureText(String.valueOf(this.f25301p.get(0)));\n } else if (m27462a(this.f25273T)) {\n this.f25306u = (int) this.f25288c.measureText(String.valueOf(this.f25301p.get(this.f25273T)));\n } else if (!TextUtils.isEmpty(this.f25302q)) {\n this.f25306u = (int) this.f25288c.measureText(this.f25302q);\n } else {\n for (Object valueOf : this.f25301p) {\n this.f25306u = Math.max(this.f25306u, (int) this.f25288c.measureText(String.valueOf(valueOf)));\n }\n }\n FontMetrics fontMetrics = this.f25288c.getFontMetrics();\n this.f25307v = (int) (fontMetrics.bottom - fontMetrics.top);\n }",
"public abstract long mo13681c();",
"public void mo21789N() {\n }",
"public void mo21795T() {\n }",
"private void e()\r\n/* 273: */ {\r\n/* 274:278 */ this.r = false;\r\n/* 275:279 */ this.s = false;\r\n/* 276:280 */ this.t = false;\r\n/* 277:281 */ this.u = false;\r\n/* 278:282 */ this.v = false;\r\n/* 279: */ }",
"public void skystonePos5() {\n }",
"public void mo115188a() {\n }",
"public abstract int mo8526p();",
"public int mo36g() {\n return 8;\n }",
"public int mo36g() {\n return 4;\n }",
"void mo21076g();",
"public void mo97908d() {\n }",
"public void skystonePos3() {\n }",
"public void mo21825b() {\n }",
"public int method_1143(int var1) {\r\n return this.height / 4 + 0 + (24 * var1 - 24) + this.field_987;\r\n }",
"void mo57277b();",
"public abstract int mo9754s();",
"public void mo4359a() {\n }",
"void mo17013d();",
"public void mo44053a() {\n }",
"void mo57278c();",
"public int method_6437() {\r\n return this.field_6227;\r\n }",
"public void func_70295_k_() {}",
"public int func_70297_j_()\n/* */ {\n/* 71 */ return 64;\n/* */ }",
"public void mo2471e() {\n }",
"public void mo21784I() {\n }",
"public void mo9137b() {\n }",
"@Override\n public void func_104112_b() {\n \n }",
"void mo56163g();",
"public abstract void mo27385c();",
"C2841w mo7234g();",
"public abstract void mo53562a(C18796a c18796a);",
"protected void method_4157() {\r\n super.method_4157();\r\n this.method_4211(class_1840.field_9390).method_390(200.0D);\r\n }",
"void mo72113b();",
"public void mo9848a() {\n }"
] | [
"0.618417",
"0.60939556",
"0.6092917",
"0.6068895",
"0.5986766",
"0.5973932",
"0.5963564",
"0.595465",
"0.594377",
"0.5925861",
"0.5922865",
"0.59167683",
"0.5862023",
"0.58557063",
"0.58535534",
"0.5834",
"0.5829767",
"0.58140147",
"0.5812264",
"0.58112776",
"0.57915574",
"0.5763861",
"0.57567394",
"0.574428",
"0.5722845",
"0.5720345",
"0.57154953",
"0.57103926",
"0.570642",
"0.570266",
"0.570186",
"0.5697919",
"0.56917363",
"0.5686985",
"0.5673131",
"0.56702083",
"0.5662375",
"0.56605256",
"0.5656659",
"0.5656659",
"0.5656659",
"0.5656659",
"0.5656659",
"0.5656659",
"0.5656659",
"0.56546324",
"0.5650711",
"0.564908",
"0.56459165",
"0.56321037",
"0.56307036",
"0.5628378",
"0.56255966",
"0.5622039",
"0.56215686",
"0.5612677",
"0.56117296",
"0.56101567",
"0.56089616",
"0.56075144",
"0.5607361",
"0.5604433",
"0.5602632",
"0.5600852",
"0.5596465",
"0.5593344",
"0.55926013",
"0.5590313",
"0.55900466",
"0.5580007",
"0.5579407",
"0.55684876",
"0.55658495",
"0.55650026",
"0.55610436",
"0.55594367",
"0.55578715",
"0.5555479",
"0.5554825",
"0.5554715",
"0.55540866",
"0.555154",
"0.5551211",
"0.5550069",
"0.55486894",
"0.5546388",
"0.554454",
"0.5543542",
"0.5537486",
"0.55350614",
"0.55348194",
"0.55314654",
"0.5530756",
"0.5521886",
"0.5517931",
"0.5516317",
"0.5515751",
"0.5514537",
"0.55134636",
"0.55096436",
"0.55088884"
] | 0.0 | -1 |
/ 199: / 200: | public void run()
/* 201: */ {
/* 202:161 */ while (this.active) {
/* 203:162 */ synchronized (this)
/* 204: */ {
/* 205:163 */ ConsoleAI.this.game.updateSimFrame();
/* 206: */ }
/* 207: */ }
/* 208: */ } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void method_199() {}",
"public void method_200() {}",
"@Override\npublic int writingBenches() {\n\treturn 200;\n}",
"public void mo21877s() {\n }",
"public void mo5099c() {\n }",
"public int method_209() {\r\n return 0;\r\n }",
"int method20()\n {\n return 579190;\n }",
"public void mo21786K() {\n }",
"void mo3194r();",
"public int p_()\r\n/* 96: */ {\r\n/* 97:117 */ return 64;\r\n/* 98: */ }",
"public void mo21794S() {\n }",
"int mo98209b();",
"@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }",
"@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }",
"int mo306b();",
"public void mo21789N() {\n }",
"long mo20406a();",
"public void mo21795T() {\n }",
"C3579d mo19710g(int i) throws IOException;",
"@Test\n public void testTakeNumberFromString224() { // FlairImage: 224\n assertEquals(\"From: FlairImage line: 225\", 123, takeNumberFromString(\"123\")); \n assertEquals(\"From: FlairImage line: 226\", 0, takeNumberFromString(\"123a\")); \n assertEquals(\"From: FlairImage line: 227\", -123, takeNumberFromString(\"-123\")); \n assertEquals(\"From: FlairImage line: 228\", 0, takeNumberFromString(\"--123\")); \n assertEquals(\"From: FlairImage line: 229\", 0, takeNumberFromString(\"pz4\")); \n }",
"Response mo35726n0() throws IOException;",
"int mo4095a(int i);",
"void mo1942k();",
"public int arn() {\n return 383;\n }",
"public void mo21782G() {\n }",
"public void method_4270() {}",
"public final int mo50059a() {\n return 2;\n }",
"public int a_(int paramInt)\r\n/* 166: */ {\r\n/* 167:189 */ return 0;\r\n/* 168: */ }",
"public void mo5097b() {\n }",
"@Test\n\tpublic void testCompleteness() {\n\t\t/* HttpStatus (100 - 599) */\n\t\tfor (int i = 0; i < 600; i++) {\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tHttpStatus current = HttpStatus.getStatus(i);\n\t\t}\n\t}",
"public abstract long mo9750o();",
"@Override\n\tpublic void challenge10() {\n\n\t}",
"public int p_()\r\n/* 463: */ {\r\n/* 464:477 */ return 64;\r\n/* 465: */ }",
"int mo302a();",
"void mo60893b();",
"byte[] mo12209b(int i);",
"public static void main(String[] args){\n\n for(int n = 2; n < 102; n+=2)System.out.printf(\"%d\\n\",n);\n \n \n }",
"public int getMetadata(int damage) {\n/* 50 */ return damage;\n/* */ }",
"public abstract int mo12580RT(int i);",
"void mo41086b();",
"public void mo21793R() {\n }",
"void mo57278c();",
"void mo1940i();",
"public void mo115190b() {\n }",
"public void mo21788M() {\n }",
"public abstract long mo24410c();",
"public abstract long mo24409b();",
"public void mo21780E() {\n }",
"public void mo21783H() {\n }",
"String mo20730b();",
"public abstract int mo8526p();",
"void mo1970b();",
"public abstract int mo9749n();",
"C20259y mo54455t(int i);",
"public int getDuration()\r\n/* 70: */ {\r\n/* 71: 71 */ return this.duration;\r\n/* 72: */ }",
"void mo3796b(int i);",
"public int g()\r\n/* 173: */ {\r\n/* 174:198 */ return 0;\r\n/* 175: */ }",
"public static void main(String[] args) {\n\t\t\nfor(int contador=1;contador<=100;contador+=1)\n{\n\tSystem.out.println(contador);\n}\n\t}",
"public void mo21880v() {\n }",
"private int K(int t)\n {\n if(t<=19)\n return 0x5a827999;\n else if(t<=39)\n return 0x6ed9eba1;\n else if(t<=59)\n return 0x8f1bbcdc;\n else \n return 0xca62c1d6;\n }",
"public int mo80c() {\n return 7;\n }",
"public void mo21825b() {\n }",
"public void mo21878t() {\n }",
"public void mo21785J() {\n }",
"public int thunderclap();",
"private void encodeIntoResponse(ServletResponse resp, BigInteger[] factors) {\n\r\n }",
"void mo1943l();",
"public void mo21879u() {\n }",
"int getServerProcessingIterations();",
"public void mo9848a() {\n }",
"public static void main002(String[] args) {\n\n\t\tint number\t= 20;\n\t\tSystem.out.println(\"Start = \" + number);\n\t\t\n\t\tnumber += 10;\t// number\t= number + 10;\n\t\tnumber -= 10;\t// number\t= number - 10\n\t\tnumber *= 10;\t// number\t= number * 10\n\t\tnumber /= 10;\t// number\t= number / 10\n\t\tnumber %= 10;\t// number\t= number % 10\n\t\tSystem.out.println(\"End = \" + number);\n\t}",
"public abstract int mo9754s();",
"public abstract long mo9746k();",
"@Test\n @Tag(\"slow\")\n public void testSTANDATA() {\n CuteNetlibCase.doTest(\"STANDATA.SIF\", \"1257.6995\", null, NumberContext.of(7, 4));\n }",
"void mo1507n();",
"public void mo21787L() {\n }",
"private int i()\r\n/* 107: */ {\r\n/* 108:111 */ return --this.duration;\r\n/* 109: */ }",
"public int a_(int paramInt)\r\n/* 594: */ {\r\n/* 595:636 */ return 0;\r\n/* 596: */ }",
"public void mo21791P() {\n }",
"public int getInternalBlockLength()\r\n/* 40: */ {\r\n/* 41: 95 */ return 32;\r\n/* 42: */ }",
"@Test\n\tpublic void testGive20Back() {\n\t\n\t}",
"public abstract int mo12572RL(int i);",
"public void mo21867i() {\n mo21877s();\n }",
"RESPONSE tally();",
"private void kk12() {\n\n\t}",
"@Test(timeout = 4000)\n public void test50() throws Throwable {\n String string0 = EWrapperMsgGenerator.tickEFP((-2147), 10, 10, \".^|7={wR>bl,rlfYN\", 10, 484, \".^|7={wR>bl,rlfYN\", 484, 484);\n assertEquals(\"id=-2147 bidOptComp: basisPoints = 10.0/.^|7={wR>bl,rlfYN impliedFuture = 10.0 holdDays = 484 futureExpiry = .^|7={wR>bl,rlfYN dividendImpact = 484.0 dividends to expiry = 484.0\", string0);\n }",
"public abstract long mo131997a() throws IOException;",
"@Test\n @Tag(\"bm1000\")\n public void testCAPRI() {\n CuteNetlibCase.doTest(\"CAPRI.SIF\", \"2690.0129137681624\", null, NumberContext.of(7, 4));\n }",
"public void method_201() {}",
"public void mo55254a() {\n }",
"private void m81850n() {\n m81843b(m81844c(C6969H.m41409d(\"G738BEA12B634AE16F20F9277F0E4D1\")));\n }",
"@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }",
"public static void main(String[] args) {\n\t\tdouble media = 0, cont = 0, soma = 0;\r\n\t\tfor (int aux = 1000; aux <= 2000; aux++) {\r\n\t\t\tif (aux % 2 != 0) {\r\n\t\t\t\tsoma += aux;\r\n\t\t\t\tcont++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tmedia = soma / cont;\r\n\t\tSystem.out.println(media);\r\n\t}",
"@Test\n @Tag(\"slow\")\n public void testSTANDGUB() {\n CuteNetlibCase.doTest(\"STANDGUB.SIF\", \"1257.6995\", null, NumberContext.of(7, 4));\n }",
"public int getCountRequests() {\n/* 415 */ return this.countRequests;\n/* */ }",
"void mo54446k(int i);",
"@Test\n @Tag(\"bm1000\")\n public void testSHARE1B() {\n CuteNetlibCase.doTest(\"SHARE1B.SIF\", \"-76589.31857918584\", \"74562.53714565346\", NumberContext.of(4, 4));\n }",
"public abstract Integer mo36210m();",
"private int h1(int p){\n\t\t return p % table.length;\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }"
] | [
"0.540085",
"0.53313696",
"0.53206265",
"0.5301442",
"0.5287462",
"0.5275571",
"0.5258405",
"0.521661",
"0.52102685",
"0.52071327",
"0.518567",
"0.51228917",
"0.510032",
"0.5087212",
"0.5080015",
"0.50740886",
"0.50726783",
"0.5071673",
"0.50690854",
"0.5066223",
"0.50626415",
"0.5061728",
"0.50613976",
"0.5045802",
"0.50403947",
"0.50298727",
"0.50209713",
"0.5020941",
"0.5020677",
"0.4990784",
"0.4971588",
"0.49623105",
"0.49572548",
"0.49535605",
"0.49426112",
"0.4942106",
"0.49400708",
"0.4934906",
"0.49321818",
"0.49283975",
"0.49262154",
"0.49238926",
"0.49230766",
"0.49208477",
"0.49198538",
"0.4919718",
"0.4919008",
"0.49179205",
"0.49168676",
"0.49147418",
"0.49061105",
"0.4904447",
"0.4902229",
"0.4900961",
"0.48974827",
"0.4894642",
"0.48943546",
"0.4892054",
"0.48916462",
"0.4891055",
"0.4889104",
"0.48816562",
"0.48774904",
"0.4874288",
"0.48737445",
"0.48710817",
"0.4869383",
"0.48686445",
"0.4864406",
"0.4863597",
"0.4861658",
"0.48614007",
"0.4860094",
"0.48544788",
"0.48508093",
"0.484998",
"0.4844515",
"0.48428255",
"0.4840872",
"0.48381603",
"0.4829212",
"0.4824211",
"0.48230532",
"0.4821111",
"0.48198187",
"0.4817102",
"0.4815353",
"0.481481",
"0.48144025",
"0.48129833",
"0.48092663",
"0.48089546",
"0.4808326",
"0.4806108",
"0.48054022",
"0.48045027",
"0.48043492",
"0.47973743",
"0.4794314",
"0.4793159",
"0.4793159"
] | 0.0 | -1 |
/ 296: / 297: | public static void main(String[] args)
/* 298: */ throws InterruptedException
/* 299: */ {
/* 300:265 */ if (args.length != 2)
/* 301: */ {
/* 302:267 */ System.out.println("Usage : java MoveAI ip port");
/* 303:268 */ System.exit(1);
/* 304: */ }
/* 305:270 */ String ip = args[0];
/* 306:271 */ int port = Integer.parseInt(args[1]);
/* 307: */
/* 308:273 */ AbstractAI ai = new ConsoleAI(ip, port);
/* 309:274 */ ai.think();
/* 310: */ } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void milestone2(double num){\n System.out.println(\"Integer part: \" + (int)num);\n double fractionPart = num - (int)num;\n fractionPart *= 100;\n System.out.println(\"Fractional part: \" + (int)fractionPart);\n }",
"protected float j()\r\n/* 67: */ {\r\n/* 68: 80 */ return 1.5F;\r\n/* 69: */ }",
"private void m27468d() {\n switch (this.f25258E) {\n case 1:\n this.f25270Q = this.f25294i.left;\n break;\n case 2:\n this.f25270Q = this.f25294i.right;\n break;\n default:\n this.f25270Q = this.f25268O;\n break;\n }\n this.f25271R = (int) (((float) this.f25269P) - ((this.f25288c.ascent() + this.f25288c.descent()) / 2.0f));\n }",
"public static C1250h m5296ci() {\n return f3977jt;\n }",
"public int mo284b() {\n return this.f267e;\n }",
"String mo30285c(long j);",
"private static int m36201b(Rect rect) {\n return rect.width() * rect.height();\n }",
"public int mo36g() {\n return 4;\n }",
"protected int getImageIndex() {\n/* 216 */ return this.mlibImageIndex;\n/* */ }",
"public String toString(){ return \"DIV\";}",
"void mo33732Px();",
"public int p_()\r\n/* 96: */ {\r\n/* 97:117 */ return 64;\r\n/* 98: */ }",
"int mo23521Ly();",
"public int mo36g() {\n return 2;\n }",
"protected float m()\r\n/* 234: */ {\r\n/* 235:247 */ return 0.03F;\r\n/* 236: */ }",
"C2841w mo7234g();",
"public int method_2436() {\r\n return 16;\r\n }",
"int wkhtmltoimage_current_phase(PointerByReference converter);",
"public int mo36g() {\n return 8;\n }",
"public String toString() {\n/* 318 */ switch (this.h) {\n/* */ case 1:\n/* 320 */ return \"Forward RCT\";\n/* */ case 2:\n/* 322 */ return \"Forward ICT\";\n/* */ case 0:\n/* 324 */ return \"No component transformation\";\n/* */ } \n/* 326 */ throw new IllegalArgumentException(\"Non JPEG 2000 part I component transformation\");\n/* */ }",
"@Override\n protected long advanceH(final long k) {\n return 5 * k - 2;\n }",
"@Override\n\tpublic float getWidth() {\n\t\treturn 26;\n\t}",
"private int m216e(float f) {\n int i = (int) (f + 0.5f);\n return i % 2 == 1 ? i - 1 : i;\n }",
"private static int m24353e(int i) {\n return i - (i >> 2);\n }",
"static void m14934e(String str) {\n int b = m14929b();\n int d = C3205z0.INFO.mo12550d();\n }",
"public int func_70297_j_()\n/* */ {\n/* 71 */ return 64;\n/* */ }",
"public int method_1143(int var1) {\r\n return this.height / 4 + 0 + (24 * var1 - 24) + this.field_987;\r\n }",
"private static float m590o(Context context) {\r\n DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics();\r\n Point point = new Point(displayMetrics.widthPixels, displayMetrics.heightPixels);\r\n return ((float) point.y) / ((float) point.x);\r\n }",
"int getMid(int s, int e) {\n return s + (e - s) / 2;\n }",
"static public double m2yard(double m){\n\t\treturn m*1.0936;\n\t}",
"void mo1943l();",
"static void m14930d(String str) {\n int b = m14929b();\n int d = C3205z0.INFO.mo12550d();\n }",
"long mo20406a();",
"protected float l()\r\n/* 72: */ {\r\n/* 73: 84 */ return 0.0F;\r\n/* 74: */ }",
"private void m27464b() {\n this.f25306u = 0;\n this.f25307v = 0;\n if (this.f25277aa) {\n this.f25306u = (int) this.f25288c.measureText(String.valueOf(this.f25301p.get(0)));\n } else if (m27462a(this.f25273T)) {\n this.f25306u = (int) this.f25288c.measureText(String.valueOf(this.f25301p.get(this.f25273T)));\n } else if (!TextUtils.isEmpty(this.f25302q)) {\n this.f25306u = (int) this.f25288c.measureText(this.f25302q);\n } else {\n for (Object valueOf : this.f25301p) {\n this.f25306u = Math.max(this.f25306u, (int) this.f25288c.measureText(String.valueOf(valueOf)));\n }\n }\n FontMetrics fontMetrics = this.f25288c.getFontMetrics();\n this.f25307v = (int) (fontMetrics.bottom - fontMetrics.top);\n }",
"private static int m14929b() {\n return C3150p0.m15121Y();\n }",
"public int a(char paramChar)\r\n/* 484: */ {\r\n/* 485:481 */ if (paramChar == '§') {\r\n/* 486:482 */ return -1;\r\n/* 487: */ }\r\n/* 488:485 */ if (paramChar == ' ') {\r\n/* 489:486 */ return 4;\r\n/* 490: */ }\r\n/* 491:489 */ int i1 = \"\".indexOf(paramChar);\r\n/* 492:490 */ if ((paramChar > 0) && (i1 != -1) && (!this.k)) {\r\n/* 493:491 */ return this.d[i1];\r\n/* 494: */ }\r\n/* 495:495 */ if (this.e[paramChar] != 0)\r\n/* 496: */ {\r\n/* 497:496 */ int i2 = this.e[paramChar] >>> 4;\r\n/* 498:497 */ int i3 = this.e[paramChar] & 0xF;\r\n/* 499:499 */ if (i3 > 7)\r\n/* 500: */ {\r\n/* 501:500 */ i3 = 15;\r\n/* 502:501 */ i2 = 0;\r\n/* 503: */ }\r\n/* 504:503 */ i3++;\r\n/* 505: */ \r\n/* 506:505 */ return (i3 - i2) / 2 + 1;\r\n/* 507: */ }\r\n/* 508:508 */ return 0;\r\n/* 509: */ }",
"@Override\r\n\tpublic int div() {\n\t\treturn 0;\r\n\t}",
"private double normalizeImageValue(double value){\n return value/(31);\n }",
"private static int m3068c(int i, int i2) {\n return 255 - (((255 - i2) * (255 - i)) / NormalGiftView.ALPHA_255);\n }",
"void mo9696a(float f, float f2, int i);",
"public void mo12628c() {\n }",
"private String m20344d(String str) {\n String valueOf = String.valueOf(Math.abs(str.hashCode() % 100));\n return this.f17416e + File.separator + valueOf;\n }",
"public short mo34e() {\n return 140;\n }",
"@Test(timeout = 4000)\n public void test006() throws Throwable {\n StringReader stringReader0 = new StringReader(\"%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.tokenBegin = 60;\n javaCharStream0.GetImage();\n assertEquals((-1), javaCharStream0.bufpos);\n }",
"private static int colorspaceSh(int s) {\r\n return (s << 16);\r\n }",
"public int p_()\r\n/* 463: */ {\r\n/* 464:477 */ return 64;\r\n/* 465: */ }",
"public void method_4270() {}",
"private static long getPrevNorm32(PrevArgs paramPrevArgs, int paramInt1, int paramInt2)\n/* */ {\n/* 534 */ paramPrevArgs.c = paramPrevArgs.src[(--paramPrevArgs.current)];\n/* 535 */ paramPrevArgs.c2 = '\\000';\n/* */ \n/* */ \n/* */ \n/* */ \n/* 540 */ if (paramPrevArgs.c < paramInt1)\n/* 541 */ return 0L;\n/* 542 */ if (!UTF16.isSurrogate(paramPrevArgs.c))\n/* 543 */ return getNorm32(paramPrevArgs.c);\n/* 544 */ if (UTF16.isLeadSurrogate(paramPrevArgs.c))\n/* */ {\n/* 546 */ return 0L; }\n/* 547 */ if ((paramPrevArgs.current != paramPrevArgs.start) && \n/* 548 */ (UTF16.isLeadSurrogate(paramPrevArgs.c2 = paramPrevArgs.src[(paramPrevArgs.current - 1)]))) {\n/* 549 */ paramPrevArgs.current -= 1;\n/* 550 */ long l = getNorm32(paramPrevArgs.c2);\n/* */ \n/* 552 */ if ((l & paramInt2) == 0L)\n/* */ {\n/* */ \n/* */ \n/* 556 */ return 0L;\n/* */ }\n/* */ \n/* 559 */ return getNorm32FromSurrogatePair(l, paramPrevArgs.c);\n/* */ }\n/* */ \n/* */ \n/* 563 */ paramPrevArgs.c2 = '\\000';\n/* 564 */ return 0L;\n/* */ }",
"String mo20730b();",
"public int arn() {\n return 383;\n }",
"private View m3984P() {\n return mo4729d(this.f3143x ? mo4732e() - 1 : 0);\n }",
"private int convertY(int i) {\n return i / width;\n }",
"public int mo29677d() {\n return this.f19526c;\n }",
"long getMid();",
"long getMid();",
"String mo20731c();",
"void ciff_block_1030()\n{\n int key[] = new int[2];\n key[0] = 0x410;\n key[1] = 0x45f3;\n int i, bpp, row, col, vbits=0;\n long bitbuf=0;\n\n get2();\n if ((get4()) != 0x80008 || get4()==0) return;\n bpp = get2();\n if (bpp != 10 && bpp != 12) return;\n for (i=row=0; row < 8; row++)\n for (col=0; col < 8; col++) {\n if (vbits < bpp) {\n\tbitbuf = bitbuf << 16 | (get2() ^ key[i++ & 1]);\n\tvbits += 16;\n }\n white[row][col] = ( char)( bitbuf << (LONG_BIT - vbits) >> (LONG_BIT - bpp));\n vbits -= bpp;\n }\n}",
"private int m10257E() throws cf {\r\n int i = 0;\r\n int i2;\r\n if (this.g.mo1996h() >= 5) {\r\n byte[] f = this.g.mo1994f();\r\n int g = this.g.mo1995g();\r\n i2 = 0;\r\n int i3 = 0;\r\n while (true) {\r\n byte b = f[g + i];\r\n i3 |= (b & 127) << i2;\r\n if ((b & 128) != 128) {\r\n this.g.mo1993a(i + 1);\r\n return i3;\r\n }\r\n i2 += 7;\r\n i++;\r\n }\r\n } else {\r\n i2 = 0;\r\n while (true) {\r\n byte u = mo1978u();\r\n i2 |= (u & 127) << i;\r\n if ((u & 128) != 128) {\r\n return i2;\r\n }\r\n i += 7;\r\n }\r\n }\r\n }",
"public short mo34e() {\n return 41;\n }",
"public void mo33392b() {\n mo33395e();\n }",
"private void m214b(Rect rect) {\n float f = this.f410k * 1.5f;\n this.f406g.set(((float) rect.left) + this.f410k, ((float) rect.top) + f, ((float) rect.right) - this.f410k, ((float) rect.bottom) - f);\n m217f();\n }",
"void mo25957a(long j, long j2);",
"private int e(String paramString, int paramInt)\r\n/* 628: */ {\r\n/* 629:624 */ int i1 = paramString.length();\r\n/* 630:625 */ int i2 = 0;\r\n/* 631:626 */ int i3 = 0;\r\n/* 632:627 */ int i4 = -1;\r\n/* 633:628 */ int i5 = 0;\r\n/* 634:631 */ for (; i3 < i1; i3++)\r\n/* 635: */ {\r\n/* 636:632 */ char c1 = paramString.charAt(i3);\r\n/* 637:634 */ switch (c1)\r\n/* 638: */ {\r\n/* 639: */ case '§': \r\n/* 640:636 */ if (i3 < i1 - 1)\r\n/* 641: */ {\r\n/* 642:637 */ char c2 = paramString.charAt(++i3);\r\n/* 643:638 */ if ((c2 == 'l') || (c2 == 'L')) {\r\n/* 644:639 */ i5 = 1;\r\n/* 645:640 */ } else if ((c2 == 'r') || (c2 == 'R') || (c(c2))) {\r\n/* 646:641 */ i5 = 0;\r\n/* 647: */ }\r\n/* 648: */ }\r\n/* 649:643 */ break;\r\n/* 650: */ case '\\n': \r\n/* 651:646 */ i3--;\r\n/* 652:647 */ break;\r\n/* 653: */ case ' ': \r\n/* 654:649 */ i4 = i3;\r\n/* 655: */ default: \r\n/* 656:651 */ i2 += a(c1);\r\n/* 657:652 */ if (i5 != 0) {\r\n/* 658:653 */ i2++;\r\n/* 659: */ }\r\n/* 660: */ break;\r\n/* 661: */ }\r\n/* 662:657 */ if (c1 == '\\n')\r\n/* 663: */ {\r\n/* 664:658 */ i3++;i4 = i3;\r\n/* 665: */ }\r\n/* 666: */ else\r\n/* 667: */ {\r\n/* 668:662 */ if (i2 > paramInt) {\r\n/* 669: */ break;\r\n/* 670: */ }\r\n/* 671: */ }\r\n/* 672: */ }\r\n/* 673:667 */ if ((i3 != i1) && (i4 != -1) && (i4 < i3)) {\r\n/* 674:668 */ return i4;\r\n/* 675: */ }\r\n/* 676:670 */ return i3;\r\n/* 677: */ }",
"public static int i()\r\n/* 25: */ {\r\n/* 26: 48 */ return 9;\r\n/* 27: */ }",
"int wkhtmltoimage_phase_count(PointerByReference converter);",
"public int a_(int paramInt)\r\n/* 166: */ {\r\n/* 167:189 */ return 0;\r\n/* 168: */ }",
"public final int mo91939E() {\n return C21085a.m71117a().mo56926b() + this.f94791al.getHeight() + this.mStatusView.getHeight();\n }",
"void mo304a(C0366h c0366h);",
"public int getSecondR() {\n/* 48 */ return this.secondR;\n/* */ }",
"private static int getPrevCC(PrevArgs paramPrevArgs)\n/* */ {\n/* 574 */ return (int)(0xFF & getPrevNorm32(paramPrevArgs, 768, 65280) >> 8);\n/* */ }",
"public abstract long mo24409b();",
"public abstract String division();",
"public int getVideoJittcomp();",
"private final void m119128e() {\n String image = ((OtherContentModel) mo108896M()).getImage();\n if (image == null || image.length() == 0) {\n this.f85358a.setVisibility(8);\n return;\n }\n C24380s.m119258a(this.f85359b, ((OtherContentModel) mo108896M()).getImage(), C24380s.m119245a(60, (Context) null, 1, (Object) null), (int) (((float) C24380s.m119245a(60, (Context) null, 1, (Object) null)) / ((OtherContentModel) mo108896M()).getImageRatio()));\n C24380s.m119258a(this.f85360c, ((OtherContentModel) mo108896M()).getLeftTopImage(), (int) (((float) C24380s.m119245a(17, (Context) null, 1, (Object) null)) * ((OtherContentModel) mo108896M()).getLeftTopRatio()), C24380s.m119245a(17, (Context) null, 1, (Object) null));\n C24380s.m119258a(this.f85361d, ((OtherContentModel) mo108896M()).getRightBottomImage(), (int) (((float) C24380s.m119245a(15, (Context) null, 1, (Object) null)) * ((OtherContentModel) mo108896M()).getRightBottomRatio()), C24380s.m119245a(15, (Context) null, 1, (Object) null));\n this.f85358a.setVisibility(0);\n }",
"public int getAmplifier()\r\n/* 75: */ {\r\n/* 76: 75 */ return this.amplifier;\r\n/* 77: */ }",
"public static void main(String[] args) {\n\n\n\n System.out.println(4 * (1.0 - (1 / 3) + (1 / 5) - (1 / 7) + (1 / 9) - (1 / 11)));\n\n System.out.println(4 * (1.0 - (1/3) + (1/5) - (1/7)\n + (1 / 9) - (1/11) + (1/13)));\n }",
"private View m3983O() {\n return mo4729d(this.f3143x ? 0 : mo4732e() - 1);\n }",
"public void m9739h() {\r\n this.f6261j = bw.m10080b(this.f6261j, 1);\r\n }",
"void mo30290d(long j);",
"float mo56157b();",
"@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }",
"private static int mixSigColor(int c1, int c2, int ratio) {//0~100\r\n return 0xff & (((c2 * ratio) + (c1 * (100 - ratio))) / 100);\r\n }",
"private void m50366E() {\n }",
"int mo27483b();",
"private void m27461a() {\n if (this.f25303r >= 2) {\n if (this.f25303r % 2 == 0) {\n this.f25303r++;\n }\n this.f25304s = this.f25303r + 2;\n this.f25305t = this.f25304s / 2;\n return;\n }\n throw new ArithmeticException(\"Wheel's visible item count can not be less than 2!\");\n }",
"public Picasso mo35058f() {\n return this.f30696a;\n }",
"public int mo1980w() throws cf {\r\n return m10275g(m10257E());\r\n }",
"static int getAnchor(int a){\n return a-((a-1)%3);\n }",
"Editor mo117962b();",
"protected long m8217a(long j) {\n return (j * 1000000) / ((long) this.f7048i);\n }",
"public int mo1534c() {\n return 2;\n }",
"public abstract Integer mo36210m();",
"void mo57278c();",
"public int mo34973b() {\n return 48;\n }",
"@Override\npublic void div(int a, int b) {\n\t\n}",
"public abstract long mo24412e();",
"int getExpoBracketingNImagesPref();",
"private static String m21386a(int i) {\n StringBuilder sb = new StringBuilder();\n sb.append(i & 255);\n String str = \".\";\n sb.append(str);\n sb.append((i >> 8) & 255);\n sb.append(str);\n sb.append((i >> 16) & 255);\n sb.append(str);\n sb.append((i >> 24) & 255);\n return sb.toString();\n }",
"protected void method_4157() {\r\n super.method_4157();\r\n this.method_4211(class_1840.field_9390).method_390(200.0D);\r\n }",
"public void method_264(String var1, int var2, int var3, int var4, int var5) {\n this.drawString(var1, var2 - this.method_271(var1, var4), var3, var4, var5);\n }"
] | [
"0.54830927",
"0.5390316",
"0.5178712",
"0.5107671",
"0.5083536",
"0.5052872",
"0.50384486",
"0.5037499",
"0.5028062",
"0.50227535",
"0.50174254",
"0.50140524",
"0.5002246",
"0.500105",
"0.4982529",
"0.49753693",
"0.49737433",
"0.4957892",
"0.49568525",
"0.49152052",
"0.48985705",
"0.48736513",
"0.48707834",
"0.4863037",
"0.48630178",
"0.48627067",
"0.4859091",
"0.4853023",
"0.4850679",
"0.48493254",
"0.4845537",
"0.48453072",
"0.48452547",
"0.48393825",
"0.48393586",
"0.48356444",
"0.48277846",
"0.48231182",
"0.4816716",
"0.47982475",
"0.47928768",
"0.47919673",
"0.47912183",
"0.4783937",
"0.4778909",
"0.47752017",
"0.477319",
"0.47683877",
"0.4766667",
"0.47630367",
"0.47628695",
"0.47561508",
"0.47507292",
"0.47491017",
"0.47447643",
"0.47447643",
"0.47447294",
"0.4739467",
"0.4731507",
"0.47261652",
"0.4722734",
"0.47196665",
"0.47138622",
"0.47099876",
"0.47072637",
"0.47062215",
"0.47053605",
"0.47018114",
"0.47006336",
"0.47000808",
"0.46981445",
"0.4694177",
"0.46917483",
"0.46904427",
"0.4685229",
"0.46847367",
"0.46763116",
"0.46755773",
"0.46710506",
"0.46705246",
"0.46689808",
"0.46665683",
"0.46637338",
"0.46611544",
"0.4660219",
"0.4658263",
"0.4657555",
"0.46566218",
"0.46561798",
"0.4655855",
"0.4655563",
"0.4655234",
"0.4650599",
"0.4648884",
"0.46400493",
"0.4639867",
"0.46394882",
"0.4637761",
"0.46376276",
"0.46335337",
"0.46287987"
] | 0.0 | -1 |
Write code to ask the user what their test score is and give different messages accordingly. Example: "Wow! You must have studied really hard for that test!" | public static void main(String[] args) {
String input=JOptionPane.showInputDialog("What is your test score? (0-100%)");
double score=Double.parseDouble(input);
if (score>90) {
JOptionPane.showMessageDialog(null, "Wow! You must have studied really hard for that test!");
}
if (score<70) {
JOptionPane.showMessageDialog(null, "Nice try... Study harder next time!");
}
if (score<90&&score>70) {
JOptionPane.showMessageDialog(null, "Good job! ... but you can do better!");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String submitAnswersScore(int calculatedScore) {\n String totalMessagePerfect = \"Great Job! You finished with a score of \" + calculatedScore + \" out of 6!\";\n totalMessagePerfect += \"\\nYou really know your Bears history!\";\n totalMessagePerfect += \"\\nThanks for taking my quiz!\";\n\n String totalMessageAlmost = \"Great Try! You finished with a score of \" +calculatedScore + \" out of 6.\";\n totalMessageAlmost += \"\\nThanks for taking my quiz!\";\n\n if (calculatedScore == 6) {\n return totalMessagePerfect;\n }\n else {\n return totalMessageAlmost;\n }\n }",
"private void displayScore(int score) {\n\n String strScore = String.valueOf (score);\n String message = getString (R.string.yourScoreIs) + strScore + getString (R.string.outOf6);\n\n if (score == 0) message += getString (R.string.score_zero);\n\n if (score == 1 || score == 2 || score == 3) message += getString (R.string.score_low);\n\n if (score == 4 || score == 5) message += getString (R.string.score_notBad);\n\n if (score == 6) message += getString (R.string.score_six);\n\n Toast.makeText (getApplicationContext (), message, Toast.LENGTH_LONG).show ();\n\n }",
"public static double getTestScore() {\n\t\tdouble testScore; // the value of the current test score \n\t\t\n\t\tScanner input = new Scanner(System.in);\n\t\t\n\t\tdo {\n\t\t\tSystem.out.print(\"Enter a test score 0 - 100: \");\n\t\t\ttestScore = input.nextDouble();\n\t\t}while(testScore < 0 || testScore > 100);\n\t\t\n\t\treturn testScore;\t//returns a testscore\n\t}",
"public static void main(String [] args) {\n\t\tScanner s = new Scanner(System.in);\n\t System.out.println(\"Please enter your score\");\n\t\t \n\t int grade = s.nextInt();\n\n\t \tString score = \" \";\n\t\t\tscore= ( grade >= 90 && grade<=100)? \"excellent\"\n\t\t\t\t\t:(grade >= 70 && grade<=89)? \"good\"\n\t\t\t\t\t\t :(grade >= 60 && grade<=69)? \"pass\"\n\t\t\t\t\t\t\t\t :(grade<=60)? \"fail\"\n\t\t\t\t\t\t\t\t\t:\" \"; \t\n\t \n\t\t\tSystem.out.println(score);\n\t\t\t \n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tint score = 0;\n\t\t// 2. Ask the user a question\n\t\tString q1 = JOptionPane.showInputDialog(\"what is the square root of nine ?\");\n\t\tif (q1.equals(\"three\") || q1.equals(\"3\")) {\n\t\t\tJOptionPane.showMessageDialog(null, \"you got it right!!\");\n\t\t\tscore++;\n\t\t} else {\n\t\t\tJOptionPane.showMessageDialog(null, \"sorry you were wrong\");\n\t\t}\n\t\tString q2 = JOptionPane.showInputDialog(\"12 x 12\");\n\t\tif (q2.equals(\"144\")) {\n\t\t\tJOptionPane.showMessageDialog(null, \"you got it right!!\");\n\t\t\tscore++;\n\t\t} else {\n\t\t\tJOptionPane.showMessageDialog(null, \"sorry you were wrong\");\n\t\t}\n\t\tString q3 = JOptionPane.showInputDialog(\"what is 1+2+3+4+5+6+7+8+9+10 ?\");\n\t\tif (q3.equals(\"55\")) {\n\t\t\tJOptionPane.showMessageDialog(null, \"you got it right!!\");\n\t\t\tscore++;\n\t\t} else {\n\t\t\tJOptionPane.showMessageDialog(null, \"sorry you were wrong\");\n\t\t}\n\t\tString q4 = JOptionPane.showInputDialog(\"what is the strongest substance on earth ?\");\n\t\tif (q4.equals(\"diamond\")) {\n\t\t\tJOptionPane.showMessageDialog(null, \"you got it right!!\");\n\t\t\tscore++;\n\t\t} else {\n\t\t\tJOptionPane.showMessageDialog(null, \"sorry you were wrong\");\n\t\t}\n\t\t// 3. Use an if statement to check if their answer is correct\n\n\t\t// 4. if the user's answer is correct\n\n\t\t// -- add one to their score\n\n\t\t// 5. Create more questions by repeating steps 1, 2, and 3 below.\n\n\t\t// 6. After all the questions have been asked, print the user's score\n\t\tJOptionPane.showMessageDialog(null, \"you got \" + score + \" out of 4, great job!\");\n\t}",
"public void userScore(float score) {\n String message;\n //Finds the appropriate text views in order to set text later\n TextView userScore = findViewById(R.id.yourScore);\n TextView userMessage = findViewById(R.id.messageView);\n //Final score variable derived from displayScore\n int finalScore = (Math.round(displayScore(score)));\n //if statements to determine message to be displayed based on finalScore\n if (finalScore == 100) {\n message = \"Wow!! \\nAre you Stan Lee?\";\n } else if (finalScore == 90) {\n message = \"You're amazing!!\";\n } else if (finalScore == 80) {\n message = \"Impressive!!\";\n } else if (finalScore == 70) {\n message = \"You're a regular \\ncomic book junkie!\";\n } else if (finalScore == 60) {\n message = \"Still a majority!!\";\n } else if (finalScore == 50) {\n message = \"Solid for the \\ncasual reader\";\n } else if (finalScore == 40) {\n message = \"Just a fan of \\nthe movies?\";\n } else if (finalScore == 30) {\n message = \"DC Universe?\";\n } else if (finalScore == 20) {\n message = \"A couple good guesses?\";\n } else if (finalScore == 10) {\n message = \"Did you even try?\";\n } else if (finalScore == 0) {\n message = \"Have you heard of Marvel?\";\n } else {\n message = \"What did you do?\";\n }\n //sets the text for the views\n userScore.setText((finalScore) + \"%\");\n userMessage.setText(message);\n }",
"public static void main(String[] args) {\nString score = JOptionPane.showInputDialog(\"What did you get on the test\");\ndouble test = Double.parseDouble(score);\nif(test>= 80) {\n\tJOptionPane.showMessageDialog(null, \"you must've studied really hard to get a \" + test);\n}\nif(test<= 79.99999999999999999999999999999999999999999999999999999999999) {\n\tJOptionPane.showMessageDialog(null, \"Maybe you should try harder next time becuase you only got a \" + test);\n}\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tint score = 0;\n\t\t// 2. Ask the user a question\n\t\tString input = JOptionPane.showInputDialog(null, \"What is a?: 2a-18=-4a:\");\n\t\t// 3. Use an if statement to check if their answer is correct\n\t\tif (input.equals(\"3\")) {\n\t\t\tJOptionPane.showMessageDialog(null, \"You are correct, good job!\");\n\n\t\t\tscore++;\n\n\t\t} else {\n\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\"You are incorrect, sorry. But don't worry, every mistake is a learning experience!\");\n\t\t}\n\t\t// 4. if the user's answer was correct, add one to their score\n\n\t\t// 5. Create more questions by repeating steps 1, 2, and 3 below.\n\t\tString answer = JOptionPane.showInputDialog(null, \"Which side of the Roman Empire fell? A: Eastern B: Western\");\n\t\tif (answer.equals(\"B\")) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Congrants, you got it correct!\");\n\t\t\tscore++;\n\n\t\t} else {\n\t\t\tJOptionPane.showMessageDialog(null, \"Sorry, but wrong answer. Nice try though!\");\n\t\t}\n\t\tJOptionPane.showMessageDialog(null,\"You have now completed the quiz, good job!\");\n\t\t// 6. After all the questions have been asked, print the user's score\n\t\tSystem.out.println(score);\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tint startGame;\n\n\n\t\t\n\t\tScanner numb = new Scanner(System.in);\n\t\tScanner str = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Please to start enter a username: \");\n\t\tusername = str.nextLine();\n\t\tSystem.out.println(\"\\n\\n\\t\\t\"+username+\", You are welcome to....\\n\\t\\tWho Wins A Million!!\");\n\t\tSystem.out.println(\"\\n\\t\\tPress 1 to enter\\n\\t\\t(Or 0 to quit)\");\n\t\tstartGame = numb.nextInt();\n\t\t\n\t\t\n\t\tif (startGame == 1) {\n\t\t\t\n\t\t\t//if(totalScore >= 0) {\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"So how well do you know Cameroon ?\\n\\n\");\n\t\t\t\t\n\t\t\t\tquestionNo = 1;\n\t\t\t\tSystem.out.println(questionNo+\". Who is the President of Cameroon? \\n\\na. Maurice Kamto \\tb. Paul Biya \\nc. Cabral Libii \\td. Joshua Oshi\");\n\t\t\t\tuserAnswer = str.nextLine();\n\t\t\t\tanswerTest();\n\t\t\t\tquestionScores();\n\t\t\t\tSystem.out.println(\"\\t\\t\\tScore: \"+userScore()+\"\\n\\n\");\n\t\t\t\tquestionNo++;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tSystem.out.println(questionNo+\". How many administrative divisions does Cameroon have ?\\n\\na. 15 \\t\\t\\tb. 12 \\nc. 8 \\t\\t\\td. 10\");\n\t\t\t\tuserAnswer = str.nextLine();\n\t\t\t\tanswerTest();\n\t\t\t\tquestionScores();\n\t\t\t\tSystem.out.println(\"\\t\\t\\tScore: \"+userScore()+\"\\n\\n\");\n\t\t\t\tquestionNo++;\n\t\t\t\t\n\t\t\t\tSystem.out.println(questionNo+\". Which of the following is the most populated town ?\\n\\na. Yaounde \\t\\tb. Bafoussam \\nc. Douala \\t\\td. Bamenda\");\n\t\t\t\tuserAnswer = str.nextLine();\n\t\t\t\tanswerTest();\n\t\t\t\tquestionScores();\n\t\t\t\tSystem.out.println(\"\\t\\t\\tScore: \"+userScore()+\"\\n\\n\");\n\t\t\t\tquestionNo++;\n\t\t\t\t\n\t\t\t\tSystem.out.println(questionNo+\". When did Cameroon gained its independence ?\\n\\na. 1950 \\t\\tb. 1960 \\nc. 1961 \\t\\td. 1951\");\n\t\t\t\tuserAnswer = str.nextLine();\n\t\t\t\tanswerTest();\n\t\t\t\tquestionScores();\n\t\t\t\tSystem.out.println(\"\\t\\t\\tScore: \"+userScore()+\"\\n\\n\");\n\t\t\t\tquestionNo++;\n\t\t\t\t\n\t\t\t\tSystem.out.println(questionNo+\". What is the total area of Cameroon in square kilometers ?\\n\\na. 475 441 \\t\\tb. 475 442 \\nc. 475 443 \\t\\td. 475 444\");\n\t\t\t\tuserAnswer = str.nextLine();\n\t\t\t\tanswerTest();\n\t\t\t\tquestionScores();\n\t\t\t\tSystem.out.println(\"\\t\\t\\tScore: \"+userScore()+\"\\n\\n\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tSystem.out.println(\".....................................\");\n\t\t\t\tSystem.out.println(username+\" Statistics\");\n\t\t\t\tSystem.out.println(\".....................................\\n\");\n\t\t\t\tSystem.out.println(\"Total Questions Attempted: \"+questionNo);\n\t\t\t\tSystem.out.println(\"Total Correct Answers: \"+correctQuestions);\n\t\t\t\tSystem.out.println(\"Total Score: \"+totalScore);\n\t\t\t\tSystem.out.println(\"Money obtained: \"+prizeMoney);\n\t\t\t\t\n\t\t\t//}\n\t\t\t\n\t\t\n\t\t}else System.out.println(\"Exiting\");\n\t\t\n\t\tSystem.out.println(\"\\nEnd of the game!\");\n\t}",
"public void displayCorrect(){\n textPane1.setText(\"\");\r\n generatePlayerName();\r\n textPane1.setText(\"GOOD JOB! That was the correct answer.\\n\"\r\n + atBatPlayer + \" got a hit!\\n\" +\r\n \"Press Next Question, or hit ENTER, to continue.\");\r\n SWINGButton.setText(\"Next Question\");\r\n formattedTextField1.setText(\"\");\r\n formattedTextField1.setText(\"Score: \" + score);\r\n }",
"private void showGameScore() {\n System.out.println(messageProvider.provideMessage(\"score\"));\n System.out.println(settings.getPlayers().get(0).getScore()\n + \" vs \" + settings.getPlayers().get(1).getScore());\n }",
"private String generateMessage(String name, double score) {\n String customMessage;\n if (score >= 90.0) {\n customMessage = getString(R.string.high_score);\n } else if (score >= 70.0) {\n customMessage = getString(R.string.med_score);\n } else {\n customMessage = getString(R.string.low_score);\n }\n return customMessage + name + \":\\n Your score is: \" + score + \"%\";\n }",
"public int displayCompletionMessage(int correctans) {\n\t\t\t\t\tcorrectans = ((correctans * 100) / 10);\n\t\t\t\t\tSystem.out.println(\"Your score is \"+ correctans);\n\t\t\t\t\t//display the message \"Congratulations, you are ready to go to the next level!\" if the student's score is greater than or equal to 75%\n\t\t\t\t\tif(correctans >= 75) {\n\t\t\t\t\t\tSystem.out.println(\"Congratulations, you are ready to go to the next level!\");\n\t\t\t\t\t}\n\t\t\t\t\t// display the message \"Please ask your teacher for extra help.\" if the student's score is less than 75%\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.println(\"Please ask your teacher for extra help.\");\n\t\t\t\t\t}\n\t\t\t\t\t//restart when the student agrees to solve a new problem set\n\t\t\t\t\t// shall terminate when the student declines to solve another problem set\n\t\t\t\t\tSystem.out.println(\"Want to solve a new problem set? 1 for yes/ 0 for no\");\n\t\t\t\t\t int counter = resp.nextInt();\n\t\t\t\t\t return counter;\n\t\t\t\t\t\n\t\t\t}",
"@SmallTest\n\tpublic void testScore_displayed() {\n\t\tassertEquals((Integer) START_SCORE, Integer.valueOf(solo.getText(1).getText().toString()));\n\t}",
"public static void main (String [] args) {\n\t\t\r\n\t\tScanner score = new Scanner (System.in);\r\n\r\n\t\tint passingPercentage = 65;\r\n\t\tSystem.out.println(\"What is your score: \");\r\n\t\t\r\n\t\tint yourScorePercentage = score.nextInt();\r\n\t\t\r\n\t\tif (yourScorePercentage >= passingPercentage) {\r\n\t\t\tSystem.out.println(\"You passed! Gongrats!\");\r\n\t\t}else { \r\n\t\t\tSystem.out.println(\"You failed! Study more! Don't be sad\");\r\n\t\t\r\n\t\t}\r\n\t\t\t\r\n\t\t}",
"public static void main(String[] args) {\n\t\tint score = 0;\n\n\t\t// 3. Ask the user a riddle. Here are some ideas: bit.ly/some-riddles\n\t\tString answer1 = JOptionPane.showInputDialog(\"What gets wetter and wetter the more it dries?\");\n\n\t\t// 4. If they got the answer right, pop up \"correct!\" and increase the score by one\n\t\t// 5. Otherwise, say \"wrong\" and tell them the answer\n\t\tif (answer1.equals(\"towel\")) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Correct!\");\n\t\t\tscore++;\n\t\t} else {\n\t\t\tJOptionPane.showMessageDialog(null, \"Wrong! The correct answer is: towel.\");\n\t\t}\n\n\t\t// 6. Add some more riddles\n\n\t\tString answer2 = JOptionPane.showInputDialog(\"What kind of room has no doors or windows?\");\n\n\t\tif (answer2.equals(\"mushroom\")) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Correct!\");\n\t\t\tscore++;\n\t\t} else {\n\t\t\tJOptionPane.showMessageDialog(null, \"Wrong! The correct answer is: mushroom.\");\n\t\t}\n\n\t\tString answer3 = JOptionPane.showInputDialog(\"Which word in the dictionary is spelled incorrectly?\");\n\n\t\tif (answer3.equals(\"incorrectly\")) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Correct!\");\n\t\t\tscore++;\n\t\t} else {\n\t\t\tJOptionPane.showMessageDialog(null, \"Wrong! The correct answer is: incorrectly.\");\n\t\t}\n\n\t\tString answer4 = JOptionPane.showInputDialog(\"What invention lets you look right through a wall?\");\n\n\t\tif (answer4.equals(\"window\")) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Correct!\");\n\t\t\tscore++;\n\t\t} else {\n\t\t\tJOptionPane.showMessageDialog(null, \"Wrong! The correct answer is: window.\");\n\t\t}\n\n\t\tString answer5 = JOptionPane.showInputDialog(\"What has a neck but no head?\");\n\n\t\tif (answer5.equals(\"bottle\")) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Correct!\");\n\t\t\tscore++;\n\t\t} else {\n\t\t\tJOptionPane.showMessageDialog(null, \"Wrong! The correct answer is: bottle.\");\n\t\t}\n\n\t\t// 2. Make a pop up to show the score.\n\t\tJOptionPane.showMessageDialog(null, \"Your score is: \" + score);\n\n\t}",
"@Test\n\tpublic void addScoreTest() {\n\t\tassertEquals(\"80.0 75.0 \", g1.toString());\n\t\tassertEquals(\"64.0 90.0 72.0 \", g2.toString());\n\t\tassertEquals(\"82.0 52.0 92.0 72.0 \", g3.toString());\n\t}",
"public static void main(String[]args){\n\n Scanner scanner = new Scanner(System.in);\n\n System.out.println(\"Write the score >> \");\n\n int score = scanner.nextInt();\n\n if (score >= 60){\n\n System.out.println(\"Pass\");\n }else\n\n /*if (score < 60)*/{\n\n System.out.println(\"Fail\");\n }\n\n }",
"public static void main(String[] args) {\nint b = 1; \n\t\t// 3. Ask the user a riddle. Here are some ideas: bit.ly/some-riddles\nString a = JOptionPane.showInputDialog(\"Name three keys that don't unlock a door?\");\n\t\t// 4. If they got the answer right, pop up \"correct!\" and increase the score by one\nif (a.equalsIgnoreCase(\"monkey, turkey and donkey\")) \n{\n\tJOptionPane.showMessageDialog(null, \"correct!!!\");\n\tSystem.out.println(b++);\n}\nelse\n{\nJOptionPane.showMessageDialog(null, \"sorry your uncorrect, the answer is monkey, turkey and donkey\");\t\n}\n\t\t// 5. Otherwise, say \"wrong\" and tell them the answer\n\n\t\t// 6. Add some more riddles\n\n\t\t// 2. Make a pop up to show the score.\n\t\t\n\t}",
"private void checkAnswer()\r\n\t{\r\n\t\t//Submission to the model and getting 'true' if correct and 'false' otherwise\r\n\t\tboolean response = quizModel.isCorrect(group.getSelection().getActionCommand());\r\n\t\t\r\n\t\t//Updating score label based on result\r\n\t\tif (response == true)\r\n\t\t{\r\n\t\t\tscoreLabel.setText(\"<html><div style='text-align: center;'>\" + \"Score = \" + quizModel.getScore() + \"<br>Correct answer!\" + \"</div></html>\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tscoreLabel.setText(\"<html><div style='text-align: center;'>\" + \"Score = \" + quizModel.getScore() + \"<br>Incorrect answer!\" + \"</div></html>\");\r\n\t\t}\r\n\t}",
"@Test\n public void allStrikesExpected_300(){\n String input = \"XXXXXXXXXXXX\";\n assertEquals(game.scoreOfGame(input),300);\n }",
"public static void main(String[] args) {\n\t\tint score = 0;\n\t\t// 2. Ask the user a question \n\t\tString answer = JOptionPane.showInputDialog(\"Who is the greatest basketball player of all time?\");\n\t\t// 3. Use an if statement to check if their answer is correct\n\t\tif (answer.equalsIgnoreCase(\"Michael Jordan\") || answer.equalsIgnoreCase(\"Jordan\") ) {\n\t\t// 4. if the user's answer was correct, add one to their score \n\t\t\tscore = score + 1; }\n\t\t// 5. Create more questions by repeating steps 1, 2, and 3 below. \n\t\tanswer = JOptionPane.showInputDialog(\"How many rings does Michael Jordan have?\");\n\t\tif (answer.equalsIgnoreCase(\"6\") || answer.equalsIgnoreCase(\"six\") ) {\n\t\tscore = score + 1; \n\t\t}\n\t\tanswer = JOptionPane.showInputDialog(\"What player scored the most points in one game?\");\n\t\tif (answer.equalsIgnoreCase(\"Wilt Chamberlain\")) {\n\t\tscore = score + 1;\n\t\t}\n\t\tanswer = JOptionPane.showInputDialog(\"Who won the most career NBA championships as a player?\");\n\t\tif (answer.equalsIgnoreCase(\"Bill Russell\")) {\n\t\tscore = score + 1;\n\t\t}\n\t\tanswer = JOptionPane.showInputDialog(\"What team drafted Kobe Brayant?\");\n\t\tif (answer.equalsIgnoreCase(\"Charlotte Hornets\") || answer.equalsIgnoreCase(\"Hornets\") ) {\n\t\tscore = score + 1;\n\t\t}\n\t\tanswer = JOptionPane.showInputDialog(\"Who is the shortest player of all-time?\");\n\t\tif (answer.equalsIgnoreCase(\"Muggsy Bogues\") || answer.equalsIgnoreCase(\"Tyrone Bogues\") ) {\n\t\tscore = score + 1;\n\t\t}\n\t\t// 6. After all the questions have been asked, print the user's score\n\t\tJOptionPane.showMessageDialog(null, \"You scored \" + score + \".\");\n\t\t\n\t}",
"public static void takeTest(Question [] questions) {\n int score = 0;\n Scanner keyboardInput = new Scanner(System.in);\n for(int i = 0; i < questions.length; i++){\n System.out.println(questions[i].prompt);\n String answer = keyboardInput.nextLine();\n if(answer.equals(questions[i].answer)) {\n score++;\n }\n\n }\n System.out.println(\"Voce conseguiu \" + score + \"/\" + questions.length + \"pontos\");\n\n }",
"protected void checkScore () {\n if (mCurrentIndex == questions.length-1) {\n NumberFormat pct = NumberFormat.getPercentInstance();\n double result = (double) correct/questions.length;\n Toast res = new Toast(getApplicationContext());\n res.makeText(QuizActivity.this, \"Your score: \" + pct.format(result), Toast.LENGTH_LONG).show();\n correct = 0; // resets the score when you go back to first question.\n }\n }",
"public String getScore() {\n String scoreMessage;\n if (noWinner() && !(isDeuce())) {\n scoreMessage = (isTie()) ? gameTie() : currentScore();\n }else if (isDeuce()){\n scoreMessage = \"Deuce\";\n }else {\n scoreMessage = advanceGame();\n }\n return scoreMessage;\n }",
"private void checkAnswer(String input) {\n\t\tif(counter==0)\n\t\t{\n\t\t\tif(input.toLowerCase(Locale.getDefault()).equals(\"moo\"))\n \t{\n \t\tresume();\n \t}\n \telse\n \t{\n \t\twrong();\n \t}\n\t\t}\n\t\tif(counter==1)\n\t\t{\n\t\t\tif(input.toLowerCase(Locale.getDefault()).equals(\"neigh\"))\n \t{\n \t\tresume();\n \t}\n \telse\n \t{\n \t\twrong();\n \t}\n\t\t}\n\t\tif(counter==2)\n\t\t{\n\t\t\tif(input.toLowerCase(Locale.getDefault()).equals(\"oink\"))\n \t{\n \t\tresume();\n \t}\n \telse\n \t{\n \t\twrong();\n \t}\n\t\t}\n\t\tif(counter==3)\n\t\t{\n\t\t\tif(input.toLowerCase(Locale.getDefault()).equals(\"baa\"))\n \t{\n \t\tresume();\n \t}\n \telse\n \t{\n \t\twrong();\n \t}\n\t\t}\n\t\tif(counter==4)\n\t\t{\n\t\t\tif(input.toLowerCase(Locale.getDefault()).equals(\"quack\"))\n \t{\n \t\tresume();\n \t}\n \telse\n \t{\n \t\twrong();\n \t}\n\t\t}\n\t\t\n\t}",
"public void showScore()\n {\n showText(\"Score:\" + score,550,50);\n }",
"public String returnMessage () {\n String msg = getString(R.string.result, score);\n if (score > 7) {\n msg += \"\\n\" + getString(R.string.fabulous);\n }\n else if (score >= 5 && score <= 7) {\n msg += \"\\n\" + getString(R.string.good_job);\n }\n else {\n msg += \"\\n\" + getString(R.string.try_again);\n }\n return msg;\n }",
"public static void displayScore(final Quiz quiz) {\n\t\tint qNumber = 0;\n\t\tint totScore = 0;\n\t\tfor (question q : quiz.getQList()) {\n\t\t\tSystem.out.println(q.qText);\n\t\t\tif (q.corrChoice.equals(quiz.getAnswers(qNumber))) {\n\t\t\t\tSystem.out.println(\" Correct Answer! - Marks Awarded: \" + q.maxMarks);\n\t\t\t\ttotScore += Integer.parseInt(q.maxMarks);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\" Wrong Answer! - Penalty: \" + q.penalty);\n\t\t\t\ttotScore += Integer.parseInt(q.penalty);\n\t\t\t}\n\t\t\tqNumber += 1;\n\t\t}\n\t\tSystem.out.println(\"Total Score: \" + totScore);\n\t}",
"private void setResultsDisplay(double score) {\n TextView resultsTextView = (TextView) findViewById(R.id.results_text_view);\n String letterGrade = getLetterGrade(score);\n resultsTextView.setText(\"Your Grade: \" + letterGrade);\n }",
"public static void main(String[] args){\n Scanner keyboard = new Scanner(System.in);\n //declare variables for the answer, user's guess, and number fo guesses\n int answer;\n int guess;\n int numOfGuess = 0;\n \n boolean done = false;\n answer = (int)(100*Math.random())+1;\n \n //print an introduction that tells the user how to play this game\n System.out.println(\"Hello user! I will generate a number between 1-100 inclusive and you will try to guess it! I will tell you if your answer is too low or too high after each incorrect guess!\");\n do \n {\n System.out.print(\"Please enter your guess:\");\n guess = keyboard.nextInt();\n if (guess > answer){\n System.out.println(\"Too high!\");\n }\n else if( guess < answer){\n System.out.println(\"Too low!\");\n }\n else{\n done = true;\n }\n numOfGuess += 1;\n } while (done == false);\n \n System.out.println(\"Congratulations! You're score is \" + numOfGuess);\n if (numOfGuess >= 20){\n System.out.println(\"Rating: You are terrible at this game!\");\n }\n else if (numOfGuess >= 10 && numOfGuess <=19){\n System.out.println(\"Rating: You need more practice!\");\n }\n else if (numOfGuess >= 5 && numOfGuess <= 9){\n System.out.println(\"Rating: Not too bad, But can you get it in fewer than 5 guesses?\");\n }\n else if (numOfGuess >= 2 && numOfGuess <= 4){\n System.out.println(\"Rating: AWESOME. You win a trip to Hawaii!\");\n }\n else{\n System.out.println(\"Rating: That was pure LUCK and you know it!\");\n }\n \n }",
"public double testQuiz(Quiz quiz) {\n\t\t// System.out.println(\"Testing quiz: \" + quiz + \"\\n\" +\n\t\t// quiz.display() + \"\\nwith QuizTester: \" + id\n\t\t// + \" SearchString: \" + searchString);\n\t\tdouble score = 0;\n\t\tfor (Question question : quiz.getQuestionList()) {\n\t\t\tboolean guess = question.getPrompt().contains(searchString);\n\t\t\tif (question.isAnswer() == guess) {\n\t\t\t\t++score;\n\t\t\t}\n\t\t}\n\t\t// System.out.println(\"Completed testing quiz: \" + quiz + \"\\nFinal Score: \" +\n\t\t// score + \" / \" + quiz.getQuestionList().size() + \" AKA: \" + (score /\n\t\t// quiz.getQuestionList().size()) );\n\t\treturn score / quiz.getQuestionList().size();\n\t}",
"private void checkMyScore() {\n\n int[] scores = ar.checkMyScore();\n System.out.println(\" My score: \");\n int level = 1;\n for (int i : scores) {\n System.out.println(\" level \" + level + \" \" + i);\n if (i > 0)\n solved[level - 1] = 1;\n level++;\n }\n }",
"public void CheckScore(){\n \tif(killed > highScore) {\n \t\tname = JOptionPane.showInputDialog(\"You set a HighScore!\\n What is your Name?\");\n \t\thighScore = killed;\n \t}\n }",
"public static int getExamScore(boolean SAT_Score, String prompt) \n {\n if(SAT_Score)\n {\n System.out.println(\"\\t Enter \" + prompt + \" score between 200 and 800: \");\n int response = console.nextInt();\n if(response>=200 && response <=800)\n {\n return response;\n }\n else\n {\n throw new IllegalArgumentException(\"Value must be between 200 and 800.\");\n }\n }\n else\n {\n System.out.println(\"\\t Enter \" + prompt + \" score between 1 and 36: \");\n int response = console.nextInt();\n if(response>=1 && response <=36)\n {\n return response;\n }\n else\n {\n throw new IllegalArgumentException(\"Value must be between 200 and 800.\");\n }\n }\n }",
"public void test(int studyReq, int points) {\r\n\t\tdouble score = 0;\r\n\t\ttotalPoints+=points;\r\n\t\tif(testReadiness >= studyReq) {\r\n\t\t\tscore = points;\r\n\t\t\tcurrentPoints+=points;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcurrentPoints+=points - (studyReq - testReadiness);\r\n\t\t\tscore = points - (studyReq - testReadiness);\r\n\t\t}\r\n\t\t\r\n\t\tgrade = currentPoints/totalPoints;\r\n\t\tif(grade < 0) {\r\n\t\t\tgrade = 0;\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"You took the test today and got \" + ((score/points) * 100) + \"%\");\r\n\t\tSystem.out.println(\"hours needed: \" + studyReq + \"\\nhours Studied: \" + testReadiness);\r\n\t\ttestReadiness = 0;\r\n\t}",
"@Test\n public void bonusScoreTest() {\n score = new BonusScore();\n\n try {\n score.calculateScore(0, 1);\n Assert.fail();\n } catch (HangmanException e) {\n Assert.assertEquals(e.getMessage(), HangmanException.PARAMETRO_LIMITE_PUNTUACION);\n }\n try {\n score.calculateScore(1, 3);\n\n Assert.fail();\n } catch (HangmanException e) {\n Assert.assertEquals(e.getMessage(), HangmanException.PARAMETRO_LIMITE_PUNTUACION);\n }\n\n\n try {\n score.calculateScore(-2, -2);\n Assert.fail();\n } catch (HangmanException e) {\n Assert.assertEquals(e.getMessage(), HangmanException.PARAMETROS_NEGATIVOS);\n }\n try {\n score.calculateScore(-1, -1);\n Assert.fail();\n } catch (HangmanException e) {\n Assert.assertEquals(e.getMessage(), HangmanException.PARAMETROS_NEGATIVOS);\n }\n\n\n try {\n score.calculateScore(1, 0);\n score.calculateScore(1, 1);\n score.calculateScore(1, 2);\n score.calculateScore(0, 0);\n score.calculateScore(2, 0);\n } catch (HangmanException e) {\n Assert.fail();\n }\n\n }",
"static String score(String agent1,String agent2)\n {\n int a1=random(s.length);\n int a2=random(s.length);\n if(a1==a2)\n a2++;\n if (a1 < a2)\n {\n allScores[in]=agent1+\" lose from \"+ agent2 + \" \" + a2 +\"-\"+ a1;\n JOptionPane.showMessageDialog(new JFrame(),allScores[in]);\n in++;\n return agent2;\n }\n else\n {\n allScores[in]=agent2+\" lose from \"+ agent1 +\" \" + a1 +\"-\"+ a2;\n JOptionPane.showMessageDialog(new JFrame(),allScores[in]);\n in++;\n return agent1;\n }\n\n }",
"public static void score() {\n\t\tSystem.out.println(\"SCORE: \");\n\t\tSystem.out.println(player1 + \": \" + score1);\n\t\tSystem.out.println(player2 + \": \" + score2);\n\t}",
"@Test\n void studentMCQTotalScoreTest(){\n Student student = new Student(\"Lim\");\n student.setNumCorrectAns(8); // Set Total Number Question(s) Answered Correctly\n student.setNumQuestionAns(10); // Set Total Number Question(s) Answered Correctly\n\n\n double expectedResult = 80; // Input for testing\n // Calculate total score and set it\n student.setCalculatedScore(student.getNumCorrectAns(), student.getNumQuestionAns());\n System.out.println(\"Test Case #5\");\n System.out.println(\"\\tExpected Result: \" + expectedResult); // print expected result\n double actualResult = student.getTotalScore(); // Actual Result\n System.out.println(\"\\tActual Result: \" + actualResult); // Print actual result\n assertEquals(expectedResult, actualResult); // Compare the expected result (True) & Actual Result\n }",
"private void checkScores(int expectP1, int expectP2) {\n\n\t\tassertTrue(p1ScoreLabel.getText().matches(\"[^\\\\d]*\" + expectP1 + \"[^\\\\d]*\"));\n\n\t\tassertTrue(p2ScoreLabel.getText().matches(\"[^\\\\d]*\" + expectP2 + \"[^\\\\d]*\"));\n\n\t}",
"private void getTargetScore() {\n // stack overflow\n AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.AlertDialogTheme);\n builder.setTitle(R.string.target_score);\n // Set up the input\n final EditText input = new EditText(this);\n // Specify the type of input expected; this, for example, sets the input as a password, and will mask the text\n input.setInputType(InputType.TYPE_CLASS_NUMBER);\n builder.setView(input);\n // Set up the buttons\n builder.setPositiveButton(R.string.positive_button, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n target_score = Integer.parseInt(input.getText().toString());\n target_score_view.setText(String.valueOf(target_score));\n game = new Game(target_score);\n }\n });\n // builder.show();\n // Set color of alert dialog buttons (from stack overflow)\n AlertDialog alert = builder.create();\n alert.show();\n\n Button pbutton = alert.getButton(DialogInterface.BUTTON_POSITIVE);\n pbutton.setBackgroundColor(getResources().getColor(R.color.yale_blue));\n }",
"protected int checkIfCorrect(String answer, String correctAns)\r\n {\r\n if (correctAns.equals(answer))\r\n {\r\n System.out.println(\"Awsome job!\");\r\n return score++;\r\n }\r\n else \r\n { \r\n System.out.println(\"opps\"); \r\n return score;\r\n }\r\n \r\n }",
"public void inputGrades()\n {\n do\n {\n System.out.print(\"Enter \" + name + \"'s percent score for Test 1: \");\n test1 = kb.nextDouble();\n if (test1 < 0 || test1 > 100) System.out.println(\"Invalid grade, \" +\n \"please try again.\");\n } while (test1 < 0 || test1 > 100);\n do\n {\n System.out.print(\"Enter \" + name + \"'s percent score for Test 2: \");\n test2 = kb.nextDouble();\n if (test2 < 0 || test2 > 100) System.out.println(\"Invalid grade, \" +\n \"please try again.\");\n } while (test2 < 0 || test2 > 100);\n }",
"public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.println(\"What is your name?\");\n\t\tString userName = input.nextLine();\n\t\t\n\t\t// Prompt user to enter integer scores (out of 100) for quizzes.\n\t\tSystem.out.println(userName + \", what is your score for Quiz 1 (out of 100)?\");\n\t\tint quiz1 = input.nextInt(); \n\t\tSystem.out.println(userName + \", what is your score for Quiz 2 (out of 100)?\");\n\t\tint quiz2 = input.nextInt(); \n\t\tSystem.out.println(userName + \", what is your score for Quiz 3 (out of 100)?\");\n\t\tint quiz3 = input.nextInt(); \n\t\tSystem.out.println(userName + \", what is your score for Quiz 4 (out of 100)?\");\n\t\tint quiz4 = input.nextInt(); \n\t\tSystem.out.println(userName + \", what is your score for Quiz 5 (out of 100)?\");\n\t\tint quiz5 = input.nextInt(); \n\t\tSystem.out.println(userName + \", what is your score for Quiz 6 (out of 100)?\");\n\t\tint quiz6 = input.nextInt(); \n\t\tSystem.out.println(userName + \", what is your score for Quiz 7 (out of 100)?\");\n\t\tint quiz7 = input.nextInt(); \n\t\tSystem.out.println(userName + \", what is your score for Quiz 8 (out of 100)?\");\n\t\tint quiz8 = input.nextInt(); \n\t\tSystem.out.println(userName + \", what is your score for Quiz 9 (out of 100)?\");\n\t\tint quiz9 = input.nextInt(); \n\t\t\n\t\t// Prompt user to enter integer scores (out of 100) for assignments.\n\t\tSystem.out.println(userName + \", what is your score for Assignment 1 (out of 100)?\");\n\t\tint assignment1 = input.nextInt();\n\t\tSystem.out.println(userName + \", what is your score for Assignment 2 (out of 100)?\");\n\t\tint assignment2 = input.nextInt();\n\t\tSystem.out.println(userName + \", what is your score for Assignment 3 (out of 100)?\");\n\t\tint assignment3 = input.nextInt();\n\t\tSystem.out.println(userName + \", what is your score for Assignment 4 (out of 100)?\");\n\t\tint assignment4 = input.nextInt();\n\t\tSystem.out.println(userName + \", what is your score for Assignment 5 (out of 100)?\");\n\t\tint assignment5 = input.nextInt();\n\t\tSystem.out.println(userName + \", what is your score for Assignment 6 (out of 100)?\");\n\t\tint assignment6 = input.nextInt();\n\t\tSystem.out.println(userName + \", what is your score for Assignment 7 (out of 100)?\");\n\t\tint assignment7 = input.nextInt();\n\t\tSystem.out.println(userName + \", what is your score for Assignment 8 (out of 100)?\");\n\t\tint assignment8 = input.nextInt();\n\t\tSystem.out.println(userName + \", what is your score for Assignment 9 (out of 100)?\");\n\t\tint assignment9 = input.nextInt();\n\t\tSystem.out.println(userName + \", what is your score for Assignment 10 (out of 100)?\");\n\t\tint assignment10 = input.nextInt();\n\t\t\n\t\t// Prompt user to enter integer scores (out of 100) for lab tests.\n\t\tSystem.out.println(userName + \", what is your score for Lab Test 1 (out of 100)?\");\n\t\tint labTest1 = input.nextInt();\n\t\tSystem.out.println(userName + \", what is your score for Lab Test 2 (out of 100)?\");\n\t\tint labTest2 = input.nextInt();\n\t\tSystem.out.println(userName + \", what is your score for Lab Test 3 (out of 100)?\");\n\t\tint labTest3 = input.nextInt();\n\t\t\n\t\t// Prompt user to enter integer scores (out of 100) for midterm test and final.\n\t\tSystem.out.println(userName + \", what is your midterm score (out of 100)?\");\n\t\tint midtermTest = input.nextInt();\n\t\tSystem.out.println(userName + \", what is your final exam score (out of 100)?\");\n\t\tint finalExam = input.nextInt();\n\t\tinput.nextLine();\n\t\t\n\t\t// Calculate averages for quizzes, assignments, and lab tests as well as final raw marks\n\t\tdouble averageQuizzes = (quiz1 + quiz2 + quiz3 + quiz4 + quiz5 + quiz6 + quiz7 + quiz8 + quiz9) / 9.0;\n\t\tdouble averageAssignments = (assignment1 + assignment2 + assignment3 + assignment4 + assignment5 + assignment6 + assignment7 + assignment8 + assignment9 + assignment10) / 10.0;\n\t\tdouble averageLabTests = (labTest1 + labTest2 + labTest3) / 3.0;\n\t\tdouble finalRawMarks = (averageQuizzes * 0.18) + (averageAssignments * 0.2) + (averageLabTests * 0.12) + (midtermTest * 0.15) + (finalExam * 0.35);\n\t\t\n\t\t// Prompt user to specify which course is being reported on\n\t\tSystem.out.println(userName + \", which course are you talking about?\");\n\t\tString courseName = input.nextLine();\n\t\t\n\t\t// Display each grading component.\n\t\tSystem.out.println(userName + \", here is your grading report for \" + courseName + \": \");\n\t\tSystem.out.println(\"-----------------------------------------\");\n\t\tSystem.out.println(\"Quiz 1: \" + quiz1);\n\t\tSystem.out.println(\"Quiz 2: \" + quiz2);\n\t\tSystem.out.println(\"Quiz 3: \" + quiz3);\n\t\tSystem.out.println(\"Quiz 4: \" + quiz4);\n\t\tSystem.out.println(\"Quiz 5: \" + quiz5);\n\t\tSystem.out.println(\"Quiz 6: \" + quiz6);\n\t\tSystem.out.println(\"Quiz 7: \" + quiz7);\n\t\tSystem.out.println(\"Quiz 8: \" + quiz8);\n\t\tSystem.out.println(\"Quiz 9: \" + quiz9);\n\t\tSystem.out.println(\"-----------------------------------------\");\n\t\tSystem.out.println(\"Assignment 1: \" + assignment1);\n\t\tSystem.out.println(\"Assignment 2: \" + assignment2);\n\t\tSystem.out.println(\"Assignment 3: \" + assignment3);\n\t\tSystem.out.println(\"Assignment 4: \" + assignment4);\n\t\tSystem.out.println(\"Assignment 5: \" + assignment5);\n\t\tSystem.out.println(\"Assignment 6: \" + assignment6);\n\t\tSystem.out.println(\"Assignment 7: \" + assignment7);\n\t\tSystem.out.println(\"Assignment 8: \" + assignment8);\n\t\tSystem.out.println(\"Assignment 9: \" + assignment9);\n\t\tSystem.out.println(\"Assignment 10: \" + assignment10);\n\t\tSystem.out.println(\"-----------------------------------------\");\n\t\tSystem.out.println(\"Lab Test 1: \" + labTest1);\n\t\tSystem.out.println(\"Lab Test 2: \" + labTest2);\n\t\tSystem.out.println(\"Lab Test 3: \" + labTest3);\n\t\tSystem.out.println(\"-----------------------------------------\");\n\t\tSystem.out.println(\"Midterm Test: \" + midtermTest);\n\t\tSystem.out.println(\"Final Exam: \" + finalExam);\n\t\tSystem.out.println(\"-----------------------------------------\");\n\t\t\n\t\t// Display the averages of quizzes, assignments, and lab tests, as well as raw final marks (out of 100)\n\t\tSystem.out.println(\"Average of quizzes: \" + averageQuizzes);\n\t\tSystem.out.println(\"Average of assignments: \" + averageAssignments);\n\t\tSystem.out.println(\"Average of lab tests: \" + averageLabTests);\n\t\tSystem.out.println(\"Final raw marks: \" + finalRawMarks);\n\t\t\n\t\tinput.close();\n\n\t}",
"public static void displayScore(final Quiz quiz) {\n // write your code here\n // to display the score\n // report using quiz object.\n if (getflag()) {\n return;\n }\n System.out.println(quiz.showReport());\n }",
"public static void main(String[] args){\n int studentId = promptUserForInt(\"Please enter your Student EMPLID (0 - 999999): \");\n double quiz1Percent = promptUserForDouble(\"Please enter your quiz1 percentage score(0.0 - 100.0): \");\n double quiz2Percent = promptUserForDouble(\"Please enter your quiz2 percentage score(0.0 - 100.0): \");\n double quiz3Percent = promptUserForDouble(\"Please enter your quiz3 percentage score(0.0 - 100.0): \");\n int ageInMonths = promptUserForInt(\"Please enter your age in months (0 - 1440): \");\n double tempC = promptUserForDouble(\"Please enter the current temperature in degrees Celsius: \");\n\n // Output results\n System.out.println(\"\\n\");\n System.out.println(\"*** Thank You ***\");\n System.out.println(\"Student EMPLID: \" + studentId);\n System.out.println(\"Quiz 1 Score: \" + quiz1Percent);\n System.out.println(\"Quiz 2 Score: \" + quiz2Percent);\n System.out.println(\"Quiz 3 Score: \" + quiz3Percent);\n System.out.println(\"Average Quiz Score: \" + averageQuizScore(quiz1Percent, quiz2Percent, quiz3Percent));\n System.out.println(\"Age in Months: \" + ageInMonths);\n System.out.println(\"Age in years: \" + convertAgeToYears(ageInMonths));\n System.out.println(\"Temperature in Celsius \" + tempC + \"\\u00b0\");\n System.out.println(\"Temperature in Fahrenheit \" + convertCelcToFahr(tempC) + \"\\u00b0\");\n\n }",
"public static void main(String[] args) {\n\t\tint passes = 0;\t//通过人数\r\n\t\tint failuress = 0;\t//未通过人数\r\n\t\tint studentCounter = 1;\t//学生人数的计数器\r\n\t\tint result;\t//考试结果(1代表通过,2代表未通过)\r\n\t\t\r\n\t\tString input;\t//定义 接收用户输入的考试结果 的变量\r\n\t\tString output;\t//定义 输出最终分析结果 的变量\r\n\t\t\r\n\t\twhile (studentCounter <= 10) {\t//循环,学生人数不大于10时进入循环;否则退出循环\r\n\t\t\t\r\n\t\t\tinput = JOptionPane.showInputDialog(\"Enter result (1 = pass, 2 = fail)\");\t//在弹出框中输入考试结果,并赋值给input\r\n\t\t\t\r\n\t\t\tresult = Integer.parseInt(input);\t//将String类型的考试结果转换为int型,并赋值给result\r\n\t\t\t\r\n\t\t\tif (result == 1) { //if-else条件判断,result为1时执行if语句\r\n\t\t\t\tpasses = passes + 1;\t//通过考试的人数加1\r\n\t\t\t} else { //result不为1时执行else语句\r\n\t\t\t\tfailuress = failuress + 1;\t//未通过考试的人数加1\r\n\t\t\t}\t//if-else结束\r\n\t\t\t\r\n\t\t\tstudentCounter = studentCounter + 1;\t//学生人数值加1\r\n\t\t}\t//while结束\r\n\t\t\r\n\t\toutput = \" Passed:\" + passes + \"\\nFailed:\" + failuress;\t//给output变量赋值\r\n\t\t\r\n\t\tif (passes > 8) {\t//若通过考试的人数大于8执行if语句;否则不执行\r\n\t\t\toutput = output + \"\\nRaise Tuition\";\t//在output字符串后添加上“提高学费”\r\n\t\t\t\r\n\t\t}\t//if结束\r\n\t\t\r\n\t\tJOptionPane.showMessageDialog(null, output, \"Analysis of Examination Reults\", \r\n\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\t//在提示框中显示:通过考试的人数,未通过考试的人数,若通过人数超过8还要显示“提高学费”\r\n\t\t\r\n\t\tSystem.exit(0);\t//程序退出\r\n\t}",
"public static void main(String[] args) {\n\r\n\t\tScanner scan = new Scanner(System.in);\t\r\n\t\t\r\n\t\tint die1;\r\n\t\tint die2;\r\n\t\tint scoreuser;\r\n\t\tint scorecpu;\r\n\t\tString question;\r\n\t\r\n\t\tSystem.out.print(\"Would you like to play? \");\r\n\t\tquestion = scan.nextLine();\r\n\t\t\r\n\t\t\r\n\tdo{\t\r\n\t\tdie1 = (int)(Math.random()*6+1);\r\n\t\tdie2 = (int)(Math.random()*6+1);\r\n\t\tscoreuser = die1 + die2;\r\n\t\t\r\n\t\tdie1 = (int)(Math.random()*6+1);\r\n\t\tdie2 = (int)(Math.random()*6+1);\r\n\t\tscorecpu = die1 + die2;\r\n\t\t\r\n\t\tSystem.out.println(\"\\nyour score is: \" + scoreuser);\r\n\t\tSystem.out.println(\"The computers score: \" + scorecpu);\r\n\t\r\n\t\t\r\n\tif (scoreuser == scorecpu)\r\n\t\tSystem.out.println(\"It's a tie\");\r\n\t\r\n\telse if (scoreuser > scorecpu)\r\n\t System.out.println(\"YOU WON!\\n\");\r\n\t\r\n\telse\r\n\t\t System.out.println(\"The computer won, you lost\\n\");\r\n\t System.out.print(\"Would you like to play again? \");\r\n\t question = scan.nextLine();\r\n\t\r\n\t}while (question. equals (\"yes\"));\t\r\n\t\t\r\n\t\t\r\n\t}",
"private void displayScore(int score) {\n // Set a text view to show the score.\n TextView scoreView = findViewById(R.id.score_text_view);\n scoreView.setText(format(\" %d\", score));\n }",
"java.lang.String getCorrectAnswer();",
"public void getScores(){\n String p1 = \"Player 1 has \" + Integer.toString(player1.getWins());\n String p2 = \"Player 2 has \" + Integer.toString(player2.getWins());\n String winner = \"tie\";\n if(player1.getWins()>player2.getWins()){\n winner = player1.getName() + \" wins!!!!\";\n }\n else if(player2.getWins()>player1.getWins()){\n winner = player2.getName() + \" Wins!!!\";\n }\n JOptionPane.showMessageDialog(null, (p1 + \"\\n\" + p2 + \"\\n\" + winner));\n }",
"public void testNoYes () throws Exception{\n\n // RunID TeamID Prob Time Result\n \n String [] runsData = {\n \"5,2,A,12,No\",\n \"6,2,A,12,Yes\",\n };\n \n // Rank TeamId Solved Penalty\n \n String [] rankData = {\n \"1,team2,1,32\",\n \"2,team1,0,0\",\n };\n \n scoreboardTest (2, runsData, rankData);\n }",
"private void calculateScore() {\n EditText editText1 = (EditText) findViewById(R.id.edit_text1);\n String answer1 = editText1.getText().toString().toLowerCase().trim();\n if (answer1.equals( getResources().getText(R.string.answer1))) {\n score += 3;\n } else {\n //show false\n }\n\n RadioGroup radioGroup2 = (RadioGroup) findViewById(R.id.radio_group2);\n int checkedRadioButtonId2 = radioGroup2.getCheckedRadioButtonId();\n if (checkedRadioButtonId2 == R.id.rb21) {\n score += 1;\n } else {\n //show false\n }\n\n CheckBox checkBox3b = (CheckBox) findViewById(R.id.cb32);\n CheckBox checkBox3d = (CheckBox) findViewById(R.id.cb34);\n if (checkBox3b.isChecked() && checkBox3d.isChecked()) {\n score += 2;\n } else {\n //show false\n }\n\n RadioGroup radioGroup4 = (RadioGroup) findViewById(R.id.radio_group4);\n int checkedRadioButtonId4 = radioGroup4.getCheckedRadioButtonId();\n if (checkedRadioButtonId4 == R.id.rb41) {\n score += 1;\n } else {\n //show false\n }\n }",
"double scoreAnswer(Question question, Answer answer);",
"private synchronized String responseMessage(String playerInputNum) {\n if (playerInputNum.equals(answer)) {\n winOrLose = true;\n return \"Congratulation, the correct answer is \" + answer;\n } else if (attempt == 4) {\n attempt = 5;\n return \"Game over, the answer is \" + answer;\n } else if (playerInputNum.compareTo(answer) > 0)\n return \"The guess number \" + playerInputNum + \" is bigger than the generated number, \" + (4 - attempt) + \" chances left.\";\n else\n return \"The guess number \" + playerInputNum + \" is smaller than the generated number, \" + (4 - attempt) + \" chances left.\";\n }",
"public void changeLableText(int playerScore,int computerScore);",
"private int calculateScore(boolean answerOne, boolean answerTwo, boolean answerThree, boolean answerFour, boolean answerFiveA, boolean answerFiveB, boolean answerFiveC, boolean answerFiveD, boolean answerSix, boolean answerSeven, boolean answerEight, boolean answerNine, String answerTen) {\n int score = 0;\n\n if (answerOne) {\n score += 10;\n Log.v(\"MainActivity\", \"1\");\n }\n\n if (answerTwo) {\n score += 10;\n Log.v(\"MainActivity\", \"2\");\n }\n\n if (answerThree) {\n score += 10;\n Log.v(\"MainActivity\", \"3\");\n }\n\n if (answerFour) {\n score += 10;\n Log.v(\"MainActivity\", \"4\");\n }\n\n if (answerFiveA && !answerFiveB && !answerFiveC && answerFiveD) {\n score += 10;\n Log.v(\"MainActivity\", \"5\");\n }\n\n if (answerSix) {\n score += 10;\n Log.v(\"MainActivity\", \"6\");\n }\n\n if (answerSeven) {\n score += 10;\n Log.v(\"MainActivity\", \"7\");\n }\n\n if (answerEight) {\n score += 10;\n Log.v(\"MainActivity\", \"8\");\n }\n\n if (answerNine) {\n score += 10;\n Log.v(\"MainActivity\", \"9\");\n }\n\n if (answerTen.equals(\"Norbert\")) {\n score += 10;\n Log.v(\"MainActivity\", \"10\");\n }\n\n return score;\n }",
"@Test\n public void testCalculateScore() {\n System.out.println(\"calculateScore\");\n String input1 = \"8 0 3 1 6 5 -2 4 7 1 3 -2 6\";\n String input2 = \"8 0 3 1 6 5 -2 4 7 3 2 -2 6\";\n CCGeneticDrift instance = new CCGeneticDrift();\n int expResult1 = 2;\n int expResult2 = 4;\n int result1 = instance.calculateScore(input1);\n assertEquals(result1, expResult1);\n int result2 = instance.calculateScore(input2);\n assertEquals(result2, expResult2);\n }",
"public static void main(String[] args) {\n\n int tries = 1;\n while (tries < 5) {\n Scanner scanner = new Scanner(System.in);\n System.out.print(\"Enter first number: \");\n int first = scanner.nextInt();\n System.out.print(\"Enter second number: \");\n int second = scanner.nextInt();\n System.out.println(\"The smaller of these is: \" +\n Math.min(first, second));\n tries += 1;\n }\n\n /*\n\n // Strings\n String name = \"John Doe\";\n System.out.println(name.length());\n String age = \"40 years of age\";\n\n // Concatenation (combining strings)\n System.out.println(name + \" is \" + age);\n\n System.out.print(\"This is a new line \\n\");\n System.out.print(\"This is a tab \\t character \\n\");\n\n String greeting = \"Hello, world\";\n System.out.println(greeting.substring(7));\n System.out.println(greeting.substring(0, 5));\n\n System.out.println(\"A couple of words\".indexOf(\"words\"));\n\n String player1 = \"rock\", player2 = \"paper\";\n\n if (player1.compareTo(player2) == 0) {\n System.out.println(\"A tie\");\n }\n switch (player1) {\n case \"rock\":\n switch (player2) {\n case \"scissors\":\n\n break;\n case \"paper\":\n\n break;\n\n }\n break;\n case \"scissors\":\n switch (player2) {\n case \"rock\":\n\n break;\n case \"paper\":\n\n break;\n\n }\n break;\n case \"paper\":\n switch (player2) {\n case \"rock\":\n\n break;\n case \"scissors\":\n\n break;\n\n }\n break;\n }\n\n if (player1.compareTo(\"rock\") == 0) {\n if (player2.compareTo(\"rock\") == 0) {\n\n } else if (player2.compareTo(\"scissors\") == 0) {\n\n } else if (player2.compareTo(\"paper\") == 0) {\n\n }\n } else if (player1.compareTo(\"scissors\") == 0) {\n if (player2.compareTo(\"rock\") == 0) {\n\n } else if (player2.compareTo(\"scissors\") == 0) {\n\n } else if (player2.compareTo(\"paper\") == 0) {\n\n }\n } else if (player1.compareTo(\"paper\") == 0) {\n if (player2.compareTo(\"rock\") == 0) {\n\n } else if (player2.compareTo(\"scissors\") == 0) {\n\n } else if (player2.compareTo(\"paper\") == 0) {\n\n }\n }\n\n */\n }",
"public void checkQuiz(View view) {\n int score = computeScore();\n ((TextView) findViewById(R.id.scoreTitle)).setText(R.string.score_title);\n ((TextView) findViewById(R.id.score)).setText(score + \"/\" + getQuizCountries().size());\n }",
"public void updatescore() {\n scorelabel.setText(\"\" + score + \" points\");\n if (100 - score <= 10) win();\n }",
"public void quiz() {\n\t\t\t\t\tcorrectans = 0;\n\t\t\t\t\tint k = 0;\n\t\t\t\t\tint j = 0;\n\t\t\t\t\tint M = 0;\n\t\t\t\t\tj = readDifficulty();\n\t\t\t\t\tM = readProblemType();\n\t\t\t\t\t//ask the student to solve 10 different problems, as determined by the problem type\n\t\t\t for(int i = 0; i < 10; i++ ) {\n\t\t\t \t//contain two numbers sampled from a uniform random distribution with bounds determined by the problem difficulty\n\t\t\t \tint x = rand.nextInt(j); \n\t\t\t\t int y = rand.nextInt(j);\n\t\t\t\t int O = askquestion(j, M,x,y);\n\t\t\t\t if(M == 4) {\n\t\t\t\t \t float floatans = readdivision();\n\t\t\t\t \tk = divisionsol(floatans, x, y);\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t int userin = readResponse();\n\t\t\t k = isnanswercorrect(O , userin);\n\t\t\t }\n\t\t\t if(k == 1) {\n\t\t\t \t correctans++;\n\t\t\t }\n\t\t\t }\n\t\t\t int L = 0;\n\t\t\t L = displayCompletionMessage(correctans);\n\t\t\t if ( L == 1) {\n\t\t\t \tquiz();\n\t\t\t }\n\t\t\t else {\n\t\t\t \treturn;\n\t\t\t }\n\t\t\t \n\t\t\t\t}",
"public void submitQuiz(View view) {\n String userName = getUserName();\n double quizScore = gradeQuiz();\n String message = generateMessage(userName, quizScore);\n setResultsDisplay(quizScore);\n Toast.makeText(this, message, Toast.LENGTH_LONG).show();\n }",
"private void scoreDialog() {\n JPanel jp = new JPanel();\n \n Box verticalBox = Box.createVerticalBox();\n \n JLabel scoreTitle = new JLabel(\"<html><font size=13><center>Score: \" + challengeModel.getChallenge().getScore().getScorePoints() + \"</center></font></html>\");\n scoreTitle.setAlignmentX(CENTER_ALIGNMENT);\n verticalBox.add(scoreTitle);\n \n Box horizontalBox = Box.createHorizontalBox();\n String scoreResult = \"\" + challengeModel.getChallenge().getScore().getGold() + challengeModel.getChallenge().getScore().getSilver() + challengeModel.getChallenge().getScore().getBronze();\n switch(Integer.parseInt(scoreResult)) {\n case 111: // Gold, Silver, Bronze\n horizontalBox.add(new JLabel(Resources.getImageMedalGold()));\n case 11: // Silver, Bronze\n horizontalBox.add(new JLabel(Resources.getImageMedalSilver()));\n case 1: // Bronze\n horizontalBox.add(new JLabel(Resources.getImageMedalBronze()));\n break;\n default:\n break;\n }\n \n verticalBox.add(horizontalBox);\n \n jp.add(verticalBox);\n \n int value = JOptionPane.showOptionDialog(null, jp, \"Fim do desafio\", JOptionPane.NO_OPTION, JOptionPane.PLAIN_MESSAGE, null, new String[] {\"Novo Desafio\"}, 1);\n \n hideAnswerResult(false);\n \n if (value == 0)\n challengeModel.newGame();\n }",
"public void displayCorrectResponse(int x) {\n\t\t\t\t\tswitch (x) {\n\t\t case 1: System.out.println(\"Very Good!\");;\n\t\t break;\n\t\t case 2: System.out.println(\"Excellent!\");;\n\t\t break;\n\t\t case 3: System.out.println(\"Nice Work!\");;\n\t\t break;\n\t\t case 0: System.out.println(\"Keep up the good work!\");\n\t\t break;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t}",
"abstract String getScoreString();",
"public static void checkResult() {\n\t\tint sum = PlayerBean.PLAYERONE - PlayerBean.PLAYERTWO;\n\n\t\tif (sum == 1 || sum == -2) {\n\t\t\tScoreBean.addWin();\n\t\t\tresult = \"player one wins\";\n\t\t} else {\n\t\t\tScoreBean.addLoss();\n\t\t\tresult = \"player two wins\";\n\t\t}\n\t}",
"public static void main(String[] args) {\n\n\t\t\n\t\tint score = 0;\n\t\tscore = 20;\n\t\t\n\t\tif(score > 60) {\n\t\t\tSystem.out.println(\"합격입니다\");\n\t\t\tSystem.out.println(\"축하합니다\");\n\t\t}\n\t\tif (score ==60) {\n\t\t\tSystem.out.println(\"아슬아슬 하셨네요\");\n\t\t}\n\t\tif (score <60) {\n\t\t\tSystem.out.println(\"불합격입니다\");\n\t\t\t\n\t\t}\n\t}",
"public static void main(String[] args) {\nint score = 70;\r\n\t\tif(score > 60) \r\n\tSystem.out.println(\"합격입니다\");\r\n\t}",
"private void gameOverDialog() {\n Toast makeText;\n makeText = Toast.makeText(this.getContext(), getResources().getString(R.string.game_over), Toast.LENGTH_LONG);\n makeText.show();\n makeText = Toast.makeText(this.getContext(), getResources().getString(R.string.final_score) + score, Toast.LENGTH_LONG);\n makeText.show();\n }",
"private int computeScore() {\n int score = 0;\n for (int i = 0; i < MainActivity.DEFAULT_SIZE; i++) {\n TextView answerView = (TextView) findViewById(MainActivity.NAME_VIEWS[i]);\n String answer = answerView.getText().toString();\n String solution = getQuizCountries().get(i).getName();\n if (answer.equals(solution)) {\n score++;\n }\n }\n return score;\n }",
"private void setScoresText(Intent intent) {\n double gambleScore = intent.getDoubleExtra(IntentKeys.GAMBLE_SCORE_KEY, 3);\n TextView gambleText = findViewById(R.id.gamble_score);\n gambleText.setText(String.format(Locale.CANADA,\n \"Gamble score: %.3f\", gambleScore));\n\n int expGained = intent.getIntExtra(IntentKeys.EXP_GAINED_KEY, 0);\n TextView expText = findViewById(R.id.shop_exp_text);\n expText.setText(String.format(Locale.CANADA, \"Exp gained: %d\", expGained));\n\n int timeSpent = intent.getIntExtra(IntentKeys.TIME_SPENT_KEY, 0);\n TextView timeSpentText = findViewById(R.id.shop_time_spent_text);\n timeSpentText.setText(String.format(Locale.CANADA,\n \"Time Spent: %d seconds\", timeSpent));\n\n }",
"@Test\n public void allOnesExpected_20(){\n String input = \"11111111111111111111\";\n assertEquals(game.scoreOfGame(input),20);\n }",
"public void countScore(TechnicalTest technicalTest)\n {\n long maxScore=0;\n long score=0;\n\n String scoreEachAnswer = \"\";\n List<Problem> problems = technicalTest.getProblems();\n\n String applicantAnswer = technicalTest.getApplicantAnswer();\n\n List<String> answerList = helper.parseAnswer(applicantAnswer);\n\n for(int i=0; i<problems.size();i++){\n long tmpScore;\n maxScore = maxScore + problems.get(i).getMaxScore();\n if(problems.get(i) instanceof MultipleChoices){\n tmpScore = getScoreMultipleChoices((MultipleChoices) problems.get(i), answerList.get(i));\n score = score + tmpScore;\n if(i!=problems.size()-1)\n scoreEachAnswer = scoreEachAnswer + String.valueOf(tmpScore) + \"|\";\n else scoreEachAnswer = scoreEachAnswer + String.valueOf(tmpScore);\n }\n else if(problems.get(i) instanceof ProblemGenerator){\n tmpScore = getScoreMultipleChoices((MultipleChoices) problems.get(i), answerList.get(i));\n score = score + tmpScore;\n if(i!=problems.size()-1)\n scoreEachAnswer = scoreEachAnswer + String.valueOf(tmpScore) + \"|\";\n else scoreEachAnswer = scoreEachAnswer + String.valueOf(tmpScore);\n }\n else{\n tmpScore = getScoreEssay((Essay) problems.get(i), answerList.get(i));\n score = score + tmpScore;\n if(i!=problems.size()-1)\n scoreEachAnswer = scoreEachAnswer + String.valueOf(tmpScore) + \"|\";\n else scoreEachAnswer = scoreEachAnswer + String.valueOf(tmpScore);\n }\n\n }\n\n long persen = score*100/maxScore;\n\n technicalTest.setScore(persen);\n technicalTest.setScoreEachAnswer(scoreEachAnswer);\n\n technicalTestRepository.save(technicalTest);\n\n }",
"private void validateQuiz() {\n int score = 0;\n String answer1 = answerOne.getText().toString();\n int answer2 = answerTwo.getCheckedRadioButtonId();\n boolean answer3 = answerThreeOptionA.isChecked() && answerThreeOptionD.isChecked() && !answerThreeOptionB.isChecked() && !answerThreeOptionC.isChecked();\n String answer4 = answerFour.getText().toString();\n int answer5 = answerFive.getCheckedRadioButtonId();\n boolean answer6 = answerSixOptionA.isChecked() && answerSixOptionB.isChecked() && answerSixOptionD.isChecked() && !answerSixOptionC.isChecked();\n if (answer1.equalsIgnoreCase(getString(R.string.answerOne))) {\n score++;\n }\n if (answer2 == answerTwoOptionA.getId()) {\n score++;\n }\n if (answer3) {\n score++;\n }\n if (answer4.equalsIgnoreCase(getString(R.string.answerFour))) {\n score++;\n }\n if (answer5 == answerFiveOptionD.getId()) {\n score++;\n }\n if (answer6) {\n score++;\n }\n String result = getString(R.string.result, score, questionList.size());\n Toast.makeText(this, result, Toast.LENGTH_SHORT).show();\n }",
"public void checkAnswer(String a){\r\n if(a.equals(answer)) {\r\n displayAnswer();\r\n score++;\r\n }\r\n else{\r\n Toast.makeText(QuizActivity.this,\r\n \"Incorrect Choice\", Toast.LENGTH_SHORT).show();\r\n }\r\n\r\n }",
"public String getMessage(int chance){\n switch(chance){\n case 1: danger=5;\n pred = \"monkeys\";\n return \"A whole community of monkeys hide in the trees around you. They stare intently\";\n case 2: danger=5;\n pred = \"snakes\";\n return \"In the ground there are giant holes as if made by a large mammal. But no such animals live here \";\n case 3: danger=10;\n pred = \"tiger\";\n return \"A tiger is watching you. This is not the jungle book\";\n case 4: danger = 6;\n pred = \"evil rabbit\";\n return \"There are animal carcases everywhere. You are in someones lair\";\n default: return \"\";\n }\n}",
"@Override\r\n\tpublic String getResults(int[] scoreCounter)\r\n\t{\r\n\t\tint largest = scoreCounter[0], index = 0;\r\n\t\tString str;\r\n\t\tboolean equalChecker = true;\r\n\t\tint firstScore = scoreCounter[1];\r\n\r\n\t\t// checks whether all scores in the array are equal)\r\n\t\tfor (int y = 2; y <scoreCounter.length; y++)\r\n\t\t{\t\t\r\n\t\t\tif(scoreCounter[y] != firstScore)\r\n\t\t\t\tequalChecker = false;\r\n\t\t}\r\n\r\n\t\tif (equalChecker)\r\n\t\t str = \"Stalemate! All players are tied for points! Everyone loses.\";\r\n\t\telse\r\n\t\t{\r\n\t\t\tfor(int x = 1; x < scoreCounter.length; x++)\r\n\t\t\t{\r\n\t\t\t\tif (scoreCounter[x] > largest)\r\n\t\t\t\t{\t\r\n\t\t\t\t\tlargest = scoreCounter[x];\r\n\t\t\t\t\tindex = x;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tstr = \"Player \" + index + \" wins with \" + largest\r\n\t\t \t + \" correct guesses in a row! Congratulations!\";\r\n\t\t}\r\n\r\n\t\treturn str;\r\n\t\t\r\n\t}",
"public static void resultOfPlayAllCorrect() {\n\t\tString mark=\"null\";\n\t\ttry {\n\t\t\tmark=PlayTrivia.playAllRightAnswers();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t\tif(mark==\"Sucsses\") {\n\t\t\tSystem.out.println(\"Test end page has:\" + mark + \" Test pass\");\n\t\t}else{\n\t\t\tSystem.out.println(\"Test end page - failed\");\n\t\t}\n\t}",
"private void calculateScoreForEditTextAnswers(String questionOne, String questionFive , String questionNine) {\n // Get the real answer of questions 1, 5 and 9 stored in strings.xml\n String answer1 = getString(R.string.answer1);\n String answer5 = getString(R.string.answer5);\n String answer9 = getString(R.string.answer9);\n\n // if answer entered for question 1 is correct, update the value of score and add 3.\n\n if(questionOne.trim().equalsIgnoreCase(answer1)) {\n score +=5;\n }\n // if answer entered for question 5 is correct, update the value of score and add 3.\n if (questionFive.trim().equalsIgnoreCase(answer5)) {\n score += 5;\n }\n // if answer entered for question 9 is correct, update the value of score and add 3..\n if (questionNine.trim().equalsIgnoreCase(answer9)) {\n score += 5;\n }\n\n // calculate the total value of score\n }",
"public void testScoreboardCaseThree () throws Exception {\n \n // RunID TeamID Prob Time Result\n \n String [] runsData = {\n\n \"1,1,A,1,No\", // 20\n \"2,1,A,3,Yes\", // 3 (first Yes counts only Min.Pts)\n \"3,1,A,5,No\", // 20\n \"4,1,A,7,Yes\", // 20 (all runs count!)\n \"5,1,A,9,No\", // 20\n\n \"6,1,B,11,No\", // zero (not solved)\n \"7,1,B,13,No\", // zero (not solved)\n\n \"8,2,A,30,Yes\", // 30\n\n \"9,2,B,35,No\", // zero -- not solved\n \"10,2,B,40,No\", // zero -- not solved\n \"11,2,B,45,No\", // zero -- not solved\n \"12,2,B,50,No\", // zero -- not solved\n \"13,2,B,55,No\", // zero -- not solved\n };\n \n // Rank TeamId Solved Penalty\n \n String [] rankData = {\n \"1,team1,1,23\",\n \"2,team2,1,30\"\n };\n \n // TODO when SA supports count all runs, replace rankData\n \n /**\n * Case 3 tests when all runs are counted, the current SA\n * does not support this scoring method. The commented\n * rankData is the proper results\n */\n \n// String [] rankData = {\n// \"1,team2,1,30\"\n// \"2,team1,1,83\",\n// };\n \n scoreboardTest (2, runsData, rankData);\n }",
"private void newHighScoreAlert() {\n\t\tAlert alert = new Alert(AlertType.INFORMATION);\n\t\t\n\t\talert.setTitle(\"New High Score!\");\n \talert.setHeaderText(\"You Got A New High Score!\\nYour High Score: \" + level.animal.getPoints());\n \talert.setContentText(\"Enter Your Name With Alphabet Or Digit Keys.\\nPress 'Enter' To Confirm Your Name Afterwards.\");\n \talert.show();\n\t}",
"@Test\r\n\tpublic final void testGetScore() {\r\n\t\tassertTrue(gameStatistics.getScore() == 18000);\r\n\t\tassertTrue(gameStatisticsLoss.getScore() == 9100);\r\n\t}",
"int getWrongAnswers();",
"public void setTestScore(int testNumber, int score) {\n\t if(testNumber == 1)\n\t\t test1 = score;\n\t else if(testNumber == 2)\n\t\t test2 = score;\n\t else\n\t\t test3 = score;\n }",
"private void endGame(){\n AlertDialog.Builder builder= new AlertDialog.Builder(this);\n String howGoodItWent;\n int howManyQuestions = questions.size();\n //with the percentage calculations, the app is able to display a different finishing message based on the percentage of the allquestions/correct answers\n float percentage = 0;\n //test if there are any questions. this will prevent dividing with 0\n if (howManyQuestions != 0){\n percentage = (100*score)/howManyQuestions;\n }\n //different title message on 0 correct answers, between 1-50, and 51-100\n if (score == 0) {\n howGoodItWent = \"Well, you tried\";\n } else if (percentage > 0 && percentage <= 50) {\n howGoodItWent = \"Thanks for participating\" ;\n }else if (percentage > 50 && percentage <= 99) {\n howGoodItWent = \"Congratulations\";\n }else if (percentage ==100) {\n howGoodItWent = \"Perfect Score!\";\n }else{\n howGoodItWent = \"Error\";\n }\n\n builder.setTitle(howGoodItWent);//displaying the message set earlier based on score\n final EditText input = new EditText(this);\n builder.setView(input);\n builder.setMessage(\"You scored \" + score + \" point(s) this round.\\nPlease enter your name:\");\n builder.setCancelable(false); //if this is not set, the user may click outside the alert, cancelling it. no cheating this way\n builder.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n playerName = input.getText().toString();\n //remove empty spaces\n playerName = playerName.trim();\n if (playerName.length() == 0){ //when the player doesn't enter anything for name, he will be called anonymous\n playerName = \"Anonymous\";\n }\n HighScoreObject highScore = new HighScoreObject(playerName, score, new Date().getTime());\n //get user prefs\n List<HighScoreObject> highScores = Paper.book().read(\"high scores\", new ArrayList<HighScoreObject>());\n\n //add item\n highScores.add(highScore);\n\n //save into paper\n Paper.book().write(\"high scores\", highScores);\n\n //return to the intro screen\n finish();\n }\n })\n .create();\n builder.show();\n }",
"private void checkAnswer() {\n this.convertAnswerString();\n\n StringBuilder answer = new StringBuilder(currentAnswer);\n\n if (answer.toString().equals(selectedWord)) {\n gameOver = true;\n Toast toast = Toast.makeText(getApplicationContext(), \"You Win!!!\", Toast.LENGTH_LONG);\n toast.show();\n }\n\n if (currentAnswer.length() == this.selectedLength && !gameOver) {\n Toast toast = Toast.makeText(getApplicationContext(), \"Sorry! Wrong Answer!\", Toast.LENGTH_LONG);\n toast.show();\n }\n }",
"private void showFinalScore() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(\"Time's up! Your final score is: \" + score + \"\\nHigh score: \" + highScore);\n builder.setOnDismissListener(unused -> finish());\n AlertDialog dialog = builder.create();\n dialog.show();\n }",
"void updateScore () {\n scoreOutput.setText(Integer.toString(score));\n }",
"String userInput(String question);",
"public static int welcomeUser(){\n \n int answer;\n JOptionPane.showMessageDialog(null, \"Welcome to Rock, Paper, Scissors, Lizard, Spock!\");\n JOptionPane.showMessageDialog(null, \"In this twist of the popular Rock, Paper, Scissors game a\"+\n \"\\nlizard and Captain Spock join in the epic battle of decision making.\");\n JOptionPane.showMessageDialog(null, \"The rules are as follows: \\nRock beats Scissors. \\nScissors beats Paper.\"+\n \"\\nPaper beats Rock. \\nLizard poisons Spock. \\nSpock vaporizes Rock. \"+\n \"\\nScissors decapitates Lizard. \\nLizard eats Paper. \\nRock smashes Lizard\"+\n \"\\nSpock smashes Scissors.\\nPaper disproves Spock.\");\n JOptionPane.showMessageDialog(null, \"Enter a R for rock,\"+\"\\nEnter a P for paper,\"+ \n \"\\nEnter an S for scissors\"+ \"\\nEnter an L for Lizard,\"+\n \"\\nEnter an X for Capt. Spock.\");\n \n answer = JOptionPane.showConfirmDialog(null,\"\\n Would you like to play now?\", null, JOptionPane.YES_NO_OPTION);\n return answer;\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 void actionPerformed(ActionEvent e) {\n\t\tString word = textField.getText();\r\n\r\n\t\ttry{\r\n\t\t\t//If user pressed speak button, the word\r\n\t\t\t//is spoken by festival.\r\n\t\t\tJButton button = (JButton) e.getSource(); \r\n\t\t\tif (button.equals(btnListenAgain)){ \r\n\r\n\t\t\t\tfestival(_testList.get(_testNo-1).toString(), btnListenAgain);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t//If user is correct\r\n\t\t\tif(_testList.get(_testNo-1).toString().equalsIgnoreCase(word)){\r\n\t\t\t\t//Showing and telling correct message\r\n\t\t\t\tSound sound = new Sound(\"cheering.wav\"); //plays a cheering sound\r\n\t\t\t\tsound.play();\r\n\t\t\t\t\r\n\t\t\t\t_testList.get(_testNo -1).increaseCorrect();\r\n\t\t\t\t//update accuracy and streak\r\n\t\t\t\t_attempts++;\r\n\t\t\t\t_testNo++;\r\n\t\t\t\t_correct++;\r\n\r\n\t\t\t\t_streak++;\r\n\t\t\t\t//get 50 coins if streak > 5, 20 coins if streak > 2\r\n\t\t\t\tif (_streak >5) {\r\n\t\t\t\t\t_coins+=50;\r\n\t\t\t\t\t_hiddenCoins+=50;\r\n\t\t\t\t\tlblStreak.setText(\"+50\");\r\n\t\t\t\t\tlblCorrect.setText(\"<html>Correct! Very Nice.</html>\");\r\n\t\t\t\t} else if (_streak > 2) {\r\n\t\t\t\t\t_coins+=20;\r\n\t\t\t\t\t_hiddenCoins+=20;\r\n\t\t\t\t\tlblStreak.setText(\"+20\");\r\n\t\t\t\t\tlblCorrect.setText(\"<html>Correct! Well Done! Keep Going.</html>\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\t_coins+=10;\r\n\t\t\t\t\t_hiddenCoins+=10;\r\n\t\t\t\t\tlblStreak.setText(\"+10\");\r\n\t\t\t\t\tlblCorrect.setText(\"<html>Correct! <br>Awesome, you're on a roll!</html>\");\r\n\r\n\t\t\t\t}\r\n\t\t\t\tblink(); //flash 'Streak' label text\r\n\t\t\t\tupdateCoins();\r\n\t\t\t\tlblCoin.setText(\"Coins: \"+ _coins);\r\n\t\t\t\t_correctness = \"Correct!!\";\r\n\r\n\t\t\t\t//Setting the new label\r\n\t\t\t\tlblPleaseSpellWord.setText(\"Spell word \"+(_testNo)+\" of \"+_maxNum+\": \");\r\n\t\t\t\tif(_wc<_maxNum)\r\n\t\t\t\t\tlblPleaseSpellWord.setText(\"Spell word \"+(_testNo)+\" of \"+ _wc+\": \");\r\n\r\n\r\n\t\t\t\tincorrect =0;\r\n\t\t\t\t//If user gets incorrect\r\n\t\t\t}else{\r\n\t\t\t\tlblStreak.setText(\"\");\r\n\t\t\t\t//If second time failing\r\n\t\t\t\tif(incorrect<1){\r\n\t\t\t\t\t//Setting message to the user about the fault\r\n\t\t\t\t\tlblCorrect.setText(\"Incorrect. Try again\");\r\n\t\t\t\t\tfestival(\"Incorrect!! Spell\"+_testList.get(_testNo-1).toString()+\".\", btnSubmit);\r\n\t\t\t\t\t//Word is spoken again.\r\n\t\t\t\t\tincorrect++;\r\n\t\t\t\t\ttextField.setText(\"\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t\t//First time failing\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//Result message to user\r\n\t\t\t\t\tlblCorrect.setText(\"Incorrect\");\r\n\r\n\t\t\t\t\t//increase test number and fail value\r\n\t\t\t\t\t_attempts++;\r\n\t\t\t\t\t_fails++;\r\n\t\t\t\t\t_testList.get(_testNo -1).increaseFails();\r\n\r\n\t\t\t\t\t_streak = 0; // streak resets\r\n\t\t\t\t\t//Changing field as needed\r\n\r\n\t\t\t\t\t_testNo++;\r\n\t\t\t\t\tincorrect =0;\r\n\t\t\t\t\t_correctness = \"Incorrect\";\r\n\r\n\r\n\t\t\t\t\t//Setting new label for new quiz\r\n\t\t\t\t\tlblPleaseSpellWord.setText(\"Spell word \"+(_testNo)+\" of \"+_maxNum+\": \");\r\n\t\t\t\t\tif(_wc<_maxNum)\r\n\t\t\t\t\t\tlblPleaseSpellWord.setText(\"Spell word \"+(_testNo)+\" of \"+ _wc+\": \");\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//updating the values.\r\n\t\t\tlblAcc.setText(\"Accuracy:\" + _correct+\"/\"+_testNum);\r\n\t\t\tupdateAccuracy();\r\n\t\t\t//Clearing the Jtext field\r\n\t\t\ttextField.setText(\"\");\r\n\t\t\t//If test is finished\r\n\t\t\tif((_testNo==_maxNum+1)||(_wc<_testNo)){\r\n\t\t\t\t//Telling the user the teset is finished\r\n\t\t\t\tlblCorrect.setText(_correctness+\" Quiz Finished!!\");\r\n\t\t\t\tfestival(lblCorrect.getText(), null);\r\n\t\t\t\t//Update high score\r\n\t\t\t\tif (_correct > _highScore) {\r\n\t\t\t\t\t_highScore = _correct;\r\n\t\t\t\t\tupdateAccuracy();\r\n\t\t\t\t}\r\n\t\t\t\t//opens options menu where user can choose their next action.\r\n\t\t\t\tSubMenu sub = new SubMenu(_wordlist,_level,_correct,_testNo-1, _frame , _maxNum, _file, _sound);\r\n\t\t\t\t_frame.getContentPane().add(sub);\r\n\t\t\t\tthis.setVisible(false);\r\n\t\t\t\tsub.setVisible(true);\r\n\r\n\t\t\t}else{\r\n\t\t\t\t//Continue the quiz\r\n\t\t\t\tfestival(_correctness+\" Spell \"+_testList.get(_testNo-1).toString()+\".\", btnSubmit);\r\n\t\t\t}\r\n\t\t}catch(Exception excep){\r\n\t\t\texcep.printStackTrace();\r\n\t\t}\r\n\t}",
"public void testScoreboardCaseOneA() throws Exception{\n \n String [] runsData = {\n \"2,8,C,1,No\",\n \"15,8,D,1,Yes\",\n \"23,8,D,1,No\",\n \"29,8,D,1,No\",\n \"43,8,C,1,No\",\n \"44,8,A,1,Yes\",\n \"52,8,C,1,Yes\",\n \"65,8,B,2,Yes\",\n };\n \n // Rank TeamId Solved Penalty\n \n String [] rankData = {\n \"1,team8,4,45\",\n \"2,team1,0,0\",\n \"2,team2,0,0\",\n \"2,team3,0,0\",\n \"2,team4,0,0\",\n \"2,team5,0,0\",\n \"2,team6,0,0\",\n \"2,team7,0,0\",\n };\n \n scoreboardTest (8, runsData, rankData);\n }",
"@Override\n\tpublic void checkScore() {\n\t\t\n\t}",
"public void addTestScore(int score){\n test_score.add(test_count,score);\n test_count++;\n }",
"public void testScoreboardCaseTwo () throws Exception{\n \n // RunID TeamID Prob Time Result\n \n String [] runsData = {\n \"1,1,A,1,No\", // 20\n \"2,1,A,3,Yes\", // 3 (Minute points for 1st Yes count)\n \"3,1,A,5,No\", // 20 (a No on a solved problem)\n \"4,1,A,7,Yes\", // zero (only \"No's\" count)\n \"5,1,A,9,No\", // 20 (another No on the solved problem)\n \n \"6,1,B,11,No\", // zero (problem has not been solved)\n \"7,1,B,13,No\", // zero (problem has not been solved)\n \n \"8,2,A,30,Yes\", // 30 (Minute points for 1st Yes)\n \n \"9,2,B,35,No\", // zero -- not solved\n \"10,2,B,40,No\", // zero -- not solved\n \"11,2,B,45,No\", // zero -- not solved\n \"12,2,B,50,No\", // zero -- not solved\n \"13,2,B,55,No\", // zero -- not solved\n };\n \n\n // Rank TeamId Solved Penalty\n \n String [] rankData = {\n \"1,team1,1,23\",\n \"2,team2,1,30\",\n };\n \n // TODO when SA supports count all runs, replace rankData\n \n /**\n * Case 2 tests when all no runs are counted, the current SA\n * does not support this scoring method. The commented\n * rankData is the proper results\n */\n\n// Team 2 -- 30 <-- Team 2 is now winning with a lower score \n// Team 1 -- 63 (same database; different scoring method)\n \n// String [] rankData = {\n// \"1,team2,1,30\",\n// \"2,team1,1,63\",\n// };\n \n \n scoreboardTest (2, runsData, rankData);\n \n }",
"public static char typeScore() \n {\n\n System.out.println(\"\\t Do you have (S)AT scores or (A)CT scores?\");\n String response = console.next();\n \n if(response.equalsIgnoreCase(\"S\"))\n {\n return Character.toUpperCase(response.charAt(0)); \n }\n else if(response.equalsIgnoreCase(\"A\"))\n {\n return Character.toUpperCase(response.charAt(0));\n }\n else\n {\n throw new IllegalArgumentException(\"Invalid score type. Must be S, s, A, or a.\");\n }\n }",
"private void displayTeamA_score(int score) {\n TextView teamA_scoreView = findViewById(R.id.teamA_score_textView);\n teamA_scoreView.setText(String.valueOf(score));\n }"
] | [
"0.71786153",
"0.71324325",
"0.69812363",
"0.6863354",
"0.685939",
"0.68000305",
"0.6698998",
"0.66331816",
"0.6568909",
"0.6543461",
"0.6539703",
"0.65330875",
"0.653078",
"0.64552987",
"0.6424524",
"0.642132",
"0.64019555",
"0.6369125",
"0.63471323",
"0.6341026",
"0.6331589",
"0.63289034",
"0.6312537",
"0.62754667",
"0.6234123",
"0.62311685",
"0.6229224",
"0.6227803",
"0.6219626",
"0.61826825",
"0.61770403",
"0.6160875",
"0.61608267",
"0.61530113",
"0.61452615",
"0.6134923",
"0.612142",
"0.61068887",
"0.6081116",
"0.6066662",
"0.6066299",
"0.60495186",
"0.6048481",
"0.6047181",
"0.6041572",
"0.6030945",
"0.6013176",
"0.59974444",
"0.59950453",
"0.59896696",
"0.59858674",
"0.5983156",
"0.5977311",
"0.597058",
"0.596731",
"0.5966232",
"0.59583294",
"0.59578013",
"0.5956159",
"0.59520733",
"0.59439886",
"0.5942532",
"0.59370476",
"0.59302396",
"0.5920377",
"0.5919243",
"0.59164965",
"0.59101343",
"0.5909473",
"0.5894488",
"0.58902353",
"0.5888661",
"0.58791405",
"0.586389",
"0.58604634",
"0.5852974",
"0.58502954",
"0.58416456",
"0.58412635",
"0.5833295",
"0.5826925",
"0.58237094",
"0.58211833",
"0.58144957",
"0.5808642",
"0.5802797",
"0.58014137",
"0.5797539",
"0.579525",
"0.5793759",
"0.5793613",
"0.57911503",
"0.57898045",
"0.5784094",
"0.57817936",
"0.5773646",
"0.5760062",
"0.5755107",
"0.57543546",
"0.5751439"
] | 0.7199772 | 0 |
Nos dice si el nodo tiene un padre. | public boolean hayPadre() {
return this.padre != null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void testPadre(int n) {\n\t\t\r\n\t\tSystem.out.println(\"-----------------------------------------------------\");\r\n\t\tSystem.out.println(\"Test padre\");\r\n\t\t\r\n\t\tSystem.out.println(\"Crear un arbol binario completo...\");\r\n\t\tArbolBin arbol = new ArbolBin();\r\n\t\ttestCargarArbolBinarioCompleto(arbol, n, false);\r\n\t\tSystem.out.println(arbol.toString());\r\n\t\t\r\n\t\tSystem.out.println(\"Encontrar el padre de cada elemento en el arbol\");\r\n\t\tint cantidadElementos = (int) Math.pow(2, n + 1) - 1;\r\n\t\t\r\n\t\tfor(int i = 1; i <= cantidadElementos; i++) {\r\n\t\t\tObject padre = arbol.padre(i);\r\n\t\t\tSystem.out.println(String.format(\r\n\t\t\t\"padre de %d: %s\", i, padre != null ? padre.toString(): \"null\"));\r\n\t\t}\r\n\t}",
"public boolean isPad() {\n return pad;\n }",
"int getAutoSkipPadding();",
"public Nodo_m_ario getPadre() {\n\t\treturn padre;\n\t}",
"private static boolean nivelPasado() {\r\n\t\tint[] contPelotas = new int[ COLORES_POSIBLES.length ]; // Contadores por color\r\n\t\tfor (int i=0; i<tablero.size(); i++) {\r\n\t\t\tPelota pelota = tablero.getPelota(i);\r\n\t\t\tint contColor = Arrays.asList(COLORES_POSIBLES).indexOf( pelota.getColor() ); // Posición del color de la pelota en el array de contadores\r\n\t\t\tcontPelotas[contColor]++;\r\n\t\t}\r\n\t\tfor (int contador : contPelotas) if (contador>=tamanyoTablero-2) return false;\r\n\t\treturn true;\r\n\t}",
"public boolean asignarPaternidad(String Padre,String Hijo){\r\n return grafo2.nuevaPokeArista(\"\", Padre, Hijo, 0);\r\n }",
"public void setPadre(Nodo_m_ario padre) {\n\t\tthis.padre = padre;\n\t}",
"public boolean isPadre(T padre, T hijo) {\n return isPadreR(raiz, padre, hijo);\n }",
"public void ispisiSveNapomene() {\r\n\t\tint i = 0;// redni broj napomene\r\n\t\tint brojac = 0;\r\n\t\tfor (Podsjetnik podsjetnik : lista) {\r\n\r\n\t\t\ti++;\r\n\t\t\tSystem.out.println(i + \")\" + podsjetnik);\r\n\t\t\tbrojac = i;\r\n\t\t}\r\n\t\tif (brojac == 0) {\r\n\t\t\tSystem.out.println(\"Nema unesenih napomena!!\");\r\n\t\t}\r\n\r\n\t}",
"public Nodo getPadre() {\n return this.padre;\n }",
"private int padWithEmptyCells(Composite parent, int col) {\n for (; col < NUM_COL; ++col) {\n emptyCell(parent);\n }\n col = 0;\n return col;\n }",
"int getPadding();",
"public static int cantNodosHojas(Nodo raiz)\r\n {\r\n if(raiz == null)\r\n {\r\n return 0;\r\n }\r\n else if(raiz.ramaDerecha == null && raiz.ramaIzquierda == null)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return (cantNodosHojas(raiz.subArbolIzquierdo())) + (cantNodosHojas(raiz.subArbolDerecho()));\r\n }\r\n }",
"private void montarLabelNumeros() {\n\r\n\t\tlblNumeros = new JLabel[this.dificuldade.getValor()][this.dificuldade.getValor()];\r\n\r\n\t\tBorder borda = BorderFactory.createLineBorder(Color.BLACK, 2);\r\n\r\n\t\tfor (int i = 0; i < lblNumeros.length; i++) {\r\n\t\t\tfor (int j = 0; j < lblNumeros.length; j++) {\r\n\t\t\t\tlblNumeros[i][j] = new JLabel(\"\", SwingConstants.CENTER);\r\n\t\t\t\tlblNumeros[i][j].setVisible(true);\r\n\r\n\t\t\t\tconfiguraFonteNumeros(lblNumeros[i][j]);//CHAMA PRA CONFIGURAR A FONTE BASEADO NA DIFICULDADE\r\n\r\n\t\t\t\tthis.painelJogo2.add(lblNumeros[i][j]);//ADICIONA NO PAINEL\r\n\t\t\t\tif (this.mapa.getCelula(i, j).isBomba() == false) {//\r\n\t\t\t\t\tif (this.mapa.getCelula(i, j).isEmBranco() == false) {//SE NAO FOR BOMBA NEM EM BRANCO CONFIGURA OS NUMEROS DAQUELE LABEL\r\n\t\t\t\t\t\tconfigurarNumeros(i, j);\r\n\t\t\t\t\t} \r\n\t\t\t\t} else {//SE FOR BOMBA, DEIXA OPACO, DEIXA O BACKGROUND VERMELHO E COLOCA O ICONE\r\n\t\t\t\t\tlblNumeros[i][j].setOpaque(true);\r\n\t\t\t\t\tlblNumeros[i][j].setBackground(Color.RED);\r\n\t\t\t\t\tlblNumeros[i][j].setIcon(iconBomba);\r\n\t\t\t\t}\r\n\t\t\t\tlblNumeros[i][j].setBorder(borda);//COLOCA UMA BORDA NO LABEL\r\n\t\t\t\tlblNumeros[i][j].setVisible(false);//DEIXA INVISIVEL, SO FICA VISIVEL QND O BOTAO DA MESMA POSICAO EH ABERTO\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private boolean diaHabilDomingoPlacaA(int diaActual){\n\t\treturn diaActual == DOMINGO;\n\t}",
"public Nodo_m_ario(Nodo_m_ario padre, int val, int m) {\n\t\tchiave = val;\n\t\tgrado = m;\n\t\tthis.padre = padre;\n\t\tfigli = new Nodo_m_ario[grado];\n\t\tradice = false;\n\t}",
"private boolean completouVolta(int jogador, int valorDados) {\n\n if ((this.posicoes[jogador] + valorDados) >= 40 && this.posicoes[jogador] != 40) {\n this.listaJogadores.get(jogador).addDinheiro(200);\n this.print(\"\\tGanha $200 por passar pela casa 40.\");\n return true;\n }\n return false;\n\n }",
"public boolean potezDesno() {\n\t\t//koordinate glave\n\t\tint i = this.zmija.get(0).i;\n\t\tint j = this.zmija.get(0).j;\n\t\t\n\t\tthis.smjer ='d';\n\t\t\n\t\tif (j+1 < this.sirinaTable) {\n\t\t\tif ((this.tabla[i][j+1] == '#')||(this.tabla[i][j+1] == 'o')) \n\t\t\t\treturn false;\n\t\t\telse if (this.tabla[i][j+1] == '*') \n\t\t\t\tthis.pojedi(i, j+1);\n\t\t\telse \n\t\t\t\tthis.pomjeri(i, j+1);\n\t\n\t\t}\n\t\telse if (j+1 == this.sirinaTable) {\n\t\t\tif ((this.tabla[i][0] == '#')||(this.tabla[i][0] == 'o')) \n\t\t\t\treturn false;\n\t\t\telse if (this.tabla[i][0] == '*') \n\t\t\t\tthis.pojedi(i, 0);\n\t\t\telse \n\t\t\t\tthis.pomjeri(i, 0);\n\t\t}\n\t\treturn true;\n\t\t\t\n\t}",
"public int addPadding() {\n\t\tCodeItem codeItem = getCodeItem();\n\t\tint padding = codeItem.getSize() % 4;\n\t\tif (padding != 0) {\n\t\t\tif (padding == 2) {\n\t\t\t\tcodeItem.addInstruction(new InstructionFormat10X(0));\n\t\t\t} else {\n\t\t\t\tthrow new RuntimeException(\"Padding can only be 0 or 2 ! (\" + method.getMethodName() + \" \" + method.getClassName() + \" \" + codeItem.getSize() + \" \" + padding + \")\");\n\t\t\t}\n\t\t}\n\t\treturn padding;\n\t}",
"public int EliminarNodo() {\r\n int auxiliar = UltimoValorIngresado.informacion;\r\n UltimoValorIngresado = UltimoValorIngresado.siguiente;\r\n tamaño--;\r\n return auxiliar;\r\n }",
"private int getPadding() {\r\n\t\tint lengthNotBricks = getWidth() - (BRICKS_IN_BASE * BRICK_WIDTH);\r\n\t\treturn (lengthNotBricks / 2);\r\n\t}",
"private int Dataposi(String cadena,int posicion){\r\n\t\tif(cadena.length() > posicion && posicion >= 0)\r\n\t\t\treturn cadena.charAt(cadena.length()-posicion-1)-48;\r\n\t\treturn 0;\r\n\t}",
"public boolean restarUno(){\n\t\tif (numero>0){\n\t\t\tnumero--;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean ocupadoDcha(Pieza [] pieza) {\n boolean comprobar = false;\r\n for (int i = 0; i < 4; i++) { //borra la pieza para que al comprobar no se encuentre con una celda de la propia pieza\r\n tablero.setTipoPieza(pieza[i].x, pieza[i].y, 0);\r\n }\r\n for (int i = 0; i < 4; i++) {\r\n if (tablero.getTipoPieza()[pieza[i].x][(pieza[i].y) + 1] == 0 && !(pieza[i].y == 9)) { //comprueba si la celda de la derecha está ocupada o es la última\r\n comprobar = false;\r\n } else {\r\n comprobar = true;\r\n dibujarPieza(canvas, pieza); //si está ocupado vuelve a pintar la pieza y devuelve true\r\n return comprobar;\r\n }\r\n }\r\n dibujarPieza(canvas, pieza);//si no está ocupado también vuelve a pintar la pieza\r\n return comprobar;\r\n }",
"@Override\n public boolean getPadding(Rect padding) {\n return patternDrawable.getPadding(padding);\n }",
"Padding createPadding();",
"public int puntoUno() {\n int contador = 0;\n for (int i = 0; i < jugadores.length; i++) {\n if (jugadores[i] != null && jugadores[i].getCantPartidosJugados() > 10) {\n contador++;\n }\n }\n return contador;\n }",
"public void hallarPerimetroIsosceles() {\r\n this.perimetro = 2*(this.ladoA+this.ladoB);\r\n }",
"@Override\r\n\tpublic int contarPasajeros() {\n\t\treturn 0;\r\n\t}",
"@Test\n public void countNbrOfBoxAligneByAtBeginning(){\n int res = alignment.countNbrOfBoxAligneBy(player,2);\n assertEquals(\"EXpected 1 alignmenet\", 1, res);\n }",
"public boolean eNera(int riga, int colonna)\n { return ( (riga % 2) == (colonna % 2) ); }",
"public boolean potezDole() {\n\t\t//koordinate glave\n\t\tint i = this.zmija.get(0).i;\n\t\tint j = this.zmija.get(0).j;\n\t\t\n\t\tthis.smjer ='s';\n\t\t\n\t\tif (i+1 < this.visinaTable) {\n\t\t\tif ((this.tabla[i+1][j] == '#')||(this.tabla[i+1][j] == 'o')) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse if (this.tabla[i+1][j] == '*') {\n\t\t\t\t\n\t\t\t\tthis.pojedi(i+1, j);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\n\t\t\t\tthis.pomjeri(i+1, j);\n\n\t\t\t}\n\t\t}\n\t\telse if (i+1 == this.visinaTable) {\n\t\t\tif ((this.tabla[0][j] == '#')||(this.tabla[0][j] == 'o'))\n\t\t\t\treturn false;\n\t\t\telse if (this.tabla[0][j] == '*')\n\t\t\t\tthis.pojedi(0, j);\n\t\t\telse\n\t\t\t\tthis.pomjeri(0, j);\n\t\t}\t\n\t\treturn true;\n\t}",
"private boolean comparacionOblicuaID(String[] dna) {\n boolean repetir;\n int aux = 0;\n final int CASO = 3;\n int largo = dna.length - CASO - 1;\n int repaso = 1, fila,columna;\n do {\n do {\n repetir = true;\n if (repaso == 1) {\n fila = 0;\n columna = largo - aux;\n } else {\n fila = largo - aux;\n columna = 0;\n }\n for (int i = 0; i <= (CASO + aux); i += 2) {\n int colum = columna + i;\n int fil = fila + i;\n if ((colum) == (fil) && repaso == 1) {\n repetir = false; break;\n }\n if (((dna.length-CASO)>=colum && repaso==1) || ((dna.length-CASO)>=fil && repaso==0)) {\n if (dna[fil].charAt(colum) == dna[fil + 2].charAt(colum + 2)) {\n if (dna[fil].charAt(colum) == dna[fil + 1].charAt(colum + 1)) {\n if (((fil - 1) >= 0 && (colum - 1) >= 0) && (dna[fil].charAt(colum) == dna[fil - 1].charAt(colum - 1))) {\n cantidadSec++;\n if(cantidadSec>1)return true;\n if (colum == fil) repetir = false;\n break;\n } else {\n if (((dna.length - CASO+1) >= (colum + 3) && repaso == 1) || ((dna.length-1) >= (fil + 3) && repaso == 0)) {\n if ((dna[fil].charAt(colum) == dna[fil + 3].charAt(colum + 3))) {\n cantidadSec++;\n if(cantidadSec>1)return true;\n if (colum == fil) repetir = false;\n break;\n }\n }\n }\n }\n }\n } else {\n if (colum == fil) repetir = false;\n }\n }\n aux++;\n } while (repetir);\n repaso--;\n aux = 0;\n } while (repaso >= 0);\n return false;\n }",
"private boolean camposNumCorrectos() {\n\t\t return Utilidades.isPositiveNumber(anioText.getText().trim());\n\t}",
"public boolean repetido(int el){\n boolean repe = false;\n NodoDoble current = inicio;\n while(current != null){\n if(current.dato==el){\n repe = true;\n break; \n }else{\n repe = false;\n } \n current = current.siguiente;\n }\n return repe;\n }",
"private static boolean juegoAcabado() {\r\n\t\tint[] contPelotas = new int[ COLORES_POSIBLES.length ]; // Contadores por color\r\n\t\tfor (int i=0; i<tablero.size(); i++) {\r\n\t\t\tPelota pelota = tablero.getPelota(i);\r\n\t\t\tint contColor = Arrays.asList(COLORES_POSIBLES).indexOf( pelota.getColor() ); // Posición del color de la pelota en el array de contadores\r\n\t\t\tif (contColor==-1) System.out.println( pelota.getColor() );\r\n\t\t\tcontPelotas[contColor]++;\r\n\t\t}\r\n\t\tfor (int contador : contPelotas) if (contador>=tamanyoTablero-1) return false;\r\n\t\treturn true;\r\n\t}",
"private boolean comparacionOblicuaDI (String [] dna){\n int largo=3, repaso=1, aux=0, contador=0, fila, columna;\n boolean repetir;\n char caracter;\n do {\n do {\n repetir=true;\n if(repaso==1){\n fila=0;\n columna=largo + aux;\n }else{\n fila=dna.length-1-largo-aux;\n columna=dna.length-1;\n }\n\n caracter = dna[fila].charAt(columna);\n\n for (int i = 1; i <= (largo+aux); i++) {\n int colum=columna-i;\n int fil=fila+i;\n if((colum==dna.length-2 && fil==1) && repaso==1){\n repetir=false;\n break;\n }\n if (caracter != dna[fil].charAt(colum)) {\n contador = 0;\n\n if(((dna.length-largo)>(colum) && repaso==1) || ((dna.length-largo)<=(fil) && repaso!=1)){\n if((fil+colum)==dna.length-1){\n repetir=false;\n }\n break;\n }\n caracter = dna[fil].charAt(colum);\n\n } else {\n contador++;\n }\n if (contador == largo) {\n cantidadSec++;\n if(cantidadSec>1){\n return true;\n }\n if((fil+colum)==dna.length-1){\n repetir=false;\n }\n break;\n }\n }\n aux++;\n } while (repetir);\n repaso--;\n aux=0;\n\n }while(repaso>=0);\n return false;\n }",
"public void subirNivelAtaque(){\n\tif(contadorNivel==5){\n\t nivelAtaque++;\n\t System.out.println(\"El ataque \"+obtenerNombreAtaque()+\" ha subido de nivel\");\n\t contadorNivel=0;\n\t dano+=5;\n\t} else {\n\t nivelAtaque=nivelAtaque;\n\t}\n }",
"private boolean isPosicaoFerrovia(int posicao) {\n return (posicao == 5 || posicao == 15 || posicao == 25 || posicao == 35);\n }",
"public boolean tieneDinero(int precioEntrada){\r\n return this.dinero >= precioEntrada;\r\n }",
"public void loopPad(Pad pad){\r\n // Laat klant een pad lopen\r\n System.out.println(\"Standaard Klant loopt nu pad:\" + pad.getPadNaam() );\r\n }",
"public boolean sinGanador(int c[]){\n int cont,i;\n cont =0;\n for(i=0;i<=8;i++){\n if (c[i]!= 0){\n cont= cont+1;\n }\n }\n if(cont==9) {\n return true;\n }\n return false;\n\n }",
"public int darCantidadHijos( )\r\n {\r\n return hijos != null ? hijos.darLongitud( ) : 0;\r\n }",
"public boolean verificaNumero() {\n if (contemSomenteNumeros(jTextFieldDeposita.getText()) || contemSomenteNumeros(jTextFieldSaca.getText())\n || contemSomenteNumeros(jTextFieldTransfere.getText())) {\n return true;\n } else {\n JOptionPane.showMessageDialog(this, \"Digite somente números, por favor. \", \"Atenção !!\", JOptionPane.ERROR_MESSAGE);\n return false;\n }\n }",
"public static int[] obtenerpadre(ArrayList<int[]> poblacion, int ttablero, int padre1) {\n int[] padre = new int[ttablero];\n for(int i=0;i<poblacion.size();i++){ //total de fitnes\n // System.out.println(\"sapos qls\"+poblacion.get(i));\n if (i==padre1) {\n //System.out.println(\"padre \"+Arrays.toString(poblacion.get(i)));\n padre=poblacion.get(i);\n } \n //for (int j = 0; j<=ttablero ; j++) {\n // System.out.print(\"padre em vec\"+padre[j]);\n //}\n }\n return padre;\n }",
"public void setPadding( Integer p ){\r\n\t\tpadding = p;\r\n\t}",
"public boolean estaLlena() {\n return (capacidad == top+1); // regresa verdadero si la capacidad es igual al tope (la cima +1)\r\n }",
"public int darCantidadSalones()\n {\n return salones.size( );\n }",
"public int getPadding() {\n\n int len = getTrueSize() % 2880;\n\n if (len == 0) {\n return 0;\n }\n\n return 2880 - len;\n }",
"private int verificarRemocao(No no){\n if(no.getDireita()==null && no.getEsquerda()==null)\n return 1;\n if((no.getDireita()==null && no.getEsquerda()!=null) || (no.getDireita()!=null && no.getEsquerda()==null))\n return 2;\n if(no.getDireita() != null && no.getEsquerda() != null)\n return 3;\n else return -1;\n }",
"private int aleatorizarNaipe() {\n\t\tint aux;\n\t\taux = r.getIntRand(4);\n\t\treturn aux;\n\t}",
"int nbColonnes();",
"public boolean hasPadding() {\n return (buffer.get(0) & 0x20) == 0x020;\n }",
"boolean checkZero(Button currentButton){\n\n int curIndex = btns.indexOf(currentButton);\n\n if ((curIndex - n) == zeroIndex){\n return true; \n } else if ((curIndex + n) == zeroIndex){\n return true;\n } else if (((curIndex + 1) % n != 0) && curIndex + 1 == zeroIndex){\n return true;\n } else if (((curIndex) % n != 0) && curIndex - 1 == zeroIndex){\n return true;\n } else {\n return false;\n }\n }",
"public boolean validarDni(String dni){\n boolean isDni = true;\n while(dni.startsWith(\"0\")){\n dni = dni.substring(1);\n }\n isDni = dni.length()<10 && dni.length()>6?true:false;\n return isDni;\n }",
"private int obstaculos() {\n\t\treturn this.quadricula.length * this.quadricula[0].length - \n\t\t\t\tthis.ardiveis();\n\t}",
"private int contar(String nombre) {\n int c = 0;\n for (Nodo<Integer, Reservacion> th1 : this.th) {\n if (th1 != null && th1.value.Cliente().equals(nombre)) {\n c++;\n }\n }\n return c;\n }",
"public int getCantidadNodos() {\n\t\treturn cantNodos;\n\t}",
"public abstract Padding calcPadding(Dim outer, Dim inner);",
"@Override\n public int size() {//por Niveles\n if (this.esArbolVacio()) {\n return 0; //Arbol Vacio\n }\n int cantidadDeNodos = 0;\n Queue<NodoBinario<T>> colaDeNodos = new LinkedList<>();\n colaDeNodos.offer(raiz);\n while (!colaDeNodos.isEmpty()) {\n NodoBinario<T> nodoActual = colaDeNodos.poll();\n cantidadDeNodos++;\n if (!nodoActual.esHijoIzquiedoVacio()) {\n colaDeNodos.offer(nodoActual.getHijoIzquierdo());\n }\n if (!nodoActual.esHijoDerechoVacio()) {\n colaDeNodos.offer(nodoActual.getHijoDerecho());\n }\n }\n return cantidadDeNodos; //Lista con los datos(En el orden de este recorrido)\n }",
"private int countReadjusting(int pos, int l){\n\t\treturn (yb[pos] + l * (int)pow(2,k));\n\t}",
"private int cantidadSiendoAtendidos(Color color) {\n int cantidad = pacienteRepository.cantidadPacientesSiendoAtendidos(color.getId());\n return cantidad;\n }",
"@Override\r\n\tprotected boolean puedeExtraer(double monto) {\n\t\treturn ((super.getSaldo() - monto) >= 0) ? true : false;\r\n\t}",
"private void BajarPiezaRapido() {\n if (!Mover(piezaActual, posicionX, posicionY - 1)) {\r\n BajarPieza1posicion();\r\n }\r\n }",
"public int getNumNudo() {\n return numNudo;\n }",
"private static int countNonEmptyBoxes(short[][] puzzle) {\r\n\t\tint count = 0;\r\n\t\tfor(int y = 0; y < puzzle.length; y++){\r\n\t\t\tfor(int x = 0; x < puzzle[0].length;x++){\r\n\t\t\t\t\r\n\t\t\t\tif(puzzle[y][x]!=0)\r\n\t\t\t\t\tcount++;\r\n\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\r\n\t}",
"@Override\n public boolean IsEmpty() {\n if (tamano == 0) {\n return true;\n } else {\n return false;\n }//FIn del else\n }",
"@Test\n public void nao_deve_aceitar_tamanho_telefone_fixo_com_menos_de_8_numeros() {\n telefone.setTamanho(7);\n assertFalse(isValid(telefone, \"O tamanho do telefone não pode ser menor que 8.\", Find.class));\n }",
"private boolean endOfGrid(Grid tablero) {\n for (int i = 0; i < 10; i++) {\n for (int j = 0; j < 10; j++) {\n if (tablero.getCell(i, j) == 0) {\n return false;\n }\n }\n }\n return true;\n }",
"@Override\n public void cantidad_Defensa(){\n defensa=2+nivel+aumentoD;\n }",
"boolean insertar(Nodo_B nuevo){\n if(this.primero == null){\n this.primero = nuevo;\n this.ultimo = nuevo;\n size ++;\n return true;\n }else{\n if(this.primero == this.ultimo){ // -------------------------solo hay un nodo \n if(nuevo.valor < this.primero.valor){\n nuevo.siguiente = this.primero;\n this.primero.anterior = nuevo;\n this.primero.izq = nuevo.der; // -----cambia los punteros a las paginas\n this.primero = nuevo;\n size++; \n return true;\n }else if(nuevo.valor > this.ultimo.valor){\n this.ultimo.siguiente = nuevo;\n nuevo.anterior = this.ultimo;\n this.ultimo.der = nuevo.izq; //------ cambia los punteros a las paginas \n this.ultimo = nuevo;\n size++; \n return true;\n }else{\n System.out.println (\"ya hay un destino con ese codigo registrado\");\n return false;\n }\n }else{ // ---------------------------------------------------hay mas de un nodo\n if(nuevo.valor < this.primero.valor){\n nuevo.siguiente = this.primero;\n this.primero.anterior = nuevo;\n this.primero.izq = nuevo.der; // -----cambia los punteros a las paginas\n this.primero = nuevo;\n size++; \n return true;\n }else if(nuevo.valor > this.ultimo.valor){\n this.ultimo.siguiente = nuevo;\n nuevo.anterior = this.ultimo;\n this.ultimo.der = nuevo.izq; //------ cambia los punteros a las paginas \n this.ultimo = nuevo;\n size++; \n return true;\n }else{\n Nodo_B pivote = this.primero;\n while(pivote != null){\n if(nuevo.valor < pivote.valor){\n nuevo.siguiente = pivote;\n nuevo.anterior = pivote.anterior;\n //--------------------------- cambia los punteros a las paginas\n pivote.izq = nuevo.der;\n pivote.anterior.der = nuevo.izq;\n //-----------------------------------------------------------\n pivote.anterior.siguiente = nuevo;\n pivote.anterior = nuevo;\n size++;\n return true;\n }else if(nuevo.valor == pivote.valor){\n System.out.println (\"ya hay un destino con ese codigo registrado\");\n return false;\n }else{\n pivote = pivote.siguiente;\n }\n }\n }\n }\n }\n return false;\n }",
"private boolean checkGap() { //Checks if any gap due to previously deleted resv\n\t\tif (numOfReservation == 0)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn !(rList.get(rList.size()-1).getResvNo() == numOfReservation);\n\t}",
"public void aumentarMinas(){\n\r\n if(espM==false){\r\n minascerca++;\r\n }\r\n }",
"public int verificarCantidadGanadores() {\n\t\t if(ganador.size() == 1 && !ganador.contains(\"dealer\")) {\n\t\t\t return 20;\n\t\t }else if(ganador.size() == 2 && !ganador.contains(\"dealer\")) {\n\t\t\t return 10;\n\t\t }else if(ganador.size() == 3 && !ganador.contains(\"dealer\")){\n\t\t\t return 0;\n\t\t }else if(ganador.size() == 1 && ganador.contains(\"dealer\")) {\n\t\t\t return 30;\n\t\t }\n\t\t return 0;\n\t }",
"private int aleatorizarNumero() {\n\t\tint aux;\n\t\taux = r.getIntRand(13) + 1;\n\t\treturn aux;\n\t}",
"public boolean posicaoCompravel(int posicao) {\n // System.out.println(\"posicao\" + posicao);\n String dono = (String) this.Donos.get(posicao);\n // System.out.println(\"DONO\"+ dono);\n if (dono.equals(\"bank\")) {\n if (this.publicServices == false && posicao != 12 && posicao != 28) {\n return true;\n } else if (this.publicServices == true && (posicao == 12 || posicao == 28)) {\n return true;\n } else if (this.publicServices == false && (posicao == 12 || posicao == 28)) {\n return false;\n } else {\n return true;\n }\n } else {\n return false;\n }\n }",
"public nodeTree getPadre (){\n return this._padre;\n }",
"public void gastarDinero(double cantidad){\r\n\t\t\r\n\t}",
"public void dodajHranu() {\n\t\t//int random_int = (int)Math.floor(Math.random()*(max-min+1)+min);\n\t\t\n\t\tint i = (int)Math.floor(Math.random()*(this.visinaTable-2+1)+1);\n\t\tint j = (int)Math.floor(Math.random()*(this.sirinaTable-2+1)+1);\n\t\t\n\t\twhile(this.tabla[i][j] != '.') {\n\t\t\ti = (int)Math.floor(Math.random()*(this.visinaTable-2+1)+1);\n\t\t\tj = (int)Math.floor(Math.random()*(this.sirinaTable-2+1)+1);\n\t\t}\n\t\t\n\t\tthis.tabla[i][j] = '*';\n\t\tthis.iHrana = i;\n\t\tthis.jHrana = j;\n\t}",
"@Override\n\t\tprotected boolean hasBorder(KrollDict d)\n\t\t{\n\t\t\treturn true;\n\t\t}",
"private float getPadding() {\n return (getFont().size() - getPreferredWidth()) / 2f;\n }",
"public void print2DUtil(Nodo raiz, int espacio) \r\n\t { \r\n\t // caso base \r\n\t if (raiz== null) \r\n\t return; \r\n\t \r\n\t // Distancia entre niveles\r\n\t espacio+= 8; \r\n\t \r\n\t // nodo derecho primero\r\n\t print2DUtil(raiz.getRight(), espacio); \r\n\t \r\n\t // imprime el nodo actual \r\n\t for (int i = 8; i < espacio; i++) \r\n\t System.out.print(\" \"); \r\n\t System.out.print(raiz.getClave() + \"\\n\"); \r\n\t \r\n\t // luego izquierdo\r\n\t print2DUtil(raiz.getLeft(), espacio); \r\n\t }",
"public void mostrarPorcentajeRangos(int porcentaje) {\n \t//Las parejas a colorear seran todas las cartas\n \tint numParejas = ((NUMCARTAS*NUMCARTAS) * porcentaje)/100;\n \tArrayList <String> parejasOrdenadas = new ArrayList<String>();\n \tfor (int i = 0; i < numParejas; i++)\n \t\tparejasOrdenadas.add(slanskyTable.devuelveCarta(i));\n \n \tfor (int i = 0; i < NUMCARTAS; i++) \n \t\tfor (int j = 0; j < NUMCARTAS; j++) {\n \t\t\tif(tablero[i][j].isSelected()) toggle(i,j);\n \t\t\tif (parejasOrdenadas.contains(tablero[i][j].getText())) {\n \t\t\t\ttoggle(i,j);\n \t\t\t\ttablero[i][j].setBackground(colorPorcentajes);\n \t\t\t}\n \t\t}\t\n }",
"public int getNombreNoeud()\t{\r\n \treturn this.noeuds.size();\r\n }",
"public void cargarDimensionPadre()\r\n/* 230: */ {\r\n/* 231:296 */ if (getMascara(this.dimension).equals(this.dimensionContable.getMascara())) {\r\n/* 232:297 */ this.dimensionContable.setIndicadorMovimiento(true);\r\n/* 233: */ } else {\r\n/* 234:299 */ this.dimensionContable.setIndicadorMovimiento(false);\r\n/* 235: */ }\r\n/* 236:302 */ this.listaDimensionContablePadre = this.servicioDimensionContable.obtenerListaDimensionPadre(this.dimensionContable);\r\n/* 237: */ }",
"private Object pad(int ca) {\n\t\tif (ca >= 10)\n\t\t\treturn String.valueOf(ca);\n\t\telse\n\t\t\treturn \"0\" + String.valueOf(ca);\n\n\t\t\n\t}",
"private void ActualizaPosicionesFondos() {\n xFondo-=10; //Es el cursor de la posición\n xFondoBase-=10; //Aqui se puede implementar metodo de modificacion de velocidad de fondo.\n xFondoApoyo-=10;\n if (xFondo == -texturaFondoBase.getWidth()){\n xFondoBase = xFondoApoyo+texturaFondoApoyo.getWidth();\n cambiosFondo++;\n }\n if (xFondo == -(texturaFondoApoyo.getWidth()+texturaFondoBase.getWidth())) {\n xFondoApoyo = xFondoBase+texturaFondoBase.getWidth();\n cambiosFondo++;\n }\n }",
"public int limitesX(){\n int v=0;\n if (fila==0 && columna>0 && columna<15){\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna-1)!=null && automata.getElemento(fila+1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna+1)!=null && automata.getElemento(fila+1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n }\n else if (fila==15 && columna>0 && columna<15){\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna-1)!=null && automata.getElemento(fila-1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna+1)!=null && automata.getElemento(fila-1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n }\n else{v=limitesY();}\n return v;\n }",
"Pad createPad(String title);",
"public void checkBlankSpace() {\n\t\tif (xOffset < 0) {\n\t\t\txOffset = 0;\n\t\t} else if (xOffset > handler.getWorld().getWidth() * Tile.TILEWIDTH - handler.getWidth()) {\n\t\t\txOffset = handler.getWorld().getWidth() * Tile.TILEWIDTH - handler.getWidth();\n\t\t}\n\t\t\n\t\tif (yOffset < 0) {\n\t\t\tyOffset = 0;\n\t\t} else if (yOffset > handler.getWorld().getHeight() * Tile.TILEHEIGHT - handler.getHeight()) {\n\t\t\tyOffset = handler.getWorld().getHeight() * Tile.TILEWIDTH - handler.getHeight();\n\t\t}\n\t}",
"public boolean prestamo(){\n boolean prestado = true;\n if (cantPres < cantLibro) {\n cantPres++;\n } else {\n prestado = false;\n }\n return prestado;\n }",
"public void movimentar_dragao(int pos) {\n\t\tint check = 0;\n\t\tint counter = 0; //After 1000 tries it means that the dragon is trapped and cant move either way\n\t\twhile (check == 0 && counter < 1000) {\n\t\t\tint random = 1 + (int)(Math.random()*4);\n\t\t\tif (random == 1) {\n\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()+1][dragoes[pos].getY_coord()] != 'X' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()+1][dragoes[pos].getY_coord()] != 'S' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()+1][dragoes[pos].getY_coord()] != 'D' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()+1][dragoes[pos].getY_coord()] != 'd' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()+1][dragoes[pos].getY_coord()] != 'O') {\n\t\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()] == 'F')\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), 'E');\n\t\t\t\t\telse\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), ' ');\n\t\t\t\t\tdragoes[pos].setX_coord(dragoes[pos].getX_coord()+1);\n\t\t\t\t\tcheck = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (random == 2) {\n\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()-1][dragoes[pos].getY_coord()] != 'X' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()-1][dragoes[pos].getY_coord()] != 'S' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()-1][dragoes[pos].getY_coord()] != 'D' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()-1][dragoes[pos].getY_coord()] != 'd' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()-1][dragoes[pos].getY_coord()] != 'O') {\n\t\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()] == 'F')\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), 'E');\n\t\t\t\t\telse\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), ' ');\n\t\t\t\t\tdragoes[pos].setX_coord(dragoes[pos].getX_coord()-1);\n\t\t\t\t\tcheck = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (random == 3) {\n\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()-1] != 'X' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()-1] != 'S' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()-1] != 'D' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()-1] != 'd' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()-1] != 'O') {\n\t\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()] == 'F')\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), 'E');\n\t\t\t\t\telse\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), ' ');\n\t\t\t\t\tdragoes[pos].setY_coord(dragoes[pos].getY_coord()-1);\n\t\t\t\t\tcheck = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()+1] != 'X' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()+1] != 'S' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()+1] != 'D' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()+1] != 'd' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()+1] != 'O') {\n\t\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()] == 'F')\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), 'E');\n\t\t\t\t\telse\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), ' ');\n\t\t\t\t\tdragoes[pos].setY_coord(dragoes[pos].getY_coord()+1);\n\t\t\t\t\tcheck = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcounter++;\n\t\t}\n\t}",
"private boolean diaHabilLunesPlacaA(int diaActual){\n\t\treturn diaActual == LUNES;\t\t\n\t}",
"private boolean checkId() {\n int sum = 0;\n int id;\n\n try\n {\n id = Integer.parseInt(ID.getText().toString());\n }\n catch (Exception e)\n {\n return false;\n }\n\n if (id >= 1000000000)\n return false;\n\n for (int i = 1; id > 0; i = (i % 2) + 1) {\n int digit = (id % 10) * i;\n sum += digit / 10 + digit % 10;\n\n id=id/10;\n }\n\n if (sum % 10 != 0)\n return false;\n\n return true;\n }",
"@Override\n\tpublic void aumentar(int cantidad) {\n\t\t\n\t}",
"private void resetaPadraoEFundo() {\r\n\t\tdiferencaDeFundoATopo = new BigDecimal(0);\r\n\t\t\r\n\t\tif (!isNovoFundo) {\r\n\t\t\tvalorDoFundoAnterior = new BigDecimal(0);\r\n\t\t}\r\n\r\n\t\tvalorDoTopo = new BigDecimal(0);\r\n\t\tultimoFoiTopo = false;\r\n\t\t\r\n\t\tvalorDoFundo = valorCorrente;\r\n\t\tultimoFoiFundo = true;\r\n\t\t\r\n\t\tcorrecaoCorrente = new BigDecimal(0);\r\n\t\tformouPivoDeCompra = false;\r\n\t\tentrouNoRangeDeInicio = false;\r\n\t\testaNoRangeDeLimite = false;\r\n\t\tformadoSegundoTopo = false;\r\n\t\tformadoTopoRelevante = false;\r\n\t\tformouSegundoFundo = false;\r\n\t}",
"void determinarEdad(int index) {\r\n\t\t\tcantEdad = index+15;\r\n\t\t}",
"public void checkDiceMovement() {// dit hoeft niet gedaan te worden als jij aan de beurt bent, maar maakt wss\n\t\t\t\t\t\t\t\t\t\t// niet uit(testen)\n\t\tArrayList<DiceHolderModel> dhma = new ArrayList<DiceHolderModel>();\n\t\t\t\tdhma.addAll(dhc.getDhmodels());\n\t\tArrayList<PlayerFieldFrameModel> pffa = ddc.getPlayerFrame(gmc.getGameId());\n\t\tArrayList<DiceHolderModel> dhmad = new ArrayList<DiceHolderModel>();\n\t\t\t\tdhmad.addAll(dhc.getDhmodels());\n\t\t\t\t//arraylist met alle diceholder die een dice hebben\n\t\t\n\n\t\tif (pffa.size() == 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor (int i = 0; i < dhmad.size(); i++) {\n\t\t\tif (dhmad.get(i).getDie() == null) {\n\t\t\t\tdhmad.remove(i);\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < dhma.size(); i++) {// loopt door alle diceholders\n\n\t\t\tfor (int j = 0; j < pffa.size(); j++) {// loopt door alle opgehaalde playerframefields, dus alle waar iets\n\t\t\t\t\t\t\t\t\t\t\t\t\t// in zit\n\n\t\t\t\tfor (int j2 = 0; j2 < gm.getAmountOfPlayers(); j2++) {// loopt door alle spelers\n\n\t\t\t\t\tif (pffa.get(j).getPlayerid() == gm.getPma()[j2].getPlayerId()) {// checkt van wie de diceholder is vergeleken met\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// van wie het playerframefield is\n\n\t\t\t\t\t\tif (dhma.get(i).getType() == gm.getPma()[j2].getDht()// vergelijkt of het de DiceHolder van het\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// type is dat verwacht wordt\n\t\t\t\t\t\t\t\t&& dhma.get(i).getX() == pffa.get(j).getX()// en checkt vervolgens of de x en y ook\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// overeen komen\n\t\t\t\t\t\t\t\t&& dhma.get(i).getY() == pffa.get(j).getY()) {// mvc aanpassen\n\t\t\t\t\t\t\t// loop door de dhma, zoek een dobbelsteen in de andere dhm die overeen komt met\n\t\t\t\t\t\t\t// die van de pffa,\n\t\t\t\t\t\t\t// haal dat model daar weg en plaats deze in de juiste dhm\n\t\t\t\t\t\t\tfor (int k = 0; k < dhmad.size(); k++) {\n\n\t\t\t\t\t\t\t\tif (dhmad.get(k).getDie().getDieNumber() == pffa.get(j).getDienumber()\n\t\t\t\t\t\t\t\t\t\t&& dhmad.get(k).getDie().getDieColor() == pffa.get(j).getDiecolor()) {// mvc fix\n\n\t\t\t\t\t\t\t\t\tdhma.get(i).setDie(dhmad.get(k).getDie());\n\t\t\t\t\t\t\t\t\tfor (int k2 = 0; k2 < dhma.size(); k2++) {\n\t\t\t\t\t\t\t\t\t\tif (dhma.get(i).getDie() == dhmad.get(k).getDie()) {\n\t\t\t\t\t\t\t\t\t\t\tdhma.get(k2).setDie(null);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgmc.setUpdateDice(true);\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdhc.setDiceHolderModels(dhma);\n\t}",
"private static int digitarAntiguedad() {\n\t\tint antiguedad;\n\t\tSystem.out.println(\"Digite la antiguedad en aņos: \");\n\t\tantiguedad = teclado.nextInt();\n\t\treturn antiguedad;\n\t}",
"public void setPadre (nodeTree pPadre){\n this._padre=pPadre;\n }"
] | [
"0.64406574",
"0.5913185",
"0.5839273",
"0.58018154",
"0.57758343",
"0.57739735",
"0.5747153",
"0.57408774",
"0.568848",
"0.5631899",
"0.56147724",
"0.55326384",
"0.54693234",
"0.54207265",
"0.54164803",
"0.54110414",
"0.53866905",
"0.53617835",
"0.5360909",
"0.53525394",
"0.53448516",
"0.5300055",
"0.5297824",
"0.5289415",
"0.5266727",
"0.5260137",
"0.5253424",
"0.5249657",
"0.52393353",
"0.5235952",
"0.523338",
"0.5227221",
"0.5215549",
"0.51971436",
"0.5194765",
"0.51878965",
"0.5178389",
"0.51599467",
"0.5128494",
"0.5127884",
"0.51172364",
"0.5108048",
"0.5105708",
"0.5103754",
"0.5102422",
"0.5095739",
"0.50880617",
"0.508265",
"0.5081216",
"0.5073823",
"0.50387794",
"0.50358075",
"0.5032606",
"0.5021504",
"0.49963108",
"0.49810207",
"0.49777016",
"0.49757248",
"0.49723133",
"0.4967439",
"0.49651286",
"0.4963352",
"0.49632993",
"0.49584457",
"0.4957505",
"0.4957109",
"0.49524292",
"0.494882",
"0.4941558",
"0.494054",
"0.49381152",
"0.4936163",
"0.4930807",
"0.49294207",
"0.4927028",
"0.49242356",
"0.49164796",
"0.4914195",
"0.49080938",
"0.49071822",
"0.4906436",
"0.4904068",
"0.49011773",
"0.48964968",
"0.48956048",
"0.48871014",
"0.48870817",
"0.48866183",
"0.4882436",
"0.4881249",
"0.4878377",
"0.48716784",
"0.48697662",
"0.4866359",
"0.48654014",
"0.48597816",
"0.48554882",
"0.48539713",
"0.48535594",
"0.48518166"
] | 0.62792504 | 1 |
Nos dice si el nodo tiene un izquierdo. | public boolean hayIzquierdo() {
return this.izquierdo != null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int cantHijosIzquierdos() {\n if (NodoBinario.esNodoVacio(this.raiz)) {\n return 0;\n }\n int cantHijosIzq = 0;\n Queue<NodoBinario<T>> colaDeNodos = new LinkedList<>();\n colaDeNodos.offer(this.raiz);\n while (!colaDeNodos.isEmpty()) {\n NodoBinario<T> nodoActual = colaDeNodos.poll();\n if (!nodoActual.esHijoIzquiedoVacio()) {\n colaDeNodos.offer(nodoActual.getHijoIzquierdo());\n cantHijosIzq++;\n }\n if (!nodoActual.esHijoDerechoVacio()) {\n colaDeNodos.offer(nodoActual.getHijoDerecho());\n }\n }\n return cantHijosIzq;\n }",
"public static int cantNodosHojas(Nodo raiz)\r\n {\r\n if(raiz == null)\r\n {\r\n return 0;\r\n }\r\n else if(raiz.ramaDerecha == null && raiz.ramaIzquierda == null)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return (cantNodosHojas(raiz.subArbolIzquierdo())) + (cantNodosHojas(raiz.subArbolDerecho()));\r\n }\r\n }",
"public boolean restarUno(){\n\t\tif (numero>0){\n\t\t\tnumero--;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n public int size() {//por Niveles\n if (this.esArbolVacio()) {\n return 0; //Arbol Vacio\n }\n int cantidadDeNodos = 0;\n Queue<NodoBinario<T>> colaDeNodos = new LinkedList<>();\n colaDeNodos.offer(raiz);\n while (!colaDeNodos.isEmpty()) {\n NodoBinario<T> nodoActual = colaDeNodos.poll();\n cantidadDeNodos++;\n if (!nodoActual.esHijoIzquiedoVacio()) {\n colaDeNodos.offer(nodoActual.getHijoIzquierdo());\n }\n if (!nodoActual.esHijoDerechoVacio()) {\n colaDeNodos.offer(nodoActual.getHijoDerecho());\n }\n }\n return cantidadDeNodos; //Lista con los datos(En el orden de este recorrido)\n }",
"public void setNodoIzquierdo(Nodo nodo){\n izq = nodo;\n }",
"public int EliminarNodo() {\r\n int auxiliar = UltimoValorIngresado.informacion;\r\n UltimoValorIngresado = UltimoValorIngresado.siguiente;\r\n tamaño--;\r\n return auxiliar;\r\n }",
"public Nodo getNodoIzquierdo(){\n return izq;\n }",
"public boolean esDeterministico(){\n NodoA x, y;\n x = primerElemento();\n y = x.getLigaDer();\n boolean bandera = true;\n while(x != cabeza){\n while(y != cabeza){\n if(y.getSimbolo().equals( x.getSimbolo())){\n \n if(!listaND.contains(x)){\n listaND.add(x);\n }\n \n bandera= false;\n }\n y = y.getLigaDer();\n }\n \n x = x.getLigaDer();\n y = x.getLigaDer();\n \n \n }\n \n return bandera;\n \n }",
"private Nodo eliminarNodo(Nodo aux, int dato) {\n\t\tif(aux == null) { \r\n\t\t\tSystem.out.println(\"El nodo no se encontro\");\r\n\t\t}else if(dato < aux.getDato()) { // Se busca el dato por el lado izquierdo.\r\n\t\t\tNodo izq = eliminarNodo(aux.getHijoIzq(), dato);\r\n\t\t\taux.setHijoIzq(izq);\r\n\t\t}else if (dato > aux.getDato()) { // Se busca el dato por el lado derecho.\r\n\t\t\tNodo der = eliminarNodo(aux.getHijoDer(), dato);\r\n\t\t\taux.setHijoIzq(der);\r\n\t\t}else { // Un vez encontrado se ejecuta el else.\r\n\t\t\tNodo n = aux; \r\n\t\t\tif(n.getHijoDer() == null) {// si el nodo del lado derecho es igual null se captura el nodo izquierdo.\r\n\t\t\t\taux = n.getHijoIzq(); \r\n\t\t\t}else if (n.getHijoIzq() == null) {// si el nodo del lado izquierdo es igual null se captura el nodo izquierdo.\r\n\t\t\t\taux = n.getHijoDer();\r\n\t\t\t}else { // Si el nodo a eliminar tiene dos hijos entonces hacemos cambiamos los lugaresa para despues eliminarlo. \r\n\t\t\t\tn = cambiar(n);\r\n\t\t\t}\r\n\t\t\tn = null; // ELiminamos el nodo.\r\n\t\t}\r\n\t\treturn aux;\r\n\t}",
"public int AmbosHijos() { //Hecho por mi\n if (this.esArbolVacio()) {\n return 0; //Arbol vacio\n }\n int ambos = 0;\n Queue<NodoBinario<T>> colaDeNodos = new LinkedList<>();\n colaDeNodos.offer(raiz);\n while (!colaDeNodos.isEmpty()) {\n NodoBinario<T> nodoActual = colaDeNodos.poll();\n if (!NodoBinario.esNodoVacio(nodoActual.getHijoIzquierdo())\n && !NodoBinario.esNodoVacio(nodoActual.getHijoDerecho())) {\n ambos++;\n }\n if (!nodoActual.esHijoIzquiedoVacio()) {\n colaDeNodos.offer(nodoActual.getHijoIzquierdo());\n }\n if (!nodoActual.esHijoDerechoVacio()) {\n colaDeNodos.offer(nodoActual.getHijoDerecho());\n }\n }\n return ambos;\n }",
"public boolean ocupadoIzq(Pieza [] pieza) {\n boolean comprobar = false;\r\n for (int i = 0; i < 4; i++) { //borra la pieza para que al comprobar no se encuentre con una celda de la propia pieza\r\n tablero.setTipoPieza(pieza[i].x, pieza[i].y, 0);\r\n }\r\n for (int i = 0; i < 4; i++) {\r\n if (tablero.getTipoPieza()[pieza[i].x][(pieza[i].y) - 1] == 0 && !(pieza[i].y == 0)) { //comprueba si la celda de la izquierda está ocupada o es la última\r\n comprobar = false;\r\n } else {\r\n comprobar = true;\r\n dibujarPieza(canvas, pieza); //si está ocupado vuelve a pintar la pieza y devuelve true\r\n return comprobar;\r\n }\r\n }\r\n dibujarPieza(canvas, pieza); //si no está ocupado también vuelve a pintar la pieza\r\n return comprobar;\r\n }",
"public boolean repetido(int el){\n boolean repe = false;\n NodoDoble current = inicio;\n while(current != null){\n if(current.dato==el){\n repe = true;\n break; \n }else{\n repe = false;\n } \n current = current.siguiente;\n }\n return repe;\n }",
"private void priorizar() {\r\n if (ini == fin) {\r\n return;\r\n }\r\n\r\n int t1 = fin, t2 = fin - 1;\r\n TDAPrioridad aux = new TDAPrioridad(0, '0');\r\n while (t1 != ini) {\r\n if (datos[t1].getPrioridad() > datos[t2].getPrioridad()) {\r\n aux.setObjeto(datos[t1]);\r\n datos[t1].setObjeto(datos[t2]);\r\n datos[t2].setObjeto(aux);\r\n t2--;\r\n t1--;\r\n } else {\r\n break;\r\n }\r\n }\r\n }",
"private int verificarRemocao(No no){\n if(no.getDireita()==null && no.getEsquerda()==null)\n return 1;\n if((no.getDireita()==null && no.getEsquerda()!=null) || (no.getDireita()!=null && no.getEsquerda()==null))\n return 2;\n if(no.getDireita() != null && no.getEsquerda() != null)\n return 3;\n else return -1;\n }",
"public boolean eliminar() {\r\n if (colaVacia()) {\r\n return false;\r\n }\r\n\r\n if (ini == fin) {\r\n ini = fin = -1;\r\n } else {\r\n ini++;\r\n }\r\n\r\n return true;\r\n }",
"public Nodo<T> getIzquierdo() {\n\t\treturn izquierdo;\n\t}",
"private void ordenarGradoAscendente(ArrayList<Nodo> nodo, int izq, int der) {\n\t\tNodo pivote = nodos.get((izq + der) / 2), aux;\n\t\tint i = izq, d = der;\n\t\tdo {\n\t\t\twhile (nodos.get(i).getGrado() < pivote.getGrado())\n\t\t\t\ti++;\n\t\t\twhile (nodos.get(d).getGrado() > pivote.getGrado())\n\t\t\t\td--;\n\t\t\tif (i <= d) {\n\t\t\t\taux = nodo.get(i);\n\t\t\t\tnodo.set(i, nodo.get(d));\n\t\t\t\tnodo.set(d, aux);\n\t\t\t\ti++;\n\t\t\t\td--;\n\t\t\t}\n\t\t} while (i <= d);\n\n\t\tif (izq < d)\n\t\t\tordenarGradoAscendente(nodos, izq, d);\n\t\tif (i < der)\n\t\t\tordenarGradoAscendente(nodos, i, der);\n\t}",
"public void aumentaInSitu(){\n if(quantidade_in_situ<quantidade_disponivel)\n quantidade_in_situ++;\n else\n return;\n }",
"public void setIzquierdo(Nodo<T> izquierdo) {\n\t\tthis.izquierdo = izquierdo;\n\t}",
"public int esquinas(){\n int v=0;\n if (fila==0 && columna==0){\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna+1)!=null && automata.getElemento(fila+1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n }\n else if(fila==0 && columna==15){\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna-1)!=null && automata.getElemento(fila+1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n }\n else if(fila==15 && columna==0){\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna+1)!=null && automata.getElemento(fila-1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n }\n else if(fila==15 && columna==15){\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna-1)!=null && automata.getElemento(fila-1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n }\n return v;\n }",
"private int buscarPosicionDeDatoEnRecorrido(List<T> recorridoInOrden, T datoDelNodoActual) {\n int posicionDelDatoEnelRecorridoInOrden = 0;\n int i = 0;\n while ((i < recorridoInOrden.size()) && (posicionDelDatoEnelRecorridoInOrden == 0)) {\n T datoSacadoDeLaLista = recorridoInOrden.get(i);\n if (datoSacadoDeLaLista.compareTo(datoDelNodoActual) == 0) {\n posicionDelDatoEnelRecorridoInOrden = i;\n }\n i++;\n }\n return posicionDelDatoEnelRecorridoInOrden;\n }",
"boolean insertar(Nodo_B nuevo){\n if(this.primero == null){\n this.primero = nuevo;\n this.ultimo = nuevo;\n size ++;\n return true;\n }else{\n if(this.primero == this.ultimo){ // -------------------------solo hay un nodo \n if(nuevo.valor < this.primero.valor){\n nuevo.siguiente = this.primero;\n this.primero.anterior = nuevo;\n this.primero.izq = nuevo.der; // -----cambia los punteros a las paginas\n this.primero = nuevo;\n size++; \n return true;\n }else if(nuevo.valor > this.ultimo.valor){\n this.ultimo.siguiente = nuevo;\n nuevo.anterior = this.ultimo;\n this.ultimo.der = nuevo.izq; //------ cambia los punteros a las paginas \n this.ultimo = nuevo;\n size++; \n return true;\n }else{\n System.out.println (\"ya hay un destino con ese codigo registrado\");\n return false;\n }\n }else{ // ---------------------------------------------------hay mas de un nodo\n if(nuevo.valor < this.primero.valor){\n nuevo.siguiente = this.primero;\n this.primero.anterior = nuevo;\n this.primero.izq = nuevo.der; // -----cambia los punteros a las paginas\n this.primero = nuevo;\n size++; \n return true;\n }else if(nuevo.valor > this.ultimo.valor){\n this.ultimo.siguiente = nuevo;\n nuevo.anterior = this.ultimo;\n this.ultimo.der = nuevo.izq; //------ cambia los punteros a las paginas \n this.ultimo = nuevo;\n size++; \n return true;\n }else{\n Nodo_B pivote = this.primero;\n while(pivote != null){\n if(nuevo.valor < pivote.valor){\n nuevo.siguiente = pivote;\n nuevo.anterior = pivote.anterior;\n //--------------------------- cambia los punteros a las paginas\n pivote.izq = nuevo.der;\n pivote.anterior.der = nuevo.izq;\n //-----------------------------------------------------------\n pivote.anterior.siguiente = nuevo;\n pivote.anterior = nuevo;\n size++;\n return true;\n }else if(nuevo.valor == pivote.valor){\n System.out.println (\"ya hay un destino con ese codigo registrado\");\n return false;\n }else{\n pivote = pivote.siguiente;\n }\n }\n }\n }\n }\n return false;\n }",
"public int cantHijosIzquierdosR() {\n return this.cantHijosIzquierdosR(this.raiz);\n }",
"public boolean irAIndice(int indice){\n Nodo_bodega_actual = Nodo_bodega_inicial;\n if(indice == 0 ){\n return true;\n }\n while(SiguienteBodega()){\n if(Nodo_bodega_actual.obtenerIndice()==indice){\n return true;\n }\n }\n return false;\n }",
"public boolean eliminarNodo(int edad){\n if(!estaVacia()){\n if(fin==inicio && edad==inicio.edad){\n inicio=fin=null;\n }else if(edad==inicio.edad){\n inicio=inicio.siguiente;\n }else{\n Nodo anterior,temporal;\n anterior=inicio;\n temporal=inicio.siguiente;\n while(temporal!=null && temporal.edad!=edad){\n anterior=anterior.siguiente;\n temporal=temporal.siguiente;\n }\n if(temporal!=null){\n anterior.siguiente=temporal.siguiente;\n if(temporal==fin){\n fin=anterior;\n }\n }else{\n return false;\n }\n }\n return true;\n }else{\n return false;\n }\n }",
"@Test\n\tpublic void test_3_RotacionesDoblesIzquierdaRemove() {\n\t\tassertTrue(tree.add(2000));\n\t\tassertTrue(tree.add(3000));\n\t\tassertTrue(tree.add(1000));\n\t\tassertTrue(tree.add(500));\n\t\tassertTrue(tree.add(4000));\n\t\tassertTrue(tree.add(1500));\n\t\tassertTrue(tree.add(1400));\n\t\tassertTrue(tree.remove(4000)); // Primera rotación\n\t\tassertTrue(tree.add(1300));\n\t\tassertTrue(tree.remove(2000)); // Segunda rotación\n\t\tassertTrue(tree.add(1200));\n\t\tassertTrue(tree.remove(1500)); // Tercera rotación\n\n\t\t// Comprobamos que se hayan realizado 3 rotaciones dobles a la izquierda\n\t\tassertEquals(3, tree.getRotacionesDoblesIzquierda());\n\n\t\t// Comprobamos que no se haya hecho ninguna rotación más\n\t\tassertEquals(0, tree.getRotacionesSimplesDerecha()); \n\t\tassertEquals(0, tree.getRotacionesSimplesIzquierda());\n\t\tassertEquals(0, tree.getRotacionesDoblesDerecha());\n\n\t//\tSystem.out.print(tree.toString());\n\t}",
"@Override\n public int indeksTil(T verdi) {\n int indeks=0;\n Node<T> curr= hode;\n for (; curr!=null; curr= curr.neste, indeks++){\n if (curr.verdi.equals(verdi)){\n return indeks;\n\n }// end if\n\n }// end for\n return -1;\n }",
"public int eliminardelInicio(){\n int elemento = inicio.dato;\n if(inicio == fin){\n inicio=fin=null;\n }else{\n inicio = inicio.sig;\n inicio.ant = null;\n }\n return elemento;\n \n \n }",
"private boolean sePuedeColorear(int indice, int color) {\n\t\tint i = 0;\n\t\tboolean sePuede = true;\n\t\tif (nodos.get(indice).getColor() != 0) // si el nodo fue coloreado\n\t\t\tsePuede = false;\n\t\twhile (i < cantNodos && sePuede) {\n\t\t\t// Si hay un nodo adyacente con ese color, no se puede colorear. Si el nodo fue\n\t\t\t// coloreado tampoco se puede.\n\t\t\tif (nodos.get(i).getColor() == color && i != indice) {\n\t\t\t\tif (esAdyacente(nodos.get(i).getNumero() - 1, nodos.get(indice).getNumero() - 1))\n\t\t\t\t\tsePuede = false;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn sePuede;\n\t}",
"public void eliminarNodo_Dat(int dato) {\n\t raiz = eliminarNodo(raiz, dato);\r\n\t}",
"public void OrdenarIndividuos(int izq, int der) {\n Individuo pivote = (Individuo) individuos.get(izq); // tomamos primer elemento como pivote\r\n int i = izq; // i realiza la búsqueda de izquierda a derecha\r\n int j = der; // j realiza la búsqueda de derecha a izquierda\r\n Individuo ind;\r\n int aux;\r\n\r\n while (i < j) { // mientras no se crucen las búsquedas\r\n while (individuos.get(i).getEvaluacion() <= pivote.getEvaluacion() && i < j) {\r\n i++; // busca elemento mayor que pivote\r\n }\r\n while (individuos.get(j).getEvaluacion() > pivote.getEvaluacion()) {\r\n j--; // busca elemento menor que pivote\r\n }\r\n if (i < j) {\r\n ind = (Individuo) individuos.get(i); // si no se han cruzado \r\n //aux= A[i]; // los intercambia\r\n individuos.set(i, individuos.get(j));\r\n //A[i]=A[j];\r\n individuos.set(j, ind);\r\n //A[j]=aux;\r\n }\r\n }\r\n individuos.set(izq, individuos.get(j));\r\n //A[izq]=A[j]; // se coloca el pivote en su lugar de forma que tendremos\r\n individuos.set(j, pivote);\r\n //A[j]=pivote; // los menores a su izquierda y los mayores a su derecha\r\n if (izq < j - 1) {\r\n OrdenarIndividuos(izq, j - 1); // ordenamos subarray izquierdo\r\n }\r\n if (j + 1 < der) {\r\n OrdenarIndividuos(j + 1, der); // ordenamos subarray derecho\r\n } \r\n }",
"public void AgregarDeMayorAMenor(int el) throws Exception{\n if(repetido(el)){\n throw new Exception(\"El dato ya existe en la lista!!!\");\n }else{\n /*\n Crear un nodo para el nuevo dato.\n Si la lista esta vacía, o el valor del primer elemento de la lista \n es mayor que el nuevo, insertar el nuevo nodo en la primera posición \n de la lista y modificar la cabecera respectivamente.\n \n */\n NodoDoble newNode = new NodoDoble(el);\n if (estVacia() || inicio.GetDato() == el) {\n newNode.SetSiguiente(inicio);\n inicio = newNode;\n } else {\n /* \n Si no se cumple el caso anterior, buscar el lugar adecuado \n para la inserción: recorrer la lista conservando el nodo actual. \n Inicializar nodo actual con el valor de primera posición, \n y avanzar mientras el siguiente nodo no sea nulo y el dato \n que contiene la siguiente posición sea mayor o igual que \n el dato a insertar.\n */\n NodoDoble current = inicio;//\n while (current.GetSiguiente() != null\n && current.siguiente.GetDato() >= el) {\n current = current.GetSiguiente();\n }\n /*\n Con esto se señala al nodo adecuado, \n a continuación insertar el nuevo nodo a continuación de él.\n */\n newNode.SetSiguiente(current.GetSiguiente());\n current.SetSiguiente(newNode);\n }\n } \n }",
"private void ordenarGradoDescendente(ArrayList<Nodo> nodo, int izq, int der) {\n\t\tNodo pivote = nodos.get((izq + der) / 2);\n\t\tNodo aux;\n\t\tint i = izq, d = der;\n\t\tdo {\n\t\t\twhile (nodo.get(i).getGrado() > pivote.getGrado())\n\t\t\t\ti++;\n\t\t\twhile (nodo.get(d).getGrado() < pivote.getGrado())\n\t\t\t\td--;\n\t\t\tif (i <= d) {\n\t\t\t\taux = nodo.get(i);\n\t\t\t\tnodo.set(i, nodo.get(d));\n\t\t\t\tnodo.set(d, aux);\n\t\t\t\ti++;\n\t\t\t\td--;\n\t\t\t}\n\t\t} while (i <= d);\n\t\tif (izq < d)\n\t\t\tordenarGradoDescendente(nodo, izq, d);\n\t\tif (i < der)\n\t\t\tordenarGradoDescendente(nodo, i, der);\n\t}",
"public void pierdeUnaVida() {\n numeroDeVidas--;\n }",
"public int eliminardelfinal(){\n int elemento=fin.dato;\n if(inicio==fin){\n inicio=fin=null;\n }else{\n fin=fin.anterior;\n fin.siguiente=null;}\n return elemento;\n }",
"public int numeroHojas(){\n\t int N=0, ni=0, nd=0;\n\t Arbol <T> aux=null;\n\t if (!vacio()) {\n\t if ((aux=getHijoIzq())!=null) ni = aux.numeroHojas();\n\t if ((aux=getHijoDer())!=null) nd = aux.numeroHojas();\n\t if ((aux=getHijoDer())==null && (aux=getHijoIzq())==null)N = 1;\n\t else N = ni + nd;\n\t }\n\t\treturn N;\n\t}",
"public int eleminardelInicio(){\n int elemento=inicio.dato;\n if(inicio==fin){\n inicio=fin=null;\n }else{\n inicio=inicio.siguiente;\n inicio.anterior=null; \n }\n return elemento;\n }",
"private boolean correcto() {\r\n return (casillas.size()>numCasillaCarcel); //&&tieneJuez\r\n }",
"protected boolean colaLlena() {\r\n return fin == datos.length - 1;\r\n }",
"@Override\n public boolean eliminar(T dato) {\n if (esVacio())\n return (false); \n super.setRaiz(buscarAS(dato));\n int cmp = ((Comparable)dato).compareTo(super.getRaiz().getInfo()); \n //Si se encontro el elemento\n if (cmp==0){\n if (super.getRaiz().getIzq()==null){\n super.setRaiz(super.getRaiz().getDer());\n } \n else {\n NodoBin<T> x = super.getRaiz().getDer();\n super.setRaiz(super.getRaiz().getIzq());\n super.setRaiz(biselar(super.getRaiz(), dato));\n super.getRaiz().setDer(x);\n }\n return (true);\n }\n //El dato no fue encontrado\n return (false);\n }",
"private int obtem_primeiro(int numero)\n {\n for (Map.Entry i : janela.entrySet()) if(((Estado)i.getValue()).getNumero_sequencia() == numero && !((Estado) i.getValue()).isEstado()) return (int) i.getKey();\n return 0;\n }",
"public void insertarInicio(E dato) {\n\t\tprimero=new Nodo<E>(dato,primero);\n\t\tif (estaVacia()) {\n\t\t\tultimo=primero;\n\t\t}\n\t\tcantidad++;\n\t}",
"private int getNumberOfNodesRec(int contador, Node<T> nodo) {\r\n\t\tcontador++;// Si este metodo entra es porque entro a un nodo por lo que\r\n\t\t\t\t\t// se suma 1\r\n\t\tif (nodo.getChildren() != null) {// Si tiene hijos\r\n\t\t\tList<Node<T>> lista = nodo.getChildren();// Hijos\r\n\t\t\tfor (int i = 1; i <= lista.size(); i++) {\r\n\t\t\t\tcontador = getNumberOfNodesRec(contador, lista.get(i));// Recursividad\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn contador;\r\n\t}",
"public void ispisiSveNapomene() {\r\n\t\tint i = 0;// redni broj napomene\r\n\t\tint brojac = 0;\r\n\t\tfor (Podsjetnik podsjetnik : lista) {\r\n\r\n\t\t\ti++;\r\n\t\t\tSystem.out.println(i + \")\" + podsjetnik);\r\n\t\t\tbrojac = i;\r\n\t\t}\r\n\t\tif (brojac == 0) {\r\n\t\t\tSystem.out.println(\"Nema unesenih napomena!!\");\r\n\t\t}\r\n\r\n\t}",
"public int numNodi() {\n\t\treturn this.nodi.size();\n\t}",
"public int puntoUno() {\n int contador = 0;\n for (int i = 0; i < jugadores.length; i++) {\n if (jugadores[i] != null && jugadores[i].getCantPartidosJugados() > 10) {\n contador++;\n }\n }\n return contador;\n }",
"private boolean insertarAux(NodoABB n, Comparable elem) {\n boolean exito = true;\r\n if (elem.compareTo(n.getElem()) == 0) {\r\n //Reportar error: elemento repetido\r\n exito = false;\r\n\r\n } else if (elem.compareTo(n.getElem()) < 0) {\r\n //elemento es menor que el elemento del nodo\r\n //si tine HI baja a la izq, sino agrega elemento\r\n if (n.getIzquierdo() != null) {\r\n exito = insertarAux(n.getIzquierdo(), elem);\r\n } else {\r\n n.setIzquierdo(new NodoABB(elem, null, null));\r\n }\r\n } else // elemento es mayor que el elemento del nodo\r\n //si tiene HD baja a la derecha, sino agrega el elemento\r\n if (n.getDerecho() != null) {\r\n exito = insertarAux(n.getDerecho(), elem);\r\n } else {\r\n n.setDerecho(new NodoABB(elem, null, null));\r\n }\r\n return exito;\r\n }",
"abstract public boolean isDeleted(int n);",
"public boolean klic() {\n\t\tif(first.next.zacetniIndex!=0) {\r\n\t\t\tfirst.next.zacetniIndex = 0;\r\n\t\t\tfirst.next.koncniIndex = first.next.size-1;\r\n\t\t\t//ce je en element, nimamo vec praznega prostora\r\n\t\t\tif(first==last) prazno=0;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\tList prev = first.next;\r\n\t\tList el = first.next.next;\r\n\t\t\r\n\t\twhile(el!=null) {\r\n\t\t\tif(prev.koncniIndex!=el.zacetniIndex-1) {\r\n\t\t\t\t\r\n\t\t\t\tint razlika = el.zacetniIndex - prev.koncniIndex - 1;\r\n\t\t\t\tel.zacetniIndex = el.zacetniIndex - razlika;\r\n\t\t\t\tel.koncniIndex = el.koncniIndex - razlika;\r\n\t\t\t\t//ce pomeramo zadnega zmanjsujemo praznega prostora\r\n\t\t\t\tif(prev==last) prazno = prazno - razlika;\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tprev=el;\r\n\t\t\tel=el.next;\r\n\t }\r\n\t\treturn false;\r\n\t}",
"public int eliminardelFinal(){\n int elemento = fin.dato;\n if(inicio == fin){\n inicio=fin=null;\n }else{\n fin = fin.ant;\n fin.sig = null;\n }\n return elemento;\n \n \n }",
"public boolean remove(int elem)\r\n\t{\r\n\t\tElo p = null;\r\n\t\tp = busca(elem);\r\n\r\n\t\tif (p == null) return false;\r\n\r\n\t\t/* Retira primeiro elemento */\r\n\t\tif (p == prim) \r\n\t\t\tprim = prim.prox;\r\n\t\telse \r\n\t\t\t/* Retira elemento do meio */\r\n\t\t\tp.ant.prox = p.prox;\r\n\r\n\t\t/* Testa se é ultimo elemento */ \r\n\t\tif (p.prox != null)\r\n\t\t\tp.prox.ant = p.ant;\r\n\r\n\t\tp = null;\r\n\t\t\r\n\t\tthis.tamanho--;\r\n\r\n\t\treturn true;\r\n\t}",
"public static Nodo buscarSolucionPorAmplitud(Nodo inicio, int[][] solucion) {\n\t\tArrayList<Nodo> abiertos = new ArrayList<Nodo>();\n\t\tabiertos.add(inicio);\n\t\tint cont = 0;\n\t\tArrayList<Nodo> visitados = new ArrayList<Nodo>();\n\t\twhile(abiertos.size()!=0) {\n\t\t\tSystem.out.println(\"Visitados\");\n\t\t\tSystem.out.println(\"#################################\");\n\t\t\tfor(Nodo n : visitados) {\n\t\t\t\timprimirEstado(n.getEstado());\n\t\t\t\tSystem.out.println(\"Costo de este nodo: \" + n.getCosto());\n\t\t\t\tSystem.out.println(\"---------------\");\n\t\t\t}\n\t\t\tSystem.out.println(\"#################################\");\n\t\t\tNodo revisar = abiertos.remove(0);\n\t\t\trevisar.setCosto(calcularCosto(revisar.getEstado(), solucion));\n\t\t\timprimirEstado(revisar.getEstado());\n\t\t\tint[] pcero = ubicarPosicionCero(revisar.getEstado());\n\t\t\tSystem.out.println(\"Iteracion # \" + ++cont);\n\t\t\tif(Arrays.deepEquals(revisar.getEstado(), solucion)) {\n\t\t\t\tSystem.out.println(\"***** SOLUCION ENCONTRADA *****\");\n\t\t\t\treturn revisar;\n\n\t\t\t}\n\n\t\t\tArrayList<Nodo> hijos = new ArrayList<Nodo>();\n\t\t\tvisitados.add(revisar);\n\t\t\tif(pcero[0]!=0) {\n\t\t\t\tNodo hijo = new Nodo(clonar(revisar.getEstado()));\n\t\t\t\thijo.setCosto(calcularCosto(hijo.getEstado(), solucion));\n\t\t\t\tint arriba = hijo.getEstado()[pcero[0]-1][pcero[1]];\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]] = arriba;\n\t\t\t\thijo.getEstado()[pcero[0]-1][pcero[1]] = 0;\n\t\t\t\tif(!estaEnVisitados(visitados, hijo))\n\t\t\t\t\tabiertos.add(hijo); //Esta linea es para hacer recorrido em amplitud\n\n\t\t\t\thijos.add(hijo);\n\t\t\t}\n\t\t\tif(pcero[0]!=2) {\n\t\t\t\tNodo hijo = new Nodo(clonar(revisar.getEstado()));\n\t\t\t\thijo.setCosto(calcularCosto(hijo.getEstado(), solucion));\n\t\t\t\tint abajo = hijo.getEstado()[pcero[0]+1][pcero[1]];\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]] = abajo;\n\t\t\t\thijo.getEstado()[pcero[0]+1][pcero[1]] = 0;\n\t\t\t\tif(!estaEnVisitados(visitados, hijo))\n\t\t\t\t\tabiertos.add(hijo); //Esta linea es para hacer recorrido em amplitud\n\n\t\t\t\thijos.add(hijo);\n\t\t\t}\n\t\t\tif(pcero[1]!=0) {\n\t\t\t\tNodo hijo = new Nodo(clonar(revisar.getEstado()));\n\t\t\t\thijo.setCosto(calcularCosto(hijo.getEstado(), solucion));\n\t\t\t\tint izq = hijo.getEstado()[pcero[0]][pcero[1]-1];\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]] = izq;\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]-1] = 0;\n\t\t\t\tif(!estaEnVisitados(visitados, hijo))\n\t\t\t\t\tabiertos.add(hijo); //Esta linea es para hacer recorrido em amplitud\n\n\t\t\t\thijos.add(hijo);\n\t\t\t}\n\t\t\tif(pcero[1]!=2) {\n\t\t\t\tNodo hijo = new Nodo(clonar(revisar.getEstado()));\n\t\t\t\thijo.setCosto(calcularCosto(hijo.getEstado(), solucion));\n\t\t\t\tint der = hijo.getEstado()[pcero[0]][pcero[1]+1];\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]] = der;\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]+1] = 0;\n\t\t\t\tif(!estaEnVisitados(visitados, hijo))\n\t\t\t\t\tabiertos.add(hijo); //Esta linea es para hacer recorrido em amplitud\n\t\t\t\thijos.add(hijo);\n\t\t\t}\n\t\t\trevisar.setHijos(hijos);\n\t\t}\n\t\treturn null;\n\n\t}",
"public boolean potezDesno() {\n\t\t//koordinate glave\n\t\tint i = this.zmija.get(0).i;\n\t\tint j = this.zmija.get(0).j;\n\t\t\n\t\tthis.smjer ='d';\n\t\t\n\t\tif (j+1 < this.sirinaTable) {\n\t\t\tif ((this.tabla[i][j+1] == '#')||(this.tabla[i][j+1] == 'o')) \n\t\t\t\treturn false;\n\t\t\telse if (this.tabla[i][j+1] == '*') \n\t\t\t\tthis.pojedi(i, j+1);\n\t\t\telse \n\t\t\t\tthis.pomjeri(i, j+1);\n\t\n\t\t}\n\t\telse if (j+1 == this.sirinaTable) {\n\t\t\tif ((this.tabla[i][0] == '#')||(this.tabla[i][0] == 'o')) \n\t\t\t\treturn false;\n\t\t\telse if (this.tabla[i][0] == '*') \n\t\t\t\tthis.pojedi(i, 0);\n\t\t\telse \n\t\t\t\tthis.pomjeri(i, 0);\n\t\t}\n\t\treturn true;\n\t\t\t\n\t}",
"@Test\n\tpublic void test_3_RotacionesSimplesIzquierdaRemoveHijoDesequilibrado() {\n\t\tassertTrue(tree.add(2000));\n\t\tassertTrue(tree.add(3000));\n\t\tassertTrue(tree.add(1000));\n\t\tassertTrue(tree.add(500));\n\t\tassertTrue(tree.add(4000));\n\t\tassertTrue(tree.add(1500));\n\t\tassertTrue(tree.add(300));\n\t\tassertTrue(tree.remove(3000)); // Primera rotación\n\t\tassertTrue(tree.add(700));\n\t\tassertTrue(tree.add(5000));\n\t\tassertTrue(tree.add(200));\n\t\tassertTrue(tree.add(600));\n\t\tassertTrue(tree.add(400));\n\t\tassertTrue(tree.add(100));\n\t\tassertTrue(tree.remove(700)); // Segunda rotación\n\t\tassertTrue(tree.add(1700));\n\t\tassertTrue(tree.add(1300));\n\t\tassertTrue(tree.add(1200));\n\t\tassertTrue(tree.remove(4000)); // Tercera rotación\n\n\t\t// Comprobamos que se hayan realizado 3 rotaciones simples a la\n\t\t// izquierda\n\t\tassertEquals(3, tree.getRotacionesSimplesIzquierda());\n\n\t\t// Comprobamos que no se haya hecho ninguna rotación más\n\t\tassertEquals(0, tree.getRotacionesSimplesDerecha());\n\t\tassertEquals(0, tree.getRotacionesDoblesDerecha());\n\t\tassertEquals(0, tree.getRotacionesDoblesIzquierda());\n\n\t\t// System.out.print(tree.toString());\n\t}",
"public boolean tieneDinero(int precioEntrada){\r\n return this.dinero >= precioEntrada;\r\n }",
"private int obstaculos() {\n\t\treturn this.quadricula.length * this.quadricula[0].length - \n\t\t\t\tthis.ardiveis();\n\t}",
"private boolean sortieNonAtteint(){\n\t\t\t//return this.terrainDeLaPartie.getTerrain()[this.terrainDeLaPartie.getAbSortie()][this.terrainDeLaPartie.getOrdSortie()]!='R' ;\t\t\t\n\t\t\tif(this.terrainDeLaPartie.getTerrain()[terrainDeLaPartie.getAbSortie()][terrainDeLaPartie.getOrdSortie()]=='R'){\n\t\t\t\tSystem.out.println(\"###################################### SORTIE #################################\");\n\t\t\t}\n\t\t\treturn this.terrainDeLaPartie.getTerrain()[terrainDeLaPartie.getAbSortie()][terrainDeLaPartie.getOrdSortie()]!='R';\n\t\t}",
"public boolean SiguienteBodega(){\n if(!lista_inicializada){\n Nodo_bodega_actual = Nodo_bodega_inicial;\n lista_inicializada = true;\n if(Size>0){\n return true;\n }\n }\n \n if(Size > 1 ){\n if(Nodo_bodega_actual.obtenerSiguiente()!= null){\n Nodo_bodega_actual = Nodo_bodega_actual.obtenerSiguiente();\n return true;\n } \n }\n return false;\n }",
"public boolean completed(){\n int count = 0;\n for(int Y=0; Y<size; Y++){\n for(int X=0; X<size; X++){\n if(tiles[X][Y] instanceof EindVeld){\n EindVeld tmp = (EindVeld)tiles[X][Y];\n if(tmp.hasDoos())\n count++;\n }\n }\n }\n \n if(eindVelden == count){\n System.out.println(\"DOOLHOF COMPLEET !!!\");\n return true;\n }else{\n return false;\n }\n }",
"public void ordenarXNombreBurbuja() {\r\n\t\tfor (int i = datos.size(); i > 0; i-- ) {\r\n\t\t\tfor (int j=0; j<i-1; j++) {\r\n\t\t\t\tif(\tdatos.get(j).compare(datos.get(j), datos.get(j+1)) == (1)) {\r\n\t\t\t\t\tJugador tmp = datos.get(j);\r\n\t\t\t\t\tdatos.set(j, datos.get(j+1));\r\n\t\t\t\t\tdatos.set((j+1), tmp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Test\n\tpublic void test_3_RotacionesSimplesIzquierdaHijoEquilibrado() {\n\t\tassertTrue(tree.add(2000));\n\t\tassertTrue(tree.add(3000));\n\t\tassertTrue(tree.add(1000));\n\t\tassertTrue(tree.add(500));\n\t\tassertTrue(tree.add(1500));\n\t\tassertTrue(tree.remove(3000)); // Primera rotación\n\t\tassertTrue(tree.remove(1500)); \n\t\tassertTrue(tree.add(700));\n\t\tassertTrue(tree.add(400));\n\t\tassertTrue(tree.remove(2000)); // Segunda rotación\n\t\tassertTrue(tree.remove(700)); \n\t\tassertTrue(tree.add(450));\n\t\tassertTrue(tree.add(300));\n\t\tassertTrue(tree.remove(1000)); // Tercera rotación\n\n\t//\t System.out.print(tree.toString());\n\n\t\t// Comprobamos que se hayan realizado 3 rotaciones simples a la\n\t\t// izquierda\n\t\tassertEquals(3, tree.getRotacionesSimplesIzquierda());\n\n\t\t// Comprobamos que no se haya hecho ninguna rotación más\n\t\tassertEquals(0, tree.getRotacionesSimplesDerecha());\n\t\tassertEquals(0, tree.getRotacionesDoblesDerecha());\n\t\tassertEquals(0, tree.getRotacionesDoblesIzquierda());\n\n\t\t// System.out.print(tree.toString());\n\t}",
"public void subirNivelAtaque(){\n\tif(contadorNivel==5){\n\t nivelAtaque++;\n\t System.out.println(\"El ataque \"+obtenerNombreAtaque()+\" ha subido de nivel\");\n\t contadorNivel=0;\n\t dano+=5;\n\t} else {\n\t nivelAtaque=nivelAtaque;\n\t}\n }",
"public int alturaInterativa() {\n if (this.esArbolVacio()) {\n return 0;\n }\n int alturaDelArbol = 0;\n Queue<NodoBinario<T>> colaDeNodos = new LinkedList<>();\n colaDeNodos.offer(raiz);\n while (!colaDeNodos.isEmpty()) {\n int nroDeNodosDelNivel = colaDeNodos.size();\n while (nroDeNodosDelNivel > 0) {\n NodoBinario<T> nodoActual = colaDeNodos.poll();\n if (!nodoActual.esHijoIzquiedoVacio()) {\n colaDeNodos.offer(nodoActual.getHijoIzquierdo());\n }\n if (!nodoActual.esHijoDerechoVacio()) {\n colaDeNodos.offer(nodoActual.getHijoDerecho());\n }\n nroDeNodosDelNivel--;\n }\n alturaDelArbol++;\n }\n return alturaDelArbol; //Altura total del arbol\n }",
"public void Nivel(Nodo nodo){\r\n\t\tif(cont<(int)Math.pow(2,base)){\r\n\t\t\tnodo.setNivel(nivel);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tnivel++;\r\n\t\t\tbase++;\r\n\t\t\tnodo.setNivel(nivel);\r\n\t\t}\r\n\t}",
"protected T buscarSucesorInOrden(NodoBinario<T> hijoDerecho) {\n if (NodoBinario.esNodoVacio(hijoDerecho.getHijoIzquierdo())) {\n return hijoDerecho.getDato(); //si no tiene mas que ir por la izquierda retorna su dato\n } else {\n return buscarSucesorInOrden(hijoDerecho.getHijoIzquierdo()); //todo izquierda\n }\n }",
"protected int findNonEmptyPosition() {\n\t\t\twhile (!set.bv[++indice]) {\n\t\t\t}\n\t\t\treturn indice;\n\t\t}",
"private int siguientePrimo(int n)\r\n {\r\n if (n%2 == 0) n++;\r\n for (; !esPrimo(n); n+=2);\r\n return n;\r\n }",
"public int eliminar() {\n if (estaVacia()) { // si esta vacia\r\n System.out.println(\"La pila esta vacia\"); // mensaje indicando que esta vaci\r\n return -1; // retorno\r\n } else { // si no esta vacia\r\n reducirTamanio(); // ejecutamos el metodo para checar si el tamaño puede ser reducido (ver metodo en linea 58)\r\n return array[top--]; // decrementamos el arreglo\r\n }\r\n }",
"public boolean ocupadoDcha(Pieza [] pieza) {\n boolean comprobar = false;\r\n for (int i = 0; i < 4; i++) { //borra la pieza para que al comprobar no se encuentre con una celda de la propia pieza\r\n tablero.setTipoPieza(pieza[i].x, pieza[i].y, 0);\r\n }\r\n for (int i = 0; i < 4; i++) {\r\n if (tablero.getTipoPieza()[pieza[i].x][(pieza[i].y) + 1] == 0 && !(pieza[i].y == 9)) { //comprueba si la celda de la derecha está ocupada o es la última\r\n comprobar = false;\r\n } else {\r\n comprobar = true;\r\n dibujarPieza(canvas, pieza); //si está ocupado vuelve a pintar la pieza y devuelve true\r\n return comprobar;\r\n }\r\n }\r\n dibujarPieza(canvas, pieza);//si no está ocupado también vuelve a pintar la pieza\r\n return comprobar;\r\n }",
"public Nodo espaciosJustos(Nodo nodo){\n System.out.println(\"----------------inicio heuristica espaciosJustos--------------\");\n Operadores operadores = new Operadores();\n //variables de matriz\n int numFilas,numColumnas,numColores;\n \n numColumnas = nodo.getnColumnas();\n numFilas = nodo.getnFilas();\n numColores = nodo.getnColores();\n \n String [][] matriz = new String [numFilas][numColumnas];\n matriz = operadores.clonarMatriz(nodo.getMatriz());\n //-------------------\n \n //variables de filas y columnas\n ArrayList<ArrayListColumna> columnas = new ArrayList<ArrayListColumna>();\n columnas = (ArrayList<ArrayListColumna>)nodo.getColumnas();\n \n ArrayList<ArrayListFila> filas = new ArrayList<ArrayListFila>();\n filas = (ArrayList<ArrayListFila>)nodo.getFilas();\n //---------------------------\n \n ArrayListFila auxListFila = new ArrayListFila();\n ArrayListColumna auxListColumna = new ArrayListColumna();\n \n int cambio=1;\n int changue=0;\n while(cambio!=0){\n cambio=0;\n \n nodo.setCambio(0);\n for(int i=0;i<numFilas;i++){\n auxListFila = (ArrayListFila)filas.get(i);\n for(int j=0;j<numColores;j++){\n Color auxColor = new Color();\n auxColor = auxListFila.getColor(j);\n\n if(auxColor.getNumero() > 0){\n int contador=0;\n for(int c=0;c<numColumnas;c++){\n auxListColumna=(ArrayListColumna)columnas.get(c);\n\n for(int j1=0;j1<numColores;j1++){\n Color auxColor1 = new Color();\n auxColor1 = auxListColumna.getColor(j1);\n if(auxColor1.getNumero() > 0){\n if(auxColor.getColor().equals(auxColor1.getColor()) && operadores.isPosicionVaciaFila(nodo.getMatriz(), i, c)){\n contador++;\n }\n }\n }\n }\n \n if(auxColor.getNumero() == contador){\n changue=1;\n cambio=1;\n auxColor.setNumero(0);\n for(int c=0;c<numColumnas;c++){\n auxListColumna=(ArrayListColumna)columnas.get(c);\n\n for(int j1=0;j1<numColores;j1++){\n Color auxColor1 = new Color();\n auxColor1 = auxListColumna.getColor(j1);\n if(auxColor1.getNumero() > 0){\n if(auxColor.getColor().equals(auxColor1.getColor()) && operadores.isPosicionVaciaFila(nodo.getMatriz(), i, c)){\n \n auxColor1.setNumero(auxColor1.getNumero()-1);\n\n matriz = operadores.pintarPosicion(matriz, i, c, auxColor.getColor());\n\n nodo.setMatriz(matriz);\n }\n }\n }\n }\n System.out.println(\"-----\");\n operadores.imprimirMatriz(nodo.getMatriz());\n System.out.println(\"-----\");\n \n \n }\n }\n }\n }\n \n }\n if(changue==1) nodo.setCambio(1);\n System.out.println(\"----------------fin heuristica espaciosJustos-------------- \");\n return (Nodo)nodo;\n }",
"public void insert(Nodo nodo) {\r\n\t\tif(cont<7){\r\n\t\t\tif(this.getRaiz() == null) {\r\n\t this.setRaiz(nodo);\r\n\t nodo.setClave(0);\r\n\t return;\r\n\t }\r\n\t \r\n\t Nodo t = this.getRaiz();\r\n\t boolean val = true;\r\n\t while((t != null)&&(val)) {\r\n\t if(t.getLeft() == null) {\r\n\t \tt.setLeft(nodo);\r\n\t \tcont++;\r\n\t \tNivel(nodo);\r\n\t \tval=false;\r\n\t }\r\n\t else if(t.getRight() == null) {\r\n\t t.setRight(nodo);\r\n\t cont++;\r\n\t \tNivel(nodo);\r\n\t val=false;\r\n\t }\r\n\t else {\r\n\t int lCount = countChildren(t.getLeft());\r\n\t int rCount = countChildren(t.getRight());\r\n\t if(lCount == rCount)\r\n\t t = t.getLeft(); \r\n\t \r\n\t else if(lCount == 0 || lCount == 1)\r\n\t t = t.getLeft(); \r\n\t \r\n\t else\r\n\t t = t.getRight();\r\n\t \r\n\t }\r\n\t\r\n\t }\r\n\t\t}\r\n\t}",
"public NodoArbol buscarNodo(int d){\n\t\tNodoArbol aux= raiz;\n\t\twhile(aux.dato!=d){\n\t\t\tif(d<aux.dato){\n\t\t\t\taux=aux.hijoizq;\n\t\t\t}else{\n\t\t\t\taux=aux.hijoder;\n\t\t\t}\n\t\t\tif(aux==null){\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\treturn aux;\n\t}",
"public void ordenarXPuntajeInsercion() {\r\n\t\tfor (int i = 1; i < datos.size(); i++) {\r\n\t\t\tfor (int j = i; j>0 && ( datos.get(j-1).getPuntaje() > datos.get(j).getPuntaje()); j--) {\r\n\t\t\t\tJugador temp = datos.get(j);\r\n\t\t\t\tdatos.set(j, datos.get(j-1));\r\n\t\t\t\tdatos.set(j-1, temp);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic int operar() {\n\t\treturn 0;\r\n\t}",
"public boolean tienePapel()\n {\n //COMPLETE\n return this.hojas > 0;\n }",
"public int darCantidadSalones()\n {\n return salones.size( );\n }",
"@Override\n public boolean IsEmpty() {\n if (tamano == 0) {\n return true;\n } else {\n return false;\n }//FIn del else\n }",
"private int contar(String nombre) {\n int c = 0;\n for (Nodo<Integer, Reservacion> th1 : this.th) {\n if (th1 != null && th1.value.Cliente().equals(nombre)) {\n c++;\n }\n }\n return c;\n }",
"public int eliminarAlFinal(){\n int edad = fin.edad;\n if(fin==inicio){\n inicio=fin=null;\n }else{\n Nodo auxiliar=inicio;\n while(auxiliar.siguiente!=fin){\n auxiliar=auxiliar.siguiente;\n }\n fin=auxiliar;\n fin.siguiente=null;\n }\n return edad;\n }",
"public static int fittnes(int [] tablero){ \n int cantidadchoques=0; // si hay dos numeros iguales,suma un choque\n for(int i=0;i<tablero.length;i++){ \n for(int j=0;j<tablero.length;j++){\n if((i-tablero[i]==j-tablero[j])||(i+tablero[i])==j+tablero[j]){\n cantidadchoques++;\n }\n }\n } \n cantidadchoques=Math.abs(cantidadchoques-tablero.length);\n return cantidadchoques;\n }",
"public void agregar_Alinicio(int elemento){\n inicio=new Nodo(elemento, inicio);// creando un nodo para que se inserte otro elemnto en la lista\r\n if (fin==null){ // si fin esta vacia entonces vuelve al inicio \r\n fin=inicio; // esto me sirve al agregar otro elemento al final del nodo se recorre al inicio y asi sucesivamnete\r\n \r\n }\r\n \r\n }",
"private boolean procesoComer(int a, int b)\n {\n ArrayList<Integer> muertes;\n muertes = animales.get(a).get(b).come();\n if (muertes.get(0) > krill) {\n krill = 0;\n return false;\n } else {\n krill -= muertes.get(0);\n }\n for (int i = 1; i < muertes.size(); i++) {\n for (int j = 0; j < muertes.get(i); j++) {\n if (animales.get(i).size() > 0) {\n animales.get(i).get(0).destruir(); //Reduce en 1 la cantidad\n animales.get(i).remove(0);\n } else {\n return false;\n }\n }\n }\n return true;\n }",
"@Test\n\tpublic void test_3_RotacionesSimplesDerechaHijoEquilibrado() {\n\t\tassertTrue(tree.add(2000));\n\t\tassertTrue(tree.add(3000));\n\t\tassertTrue(tree.add(1000));\n\t\tassertTrue(tree.add(500));\n\t\tassertTrue(tree.add(4000));\n\t\tassertTrue(tree.add(2500));\n\t\tassertTrue(tree.remove(500));\n\t\tassertTrue(tree.remove(1000));\t// Primera rotación\n\t\tassertTrue(tree.remove(2500));\n\t\tassertTrue(tree.add(3500));\n\t\tassertTrue(tree.add(4500));\n\t\tassertTrue(tree.remove(2000)); // Segunda rotación\n\t\tassertTrue(tree.remove(3500));\n\t\tassertTrue(tree.add(4400));\n\t\tassertTrue(tree.add(4700));\n\t\tassertTrue(tree.remove(3000)); // Tercera rotación\n\t\t\n\t\t\n//\t\t System.out.print(tree.toString());\n\n\t\t// Comprobamos que se hayan realizado 3 rotaciones simples a la derecha\n\t\tassertEquals(3, tree.getRotacionesSimplesDerecha());\n\n\t\t// Comprobamos que no se haya hecho ninguna rotación más\n\t\tassertEquals(0, tree.getRotacionesSimplesIzquierda());\n\t\tassertEquals(0, tree.getRotacionesDoblesDerecha());\n\t\tassertEquals(0, tree.getRotacionesDoblesIzquierda());\n\n\t\t\n\t}",
"private void moverJogadorAPosicao(int jogador, int valorDados, boolean iguais) {\n int tentativasDeSairDaPrisao = this.listaJogadores.get(jogadorAtual()).getTentativasSairDaPrisao();\n //Analisando se o cara esta preso, se a prisao ta ativada e se o cara tentou um numero de vezes menos que tres\n //ou se a funcao prisao esta falsa\n //ou se o jogador nao esta preso\n if ((JogadorEstaPreso(this.listaJogadores.get(jogadorAtual()).getNome()) && iguais && this.prisao == true && tentativasDeSairDaPrisao <= 2) || this.prisao == false || (!JogadorEstaPreso(this.listaJogadores.get(jogadorAtual()).getNome()) && this.prisao == true)) {\n if (JogadorEstaPreso(this.listaJogadores.get(jogadorAtual()).getNome()) && iguais && this.prisao == true && tentativasDeSairDaPrisao < 2);\n {\n this.sairdaPrisao(this.listaJogadores.get(jogadorAtual()));\n this.listaJogadores.get(jogadorAtual()).setTentativasSairDaPrisao(0);\n }\n this.posicoes[jogador] = (this.posicoes[jogador] + valorDados);\n if (posicoes[jogador] > 40) {\n posicoes[jogador] = posicoes[jogador] - 40;\n }\n }\n\n //analisando se o jogador esta preso e lanca numeros diferentes nos dados\n if (JogadorEstaPreso(this.listaJogadores.get(jogadorAtual()).getNome()) && !iguais && this.prisao == true) {\n //analisa se estourou as tentativas\n //se estourou\n if (this.listaJogadores.get(jogadorAtual()).getTentativasSairDaPrisao() == 2) {\n this.sairdaPrisao(this.listaJogadores.get(jogadorAtual()));\n this.listaJogadores.get(jogadorAtual()).retirarDinheiro(50);\n this.listaJogadores.get(jogadorAtual()).setTentativasSairDaPrisao(0);\n this.posicoes[jogador] = (this.posicoes[jogador] + valorDados);\n if (posicoes[jogador] > 40) {\n posicoes[jogador] = posicoes[jogador] - 40;\n }\n\n } //se nao estourou\n else if (this.listaJogadores.get(jogadorAtual()).getTentativasSairDaPrisao() < 2) {\n this.listaJogadores.get(jogadorAtual()).addTentativasSairDaPrisao();\n }\n\n\n }\n\n\n }",
"@Override\n public boolean esArbolVacio() {\n return NodoBinario.esNodoVacio(raiz);\n }",
"@Test\n\tpublic void test_3_RotacionesSimplesDerechaRemoveHijoDesequilibrado() {\n\t\tassertTrue(tree.add(2000));\n\t\tassertTrue(tree.add(3000));\n\t\tassertTrue(tree.add(1000));\n\t\tassertTrue(tree.add(500));\n\t\tassertTrue(tree.add(4000));\n\t\tassertTrue(tree.add(2500));\n\t\tassertTrue(tree.add(5000));\n\t\tassertTrue(tree.remove(1000)); // Primera rotación\n\t\tassertTrue(tree.add(3500));\n\t\tassertTrue(tree.add(300));\n\t\tassertTrue(tree.add(2700));\n\t\tassertTrue(tree.add(2400));\n\t\tassertTrue(tree.add(7000));\n\t\tassertTrue(tree.add(2800));\n\t\tassertTrue(tree.remove(500)); // Segunda rotación\n\t\tassertTrue(tree.add(3300));\n\t\tassertTrue(tree.add(4500));\n\t\tassertTrue(tree.add(8000));\n\t\tassertTrue(tree.remove(3500)); // Tercera rotación\n\n\t\t// Comprobamos que se hayan realizado 3 rotaciones simples a la derecha\n\t\tassertEquals(3, tree.getRotacionesSimplesDerecha());\n\n\t\t// Comprobamos que no se haya hecho ninguna rotación más\n\t\tassertEquals(0, tree.getRotacionesSimplesIzquierda());\n\t\tassertEquals(0, tree.getRotacionesDoblesDerecha());\n\t\tassertEquals(0, tree.getRotacionesDoblesIzquierda());\n\n\t\t// System.out.print(tree.toString());\n\t}",
"public boolean prestamo(){\n boolean prestado = true;\n if (cantPres < cantLibro) {\n cantPres++;\n } else {\n prestado = false;\n }\n return prestado;\n }",
"private static boolean nivelPasado() {\r\n\t\tint[] contPelotas = new int[ COLORES_POSIBLES.length ]; // Contadores por color\r\n\t\tfor (int i=0; i<tablero.size(); i++) {\r\n\t\t\tPelota pelota = tablero.getPelota(i);\r\n\t\t\tint contColor = Arrays.asList(COLORES_POSIBLES).indexOf( pelota.getColor() ); // Posición del color de la pelota en el array de contadores\r\n\t\t\tcontPelotas[contColor]++;\r\n\t\t}\r\n\t\tfor (int contador : contPelotas) if (contador>=tamanyoTablero-2) return false;\r\n\t\treturn true;\r\n\t}",
"public int vecinos(){\n int v=0;\n if(fila<15 && columna<15 && fila>0 && columna>0){\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna-1)!=null && automata.getElemento(fila+1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;} \n if(automata.getElemento(fila+1,columna+1)!=null && automata.getElemento(fila+1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna+1)!=null && automata.getElemento(fila-1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna-1)!=null && automata.getElemento(fila-1,columna-1).isVivo()){v++;}\n }\n else{v=limitesX();}\n return v;\n }",
"public void mezclarPorGrado() {\n\t\tint i = 0;\n\t\tint inicio = 0;\n\t\tint fin = 0;\n\t\tint grado = 0;\n\t\tNodo aux;\n\t\tRandom r = new Random();\n\t\tboolean[] mezclado = new boolean[cantNodos];\n\n\t\twhile (i < cantNodos) {\n\t\t\tinicio = i;\n\t\t\tgrado = nodos.get(i).getGrado();\n\t\t\twhile (i < cantNodos && nodos.get(i).getGrado() == grado)\n\t\t\t\ti++;\n\n\t\t\tfin = i;\n\n\t\t\tfor (int k = inicio; k < (fin - inicio); k++) {\n\t\t\t\tint res = r.nextInt(fin - inicio);\n\t\t\t\tif (mezclado[k])\n\t\t\t\t\tres = r.nextInt(fin - inicio);\n\t\t\t\taux = nodos.get(k);\n\t\t\t\tmezclado[k] = true;\n\t\t\t\tnodos.set(k, nodos.get(inicio + res));\n\t\t\t\tnodos.set(inicio + res, aux);\n\t\t\t}\n\t\t}\n\t\tvalidarMezcla();\n\t}",
"public boolean potezDole() {\n\t\t//koordinate glave\n\t\tint i = this.zmija.get(0).i;\n\t\tint j = this.zmija.get(0).j;\n\t\t\n\t\tthis.smjer ='s';\n\t\t\n\t\tif (i+1 < this.visinaTable) {\n\t\t\tif ((this.tabla[i+1][j] == '#')||(this.tabla[i+1][j] == 'o')) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse if (this.tabla[i+1][j] == '*') {\n\t\t\t\t\n\t\t\t\tthis.pojedi(i+1, j);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\n\t\t\t\tthis.pomjeri(i+1, j);\n\n\t\t\t}\n\t\t}\n\t\telse if (i+1 == this.visinaTable) {\n\t\t\tif ((this.tabla[0][j] == '#')||(this.tabla[0][j] == 'o'))\n\t\t\t\treturn false;\n\t\t\telse if (this.tabla[0][j] == '*')\n\t\t\t\tthis.pojedi(0, j);\n\t\t\telse\n\t\t\t\tthis.pomjeri(0, j);\n\t\t}\t\n\t\treturn true;\n\t}",
"public void sumarUnidad() {\r\n\t\tcantidad++;\r\n\t}",
"public int ardiveis() {\n\t\tint result = 0;\n\t\tfor (EstadoAmbiente[] linha : this.quadricula) {\n\t\t\tfor (EstadoAmbiente ea : linha) {\n\t\t\t\tif(ea == EstadoAmbiente.CASA || ea == EstadoAmbiente.TERRENO){\n\t\t\t\t\tresult++;\t\t\t\t \n\t\t\t\t}\t\t\t\t\n\t\t\t}\t\t\t\n\t\t}\n\t\treturn result;\n\t}",
"static void imprimirNodo( NodoBase raiz )\n{\n\tif(\traiz instanceof NodoRepeat\n\t\t||\traiz instanceof NodoLeer\n\t\t||\traiz instanceof NodoEscribir ){\n\t\tSystem.out.println(\"palabra reservada: \"+ raiz.getClass().getName());\n\t}\n\t\n\tif(\traiz instanceof NodoAsignacion )\n\t\tSystem.out.println(\":=\");\n\t\n\tif(\traiz instanceof NodoOperacion ){\n\t\ttipoOp sel=((NodoOperacion) raiz).getOperacion();\n\t\tif(sel==tipoOp.menor)\n\t\t\tSystem.out.println(\"<\"); \n\t\tif(sel==tipoOp.igual)\n\t\t\tSystem.out.println(\"=\");\n\t\tif(sel==tipoOp.mas)\n\t\t\tSystem.out.println(\"+\");\n\t\tif(sel==tipoOp.menos)\n\t\t\tSystem.out.println(\"-\");\n\t\tif(sel==tipoOp.por)\n\t\t\tSystem.out.println(\"*\");\n\t\tif(sel==tipoOp.entre)\n\t\t\tSystem.out.println(\"/\");\n if(sel==tipoOp.mayor)\n\t\t\tSystem.out.println(\">\");\n if(sel==tipoOp.mayorigual)\n\t\t\tSystem.out.println(\">=\");\n if(sel==tipoOp.menorigual)\n\t\t\tSystem.out.println(\"<=\");\n if(sel==tipoOp.diferente)\n\t\t\tSystem.out.println(\"!=\");\n if(sel==tipoOp.and)\n\t\t\tSystem.out.println(\"AND\");\n if(sel==tipoOp.or)\n\t\t\tSystem.out.println(\"OR\");\n \n\t}\n\n\tif(\traiz instanceof NodoValor ){\n if(((NodoValor)raiz).getVint() != null)\n System.out.println(\"NUM, val= \"+ ((NodoValor)raiz).getVint());\n if(((NodoValor)raiz).isVbol()!= null)\n System.out.println(\"BOL, val= \"+ ((NodoValor)raiz).isVbol());\n\t}\n\n\tif(\traiz instanceof NodoIdentificador ){\n\t\tSystem.out.println(\"ID, nombre= \"+ ((NodoIdentificador)raiz).getNombre());\n\t}\n\n}",
"@Override\n\tpublic int compareTo(Object o) {\n\t\tDatum od=(Datum)o;\n\t\tdouble dif=size-od.size;\n\t\tif(dif != 0)\n\t\t\treturn (int)Math.signum(dif);\n\t\treturn id-od.id;\n\t}",
"public void diminuiInSitu(){\n if(quantidade_in_situ>0)\n quantidade_in_situ--;\n else\n return;\n }",
"private void nourrireLePeuple() {\n\t\t\tint totalDepense = (int)((population * 1) + (populationColoniale * 0.8) + ((armee + armeeDeployee()) * nourritureParArmee));\r\n\t\t\tnourriture -= totalDepense;\r\n\t\t\tenFamine = (nourriture > 0) ? false : true;\r\n\t\t}",
"@Test\n\tpublic void test_3_RotacionesDoblesDerechaRemove() {\n\t\tassertTrue(tree.add(2000));\n\t\tassertTrue(tree.add(3000));\n\t\tassertTrue(tree.add(1000));\n\t\tassertTrue(tree.add(3500));\n\t\tassertTrue(tree.add(500));\n\t\tassertTrue(tree.add(2500));\n\t\tassertTrue(tree.add(2700));\n\t\tassertTrue(tree.remove(1000)); // Primera rotación\n\t\tassertTrue(tree.add(2800));\n\t\tassertTrue(tree.remove(2000)); // Segunda rotación\n\t\tassertTrue(tree.add(2900));\n\t\tassertTrue(tree.remove(2500)); // Tercera rotación\n\n\t\t// Comprobamos que se hayan realizado 3 rotaciones dobles a la derecha\n\t\tassertEquals(3, tree.getRotacionesDoblesDerecha());\n\n\t\t// Comprobamos que no se haya hecho ninguna rotación más\n\t\tassertEquals(0, tree.getRotacionesSimplesIzquierda()); \n\t\tassertEquals(0, tree.getRotacionesSimplesDerecha());\n\t\tassertEquals(0, tree.getRotacionesDoblesIzquierda());\n\n\t//\tSystem.out.print(tree.toString());\n\t}",
"@Override\r\n\tprotected boolean puedeExtraer(double monto) {\n\t\treturn ((super.getSaldo() - monto) >= 0) ? true : false;\r\n\t}",
"private boolean chequear(int i) {\r\n \r\n for (int j = 0; j < necesarios[0].length; j++) {\r\n if (disponibles[j] < necesarios[i][j]) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }"
] | [
"0.689728",
"0.6477506",
"0.64536273",
"0.64507955",
"0.637533",
"0.6364493",
"0.6249269",
"0.6232885",
"0.61381346",
"0.6117275",
"0.60871714",
"0.6057276",
"0.60410553",
"0.60226744",
"0.60069543",
"0.59338176",
"0.5932944",
"0.5892288",
"0.5881274",
"0.5869166",
"0.5858281",
"0.5844793",
"0.5836824",
"0.5830183",
"0.5811164",
"0.5784994",
"0.57799655",
"0.57749504",
"0.5770016",
"0.5763534",
"0.5757279",
"0.5716667",
"0.5711124",
"0.5702879",
"0.56859463",
"0.56765556",
"0.5669778",
"0.5668336",
"0.5665583",
"0.5661618",
"0.5636783",
"0.56362617",
"0.5629795",
"0.5628173",
"0.56191134",
"0.5615048",
"0.56085455",
"0.55874205",
"0.5586569",
"0.5582656",
"0.55592793",
"0.55477965",
"0.5544185",
"0.55431235",
"0.5531047",
"0.55253744",
"0.5517912",
"0.551417",
"0.5513539",
"0.5511628",
"0.54999876",
"0.5498885",
"0.54982686",
"0.5496536",
"0.5493923",
"0.5485555",
"0.54824245",
"0.5475111",
"0.54723585",
"0.54716796",
"0.546543",
"0.5464642",
"0.5455759",
"0.54472697",
"0.5442013",
"0.5441516",
"0.54384696",
"0.5436138",
"0.54317033",
"0.54316664",
"0.54313105",
"0.5410657",
"0.540982",
"0.5399282",
"0.53982663",
"0.5391347",
"0.5388734",
"0.53882223",
"0.53863716",
"0.53826404",
"0.5382341",
"0.5379872",
"0.5372074",
"0.5371002",
"0.53669775",
"0.5366321",
"0.5365002",
"0.5363126",
"0.53552234",
"0.5348377"
] | 0.5914125 | 17 |
Nos dice si el nodo tiene un derecho. | public boolean hayDerecho() {
return this.derecho != null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean repetido(int el){\n boolean repe = false;\n NodoDoble current = inicio;\n while(current != null){\n if(current.dato==el){\n repe = true;\n break; \n }else{\n repe = false;\n } \n current = current.siguiente;\n }\n return repe;\n }",
"public boolean restarUno(){\n\t\tif (numero>0){\n\t\t\tnumero--;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"private int verificarRemocao(No no){\n if(no.getDireita()==null && no.getEsquerda()==null)\n return 1;\n if((no.getDireita()==null && no.getEsquerda()!=null) || (no.getDireita()!=null && no.getEsquerda()==null))\n return 2;\n if(no.getDireita() != null && no.getEsquerda() != null)\n return 3;\n else return -1;\n }",
"public boolean ocupadoDcha(Pieza [] pieza) {\n boolean comprobar = false;\r\n for (int i = 0; i < 4; i++) { //borra la pieza para que al comprobar no se encuentre con una celda de la propia pieza\r\n tablero.setTipoPieza(pieza[i].x, pieza[i].y, 0);\r\n }\r\n for (int i = 0; i < 4; i++) {\r\n if (tablero.getTipoPieza()[pieza[i].x][(pieza[i].y) + 1] == 0 && !(pieza[i].y == 9)) { //comprueba si la celda de la derecha está ocupada o es la última\r\n comprobar = false;\r\n } else {\r\n comprobar = true;\r\n dibujarPieza(canvas, pieza); //si está ocupado vuelve a pintar la pieza y devuelve true\r\n return comprobar;\r\n }\r\n }\r\n dibujarPieza(canvas, pieza);//si no está ocupado también vuelve a pintar la pieza\r\n return comprobar;\r\n }",
"private boolean sePuedeColorear(int indice, int color) {\n\t\tint i = 0;\n\t\tboolean sePuede = true;\n\t\tif (nodos.get(indice).getColor() != 0) // si el nodo fue coloreado\n\t\t\tsePuede = false;\n\t\twhile (i < cantNodos && sePuede) {\n\t\t\t// Si hay un nodo adyacente con ese color, no se puede colorear. Si el nodo fue\n\t\t\t// coloreado tampoco se puede.\n\t\t\tif (nodos.get(i).getColor() == color && i != indice) {\n\t\t\t\tif (esAdyacente(nodos.get(i).getNumero() - 1, nodos.get(indice).getNumero() - 1))\n\t\t\t\t\tsePuede = false;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn sePuede;\n\t}",
"public static int cantNodosHojas(Nodo raiz)\r\n {\r\n if(raiz == null)\r\n {\r\n return 0;\r\n }\r\n else if(raiz.ramaDerecha == null && raiz.ramaIzquierda == null)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return (cantNodosHojas(raiz.subArbolIzquierdo())) + (cantNodosHojas(raiz.subArbolDerecho()));\r\n }\r\n }",
"public void testDecisionEnPasillosSeguirDerecho(){\r\n\t\tdireccionActual = Direccion.ABAJO;\r\n\t\tDireccion futura = cazar.haciaDondeIrDesdeUnaPosicionHastaOtraConDireccionActual(destino, uno, direccionActual);\r\n\t\tassertEquals(futura,Direccion.ABAJO);\r\n\r\n\t\tdireccionActual = Direccion.ARRIBA;\r\n\t\tfutura = cazar.haciaDondeIrDesdeUnaPosicionHastaOtraConDireccionActual(destino, cuatro, direccionActual);\r\n\t\tassertEquals(futura,Direccion.ARRIBA);\r\n\r\n\t\tdireccionActual = Direccion.IZQUIERDA;\r\n\t\tfutura = cazar.haciaDondeIrDesdeUnaPosicionHastaOtraConDireccionActual(destino, nueve, direccionActual);\r\n\t\tassertEquals(Direccion.IZQUIERDA,futura);\t\t\r\n\t}",
"public boolean potezDesno() {\n\t\t//koordinate glave\n\t\tint i = this.zmija.get(0).i;\n\t\tint j = this.zmija.get(0).j;\n\t\t\n\t\tthis.smjer ='d';\n\t\t\n\t\tif (j+1 < this.sirinaTable) {\n\t\t\tif ((this.tabla[i][j+1] == '#')||(this.tabla[i][j+1] == 'o')) \n\t\t\t\treturn false;\n\t\t\telse if (this.tabla[i][j+1] == '*') \n\t\t\t\tthis.pojedi(i, j+1);\n\t\t\telse \n\t\t\t\tthis.pomjeri(i, j+1);\n\t\n\t\t}\n\t\telse if (j+1 == this.sirinaTable) {\n\t\t\tif ((this.tabla[i][0] == '#')||(this.tabla[i][0] == 'o')) \n\t\t\t\treturn false;\n\t\t\telse if (this.tabla[i][0] == '*') \n\t\t\t\tthis.pojedi(i, 0);\n\t\t\telse \n\t\t\t\tthis.pomjeri(i, 0);\n\t\t}\n\t\treturn true;\n\t\t\t\n\t}",
"public boolean esDeterministico(){\n NodoA x, y;\n x = primerElemento();\n y = x.getLigaDer();\n boolean bandera = true;\n while(x != cabeza){\n while(y != cabeza){\n if(y.getSimbolo().equals( x.getSimbolo())){\n \n if(!listaND.contains(x)){\n listaND.add(x);\n }\n \n bandera= false;\n }\n y = y.getLigaDer();\n }\n \n x = x.getLigaDer();\n y = x.getLigaDer();\n \n \n }\n \n return bandera;\n \n }",
"public void setNodoDerecho(Nodo nodo){\n der = nodo;\n }",
"public boolean tieneDinero(int precioEntrada){\r\n return this.dinero >= precioEntrada;\r\n }",
"public boolean completed(){\n int count = 0;\n for(int Y=0; Y<size; Y++){\n for(int X=0; X<size; X++){\n if(tiles[X][Y] instanceof EindVeld){\n EindVeld tmp = (EindVeld)tiles[X][Y];\n if(tmp.hasDoos())\n count++;\n }\n }\n }\n \n if(eindVelden == count){\n System.out.println(\"DOOLHOF COMPLEET !!!\");\n return true;\n }else{\n return false;\n }\n }",
"private boolean comparacionOblicuaDI (String [] dna){\n int largo=3, repaso=1, aux=0, contador=0, fila, columna;\n boolean repetir;\n char caracter;\n do {\n do {\n repetir=true;\n if(repaso==1){\n fila=0;\n columna=largo + aux;\n }else{\n fila=dna.length-1-largo-aux;\n columna=dna.length-1;\n }\n\n caracter = dna[fila].charAt(columna);\n\n for (int i = 1; i <= (largo+aux); i++) {\n int colum=columna-i;\n int fil=fila+i;\n if((colum==dna.length-2 && fil==1) && repaso==1){\n repetir=false;\n break;\n }\n if (caracter != dna[fil].charAt(colum)) {\n contador = 0;\n\n if(((dna.length-largo)>(colum) && repaso==1) || ((dna.length-largo)<=(fil) && repaso!=1)){\n if((fil+colum)==dna.length-1){\n repetir=false;\n }\n break;\n }\n caracter = dna[fil].charAt(colum);\n\n } else {\n contador++;\n }\n if (contador == largo) {\n cantidadSec++;\n if(cantidadSec>1){\n return true;\n }\n if((fil+colum)==dna.length-1){\n repetir=false;\n }\n break;\n }\n }\n aux++;\n } while (repetir);\n repaso--;\n aux=0;\n\n }while(repaso>=0);\n return false;\n }",
"protected boolean colaLlena() {\r\n return fin == datos.length - 1;\r\n }",
"private boolean es_delDia(Lote unLote) {\n boolean ok = false;\n\n if (unLote != null) {\n Calendar hoy = Calendar.getInstance();\n Calendar fechaLote = Calendar.getInstance();\n fechaLote.setTime(unLote.getFechaLote());\n if (hoy.get(Calendar.DAY_OF_YEAR) == fechaLote.get(Calendar.DAY_OF_YEAR)) {\n ok = true;\n }\n }\n return ok;\n }",
"private boolean diaHabilDomingoPlacaA(int diaActual){\n\t\treturn diaActual == DOMINGO;\n\t}",
"public int EliminarNodo() {\r\n int auxiliar = UltimoValorIngresado.informacion;\r\n UltimoValorIngresado = UltimoValorIngresado.siguiente;\r\n tamaño--;\r\n return auxiliar;\r\n }",
"public boolean esConexo() {\n\t\tboolean result = true;\n\t\tint indice = 0;\n\t\tBusquedaEnProfundidad busqueda = new BusquedaEnProfundidad(this, 0);\n\n\t\twhile (result && indice < cantNodos) {\n\t\t\tif (!busqueda.estaVisitado(indice))\n\t\t\t\tresult = false;\n\t\t\tindice++;\n\t\t}\n\n\t\treturn result;\n\t}",
"private boolean comparacionOblicuaID(String[] dna) {\n boolean repetir;\n int aux = 0;\n final int CASO = 3;\n int largo = dna.length - CASO - 1;\n int repaso = 1, fila,columna;\n do {\n do {\n repetir = true;\n if (repaso == 1) {\n fila = 0;\n columna = largo - aux;\n } else {\n fila = largo - aux;\n columna = 0;\n }\n for (int i = 0; i <= (CASO + aux); i += 2) {\n int colum = columna + i;\n int fil = fila + i;\n if ((colum) == (fil) && repaso == 1) {\n repetir = false; break;\n }\n if (((dna.length-CASO)>=colum && repaso==1) || ((dna.length-CASO)>=fil && repaso==0)) {\n if (dna[fil].charAt(colum) == dna[fil + 2].charAt(colum + 2)) {\n if (dna[fil].charAt(colum) == dna[fil + 1].charAt(colum + 1)) {\n if (((fil - 1) >= 0 && (colum - 1) >= 0) && (dna[fil].charAt(colum) == dna[fil - 1].charAt(colum - 1))) {\n cantidadSec++;\n if(cantidadSec>1)return true;\n if (colum == fil) repetir = false;\n break;\n } else {\n if (((dna.length - CASO+1) >= (colum + 3) && repaso == 1) || ((dna.length-1) >= (fil + 3) && repaso == 0)) {\n if ((dna[fil].charAt(colum) == dna[fil + 3].charAt(colum + 3))) {\n cantidadSec++;\n if(cantidadSec>1)return true;\n if (colum == fil) repetir = false;\n break;\n }\n }\n }\n }\n }\n } else {\n if (colum == fil) repetir = false;\n }\n }\n aux++;\n } while (repetir);\n repaso--;\n aux = 0;\n } while (repaso >= 0);\n return false;\n }",
"protected T buscarSucesorInOrden(NodoBinario<T> hijoDerecho) {\n if (NodoBinario.esNodoVacio(hijoDerecho.getHijoIzquierdo())) {\n return hijoDerecho.getDato(); //si no tiene mas que ir por la izquierda retorna su dato\n } else {\n return buscarSucesorInOrden(hijoDerecho.getHijoIzquierdo()); //todo izquierda\n }\n }",
"private boolean correcto() {\r\n return (casillas.size()>numCasillaCarcel); //&&tieneJuez\r\n }",
"public int pedirElemento(){\n int opcion = -1;\n\n do {\n Lib.limpiarPantalla();\n System.out.println(\"Cual elemento quieres alquilar?\");\n System.out.println(\"1. Nueva pelicula\");\n System.out.println(\"2. Nuevo Videojuego\");\n System.out.println(\"0. Cancelar\\n\");\n System.out.println(\"Elija una opción: \");\n try {\n opcion = Integer.parseInt(Lib.lector.nextLine());\n if (opcion < 0 || opcion > 2) {\n System.out.println(\"Elija una opción del menú [0-2]\");\n Lib.pausa();\n }\n } catch (NumberFormatException nfe) {\n System.out.println(\"Solo números por favor\");\n Lib.pausa();\n }\n } while (opcion < 0 || opcion > 2);\n return opcion;\n\n }",
"public boolean potezDole() {\n\t\t//koordinate glave\n\t\tint i = this.zmija.get(0).i;\n\t\tint j = this.zmija.get(0).j;\n\t\t\n\t\tthis.smjer ='s';\n\t\t\n\t\tif (i+1 < this.visinaTable) {\n\t\t\tif ((this.tabla[i+1][j] == '#')||(this.tabla[i+1][j] == 'o')) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse if (this.tabla[i+1][j] == '*') {\n\t\t\t\t\n\t\t\t\tthis.pojedi(i+1, j);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\n\t\t\t\tthis.pomjeri(i+1, j);\n\n\t\t\t}\n\t\t}\n\t\telse if (i+1 == this.visinaTable) {\n\t\t\tif ((this.tabla[0][j] == '#')||(this.tabla[0][j] == 'o'))\n\t\t\t\treturn false;\n\t\t\telse if (this.tabla[0][j] == '*')\n\t\t\t\tthis.pojedi(0, j);\n\t\t\telse\n\t\t\t\tthis.pomjeri(0, j);\n\t\t}\t\n\t\treturn true;\n\t}",
"public void testDecisionEnPasillosDondeLoMejorSeriaVolverHaciaAtrasPeroDebeSeguirDerecho(){\r\n\t\tdireccionActual = Direccion.ABAJO;\r\n\t\tDireccion futura = cazar.haciaDondeIrDesdeUnaPosicionHastaOtraConDireccionActual(destino, cuatro, direccionActual);\r\n\t\tassertNotSame(Direccion.ARRIBA, futura);\r\n\r\n\t\tdireccionActual = Direccion.ARRIBA;\r\n\t\tfutura= cazar.haciaDondeIrDesdeUnaPosicionHastaOtraConDireccionActual(destino, cuatro, direccionActual);\r\n\t\tassertNotSame(Direccion.ABAJO, futura);\r\n\r\n\t\tdireccionActual = Direccion.DERECHA;\r\n\t\tfutura= cazar.haciaDondeIrDesdeUnaPosicionHastaOtraConDireccionActual(destino, ocho, direccionActual);\r\n\t\tassertNotSame(Direccion.IZQUIERDA, futura);\r\n\t}",
"private int contar(String nombre) {\n int c = 0;\n for (Nodo<Integer, Reservacion> th1 : this.th) {\n if (th1 != null && th1.value.Cliente().equals(nombre)) {\n c++;\n }\n }\n return c;\n }",
"private static boolean nivelPasado() {\r\n\t\tint[] contPelotas = new int[ COLORES_POSIBLES.length ]; // Contadores por color\r\n\t\tfor (int i=0; i<tablero.size(); i++) {\r\n\t\t\tPelota pelota = tablero.getPelota(i);\r\n\t\t\tint contColor = Arrays.asList(COLORES_POSIBLES).indexOf( pelota.getColor() ); // Posición del color de la pelota en el array de contadores\r\n\t\t\tcontPelotas[contColor]++;\r\n\t\t}\r\n\t\tfor (int contador : contPelotas) if (contador>=tamanyoTablero-2) return false;\r\n\t\treturn true;\r\n\t}",
"public void setDerecho(Nodo<T> derecho) {\n\t\tthis.derecho = derecho;\n\t}",
"@Override\r\n\tprotected boolean puedeExtraer(double monto) {\n\t\treturn ((super.getSaldo() - monto) >= 0) ? true : false;\r\n\t}",
"public void testDecisionEnPasillosDoblar(){\r\n\t\tdireccionActual = Direccion.ARRIBA;\r\n\t\tDireccion futura = cazar.haciaDondeIrDesdeUnaPosicionHastaOtraConDireccionActual(destino, cinco, direccionActual);\r\n\t\tassertEquals(Direccion.DERECHA,futura);\r\n\r\n\t\tdireccionActual = Direccion.IZQUIERDA;\r\n\t\tfutura=cazar.haciaDondeIrDesdeUnaPosicionHastaOtraConDireccionActual(destino, cinco, direccionActual);\r\n\t\tassertEquals(Direccion.ABAJO,futura);\r\n\t\t\r\n\t\tdireccionActual = Direccion.IZQUIERDA;\r\n\t\tfutura = cazar.haciaDondeIrDesdeUnaPosicionHastaOtraConDireccionActual(destino, tres, direccionActual);\r\n\t\tassertEquals(Direccion.ARRIBA, futura);\r\n\t\t\r\n\t\tdireccionActual = Direccion.DERECHA;\r\n\t\tfutura = cazar.haciaDondeIrDesdeUnaPosicionHastaOtraConDireccionActual(destino, seis, direccionActual);\r\n\t\tassertEquals(Direccion.ARRIBA, futura);\r\n\t}",
"private Nodo eliminarNodo(Nodo aux, int dato) {\n\t\tif(aux == null) { \r\n\t\t\tSystem.out.println(\"El nodo no se encontro\");\r\n\t\t}else if(dato < aux.getDato()) { // Se busca el dato por el lado izquierdo.\r\n\t\t\tNodo izq = eliminarNodo(aux.getHijoIzq(), dato);\r\n\t\t\taux.setHijoIzq(izq);\r\n\t\t}else if (dato > aux.getDato()) { // Se busca el dato por el lado derecho.\r\n\t\t\tNodo der = eliminarNodo(aux.getHijoDer(), dato);\r\n\t\t\taux.setHijoIzq(der);\r\n\t\t}else { // Un vez encontrado se ejecuta el else.\r\n\t\t\tNodo n = aux; \r\n\t\t\tif(n.getHijoDer() == null) {// si el nodo del lado derecho es igual null se captura el nodo izquierdo.\r\n\t\t\t\taux = n.getHijoIzq(); \r\n\t\t\t}else if (n.getHijoIzq() == null) {// si el nodo del lado izquierdo es igual null se captura el nodo izquierdo.\r\n\t\t\t\taux = n.getHijoDer();\r\n\t\t\t}else { // Si el nodo a eliminar tiene dos hijos entonces hacemos cambiamos los lugaresa para despues eliminarlo. \r\n\t\t\t\tn = cambiar(n);\r\n\t\t\t}\r\n\t\t\tn = null; // ELiminamos el nodo.\r\n\t\t}\r\n\t\treturn aux;\r\n\t}",
"public void ingresarDinero() {\n\t\tString codigo=\"\";\n\t\tint din=1;\n\t\tint saldo=0;\n\t\tint cambio=0;\n\t\t\n\t\tArrayList<Integer> dinero = new ArrayList<Integer>();\n\t\t\n\t\tSystem.out.println(\"digite el codigo del producto\");\n\t\tcodigo=leer.dato();\n\t\t\n\t\tif(cU.buscarProducto(codigo)!=null){\n\t\t\tproducto=cU.buscarProducto(codigo);\n\t\t\tSystem.out.println(\"el producto encontrado fue\"+producto);\n\t\t\n\t\t\n\t\twhile(din!=0){\n\t\t\t\n\t\t\tSystem.out.println(\"digite la denominacion o 0 si ya completo el dinero\");\n\t\t\tdin=leer.datoInt();\n\t\t\t\n\t\t\tif(din!=0){\n\t\t\t\tdinero.add(din);\n\t\t\t\tsaldo=saldo+din;\n\t\t\t}\n\t\t\tSystem.out.println(\"saldo\"+saldo);\n\t\t\t\n\t\t}\n\t\t\n\t\tcambio=cU.ingresarSaldo(dinero, codigo);\n\t\tif(cambio>=0){\n\t\tSystem.out.println(\"el valor del producto es: \"+producto.getValor());\n\t\tSystem.out.println(\"su saldo era de: \"+saldo);\n\t\tSystem.out.println(\"el cambio es: \"+cambio);\n\t\t}else{\n\t\t\tSystem.out.println(\"el valor del producto es: \"+producto.getValor());\n\t\t\tSystem.out.println(\"saldo\"+saldo);\n\t\t\tSystem.out.println(\"fondos insufucientes para comprar el producto\");\n\t\t}\n\t\t}else{\n\t\t\tSystem.out.println(\"producto no encontrado\");\n\t\t}\n\t\tif(cambio==saldo){\n\t\t\tSystem.out.println(\"denominacion ingresada no valida\");\n\t\t}\n\t}",
"public void testDecisionDeDarLaVueltaSiNoHaySalida(){\r\n\t\tdireccionActual = Direccion.ARRIBA;\r\n\t\tDireccion futura = cazar.haciaDondeIrDesdeUnaPosicionHastaOtraConDireccionActual(destino, uno, direccionActual);\r\n\t\tassertEquals(Direccion.ABAJO, futura);\r\n\r\n\t\tdireccionActual = Direccion.DERECHA;\r\n\t\tfutura= cazar.haciaDondeIrDesdeUnaPosicionHastaOtraConDireccionActual(destino, siete, direccionActual);\r\n\t\tassertEquals(Direccion.IZQUIERDA, futura);\r\n\t}",
"private int buscarPosicionDeDatoEnRecorrido(List<T> recorridoInOrden, T datoDelNodoActual) {\n int posicionDelDatoEnelRecorridoInOrden = 0;\n int i = 0;\n while ((i < recorridoInOrden.size()) && (posicionDelDatoEnelRecorridoInOrden == 0)) {\n T datoSacadoDeLaLista = recorridoInOrden.get(i);\n if (datoSacadoDeLaLista.compareTo(datoDelNodoActual) == 0) {\n posicionDelDatoEnelRecorridoInOrden = i;\n }\n i++;\n }\n return posicionDelDatoEnelRecorridoInOrden;\n }",
"public boolean eliminarNodo(int edad){\n if(!estaVacia()){\n if(fin==inicio && edad==inicio.edad){\n inicio=fin=null;\n }else if(edad==inicio.edad){\n inicio=inicio.siguiente;\n }else{\n Nodo anterior,temporal;\n anterior=inicio;\n temporal=inicio.siguiente;\n while(temporal!=null && temporal.edad!=edad){\n anterior=anterior.siguiente;\n temporal=temporal.siguiente;\n }\n if(temporal!=null){\n anterior.siguiente=temporal.siguiente;\n if(temporal==fin){\n fin=anterior;\n }\n }else{\n return false;\n }\n }\n return true;\n }else{\n return false;\n }\n }",
"public void movimentar_dragao(int pos) {\n\t\tint check = 0;\n\t\tint counter = 0; //After 1000 tries it means that the dragon is trapped and cant move either way\n\t\twhile (check == 0 && counter < 1000) {\n\t\t\tint random = 1 + (int)(Math.random()*4);\n\t\t\tif (random == 1) {\n\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()+1][dragoes[pos].getY_coord()] != 'X' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()+1][dragoes[pos].getY_coord()] != 'S' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()+1][dragoes[pos].getY_coord()] != 'D' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()+1][dragoes[pos].getY_coord()] != 'd' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()+1][dragoes[pos].getY_coord()] != 'O') {\n\t\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()] == 'F')\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), 'E');\n\t\t\t\t\telse\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), ' ');\n\t\t\t\t\tdragoes[pos].setX_coord(dragoes[pos].getX_coord()+1);\n\t\t\t\t\tcheck = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (random == 2) {\n\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()-1][dragoes[pos].getY_coord()] != 'X' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()-1][dragoes[pos].getY_coord()] != 'S' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()-1][dragoes[pos].getY_coord()] != 'D' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()-1][dragoes[pos].getY_coord()] != 'd' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()-1][dragoes[pos].getY_coord()] != 'O') {\n\t\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()] == 'F')\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), 'E');\n\t\t\t\t\telse\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), ' ');\n\t\t\t\t\tdragoes[pos].setX_coord(dragoes[pos].getX_coord()-1);\n\t\t\t\t\tcheck = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (random == 3) {\n\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()-1] != 'X' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()-1] != 'S' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()-1] != 'D' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()-1] != 'd' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()-1] != 'O') {\n\t\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()] == 'F')\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), 'E');\n\t\t\t\t\telse\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), ' ');\n\t\t\t\t\tdragoes[pos].setY_coord(dragoes[pos].getY_coord()-1);\n\t\t\t\t\tcheck = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()+1] != 'X' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()+1] != 'S' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()+1] != 'D' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()+1] != 'd' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()+1] != 'O') {\n\t\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()] == 'F')\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), 'E');\n\t\t\t\t\telse\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), ' ');\n\t\t\t\t\tdragoes[pos].setY_coord(dragoes[pos].getY_coord()+1);\n\t\t\t\t\tcheck = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcounter++;\n\t\t}\n\t}",
"public boolean darPerdio(){\r\n\t\treturn perdio;\r\n\t}",
"public boolean prestamo(){\n boolean prestado = true;\n if (cantPres < cantLibro) {\n cantPres++;\n } else {\n prestado = false;\n }\n return prestado;\n }",
"public static int seleccionarCarro(Mano[] jug){//error no vio la 0,0\n int numeroDoble=6;\n int toret=0;\n while(numeroDoble>=0){\n int n=0;\n while(n<jug.length){\n int f=0;\n while( f<jug[n].getNPiezas() && \n (jug[n].getUnaPieza(f).getN1()!=numeroDoble || jug[n].getUnaPieza(f).getN2()!=numeroDoble))\n f++;\n \n if(f<jug[n].getNPiezas()){\n System.out.println(\"Encontrada la \"+numeroDoble+\",\"+numeroDoble\n +\", la tiene él jugador \"+(n+1)+\" y el tiene \"\n + \"el primer turno\");\n toret=n;\n numeroDoble=-10;\n \n }\n n++;\n }\n numeroDoble-=1;\n }\n if(numeroDoble==-1){\n toret=(int) (Math.random()*jug.length);\n System.out.println(\"No se ha encontrado ningun jugador con alguna pieza doble.\\n\"\n + \"Empieza el jugador \"+toret);\n }\n return toret;\n }",
"boolean potvrdiUnos(){\r\n\t\tboolean odluka = false;\r\n\t\tboolean test = true;\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\t//trazenje od korisnika da odabere opciju\r\n\t\tdo{\r\n\t\t\tSystem.out.println(\"Izvrsiti?(DA/NE)\");\r\n\t\t\tString karakter = in.next();\r\n\t\t\tif(karakter.equals(\"DA\") || karakter.equals(\"da\")){\r\n\t\t\t\todluka = true;\r\n\t\t\t\ttest = false;\r\n\t\t\t}\r\n\t\t\tif(karakter.equals(\"NE\") || karakter.equals(\"ne\")){\r\n\t\t\t\ttest = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}while(test);\r\n\t\treturn odluka;\r\n\t}",
"@Test\n\tpublic void test_3_RotacionesDoblesDerechaRemove() {\n\t\tassertTrue(tree.add(2000));\n\t\tassertTrue(tree.add(3000));\n\t\tassertTrue(tree.add(1000));\n\t\tassertTrue(tree.add(3500));\n\t\tassertTrue(tree.add(500));\n\t\tassertTrue(tree.add(2500));\n\t\tassertTrue(tree.add(2700));\n\t\tassertTrue(tree.remove(1000)); // Primera rotación\n\t\tassertTrue(tree.add(2800));\n\t\tassertTrue(tree.remove(2000)); // Segunda rotación\n\t\tassertTrue(tree.add(2900));\n\t\tassertTrue(tree.remove(2500)); // Tercera rotación\n\n\t\t// Comprobamos que se hayan realizado 3 rotaciones dobles a la derecha\n\t\tassertEquals(3, tree.getRotacionesDoblesDerecha());\n\n\t\t// Comprobamos que no se haya hecho ninguna rotación más\n\t\tassertEquals(0, tree.getRotacionesSimplesIzquierda()); \n\t\tassertEquals(0, tree.getRotacionesSimplesDerecha());\n\t\tassertEquals(0, tree.getRotacionesDoblesIzquierda());\n\n\t//\tSystem.out.print(tree.toString());\n\t}",
"public int puntoUno() {\n int contador = 0;\n for (int i = 0; i < jugadores.length; i++) {\n if (jugadores[i] != null && jugadores[i].getCantPartidosJugados() > 10) {\n contador++;\n }\n }\n return contador;\n }",
"public static int check() {\r\n\t\tint num = 0;\r\n\t\tdo {\r\n\t\t\ttry {\r\n\t\t\t\tnum = input.nextInt();\t\t\t// unos \r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcatch (Exception e) {\t\t\t\t// hvatanje greske\r\n\t\t\t\tSystem.out.println(\"Pogresan unos, probajte ponovo\");\r\n\t\t\t\tinput.nextLine();\r\n\t\t\t}\r\n\t\t} while (true);\r\n\t\treturn num;\r\n\t}",
"@Test\n\tpublic void testDarMotivoIngreso()\n\t{\n\t\tassertEquals(\"El motivo de ingreso esperado es: Accidente\", Motivo.ACCIDENTE, paciente.darMotivoIngreso());\n\t}",
"public boolean dniCorrecto() {\r\n\t\treturn dniCorrecto(this.dni);//Llama al metodo estatico pasando como parametro el atributo dni\r\n\t}",
"public boolean souvislost(){\n\t\t\n\t\tif(pole.size() != pocetVrcholu){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t\t\n\t}",
"boolean insertar(Nodo_B nuevo){\n if(this.primero == null){\n this.primero = nuevo;\n this.ultimo = nuevo;\n size ++;\n return true;\n }else{\n if(this.primero == this.ultimo){ // -------------------------solo hay un nodo \n if(nuevo.valor < this.primero.valor){\n nuevo.siguiente = this.primero;\n this.primero.anterior = nuevo;\n this.primero.izq = nuevo.der; // -----cambia los punteros a las paginas\n this.primero = nuevo;\n size++; \n return true;\n }else if(nuevo.valor > this.ultimo.valor){\n this.ultimo.siguiente = nuevo;\n nuevo.anterior = this.ultimo;\n this.ultimo.der = nuevo.izq; //------ cambia los punteros a las paginas \n this.ultimo = nuevo;\n size++; \n return true;\n }else{\n System.out.println (\"ya hay un destino con ese codigo registrado\");\n return false;\n }\n }else{ // ---------------------------------------------------hay mas de un nodo\n if(nuevo.valor < this.primero.valor){\n nuevo.siguiente = this.primero;\n this.primero.anterior = nuevo;\n this.primero.izq = nuevo.der; // -----cambia los punteros a las paginas\n this.primero = nuevo;\n size++; \n return true;\n }else if(nuevo.valor > this.ultimo.valor){\n this.ultimo.siguiente = nuevo;\n nuevo.anterior = this.ultimo;\n this.ultimo.der = nuevo.izq; //------ cambia los punteros a las paginas \n this.ultimo = nuevo;\n size++; \n return true;\n }else{\n Nodo_B pivote = this.primero;\n while(pivote != null){\n if(nuevo.valor < pivote.valor){\n nuevo.siguiente = pivote;\n nuevo.anterior = pivote.anterior;\n //--------------------------- cambia los punteros a las paginas\n pivote.izq = nuevo.der;\n pivote.anterior.der = nuevo.izq;\n //-----------------------------------------------------------\n pivote.anterior.siguiente = nuevo;\n pivote.anterior = nuevo;\n size++;\n return true;\n }else if(nuevo.valor == pivote.valor){\n System.out.println (\"ya hay un destino con ese codigo registrado\");\n return false;\n }else{\n pivote = pivote.siguiente;\n }\n }\n }\n }\n }\n return false;\n }",
"public boolean verificaNumero() {\n if (contemSomenteNumeros(jTextFieldDeposita.getText()) || contemSomenteNumeros(jTextFieldSaca.getText())\n || contemSomenteNumeros(jTextFieldTransfere.getText())) {\n return true;\n } else {\n JOptionPane.showMessageDialog(this, \"Digite somente números, por favor. \", \"Atenção !!\", JOptionPane.ERROR_MESSAGE);\n return false;\n }\n }",
"private boolean distanciaPuntos(int x, int y, int di){\r\n\t\tdouble distancia = Math.sqrt((x-this.x)*(x-this.x) + (y-this.y)*(y-this.y));\r\n\t\treturn distancia <= (di+this.diameter);\r\n\t}",
"public Nodo getNodoDerecho(){\n return der;\n }",
"public boolean estaEnLaLista(int edad){\n Nodo temporal = inicio;\n while(temporal.siguiente!=null && temporal.edad!=edad){\n temporal=temporal.siguiente;\n }\n return (temporal.siguiente!=null);\n }",
"private int getNumberOfNodesRec(int contador, Node<T> nodo) {\r\n\t\tcontador++;// Si este metodo entra es porque entro a un nodo por lo que\r\n\t\t\t\t\t// se suma 1\r\n\t\tif (nodo.getChildren() != null) {// Si tiene hijos\r\n\t\t\tList<Node<T>> lista = nodo.getChildren();// Hijos\r\n\t\t\tfor (int i = 1; i <= lista.size(); i++) {\r\n\t\t\t\tcontador = getNumberOfNodesRec(contador, lista.get(i));// Recursividad\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn contador;\r\n\t}",
"public void dividirDineroGobierno() {\n\n double dineroDividible = super.getMundo().getGobierno().getCapitalEconomico() / 2;\n double dineroPorPersona = super.getMundo().contarPersonas();\n\n if (dineroDividible > 0) {\n\n super.getMundo().gobiernoDarDinero(dineroDividible);\n\n for (Persona p : super.getMundo().getListaDoctores())\n p.ganarDinero(dineroPorPersona);\n for (Persona p : super.getMundo().getListaCocineros())\n p.ganarDinero(dineroPorPersona);\n for (Persona p : super.getMundo().getListaAlbaniles())\n p.ganarDinero(dineroPorPersona);\n for (Persona p : super.getMundo().getListaHerreros())\n p.ganarDinero(dineroPorPersona);\n for (Persona p : super.getMundo().getListaCocineros())\n p.ganarDinero(dineroPorPersona);\n for (Persona p : super.getMundo().getListaDoctores())\n p.ganarDinero(dineroPorPersona);\n for (Persona p : super.getMundo().getListaCocineros())\n p.ganarDinero(dineroPorPersona);\n for (Persona p : super.getMundo().getListaAlbaniles())\n p.ganarDinero(dineroPorPersona);\n for (Persona p : super.getMundo().getListaHerreros())\n p.ganarDinero(dineroPorPersona);\n for (Persona p : super.getMundo().getListaCocineros())\n p.ganarDinero(dineroPorPersona);\n }\n }",
"public boolean SiguienteBodega(){\n if(!lista_inicializada){\n Nodo_bodega_actual = Nodo_bodega_inicial;\n lista_inicializada = true;\n if(Size>0){\n return true;\n }\n }\n \n if(Size > 1 ){\n if(Nodo_bodega_actual.obtenerSiguiente()!= null){\n Nodo_bodega_actual = Nodo_bodega_actual.obtenerSiguiente();\n return true;\n } \n }\n return false;\n }",
"public boolean tienePapel()\n {\n //COMPLETE\n return this.hojas > 0;\n }",
"@Test\n\tpublic void test_3_RotacionesSimplesDerechaHijoEquilibrado() {\n\t\tassertTrue(tree.add(2000));\n\t\tassertTrue(tree.add(3000));\n\t\tassertTrue(tree.add(1000));\n\t\tassertTrue(tree.add(500));\n\t\tassertTrue(tree.add(4000));\n\t\tassertTrue(tree.add(2500));\n\t\tassertTrue(tree.remove(500));\n\t\tassertTrue(tree.remove(1000));\t// Primera rotación\n\t\tassertTrue(tree.remove(2500));\n\t\tassertTrue(tree.add(3500));\n\t\tassertTrue(tree.add(4500));\n\t\tassertTrue(tree.remove(2000)); // Segunda rotación\n\t\tassertTrue(tree.remove(3500));\n\t\tassertTrue(tree.add(4400));\n\t\tassertTrue(tree.add(4700));\n\t\tassertTrue(tree.remove(3000)); // Tercera rotación\n\t\t\n\t\t\n//\t\t System.out.print(tree.toString());\n\n\t\t// Comprobamos que se hayan realizado 3 rotaciones simples a la derecha\n\t\tassertEquals(3, tree.getRotacionesSimplesDerecha());\n\n\t\t// Comprobamos que no se haya hecho ninguna rotación más\n\t\tassertEquals(0, tree.getRotacionesSimplesIzquierda());\n\t\tassertEquals(0, tree.getRotacionesDoblesDerecha());\n\t\tassertEquals(0, tree.getRotacionesDoblesIzquierda());\n\n\t\t\n\t}",
"public int cantHijosIzquierdos() {\n if (NodoBinario.esNodoVacio(this.raiz)) {\n return 0;\n }\n int cantHijosIzq = 0;\n Queue<NodoBinario<T>> colaDeNodos = new LinkedList<>();\n colaDeNodos.offer(this.raiz);\n while (!colaDeNodos.isEmpty()) {\n NodoBinario<T> nodoActual = colaDeNodos.poll();\n if (!nodoActual.esHijoIzquiedoVacio()) {\n colaDeNodos.offer(nodoActual.getHijoIzquierdo());\n cantHijosIzq++;\n }\n if (!nodoActual.esHijoDerechoVacio()) {\n colaDeNodos.offer(nodoActual.getHijoDerecho());\n }\n }\n return cantHijosIzq;\n }",
"public void ispisiSveNapomene() {\r\n\t\tint i = 0;// redni broj napomene\r\n\t\tint brojac = 0;\r\n\t\tfor (Podsjetnik podsjetnik : lista) {\r\n\r\n\t\t\ti++;\r\n\t\t\tSystem.out.println(i + \")\" + podsjetnik);\r\n\t\t\tbrojac = i;\r\n\t\t}\r\n\t\tif (brojac == 0) {\r\n\t\t\tSystem.out.println(\"Nema unesenih napomena!!\");\r\n\t\t}\r\n\r\n\t}",
"public static boolean menosONo(){\n Scanner cifra = new Scanner(System.in);\n System.out.println(\"Задание №6. Введите любое число\");\n int number = cifra.nextInt();\n if (number < 0){\n System.out.println(\"Вы ввели отрицательное число.\");\n return true;\n }else\n System.out.println(\"Вы ввели положительное число.\");\n return false;\n }",
"public void hallarPerimetroIsosceles() {\r\n this.perimetro = 2*(this.ladoA+this.ladoB);\r\n }",
"public boolean eDentro(Casella c) { return eDentro(c.riga,c.colonna); }",
"static void imprimirNodo( NodoBase raiz )\n{\n\tif(\traiz instanceof NodoRepeat\n\t\t||\traiz instanceof NodoLeer\n\t\t||\traiz instanceof NodoEscribir ){\n\t\tSystem.out.println(\"palabra reservada: \"+ raiz.getClass().getName());\n\t}\n\t\n\tif(\traiz instanceof NodoAsignacion )\n\t\tSystem.out.println(\":=\");\n\t\n\tif(\traiz instanceof NodoOperacion ){\n\t\ttipoOp sel=((NodoOperacion) raiz).getOperacion();\n\t\tif(sel==tipoOp.menor)\n\t\t\tSystem.out.println(\"<\"); \n\t\tif(sel==tipoOp.igual)\n\t\t\tSystem.out.println(\"=\");\n\t\tif(sel==tipoOp.mas)\n\t\t\tSystem.out.println(\"+\");\n\t\tif(sel==tipoOp.menos)\n\t\t\tSystem.out.println(\"-\");\n\t\tif(sel==tipoOp.por)\n\t\t\tSystem.out.println(\"*\");\n\t\tif(sel==tipoOp.entre)\n\t\t\tSystem.out.println(\"/\");\n if(sel==tipoOp.mayor)\n\t\t\tSystem.out.println(\">\");\n if(sel==tipoOp.mayorigual)\n\t\t\tSystem.out.println(\">=\");\n if(sel==tipoOp.menorigual)\n\t\t\tSystem.out.println(\"<=\");\n if(sel==tipoOp.diferente)\n\t\t\tSystem.out.println(\"!=\");\n if(sel==tipoOp.and)\n\t\t\tSystem.out.println(\"AND\");\n if(sel==tipoOp.or)\n\t\t\tSystem.out.println(\"OR\");\n \n\t}\n\n\tif(\traiz instanceof NodoValor ){\n if(((NodoValor)raiz).getVint() != null)\n System.out.println(\"NUM, val= \"+ ((NodoValor)raiz).getVint());\n if(((NodoValor)raiz).isVbol()!= null)\n System.out.println(\"BOL, val= \"+ ((NodoValor)raiz).isVbol());\n\t}\n\n\tif(\traiz instanceof NodoIdentificador ){\n\t\tSystem.out.println(\"ID, nombre= \"+ ((NodoIdentificador)raiz).getNombre());\n\t}\n\n}",
"public static void OrdenarNumeros(){\n\t\t//Variables\n\t\tint a;\n\t\tint b;\n\t\tint c;\n\t\tString tomar;\n\n\t\tScanner reader = new Scanner(System.in);\n\t\tSystem.out.println(\"Ingrese tres numeros numero\");\n\t\ta=reader.nextInt();\n\t\tb=reader.nextInt();\n\t\tc=reader.nextInt();\n\t\tif(a>b && b>c){\n\t\t\tTexto=a+\",\"+b+\",\"+c;\n\t\t}else if(a>c && c>b){\n\t\t\tTexto=a+\",\"+c+\",\"+b;\n\t\t}else if(b>a && a>c){\n\t\t\tTexto=b+\",\"+a+\",\"+c;\n\t\t}else if(b>c && c>a){\n\t\t\tTexto=b+\",\"+c+\",\"+a;\n\t\t}else if(c>a && a>b){\n\t\t\tTexto=c+\",\"+a+\",\"+b;\n\t\t}else if(c>b && b>a ){\n\t\t\tTexto=c+\",\"+b+\",\"+a;\n\t\t}\n\t\tSystem.out.println(Texto);\n\t\tSystem.out.println(\"Desea regresar al menu anterior?\");\n\t\treader.nextLine();\n\t\ttomar=reader.nextLine();\n\t\tif(tomar.equals(\"si\")){\n\t\t\trepetidor=true;\n\t\t}else{\n\t\t\trepetidor=false;\n\t\t}\n\t}",
"public void gastarDinero(double cantidad){\r\n\t\t\r\n\t}",
"public void Nivel(Nodo nodo){\r\n\t\tif(cont<(int)Math.pow(2,base)){\r\n\t\t\tnodo.setNivel(nivel);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tnivel++;\r\n\t\t\tbase++;\r\n\t\t\tnodo.setNivel(nivel);\r\n\t\t}\r\n\t}",
"private boolean verificarCliente(int cedulaCliente) {\n for (int i = 0; i < posicionActual; i++) { //Recorre hasta la posicon actual en la que se estan agregando datos, osea en la ultima en que se registro.\n if (getCedulaCliente(i) == cedulaCliente) { //Pregunta si la cedula pasada por parametro exite en la posicon que va recorriendo el for actualmente\n return true; //Si la condicion se da, retorna verdadero para informar que si el cliente si se encuentra\n }\n }\n return false; //si al final no encontro ninguna coincidencia retorna falso para avisar que el cliente no se encuentra registrado\n }",
"private boolean caughtEmAll(){\n\t\tint howMany = 1;\n\t\tArrayList<Pokemon> pokedex = theTrainer.getPokedex();\n\t\tCollections.sort(pokedex);\n\t\tfor(int i = 0; i < pokedex.size() - 1; i++){\n\t\t\tif(pokedex.get(i+1).getPokemonID() != pokedex.get(i).getPokemonID()){\n\t\t\t\thowMany++;\n\t\t\t}\n\t\t}\n\t\treturn (howMany == 10);\n\t}",
"@Override\n public int compareTo(MensagemEleicao o) {\n int i = relogio.compareTo(o.relogio);\n if(i==0){ //se a comparação do relogio for igual\n if(id<o.getId()){ //usa o id maior como criterio de decisão;\n return -1;\n }\n return 1;\n }\n return i;\n }",
"public void verificar_que_se_halla_creado() {\n\t\t\n\t}",
"@Override\n public void subida(){\n // si es mayor a la eperiencia maxima sube de lo contrario no\n if (experiencia>(100*nivel)){\n System.out.println(\"Acabas de subir de nivel\");\n nivel++;\n System.out.println(\"Nievel: \"+nivel);\n }else {\n\n }\n }",
"private boolean isPosicaoFerrovia(int posicao) {\n return (posicao == 5 || posicao == 15 || posicao == 25 || posicao == 35);\n }",
"public boolean irAIdentificador(String identificador){\n Nodo_Bodega Temporal = Nodo_bodega_inicial;\n if(Size==0){\n return false;\n }else{\n if(Temporal.obtenerIdentificador().equals(identificador)){\n Nodo_bodega_actual = Temporal;\n return true;\n }\n }\n \n while(Temporal.obtenerSiguiente()!= null){\n Temporal = Temporal.obtenerSiguiente();\n if(Temporal.obtenerIdentificador().equals(identificador)){\n Nodo_bodega_actual = Temporal;\n return true;\n }\n }\n return false;\n }",
"@Override\n public boolean contiene(T dato) {\n return this.buscar(dato) != null;\n }",
"public boolean irAIndice(int indice){\n Nodo_bodega_actual = Nodo_bodega_inicial;\n if(indice == 0 ){\n return true;\n }\n while(SiguienteBodega()){\n if(Nodo_bodega_actual.obtenerIndice()==indice){\n return true;\n }\n }\n return false;\n }",
"public Nodo<T> getDerecho() {\n\t\treturn derecho;\n\t}",
"public int darCantidadSalones()\n {\n return salones.size( );\n }",
"@Test\n public void testGetNumberDieOneTroop() {\n RiskPlayer player = new RiskPlayer(UUID.randomUUID());\n RiskBoard board = new RiskBoard();\n player.conqueredTerritory(TerritoryEnum.GREENLAND);\n board.getTerritory(TerritoryEnum.GREENLAND).changePlayer(player, 1);\n ValidDieDefendAction action = new ValidDieDefendAction(player, board,\n TerritoryEnum.GREENLAND);\n assertTrue(action.getMaxNumberDie() == 1);\n }",
"public void AgregarDeMayorAMenor(int el) throws Exception{\n if(repetido(el)){\n throw new Exception(\"El dato ya existe en la lista!!!\");\n }else{\n /*\n Crear un nodo para el nuevo dato.\n Si la lista esta vacía, o el valor del primer elemento de la lista \n es mayor que el nuevo, insertar el nuevo nodo en la primera posición \n de la lista y modificar la cabecera respectivamente.\n \n */\n NodoDoble newNode = new NodoDoble(el);\n if (estVacia() || inicio.GetDato() == el) {\n newNode.SetSiguiente(inicio);\n inicio = newNode;\n } else {\n /* \n Si no se cumple el caso anterior, buscar el lugar adecuado \n para la inserción: recorrer la lista conservando el nodo actual. \n Inicializar nodo actual con el valor de primera posición, \n y avanzar mientras el siguiente nodo no sea nulo y el dato \n que contiene la siguiente posición sea mayor o igual que \n el dato a insertar.\n */\n NodoDoble current = inicio;//\n while (current.GetSiguiente() != null\n && current.siguiente.GetDato() >= el) {\n current = current.GetSiguiente();\n }\n /*\n Con esto se señala al nodo adecuado, \n a continuación insertar el nuevo nodo a continuación de él.\n */\n newNode.SetSiguiente(current.GetSiguiente());\n current.SetSiguiente(newNode);\n }\n } \n }",
"private void checkPlayersDoneEliminating(int nrDoneEliminating) {\n if (nrDoneEliminating == nrPlayers){\n database.getReference(gameCodeRef).child(\"AllDoneEliminating\").setValue(true);\n database.getReference(gameCodeRef).child(\"PlayersDoneBrainstorming\").setValue(0);\n database.getReference(gameCodeRef).child(\"AllDoneBrainstorming\").setValue(false);\n }\n }",
"public void insert(Nodo nodo) {\r\n\t\tif(cont<7){\r\n\t\t\tif(this.getRaiz() == null) {\r\n\t this.setRaiz(nodo);\r\n\t nodo.setClave(0);\r\n\t return;\r\n\t }\r\n\t \r\n\t Nodo t = this.getRaiz();\r\n\t boolean val = true;\r\n\t while((t != null)&&(val)) {\r\n\t if(t.getLeft() == null) {\r\n\t \tt.setLeft(nodo);\r\n\t \tcont++;\r\n\t \tNivel(nodo);\r\n\t \tval=false;\r\n\t }\r\n\t else if(t.getRight() == null) {\r\n\t t.setRight(nodo);\r\n\t cont++;\r\n\t \tNivel(nodo);\r\n\t val=false;\r\n\t }\r\n\t else {\r\n\t int lCount = countChildren(t.getLeft());\r\n\t int rCount = countChildren(t.getRight());\r\n\t if(lCount == rCount)\r\n\t t = t.getLeft(); \r\n\t \r\n\t else if(lCount == 0 || lCount == 1)\r\n\t t = t.getLeft(); \r\n\t \r\n\t else\r\n\t t = t.getRight();\r\n\t \r\n\t }\r\n\t\r\n\t }\r\n\t\t}\r\n\t}",
"public void carroNoAgregado(){\n System.out.println(\"No hay un parqueo para su automovil\");\n }",
"@Test\n public void nao_deve_aceitar_descricao_com_numeros() {\n telefone.setDescricao(random(10, true, true));\n assertFalse(isValid(telefone, \"A descrição não pode conter acentos, caracteres especiais e números.\", Find.class));\n }",
"public void subirNivelAtaque(){\n\tif(contadorNivel==5){\n\t nivelAtaque++;\n\t System.out.println(\"El ataque \"+obtenerNombreAtaque()+\" ha subido de nivel\");\n\t contadorNivel=0;\n\t dano+=5;\n\t} else {\n\t nivelAtaque=nivelAtaque;\n\t}\n }",
"public boolean hayPadre() {\n return this.padre != null;\n }",
"@Test\n\tpublic void testDeveFalharDeletarUmDocumentoDoBanco() {\n\t\tdouble d = documentoDao.deleteDocumento(50);\n\t\tAssert.assertEquals(0, d, 0.0001);\n\t}",
"public static void nomovecheck(){\n\t\tnomovecount=0;\n\t\tboardcheck(\"x\");\n\t\tboardcheck(\"o\");\n\t}",
"private boolean esDigito(char letra)\n\t{\n\t\t\n\t\tboolean esDigito;\n\t\tswitch (letra) {\n\t\tcase '0':\n\t\t\t esDigito=true;\n\t\t\t break;\n\t\tcase '1':\n\t\t\t esDigito=true;\n\t\t\t break;\n\t\tcase '2':\n\t\t\t esDigito=true;\n\t\t\t break;\n\t\tcase '3':\n\t\t\t esDigito=true;\n\t\t\t break;\n\t\tcase '4':\n\t\t\t esDigito=true;\n\t\t\tbreak;\n\t\tcase '5':\n\t\t\t esDigito=true;\n\t\t\tbreak;\n\t\tcase '6':\n\t\t\t esDigito=true;\n\t\t\tbreak;\n\t\tcase '7':\n\t\t\t esDigito=true;\n\t\t\tbreak;\n\t\tcase '8':\n\t\t\t esDigito=true;\n\t\t\tbreak;\n\t\tcase '9':\n\t\t\t esDigito=true;\n\t\t\tbreak;\n\n\t\tdefault: esDigito = false;\n\t\t\tbreak;\n\t\t}\n\t\n\t\treturn esDigito;\n\t}",
"public void InsertarNodo(int nodo) {\r\n Nodo nuevo_nodo = new Nodo(nodo);\r\n nuevo_nodo.siguiente = UltimoValorIngresado;\r\n UltimoValorIngresado = nuevo_nodo;\r\n tamaño++;\r\n }",
"public boolean existe(int data) {\n NodoRelacion aux = this.first;\n while (aux != null) {\n if (aux.getID_actor() == data) {\n return true;\n }\n aux = aux.getPnext();\n\n }\n return false;\n }",
"private boolean isGameOverAutomatico() {\n\t\tif(this.getEquipesAtivas().size() == 1)\n\t\t\treturn true;\n\t\t\n\t\tboolean temCosmo = false;\n\t\tfor(Equipe equipe : this.getEquipesAtivas()){\n\t\t\tif(equipe.getCosmo() > 0){\n\t\t\t\ttemCosmo = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn !temCosmo;\n\t}",
"public static boolean dcheck() {\n if ((card[0][0] == 0 && card[1][1] == 0 && card[2][2] == 0 && card[3][3] == 0 && card[4][4] == 0) || (card[0][4] == 0 && card[1][3] == 0 && card[2][2] == 0 && card[3][1] == 0 && card[4][0] == 0)) {\n System.out.println(\"BINGO\");\n System.out.println(\"The numbers called is \" + called);\n return true;\n } else {\n return false;\n }\n }",
"public boolean Info_repetida(String nombre_archivo, String nombre_dis_peli) {\r\n boolean disponible = true;\r\n String line;\r\n String[] info;\r\n try (BufferedReader br = new BufferedReader(new FileReader(nombre_archivo))) {\r\n while ((line = br.readLine()) != null) {\r\n info = line.split(\";\");\r\n if (info[0].equals(nombre_dis_peli)) {\r\n disponible = false;\r\n }\r\n }\r\n } catch (IOException ex) {\r\n System.out.println(\"Se despicho\" + ex);\r\n }\r\n return disponible;\r\n }",
"public int getNombreNoeud()\t{\r\n \treturn this.noeuds.size();\r\n }",
"private int cantFantasmasRestantes() {\n // TODO implement here\n return 0;\n }",
"public boolean estDetecteCoteDroit()\r\n\t{\n\t\treturn !this.detecteurDroit.get();\r\n\t}",
"public boolean legalMoveLeft(Dominos domino){\n if(this.isEmpty()){\n return true;\n }\n Dominos hold;\n hold = this.getFirst();\n if(domino.getRightSide() ==0|| domino.getLeftSide() == 0\n || hold.getLeftSide() == 0){\n return true;\n }\n\n if(domino.getRightSide() == hold.getLeftSide()\n || domino.getLeftSide() == hold.getLeftSide()){\n return true;\n }\n return false;\n }",
"public boolean ePedina(int pezzo)\n { return ( (pezzo==PEDINA_BIANCA) || (pezzo==PEDINA_NERA) ); }",
"public void random_dardo(int pos) {\n\t\tint randomX;\n\t\tint randomY;\n\t\twhile (true) {\n\t\t\trandomX = (int)(1 + Math.random()*labirinto.getSize());\n\t\t\trandomY = (int)(1 + Math.random()*labirinto.getSize());\n\t\t\trandomX--;\n\t\t\trandomY--;\n\t\t\tif (labirinto.getLab()[randomX][randomY] == ' ')\n\t\t\t\tbreak;\n\t\t}\n\t\tdardos[pos].setX_coord(randomX);\n\t\tdardos[pos].setY_coord(randomY);\n\t\tchange_dardo_pos(pos);\n\t}",
"public void ordenarXNombre() {\r\n\t\tint random = (int) Math.random() * 3 + 1;\r\n\t\tif(random==1) {\r\n\t\t\tordenarXNombreBurbuja();\r\n\t\t}\r\n\t\telse if(random==2) {\r\n\t\t\tordenarXNombreInsercion();\r\n\t\t}\r\n\t\telse if(random==3) {\r\n\t\t\tordenarXNombreSeleccion();\r\n\t\t}\r\n\t}",
"private boolean jaTemDono(int posicao) {\n String nomeDono = Donos.get(posicao).toString();\n return (this.isUmJogador(nomeDono));\n\n }",
"public int numNodi() {\n\t\treturn this.nodi.size();\n\t}"
] | [
"0.66220903",
"0.653218",
"0.61695194",
"0.6167283",
"0.6149944",
"0.6138432",
"0.61350274",
"0.61081076",
"0.60357136",
"0.60056156",
"0.5974092",
"0.5965524",
"0.5920358",
"0.5909985",
"0.5909533",
"0.59034353",
"0.58709955",
"0.58634573",
"0.58563125",
"0.5844895",
"0.5804354",
"0.5780489",
"0.57707727",
"0.57698107",
"0.57634544",
"0.57495034",
"0.57279867",
"0.5716423",
"0.56893736",
"0.56692773",
"0.56538063",
"0.56394845",
"0.5637299",
"0.563721",
"0.5619558",
"0.5584299",
"0.5570815",
"0.5549376",
"0.55455947",
"0.55399203",
"0.5538521",
"0.5529242",
"0.5523301",
"0.5522258",
"0.5518088",
"0.55161023",
"0.5511166",
"0.55098057",
"0.5500414",
"0.54875046",
"0.5486505",
"0.54691184",
"0.546732",
"0.5458864",
"0.545788",
"0.54578114",
"0.54570824",
"0.545538",
"0.54526615",
"0.545238",
"0.5450183",
"0.5444216",
"0.5432206",
"0.542875",
"0.5427991",
"0.54226136",
"0.5422587",
"0.5415301",
"0.54146653",
"0.5414528",
"0.540574",
"0.5399973",
"0.5399881",
"0.53960943",
"0.5388959",
"0.5381536",
"0.5380905",
"0.5377359",
"0.5373237",
"0.537291",
"0.5370288",
"0.5368304",
"0.53652316",
"0.5360597",
"0.535651",
"0.5352143",
"0.5350081",
"0.53477615",
"0.53472435",
"0.5345949",
"0.5342609",
"0.53407794",
"0.5339924",
"0.53396446",
"0.5334844",
"0.53340197",
"0.5330687",
"0.53301185",
"0.5327377",
"0.5326388"
] | 0.5843832 | 20 |
Regresa la altura del nodo. | public int altura() {
if (this.elemento == null) {
return 0;
} else {
return altura(this);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setAltura(String altura) {\r\n this.altura = altura;\r\n }",
"public void setAltura(int newAlt){\n this._altura=newAlt;\n }",
"public void agregarNodo(Nodo nuevo){\n agregarNodoRec(root, nuevo);//la primera vez inicia en la raiz \n }",
"public void resetNodo()\r\n {\r\n this.nodo = null;\r\n }",
"@Override\r\n public void setAlt(String alt) {\n }",
"public Nodo (String d, Nodo n){\n\t\tdato = d;\n\t\tsiguiente=n;\n\t}",
"public Nodo (String d){\n\t\tthis.dato = d;\n\t\tthis.siguiente = null; //para que apunte el nodo creado a nulo\n\t}",
"public void setNodo(Long nodo);",
"public void asignar_Nodo(Nodo e) {\n\t\tthis.elem = e;\n\t}",
"public void setAlt(String alt) {\n DOM.setElementAttribute(getElement(), \"alt\", alt);\n }",
"public void agregarElemento(NodoRuta nodo) {\n if(nodos.contains(nodo)) {\n nodos.remove(nodo);\n }\n \n nodos.add(nodo);\n fireIntervalAdded(this, nodos.size(), nodos.size());\n }",
"public void setNodoDerecho(Nodo nodo){\n der = nodo;\n }",
"public void actualizarImagen() {\n\t\tentidadGrafica.actualizarImagen(this.valor);\n\t}",
"public void setAltNeg(int newAlt){\n this._alturaNegra=newAlt;\n }",
"public void actualizarNombrePoder(){\n\t\tString name = ( game.getCurrentSorpresa() == null )?\"No hay sorpresa\":game.getCurrentSorpresa().getClass().getName();\n\t\tn2.setText(name.replace(\"aplicacion.\",\"\"));\n\t}",
"private Long modificarDireccion(Direccion direccion) {\n\t\t\ttry {\n\t\t\t\tgDireccion.modify(direccion);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\treturn direccion.getIdDireccion();\n\t}",
"private void esvaziaMensageiro() {\n\t\tMensageiro.arquivo=null;\n\t\tMensageiro.lingua = linguas.indexOf(lingua);\n\t\tMensageiro.linguas=linguas;\n\t\tMensageiro.nomeArquivo=null;\n\t}",
"public static int altura(Arvore no) \n { \n if (no == null) \n return 0; \n else\n { \n /* Calcula a altura de cada subarvore */\n int alturaEsq = altura(no.esquerda); \n int alturaDir = altura(no.direita); \n \n /* usa a altura maior */\n if (alturaEsq > alturaDir) \n return(alturaEsq+1); \n else \n return(alturaDir+1); \n } \n }",
"public void setOriginalidade(String originalidade) {\r\n this.originalidade = originalidade;\r\n }",
"public Odontologo(String nombre, String apellido, String matricula) {\n this.nombre = nombre;\n this.apellido = apellido;\n this.matricula = matricula;\n }",
"public Nodo() {\r\n this.dato = null;\r\n this.siguiente = null;\r\n }",
"private void actualizarNombre(Persona persona){\n \n String nombre=IO_ES.leerCadena(\"Inserte el nombre\");\n persona.setNombre(nombre);\n }",
"public void inserisci(String dove, String contenuto){\n if (n_nodi == 0){\n root = new NodoAlbero(contenuto, null, \"directory\");\n n_nodi++;\n return;\n }\n //troviamo il nodo che sarà il padre del nodo che dobbiamo aggiungere\n NodoAlbero cercato = ricerca(dove);\n \n //se il nodo padre non esiste, non aggiungiamo il nuovo nodo\n if (cercato == null)\n return;\n //se il nodo padre non ha un figlio, lo creiamo\n if (cercato.getFiglio() == null)\n cercato.setFiglio(new NodoAlbero(contenuto, cercato, \"directory\"));\n //se ce ne ha già almeno uno, lo accodiamo agli altri figli\n else {\n NodoAlbero temp = cercato.getFiglio();\n while (temp.getFratello() != null)\n temp = temp.getFratello();\n temp.setFratello(new NodoAlbero(contenuto, temp.getPadre(), \"directory\"));\n }\n n_nodi++;\n }",
"public void addNode() {\r\n \r\n Nod nod = new Nod(capacitate_noduri);\r\n numar_noduri++;\r\n noduri.add(nod);\r\n }",
"private void adicionarDetalhe(String detalhe) {\n\t\tfor (int i = 1; i < detalhes.length; i++) {\n\t\t\tdetalhes[i - 1] = detalhes[i];\n\t\t}\n\t\t\n\t\tdetalhes[4] = detalhe;\n\t\t}",
"public void InsertarNodo(int nodo) {\r\n Nodo nuevo_nodo = new Nodo(nodo);\r\n nuevo_nodo.siguiente = UltimoValorIngresado;\r\n UltimoValorIngresado = nuevo_nodo;\r\n tamaño++;\r\n }",
"public void Nodo(){\r\n this.valor = \"\";\r\n this.siguiente = null;\r\n }",
"@Override\n public void mudarIcone(String enderecoImg, int botao) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"private void generarNombre() {\r\n\t\tthis.nombre = NOMBRES[(int) (Math.random() * NOMBRES.length)];\r\n\t}",
"public void inserisci(NodoAlbero dove, String contenuto, String tipo){\n if (n_nodi == 0){\n root = new NodoAlbero(contenuto, null, tipo);\n n_nodi++;\n return;\n }\n //se il nodo padre non ha un figlio, lo creiamo\n if (dove.getFiglio() == null)\n dove.setFiglio(new NodoAlbero(contenuto, dove, tipo));\n //se ce ne ha già almeno uno, lo accodiamo agli altri figli\n else {\n NodoAlbero temp = dove.getFiglio();\n while (temp.getFratello() != null)\n temp = temp.getFratello();\n temp.setFratello(new NodoAlbero(contenuto, temp.getPadre(), tipo));\n }\n n_nodi++;\n }",
"public void insereFinal(String elemento) {\n No novoNo = new No(elemento, null);\n No temp = ini;\n \n //Caso a lista esteja vazia\n if (temp == null){\n ini = novoNo;\n } else {\n //Caminha ate o ultimo No, dentre todos os nos dessa listaa\n while (temp.getProx() != null) {\n temp = temp.getProx();\n }\n\n //Se chegou ate o ultimo no, adicionar o elemento desejado\n temp.setProx(novoNo);\n }\n }",
"public void addNodo(String nombre) {\n\t\tNodo nodo = new Nodo();\n\t\tnodo.setNombre(nombre);\n\t\tnodos.add(nodo);\n\t}",
"public Normal(String nombre){\r\n\t\tsuper(80,3,new ImageIcon(url),new ImageIcon(urlDer),new ImageIcon(urlIzq),nombre);\r\n\t\tvidaEstandar = 80;\r\n\t}",
"public void setDni(String dni);",
"@Override\n\t\tpublic void update(Metodologia metodologia,String name) {\n\t\t\t\n\t\t}",
"public static void atualizar(Tarefa tar) {\n }",
"@Override\n\tpublic void recreo() {\n\n\t}",
"public void setIconTablaPlantilla() {\n\t\t// Establece el icono del boton editar\n\t\tFile archivo1 = new File(\"imagenes\" + File.separator + \"lapices.png\");\n\t\tImage imagen1 = new Image(archivo1.toURI().toString(), 50, 50, true, true, true);\n\t\tbtnModificar.setGraphic(new ImageView(imagen1));\n\t\tbtnModificar.setContentDisplay(ContentDisplay.CENTER);\n\t}",
"@Override\n\tpublic void setLogo(int resId) {\n\t\t\n\t}",
"public void setNomor(String nomor) {\n this.nomor = nomor;\n }",
"public void setFondoLeyenda() {\n URL url = getClass().getResource(\"/Imagenes/Leyenda.png\");\n\tthis.setOpaque(false);\n\tthis.image = new ImageIcon(url).getImage();\n\trepaint();\n }",
"public void setNomDistrito(String nomDistrito);",
"@Override\n\tpublic void resolver() \n\t{\n\t\tPrintWriter sal = null;\n\t\ttry \n\t\t{\n\t\t\tsal = new PrintWriter(new File(salida));\n\t\t} \n\t\tcatch (FileNotFoundException e) \n\t\t{\n\t\t\tSystem.out.println(\"Ha ocurrido un error con el archivo de salida\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tArrayList<ClaveValor> ninos = new ArrayList<ClaveValor>();\n\t\t//Este for es el for del archivo cuando voy leyendo los nombres.\n\t\tfor(String s : nombres)\n\t\t{\n\t\t\tClaveValor aux = new ClaveValor(s,1);\n\t\t\tif(ninos.contains(aux))\n\t\t\t\tninos.get(ninos.indexOf(aux)).valor++;\n\t\t\telse\n\t\t\t\tninos.add(aux);\n\t\t}\n\t\t//Ordeno las nombres de los ninos por repeticion.\n\t\tCollections.sort(ninos, new Comparator<Object>() {\n\t\t @Override\n\t\t public int compare(Object a1, Object a2) \n\t\t {\n\t\t return ((ClaveValor)a2).valor-((ClaveValor)a1).valor;\n\t\t }\n\t\t});\n\t\t\n\t\tfor(int i = 0; i<n && i < ninos.size(); i++)\n\t\t\tsal.println(ninos.get(i));\n\tsal.close();\n\t}",
"private void generarPNG(String nombre, String entrada) {\n try {\n String ruta = this.pathGuardado + \"/\" + nombre + \".dot\";\n File file = new File(ruta);\n // Si el archivo no existe es creado\n if (!file.exists()) {\n file.createNewFile();\n }\n FileWriter fw = new FileWriter(file);\n BufferedWriter bw = new BufferedWriter(fw);\n bw.write(entrada);\n bw.close();\n// //Generar Imagen creada por .dot\n ControlTerminal controlTer = new ControlTerminal(ruta, this.pathGuardado + \"/\" + nombre + \".png\");\n controlTer.generarImagen();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void setAltura(double altura) {\n\t\tthis.altura = altura;\n\t}",
"public void setAltura(double altura) {\r\n\t\tthis.altura = altura;\r\n\t}",
"public void Ordenamiento() {\n\n\t}",
"public void rellenaImagen()\n {\n rellenaDatos(\"1\",\"Samsung\", \"cv3\", \"blanco\" , \"50\", 1200,2);\n rellenaDatos(\"2\",\"Samsung\", \"cv5\", \"negro\" , \"30\", 600,5);\n }",
"public void supprimerRenommage(){\n supprRenomGram.supprRenom();\n setChanged();\n notifyObservers(\"5\");\n }",
"public NodoArbolSintactico(String nombre, int tipo) {\r\n hijos = new ArrayList<>();\r\n this.nombre = nombre;\r\n accion = null;\r\n this.tipo = tipo;\r\n }",
"public void agregarAlFinal(String valor){\r\n // Define un nuevo nodo.\r\n Nodo nuevo = new Nodo();\r\n // Agrega al valor al nodo.\r\n nuevo.setValor(valor);\r\n // Consulta si la lista esta vacia.\r\n if (esVacia()) {\r\n // Inicializa la lista agregando como inicio al nuevo nodo.\r\n inicio = nuevo;\r\n // Caso contrario recorre la lista hasta llegar al ultimo nodo\r\n //y agrega el nuevo.\r\n } else{\r\n // Crea ua copia de la lista.\r\n Nodo aux = inicio;\r\n // Recorre la lista hasta llegar al ultimo nodo.\r\n while(aux.getSiguiente() != null){\r\n aux = aux.getSiguiente();\r\n }\r\n // Agrega el nuevo nodo al final de la lista.\r\n aux.setSiguiente(nuevo);\r\n }\r\n // Incrementa el contador de tamaño de la lista\r\n tamanio++;\r\n }",
"void lSetAltText(String altText);",
"@Override\n public int getAltura(){\n return(super.getAltura());\n }",
"public abstract void setApellido(java.lang.String newApellido);",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"public void crearNodos()\n\t{\n\t\tfor(List<String> renglon: listaDeDatos)\n\t\t{\n\t\t\tPersona persona = new Persona(Integer.parseInt(renglon.get(1)), Integer.parseInt(renglon.get(2))); //crea la persona\n\t\t\t\n\t\t\tNodo nodo = new Nodo(Integer.parseInt(renglon.get(0)), 0, 0, false); //crea el nodo con id en posicion 1\n\t\t\t\n\t\t\tnodo.agregarPersona(persona);\n\t\t\tlistaNodos.add(nodo);\n\t\t}\n\t\t\n\t}",
"public NodoA desconectar(NodoA t){\n if(t != cabeza){\n t.getLigaDer().setLigaIzq(t.getLigaIzq());\n System.out.println(\"Direccion:\"+t+\" izquierdo:\"+t.getLigaIzq()+\" derecho:\"+t.getLigaDer());\n t.getLigaIzq().setLigaDer(t.getLigaDer());\n return t;\n }\n return null;\n }",
"private void aumentarPilha() {\n this.pilhaMovimentos++;\n }",
"public Nodo(String _nombre_palabra, int _idtoken) {\n nombre_palabra = _nombre_palabra;\n idtoken = _idtoken;\n Siguiente = null;\n }",
"public void agregarAlFinal(T v){\n\t\tNodo<T> nuevo = new Nodo<T>();\r\n\t\tnuevo.setInfo(v);\r\n\t\tnuevo.setRef(null);\r\n\t\t\r\n\t\t//si la lista aun no tiene elementos\r\n\t\tif(p == null){\r\n\t\t\t//el nuevo nodo sera el primero\r\n\t\t\tp=nuevo;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t//retorno la lista hasta que aux apunte al ultimo nodo\r\n\t\tNodo<T> aux;\r\n\t\tfor(aux=p; aux.getRef() != null; aux=aux.getRef()){\r\n\t\t\t//enlazo el nuevo nodo como el siguiente del ultimo\r\n\t\t\taux.setRef(nuevo);\r\n\t\t}\r\n\t\t\r\n\t}",
"public void rumoreAltroSettore(int idGioc, String value){\n\t\t partita.rumore(idGioc, value);\n\t}",
"public void actualizarNivelTanda(int nivel, int tanda) {\n\t\tImageIcon im = new ImageIcon(\n\t\t\t\tgetClass().getResource(\"/RecursosGraficos_Extras/NivelTanda/nivel\" + nivel + \"tanda\" + tanda + \".png\"));\n\t\tthis.nivelTanda.setIcon(im);\n\t}",
"public void renomearItem(int indiceArquivo, String novoNomeArquivo) throws IndiceArquivoInvalido {\n\t\tif (arquivos[indiceArquivo] != null) {\n\t\t\tarquivos[indiceArquivo].setNomeArquivo(novoNomeArquivo);\n\t\t} else {\n\t\t\tthrow new IndiceArquivoInvalido(indiceArquivo);\n\t\t}\n\n\t}",
"void actualizar(Prestamo prestamo);",
"@Override\r\n public Resultado alterar(EntidadeDominio entidade) {\n String nmClass = entidade.getClass().getName();\r\n\r\n //executando validações de regras de negocio \r\n String msg = executarRegras(entidade, \"ALTERAR\");\r\n\r\n //chamando DAO em caso de todas as validações atendidas\r\n if (msg.isEmpty()) {\r\n IDAO dao = daos.get(nmClass);\r\n dao.alterar(entidade);\r\n resultado.setMsg(\"Dados alterados\");\r\n } else {\r\n resultado.setMsg(msg.toString());\r\n }\r\n return resultado;\r\n }",
"public Nodo1Controlador() {\n this.reinit();\n\n }",
"public String getAltura() {\r\n return altura;\r\n }",
"public synchronized void alterarAtributoArtigo(String idArtigo, String nomeAtributo, String novoAtributo) throws HelpDeskException {\n\t\tArtigo artigo = getArtigo(idArtigo);\n\t\tHelpDeskReflexao.setAtributo(artigo, nomeAtributo, novoAtributo);\n\t\tArtigoDAO.getInstance().update(artigo);\n\t}",
"@Override\n public int altura() {\n return altura(this.raiz);\n }",
"public void ponerFichaOrdenador(){\n\t\tif (verificaGana() == -1){\n\t\t\t\n\t\t\tint nx = (int) Math.floor(Math.random()*3);\n\t\t\tint ny = (int) Math.floor(Math.random()*3);\n\t\t\tint res=0;\n\t\t\tfor (int i=nx;i<3;i++){\n\t\t\t\tfor (int j=ny;j<3;j++){\n\t\t\t\t\tif (m[i][j]==0){\n\t\t\t\t\t\tm[i][j]=2;\n\t\t\t\t\t\tres = 1;\n\t\t\t\t\t\ti=3;j=3;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (res==0) {\n\t\t\t\tfor (int i=0;i<3;i++){\n\t\t\t\t\tfor (int j=0;j<3;j++){\n\t\t\t\t\t\tif (m[i][j]==0){\n\t\t\t\t\t\t\tm[i][j]=2;\n\t\t\t\t\t\t\tres = 1;\n\t\t\t\t\t\t\ti=3;j=3;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t}",
"public void nomeAluno(String na) {\n\t\tnomeAluno = na; \n\t}",
"public void setOnt2(OntEntry ont)\r\n\t{\r\n\t\tif (ont2 != null)\r\n\t\t{\r\n\t\t\tont2.decRefs();\r\n\t\t}\r\n\t\tont2 = ont;\r\n\t\tont.incRefs();\r\n\t}",
"public Recurso(String ruta){\n\t\ttipo = ruta.contains(\"http://\")?IMAGEN:TEXTO;\n\t\tif(tipo.equals(IMAGEN)){\n\t\t\timgUrl = ruta;\n\t\t\tdescripcion = ruta;\n\t\t}\n\t\telse{\n\t\t\tdescripcion = ruta;\n\t\t\timgUrl=\"\";\n\t\t}\n\t\tnivel = 0;\n\t\turl = \"Recurso obtenido de servidor se perdio url en persistencia de datos\";\n\t}",
"public void ponerIngrediente( int ingrediente ){\n enter();\n ingredienteact = ingrediente;\n System.out.println(\"Estanquero: poniendo ingrediente \"+ingrediente);\n fumadores[ingrediente].signal();\n leave();\n }",
"public void setId_tecnico(java.lang.Long newId_tecnico);",
"@Override\n\tpublic String alterarAluno(String id, Aluno aluno) {\n\t\treturn null;\n\t}",
"public void verarbeite() {\n\t\t\r\n\t}",
"Ris(String nome) {\n this.nome = nome;\n }",
"public Nodo(datos libro)\n {\n this.libro=libro;//LA VARIABLE LIBRO TENDRA LOS DATOS DE LA CLASE LIBRO\n }",
"public ArbolGeneralDNS(NodoGeneral raiz) {\n\t\tsuper(raiz);\n\t\t// TODO Auto-generated constructor stub\n\t}",
"private void setNomeArquivo(String nomeArquivo){\n \n this.nomeArquivo = modificarExtensao(nomeArquivo);\n }",
"private void generarAno() {\r\n\t\tthis.ano = ANOS[(int) (Math.random() * ANOS.length)];\r\n\t}",
"public void setNom(String p_onom);",
"public void setTipo(TipoNodo tipo) {\n this.tipoNodo = tipo;\n }",
"@Override\n public void cantidad_Defensa(){\n defensa=2+nivel+aumentoD;\n }",
"@Override\n\tpublic String damePatente() {\n\t\treturn \"TJH 123\";\n\t}",
"public void agregarAlInicio(String valor){\r\n // Define un nuevo nodo.\r\n Nodo nuevo = new Nodo();\r\n // Agrega al valor al nodo.\r\n nuevo.setValor(valor);\r\n // Consulta si la lista esta vacia.\r\n if (esVacia()) {\r\n // Inicializa la lista agregando como inicio al nuevo nodo.\r\n inicio = nuevo;\r\n // Caso contrario va agregando los nodos al inicio de la lista.\r\n } else{\r\n // Une el nuevo nodo con la lista existente.\r\n nuevo.setSiguiente(inicio);\r\n // Renombra al nuevo nodo como el inicio de la lista.\r\n inicio = nuevo;\r\n }\r\n // Incrementa el contador de tamaño de la lista.\r\n tamanio++;\r\n }",
"public Pila () {\n raiz=null; //Instanciar un objeto tipo nodo;\n }",
"public Nodo() {\n this.valor = 0;\n this.proximo=null;\n\n }",
"public void agregarAlInicio(int edad){\n //CREAR UN NUEVO NODO AL INICIO DE LA LISTA\n inicio = new Nodo(edad,inicio);\n if(fin==null){\n fin=inicio;\n }\n }",
"void rezervasyonYap(String name, String surname, String islem);",
"private void registar(Gene gene, boolean dominante, LinkedList<GeneResutado> geneResutados, String tipo) {\n\t\tGeneResutado geneResutado = new GeneResutado();\n\t\tgeneResutado.setTipo(tipo);\n\t\tgeneResutado.setDescricao(gene.getDescricao());\n\n\t\tif (dominante) {\n\t\t\tgeneResutado.adicionarNVezes();\n\t\t} else {\n\t\t\tgeneResutado.adicionarMetadeNVezes();\n\t\t}\n\t\tgeneResutados.add(geneResutado);\n\t}",
"abstract void trataAltera();",
"public FoursquarePathBuilder setAlt(double alt) {\n String alts = String.format(\"%f1\", alt);\n addParameter(\"alt\", alts);\n return this;\n }",
"private static void addNodo(Alumno alumno, Nodo raiz) {\n Nodo izq = null;\n Nodo der = null;\n if (raiz == null) {\n raiz.setAlumno(alumno);\n } else if (0 <= ((raiz.getAlumno().getApellidoPaterno()).compareTo(alumno.getApellidoPaterno()))) {\n addNodo(alumno, der);\n } else {\n addNodo(alumno, izq);\n }\n\n }",
"@Override\n\tpublic void frenar() {\n\t\tvelocidadActual = 0;\n\t}",
"public ArchivoAula descargarArchivo(){\n\t\tArchivoAula nuevoArchivo = this;\n\t\tnuevoArchivo.setNombre(this.nombre);\n\t\tnuevoArchivo.setFormato(this.formato);\n\t\treturn nuevoArchivo;\n\t}",
"@Override\r\n\tpublic void atualizar(Aluno pAluno) {\r\n\t}",
"private void atualizarTela() {\n\t\tif(this.primeiraJogada == true) {//SE FOR A PRIMEIRA JOGADA ELE MONTA O LABEL DOS NUMEROS APOS ESCOLHER A POSICAO PELA PRIMEIRA VEZ\r\n\t\t\tthis.primeiraJogada = false;\r\n\t\t\tthis.montarLabelNumeros();\r\n\t\t}\r\n\r\n\t\tthis.esconderBotao();\r\n\t\t\r\n\t\tthis.acabarJogo();\r\n\t}",
"static void citajSveRedoveAlt(String imeFajla) {\n\n /* Koriste se pogodnosti biblioteke za citanje svih redova odjednom */\n Svetovid.out.println(Svetovid.in(imeFajla).readAll());\n\n }",
"static void orden(elefante[] array,int n,elefante[] nomod){\n if(n==array.length-1){\n \n }\n else{\n burbuja b=Mayor(nomod,n,array[n]);\n array[b.pocicion]=array[n];\n array[n]=b.getA();\n orden(array,++n);\n }\n }"
] | [
"0.5803445",
"0.5729479",
"0.5692307",
"0.55717754",
"0.5506804",
"0.5497008",
"0.5426391",
"0.540062",
"0.5392363",
"0.53750783",
"0.53379834",
"0.5316901",
"0.5308013",
"0.53008276",
"0.52809745",
"0.52584857",
"0.5230494",
"0.5228896",
"0.521767",
"0.520453",
"0.5198291",
"0.51978016",
"0.51951873",
"0.5164894",
"0.5147813",
"0.5146116",
"0.5137204",
"0.5134202",
"0.5120715",
"0.51108724",
"0.5107174",
"0.50929123",
"0.50927556",
"0.5091218",
"0.509063",
"0.5073097",
"0.50711536",
"0.50644094",
"0.50508434",
"0.5050793",
"0.504201",
"0.50410503",
"0.50324225",
"0.50298864",
"0.50278354",
"0.5019122",
"0.50157076",
"0.50152516",
"0.49977708",
"0.4997415",
"0.49838224",
"0.49793968",
"0.4972866",
"0.4955721",
"0.49495593",
"0.49479598",
"0.49477866",
"0.49393964",
"0.49278134",
"0.49262875",
"0.49247956",
"0.49230418",
"0.4919011",
"0.4917904",
"0.49172306",
"0.49127132",
"0.49118057",
"0.49098724",
"0.49091256",
"0.48945987",
"0.48915872",
"0.4889362",
"0.48875996",
"0.48845437",
"0.48769933",
"0.4866897",
"0.48664638",
"0.48651484",
"0.48643902",
"0.48462275",
"0.48427954",
"0.4840189",
"0.48366544",
"0.48363292",
"0.4831437",
"0.48313835",
"0.48309264",
"0.48299518",
"0.4825039",
"0.4822113",
"0.48187166",
"0.4817807",
"0.48167017",
"0.4815604",
"0.48116788",
"0.48097315",
"0.48095995",
"0.48051035",
"0.48049363",
"0.48035944",
"0.4799884"
] | 0.0 | -1 |
Regresa el elemento al que apunta el nodo. | public T get() {
return this.elemento;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void obtenerSiguientePregunta() {\r\n\t\tlblPregunta.setText(cuestionario.getPreguntas().get(0));\r\n\t\tcuestionario.getPreguntas().remove(0);\r\n\r\n\t}",
"public void insereFinal(String elemento) {\n No novoNo = new No(elemento, null);\n No temp = ini;\n \n //Caso a lista esteja vazia\n if (temp == null){\n ini = novoNo;\n } else {\n //Caminha ate o ultimo No, dentre todos os nos dessa listaa\n while (temp.getProx() != null) {\n temp = temp.getProx();\n }\n\n //Se chegou ate o ultimo no, adicionar o elemento desejado\n temp.setProx(novoNo);\n }\n }",
"public void agregarElemento(NodoRuta nodo) {\n if(nodos.contains(nodo)) {\n nodos.remove(nodo);\n }\n \n nodos.add(nodo);\n fireIntervalAdded(this, nodos.size(), nodos.size());\n }",
"public void agregarNodo(Nodo nuevo){\n agregarNodoRec(root, nuevo);//la primera vez inicia en la raiz \n }",
"public void insereInicio(String elemento) {\n No novoNo = new No(elemento, ini);\n ini = novoNo;\n }",
"public void asignar_Nodo(Nodo e) {\n\t\tthis.elem = e;\n\t}",
"public void agregar_Alinicio(int elemento){\n inicio=new Nodo(elemento, inicio);// creando un nodo para que se inserte otro elemnto en la lista\r\n if (fin==null){ // si fin esta vacia entonces vuelve al inicio \r\n fin=inicio; // esto me sirve al agregar otro elemento al final del nodo se recorre al inicio y asi sucesivamnete\r\n \r\n }\r\n \r\n }",
"public void agregarAlInicio(String valor){\r\n // Define un nuevo nodo.\r\n Nodo nuevo = new Nodo();\r\n // Agrega al valor al nodo.\r\n nuevo.setValor(valor);\r\n // Consulta si la lista esta vacia.\r\n if (esVacia()) {\r\n // Inicializa la lista agregando como inicio al nuevo nodo.\r\n inicio = nuevo;\r\n // Caso contrario va agregando los nodos al inicio de la lista.\r\n } else{\r\n // Une el nuevo nodo con la lista existente.\r\n nuevo.setSiguiente(inicio);\r\n // Renombra al nuevo nodo como el inicio de la lista.\r\n inicio = nuevo;\r\n }\r\n // Incrementa el contador de tamaño de la lista.\r\n tamanio++;\r\n }",
"public Pregunta(DTO_Pregunta DTO_nuevaPregunta) \n {\n \tpregunta = DTO_nuevaPregunta.getPregunta();\n \tcategoriaPregunta = DTO_nuevaPregunta.getCategoria();\n \trespuesta = new Respuesta(DTO_nuevaPregunta.getRespuesta());\n \t\n }",
"public void agregar(T elemento) {\n\t\tNode <T> agrega= new Node<T>(elemento);\n\t\tNode <T> actual=null;\n\t\tNode <T> anterior = null;\n\t\tactual=primero;\n\t\tboolean agregado=false;\n\t\tif ( numeroElementos==0) {\n\t\t\tprimero = agrega;\n\t\t\tultimo=primero;\n\t\t}\n\t\telse if ( agrega.darElemento().compareTo(ultimo.darElemento())<=0) \n\t\t{\n\t\t\tultimo.asignarSiguiente(agrega);\n\t\t\tultimo=agrega;\n\t\t}\n\t\telse if(agrega.darElemento().compareTo(primero.darElemento())>=0) {\n\t\t\tagrega.asignarSiguiente(primero);\n\t\t\tprimero=agrega;\n\t\t\t}\n\t\telse {\n\t\t\twhile (!agregado) {\n\n\t\t\t\tif (agrega.darElemento().compareTo(actual.darElemento())<0) {\n\t\t\t\t\tanterior= actual;\n\t\t\t\t\tactual=actual.darSiguiente();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse { \n\t\t\t\t\tanterior.asignarSiguiente(agrega);\n\t\t\t\t\tagrega.asignarSiguiente(actual);\n\t\t\t\t\t\tagregado=true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tnumeroElementos++;\n\t}",
"public void Nodo(){\r\n this.valor = \"\";\r\n this.siguiente = null;\r\n }",
"public void agregarAlFinal(T v){\n\t\tNodo<T> nuevo = new Nodo<T>();\r\n\t\tnuevo.setInfo(v);\r\n\t\tnuevo.setRef(null);\r\n\t\t\r\n\t\t//si la lista aun no tiene elementos\r\n\t\tif(p == null){\r\n\t\t\t//el nuevo nodo sera el primero\r\n\t\t\tp=nuevo;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t//retorno la lista hasta que aux apunte al ultimo nodo\r\n\t\tNodo<T> aux;\r\n\t\tfor(aux=p; aux.getRef() != null; aux=aux.getRef()){\r\n\t\t\t//enlazo el nuevo nodo como el siguiente del ultimo\r\n\t\t\taux.setRef(nuevo);\r\n\t\t}\r\n\t\t\r\n\t}",
"public void agregarAlFinal(String valor){\r\n // Define un nuevo nodo.\r\n Nodo nuevo = new Nodo();\r\n // Agrega al valor al nodo.\r\n nuevo.setValor(valor);\r\n // Consulta si la lista esta vacia.\r\n if (esVacia()) {\r\n // Inicializa la lista agregando como inicio al nuevo nodo.\r\n inicio = nuevo;\r\n // Caso contrario recorre la lista hasta llegar al ultimo nodo\r\n //y agrega el nuevo.\r\n } else{\r\n // Crea ua copia de la lista.\r\n Nodo aux = inicio;\r\n // Recorre la lista hasta llegar al ultimo nodo.\r\n while(aux.getSiguiente() != null){\r\n aux = aux.getSiguiente();\r\n }\r\n // Agrega el nuevo nodo al final de la lista.\r\n aux.setSiguiente(nuevo);\r\n }\r\n // Incrementa el contador de tamaño de la lista\r\n tamanio++;\r\n }",
"public void agregarAlInicio( int elemento ) {\n\t\tif( !estaVacia() ) {\n\t\t\tinicio = new NodoDoble(elemento, inicio, null);\n\t\t\tinicio.siguiente.anterior = inicio;\n\t\t} else {\n\t\t\tinicio = fin = new NodoDoble(elemento);\n\t\t}\n\t}",
"public void inserirFinal(int elemento) {\n No novo = new No(elemento, null);\n No temp = ini;\n\n if (eVazia()) {\n ini = novo;\n } else {\n //Percorrer até chegar no ultimo Nó\n while (temp.getProximo() != null) {\n temp = temp.getProximo();\n }\n temp.setProximo(novo);\n }\n\n }",
"public NodoDoble(NodoDoble<E> anterior, E elemento, NodoDoble<E> siguiente){//a ver si no te da problema el nodo por no estar especigicando su tipo... puesto que esta clase es genérica y aquí estas creando uno sin saber, asi que creo que debería de especificarselo\n contenido = elemento;\n nodoSiguiente = siguiente;\n nodoAnterior = anterior;\n }",
"public void setElemento(String elemento) {\r\n\t\tthis.elemento = elemento;\r\n\t}",
"public void enfileira(T elemento){\n\t\t\n\t\tthis.adiciona(elemento);\n\t}",
"public void insertarOrden(Object dato) {\n Nodo nuevo = new Nodo(dato);\n int res = 0;\n // System.out.println(\"esxa\"+res);\n if (primero == null) {\n nuevo.setReferencia(primero);\n primero = nuevo;\n // System.out.println(\"Es nulo\");\n// System.out.println(\"sss\"+primero.getDato());\n } else {\n res = comp.evaluar(dato, primero.getDato());\n // System.out.println(\"\"+res);\n if (res == -1) {\n nuevo.setReferencia(primero);\n primero = nuevo;\n } else {\n int auxres = 0;\n Nodo anterior, actual;\n anterior = actual = primero;\n auxres = comp.evaluar(dato, actual.getDato());\n while ((actual.getReferencia() != null) && (auxres == 1)) {\n anterior = actual;\n actual = actual.getReferencia();\n auxres = comp.evaluar(dato, actual.getDato());\n }\n if (auxres == 1) {\n anterior = actual;\n }\n nuevo.setReferencia(anterior.getReferencia());\n anterior.setReferencia(nuevo);\n\n }\n }\n\n }",
"public void insertar(int x, String nombre) {\n \tNodo nuevo;\n nuevo = new Nodo();\n nuevo.edad = x;\n nuevo.nombre = nombre;\n //Validar si la lista esta vacia\n if (raiz==null)\n {\n nuevo.sig = null;\n raiz = nuevo;\n }\n else\n {\n nuevo.sig = raiz;\n raiz = nuevo;\n }\n }",
"public void registaAposta (Aposta a){\n this.listaApostas.add(a);\n }",
"public void agregarPedido(PedidoIndividual pedido) throws QRocksException;",
"public void addPrimero(Object obj) {\n if (cabeza == null) { //Si la cabeza es nula, entoces se creará un nuevo nodo donde le pasaremos el valor de obj\n cabeza = new Nodo(obj);\n } else { //Si no es nula, signifa que el valor que se ingrese, pasara a ser la nueva cabeza\n Nodo temp = cabeza; //Metemos la cabeza en un nodo temporal\n Nodo nuevo = new Nodo(obj); //Creamos un nuevo nodo, que no está enlazado\n nuevo.enlazarSiguiente(temp); //Y el nuevo nodo lo enlazamos a el nodo Temp, que contenia el valor anterior de la otra cabeza\n cabeza = nuevo; //Y ahora le decimos que la cabeza sera nuevo\n }\n size++; //Cada vez que agreguemos un nuevo nodo el tamaño de nuestra lista tendra que aumentar\n }",
"private void aumentarPuntos() {\r\n this.puntos++;\r\n this.form.AumentarPuntos(this.puntos);\r\n }",
"public void add(T conteudo){\n No<T> novoNo = new No(conteudo);\n if( this.isEmpty() ){\n this.referenciaEntrada = novoNo;\n }else {\n No<T> noAuxiliar = referenciaEntrada;\n for (int i = 0; i < this.size() - 1; i++) {\n noAuxiliar = noAuxiliar.getProximoNo();\n }\n noAuxiliar.setProximoNo(novoNo);\n }\n }",
"public void domicilioAgregar() {\r\n\t\tlog.info(\"Domicilio agregar \" + nuevoDomici.getDomicilio());\r\n\t\tboolean verifica = false;\r\n\t\tmensaje = null;\r\n\t\tnuevoDomici.setTbTipoCasa(objTipoCasaService.findTipoCasa(Tipocasanuevo));\r\n\t\tnuevoDomici.setDomicilio(domicilio);\r\n\t\tnuevoDomici.setReferencia(referencia);\r\n\t\tnuevoDomici.setTbUbigeo(objUbigeoService.findUbigeo(idUbigeo));\r\n\t\tlog.info(\"TIPO-CASA-NUEVO--->\"+nuevoDomici.getTbTipoCasa().getIdtipocasa());\r\n\t\tnuevoDomici.setNuevoD(1);\r\n\t\t//aqui ponfo el ID-Domicilio a la lista Domicilio temporalmente.\r\n\t\tnuevoDomici.setIddomiciliopersona(0);\r\n\t\tnuevoDomici.setTbEstadoGeneral(objEstadoGeneralService.findEstadogeneral(15));\r\n\t\t\r\n\t\tfor (int i = 0; i < DomicilioPersonaList.size(); i++) {\r\n\t\t\tlog.info(\" \"+ DomicilioPersonaList.get(i).getDomicilio() + \" \" + nuevoDomici.getDomicilio());\r\n\t\t\tif (DomicilioPersonaList.get(i).getDomicilio().equals(nuevoDomici.getDomicilio())) {\r\n\t\t\t\tverifica = false;\r\n\t\t\t\tmensaje = \"el Domicilio ya se encuentra registrado en la lista de domiclio cliente\";\r\n\t\t\t\tbreak;\r\n\t\t\t}else {\r\n\t\t\t\tverifica = true;\r\n\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\tif (DomicilioPersonaList.size() == 0) {\r\n\t\t\t\tverifica = true;\r\n\t\t\t\t}\r\n\t\t\tif (verifica) {\r\n\t\t\t\tnuevoDomici.setItem(\"Por Agregar\");\r\n\t\t\t\tDomicilioPersonaList.add(nuevoDomici);\r\n\t\t\t\tlog.info(\"se agrego \"+ nuevoDomici.getDomicilio());\r\n\t\t\t\t}\r\n\t\t\tif (mensaje != null) {\r\n\t\t\t\tmsg = new FacesMessage(FacesMessage.SEVERITY_FATAL,\r\n\t\t\t\tConstants.MESSAGE_ERROR_FATAL_TITULO, mensaje);\r\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\r\n\t\t\t\t}\r\n\t\t\tnuevoDomici = new DomicilioPersonaSie();\r\n\t\t}",
"public void InsertarNodo(int nodo) {\r\n Nodo nuevo_nodo = new Nodo(nodo);\r\n nuevo_nodo.siguiente = UltimoValorIngresado;\r\n UltimoValorIngresado = nuevo_nodo;\r\n tamaño++;\r\n }",
"public Respuesta addRespuesta(String resp, Pregunta p, Usuario autor);",
"public void addElemento (Elemento obj) {\n if (obj.getPeso() > getPesoLibre() || porNombre.containsKey(obj.getNombre())) {\n System.out.println(nombre +\": No se puede agregar \" + obj.getNombre());\n }\n else {\n porNombre.put(obj.getNombre(), obj);\n addPeso(obj.getPeso());\n }\n }",
"protected void agregarUbicacion(){\n\n\n\n }",
"private void setAdjuntos(Element element) {\r\n\t\tElement adjuntos = new Element(\"A_AdjuntosReglas\");\r\n\t\tadjuntos.setText(getReq().getObservaciones());\r\n\t\telement.addContent(adjuntos);\r\n\t}",
"protected WebElement aguardaElemento(WebElement elemento) {\n Log.info(\"Aguardando elemento: \" + getReferenceNameElement(elemento));\n try {\n return aguardaElemento(ExpectedConditions.refreshed(ExpectedConditions.visibilityOf(elemento)));\n } catch (Exception e) {\n throw new AutomacaoBusinessException(\"Não foi encontrado o elemento: \" + getReferenceNameElement(elemento));\n }\n }",
"public void agregarElementos(List<NodoRuta> nodoNuevo) {\n if(nodoNuevo != null){\n nodos.addAll(nodoNuevo);\n fireIntervalAdded(this, nodos.size()-nodoNuevo.size(), nodos.size());\n }\n }",
"public void carroNoEncontrado(){\n System.out.println(\"Su carro no fue removido porque no fue encontrado en el registro\");\n }",
"public void registrarPersona() {\n\t\ttry {\n\t\t\tif (validaNumDocumento(getNumDocumentPersona())) {\n\t\t\t\t\tif (validaDireccion()) {\n\t\t\t\t\t\tif (validaApellidosNombres()) {\n\t\t\t\t\t\t\tPaPersona persona = new PaPersona();\n\t\t\t\t\t\t\tif (getActualizaPersona() != null && getActualizaPersona().equals(\"N\")) {\n\t\t\t\t\t\t\t\tpersona.setPersonaId(Constante.RESULT_PENDING);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tpersona.setPersonaId(getPersonaId() == null ? Constante.RESULT_PENDING: getPersonaId());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tpersona.setTipoDocumentoId(Integer.valueOf(mapTipoDocumento.get(getTipoDocumento())));\n\t\t\t\t\t\t\tpersona.setNroDocIdentidad(getNumDocumentPersona());\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\tif (persona.getTipoDocumentoId() == Constante.TIPO_DOCUMENTO_RUC_ID) {\n\t\t\t\t\t\t\t\tpersona.setRazonSocial(getRazonSocial());\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tpersona.setPrimerNombre(getPrimerNombre());\n\t\t\t\t\t\t\t\tpersona.setSegundoNombre(getSegundoNombre());\n\t\t\t\t\t\t\t\tpersona.setApePaterno(getApellidoPaterno());\n\t\t\t\t\t\t\t\tpersona.setApeMaterno(getApellidoMaterno());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tPaDireccion direccion = new PaDireccion();\n\t\t\t\t\t\t\tdireccion.setDireccionId(getDireccionId() == null ? Constante.RESULT_PENDING: getDireccionId());\n\t\t\t\t\t\t\tif (getSelectedOptBusc().intValue() == 1) {\n\t\t\t\t\t\t\t\tdireccion.setTipoViaId(mapGnTipoVia.get(getCmbtipovia().getValue()));\n\t\t\t\t\t\t\t\tdireccion.setViaId(mapGnVia.get(getCmbvia().getValue()));\n\t\t\t\t\t\t\t\tdireccion.setLugarId(null);\n\t\t\t\t\t\t\t\tdireccion.setSectorId(null);\n\t\t\t\t\t\t\t\tdireccion.setNumero(numero);\n\t\t\t\t\t\t\t\tdireccion.setPersonaId(persona.getPersonaId());\n\n\t\t\t\t\t\t\t\tString direccionCompleta = papeletaBo.getDireccionCompleta(direccion,mapIGnTipoVia, mapIGnVia);\n\t\t\t\t\t\t\t\tif (direccionCompleta != null && direccionCompleta.trim().length() > 0) {\n\t\t\t\t\t\t\t\t\tdireccion.setDireccionCompleta(direccionCompleta);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdireccion.setDireccionCompleta(getDireccionCompleta());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tBuscarPersonaDTO personaDto = getPersonaDto(persona, direccion);\n\t\t\t\t\t\t\tString personaPapeleta = (String) getSessionMap().get(\"personaPapeleta\");\n\t\t\t\t\t\t\tif (personaPapeleta != null\n\t\t\t\t\t\t\t\t\t&& personaPapeleta.equals(\"I\")) {\n\t\t\t\t\t\t\t\tRegistroPapeletasManaged registro = (RegistroPapeletasManaged) getManaged(\"registroPapeletasManaged\");\n\t\t\t\t\t\t\t\tregistro.setDatosInfractor(personaDto);\n\t\t\t\t\t\t\t} else if (personaPapeleta != null\n\t\t\t\t\t\t\t\t\t&& personaPapeleta.equals(\"P\")) {\n\t\t\t\t\t\t\t\tRegistroPapeletasManaged registro = (RegistroPapeletasManaged) getManaged(\"registroPapeletasManaged\");\n\t\t\t\t\t\t\t\tregistro.setDatosPropietario(personaDto);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlimpiar();\n\t\t\t\t\t\t\tesContribuyente = (Boolean) getSessionMap().get(\"esContribuyente\");\n\t\t\t\t\t\t\tif (esContribuyente == true) {\t\n\t\t\t\t\t\t\t\tWebMessages.messageError(\"Es un Contribeyente s�lo se Actualiz� la Direcci�n para Papeletas, los otros datos es por DJ\");\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tWebMessages\n\t\t\t\t\t\t\t\t\t.messageError(\"Apellidos y nombres no valido\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tWebMessages\n\t\t\t\t\t\t\t\t.messageError(\"Especifique la direccion de la persona\");\n\t\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tWebMessages\n\t\t\t\t\t\t.messageError(\"Número de documento de identidad no valido\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static void preguntarTipoDeLibroPorRegistrar() {\n\t\tSystem.out.println(\"Ingresa el numero de la opcion deseada y preciona enter\");\n\t\tSystem.out.println(\"1 - Registrar Diccionario\");\n\t\tSystem.out.println(\"2 - Registrar Enciclopedia\");\n\t\tSystem.out.println(\"3 - Registar Novela\");\n\t}",
"public static void actualizarRegistro(){\n int idActulizar = Integer.parseInt(JOptionPane.showInputDialog(\"Ingrese el ID a Actualizar\"));\n Scanner teclado = new Scanner(System.in); \n \n System.out.println(\"Actualizando.... \");\n //String anombre = teclado.nextLine();\n persona pa = new persona();\n pa.setNombre(teclado.nextLine());\n pa.setAp_paterno(teclado.nextLine());\n pa.setAp_materno(teclado.nextLine());\n pa.setDireccion(teclado.nextLine());\n pa.setSexo(teclado.nextLine());\n \n pd.actualizarPerosna(idActulizar, pa);\n // mostras los actualizados\n for (persona ps: pd.listaPersonas()){\n System.out.println(ps.getId()+ \" \"+\n ps.getNombre()+ \" \"+\n ps.getAp_paterno()+ \" \"+ \n ps.getAp_materno());\n }\n }",
"private void registrarResidencia(Residencias residencia) {\n\t\t\t\t\t\t\t\t\n\t\tResidenciasobservaciones observacion = residencia.getResidenciasobservaciones();\t\n\t\t\t\t\n\t\tif(observacion==null) {\t\t\t\n\t\t\thibernateController.insertResidencia(residencia);\n\t\t\t\n\t\t}else {\t\t\t\n\t\t\thibernateController.insertResidenciaObservacion(residencia, observacion);\t\t\n\t\t}\n\t\t\n\t\tupdateContent();\t\n\t\t\n\t}",
"public SolicitudDeCompra administrar(SolicitudDeCompra solicitud, Producto producto)\n {\n solicitud.agregarProducto(producto);\n return solicitud;\n }",
"private DocumentoProcesoDTO registrarDocumentoSolicitudBien(EnumTipoDocumentoGenerado tipoDocGenerado,\n TrazabilidadProcesoDTO traza, OficioBienDTO oficioBienDTO, EnumTipoDocumentoProceso tipoDocProceso,\n String responsableGeneracion) throws CirculemosAlertaException {\n // Genera documento\n GeneraDocumentoDTO generaDocumento = new GeneraDocumentoDTO();\n generaDocumento.setFechaGeneracion(oficioBienDTO.getFechaGeneracion());\n generaDocumento.setIdTipoDocumentoGenerado(tipoDocGenerado);\n Object[] valoresParametros = { oficioBienDTO.getId() };\n generaDocumento.setValoresParametros(valoresParametros);\n Long idDocumento = iRDocumentosCirculemos.generarDocumento(generaDocumento);\n\n // Guarda el documento generado\n DocumentoProcesoDTO documentoProceso = new DocumentoProcesoDTO();\n documentoProceso.setNumeroDocumento(idDocumento);\n documentoProceso.setTrazabilidadProceso(traza);\n TipoDocumentoProcesoDTO tipoDocumento = new TipoDocumentoProcesoDTO();\n tipoDocumento.setId(tipoDocProceso.getValue());\n documentoProceso.setTipoDocumento(tipoDocumento);\n // Responsable de la generacion de los documentos\n documentoProceso.setResponsableGeneracion(responsableGeneracion);\n documentoProceso = iRFachadaProceso.registrarDocumento(documentoProceso);\n return documentoProceso;\n }",
"public void addend(int dato) {\n //agrega nuevo nodo \n NodoEnteroSimple nodo = new NodoEnteroSimple();\n\n nodo.setValor(dato);\n\n if (vacia()) {\n\n head = nodo;\n } else {\n //un temporal de la lista \n NodoEnteroSimple temp = head;\n\n while (temp.getSiguiente() != null) {\n temp = temp.getSiguiente();\n\n }\n temp.getSiguiente();\n }\n size++;\n }",
"public void agregaElemento(Integer valor,T elemento) {\n\t\tthis.coleccion.put(valor,elemento);\n\t}",
"public void agregarElemento (String codigoAcceso, Elemento elemento) {\r\n\t\tlistaElementos.put(codigoAcceso, elemento);\r\n\t}",
"public void asignarID(Object id) {\n\n propiedad temporal;\n for (int i = 0; i < this.listadoElementos.size(); i++) {\n temporal = listadoElementos.get(i);\n if (temporal instanceof propiedadId) {\n propiedadId v = (propiedadId) temporal;\n if (!id.toString().equalsIgnoreCase(\"\")) {\n v.idElemento = id.toString();\n this.listadoElementos.set(i, v);\n break;\n\n }\n }\n }\n \n propiedadId n =new propiedadId(id);\n this.listadoElementos.add(n);\n }",
"@Override\n public void almacenarElemento(Object elemento) {\n database.store(elemento);\n }",
"public void afegirEquip(Equip equip, boolean ordenat) throws LlistaPlena, EquipExisteix {\n\t\tif(primer==null){\n\t\t\t//Aqui coloco el primer de tots\n\t\t\tprimer= new Node();\n\t\t\tprimer.info=equip;\n\t\t\tn_equips=n_equips+1;\n\t\t\tanterior=primer;\n\t\t}\n\t\telse{\n\t\t\tif(ordenat){\n\t\t\t\t//Ordenat\n\t\t\t\tNode Nanterior=primer, Nseguent=primer.Nodeseguent;\n\t\t\t\tboolean trobat=false;\n\t\t\t\tif(Nanterior.info.getNom().equalsIgnoreCase(equip.getNom())) throw new EquipExisteix();\n\t\t\t\t//Comprobo si ha d'anar el primer de tots\n\t\t\t\tif(equip.getNom().compareToIgnoreCase(primer.info.getNom())<0){\n\t\t\t\t\tNode aux = new Node();\n\t\t\t\t\taux.info=equip;\n\t\t\t\t\tprimer.Nodeanterior=aux;\n\t\t\t\t\taux.Nodeseguent=primer;\n\t\t\t\t\tprimer=aux;\n\t\t\t\t\tanterior=aux;\n\t\t\t\t\tn_equips=n_equips+1;\n\t\t\t\t}else{\n\t\t\t\t\t//Comprobo si existeix l'element a la llista\n\t\t\t\t\twhile(!trobat && Nseguent!=null){\n\t\t\t\t\t\tif(Nseguent.info.getNom().equalsIgnoreCase(equip.getNom())) throw new EquipExisteix();\n\t\t\t\t\t\tif(equip.getNom().compareToIgnoreCase(Nseguent.info.getNom()) < 0) trobat=true;\n\t\t\t\t\t\telse{\tNanterior=Nseguent;\n\t\t\t\t\t\t\t\tNseguent=Nseguent.Nodeseguent;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tNode aux = new Node();\n\t\t\t\t\taux.info=equip;\n\t\t\t\t\tNanterior.Nodeseguent=aux;\n\t\t\t\t\taux.Nodeanterior=Nanterior;\n\t\t\t\t\taux.Nodeseguent=Nseguent;\n\t\t\t\t\tif(Nseguent!=null) Nseguent.Nodeanterior=aux; \n\t\t\t\t\tanterior=aux;\n\t\t\t\t\tn_equips=n_equips+1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\telse{\n\t\t\t\t//Desordenat\n\t\t\t\tNode Nseguent=primer;\n\t\t\t\t//Comprobo si existeix l'element a la llista\n\t\t\t\twhile(Nseguent!=null){\n\t\t\t\t\tif(Nseguent.info.getNom().equalsIgnoreCase(equip.getNom())) throw new EquipExisteix();\n\t\t\t\t\tNseguent=Nseguent.Nodeseguent;\n\t\t\t\t}\n\t\t\t\tNode aux3= new Node();\n\t\t\t\taux3.info=equip;\n\t\t\t\tanterior.Nodeseguent=aux3;\n\t\t\t\taux3.Nodeanterior=anterior;\n\t\t\t\tanterior=aux3;\n\t\t\t\tn_equips=n_equips+1;\n\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t}",
"private void nuevoJuego() { \n\n objJuegoTresEnRaya = new JuegoTresEnRaya();\n objJuegoTresEnRaya.addObserver(this);\n objJuegoTresEnRaya.setQuienComienza(JuegoTresEnRaya.JUGADOR);\n objJuegoTresEnRaya.setQuienJuega(JuegoTresEnRaya.JUGADOR);\n \n }",
"protected void preencheCampo(WebElement elemento, Object valor) {\n anexaDescricao(\"Preenchendo campo: \" + getReferenceNameElement(elemento) + \" com o valor: \" + valor);\n aguardaElemento(ExpectedConditions.elementToBeClickable(elemento)).sendKeys((String) valor);\n }",
"public void editarPorReferencia(String referencia, String valor){\r\n // Consulta si el valor existe en la lista.\r\n if (buscar(referencia)) {\r\n // Crea ua copia de la lista.\r\n Nodo aux = inicio;\r\n // Recorre la lista hasta llegar al nodo de referencia.\r\n while(aux.getValor() != referencia){\r\n aux = aux.getSiguiente();\r\n }\r\n // Actualizamos el valor del nodo\r\n aux.setValor(valor);\r\n }\r\n }",
"public void registrarVenta(String fruta, String proteina, String grano, String almidon) {\n if(!this.sePuedePreparar(fruta, proteina, grano, almidon)) {\n throw new RuntimeException(\"Ingredientes insuficientes\");\n }\n \n Almuerzo almuerzo = new Almuerzo(this, fruta, proteina, grano, almidon);\n almuerzo.registrarVenta();\n }",
"public void InsertarProceso(Proceso nuevo) {\n\t\tif (raiz.sig == raiz) {\n\t\t\traiz.sig = nuevo;\n\t\t\tthis.cabeza = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\tnuevo.padre = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t} else {\n\t\t\tProceso aux = raiz.padre;\n\t\t\taux.sig = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t\tnuevo.padre = aux;\n\t\t}\n\t\tthis.numProcesos++;\n\t}",
"public void agregarElemento(K llave, T dato) {\n\n\t\tif (primerElemento == null) {\n\t\t\tNodeTabla<K, T> nodo = new NodeTabla<K, T>(llave, dato, null);\n\t\t\t// agrega el nodo como ultimo y primer elemento\n\t\t\tprimerElemento = nodo;\n\t\t\tultimoElemento = nodo;\n\t\t} else {\n\t\t\t// pone el elemento al final de la fila\n\t\t\tultimoElemento = new NodeTabla<K, T>(llave, dato, ultimoElemento);\n\t\t}\n\n\t\t// incrementa el tamano\n\t\ttamano++;\n\t}",
"@Override\n public void agregarSocio(String nombre, int dni, int codSocio) {\n }",
"public Nodo(Elemento e, Nodo<Elemento> p) {\n\t\tthis.proximo = p;\n\t\tthis.elemento = e;\n\t}",
"public Pregunta() {\n sAsignatura = null;\n sPregunta = null;\n iRespuesta = -1;\n sRuta = null;\n }",
"ParqueaderoEntidad agregar(String nombre);",
"public void imprimir() {\n Nodo reco=raiz;\n System.out.println(\"Listado de todos los elementos de la pila.\");\n System.out.print(\"Raiz-\");\n while (reco!=null) {\n \tSystem.out.print(\"(\");\n System.out.print(reco.edad+\"-\");\n System.out.print(reco.nombre+\"\");\n System.out.print(\")-\");\n //System.out.print(reco.sig+\"-\");\n reco=reco.sig;\n }\n System.out.print(\"Cola\");\n System.out.println();\n }",
"public void setElemento(Elemento e) {\n\t\tthis.elemento = e;\n\t}",
"public void inserisci(NodoAlbero dove, String contenuto, String tipo){\n if (n_nodi == 0){\n root = new NodoAlbero(contenuto, null, tipo);\n n_nodi++;\n return;\n }\n //se il nodo padre non ha un figlio, lo creiamo\n if (dove.getFiglio() == null)\n dove.setFiglio(new NodoAlbero(contenuto, dove, tipo));\n //se ce ne ha già almeno uno, lo accodiamo agli altri figli\n else {\n NodoAlbero temp = dove.getFiglio();\n while (temp.getFratello() != null)\n temp = temp.getFratello();\n temp.setFratello(new NodoAlbero(contenuto, temp.getPadre(), tipo));\n }\n n_nodi++;\n }",
"@Override\n\tpublic void recreo() {\n\n\t}",
"public void agregarinicio(int el){\n if(!estavacia()){\n fin=new nododoble(el, inicio,null);\n inicio.siguiente.anterior=inicio;\n }else{\n inicio=fin=new nododoble(el);\n }}",
"@Override\n\tpublic void posSave() {\n\t\tfor(ItemRequisicionEta tmpItm : itemsAgregados) {\n\t\t\ttmpItm.setReqEtapa(instance);\n\t\t\tgetEntityManager().persist(tmpItm);\n\t\t}\n\t\tgetEntityManager().refresh(etapaRepCliHome.getInstance());\n\t}",
"private void EliminarAristaNodo (NodoGrafo nodo ,int v){\n\t\tNodoArista aux = nodo.arista;\n\t\tif (aux != null) {\n\t\t\t// Si la arista a eliminar es la primera en\n\t\t\t// la lista de nodos adyacentes\n\t\t\tif (aux.nodoDestino.nodo == v){\n\t\t\t\tnodo.arista = aux.sigArista;\n\t\t\t}\n\t\t\telse {\n\t\t\t\twhile (aux.sigArista!= null && aux.sigArista.nodoDestino.nodo != v){\n\t\t\t\t\taux = aux.sigArista;\n\t\t\t\t}\n\t\t\t\tif (aux.sigArista!= null) {\n\t\t\t\t\t// Quita la referencia a la arista hacia v\n\t\t\t\t\taux.sigArista = aux.sigArista.sigArista;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void asignarAutomovilPersona(){\r\n persona.setAutomovil(automovil);\r\n }",
"private void agregarARegistro(int numeroCuenta){\n try{\n RegistroSerializado registro = new RegistroSerializado(\n numeroCuenta, \"Hay un registro de transacciones no asociado para ese numero de cliente...\");\n salRegistro.writeObject(registro);\n }\n catch(NoSuchElementException noSuchElementException){\n System.err.println(\"Entrada invalida. Intente de nuevo.\");\n }\n catch(IOException iOException){\n System.err.println(\"Error al escribir en el archivo. Terminado.\");\n System.exit(1);\n }\n }",
"private void addInstituicao() {\n\n if (txtNome.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Campo Nome Invalido\");\n txtNome.grabFocus();\n return;\n } else if (txtNatureza.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Campo Natureza Invalido\");\n txtNatureza.grabFocus();\n return;\n }\n if ((instituicao == null) || (instituicaoController == null)) {\n instituicao = new Instituicao();\n instituicaoController = new InstituicaoController();\n }\n instituicao.setNome(txtNome.getText());\n instituicao.setNatureza_administrativa(txtNatureza.getText());\n if (instituicaoController.insereInstituicao(instituicao)) {\n limpaCampos();\n JOptionPane.showMessageDialog(null, \"Instituicao Cadastrada com Sucesso\");\n }\n }",
"private void registrarVehiculo(String placa, String tipo, String color, String numdoc) {\n miVehiculo = new Vehiculo(placa,tipo,color, numdoc);\n\n showProgressDialog();\n\n //empresavehiculo\n //1. actualizar el reference, empresavehiculo\n //2. mDatabase.child(\"ruc\").child(\"placa\").setValue\n\n mDatabase.child(placa).setValue(miVehiculo).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n hideProgressDialog();\n if (task.isSuccessful()) {\n Toast.makeText(getApplicationContext(),\"Se registro Correctamente...!\",Toast.LENGTH_LONG).show();\n //\n setmDatabase(getDatabase().getReference(\"empresasvehiculos\"));\n //\n mDatabase.child(GestorDatabase.getInstance(getApplicationContext()).obtenerValorUsuario(\"ruc\")).setValue(miVehiculo).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n hideProgressDialog();\n if (task.isSuccessful()) {\n Toast.makeText(getApplicationContext(),\"Se registro Correctamente...!\",Toast.LENGTH_LONG).show();\n\n } else {\n Toast.makeText(getApplicationContext(), \"Error intente en otro momento...!\", Toast.LENGTH_LONG).show();\n }\n }\n });\n\n } else {\n Toast.makeText(getApplicationContext(), \"Error intente en otro momento...!\", Toast.LENGTH_LONG).show();\n }\n }\n });\n }",
"private List<Node<T>> auxiliarRecorridoPost(Node<T> nodo, List<Node<T>> lista) {\r\n\t\tif (nodo.getChildren() != null) {// Si tiene hijos\r\n\t\t\tList<Node<T>> hijos = nodo.getChildren();// Hijos\r\n\t\t\tfor (int i = 1; i <= hijos.size(); i++) {\r\n\t\t\t\tauxiliarRecorridoPost(hijos.get(i), lista);// Recursividad\r\n\t\t\t}\r\n\t\t}\r\n\t\tlista.add(nodo);// Aņade a la lista\r\n\t\treturn lista;// Devuelve lista\r\n\t}",
"public void resetNodo()\r\n {\r\n this.nodo = null;\r\n }",
"public void AgregarDeMayorAMenor(int el) throws Exception{\n if(repetido(el)){\n throw new Exception(\"El dato ya existe en la lista!!!\");\n }else{\n /*\n Crear un nodo para el nuevo dato.\n Si la lista esta vacía, o el valor del primer elemento de la lista \n es mayor que el nuevo, insertar el nuevo nodo en la primera posición \n de la lista y modificar la cabecera respectivamente.\n \n */\n NodoDoble newNode = new NodoDoble(el);\n if (estVacia() || inicio.GetDato() == el) {\n newNode.SetSiguiente(inicio);\n inicio = newNode;\n } else {\n /* \n Si no se cumple el caso anterior, buscar el lugar adecuado \n para la inserción: recorrer la lista conservando el nodo actual. \n Inicializar nodo actual con el valor de primera posición, \n y avanzar mientras el siguiente nodo no sea nulo y el dato \n que contiene la siguiente posición sea mayor o igual que \n el dato a insertar.\n */\n NodoDoble current = inicio;//\n while (current.GetSiguiente() != null\n && current.siguiente.GetDato() >= el) {\n current = current.GetSiguiente();\n }\n /*\n Con esto se señala al nodo adecuado, \n a continuación insertar el nuevo nodo a continuación de él.\n */\n newNode.SetSiguiente(current.GetSiguiente());\n current.SetSiguiente(newNode);\n }\n } \n }",
"@Override\n public void definirId(Endereco objeto, int id) {\n objeto.setId(id);\n }",
"private void ReservarCita(String horaini,String horafin)\n {\n progressDialog=new ProgressDialog(HorasCitasActivity.this);\n progressDialog.setTitle(\"Agregado horario\");\n progressDialog.setMessage(\"cargando...\");\n progressDialog.show();\n progressDialog.setCancelable(false);\n String key = referenceehoras.push().getKey();\n\n // para gaurar el nodo Citas\n // sadfsdfsdfsd1212sdss\n Horario objecita =new Horario(key,idespecialidad,horaini,horafin,nombreespecialidad );\n //HorarioAtencion\n // reference=FirebaseDatabase.getInstance().getReference(\"HorarioAtencion\");\n // referenceCitas= FirebaseDatabase.getInstance().getReference(\"CitasReservadas\").child(user_id);\n referenceehoras.child(key).setValue(objecita).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()){\n Toast.makeText(HorasCitasActivity.this, \"Agregado\", Toast.LENGTH_SHORT).show();\n progressDialog.dismiss();\n }\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(HorasCitasActivity.this, \"Error :\" +e.getMessage(), Toast.LENGTH_SHORT).show();\n\n }\n });\n }",
"public ComentPregunta addComentario(String c, Pregunta p, Usuario autor);",
"@Override\r\n\tprotected void agregarObjeto() {\r\n\t\t// opcion 1 es agregar nuevo justificativo\r\n\t\tthis.setTitle(\"PROCESOS - PERMISOS INDIVIDUALES (AGREGANDO)\");\r\n\t\tthis.opcion = 1;\r\n\t\tactivarFormulario();\r\n\t\tlimpiarTabla();\r\n\t\tthis.panelBotones.habilitar();\r\n\t}",
"public void imprimir() {\r\n NodoPila reco=raiz;\r\n System.out.println(\"Listado de todos los elementos de la pila:\");\r\n while (reco!=null) {\r\n System.out.print(reco.dato+\" \");\r\n reco=reco.sig;\r\n System.out.println();\r\n }\r\n System.out.println();\r\n }",
"private void registrar() {\n String nombre = txtNombre.getText();\n if (!nombre.trim().isEmpty()) {\n Alumno a = new Alumno();\n \n // cont++ , ++cont\n// contIds++;\n a.setNombre(nombre);\n a.setId(++contIds);\n \n listaAlumnos.add(a);\n\n lblCantidad.setText(\"Cantidad de nombres: \" + listaAlumnos.size());\n\n txtNombre.setText(null);\n txtNombre.requestFocus();\n // Actualiza la interfaz gráfica de la tabla\n tblNombres.updateUI();\n \n// int cont = 1;\n// System.out.println(\"------------------\");\n// System.out.println(\"Listado de alumnos\");\n// System.out.println(\"------------------\");\n// for (String nom : listaNombres) {\n// System.out.println(cont+\") \"+nom);\n// cont++;\n// }\n// System.out.println(\"------------------\");\n }\n }",
"private void setSITACI(Element element) {\r\n\t\tElement eSitaci = new Element(\"D_EnviaSITACI\");\r\n\t\tif(this.registrosSitaci.size()<0){\r\n\t\t\teSitaci.setText(\"NO\");\r\n\t\t\telement.addContent(eSitaci);\r\n\t\t}else{\r\n\t\t\teSitaci.setText(\"SI\");\r\n\t\t\telement.addContent(eSitaci);\r\n\t\t\tElement listaSitaci = new Element(\"N_ListaSITACI\");\r\n\t\t\tElement registroSitaci;\r\n\t\t\tElement interiorRegistroSitaci;\r\n\t\t\tfor(RegistroSitaci reg : this.registrosSitaci){\r\n\t\t\t\tregistroSitaci = new Element(\"uniqueKey\");\r\n\t\t\t\tregistroSitaci.setAttribute(\"D_Id\", \"NA\");\r\n\t\t\t\tregistroSitaci.setAttribute(\"campoCQ\", \"dbid\");\r\n\t\t\t\tregistroSitaci.setAttribute(\"entidadCQ\", \"SITACI\");\r\n\t\t\t\t\r\n\t\t\t\t//nroSitaci\r\n\t\t\t\tinteriorRegistroSitaci = new Element(\"D_NroSITACI\");\r\n\t\t\t\tinteriorRegistroSitaci.setText(reg.getNroSitaci());\r\n\t\t\t\tregistroSitaci.addContent(interiorRegistroSitaci);\r\n\t\t\t\t//DNSorigen\r\n\t\t\t\tinteriorRegistroSitaci = new Element(\"D_DNSOrigen\");\r\n\t\t\t\tinteriorRegistroSitaci.setText(reg.getDnsOrigen());\r\n\t\t\t\tregistroSitaci.addContent(interiorRegistroSitaci);\r\n\t\t\t\t//Longitud\r\n\t\t\t\tinteriorRegistroSitaci = new Element(\"D_Long\");\r\n\t\t\t\tinteriorRegistroSitaci.setText(String.valueOf(reg.getLongitud()));\r\n\t\t\t\tregistroSitaci.addContent(interiorRegistroSitaci);\r\n\t\t\t\t//cantReg\r\n\t\t\t\tinteriorRegistroSitaci = new Element(\"D_CantReg\");\r\n\t\t\t\tinteriorRegistroSitaci.setText(String.valueOf(reg.getCantReg()));\r\n\t\t\t\tregistroSitaci.addContent(interiorRegistroSitaci);\r\n\t\t\t\t//Descripcion\r\n\t\t\t\tinteriorRegistroSitaci = new Element(\"D_DescSITACI\");\r\n\t\t\t\tinteriorRegistroSitaci.setText(reg.getDescripcion());\r\n\t\t\t\tregistroSitaci.addContent(interiorRegistroSitaci);\r\n\t\t\t\t//agrego un registro\r\n\t\t\t\tlistaSitaci.addContent(registroSitaci);\r\n\t\t\t}\r\n\t\t\t//Agrego toda la lista al cuerpo del xml\r\n\t\t\telement.addContent(listaSitaci);\r\n\t\t}\t\t\r\n\t\t\r\n\t}",
"public void insertar(Proceso p) {\n\t\tif (p == null) {\n\t\t\treturn;\n\t\t}\n\t\tProceso nuevo = new Proceso();\n\t\tnuevo.rafaga = p.rafaga;\n\t\tnuevo.tllegada = p.tllegada;\n\t\tnuevo.IdCola = this.IdCola;\n\t\tnuevo.NombreCola = this.NombreCola;\n\t\tnuevo.rrejecutada = p.rrejecutada;\n\t\tnuevo.ColaProviene = p.ColaProviene;\n\t\tint tamaņo = p.id.length();\n\t\tif (tamaņo == 1) {\n\t\t\tnuevo.id = p.id + \"1\";\n\t\t} else {\n\t\t\tchar id = p.id.charAt(0);\n\t\t\tint numeroId = Integer.parseInt(String.valueOf(p.id.charAt(1))) + 1;\n\t\t\tnuevo.id = String.valueOf(id) + String.valueOf(numeroId);\n\t\t}\n\t\tif (raiz.sig == raiz) {\n\t\t\traiz.sig = nuevo;\n\t\t\tcabeza = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\tnuevo.padre = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t} else {\n\t\t\tProceso aux = raiz.padre;\n\t\t\taux.sig = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t\tnuevo.padre = aux;\n\t\t}\n\t\tthis.numProcesos++;\n\t\tthis.rafagaTotal += nuevo.rafaga;\n\t\tthis.Ordenamiento();\n\t}",
"public void actualizarPedido(PedidoIndividual pedido) throws QRocksException;",
"@Override\n\tpublic void registrarLlegada() {\n\t\t\n\t}",
"@Override\n public Nodo ejecutar() {\n listaNodos.add(nodoRaiz);\n //nodo almacenado temporalmente\n Nodo nodoActual;\n //cola de hijos producto de aplicar ops\n ArrayList <Nodo> cola;\n \n NODO:while(!(listaNodos.isEmpty()))\n {\n nodoActual=listaNodos.get(0);\n listaNodos.remove(0);\n //Detecto el nodo como un ciclo y salto si sí es luego verifico meta\n if(nodoCiclo(nodoActual))\n {\n \n// System.out.println(\"Es Ciclo: \"+nodoActual.getOperador());\n continue NODO;\n }\n else if(esMeta(nodoActual)){\n solucion(nodoActual);\n JOptionPane.showMessageDialog(null, \"nodos expandidos\"+nodoexpandidos+\"profundidad\"+profundidad);\n return nodoActual;\n }\n //Expando Nodo\n cola=expandirNodo(nodoActual);\n nodoexpandidos++;\n for(int i=0;i<cola.size();i++)\n {\n Nodo temporal=cola.get(i);\n cola.set(i, temporal);\n \n }\n //Armo cola general\n cola.addAll(listaNodos);\n listaNodos=(ArrayList <Nodo>)cola.clone();\n }\n return null;\n }",
"public void aumentarReproducidas() {\n\t\tsuper.aumentarReproducidas();\n\n\t}",
"void actualizar(Prestamo prestamo);",
"public void mostrarNuevaPregunta(){\n p = new Pregunta();\n preguntaView.setText(p.getPregunta());\n }",
"public void push(datos libro) {\n\t\tNodo nodo=new Nodo(libro);\n //SI CABEZA ES IGUAL A NULO\n\t\tif (cabeza==null) {\n //LO INGRESARA EN CABEZA\n\t\t\tcabeza=nodo;\n //DE LO CONTRARIO LE ASIGNARA UN PUNTERO A CUAL INGRESAR LOS DATOS\n\t\t} else {\n\t\t\tNodo puntero=cabeza;\n\t\t\twhile (puntero.siguiente!=null) {\n\t\t\t\tpuntero=puntero.siguiente;\n\t\t\t}\n\t\t\tpuntero.siguiente=nodo;\n\t\t}\n\t\tlongitud++;\n\t}",
"@Override\r\n\tpublic void entregarRecibo() {\n\t\tSystem.out.println(\"Imprimir recibo\");\r\n\t}",
"public void setPregunta(String Pregunta) {\n sPregunta = Pregunta;\n }",
"private void registrarSolicitudOficioBien(SolicitudOficioBienDTO solicitudOficioBienDTO) {\n\n // Fecha solicitud\n solicitudOficioBienDTO.setFechaSolicitud(Calendar.getInstance().getTime());\n SolicitudOficioBien solicitudOficioBien = SolicitudOficioBienHelper.toLevel1Entity(solicitudOficioBienDTO,\n null);\n em.persist(solicitudOficioBien);\n solicitudOficioBienDTO.setId(solicitudOficioBien.getId());\n // Solicitud bien entidad\n for (SolicitudBienEntidadDTO solicitudBienEntidadDTO : solicitudOficioBienDTO.getSolicitudBienEntidadDTOs()) {\n solicitudBienEntidadDTO.setSolicitudOficioBienDTO(solicitudOficioBienDTO);\n registrarSolicitudBienEntidad(solicitudBienEntidadDTO);\n }\n }",
"public void setSecuenciaPregunta(int secuenciaPregunta) {\n this.secuenciaPregunta = secuenciaPregunta;\n }",
"@Override\n protected void regolaRisultato(String risultatoRequest) {\n HashMap mappa = null;\n super.regolaRisultato(risultatoRequest);\n\n if (risultatoRequest != null) {\n mappa = LibWiki.creaMappaQuery(risultatoRequest);\n }// fine del blocco if\n\n if (mappa != null) {\n if (mappa.get(PagePar.missing.toString()) != null && (Boolean) mappa.get(PagePar.missing.toString())) {\n setRisultato(TipoRisultato.nonTrovata);\n valida = false;\n }// end of if cycle\n\n if (mappa.get(PagePar.missing.toString()) != null && !(Boolean) mappa.get(PagePar.missing.toString())) {\n if (mappa.get(PagePar.content.toString()) != null) {\n setRisultato(TipoRisultato.letta);\n valida = true;\n }// end of if cycle\n }// end of if cycle\n }// fine del blocco if\n }",
"private void adicionar(No novo, Pessoa pessoa) {\n if(raiz == null)\n raiz = new No(pessoa);\n else{\n if(pessoa.getIdade()<novo.getPessoa().getIdade()){\n if(novo.getEsquerda() != null)\n adicionar(novo.getEsquerda() , pessoa);\n else\n novo.setEsquerda(new No(pessoa));\n }else{\n if(novo.getDireita() !=null)\n adicionar(novo.getDireita(), pessoa);\n else\n novo.setDireita(new No(pessoa));\n }\n }\n \n }",
"public Libro recupera(String nombre);",
"public void insertarInicio(E dato) {\n\t\tprimero=new Nodo<E>(dato,primero);\n\t\tif (estaVacia()) {\n\t\t\tultimo=primero;\n\t\t}\n\t\tcantidad++;\n\t}",
"public void AddReliquias(){\n DLList reliquias = new DLList();\n reliquias.insertarInicio(NombreReliquia); \n }",
"public static void apagarProduto(){\n if(ListaDProduto.size() == 0){\n SaidaDados(\"Nehum produto cadastrado!!\");\n return;\n }\n \n String pesquisarNome = Entrada(\"Informe o nome do produto que deseja deletar: \");\n for(int i =0; i < ListaDProduto.size(); i++){\n \n Produto produtoProcurado = ListaDProduto.get(i);\n \n if(pesquisarNome.equalsIgnoreCase(produtoProcurado.getNome())){\n ListaDProduto.remove(i);\n SaidaDados(\"Produto deletado com sucesso!!\");\n }\n \n }\n \n }",
"public void agregarAlinicio(int el){\n if(!estVacia()){\n inicio=new NodoDoble(el, inicio, null);\n inicio.siguiente.anterior=inicio;\n }else{\n inicio=fin=new NodoDoble(el);\n }\n }",
"public void insereFim(TinfoTransicao item) {\t\t\n\t\tTnodoTransicao novo = new TnodoTransicao(item);\n\t\tnovo.proximo = this.ultimo.proximo;\n\t\tthis.ultimo.proximo = novo;\n\t\tthis.ultimo = novo;\t\n\t}",
"private void registrarRecibo_() throws Exception {\t\n\t\t\n\t\tif (CajaUtil.CAJAS_ABIERTAS.get(this.selectedItem.getPos6()) != null) {\n\t\t\tString msg = \"CAJA BLOQUEADA POR USUARIO: \" + CajaUtil.CAJAS_ABIERTAS.get(this.selectedItem.getPos6());\n\t\t\tClients.showNotification(msg, Clients.NOTIFICATION_TYPE_ERROR, null, null, 0);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tthis.nvoRecibo.setPos1(\"\");\n\t\tthis.nvoRecibo.setPos2(new Date());\n\t\tWindowPopup wp = new WindowPopup();\n\t\twp.setDato(this);\n\t\twp.setModo(WindowPopup.NUEVO);\n\t\twp.setHigth(\"300px\");\n\t\twp.setWidth(\"400px\");\n\t\twp.setCheckAC(new ValidadorRegistrarRecibo());\n\t\twp.setTitulo(\"Registrar Recibo de Pago\");\n\t\twp.show(ZUL_REGISTRAR_RECIBO);\n\t\tif (wp.isClickAceptar()) {\n\t\t\t\n\t\t\tif (CajaUtil.CAJAS_ABIERTAS.get(this.selectedItem.getPos6()) != null) {\n\t\t\t\tString msg = \"CAJA BLOQUEADA POR USUARIO: \" + CajaUtil.CAJAS_ABIERTAS.get(this.selectedItem.getPos6());\n\t\t\t\tClients.showNotification(msg, Clients.NOTIFICATION_TYPE_ERROR, null, null, 0);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tString numeroRecibo = ((String) this.nvoRecibo.getPos1()).toUpperCase();\n\t\t\tDate fechaRecibo = (Date) this.nvoRecibo.getPos2();\n\t\t\tlong idOrdenPago = this.selectedItem.getId();\n\t\t\tString user = this.getLoginNombre();\n\t\t\tAssemblerRecibo.registrarReciboPago(numeroRecibo, fechaRecibo, idOrdenPago, user, false, false);\t\t\t\n\t\t\tthis.selectedItem = null;\n\t\t\tthis.mensajePopupTemporal(\"Recibo Registrado..\", 5000);\n\t\t}\t\n\t}",
"@Override\n\tpublic void registrarLlegada() {\n\t}",
"public void tutki(Suunta suunta);",
"public void newElemento(Elemento item, Carrito carrito){\n SQLiteDatabase db = helper.getWritableDatabase();\r\n\r\n // TODO: 12.- Mapeamos columnas con valores\r\n // Crea un nuevo mapa de valores, de tipo clave-valor, donde clave es nombre de columna\r\n ContentValues values = new ContentValues();\r\n values.put(ElementosContract.Entrada.COLUMNA_CARRITO_ID, carrito.getId());\r\n values.put(ElementosContract.Entrada.COLUMNA_NOMBRE_PRODUCTO, item.getNombreProducto());\r\n values.put(ElementosContract.Entrada.COLUMNA_PRECIO_PRODUCTO, item.getPrecioProducto());\r\n values.put(ElementosContract.Entrada.COLUMNA_CANTIDAD, item.getCantidad());\r\n\r\n // TODO: 13.- Insertamos fila\r\n // Inserta la nueva fila, regresando el valor de la primary key\r\n long newRowId = db.insert(ElementosContract.Entrada.NOMBRE_TABLA, null, values);\r\n\r\n // cierra conexión\r\n db.close();\r\n }"
] | [
"0.6628605",
"0.66254056",
"0.65541565",
"0.6536156",
"0.6275131",
"0.61301917",
"0.6119896",
"0.608372",
"0.60155755",
"0.600613",
"0.5948037",
"0.5944242",
"0.59061",
"0.5876781",
"0.58712417",
"0.5869598",
"0.5859002",
"0.58051115",
"0.5799686",
"0.5787733",
"0.5735663",
"0.57324255",
"0.5722025",
"0.57206273",
"0.5707593",
"0.5672063",
"0.5649737",
"0.56205994",
"0.5606246",
"0.5598255",
"0.5597008",
"0.5573135",
"0.5550122",
"0.5549547",
"0.5528467",
"0.5510663",
"0.54958934",
"0.5493998",
"0.5487228",
"0.5478859",
"0.5472801",
"0.5467571",
"0.54592776",
"0.5441935",
"0.5428673",
"0.5427782",
"0.54254496",
"0.5418977",
"0.54077154",
"0.54050237",
"0.54031765",
"0.53973037",
"0.53861684",
"0.53806126",
"0.5380407",
"0.5380384",
"0.53786504",
"0.5377133",
"0.5376985",
"0.5376511",
"0.53706497",
"0.5370009",
"0.5361393",
"0.53515816",
"0.53425765",
"0.53415644",
"0.53384477",
"0.5338372",
"0.5333722",
"0.53287995",
"0.53253096",
"0.53172356",
"0.5316197",
"0.5297645",
"0.5295686",
"0.5294702",
"0.5289935",
"0.52880263",
"0.52879",
"0.52783036",
"0.5276684",
"0.5274842",
"0.5274437",
"0.5273456",
"0.52724373",
"0.52710617",
"0.5269335",
"0.5263138",
"0.52620435",
"0.526106",
"0.5256301",
"0.52560866",
"0.5254335",
"0.5240406",
"0.52386403",
"0.5234251",
"0.5234075",
"0.5233443",
"0.52307814",
"0.5228865",
"0.5222625"
] | 0.0 | -1 |
Delivers the response of a kommand execution | void onCompleted(T response); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void handleResponse(byte[] result, Command originalCommand);",
"public Object handleCommandResponse(Object response) throws RayoProtocolException;",
"protected abstract DispatchOutcome dispatchCommand(CommandEnvelope cmd);",
"public abstract boolean commandExecution(CommandSender sender, String label, String[] args);",
"public interface CommandResponse {\n void onSuccess(String response);\n void onFailure(Exception e);\n void onCompleted(int id,int exitCode);\n}",
"WrappedAnswer execute(WrappedCommand aWrappedCommand);",
"Command handleExecute(CommandExecute commandExecute);",
"public void handleCommand(String command);",
"public interface CommandResponse {\n /**\n * If command process success\n *\n * @return true success else failure\n */\n public boolean isSuccess();\n\n /**\n * Build command process result\n *\n * @return json format result data\n */\n public String build();\n}",
"@Override\n protected void onPostExecute(String result) {\n Log.d(TAG, \"GoPro command ret: \"+result);\n Message msg = Message.obtain();\n msg.what = m_command;\n //msg.setData((Bundle) result);\n _handler.sendMessage(msg);\n }",
"public interface CommandSender \n{\n /**\n * Handle a respond from the robot.\n * @param result The result.\n * @param originalCommand The command which was sent to the robot.\n */\n public void handleResponse(byte[] result, Command originalCommand);\n \n /**\n * Handle an error that occured when communicating to the robot.\n * @param code The error code that was sent by the robot.\n */\n public void handleError(int code);\n \n /**\n * Needed when sending a command repetitively to the robot.\n * @return The command string that should be used.\n */\n public Command getCurrentCommand();\n \n}",
"@Override\n\tpublic void execute() {\n\t\tcmdReceiver.send();\n\t}",
"@Override\n public void execute() {\n if(state.getState()!=1) {\n client.printParseMessage();\n return;\n } else if(inputArgs.length < 1) {\n System.out.println(client.strings.getString(\"manage_command_message\"));\n return;\n }\n try {\n client.setDraftTag(inputArgs[0]);\n channel.send(new ReadRequest(client.getDraftTag()));\n ReadReply reply = (ReadReply) channel.receive();\n if(!reply.lines.isEmpty()) {\n String replyLine = reply.lines.get(reply.lines.size() - 1);\n if(Push.CLOSE_LINE.equals(replyLine)) {\n System.out.println(client.strings.getString(\"manage_close_command_message\"));\n return;\n }\n }\n } catch (IOException | ClassNotFoundException ex) {\n Logger.getLogger(ReadCommand.class.getName())\n .log(Level.SEVERE, null, ex);\n }\n state.setState(2);\n }",
"public interface Command {\n\t public String execute(String[] request);\n}",
"protected abstract InGameServerCommand getCommandOnConfirm();",
"@Override\n public Answer executeRequest(Command cmd) {\n return null;\n }",
"public String \n getCommand() \n {\n return pCommand;\n }",
"java.lang.String getCommand();",
"public String getCommandReturned() {\n return commandReturned;\n }",
"public abstract CommandResponse onCommand(CommandSender sender, String label, String[] args);",
"private void processCommand()\n {\n String vInput = this.aEntryField.getText();\n this.aEntryField.setText(\"\");\n\n this.aEngine.interpretCommand( vInput );\n }",
"public void commandEntered(String cmd)\n {\n String cleaned = StringUtils.cleanWhiteSpace(cmd.trim());\n String args[] = cleaned.split(\" \");\n \tString c = args[0];\n \n Runnable cb = new Runnable() { public void run() { cbEmptyResponse(); } };\n \n \tif (c.equals(\"name\"))\n cb = new Runnable() { public void run() { cbName(); } };\n else if (c.equals(\"version\")) \n cb = new Runnable() { public void run() { cbVersion(); } };\n else if (c.equals(\"genmove\")) \n cb = new Runnable() { public void run() { cbGenMove(); } };\n else if (c.equals(\"all_legal_moves\")) \n cb = new Runnable() { public void run() { cbDisplayPointList(); } };\n else if (c.equals(\"get_absorb_group\"))\n cb = new Runnable() { public void run() { cbGetAbsorbGroup(); } };\n \n \telse if (c.equals(\"shortest_paths\")) \n cb = new Runnable() { public void run() { cbDisplayPointList(); } };\n \telse if (c.equals(\"shortest_vc_paths\")) \n cb = new Runnable() { public void run() { cbDisplayPointList(); } };\n \n else if (c.equals(\"compute_dead_cells\"))\n cb = new Runnable() { public void run() { cbComputeDeadCells(); } };\n else if (c.equals(\"vc-build\"))\n cb = new Runnable() { public void run() { cbComputeDeadCells(); } };\n else if (c.equals(\"vc-build-incremental\"))\n cb = new Runnable() { public void run() { cbComputeDeadCells(); } };\n \n \n else if (c.equals(\"solver-find-winning\"))\n cb = new Runnable() { public void run() { cbDisplayPointList(); } }; \n \n else if (c.equals(\"find_sealed\")) \n cb = new Runnable() { public void run() { cbDisplayPointList(); } };\n else if (c.equals(\"strengthen_vcs\")) \n cb = new Runnable() { public void run() { cbDisplayPointList(); } };\n \n \n else if (c.equals(\"book-depths\")) \n cb = new Runnable() { public void run() { cbDisplayPointText(); } };\n else if (c.equals(\"book-sizes\")) \n cb = new Runnable() { public void run() { cbDisplayPointText(); } };\n else if (c.equals(\"book-scores\"))\n cb = new Runnable() { public void run() { cbDisplayPointText(); } };\n \telse if (c.equals(\"book-priorities\"))\n cb = new Runnable() { public void run() { cbDisplayPointText(); } };\n \n else if (c.equals(\"db-get\")) \n cb = new Runnable() { public void run() { cbDBGet(); } };\n \n else if (c.equals(\"vc-connected-to\")) \n cb = new Runnable() { public void run() { cbDisplayPointList(); } };\n else if (c.equals(\"vc-between-cells\"))\n cb = new Runnable() { public void run() { cbBetweenCells(); } };\n else if (c.equals(\"vc-get-mustplay\"))\n cb = new Runnable() { public void run() { cbDisplayPointList(); } };\n else if (c.equals(\"vc-intersection\"))\n cb = new Runnable() { public void run() { cbDisplayPointList(); } };\n else if (c.equals(\"vc-union\"))\n cb = new Runnable() { public void run() { cbDisplayPointList(); } };\n \n else if (c.equals(\"eval_twod\")) \n cb = new Runnable() { public void run() { cbDisplayPointText(); } };\n else if (c.equals(\"eval_resist\")) \n cb = new Runnable() { public void run() { cbEvalResist(); } };\n else if (c.equals(\"eval_resist_delta\")) \n cb = new Runnable() { public void run() { cbEvalResistDelta(); } };\n \telse if (c.equals(\"eval_influence\"))\n cb = new Runnable() { public void run() { cbDisplayPointText(); } };\n \n else if (c.equals(\"mohex-show-rollout\")) \n cb = new Runnable() { public void run() { cbMohexShowRollout(); } };\n else if (c.equals(\"quit\")) \n cb = new Runnable() { public void run() { cbEmptyResponse(); } };\n \n sendCommand(cmd, cb);\n }",
"public void actionPerformed( ActionEvent event )\n {\n KalumetConsoleApplication.getApplication().getLogPane().addInfo(\n \"Software \" + name + \" command \" + commandName + \" execution in progress ...\",\n parent.getEnvironmentWindow().getEnvironmentName() );\n parent.getEnvironmentWindow().getChangeEvents().add(\n \"Software \" + name + \" command \" + commandName + \" execution requested.\" );\n // start the execute command thread\n final ExecuteCommandThread executeCommandThread = new ExecuteCommandThread();\n executeCommandThread.commandName = commandName;\n executeCommandThread.start();\n // sync with the client\n KalumetConsoleApplication.getApplication().enqueueTask(\n KalumetConsoleApplication.getApplication().getTaskQueue(), new Runnable()\n {\n public void run()\n {\n if ( executeCommandThread.ended )\n {\n if ( executeCommandThread.failure )\n {\n KalumetConsoleApplication.getApplication().getLogPane().addError(\n executeCommandThread.message,\n parent.getEnvironmentWindow().getEnvironmentName() );\n parent.getEnvironmentWindow().getChangeEvents().add(\n executeCommandThread.message );\n }\n else\n {\n KalumetConsoleApplication.getApplication().getLogPane().addConfirm(\n \"Software \" + name + \" command \" + commandName + \" executed.\",\n parent.getEnvironmentWindow().getEnvironmentName() );\n parent.getEnvironmentWindow().getChangeEvents().add(\n \"Software \" + name + \" command \" + commandName + \" executed.\" );\n }\n }\n else\n {\n KalumetConsoleApplication.getApplication().enqueueTask(\n KalumetConsoleApplication.getApplication().getTaskQueue(), this );\n }\n }\n } );\n }",
"private String parseAndRespond() {\n\t\tList<String> commands = new ArrayList<String>();\n\t\twhile (input.hasNext()) {\n\t\t\tString inputToken = input.next();\n\t\t\tcommands.add(inputToken);\n\t\t\tcommands.get(commands.size()-1).chars().forEach(p -> System.out.println(p));\n\t\t\t\n\t\t\t/* trap telnet control c */\n\t\t\tString telnetControlC = IntStream.of(65533,65533,65533,65533,6).collect(StringBuilder::new,\n\t\t\t\t\tStringBuilder::appendCodePoint, StringBuilder::append).toString();\n\t\t\tif (inputToken.contains(telnetControlC)) { \n\t\t\t\tSystem.out.println(\"Caught you CTRL+C evil!\");\n\t\t\t\treturn EXIT;\n\t\t\t}\n\t\t\tif (commands.get(commands.size()-1).equals(\".\")) {\n\t\t\t\tcommands.remove(commands.size()-1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tif (commands.get(commands.size()-1).equals(EXIT)) return EXIT;\n\t\t\t\n\t\t}\n\t\t\n\t\tString response = \"\";\n\t\t/* I'm not sure if I want to trap an error or let it percolate up yet */\n\t\t\n//\t\ttry {\n\t\t\tresponse = commandInterpreter.interpretCommands(commands);\n//\t\t} catch (IOException e) {\n//\t\t\tlogger.log(Level.WARNING, \"Error interpreting commands\", e);\n//\t\t\tresponse = \"Error occured!\";\n//\t\t}\n\t\toutput.format(\"%s\\n>\",response);\n\t\toutput.flush();\n\t\t\n\n\t\treturn \"\";\n\n\t}",
"private void retriveCommand(){\n\t\tdirections.add(\"Turn left.\");\n\t\tdirections.add(\"Walk 20 meters and turn right.\");\n\t\tdirections.add(\"Arrive destination.\");\n\t}",
"public abstract void execute(CommandSender sender, String[] args);",
"public interface Command extends ResponseElement\n{\n\tpublic void setParameter(String paramName, Object paramValue);\n\n\tpublic void setModel(String model);\n\n\t/**\n\t * Return the name of the model specified for this command, in the form it would appear\n\t * in the configuration file\n\t */\n\tpublic String getModel();\n\n\t/**\n\t * Return a map of any parameter specified for this command\n\t */\n\tpublic Map getParameters();\n\n\t/**\n\t * Convenience method, equivilant to execute(req, res, false, false)\n\t */\n\tpublic ModelResponse execute(ModelRequest req, ModelResponse res) throws ModelException;\n\n\t/**\n\t * Execute the model specified by this command and return the model\n\t * response.\n\t * @param req The previous request. The model being will have this request available via\n\t * it's getPreviousRequest method\n\t * @param res The current response. The new response will always include any errors stored in this response,\n\t * but will not include any response elements already generated unless includeResponseElements is true\n\t * @param includeParams Include request parameters from the old request when building the new request. Normally,\n\t * a command has it's parameters set via \"setParameter\", just like a request, and these are the only parameters\n\t * used in the new request. If this flag is true, however, any parameters that exist in the current request\n\t * and that have not been specified via setParameter are populated from the current request.\n\t * @param includeResponseElements Include any response elements from the current response (res) in the newly\n\t * generated response. If an element in the new response has the same name as an element in the current response,\n\t * use the new one only.\n\t */\n\tpublic ModelResponse execute(ModelRequest req, ModelResponse res, boolean includeParams,\n\t\t\t\t\tboolean includeResponseElements) throws ModelException;\n\n\tpublic void setLabel(String newLabel);\n\n\tpublic String getLabel();\n\n\tpublic void setRelativeMovement(int numberOfSteps);\n\n\tpublic int getRelativeMovement();\n\n\tpublic void setBean(String bean);\n\n\tpublic String getBean();\n}",
"protected boolean onExecute(String command, long hconv)\n {\n return onExecute(command);\n }",
"@Override\n public void sendSelectionMessage(CommandHandler commandHandler) {\n try {\n commandHandler.update(new Response(null, true, Constants.MAIN_ACTION));\n } catch (Observer.CommunicationError error) {\n error.printStackTrace();\n }\n }",
"String getCommand();",
"@Override\n public void dealWithCommand(MessageReceivedEvent event) {\n List<String> contentSplit = new ArrayList<>(Arrays.asList(event.getMessage().getContentStripped().split(\" \")));\n\n // remove the command part of the message\n contentSplit.remove(0);\n boolean isXpDesired = DetermineArguments.determineIsXpDesired(contentSplit);\n boolean isCollection = DetermineArguments.determineIsCollection(contentSplit);\n long timeToSpend = DetermineArguments.determineTimeToSpend(contentSplit, event.getTextChannel());\n int classLevel = DetermineArguments.determineClassLevel(contentSplit, event.getTextChannel());\n long amountDesired = DetermineArguments.determineAmountDesired(contentSplit, event.getTextChannel());\n\n // be done if something bad was found\n if (timeToSpend == -2 || classLevel == -2 || amountDesired == -2)\n return;\n\n if (contentSplit.isEmpty()) {\n // user did not specify what player they want\n event.getChannel().sendMessage(\"Specify what player you want to analyze.\").queue();\n return;\n }\n String username = contentSplit.get(0);\n WynncraftPlayer player = GetPlayerStats.get(username);\n if (player == null) {\n event.getChannel().sendMessage(\"Either the api is down, or '\" + username + \"' is not a player.\").queue();\n return;\n }\n\n // tell the user we're working on the answer\n event.getMessage().addReaction(\"\\uD83D\\uDEE0\").queue();\n\n List<String> classNames = new ArrayList<>();\n for (WynncraftClass playerClass : player.classes) {\n classNames.add(playerClass.name);\n }\n ChoiceArguments choiceArguments = new ChoiceArguments(\n isXpDesired, isCollection, timeToSpend, amountDesired, classLevel, classNames, player, true);\n\n\n long xpDesiredGivenPerc = 0;\n long emeraldDesiredGivenPerc = 0;\n for (WynncraftClass wynncraftClass : player.classes)\n for (Quest quest : wynncraftClass.questsNotCompleted) {\n if (quest.levelMinimum <= (classLevel == -1 ? wynncraftClass.combatLevel : classLevel)) {\n xpDesiredGivenPerc += quest.xp;\n emeraldDesiredGivenPerc += quest.emerald;\n }\n }\n xpDesiredGivenPerc *= GetAnswers.DEFAULT_PERCENTAGE_AMOUNT;\n emeraldDesiredGivenPerc *= GetAnswers.DEFAULT_PERCENTAGE_AMOUNT;\n\n FinalQuestOptionsAll finalQuestOptionsAll = GetAnswers.getAllFullAnswers(player, choiceArguments);\n String spreadsheetId = SheetsWrite.writeSheet(finalQuestOptionsAll, event.getAuthor().getIdLong(), player.name, true);\n if (spreadsheetId == null) return;\n new QuestRecommendationMessagePlayer(spreadsheetId, finalQuestOptionsAll, event.getChannel(), choiceArguments, xpDesiredGivenPerc, emeraldDesiredGivenPerc);\n\n event.getMessage().removeReaction(\"\\uD83D\\uDEE0\", DiscordBot.client.getSelfUser()).queue();\n }",
"public abstract void doCommand(String command);",
"private String getResponse(String input) {\n try {\n CommandResult result = logicManager.execute(input);\n if (result.isExit()) {\n handleExit();\n }\n return result.getFeedbackToUser();\n } catch (CommandException | ParserException e) {\n return e.getMessage();\n }\n }",
"public void sendReply(String cmd, String reply) {\n if (cmd.equals(\"ACTION_REPLY\")){\n long now = System.currentTimeMillis();\n long processTime = now - startTime;\n out.println(cmd + \"<<\"+processTime+\":\"+ reply);\n }else{\n //out.println(cmd + \"<<null\" + reply);\n out.println(cmd + \"<<\" + reply); //changed per drew's suggestion\n }\n \n }",
"public int onCommand(java.lang.String r6) {\n /*\n r5 = this;\n java.io.PrintWriter r0 = r5.getOutPrintWriter()\n r1 = -1\n if (r6 == 0) goto L_0x0009\n r2 = r6\n goto L_0x000b\n L_0x0009:\n java.lang.String r2 = \"\"\n L_0x000b:\n int r3 = r2.hashCode() // Catch:{ Exception -> 0x00dd }\n switch(r3) {\n case -1894245460: goto L_0x008b;\n case -1845752298: goto L_0x0081;\n case -1687551032: goto L_0x0077;\n case -1367724422: goto L_0x006d;\n case -1313911455: goto L_0x0062;\n case 113291: goto L_0x0057;\n case 55361425: goto L_0x004c;\n case 200896764: goto L_0x0040;\n case 703160488: goto L_0x0036;\n case 1749711139: goto L_0x002c;\n case 1791471818: goto L_0x0020;\n case 1854493850: goto L_0x0014;\n default: goto L_0x0012;\n } // Catch:{ Exception -> 0x00dd }\n L_0x0012:\n goto L_0x0097\n L_0x0014:\n java.lang.String r3 = \"monitor-battery\"\n boolean r2 = r2.equals(r3) // Catch:{ Exception -> 0x00dd }\n if (r2 == 0) goto L_0x0012\n r2 = 3\n goto L_0x0098\n L_0x0020:\n java.lang.String r3 = \"get-job-state\"\n boolean r2 = r2.equals(r3) // Catch:{ Exception -> 0x00dd }\n if (r2 == 0) goto L_0x0012\n r2 = 9\n goto L_0x0098\n L_0x002c:\n java.lang.String r3 = \"get-battery-not-low\"\n boolean r2 = r2.equals(r3) // Catch:{ Exception -> 0x00dd }\n if (r2 == 0) goto L_0x0012\n r2 = 6\n goto L_0x0098\n L_0x0036:\n java.lang.String r3 = \"get-battery-seq\"\n boolean r2 = r2.equals(r3) // Catch:{ Exception -> 0x00dd }\n if (r2 == 0) goto L_0x0012\n r2 = 4\n goto L_0x0098\n L_0x0040:\n java.lang.String r3 = \"heartbeat\"\n boolean r2 = r2.equals(r3) // Catch:{ Exception -> 0x00dd }\n if (r2 == 0) goto L_0x0012\n r2 = 10\n goto L_0x0098\n L_0x004c:\n java.lang.String r3 = \"get-storage-not-low\"\n boolean r2 = r2.equals(r3) // Catch:{ Exception -> 0x00dd }\n if (r2 == 0) goto L_0x0012\n r2 = 8\n goto L_0x0098\n L_0x0057:\n java.lang.String r3 = \"run\"\n boolean r2 = r2.equals(r3) // Catch:{ Exception -> 0x00dd }\n if (r2 == 0) goto L_0x0012\n r2 = 0\n goto L_0x0098\n L_0x0062:\n java.lang.String r3 = \"timeout\"\n boolean r2 = r2.equals(r3) // Catch:{ Exception -> 0x00dd }\n if (r2 == 0) goto L_0x0012\n r2 = 1\n goto L_0x0098\n L_0x006d:\n java.lang.String r3 = \"cancel\"\n boolean r2 = r2.equals(r3) // Catch:{ Exception -> 0x00dd }\n if (r2 == 0) goto L_0x0012\n r2 = 2\n goto L_0x0098\n L_0x0077:\n java.lang.String r3 = \"get-battery-charging\"\n boolean r2 = r2.equals(r3) // Catch:{ Exception -> 0x00dd }\n if (r2 == 0) goto L_0x0012\n r2 = 5\n goto L_0x0098\n L_0x0081:\n java.lang.String r3 = \"get-storage-seq\"\n boolean r2 = r2.equals(r3) // Catch:{ Exception -> 0x00dd }\n if (r2 == 0) goto L_0x0012\n r2 = 7\n goto L_0x0098\n L_0x008b:\n java.lang.String r3 = \"trigger-dock-state\"\n boolean r2 = r2.equals(r3) // Catch:{ Exception -> 0x00dd }\n if (r2 == 0) goto L_0x0012\n r2 = 11\n goto L_0x0098\n L_0x0097:\n r2 = r1\n L_0x0098:\n switch(r2) {\n case 0: goto L_0x00d7;\n case 1: goto L_0x00d2;\n case 2: goto L_0x00cd;\n case 3: goto L_0x00c8;\n case 4: goto L_0x00c3;\n case 5: goto L_0x00be;\n case 6: goto L_0x00b9;\n case 7: goto L_0x00b4;\n case 8: goto L_0x00af;\n case 9: goto L_0x00aa;\n case 10: goto L_0x00a5;\n case 11: goto L_0x00a0;\n default: goto L_0x009b;\n } // Catch:{ Exception -> 0x00dd }\n L_0x009b:\n int r1 = r5.handleDefaultCommands(r6) // Catch:{ Exception -> 0x00dd }\n goto L_0x00dc\n L_0x00a0:\n int r1 = r5.triggerDockState(r0) // Catch:{ Exception -> 0x00dd }\n return r1\n L_0x00a5:\n int r1 = r5.doHeartbeat(r0) // Catch:{ Exception -> 0x00dd }\n return r1\n L_0x00aa:\n int r1 = r5.getJobState(r0) // Catch:{ Exception -> 0x00dd }\n return r1\n L_0x00af:\n int r1 = r5.getStorageNotLow(r0) // Catch:{ Exception -> 0x00dd }\n return r1\n L_0x00b4:\n int r1 = r5.getStorageSeq(r0) // Catch:{ Exception -> 0x00dd }\n return r1\n L_0x00b9:\n int r1 = r5.getBatteryNotLow(r0) // Catch:{ Exception -> 0x00dd }\n return r1\n L_0x00be:\n int r1 = r5.getBatteryCharging(r0) // Catch:{ Exception -> 0x00dd }\n return r1\n L_0x00c3:\n int r1 = r5.getBatterySeq(r0) // Catch:{ Exception -> 0x00dd }\n return r1\n L_0x00c8:\n int r1 = r5.monitorBattery(r0) // Catch:{ Exception -> 0x00dd }\n return r1\n L_0x00cd:\n int r1 = r5.cancelJob(r0) // Catch:{ Exception -> 0x00dd }\n return r1\n L_0x00d2:\n int r1 = r5.timeout(r0) // Catch:{ Exception -> 0x00dd }\n return r1\n L_0x00d7:\n int r1 = r5.runJob(r0) // Catch:{ Exception -> 0x00dd }\n return r1\n L_0x00dc:\n return r1\n L_0x00dd:\n r2 = move-exception\n java.lang.StringBuilder r3 = new java.lang.StringBuilder\n r3.<init>()\n java.lang.String r4 = \"Exception: \"\n r3.append(r4)\n r3.append(r2)\n java.lang.String r3 = r3.toString()\n r0.println(r3)\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.server.job.JobSchedulerShellCommand.onCommand(java.lang.String):int\");\n }",
"@Override\r\n\tpublic String execute(HttpServletRequest request, HttpServletResponse response ) throws CmdException {\n\t\t\r\n\t \r\n\t\tString email = \"[email protected]\";\r\n//\t\tSystem.out.println(email);\r\n\t\tList<QA> answerList = CacaoAdminService.getInstance().getAnswerList();\r\n\t\t\r\n\t\trequest.setAttribute(\"answerList\", answerList);\r\n\t\t\r\n\t\t\r\n\t\treturn next;\t\t\t\r\n\t}",
"private void command(){\n out.println(\"Enter command: \");\n String comInput = in.nextLine();\n\n if (comInput.toLowerCase().equals(\"vote\")) {\n voteCommand();\n }else if (comInput.toLowerCase().equals(\"trade\")){\n tradeCommand();\n }else if (comInput.toLowerCase().equals(\"next\")){\n out.println(waitPrint());\n await();\n// nextRound();\n }else if(comInput.toLowerCase().equals(\"logout\")){\n// login = false;\n logout();\n }\n }",
"static String answer(String command)\n {\n return stateDependentAnswer.apply(command);\n }",
"public String receiveResponse()\n\t{\n\t\t\n\t}",
"public abstract void exec(CommandSender sender, String[] args);",
"public void sendCommand(Command cmd);",
"@Override\r\n public void execute(Command command) {\n\r\n }",
"public Builder setCommand(network.message.PlayerResponses.Command value) {\n if (commandBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n response_ = value;\n onChanged();\n } else {\n commandBuilder_.setMessage(value);\n }\n responseCase_ = 2;\n return this;\n }",
"@Override\r\n\tpublic String execute(String request) {\n\t\treturn response = \"The command is invalid\";\r\n\r\n\t}",
"public void commandAction(Command cmd, Displayable source) {\n if (cmd == CMD_OK) {\n midlet.textEditorDone(textField.getString());\n } else if (cmd == CMD_CANCEL) {\n midlet.textEditorDone(null);\n } else {\n // Functionality to handle for unexpected commands may be added here...\n }\n }",
"CommandResult execute();",
"public abstract String getCommand();",
"public network.message.PlayerResponses.Command getCommand() {\n if (commandBuilder_ == null) {\n if (responseCase_ == 2) {\n return (network.message.PlayerResponses.Command) response_;\n }\n return network.message.PlayerResponses.Command.getDefaultInstance();\n } else {\n if (responseCase_ == 2) {\n return commandBuilder_.getMessage();\n }\n return network.message.PlayerResponses.Command.getDefaultInstance();\n }\n }",
"protected abstract void askResponse();",
"void processCommand (String command, ZMsg msg);",
"void sendCommand(CommandEvent event);",
"public void endCommand();",
"private boolean promptCommand() {}",
"@Override\n public byte[] execute() {\n return buildResponse();\n }",
"public boolean executeResponse(JSONObject json) {\n String responseType = json.get(\"command\").toString();\n ClientCommand command = CLIENT_RESPONSES.get(responseType);\n\n // Check that behaviour is defined for given response message\n if (command == null) {\n System.out.println(\"Error: ClientCommand validated but behaviour is undefined.\");\n return false;\n }\n command.execute(json);\n return true;\n }",
"public void onCommandReceived(AbstractCommand command) {\n\t\t\t\t\t\tif (command instanceof GrantedSessionCommand) {\n\t\t\t\t\t\t\t// Print our our unique key, this will be used for\n\t\t\t\t\t\t\t// subsequent connections\n\t\t\t\t\t\t\tUtilities.log(\"Your instanceId is \" + ((GrantedSessionCommand) command).getInstanceId());\n\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t//let's make the dock show up on the TV\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_yahoo\"));\n\n\t\t\t\t\t\t\t\tThread.sleep(2000); //sleep for 2 seconds so the animation to dock finishes\n\n\t\t\t\t\t\t\t\t// Lets do something cool, like tell the TV to navigate to the right. Then do a little dance\n\t\t\t\t\t\t\t\t// This is the same as pressing \"right\" on your remote\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_right\"));\n\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\n\t\t\t\t\t\t\t\t// slide to the left\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_left\"));\n\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\n\t\t\t\t\t\t\t\t//slide to the right\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_right\"));\n\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\n\t\t\t\t\t\t\t\t//take it back now, y'all\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_left\"));\n\n\t\t\t\t\t\t\t\t//cha cha cha\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_up\"));\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_down\"));\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_up\"));\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_down\"));\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\tUtilities.log(\"Problem writing to the network connection\");\n\t\t\t\t\t\t\t\tconn.close();\n\t\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Notify the main thread that everything we wanted to\n\t\t\t\t\t\t\t// do is done.\n\t\t\t\t\t\t\tsynchronized (conn) {\n\t\t\t\t\t\t\t\tconn.notifyAll();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else { // print out the others for educational purposes\n\t\t\t\t\t\t\tUtilities.log(\"Received: \" + command.toString());\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"public network.message.PlayerResponses.Command getCommand() {\n if (responseCase_ == 2) {\n return (network.message.PlayerResponses.Command) response_;\n }\n return network.message.PlayerResponses.Command.getDefaultInstance();\n }",
"public abstract void onCommand(MessageEvent context) throws Exception;",
"int getCommand();",
"public String processCommand(Command command) //refactored\n {\n boolean wantToQuit = false;\n //System.out.println(\"hitter boolean\");\n commandWord = command.getAction();//fehler\n //System.out.println(command);\n //System.out.println(\"enum == null\" + (commandWord == null));\n String result = \"\";\n //System.out.println(\"heyho\");\n //System.out.println(result);\n switch(commandWord){\n //case UNKNOWN: return \"I don't know what you mean...\"; break;\n \n case HELP: result += printHelp(); break;\n case GO: result += goRoom(command); break;\n case QUIT: return quit(command);//refactored from refactoring\n default: result += \"I don't know what you mean...\";\n }\n return result;\n }",
"protected String executeCommand(String line)\n throws IOException\n {\n String[] command = line.split(\" \");\n if (command.length == 0)\n {\n command = new String[1];\n command[0] = line;\n }\n \n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n PrintStream out = new PrintStream(bout);\n\n // repeat last command?\n if (command[0].equals(\"r\"))\n {\n if (lastCommand == null)\n {\n return \"No command entered yet.\";\n }\n \n if (command.length > 1 && command[1].equals(\"show\"))\n {\n return lastCommand + \"\\n\\n\";\n }\n else\n {\n return \"repeating command \" + lastCommand + \"\\n\\n\" + interpretCommand(lastCommand);\n }\n }\n \n // remember last command\n lastCommand = line;\n\n // execute command\n if (command[0].equals(\"help\"))\n {\n String helpFile = m_messages.getMessage(\"testserver.help\", null, null);\n ClassPathResource helpResource = new ClassPathResource(helpFile);\n byte[] helpBytes = new byte[500];\n InputStream helpStream = helpResource.getInputStream();\n try\n {\n int read = helpStream.read(helpBytes);\n while (read != -1)\n {\n bout.write(helpBytes, 0, read);\n read = helpStream.read(helpBytes);\n }\n }\n finally\n {\n helpStream.close();\n }\n }\n \n else if (command[0].equals(\"user\"))\n {\n if (command.length == 2)\n {\n username = command[1];\n }\n out.println(\"using user \" + username);\n }\n \n else if (command[0].equals(\"get\") ||\n command[0].equals(\"delete\"))\n {\n String uri = (command.length > 1) ? command[1] : null;\n Response res = submitRequest(command[0], uri, headers, null, null, null);\n bout.write((\"Response status: \" + res.getStatus()).getBytes());\n out.println();\n bout.write(res.getContentAsByteArray());\n out.println();\n }\n\n else if (command[0].equals(\"post\"))\n {\n String uri = (command.length > 1) ? command[1] : null;\n String contentType = (command.length > 2) ? command[2] : null;\n String body = \"\";\n for (int i = 3; i < command.length; i++)\n {\n body += command[i] + \" \";\n }\n Response res = submitRequest(command[0], uri, headers, body.getBytes(), null, contentType);\n bout.write((\"Response status: \" + res.getStatus()).getBytes());\n out.println();\n bout.write(res.getContentAsByteArray());\n out.println();\n }\n\n else if (command[0].equals(\"put\"))\n {\n String uri = (command.length > 1) ? command[1] : null;\n String contentType = (command.length > 2) ? command[2] : null;\n String body = \"\";\n for (int i = 3; i < command.length; i++)\n {\n body += command[i] + \" \";\n }\n Response res = submitRequest(command[0], uri, headers, body.getBytes(), null, contentType);\n bout.write((\"Response status: \" + res.getStatus()).getBytes());\n out.println();\n bout.write(res.getContentAsByteArray());\n out.println();\n }\n \n else if (command[0].equals(\"tunnel\"))\n {\n if (command.length < 4)\n {\n return \"Syntax Error.\\n\";\n }\n \n if (command[1].equals(\"param\"))\n {\n String uri = command[3];\n if (uri.indexOf('?') == -1)\n {\n uri += \"?alf:method=\" + command[2];\n }\n else\n {\n uri += \"&alf:method=\" + command[2];\n }\n Response res = submitRequest(\"post\", uri, headers, null, null, null);\n bout.write(res.getContentAsByteArray());\n out.println();\n }\n \n else if (command[1].equals(\"header\"))\n {\n Map<String, String> tunnelheaders = new HashMap<String, String>();\n tunnelheaders.putAll(headers);\n tunnelheaders.put(\"X-HTTP-Method-Override\", command[2]);\n Response res = submitRequest(\"post\", command[3], tunnelheaders, null, null, null);\n bout.write(res.getContentAsByteArray());\n out.println();\n }\n \n else\n {\n return \"Syntax Error.\\n\";\n }\n }\n\n else if (command[0].equals(\"header\"))\n {\n if (command.length == 1)\n {\n for (Map.Entry<String, String> entry : headers.entrySet())\n {\n out.println(entry.getKey() + \" = \" + entry.getValue());\n }\n }\n else if (command.length == 2)\n {\n String[] param = command[1].split(\"=\");\n if (param.length == 0)\n {\n return \"Syntax Error.\\n\";\n }\n if (param.length == 1)\n {\n headers.remove(param[0]);\n out.println(\"deleted header \" + param[0]);\n }\n else if (param.length == 2)\n {\n headers.put(param[0], param[1]);\n out.println(\"set header \" + param[0] + \" = \" + headers.get(param[0]));\n }\n else\n {\n return \"Syntax Error.\\n\";\n }\n }\n else\n {\n return \"Syntax Error.\\n\";\n }\n } \n\n else if (command[0].equals(\"reset\"))\n {\n container.reset();\n out.println(\"Runtime context '\" + container.getName() + \"' reset.\");\n }\n \n else\n {\n return \"Syntax Error.\\n\";\n }\n \n out.flush();\n String retVal = new String(bout.toByteArray());\n out.close();\n return retVal;\n }",
"@FXML\n\tpublic void onProcessCommand() {\n\t\tString command = prompt.getText().trim();\n\t\tif (!command.isEmpty()) {\n\t\t\t// Print what the user entered to the screen\n\t\t\tscreen.appendText(\"> \" + command + \"\\n\");\n\t\t\tswitch (command) {\n\t\t\t\tcase \"clear\":\n\t\t\t\t\tscreen.clear();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t// Print the output of the commandName\n\t\t\t\t\tscreen.appendText(commandDispatch.processCommand(command) + \"\\n\");\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// Clear the prompt - ready for new input\n\t\t\tprompt.clear();\n\t\t}\n\t}",
"public interface ClientCommand {\n\n HashMap<String, String> parameters = new HashMap<>();\n Gson gson = new Gson();\n\n\n /**\n * Handles response's status code\n * @param response the response to be checked\n * @return true if error occured, false if not\n */\n default boolean checkForError(HttpResponse response) {\n parameters.clear();\n\n\n if (response.getStatusCode() == 500) {\n System.out.println(\"Internal server error\");\n return true;\n } else if (response.getStatusCode() == 400) {\n System.out.println(\"Your input was not as expected. Use \\\"help\\\"-command to get more help.\");\n System.out.println(response.getBody());\n return true;\n } else if (response.getStatusCode() == 404) {\n System.out.println(\"The resource you were looking for could not be found. Use \\\"help\\\"-command to get more help.\");\n }\n\n return false;\n\n }\n}",
"private CommandResult executeExitCommand(Command userCommand) {\n return new CommandResult(userCommand, CommandResult.EXECUTION_SUCCESS, CommandResult.BLANK_DESCRIPTION);\n }",
"protected void executeCommand() {\n // build the type string\n StringBuilder stateString = new StringBuilder();\n StringBuilder moveNamesString = new StringBuilder();\n StringBuilder basicPieceString = new StringBuilder();\n StringBuilder factionRingString = new StringBuilder();\n\n // start the state string\n stateString.append(\"emb2;Activate;2;;;2;;;2;;;;1;false;0;-24;,\");\n basicPieceString.append(\"emb2;;2;;;2;;;2;;;;;false;0;0;\");\n\n String moveImage;\n String move = newMoveList.get(0);\n String moveWithoutSpeed = move.substring(1);\n moveImage = dialHeadingImages.get(moveWithoutSpeed);\n\n String speed = move.substring(0,1);\n String moveCode = move.substring(1,2);\n String moveName = maneuverNames.get(moveCode);\n\n basicPieceString.append(\"D2e_\" + xwsShipName + \".png\");\n basicPieceString.append(\";;false;Front Plate;;;false;;1;1;true;;;\");\n\n moveNamesString.append(moveName).append(\" \").append(speed);\n // add in move names\n stateString.append(moveImage);\n stateString.append(\";empty,\"+moveNamesString);\n\n // finish the type string\n stateString.append(\";false;Chosen Move;;;false;;1;1;true;65,130\");\n Embellishment chosenMoveEmb = (Embellishment)Util.getEmbellishment(piece,\"Layer - Chosen Move\");\n Embellishment chosenSpeedEmb = (Embellishment)Util.getEmbellishment(piece, \"Layer - Chosen Speed\");\n Embellishment fullDialEmb = (Embellishment)Util.getEmbellishment(piece, \"Layer - Front Plate\");\n Embellishment ringEmb = (Embellishment)Util.getEmbellishment(piece, \"Layer - Faction Ring\");\n\n factionRingString.append(\"emb2;;2;;;2;;;2;;;;;false;0;0;DialSelect_\");\n factionRingString.append(faction);\n factionRingString.append(\".png;;false;Faction Ring;;;false;;1;1;true;;;\");\n chosenSpeedEmb.setValue(Integer.parseInt(speed)+1);\n\n String injectDialString = \"\";\n int count=0;\n for(String moveItem : newMoveList) {\n count++;\n injectDialString+= moveItem;\n if(count!=newMoveList.size()) injectDialString+=\",\";\n }\n piece.setProperty(\"dialstring\",injectDialString);\n piece.setProperty(\"shipID\", associatedShipID);\n\n // chosen move embellishment looks like: emb2;Activate;2;;;2;;;2;;;;1;false;0;-24;,mFW.png;empty,move;false;Chosen Move;;;false;;1;1;true;65,130;;\n // chosen speed embell looks like: emb2;;2;;;2;;;2;;;;1;false;0;24;kimb5.png,,kimb0.png,kimb1.png,kimb2.png,kimb3.png,kimb4.png;5,empty,0,1,2,3,4;false;Chosen Speed;;;false;;1;1;true;;;\n // basic piece face plate looks like: emb2;;2;;;2;;;2;;;;;false;0;0;D2e_arc170starfighter.png;;false;Front Plate;;;false;;1;1;true;;;\n // faction ring looks like: emb2;;2;;;2;;;2;;;;;false;0;-6;DialSelect_rebelalliance.png;;false;Faction Ring;;;false;;1;1;true;;;\n\n chosenMoveEmb.mySetType(stateString.toString());\n chosenMoveEmb.setValue(1);\n\n fullDialEmb.mySetType(basicPieceString.toString());\n ringEmb.mySetType(factionRingString.toString());\n }",
"private void handleCommand(String command, Update update){\r\n\t\tSendMessage message= new SendMessage();\t\t\r\n\t\tLong chatId = update.getMessage().getChatId();\r\n\t\tswitch (command){\r\n\t\tcase BotConfig.START_COMMAND:\t\t\t\t\r\n\t\t\tmessage.setText(BotConfig.WELCOME_STRING);\r\n\t\t\tbreak;\r\n\t\tcase BotConfig.HELP_COMMAND:\t\t\t\r\n\t\t\tmessage.setText(BotConfig.HELP_STRING);\r\n\t\t\tbreak;\r\n\t\tcase BotConfig.POLL_COMMAND:\t\t\t\r\n\t\t\tmessage.setText(BotConfig.POLL_STRING);\r\n\t\t\tpoll = new Poll();//Iniciamos la clase...\r\n\t\t\tisPolling = true;//\"Encendemos\" el modo encuesta.\t\t\t\r\n\t\t\tbreak;\r\n\t\tcase BotConfig.POLL_COMMAND_DONE:\r\n\t\t\tisPolling = false;//Reiniciamos la variable al finalizar el comando.\r\n\t\t\thaveQuestion = false;//Reiniciamos la variable para la pregunta.\r\n\t\t\tsendSurvey = true;//Marcamos para enviar la encuesta.\t\t\t\t\r\n\t\t\tmessage.setText(BotConfig.POLL_DONE_STRING);\r\n\t\t\tbreak;\r\n\t\t\r\n\t\t}\t\t\r\n\t\ttry {\r\n\t\t\tmessage.setChatId(chatId);\r\n\t\t\texecute(message);//Enviamos el mensaje... \r\n if (sendSurvey == true){ \t\r\n \t\r\n \texecute(poll.sendFinishedSurvey(chatId, poll.createSurveyString(poll.createSurvey())));//Enviamos encuesta antes de compartir.\r\n \tsendSurvey = false;//Marcamos como no enviada despues de haberlo hecho.\r\n }\r\n } catch (TelegramApiException e) {\r\n \tBotLogger.error(LOGTAG, e);//Guardamos mensaje y lo mostramos en pantalla de la consola.\r\n e.printStackTrace();\r\n }\r\n\t}",
"private void handleInvocationCommand() throws IOException, ClassNotFoundException {\r\n final Object context = m_in.readObject();\r\n final String handle = (String) m_in.readObject();\r\n final String methodName = (String) m_in.readObject();\r\n final Class[] paramTypes = (Class[]) m_in.readObject();\r\n final Object[] args = (Object[]) m_in.readObject();\r\n Object result = null;\r\n try {\r\n result = m_invoker.invoke(handle, methodName, paramTypes, args, context);\r\n } catch (Exception e) {\r\n result = e;\r\n }\r\n m_out.writeObject(result);\r\n m_out.flush();\r\n }",
"public State execute(int command, State state);",
"network.message.PlayerResponses.Command getCommand();",
"public interface iCommand {\n void execute(String peerId, JSONObject payload) throws JSONException;\n}",
"public void onCommand(Session session) {\n /**\n * VRFY is not safe.\n */\n String responseString = \"502 VRFY command is disabled\";\n session.writeResponse(responseString);\n }",
"public abstract boolean doCommand() throws Exception;",
"public String getUserCommand();",
"@Override\r\n\tpublic void command() {\n\t\tSystem.out.println(\"CommandAttack Process\");\r\n\t}",
"protected String getResponse(String input) {\n boolean isTerminated;\n String result;\n input = input.trim();\n try {\n Command c = Parser.parse(input);\n result = c.execute(tasklist, ui, storage);\n isTerminated = c.isTerminated();\n } catch (Exception e) {\n return e.toString();\n }\n if (isTerminated) {\n return ui.sendBye();\n }\n return result;\n }",
"public String getCommand() { return command; }",
"public interface Command {\r\n String execute(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException;\r\n}",
"public abstract Menu execute(String commandKey);",
"public interface ICommand {\n /**\n * The method contains the logic of the command being executed\n * @param request - request to receive and send parameters\n * @return link to jump after command execution\n * @throws Exception the user will be shown the corresponding page with a message that something went wrong\n * */\n String execute(HttpServletRequest request) throws Exception;\n}",
"@Override\n\tpublic void handleServerCmd() {\n\t\t\n\t}",
"protected abstract String executeCommandAndModifyOutput(List<String> args, String originalInput);",
"@Override\n\tpublic void execute(HttpServletRequest request, HttpServletResponse response) {\n\t\tint answerpk = Integer.parseInt(request.getParameter(\"answerpk\"));\n\t\tString answertext = request.getParameter(\"answertext\");\n\t\tSystem.out.println(answerpk + answertext);\n\t\tQnaDao dao = new QnaDao();\n\t\tdao.AdminAnswerUpdateAction(answerpk, answertext);\n\t}",
"public interface CommandCallback {\n void done(String result, IOException e);\n}",
"private interface Command {\n public void execute();\n }",
"@Override\n public void execute() {\n this.setMyReturnValue(myHandler.getXcor());\n }",
"public InvokeReply() {\n super(ProtocolOpcode.INVOKE_REPLY);\n }",
"@Override\n public void updateUI(Response res) {\n boolean allNull = true; // Initial assumption\n if (res.reply != null) {\n try {\n Thread.sleep(3000); // 1000 milliseconds is one second.\n } catch (InterruptedException ex) {\n Thread.currentThread().interrupt();\n }\n System.out.println(this.guiCore.getConsoleController());\n this.guiCore.getConsoleController().appendToDisplay(res.reply);\n allNull = false;\n }\n if (res.taskList != null) {\n try {\n this.outputTask(res.taskList);\n } catch (OutputExecuteException e) {\n this.logger.debug(e.getMessage());\n }\n allNull = false;\n }\n\n if (allNull) {\n this.logger\n .debug(\"Respose object does not contain any useful information\");\n }\n }",
"CommandResult execute(String commandText) throws CommandException, ParseException, UnmappedPanelException;",
"@Test\n\tpublic void execute() {\n\t\tcommand.execute(request);\n\t}",
"protected ACLMessage prepareResultNotification(ACLMessage msg, ACLMessage response) {\n ACLMessage reply = msg.createReply();\n reply.setPerformative(ACLMessage.INFORM);\n \n Object content = (Object)msg.getContent();\n \n // Prepare response for a ships movement request\n if(content.equals(\"Movement request\")){\n prepareMovementResultNotitication(reply);\n \n // Prepare response for a start negotiation requests\n }else if(content.equals(\"Negotiation request\")){\n \n }\n \n showMessage(\"Answer sent inform movement\"); //+reply.toString());\n return reply;\n\n }",
"public void handleCommand(\n String command, HttpServletRequest request, HttpServletResponse response) {\n JSONObject retValue = null;\n response.setContentType(\"application/json\");\n boolean isPost = \"POST\".equals(request.getMethod());\n try {\n if (command.equals(UPLOAD_TOKEN_PATH)) {\n \t \n \t // Generate an upload path\n \t BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService();\n \t retValue = new JSONObject();\n \t // TODO: URL should be based on current env (e.g., mapreduce path may not be consistent)\n \t retValue.put(\"url\", blobstoreService.createUploadUrl(\"/mapreduce/command/upload\"));\n \t \n } else if (command.equals(LIST_CONFIGS_PATH) && !isPost) {\n \n MapReduceXml xml;\n try {\n xml = MapReduceXml.getMapReduceXmlFromFile();\n retValue = handleListConfigs(xml);\n } catch (FileNotFoundException e) {\n retValue = new JSONObject();\n retValue.put(\"status\", \"Couldn't find mapreduce.xml file\");\n }\n } else if (command.equals(LIST_JOBS_PATH) && !isPost) {\n String cursor = request.getParameter(\"cursor\");\n String countString = request.getParameter(\"count\");\n int count = DEFAULT_JOBS_PER_PAGE_COUNT;\n if (countString != null) {\n count = Integer.parseInt(countString);\n }\n \n retValue = handleListJobs(cursor, count);\n } else if (command.equals(CLEANUP_JOB_PATH) && isPost) {\n retValue = handleCleanupJob(request.getParameter(\"mapreduce_id\"));\n } else if (command.equals(ABORT_JOB_PATH) && isPost) {\n retValue = handleAbortJob(request.getParameter(\"mapreduce_id\"));\n } else if (command.equals(GET_JOB_DETAIL_PATH) && !isPost) {\n retValue = handleGetJobDetail(request.getParameter(\"mapreduce_id\"));\n } else if (command.equals(START_JOB_PATH) && isPost) {\n Map<String, String> templateParams = new TreeMap<String, String>();\n Map httpParams = request.getParameterMap();\n for (Object paramObject : httpParams.keySet()) {\n String param = (String) paramObject;\n if (param.startsWith(\"mapper_params.\")) {\n templateParams.put(param.substring(\"mapper_params.\".length()),\n ((String[]) httpParams.get(param))[0]);\n }\n }\n retValue = handleStartJob(templateParams, ((String []) httpParams.get(\"name\"))[0], request);\n } else {\n response.sendError(404);\n return;\n }\n } catch (Throwable t) {\n log.log(Level.SEVERE, \"Got exception while running command\", t); \n try {\n retValue = new JSONObject(); \n retValue.put(\"error_class\", t.getClass().getName());\n retValue.put(\"error_message\",\n \"Full stack trace is available in the server logs. Message: \"\n + t.getMessage());\n } catch (JSONException e) {\n throw new RuntimeException(\"Couldn't create error JSON object\", e);\n }\n }\n try {\n retValue.write(response.getWriter());\n response.getWriter().flush();\n } catch (JSONException e) {\n throw new RuntimeException(\"Couldn't write command response\", e);\n } catch (IOException e) {\n throw new RuntimeException(\"Couldn't write command response\", e);\n }\n }",
"public JSONObject executeRsponse () {\n\n\n response = new Response(robot);\n JSONObject response = new JSONObject();\n JSONArray position = new JSONArray();\n JSONObject Data = new JSONObject();\n JSONObject State = new JSONObject();\n\n\n position.put(robot.getPosition().getX());\n position.put(robot.getPosition().getY());\n Direction direction = robot.getCurrentDirection();\n String result = \"OK\";\n String status = \"RELOAD\";\n Data.put(\"message\", \"done\");\n State.put(\"position\",position );\n State.put(\"direction\", direction);\n State.put(\"shield\",robot.getShield());\n State.put(\"shots\",robot.getShots());\n State.put(\"status\",status);\n response.put(\"result\",result);\n response.put(\"data\",Data);\n response.put(\"state\",State);\n\n return response;\n }",
"@Override\n public void doInUI(Response response, Integer transfer) {\n if (response.isSuccess()) {\n Intent it = getIntent();\n setResult(Activity.RESULT_OK, it);\n finish();\n }\n }",
"@Override\n public void doInUI(Response response, Integer transfer) {\n if (response.isSuccess()) {\n Intent it = getIntent();\n setResult(Activity.RESULT_OK, it);\n finish();\n }\n }",
"private void sendGameCommand(){\n\n }",
"int getCmd();",
"public interface Command {\n\t/**\n\t * Executes the logic for this command\n\t * @return an Object to be cast to the desired return object\n\t * @throws ServerException \n\t */\n\tpublic void execute() throws ServerException;\n}",
"@Override\n\tpublic CommandResult execute(CommandRequest request) {\n\t\tlogger.trace(\"Enter execute\");\n\t\tCommandResult commandResult = new CommandResult();\n\t\t\n\t\tParkingLot parkingLot = ParkingLot.getParkingLot();\n\t\tint freeSlot = -1;\n\t\tif (parkingLot != null) {\n\t\t\tfreeSlot = parkingLot.unparkCar(Integer.parseInt(request.getDataInput()));\n\t\t}\n\t\t// Result Preparation\n\t\tcommandResult.setSuccess(true);\n\t\tStringBuilder message = new StringBuilder(\"Slot number \");\n\t\tmessage.append(freeSlot);\n\t\tmessage.append(\" is free\");\n\t\tcommandResult.setMessage(message.toString());\n\t\t\n\t\tlogger.trace(\"Exit execute\");\n\t\treturn commandResult;\n\t}",
"@Override\n public void recordCommandExecution(String commandInputString) {\n\n }",
"public static Command parseCommand(String response) {\n String[] command = response.split(\" \", 10);\n switch (command[0]) {\n case \"list\":\n return new ListCommand(command);\n case \"done\":\n case \"undo\":\n return new DoneUndoCommand(command);\n case \"remove\":\n return new RemoveCommand(command);\n case \"add\":\n return new AddCommand(command, response);\n case \"bye\":\n return new ByeCommand();\n case \"help\":\n return new HelpCommand();\n case \"find\":\n return new FindCommand(command, response);\n case \"update\":\n return new UpdateCommand(command);\n default:\n System.out.println(\"Im sorry i did not catch that maybe these instructions below will help\"\n + System.lineSeparator() + Interface.lineBreak);\n return new HelpCommand();\n }\n }",
"public void receiveResultexecute(\n com.exacttarget.wsdl.partnerapi.ExecuteResponseMsgDocument result\n ) {\n }"
] | [
"0.70763505",
"0.70167196",
"0.6601671",
"0.65470946",
"0.6541406",
"0.65131915",
"0.63626605",
"0.6361374",
"0.6276729",
"0.6264642",
"0.62401325",
"0.6223343",
"0.6201442",
"0.6181943",
"0.6181043",
"0.6170611",
"0.6150939",
"0.61479837",
"0.61220485",
"0.61156523",
"0.60953325",
"0.6042518",
"0.6015242",
"0.6000567",
"0.597433",
"0.5968253",
"0.59616613",
"0.5957779",
"0.595694",
"0.59561026",
"0.595556",
"0.5950957",
"0.5949091",
"0.59259635",
"0.5921942",
"0.59134686",
"0.588758",
"0.58868754",
"0.58857",
"0.58821887",
"0.58819234",
"0.5870687",
"0.58683497",
"0.5862747",
"0.585321",
"0.5843966",
"0.5839214",
"0.58363163",
"0.58304435",
"0.58231705",
"0.58192253",
"0.58148724",
"0.58144706",
"0.58096427",
"0.57984155",
"0.57942355",
"0.5793753",
"0.5786016",
"0.57846403",
"0.5782843",
"0.5779809",
"0.5775765",
"0.5773656",
"0.57713443",
"0.5762256",
"0.5761318",
"0.5760025",
"0.5758661",
"0.5742274",
"0.57403123",
"0.5739166",
"0.57334244",
"0.5707528",
"0.5703622",
"0.5703458",
"0.5691869",
"0.56886244",
"0.56886077",
"0.5683759",
"0.5679944",
"0.56774783",
"0.56772166",
"0.5675052",
"0.5664264",
"0.5664192",
"0.5658752",
"0.5655249",
"0.5651883",
"0.5649898",
"0.56443983",
"0.5641236",
"0.563895",
"0.56256557",
"0.56256557",
"0.5624745",
"0.5624737",
"0.5612593",
"0.5612052",
"0.5611477",
"0.5610422",
"0.5606466"
] | 0.0 | -1 |
Delivers the cause that failed in the kommand execution | void onError(Throwable e); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"CommandExecutionException(String errorMessage, Exception cause) {\n super(errorMessage, cause);\n }",
"Throwable cause();",
"public ExecutionError(Error cause) {\n/* 58 */ super(cause);\n/* */ }",
"CommandExecutionException(String errorMessage) {\n super(errorMessage);\n }",
"com.google.cloud.networkmanagement.v1.AbortInfo.Cause getCause();",
"public Throwable cause()\r\n/* 88: */ {\r\n/* 89:124 */ Object result = this.result;\r\n/* 90:125 */ if ((result instanceof CauseHolder)) {\r\n/* 91:126 */ return ((CauseHolder)result).cause;\r\n/* 92: */ }\r\n/* 93:128 */ return null;\r\n/* 94: */ }",
"String getCauseException();",
"public ExecutionError(String message, Error cause) {\n/* 51 */ super(message, cause);\n/* */ }",
"@Test\n public void testRevertSuccessCommitFailed() throws Exception {\n Mockito.when(delegateCli.executeAndSwitchPrompt(Mockito.any(Command.class), Mockito.any(Predicate.class)))\n .thenReturn(CompletableFuture.completedFuture(\"\"));\n thrown.expect(WriterRegistry.Reverter.RevertSuccessException.class);\n this.unit.getPostFailedHook(this.context)\n .run(null);\n }",
"private void assertCommandFailure(String inputCommand, Class<? extends Throwable> expectedException,\n String expectedMessage) {\n Model expectedModel = new ModelManager(model.getAddressBook(), new UserPrefs());\n assertCommandFailure(inputCommand, expectedException, expectedMessage, expectedModel);\n }",
"void markFailed(Execution execution, Throwable cause);",
"private CommandResult executeInvalidCommand(Command userCommand) {\n return new CommandResult(userCommand, CommandResult.EXECUTION_FAIL, CommandResult.INVALID_COMMAND);\n }",
"@Override\n\t\t\t\tpublic void doFail() {\n\t\t\t\t}",
"private boolean setFailure0(Throwable cause)\r\n/* 389: */ {\r\n/* 390:475 */ if (isDone()) {\r\n/* 391:476 */ return false;\r\n/* 392: */ }\r\n/* 393:479 */ synchronized (this)\r\n/* 394: */ {\r\n/* 395:481 */ if (isDone()) {\r\n/* 396:482 */ return false;\r\n/* 397: */ }\r\n/* 398:485 */ this.result = new CauseHolder(cause, null);\r\n/* 399:486 */ if (hasWaiters()) {\r\n/* 400:487 */ notifyAll();\r\n/* 401: */ }\r\n/* 402: */ }\r\n/* 403:490 */ return true;\r\n/* 404: */ }",
"void illegalCommand(final String reason);",
"@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\texecutable.feedbackExecutionError();\r\n\t\t\t\t\t}",
"public void execute()\n/* */ throws Pausable, Exception\n/* */ {\n/* 378 */ errNotWoven(this);\n/* */ }",
"public SpawnException getCaught();",
"public static void handleInvalidCommandException() {\n System.out.println(\"\\tSorry sir, I do not recognise this command.\");\n Help.execute();\n Duke.jarvis.printDivider();\n }",
"@Override\r\n public void execute()\r\n {\r\n printInvalidCommandMessage();\r\n }",
"private void handleThrowable(Throwable e, CommandSender sender) {\n\t\tif (e instanceof InvocationTargetException){\n\t\t\te = e.getCause();\n\t\t}\n\t\t\n\t\tif (e instanceof NoConsoleException){\n\t\t\tplugin.msg(sender, plugin.getMessage(\"mustbeconsole\"));\n\t\t} else if (e instanceof NotIngameException){\n\t\t\tplugin.msg(sender, plugin.getMessage(\"mustbeingame\"));\n\t\t} else if (e instanceof NoPermissionsException){\n\t\t\tplugin.msg(sender, plugin.getMessage(\"nopermission\").replace(\"<perm>\", e.getCause().getMessage()));\n\t\t} else {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public ProgramInvocationException(Throwable cause) {\n\t\tsuper(cause);\n\t}",
"private void assertCommandFailure(String inputCommand, String expectedMessage) {\n WhatsLeft expectedWhatsLeft = new WhatsLeft(model.getWhatsLeft());\n List<ReadOnlyEvent> expectedShownList = new ArrayList<>(model.getFilteredEventList());\n assertCommandBehavior(true, inputCommand, expectedMessage, expectedWhatsLeft, expectedShownList);\n }",
"@Override\n\tpublic void finishFailure(Exception cause) {\n\t\tSystem.err.println(\"finishFailure\");\n\n\t}",
"private void execHandlerFailed( Message msg ) {\n\t\ttoast_short( mMsgFailed );\n\t}",
"public String getCause() {\n return cause;\n }",
"public void onFailure(WorkContainer<K, V> wc) {\n wc.fail(clock);\n putBack(wc);\n }",
"private void printFailCommandResult(CommandResult result) {\n String commandType = result.getCommand().getCommandType();\n switch (commandType) {\n case Command.COMMAND_DONE:\n switch (result.getResultDescription()) {\n case CommandResult.INVALID_NUMBER:\n printInvalidTaskNotExistedMessage();\n break;\n case CommandResult.INVALID_TASK_ALREADY_DONE:\n printInvalidTaskAlreadyDoneMessage(result);\n break;\n }\n break;\n case Command.COMMAND_ADD_TODO:\n case Command.COMMAND_ADD_DEADLINE:\n case Command.COMMAND_ADD_EVENT:\n printInvalidAddTaskMessage(result);\n break;\n case Command.COMMAND_DELETE:\n printInvalidTaskNotExistedMessage();\n break;\n case Command.COMMAND_FIND:\n printInvalidKeywordMessage();\n break;\n default:\n printInvalidCommandMessage();\n break;\n }\n }",
"protected abstract void executeActionsIfError();",
"private void handleFundDataIntegrityIssues(final JsonCommand command, final Throwable realCause, final Exception dve) {\n if (realCause.getMessage().contains(\"m_fund_external_id_key\")) {\n final String externalId = command.stringValueOfParameterNamed(\"externalId\");\n throw new PlatformDataIntegrityException(\"error.msg.fund.duplicate.externalId\",\n \"A fund with external id '\" + externalId + \"' already exists\", \"externalId\", externalId);\n } else if (realCause.getMessage().contains(\"m_fund_external_id_name\")) {\n final String name = command.stringValueOfParameterNamed(\"name\");\n throw new PlatformDataIntegrityException(\"error.msg.fund.duplicate.name\", \"A fund with name '\" + name + \"' already exists\",\n \"name\", name);\n }\n\n LOG.error(\"Error occured.\", dve);\n throw new PlatformDataIntegrityException(\"error.msg.fund.unknown.data.integrity.issue\",\n \"Unknown data integrity issue with resource: \" + realCause.getMessage());\n }",
"public Throwable getCause()\r\n/* 17: */ {\r\n/* 18:18 */ return this.a.b();\r\n/* 19: */ }",
"public void markAsFailed() {\n \n \t\texecutionStateChanged(ExecutionState.FAILED, \"Execution thread died unexpectedly\");\n \t}",
"public Throwable getCause() {\n/* 85 */ return this.runtimeException;\n/* */ }",
"public Throwable getReason() { return err; }",
"@Override\n public WorkflowStep fail() {\n this.boardChangeDetected = 0;\n QQTetris.calculationThread.cancel();\n return INITIAL_BOARD.execute(false);\n }",
"@Override\n public void failed(String s, Throwable cause)\n {\n }",
"@Override\n public void failed(String s, Throwable cause)\n {\n }",
"@Override\r\n\tpublic final void showCommandError(String command, String message) {\n\t}",
"@Test\n public void executeWithFailure() {\n new SimpleCommandFailure(\"badRequest\", HystrixRuntimeException.FailureType.COMMAND_EXCEPTION).execute();\n }",
"public CommandFailedByConfigException(Throwable ex) {\n super(ex);\n }",
"@Override\n\tpublic void coreProblemExecution() {\n\t\t\n\t}",
"@Override\n\tpublic void coreProblemExecution() {\n\t\t\n\t}",
"public interface RoutineException {}",
"@Override\n\t\tpublic Throwable getCause() {\n\t\t\treturn super.getCause();\n\t\t}",
"@Override\n public Exception getCause()\n {\n return this.cause;\n }",
"private static void enrichLostInputsException(\n Path primaryOutputPath,\n ActionLookupData actionLookupData,\n FileOutErr outErrBuffer,\n LostInputsActionExecutionException lostInputsException) {\n lostInputsException.setPrimaryAction(actionLookupData);\n lostInputsException.setPrimaryOutputPath(primaryOutputPath);\n lostInputsException.setFileOutErr(outErrBuffer);\n }",
"@Override\n\tpublic void OnFailCommand() {\n\t\tSoundManage.playSound(failSound);\n\t\tsuper.OnFailCommand();\n\t}",
"public SyscallException(Throwable cause) {\n\t\tsuper(cause);\n\t}",
"protected void failed()\r\n {\r\n //overwrite\r\n }",
"@Override\n public Throwable getCause() {\n return ex;\n }",
"private void correctError()\r\n\t{\r\n\t\t\r\n\t}",
"public GoatRunnerException(String reason){\n\t this.reason = reason;\n\t }",
"public Throwable getCause(){\n\t\treturn status.getException();\n\t}",
"@Override\n public WorkflowStep fail() {\n this.boardChangeDetected = 0;\n this.missingFutures = 0;\n this.missingTetromino = 0;\n return INITIAL_BOARD.execute(false);\n }",
"@Override\n\tpublic void errorOnExecution(final String message) {\n\t\tafterExecution();\n\t}",
"public ChannelProgressivePromise setFailure(Throwable cause)\r\n/* 57: */ {\r\n/* 58: 89 */ super.setFailure(cause);\r\n/* 59: 90 */ return this;\r\n/* 60: */ }",
"public void setCause(String cause) {\n this.cause = cause;\n }",
"void failure(ServiceExecutionEvent e) {\n\n }",
"private void checkExecutionStatus() {\r\n\t\tif (detenido) {\r\n\t\t\tthrow new RejectedExecutionException(\"el procesador está detenido. no puede aceptar más tareas\");\r\n\t\t}\r\n\t}",
"private void assertCommandException(String inputCommand, String expectedMessage) {\n assertCommandFailure(inputCommand, CommandException.class, expectedMessage);\n }",
"public void setCause(String cause) {\r\n\t\tthis.cause = cause;\r\n\t}",
"@Override\r\n\tpublic void doException() {\n\r\n\t}",
"public void onFailure(Throwable caught) {\n\t\t\tcallStack.remove(\"target\");\n\t\t\tGWT.log(\"error in search\",caught);\n\t\t}",
"@Override\n\tpublic synchronized Throwable getCause() {\n\t\treturn super.getCause();\n\t}",
"public Throwable getCause()\r\n {\r\n return m_cause;\r\n }",
"public void onFailure(Throwable arg0) {\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"public ProgramInvocationException(String message, Throwable cause) {\n\t\tsuper(message, cause);\n\t}",
"public SucheException(Throwable cause) {\n super(cause);\n // TODO Auto-generated constructor stub\n }",
"public void engineFailureStatus() {\n \tthis.engineFailureActive = this.trainModelGUI.engineFailStatus();\n }",
"public Throwable getCause() {\n return cause;\n }",
"public Throwable getCause() {\n return cause;\n }",
"public Throwable getCause() {\n return cause;\n }",
"private void logScriptError(Component component,\n String scriptFileName,\n String tables,\n String cause)\n {\n // Inform the user that the script can't be executed\n eventLog.logFailEvent(component,\n \"Script Error\",\n \"Cannot execute script '\"\n + scriptFileName\n + \"' using table(s) '\"\n + tables\n + \"'; cause '\"\n + cause\n + \"'\",\n \"<html><b>Cannot execute script '</b>\"\n + scriptFileName\n + \"<b>' using table(s) '</b>\"\n + tables\n + \"<b>'\");\n }",
"public void errorWhenCommitting();",
"public boolean tryFailure(Throwable cause)\r\n/* 341: */ {\r\n/* 342:424 */ if (setFailure0(cause))\r\n/* 343: */ {\r\n/* 344:425 */ notifyListeners();\r\n/* 345:426 */ return true;\r\n/* 346: */ }\r\n/* 347:428 */ return false;\r\n/* 348: */ }",
"@Test(expected = WorkflowExecutionException.class)\n public void testExecuteWorkflowExecutionException() {\n action.execute(state);\n action.execute(state);\n }",
"private void sendOldError(Exception e) {\n }",
"public void setCause(Throwable cause) {\n this.cause = cause;\n }",
"private void setStyleToIndicateCommandFailure() {\n //override style and disable syntax highlighting\n commandTextField.overrideStyle(ERROR_STYLE_CLASS);\n }",
"public void handleException(int cause) {\n\tProcessor processor = Machine.processor();\n\n\tswitch (cause) {\n\tcase Processor.exceptionSyscall:\n\t int result = handleSyscall(processor.readRegister(Processor.regV0),\n\t\t\t\t processor.readRegister(Processor.regA0),\n\t\t\t\t processor.readRegister(Processor.regA1),\n\t\t\t\t processor.readRegister(Processor.regA2),\n\t\t\t\t processor.readRegister(Processor.regA3)\n\t\t\t\t );\n\t processor.writeRegister(Processor.regV0, result);\n\t processor.advancePC();\n\t break;\t\t\t\t \n\t\t\t\t \n\tdefault:\n\t Lib.debug(dbgProcess, \"Unexpected exception: \" +\n\t\t Processor.exceptionNames[cause]);\n\t Lib.assertNotReached(\"Unexpected exception\");\n\t}\n }",
"public Throwable getCause() {\n return cause;\n }",
"public exceptiona(Throwable cause)\n {\n String Message = \" not in number system\";\n }",
"@Override\n public void onComplete() {\n refCause.compareAndSet(null, DELIBERATE_EXCEPTION);\n }",
"@Override\n \t\t\tpublic void onFailure(Throwable arg0) {\n \t\t\t\tSystem.err.println(\"***failure:\" + arg0);\n \n \t\t\t}",
"protected void userErrorOccurred()\n {\n traceOK = false;\n }",
"private int exitUnitException() {\r\n\t\tthis.updateUnitStatus();\r\n\t\tthis.eventLogger.logLine(\" => UNIT_EXCEPTION, DEVICE_END\");\r\n\t\treturn iDeviceStatus.UNIT_EXCEPTION | iDeviceStatus.DEVICE_END;\r\n\t}",
"public void errorExecutingNode (String nodeId) {\n Node node = flow.getNode(nodeId, flow.getId());\n node.errorOccurred();\n\n Set<String> keys = executionHandlers.keySet();\n Iterator i = keys.iterator();\n\n while (i.hasNext()) {\n executionHandlers.get(i.next()).errorExecutingNode(node);\n }\n }",
"@Override\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\tWindow.alert(\"Fail\");\n\t\t\t\t\t}",
"public void sendeFehlerHelo();",
"@Override\n\tpublic String doError() {\n\t\treturn null;\n\t}",
"@Override\n public OperationFailureException wrapSelf(String msg) {\n return new DatabasePreemptedException(msg, this);\n }",
"void onCompleteActionWithError(SmartEvent smartEvent);",
"public OperationException(Throwable cause) {\n super(cause);\n }",
"@Override\r\n\tpublic void error(Statement s, Throwable cause) {\n\r\n\t}",
"public BadCommandException(String cmd){\n super(cmd);\n }",
"public void testUndoActionPerformed() {\n try {\n handler.undoActionPerformed(null, new ChangeSizeAction(new GraphNode(), new Dimension()));\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }",
"public void compileAborted(Exception e) { }",
"public abstract void mo33865a(Throwable th, Throwable th2);",
"public void onFailure(Throwable caught) {\n\t\t\t\tcaught.printStackTrace();\n\t\t\t\tSystem.out.println(\"Remote Procedure Call - Failure\");\n\t\t\t\tPlanner.hideActivityIndicator();\n\t\t\t}",
"public void onFailure(Throwable caught) {\n\t\t\t\tcaught.printStackTrace();\n\t\t\t\tSystem.out.println(\"Remote Procedure Call - Failure\");\n\t\t\t\tPlanner.hideActivityIndicator();\n\t\t\t}",
"protected abstract String insufficientParameterExceptionMessage(TransactionCommand transactionCommand);"
] | [
"0.64965814",
"0.6305799",
"0.60193515",
"0.6019325",
"0.60045373",
"0.6003474",
"0.59660184",
"0.5897546",
"0.5866554",
"0.5854747",
"0.58175707",
"0.5788051",
"0.57777965",
"0.57725716",
"0.57625496",
"0.57602847",
"0.5752799",
"0.57411754",
"0.57052237",
"0.5693085",
"0.5686878",
"0.568026",
"0.56772393",
"0.5647309",
"0.564652",
"0.5604659",
"0.5590346",
"0.555532",
"0.55552965",
"0.5553861",
"0.55533165",
"0.55483395",
"0.55309325",
"0.5528276",
"0.551453",
"0.5511455",
"0.5511455",
"0.55036545",
"0.5487739",
"0.5477855",
"0.546268",
"0.546268",
"0.5455109",
"0.5446503",
"0.5428279",
"0.5418278",
"0.54155916",
"0.5413485",
"0.54005694",
"0.539777",
"0.5387932",
"0.53791064",
"0.5377549",
"0.5364366",
"0.53641886",
"0.53578854",
"0.5353532",
"0.53521985",
"0.5341831",
"0.532901",
"0.5317335",
"0.5309396",
"0.5305368",
"0.5295447",
"0.5290799",
"0.5287069",
"0.528562",
"0.5283282",
"0.528155",
"0.5280751",
"0.5280751",
"0.5280751",
"0.5279403",
"0.5278546",
"0.5275552",
"0.5274573",
"0.52714556",
"0.526761",
"0.5265758",
"0.52573305",
"0.5254505",
"0.52482915",
"0.52478147",
"0.52410656",
"0.5237175",
"0.5236161",
"0.5235238",
"0.52329147",
"0.5232478",
"0.5231504",
"0.52257437",
"0.522303",
"0.5222207",
"0.52220833",
"0.5220063",
"0.52128476",
"0.52089304",
"0.52054566",
"0.52035695",
"0.52035695",
"0.520348"
] | 0.0 | -1 |
The Factory for the model. It provides a create method for each nonabstract class of the model. | public interface QuoteFactory extends EFactory {
/**
* The singleton instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
QuoteFactory eINSTANCE = org.abchip.mimo.biz.model.order.quote.impl.QuoteFactoryImpl.init();
/**
* Returns a new object of class '<em>Quote</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Quote</em>'.
* @generated
*/
Quote createQuote();
/**
* Returns a new object of class '<em>Adjustment</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Adjustment</em>'.
* @generated
*/
QuoteAdjustment createQuoteAdjustment();
/**
* Returns a new object of class '<em>Attribute</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Attribute</em>'.
* @generated
*/
QuoteAttribute createQuoteAttribute();
/**
* Returns a new object of class '<em>Coefficient</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Coefficient</em>'.
* @generated
*/
QuoteCoefficient createQuoteCoefficient();
/**
* Returns a new object of class '<em>Item</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Item</em>'.
* @generated
*/
QuoteItem createQuoteItem();
/**
* Returns a new object of class '<em>Note</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Note</em>'.
* @generated
*/
QuoteNote createQuoteNote();
/**
* Returns a new object of class '<em>Role</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Role</em>'.
* @generated
*/
QuoteRole createQuoteRole();
/**
* Returns a new object of class '<em>Term</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Term</em>'.
* @generated
*/
QuoteTerm createQuoteTerm();
/**
* Returns a new object of class '<em>Term Attribute</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Term Attribute</em>'.
* @generated
*/
QuoteTermAttribute createQuoteTermAttribute();
/**
* Returns a new object of class '<em>Type</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Type</em>'.
* @generated
*/
QuoteType createQuoteType();
/**
* Returns a new object of class '<em>Type Attr</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Type Attr</em>'.
* @generated
*/
QuoteTypeAttr createQuoteTypeAttr();
/**
* Returns a new object of class '<em>Work Effort</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Work Effort</em>'.
* @generated
*/
QuoteWorkEffort createQuoteWorkEffort();
/**
* Returns the package supported by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the package supported by this factory.
* @generated
*/
QuotePackage getQuotePackage();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Model createModel();",
"Model createModel();",
"Model createModel();",
"Model createModel();",
"Model createModel();",
"Model createModel();",
"Model createModel();",
"TestModelFactory getTestModelFactory();",
"public UsermodelFactoryImpl() {\r\n\t\tsuper();\r\n\t}",
"public SqliteModelFactoryImpl()\n {\n super();\n }",
"public PetrinetmodelFactoryImpl() {\r\n\t\tsuper();\r\n\t}",
"ModelsFactory getModelsFactory();",
"public ParsedmodelFactoryImpl() {\n\t\tsuper();\n\t}",
"protected abstract IModel<T> createModel(T object);",
"public interface ConfigModelFactory\n{\n\t/**\n\t * Create an instance of the <code>ConfigModel</code>\n\t *\n\t * @return an instance of the configuration model\n\t */\n\tConfigModel createInstanceOfConfigModel();\n\n\t/**\n\t * Create an instance of the <code>InstanceModel</code>\n\t *\n\t * @return an instance of the instance model\n\t */\n\tInstanceModel createInstanceOfInstanceModel();\n\n\t/**\n\t * Create an instance of the <code>CsticModel</code>\n\t *\n\t * @return an instance of the characteristic model\n\t */\n\tCsticModel createInstanceOfCsticModel();\n\n\t/**\n\t * Create an instance of the <code>CsticValueModel</code>\n\t *\n\t * @param valueType\n\t * The containing Cstic value type\n\t * @return an instance of the characteristic value model\n\t */\n\tCsticValueModel createInstanceOfCsticValueModel(int valueType);\n\n\t/**\n\t * Create an instance of the <code>CsticGroupModel</code>\n\t *\n\t * @return an instance of the characteristic group model\n\t */\n\tCsticGroupModel createInstanceOfCsticGroupModel();\n\n\n\t/**\n\t * Create an instance of the <code>PriceModel</code>\n\t *\n\t * @return an instance of the price model\n\t */\n\tPriceModel createInstanceOfPriceModel();\n\n\t/**\n\t * Create an instance of the <code>SolvableConflictModel</code>\n\t *\n\t * @return an instance of the Solvable Conflict Model\n\t */\n\tSolvableConflictModel createInstanceOfSolvableConflictModel();\n\n\t/**\n\t * Create an instance of the <code>ConflictingAssumptionModel</code>\n\t *\n\t * @return an instance of the Conflicting Assumption Model\n\t */\n\tConflictingAssumptionModel createInstanceOfConflictingAssumptionModel();\n\n\t/**\n\t * Create an instance of the <code>PriceModel</code>\n\t *\n\t * @return an instance of the price model\n\t */\n\tPriceModel getZeroPriceModel();\n\n\t/**\n\t * Create an instance of the <code>PriceSummaryModel</code>\n\t *\n\t * @return an instance of the price summary model\n\t */\n\tPriceSummaryModel createInstanceOfPriceSummaryModel();\n\n\t/**\n\t * @return a builder to construct {@link ProductConfigMessage} objects\n\t */\n\tdefault ProductConfigMessageBuilder createProductConfigMessageBuilder()\n\t{\n\t\treturn new ProductConfigMessageBuilder();\n\t}\n\n\t/**\n\t * Create an instance of the <code>ProductConfigMessage</code><br>\n\t * uses the <code>DEFAULT</code> ProductConfigMessageSourceSubType\n\t *\n\t * @param message\n\t * localized message\n\t * @param key\n\t * message key, should be unique together with message source\n\t * @param severity\n\t * message severity\n\t * @param source\n\t * message source, should be unique together with message key\n\t * @return a message instance\n\t * @deprecated since 18.08.0 - use {@link ProductConfigMessageBuilder} instead\n\t */\n\t@Deprecated(since = \"1808\", forRemoval=true)\n\tdefault ProductConfigMessage createInstanceOfProductConfigMessage(final String message, final String key,\n\t\t\tfinal ProductConfigMessageSeverity severity, final ProductConfigMessageSource source)\n\t{\n\t\treturn createInstanceOfProductConfigMessage(message, key, severity, source, ProductConfigMessageSourceSubType.DEFAULT);\n\t}\n\n\t/**\n\t * Create an instance of the <code>ProductConfigMessage</code><br>\n\t *\n\t * @param message\n\t * localized message\n\t * @param key\n\t * message key, should be unique together with message source\n\t * @param severity\n\t * message severity\n\t * @param source\n\t * message source, should be unique together with message key\n\t * @param subType\n\t * optional sub type of the message source\n\t * @return a message instance\n\t * @deprecated since 18.08.0 - use {@link ProductConfigMessageBuilder} instead\n\t */\n\t@Deprecated(since = \"1808\", forRemoval=true)\n\tProductConfigMessage createInstanceOfProductConfigMessage(String message, String key, ProductConfigMessageSeverity severity,\n\t\t\tProductConfigMessageSource source, ProductConfigMessageSourceSubType subType);\n\n\n\t/**\n\t * Create an instance of the <code>VariantConditionModel</code>\n\t *\n\t * @return an instance of the variant condition model\n\t */\n\tVariantConditionModel createInstanceOfVariantConditionModel();\n\n\t/**\n\t * @return class name of the {@link PriceSummaryModel} implementation\n\t */\n\tString getTargetClassNamePriceSummaryModel();\n\n\n\t/**\n\t * @return class name of the {@link PriceModel} implementation\n\t */\n\tString getTargetClassNamePriceModel();\n\n\t/**\n\t * @return class name of the {@link CsticGroupModel} implementation\n\t */\n\tString getTargetClassNameCsticGroupModel();\n\n\t/**\n\t * @return class name of the {@link CsticValueModel} implementation\n\t */\n\tString getTargetClassNameCsticValueModel();\n\n\t/**\n\t * @return class name of the {@link CsticModel} implementation\n\t */\n\tString getTargetClassNameCsticModel();\n\n\t/**\n\t * @return class name of the {@link InstanceModel} implementation\n\t */\n\tString getTargetClassNameInstanceModel();\n\n\t/**\n\t * @return class name of the {@link ConfigModel} implementation\n\t */\n\tString getTargetClassNameConfigModel();\n\n\t/**\n\t * @return class name of the {@link SolvableConflictModel} implementation\n\t */\n\tString getTargetClassNameSolvableConflictModel();\n\n\t/**\n\t * @return class name of the {@link ConflictingAssumptionModel} implementation\n\t */\n\tString getTargetClassNameConflictingAssumptionModel();\n\n\t/**\n\t * @return class name of the {@link VariantConditionModel} implementation\n\t */\n\tString getTargetClassNameVariantConditionModel();\n}",
"@Override\n\tpublic Model create() {\n\t\treturn null;\n\t}",
"public Factory() {\n\t\tsuper();\n\t}",
"public interface ModelFactory <ModelObject> {\n public void createElement(ModelObject object);\n}",
"EisModel createEisModel();",
"BehaviouralModelFactory getBehaviouralModelFactory();",
"CsticModel createInstanceOfCsticModel();",
"public abstract void create();",
"InstanceModel createInstanceOfInstanceModel();",
"public M create(P model);",
"void create(Model model) throws Exception;",
"public void create(){}",
"public static MusicModel createModel() {\n return new MusicModelImpl();\n }",
"public interface AbstractFactory {\n /**\n * Create cpu cpu.\n *\n * @return the cpu\n */\n Cpu createCpu();\n\n /**\n * Create main board main board.\n *\n * @return the main board\n */\n MainBoard createMainBoard();\n}",
"public Model createBaseModel() {\n return ModelFactory.createDefaultModel();\n }",
"public interface AbstractFactory<T> {\n /**\n * Create a new Object of type T\n * @return the created object\n */\n T create();\n}",
"private ConcreteFactory() {}",
"DataModel createDataModel();",
"public Factory() {\n\t\tclassMap = new TreeMap<String,Class<T> >();\n\t}",
"public static StaticFactoryInsteadOfConstructors create(){\n return new StaticFactoryInsteadOfConstructors();\n }",
"public interface Factory<T> {\n T create();\n}",
"T create();",
"T create();",
"@Override\r\n\tpublic void create() {\n\t\t\r\n\t}",
"public static SqliteModelFactory init()\n {\n try\n {\n SqliteModelFactory theSqliteModelFactory = (SqliteModelFactory)EPackage.Registry.INSTANCE.getEFactory(SqliteModelPackage.eNS_URI);\n if (theSqliteModelFactory != null)\n {\n return theSqliteModelFactory;\n }\n }\n catch (Exception exception)\n {\n EcorePlugin.INSTANCE.log(exception);\n }\n return new SqliteModelFactoryImpl();\n }",
"interface Factory {\r\n /**\r\n * Create an instance of an agenda view model with the given saved\r\n * instance state.\r\n *\r\n * @param savedInstanceState previously saved state of the view model\r\n * @return the created agenda view model\r\n */\r\n AgendaViewModel create(Bundle savedInstanceState);\r\n }",
"private EntityFactory() {}",
"Klassenstufe createKlassenstufe();",
"public interface Factory {\n Product create();\n}",
"public <T> T createModel(Class<T> clazz) throws CreateModelException {\n return createModel(clazz, true);\n }",
"@Override\n\tpublic void create() {\n\n\t}",
"public abstract void create(T t);",
"For createFor();",
"CreateEventViewModelFactory() {\n super(Storage.class, Authenticator.class);\n }",
"public static Factory factory() {\n return ext_dbf::new;\n }",
"public interface Factory {\r\n}",
"PriceModel createInstanceOfPriceModel();",
"ZenModel createZenModel();",
"public ObjectifyFactory factory() {\n return ofy().factory();\n }",
"@Override\n\tpublic void create() {\n\t\t\n\t}",
"public interface Creator<T> {\n\t\tpublic T create() throws APIException;\n\n\t\tpublic void destroy(T t);\n\n\t\tpublic boolean isValid(T t);\n\n\t\tpublic void reuse(T t);\n\t}",
"public EntityFactoryImpl() {\n\t\tsuper();\n\t}",
"DomainModel createDomainModel();",
"@Override\n\tpublic void create () {\n\n\t}",
"public interface Factory {\n LeiFeng createLeiFeng();\n}",
"public void create() {\n\t\t\n\t}",
"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}",
"@Override\r\n\tpublic void create() {\n\r\n\t}",
"@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 static PetrinetmodelFactory init() {\r\n\t\ttry {\r\n\t\t\tPetrinetmodelFactory thePetrinetmodelFactory = (PetrinetmodelFactory)EPackage.Registry.INSTANCE.getEFactory(PetrinetmodelPackage.eNS_URI);\r\n\t\t\tif (thePetrinetmodelFactory != null) {\r\n\t\t\t\treturn thePetrinetmodelFactory;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception exception) {\r\n\t\t\tEcorePlugin.INSTANCE.log(exception);\r\n\t\t}\r\n\t\treturn new PetrinetmodelFactoryImpl();\r\n\t}",
"protected abstract ENTITY createEntity();",
"public static UsermodelFactory init() {\r\n\t\ttry {\r\n\t\t\tUsermodelFactory theUsermodelFactory = (UsermodelFactory)EPackage.Registry.INSTANCE.getEFactory(UsermodelPackage.eNS_URI);\r\n\t\t\tif (theUsermodelFactory != null) {\r\n\t\t\t\treturn theUsermodelFactory;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception exception) {\r\n\t\t\tEcorePlugin.INSTANCE.log(exception);\r\n\t\t}\r\n\t\treturn new UsermodelFactoryImpl();\r\n\t}",
"ConfigModel createInstanceOfConfigModel();",
"public abstract T create(T obj);",
"public static Factory factory() {\n return ext_h::new;\n }",
"public interface DebuggerModelFactory\n\t\textends ExtensionPoint, ConfigurableFactory<DebuggerObjectModel> {\n\n\t/**\n\t * Get the priority for selecting this factory by default for the given program\n\t * \n\t * <p>\n\t * A default factory is selected when the current factory and the last successful factory are\n\t * incompatible with the current program, or if this is the very first time connecting. Of those\n\t * factories compatible with the current program, the one with the highest priority (larger\n\t * numerical value) is selected. If none are compatible, then the current selection is left as\n\t * is.\n\t * \n\t * <p>\n\t * Note that negative priorities imply the factory is not compatible with the given program or\n\t * local system.\n\t * \n\t * @param program the current program, or null\n\t * @return the priority, higher values mean higher priority\n\t */\n\tdefault int getPriority(Program program) {\n\t\treturn 0;\n\t}\n\n\t/**\n\t * Check if this factory is compatible with the local system and given program.\n\t * \n\t * <p>\n\t * <b>WARNING:</b> Implementations should not likely override this method. If one does, it must\n\t * behave in the same manner as given in this default implementation: If\n\t * {@link #getPriority(Program)} would return a non-negative result for the program, then this\n\t * factory is compatible with that program. If negative, this factory is not compatible.\n\t * \n\t * @param program the current program, or null\n\t * @return true if compatible\n\t */\n\tdefault boolean isCompatible(Program program) {\n\t\treturn getPriority(program) >= 0;\n\t}\n}",
"public Model doCreateModel() {\n Model m = m_baseModelName == null ? maker.createFreshModel() : maker.createModel( m_baseModelName );\n return new OntModelImpl( this, m );\n }",
"public interface IFactory {\n IUser createUser();\n IDepartment createDepartment();\n}",
"public static ParsedmodelFactory init() {\n\t\ttry {\n\t\t\tParsedmodelFactory theParsedmodelFactory = (ParsedmodelFactory)EPackage.Registry.INSTANCE.getEFactory(\"http://parsedmetadata/1.0\"); \n\t\t\tif (theParsedmodelFactory != null) {\n\t\t\t\treturn theParsedmodelFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new ParsedmodelFactoryImpl();\n\t}",
"public interface SerializerFactory<T> {\n\t\n\t/** the method creates a new MessageSerializer.\n\t * \n\t * @return new object that implements the MessageSerializer interface. \n\t */\n MessageSerializer<T> create();\n}",
"public PiviFactoryImpl() {\r\n\t\tsuper();\r\n\t}",
"Factory<? extends T> buildPersonFactory(String type);",
"public PedidoFactoryImpl() {\n\t\tsuper();\n\t}",
"public ProyectoFactoryImpl() {\r\n\t\tsuper();\r\n\t}",
"public interface Creator {\n public abstract Item factoryMethod();\n public abstract Item factoryMethod(String name);\n public abstract Item factoryMethod(String name, List<Flower> flowerList);\n}",
"public abstract ProductFactory getFactory();",
"public Model() {\n\t}",
"public Model() {\n\t}",
"public LanterneFactoryImpl() {\n\t\tsuper();\n\t}",
"public interface Factory {\n Animal createAnimal();\n}",
"public interface AbstractFactory {\n Bmw produceBmw();\n Benz produceBenz();\n}",
"public MystFactoryImpl()\r\n {\r\n super();\r\n }",
"public PertFactory() {\n for (Object[] o : classTagArray) {\n addStorableClass((String) o[1], (Class) o[0]);\n }\n }",
"public interface IFactory<T extends MaterialCastingRecipe> {\n T create(ResourceLocation id, String group, @Nullable Ingredient cast, int itemCost, IMaterialItem result,\n boolean consumed, boolean switchSlots);\n }",
"private VegetableFactory() {\n }",
"protected MoneyFactory() {\n\t}",
"public EnotationFactoryImpl() {\n\t\tsuper();\n\t}",
"public Model() {\n this(DSL.name(\"model\"), null);\n }",
"public EcoreFactoryImpl() {\r\n\t\tsuper();\r\n\t}",
"public TypeAdapterFactory() {\n\t\tif (modelPackage == null) {\n\t\t\tmodelPackage = TypePackage.eINSTANCE;\n\t\t}\n\t}",
"interface Create {}",
"public GameDomainFactory() {\r\n\t\t\r\n\t\tCreateGameDomain = new HashMap<String, GameDomainFactory.gameDomainCreator>();\r\n\t\tCreateGameDomain.put(\"TicTacToe\" , new ticTacToeCreator());\r\n\t\tCreateGameDomain.put(\"Reversi\", new CreatorReversi());\r\n\t}",
"public abstract <T> T create(Object object, Class<T> clazz);",
"public EcoreFactoryImpl() {\n super();\n }",
"public static Factory factory() {\n return text::new;\n }",
"public FvFactoryImpl() {\n\t\tsuper();\n\t}",
"public abstract Product productFactory(String type);"
] | [
"0.71565163",
"0.71565163",
"0.71565163",
"0.71565163",
"0.71565163",
"0.71565163",
"0.71565163",
"0.70742077",
"0.7051943",
"0.6983852",
"0.69748455",
"0.6965496",
"0.69568366",
"0.69481784",
"0.6860293",
"0.6811446",
"0.6807123",
"0.6756206",
"0.6694741",
"0.6656823",
"0.6654312",
"0.6640736",
"0.6595195",
"0.6580549",
"0.65715563",
"0.6555794",
"0.6534009",
"0.648342",
"0.64748156",
"0.6450784",
"0.6445946",
"0.64300567",
"0.6421489",
"0.64043415",
"0.6400982",
"0.63907266",
"0.63907266",
"0.6368747",
"0.6349325",
"0.63468486",
"0.6345672",
"0.63069546",
"0.6302681",
"0.6292132",
"0.6289528",
"0.6275873",
"0.6264616",
"0.6250081",
"0.623463",
"0.62291795",
"0.62248415",
"0.6222761",
"0.6219561",
"0.62143695",
"0.62126905",
"0.62034976",
"0.61920136",
"0.61674654",
"0.61650974",
"0.6154887",
"0.61427796",
"0.61426824",
"0.6140671",
"0.61348015",
"0.6117416",
"0.6079516",
"0.6065549",
"0.60619617",
"0.60616994",
"0.6044366",
"0.60355604",
"0.60280776",
"0.6026859",
"0.6021375",
"0.60200113",
"0.60140157",
"0.60013527",
"0.5987638",
"0.5981197",
"0.59794974",
"0.59472996",
"0.59472996",
"0.59399843",
"0.5938128",
"0.59361154",
"0.59327817",
"0.59254813",
"0.59222776",
"0.5919654",
"0.59025806",
"0.5900669",
"0.5895235",
"0.5894421",
"0.5892311",
"0.5877348",
"0.58726925",
"0.5863833",
"0.58636236",
"0.5861607",
"0.585989",
"0.58558"
] | 0.0 | -1 |
Returns a new object of class 'Quote'. | Quote createQuote(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"QuoteItem createQuoteItem();",
"QuoteType createQuoteType();",
"protected GuiTestObject getQuote() \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"getQuote\"));\n\t}",
"QuoteTerm createQuoteTerm();",
"QuoteAttribute createQuoteAttribute();",
"QuoteNote createQuoteNote();",
"public Quotes() {\n\t\tthis(\"quotes\", null);\n\t}",
"public Quotes() { }",
"QuoteAdjustment createQuoteAdjustment();",
"QuoteCoefficient createQuoteCoefficient();",
"protected GuiTestObject getQuote(TestObject anchor, long flags) \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"getQuote\"), anchor, flags);\n\t}",
"public LocalQuote\t\tgetQuote();",
"QuotePackage getQuotePackage();",
"QuoteTypeAttr createQuoteTypeAttr();",
"public Quote(String ticker, String idfinam) {\n this.ticker = ticker;\n this.idfinam = idfinam;\n }",
"public QuoteResponse() {\n }",
"QuoteTermAttribute createQuoteTermAttribute();",
"public String getQuote();",
"public QuoteResource() {\n }",
"QuoteRole createQuoteRole();",
"void setGetQuote(amdocs.iam.pd.pdwebservices.GetQuoteDocument.GetQuote getQuote);",
"@Test\n public void addsAndListsQuotes() throws Exception {\n final Base base = new DyBase(\n this.dynamo.region(), new MkSttc().counters().get(\"cnt\")\n );\n final String name = \"alpha2010\";\n final Book book = base.books().add(\n String.format(\"@book{%s, author=\\\"Jeffrey\\\" }\", name)\n );\n final Quotes quotes = base.quotes();\n quotes.add(book, \"hey, how are you doing there, JavaDude?\", \"58\");\n MatcherAssert.assertThat(\n quotes.refine(\"javadude\").iterate(),\n Matchers.<Quote>iterableWithSize(1)\n );\n final Quote quote = quotes.iterate().iterator().next();\n MatcherAssert.assertThat(\n quote.book().name(),\n Matchers.equalTo(name)\n );\n MatcherAssert.assertThat(\n quote.book().bibitem(),\n Matchers.notNullValue()\n );\n }",
"public Quote(String quoteBody, String author){\n this.quoteBody = quoteBody;\n this.author = author;\n }",
"amdocs.iam.pd.pdwebservices.GetQuoteDocument.GetQuote addNewGetQuote();",
"public java.lang.Object getQuoteID() {\n return quoteID;\n }",
"public interface QuoteFactory 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\tQuoteFactory eINSTANCE = org.abchip.mimo.biz.model.order.quote.impl.QuoteFactoryImpl.init();\n\n\t/**\n\t * Returns a new object of class '<em>Quote</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Quote</em>'.\n\t * @generated\n\t */\n\tQuote createQuote();\n\n\t/**\n\t * Returns a new object of class '<em>Adjustment</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Adjustment</em>'.\n\t * @generated\n\t */\n\tQuoteAdjustment createQuoteAdjustment();\n\n\t/**\n\t * Returns a new object of class '<em>Attribute</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Attribute</em>'.\n\t * @generated\n\t */\n\tQuoteAttribute createQuoteAttribute();\n\n\t/**\n\t * Returns a new object of class '<em>Coefficient</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Coefficient</em>'.\n\t * @generated\n\t */\n\tQuoteCoefficient createQuoteCoefficient();\n\n\t/**\n\t * Returns a new object of class '<em>Item</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Item</em>'.\n\t * @generated\n\t */\n\tQuoteItem createQuoteItem();\n\n\t/**\n\t * Returns a new object of class '<em>Note</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Note</em>'.\n\t * @generated\n\t */\n\tQuoteNote createQuoteNote();\n\n\t/**\n\t * Returns a new object of class '<em>Role</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Role</em>'.\n\t * @generated\n\t */\n\tQuoteRole createQuoteRole();\n\n\t/**\n\t * Returns a new object of class '<em>Term</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Term</em>'.\n\t * @generated\n\t */\n\tQuoteTerm createQuoteTerm();\n\n\t/**\n\t * Returns a new object of class '<em>Term Attribute</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Term Attribute</em>'.\n\t * @generated\n\t */\n\tQuoteTermAttribute createQuoteTermAttribute();\n\n\t/**\n\t * Returns a new object of class '<em>Type</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Type</em>'.\n\t * @generated\n\t */\n\tQuoteType createQuoteType();\n\n\t/**\n\t * Returns a new object of class '<em>Type Attr</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Type Attr</em>'.\n\t * @generated\n\t */\n\tQuoteTypeAttr createQuoteTypeAttr();\n\n\t/**\n\t * Returns a new object of class '<em>Work Effort</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Work Effort</em>'.\n\t * @generated\n\t */\n\tQuoteWorkEffort createQuoteWorkEffort();\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\tQuotePackage getQuotePackage();\n\n}",
"public static Quote getQuoteFromAPI(){\n try{\n URL url = new URL(\"https://ron-swanson-quotes.herokuapp.com/v2/quotes\");\n HttpURLConnection con = (HttpURLConnection) url.openConnection();\n // this line of code actually goes to the internet!\n BufferedReader reader = new BufferedReader(new InputStreamReader((con.getInputStream())));\n // get json data in response\n // use Gson to parse json string\n Gson gson = new Gson();\n String[] text = gson.fromJson(reader, String[].class);\n // Create Quote object\n Quote quote = new Quote(null, \"Ron Swanson\", null, text[0]);\n addQuoteToFile(quote);\n return quote;\n } catch(IOException e) {\n // This is where we check cached.\n return getQuoteFromFile();\n }\n }",
"@Nonnull\n public static UBL23WriterBuilder <QuotationType> quotation ()\n {\n return UBL23WriterBuilder.create (QuotationType.class);\n }",
"public Quotes(String alias) {\n\t\tthis(alias, QUOTES);\n\t}",
"QuoteWorkEffort createQuoteWorkEffort();",
"public String getQuotes() {\r\n\t\treturn this.quotes;\r\n\t}",
"amdocs.iam.pd.pdwebservices.GetQuoteDocument.GetQuote getGetQuote();",
"@Test\n public void deletesQuote() throws Exception {\n final Base base = new DyBase(\n this.dynamo.region(), new MkSttc().counters().get(\"tf8\")\n );\n final String name = \"walter2007\";\n final Book book = base.books().add(\n String.format(\"@book{%s, author=\\\"Walter Sobchak\\\"}\", name)\n );\n final Quotes quotes = base.quotes();\n final Quote quote = quotes.add(\n book, \"never give up, never ever\", \"99-103\"\n );\n MatcherAssert.assertThat(\n quotes.refine(name).iterate(),\n Matchers.<Quote>iterableWithSize(1)\n );\n quotes.delete(quote.number());\n MatcherAssert.assertThat(\n quotes.refine(name).iterate(),\n Matchers.<Quote>iterableWithSize(0)\n );\n }",
"public Trade() {\n\t}",
"public void saveQuote() {\n\t\ttry {\n\t\t\tString json = urlRead.readUrl(\"http://dist-sso.it-kartellet.dk/quote/\");\n\n\t\t\tJSONParser jsonParser = new JSONParser();\n\t\t\tJSONObject jsonObject = (JSONObject) jsonParser.parse(json);\n\n\t\t\tString quote = (String) jsonObject.get(\"quote\");\n\t\t\tquote = quote.replace(\"'\", \"''\");\n\n\t\t\tString[] fields = {\"qotd\"};\n\t\t\tString[] values = {quote};\n\n\t\t\tif(qb.selectFrom(\"qotd\").all().executeQuery().next()){\n\t\t\t\tqb.update(\"qotd\", fields, values).where(\"msg_type\", \"=\", \"qotd\").execute();\n\t\t\t} else {\n\t\t\t\tqb.insertInto(\"qotd\", fields).values(values).execute();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public Object checkAndSaveQuote() {\n String quoteString = mAddQuoteTextView.getText().toString();\n if (!quoteString.equals(\"\")) {\n\n // get the other values\n String name = mAddNameTextView.getText().toString();\n String source = mAddSourceTextView.getText().toString();\n // Empty fields\n mAddQuoteTextView.setText(\"\");\n mAddNameTextView.setText(\"\");\n mAddSourceTextView.setText(\"\");\n // then we can create and return the new object\n return QuoteObject.newInstance(name, source, quoteString);\n } else {\n // Alert the user we need a quote to save to the list\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(\"No Quote Entered!\");\n builder.setMessage(\"Please add a quote before saving.\");\n builder.show();\n // return nothing\n return null;\n }\n }",
"public Contract create(){\n\t\treturn new Contract();\n\t}",
"@RequestMapping(value = \"/quote\", method = POST)\n public @ResponseBody Quote quote(@RequestBody Quote quote) {\n Double markup = VehicleHashMap.getMap().get(quote.getVehicle());\n Long price = Math.round(Math.abs((Long.valueOf(quote.getDeliveryPostcode(), 36) - Long.valueOf(quote.getPickupPostcode(), 36))/100000000) * (1 + markup));\n\n return new Quote(quote.getPickupPostcode(), quote.getDeliveryPostcode(),quote.getVehicle() ,price);\n }",
"public GIPIQuoteItemMC()\t{\n \t}",
"public String getQuote(){\n\t\tString quote = null;\n\t\ttry {\n\t\t\tcrs = qb.selectFrom(\"qotd\").all().executeQuery();\n\n\t\t\tif(crs.next()) {\n\t\t\t\tquote = crs.getString(\"qotd\");\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tcrs.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn quote;\n\t}",
"public void getQuote(String symbol)\r\n {\r\n brokerage.getQuote(symbol, this);\r\n }",
"public static Quote createQuotesFromJsonObject(JSONObject _jsonObject) throws JSONException {\n //Parse fields\n\n int quotesQuoteId = _jsonObject.getInt(\"QuoteId\");\n int quotesMinPrice = _jsonObject.getInt(\"MinPrice\");\n boolean quotesDirect = _jsonObject.getBoolean(\"Direct\");\n JourneyLeg quotesOutboundLeg = parseJourneyLeg(_jsonObject.getJSONObject(\"OutboundLeg\"));\n JourneyLeg quotesInboundLeg = null;\n if (_jsonObject.has(\"InboundLeg\")) {\n quotesInboundLeg = parseJourneyLeg(_jsonObject.getJSONObject(\"InboundLeg\"));\n }\n String quotesQuoteDateTime = _jsonObject.getString(\"QuoteDateTime\");\n\n //Construct result\n Quote result = new Quote(quotesQuoteId, quotesMinPrice, quotesDirect, quotesOutboundLeg,\n quotesInboundLeg, quotesQuoteDateTime);\n\n return result;\n }",
"public PersistentObject newPersistentObject() {\r\n return new Chm62edtHabitatSyntaxaPersist();\r\n }",
"public ForexQuote getDccQuote() {\n return dccQuote;\n }",
"public Integer getQuoteId() {\n\t\treturn quoteId;\n\t}",
"public String getQuote() {\r\n\t\tString qt = this.getName() + \" (\" + this.getSymbol() + \")\\n\" + \"Price: \" + this.getLastPrice() + \"\\t\" + \"hi: \"\r\n\t\t\t\t+ this.getHighPrice() + \"\\t\" + \"low: \" + this.getLowPrice() + \"\\t\" + \"vol: \" + this.getVol() + \"\\n\";\r\n\t\tqt += \"Ask: \";\r\n\t\tif (!buy.isEmpty()) {\r\n\t\t\tqt += buy.peek().getPrice();\r\n\t\t\tqt += \" size: \" + buy.peek().getShares();\r\n\t\t} else\r\n\t\t\tqt += \"none \";\r\n\r\n\t\tqt += \"Bid: \";\r\n\t\tif (!sell.isEmpty()) {\r\n\t\t\tqt += sell.peek().getPrice();\r\n\t\t\tqt += \"size: \" + sell.peek().getShares();\r\n\t\t} else\r\n\t\t\tqt += \"none \";\r\n\t\treturn qt;\r\n\t}",
"@Test\n public void getQuote() throws Exception {\n Stock quote = quoteService.getQuote(TestConfiguration.QUOTE_SYMBOL);\n assertEquals(TestConfiguration.QUOTE_SYMBOL, quote.getSymbol());\n assertEquals(TestConfiguration.QUOTE_NAME, quote.getName());\n }",
"public Quote(String inUserName, String inStockSymbol, Price inBuyPrice, int inBuyVolume, \n\t\t\tPrice inSellPrice, int inSellVolume) throws InvalidDataException {\n\t\tuserName = inUserName;\n\t\tstockSymbol = inStockSymbol;\n\t\tbuy = new QuoteSide(userName, stockSymbol, inBuyPrice, inBuyVolume, BookSide.BUY);\n\t\tsell = new QuoteSide(userName, stockSymbol, inSellPrice, inSellVolume, BookSide.SELL);\n\t}",
"protected String getQuote() {\n return \"\\\"\";\n }",
"public OrderItem() {}",
"public static String randomQuote() {\n\t\tint i = (int) (Math.random() * quotes.length);\n\t\treturn quotes[i];\n\t}",
"private void generateQuote() throws IOException, ParseException {\r\n int rand = (int) (Math.random() * 152 + 1);\r\n String theURL = \"http://www.nokeynoshade.party/api/queens/\" + String.valueOf(rand); //this can point to any URL\r\n URL url = new URL(theURL);\r\n br = new BufferedReader(new InputStreamReader(url.openStream()));\r\n String inputLine;\r\n while ((inputLine = br.readLine()) != null) {\r\n JSONObject object = (JSONObject) parser.parse(inputLine);\r\n String name = (String) object.get(\"name\");\r\n String quote = (String) object.get(\"quote\");\r\n System.out.println(\"\\\"\" + quote + \"\\\"\");\r\n for (int i = 0; i < quote.length() - 5; i++) {\r\n System.out.print(\" \");\r\n }\r\n System.out.println(\"-\" + name);\r\n System.out.println(\"\\n\");\r\n }\r\n }",
"public Quote getQuote(final String symbol) {\n\n\t\tif (symbol == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tQuote quote = quoteMap.get(symbol);\n\n\t\treturn quote;\n\n\t}",
"public Order() {\n }",
"public void setQuoted( boolean quote ) {\n quote_ = quote;\n }",
"public Order() {\n\t}",
"boolean isQuote();",
"String applyQuote(String name);",
"public void setQuoteID(java.lang.Object quoteID) {\n this.quoteID = quoteID;\n }",
"public AbstractSQLScriptFactory(String quotes, DataModel model, DBExecMode dbMode) {\r\n\t\tsuper();\r\n\t\tthis.dbMode = dbMode;\r\n\t\tthis.model = model;\r\n\t\tthis.quotes = quotes;\r\n\t}",
"public String randomQuote() {//gets a random quote from the listofQuotes\r\n\t\tint randomNumber = random.nextInt(listofQuotes.size());\r\n\t\tString randomQuote = listofQuotes.get(randomNumber);\r\n\t\treturn randomQuote;\r\n\t}",
"public CMObject newInstance();",
"public Order() {\n this(DSL.name(\"order\"), null);\n }",
"public CThostFtdcExchangeQuoteField(CThostFtdcExchangeQuoteField other) {\n __isset_bitfield = other.__isset_bitfield;\n this.askPrice = other.askPrice;\n this.bidPrice = other.bidPrice;\n this.askVolume = other.askVolume;\n this.bidVolume = other.bidVolume;\n this.requestID = other.requestID;\n if (other.isSetBusinessUnit()) {\n this.businessUnit = other.businessUnit;\n }\n if (other.isSetAskOffsetFlag()) {\n this.askOffsetFlag = other.askOffsetFlag;\n }\n if (other.isSetBidOffsetFlag()) {\n this.bidOffsetFlag = other.bidOffsetFlag;\n }\n if (other.isSetAskHedgeFlag()) {\n this.askHedgeFlag = other.askHedgeFlag;\n }\n if (other.isSetBidHedgeFlag()) {\n this.bidHedgeFlag = other.bidHedgeFlag;\n }\n if (other.isSetQuoteLocalID()) {\n this.quoteLocalID = other.quoteLocalID;\n }\n if (other.isSetExchangeID()) {\n this.exchangeID = other.exchangeID;\n }\n if (other.isSetParticipantID()) {\n this.participantID = other.participantID;\n }\n if (other.isSetClientID()) {\n this.clientID = other.clientID;\n }\n if (other.isSetExchangeInstID()) {\n this.exchangeInstID = other.exchangeInstID;\n }\n if (other.isSetTraderID()) {\n this.traderID = other.traderID;\n }\n this.installID = other.installID;\n this.notifySequence = other.notifySequence;\n if (other.isSetOrderSubmitStatus()) {\n this.orderSubmitStatus = other.orderSubmitStatus;\n }\n if (other.isSetTradingDay()) {\n this.tradingDay = other.tradingDay;\n }\n this.settlementID = other.settlementID;\n if (other.isSetQuoteSysID()) {\n this.quoteSysID = other.quoteSysID;\n }\n if (other.isSetInsertDate()) {\n this.insertDate = other.insertDate;\n }\n if (other.isSetInsertTime()) {\n this.insertTime = other.insertTime;\n }\n if (other.isSetCancelTime()) {\n this.cancelTime = other.cancelTime;\n }\n if (other.isSetQuoteStatus()) {\n this.quoteStatus = other.quoteStatus;\n }\n if (other.isSetClearingPartID()) {\n this.clearingPartID = other.clearingPartID;\n }\n this.sequenceNo = other.sequenceNo;\n if (other.isSetAskOrderSysID()) {\n this.askOrderSysID = other.askOrderSysID;\n }\n if (other.isSetBidOrderSysID()) {\n this.bidOrderSysID = other.bidOrderSysID;\n }\n }",
"public Order getOrderById(int id) {\n\t\tOrder o = new Order();\r\n\t\to.setId(id);\r\n\t\to.setDescription(\"Test class\");\r\n\t\treturn o;\r\n\t}",
"public Invoice create() {\r\n\t\treturn new Invoice();\r\n\t}",
"public Market() {\n }",
"PriceModel createInstanceOfPriceModel();",
"public void printQuote() throws IOException {\r\n try {\r\n generateQuote();\r\n } catch (Exception e) {\r\n System.out.println(\"Quote retrieval error: Try start up again\");\r\n e.printStackTrace();\r\n } finally {\r\n if (br != null) {\r\n br.close();\r\n }\r\n }\r\n }",
"@Override\r\n\tpublic void createQuotes(iDAO interfaceDAO)\r\n\t\t\tthrows SQLException {\n\t\t\r\n\t}",
"public Invoice createInvoice(Order order);",
"@Override\n\tpublic Class<QuotesRecord> getRecordType() {\n\t\treturn QuotesRecord.class;\n\t}",
"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}",
"public Order() {\n\t\tsuper();\n\t\tcurrentOrder += 1;\n\t\torderNumber = currentOrder;\n\t\tthis.orderPrice.setScale(2, BigDecimal.ROUND_HALF_EVEN);\n\t}",
"public interface ManualQuote extends MutableBusinessModel\n{\n public static final String PROPERTY_PRODUCT_KEYS = \"PROPERTY_PRODUCT_KEYS\";\n public static final String PROPERTY_SIDE = \"PROPERTY_SIDE\";\n public static final String PROPERTY_PRICE = \"PROPERTY_PRICE\";\n public static final String PROPERTY_SIZE = \"PROPERTY_SIZE\";\n public static final String PROPERTY_OVERRIDE = \"PROPERTY_OVERRIDE\";\n\n // helper methods to struct attributes\n public String getSessionName();\n public ProductKeys getProductKeys();\n public char getSide();\n public Price getPrice();\n public int getSize();\n public boolean isOverrideIndicator();\n public ManualQuoteDetail getManualQuoteDetail();\n public KeyValueStruct[] getExtensions();\n public SessionProduct getSessionProduct();\n public SessionReportingClass getSessionReportingClass();\n public SessionProductClass getSessionProductClass();\n\n public void setSessionProduct(SessionProduct sessionProduct);\n public void setSessionReportingClass(SessionReportingClass sessionReportingClass);\n public void setSessionProductClass(SessionProductClass sessionProductClass);\n public void setSide(char side);\n public void setPrice(Price price);\n public void setSize(int size);\n public void setOverrideIndicator(boolean override);\n public void setManualQuoteDetail(ManualQuoteDetail manualQuoteDetail);\n public void setExtensions(KeyValueStruct[] keyValues);\n\n public ManualQuoteStruct getStruct();\n}",
"protected abstract Order createOrder(Cuisine cuisine);",
"public Stock() {\n }",
"public ATObject meta_quote(ATContext ctx) throws InterpreterException {\n\t\treturn unqExp_.meta_eval(ctx);\n\t}",
"public String getQuoteCharacter() {\n return this.quoteCharacter;\n }",
"public QuoteFilter(){\n this.sentenceTagger = new SentenceTagger();\n }",
"protected Basket makeBasket() {\n\t\treturn new Basket();\n\t}",
"public void recordOpeningQuote(Quote openingQuote_, MarketDataSession marketDataSession_);",
"public ItemPrice() {\n }",
"@Override\n\tpublic IProduct factoryMethod() {\n\t\treturn new Toy();\n\t}",
"public final void mQUOTE() throws RecognitionException {\r\n try {\r\n int _type = QUOTE;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:288:7: ( '\\\"' )\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:288:9: '\\\"'\r\n {\r\n match('\\\"'); \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 interface Tradable {\n\n /**\n * Get method returns the product symbol (IBM, GOOG).\n *\n * @return product symbol\n */\n String getProduct();\n\n /**\n * Get method returns the price of the tradable.\n *\n * @return price object\n * @throws Exception\n */\n Price getPrice() throws Exception;\n\n /**\n * Get method returns the original volume (quantity) of the tradable.\n *\n * @return volume of tradable\n */\n int getOriginalVolume();\n\n /**\n * Get method returns the remaining volume of the tradable.\n *\n * @return remaining volume\n */\n int getRemainingVolume();\n\n /**\n * Get method returns the canceled volume of the tradable.\n *\n * @return canceled volume\n */\n int getCancelledVolume();\n\n /**\n * Set method sets the tradable canceled quantity to the value passed in.\n *\n * @param newCancelledVolume\n * @throws Exception\n */\n void setCancelledVolume(int newCancelledVolume) throws Exception;\n\n /**\n * Set method sets the tradable remaining quantity to the value passed in.\n *\n * @param newRemainingVolume\n * @throws Exception\n */\n void setRemainingVolume(int newRemainingVolume) throws Exception;\n\n /**\n * Get method returns the user id associated with the tradable.\n *\n * @return user id\n */\n String getUser();\n\n /**\n * Get method returns the \"side\" (BUY/SELL) of the tradable.\n *\n * @return side of book\n */\n BookSide getSide();\n\n /**\n * Is quote method returns true if the tradable is part of a quote, returns\n * false if not.\n *\n * @return boolean if quote\n */\n boolean isQuote();\n\n /**\n * Get method returns the tradable \"id\" or system id.\n *\n * @return id of tradable\n */\n String getId();\n}",
"@Override\n\tpublic Quotation generateQuotation(ClientInfo info) {\n\t\t// Create an initial quotation between 800 and 1000\n\t\tdouble price = generatePrice(800, 200);\n\t\t\n\t\t// 5% discount per penalty point (3 points required for qualification)\n\t\tint discount = (info.points > 3) ? 5*info.points:-50;\n\t\t\n\t\t// Add a no claims discount\n\t\tdiscount += getNoClaimsDiscount(info);\n\t\t\n\t\t// Generate the quotation and send it back\n\t\treturn new Quotation(COMPANY, generateReference(PREFIX), (price * (100-discount)) / 100);\n\t}",
"public TradeData() {\r\n\r\n\t}",
"public Order(Name alias) {\n this(alias, ORDER);\n }",
"Quantity createQuantity();",
"public interface InspiringQuotesWidget {\n\t/**\n\t * Returns the current quote {@link Label}.\n\t * \n\t * @return - The current quote {@link Label}.\n\t */\n\tLabel getQuoteLabel();\n\n\t/**\n\t * Returns the current author {@link Label}.\n\t * \n\t * @return - The current author {@link Label}.\n\t */\n\tLabel getAuthorLabel();\n}",
"public QuoteCursorAdapter(Context context, Cursor cursor) {\n super(context, cursor);\n mContext = context;\n }",
"public Objects(String item, double baseprice){\r\n this.item = item;\r\n this.baseprice = baseprice;\r\n }",
"public QuotenResource() {\n // TODO Auto-generated constructor stub\n }",
"public Order() {\n\t\tsuper();\n\t\titems = new HashMap<>();\n\t}",
"public void putQuote(Quote q) {\n\t\tquoteMap.put(q.getSymbolInfo().getSymbol(), q);\n\t\tif(q.getRequestSymbol() != null) {\n\t\t\tquoteMap.put(q.getRequestSymbol(), q);\n\t\t}\n\t}",
"public qEntry() { }",
"void create(Order order);",
"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 synchronized OrderDAO getOrderDAO() {\n\t\treturn new OrderDAO(this);\n\t}"
] | [
"0.76080734",
"0.7401261",
"0.7377103",
"0.73455614",
"0.7288972",
"0.7130423",
"0.70560074",
"0.6949902",
"0.68340385",
"0.6508016",
"0.6497145",
"0.6473406",
"0.6468196",
"0.64465445",
"0.63635117",
"0.62891364",
"0.62671375",
"0.6252759",
"0.6104045",
"0.60700244",
"0.5931075",
"0.5918223",
"0.58918333",
"0.5872548",
"0.57743335",
"0.5725897",
"0.5685874",
"0.5655336",
"0.5636682",
"0.5621281",
"0.5615178",
"0.55776983",
"0.557054",
"0.5541113",
"0.5462972",
"0.53960645",
"0.5383993",
"0.53789896",
"0.53601307",
"0.53298515",
"0.5329284",
"0.5323109",
"0.5316693",
"0.5271842",
"0.5270186",
"0.52602",
"0.5233546",
"0.52182555",
"0.5162196",
"0.51606315",
"0.51590794",
"0.5146989",
"0.5141344",
"0.51351",
"0.50991094",
"0.50942564",
"0.50679684",
"0.5059249",
"0.5030741",
"0.50283164",
"0.50170857",
"0.50086015",
"0.49973607",
"0.49710396",
"0.4964168",
"0.49631223",
"0.49570093",
"0.49462527",
"0.4943446",
"0.4933438",
"0.49276954",
"0.4915269",
"0.49151632",
"0.49112073",
"0.4910027",
"0.49031532",
"0.49030712",
"0.49019703",
"0.48810637",
"0.48739287",
"0.48707452",
"0.48628077",
"0.48320568",
"0.48297614",
"0.48267776",
"0.48259056",
"0.48087785",
"0.4808683",
"0.48020238",
"0.47947863",
"0.47897124",
"0.47844085",
"0.47724926",
"0.47706106",
"0.47699144",
"0.47619188",
"0.47490957",
"0.47454557",
"0.47356525",
"0.4731647"
] | 0.87445176 | 0 |
Returns a new object of class 'Adjustment'. | QuoteAdjustment createQuoteAdjustment(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@JsonGetter(\"adjustment\")\r\n @JsonInclude(JsonInclude.Include.NON_NULL)\r\n public InventoryAdjustment getAdjustment() {\r\n return adjustment;\r\n }",
"Affectation createAffectation();",
"public void adjust()\n {\n }",
"public Adjustment getOne(long id) {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\treturn session.get(Adjustment.class, id);\r\n\t}",
"public AdaDelta() {\n this(0.95,1e-6);\n }",
"public double getAdjustmentRatio() {\n return adjustmentRatio;\n }",
"public Object clone() throws CloneNotSupportedException\n {\n PriceAdjustmentModel dest = null;\n if (getPriceAdjustmentStruct() != null)\n {\n PriceAdjustmentStruct clonedStruct = ProductStructBuilder.clonePriceAdjustmentStruct(getPriceAdjustmentStruct());\n dest = PriceAdjustmentFactory.createPriceAdjustmentModel(clonedStruct);\n }\n return dest;\n }",
"public AdjustScore(String stepId, Double adjustment, String reason) {\n\t\tthis();\n\t\tthis.stepId = stepId;\n\t\tthis.adjustment = adjustment;\n\t\tthis.reason = reason;\n\t}",
"private Sale adjustSale(AdjustmentToSale adjSale, Sale sale) {\n float newVal = 0f;\n switch (adjSale.getOper()) {\n case SUM:\n newVal = sale.getValue() + adjSale.getValue();\n break;\n case MULTIPLY:\n newVal = sale.getValue() * adjSale.getValue();\n break;\n case SUBTRACT:\n newVal = sale.getValue() - adjSale.getValue();\n if (newVal < 0)\n newVal = 0.0f;\n break;\n default:\n newVal = sale.getValue();\n break;\n }\n return new Sale(sale.getProductType(), newVal);\n }",
"@Override\n\tpublic void adjustmentValueChanged(AdjustmentEvent arg0) {\n\n\t}",
"public void adjustmentValueChanged(AdjustmentEvent e) {\n }",
"public SoundEffect adjust(float volume, float pitch) {\n \t\treturn new SoundEffect(this, volume, pitch);\n \t}",
"public Object createObject(XMLControl control) {\n return new OffsetOrigin();\n }",
"LengthSubtract createLengthSubtract();",
"public Deposit roll() {\n return new Deposit(amount, date.plusDays(1), payee);\n }",
"public void setAdjustmentRatio(double value) {\n this.adjustmentRatio = value;\n }",
"public BigDecimal getAdjustedWeighting(BigDecimal weightingMultiplier) {\n\t\treturn weighting.multiply(weightingMultiplier);\n\t}",
"@Override\n @Column(name = \"PER_DIEM_ADJ\", precision = 19, scale = 2)\n public KualiDecimal getPerDiemAdjustment() {\n return perDiemAdjustment == null?KualiDecimal.ZERO:perDiemAdjustment;\n }",
"@Override\n public PrecisionAdjustment getPrecisionAdjustment() {\n return null;\n }",
"public abstract Object adjust(Object value, T type);",
"public interface IAccountProductPlanAdjustment {\n\n\n\n /**\n * Return the value associated with the column: account.\n\t * @return A Account object (this.account)\n\t */\n\tAccount getAccount();\n\t\n\n \n /** \n * Set the value related to the column: account.\n\t * @param account the account value you wish to set\n\t */\n\tvoid setAccount(final Account account);\n\n /**\n * Return the value associated with the column: daysSpanned.\n\t * @return A Integer object (this.daysSpanned)\n\t */\n\tInteger getDaysSpanned();\n\t\n\n \n /** \n * Set the value related to the column: daysSpanned.\n\t * @param daysSpanned the daysSpanned value you wish to set\n\t */\n\tvoid setDaysSpanned(final Integer daysSpanned);\n\n /**\n * Return the value associated with the column: id.\n\t * @return A String object (this.id)\n\t */\n\tString getId();\n\t\n\n \n /** \n * Set the value related to the column: id.\n\t * @param id the id value you wish to set\n\t */\n\tvoid setId(final String id);\n\n /**\n * Return the value associated with the column: productPlan.\n\t * @return A ProductPlan object (this.productPlan)\n\t */\n\tProductPlan getProductPlan();\n\t\n\n \n /** \n * Set the value related to the column: productPlan.\n\t * @param productPlan the productPlan value you wish to set\n\t */\n\tvoid setProductPlan(final ProductPlan productPlan);\n\n /**\n * Return the value associated with the column: startAt.\n\t * @return A Long object (this.startAt)\n\t */\n\tLong getStartAt();\n\t\n\n \n /** \n * Set the value related to the column: startAt.\n\t * @param startAt the startAt value you wish to set\n\t */\n\tvoid setStartAt(final Long startAt);\n\n\t// end of interface\n}",
"public Builder setDelta(int value) {\n \n delta_ = value;\n onChanged();\n return this;\n }",
"public OldRankedConstraint copy() {\n OldRankedConstraint result = new OldRankedConstraint(constraint);\n result.sortingValues = sortingValues.copy();\n return result;\n }",
"public Balance add(final BigDecimal augend) {\r\n return new Balance(this.value.add(augend));\r\n }",
"public void setDecayRate(double newDecayRate ){\n\n decayRate= newDecayRate;\n}",
"ArithmeticDependency createArithmeticDependency();",
"@Override\n\t\tprotected JButton createDecreaseButton(int o) {\n\t\t\tJButton jbutton = new JButton();\n\t\t\tjbutton.setVisible(false);\n\t\t\tjbutton.setEnabled(false);\n\t\t\tjbutton.setPreferredSize(new Dimension(0, 0));\n\t\t\tjbutton.setMinimumSize(new Dimension(0, 0));\n\t\t\tjbutton.setMaximumSize(new Dimension(0, 0));\n\t\t\treturn jbutton;\n\t\t}",
"private Image adjust(Image orig) {\r\n \r\n int iw = orig.getWidth(this);\r\n int ih = orig.getHeight(this);\r\n \r\n Insets i = getInsets();\r\n int cw = getSize().width-i.left-i.right; // Canvas width\r\n int ch = getSize().height-i.top-i.bottom; // Canvas height\r\n\r\n if (iw > cw || ih > ch) {\r\n // scale\r\n \r\n double scaleW = 1.0 * cw / iw;\r\n double scaleH = 1.0 * ch / ih;\r\n \r\n if (scaleW < scaleH) {\r\n // Fit width\r\n wx1 = i.left;\r\n wx2 = cw - 1;\r\n \r\n int nH = (int) (ih * scaleW);\r\n\r\n wy1 = (ch - nH) / 2;\r\n wy2 = wy1 + nH - 1;\r\n } else {\r\n // Fit height\r\n \r\n int nW = (int) (iw * scaleH);\r\n\r\n wx1 = (cw - nW) / 2;\r\n wx2 = wx1 + nW - 1;\r\n \r\n wy1 = i.top;\r\n wy2 = ch - 1;\r\n }\r\n /*\r\n System.out.println(\r\n \"ADJUST sCALE: \" + wx1 + \"@\" + wy1 + \" => \" + wx2 + \"@\"\r\n + wy2);\r\n */ \r\n return orig.getScaledInstance(wx2 - wx1, wy2 - wy1,\r\n Image.SCALE_DEFAULT);\r\n } else {\r\n // center\r\n wx1 = (cw - iw) / 2;\r\n wy1 = (ch - ih) / 2;\r\n wx2 = wx1 + iw - 1;\r\n wy2 = wy1 + ih - 1;\r\n\r\n /*\r\n System.out.println(\r\n \"ADJUST cENTER: \" + wx1 + \"@\" + wy1 + \" => \" + wx2 + \"@\"\r\n + wy2);\r\n */\r\n return orig;\r\n }\r\n\r\n }",
"public ViewGroup.LayoutParams generateLayoutParams(ViewGroup.LayoutParams lp) {\n return new ViewGroup.MarginLayoutParams(lp);\n }",
"public PromotionOrderEntryAdjustActionDTO()\n\t{\n\t\tsuper();\n\t}",
"VariationPoint createVariationPoint();",
"private DateTimeAdjusters() {\n\n }",
"public TemSourceAccountingLine createNewAdvanceAccountingLine() {\n try {\n TemSourceAccountingLine accountingLine = getAdvanceAccountingLineClass().newInstance();\n accountingLine.setFinancialDocumentLineTypeCode(TemConstants.TRAVEL_ADVANCE_ACCOUNTING_LINE_TYPE_CODE);\n accountingLine.setCardType(TemConstants.ADVANCE); // really, card type is ignored but it is validated so we have to set something\n accountingLine.setFinancialObjectCode(this.getParameterService().getParameterValueAsString(TravelAuthorizationDocument.class, TemConstants.TravelAuthorizationParameters.TRAVEL_ADVANCE_OBJECT_CODE, KFSConstants.EMPTY_STRING));\n return accountingLine;\n }\n catch (IllegalAccessException iae) {\n throw new RuntimeException(\"unable to create a new source accounting line for advances\", iae);\n }\n catch (InstantiationException ie) {\n throw new RuntimeException(\"unable to create a new source accounting line for advances\", ie);\n }\n }",
"Quantity createQuantity();",
"protected a generateDefaultLayoutParams() {\n return new a();\n }",
"public static Volume do_calc() {\n\t\treturn new Volume();\n\t}",
"public Deposit amend(double newAmount) {\n return new Deposit(newAmount, date, payee);\n }",
"int getDelta();",
"public List<Adjustment> selectAll() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\treturn session.createCriteria(Adjustment.class).list();\r\n\t}",
"Calcul createCalcul();",
"public static NumberAmount create(){\n NumberAmount NA = new NumberAmount(new AdvancedOperations(Digit.Zero()));\n return NA;\n }",
"org.hl7.fhir.Period addNewValuePeriod();",
"public PaxosRound createRound()\n {\n return createRound(0);\n }",
"public interface AmountFactory {\r\n Amount amountFrom(BigDecimal amountValue);\r\n\r\n Amount amountFrom(BigDecimal amountValue, BigDecimal multiplier);\r\n}",
"public void adjustmentValueChanged(AdjustmentEvent e) {\n boolean increase = true;\n int newScrollBarValue = e.getValue();\n if (newScrollBarValue > oldScrollBarValue) increase = false;\n oldScrollBarValue = newScrollBarValue;\n int month = getMonth();\n if (increase) {\n month += 1;\n if (month == 12) {\n month = 0;\n if (yearChooser != null) {\n int year = yearChooser.getYear();\n year += 1;\n yearChooser.setYear(year);\n }\n }\n } else {\n month -= 1;\n if (month == -1) {\n month = 11;\n if (yearChooser != null) {\n int year = yearChooser.getYear();\n year -= 1;\n yearChooser.setYear(year);\n }\n }\n }\n setMonth(month);\n }",
"LengthAdd createLengthAdd();",
"public ApplicationDeltaHealthPolicy() {\n }",
"AngleAdd createAngleAdd();",
"public MaxAggregator replicate()\r\n {\r\n return new MaxAggregator(getProperty());\r\n }",
"public RevenueIncrease()\n {\n /* Allow the Event super class to handle intialisation */\n super();\n }",
"@Override\n\t\tprotected JButton createIncreaseButton(int o) {\n\t\t\tJButton jbutton = new JButton();\n\t\t\tjbutton.setVisible(false);\n\t\t\tjbutton.setEnabled(false);\n\t\t\tjbutton.setPreferredSize(new Dimension(0, 0));\n\t\t\tjbutton.setMinimumSize(new Dimension(0, 0));\n\t\t\tjbutton.setMaximumSize(new Dimension(0, 0));\n\t\t\treturn jbutton;\n\t\t}",
"Multiply createMultiply();",
"double getFontSizeAdjustment() {\n return fontSizeAdjustment;\n }",
"@Override\n protected Alpha clone() {\n try {\n Alpha alpha = (Alpha) super.clone();\n alpha.mListeners = new ArrayList<Listener>();\n return alpha;\n } catch (CloneNotSupportedException e) {\n throw new RuntimeException(e);\n }\n }",
"Offset createOffset();",
"protected InterestRate() {\n\t}",
"org.hl7.fhir.Period addNewAppliesPeriod();",
"ConflictingAssumptionModel createInstanceOfConflictingAssumptionModel();",
"public PencilPen() {\n this(10.0);\n }",
"Minus createMinus();",
"Minus createMinus();",
"Minus createMinus();",
"abstract Valuable createMoney(double value);",
"private ObjectAnimator a(c paramc)\n/* */ {\n/* 143 */ int i = getWidth();\n/* 144 */ ObjectAnimator localObjectAnimator = ObjectAnimator.ofFloat(paramc, \"translationX\", new float[] { 0.0F, -i });\n/* 145 */ return localObjectAnimator;\n/* */ }",
"public static EdgeAwareInterpolator createEdgeAwareInterpolator()\r\n {\r\n \r\n EdgeAwareInterpolator retVal = EdgeAwareInterpolator.__fromPtr__(createEdgeAwareInterpolator_0());\r\n \r\n return retVal;\r\n }",
"public com.vodafone.global.er.decoupling.binding.request.ModifySpendLimitsRequest createModifySpendLimitsRequest()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.ModifySpendLimitsRequestImpl();\n }",
"public a generateLayoutParams(AttributeSet attributeSet) {\n return new a();\n }",
"public Calc(Budget budget) {\n this.budget = budget;\n }",
"public ExpAverageDemo() {\r\n super();\r\n animateButton.addItemListener(this);\r\n weightSlider.addChangeListener(this);\r\n }",
"public Duration() {\n this(0, 0, 0, 0, 0, 0.0);\n }",
"public String createStatement(Context ctx)\r\n {\r\n return AbstractAdjustmentType.NAME_PROPERTY + \" = \" + getName(); \r\n }",
"@Override\n Matrix applyAdjustment(final Matrix A, final double svAdjustment) {\n final Primitive64Store result\n = Primitive64Store.FACTORY.copy((Primitive64Store) A.getRawObject());\n svd(Matrix.wrap(result), true);\n\n for (int i = 0; i < (k_ - 1); ++i) {\n final double val = sv_[i];\n final double adjSV = Math.sqrt((val * val) + svAdjustment);\n S_.set(i, i, adjSV);\n }\n for (int i = k_ - 1; i < S_.countColumns(); ++i) {\n S_.set(i, i, 0.0);\n }\n\n S_.multiply(Vt_, result);\n\n return Matrix.wrap(result);\n }",
"public DecimalFormatObjectDescription() {\n this(DecimalFormat.class);\n }",
"public CustomMenuAnimator() {\n \tmSpacing = 2.0f;\n }",
"Elevage createElevage();",
"public com.vodafone.global.er.decoupling.binding.request.ModifyBillingcycle createModifyBillingcycle()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.ModifyBillingcycleImpl();\n }",
"public org.xmlsoap.schemas.soap.encoding.Decimal addNewDecimal()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.xmlsoap.schemas.soap.encoding.Decimal target = null;\r\n target = (org.xmlsoap.schemas.soap.encoding.Decimal)get_store().add_element_user(DECIMAL$0);\r\n return target;\r\n }\r\n }",
"public void adjust (int currentCourt)\r\n\t{\r\n\t\t \r\n\t\tif (currentCourt < 0)\r\n\t\t{\r\n\t\t\tend = 0; \r\n\t\t\tthis.setValue(end - start ); \r\n\t\t}\r\n\t}",
"public Appliction()\r\n {\r\n date=LocalDate.of(2020,1,1);//just a start point for the calendar\r\n Appliction p=new Appliction(date.getYear(),date.getMonthValue());\r\n }",
"private Polynomial(Polynomial existing) {\n\t setParameters(new double[existing.getNumberOfParameters()]);\n\t}",
"public AmmoAmountUncapped add(AmmoAmountUncapped r){\n Map<AmmoColor,Integer> newMap = new EnumMap<>(getAmounts());\n for (Map.Entry<AmmoColor, Integer> i: r.getAmounts().entrySet()){\n newMap.put(i.getKey(), getAmounts().get(i.getKey())+i.getValue());\n }\n return new AmmoAmountUncapped(newMap);\n }",
"Constraint createConstraint();",
"Constraint createConstraint();",
"public void save(Adjustment adjustment) {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tsession.save(adjustment);\r\n\t\tsession.flush();\r\n\t}",
"Margin createMargin();",
"@Override\n\tpublic IProperty getClone() {\n\t\treturn new Strength(myStrength);\n\t}",
"@Override\n void adjustStartAndEnd(U vComponentEditedCopy, U vComponentOriginalCopy)\n {\n vComponentEditedCopy.setDateTimeStart(new DateTimeStart(getStartRecurrence()));\n vComponentEditedCopy.setEndOrDuration(getStartRecurrence(), getEndRecurrence());\n }",
"ShipmentCostEstimate createShipmentCostEstimate();",
"AssignmentRule createAssignmentRule();",
"Builder extremeSpikeIncrease(VariableAmount increase);",
"public void update(Adjustment adjustment) {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tsession.update(adjustment);\r\n\t\tsession.flush();\r\n\t}",
"public ViewGroup.LayoutParams generateDefaultLayoutParams() {\r\n return new ViewGroup.MarginLayoutParams(-1, -2);\r\n }",
"void setValue(Adjustable adj, int v);",
"QuoteCoefficient createQuoteCoefficient();",
"public AntelopePanel() {\n this( null, null, true );\n }",
"public HorizontalPodAutoscaler(HorizontalPodAutoscaler source) {\n if (source.Name != null) {\n this.Name = new String(source.Name);\n }\n if (source.Namespace != null) {\n this.Namespace = new String(source.Namespace);\n }\n if (source.MinReplicas != null) {\n this.MinReplicas = new Long(source.MinReplicas);\n }\n if (source.MaxReplicas != null) {\n this.MaxReplicas = new Long(source.MaxReplicas);\n }\n if (source.ResourceMetricTarget != null) {\n this.ResourceMetricTarget = new ResourceMetricTarget[source.ResourceMetricTarget.length];\n for (int i = 0; i < source.ResourceMetricTarget.length; i++) {\n this.ResourceMetricTarget[i] = new ResourceMetricTarget(source.ResourceMetricTarget[i]);\n }\n }\n }",
"private LLCalc createCalc(Grammar g) {\n\t\treturn new MyLLCalc(g);\n\t}",
"AngleSubtract createAngleSubtract();",
"public org.hl7.fhir.Period addNewPeriod()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.Period target = null;\n target = (org.hl7.fhir.Period)get_store().add_element_user(PERIOD$2);\n return target;\n }\n }",
"public CarpetCalculator(double newPricePerSquareFoot, Room newRoom){\n setPricePerSquareFoot(newPricePerSquareFoot);\n setRoom(newRoom);\n}"
] | [
"0.56115705",
"0.5538052",
"0.5535277",
"0.54663897",
"0.53610295",
"0.5353694",
"0.50737655",
"0.5041167",
"0.50196475",
"0.4900778",
"0.4883778",
"0.48788205",
"0.4750967",
"0.47471544",
"0.4722446",
"0.46923566",
"0.46776053",
"0.465646",
"0.46414164",
"0.4637885",
"0.46332005",
"0.46068645",
"0.4594856",
"0.45876652",
"0.45769912",
"0.45695683",
"0.4530095",
"0.45108715",
"0.45103675",
"0.45071408",
"0.44995114",
"0.44994044",
"0.44971272",
"0.4495552",
"0.44764403",
"0.4474829",
"0.44718748",
"0.4466188",
"0.44445452",
"0.44443533",
"0.4440675",
"0.4432798",
"0.4426759",
"0.44237325",
"0.44084296",
"0.44040534",
"0.44028473",
"0.4401878",
"0.43961346",
"0.43922928",
"0.43890414",
"0.4384644",
"0.43837455",
"0.43613496",
"0.43595088",
"0.435837",
"0.43448612",
"0.43362898",
"0.43323308",
"0.4331766",
"0.4331766",
"0.4331766",
"0.43212",
"0.43190396",
"0.4316638",
"0.43147936",
"0.43143633",
"0.42970976",
"0.42940786",
"0.42918098",
"0.42868686",
"0.42862433",
"0.42840675",
"0.4283269",
"0.4280261",
"0.42783728",
"0.4276135",
"0.4275532",
"0.42744073",
"0.42698205",
"0.42689615",
"0.4268853",
"0.4268853",
"0.42651966",
"0.4260312",
"0.42572704",
"0.42517072",
"0.42501977",
"0.4243533",
"0.42419782",
"0.42418775",
"0.4241662",
"0.42276105",
"0.42204794",
"0.4206404",
"0.42020664",
"0.4201671",
"0.4200468",
"0.4196127",
"0.41895568"
] | 0.6664828 | 0 |
Returns a new object of class 'Attribute'. | QuoteAttribute createQuoteAttribute(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Attribute createAttribute();",
"Attribute createAttribute();",
"private Attribute createAttribute() {\n\t\t\tAttribute att = AttributeFactory.createAttribute(getName(), getValueType());\n\t\t\tatt.getAnnotations().clear();\n\t\t\tatt.getAnnotations().putAll(getAnnotations());\n\t\t\tattribute = att;\n\t\t\treturn att;\n\t\t}",
"TAttribute createTAttribute();",
"public static AttributeFactory newAttributeFactory() {\n\t\treturn newAttributeFactory(random());\n\t}",
"static Attribute createAttribute(String name) {\n\t\treturn createAttribute(name, new IntegerFieldWrapper());\n\t}",
"@Function Attr createAttribute(String name);",
"protected Attribute createAttribute(DapAttribute dapattr) {\n return createAttribute(null, dapattr);\n }",
"protected Attribute createAttribute(Field field) {\n return pkg.add(new Attribute(field));\n }",
"default Attribute getAttribute(AttributeName attributeName) {return (Attribute) attributeName;}",
"static Attribute createAttribute(String name, Field field) {\n\t\tAttribute attribute = new Attribute(name, field);\n\t\tattribute.setKind(Attribute.NONE);\n\t\tattribute.setPreferenceType(Attribute.GAIN);\n\t\treturn attribute;\n\t}",
"public Attr() {\n\t\t\tsuper();\n\t\t}",
"private AgAttribute resolveNew() {\n\n return new DefaultAttribute(name,\n requiredProperty(\"javaType\", javaType),\n\n // using the defaults from @AgAttribute annotation\n propertyOrDefault(readable, true),\n propertyOrDefault(writable, true),\n\n requiredProperty(\"dataReader\", dataReader));\n }",
"AttributeDeclarations createAttributeDeclarations();",
"public IRAttribute ( ) {\n\t\tsuper();\n\t}",
"ShipmentAttribute createShipmentAttribute();",
"protected Attribute attribute(final QName name, final String value) {\n return new Attribute() {\n @Override\n public QName getName() {\n return name;\n }\n\n @Override\n public String getValue() {\n return value;\n }\n };\n }",
"public final static WMAttribute fromAttributeInstance(\r\n IAttributeInstance attr )\r\n {\r\n\r\n return new WMAttributeImpl( attr.getName(), attr.getType(),\r\n attr.getValue() );\r\n }",
"Atributo createAtributo();",
"public EdmAttribute setupAttribute(String val) {\n EdmAttribute a = new EdmAttribute(val);\n return a;\n }",
"protected abstract void createAttributes();",
"public Attribute_New(String _name, String _value)\n {\n name = _name;\n\n List singleAttributList = new ArrayList<String>();\n singleAttributList.add(_value);\n\n }",
"public interface Attribute {\n\n /**\n * The id of the attribute. This will be unique for all attributes in a\n * graph. However, if an attribute is removed from the graph, future\n * attributes may (and probably will) reuse this id.\n *\n * @return the id of the attribute.\n */\n public int getId();\n\n /**\n * Sets the id of this attribute.\n *\n * @param id the new id of this attribute.\n */\n public void setId(final int id);\n\n /**\n * Returns the element type that this attribute is associated with.\n *\n * @return the element type that this attribute is associated with.\n */\n public GraphElementType getElementType();\n\n /**\n * Sets the element type of this attribute.\n *\n * @param elementType the new element type of this attribute.\n */\n public void setElementType(final GraphElementType elementType);\n\n /**\n * The type of this attribute.\n * <p>\n * This is a String as returned by\n * {@link au.gov.asd.tac.constellation.graph.attribute.AttributeDescription#getName()}\n * from one of the registered AttributeDescription instances.\n *\n * @return The type of this attribute.\n */\n public String getAttributeType();\n\n /**\n * Sets the type of this attribute.\n *\n * @param attributeType the new type of the attribute.\n */\n public void setAttributeType(final String attributeType);\n\n /**\n * Return the name of the attribute. This name will be unique for all\n * attributes associated with the same element type in a graph. This is the\n * value that is presented to the user in the UI and the most common way in\n * which attributes are looked up in the graph.\n *\n * @return the name of the attribute.\n */\n public String getName();\n\n /**\n * Sets a new name for this attribute.\n *\n * @param name the new name for the attribute.\n * @see Attribute#getName()\n */\n public void setName(final String name);\n\n /**\n * Returns the description of an attribute. The description provides more\n * detailed information about the attribute such as how it is being used or\n * and constraints that should be observed.\n *\n * @return the description of an attribute.\n */\n public String getDescription();\n\n /**\n * Sets a new description of an attribute.\n *\n * @param description the new description of the attribute.\n * @see Attribute#getDescription()\n */\n public void setDescription(final String description);\n\n /**\n * Returns the current default value for this attribute. This is the value\n * that new elements will get when they are created.\n *\n * @return the current default value for this attribute.\n */\n public Object getDefaultValue();\n\n /**\n * Sets the new default value for this attribute. This will not change the\n * values of any existing elements but rather the value that new elements\n * will get given when they are created.\n *\n * @param defaultValue the new default value for the attribute.\n */\n public void setDefaultValue(final Object defaultValue);\n\n /**\n * Returns the class of the attribute description that defines this\n * attribute.\n *\n * @return the class of the attribute description that defines this\n * attribute.\n */\n public Class<? extends AttributeDescription> getDataType();\n\n /**\n * Sets the data type of this attribute.\n *\n * @param dataType the new datatype of this attribute.\n */\n public void setDataType(final Class<? extends AttributeDescription> dataType);\n\n /**\n * Returns the attribute merger for this attribute.\n *\n * @return the attribute merger for this attribute.\n */\n public GraphAttributeMerger getAttributeMerger();\n\n /**\n * Sets the attribute merger for this attribute.\n *\n * @param attributeMerger the attribute merger for this attribute.\n */\n public void setAttributeMerger(final GraphAttributeMerger attributeMerger);\n}",
"public ModuleObjectAttributeItem() {}",
"public Attribute method_4098(AttributeKey var1) {\n return new class_57(this);\n }",
"EAttribute createEAttribute();",
"public XmlProtoAttributeBuilder getOrCreateAttribute(String name) {\n return getOrCreateAttribute(NO_NAMESPACE_URI, name);\n }",
"public AttributeContainer() {\n super();\n }",
"public GenericAttribute getAttribute () {\n return attribute;\n }",
"A createAttribute( @NonNull final String p_id, @Nonnull final String p_property );",
"public AttributeField(Field field){\n this.field = field;\n }",
"IAttributes getAttributes();",
"public AttributeType(AttributeCategory category) {\n setCategory(category);\n }",
"public RequestAttribute() {\n }",
"default void putAttribute(ConceptName name, Attribute attribute) {}",
"protected Attr attr(String name, String value){\n\t\tAttr a = doc.createAttribute(name);\n\t\ta.setValue(value);\n\t\treturn a;\n\t}",
"public Attribute(String name, Type type, int ID, int length){\r\n\t\tthis.name = name;\r\n\t\tthis.type = type;\r\n\t\tthis.ID = ID;\r\n\t\tthis.length = length;\r\n\t\tvalues = new ArrayList();\r\n\t}",
"DefaultAttribute()\n {\n }",
"public void createNewAttribute(String attributeName, String attributeType){\n attributeList.add(new Attribute(attributeName, attributeType));\n }",
"public AttributeInstance getAttribute ( Attribute attribute ) {\n\t\treturn extract ( handle -> handle.getAttribute ( attribute ) );\n\t}",
"public static <T> Attribute<T> forField(final Field field) {\n return FieldAttribute.newFieldAttribute(field);\n }",
"public static AttributeType create( AttributeType documentAttributeType )\n {\n _dao.insert( documentAttributeType );\n\n return documentAttributeType;\n }",
"Attributes getAttributes();",
"void addAttribute(String attrName, Attribute<?> newAttr);",
"public Class getAttributeType();",
"Attribute getAttribute();",
"final public Attr clone() {\r\n\t\t\tif(Vector == null)\r\n\t\t\t\treturn new Attr(Name, Value, null);\r\n\t\t\telse if(Object == null)\r\n\t\t\t\treturn new Attr(Name, Value, Vector.clone());\r\n\t\t\telse\r\n\t\t\t\treturn new Attr(Name, Value, Vector.clone(), Object);\r\n\t\t}",
"public static Attribute createEntity(EntityManager em) {\n Attribute attribute = new Attribute()\n .name(DEFAULT_NAME)\n .description(DEFAULT_DESCRIPTION)\n .showOrder(DEFAULT_SHOW_ORDER)\n .active(DEFAULT_ACTIVE);\n return attribute;\n }",
"AttributeLayout createAttributeLayout();",
"public AttributeMap()\r\n\t{\r\n\t\tsuper();\r\n\t}",
"public AttributeAlreadyExistsException() {\n super();\n }",
"public DmcAttribute<?> getAttributeInstance(Integer id) throws InstantiationException, IllegalAccessException, ClassNotFoundException {\n \tAttributeDefinition ad = attrByID.get(id);\n \tDmcAttributeInfo\tai = DmcOmni.instance().getInfo(id);\n \t\n \tif (ad == null){\n \t\tthrow(new IllegalStateException(\"Tried to deserialize attribute with unknown ID: \" + id));\n \t}\n \t\n \tif (ai == null){\n \t\tthrow(new IllegalStateException(\"Tried to deserialize attribute with unknown ID: \" + id));\n \t}\n \t\n \tDmcAttribute<?> rc = (DmcAttribute<?>) ad.getType().getAttributeHolder(ai);\n \trc.setAttributeInfo(ai);\n \t\n \treturn(rc);\n }",
"public void addAttribute(TLAttribute attribute);",
"public Attribute( Element eleAttr ) {\n strClass = eleAttr.getAttributeValue( \"class\" );\n strAttrName = eleAttr.getAttributeValue( \"name\" );\n strName = Utils.formatAttrName( strAttrName );\n String strDecimal = eleAttr.getAttributeValue( \"decimal\" );\n if( strDecimal != null && strDecimal.length() > 0 ) {\n bDecimal = Byte.parseByte( strDecimal );\n }\n String strLength = eleAttr.getAttributeValue( \"length\" );\n if( strLength != null && strLength.length() > 0 ) {\n lLength = Long.parseLong( strLength );\n }\n strJavaClass = javaClass();\n bID = strClass.equals( \"com.space.core.model.feature.attr.IdType\" );\n bNullable = !Boolean.parseBoolean( eleAttr.getAttributeValue( \"mandatory\" ) );\n String strIndex = eleAttr.getAttributeValue( \"index\" );\n if( strIndex != null ) {\n if( strIndex.equals( \"unique\" ) ) {\n bIndexType = INDEX_UNIQUE;\n } else if( strIndex.equals( \"duplicate\" ) ) {\n bIndexType = INDEX_DUPLICATE;\n }\n }\n }",
"private Attr newAttr(String tipo, String valor) {\n/* 341 */ Attr atrib = this.pagHTML.createAttribute(tipo);\n/* 342 */ atrib.setValue(valor);\n/* 343 */ return atrib;\n/* */ }",
"protected LPDMODOMAttribute() {\n }",
"public Attribute addAttribute(String sName)\n {\n ensureLoaded();\n\n Attribute attribute;\n if (sName.equals(ATTR_FILENAME))\n {\n attribute = new SourceFileAttribute(this);\n }\n else if (sName.equals(ATTR_DEPRECATED))\n {\n attribute = new DeprecatedAttribute(this);\n }\n else if (sName.equals(ATTR_SYNTHETIC))\n {\n attribute = new SyntheticAttribute(this);\n }\n else if (sName.equals(ATTR_INNERCLASSES))\n {\n attribute = new InnerClassesAttribute(this);\n }\n else if (sName.equals(ATTR_ENCMETHOD))\n {\n attribute = new EnclosingMethodAttribute(this);\n }\n else if (sName.equals(ATTR_SIGNATURE))\n {\n attribute = new SignatureAttribute(this);\n }\n else if (sName.equals(ATTR_RTVISANNOT))\n {\n attribute = new RuntimeVisibleAnnotationsAttribute(this);\n }\n else if (sName.equals(ATTR_RTINVISANNOT))\n {\n attribute = new RuntimeInvisibleAnnotationsAttribute(this);\n }\n else if (sName.equals(ATTR_RTVISTANNOT))\n {\n attribute = new RuntimeVisibleTypeAnnotationsAttribute(this);\n }\n else if (sName.equals(ATTR_RTINVISTANNOT))\n {\n attribute = new RuntimeInvisibleTypeAnnotationsAttribute(this);\n }\n else if (sName.equals(ATTR_BOOTSTRAPMETHODS))\n {\n attribute = new BootstrapMethodsAttribute(this);\n }\n else\n {\n attribute = new Attribute(this, sName);\n }\n\n m_tblAttribute.put(attribute.getIdentity(), attribute);\n setModified(true);\n\n return attribute;\n }",
"public static XAttribute derivePrototype(XAttribute instance) {\n\t\tXAttribute prototype = (XAttribute) instance.clone();\n\t\tif (prototype instanceof XAttributeLiteral) {\n\t\t\t((XAttributeLiteral) prototype).setValue(\"DEFAULT\");\n\t\t} else if (prototype instanceof XAttributeBoolean) {\n\t\t\t((XAttributeBoolean) prototype).setValue(true);\n\t\t} else if (prototype instanceof XAttributeContinuous) {\n\t\t\t((XAttributeContinuous) prototype).setValue(0.0);\n\t\t} else if (prototype instanceof XAttributeDiscrete) {\n\t\t\t((XAttributeDiscrete) prototype).setValue(0);\n\t\t} else if (prototype instanceof XAttributeTimestamp) {\n\t\t\t((XAttributeTimestamp) prototype).setValueMillis(0);\n\t\t} else if (prototype instanceof XAttributeID) {\n\t\t\t((XAttributeID) prototype).setValue(XIDFactory.instance().createId());\n\t\t} else {\n\t\t\tthrow new AssertionError(\"Unexpected attribute type!\");\n\t\t}\n\t\treturn prototype;\n\t}",
"public static DLNAAttribute newInstance(Type type, String attributeValue, String contentFormat) {\n/* 125 */ DLNAAttribute attr = null;\n/* 126 */ for (int i = 0; i < (type.getAttributeTypes()).length && attr == null; i++) {\n/* 127 */ Class<? extends DLNAAttribute> attributeClass = type.getAttributeTypes()[i];\n/* */ try {\n/* 129 */ log.finest(\"Trying to parse DLNA '\" + type + \"' with class: \" + attributeClass.getSimpleName());\n/* 130 */ attr = attributeClass.newInstance();\n/* 131 */ if (attributeValue != null) {\n/* 132 */ attr.setString(attributeValue, contentFormat);\n/* */ }\n/* 134 */ } catch (InvalidDLNAProtocolAttributeException ex) {\n/* 135 */ log.finest(\"Invalid DLNA attribute value for tested type: \" + attributeClass.getSimpleName() + \" - \" + ex.getMessage());\n/* 136 */ attr = null;\n/* 137 */ } catch (Exception ex) {\n/* 138 */ log.severe(\"Error instantiating DLNA attribute of type '\" + type + \"' with value: \" + attributeValue);\n/* 139 */ log.log(Level.SEVERE, \"Exception root cause: \", Exceptions.unwrap(ex));\n/* */ } \n/* */ } \n/* 142 */ return attr;\n/* */ }",
"@Override\n public boolean isAttribute()\n {\n return attribute;\n }",
"AttributeCell createAttributeCell();",
"private Attributes getAttributes()\r\n\t{\r\n\t return attributes;\r\n\t}",
"Object getAttribute(int attribute);",
"boolean isAttribute();",
"public Model addAttribute(String attributeName, Object attributeValue) {\n\t\tthis.put(attributeName, attributeValue);\r\n\t\treturn this;\r\n\t}",
"public AttributeDescriptorDTO()\n\t{\n\t\tsuper();\n\t}",
"public AttributeMapper(Mapper wrapped) {\r\n this(wrapped, null);\r\n }",
"public Attribute(String title) {\n \t\tthis.title = title;\n \t\tconflictMagnitude = 0;\n \t}",
"@Override\n protected AttributeInitializer getAttributeInitializer() {\n return attributeInitializer;\n }",
"VisualizationAttribute createVisualizationAttribute();",
"public org.python.Object __getattribute__(java.lang.String name);",
"public org.omg.uml.foundation.core.Attribute getAttribute();",
"protected AttributeImpl(long ID, int datatype) {\n super(ID);\n this.datatype = datatype;\n }",
"public static StandardAttributes getInstance() {\n if(standardAttributes == null)\n standardAttributes = new StandardAttributes();\n return standardAttributes;\n }",
"private AttributeDefinition setUpAttributeDefinition(String name) throws Exception {\n\t\tAttributeDefinition ad = new AttributeDefinition();\n\t\tad.setNamespace(\"ns\");\n\t\tad.setFriendlyName(name);\n\t\tad.setId(idCounter++);\n\t\twhen(attrManagerImplMock.getAttributeDefinition(any(), eq(ad.getName()))).thenReturn(ad);\n\t\treturn ad;\n\t}",
"private AttributeTypeHome( )\n {\n }",
"public Attribute(final String newName, final long newAttributeID,\r\n\t\t\tfinal long newRelationID, final Attribute.Type newType, \r\n\t\t\tfinal char newNullable, final int newDistinct, \r\n\t\t\tfinal int newLength) {\r\n\t\t\r\n\t\t//Assign the things to the new attribute from the constructor\r\n\t\tthis.name = newName;\r\n\t\tthis.ID = newAttributeID;\r\n\t\tthis.parent = newRelationID;\r\n\t\tthis.type = newType;\r\n\t\tthis.nullable = (newNullable == 't');\r\n\t\tthis.distinct = newDistinct;\r\n\t\tthis.length = newLength;\r\n\t\tvalues = new ArrayList();\r\n\t}",
"public static AttributeFactory newAttributeFactory(Random random) {\n\t\tswitch (random.nextInt(3)) {\n\t\tcase 0:\n\t\t\treturn TokenStream.DEFAULT_TOKEN_ATTRIBUTE_FACTORY;\n\t\tcase 1:\n\t\t\treturn org.apache.lucene.analysis.Token.TOKEN_ATTRIBUTE_FACTORY;\n\t\tcase 2:\n\t\t\treturn AttributeFactory.DEFAULT_ATTRIBUTE_FACTORY;\n\t\tdefault:\n\t\t\tthrow new AssertionError(\"Please fix the Random.nextInt() call above\");\n\t\t}\n\t}",
"public Attributes getAttributes() { return this.attributes; }",
"public AttributeInfo getAttributeInfo() {\r\n\r\n String newAttrName = this.nameTextField.getText();\r\n\r\n if (newAttrName == null || newAttrName.length() == 0) {\r\n newAttrName = \"NEW_ATTRIBUTE\";\r\n }\r\n\r\n AttributeInfo attrInfo = new AttributeInfo((AttributeType) this.typeDropDown.getSelectedItem(), newAttrName);\r\n\r\n if (this.needDefaultValue) {\r\n attrInfo.setNullValue(this.getDefaultValue());\r\n }\r\n\r\n return attrInfo;\r\n }",
"public Attribute(String name, int metricFactor, int priority){\n this.name = name;\n this.maxOccurance = 0;\n this.metric = 0.0;\n subGrps = new Vector<SubGroup>();\n this.maxSubGroups = new Vector<SubGroup>();\n this.metricFactor = metricFactor;\n this.priority = priority;\n this.isDominating = true;\n}",
"public J3DAttribute () {}",
"public boolean isAttribute() {\n\t\treturn false;\n\t}",
"public interface IAttributes {\n\n\t/***\n\t * Integer index of the attribute. Should be used with defined public static final int values.\n\t * Chosen because of better extensibility (an enum cannot extend another enum).\n\t * More specific object attribute definitions should extend the ObjectAttributesBase class in order\n\t * to have access to all derived attributes.\n\t * \n\t * @param attribute integer index of attribute\n\t * @return\n\t */\n\tObject getAttribute(int attribute);\n\t\n\tvoid setAttribute(int attribute, Object value);\n}",
"public AttributeDiscretization() {\n\n }",
"public Object attribute(String name) {\n return Classes.getFieldValue(this, name);\n }",
"public XmlProtoAttributeBuilder getOrCreateAndroidAttribute(String name, int resourceId) {\n return getOrCreateAttributeInternal(\n /* attributePredicate= */ attr ->\n attr.getName().equals(name)\n && attr.getNamespaceUri().equals(ANDROID_NAMESPACE_URI)\n && attr.getResourceId() == resourceId,\n /* attributeFactory= */ () ->\n XmlAttribute.newBuilder()\n .setName(name)\n .setNamespaceUri(ANDROID_NAMESPACE_URI)\n .setResourceId(resourceId));\n }",
"public TLAttribute getAttribute(String attributeName);",
"String attributeToSetter(String name);",
"public TagAttributeHandlerBuilder attribute(String attribute) {\n this.attribute = attribute;\n return this;\n }",
"String attributeToGetter(String name);",
"public GetAttributesDefinitionV2() {}",
"public T caseAttribute(Attribute object)\n {\n return null;\n }",
"public InstanceTypeSelector(IAttribute item) {\r\n this.attr = item;\r\n }",
"ObjectFactory<?> getObjectFactory(Injectable attribute);",
"QuoteTermAttribute createQuoteTermAttribute();",
"private Object getAttributeObject(String attribute, JSONObject jsonObject) {\n Object attributeObject = null;\n if (attribute.equals(STUDENT_DOCUMENT)) {\n attributeObject = StudentDocumentDataAssembler.create(jsonObject);\n } else if (attribute.equals(STUDENT_FAMILY_MEMBER)) {\n attributeObject = StudentFamilyDataAssembler.create(jsonObject);\n }\n return attributeObject;\n }",
"public interface AttributeFun {\n}",
"public void copyAttribute(String oldAttrName, String newAttrName) {\n log.debug(\"copyAttribute: \" + oldAttrName + \", \" + newAttrName);\n if (isAttributeDefined(newAttrName)) {\n deleteAttribute(newAttrName);\n }\n String typeDef = getAttrTypeDef(oldAttrName);\n defineAttribute(newAttrName, typeDef);\n NST oldAttrNST = getAttrDataNST(oldAttrName);\n NST newAttrNST = getAttrDataNST(newAttrName);\n newAttrNST.insertRowsFromNST(oldAttrNST);\n oldAttrNST.release();\n newAttrNST.release();\n }",
"public Attribute(String attributeName, short htmlVersions, AttrCheck check)\n {\n this.name = attributeName;\n this.versions = htmlVersions;\n this.attrchk = check;\n }"
] | [
"0.84223485",
"0.84223485",
"0.78168356",
"0.76549613",
"0.70523006",
"0.69880027",
"0.6872505",
"0.6816823",
"0.68070126",
"0.6677628",
"0.65332144",
"0.65067095",
"0.6464964",
"0.64194643",
"0.6393035",
"0.6363977",
"0.6349932",
"0.63072515",
"0.6169066",
"0.61664647",
"0.61602086",
"0.60893387",
"0.60867125",
"0.6068259",
"0.6052162",
"0.6039989",
"0.6026362",
"0.5988337",
"0.59745806",
"0.5959478",
"0.5918304",
"0.5903296",
"0.58828384",
"0.58701855",
"0.58619004",
"0.58549106",
"0.583716",
"0.58241874",
"0.5823009",
"0.58222634",
"0.5804514",
"0.57978654",
"0.5770986",
"0.5756858",
"0.5743675",
"0.5740198",
"0.57187575",
"0.57014614",
"0.5676461",
"0.56688905",
"0.5665078",
"0.5657932",
"0.5657459",
"0.5655764",
"0.5653371",
"0.56388277",
"0.5638213",
"0.5631177",
"0.56264496",
"0.56222814",
"0.56211704",
"0.5619699",
"0.56182116",
"0.56160563",
"0.56052864",
"0.5599374",
"0.55979043",
"0.5592578",
"0.5585141",
"0.55816764",
"0.5577028",
"0.5575337",
"0.55746806",
"0.55727017",
"0.55585057",
"0.5543279",
"0.5529353",
"0.5516593",
"0.55060554",
"0.55053014",
"0.548828",
"0.5483384",
"0.54828405",
"0.5482442",
"0.54799",
"0.5463599",
"0.54483235",
"0.54356796",
"0.5427379",
"0.5426714",
"0.54185426",
"0.54107213",
"0.540941",
"0.5406807",
"0.5392757",
"0.5383254",
"0.5379439",
"0.53781563",
"0.53770614",
"0.53759044"
] | 0.61079067 | 21 |
Returns a new object of class 'Coefficient'. | QuoteCoefficient createQuoteCoefficient(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getCoefficient();",
"public double setCoefficient(double coefficient) {\n this.coefficient = coefficient;\n return this.coefficient;\n }",
"public double get_coefficient() {\r\n\t\treturn this._coefficient;\r\n\t}",
"public double[] coeff();",
"public ComplexPolynomial derive() {\r\n\r\n\t\tComplex[] derive = new Complex[this.order()];\r\n\t\tfor (int i = 0; i < this.order(); i++) {\r\n\t\t\tderive[i] = factors[i + 1].multiply(new Complex(i + 1, 0));\r\n\t\t}\r\n\r\n\t\treturn new ComplexPolynomial(derive);\r\n\t}",
"public double getCoeff() {\n\t\t\t\treturn coeff;\n\t\t\t}",
"@Test\n\tpublic void testGetterCoefficient() {\n\t\tf.ajouterMatiere(\"Français\", 3);\n\t\tf.ajouterMatiere(\"Mathématiques\", 5);\n\t\t\n\t\tassertEquals(\"Le coefficient de la matiere devrait etre de 3\", 3, f.getCoefficient(\"Français\"), 5);\n\t\tassertEquals(\"Le coefficient de la matiere devrait etre de 5\", 5, f.getCoefficient(\"Mathématiques\"), 5);\n\t\tassertEquals(\"Le coefficient de la matiere devrait etre de 5\", 0, f.getCoefficient(\"Maths\"), 5);\n\t}",
"public BigInteger[] coefficients()\n\t{\n\t\treturn coefficients;\n\t}",
"public PidCoefficients()\n {\n this(1.0, 0.0, 0.0, 0.0);\n }",
"@SuppressWarnings(\"unchecked\")\n public RingFactory nextCoefficientRing() throws IOException {\n RingFactory coeff = null;\n coeffType ct = null;\n int tt;\n tt = tok.nextToken();\n if (tok.sval != null) {\n if (tok.sval.equalsIgnoreCase(\"Q\")) {\n coeff = new BigRational(0);\n ct = coeffType.BigRat;\n } else if (tok.sval.equalsIgnoreCase(\"Rat\")) {\n coeff = new BigRational(0);\n ct = coeffType.BigRat;\n } else if (tok.sval.equalsIgnoreCase(\"D\")) {\n coeff = new BigDecimal(0);\n ct = coeffType.BigD;\n } else if (tok.sval.equalsIgnoreCase(\"Z\")) {\n coeff = new BigInteger(0);\n ct = coeffType.BigInt;\n } else if (tok.sval.equalsIgnoreCase(\"Int\")) {\n coeff = new BigInteger(0);\n ct = coeffType.BigInt;\n } else if (tok.sval.equalsIgnoreCase(\"C\")) {\n coeff = new BigComplex(0);\n ct = coeffType.BigC;\n } else if (tok.sval.equalsIgnoreCase(\"Complex\")) {\n coeff = new BigComplex(0);\n ct = coeffType.BigC;\n } else if (tok.sval.equalsIgnoreCase(\"Quat\")) {\n coeff = new BigQuaternion(0);\n ct = coeffType.BigQ;\n } else if (tok.sval.equalsIgnoreCase(\"Mod\")) {\n tt = tok.nextToken();\n boolean openb = false;\n if (tt == '[') { // optional\n openb = true;\n tt = tok.nextToken();\n }\n if (tok.sval != null && tok.sval.length() > 0) {\n if (digit(tok.sval.charAt(0))) {\n BigInteger mo = new BigInteger(tok.sval);\n BigInteger lm = new BigInteger(Long.MAX_VALUE);\n if (mo.compareTo(lm) < 0) {\n coeff = new ModLongRing(mo.getVal());\n } else {\n coeff = new ModIntegerRing(mo.getVal());\n }\n System.out.println(\"coeff = \" + coeff + \" :: \" + coeff.getClass());\n ct = coeffType.ModInt;\n } else {\n tok.pushBack();\n }\n } else {\n tok.pushBack();\n }\n if (tt == ']' && openb) { // optional\n tt = tok.nextToken();\n }\n } else if (tok.sval.equalsIgnoreCase(\"RatFunc\")) {\n String[] rfv = nextVariableList();\n //System.out.println(\"rfv = \" + rfv.length + \" \" + rfv[0]);\n int vr = rfv.length;\n BigInteger bi = new BigInteger();\n TermOrder to = new TermOrder(TermOrder.INVLEX);\n GenPolynomialRing<BigInteger> pcf = new GenPolynomialRing<BigInteger>(bi, vr, to, rfv);\n coeff = new QuotientRing(pcf);\n ct = coeffType.RatFunc;\n } else if (tok.sval.equalsIgnoreCase(\"ModFunc\")) {\n tt = tok.nextToken();\n RingFactory mi = new ModIntegerRing(\"19\");\n if (tok.sval != null && tok.sval.length() > 0) {\n if (digit(tok.sval.charAt(0))) {\n mi = new ModIntegerRing(tok.sval);\n } else {\n tok.pushBack();\n }\n } else {\n tok.pushBack();\n }\n String[] rfv = nextVariableList();\n //System.out.println(\"rfv = \" + rfv.length + \" \" + rfv[0]);\n int vr = rfv.length;\n TermOrder to = new TermOrder(TermOrder.INVLEX);\n GenPolynomialRing<ModInteger> pcf = new GenPolynomialRing<ModInteger>(mi, vr, to, rfv);\n coeff = new QuotientRing(pcf);\n ct = coeffType.ModFunc;\n } else if (tok.sval.equalsIgnoreCase(\"IntFunc\")) {\n String[] rfv = nextVariableList();\n //System.out.println(\"rfv = \" + rfv.length + \" \" + rfv[0]);\n int vr = rfv.length;\n BigRational bi = new BigRational();\n TermOrder to = new TermOrder(TermOrder.INVLEX);\n GenPolynomialRing<BigRational> pcf = new GenPolynomialRing<BigRational>(bi, vr, to, rfv);\n coeff = pcf;\n ct = coeffType.IntFunc;\n } else if (tok.sval.equalsIgnoreCase(\"AN\")) {\n tt = tok.nextToken();\n if (tt == '[') {\n tt = tok.nextToken();\n RingFactory tcfac = new ModIntegerRing(\"19\");\n if (tok.sval != null && tok.sval.length() > 0) {\n if (digit(tok.sval.charAt(0))) {\n tcfac = new ModIntegerRing(tok.sval);\n } else {\n tcfac = new BigRational();\n tok.pushBack();\n }\n } else {\n tcfac = new BigRational();\n tok.pushBack();\n }\n String[] anv = nextVariableList();\n //System.out.println(\"anv = \" + anv.length + \" \" + anv[0]);\n int vs = anv.length;\n if (vs != 1) {\n logger.error(\"AlgebraicNumber only for univariate polynomials\");\n }\n String[] ovars = vars;\n vars = anv;\n GenPolynomialRing tpfac = pfac;\n RingFactory tfac = fac;\n fac = tcfac;\n // pfac and fac used in nextPolynomial()\n if (tcfac instanceof ModIntegerRing) {\n pfac = new GenPolynomialRing<ModInteger>(tcfac, vs, new TermOrder(), anv);\n } else {\n pfac = new GenPolynomialRing<BigRational>(tcfac, vs, new TermOrder(), anv);\n }\n if (debug) {\n logger.debug(\"pfac = \" + pfac);\n }\n GenPolynomialTokenizer ptok = new GenPolynomialTokenizer(pfac, reader);\n GenPolynomial mod = ptok.nextPolynomial();\n ptok = null;\n if (debug) {\n logger.debug(\"mod = \" + mod);\n }\n pfac = tpfac;\n fac = tfac;\n vars = ovars;\n if (tcfac instanceof ModIntegerRing) {\n GenPolynomial<ModInteger> gfmod;\n gfmod = (GenPolynomial<ModInteger>) mod;\n coeff = new AlgebraicNumberRing<ModInteger>(gfmod);\n ct = coeffType.ANmod;\n } else {\n GenPolynomial<BigRational> anmod;\n anmod = (GenPolynomial<BigRational>) mod;\n coeff = new AlgebraicNumberRing<BigRational>(anmod);\n ct = coeffType.ANrat;\n }\n if (debug) {\n logger.debug(\"coeff = \" + coeff);\n }\n tt = tok.nextToken();\n if (tt == ']') {\n //ok, no nextToken();\n } else {\n tok.pushBack();\n }\n } else {\n tok.pushBack();\n }\n }\n }\n if (coeff == null) {\n tok.pushBack();\n coeff = new BigRational();\n ct = coeffType.BigRat;\n }\n parsedCoeff = ct;\n return coeff;\n }",
"@Override\r\n public int getCoefficient(int power) {\r\n PolynomialNode x = this.head.filter(t -> {\r\n Term term = (Term) t;\r\n return term.getPower() == power;\r\n });\r\n return x.getNodeTerm().getCoefficient();\r\n }",
"public static Polynom getInstance(double[] coef){\n double[] coefTemp = new double[coef.length];\n for (int i = 0; i < coef.length; i++) {\n coefTemp[coef.length-1-i] = coef[i];\n }\n return new Polynom(coefTemp);\n }",
"private Polynom(double[] coef){ //defenzivní kopie\n double[] coefTemp = new double [coef.length];\n System.arraycopy(coef, 0, coefTemp, 0, coef.length);\n this.coef = coefTemp;\n }",
"public int[] getPolynomialCoefficientArray() {\n return polynomialCoefficientArray;\n }",
"@Override\n\tpublic function copy() {\n\t\tMonom M=new Monom(this.get_coefficient(),this.get_power());\n\t\t\n\t\treturn M;\n\t}",
"FloatResource temperatureCoefficient();",
"public static Criteria newAndCreateCriteria() {\n TCpyBankCreditExample example = new TCpyBankCreditExample();\n return example.createCriteria();\n }",
"Double getFrictionCoefficient();",
"public double getCoeffAt (int i) {\n return myCoefficients.get(i);\n\n }",
"public Polynomial( double coefficients[] )\n {\n super( \"Polynomial\", coefficients, new String[coefficients.length] );\n for ( int i = 0; i < parameter_names.length; i++ )\n parameter_names[i] = \"a\"+i;\n }",
"public final void setCoefficient(com.mendix.systemwideinterfaces.core.IContext context, java.math.BigDecimal coefficient)\n\t{\n\t\tgetMendixObject().setValue(context, MemberNames.Coefficient.toString(), coefficient);\n\t}",
"public KernelPolynomial()\r\n\t{\r\n\t\tthis(0, 0, 3);\r\n\t}",
"public List<Double> getFunction () {\n return myCoefficients;\n }",
"public Term clone() {\n\t\treturn new Term(this.coefficient, this.exponent);\n\t}",
"private void set_coefficient(double a){\r\n\t\tthis._coefficient = a;\r\n\t}",
"private void set_coefficient(double a){\r\n\t\tthis._coefficient = a;\r\n\t}",
"@Override\r\n\tpublic Double getModel_cash_correlation() {\n\t\treturn super.getModel_cash_correlation();\r\n\t}",
"public Polynomial operate(){\n Polynomial result = a.multiplyPolynomial(b);\n return result;\n }",
"@NonNull\n private static ArrayList<Numerical> getCoefficients(@NonNull Matrix<Function> matrixExponent,\n @NonNull Matrix<Function> constPart)\n throws InconsistentSystemException {\n LinearSystem<Numerical, Numerical> constantsSystem =\n new LinearSystem<>(n, Numerical.zero(), Numerical.zero());\n\n for (int i = 0; i < n; i++) {\n FArray<Numerical> array = FArray.array(n, Numerical.zero());\n for (int j = 0; j < n; j++) {\n array.set(j, matrixExponent.get(i, j).apply(0));\n }\n\n //TODO\n constantsSystem.addEquation(\n array, constPart.get(i, 0).apply(0).negate().add(Numerical.zero()));\n }\n\n return constantsSystem.getSolution();\n }",
"public Crate(){}",
"Calcul createCalcul();",
"public final Statistic newInstance() {\n Statistic s = new Statistic();\n s.myNumMissing = myNumMissing;\n s.firstx = firstx;\n s.max = max;\n s.min = min;\n s.myConfidenceLevel = myConfidenceLevel;\n s.myJsum = myJsum;\n s.myValue = myValue;\n s.setName(getName());\n s.num = num;\n s.sumxx = sumxx;\n s.moments = Arrays.copyOf(moments, moments.length);\n if (getSaveOption()) {\n s.save(getSavedData());\n s.setSaveOption(true);\n }\n return (s);\n }",
"private IMatrix cofactor() {\n\t\tint n = this.getColsCount();\n\t\tIMatrix algCompl = newInstance(n, n);\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tdouble value = Math.pow(-1, i + j);\n\t\t\t\tIMatrix sub = this.subMatrix(i, j, true);\n\t\t\t\tDouble det = sub.determinant();\n\t\t\t\tvalue *= det;\n\t\t\t\talgCompl.set(i, j, value);\n\t\t\t}\n\t\t}\n\t\treturn algCompl;\n\t}",
"public void set_coefficient1(double a){\n\t\tset_coefficient(a);\n\t}",
"public Complex(){\r\n\t this(0,0);\r\n\t}",
"Multiply createMultiply();",
"public Polynomial add(Polynomial p){\n\t\t Polynomial sum = new Polynomial();\n\t\t \n\t\t for( int i=0; i < p.maxindex; i++) {\n\t\t // if (p.data[i] != 0)\n\t\t sum.setCoefficient(i, this.data[i]+p.data[i]);\n\t\t \n\t\t }\n\t\t if(this.maxindex>p.maxindex)\n\t\t {\n\t\t\t for(int i=p.maxindex-1;i<this.maxindex;i++)\n\t\t\t\t sum.setCoefficient(i, this.data[i]);\n\t\t\t \n\t\t }\n\t\t \n\t\t return sum;\n\t\t\n\t}",
"public Polynomial() {\n degree = 0;\n }",
"public PolyTerm derivate() {\n\t\tScalar coeffi=this.coefficient.mul(this.exponent);\n\t\tint expon=this.exponent-1;\n\t\treturn new PolyTerm(coeffi, expon);\n\t}",
"@Override\n public int getCoefficient(int d) {\n Object coeff = this.values.get(d);\n if (coeff == null)\n return 0;\n return (Integer)coeff;\n }",
"private Equation createEquation() throws MainApplicationException {\r\n\t\tEquation equation = new Equation(false,\r\n\t\t\t\t\"a+b=c\", \r\n\t\t\t\tfalse, \r\n\t\t\t\tnew Parametre(), \r\n\t\t\t\t\"Insérer Propriété\",\r\n\t\t\t\t\"Insérer commentaire\");\r\n\t\tequation.setIsModifiable(true);\r\n\t\treturn equation;\r\n\t}",
"public Polynomial multiply(Polynomial p){\n\t\tfor(int i=0; i<degreecoeff.length;i++) {\n\t\t\tfor(int j=0; j<degreecoeff.length;j++) {\n\t\t\t\t\n\t\t\tp.degreecoeff[i]=(p.degreecoeff[i])+(degreecoeff[i]*p.degreecoeff[j]);\n\t\t}\n\t\t}\n\t\treturn p;\n\t}",
"public PidCoefficients clone()\n {\n return new PidCoefficients(kP, kI, kD, kF);\n }",
"@Override\r\n\tpublic double getClusterCoefficient()\r\n\t{\r\n\t\tif (clusterCoefficient < 0) { // has not been initialized\r\n\t\t\tlogger.debug(\"Calling setGraphParameters\");\r\n\t\t\tsetGraphParameters();\r\n\t\t}\r\n\r\n\t\treturn clusterCoefficient;\r\n\t}",
"public Function(double a, double b, double c) {\r\n\t //y = a*(x*x) + b*x + c;\r\n co[0]= c;\r\n co[1]= b;\r\n co[2]= a;\r\n degree[0] = 0;\r\n degree[1] = 1;\r\n degree[2] = 2;\r\n cindex = 3;\r\n\t}",
"public Cylinder() {\n\t\tthis(1.0);\n\t}",
"public double getC() {\n return c;\n }",
"@Override\n\tpublic OnlineRegression copyNew() {\n\t\tBayesianLinearRegression copy = new BayesianLinearRegression(dimension, this.prioriMeans, prioriPrecision);\n\t\tcopy.weights = this.weights.copyNew();\n\t\tcopy.covariance = this.covariance.copyNew();\n\t\tcopy.b = this.b.copyNew();\n\t\tcopy.numTrainedInstances = this.numTrainedInstances;\n\t\treturn copy;\n\t}",
"public Polynomial reducePolynomial(){\n Integer maxPower = getMaxPower();\n ArrayList<Monomial> reducedMonomials = new ArrayList<>();\n\n while (maxPower >=0) {\n Integer integerCoefficient = 0;\n float realCoefficient = 0;\n for (Monomial monomial : monomials) {\n if(monomial.getPower().equals(maxPower)){\n if(monomial instanceof MonomialWithIntegerCoeff)\n {\n integerCoefficient = integerCoefficient + ((MonomialWithIntegerCoeff)monomial).getIntegerCoeff();\n }\n else{\n realCoefficient = realCoefficient + ((MonomialWithRealCoeff)monomial).getRealCoeff();\n\n }\n }\n }\n\n if(integerCoefficient != 0){\n MonomialWithIntegerCoeff reducedMonimial = new MonomialWithIntegerCoeff(integerCoefficient, maxPower);\n reducedMonomials.add(reducedMonimial);\n }\n\n if(realCoefficient != 0){\n MonomialWithRealCoeff reducedMonimial = new MonomialWithRealCoeff(realCoefficient, maxPower);\n reducedMonomials.add(reducedMonimial);\n }\n\n maxPower--;\n }\n\n return new Polynomial(reducedMonomials);\n }",
"public com.yangtian.matrix.Matrix.Builder getCBuilder() {\n \n onChanged();\n return getCFieldBuilder().getBuilder();\n }",
"public Function(double c) {\r\n co[0]= c;\r\n degree[0] = 0;\r\n cindex = 1; \r\n\t}",
"public com.yangtian.matrix.MatrixOrBuilder getCOrBuilder() {\n return getC();\n }",
"public Complex_Number(double realPart)\n {\n this(realPart,0,0);\n }",
"public Rays(Double _coefficient) {\n\t\tthis._coefficient = new Double(_coefficient);\n\t}",
"public Complex Minus (Complex z) {\n\nreturn new Complex(u-z.u,v-z.v);\n\n}",
"public abstract ArrayList< Double > getObjectiveCoefs();",
"private LinearAVF cloneLinearAVF() {\n LinearAVF avf = new LinearAVF();\n // value function\n Arrays.stream(Criterion.values())\n .forEach(\n c -> {\n if (c.hasBooleanDomain()) {\n avf.setInternalValueFunction(c, this.getInternalBooleanValueFunction(c));\n } else if (c.isDoubleCrescent()) {\n avf.setInternalValueFunction(c, this.getInternalLinearValueFunction(c));\n } else if (c.isDoubleDecrease()) {\n avf.setInternalValueFunction(c, this.getInternalReversedLinearValueFunction(c));\n }\n });\n // weights\n Arrays.stream(Criterion.values())\n .forEach(criterion -> avf.weight.put(criterion, this.weight.get(criterion)));\n return avf;\n }",
"public final void setCoefficient(java.math.BigDecimal coefficient)\n\t{\n\t\tsetCoefficient(getContext(), coefficient);\n\t}",
"Term(int coefficient, int exponent)\r\n\t{\r\n\t\tsetAll(coefficient, exponent);\r\n\t}",
"public Coup coupAJouer();",
"public Complex Plus (Complex z) {\nreturn new Complex(u+z.u,v+z.v);\n\n}",
"public static NumberAmount create(){\n NumberAmount NA = new NumberAmount(new AdvancedOperations(Digit.Zero()));\n return NA;\n }",
"public QPenaltyFunction clone() {\n\t\ttry {\n\t\t\treturn (QPenaltyFunction) super.clone();\n\t\t} catch (CloneNotSupportedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}",
"public com.yangtian.matrix.Matrix getC() {\n return c_ == null ? com.yangtian.matrix.Matrix.getDefaultInstance() : c_;\n }",
"public void setCoeff(double value) {\n\t\t\t\tthis.coeff = value;\n\t\t\t}",
"public bc m21441a() {\n return new bc(this);\n }",
"public com.yangtian.matrix.Matrix getC() {\n if (cBuilder_ == null) {\n return c_ == null ? com.yangtian.matrix.Matrix.getDefaultInstance() : c_;\n } else {\n return cBuilder_.getMessage();\n }\n }",
"public Complex() {\n this(0);\n }",
"public double getC1() {\n return c1;\n }",
"@Override\r\n\tpublic Battery createBattery(double initialEnergy, int weight)\r\n\t{\r\n\t\treturn new Battery(initialEnergy, weight);\r\n\t}",
"public VDouble getC() {\r\n return c;\r\n }",
"public CubicSegment(double[][] coef) {\n\t\t\n\t}",
"double correlationCoefficient(User a, User b) throws CwebApiException;",
"public Complemento getC() {\n return C;\n }",
"public Contribution createContribution()\n {\n return new Contribution();\n }",
"public Competence(){\n this(1,new BigValue(Constant.EXP_CHAR));\n }",
"public Customer build() {\n return new Customer(this);\n }",
"RegressionCurveType createRegressionCurveType();",
"public double getFrictionCoefficient() {\r\n\t\treturn frictionCoefficient;\r\n\t}",
"public ComplexPolynomial multiply(ComplexPolynomial p) {\r\n\t\tint length = this.order() + p.order() + 1;\r\n\t\tComplex[] newRoots = new Complex[length];\r\n\t\tfor (int i = 0; i < length; i++) {\r\n\t\t\tnewRoots[i] = Complex.ZERO;\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i < this.factors.length; i++) {\r\n\t\t\tfor (int j = 0; j < p.factors.length; j++) {\r\n\t\t\t\tnewRoots[i + j] = newRoots[i + j].add(this.factors[i].multiply(p.factors[j]));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn new ComplexPolynomial(newRoots);\r\n\t}",
"public TermImp(String term) {\n\n\t\tif(term.contains(\"x^\")) { //Contains an exponent != 1\n\n\t\t\tif(term.startsWith(\"x\")) this.setCoefficient(1);\n\t\t\telse if(term.startsWith(\"-x\")) this.setCoefficient(-1);\n\t\t\telse this.setCoefficient(Double.valueOf(term.substring(0, term.indexOf(\"x\"))));\n\n\t\t\tint exp = Integer.valueOf(term.substring(term.indexOf(\"^\")+1,term.length()));\n\t\t\tif(exp < 0) throw new IllegalArgumentException(\"Polynomials cannot have negative exponents.\");\n\t\t\tthis.setExponent(exp);\n\n\t\t}else if(term.contains(\"x\")) { //Contains an exponent == 1\n\n\t\t\tthis.setExponent(1);\n\t\t\tif(term.startsWith(\"x\")) this.setCoefficient(1);\n\t\t\telse if(term.startsWith(\"-x\")) this.setCoefficient(-1);\n\t\t\telse {\n\t\t\t\tthis.setCoefficient(Double.valueOf(term.substring(0, term.indexOf(\"x\"))));\n\t\t\t}\n\t\t}else { // Does not contains an x\n\t\t\tthis.setExponent(0);\n\t\t\tthis.setCoefficient(Double.valueOf(term));\n\t\t}\n\t}",
"public Monom(double a, int b){\r\n\t\tthis.set_coefficient(a);\r\n\t\tthis.set_power(b);\r\n\t}",
"public ComplexFIRFilter_CB_CB(float[] coefficients, float gain)\n {\n super(coefficients, gain);\n }",
"public double calculerCout(int coefficient) {\n return coefficient * cout;\n }",
"public com.yangtian.matrix.MatrixOrBuilder getCOrBuilder() {\n if (cBuilder_ != null) {\n return cBuilder_.getMessageOrBuilder();\n } else {\n return c_ == null ?\n com.yangtian.matrix.Matrix.getDefaultInstance() : c_;\n }\n }",
"public Function(double b, double c) {\r\n\t //y = b*x + c;\r\n co[0]= c;\r\n co[1]= b;\r\n degree[0] = 0;\r\n degree[1] = 1;\r\n cindex = 2; \r\n\t}",
"public Rational() {\n\t\tthis(1,1);\n\t}",
"public Polynomial add(Polynomial p){\n\t\tfor(int i=0; i<degreecoeff.length;i++) {\n\t\t\t\n\t\t\tp.degreecoeff[i]=degreecoeff[i]+p.degreecoeff[i];\n\t\t}\n\t\treturn p;\n\t\t\n\t}",
"public Polynomial subtract(Polynomial p){\n\t\tPolynomial sum = new Polynomial();\n\n\t\t\n\t\t for (int i = 0 ; i < p.maxindex; i++) {\n\t\t //if (p.data[i] != 0)\n\t\t sum.setCoefficient(i, this.data[i]-p.data[i]);\n\t\t }\n\t\t if(this.maxindex>p.maxindex)\n\t\t {\n\t\t\t for(int i=p.maxindex-1;i<=this.maxindex;i++)\n\t\t\t\t sum.setCoefficient(i, this.data[i]);\n\t\t }\n\t\t \n\t\t return sum;\n\t}",
"public Monom derivative() {\r\n\t\tif(this.get_power()==0) {return getNewZeroMonom();}\r\n\t\treturn new Monom(this.get_coefficient()*this.get_power(), this.get_power()-1);\r\n\t}",
"public static CMIModel getInstance(String filename, String modelName) {\n\t\tdouble[][] m = null;\n\t\tString CMICoefPath = null;\n\t\tif (modelName.equals(\"QDA\"))\n\t\t\tCMICoefPath = QDA_CMI_COEF_PATH;\n\t\telse if (modelName.equals(\"LSVM\"))\n\t\t\tCMICoefPath = LSVM_CMI_COEF_PATH;\n\t\t\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(CMICoefPath));\n\t\t\tint lineNum = Integer.parseInt(br.readLine());\n\t\t\tm = new double[lineNum][];\n\t\t\tfor (int i = 0; i < lineNum; i++) {\n\t\t\t\tString[] items = br.readLine().split(\" \");\n\t\t\t\tm[i] = new double[items.length];\n\t\t\t\tfor(int j=0; j<items.length; j++) \n\t\t\t\t\tm[i][j] = Double.parseDouble(items[j]);\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t// read model file\n\t\tif (modelName.equals(\"QDA\"))\n\t\t\treturn new CMIModel(QDA.getInstance(filename), m);\n\t\telse if (modelName.equals(\"LSVM\"))\n\t\t\treturn new CMIModel(LayeredSVM.getInstance(filename), m);\n\t\telse \n\t\t\treturn null;\n\t\t\n\t}",
"public Customer createCustomer() {\n return new Customer(nameNested, surNameNested, ageNested, streetNested);\n }",
"protected Criteria(TCpyBankCreditExample example) {\n super();\n this.example = example;\n }",
"public Polynomial times(Polynomial poly) {\n\t\tPolynomial c = null;\n\t\tif (poly != null) {\n\t\t\tif (poly.field == this.field) {\n\t\t\t\tif ((poly.degree != 0) && (this.degree != 0)) {\t\t\t\t\t\n\t\t\t\t\tPolynomial a = this;\n\t\t\t\t\tPolynomial b = poly;\n\t\t\t\t\tint degnew = a.degree + b.degree;\n\t\t\t\t\tc = new Polynomial(0, degnew, a.field);\n\n\t\t\t\t\t// a[0] * x^b[0] + a[1] * x^b[1] + ...\n\t\t\t\t\tfor (int i = 0; i < a.degree + 1; i++) {\n\t\t\t\t\t\tfor (int j = 0; j < b.degree + 1; j++) {\n\t\t\t\t\t\t\tc.coefficients[i + j] += (a.coefficients[i] * b.coefficients[j]);\n\t\t\t\t\t\t\tc.degree = a.degree + b.degree;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// a[0] * x^b[0] + a[1] * x^b[1] + ... MOD field\n\t\t\t\t\tc = this.modField(c);\n\n\t\t\t\t} else {\n\t\t\t\t\tc = new Polynomial(0, 0,\n\t\t\t\t\t\t\tthis.field); // 0-Polynomial\n\t\t\t\t\t// ->\n\t\t\t\t\t// degree\n\t\t\t\t\t// =\n\t\t\t\t\t// 0;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// TODO: throw exception or some such.\n\t\t\t}\n\t\t} else {\n\t\t\t// TODO: throw exception or some such.\n\t\t}\n\n\t\treturn c;\n\t}",
"@Override\n public double calcTerm( Map<String, Object> param_map )\n {\n double result = 0.0;\n int cat = (Integer) param_map.get( name );\n\n if( value == cat )\n result = coefficient;\n\n LOG.debug( String.format( \"calc: %s, %d, %d, %e\", name, value, cat, result ) );\n\n return result;\n }",
"public static Note getC() { return (Note)C.clone();}",
"@Override\n\tpublic Function derivative() {\n\t\tderivativeConstants[0] = 0;\n\t\tfor (int i = 0; i < constants.length - 1; i++) {\n\t\t\tderivativeConstants[i + 1] = constants[i] * (constants.length - i - 1);\n\t\t}\n\t\treturn new Polynomial(derivativeConstants);\n\t}",
"public Contract create(){\n\t\treturn new Contract();\n\t}",
"float getCpMultiplier();",
"@Override\r\n public Polynomial add(Polynomial other) {\r\n int max = Integer.max(this.getDegree(), other.getDegree());\r\n Polynomial result = new PolynomialImpl();\r\n while (max >= 0) {\r\n result.addTerm(this.getCoefficient(max), max);\r\n result.addTerm(other.getCoefficient(max), max);\r\n max--;\r\n }\r\n return result;\r\n }"
] | [
"0.71807396",
"0.6418309",
"0.62022084",
"0.61429423",
"0.5942161",
"0.5926369",
"0.5688151",
"0.5676251",
"0.55958647",
"0.55726695",
"0.5531647",
"0.55165195",
"0.55158556",
"0.5484624",
"0.5453479",
"0.5439417",
"0.5371116",
"0.5356285",
"0.5308491",
"0.53045934",
"0.5302968",
"0.52891666",
"0.5284704",
"0.5266818",
"0.5246217",
"0.5246217",
"0.52371544",
"0.522654",
"0.52152944",
"0.5191524",
"0.51669556",
"0.5153545",
"0.5137035",
"0.5119697",
"0.51074046",
"0.51016396",
"0.50608313",
"0.5057425",
"0.50532645",
"0.5049424",
"0.50443965",
"0.5039186",
"0.50349414",
"0.50153536",
"0.50150764",
"0.50068337",
"0.49959502",
"0.49939293",
"0.49927297",
"0.49786133",
"0.49717227",
"0.49612194",
"0.49575207",
"0.4952247",
"0.49511406",
"0.4948196",
"0.4943974",
"0.49359623",
"0.4930421",
"0.49233258",
"0.49058217",
"0.4902116",
"0.48977274",
"0.48946127",
"0.48933265",
"0.48733214",
"0.48703843",
"0.4869059",
"0.48627",
"0.4848253",
"0.48415193",
"0.4838671",
"0.482092",
"0.4817444",
"0.48131606",
"0.48118237",
"0.48038626",
"0.480048",
"0.47980765",
"0.47978052",
"0.47974834",
"0.4795235",
"0.47951663",
"0.47946948",
"0.47807154",
"0.47803867",
"0.47792354",
"0.47768712",
"0.47746417",
"0.47657993",
"0.4752493",
"0.47498095",
"0.47482604",
"0.47342283",
"0.47330827",
"0.47302264",
"0.47283587",
"0.4726388",
"0.47259593",
"0.47206798"
] | 0.6748236 | 1 |
Returns a new object of class 'Item'. | QuoteItem createQuoteItem(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Item createItem() {\n if(pickUpImplementation == null)\n {\n pickUpImplementation = new DefaultPickUp();\n }\n\n if(lookImplementation == null)\n {\n lookImplementation = new DefaultLook(R.string.default_look);\n }\n\n if(defaultItemInteraction == null)\n {\n throw new IllegalArgumentException(\"No default interaction specified!\");\n }\n\n\n return new Item(\n id,\n name,\n pickUpImplementation,\n lookImplementation,\n useImplementation,\n defaultItemInteraction\n );\n }",
"public @NotNull Item newItem();",
"public Item(){}",
"public Item() {}",
"Item getItem(int index) {\r\n return new Item(this, index);\r\n }",
"protected abstract void makeItem();",
"private Item(){}",
"@Override\n\tpublic AbstractItem getObject() {\n\t\tif(item == null) {\n\t\t\titem = new HiTechItem();\n\t\t}\n\t\treturn item;\n\t}",
"public Item()\n {\n super();\n }",
"public Item newItem() {\n\t\tItem page = new Item();\r\n\t\tpage.setWpPublished(DateUtils.now());\r\n\t\tpage.setWpWeight(0);\r\n\t\treturn page;\r\n\t}",
"public ItemBlock createItemBlock() {\n\t\treturn new GenericItemBlock(this);\n\t}",
"public Item() {\n }",
"public Item() {\n }",
"@JsonIgnore\n @Override\n public Item createDynamoDbItem() {\n return new Item()\n .withPrimaryKey(\"widgetId\", this.getWidgetId())\n .with(\"widgetJSONString\", WidgetSerializer.serialize(this));\n }",
"public Item getItem() {\n Item item = new Item();\n item.setQuantidade(Integer.parseInt(txtQuantidade.getText()));\n item.setValor(Float.parseFloat(txtValor.getText()));\n item.setProduto((Produto)cmbProduto.getSelectedItem());\n \n return item;\n }",
"@Override\r\n\tpublic ItemInstance createItemInstance() {\n\t\treturn new HpInstance();\r\n\t}",
"public Item() {\n\t}",
"public Item() {\n\t}",
"@SuppressWarnings(\"unused\")\n public Item() {\n }",
"public Item() {\r\n this.name = \"\";\r\n this.description = \"\";\r\n this.price = 0F;\r\n this.type = \"\";\r\n this.available = 0;\r\n this.wholesaler = new Wholesaler();\r\n this.wholesalerId = 0;\r\n this.category = new Category();\r\n this.categoryId = 0; \r\n }",
"private Item initItem() {\n String name = inputName.getText().toString();\n int quantityToBuy = -1;\n if (!inputQuantityToBuy.getText().toString().equals(\"\"))\n quantityToBuy = Integer.parseInt(inputQuantityToBuy.getText().toString());\n String units = inputUnits.getText().toString();\n double price = 0;\n if (!inputPrice.getText().toString().equals(\"\"))\n price = Double.parseDouble(inputPrice.getText().toString());\n int calories = 0;\n if (!inputCalories.getText().toString().equals(\"\"))\n calories = Integer.parseInt(inputCalories.getText().toString());\n ArrayList<String> allergies = allergyActions.getAllergies();\n return new Item(name, 0, units, quantityToBuy, 0, allergies, calories, price);\n }",
"public Item getItem() { \n return myItem;\n }",
"public Item createFromParcel(Parcel source) {\n Item item = new Item();\n item.name = source.readString(); \n item.description = source.readString(); \n item.type = source.readString(); \n item.value = source.readString(); \n return item; \n }",
"public NewItems() {\n super();\n }",
"public GItem(Item i) {\n this.mGItem = i.getId();\n this.title = i.getTitle();\n\n if (!i.getAddress().equals(\"\")){\n this.address = i.getAddress();\n }\n\n if (i instanceof OfficerItem){\n this.type = 1;\n\n } else if (i instanceof CompanyItem){\n this.type = 0;\n }\n\n }",
"public ItemRecord() {\n super(Item.ITEM);\n }",
"public Item createNew(int xpos, int ypos) {\r\n Item i = new Item(name, id);\r\n i.setPosition(xpos, ypos);\r\n return i;\r\n }",
"public FinalMysteryItem() {\n int randomIndex = new Random().nextInt(7);\n item = new Item(listOfPossibleNames[randomIndex], PRICE_TO_BUY);\n }",
"public Item createItem(int i, int x, int y) {\n\t\tswitch (i) {\n\t\tcase 51:\n\t\t\treturn new DoubleJumpItem(i, x, y);\n\t\tcase 102:\n\t\t\treturn new StopTimeItem(i, 5, x, y);\n\t\tcase 53:\n\t\t\treturn new ImmortalItem(i, x, y);\n\t\tdefault:\n\t\t\treturn null;\n\t\t}\n\t}",
"public Item(String itemName, String itemDescription){\n this.itemName = itemName;\n this.itemDescription = itemDescription;\n}",
"@Override\n\tpublic Item create() {\n\t\tLOGGER.info(\"Shoe Name\");\n\t\tString item_name = util.getString();\n\t\tLOGGER.info(\"Shoe Size\");\n\t\tdouble size = util.getDouble();\n\t\tLOGGER.info(\"Set Price\");\n\t\tdouble price = util.getDouble();\n\t\tLOGGER.info(\"Number in Stock\");\n\t\tlong stock = util.getLong();\n\t\tItem newItem = itemDAO.create(new Item(item_name, size, price, stock));\n\t\tLOGGER.info(\"\\n\");\n\t\treturn newItem;\n\t}",
"public static Item create(long itemId) {\n\t\treturn getPersistence().create(itemId);\n\t}",
"public Item() \r\n\t{\r\n\t\tname = \"AbstractItem\";\r\n\t\tdescription = \"Example Item Generated\";\r\n\t\tprice = 0;\r\n\t}",
"Item(){\r\n\t\tthis(0, new Weight(5), new DukatAmount(0));\r\n\t}",
"private Item getNewItem(String gtin) throws IOException {\n\n\t\tlog.info(\"Getting Item with Barcode: \" + gtin);\n\t\tGson gson = new Gson();\n\t\tURL url = new URL(\"https://api.outpan.com/v2/products/\" + gtin + \"?apikey=e13a9fb0bda8684d72bc3dba1b16ae1e\");\n\n\t\tStringBuilder temp = new StringBuilder();\n\t\tScanner scanner = new Scanner(url.openStream());\n\n\t\twhile (scanner.hasNext()) {\n\t\t\ttemp.append(scanner.nextLine());\n\t\t}\n\t\tscanner.close();\n\n\t\tItem item = new Item(gson.fromJson(temp.toString(), Item.class));\n\t\t\n\t\tif (item.name != null) {\n\t\t\treturn item;\n\t\t} else {\n\t\t\tthrow new NoNameForProductException();\n\t\t}\n\t}",
"CollectionItem createCollectionItem();",
"public Item()\r\n {\r\n // Initialize instance variables\r\n \r\n }",
"private Object makeObj(final String item, final int ID) {\n return new Object() {\n\n @Override\n public String toString() {\n return item;\n }\n\n @Override\n public int hashCode() {\n return ID;\n }\n };\n }",
"public Item(Item item) {\n setId(item.getId());\n setName(item.getName());\n setPrice(item.getPrice());\n setWasPurchased(item.wasPurchased());\n setOrder(item.getOrder());\n setStoreName(item.getStoreName());\n }",
"protected Item() {\n }",
"public Item_Record() {\n super(Item_.ITEM_);\n }",
"public Item getItem(String typeItem){\r\n if(typeItem.equals(\"coeur\")){\r\n Item coeur = new Coeur();\r\n return coeur;\r\n } else if(typeItem.equals(\"potionvie\")){\r\n Item potion = new Potion();\r\n return potion;\r\n } else if(typeItem.equals(\"hexaforce\")){\r\n Item hexa = new Hexaforce();\r\n return hexa;\r\n } else {\r\n return null;\r\n }\r\n }",
"public static Item getItem( ) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n \n\tString query = \"select * from Item\";\n\ttry {\n ps = connection.prepareStatement(query);\n\t ResultSet rs = null;\n\t rs = ps.executeQuery();\n \n\t Item item = new Item();\n \n\t if (rs.next()) {\n\t\titem.setAttribute(rs.getString(1));\n\t\titem.setItemname(rs.getString(2));\n\t\titem.setDescription(rs.getString(3));\n\t\titem.setPrice(rs.getDouble(4));\n\t }\n\t rs.close();\n\t ps.close();\n\t return item;\n\t} catch (java.sql.SQLException sql) {\n\t sql.printStackTrace();\n\t return null;\n\t}\n }",
"public static Item create( TopComponent tc ) {\n return new TopItem( tc );\n }",
"private static Object makeItem(final String item){\n return new Object(){\n public String toString() {\n return item;\n }\n };\n }",
"public Item createNew(int count) {\r\n Item i = new Item(name, id);\r\n i.setPickedUp(true);\r\n i.setCount(count);\r\n return i;\r\n }",
"@Test\n\tpublic void createItemEqual() {\n\t\tItem item = new Item().createItemFromItemName(\"lamp\");\n\t\tSystem.out.println(item);\n\t\tassertEquals(new Item(), item);\n\t}",
"public ItemInfo () {}",
"public Item(Integer itemSlot) {\n this.itemSlot = itemSlot;\n }",
"public Item(String name, ItemType type)\n {\n\tthis.name = name;\n\tthis.type = type;\n }",
"public Item(){\n description = \"No description avaible for this item\";\n weight = 0;\n }",
"@Override\n public Item createItem(int itemNum, Item item) throws VendingMachinePersistenceException {\n loadItemFile();\n Item newItem = itemMap.put(itemNum, item);\n writeItemFile();\n return newItem;\n }",
"public Item getItem() {\n return item;\n }",
"public Item getItem ()\n\t{\n\t\treturn item;\n\t}",
"protected abstract Item createTestItem3();",
"public Item getItem() { return this; }",
"public Item() {\n\t\tmenu.add(new Item(\"Snickers\", 10, 1.50, \"1\"));\n\t\tmenu.add(new Item(\"Chips\", 10, .50, \"2\"));\n\t\tmenu.add(new Item(\"Coke\", 10, 1.75, \"3\"));\n\n\t}",
"public Item(String input) {\n name = input;\n }",
"public InventoryItem(String name) { \n\t\tthis(name, 1);\n\t}",
"public InventoryItem(){\r\n this.itemName = \"TBD\";\r\n this.sku = 0;\r\n this.price = 0.0;\r\n this.quantity = 0;\r\n nItems++;\r\n }",
"protected abstract Item createTestItem1();",
"@Override // see item.java\n\tpublic void useItem() {\n\n\t}",
"public T getItem() {\r\n return item;\r\n }",
"ListItem createListItem();",
"protected BeanItem<M> createItem(M obj)\r\n\t{\r\n\t\tif (obj != null)\r\n\t\t{\r\n\t\t\tif (getContext() != null)\r\n\t\t\t{\r\n\t\t\t\tSession session = getContext().getSession();\r\n\t\t\t\t\r\n\t\t\t\tif (session != null)\r\n\t\t\t\t{\r\n\t\t\t\t\treturn new DataItem<M>(obj, session.getBaseManager());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn new BeanItem<M>(obj);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"public OrderItem() {}",
"public Item getItem() {\n return item;\n }",
"protected abstract Item createTestItem2();",
"public T getItem() {\n return item;\n }",
"public EnterpriseBeansItem() {\n super();\n }",
"@Override\r\n\t\r\n\t protected OverlayItem createItem(int index) {\n\t\treturn lstItems.get(index);\r\n\t\r\n\t }",
"public ItemStack generateItem(){\n\t\tItemStack item = new ItemStack(material);\n\t\tif(damage >= 0) item.setDurability(damage);\n\t\t\n\t\tif(itemName.isEmpty() && loreLine.isEmpty()) return item;\n\t\t\n\t\tItemMeta meta = item.getItemMeta();\n\t\tif(meta == null) return item;\n\t\t\n\t\tmeta.setDisplayName(itemName);\n\t\tmeta.setLore(Arrays.asList(loreLine));\n\t\titem.setItemMeta(meta);\n\t\t\n\t\treturn item;\n\t}",
"Items(){\n}",
"public Item getItemById(Integer itemId);",
"public Item(String id, int index) {\n this.id = id;\n this.itemIndex = index;\n this.dataBank = new DataBank();\n this.usersRatings = new SortedRatingList();\n }",
"private void makeObject() {\n\t\t\n\t\tItem I1= new Item(1,\"Cap\",10.0f,\"to protect from sun\");\n\t\tItemMap.put(1, I1);\n\t\t\n\t\tItem I2= new Item(2,\"phone\",100.0f,\"Conversation\");\n\t\tItemMap.put(2, I2);\n\t\t\n\t\tSystem.out.println(\"Objects Inserted\");\n\t}",
"public static MyListItem fromCursor(Cursor cursor) {\n MyListItem m = new MyListItem();\n return m;\n }",
"Item(int i, String n, String c, double p) {\n this.id = i;\n this.name = n;\n this.category = c;\n this.price = p;\n }",
"public Item getItem() {\n\t\treturn item;\n\t}",
"Item(long ID, DukatAmount price){\r\n\t\tthis(ID, new Weight(5), price);\r\n\t}",
"public interface Item {\n}",
"public Item( Item p ) {\n\t\tif( p != null ) {\n\t\t\tvalue = p.value;\n\t\t\tname = p.name;\n\t\t}\n\t}",
"void add(Item item);",
"public ItemManager() {\n itemMap = new HashMap<>();\n importantItemList = new ArrayList<>();\n\n }",
"public interface Item {\n \n /**\n * Returns the name of the item\n * @return \n */\n public String getName();\n \n /**\n * Returns the price of the item\n * @return \n */\n public double getPrice();\n \n /**\n * Returns the # of the items\n * @return \n */\n public int getQuantity();\n /**\n * Returns the item type\n * @return ItemCategory\n */\n public ItemCategory getCategory();\n}",
"ItemStack make();",
"public Item getItem() {\n return mItem;\n }",
"@SuppressWarnings(\"unchecked\")\r\n private Object fromItem(final Item item) {\r\n return (Object) ((BeanItem<T>) item).getBean();\r\n }",
"public jkt.hms.masters.business.MasStoreItem getItem () {\n\t\treturn item;\n\t}",
"public POJOCompteItem() {\n compte = new TreeMap<Date, Integer>();\n items = new ArrayList<Item>();\n }",
"public ItemGenerator()\n {\n itemList = new ArrayList<Item>();\n try\n {\n Scanner read = new Scanner(new File (\"ItemList.txt\"));\n while (read.hasNext())\n {\n String line = read.nextLine();\n Item i = new Item(line);\n itemList.add(i);\n }\n read.close();\n }\n catch (FileNotFoundException fnf)\n {\n System.out.println(\"File not found\");\n }\n }",
"public static ImageItem createItem(Generator tile) {\n\t\tswitch(tile.getGeneratorKind()) {\r\n\t\tcase Value:\r\n\t\t\treturn new ValueGeneratorItem((ValueGenerator) tile);\r\n\t\t\r\n\t\tcase Text:\r\n\t\t\treturn new TextGeneratorItem((TextGenerator) tile);\r\n\t\tcase Event:\r\n\t\t\treturn new ModifierGeneratorItem((ModifierGenerator) tile);\r\n\t\t\r\n\t\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public static Item createItemFromJSON(final JSONObject itemJson) throws JSONException {\n\t\tif (itemJson.getString(\"type\").equals(\"variable\")) {\n\t\t\treturn Helper.createVariableFromJSON(itemJson);\n\t\t} else {\n\t\t\treturn Helper.createLiteralFromJSON(itemJson);\n\t\t}\n\t}",
"@Override\n public Item getItem(String groupId, String itemId) {\n Item item = new Item(groupId, itemId);\n return item.getFile().exists() ? item : null;\n }",
"IEquipableItem createDefault();",
"@Override\n\tpublic Class<? extends Item> getItemClass() {\n\t\treturn MarkItem.class;\n\t}",
"public Item(String itemName, String itemList, String itemNote, int itemNumStocks, String itemExpireDate, int itemID) {\n this.itemName = itemName;\n this.itemList = itemList;\n this.itemNote = itemNote;\n this.itemNumStocks = itemNumStocks;\n this.itemExpireDate = itemExpireDate;\n this.itemID = itemID;\n }",
"public Objects getObject(String itemName)\n {\n return items.get(itemName);\n }",
"public Item_Record(Integer _Id_, String name_, String description_, String code_, Double price_, Double retailPrice_, Double costPrice_, Object _Search_, String[] _Types_, String _LastModified_, Integer _Version_) {\n super(Item_.ITEM_);\n\n set(0, _Id_);\n set(1, name_);\n set(2, description_);\n set(3, code_);\n set(4, price_);\n set(5, retailPrice_);\n set(6, costPrice_);\n set(7, _Search_);\n set(8, _Types_);\n set(9, _LastModified_);\n set(10, _Version_);\n }",
"public ItemReference alloc();"
] | [
"0.7660744",
"0.7654238",
"0.7364485",
"0.7357129",
"0.7235468",
"0.7166666",
"0.71292174",
"0.7093309",
"0.7022683",
"0.6991087",
"0.6953766",
"0.6926058",
"0.6926058",
"0.6903576",
"0.68718266",
"0.6839833",
"0.6816488",
"0.6816488",
"0.6815414",
"0.6794255",
"0.6791991",
"0.6750192",
"0.67469907",
"0.67397827",
"0.6728968",
"0.67258817",
"0.6710706",
"0.66895396",
"0.6682348",
"0.66667956",
"0.6643506",
"0.6622363",
"0.66092426",
"0.660506",
"0.6600705",
"0.6588572",
"0.65783364",
"0.6568754",
"0.65564847",
"0.65442026",
"0.65433306",
"0.6518039",
"0.65083635",
"0.648643",
"0.64839107",
"0.6466896",
"0.6464249",
"0.6442288",
"0.64345366",
"0.64276963",
"0.64153564",
"0.6374679",
"0.634796",
"0.6332055",
"0.6331677",
"0.63238215",
"0.63205665",
"0.6304725",
"0.6304193",
"0.62824553",
"0.6272126",
"0.6255595",
"0.62263674",
"0.6215886",
"0.6202131",
"0.6200699",
"0.61999124",
"0.6187583",
"0.6186131",
"0.6172984",
"0.6171085",
"0.6168003",
"0.61602557",
"0.61561906",
"0.6149698",
"0.614812",
"0.6141041",
"0.6133794",
"0.6117133",
"0.61162364",
"0.6115491",
"0.61140203",
"0.6112681",
"0.61082625",
"0.6107079",
"0.61067927",
"0.6104677",
"0.6093549",
"0.60885465",
"0.6085812",
"0.6081363",
"0.608112",
"0.60732096",
"0.607313",
"0.6065313",
"0.6050027",
"0.6045651",
"0.6044475",
"0.6040365",
"0.60398805"
] | 0.62060744 | 64 |
Returns a new object of class 'Note'. | QuoteNote createQuoteNote(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Note() {\n\t\tsuper();\n\t}",
"public Note() {\n }",
"public Note() {\n //uig = new UniqueIdGenerator();\n noteId = UUIDGenerator.getUUID();\n created_on = new Date();\n }",
"private Notes() {}",
"public Notes() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}",
"public static Note createNote(int octave, Pitch pitch, int startBeat, int endBeat) {\n return new NoteImpl(octave, pitch, startBeat, endBeat);\n }",
"public static Note createNote(int octave, Pitch pitch, int startBeat, int endBeat, int\n instrument, int volume) {\n return new NoteImpl(octave, pitch, startBeat, endBeat, instrument, volume);\n }",
"public static Note makeNote(int pitch, int octave) {\n if (octave < 0) {\n throw new IllegalArgumentException(\"Invalid octave parameter!\");\n }\n return new Note(Pitch.makePitch(pitch),octave,0);\n }",
"public NoteM(Note note) {\n\t\tthis.id = note.getId();\n\t\tthis.idEvaluation = note.getIdEvaluation().getId();\n\t\tthis.idStudent = note.getIdStudent().getId();\n\t\tthis.score = note.getScore();\n\t\tthis.state = note.getState();\n\t\tthis.dateCreation = note.getDateCreation();\n\t\tthis.dateMerge = note.getDateMerge();\n\t\tthis.dateRemoved = note.getDateRemoved();\n\t}",
"public static LabNotes newInstance() {\n LabNotes fragment = new LabNotes();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }",
"public Note getNote() {\n\t \n\t //returns the objected stored in the note field\n\t return this.note;\n }",
"public static Notes getInstance(PresentationNotesElement noteElement) {\n\t\tPresentationDocument ownerDocument = (PresentationDocument) ((OdfFileDom) (noteElement.getOwnerDocument()))\n\t\t\t\t.getDocument();\n\t\treturn ownerDocument.getNotesBuilder().getNotesInstance(noteElement);\n\n\t}",
"@Override\n public NoteInfo createFromParcel(Parcel parcel) {\n\n return new NoteInfo(parcel);\n }",
"public Note noteAt(int interval) {\n\t\tint newMidiNote = getMidiNumber() + interval;\n\t\t\n\t\treturn new Note(newMidiNote);\n\t}",
"public Note(long dateTime, String title, String content) {\n this.mDateTime = dateTime;\n this.mTitle = title;\n this.mContent = content;\n //creating a constructor which initializes the instances of the variables created above\n }",
"public Note(String description) throws NoteException {\n if(description.equals(\"note\")) {\n throw new NoteException();\n }\n this.description = description;\n }",
"public synchronized Notes getNotesInstance(PresentationNotesElement noteElement) {\n\t\t\tif (maNotesRepository.containsKey(noteElement))\n\t\t\t\treturn maNotesRepository.get(noteElement);\n\t\t\telse {\n\t\t\t\tNotes newNotes = new Notes(noteElement);\n\t\t\t\tmaNotesRepository.put(noteElement, newNotes);\n\t\t\t\treturn newNotes;\n\t\t\t}\n\t\t}",
"public TranscribedNote()\r\n {\r\n\r\n }",
"public SimpleNotepad() {\n int defaultSize = 20;\n _notes = new Note[defaultSize];\n }",
"public MockEditNote() {}",
"public Note addNote(String title, String text) {\n Note newNote = new Note(title, text);\n notes.add(newNote); //add to ArrayList\n return newNote;\n }",
"public NoteDataObject(String noteTitle, TextView noteContent){\n this.title = noteTitle;\n this.content = noteContent;\n }",
"public String getNote()\n {\n return note;\n }",
"public String getNote() {\n return note;\n }",
"public String getNote() {\n return note;\n }",
"public String getNote() {\n return note;\n }",
"public String getNote() {\n return note;\n }",
"public String getNote() {\n return note;\n }",
"public String getNote() {\n return note;\n }",
"public String getNote() {\n return note;\n }",
"public String getNote() {\n return note;\n }",
"public String getNote() {\n return note;\n }",
"public String getNote() {\n return note;\n }",
"public String getNote() {\n return note;\n }",
"public void getNote(UMLObject object){\n\t\tnote = (Note) object;\n\t}",
"public String getNote() {\r\n return note;\r\n }",
"public String getNote() {\r\n return note;\r\n }",
"public String getNote(){\r\n\t\treturn note;\r\n\t}",
"public static Note createEntity(EntityManager em) {\n Note note = new Note().content(DEFAULT_CONTENT).title(DEFAULT_TITLE).xpos(DEFAULT_XPOS).ypos(DEFAULT_YPOS);\n return note;\n }",
"WithCreate withNotes(String notes);",
"public Note(String title, String text, Date date){\n this.title=title;\n this.text=text;\n this.date=date;\n }",
"public String getNote() {\r\n return note; \r\n }",
"private Pitch(String note)\n {\n this.note = note;\n }",
"public String getNote()\n\t{\n\t\treturn note;\n\t}",
"public void setNote(Note newNote) {\n\t \n\t //stores newNote in the note field\n\t this.note = newNote;\n }",
"public org.landxml.schema.landXML11.FieldNoteDocument.FieldNote addNewFieldNote()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.FieldNoteDocument.FieldNote target = null;\r\n target = (org.landxml.schema.landXML11.FieldNoteDocument.FieldNote)get_store().add_element_user(FIELDNOTE$4);\r\n return target;\r\n }\r\n }",
"public String getNote() {\n\t\treturn note;\n\t}",
"public String getNote() {\n\t\treturn _note;\n\t}",
"public Note(){\n\t\t; //initDisplay(0);\n\t}",
"public static Note getC() { return (Note)C.clone();}",
"public void addNote(Note n){\n notes.add(n);\n }",
"public Note(int midiNumber) {\n\t\tthis.noteName = NoteName.C.noteAt(midiNumber);\n\t\tthis.octave = midiNumber / OCTAVE_LENGTH;\n\t\tthis.midiNumber = midiNumber;\n\t}",
"public Note(Pitch pitch, int octave, int instrument) {\n if (octave < 0 || octave > 10) {\n throw new IllegalArgumentException(\"octave must be between 0 and 10 (inclusive)\");\n }\n\n this.pitch = pitch;\n this.octave = octave;\n this.instrument = instrument;\n }",
"public static Note getE() {return (Note)E.clone();}",
"public BaseNote (java.lang.String id) {\n\t\tthis.setId(id);\n\t\tinitialize();\n\t}",
"public void setNote(String note) {\r\n this.note = note; \r\n }",
"public NoteTip(Note note, Long Oid)\r\n {\r\n super();\r\n user = FormatterUtils.getUserLabel(note.getUser());\r\n userImageURL = MyPicturePreferenceUtils.getUsersImageURI(note.getUser());\r\n if (note.getTimestamp() != null)\r\n {\r\n timeStamp = DateUtils.formatDateTime(note.getTimestamp());\r\n timeStampAsDate = note.getTimestamp();\r\n }\r\n String noteTitle = StringEscapeUtils.unescapeHtml(note.getText());\r\n toolTipContent = noteTitle;\r\n title = noteTitle == null || noteTitle.length() < 30 ? noteTitle : noteTitle.substring(0, 29) + \"...\";\r\n title = title.replaceAll(\"\\\\n\", \"\");\r\n scopeType = getScopeType(note, Oid);\r\n }",
"public void setNote(String note) {\n this.note = note;\n }",
"public void setNote(String note) {\n this.note = note;\n }",
"public void setNote(String note) {\n this.note = note;\n }",
"public void setNote(String note) {\n this.note = note;\n }",
"public void setNote(String note) {\n this.note = note;\n }",
"@Override\n public void add(Note note) {\n }",
"public void setNote(String note) {\r\n this.note = note;\r\n }",
"public void setNote(String note);",
"public void setNote(String note) {\r\n\r\n this.note = note;\r\n }",
"public Note(String title, String description, int priority) {\n this.title = title;\n this.description = description;\n this.priority = priority;\n }",
"public Note(String body, String title) {\n super(title, null);\n this.body = body;\n this.attachments = new HashMap<>();\n }",
"void setNote(int note) {\n\t\tthis.note = note;\n\t}",
"@AutoEscape\n\tpublic String getNote();",
"String get_note()\n {\n return note;\n }",
"public Note(int noteNumber, int instrument) {\n this.octave = (noteNumber / 12) - 1;\n this.pitch = Pitch.pitchFromNumber(noteNumber - (this.octave * 12));\n this.instrument = instrument;\n }",
"public void createNoteEditModel() {\n \t\tif (this.mNoteItemModel == null)\n \t\t\tthis.mNoteItemModel = new NoteItemModel(this.getContext());\n \t\tthis.status = STATUS_CREATE;\n \t}",
"interface WithNotes {\n /**\n * Specifies the notes property: Notes about the lock. Maximum of 512 characters..\n *\n * @param notes Notes about the lock. Maximum of 512 characters.\n * @return the next definition stage.\n */\n WithCreate withNotes(String notes);\n }",
"void add(Note note);",
"public static Note getB() {return (Note)B.clone();}",
"public void setNote(String note) {\n\t\tthis.note = note;\n\t}",
"@Test\n public void createNewNote() throws Exception{\n final CourseInfo course = sDataManager.getCourse(\"android_async\");\n final String noteTitle = \"Test note title\";\n final String noteText = \"This is the body test of my text note\";\n\n int noteIndex = sDataManager.createNewNote();\n NoteInfo newNote = sDataManager.getmNotes().get(noteIndex);\n newNote.setmCourses(course);\n newNote.setmTitle(noteTitle);\n newNote.setmText(noteText);\n\n NoteInfo compareNote = sDataManager.getmNotes().get(noteIndex);//contains the things that we put on the note at that point\n assertEquals(compareNote.getmCourses(), course);\n assertEquals(compareNote.getmTitle(), noteTitle);\n assertEquals(compareNote.getmText(), noteText);\n// assertSame(newNote, compareNote);//checks if two references point to the same object\n }",
"public String getDocumentNote();",
"@Override\n public CompositionBuilder<MusicOperation> addNote(int start, int end, int instrument,\n int pitch, int volume) {\n this.listNotes.add(new SimpleNote(Pitch.values()[(pitch) % 12],\n Octave.values()[(pitch / 12) - 2 ], start, end - start, instrument, volume));\n return this;\n }",
"@Import(\"notedTemplate\")\n\tint getNote();",
"private NotePad() {\n }",
"Note getBukkitNote();",
"public AddressEntry setNote(String note){\r\n\t\tthis.note=note;\r\n\t\treturn this;\r\n\t}",
"public void create(Note newNote) {\n\t\t// TODO generate unique ID\n\n\t\tnewNote.setId(Long.valueOf(getNotes().size()));\n\n\t\tString sql = \"INSERT INTO todo VALUES ('\" + newNote.getId() + \"','\" + newNote.getName() + \"','\" + newNote.getAbbreviation() + \"','\" + newNote.getDescription() + \"' );\";\n\n\t\tList<Note> todos = sqlUpdate(sql);\n\t\tsetNotes(todos);\n\n\t\t// this.getHibernateTemplate().delete(project);\n\t}",
"Comment createComment();",
"List<Note> list();",
"private NewNoteInput serializeContent() {\n String title = ((EditText) findViewById(R.id.edit_note_title)).getText().toString();\n String body = ((EditText) findViewById(R.id.edit_note_body)).getText().toString();\n String notebookId = getIntent().getStringExtra(NOTEBOOK_ID_EXTRA);\n\n return NewNoteInput.builder()\n .title(title).body(body).notebook(notebookId)\n .tags(new ArrayList<>(mTags))\n .build();\n }",
"@JsonProperty(\"note\")\n\tpublic String getNote() {\n\t\treturn note;\n\t}",
"public NoteCollection getNoteCollection();",
"public void setNote(String note) {\n\t\tthis._note = note;\n\t}",
"public Note(int _pitch, int _duration, int _dynamic) {\n pitch = _pitch;\n duration = _duration;\n dynamic = _dynamic;\n tiedIn = false;\n tiedOut = false;\n displayDynamic = false;\n }",
"public boolean isNote() {\n return this.type == Type.NOTE;\n }",
"private ModelImpl(int tempo, List<Note> notes) {\n if (tempo < 50000 || tempo > 250000) {\n throw new IllegalArgumentException(\"Invalid tempo.\");\n }\n if (notes.isEmpty()) {\n throw new IllegalArgumentException(\"This shouldn't happen.\");\n }\n this.tempo = tempo;\n this.currentMeasure = DEFAULT_START;\n this.status = Status.Playing;\n this.low = new Note(1, 8, 0, Note.Pitches.C, true, 0, 1);\n this.high = new Note(1, 0, 0, Note.Pitches.A, true, 0, 1);\n this.sheet = new ArrayList<Set<Note>>();\n this.addAll(notes);\n }",
"public NoteController() {\n\t\tsuper();\n\t\tdateFormat = new SimpleDateFormat(\"MM/dd/yyyy\");\n\t\tfinal String[] i18nJs = {\"note.err.name\", \"note.delete.confirm\", \"note.caldate.format\"};\n\t\tsuper.setI18nJsValues(i18nJs, \"^note\\\\.\");\n\t}",
"public Note(int note, char accidental, Pane notePane) {\n _note = note;\n _accidental = accidental;\n _accidentalImage = new ImageView();\n this.setUpLedger();\n this.setUpNote();\n }",
"public List<Note> getNotes(){\n return notes;\n }",
"public Double getNote()\r\n {\r\n return note;\r\n }",
"public abstract NoteDao noteDao();",
"public NoteManager getNoteManager() {\n return noteManager;\n }"
] | [
"0.77068055",
"0.7616109",
"0.7452614",
"0.7438673",
"0.72315955",
"0.70886266",
"0.68882996",
"0.6806155",
"0.6801377",
"0.6779055",
"0.6769318",
"0.6653875",
"0.6649099",
"0.6547113",
"0.6527481",
"0.6522338",
"0.6495599",
"0.6487153",
"0.64766866",
"0.64596784",
"0.64307564",
"0.6408138",
"0.63868403",
"0.637005",
"0.637005",
"0.637005",
"0.637005",
"0.637005",
"0.637005",
"0.637005",
"0.637005",
"0.637005",
"0.637005",
"0.637005",
"0.6353955",
"0.63533616",
"0.63533616",
"0.6346405",
"0.6342491",
"0.6322051",
"0.6315639",
"0.6301124",
"0.62887406",
"0.6279616",
"0.6278727",
"0.62392735",
"0.62350553",
"0.6230106",
"0.622856",
"0.621288",
"0.621196",
"0.6208311",
"0.6197755",
"0.6192293",
"0.6191906",
"0.61859673",
"0.61828923",
"0.61763537",
"0.61763537",
"0.61763537",
"0.61763537",
"0.61763537",
"0.6176063",
"0.6167447",
"0.616047",
"0.6140293",
"0.6134669",
"0.6103275",
"0.6092931",
"0.6079894",
"0.6040728",
"0.6032142",
"0.60124534",
"0.6005703",
"0.59968966",
"0.59821796",
"0.59724754",
"0.59709364",
"0.59503233",
"0.5945988",
"0.594094",
"0.5935664",
"0.59349644",
"0.5934057",
"0.5929824",
"0.5921494",
"0.5908679",
"0.58865243",
"0.58863837",
"0.588061",
"0.5877684",
"0.5871218",
"0.58705896",
"0.5870517",
"0.5856332",
"0.5855685",
"0.5826067",
"0.5821057",
"0.5810367",
"0.5786928"
] | 0.73901653 | 4 |
Returns a new object of class 'Role'. | QuoteRole createQuoteRole(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic UserRole createNew()\n\t{\n\t\treturn new UserRole();\n\t}",
"public RoleImpl() {}",
"public Role() {\n }",
"public Role() {\n }",
"ResourceRole createResourceRole();",
"public Role() {\n\t}",
"public Role() {\n\t super();\n }",
"private Role createIamRole()\n {\n return iamRoleBuilder().build();\n }",
"public SecRole getNewSecRole();",
"public SecRole getNewSecRole();",
"public RoleEntity(){}",
"private Role createRole( String className, Agent agent ) {\n// System.out.println(\"Attempting to create class \" + className);\n Class cl = null;\n try {\n cl = Class.forName( \"tns.roles.\" + className );\n } catch ( ClassNotFoundException e ) {\n System.err.println( \"Can't find your darned class.\" );\n System.exit( 0 );\n } // end try-catch\n\n Constructor c = null;\n Object o = null;\n try {\n c = cl.getConstructor(new Class[] {Agent.class});\n o = c.newInstance(new Object[] {agent});\n } catch (NoSuchMethodException e) {\n System.err.println(\"Can't find you class' constructor.\");\n System.exit(0);\n } catch (SecurityException e) {\n System.err.println(\"Security Exception. Can't access your class.\");\n System.exit(0);\n } catch ( InstantiationException e ) {\n System.err.println( \"Can't make your darned class.\" );\n System.exit( 0 );\n } catch ( IllegalAccessException e ) {\n System.err.println( \"Can't access your darned class.\" );\n System.exit( 0 );\n } catch (IllegalArgumentException e) {\n System.err.println(\"Can't create your class. Illegal arguments.\");\n System.exit(0);\n } catch (InvocationTargetException e) {\n System.err.println(\"Can't create your class. Contructor threw an exception.\");\n System.exit(0);\n } // end try-catch\n\n return (Role)o;\n\n }",
"<T extends Role> ISModifyRole<T> createISModifyRole();",
"public Role getRoleById(int id);",
"public SecUserrole getNewSecUserrole();",
"public Role() {\r\n\t\tpermissions = new ArrayList<Permission>();\r\n\t}",
"ISModifyProvidedRole createISModifyProvidedRole();",
"public Role(String name) {\r\n\t\tthis();\r\n\t\tthis.name = name;\r\n\t}",
"@Override\n public SysvDb2Role build() {\n return getInstance();\n }",
"Role findById(int id);",
"public RoleImpl makeMutableClone() {\n RoleImpl role = clone();\n role.mutable = true;\n return role;\n }",
"public BeanRole() {\r\n }",
"public RoleAccess() {\n }",
"public UserRole() {\n // all persisted classes must define a no-arg constructor with at least package visibility\n }",
"RoleDao getRoleDao();",
"SecurityRole getRole();",
"public Role getByRoleId(long roleId);",
"public PageRole(){\n\t\t\n\t}",
"public Role getRole()\n {\n return role;\n }",
"com.message.MessageInfo.RoleVO getRole();",
"public static Criteria newAndCreateCriteria() {\n LitemallTypeRoleExample example = new LitemallTypeRoleExample();\n return example.createCriteria();\n }",
"TDLRoleEntity create(TDLRoleEntity tldrole);",
"public ManageRoleManagedBean() {\r\n selectedRole = new RoleEntity();\r\n }",
"private UserRole(String name) {\n\t\tthis.name = name;\n\t}",
"public interface RoleTypeFactory {\n\tpublic void initView();\n\tpublic Role checkCredentials(String username, String password, String loginas);\n\t\t\n}",
"public SecRole getRoleById(Long role_Id);",
"public com.message.MessageInfo.RoleVO.Builder getRoleBuilder() {\n bitField0_ |= 0x00000002;\n onChanged();\n return getRoleFieldBuilder().getBuilder();\n }",
"public Userrole getUserrole() {\n return getEntity();\n }",
"public Role RoleById(Integer id) {\n\t\treturn userDao.RoleById(id);\r\n\t}",
"public Role getRole(int role_id) {\n\t\tRole role = new Role();\n\t\tString sql = \"select * from role where role_id = ?;\";\n\t\tConnection conn = new DBUtilFactory().getConn();\n\t\ttry {\n\t\t\tps = conn.prepareStatement(sql);\n\t\t\tps.setInt(1, role_id);\n\t\t\trs = ps.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\t// stupid set method......\n\t\t\t\trole.setRole_describe(rs.getString(\"role_describe\"));\n\t\t\t\trole.setRole_id(rs.getInt(\"role_id\"));\n\t\t\t\trole.setRole_power(rs.getInt(\"role_power\"));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} finally {\n\t\t\tclearUp(conn);\n\t\t}\n\t\treturn role;\n\t}",
"public MetaRole getMetaRole(int iRole);",
"public static GenericRoleVoter createInstance(ApplicationRole namedRole) {\n if (namedRole == null) {\n throw new AtbashIllegalActionException(\"(OCT-DEV-008) namedRole can't be null\");\n }\n\n GenericRoleVoter result = new GenericRoleVoter();\n result.subject = CDIUtils.retrieveInstance(Subject.class);\n result.permission = new RolePermission(namedRole.name());\n return result;\n }",
"@Override\n\tpublic void addRole(Role r) {\n\t\t\n\t}",
"ISModifyRequiredRole createISModifyRequiredRole();",
"public interface Role {\n int getId();\n int getPerson();\n int getType();\n String getName();\n int getRole();\n String getCode();\n int getPosition();\n String getPosition_name();\n}",
"public ArrayList<Role> getRole() {\n\t\tArrayList<Role> list = new ArrayList<Role>();\n\t\tString sql = \"select * from role;\";\n\t\tConnection conn = new DBUtilFactory().getConn();\n\t\ttry {\n\t\t\tps = conn.prepareStatement(sql);\n\t\t\trs = ps.executeQuery();\n\t\t\twhile(rs.next()) {\n\t\t\t\tRole role = new Role();\n\t\t\t\t// stupid set method......\n\t\t\t\trole.setRole_describe(rs.getString(\"role_describe\"));\n\t\t\t\trole.setRole_id(rs.getInt(\"role_id\"));\n\t\t\t\trole.setRole_power(rs.getInt(\"role_power\"));\n\t\t\t\tlist.add(role);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} finally {\n\t\t\tclearUp(conn);\n\t\t}\n\t\treturn list;\n\t}",
"private Role(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public T caseRole(Role object) {\n\t\treturn null;\n\t}",
"RoleType getRoleType();",
"ObjectType getProtoRole();",
"public CreateRoleResponse createRole(CreateRoleRequest request) throws GPUdbException {\n CreateRoleResponse actualResponse_ = new CreateRoleResponse();\n submitRequest(\"/create/role\", request, actualResponse_, false);\n return actualResponse_;\n }",
"TDLRoleEntity getTDLRole(Long id);",
"public Builder setRole(com.message.MessageInfo.RoleVO value) {\n if (roleBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n role_ = value;\n onChanged();\n } else {\n roleBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000002;\n return this;\n }",
"String getRole();",
"String getRole();",
"@Override\r\n\tpublic Role getRoleById(int id) {\n\t\treturn getHibernateTemplate().get(Role.class, id);\r\n\t}",
"com.message.MessageInfo.RoleVOOrBuilder getRoleOrBuilder();",
"public APIRole getRole() {\n return role;\n }",
"public com.message.MessageInfo.RoleVO getRole() {\n return role_ == null ? com.message.MessageInfo.RoleVO.getDefaultInstance() : role_;\n }",
"public TableRole getTableRole();",
"public com.message.MessageInfo.RoleVO getRole() {\n if (roleBuilder_ == null) {\n return role_ == null ? com.message.MessageInfo.RoleVO.getDefaultInstance() : role_;\n } else {\n return roleBuilder_.getMessage();\n }\n }",
"public String getRole() { return this.role; }",
"private Role(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public UserRoleExample() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"Role findByType(RoleType type);",
"private Roles(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"VerbRole getRole();",
"public MetaRole createMetaRole(String sName, String sAdmin) throws IOException;",
"public ResourceCreatorProxy getNewResourceCreator(String name, Long id, ResourceCreatorRole role) {\n ResourceCreatorProxy rcp = new ResourceCreatorProxy();\n rcp.getInstitution().setName(name);\n // FIXME: THIS NEEDS TO WORK WITHOUT SETTING AN ID as well as when an ID\n // IS SET\n if ((System.currentTimeMillis() % 2) == 0) {\n rcp.getInstitution().setId(-1L);\n }\n rcp.setRole(role);\n return rcp;\n }",
"@PermitAll\n @Override\n public Role getRole(String roleCode) {\n return getRepository().getEntity(Role.class, roleCode);\n }",
"public interface RoleRepository {\n public List<UserRole> getAll();\n public UserRole getById(int id);\n public UserRole getByName(String name);\n public void create(UserRole userRole);\n}",
"public Role(String name, long museum_id, \r\n long id, Timestamp deleted, Timestamp insert, Timestamp update)\r\n {\r\n super(id, deleted, insert, update);\r\n this.name = name;\r\n this.museum_id = museum_id;\r\n }",
"public com.message.MessageInfo.RoleVOOrBuilder getRoleOrBuilder() {\n if (roleBuilder_ != null) {\n return roleBuilder_.getMessageOrBuilder();\n } else {\n return role_ == null ?\n com.message.MessageInfo.RoleVO.getDefaultInstance() : role_;\n }\n }",
"public static GenericRoleVoter createInstance(RolePermission namedRole) {\n // Never null (called from be.atbash.ee.security.octopus.provider.NamedRoleProducer#getVoter()\n\n GenericRoleVoter result = new GenericRoleVoter();\n result.subject = CDIUtils.retrieveInstance(Subject.class);\n result.permission = namedRole;\n return result;\n }",
"public String getRole() {\n return this.role;\n }",
"@Override\r\n\tpublic Role getRole(String roleID) {\n\t\treturn roleDao.getRole(roleID);\r\n\t}",
"public RolesModel (String appName) { \r\n this(appName, null);\r\n }",
"public LitemallTypeRoleExample() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"public String getRole() {\r\n return role;\r\n }",
"@Override\r\n\tpublic Role findById(Serializable id) {\n\t\treturn roleDao.findById(id);\r\n\t}",
"public EnumRoleEmploye getRole() {\r\n return role;\r\n }",
"@Override\n\tpublic String getRole() {\n\t\treturn role;\n\t}",
"public Builder clearRole() {\n if (roleBuilder_ == null) {\n role_ = null;\n onChanged();\n } else {\n roleBuilder_.clear();\n }\n bitField0_ = (bitField0_ & ~0x00000002);\n return this;\n }",
"public Builder setRole(\n com.message.MessageInfo.RoleVO.Builder builderForValue) {\n if (roleBuilder_ == null) {\n role_ = builderForValue.build();\n onChanged();\n } else {\n roleBuilder_.setMessage(builderForValue.build());\n }\n bitField0_ |= 0x00000002;\n return this;\n }",
"public Role getRole() throws Exception\r\n\t{\r\n\t\tString SQL_USER = \"SELECT role FROM user WHERE id=?;\";\t\t\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\t\t\tstatement.setInt(1, userId);\r\n\t\t\tResultSet result = statement.executeQuery();\r\n\r\n\t\t\t// If this returns true, then the user already exists.\r\n\t\t\tif (!result.next())\r\n\t\t\t{\r\n\t\t\t\tthrow new Exception(\"No student found! (getRole)\");\r\n\t\t\t}\r\n\t\t\treturn Role.valueOf(result.getString(\"role\"));\r\n\t\t} catch (SQLException e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in getRole()\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t}",
"public com.message.MessageInfo.RoleVOOrBuilder getRoleOrBuilder() {\n return role_ == null ? com.message.MessageInfo.RoleVO.getDefaultInstance() : role_;\n }",
"@Override\n @XmlElement(name = \"role\", required = true)\n public synchronized Role getRole() {\n return role;\n }",
"public interface IRole {\n\n\tint lifeScore; \n\tint xAxisPosition;\n\tint yAxisPosition;\n\tString name;\n\n\tpublic int hit();\n\tpublic void walk(int dx, int y);\n\tpublic void sufferHit(int damage);\n\tpublic String getName();\n}",
"public interface RoleService {\n\n Role getById(Long id);\n\n Role getByName(String name);\n}",
"public interface RoleService {\n Role selectById(Integer id);\n int insertRole(Role role);\n List<Role> getRolesByUserId(String userId);\n}",
"public String getRole() {\r\n\t\treturn role;\r\n\t}",
"public SecRolegroup getNewSecRolegroup();",
"public com.a9.spec.opensearch.x11.QueryType.Role xgetRole()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.a9.spec.opensearch.x11.QueryType.Role target = null;\n target = (com.a9.spec.opensearch.x11.QueryType.Role)get_store().find_attribute_user(ROLE$0);\n return target;\n }\n }",
"public MetaRole getMetaRole(String sName);",
"@Override\n\tpublic Role findById(Integer id) {\n\t\treturn roleDao.findById(id);\n\t}",
"public String getRole()\n\t{\n\t\treturn role;\n\t}",
"public ReviewApplicationRole(long id, String name, long positions,\n List<ReviewApplicationResourceRole> resourceRoles) {\n super(id, name);\n\n this.positions = positions;\n this.resourceRoles = resourceRoles;\n }",
"long addUserRole(UserRole userRole);",
"Role getRole(InheritedAccessEnabled access, String className) {\n AccessTypeInjector injector = getInjector(className);\n if (injector == null) {\n return null;\n }\n return injector.getRole(access);\n }",
"private RoleVO(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }"
] | [
"0.75333333",
"0.74012905",
"0.73585933",
"0.73585933",
"0.7210194",
"0.72001463",
"0.7198384",
"0.71465033",
"0.69880605",
"0.69880605",
"0.6929337",
"0.6918709",
"0.6870298",
"0.6864755",
"0.683584",
"0.6725252",
"0.6708082",
"0.6705863",
"0.6667318",
"0.66667897",
"0.66311586",
"0.6584312",
"0.6521489",
"0.64466715",
"0.64129657",
"0.6366254",
"0.6363076",
"0.6345085",
"0.6344488",
"0.63169664",
"0.62908995",
"0.62854165",
"0.6251644",
"0.622348",
"0.62131244",
"0.62088263",
"0.61961603",
"0.61719626",
"0.61529875",
"0.61393577",
"0.6128823",
"0.612621",
"0.6118336",
"0.6107477",
"0.60738105",
"0.6063226",
"0.60487956",
"0.6047469",
"0.6043083",
"0.60417163",
"0.60390663",
"0.60342085",
"0.60325795",
"0.6024752",
"0.6024752",
"0.59732634",
"0.59669137",
"0.5961542",
"0.5939079",
"0.5933001",
"0.5921479",
"0.5913386",
"0.59082645",
"0.58914995",
"0.5871804",
"0.58705866",
"0.5853236",
"0.5850983",
"0.58502436",
"0.58476114",
"0.58347994",
"0.58320326",
"0.58061415",
"0.5802474",
"0.5787268",
"0.57805055",
"0.5765853",
"0.5763569",
"0.5750983",
"0.5713214",
"0.5706903",
"0.5703562",
"0.56993294",
"0.56915885",
"0.5685643",
"0.56630856",
"0.56590945",
"0.5651593",
"0.5643535",
"0.56416464",
"0.5637295",
"0.56350416",
"0.56136984",
"0.56096584",
"0.5604511",
"0.5599079",
"0.55963296",
"0.55878425",
"0.5583037",
"0.5582803"
] | 0.6679769 | 18 |
Returns a new object of class 'Term'. | QuoteTerm createQuoteTerm(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"GeneralTerm createGeneralTerm();",
"SingleTerm(Term t)\n {\n term = t;\n }",
"Term getTerm();",
"protected Term createTermFrom(String tag) {\n\t\tTerm tmp = terms.getOrDefault(tag, new Term(tag, this, terms.size()));\n\t\tterms.put(tag, tmp);\n\t\t// termCounts.put(tmp, termCounts.getOrDefault(tmp,0)+1);\n\t\ttermsInCorpus += 1;\n\t\treturn tmp;\n\t}",
"public VocabularyTerms() {}",
"public Terms() {}",
"TermNode() {\n this.fac = new FacNode();\n this.term = null;\n this.selection = 1;\n }",
"public String getTerm() {\n return term;\n }",
"public Object clone() {\n \t\treturn new Term(this);\n \t}",
"public synchronized static ComputeTermFrequencies createComputeAndPrintTermFrequency() \n\t{\n\t\treturn new ComputeTermFrequencies();\n\t}",
"public String getTerm(){\n return this.term;\n }",
"public AcademicTerm(int termIndex, Term term) {\n this.termIndex = termIndex;\n this.term = term;\n }",
"public Term(String t) {\n this.t = t;\n \n RepCheck();\n }",
"abstract public TermDocs termDocs(Term t) throws IOException;",
"QDataSetTerm createDataSetTerm();",
"public Expression getTerm() {\n return term;\n }",
"public static Term create(long termId) {\n\t\treturn getPersistence().create(termId);\n\t}",
"TermType getTermType();",
"QuoteTermAttribute createQuoteTermAttribute();",
"public Term[] getTerms() { return terms; }",
"public int getTermIndex() {return termIndex;}",
"public TermData(String term)\n\t{\n\t\tthis.term = term;\n\t}",
"public SuggestedTerm(String term, int editDistance){\n this.term = term;\n this.editDistance = editDistance;\n }",
"public T caseTerm(Term object)\n {\n return null;\n }",
"protected Query newTermQuery(Term term, float boost) {\n Query q = new TermQuery(term);\n if (boost == DEFAULT_BOOST) {\n return q;\n }\n return new BoostQuery(q, boost);\n }",
"static TermVectorEntry of(TermsEnum te) throws IOException {\n Objects.requireNonNull(te);\n\n String termText = BytesRefUtils.decode(te.term());\n\n List<TermVectorEntry.TermVectorPosition> tvPositions = new ArrayList<>();\n PostingsEnum pe = te.postings(null, PostingsEnum.OFFSETS);\n pe.nextDoc();\n int freq = pe.freq();\n for (int i = 0; i < freq; i++) {\n int pos = pe.nextPosition();\n if (pos < 0) {\n // no position information available\n continue;\n }\n TermVectorPosition tvPos = TermVectorPosition.of(pos, pe);\n tvPositions.add(tvPos);\n }\n\n return new TermVectorEntry(termText, te.totalTermFreq(), tvPositions);\n }",
"public Term clone() {\n\t\treturn new Term(this.coefficient, this.exponent);\n\t}",
"public Concept getConcept(Term term) {\r\n String n = term.getName();\r\n Concept concept = concepts.get(n);\r\n if (concept == null)\r\n concept = new Concept(term, this); // the only place to make a new Concept\r\n return concept;\r\n }",
"public String getTermText() {\n return termText;\n }",
"public Element compileTerm() {\n\t\tElement ele = null;\n\t\tString token, tokenType;\n\t\tString varName;\n\n\t\tElement termParent = document.createElement(\"term\");\n\n\t\ttoken = jTokenizer.returnTokenVal();\n\t\ttokenType = jTokenizer.tokenType();\n\n\t\t// Case 1: ( expression )\n\n\t\tif (token.equals(\"(\")) {\n\t\t\t// (\n\t\t\tele = createXMLnode(tokenType);\n\t\t\ttermParent.appendChild(ele);\n\n\t\t\t// exp\n\t\t\tjTokenizer.advance();\n\t\t\ttermParent.appendChild(compileExpression());\n\n\t\t\t// )\n\t\t\tjTokenizer.advance();\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\tele = createXMLnode(tokenType);\n\t\t\ttermParent.appendChild(ele);\n\n\t\t}\n\n\t\t// Case 2: unaryOp term\n\t\telse if (token.matches(\"\\\\-|~\")) {\n\n\t\t\t// unary op\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\tString op = jTokenizer.returnTokenVal();\n\t\t\tele = createXMLnode(tokenType);\n\t\t\ttermParent.appendChild(ele);\n\t\t\t\n\t\t\t\n\t\t\t//Since it is postfix, the term comes first\n\t\t\t\n\t\t\t// term\n\t\t\tjTokenizer.advance();\n\t\t\ttermParent.appendChild(compileTerm());\n\n\t\t\t// appending the op\n\t\t\tif (op.equals(\"~\")) {\n\t\t\t\twriter.writeArithmetic(\"not\");\n\t\t\t} else {\n\t\t\t\twriter.writeArithmetic(\"neg\");\n\t\t\t}\n\n\t\t}\n\t\t\n\t\t// Any constant or keyword\n\t\telse if (tokenType.matches(\"keyword|integerConstant|stringConstant\")) {\n\t\t\tele = createXMLnode(tokenType);\n\t\t\ttermParent.appendChild(ele);\n\t\t\t\n\t\t\t//pushing an integer constant\n\t\t\tif (tokenType.equals(\"integerConstant\")) {\n\t\t\t\twriter.writePush(\"constant\", Integer.parseInt(token));\t\n\t\t\t}\n\t\t\t//For string, have to iterate along the length of the string and call string.append\n\t\t\telse if (tokenType.equals(\"stringConstant\")) {\n\t\t\t\twriter.writePush(\"constant\", token.length());\n\t\t\t\twriter.writeCall(\"String.new\", 1);\n\n\t\t\t\tfor (int i = 0; i < token.length(); i++) {\n\t\t\t\t\twriter.writePush(\"constant\", (int) token.charAt(i));\n\t\t\t\t\twriter.writeCall(\"String.appendChar\", 2);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} \n\t\t\t//Pushing the keyword onto the stack, depending on what it is\n\t\t\telse if (tokenType.equals(\"keyword\")) {\n\t\t\t\tif (token.equals(\"true\")) {\n\t\t\t\t\twriter.writePush(\"constant\", 0);\n\t\t\t\t\twriter.writeArithmetic(\"not\");\n\t\t\t\t} else if (token.equals(\"this\")) {\n\t\t\t\t\twriter.writePush(\"pointer\", 0);\n\t\t\t\t} else if (token.equals(\"false\") || token.equals(\"null\")) {\n\t\t\t\t\twriter.writePush(\"constant\", 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Variable, Variable[expression] or subroutineCall\n\t\telse if (tokenType.equals(\"identifier\")) {\n\t\t\tele = createXMLnode(tokenType);\n\t\t\ttermParent.appendChild(ele);\n\t\t\tvarName = jTokenizer.returnTokenVal();\n\t\t\tjackTokenizer clone = new jackTokenizer(jTokenizer);\n\t\t\tclone.advance();\n\t\t\ttoken = clone.returnTokenVal();\n\n\t\t\t// Case 1: Array dereferencing\n\t\t\tif (token.equals(\"[\")) {\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\t// push base id\n\t\t\t\twriter.writePush(symTable.lookup(varName).kind, symTable.lookup(varName).index);\n\n\t\t\t\t// Exp\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttermParent.appendChild(compileExpression());\n\n\t\t\t\t// ]\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\t// base + offset\n\t\t\t\twriter.writeArithmetic(\"add\");\n\n\t\t\t\t// pop into that\n\t\t\t\twriter.writePop(\"pointer\", 1);\n\t\t\t\t// push value into stack\n\t\t\t\twriter.writePush(\"that\", 0);\n\t\t\t}\n\n\t\t\t// Case 2: variable/class.subroutine call\n\t\t\telse if (token.equals(\".\")) {\n\n\t\t\t\tboolean method = false;\n\n\t\t\t\t// .\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\t// subroutine name\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tString subName = jTokenizer.returnTokenVal();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\t// (\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\tString firstName = varName;\n\t\t\t\t//Similar to the compileDo method, have to distinguish between\n\t\t\t\t//method and function\n\t\t\t\tif (symTable.lookup(firstName) != null) {\n\t\t\t\t\tmethod = true;\n\t\t\t\t\twriter.writePush(symTable.lookup(firstName).kind, symTable.lookup(firstName).index);\n\t\t\t\t\tvarName = symTable.lookup(firstName).type;\n\t\t\t\t}\n\t\t\t\t// expressionList\n\t\t\t\tjTokenizer.advance();\n\t\t\t\tElement compileExpression = compileExpressionList();\n\t\t\t\tint nArgs = compileExpression.getChildNodes().getLength();\n\t\t\t\ttermParent.appendChild(compileExpression);\n\n\t\t\t\t// Checking if method or function\n\t\t\t\tif (method) {\n\t\t\t\t\tnArgs++;\n\t\t\t\t}\n\t\t\t\twriter.writeCall(varName + \".\" + subName, nArgs);\n\n\t\t\t\t// )\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\t\t\t}\n\n\t\t\t// Case 3: function call\n\t\t\telse if (token.equals(\"(\")) {\n\t\t\t\t// (\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\t// expression list\n\t\t\t\tjTokenizer.advance();\n\t\t\t\tElement node = compileExpressionList();\n\t\t\t\tint nArgs = node.getChildNodes().getLength();\n\t\t\t\ttermParent.appendChild(node);\n\n\t\t\t\t// )\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\t// Writing the VML for a method call\n\t\t\t\twriter.writePush(\"pointer\", 0);\n\t\t\t\twriter.writeCall(className + \".\" + varName, ++nArgs);\n\t\t\t}\n\t\t\t// Case 4: Variable name.\n\t\t\telse {\n\t\t\t\twriter.writePush(symTable.lookup(varName).kind, symTable.lookup(varName).index);\n\t\t\t}\n\t\t}\n\t\treturn termParent;\n\t}",
"public Token(String text, int start, int end) {\n termText = text;\n startOffset = start;\n endOffset = end;\n }",
"public StreamTerm term() {\n return term;\n }",
"Term getTermFromIndex(int index) {\n return terms.get(index);\n }",
"public static Term fetchByPrimaryKey(long termId) {\n\t\treturn getPersistence().fetchByPrimaryKey(termId);\n\t}",
"public java.lang.Integer getTerm() {\n return term;\n }",
"public void setTerm(Expression term) {\n this.term = term;\n }",
"public java.lang.Integer getTerm() {\n return term;\n }",
"public boolean isTerm() {\n\t\treturn isTerm;\n\t}",
"@Override\n public String toString() {\n return \"ModelTerm{\" +\n \"termTitle='\" + termTitle + '\\'' +\n \", termStartDate=\" + termStartDate +\n \", termEndDate=\" + termEndDate +\n '}';\n }",
"public Token(String text, int start, int end, String typ) {\n termText = text;\n startOffset = start;\n endOffset = end;\n type = typ;\n }",
"public static <T extends Term> Matcher<T> matchingTerm(T ast)\n {\n return new TermMatcher<T>(ast);\n }",
"abstract public TermEnum terms(Term t) throws IOException;",
"Term getCurrentTerm() {\n return currentTerm;\n }",
"public ComputeTermFrequencies() { super(); }",
"abstract public TermEnum terms() throws IOException;",
"public void addTerm(Term newTerm)\r\n\t{\r\n\t\tArrayList<Term> terms = new ArrayList<Term>(Arrays.asList(this.terms));\r\n\t\tif(!terms.contains(newTerm))\r\n\t\t{\r\n\t\t\tterms.add(newTerm);\r\n\t\t\tthis.terms = terms.toArray(new Term[0]);\r\n\t\t}\r\n\t}",
"ArrayList<Term> getTerms() {\n ArrayList<Term> terms = new ArrayList<>();\n String[] columns = {\"id\", \"name\", \"start_date\", \"end_date\"};\n Cursor cursor = db.query(\"term\", columns, null, null, null, null, null);\n while (cursor.moveToNext()) {\n Term term = new Term();\n term.setId(cursor.getInt(0));\n term.setName(cursor.getString(1));\n term.setStartDate(cursor.getString(2));\n term.setEndDate(cursor.getString(3));\n terms.add(term);\n }\n return terms;\n }",
"public void setTerm(String value) {\r\n setAttributeInternal(TERM, value);\r\n }",
"public static <T extends Term> Matcher<T> matchingTerm(String ast)\n {\n return new TermMatcher<T>(ast);\n }",
"public void setTerms(Term[] terms) { this.terms = terms; }",
"public InputTerm<V> subTerm(int fromIndex, int toIndex) {\n\t\tList<InputTermUnit<V>> subUnits = this.units.subList(fromIndex, toIndex);\n\t\treturn new InputTerm<V>(subUnits, null);\n\t}",
"public Term[] getTermByDoc(IndexedDoc d){\n\t\treturn d.getTerms();\r\n\t}",
"public interface Term {\n\t\n\t/**\n\t * Get the coefficient of a term\n\t * @return the coefficient \n\t */\n\tpublic double getCoefficient();\n\t\n\t/**\n\t * Get the exponent of a term\n\t * @return the exponent\n\t */\n\tpublic int getExponent();\n\t\n\t/**\n\t * Evaluate a term by a given value. c = constant, a(c)^n \n\t * @param x The value to be evaluated \n\t * @return The result of the evaluated term \n\t */\n\tpublic double evaluate(double x);\n\t\n}",
"private Terms(){\n\t\t //this prevents even the native class from calling this ctor as well :\n\t\t throw new AssertionError();\n\t\t }",
"public Value.Builder setTerm(java.lang.Integer value) {\n validate(fields()[14], value);\n this.term = value;\n fieldSetFlags()[14] = true;\n return this;\n }",
"public Term getTerm(int i) {\n \t\tif (terms != null && terms.size() > i) {\n \t\t\treturn (Term)terms.get(i);\n \t\t} else {\n \t\t\treturn null;\n \t\t}\n \t}",
"private void parseTerm() throws IOException {\r\n\t\tString line;\r\n\t\tTerm newTerm = new Term();\r\n\t\twhile((line=next(0))!=null) {\r\n\t\t\tif(line.startsWith(\"[\"))\r\n\t\t\t\t{\r\n\t\t\t\tthis.buffer=line;\r\n\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\tint colon=line.indexOf(':');\r\n\t\t\tif(colon==-1) continue;\r\n\t\t\tif(line.startsWith(\"id:\"))\r\n\t\t\t\t{\r\n\t\t\t\tnewTerm.id = line.substring(colon+1).trim();\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\tif(line.startsWith(\"name:\"))\r\n\t\t\t\t{\r\n\t\t\t\tnewTerm.name=nocomment(line.substring(colon+1));\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\tif(line.startsWith(\"namespace:\"))\r\n\t\t\t\t{\r\n\t\t\t\tnewTerm.namespace=nocomment(line.substring(colon+1));\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\telse if(line.startsWith(\"def:\"))\r\n\t\t\t\t{\r\n\t\t\t\tnewTerm.def=nocomment(line.substring(colon+1));\r\n\t\t\t\tterms.addTerm(newTerm);\r\n\t\t\t\tif (newTerm.namespace.equals(\"molecular_function\")){\r\n\t\t\t\t\tdagMF.addVertex(newTerm);\r\n\t\t\t\t}\r\n\t\t\t\telse if (newTerm.namespace.equals(\"biological_process\")){\r\n\t\t\t\t\tdagBP.addVertex(newTerm);\t\r\n\t\t\t\t}\r\n\t\t\t\telse if (newTerm.namespace.equals(\"cellular_component\")){\r\n\t\t\t\t\tdagCC.addVertex(newTerm);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tSystem.out.println(\"TERM WAS NOT ADDED, NO NAMESPACE!\");\r\n\t\t\t\t}\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t}\r\n\t}",
"Astro namedTerm(String tagName, AstroArg args);",
"public CLPObjective setTerm(double value) {\n\t\t_solver.setObjectiveOffset(value);\n\t\treturn this;\n\t}",
"public String getTermCode() {\n return termCode;\n }",
"public String getTerm() {\r\n return (String) getAttributeInternal(TERM);\r\n }",
"QPrintTerm createPrintTerm();",
"public Token(String text, int start, int end, int flags) {\n termText = text;\n startOffset = start;\n endOffset = end;\n this.flags = flags;\n }",
"public void setTerm(java.lang.Integer value) {\n this.term = value;\n }",
"public TermCriteria get_term_crit()\n {\n \n TermCriteria retVal = new TermCriteria(get_term_crit_0(nativeObj));\n \n return retVal;\n }",
"public Vector mapTerm(String term) throws TermNotFoundException {\n int i = termIndex.get(term);\n\n if (i == -1) {\n throw new TermNotFoundException(term);\n }\n\n return new DenseVector(Uk[i]);\n }",
"public Value.Builder clearTerm() {\n term = null;\n fieldSetFlags()[14] = false;\n return this;\n }",
"public Term nameToListedTerm(String name) {\r\n Concept concept = concepts.get(name);\r\n if (concept != null)\r\n return concept.getTerm(); // Concept associated Term\r\n return operators.get(name);\r\n }",
"com.google.ads.googleads.v6.resources.SearchTermView getSearchTermView();",
"public void removeTerm(Term oldTerm)\r\n\t{\r\n\t\tArrayList<Term> terms = new ArrayList<Term>(Arrays.asList(this.terms));\r\n\t\tterms.remove(oldTerm);\r\n\t\tthis.terms = terms.toArray(new Term[0]);\t\t\r\n\t}",
"private NFA term() {\n NFA startFactor = new NFA();\n while (more() && peek() != ')' && peek() != '|') {\n NFA newFactor = factor();\n //If a term is just an empty sequence of factors\n if (startFactor.getStates().isEmpty()) {\n startFactor = newFactor;\n } else {//concatentae the term if there are multple factor\n startFactor = combine(startFactor, newFactor);\n }\n }\n return startFactor;\n }",
"public Concept termToConcept(Term term) {\r\n return nameToConcept(term.getName());\r\n }",
"public Term getTerm(int termID)\r\n\t{\r\n\t\tif(terms==null) return null;\r\n\t\tfor(Term term : terms)\r\n\t\t\tif(termID==term.getId()) return term;\r\n\t\treturn null;\r\n\t}",
"@Override\n public String getTermByIndex(int index) {\n return null;\n }",
"public static List<Term> findAll() {\n\t\treturn getPersistence().findAll();\n\t}",
"public Term(String query, long weight) {\n if (query == null)\n throw new IllegalArgumentException(\"query is null\");\n if (weight < 0)\n throw new IllegalArgumentException(\"weight is negative\");\n this.query = query;\n this.weight = weight;\n }",
"Term getNodeTerm();",
"private void constructTerm(String s) {\r\n int coefficient;\r\n int power;\r\n String regexPattern =\r\n \"([+-]?)([1-9]\\\\d*|0{1})([x]{1})(\\\\^{1})([1-9]\\\\d*|0{1})|([+-]?)([1-9]\\\\d*|0{1})\";\r\n Pattern p = Pattern.compile(regexPattern);\r\n Matcher m = p.matcher(s);\r\n if (!m.matches()) {\r\n throw new IllegalArgumentException(\"Illegal term, cannot be created\");\r\n }\r\n if (m.group(1) != null) {\r\n coefficient = Integer.parseInt(m.group(1).concat(m.group(2)));\r\n power = Integer.parseInt(m.group(5));\r\n addTerm(coefficient, power);\r\n } else if (m.group(6) != null) {\r\n coefficient = Integer.parseInt(m.group(6).concat(m.group(7)));\r\n power = 0;\r\n addTerm(coefficient, power);\r\n }\r\n }",
"private void createTermFreqVector(JCas jcas, Document doc) {\n\n String docText = doc.getText().toLowerCase();\n\n // TODO: construct a vector of tokens and update the tokenList in CAS\n\n String[] wordList = docText.split(\" \");\n HashMap<String, Integer> tokenCount = new HashMap<String, Integer>();\n for (String word : wordList) {\n String newWord = word;\n if(word.charAt(word.length()-1)<'a' || word.charAt(word.length()-1)>'z'){\n newWord = word.substring(0, word.length()-1);\n }\n //if(Utils.GetStopWordFilter().isStopword(newWord))continue;\n if (!tokenCount.containsKey(newWord)) {\n tokenCount.put(newWord, 1);\n } else {\n tokenCount.put(newWord, tokenCount.get(newWord) + 1);\n }\n }\n\n ArrayList<Token> tokenList = new ArrayList<Token>();\n for (String word : tokenCount.keySet()) {\n Token token = new Token(jcas);\n token.setText(word);\n token.setFrequency(tokenCount.get(word));\n tokenList.add(token);\n }\n FSList tokenFSList = Utils.fromCollectionToFSList(jcas, tokenList);\n doc.setTokenList(tokenFSList);\n }",
"public AcademicHistory() {\n listOfTerms = new ArrayList<Term>();\n }",
"public TreeItem(Symbol term) {\n\t\tsuper(term);\n\t\tdecideNorm = true;\n\t\tisNorm = true;\n\t}",
"private Vocabulary() {\n }",
"public static TokenizerFactory<Word> factory()\n/* */ {\n/* 111 */ return new ArabicTokenizerFactory(false);\n/* */ }",
"public void set(Term t) {\n \t\ttry {\n \t\t\tsetFunctor(t.functor);\n \t\t\tterms = t.getDeepCopyOfTerms();\n \t\t} catch (Exception e) {\n \t\t\tSystem.err.println(\"Error setting value for term \");\n \t\t\te.printStackTrace();\n \t\t}\n \t}",
"public TermParser(){\n\t\tvar_map = new HashMap <String, Double>();\n\t\tvar_map.put(\"pi\", Math.PI);\n\t\tvar_map.put(\"e\", Math.E);\n\t\tclear();\n\t}",
"@Override\n public int getIndexByTerm(String term) {\n return 0;\n }",
"private RDF_Term testTerm(Node node, PrefixMap pmap, boolean asValue) {\n RDF_Term rt = ProtobufConvert.convert(node, pmap, asValue) ;\n\n if ( node == null) {\n assertTrue(rt.hasUndefined());\n return rt;\n }\n\n switch (rt.getTermCase()) {\n// message RDF_Term {\n// oneof term {\n// RDF_IRI iri = 1 ;\n// RDF_BNode bnode = 2 ;\n// RDF_Literal literal = 3 ;\n// RDF_PrefixName prefixName = 4 ;\n// RDF_VAR variable = 5 ;\n// RDF_Triple tripleTerm = 6 ;\n// RDF_ANY any = 7 ;\n// RDF_UNDEF undefined = 8 ;\n// RDF_REPEAT repeat = 9 ;\n//\n// // Value forms of literals.\n// int64 valInteger = 20 ;\n// double valDouble = 21 ;\n// RDF_Decimal valDecimal = 22 ;\n// }\n// }\n case IRI : {\n RDF_IRI iri = rt.getIri() ;\n assertEquals(node.getURI(), iri.getIri()) ;\n break;\n }\n case BNODE : {\n RDF_BNode bnode = rt.getBnode() ;\n assertEquals(node.getBlankNodeLabel(), bnode.getLabel()) ;\n break;\n }\n case LITERAL : {\n RDF_Literal lit = rt.getLiteral() ;\n assertEquals(node.getLiteralLexicalForm(), lit.getLex()) ;\n\n if (JenaRuntime.isRDF11) {\n // RDF 1.1\n if ( Util.isSimpleString(node) ) {\n assertTrue(lit.getSimple());\n // Protobug default is \"\"\n assertNullPB(lit.getDatatype()) ;\n assertEquals(RDF_PrefixName.getDefaultInstance(), lit.getDtPrefix());\n assertNullPB(lit.getLangtag()) ;\n } else if ( Util.isLangString(node) ) {\n assertFalse(lit.getSimple());\n assertNullPB(lit.getDatatype()) ;\n assertEquals(RDF_PrefixName.getDefaultInstance(), lit.getDtPrefix());\n assertNotSame(\"\", lit.getLangtag()) ;\n }\n else {\n assertFalse(lit.getSimple());\n // Regular typed literal.\n assertTrue(lit.getDatatype() != null || lit.getDtPrefix() != null );\n assertNullPB(lit.getLangtag()) ;\n }\n } else {\n // RDF 1.0\n if ( node.getLiteralDatatype() == null ) {\n if ( Util.isLangString(node ) ) {\n assertFalse(lit.getSimple());\n assertNullPB(lit.getDatatype()) ;\n assertNull(lit.getDtPrefix()) ;\n assertNotSame(\"\", lit.getLangtag()) ;\n } else {\n assertTrue(lit.getSimple());\n assertNullPB(lit.getDatatype()) ;\n assertEquals(RDF_PrefixName.getDefaultInstance(), lit.getDtPrefix());\n assertNullPB(lit.getLangtag()) ;\n }\n } else {\n assertTrue(lit.getDatatype() != null || lit.getDtPrefix() != null );\n }\n }\n break;\n }\n case PREFIXNAME : {\n assertNotNull(rt.getPrefixName().getPrefix()) ;\n assertNotNull(rt.getPrefixName().getLocalName()) ;\n String x = pmap.expand(rt.getPrefixName().getPrefix(), rt.getPrefixName().getLocalName());\n assertEquals(node.getURI(),x);\n break;\n }\n case VARIABLE :\n assertEquals(node.getName(), rt.getVariable().getName());\n break;\n case TRIPLETERM : {\n RDF_Triple encTriple = rt.getTripleTerm();\n Triple t = node.getTriple();\n RDF_Term rt_s = testTerm(t.getSubject(), pmap, asValue);\n RDF_Term rt_p = testTerm(t.getPredicate(), pmap, asValue);\n RDF_Term rt_o = testTerm(t.getObject(), pmap, asValue);\n assertEquals(encTriple.getS(), rt_s);\n assertEquals(encTriple.getP(), rt_p);\n assertEquals(encTriple.getO(), rt_o);\n break;\n }\n case ANY :\n assertEquals(Node.ANY, node);\n case REPEAT :\n break;\n case UNDEFINED :\n assertNull(node);\n return rt;\n case VALINTEGER : {\n long x = rt.getValInteger();\n assertTrue(integerSubTypes.contains(node.getLiteralDatatype()));\n //assertEquals(node.getLiteralDatatype(), XSDDatatype.XSDinteger);\n long x2 = Long.parseLong(node.getLiteralLexicalForm());\n assertEquals(x,x2);\n break;\n }\n case VALDOUBLE : {\n double x = rt.getValDouble();\n assertEquals(node.getLiteralDatatype(), XSDDatatype.XSDdouble);\n double x2 = Double.parseDouble(node.getLiteralLexicalForm());\n assertEquals(x, x2, 0.01);\n break;\n }\n case VALDECIMAL : {\n assertEquals(node.getLiteralDatatype(), XSDDatatype.XSDdecimal);\n NodeValue nv = NodeValue.makeNode(node);\n assertTrue(nv.isDecimal());\n\n long value = rt.getValDecimal().getValue() ;\n int scale = rt.getValDecimal().getScale() ;\n BigDecimal d = BigDecimal.valueOf(value, scale) ;\n assertEquals(nv.getDecimal(), d);\n break;\n }\n case TERM_NOT_SET :\n break;\n }\n\n // And reverse\n if ( ! asValue ) {\n // Value based does not preserve exact datatype or lexical form.\n Node n2 = ProtobufConvert.convert(rt, pmap);\n assertEquals(node, n2) ;\n }\n\n return rt;\n }",
"protected Query analyzeTerm(String field, TokenStream stream) throws IOException {\n TermToBytesRefAttribute termAtt = stream.getAttribute(TermToBytesRefAttribute.class);\n BoostAttribute boostAtt = stream.addAttribute(BoostAttribute.class);\n\n stream.reset();\n if (!stream.incrementToken()) {\n throw new AssertionError();\n }\n\n return newTermQuery(new Term(field, termAtt.getBytesRef()), boostAtt.getBoost());\n }",
"private static Term toTerm(ByteBuffer value)\n {\n return new Constants.Value(value);\n }",
"public void setTermText(String text) {\n termText = text;\n termBuffer = null;\n }",
"public T caseTERM(TERM object)\n {\n return null;\n }",
"public Word(String text) {\n\t\tsuper();\n\t\tthis.text = text;\n\t}",
"@Override\n\tpublic int compareTo(Term o) {\n\t\treturn this.query.compareTo(o.query);\n\t}",
"public Term getRandomTerm (String table) {\n // Select Query\n String selectQuery = \"SELECT * FROM \" + table + \" WHERE \" + KEY_TERM + \" NOT NULL AND \" +\n \"LENGTH(\" + KEY_TERM + \") <= 16 \" + \"ORDER BY RANDOM() LIMIT 1\";\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n if (cursor != null) { cursor.moveToFirst(); }\n\n Term term = new Term(Integer.parseInt(cursor.getString(0)), cursor.getString(1), cursor.getString(2), cursor.getString(3),\n cursor.getString(4), cursor.getString(5), Integer.parseInt(cursor.getString(6)));\n\n // return term\n return term;\n }",
"abstract public TermPositions termPositions(Term t) throws IOException;",
"Term incrementTerm() {\n Term prior = currentTerm;\n long nextTerm = currentTerm.getNumber() + 1;\n currentTerm = Term.newBuilder()\n .setNumber(nextTerm)\n .build();\n return prior;\n }",
"public Keyword() {\n\t}",
"public List<Term> getAllTerms() {\n\t\tsession.beginTransaction();\n\t\tList<Term> lis = session.createQuery(\"from Term\").list();\n\n\t\tfor (Term tm : lis) {\n\t\t\tSystem.out.println(tm.getId() + \" \" + tm.getTermName());\n\t\t}\n\t\treturn lis;\n\t}",
"public Term(String query, double weight) {\n\t\tif (query == null) throw new NullPointerException(\"Query cannot be null\");\n\t\tif (weight < 0) throw new IllegalArgumentException(\"weight must not be less than 0\");\n\t\tthis.query = query;\n\t\tthis.weight = weight;\n\t}",
"public LexAnnotator(File termFile) {\n this(Util.readLines(termFile)); \n }"
] | [
"0.7342048",
"0.7305581",
"0.7266592",
"0.7236319",
"0.7028665",
"0.688306",
"0.68627006",
"0.67947286",
"0.67085",
"0.6644",
"0.6620826",
"0.6584892",
"0.6576373",
"0.65667605",
"0.6561405",
"0.6503904",
"0.6491093",
"0.6468318",
"0.6433911",
"0.6378922",
"0.6369706",
"0.6351174",
"0.6272368",
"0.6210937",
"0.6198452",
"0.61977476",
"0.6158192",
"0.6135549",
"0.6131483",
"0.60814136",
"0.60374755",
"0.6028322",
"0.60156256",
"0.60087407",
"0.6000024",
"0.59896374",
"0.5958645",
"0.5950377",
"0.5939063",
"0.59389234",
"0.593511",
"0.5931734",
"0.59183294",
"0.59163475",
"0.5863976",
"0.5846508",
"0.5829148",
"0.5796668",
"0.5791973",
"0.57540685",
"0.57523507",
"0.57522196",
"0.57492805",
"0.5739089",
"0.5736802",
"0.5736007",
"0.57130164",
"0.57092375",
"0.5704819",
"0.5697075",
"0.5674884",
"0.5657195",
"0.56452596",
"0.56006926",
"0.5561792",
"0.55604804",
"0.553998",
"0.55398923",
"0.55274296",
"0.5518789",
"0.55141336",
"0.54979485",
"0.5494503",
"0.5483761",
"0.54589367",
"0.54265803",
"0.5421593",
"0.5419503",
"0.5415635",
"0.53879",
"0.53876984",
"0.5381716",
"0.5377423",
"0.53770185",
"0.5369984",
"0.53690976",
"0.5353634",
"0.53488344",
"0.5345126",
"0.53445536",
"0.53185856",
"0.5311058",
"0.5304478",
"0.53006274",
"0.5297868",
"0.52925855",
"0.52897924",
"0.52828807",
"0.5281781",
"0.5281054"
] | 0.70075536 | 5 |
Returns a new object of class 'Term Attribute'. | QuoteTermAttribute createQuoteTermAttribute(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"TAttribute createTAttribute();",
"Attribute createAttribute();",
"Attribute createAttribute();",
"public AcademicTerm(int termIndex, Term term) {\n this.termIndex = termIndex;\n this.term = term;\n }",
"GeneralTerm createGeneralTerm();",
"protected Term createTermFrom(String tag) {\n\t\tTerm tmp = terms.getOrDefault(tag, new Term(tag, this, terms.size()));\n\t\tterms.put(tag, tmp);\n\t\t// termCounts.put(tmp, termCounts.getOrDefault(tmp,0)+1);\n\t\ttermsInCorpus += 1;\n\t\treturn tmp;\n\t}",
"SingleTerm(Term t)\n {\n term = t;\n }",
"QuoteTerm createQuoteTerm();",
"QuoteAttribute createQuoteAttribute();",
"public TermData(String term)\n\t{\n\t\tthis.term = term;\n\t}",
"QDataSetTerm createDataSetTerm();",
"private Attribute createAttribute() {\n\t\t\tAttribute att = AttributeFactory.createAttribute(getName(), getValueType());\n\t\t\tatt.getAnnotations().clear();\n\t\t\tatt.getAnnotations().putAll(getAnnotations());\n\t\t\tattribute = att;\n\t\t\treturn att;\n\t\t}",
"public VocabularyTerms() {}",
"Term getTerm();",
"public String getTerm() {\r\n return (String) getAttributeInternal(TERM);\r\n }",
"public String getTerm(){\n return this.term;\n }",
"public String getTerm() {\n return term;\n }",
"Atributo createAtributo();",
"public void setTerm(String value) {\r\n setAttributeInternal(TERM, value);\r\n }",
"TermType getTermType();",
"TermNode() {\n this.fac = new FacNode();\n this.term = null;\n this.selection = 1;\n }",
"public Term(String t) {\n this.t = t;\n \n RepCheck();\n }",
"public Attr() {\n\t\t\tsuper();\n\t\t}",
"public synchronized static ComputeTermFrequencies createComputeAndPrintTermFrequency() \n\t{\n\t\treturn new ComputeTermFrequencies();\n\t}",
"public Terms() {}",
"public Expression getTerm() {\n return term;\n }",
"public Object clone() {\n \t\treturn new Term(this);\n \t}",
"public TreeItem(Symbol term) {\n\t\tsuper(term);\n\t\tdecideNorm = true;\n\t\tisNorm = true;\n\t}",
"public int getTermIndex() {return termIndex;}",
"public static Term create(long termId) {\n\t\treturn getPersistence().create(termId);\n\t}",
"Astro namedTerm(String tagName, AstroArg args);",
"QuoteTypeAttr createQuoteTypeAttr();",
"public Concept getConcept(Term term) {\r\n String n = term.getName();\r\n Concept concept = concepts.get(n);\r\n if (concept == null)\r\n concept = new Concept(term, this); // the only place to make a new Concept\r\n return concept;\r\n }",
"public static <T extends Term> Matcher<T> matchingTerm(T ast)\n {\n return new TermMatcher<T>(ast);\n }",
"public SuggestedTerm(String term, int editDistance){\n this.term = term;\n this.editDistance = editDistance;\n }",
"AttributeDeclarations createAttributeDeclarations();",
"public IRAttribute ( ) {\n\t\tsuper();\n\t}",
"@Override\n public String toString() {\n return \"ModelTerm{\" +\n \"termTitle='\" + termTitle + '\\'' +\n \", termStartDate=\" + termStartDate +\n \", termEndDate=\" + termEndDate +\n '}';\n }",
"public void setTerm(Expression term) {\n this.term = term;\n }",
"public static <T extends Term> Matcher<T> matchingTerm(String ast)\n {\n return new TermMatcher<T>(ast);\n }",
"public Term[] getTerms() { return terms; }",
"public java.lang.Integer getTerm() {\n return term;\n }",
"public java.lang.Integer getTerm() {\n return term;\n }",
"Term getTermFromIndex(int index) {\n return terms.get(index);\n }",
"public void setTermcat(String value) {\r\n setAttributeInternal(TERMCAT, value);\r\n }",
"public Vector mapTerm(String term) throws TermNotFoundException {\n int i = termIndex.get(term);\n\n if (i == -1) {\n throw new TermNotFoundException(term);\n }\n\n return new DenseVector(Uk[i]);\n }",
"public Value.Builder setTerm(java.lang.Integer value) {\n validate(fields()[14], value);\n this.term = value;\n fieldSetFlags()[14] = true;\n return this;\n }",
"public StreamTerm term() {\n return term;\n }",
"@Function Attr createAttribute(String name);",
"public Term clone() {\n\t\treturn new Term(this.coefficient, this.exponent);\n\t}",
"public Concept termToConcept(Term term) {\r\n return nameToConcept(term.getName());\r\n }",
"public void addTerm(Term newTerm)\r\n\t{\r\n\t\tArrayList<Term> terms = new ArrayList<Term>(Arrays.asList(this.terms));\r\n\t\tif(!terms.contains(newTerm))\r\n\t\t{\r\n\t\t\tterms.add(newTerm);\r\n\t\t\tthis.terms = terms.toArray(new Term[0]);\r\n\t\t}\r\n\t}",
"EAttribute createEAttribute();",
"public static Term fetchByPrimaryKey(long termId) {\n\t\treturn getPersistence().fetchByPrimaryKey(termId);\n\t}",
"static Attribute createAttribute(String name, Field field) {\n\t\tAttribute attribute = new Attribute(name, field);\n\t\tattribute.setKind(Attribute.NONE);\n\t\tattribute.setPreferenceType(Attribute.GAIN);\n\t\treturn attribute;\n\t}",
"public ComputeTermFrequencies() { super(); }",
"public Keyword() {\n\t}",
"abstract public TermDocs termDocs(Term t) throws IOException;",
"public static AttributeFactory newAttributeFactory() {\n\t\treturn newAttributeFactory(random());\n\t}",
"public LocalTermDictionary getLocalTermDictionary()\n {\n return AceDictionary.getInstance();\n }",
"public TermCriteria get_term_crit()\n {\n \n TermCriteria retVal = new TermCriteria(get_term_crit_0(nativeObj));\n \n return retVal;\n }",
"private void parseTerm() throws IOException {\r\n\t\tString line;\r\n\t\tTerm newTerm = new Term();\r\n\t\twhile((line=next(0))!=null) {\r\n\t\t\tif(line.startsWith(\"[\"))\r\n\t\t\t\t{\r\n\t\t\t\tthis.buffer=line;\r\n\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\tint colon=line.indexOf(':');\r\n\t\t\tif(colon==-1) continue;\r\n\t\t\tif(line.startsWith(\"id:\"))\r\n\t\t\t\t{\r\n\t\t\t\tnewTerm.id = line.substring(colon+1).trim();\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\tif(line.startsWith(\"name:\"))\r\n\t\t\t\t{\r\n\t\t\t\tnewTerm.name=nocomment(line.substring(colon+1));\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\tif(line.startsWith(\"namespace:\"))\r\n\t\t\t\t{\r\n\t\t\t\tnewTerm.namespace=nocomment(line.substring(colon+1));\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\telse if(line.startsWith(\"def:\"))\r\n\t\t\t\t{\r\n\t\t\t\tnewTerm.def=nocomment(line.substring(colon+1));\r\n\t\t\t\tterms.addTerm(newTerm);\r\n\t\t\t\tif (newTerm.namespace.equals(\"molecular_function\")){\r\n\t\t\t\t\tdagMF.addVertex(newTerm);\r\n\t\t\t\t}\r\n\t\t\t\telse if (newTerm.namespace.equals(\"biological_process\")){\r\n\t\t\t\t\tdagBP.addVertex(newTerm);\t\r\n\t\t\t\t}\r\n\t\t\t\telse if (newTerm.namespace.equals(\"cellular_component\")){\r\n\t\t\t\t\tdagCC.addVertex(newTerm);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tSystem.out.println(\"TERM WAS NOT ADDED, NO NAMESPACE!\");\r\n\t\t\t\t}\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t}\r\n\t}",
"public AcademicHistory() {\n listOfTerms = new ArrayList<Term>();\n }",
"abstract public TermEnum terms(Term t) throws IOException;",
"public Attribute_New(String _name, String _value)\n {\n name = _name;\n\n List singleAttributList = new ArrayList<String>();\n singleAttributList.add(_value);\n\n }",
"public String getTermCode() {\n return termCode;\n }",
"protected Query newTermQuery(Term term, float boost) {\n Query q = new TermQuery(term);\n if (boost == DEFAULT_BOOST) {\n return q;\n }\n return new BoostQuery(q, boost);\n }",
"public boolean isTerm() {\n\t\treturn isTerm;\n\t}",
"public void removeTerm(Term oldTerm)\r\n\t{\r\n\t\tArrayList<Term> terms = new ArrayList<Term>(Arrays.asList(this.terms));\r\n\t\tterms.remove(oldTerm);\r\n\t\tthis.terms = terms.toArray(new Term[0]);\t\t\r\n\t}",
"public String getTermText() {\n return termText;\n }",
"public CLPObjective setTerm(double value) {\n\t\t_solver.setObjectiveOffset(value);\n\t\treturn this;\n\t}",
"Attributes getAttributes();",
"public String getTermcat() {\r\n return (String) getAttributeInternal(TERMCAT);\r\n }",
"public GetAttributesDefinitionV2() {}",
"abstract public TermEnum terms() throws IOException;",
"protected Attribute createAttribute(Field field) {\n return pkg.add(new Attribute(field));\n }",
"AttributeCell createAttributeCell();",
"public EdmAttribute setupAttribute(String val) {\n EdmAttribute a = new EdmAttribute(val);\n return a;\n }",
"static TermVectorEntry of(TermsEnum te) throws IOException {\n Objects.requireNonNull(te);\n\n String termText = BytesRefUtils.decode(te.term());\n\n List<TermVectorEntry.TermVectorPosition> tvPositions = new ArrayList<>();\n PostingsEnum pe = te.postings(null, PostingsEnum.OFFSETS);\n pe.nextDoc();\n int freq = pe.freq();\n for (int i = 0; i < freq; i++) {\n int pos = pe.nextPosition();\n if (pos < 0) {\n // no position information available\n continue;\n }\n TermVectorPosition tvPos = TermVectorPosition.of(pos, pe);\n tvPositions.add(tvPos);\n }\n\n return new TermVectorEntry(termText, te.totalTermFreq(), tvPositions);\n }",
"public void setTerm(java.lang.Integer value) {\n this.term = value;\n }",
"public Attribute method_4098(AttributeKey var1) {\n return new class_57(this);\n }",
"private Attr newAttr(String tipo, String valor) {\n/* 341 */ Attr atrib = this.pagHTML.createAttribute(tipo);\n/* 342 */ atrib.setValue(valor);\n/* 343 */ return atrib;\n/* */ }",
"default Attribute getAttribute(AttributeName attributeName) {return (Attribute) attributeName;}",
"public ConceptAtom(IRI iri)\n {\n super(iri);\n this.strVariable = \"\"; \n }",
"public Term getTerm(int i) {\n \t\tif (terms != null && terms.size() > i) {\n \t\t\treturn (Term)terms.get(i);\n \t\t} else {\n \t\t\treturn null;\n \t\t}\n \t}",
"public AttributeSet() {\n\n elements = new Hashtable();\n }",
"protected Attribute attribute(final QName name, final String value) {\n return new Attribute() {\n @Override\n public QName getName() {\n return name;\n }\n\n @Override\n public String getValue() {\n return value;\n }\n };\n }",
"private AttributeTypeHome( )\n {\n }",
"public Attribute(String title) {\n \t\tthis.title = title;\n \t\tconflictMagnitude = 0;\n \t}",
"public Element compileTerm() {\n\t\tElement ele = null;\n\t\tString token, tokenType;\n\t\tString varName;\n\n\t\tElement termParent = document.createElement(\"term\");\n\n\t\ttoken = jTokenizer.returnTokenVal();\n\t\ttokenType = jTokenizer.tokenType();\n\n\t\t// Case 1: ( expression )\n\n\t\tif (token.equals(\"(\")) {\n\t\t\t// (\n\t\t\tele = createXMLnode(tokenType);\n\t\t\ttermParent.appendChild(ele);\n\n\t\t\t// exp\n\t\t\tjTokenizer.advance();\n\t\t\ttermParent.appendChild(compileExpression());\n\n\t\t\t// )\n\t\t\tjTokenizer.advance();\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\tele = createXMLnode(tokenType);\n\t\t\ttermParent.appendChild(ele);\n\n\t\t}\n\n\t\t// Case 2: unaryOp term\n\t\telse if (token.matches(\"\\\\-|~\")) {\n\n\t\t\t// unary op\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\tString op = jTokenizer.returnTokenVal();\n\t\t\tele = createXMLnode(tokenType);\n\t\t\ttermParent.appendChild(ele);\n\t\t\t\n\t\t\t\n\t\t\t//Since it is postfix, the term comes first\n\t\t\t\n\t\t\t// term\n\t\t\tjTokenizer.advance();\n\t\t\ttermParent.appendChild(compileTerm());\n\n\t\t\t// appending the op\n\t\t\tif (op.equals(\"~\")) {\n\t\t\t\twriter.writeArithmetic(\"not\");\n\t\t\t} else {\n\t\t\t\twriter.writeArithmetic(\"neg\");\n\t\t\t}\n\n\t\t}\n\t\t\n\t\t// Any constant or keyword\n\t\telse if (tokenType.matches(\"keyword|integerConstant|stringConstant\")) {\n\t\t\tele = createXMLnode(tokenType);\n\t\t\ttermParent.appendChild(ele);\n\t\t\t\n\t\t\t//pushing an integer constant\n\t\t\tif (tokenType.equals(\"integerConstant\")) {\n\t\t\t\twriter.writePush(\"constant\", Integer.parseInt(token));\t\n\t\t\t}\n\t\t\t//For string, have to iterate along the length of the string and call string.append\n\t\t\telse if (tokenType.equals(\"stringConstant\")) {\n\t\t\t\twriter.writePush(\"constant\", token.length());\n\t\t\t\twriter.writeCall(\"String.new\", 1);\n\n\t\t\t\tfor (int i = 0; i < token.length(); i++) {\n\t\t\t\t\twriter.writePush(\"constant\", (int) token.charAt(i));\n\t\t\t\t\twriter.writeCall(\"String.appendChar\", 2);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} \n\t\t\t//Pushing the keyword onto the stack, depending on what it is\n\t\t\telse if (tokenType.equals(\"keyword\")) {\n\t\t\t\tif (token.equals(\"true\")) {\n\t\t\t\t\twriter.writePush(\"constant\", 0);\n\t\t\t\t\twriter.writeArithmetic(\"not\");\n\t\t\t\t} else if (token.equals(\"this\")) {\n\t\t\t\t\twriter.writePush(\"pointer\", 0);\n\t\t\t\t} else if (token.equals(\"false\") || token.equals(\"null\")) {\n\t\t\t\t\twriter.writePush(\"constant\", 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Variable, Variable[expression] or subroutineCall\n\t\telse if (tokenType.equals(\"identifier\")) {\n\t\t\tele = createXMLnode(tokenType);\n\t\t\ttermParent.appendChild(ele);\n\t\t\tvarName = jTokenizer.returnTokenVal();\n\t\t\tjackTokenizer clone = new jackTokenizer(jTokenizer);\n\t\t\tclone.advance();\n\t\t\ttoken = clone.returnTokenVal();\n\n\t\t\t// Case 1: Array dereferencing\n\t\t\tif (token.equals(\"[\")) {\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\t// push base id\n\t\t\t\twriter.writePush(symTable.lookup(varName).kind, symTable.lookup(varName).index);\n\n\t\t\t\t// Exp\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttermParent.appendChild(compileExpression());\n\n\t\t\t\t// ]\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\t// base + offset\n\t\t\t\twriter.writeArithmetic(\"add\");\n\n\t\t\t\t// pop into that\n\t\t\t\twriter.writePop(\"pointer\", 1);\n\t\t\t\t// push value into stack\n\t\t\t\twriter.writePush(\"that\", 0);\n\t\t\t}\n\n\t\t\t// Case 2: variable/class.subroutine call\n\t\t\telse if (token.equals(\".\")) {\n\n\t\t\t\tboolean method = false;\n\n\t\t\t\t// .\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\t// subroutine name\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tString subName = jTokenizer.returnTokenVal();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\t// (\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\tString firstName = varName;\n\t\t\t\t//Similar to the compileDo method, have to distinguish between\n\t\t\t\t//method and function\n\t\t\t\tif (symTable.lookup(firstName) != null) {\n\t\t\t\t\tmethod = true;\n\t\t\t\t\twriter.writePush(symTable.lookup(firstName).kind, symTable.lookup(firstName).index);\n\t\t\t\t\tvarName = symTable.lookup(firstName).type;\n\t\t\t\t}\n\t\t\t\t// expressionList\n\t\t\t\tjTokenizer.advance();\n\t\t\t\tElement compileExpression = compileExpressionList();\n\t\t\t\tint nArgs = compileExpression.getChildNodes().getLength();\n\t\t\t\ttermParent.appendChild(compileExpression);\n\n\t\t\t\t// Checking if method or function\n\t\t\t\tif (method) {\n\t\t\t\t\tnArgs++;\n\t\t\t\t}\n\t\t\t\twriter.writeCall(varName + \".\" + subName, nArgs);\n\n\t\t\t\t// )\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\t\t\t}\n\n\t\t\t// Case 3: function call\n\t\t\telse if (token.equals(\"(\")) {\n\t\t\t\t// (\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\t// expression list\n\t\t\t\tjTokenizer.advance();\n\t\t\t\tElement node = compileExpressionList();\n\t\t\t\tint nArgs = node.getChildNodes().getLength();\n\t\t\t\ttermParent.appendChild(node);\n\n\t\t\t\t// )\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\t// Writing the VML for a method call\n\t\t\t\twriter.writePush(\"pointer\", 0);\n\t\t\t\twriter.writeCall(className + \".\" + varName, ++nArgs);\n\t\t\t}\n\t\t\t// Case 4: Variable name.\n\t\t\telse {\n\t\t\t\twriter.writePush(symTable.lookup(varName).kind, symTable.lookup(varName).index);\n\t\t\t}\n\t\t}\n\t\treturn termParent;\n\t}",
"ArrayList<Term> getTerms() {\n ArrayList<Term> terms = new ArrayList<>();\n String[] columns = {\"id\", \"name\", \"start_date\", \"end_date\"};\n Cursor cursor = db.query(\"term\", columns, null, null, null, null, null);\n while (cursor.moveToNext()) {\n Term term = new Term();\n term.setId(cursor.getInt(0));\n term.setName(cursor.getString(1));\n term.setStartDate(cursor.getString(2));\n term.setEndDate(cursor.getString(3));\n terms.add(term);\n }\n return terms;\n }",
"public static AttributeFactory newAttributeFactory(Random random) {\n\t\tswitch (random.nextInt(3)) {\n\t\tcase 0:\n\t\t\treturn TokenStream.DEFAULT_TOKEN_ATTRIBUTE_FACTORY;\n\t\tcase 1:\n\t\t\treturn org.apache.lucene.analysis.Token.TOKEN_ATTRIBUTE_FACTORY;\n\t\tcase 2:\n\t\t\treturn AttributeFactory.DEFAULT_ATTRIBUTE_FACTORY;\n\t\tdefault:\n\t\t\tthrow new AssertionError(\"Please fix the Random.nextInt() call above\");\n\t\t}\n\t}",
"private Terms(){\n\t\t //this prevents even the native class from calling this ctor as well :\n\t\t throw new AssertionError();\n\t\t }",
"public TermAndBoost(BytesRef term, float boost) {\n this.term = BytesRef.deepCopyOf(term);\n this.boost = boost;\n }",
"public void set(Term t) {\n \t\ttry {\n \t\t\tsetFunctor(t.functor);\n \t\t\tterms = t.getDeepCopyOfTerms();\n \t\t} catch (Exception e) {\n \t\t\tSystem.err.println(\"Error setting value for term \");\n \t\t\te.printStackTrace();\n \t\t}\n \t}",
"public Token(String text, int start, int end) {\n termText = text;\n startOffset = start;\n endOffset = end;\n }",
"protected abstract void createAttributes();",
"static Attribute createAttribute(String name) {\n\t\treturn createAttribute(name, new IntegerFieldWrapper());\n\t}",
"public Token(String text, int start, int end, String typ) {\n termText = text;\n startOffset = start;\n endOffset = end;\n type = typ;\n }",
"public Term[] getTermByDoc(IndexedDoc d){\n\t\treturn d.getTerms();\r\n\t}"
] | [
"0.6706666",
"0.65153605",
"0.65153605",
"0.6496482",
"0.6487868",
"0.64695203",
"0.6266116",
"0.6143728",
"0.6107282",
"0.609548",
"0.60701346",
"0.60462457",
"0.60440296",
"0.5972124",
"0.59501785",
"0.58750594",
"0.5850199",
"0.5838886",
"0.5830205",
"0.58271194",
"0.58065563",
"0.57581776",
"0.57498646",
"0.57300884",
"0.57182544",
"0.56969625",
"0.5671558",
"0.5669327",
"0.5663885",
"0.5640592",
"0.56336385",
"0.5582155",
"0.5560703",
"0.55430275",
"0.5520523",
"0.5513483",
"0.55090773",
"0.5473277",
"0.5453159",
"0.5444694",
"0.54409355",
"0.5336186",
"0.5285495",
"0.5284802",
"0.527672",
"0.52743894",
"0.52708143",
"0.5233065",
"0.5216929",
"0.5212985",
"0.51938117",
"0.5191966",
"0.5190554",
"0.5184388",
"0.51798856",
"0.5178586",
"0.51760167",
"0.517206",
"0.5171307",
"0.5170754",
"0.51702064",
"0.5164566",
"0.5141088",
"0.513235",
"0.5130346",
"0.5115801",
"0.5090289",
"0.5087926",
"0.50810015",
"0.507602",
"0.5073455",
"0.5072074",
"0.5069591",
"0.5063599",
"0.5060692",
"0.50605386",
"0.5053652",
"0.5052258",
"0.5034841",
"0.50276923",
"0.50209856",
"0.5020212",
"0.5018197",
"0.49938515",
"0.4984225",
"0.49752307",
"0.49733207",
"0.496299",
"0.49367335",
"0.49341217",
"0.4930083",
"0.4928575",
"0.4920422",
"0.49191663",
"0.49147782",
"0.49095154",
"0.49090132",
"0.49048904",
"0.4897884",
"0.48933008"
] | 0.7859037 | 0 |
Returns a new object of class 'Type'. | QuoteType createQuoteType(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Type createType();",
"Type createType();",
"Type createType();",
"public org.python.types.Type __new__(org.python.types.Type cls);",
"private Object createInstanceOfType(Class<?> propertyType)\n\t{\n\t\tObject typeInstance = null;\n\t\tif (propertyType.isArray())\n\t\t{\n\t\t\ttypeInstance = createArray(propertyType);\n\t\t}\n\t\telse if (propertyType.isPrimitive())\n\t\t{\n\t\t\ttypeInstance = primitiveTypeFactory.create(propertyType);\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttypeInstance = knownTypeFactory.create(propertyType);\n\t\t}\n\t\treturn typeInstance;\n\t}",
"public Type() {\n super();\n }",
"public static NewExpression new_(Class type) { throw Extensions.todo(); }",
"Type() {\n }",
"TypeInterface createTypeInterface();",
"public Type addType() {\n\t\tType newType = new Type();\n\t\tgetType().add(newType);\n\t\treturn newType; \n\t}",
"public T getNewInstance() {\n T value = null;\n Class<T> tClass = (Class<T>) ((ParameterizedType) this.getClass().getGenericSuperclass()).getActualTypeArguments()[0];\n try {\n value = tClass.newInstance();\n } catch (InstantiationException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n return value;\n }",
"private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}",
"public Type type(String name);",
"StructureType createStructureType();",
"NamedType createNamedType();",
"DomainType createDomainType();",
"private ConfigurationObject createObject(String name, String type) throws Exception {\r\n ConfigurationObject object = new DefaultConfigurationObject(name);\r\n object.setPropertyValue(PROPERTY_TYPE, type);\r\n\r\n return object;\r\n }",
"private Type mapType(TypeResponse typeResponse) {\n return new Type(typeResponse.getType(), typeResponse.getId());\n }",
"Type type();",
"Type type();",
"public static Pumpkin create(String Type) throws PlantingException {\n\t\tassert Type != null;\n\t\ttry {\n\t\t\treturn types.get(Type.toLowerCase()).returnNew();\n\t\t} catch (NullPointerException e) {\n\n\t\t\tthrow new PlantingException(Type);\n\t\t}\n\t}",
"HxType createType(final String className);",
"private TypeDb createTypeInstance(long id, String nameEn) {\n TypeDb typeDb = new TypeDb();\n typeDb.setId(id);\n typeDb.setTypeNameEn(nameEn);\n typeDb.setTypeNameRu(new TypeMapper().toRu(nameEn));\n return typeDb;\n }",
"static <T> T instantiate(Class<T> type) {\n\n\n try {\n final Constructor<T> constructor = type.getDeclaredConstructor();\n return constructor.newInstance();\n } catch (NoSuchMethodException | InstantiationException | IllegalAccessException | InvocationTargetException e) {\n e.printStackTrace();\n }\n\n\n return null;\n }",
"public static JavaType createForClass(Class<?> clazz) {\n return new JavaType(clazz);\n }",
"public <T extends RefObject> T createObject(Class<T> type) throws CreationException {\n\t\treturn this.<T>createObject(null, type, new Field[] {});\n\t}",
"@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}",
"@Override\n\tpublic Void visit(NewType type) {\n\t\tprintIndent(\"new\");\n\t\tindent++;\n\t\ttype.type.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}",
"private static final Object newObjectFromString(Class<?> type, String message) {\r\n Constructor<?> constructor;\r\n try {\r\n constructor = type.getDeclaredConstructor(String.class);\r\n constructor.setAccessible(true);\r\n } catch (Exception ex) {\r\n throw new RuntimeException(String.format(MSG_MISSINGCONSTRUCTOR, type.getSimpleName(), ex.getMessage()), ex);\r\n }\r\n try {\r\n return constructor.newInstance(message);\r\n } catch (Exception ex) {\r\n throw new RuntimeException(String.format(MSG_COULDNOTINSTANTIATECLASS, type.getName(), type.getSimpleName()), ex);\r\n }\r\n }",
"private Type type()\r\n {\r\n Type t = new Type();\r\n\r\n t.ident = nextToken;\r\n t.type = basicType();\r\n if (t.type == Keyword.NONESY)\r\n {\r\n unresolved.add(t.ident.string = qualident());\r\n }\r\n else\r\n t.ident.string = null;\r\n\r\n t.dim = bracketsOpt();\r\n\r\n return t;\r\n }",
"DataType createDataType();",
"FieldType createFieldType();",
"private T createInternalT(Class type) {\n\t\ttry {\n\t\t return (T)(type.newInstance());\n\t\t} catch( Exception e ) {\n\t\t return null;\n\t\t}\n\t}",
"CategoryType createCategoryType();",
"public Type() {\n\t\tsetSize();\n\t}",
"EmptyType createEmptyType();",
"HarvestType createHarvestType();",
"public abstract Type getType();",
"<C> TypeExp<C> createTypeExp();",
"abstract public Type type();",
"Class createClass();",
"abstract public Type getType();",
"public Type(String name) {\n\t\tsuper(name);\n\t\tsetSize();\n\t}",
"DatatypeType createDatatypeType();",
"private interface TypeCreator<T> {\n\t\tT createType();\n\t}",
"UniqueType createUniqueType();",
"public ODocument create(@Generic(\"T\") final Class<?> type) {\n dbProvider.get();\n return new ODocument(type.getSimpleName());\n }",
"Tulip getType() { return new Tulip(); }",
"TypeDef createTypeDef();",
"Type getType();",
"Type getType();",
"Type getType();",
"Type getType();",
"Type getType();",
"Type getType();",
"Type getType();",
"Type getType();",
"Type getType();",
"Type getType();",
"Type getType();",
"BType createBType();",
"<U extends T> U create(String name, Class<U> type) throws InvalidUserDataException;",
"public org.hl7.fhir.GroupType addNewType()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.GroupType target = null;\n target = (org.hl7.fhir.GroupType)get_store().add_element_user(TYPE$2);\n return target;\n }\n }",
"public static <T extends @TestAnnotation2 Number & Comparable> TypeInstance createTypeVariable() {\n AnnotatedType referencedTypeVariable = getAnnotatedType();\n TypeInstance typeInstance = Diamond.types().from(referencedTypeVariable);\n return typeInstance;\n }",
"public abstract DataType<T> newInstance();",
"WallType createWallType();",
"public static ObjectInstance getBasicTypesObjectInstance()\n {\n ObjectName o = null;\n try\n {\n Hashtable<String, String> properties = new Hashtable<String, String>(\n 1);\n properties.put(\"isBoolean\", Boolean.toString((getBasicTypesMBean()\n .getIsBoolean())));\n properties.put(\"byte\", Byte\n .toString(getBasicTypesMBean().getByte()));\n properties.put(\"charLetter\", String.valueOf(getBasicTypesMBean()\n .getCharLetter()));\n properties.put(\"doubleNumber\", Double\n .toString((getBasicTypesMBean().getDoubleNumber())));\n properties.put(\"floatNumber\", Float.toString((getBasicTypesMBean()\n .getFloatNumber())));\n properties.put(\"intNumber\", Integer.toString(getBasicTypesMBean()\n .getIntNumber()));\n properties.put(\"longNumber\", Long.toString(getBasicTypesMBean()\n .getLongNumber()));\n properties.put(\"shortNumber\", Short.toString(getBasicTypesMBean()\n .getShortNumber()));\n properties.put(\"theLabel\", getBasicTypesMBean().getTheLabel());\n o = new ObjectName(_domain, properties);\n }\n catch (Exception e)\n {\n Assert\n .fail(\"Creation of 'BasicTypes' ObjectInstance could not be created. \"\n + e.getMessage());\n }\n return new ObjectInstance(o, new BasicTypes().getClass().getName());\n }",
"public AbstractShape create(ShapeType type) {\n if(type == TrominoType.I) {\n return new TrominoI();\n }\n if(type == TrominoType.J) {\n return new TrominoJ();\n }\n if(type == TrominoType.L) {\n return new TrominoL();\n }\n\n throw new IllegalArgumentException(String.format(\"Unknown how to create shape: %s.\", type.toString()));\n }",
"TypeDefinition createTypeDefinition();",
"T create();",
"T create();",
"SettingType createSettingType();",
"public T newInstance();",
"public <T extends RefObject> T createObject(String mPackage, Class<T> type) throws CreationException {\n\t\treturn this.<T>createObject(mPackage, type, new Field[] {});\n\t}",
"UserDefinedType createUserDefinedType();",
"ConceptType createConceptType();",
"public static Typematch type(String byTypeURI) {\n\t\treturn new Typematch(byTypeURI);\n\t}",
"@Override\n\tpublic <T> T construct(Class<T> type) {\n\t\treturn injector.getInstance(type);\n\t}",
"public Builder setType(Type value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n type_ = value.getNumber();\n onChanged();\n return this;\n }",
"private JavaType(String name) {\n this.name = name;\n }",
"@Override\n protected Type createNewTypeWithoutReflection(int field) {\n return null;\n }",
"public Type getType();",
"public static Typematch type(Object byValue) {\n\t\treturn new Typematch(byValue);\n\t}",
"public ReocType() \r\n {\r\n super();\r\n }",
"protected static Object createValue(Class type)\n {\n Object rv = null;\n\n if (type.isPrimitive()) {\n if (type == Boolean.TYPE)\n rv = new Boolean(false);\n \n else if (type == Byte.TYPE)\n rv = new Byte((byte)0);\n \n else if (type == Character.TYPE)\n rv = new Character((char)0);\n \n else if (type == Short.TYPE)\n rv = new Short((short)0);\n \n else if (type == Integer.TYPE)\n rv = new Integer(0);\n \n else if (type == Long.TYPE)\n rv = new Long(0);\n \n else if (type == Float.TYPE)\n rv = new Float(0);\n \n else if (type == Double.TYPE)\n rv = new Double(0);\n \n else if (type == Void.TYPE)\n rv = null;\n \n else \n throw new Error(\"unreachable\");\n }\n\n return rv;\n }",
"public static Object createObject(String className, Class<?> parameterType, Object initarg) {\n try {\n Class<?> aClass = Class.forName(className);\n return createObject(aClass, parameterType, initarg);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n return null;\n }",
"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 JavaType getType() { return _type; }",
"@Override\n public Class<?> getObjectType() {\n return this.type;\n }",
"public static StaticFactoryInsteadOfConstructors newStaticFactoryInsteadOfContructors(Object type){\n return new StaticFactoryInsteadOfConstructors();\n }",
"ObjectTypeDefinition createObjectTypeDefinition();",
"public static Serviceable getModel(AppModels type)\n {\n Serviceable tempObj;\n switch (type) {\n case KEYWORD_USER:\n tempObj = new KeywordUser();\n break;\n case QUIZ:\n tempObj = new Quiz();\n \n break;\n default:\n tempObj = null;\n break;\n }\n \n return tempObj;\n }",
"static Sport newInstance(int type) {\n switch (type) {\n case 0:\n return new Football();\n case 1:\n return new Basketball();\n default:\n return () -> System.out.println(\"Undefined sport.\");\n }\n }",
"public Object getNewInstance(String type, String tag) throws XCFException {\n\t\treturn getInstance(type, tag, false);\n\t}",
"public static UpnpHeader newInstance(Type type, String headerValue) {\n/* 168 */ UpnpHeader upnpHeader = null;\n/* 169 */ for (int i = 0; i < (type.getHeaderTypes()).length && upnpHeader == null; i++) {\n/* 170 */ Class<? extends UpnpHeader> headerClass = type.getHeaderTypes()[i];\n/* */ try {\n/* 172 */ log.finest(\"Trying to parse '\" + type + \"' with class: \" + headerClass.getSimpleName());\n/* 173 */ upnpHeader = headerClass.newInstance();\n/* 174 */ if (headerValue != null) {\n/* 175 */ upnpHeader.setString(headerValue);\n/* */ }\n/* 177 */ } catch (InvalidHeaderException ex) {\n/* 178 */ log.finest(\"Invalid header value for tested type: \" + headerClass.getSimpleName() + \" - \" + ex.getMessage());\n/* 179 */ upnpHeader = null;\n/* 180 */ } catch (Exception ex) {\n/* 181 */ log.severe(\"Error instantiating header of type '\" + type + \"' with value: \" + headerValue);\n/* 182 */ log.log(Level.SEVERE, \"Exception root cause: \", Exceptions.unwrap(ex));\n/* */ } \n/* */ } \n/* */ \n/* 186 */ return upnpHeader;\n/* */ }",
"CategoriesType createCategoriesType();",
"CategoriesType createCategoriesType();",
"public Class getType();",
"public JavaType(T o)\n {\n underlyingClass = (Class<T>) o.getClass();\n\n // Work out the basic java type based on the underlying class.\n setBasicType(underlyingClass);\n }",
"public static ObjectInstance getBasicTypesWrapperObjectInstance()\n {\n ObjectName o = null;\n try\n {\n Hashtable<String, String> properties = new Hashtable<String, String>(\n 1);\n properties.put(\"theLabel\", \"BasicTypesWrapperMBean\");\n properties.put(\"payload\", getBasicTypesWrapperMBean().getPayload()\n .toString());\n o = new ObjectName(_domain, properties);\n }\n catch (Exception e)\n {\n Assert\n .fail(\"Creation of 'BasicTypesWrapper' ObjectInstance could not be created. \"\n + e.getMessage());\n }\n return new ObjectInstance(o, new BasicTypesWrapper().getClass()\n .getName());\n }",
"public static com.nhcsys.webservices.getmessages.getmessagestypes.v1.MessageType newInstance() {\n return (com.nhcsys.webservices.getmessages.getmessagestypes.v1.MessageType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader()\n .newInstance(type,\n null);\n }"
] | [
"0.79512656",
"0.79512656",
"0.79512656",
"0.74581736",
"0.7071496",
"0.6690544",
"0.6632709",
"0.64217967",
"0.6399335",
"0.6359265",
"0.63470167",
"0.633226",
"0.63291764",
"0.6300944",
"0.6242141",
"0.62250096",
"0.62085414",
"0.6207763",
"0.6195244",
"0.6195244",
"0.61565393",
"0.6150677",
"0.61417794",
"0.6139371",
"0.6105712",
"0.6099151",
"0.6078948",
"0.6062874",
"0.60366756",
"0.603469",
"0.6019026",
"0.60079765",
"0.6001847",
"0.59989417",
"0.5977678",
"0.59723693",
"0.59698945",
"0.59644425",
"0.5955875",
"0.5950699",
"0.59478176",
"0.5926627",
"0.5911466",
"0.59080213",
"0.5905516",
"0.5901922",
"0.5901365",
"0.5857464",
"0.5850652",
"0.5828",
"0.5828",
"0.5828",
"0.5828",
"0.5828",
"0.5828",
"0.5828",
"0.5828",
"0.5828",
"0.5828",
"0.5828",
"0.57949644",
"0.5794925",
"0.5794493",
"0.57912326",
"0.57875854",
"0.57827955",
"0.5777994",
"0.57762647",
"0.57725865",
"0.57717276",
"0.57717276",
"0.5763171",
"0.5747521",
"0.57387924",
"0.5732322",
"0.5730727",
"0.57300395",
"0.57237273",
"0.5711131",
"0.57044667",
"0.5699117",
"0.5670044",
"0.5669884",
"0.5657422",
"0.5646765",
"0.56432974",
"0.56201804",
"0.5615369",
"0.5614369",
"0.5601974",
"0.5599621",
"0.5598829",
"0.5596919",
"0.5594082",
"0.5579949",
"0.5575709",
"0.5575709",
"0.55755574",
"0.5571957",
"0.55706763",
"0.55700254"
] | 0.0 | -1 |
Returns a new object of class 'Type Attr'. | QuoteTypeAttr createQuoteTypeAttr(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"TAttribute createTAttribute();",
"public Class getAttributeType();",
"Attribute createAttribute();",
"Attribute createAttribute();",
"ShipmentTypeAttr createShipmentTypeAttr();",
"private Attribute createAttribute() {\n\t\t\tAttribute att = AttributeFactory.createAttribute(getName(), getValueType());\n\t\t\tatt.getAnnotations().clear();\n\t\t\tatt.getAnnotations().putAll(getAnnotations());\n\t\t\tattribute = att;\n\t\t\treturn att;\n\t\t}",
"Type createType();",
"Type createType();",
"Type createType();",
"public org.python.types.Type __new__(org.python.types.Type cls);",
"DatatypeType createDatatypeType();",
"public Type() {\n super();\n }",
"public static AttributeType create( AttributeType documentAttributeType )\n {\n _dao.insert( documentAttributeType );\n\n return documentAttributeType;\n }",
"public com.vodafone.global.er.decoupling.binding.request.UsageAttributesType createUsageAttributesType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.UsageAttributesTypeImpl();\n }",
"public static DLNAAttribute newInstance(Type type, String attributeValue, String contentFormat) {\n/* 125 */ DLNAAttribute attr = null;\n/* 126 */ for (int i = 0; i < (type.getAttributeTypes()).length && attr == null; i++) {\n/* 127 */ Class<? extends DLNAAttribute> attributeClass = type.getAttributeTypes()[i];\n/* */ try {\n/* 129 */ log.finest(\"Trying to parse DLNA '\" + type + \"' with class: \" + attributeClass.getSimpleName());\n/* 130 */ attr = attributeClass.newInstance();\n/* 131 */ if (attributeValue != null) {\n/* 132 */ attr.setString(attributeValue, contentFormat);\n/* */ }\n/* 134 */ } catch (InvalidDLNAProtocolAttributeException ex) {\n/* 135 */ log.finest(\"Invalid DLNA attribute value for tested type: \" + attributeClass.getSimpleName() + \" - \" + ex.getMessage());\n/* 136 */ attr = null;\n/* 137 */ } catch (Exception ex) {\n/* 138 */ log.severe(\"Error instantiating DLNA attribute of type '\" + type + \"' with value: \" + attributeValue);\n/* 139 */ log.log(Level.SEVERE, \"Exception root cause: \", Exceptions.unwrap(ex));\n/* */ } \n/* */ } \n/* 142 */ return attr;\n/* */ }",
"Type attribType(JCTree tree, Env<AttrContext> env) {\n \tDEBUG.P(this,\"attribType(2)\");\n Type result = attribTree(tree, env, TYP, Type.noType);\n \n //DEBUG.P(\"result=\"+result);\n //DEBUG.P(\"result.tag=\"+TypeTags.toString(result.tag));\n DEBUG.P(0,this,\"attribType(2)\");\n return result;\n }",
"public IAttributeType<?> getAttributeType(String name);",
"public <T> Link addAttributeType(IAttributeType<T> type);",
"public Attr() {\n\t\t\tsuper();\n\t\t}",
"public Attribute(String name, Type type, int ID, int length){\r\n\t\tthis.name = name;\r\n\t\tthis.type = type;\r\n\t\tthis.ID = ID;\r\n\t\tthis.length = length;\r\n\t\tvalues = new ArrayList();\r\n\t}",
"DatatypesType createDatatypesType();",
"public com.vodafone.global.er.decoupling.binding.request.UsageAttributesType.AccessControlAttributesType createUsageAttributesTypeAccessControlAttributesType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.UsageAttributesTypeImpl.AccessControlAttributesTypeImpl();\n }",
"Type() {\n }",
"FieldType createFieldType();",
"public AttributeType(AttributeCategory category) {\n setCategory(category);\n }",
"DataType createDataType();",
"Atributo createAtributo();",
"private AgAttribute resolveNew() {\n\n return new DefaultAttribute(name,\n requiredProperty(\"javaType\", javaType),\n\n // using the defaults from @AgAttribute annotation\n propertyOrDefault(readable, true),\n propertyOrDefault(writable, true),\n\n requiredProperty(\"dataReader\", dataReader));\n }",
"public static <T extends @TestAnnotation2 Number & Comparable> TypeInstance createTypeVariable() {\n AnnotatedType referencedTypeVariable = getAnnotatedType();\n TypeInstance typeInstance = Diamond.types().from(referencedTypeVariable);\n return typeInstance;\n }",
"public PersonAttributeType getAttributeType() {\n return attributeType;\n }",
"StructureType createStructureType();",
"private String resolveAttrType(String aType){\n\t\tif(aType == \"int\" || aType == \"Int\") return \"int\";\n\t\telse if(aType == \"String\") return \"String\";\n\t\telse if(aType == \"univ\") assertMessage(\"TODO: Map univ with Java type\");\n\t\telse if(aType == \"none\") assertMessage(\"TODO: Map none with Java type\");\n\t\telse if(aType.contains(\"seq\")) assertMessage(\"TODO: Map seqInt with Java type\");\n\n\t\treturn aType;\n\t}",
"private Attr newAttr(String tipo, String valor) {\n/* 341 */ Attr atrib = this.pagHTML.createAttribute(tipo);\n/* 342 */ atrib.setValue(valor);\n/* 343 */ return atrib;\n/* */ }",
"NamedType createNamedType();",
"public Type(String name) {\n\t\tsuper(name);\n\t\tsetSize();\n\t}",
"TypeDef createTypeDef();",
"PropertyType createPropertyType();",
"public void setAttributeType(final String attributeType);",
"public short getAttributeType() {\n return attributeType;\n }",
"public Type() {\n\t\tsetSize();\n\t}",
"public void createNewAttribute(String attributeName, String attributeType){\n attributeList.add(new Attribute(attributeName, attributeType));\n }",
"public String getType () { return getAttributeOrDefault(ATTNAMECOMMONPREFIX + ATTNAMESUFFIX_TYPE , \"\"); }",
"@Function Attr createAttribute(String name);",
"Tulip getType() { return new Tulip(); }",
"ConceptType createConceptType();",
"public ReocType() \r\n {\r\n super();\r\n }",
"public Class<? extends AttributeDescription> getDataType();",
"private Class<?> resolveBuiltInAttrType(String anAlloyAttrType){\n\t\tif(anAlloyAttrType == \"int\" || anAlloyAttrType == \"Int\") return int.class;\n\t\telse if(anAlloyAttrType == \"String\") return String.class;\n\t\telse if(anAlloyAttrType == \"univ\") assertMessage(\"TODO: Map univ with Java type\");\n\t\telse if(anAlloyAttrType == \"none\") assertMessage(\"TODO: Map none with Java type\");\n\t\telse if(anAlloyAttrType.contains(\"seq\")) assertMessage(\"TODO: Map seqInt with Java type\");\n\t\t\n\t\treturn null;\n\t}",
"UserDefinedType createUserDefinedType();",
"public LPDMODOMAttribute(String name, String value, int type) {\n super(name, value, type);\n }",
"TypeDecl createTypeDecl();",
"public static AnnotationType createEntity() {\n return new AnnotationType()\n .name(DEFAULT_NAME)\n .label(DEFAULT_LABEL)\n .description(DEFAULT_DESCRIPTION)\n .emotional(DEFAULT_EMOTIONAL)\n .weight(DEFAULT_WEIGHT)\n .color(DEFAULT_COLOR)\n .projectId(DEFAULT_PROJECT_ID);\n }",
"FieldType newFieldType(ValueType valueType, QName name, Scope scope);",
"public com.vodafone.global.er.decoupling.binding.request.RatingAttributesType createRatingAttributesType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.RatingAttributesTypeImpl();\n }",
"private void TCM__Object_clone__attributeType(final AttributeType attributeType) {\n final String attributeName = \"test\";\n final String attributeValue = \"value\";\n\n final Attribute attribute = new Attribute(attributeName, attributeValue, attributeType);\n final Attribute clonedAttribute = attribute.clone();\n\n assertTrue(\"incorrect name in clone\", clonedAttribute.getName().equals(attributeName));\n assertTrue(\"incorrect value in clone\", clonedAttribute.getValue().equals(attributeValue));\n assertEquals(\"incoorect attribute type in clone\", clonedAttribute.getAttributeType(), attributeType);\n }",
"private Type type()\r\n {\r\n Type t = new Type();\r\n\r\n t.ident = nextToken;\r\n t.type = basicType();\r\n if (t.type == Keyword.NONESY)\r\n {\r\n unresolved.add(t.ident.string = qualident());\r\n }\r\n else\r\n t.ident.string = null;\r\n\r\n t.dim = bracketsOpt();\r\n\r\n return t;\r\n }",
"public AnnotatedTypeBuilder() {\n\t\ttypeAnnotations = new AnnotationBuilder();\n\t\tconstructors = new HashMap<Constructor<?>, AnnotationBuilder>();\n\t\tconstructorParameters = new HashMap<Constructor<?>, Map<Integer, AnnotationBuilder>>();\n\t\tconstructorParameterTypes = new HashMap<Constructor<?>, Map<Integer, Type>>();\n\t\tfields = new HashMap<Field, AnnotationBuilder>();\n\t\tfieldTypes = new HashMap<Field, Type>();\n\t\tmethods = new HashMap<Method, AnnotationBuilder>();\n\t\tmethodParameters = new HashMap<Method, Map<Integer, AnnotationBuilder>>();\n\t\tmethodParameterTypes = new HashMap<Method, Map<Integer, Type>>();\n\t}",
"public Attribute( Element eleAttr ) {\n strClass = eleAttr.getAttributeValue( \"class\" );\n strAttrName = eleAttr.getAttributeValue( \"name\" );\n strName = Utils.formatAttrName( strAttrName );\n String strDecimal = eleAttr.getAttributeValue( \"decimal\" );\n if( strDecimal != null && strDecimal.length() > 0 ) {\n bDecimal = Byte.parseByte( strDecimal );\n }\n String strLength = eleAttr.getAttributeValue( \"length\" );\n if( strLength != null && strLength.length() > 0 ) {\n lLength = Long.parseLong( strLength );\n }\n strJavaClass = javaClass();\n bID = strClass.equals( \"com.space.core.model.feature.attr.IdType\" );\n bNullable = !Boolean.parseBoolean( eleAttr.getAttributeValue( \"mandatory\" ) );\n String strIndex = eleAttr.getAttributeValue( \"index\" );\n if( strIndex != null ) {\n if( strIndex.equals( \"unique\" ) ) {\n bIndexType = INDEX_UNIQUE;\n } else if( strIndex.equals( \"duplicate\" ) ) {\n bIndexType = INDEX_DUPLICATE;\n }\n }\n }",
"static Attribute createAttribute(String name) {\n\t\treturn createAttribute(name, new IntegerFieldWrapper());\n\t}",
"<C> TypeExp<C> createTypeExp();",
"CapabilitiesType createCapabilitiesType();",
"TypeLiteralExp createTypeLiteralExp();",
"static Attribute createAttribute(String name, Field field) {\n\t\tAttribute attribute = new Attribute(name, field);\n\t\tattribute.setKind(Attribute.NONE);\n\t\tattribute.setPreferenceType(Attribute.GAIN);\n\t\treturn attribute;\n\t}",
"public void setType (String type) { n.setAttribute(ATTNAMECOMMONPREFIX + ATTNAMESUFFIX_TYPE , type); }",
"public static NewExpression new_(Class type) { throw Extensions.todo(); }",
"MappedDatatype createMappedDatatype();",
"abstract public Type getType();",
"public AttributeInfo getAttributeInfo() {\r\n\r\n String newAttrName = this.nameTextField.getText();\r\n\r\n if (newAttrName == null || newAttrName.length() == 0) {\r\n newAttrName = \"NEW_ATTRIBUTE\";\r\n }\r\n\r\n AttributeInfo attrInfo = new AttributeInfo((AttributeType) this.typeDropDown.getSelectedItem(), newAttrName);\r\n\r\n if (this.needDefaultValue) {\r\n attrInfo.setNullValue(this.getDefaultValue());\r\n }\r\n\r\n return attrInfo;\r\n }",
"public Attribute(final String newName, final long newAttributeID,\r\n\t\t\tfinal long newRelationID, final Attribute.Type newType, \r\n\t\t\tfinal char newNullable, final int newDistinct, \r\n\t\t\tfinal int newLength) {\r\n\t\t\r\n\t\t//Assign the things to the new attribute from the constructor\r\n\t\tthis.name = newName;\r\n\t\tthis.ID = newAttributeID;\r\n\t\tthis.parent = newRelationID;\r\n\t\tthis.type = newType;\r\n\t\tthis.nullable = (newNullable == 't');\r\n\t\tthis.distinct = newDistinct;\r\n\t\tthis.length = newLength;\r\n\t\tvalues = new ArrayList();\r\n\t}",
"FieldsType createFieldsType();",
"TypeDefinition createTypeDefinition();",
"BType createBType();",
"public short createAttribute(AttributeType type, String name, boolean indexed, EnumSet<AttributeFlags> flags) {\n short id = nextAttributeId++;\n attributes.add(new ResidentAttributeRecord(type, name, id, indexed, flags));\n Collections.sort(attributes);\n return id;\n }",
"final public Attr clone() {\r\n\t\t\tif(Vector == null)\r\n\t\t\t\treturn new Attr(Name, Value, null);\r\n\t\t\telse if(Object == null)\r\n\t\t\t\treturn new Attr(Name, Value, Vector.clone());\r\n\t\t\telse\r\n\t\t\t\treturn new Attr(Name, Value, Vector.clone(), Object);\r\n\t\t}",
"DOMType() {\n // Constructs an empty type node\n }",
"SettingType createSettingType();",
"public Type type(String name);",
"<U extends T> U create(String name, Class<U> type) throws InvalidUserDataException;",
"abstract public Type type();",
"FieldType newFieldType(String id, ValueType valueType, QName name, Scope scope);",
"protected JvmParameterizedTypeReference newTypeRef(EObject context, Class<?> type) {\n\t\tTypeReferences typeRefs = getTypeReferences();\n\t\treturn newTypeRef(context, type.getName(), typeRefs.getTypeForName(type, context));\n\t}",
"private void TCM__Object_clone__Namespace_attributeType(final AttributeType attributeType) {\n final String prefix = \"prefx\";\n final String uri = \"http://some.other.place\";\n\n final Namespace namespace = Namespace.getNamespace(prefix, uri);\n\n final String attributeName = \"test\";\n final String attributeValue = \"value\";\n\n final Attribute attribute = new Attribute(attributeName, attributeValue, attributeType, namespace);\n final Attribute clonedAttribute = attribute.clone();\n\n assertTrue(\"incorrect name in clone\", clonedAttribute.getName().equals(attributeName));\n assertTrue(\"incorrect value in clone\", clonedAttribute.getValue().equals(attributeValue));\n assertEquals(\"incoorect attribute type in clone\", clonedAttribute.getAttributeType(), attributeType);\n\n assertTrue(\"incorrect prefix in clone\", clonedAttribute.getNamespacePrefix().equals(prefix));\n assertTrue(\"incorrect qualified name in clone\", clonedAttribute.getQualifiedName().equals(prefix + ':' + attributeName));\n assertTrue(\"incorrect Namespace URI in clone\", clonedAttribute.getNamespaceURI().equals(uri));\n }",
"public static Type stringToType(final String newType) {\r\n\t\t\r\n\t\tType returnType = Type.Undeclared;\r\n\t\t\r\n\t\tif (newType.toLowerCase().equalsIgnoreCase(\"int\")) {\r\n\t\t\treturnType = Attribute.Type.Int;\r\n\t\t} else if (newType.toLowerCase().equalsIgnoreCase(\"long\")) {\r\n\t\t\treturnType = Attribute.Type.Long;\r\n\t\t} else if (newType.toLowerCase().equalsIgnoreCase(\"boolean\") \r\n\t\t\t\t|| newType.toLowerCase().equalsIgnoreCase(\"bool\")) {\r\n\t\t\treturnType = Attribute.Type.Boolean;\r\n\t\t} else if (newType.toLowerCase().toLowerCase().startsWith(\"char\") \r\n\t\t\t\t|| newType.toLowerCase().toLowerCase().startsWith(\"character\")) {\r\n\t\t\treturnType = Attribute.Type.Char;\r\n\t\t} else if (newType.toLowerCase().equalsIgnoreCase(\"float\")) {\r\n\t\t\treturnType = Attribute.Type.Float;\r\n\t\t} else if (newType.toLowerCase().equalsIgnoreCase(\"double\")) {\r\n\t\t\treturnType = Attribute.Type.Double;\r\n\t\t} else if (newType.toLowerCase().equalsIgnoreCase(\"datetime\")) {\r\n\t\t\treturnType = Attribute.Type.DateTime;\r\n\t\t} else {\r\n\t\t\treturnType = Attribute.Type.Undeclared;\r\n\t\t}\t\r\n\t\treturn returnType;\r\n\t}",
"PermissionType createPermissionType();",
"CategoryType createCategoryType();",
"public com.vodafone.global.er.decoupling.binding.request.UsageCompleteType.UsageCompleteAttributesType createUsageCompleteTypeUsageCompleteAttributesType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.UsageCompleteTypeImpl.UsageCompleteAttributesTypeImpl();\n }",
"public abstract Type getType();",
"protected Attribute createAttribute(Field field) {\n return pkg.add(new Attribute(field));\n }",
"final DynamoDBAttributeType attributeType() {\n return this.attributeType;\n }",
"public abstract DataType<T> newInstance();",
"public void setAttributeType(PersonAttributeType attributeType) {\n this.attributeType = attributeType;\n }",
"public static AtomType CreateAtomType(String Name) {\n\t\tAtomType atomtype = behavFactory.createAtomType();\n\t\tatomtype.setName(Name) ;\n\t\tatomtype.setBehavior(behavFactory.createPetriNet()) ; \n\t\treturn atomtype;\n\t}",
"DomainType createDomainType();",
"private Type mapType(TypeResponse typeResponse) {\n return new Type(typeResponse.getType(), typeResponse.getId());\n }",
"public com.vodafone.global.er.decoupling.binding.request.PurchaseAttributesType createPurchaseAttributesType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.PurchaseAttributesTypeImpl();\n }",
"public Attribute method_4098(AttributeKey var1) {\n return new class_57(this);\n }",
"protected abstract void createAttributes();",
"private NodeTypeHolder(Attributes a)\r\n\t{\r\n\t this.attributes = a;\r\n\t}",
"Type type();",
"Type type();"
] | [
"0.70403016",
"0.67557985",
"0.6647494",
"0.6647494",
"0.65978765",
"0.64448947",
"0.6438866",
"0.6438866",
"0.6438866",
"0.62768286",
"0.6187754",
"0.6109433",
"0.6096274",
"0.6049019",
"0.6045471",
"0.60442823",
"0.6033523",
"0.60136616",
"0.5992693",
"0.5960211",
"0.5934446",
"0.59098315",
"0.5907596",
"0.5907466",
"0.5893685",
"0.58865213",
"0.5874051",
"0.5861442",
"0.5859597",
"0.5802252",
"0.57852185",
"0.5783447",
"0.5780658",
"0.5716793",
"0.5704488",
"0.5701626",
"0.5697134",
"0.5686735",
"0.56826705",
"0.564828",
"0.5621995",
"0.5610474",
"0.55996186",
"0.5594675",
"0.55870855",
"0.5570957",
"0.5557804",
"0.5555048",
"0.5534088",
"0.55338866",
"0.55320436",
"0.55292255",
"0.552354",
"0.55137676",
"0.5505237",
"0.5483527",
"0.54739285",
"0.54729545",
"0.5465137",
"0.54595405",
"0.5450532",
"0.5449132",
"0.5444548",
"0.54384667",
"0.54337",
"0.5431906",
"0.54185456",
"0.5415035",
"0.5413482",
"0.5401369",
"0.5391368",
"0.5391187",
"0.5382873",
"0.5373851",
"0.53729814",
"0.53586316",
"0.53582776",
"0.53534883",
"0.5349888",
"0.53464335",
"0.53332615",
"0.532728",
"0.5323566",
"0.5323014",
"0.5317281",
"0.5311645",
"0.5305315",
"0.5304939",
"0.5299875",
"0.5298525",
"0.5294017",
"0.52840173",
"0.52552325",
"0.5254632",
"0.52531123",
"0.5249098",
"0.5230003",
"0.5220069",
"0.52143985",
"0.52143985"
] | 0.63252425 | 9 |
Returns a new object of class 'Work Effort'. | QuoteWorkEffort createQuoteWorkEffort(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public WorkClass() throws Exception {\n index = -1;\n }",
"boolean createWork(Work work);",
"public interface WorkfileInfoInterface {\n\n /**\n * Get the short workfile name (the final segment of the full workfile name).\n *\n * @return the short workfile name.\n */\n String getShortWorkfileName();\n\n /**\n * Get the full workfile name.\n *\n * @return the full workfile name.\n */\n String getFullWorkfileName();\n\n /**\n * Get the size of the workfile.\n * @return the size of the workfile.\n */\n long getWorkfileSize();\n\n /**\n * Get the last change date for the workfile.\n * @return the last time the workfile changed.\n */\n Date getWorkfileLastChangedDate();\n\n /**\n * Get the File object associated with the workfile.\n * @return the File object associated with the workfile.\n */\n File getWorkfile();\n\n /**\n * Get the project name.\n * @return the project name.\n */\n String getProjectName();\n\n /**\n * Get the branch name.\n * @return the branch name.\n */\n String getBranchName();\n\n /**\n * Does the workfile exist.\n *\n * @return true if the workfile exists; false otherwise.\n */\n boolean getWorkfileExists();\n\n /**\n * Get the time (in seconds past the epoch) when the workfile was fetched. This represents the last 'get' or 'checkout'\n * operation for the given workfile.\n * @return a long representation of the last fetch date.\n */\n long getFetchedDate();\n\n /**\n * Set the fetched date.\n * @param time the time (in seconds past the epoch) when the workfile was last fetched.\n */\n void setFetchedDate(long time);\n\n /**\n * Get the revision string associated with the workfile.\n * @return the revision string associated with the workfile.\n */\n String getWorkfileRevisionString();\n\n /**\n * Set the revision string associated with the workfile.\n * @param revisionString the revision string to associate with this workfile.\n */\n void setWorkfileRevisionString(String revisionString);\n\n /**\n * Set the archive info to associate with this workfile.\n * @param archInfo the archive information to associate with this workfile.\n */\n void setArchiveInfo(ArchiveInfoInterface archInfo);\n\n /**\n * Get the archive info associated with this workfile.\n * @return the archive info associated with this workfile.\n */\n ArchiveInfoInterface getArchiveInfo();\n\n /**\n * Return true if this is a binary file.\n *\n * @return true if this is a binary file; false otherwise.\n */\n boolean getBinaryFileAttribute();\n\n /**\n * Set the binary flag attribute for this workfile info.\n * @param flag the binary flag attribute for this workfile info.\n */\n void setBinaryFileAttribute(boolean flag);\n}",
"public WorkunitInfo(ECLWorkunit base)\n {\n copy(base);\n }",
"public interface Work {\n}",
"public WorkObject getWorkObject()\n {\n throw new UnsupportedOperationException(\n \"This method is not supported. Use getLevelObjectType() and getLevelObjectId()\");\n }",
"Work getWorkByFolio(int folio);",
"WorkingTask getWorkingTask();",
"public WorkspacePatch() {\n }",
"void allocateWorker(Work work);",
"public CDLElement newSubCDLElementObject(Element elem) {\n\t\tCDLElement cdlElement = null;\n\t\tString elemName = elem.getName();\n \t\tif (elemName.equals(\"workunit\")) {\t\t\t\n\t\t\tcdlElement = CDLFactory.eINSTANCE.createExceptionWorkUnit();\n\t\t\tgetExceptionWorkUnits().add((ExceptionWorkUnit)cdlElement);\n\t\t} \n\t\treturn cdlElement;\n\t}",
"public ExtendedWorkObject(IElement element) {\r\n\t\tthis.element = element;\r\n\t\tthis.element.setWorkObject(this);\r\n\t}",
"Implementation createImplementation();",
"List<Work> getAllWorks();",
"public static WorkTimeEmployee valueOf(Employee employee, List<CustomWorkTime> workTimes) {\n WorkTimeEmployee workTimeEmployee = new WorkTimeEmployee();\n workTimeEmployee.name = employee.fullName();\n workTimeEmployee.workTimes = CustomWorkTime.reduceAndSortWorktimes(workTimes);\n return workTimeEmployee;\n }",
"public Project(String name, String nick, Calendar startDate, int duration, Teacher mainTeacher, ArrayList<Teacher> teachers, ArrayList<Scholar> scholars, ArrayList<Task> tasks) {\n Calendar endDate = (Calendar) startDate.clone();\n endDate.add(Calendar.MONTH, duration);\n this.name = name;\n this.nick = nick;\n this.startDate = startDate;\n this.estimatedEnd = endDate;\n this.mainTeacher = mainTeacher;\n this.teachers = teachers;\n this.scholars = scholars;\n this.tasks = tasks;\n this.finished = false;\n this.endDate = null;\n }",
"public Portfolio getPortfolio() {\n\t\tPortfolio portfolio = new Portfolio();\n\t\tportfolio.setTitle(\"Exercise 7 portfolio\");\n\t\tportfolio.updateBalance(10000);\n\t\t\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.set(2014, Calendar.DECEMBER, 15);\n\t\t\n\t\tportfolio.buyStock(new Stock(\"PIH\", 10.0f, 8.5f, cal.getTime()), 20);\n\t\tportfolio.buyStock(new Stock(\"AAL\", 30.0f, 25.5f, cal.getTime()), 30);\n\t\tportfolio.buyStock(new Stock(\"CAAS\", 20.0f, 15.5f, cal.getTime()), 40);\n\t\t\n\t\tportfolio.sellStock(\"AAL\", -1);\n\t\tportfolio.removeStock(\"CAAS\");\n\t\treturn portfolio;\n\t}",
"public Project(String name, String nick, Calendar startDate, int duration, Teacher mainTeacher) {\n Calendar endDate = (Calendar) startDate.clone();\n endDate.add(Calendar.MONTH, duration);\n this.name = name;\n this.nick = nick;\n this.startDate = startDate;\n this.estimatedEnd = endDate;\n this.mainTeacher = mainTeacher;\n this.endDate = null;\n this.teachers = new ArrayList<>();\n this.scholars = new ArrayList<>();\n this.tasks = new ArrayList<>();\n this.finished = false;\n }",
"public Project(String name, String nick, Calendar startDate, int duration, Calendar finishedDate, Teacher mainTeacher, ArrayList<Teacher> teachers, ArrayList<Scholar> scholars, ArrayList<Task> tasks) {\n Calendar endDate = (Calendar) startDate.clone();\n endDate.add(Calendar.MONTH, duration);\n this.name = name;\n this.nick = nick;\n this.startDate = startDate;\n this.estimatedEnd = endDate;\n this.mainTeacher = mainTeacher;\n this.teachers = teachers;\n this.scholars = scholars;\n this.tasks = tasks;\n this.finished = true;\n this.endDate = finishedDate;\n }",
"public ArrayList<Work> getWork(){\r\n\t\treturn work;\t\t\r\n\t}",
"public WorkoutDetails() {\n // Required empty public constructor\n }",
"public LabWork(String name, Coordinates coordinates, int weight, float minimalpoint,\n HairColor type, Difficulty difficulty, Person person){\n this.name = name;\n this.coordinates = coordinates;\n this.weight = weight;\n this.minimalpoint = minimalpoint;\n this.type = type;\n this.difficulty = difficulty;\n this.person = person;\n creationDate = new Date();\n }",
"public Duration getWork()\r\n {\r\n return (m_work);\r\n }",
"public Workload getNewInstanceOfThisWorkload() {\n\t\t\n\t\tWorkload workload = new Workload(numOfSlotsNeededToSendPacket);\n Random rand = new Random(randomSeed);\n\t\t\n List<Vertex> vertices = topology.getVerticesWithOneNeighbor();\n Vertex gateway = topology.getGateway();\n \tfor(Vertex vertex : vertices) {\n \t\tif(vertex != gateway) {\n \t\t\tif(flowClasses.length == 1) {\n \t\t\tif(randomFlowPhase) {\n \t\t\t\tworkload.newPeriodicFlow(vertex, gateway, rand.nextInt(flowClasses[0]), flowClasses[0], flowClasses[0]);\n \t\t\t} else {\n \t\t\t\tworkload.newPeriodicFlow(vertex, gateway, 0, flowClasses[0], flowClasses[0]);\n \t\t\t}\n \t\t} else {\n \t\t\tint pickedFlowClass = rand.nextInt(flowClasses.length);\n \t\t\tif(randomFlowPhase) {\n \t\t\t\tworkload.newPeriodicFlow(vertex, gateway, rand.nextInt(flowClasses[pickedFlowClass]), flowClasses[pickedFlowClass], flowClasses[pickedFlowClass]);\n \t\t\t} else {\n \t\t\t\tworkload.newPeriodicFlow(vertex, gateway, 0, flowClasses[pickedFlowClass], flowClasses[pickedFlowClass]);\n \t\t\t}\n \t\t}\n \t\t}\n \t}\n \tworkload.assignPriorities();\n \t\n \treturn workload;\n\t}",
"public TechnicalLead(String name){\n super(name);\n baseSalary = super.getBaseSalary() * 1.3; // baseSalary for businessLead x 1.3 baseSalary of technical group\n this.maxHeadCount = 4; // set max employee to 4\n this.curHeadCount = 0;\n employee = new SoftwareEngineer[this.maxHeadCount];\n }",
"public Contribution createContribution()\n {\n return new Contribution();\n }",
"public LabWork(String name, Coordinates coordinates, int weight, float minimalpoint,\n Difficulty difficulty){\n this.name = name;\n this.coordinates = coordinates;\n this.weight = weight;\n this.minimalpoint = minimalpoint;\n this.difficulty = difficulty;\n creationDate = new Date();\n }",
"@Override\n public Object clone() {\n CostAndEnforcerJob task;\n try {\n task = (CostAndEnforcerJob) super.clone();\n } catch (CloneNotSupportedException ignored) {\n return null;\n }\n return task;\n }",
"Reproducible newInstance();",
"LectureProject createLectureProject();",
"@Override\r\n\tpublic void downloadHomework() {\n\t\t\r\n\t}",
"public WorkDataFile()\n\t{\n\t\tsuper();\n\t}",
"@Override\n public AbstractRelic makeCopy() {\n return new Compendium();\n }",
"private static Person localCreatePopWOnePerson(Scenario scenario, Link link, ActivityFacility facility1, double workActEndTime) {\n\n\t\tPopulation population = scenario.getPopulation();\n\n\t\tPerson person = population.getFactory().createPerson(Id.create(1, Person.class));\n\t\tpopulation.addPerson(person);\n\n\t\tPlanImpl plan = (PlanImpl) population.getFactory().createPlan() ;\n\t\tperson.addPlan(plan) ;\n\n\t\t{\n\t\t\tActivity act = population.getFactory().createActivityFromCoord(\"home\", new CoordImpl(0,0)) ;\n\t\t\t//\t\tact.setLinkId(link.getId());\n\t\t\tact.setEndTime(8.0 * 3600);\n\t\t\tplan.addActivity(act) ;\n\t\t}\n\t\tplan.addLeg(population.getFactory().createLeg(TransportMode.car)) ;\n\t\t{\n\t\t\tActivity act = population.getFactory().createActivityFromCoord(\"work\", scenario.getActivityFacilities().getFacilities().get(facility1.getId()).getCoord() ) ;\n\t\t\tact.setEndTime(workActEndTime);\n\t\t\t((ActivityImpl)act).setFacilityId(facility1.getId());\n\t\t\tplan.addActivity(act) ;\n\t\t}\n\t\tplan.createAndAddLeg(TransportMode.car);\n\t\t{\n\t\t\t//\t\tact = plan.createAndAddActivity(\"home\", new CoordImpl(0, 0));\n\t\t\t//\t\tact.setLinkId(link.getId());\n\t\t\tActivity act = population.getFactory().createActivityFromCoord(\"home\", new CoordImpl(0,0)) ;\n\t\t\tplan.addActivity(act) ;\n\t\t}\n\n\t\treturn person;\n\t}",
"public Portfolio(){}",
"protected WorkingCopyOwner newWorkingCopyOwner(final IProblemRequestor problemRequestor) {\n return new WorkingCopyOwner() {\n\n public IProblemRequestor getProblemRequestor(ICompilationUnit unit) {\n return problemRequestor;\n }\n };\n }",
"TIAssignment createTIAssignment();",
"public java.lang.Object newImplementation(Class newImplementation) \n {\n if (disableUpdates) return this;\n if (!(newImplementation == this.getClass()) && !newImplementation.isInterface())\n RuntimeItemManager.getRuntimeItemManager().implementationChanged(getImplementedInterface(), newImplementation);\n return _getCurrentSelf();\n }",
"protected BrowserTestObject iE() \n\t{\n\t\treturn new BrowserTestObject(\n getMappedTestObject(\"iE\"));\n\t}",
"protected BrowserTestObject iE() \n\t{\n\t\treturn new BrowserTestObject(\n getMappedTestObject(\"iE\"));\n\t}",
"public HourlyWorker () {\r\n super ();\r\n hours = -1;\r\n hourlyRate = -1;\r\n salary = -1;\r\n }",
"private Listing getTestListing() {\n Listing testListing = new Listing();\n testListing.setListingDateTime(getTestListingDateTimeStamp());\n testListing.setEpisode(getTestEpisode());\n testListing.setChannel(testChannel);\n return testListing;\n }",
"private void copy(ECLWorkunit base)\n {\n if (base == null)\n {\n return;\n }\n this.eclWorkunit=base;\n this.setAccessFlag(base.getAccessFlag());\n this.setAction(base.getAction());\n this.setActionEx(base.getActionEx());\n this.setActive(base.getActive());\n this.setAlertCount(base.getAlertCount());\n this.setAllowedClusters(base.getAllowedClusters());\n this.setApplicationValueCount(base.getApplicationValueCount());\n if (base.getApplicationValues() != null)\n {\n this.applicationValues=new ArrayList<ApplicationValueInfo>();\n for (int i=0; i < base.getApplicationValues().length;i++) {\n applicationValues.add(new ApplicationValueInfo(base.getApplicationValues()[i]));\n }\n }\n this.setApplicationValuesDesc(base.getApplicationValuesDesc());\n this.setArchived(base.getArchived());\n this.setCluster(base.getCluster());\n this.setClusterFlag(base.getClusterFlag());\n this.setDateTimeScheduled(base.getDateTimeScheduled());\n this.setDebugValueCount(base.getDebugValueCount());\n this.setDebugValues(base.getDebugValues());\n this.setDebugValuesDesc(base.getDebugValuesDesc());\n this.setDescription(base.getDescription()); \n this.setErrorCount(base.getErrorCount());\n this.setEventSchedule(base.getEventSchedule());\n if (base.getExceptions() != null ) {\n this.exceptions=new ArrayList<ECLExceptionInfo>();\n for (int i=0; i < base.getExceptions().length;i++) {\n exceptions.add(new ECLExceptionInfo(base.getExceptions()[i]));\n }\n }\n this.setGraphCount(base.getGraphCount());\n this.setGraphs(base.getGraphs());\n this.setGraphsDesc(base.getGraphsDesc());\n this.setHasArchiveQuery(base.getHasArchiveQuery());\n this.setHasDebugValue(base.getHasDebugValue());\n this.setHelpers(base.getHelpers());\n this.setHelpersDesc(base.getHelpersDesc());\n this.setInfoCount(base.getInfoCount());\n this.setIsPausing(base.getIsPausing());\n this.setJobname(base.getJobname());\n this.setOwner(base.getOwner());\n this.setPriorityClass(base.getPriorityClass());\n this.setPriorityLevel(base.getPriorityLevel());\n this.setQuery(base.getQuery());\n this.setQueue(base.getQueue());\n this.setResourceURLCount(base.getResourceURLCount());\n this.setResourceURLs(base.getResourceURLs());\n this.setResultCount(base.getResultCount());\n this.setResultLimit(base.getResultLimit());\n if (base.getResults() != null)\n {\n this.eclResults=new ArrayList<ECLResultInfo>();\n for (int i=0; i < base.getResults().length;i++) {\n eclResults.add(new ECLResultInfo(base.getResults()[i]));\n }\n }\n this.setResultsDesc(base.getResultsDesc());\n this.setRoxieCluster(base.getRoxieCluster());\n this.setScope(base.getScope());\n this.setSnapshot(base.getSnapshot());\n this.setSourceFileCount(base.getSourceFileCount());\n this.setSourceFiles(base.getSourceFiles());\n this.setSourceFilesDesc(base.getSourceFilesDesc());\n this.setState(base.getState());\n this.setStateEx(base.getStateEx());\n this.setStateID(base.getStateID());\n this.setTimerCount(base.getTimerCount());\n this.setTimersDesc(base.getTimersDesc());\n this.setTimingData(base.getTimingData());\n this.setTotalClusterTime(base.getTotalClusterTime());\n this.setVariableCount(base.getVariableCount());\n if (base.getVariables() != null)\n {\n this.variables=new ArrayList<ECLResultInfo>();\n for (int i=0; i < base.getVariables().length;i++) {\n variables.add(new ECLResultInfo(base.getVariables()[i]));\n }\n }\n this.setThorLCR(base.getThorLCR());\n this.setThorLogList(base.getThorLogList()); \n this.setVariablesDesc(base.getVariablesDesc());\n this.setWarningCount(base.getWarningCount());\n this.setWorkflowCount(base.getWorkflowCount());\n this.setWorkflows(base.getWorkflows());\n this.setWorkflowsDesc(base.getWorkflowsDesc());\n this.setWuid(base.getWuid());\n this.setXmlParams(base.getXmlParams());\n\n }",
"public final static WMWorkItem fromWorkItem( IWorkItem workItem )\r\n {\r\n return new WMWorkItemImpl( workItem.getName(), workItem.getWorkItemId(),\r\n workItem.getActivityInstanceId(),\r\n workItem.getActivityDefinitionId(), workItem.getProcessInstanceId(),\r\n workItem.getProcessDefinitionId().getId(),\r\n WMWorkItemState.fromInt( workItem.getState() ),\r\n workItem.getPriority(),\r\n new WMParticipantImpl( workItem.getParticipant() ),\r\n workItem.getPerformer(), workItem.getCompletedDate(),\r\n workItem.getDueDate(), workItem.getStartedDate() );\r\n }",
"OperationalizingSoftgoal createOperationalizingSoftgoal();",
"public interface WorkPlace {\n}",
"public StudentWorker(String name, String id, String iswork, String hours, String workstudy, String pay) // constructor\n\t{\n\t\tsuper(name, id, iswork);\n\t\t\n\t\thoursWorked = Integer.valueOf(hours);\n\t\tpayRate = Double.valueOf(pay);\n\t\tisWorkStudy = Boolean.valueOf(workstudy);\n\t\t\n\t}",
"public interface WorkService {\n}",
"public ProfileWorkexpDao() {\n super(ProfileWorkexp.PROFILE_WORKEXP, com.moseeker.baseorm.db.profiledb.tables.pojos.ProfileWorkexp.class);\n }",
"public com.hps.july.persistence.Worker getExpeditor() throws java.rmi.RemoteException, javax.ejb.FinderException;",
"public GoToWork(Player player)\n\t\t{\n\t\t\tsuper(player,\"Work\",100);\n\t\t}",
"public void createWorker(Worker worker){\n }",
"public static Object createTaskObject(){\n try {\n\n return taskModel.make()\n .load(ClassLoader.getSystemClassLoader(), ClassLoadingStrategy.Default.WRAPPER)\n .getLoaded()\n .newInstance();\n\n\n } catch (InstantiationException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n\n return null;\n }",
"private Task getFirstTestTask() {\n Task task = new Task();\n task.setName(\"Buy Milk\");\n task.setCalendarDateTime(TODAY);\n task.addTag(\"personal\");\n task.setCompleted();\n return task;\n }",
"public Project createProjectFromPRJ() {\n\n\t\tSystem.out.println(\"Trying to load prj file with : \" + data_path + \" \" + projectName + \" \" + conceptName + \" \");\n\n\t\tProject project = null;\n\n\t\ttry {\n\n\t\t\tproject = new Project(data_path + projectName);\n\n\t\t\t// Sehr wichtig hier das Warten einzubauen, sonst gibts leere\n\t\t\t// Retrieval Results, weil die Faelle noch nicht geladen sind wenn\n\t\t\t// das\n\t\t\t// Erste Retrieval laueft\n\t\t\twhile (project.isImporting()) {\n\t\t\t\tThread.sleep(1000);\n\t\t\t\tSystem.out.print(\".\");\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\"); // console pretty print\n\t\t} catch (Exception ex) {\n\n\t\t\tSystem.out.println(\"Error when loading the project\");\n\t\t}\n\t\treturn project;\n\t}",
"@Override\n\tpublic void myWork() {\n\t\t\n\t}",
"Lehrkraft createLehrkraft();",
"NFRSoftgoal createNFRSoftgoal();",
"private Project compileProject() {\n\t\t\tProject p = null;\n\t\t\t\n\t\t\tif(pType.equals(\"o\")) {\n\t\t\t\ttry {\n\t\t\t\t\tp = new OngoingProject(pCode.getText(), pName.getText(), dateFormat.parse(pSDate.getText()),pClient.getText(), dateFormat.parse(pDeadline.getText()), Double.parseDouble(pBudget.getText()), Integer.parseInt(pCompletion.getText()));\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t} else if(pType.equals(\"f\")) {\n\t\t\t\ttry {\n\t\t\t\t\tp = new FinishedProject(pCode.getText(), pName.getText(), dateFormat.parse(pSDate.getText()),pClient.getText(), dateFormat.parse(pEndDate.getText()), Double.parseDouble(pTotalCost.getText()));\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\t\n\t\t\treturn p;\n\t\t}",
"public static Object suggest(Customer c)\n{\n\treturn new Firework(\"demo\", 1);\n}",
"public Project() {\n this.name = \"Paper plane\";\n this.description = \" It's made of paper.\";\n }",
"public CoreWorker getCoreWorker(String worker){ \n\t if(worker == null){ \n\t return null; \n\t } \n\t if(worker.equalsIgnoreCase(\"Controller\")) { \n\t return new WHControllerDAO(); \n\t } \n\t else if(worker.equalsIgnoreCase(\"Action\")){ \n\t return new ActionDAO(); \n\t } \n\t return null; \n\t }",
"Parking createParking();",
"public ProductionWorker(String name, String number, String date) \r\n\t{\r\n\t\tsuper(name, number, date);\r\n\t\ttitle = \"Production Worker\";\r\n\t}",
"SolvableConflictModel createInstanceOfSolvableConflictModel();",
"public android.arch.persistence.room.c c() {\n return new android.arch.persistence.room.c(this, \"Dependency\", \"WorkSpec\", \"WorkTag\", \"SystemIdInfo\", \"WorkName\");\n }",
"public IResourceDepot createResourceDepot() {\n\n /*\n * Defining a ResourceDepot \"JackTruckDepot\" that can store DeliverGood and PickupGood.\n *\n */\n\n // We can store a maximum of 10 DeliverGood on our track (assuming that no other load is\n // present)\n // Further, we start with an initial load of 5 DeliverGoods.\n ILoadCapacity deliverGoodCapacity = new SimpleLoadCapacity(\"DeliverGood\", 10, 5);\n\n // We can store a maximum of 5 PickupGood on our track (assuming that no other load is present)\n ILoadCapacity pickupGoodCapacity = new SimpleLoadCapacity(\"PickupGood\", 5, 0);\n\n // Our depot can store a maximum of 10 total items. For example, 7 DeliverGoods\n // and 3 PickupGoods.\n IResourceDepot depot = new SimpleResourceDepot(\"JackTruckDepot\", 10);\n\n // Adding the capacities to our depot\n depot.add(deliverGoodCapacity);\n depot.add(pickupGoodCapacity);\n\n return depot;\n }",
"public Worker(){\n\n }",
"@Override\n\tprotected Feed newFeed() {\n\t\treturn new Feed(this.feedType);\n\t}",
"public HHCAssignWorkCheckVORowImpl() {\n }",
"public SoftwareEntity( String displayname, String extension, String targetfilenamedefault )\n\t{\n\t\tthis.displayname = displayname;\n\t\tthis.extension = extension;\n\t\tthis.targetfilenamedefault = targetfilenamedefault;\n\n\t\tthis.packagename = null;\n\t\tthis.mainclassname = null;\n\t\tthis.mainclassnamefull = null;\n\t\tthis.mainclassfilename = null;\n\t\tthis.jarfilenamedefault = null;\n\t}",
"public interface WorkService {\n\n /**\n * Crea un nuevo servicio de trabajo en una transaccion de base de datos.\n * @param work\n * @return true si se crea correctamente el servicio y false en caso\n * de tratar de agregar un servicio de trabajo en null\n */\n boolean createWork(Work work);\n\n /**\n * Remueve un trabajo segun el folio que se pase por parametro.\n * @param folio\n * @return true si se elimina el trabajo de forma correcta, y false\n * en caso de pasar un folio igual o menor a cero y que el folio\n * no exista en la base de datos.\n */\n boolean removeWorkByFolio(int folio);\n\n /**\n * Actualiza un trabajo por obeto, y se obtiene el folio dentro del\n * proceso.\n * @param work\n * @return true en caso de actualizarce correctamente el trabajo,\n * y en false en caso de que el folio sea menor o igual a cero y\n * que no exista el trabajo en la base de datos.\n */\n boolean updateWorkByObject(Work work);\n\n /**\n * Se obtiene un trabajo segun su folio.\n * @param folio\n * @return <code>Work</code> en caso de encontrarse el trabajo\n * en la base de datos, en caso de apuntar a null se retorna\n * un Optional.\n */\n Work getWorkByFolio(int folio);\n\n /**\n * Se obtiene una lista de trabajos.\n * @return List<Work>\n */\n List<Work> getAllWorks();\n}",
"OBJECT createOBJECT();",
"public static void main (String[] args)\n {\n ProductionWorker pw =\n new ProductionWorker(\"John Smith\", \"123-A\", \"11-15-2012\",\n ProductionWorker.DAY_SHIFT, 26.50);\n\n //Display the data\n System.out.println(\"Here's the first production worker. \");\n System.out.println(pw);\n\n //Create another ProductionWorker object and use the\n //set methods\n ProductionWorker pw2 = new ProductionWorker();\n pw2.setName(\"Jane Doe\");\n pw2.setEmployeeNumber(\"123-E\");\n pw2.setHireDate(\"12-12-2012\");\n pw2.setShift(ProductionWorker.NIGHT_SHIFT);\n pw2.setPayRate(28.50);\n\n //Display Data\n System.out.println(\"\\nHere's the next production worker. \");\n System.out.println(pw2);\n }",
"ProjectRepresentation getWorkingProject();",
"ExchangePlanContent createExchangePlanContent();",
"public Object caseWorkDefinition(WorkDefinition object) {\n\t\treturn null;\n\t}",
"public TempWorkflow(String name)\n\t{\n\t\tthis.workflowName = name;\t\t\n\t\tthis.taskList = new ArrayList<TempWTask>(); //Initialize a list to record the set of tasks\n\t}",
"void allocateDeamonWorker(Work work);",
"public TeamD() {\n super.name = \"Delta\";\n super.section = 7;\n }",
"WorkoutBatch copy();",
"public interface UndecoratedWorker {\r\n\r\n /**\r\n * Checks if the worker can move to a specific <code>Tile</code>.\r\n * @param t Variable that indicates the <code>Tile</code> at issue.\r\n * @return A boolean: <code>true</code> if the \"move\" operation is available, otherwise <code>false</code>.\r\n */\r\n boolean canMove(Tile t);\r\n\r\n /**\r\n * Handles the \"move\" operation of the worker.\r\n * @param t Variable that indicates the <code>Tile</code> at issue.\r\n */\r\n void move(Tile t);\r\n\r\n /**\r\n * Checks if the worker can build a block on a specific <code>Tile</code>.\r\n * @param t Variable that indicates the <code>Tile</code> at issue.\r\n * @return A boolean: <code>true</code> if the \"build\" operation is available, otherwise <code>false</code>.\r\n */\r\n boolean canBuildBlock(Tile t);\r\n\r\n /**\r\n * Handles the \"build block\" operation of the worker.\r\n * @param t Variable that indicates the <code>Tile</code> at issue.\r\n */\r\n void buildBlock(Tile t);\r\n\r\n /**\r\n * Checks if the worker can build a dome on a specific <code>Tile</code>.\r\n * @param t Variable that indicates the <code>Tile</code> at issue.\r\n * @return A boolean: <code>true</code> if the \"build dome\" operation is available, otherwise <code>false</code>.\r\n */\r\n boolean canBuildDome(Tile t);\r\n\r\n /**\r\n * Handles the \"build dome\" operation of the worker.\r\n * @param t Variable that indicates the <code>Tile</code> at issue.\r\n */\r\n void buildDome(Tile t);\r\n\r\n /**\r\n * Gets the position of the worker at issue.\r\n * @return The <code>Tile</code> where the worker is positioned upon.\r\n */\r\n Tile getPosition();\r\n\r\n /**\r\n * Sets the position of a worker in a specified <code>Tile</code>.\r\n * @param t The destination <code>Tile</code> where the worker must be put on.\r\n */\r\n void setPosition(Tile t);\r\n\r\n /**\r\n * Checks the GodPower of the worker associated.\r\n * @return A boolean: <code>true</code> if GodPower at issue is active,\r\n * otherwise <code>false</code>.\r\n */\r\n boolean getGodPower();\r\n\r\n /**\r\n * Sets the GodPower of the worker associated.\r\n * @param b A boolean: <code>true</code> if the GodPower at issue is active,\r\n * otherwise <code>false</code>.\r\n */\r\n void setGodPower(boolean b);\r\n\r\n /**\r\n * Gets the particular conditions of specific Gods.\r\n * @return The conditions class is where the info about particular conditions of specific Gods\r\n * is stored.\r\n */\r\n Conditions getConditions();\r\n\r\n /**\r\n * Handles the use of the GodPower of specific Gods.\r\n * @param use A boolean: <code>true</code> if the worker activates a particular condition,\r\n * otherwise <code>false</code>.\r\n */\r\n void useGodPower(boolean use);\r\n\r\n /**\r\n * Checks which player the worker at issue is associated to.\r\n * @return An integer that represents the player ID which the worker is associated with.\r\n */\r\n int getBelongToPlayer();\r\n\r\n /**\r\n * Check if any winning condition is satisfied.\r\n * <p></p>\r\n * The main win condition is for the worker of the player to \"move\" from a level 2 block to a level 3 block.\r\n * <p></p>\r\n * @param initialTile Variable that represents the initial <code>Tile</code> of the \"move\" operation.\r\n * @return A boolean: <code>true</code> if any winning condition is satisfied,\r\n * otherwise <code>false</code>.\r\n */\r\n boolean checkWin(Tile initialTile);\r\n\r\n /**\r\n * Brings the worker to the next state in the turn.\r\n */\r\n void nextState();\r\n\r\n /**\r\n * Sets the worker to a particular state in the turn.\r\n * @param state Variable that represents the index of the state in the turn.\r\n * <p>\r\n * If index equals 0: waiting;\r\n * <p>\r\n * If index equals 1: moving;\r\n * <p>\r\n * If index equals 2: building;\r\n * <p>\r\n * If index equals 3: using another worker;\r\n * <p>\r\n */\r\n void setState(int state);\r\n\r\n /**\r\n * Gets the state in the specified turn.\r\n * @return An integer that represents the number of the state in the turn.\r\n * <p>\r\n * If index equals 0: waiting;\r\n * <p>\r\n * If index equals 1: moving;\r\n * <p>\r\n * If index equals 2: building;\r\n * <p>\r\n * If index equals 3: using another worker;\r\n * <p>\r\n */\r\n int getState();\r\n\r\n /**\r\n * Analyzes all the adjacent tiles near the position of the worker.\r\n * @return A list of all the adjacent tiles near the position of the worker.\r\n */\r\n List<Tile> getAdjacentTiles();\r\n\r\n}",
"public grayTWorkerSweepRec() {\n }",
"private static Object createNewInstance(String implement, String header, String expression) {\n\n\t\t// a feeble attempt at preventing arbitrary code execution\n\t\t// by limiting expressions to a single statement.\n\t\t// Otherwise the expression can be something like:\n\t\t// \tf(); } Object f() { System.exit(0); return null\n\t\tif (expression.contains(\";\"))\n\t\t\treturn null;\n\n\t\t// since we might create multiple expressions, we need their names to be unique\n\t\tString className = \"MyExpression\" + classNum++;\n\n\t\t// if we compile the class susseccfully, try and instantiate it\n\t\tif (writeAndCompile(className, implement, header, expression)) {\n\t\t\ttry {\n\t\t\t\tFile classFile = new File(path + className + \".class\");\n\t\t\t\t// load the class into the JVM, and try and get an instance of it\n\t\t\t\t//Class<?> newClass = ClassLoader.getSystemClassLoader().loadClass(className);\n\n\t\t\t\tURLClassLoader classLoader = URLClassLoader.newInstance(new URL[] { classFile.toURI().toURL() });\n\t\t\t\tClass<?> newClass = Class.forName(className, true, classLoader);\n\n\t\t\t\t// delete the class file, so we leave no trace\n\t\t\t\t// this is okay because we already loaded the class\n\t\t\t\ttry {\n\t\t\t\t\tclassFile.delete();\n\n\t\t\t\t// meh, we tried\n\t\t\t\t} catch (Exception e) {}\n\n\t\t\t\treturn newClass.newInstance();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\t//System.out.println(\"Couldn't load class\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Couldn't write / compile source\");\n\t\t}\n\n\t\t// the class didn't compile\n\t\treturn null;\n\t}",
"public Workout(WorkoutName workoutName, List<Exercise> workoutExercises) {\n logger.info(String.format(\"Creating new Workout called %s\", workoutName.fullName));\n requireAllNonNull(workoutName, workoutExercises);\n this.workoutName = workoutName;\n this.workoutExercises.addAll(workoutExercises);\n }",
"protected DocumentTestObject homeMembership() \n\t{\n\t\treturn new DocumentTestObject(\n getMappedTestObject(\"homeMembership\"));\n\t}",
"public abstract IExperiment createExperiment(String description);",
"protected ObservableWork(String type) {\r\n\t\tsuper(type);\r\n\t}",
"public Duke() {\n ui = new Ui();\n storage = new Storage();\n try {\n taskList = new TaskList(TaskList.deserialize(storage.loadData()));\n } catch (DukeException | IOException e) {\n ui.printMessage(e.getMessage());\n taskList = new TaskList();\n storage.createNewData(ui);\n }\n }",
"public WorkTimeEvent() {\r\n super();\r\n }",
"public Portfolio(){\n }",
"public Portfolio() {\n}",
"public CreateKonceptWorker() {\n\t\tsuper();\n\t\tthis.koncept = new KoncepteParaula();\n\t}",
"interface Work {\r\n\tvoid insert();\r\n}",
"public Sort build() {\n return new Sort(this);\n }",
"public Object clone() {\n FileTransfer ft = new FileTransfer();\n ft.mLogicalFile = new String(this.mLogicalFile);\n ft.mFlags = (BitSet) this.mFlags.clone();\n ft.mTransferFlag = this.mTransferFlag;\n ft.mSize = this.mSize;\n ft.mType = this.mType;\n ft.mJob = new String(this.mJob);\n ft.mPriority = this.mPriority;\n ft.mURLForRegistrationOnDestination = this.mURLForRegistrationOnDestination;\n ft.mMetadata = (Metadata) this.mMetadata.clone();\n ft.mVerifySymlinkSource = this.mVerifySymlinkSource;\n // the maps are not cloned underneath\n\n return ft;\n }",
"public a mo8520o() {\n return new a();\n }",
"Schulleiter createSchulleiter();",
"public interface Employees {\n public Employees work();\n}",
"public Furniture (float pricePerHour, float workedHours)\n {\n\t this.pricePerHour = pricePerHour;\n\t this.workedHours = workedHours;\n }"
] | [
"0.550532",
"0.5330668",
"0.5301472",
"0.5195145",
"0.5193826",
"0.51935744",
"0.5163658",
"0.51263726",
"0.5111261",
"0.51109755",
"0.5037833",
"0.5022103",
"0.5001247",
"0.49980888",
"0.49710956",
"0.49636337",
"0.49634695",
"0.49139526",
"0.4912413",
"0.48715657",
"0.48624134",
"0.48504215",
"0.48426288",
"0.48372358",
"0.4823423",
"0.48090222",
"0.47964394",
"0.47942623",
"0.47781235",
"0.4771772",
"0.47600913",
"0.4756285",
"0.47550166",
"0.47254196",
"0.47172958",
"0.46976933",
"0.46959767",
"0.46849835",
"0.468358",
"0.468358",
"0.46727952",
"0.4671882",
"0.467074",
"0.46703166",
"0.46600822",
"0.4658707",
"0.465772",
"0.4646722",
"0.46324286",
"0.4628111",
"0.4626494",
"0.46137103",
"0.46109274",
"0.4601508",
"0.4596854",
"0.45956928",
"0.45942712",
"0.45888287",
"0.45854554",
"0.45784712",
"0.4570366",
"0.45673954",
"0.45670134",
"0.45643723",
"0.45573574",
"0.4556793",
"0.4555571",
"0.4551547",
"0.455073",
"0.4544273",
"0.45412138",
"0.45398486",
"0.4536616",
"0.45251873",
"0.4524739",
"0.4519511",
"0.45124277",
"0.4506292",
"0.45025343",
"0.44946653",
"0.44944236",
"0.44926178",
"0.44862646",
"0.44842595",
"0.44842243",
"0.44799876",
"0.4473095",
"0.447012",
"0.4467155",
"0.4466995",
"0.44663006",
"0.44648474",
"0.44647425",
"0.44611967",
"0.4459438",
"0.44594342",
"0.4459317",
"0.44586492",
"0.4454868",
"0.445361"
] | 0.63722634 | 0 |
Subsets and Splits