query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Role Id: 1 cus, 2 owner, 3 admin, 4 res
public ArrayList<HashMap<String, String>> getHistoryOrder(int actId, int roleCode) { return orderList.getOrderById(actId, roleCode); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getRole();", "String getRole();", "public Integer getRoleId() {\r\n return roleId;\r\n }", "public Role getRoleById(int id);", "String computeRole();", "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 SecRole getRoleById(Long role_Id);", "public Integer getRoleid() {\r\n return roleid;\r\n }", "public Integer getIdRole() {\n\t\treturn idRole;\n\t}", "public String getRoleId()\r\n\t{\r\n\t\treturn roleId;\r\n\t}", "public String getRoleId() {\n return roleId;\n }", "public String getRoleId() {\n return roleId;\n }", "public String getRoleId() {\n return roleId;\n }", "public Long getRoleId() {\r\n return roleId;\r\n }", "public String getRole() { return this.role; }", "com.message.MessageInfo.RoleVO getRole();", "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 String getRoleid() {\n return roleid;\n }", "public String getRoleid() {\n return roleid;\n }", "public String getRoleid() {\n return roleid;\n }", "public Long getRoleid() {\n return roleid;\n }", "UsercontrollerRole selectByPrimaryKey(Integer roleId);", "public Integer RoleByUser(Integer id) {\n\t\treturn userDao.RoleByUser(id);\r\n\t}", "public BigDecimal getRoleId() {\r\n return roleId;\r\n }", "@Override\n public String getRoleProperty() {\n return \"visibleAtRole.id\";\n }", "public Integer getRole() {\n\t\treturn role;\n\t}", "public String getRole() {\r\n return role;\r\n }", "Role findById(int id);", "public int getRoleId() {\r\n\t\treturn roleId;\r\n\t}", "public Role getByRoleId(long roleId);", "User_Role selectByPrimaryKey(Integer id);", "public Integer getRoleId() {\n\t\treturn roleId;\n\t}", "public String getRole() {\n return this.role;\n }", "public Byte getRole() {\n return role;\n }", "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 MetaRole getMetaRole(int iRole);", "public String getRole()\n\t{\n\t\treturn role;\n\t}", "public int getRolesRolId() throws DataStoreException {\r\n return getInt(ROLES_ROL_ID);\r\n }", "TblRoles findByIdRol(long idRol);", "public Long getRoleId() {\n\t\treturn roleId;\n\t}", "public int getMetaRoles();", "String getVacmRole();", "SecurityRole getRole();", "public java.lang.String getRole() {\n return role;\n }", "public String getRole() {\r\n\t\treturn role;\r\n\t}", "@Override\n public String toString(){\n return role;\n }", "public Role getRole()\n {\n return role;\n }", "boolean hasRoleID();", "public String getrole(String id){\n User user = getById(id);\n return user.getRole();\n }", "RoleResource selectByPrimaryKey(Integer roleResId);", "@Override\n\tpublic String getRole() {\n\t\treturn role;\n\t}", "public void setRoleid(Integer roleid) {\r\n this.roleid = roleid;\r\n }", "SysRole selectByPrimaryKey(String id);", "UserRole loadUserRole(int id) throws DataAccessException;", "String roleName();", "void addRoleToUser(int userID,int roleID);", "JindouyunRole selectByPrimaryKey(Integer id);", "private static String setRoleFromDatabase () {\n String sqlRetrieveUserRole = \"SELECT user_role.role FROM user_role, users WHERE (users.user_id=? AND user_role.role_id=users.role)\";\n\n try (Connection conn = Database.getConnection();\n PreparedStatement pstmt = conn.prepareStatement(sqlRetrieveUserRole)) {\n \n pstmt.setInt(1, userId);\n \n ResultSet rs = pstmt.executeQuery();\n \n if (rs.next() == false) {\n roleFromDatabase = \"\";\n } else {\n roleFromDatabase = rs.getString(\"role\");\n }\n } catch (SQLException se) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(1), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (IOException ioe) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (Exception e) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n }\n \n return roleFromDatabase;\n }", "public void setRole(String role)\n {\n _role=role;\n }", "String getRoleName();", "public java.lang.String getRole() {\n return role;\n }", "public Userrole getUserrole() {\n return getEntity();\n }", "public AXValue getRole() {\n return role;\n }", "LoggedUser changeRole(String roleId) throws IOException;", "public void setRoleId(Integer roleId) {\r\n this.roleId = roleId;\r\n }", "public DBSequence getRoleId() {\n return (DBSequence)getAttributeInternal(ROLEID);\n }", "public void setRole(java.lang.String value) {\n this.role = value;\n }", "@Override\r\n\tpublic int delUserRole(long urId) {\n\t\treturn 0;\r\n\t}", "public String getRole() {\n \t\treturn (String)attributes.get(\"Role\");\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}", "TDLRoleEntity getTDLRole(Long id);", "Role getRoles(int index);", "Role getRoles(int index);", "VerbRole getRole();", "int getParticipantRoleValue();", "public void setRole(String role) {\r\n this.role = role;\r\n }", "RoleType getRoleType();", "RoleDao getRoleDao();", "@Override\n\tpublic String getAuthority() {\n\t\treturn role;\n\t}", "public void testGetIdRole() {\n System.out.println(\"getIdRole\");\n Utilisateur instance = null;\n int expResult = 0;\n int result = instance.getIdRole();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public int getRolesRolId(int row) throws DataStoreException {\r\n return getInt(row,ROLES_ROL_ID);\r\n }", "public SecUserrole getNewSecUserrole();", "UserRole selectByPrimaryKey(String id);", "UserRole selectByPrimaryKey(String id);", "public String getRole() {\n\t\t\treturn role;\n\t\t}", "public TableRole getTableRole();", "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 }" ]
[ "0.70356286", "0.70356286", "0.6967258", "0.6949372", "0.69293857", "0.689526", "0.689526", "0.689526", "0.689526", "0.689526", "0.689526", "0.689526", "0.689526", "0.6874411", "0.68431145", "0.6834697", "0.67903066", "0.6782145", "0.6782145", "0.6782145", "0.67815936", "0.67553383", "0.6746012", "0.6713167", "0.6713167", "0.6713167", "0.6713167", "0.6702673", "0.6702673", "0.6702673", "0.6668622", "0.6662211", "0.6655243", "0.6639602", "0.6621307", "0.66141456", "0.66040045", "0.65806544", "0.65723366", "0.6543356", "0.6532399", "0.6530701", "0.6526587", "0.64776933", "0.6454534", "0.6416623", "0.63987327", "0.6393518", "0.6388856", "0.6378386", "0.63529927", "0.63508725", "0.6334076", "0.63267756", "0.6323713", "0.6316329", "0.6306767", "0.62948185", "0.6289357", "0.62850845", "0.62738657", "0.6272929", "0.62633", "0.62571704", "0.62560457", "0.62380826", "0.62244534", "0.6212607", "0.6210338", "0.62096703", "0.61834973", "0.6172623", "0.6171673", "0.61628556", "0.6153491", "0.6142321", "0.6138581", "0.6135158", "0.61275584", "0.6120611", "0.6101389", "0.6086563", "0.60849124", "0.60849124", "0.6084086", "0.60610294", "0.60568714", "0.6055487", "0.60486835", "0.60449505", "0.6043047", "0.60429215", "0.6038236", "0.6034575", "0.6034575", "0.6027661", "0.6025585", "0.60163945", "0.60163945", "0.60163945", "0.60163945" ]
0.0
-1
Only customer could access
public HashMap<String, String> viewCart(int cusId) { if (orderList.hasCart(cusId)) return orderList.getCart(cusId).toHashMap(); return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasCustomerUserAccess();", "protected boolean customerWantsMeat() { return true; }", "boolean hasCustomerUserAccessInvitation();", "boolean isNonSecureAccess();", "@Override\n public boolean userCanAccess(int id) {\n return true;\n }", "public abstract boolean isRestricted();", "@JsonIgnore\n public boolean isAccesible() {\n return isGateway();\n }", "public boolean isCustomerLoggedIn()\r\n {\r\n return customerLoggedIn;\r\n }", "private boolean isAuthorized() {\n return true;\n }", "boolean isSecureAccess();", "boolean hasCustomerClient();", "boolean hasCustomer();", "boolean hasCustomer();", "public boolean isExempt();", "boolean hasAllowedCredit();", "@Override\n\tprotected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue)\n\t\t\tthrows Exception {\n\t\treturn false;\n\t}", "com.google.ads.googleads.v6.resources.CustomerUserAccess getCustomerUserAccess();", "@Override\n protected boolean isAuthorized(PipelineData pipelineData) throws Exception\n {\n \t// use data.getACL() \n \treturn true;\n }", "private Boolean canUserValidate() throws ServeurException, ClientException {\n // Direct on/off line\n return checkValidatePermission();\n }", "@Override\r\n\tprotected void verificaUtentePrivilegiato() {\n\r\n\t}", "private void authorize() {\r\n\r\n\t}", "void ensureAdminAccess() {\n Account currentAccount = SecurityContextHolder.getContext().getAccount();\n if (!currentAccount.isAdmin()) {\n throw new IllegalStateException(\"Permission denied.\");\n }\n }", "public boolean isRestricted() {\n return _restricted;\n }", "@Override\n\tprotected boolean isAccessAllowed(ServletRequest request,\n\t\t\tServletResponse response, Object mappedValue) {\n\t\treturn false;\n\t}", "@Override\r\n public boolean isAccountNonExpired() {\r\n return true;\r\n }", "@Override\n\tpublic boolean isSecured() {\n\t\treturn false;\n\t}", "boolean hasCustomerClientLink();", "private boolean checkUserData() {\n UserAccount userAccount = new UserAccount(this);\n customer = userAccount.getCustomer();\n return customer != null;\n }", "@Override\n public boolean isAccountNonExpired () {\n return true;\n }", "@Override\n public boolean isAccountNonExpired() {\n return true;\n }", "@Override\n public boolean isAccountNonExpired() {\n return true;\n }", "@Override\n public boolean isAccountNonExpired() {\n return true;\n }", "public boolean isRestricted() {\n return restricted;\n }", "public boolean getExempt();", "@Override\npublic boolean isAccountNonExpired() {\n\treturn true;\n}", "public void isAllowed(String user) {\n \r\n }", "public interface CustomerService {\n \n\n public void createCustomer(CustomerDto customerDto);\n \n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public CustomerDto getCustomer(Long id) throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public void updateCustomer(CustomerDto customer) throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public void removeCustomer(CustomerDto customer) throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public Collection<CustomerDto> findAllCustomer() throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public Collection<CustomerDto> searchCustomer(String name) throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\")\n public CustomerDto findByUsername(String username);\n}", "@Override\n public JSONObject viewSLCustomersByAdmin() {\n\n return in_salescustdao.viewSLCustomerByAdmin();\n }", "public boolean getIsLimited() {\r\n return !(this.accessLimitations != null && this.accessLimitations.contains(\"UNL\"));\r\n }", "@Override\r\n\tpublic void list_privateWithoutViewPrivate() throws Exception {\n\t\tif (JavastravaApplicationConfig.STRAVA_ALLOWS_CHALLENGES_ENDPOINT) {\r\n\t\t\tsuper.list_privateWithoutViewPrivate();\r\n\t\t}\r\n\t}", "@Override\npublic boolean isAccountNonExpired() {\n\treturn false;\n}", "@Override\n public boolean isAccountNonExpired() {\n return false;\n }", "@Override\n public boolean isAccountNonExpired() {\n return false;\n }", "@Override\n public boolean isAccountNonExpired() {\n return false;\n }", "@Override\n public boolean hasPermission(Permission permission) {\n // FacesContext context = FacesContext.getCurrentInstance();\n String imp = (String)ADFContext.getCurrent().getSessionScope().get(\"isImpersonationOn\");\n// String imp = (String)context.getExternalContext().getSessionMap().get(\"isImpersonationOn\");\n if(imp == null || !imp.equals(\"Y\")){\n return super.hasPermission(permission);\n }\n else{\n return true;\n \n }\n \n }", "@Override\n public boolean hasAccess(User user) {\n return user.hasRole(RoleValue.APP_ADMIN) || this.equals(user.company);\n }", "public boolean hasCustomer() {\n return customer_ != null;\n }", "@PreAuthorize(\"hasRole('ADMIN')\")\n public ProductDto retrieveAuthorizedProducts() { \n return new ProductDto(\"1\", \"iPhone\", 999.99f);\n }", "default T calendarAccessAuthorized() {\n return amend(CALENDAR_ACCESS_AUTHORIZED_OPTION, true);\n }", "public Boolean isAuthorized(String userId);", "public boolean isNotNullAuthorizationFrontEnd() {\n return genClient.cacheValueIsNotNull(CacheKey.authorizationFrontEnd);\n }", "@Transactional\n\tpublic Boolean getViewAuthorization(String username)\n\t{ \n\t\tint accno;\n\t\ttry\n\t\t{\n\t\t\taccno = (accountManagerService.getUserAccountForUserName(username)).getAccountno();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\tTransactions t = transactionsDAO.findViewableOrNot(accno);\n\t\tif(t==null)\n\t\t\treturn false;\n\t\t//else if(t.getStatus()==2&&(t.getTransactionTypes().equals(\"TR_VIEW\")&&t.getApprovalNeeded()==1))\n\t\t//return true;\n\t\telse \n\t\t\treturn true;\n\t}", "boolean getIsAuthorized();", "@Test\n\tpublic void othersShouldNotBeAbleToLookAtLeonardsQueryByItsPrivateId() throws Exception {\n\t\tthis.mockMvc.perform(get(\"/user/me/queries/123456789\").accept(MediaType.APPLICATION_JSON)).\n\t\t\t\tandExpect(status().isForbidden());\n\t}", "public abstract boolean canUse();", "public int getAccessLevel() {\n return 0;\r\n }", "@Override\r\n protected void mayProceed() throws InsufficientPermissionException {\n if (ub.isSysAdmin() || ub.isTechAdmin()) {\r\n return;\r\n }\r\n// if (currentRole.getRole().equals(Role.STUDYDIRECTOR) || currentRole.getRole().equals(Role.COORDINATOR)) {// ?\r\n// ?\r\n// return;\r\n// }\r\n\r\n addPageMessage(respage.getString(\"no_have_correct_privilege_current_study\") + respage.getString(\"change_study_contact_sysadmin\"));\r\n throw new InsufficientPermissionException(Page.MENU_SERVLET, resexception.getString(\"not_allowed_access_extract_data_servlet\"), \"1\");// TODO\r\n // above copied from create dataset servlet, needs to be changed to\r\n // allow only admin-level users\r\n\r\n }", "@Override\n\tpublic boolean isDenied();", "@Override\n public boolean isAuthenticated() {\n return !person.isGuest();\n }", "public void updateSalerCustomerByForbidden(int uid) {\n\t\tthis.salerCustomerMapper.updateSalerCustomerByForbidden(uid);\n\t}", "public boolean isAcuityEnabled()\n {\n return false;\n }", "int getAllowedCredit();", "@Override\r\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\r\n\t}", "@Override\n\tprotected boolean onAccessDenied(ServletRequest arg0, ServletResponse arg1) throws Exception {\n\t\treturn false;\n\t}", "public boolean isOverPaymentAllowed() {\n\t\treturn false;\n\t}", "public Boolean allowAccess (String token) {\n if (this.userRepository.findByToken(token) == null) {\n return false;\n }\n return true;\n }", "@Override\r\n public boolean isAccountNonLocked() {\r\n return true;\r\n }", "public boolean supportsPreemptiveAuthorization() {\n/* 225 */ return true;\n/* */ }", "@Override\n public void showCustomerDetails() {\n System.out.println(customerLoggedIn);\n }", "boolean isAccountNonExpired();", "boolean isAccountNonExpired();", "@Override\n\tpublic boolean isAccountNonExpired()\n\t{\n\t\treturn true;\n\t}", "boolean ignoresPermission();", "public boolean systemAdminOnly()\n {\n return false;\n }", "public Boolean isProhibited() {\n throw new NotImplementedException();\n }", "@PreAuthorize(\"checkPermission('Legal Entity', 'Manage Legal Entities', {'view','create'})\")\n @GetMapping(\n produces = {\"application/json\"})\n @ResponseStatus(HttpStatus.OK)\n public void sampleEndpointThatRequiresUserToHavePermissionsToViewCreateLegalEnitites() {\n LOGGER.info(\"Preauthorize annotation have checked that user has permissions to view/create legal entities\");\n // continue custom implementation ...\n }", "public String getAccess();", "public void test1(HttpServletRequest request, HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException {\n InetAddress addr = InetAddress.getByName(request.getRemoteAddr());\n\n if(addr.getCanonicalHostName().contains(\"trustme.com\")){ // disabled\n\n }\n }", "protected boolean containsCustomer() {\n return customer.getOptional().isPresent();\n }", "private void checkPermission(User user, List sourceList, List targetList)\n throws AccessDeniedException\n {\n logger.debug(\"+\");\n if (isMove) {\n if (!SecurityGuard.canManage(user, sourceList.getContainerId()) ||\n !SecurityGuard.canContribute(user, targetList.getContainerId()))\n throw new AccessDeniedException(\"Forbidden\");\n }\n else {\n if (!SecurityGuard.canView(user, sourceList.getContainerId()) ||\n !SecurityGuard.canContribute(user, targetList.getContainerId()))\n throw new AccessDeniedException(\"Forbidden\");\n }\n logger.debug(\"-\");\n }", "public boolean isAuthorized() {\r\n // TODO - implement User.isAuthorized\r\n throw new UnsupportedOperationException();\r\n }", "String getAccess();", "String getAccess();", "@Override\n public boolean isAccountNonLocked() {\n return true;\n }", "boolean CheckIfRealPerson(Customer customer);", "@Test\n public void overviewAccountsControllerShouldReturnOnlyCustomerId() throws Exception {\n Integer customerId = 12212;\n request = registerSession(new MockHttpServletRequest(), customerId);\n\n final ModelAndView mav = processGetRequest(request, new MockHttpServletResponse());\n Integer actualCustomerId = (Integer) getModelValue(mav, \"customerId\");\n\n assertEquals(customerId, actualCustomerId);\n }", "@Override\r\n\tpublic boolean isAccountNonExpired() {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean isAccountNonExpired() {\n\t\treturn false;\r\n\t}", "@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}" ]
[ "0.7695443", "0.67668676", "0.6571917", "0.6412576", "0.6363127", "0.6316498", "0.62541705", "0.62487787", "0.6228441", "0.6212326", "0.62116534", "0.6106924", "0.6106924", "0.61036044", "0.60684526", "0.60017", "0.5928757", "0.5909057", "0.5893426", "0.58789366", "0.5857516", "0.58384544", "0.58365464", "0.582287", "0.5821092", "0.581833", "0.581583", "0.5799055", "0.5794153", "0.57847273", "0.57847273", "0.57847273", "0.57787985", "0.577132", "0.5759591", "0.57591593", "0.5748114", "0.57416266", "0.5732993", "0.5688125", "0.5685544", "0.5682953", "0.5682953", "0.5682953", "0.56794703", "0.56774354", "0.56706893", "0.56562513", "0.56419283", "0.55923635", "0.5589441", "0.55857825", "0.5585151", "0.55830735", "0.5578823", "0.5578403", "0.55771255", "0.556973", "0.5568772", "0.55625033", "0.55612546", "0.55595565", "0.5557069", "0.5557069", "0.5554897", "0.55532944", "0.554933", "0.5548523", "0.5547121", "0.5546561", "0.55434847", "0.55434847", "0.5535697", "0.5532591", "0.5531735", "0.5528349", "0.5524517", "0.5521498", "0.55137527", "0.55119413", "0.5507803", "0.54986906", "0.5498402", "0.5498402", "0.54951996", "0.54929227", "0.5484248", "0.54777926", "0.54777926", "0.5474622", "0.5474622", "0.5474622", "0.5474622", "0.5474622", "0.5474622", "0.5474622", "0.5474622", "0.5474622", "0.5474622", "0.5474622", "0.5474622" ]
0.0
-1
'm': modify quantity, 'a': add item. operateList
public boolean editCart(int cusId, int resId, char operator, HashMap<Integer, Integer> operateList) { if (operator == 'm') { // Check whether customer has cart if (!orderList.hasCart(cusId)) return false; Iterator<Map.Entry<Integer, Integer>> it = operateList.entrySet().iterator(); while (it.hasNext()) { Map.Entry<Integer, Integer> entry = it.next(); if (orderList.getCart(cusId).hasItem(entry.getKey())) orderList.getCart(cusId).getItemById(entry.getKey()).setQuantity(entry.getValue()); } return true; } else if (operator == 'a') { // Check whether customer has cart. If not, create one for them. if (!orderList.hasCart(cusId)) orderList.addCart(cusId, resId); Iterator<Map.Entry<Integer, Integer>> it = operateList.entrySet().iterator(); while (it.hasNext()) { Map.Entry<Integer, Integer> entry = it.next(); HashMap<String, String> item = restaurantList.getRestaurant(resId).getItemById(entry.getKey()).toHashMap(); if (orderList.getCart(cusId).hasItem(entry.getKey())) orderList.getCart(cusId).getItemById(entry.getKey()).increaseQty(entry.getValue()); orderList.getCart(cusId).addItem(item, entry.getValue()); } return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void modify(int quantity) {\n\t}", "public void increaseStock(int i, int a){\n stock.get(i).increaseQuantity(a);\n }", "public int addItem(Item i);", "@Override\r\n public void ItemQuantity(int quantity) {\n this.quantity = quantity;\r\n }", "public int addItem(Itemset i);", "public void increaseQuantity() {\n this.quantity++;\n this.updateTotalPrice();\n }", "public void addItemQty(int itemQty) {\n this.itemQty += itemQty;\n }", "org.hl7.fhir.Quantity addNewValueQuantity();", "void add(Item item);", "public void addItems(double a, int b, String c, String d) {\n\t\tprice = a;\r\n\t\tquantity = b;\r\n\t\tname = c;\r\n\t\tpet = d;\r\n\t}", "public void a(Item paramalq, CreativeTabs paramakf, List paramList)\r\n/* 22: */ {\r\n/* 23:27 */ paramList.add(new ItemStack(paramalq, 1, 0));\r\n/* 24:28 */ paramList.add(new ItemStack(paramalq, 1, 1));\r\n/* 25: */ }", "public void addItem(LineItem item)\r\n {\r\n\t ChangeEvent event = new ChangeEvent(this);\r\n\t if(items.contains(item))\r\n\t {\r\n\t\t \r\n\t\t counter = 0;\r\n\t\t items.add(item);\r\n\t\t //tem.addQuantity();\r\n\t\t //tem.getQuantity();\r\n\t\t for(int i = 0; i < items.size(); i++)\r\n\t\t {\r\n\t\t\t if(items.get(i).equals(item))\r\n\t\t\t {\r\n\t\t\t counter++;\r\n\t\t\t }\r\n\t\t }\r\n\t\t for (ChangeListener listener : listeners)\r\n\t\t listener.stateChanged(event);\r\n\t\t System.out.print(\"\\r Quantity of \" + item.toString() + \": \"+ counter);\r\n\t\t \r\n\t }\r\n\t else\r\n\t {\r\n\t\t counter = 1;\r\n\t// item.addQuantity();\r\n\t// item.getQuantity();\r\n\t\t items.add(item);\r\n\t// System.out.println(item.getQuantity());\r\n\t\t for (ChangeListener listener : listeners)\r\n\t\t listener.stateChanged(event);\r\n\t \t\r\n\t \tSystem.out.print(\"\\n Quantity of \" + item.toString() + \": \"+ counter);\r\n\t \r\n\t\t \r\n\t }\r\n\t\t\r\n \r\n }", "@Override\r\n public boolean add(Item item){\r\n if(item.stackable&&contains(item)){\r\n stream().filter(i -> i.name.endsWith(item.name)).forEach(i -> {\r\n i.quantity += item.quantity;\r\n });\r\n }else if(capacity<=size()) return false;\r\n else super.add(item);\r\n return true;\r\n }", "@Override\r\n\tpublic void AddItem(int n) {\n\t\tSystem.out.println(\"ADDED:\" + n);\r\n\r\n\t}", "public void addQuantity(int quantity) {\n\t\tif (quantity < 0) {\n\t\t\tthrow new IllegalArgumentException(\"null barcode\");\n\t\t}\n\t\ttotalNumOfItems += quantity;\n\t}", "public void addQuantity()\n {\n int quantity = Integer.parseInt(quantityTextField.getText());\n quantity++;\n quantityTextField.setText(\"\" + quantity);\n\n changeSubtotalTextField();\n }", "void addItem (Item toAdd){\n\t\t\tthis.items.add(toAdd);}", "public void stock(int number) {\r\n quantity += number;\r\n }", "public void update() {\n\t\tthis.quantity = item.getRequiredQuantity();\n\t}", "public void updateOrder(String id, int quantity)\n {\n for (OrderItem orderItem : orderItems)\n if (orderItem.getFruitId().equalsIgnoreCase(id))\n {\n orderItem.setQuantity(orderItem.getQuantity() + quantity);\n return;\n }\n }", "public void addItem(Item newItem){\n // check for duplicate item ID\n for (Item item: items) {\n if (item.getItemID() == newItem.getItemID()) {\n item.setQuantity(item.getQuantity() + 1);\n return;\n }\n }\n newItem.setQuantity(1);\n this.items.add(newItem);\n }", "public void addOrder(Order o) {\n medOrder.add(o);\n //System.out.println(\"in adding order\");\n for(OrderItem oi: o.getOrderItemList())\n {\n MedicineProduct p=oi.getProduct();\n //System.out.println(\"in for oop produscts \"+p);\n Medicine med = this.searchMedicine(p.getProdName());\n if(med!=null){\n int i = med.getAvailQuantity()+oi.getQuantity();\n med.setAvailQuantity(i);\n // System.out.println(\"in adding quntity \"+i);\n \n }\n }\n \n }", "private void updateItemQuantityAndTotal(Item item){\r\n\t\tItem oldItem = items.get(item.getItemIdentifier());\r\n\t\toldItem.increaseQuantity(new Amount(1));\r\n\t\titems.put(oldItem.getItemIdentifier(), oldItem);\r\n\t\ttotal.updateTotal(item);\r\n\t}", "@Override\n public void onClick(View view) {\n quantityText.setText(String.valueOf(Integer.parseInt(quantityText.getText().toString()) + 1));\n Uri currentItemUri = ContentUris.withAppendedId(MenuItemsContract.MenuItemsEntry.CONTENT_URI, id);\n ContentValues values = new ContentValues();\n values.put(MenuItemsContract.MenuItemsEntry.COLUMN_ITEM_QUANTITY,Integer.parseInt(quantityText.getText().toString()));\n context.getContentResolver().update(currentItemUri,values,null,null);\n }", "public void addItem(Product p, int qty){\n //store info as an InventoryItem and add to items array\n this.items.add(new InventoryItem(p, qty));\n }", "public void increaseQuantity(int amount) {\n this.currentQuantity += amount;\n }", "public void add() {\n\t\tcart.add(item.createCopy());\n\t}", "public void increment() {\n items++;\n }", "public void addItem(Item newItem) {\n for (Item i : inventory) {\n if (newItem.getClass().equals(i.getClass())) {\n i.setQuantity(i.getQuantity() + newItem.getQuantity());\n return;\n }\n }\n inventory.add(newItem);\n }", "public void insertOrderedItems(TireList orderedItems){\n for(int i=0; i<orderedItems.listSize(); i++){\n int temp = Integer.parseInt(orderedItems.getTire(i).getStock()) - orderedItems.getTire(i).getQuantity();\n orderedItems.getTire(i).setStock(temp + \"\");\n orderedItems.getTire(i).updateTire();\n sql=\"Insert into OrderedItems (OrderID, TireID, Quantity) VALUES ('\"+newID+\"','\"+orderedItems.getTire(i).getStockID()+\"',\"+orderedItems.getTire(i).getQuantity()+\")\";\n db.insertDB(sql); \n }\n }", "public void increaseQuantity(View view) {\n Log.d(\"Method\", \"increaseQuantity()\");\n updateQuantity(1);\n }", "public void addFuel(int quantity) throws Exception;", "void addUses(Equipment newUses);", "@Override\n public void addItem(P_CK t) {\n \n }", "void carry(Item specifiedItem);", "public int addItem(Item item, int n) {\r\n if(isContradicting(item)){\r\n System.out.println(CONTRADICTING_MSG1+ item.getType()+CONTRADICTING_MSG2);\r\n return CONTRADICTING;\r\n }\r\n if (super.addItem(item, n) == ZERO) {\r\n if (unitMap.containsKey(item.getType())) {\r\n if ((n+ unitMap.get(item.getType()))* item.getVolume() > capacity * FIFTY_PERCENT) {\r\n return checkNewN(item,n, true);\r\n }\r\n //if less then 50%\r\n else {\r\n unitMap.put(item.getType(),unitMap.get(item.getType()) + n);\r\n availableCapacity -= item.getVolume() * n;\r\n return ZERO;\r\n }\r\n }\r\n //item not in map:\r\n else{\r\n if ((item.getVolume() * n) > capacity * 0.5){\r\n return checkNewN(item,n, false);\r\n }\r\n //if less then 50\r\n else {\r\n unitMap.put(item.getType(), n);\r\n availableCapacity -= item.getVolume() * n;\r\n return ZERO;\r\n }\r\n }\r\n }\r\n //no place in locker:\r\n else return NO_ITEMS_ADDED;\r\n }", "@Override\r\n public void addProductQuantity(Product product, int quantity) {\r\n int stock;\r\n int i = 0;\r\n for (Product p : this.productList) {\r\n if (p.getId() == product.getId()) {\r\n stock = this.productQuantity.get(i);\r\n this.productQuantity.set(i, stock + quantity);\r\n break;\r\n }\r\n i++;\r\n }\r\n this.productList.add(product);\r\n this.productQuantity.add(quantity);\r\n }", "Items(double cost){\n\tthis.cost=cost;\n\titemId++;\n\tcurrentID=itemId;\n}", "@Override\r\n public void updatedSaleInventory(ItemAndQuantity lastItem) {\r\n }", "public void bumpItemQuantity(int index, boolean increase) {\n if (index >= 0 && index < mQuantityOrdered.length) {\n if (increase) {\n mQuantityOrdered[index]++;\n mTotalOrdered++;\n mTotalItemsChangedListener.onTotalItemsChanged(mTotalOrdered);\n } else if(mQuantityOrdered[index] > 0) {\n mQuantityOrdered[index]--;\n mTotalOrdered--;\n mTotalItemsChangedListener.onTotalItemsChanged(mTotalOrdered);\n }\n }\n notifyDataSetChanged();\n }", "@Override\n public void onClick(View v) {\n counter[0] = counter[0] + 1;\n holder.quantity.setText(String.valueOf(counter[0]));\n sum[0] += newItem.getPrice();\n items.add(newItem.getTitle());\n adapterInterface.onClick(sum[0], items);\n }", "public void insertItemDetails(String itemName, Integer quantityOfItem, Double rateOfItem);", "@Override\n public void changeQuantity(Product product, int position) {\n changeProductQuantity(product, -1);\n }", "public void add(Qryop a) {\n this.args.add(a);\n // flip the flag to accept weight\n this.acceptWeight = true;\n }", "private void approveItem(final int position){\n }", "@Modifying(clearAutomatically = true)\n\t@Lock(value = LockModeType.OPTIMISTIC_FORCE_INCREMENT)\n @Query(\"UPDATE Item i SET i.quantity = i.quantity + ?1 WHERE i =?2\")\n int addToStock(double qty, Item item);", "void add(E item);", "void add(E item);", "void add(E item);", "public void changeQuantity(int difference) {\n\t\tquantity += difference;\n\t\t\n\t\tif (quantity < 0)\n\t\t\tquantity = 0;\n\t}", "@Test\n\tpublic void testAddItem() {\n\t\tassertEquals(\"testAddItem(LongTermTest): valid enter failure\", 0, ltsTest.addItem(item4, 10)); //can enter\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid available capacity after adding\", 900, ltsTest.getAvailableCapacity());\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid item count after adding\", 10, ltsTest.getItemCount(item4.getType()));\n\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid enter failure\", -1, ltsTest.addItem(item4, 100)); // can't enter\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid available capacity after adding\", 900, ltsTest.getAvailableCapacity());\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid item count after adding\", 10, ltsTest.getItemCount(item4.getType()));\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\taddNewItem();\n\t\t\t}", "private static void addItem( String name, Integer number ) {\n\t\tItem item = container.addItem( itemId );\n\t\tsetValues( name, number, item );\n\t}", "public void addItems(Product product, JSpinner spinner, JLayeredPane pane, JTable table) throws IllegalArgumentException {\n int qty = (int) spinner.getValue(); //get the added quantity from table\n\n if (qty > 0) {\n if (qty <= product.getQuantity()) {\n for (int i = 0; i < qty; i++) {\n this.setRequestValue(getRequestValue() + product.getPrice()); //update request value\n requestItems.add(product);\n product.setQuantity(product.getQuantity() - 1); //update product in stock\n }\n } else {\n \tDefaultTableModel model = (DefaultTableModel) table.getModel();\n int rowCount = model.getRowCount();\n for (int i = rowCount - 1; i >= 0; i--) {\n \tmodel.removeRow(i);\n }\n table.setModel(model);\n \tJOptionPane.showMessageDialog(pane, \"There is not enough in stock.\");\n throw new IllegalArgumentException(\"There is not enough in stock\");\n }\n } else {\n throw new IllegalArgumentException(\"The amount has to be positive\");\n }\n }", "public void additem(String item){\n\t\trep.takeitem(\"take \" + item);\n\t}", "public void updateQuantityProduct(List<ItemCart> list) {\n\t\tfor (ItemCart i : list) {\n\t\t\tProduct p = i.getP();\n\t\t\t// b1: lay quantity khach hang mua\n\t\t\tint quatity = i.getQuantity();\n\t\t\t// b2: lay quantity cua Product duoi DB\n\t\t\tProduct pDB = new ProductDAO().lookUp(p.getId());\n\t\t\tint quantityNew = pDB.getSoLuongTrongKho() - quatity;\n\t\t\tnew ProductDAO().updateQuatity(p.getId(), quantityNew);\n\n\t\t}\n\n\t}", "public void addStock(int qtearajouter) {\n\t\tthis.stock += qtearajouter;\n\t}", "public void addProduct(Product item)\n {\n stock.add(item);\n }", "public static void addOrderedItem() {\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************Adding ordered item************\");\n\t\tOrderManager orderManager = new OrderManager();\n\t\tList listOfOrders = orderManager.viewOrder();\n\n\t\tOrderedItemManager orderedItemManager = new OrderedItemManager();\n\t\tList listOfOrderedItems = null;\n\n\t\tItemManager itemManager = new ItemManager();\n\t\tList listOfItems = itemManager.onStartUp();\n\n\t\tint i = 0;\n\t\tint choice = 0;\n\t\tOrder order = null;\n\t\tItem item = null;\n\t\tOrderedItem orderedItem = null;\n\t\tboolean check = false;\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tif (listOfOrders.size() == 0) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"There is no orders!\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (listOfItems.size() == 0) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"There is no items!\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tSystem.out.println();\n\t\t\t// print the list of orders for the user to select from.\n\t\t\tfor (i = 0; i < listOfOrders.size(); i++) {\n\t\t\t\torder = (Order) listOfOrders.get(i);\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println((i + 1) + \") Order: \" + order.getId()\n\t\t\t\t\t\t+ \" | Table: \" + order.getTable().getId());\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\tSystem.out.print(\"Select an order to add the item ordered: \");\n\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\torder = (Order) listOfOrders.get(choice - 1);\n\n\t\t\tdo {\n\t\t\t\tfor (i = 0; i < listOfItems.size(); i++) {\n\t\t\t\t\titem = (Item) listOfItems.get(i);\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\t\tSystem.out.println((i + 1) + \") ID: \" + item.getId()\n\t\t\t\t\t\t\t+ \" | Name: \" + item.getName() + \" | Price: $\"\n\t\t\t\t\t\t\t+ item.getPrice());\n\t\t\t\t}\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\tSystem.out.println((i + 1) + \") Done\");\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.print(\"Select an item to add into order: \");\n\t\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\t\tif (choice != (i + 1)) {\n\t\t\t\t\titem = (Item) listOfItems.get(choice - 1);\n\n\t\t\t\t\torderedItem = new OrderedItem();\n\t\t\t\t\torderedItem.setItem(item);\n\t\t\t\t\torderedItem.setOrder(order);\n\t\t\t\t\torderedItem.setPrice(item.getPrice());\n\n\t\t\t\t\torder.addOrderedItem(orderedItem);\n\n\t\t\t\t\tcheck = orderedItemManager.createOrderedItem(orderedItem);\n\n\t\t\t\t\tif (check) {\n\t\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK UPDATE\");\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"Item added into order successfully!\");\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\t\t\tSystem.out.println(\"Failed to add item into order!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} while (choice != (i + 1));\n\n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"Invalid Input!\");\n\t\t}\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************End of adding items************\");\n\t}", "public void addProduct(Product item){\n inventory.add(item);\n }", "public void addToSale(ItemDTO item, int quantity){\n this.saleInfo.addItem(item, quantity);\n }", "void addCpItem(ICpItem item);", "public void addIngredient(String name, String sQuantity){\r\n int positionIngredient = findIngredientByName(name);\r\n double quantity = Double.parseDouble(sQuantity);\r\n\r\n if(positionIngredient != -1){\r\n quantity += ingredients.get(positionIngredient).getQuantity();\r\n Ingredient ingredient = new Ingredient(ingredients.get(positionIngredient).getName(), quantity);\r\n ingredients.remove(positionIngredient);\r\n ingredients.add(ingredient);\r\n } else {\r\n Ingredient ingredient = new Ingredient(name, quantity);\r\n ingredients.add(ingredient);\r\n }\r\n }", "@Test\r\n\tpublic void testUpdateQuantity() throws IdNotContainedException { \r\n\t\tint initialQuantity = menu.findItemId(\"DES006\").getQuantity();\r\n\t int expectedQuantity = 2;\r\n\t processOrder.updateItemQuantity(currentOrder);\r\n\t int actualQuantity = menu.findItemId(\"DES006\").getQuantity();\r\n\t String message =\"Value updated succesfully\";\r\n\t\tassertEquals(message, actualQuantity, expectedQuantity ); \r\n assertTrue(actualQuantity > initialQuantity); //make sure that when updating the value has increased\r\n\r\n\t}", "public void addStock(Product p, int n) {\nif (p.id < 0) return;\nif (n < 1) return;\n\nfor (int i = 0; i < productCatalog.size(); i++) {\nProductStockPair pair = productCatalog.get(i);\nif (pair.product.id == p.id) {\nproductCatalog.set(i, new ProductStockPair(p, pair.stock + n));\nreturn;\n}\n}\nproductCatalog.add(new ProductStockPair(p, n));\n}", "public void addItem(Carryable g) {\r\n if (numItems < MAX_CART_ITEMS)\r\n cart[numItems++] = g;\r\n }", "@Override\n public void onClick(View v)\n {\n\n try\n {\n String item_id = list.get(position).getItem_id();\n String item_name = list.get(position).getItem_name();\n String totalPrice = list.get(position).getTotalPrice();\n String stockQty=list.get(position).getItem_qty();\n String dicount=list.get(position).getDiscount();\n String gst=list.get(position).getGst_per();\n String unit_price=list.get(position).getUnit_price();\n String purchase_price=list.get(position).getItem_purchase();\n String status=list.get(position).getStatus();\n String changedUnit=list.get(position).getUnit();\n\n\n String qty = view.sumValue.getText().toString().trim();\n Log.d(TAG, \"onClick:Qty\"+qty);\n Log.d(\"qty\", stockQty);\n Log.d(\"item\",item_name);\n Log.d(\"item_id\", item_id);\n Log.d(\"totalPrice\", totalPrice);\n Log.d(\"purchase_price\",purchase_price);\n Log.d(\"GST\",gst);\n\n Log.d(\"discount\",dicount);\n Log.d(\"UnitPrice:\",unit_price);\n Log.d(\"Status\",status);\n int quantity = Integer.parseInt(qty);\n quantity++;\n if(quantity<=Integer.parseInt(stockQty) || status.equalsIgnoreCase(\"infinite\"))\n {\n double totalAmont = Double.parseDouble(totalPrice) * quantity;\n Log.d(\"totalAount\", String.valueOf(totalAmont));\n view.sumValue.setText(String.valueOf(quantity));\n Log.d(TAG, \"onClick:Qty\"+quantity);\n // addItem(item_id,String.valueOf(quantity),totalPrice,dicount,gst,totalAmont,unit_price);\n addItem(item_id,String.valueOf(quantity),totalPrice,dicount,gst,totalAmont,unit_price,changedUnit);\n\n\n getTotalQunatity();\n notifyDataSetChanged();\n }else\n {\n Toast.makeText(context,\"Stock not Available\",Toast.LENGTH_LONG).show();\n }\n\n }catch (Exception e)\n {\n Log.d(TAG, \"onClick:Add Item\",e);\n\n\n }\n\n\n\n }", "@Override\n public void onClick(View view) {\n int tempQty = Integer.parseInt(itemQty.getText().toString());\n tempQty = tempQty + 1;\n itemQty.setText(String.valueOf(tempQty));\n\n //get quantity\n int fillQuantity = Integer.parseInt(itemQty.getText().toString());\n //Create SaleItem\n SaleItem tempSaleItem = new SaleItem(fillName, fillQuantity, fillPrice, fillIngArr);\n //Update SaleItems Array\n saleItems.set(position, tempSaleItem);\n updateTotal();\n }", "Items(int quantidade,Produto produto){\n\t\tqntd = quantidade;\n\t\tthis.produto = produto;\n\t\t\n\t}", "@Override\n public void onClick(View view) {\n helper.increaseQty(item);\n holder.mQuantity.setText(String.valueOf(String.valueOf(helper.getQuantityFromTable(item))));\n holder.mPrice.setText(\"$\" + getNewPrice(item, holder));\n// holder.mTotal.setText(\"$\"+total);\n\n }", "private Item mergeItem(Item newItem, List<Item> items) throws ItemException{\r\n \t\tfor (Item item2 : items) {\r\n \t\t\tif (!item2.isBought() && item2.getName().equals(newItem.getName())) {\r\n\t\t\t\t// sum price\r\n\t\t\t\titem2.setPrice(newItem.getPrice().add(item2.getPrice()));\r\n \t\t\t\tif (newItem.getUnit() == null && item2.getUnit() == null) {\r\n \t\t\t\t\t// Both have no unit --> item has now 2 pieces.\r\n \t\t\t\t\titem2.setQuantity(BigDecimal.valueOf(2), ItemUnit.PIECE);\r\n \t\t\t\t\treturn item2;\r\n \t\t\t\t} else if (newItem.getUnit() == null && item2.getUnit() == ItemUnit.PIECE) {\r\n \t\t\t\t\t// new Item has no unit, existing item has PIECE as unit. add one piece to the existing item.\r\n \t\t\t\t\titem2.setQuantity(item2.getQuantity().add(BigDecimal.ONE), ItemUnit.PIECE);\r\n \t\t\t\t\treturn item2;\r\n \t\t\t\t} else if (newItem.getUnit() != null && newItem.getUnit() == item2.getUnit()) {\r\n \t\t\t\t\t// Both have same unit --> add them together\r\n \t\t\t\t\tBigDecimal newQuantity = newItem.getQuantity().add(item2.getQuantity());\r\n \t\t\t\t\titem2.setQuantity(newQuantity, item2.getUnit());\r\n \t\t\t\t\treturn item2; // we want to save only one item.\r\n \t\t\t\t} else if (ItemUnit.MASSES.contains(newItem.getUnit()) && ItemUnit.MASSES.contains(item2.getUnit())) {\r\n \t\t\t\t\t// Both units are masses. Convert it first to grams and then add them.\r\n \t\t\t\t\tBigDecimal mass1 = newItem.getUnit()==ItemUnit.GRAM ? newItem.getQuantity():newItem.getQuantity().multiply(THOUSAND);\r\n \t\t\t\t\tBigDecimal mass2 = item2.getUnit()==ItemUnit.GRAM ? item2.getQuantity():item2.getQuantity().multiply(THOUSAND);\r\n \t\t\t\t\tBigDecimal finalMass = mass1.add(mass2);\r\n \t\t\t\t\tItemUnit unit = ItemUnit.GRAM;\r\n \t\t\t\t\tif (finalMass.compareTo(THOUSAND) > 0){\r\n \t\t\t\t\t\tfinalMass = finalMass.divide(THOUSAND);\r\n \t\t\t\t\t\tunit = ItemUnit.KILO_GRAM;\r\n \t\t\t\t\t}\r\n \t\t\t\t\titem2.setQuantity(finalMass, unit);\r\n \t\t\t\t\treturn item2;\r\n \t\t\t\t} else {\r\n \t\t\t\t\tthrow new ItemException();\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn newItem;\r\n \t}", "@Override\n public void updateItem(P_CK t) {\n \n }", "public void add(Double addedAmount) {\n }", "public void addItem(String name, String quantity)\n\t{\n\t\tingredients.add(new Ingredient(quantity, name));\n\t}", "public void orderItem(Item i) {\r\n\r\n\r\n\r\n this.o.orderItem(i);\r\n\r\n }", "public static void addItem(int id,int quantity){\n\t\tif(userCart.containsKey(id)){\n\t\t\tint newQuantity = userCart.get(id).getQuantity() + quantity;\n\t\t\tuserCart.get(id).setQuantity(newQuantity);\n\t\t\tSystem.out.println(CartMessage.ALREADY_ADDED + newQuantity);\n\t\t}\n\t\telse{\n\t\t\tproducts.get(id).setQuantity(quantity);\n\t\t\tuserCart.put(id,products.get(id));\n\t\t\tSystem.out.println(CartMessage.ITEM_ADDED);\n\t\t}\n\t}", "public void add(int index){\n int i = 0;\n boolean isFound = false;\n for (Product product:inventory.getProducts().keySet())\n {\n i++;\n if (i == index && inventory.getProducts().get(product) > 0)\n {\n if (myBasket.containsKey(product))\n {\n System.out.println(\"One more of this product added.\");\n myBasket.replace(product , myBasket.get(product) + 1);\n }\n else {\n System.out.println(\"Product added to your basket.\");\n myBasket.put(product , 1);\n }\n totalCost = totalCost + product.getPrice();\n isFound = true;\n inventory.updateStock(product , '-');\n }\n }\n if (!isFound)\n System.out.println(\"Sorry. Invalid index or not enough product in stock!\");\n }", "public void addItem(Item item){\r\n items.add(item);\r\n total = items.getTotal();\r\n }", "@attribute(value = \"\", required = false)\r\n\tpublic void addItem(Item i) {\r\n\t}", "public void addItem() {\r\n\t\tFacesContext fc = FacesContext.getCurrentInstance();\r\n\t\tif (itemInvoice.getQuantidade() <= itemPO.getQuantidadeSaldo()) {\r\n\t\t\tBigDecimal total = itemInvoice.getPrecoUnit().multiply(\r\n\t\t\t\t\tnew BigDecimal(itemInvoice.getQuantidade()));\r\n\t\t\titemInvoice.setTotal(total);\r\n\t\t\tif (!editarItem) {\r\n\r\n\t\t\t\tif (itemInvoice.getPrecoUnit() == null) {\r\n\t\t\t\t\titemInvoice.setPrecoUnit(new BigDecimal(0.0));\r\n\t\t\t\t}\r\n\t\t\t\tif (itemInvoice.getQuantidade() == null) {\r\n\t\t\t\t\titemInvoice.setQuantidade(0);\r\n\t\t\t\t}\r\n\t\t\t\titemInvoice.setInvoice(invoice);\r\n\r\n\t\t\t\tinvoice.getItensInvoice().add(itemInvoice);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tinvoice.getItensInvoice().set(\r\n\t\t\t\t\t\tinvoice.getItensInvoice().indexOf(itemInvoice),\r\n\t\t\t\t\t\titemInvoice);\r\n\t\t\t}\r\n\t\t\tcarregarTotais();\r\n\t\t\tinicializarItemInvoice();\r\n\t\t\trequired = false;\r\n\t\t} else {\r\n\r\n\t\t\tMessages.adicionaMensagemDeInfo(TemplateMessageHelper.getMessage(\r\n\t\t\t\t\tMensagensSistema.INVOICE, \"lblQtdMaioSaldo\", fc\r\n\t\t\t\t\t\t\t.getViewRoot().getLocale()));\r\n\t\t}\r\n\t}", "public void addItem(String i) {\n\t\tItem item = Item.getItem(ItemList, i);\n\t Inventory.add(item);\n\t inventoryList.getItems().add(i);\n\n\t}", "private void addition()\n\t{\n\t\tFun = Function.ADD;\t//Function set to determine what action should be taken later. \n\t\t\n\t\t\tsetLeftValue();\n\t\t\tentry.grabFocus();\n\t\t\n\t}", "public void setQuantity(int value) {\n this.quantity = value;\n }", "public void setQuantity(int value) {\n this.quantity = value;\n }", "public void setQuantity(int value) {\n this.quantity = value;\n }", "public void add(E item);", "public synchronized void addItem(Product product){\n \n ShoppingCartItem item = carrito.get(product.getId());\n int new_quantity;\n \n if(item==null){\n carrito.set(product.getId(), new ShoppingCartItem(product));\n new_quantity = 1;\n }else{\n new_quantity = item.getQuantity()+1;\n }\n //even if it's added or not, we call update method to update the quantity of the product\n this.update(product,Integer.toString(new_quantity));\n }", "public void increaseQuantity (View view){\n if(quantity == 100){\n Toast.makeText(this, \"You cannot order more than 100 coffee\", Toast.LENGTH_SHORT).show();\n return;\n }\n quantity = quantity + 1;\n displayQuantity(quantity);\n }", "@Override\n public void addCart(Items cartItem) {\n cartItem.setItemQuantity(cartItem.getItemQuantity() + 1);\n Items menuItem = cartItem.getItemOriginalReference();\n menuItem.setItemQuantity(menuItem.getItemQuantity() + 1);\n updateCartMenu();\n }", "public long addProductShoppingList(String name, double quantity, String unit){\n return addProductShoppingList(name, 0, quantity, unit);\n\n }", "public void add(MeasurementItem mi)\r\n {\r\n if(this.measurementItems==null) this.measurementItems=new ArrayList();\r\n measurementItems.add(mi);\r\n \r\n itemsQuantity=(measurementItems!=null)?measurementItems.size():0;\r\n }", "@Test\n void testAdding100Items() {\n Inventory inventory = new Inventory();\n int itemsToAdd = 100;\n\n assertEquals(0, inventory.getItems(\"\").size());\n\n for (int i = 0; i < itemsToAdd; i++) {\n inventory.addItem(\"XXXXXXXX\" + String.format(\"%02d\", i), \"Name\", 20.00, i);\n }\n\n assertEquals(100, inventory.getItems(\"\").size());\n }", "public void addItemToOrder(Item item){\n\t\t//first, checking if such item already is in the order\n\t\t//if so, only quantity is increased\n\t\tint i; \n\t\tfor(i=0; i<currentOrder.getItems().size();i++){\n\t\t\tif(currentOrder.getItems().get(i).getItem().equals(item)){\n\t\t\t\t//increasing quantity\n\t\t\t\tcurrentOrder.getItems().get(i).setQuantity(currentOrder.getItems().get(i).getQuantity()+1);\n\t\t\t\t//changing description of order item panel\n\t\t\t\tmiddlePanel.getItemPanels().get(i).updateDescription();\n\t\t\t\tmiddlePanel.repaint();\n\t\t\t\tmiddlePanel.validate();\n\t\t\t\tupdateTotalPrice();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tcurrentOrder.addItem(item, 1);\n\t\tmiddlePanel.addItemToPanel(currentOrder.getItems().get(currentOrder.getItems().size()-1));\n\t\tupdateTotalPrice();\n\t}", "private static void orderItems()\r\n\t{\r\n\t\tSystem.out.println(\"Enter the S/N of the item:\");\r\n\t\tboolean checkID = false;\r\n\t\tboolean checkQty = false;\r\n\t\twhile(checkID==false)\r\n\t\t{\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tint id = Integer.parseInt(scan.nextLine());\r\n\t\t\t\t/*if the id is greater than 0, less than the menu size, i.e the ID is valid and the order list does not contain the id of\r\n\t\t\t\titem ordered, add the ID of the item ordered and the quantity in the order list*/\r\n\t\t\t\tif(id<=menu.size() && id>0 && !orderList.containsKey(id))\r\n\t\t\t\t{\r\n\t\t\t\t\tcheckID = true;\r\n\t\t\t\t\tSystem.out.println(\"Enter the quantity desired:\");\r\n\t\t\t\t\twhile(checkQty==false)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttry \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint quantity = Integer.parseInt(scan.nextLine());\r\n\t\t\t\t\t\t\torderList.put(id, quantity);\r\n\t\t\t\t\t\t\tcheckQty = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcatch(NumberFormatException e)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.println(\"Please enter a valid quantity!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t/*if the id is greater than 0, less than the menu size, i.e the ID is valid and the order list contains the id of item \r\n\t\t\t\tordered, retrieve existing quantity, add it up together and store the ID and the updated quantity in the order list*/\r\n\t\t\t\telse if(id<=menu.size() && id>0 && orderList.containsKey(id))\r\n\t\t\t\t{\r\n\t\t\t\t\tcheckID = true;\r\n\t\t\t\t\tint existingQty = orderList.get(id);\r\n\t\t\t\t\tSystem.out.println(\"Enter the quantity desired:\");\r\n\t\t\t\t\twhile(checkQty==false)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttry\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint quantity = Integer.parseInt(scan.nextLine());\r\n\t\t\t\t\t\t\tint newQty = existingQty + quantity;\r\n\t\t\t\t\t\t\torderList.put(id, newQty);\r\n\t\t\t\t\t\t\tcheckQty = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcatch(NumberFormatException e)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.println(\"Please enter a valid quantity!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcatch(Exception e)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Please enter a valid menu item!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch(NumberFormatException e)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Please enter a valid integer!\");\r\n\t\t\t\tSystem.out.println(\"Enter the S/N of the item:\");\r\n\t\t\t}\r\n\t\t\tcatch(Exception e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void add(T item);", "@Override\n public void onClick(View view) {\n int tempQty = Integer.parseInt(itemQty.getText().toString());\n if(tempQty > 0)\n {\n tempQty = tempQty - 1;\n itemQty.setText(String.valueOf(tempQty));\n }\n //get quantity\n int fillQuantity = Integer.parseInt(itemQty.getText().toString());\n //Create SaleItem\n SaleItem tempSaleItem = new SaleItem(fillName, fillQuantity, fillPrice, fillIngArr);\n //Update SaleItems Array\n saleItems.set(position, tempSaleItem);\n updateTotal();\n }", "public void adicionarItem(Cerveja cerveja, Integer quantidade){\r\n\t\t\r\n\t\t// filtra o item adicionado\r\n\t\tOptional<ItemVenda> itemVendaOptional = buscarItemPorCerveja(cerveja);\r\n\t\t\r\n\t\tItemVenda itemVenda = null;\r\n\t\t\r\n\t\t// caso o item ja exista no carrinho de compras altere somente a quantidade\r\n\t\tif(itemVendaOptional.isPresent()){\r\n\t\t\titemVenda = itemVendaOptional.get();\r\n\t\t\t\r\n\t\t\t//altera a quantidade somando a quantidade atual + a nova quantidade informada \r\n\t\t\titemVenda.setQuantidade(itemVenda.getQuantidade() + quantidade);\r\n\t\t\t\r\n\t\t\t\r\n\t\t// \tadicione um novo item no carrinho\r\n\t\t}else{\r\n\t\t\titemVenda = new ItemVenda();\r\n\t\t\titemVenda.setCerveja(cerveja);\r\n\t\t\titemVenda.setQuantidade(quantidade);\r\n\t\t\titemVenda.setValorUnitario(cerveja.getValor());\r\n\t\t\t\r\n\t\t\t// possiciona o novo item criado na primeira posicao da lista\r\n\t\t\titens.add(0, itemVenda);\r\n\t\t\t\r\n\t\t}\r\n\t}", "private static void modifyItemNumberInCart() {\r\n\t\tString itemName = getValidItemNameInput(scanner);\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.print(\" Please enter the number of the item you would like to change to: \");\r\n\t\tint numberOfTheItems = getUserIntInput();\r\n\t\tfor (Iterator<Map.Entry<Product, Integer>> it = cart.getCartProductsEntries().iterator(); it.hasNext();){\r\n\t\t Map.Entry<Product, Integer> item = it.next();\r\n\t\t if( item.getKey().getName().equals(itemName) ) {\r\n\t\t\t\tif (numberOfTheItems == 0) {\r\n\t\t\t\t\tit.remove();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcart.changeProductCount(item.getKey(), numberOfTheItems);\r\n\t\t\t\t}\r\n\t\t }\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Item number modified successfully\");\r\n\t\tSystem.out.println();\r\n\t}", "@Test\n\tpublic void testAddItem() throws IOException{\n\t\tModel.addItem(item, amount + \"\");\n\t\tassertEquals(amount + \"\", Model.hash.get(item));\n\t\t\n\t}", "public void increase(int quantity) {\r\n\r\n\t\tif (getAmount() == Integer.MAX_VALUE)\r\n\r\n\t\t\treturn;\r\n\r\n\t\tsetAmount(getAmount() + quantity);\r\n\r\n\t}" ]
[ "0.7208361", "0.6806227", "0.6768927", "0.6581453", "0.65098226", "0.6431105", "0.64264584", "0.64055717", "0.6405479", "0.6398295", "0.63661647", "0.6362941", "0.6319141", "0.6301058", "0.6246258", "0.6237839", "0.62205094", "0.61984557", "0.61977965", "0.6179163", "0.6135261", "0.6135112", "0.61029077", "0.6078115", "0.607487", "0.6066048", "0.60633564", "0.6050132", "0.6049406", "0.60475004", "0.6042685", "0.6029712", "0.60199195", "0.6010817", "0.59957886", "0.598338", "0.59732735", "0.59676194", "0.596196", "0.59482497", "0.5942436", "0.59192157", "0.5913974", "0.59023196", "0.5898331", "0.58959275", "0.5887837", "0.5887837", "0.5887837", "0.588323", "0.5877324", "0.58766156", "0.58763635", "0.58762974", "0.5865591", "0.58643967", "0.58623123", "0.5851894", "0.58440447", "0.5838929", "0.5826327", "0.58066684", "0.57985747", "0.579849", "0.5798246", "0.5796323", "0.5790822", "0.5784209", "0.5782764", "0.57814825", "0.5771759", "0.57663614", "0.57633704", "0.5761478", "0.57598835", "0.5759749", "0.5756518", "0.57528096", "0.574992", "0.57479995", "0.57434464", "0.57424134", "0.5738438", "0.5738438", "0.5738438", "0.57349795", "0.5733402", "0.5717166", "0.5716827", "0.5715899", "0.57156295", "0.569405", "0.5693086", "0.5687221", "0.56869125", "0.56869", "0.5684864", "0.5683414", "0.56830466", "0.5675663" ]
0.56760734
99
Call before placing order, verifying whether total price without coupon over $100.
public boolean isWithinAmount(int cusId, double lowerBound, double upperBound) { double price = orderList.getCart(cusId).getTotalPrice(); if (price > upperBound || price < lowerBound) return false; return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void amountGreatherThanItemsPrice() {\n Coupon coupon = couponService.calculateCoupon(Arrays.asList(MLA1),PRICE_MLA1+PRICE_MLA2);\n assertEquals(1, coupon.itemsIds().size());\n assertEquals(MLA1, coupon.itemsIds().get(0));\n assertEquals(PRICE_MLA1, coupon.total());\n }", "@Test(priority =2)\n\tpublic void validateProceedToCheckoutPagePrice()\n\t{\n\t\tAssert.assertEquals(proceedtocheckoutpage.getPrice(), ResultsPage.price);\n\t\tnavigateToCheckoutPage();\n\t}", "@Test(priority=3)\n\tpublic void validateCheckoutPagePrice()\n\t{\n\t\tAssert.assertEquals(ResultsPage.price, checkoutpage.getPrice() );\n\t}", "@Override\n\tpublic boolean placeOrder(ArrayList<CartItems> cart_items) {\n\t\tboolean b = false;\n\t\tif(checkStock.isAvailable(cart_items)) {\n\t\t\tb=true;\n\t\t}\n\t\treturn b;\n\t}", "@Test(priority=1)\n\tpublic void validateProductPagePrice()\n\t{\n\t\tAssert.assertEquals(productpage.getPrice(), ResultsPage.price);\n\t\tproceedToCheckOut();\n\t\t\n\t}", "public void priceCheck() {\n\t\tnew WLPriceCheck().execute(\"\");\n\t}", "public void orderPlace() {\n Log.d(\"Method\", \"orderPlaced()\");\n\n if (coffeeCount < getResources().getInteger(R.integer.min_coffee)) {\n Log.e(\"\", \"coffeeCount < minimum coffee order\");\n displayMessage(String.format(Locale.getDefault(), getString(R.string.min_order_message), getResources().getInteger(R.integer.min_coffee)));\n } else if (coffeeCount > getResources().getInteger(R.integer.max_coffee)) {\n Log.e(\"\", \"coffeeCount > maximum coffee order\");\n displayMessage(String.format(Locale.getDefault(), getString(R.string.max_order_message), getResources().getInteger(R.integer.max_coffee)));\n } else {\n Log.i(\"\", \"Order placed: \" + coffeeCount + \" coffee.\");\n displayMessage(String.format(Locale.getDefault(), getString(R.string.order_thanks), 176));\n }\n resetQuantity();\n }", "public void payEconomical() {\n if (this.balance >= 2.50) {\n this.balance -= 2.50;\n }\n }", "public void orderChecker()\n {\n System.out.print( \"Number of bolts: \" );\n int bolts = scan.nextInt();\n System.out.print( \"Number of nuts: \" );\n int nuts = scan.nextInt();\n System.out.print( \"Number of washers: \" );\n int washers = scan.nextInt();\n if ( nuts >= bolts )\n {\n if ( washers >= 2 * bolts )\n {\n System.out.println( \"Check the Order: Order is OK.\" );\n }\n else\n {\n System.out.println( \"Check the Order: Too few washers.\" );\n }\n }\n else\n {\n System.out.println( \"Check the Order: Too few nuts.\" );\n if ( ( washers < 2 * bolts ) )\n {\n System.out.println( \"Check the Order: Too few washers.\" );\n }\n }\n\n final int boltPrice = 5;\n final int nutPrice = 3;\n final int washerPrice = 1;\n int cost = boltPrice * bolts + nutPrice * nuts + washerPrice * washers;\n System.out.println( \"Total cost: \" + cost );\n }", "@Test\n public void amountEqualsItemPrice() {\n Coupon coupon = couponService.calculateCoupon(Arrays.asList(MLA1),PRICE_MLA1);\n assertEquals(1, coupon.itemsIds().size());\n assertEquals(MLA1, coupon.itemsIds().get(0));\n assertEquals(PRICE_MLA1, coupon.total());\n }", "@Test\n\tpublic void priceTest(){\n\t\tMyFoodora myFoodora = new MyFoodora();\n\t\tmyFoodora.load();\n\t\tRestaurant rest = myFoodora.getListRestaurant().get(0);\n\t\ttry{\n\t\tOrder order = new Order(myFoodora.getListCustomer().get(0), rest);\n\t\torder.AddMealToOrder(\"basic\",1); //Basic is the meal of the week\n\t\torder.getCustomer().setFidelityCard(\"lotteryfidelitycard\");\n\t\torder.getBill();\n\t\tmyFoodora.getListCourier().get(0).setAcceptProbability(1); //To be sure that the order is always accepted in the test\n\t\tmyFoodora.setCourierToOrder(order);\n\t\tmyFoodora.closeOrder(order);\n\t\tassertTrue(order.getPrice()== ((double) Math.round(0.95*(2.3+6.7+2.5) * 100))/100 ||order.getPrice()==0);}\n\t\t\n\t\tcatch(NoCourierFoundToDeliver e){\n\t\t\te.getMessage();\n\t\t}\n\t\tcatch(OrderNotCompletException e){\n\t\t\te.getMessage();\n\t\t}\n\t\tcatch(ItemDoesNotExist e){\n\t\t\te.getMessage();\n\t\t}\n\t\tcatch(FidelityCardDoesNotExistException e){\n\t\t\te.getMessage();\n\t\t}\n\t}", "@DirtiesDatabase\n\t@Test\n\tpublic void testPreAuthorize() {\n\t\tGiftCertificateAuthorizationRequest authorizationRequest = createAuthorizationRequestFromOrderPayment(orderPayment);\n\t\t\n\t\ttransactionService.preAuthorize(authorizationRequest, null);\n\t\tassertEquals(BALANCE.subtract(REGULAR_AUTH), transactionService.getBalance(giftCertificate));\n\t}", "private boolean checkPrice(Order otherOrder) {\n\t\tif (getDirection() == Direction.ASK && otherOrder.getDirection() == Direction.BID\n\t\t\t\t&& getPrice() <= otherOrder.getPrice()) {\n\t\t\treturn true;\n\t\t}\n\t\tif (getDirection() == Direction.BID && otherOrder.getDirection() == Direction.ASK\n\t\t\t\t&& getPrice() >= otherOrder.getPrice()) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Test\n public void verifyOffersApplied() {\n \tProduct product = new Product(\"Watermelon\", 0.8);\n \tProduct product2 = new Product(\"Apple\", 0.2);\n \tProduct product3 = new Product(\"Orange\", 0.5);\n \tBasket basket = new Basket();\n \tbasket.getProducts().put(product, 6);\n \tbasket.getProducts().put(product2, 4);\n \tbasket.getProducts().put(product3, 5);\n \tassertTrue(\"Have to get the price of 15 items = 6.1 ==> \", (calculator.calculatePrice(basket) - 6.1) < 0.0001);\n }", "public boolean confirmPrice(String price) {\r\n String finalPrice = getPrice();\r\n info(\"Price of chosen ticket: \" + price + \" Price before paying: \" + finalPrice);\r\n return clearPrice(finalPrice).equals(price);\r\n }", "@Test\r\n\t@Order(1)\r\n\tpublic void testTotalPrice() {\r\n\r\n\t\tSystem.out.println(\"Total Precio Test\");\r\n\r\n\t\tcarritoCompraService.addArticulo(new Articulo(\"articulo1\", 10.5));\r\n\t\tcarritoCompraService.addArticulo(new Articulo(\"articulo2\", 20.5));\r\n\t\tcarritoCompraService.addArticulo(new Articulo(\"articulo3\", 30.5));\r\n\r\n\t\tSystem.out.println(\"Precio Total : \" + carritoCompraService.totalPrice());\r\n\r\n\t\tassertEquals(carritoCompraService.totalPrice(), 61.5);\r\n\t\t\r\n\t}", "@Test\r\n public void testValidatecoupon1() {\r\n log.info(\"starting testValidatecoupon1()\");\r\n\tassertTrue (\"coupon validates\", coupon1.validate());\r\n\tlog.info(\"testValidatecoupon PASSED\");\r\n }", "public void checkAndExecute(){\n if(priceListener.getSecurityPrice() < buyPrice){\n executionService.buy(security, buyPrice, 100);\n // if the price < buyPrice then executionService.buy(buyquantity)\n }else if ( priceListener.getSecurityPrice() > sellPrice ) {\n executionService.sell(security, buyPrice, 100);\n }\n }", "private void CustomerPaidCheck() {\n\t\tfloat CompanyDemand = Float.parseFloat(label_7.getText());\n\t\tif (CompanyDemand > 0) {\n\n\t\t\ttry {\n\t\t\t\tPreparedStatement statement = DBConnection.connection\n\t\t\t\t\t\t.prepareStatement(\"update customer_list set `Check` = 0 where Name = '\"\n\t\t\t\t\t\t\t\t+ name + \"'And Last_Name = '\" + lastName + \"' \");\n\t\t\t\tstatement.execute();\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\ttry {\n\t\t\t\tPreparedStatement statement = DBConnection.connection\n\t\t\t\t\t\t.prepareStatement(\"update customer_list set `Check` = 1 where Name = '\"\n\t\t\t\t\t\t\t\t+ name + \"'And Last_Name = '\" + lastName + \"' \");\n\t\t\t\tstatement.execute();\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@Test(groups = {\"smoke tests\"})\n public void validPurchase() {\n page.GetInstance(CartPage.class)\n .clickProceedToCheckoutButton() //to OrderAddressPage\n .clickProceedToCheckoutButton() //to OrderShippingPage\n .acceptTermsAndProceedToCheckout() //to OrderPaymentPage\n .clickPayByBankWireButton() //to OrderSummaryPage\n .clickIConfirmMyOrderButton(); //to OrderConfirmationPage\n\n // Then\n page.GetInstance(OrderConfirmationPage.class).confirmValidOrder(\"Your order on My Store is complete.\");\n }", "@Then(\"^I should be able to see the Total Amount$\")\n\tpublic void i_should_be_able_to_see_the_Total_Amount() throws Throwable {\n\t bc = pgm.getBookConPage();\n\t\tbc.checkTotal();\n\t}", "private boolean tryPay() {\n return new Random().nextInt(100) + 1 <= 50;\n }", "@Test\r\n public void testValidatecoupon2() {\r\n log.info(\"starting testValidatecoupon2()\");\r\n\tassertTrue (\"coupon validates\", coupon2.validate());\r\n\tlog.info(\"testValidatecoupon PASSED\");\r\n }", "@Order(14)\n\t@Test\n\tpublic void Attempt_OfferBid()\n\t{\n\t\tBigDecimal BuyOut = new BigDecimal(405);\n\t\tItem testItem = new Item(0,\"Changed ItemName\",\"Changed Description\",new BigDecimal(505),new BigDecimal(404),\"NoOne\");\n\t\tint Expected = -1, actual = os.offerBid(BuyOut, testItem, \"NoOne\");\n\t\tassertTrue(actual > Expected);\n\t}", "public void setCouponPrice (java.lang.Double couponPrice) {\r\n\t\tthis.couponPrice = couponPrice;\r\n\t}", "@Test\n public void verifyNoOfferApplied() {\n \tProduct product = new Product(\"Watermelon\", 0.8);\n \tProduct product2 = new Product(\"Apple\", 0.2);\n \tProduct product3 = new Product(\"Orange\", 0.5);\n \tBasket basket = new Basket();\n \tbasket.getProducts().put(product, 2);\n \tbasket.getProducts().put(product2, 1);\n \tbasket.getProducts().put(product3, 5);\n \tassertTrue(\"Have to get the price of 8 items = 4.3 ==> \", (calculator.calculatePrice(basket) - 4.3) < 0.0001);\n }", "@Test(expected=MissingPrice.class)\n\tpublic void testNotEnoughBought() {\n\t\tpos.setPricing(\"A\", 4, 7);\n\n\t\tpos.scan(\"A\");\n\t\tpos.total();\n\t}", "private void businessValidationForOnlinePaymentServiceRequestOrder(PaymentFeeLink order, OnlineCardPaymentRequest request) {\n Optional<BigDecimal> totalCalculatedAmount = order.getFees().stream().map(paymentFee -> paymentFee.getCalculatedAmount()).reduce(BigDecimal::add);\n if (totalCalculatedAmount.isPresent() && (totalCalculatedAmount.get().compareTo(request.getAmount()) != 0)) {\n throw new ServiceRequestExceptionForNoMatchingAmount(\"The amount should be equal to serviceRequest balance\");\n }\n\n //Business validation for amount due for fees\n Optional<BigDecimal> totalAmountDue = order.getFees().stream().map(paymentFee -> paymentFee.getAmountDue()).reduce(BigDecimal::add);\n if (totalAmountDue.isPresent() && totalAmountDue.get().compareTo(BigDecimal.ZERO) == 0) {\n throw new ServiceRequestExceptionForNoAmountDue(\"The serviceRequest has already been paid\");\n }\n }", "public void setCouponAmount(double couponAmount) {\n _couponAmount = couponAmount;\n }", "@Test\n public void verifyAppleOfferApplied() {\n \tProduct product = new Product(\"Apple\", 0.2);\n \tBasket basket = new Basket();\n \tbasket.getProducts().put(product, 5);\n \tassertTrue(\"Have to get the price of 3 items = 0.6 ==> \", \n \t\t\tDouble.compare(calculator.calculatePrice(basket), 0.6) == 0);\n }", "private boolean checkCost(int owner, ItemType item) {\n\t\t\t\t\treturn false;\n\t\t\t\t}", "public void doLogicBuy() {\n\t\tif (!player.isHuman) {\n\t\t\tif (player.money > estimatedFee * 1.5) //\n\t\t\t{\n\t\t\t\tint free = (int) (player.money - estimatedFee * 1.5);\n\t\t\t\tCell c = board.getCells().get(player.position);\n\t\t\t\tif (c instanceof TradeableCell) {\n\t\t\t\t\tTradeableCell tc = (TradeableCell) c;\n\t\t\t\t\tif (tc.getOwner() == null && tc.getPrice() < free) {\n\t\t\t\t\t\ttc.buy(player);\n\t\t\t\t\t\tboard.addMessage(\"Just bought\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "Receipt chargeOrder(PizzaOrder order, CreditCard creditCard);", "public void verifyToCart() {\n if (priceText.getText().equalsIgnoreCase(\"$0.00\")) {\n Assert.fail();\n System.out.println(\"No products have been added to your cart.\");\n\n\n } else\n System.out.println(\"\\n\" +\n \"The product has been successfully added to the Cart.\" + \"\\n\" + \"Total Price: \" + priceText.getText());\n\n }", "@Test\n public void verifyWatermelonOfferApplied() {\n \tProduct product = new Product(\"Watermelon\", 0.8);\n \tBasket basket = new Basket();\n \tbasket.getProducts().put(product, 7);\n \tassertTrue(\"Have to get the price of 7 items = 4 ==> \", \n \t\t\tDouble.compare(calculator.calculatePrice(basket), 4) == 0);\n }", "@Test\r\n public void testPurChaseBeverageWithNotEnoughMoney() {\r\n coffeeMaker.addRecipe(recipe1); // cost 50\r\n assertEquals(25, coffeeMaker.makeCoffee(0, 25)); // not enough amount paid\r\n }", "@Test\n public void testPlaceIcebergOrder(){\n BinanceApi.PlaceOrderRequest placeOrderRequest = new BinanceApi.PlaceOrderRequest();\n placeOrderRequest.setOrderSide(BinanceApi.OrderSide.BUY);\n placeOrderRequest.setSymbol(\"LTCBTC\");\n placeOrderRequest.setPrice(new BigDecimal(\"0.005\"));\n placeOrderRequest.setQuantity(new BigDecimal(\"1\"));\n placeOrderRequest.setIcebergQty(new BigDecimal(\"2\"));\n try{\n binanceApi.placeLimitOrder(placeOrderRequest);\n Assert.fail(\"iceberg order is supported\");\n }catch (BinanceApi.BinanceException ex){\n Assert.assertEquals(ex.getCode(), new Integer(-1013));\n }\n }", "private void checkBuyCard(PropertyCard card) {\n\t\tboolean almostComplete = checkCollection(this, card);\n\t\tif(almostComplete) {\n\t\t\tboolean boughtCard = buyCard(card);\n\t\t\tif(!boughtCard) {\n\t\t\t\tboolean madeChanges = checkPayment(card.getPrice());\n\t\t\t\tif(madeChanges) {\n\t\t\t\t\tbuyCard(card);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tboolean opponentAlmostComplete = false;\n\t\t\tfor(Player p: getPlayers()) {\n\t\t\t\tif(checkCollection(p,card)) {\n\t\t\t\t\topponentAlmostComplete = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(opponentAlmostComplete) {\n\t\t\t\tbuyCard(card);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif(getMoney()-card.getPrice()>=100) {\n\t\t\t\t\tbuyCard(card);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void testMoreRequired() throws VendingMachineInventoryException{\n service.addFunds(\"1.00\");\n Item testitem = new Item(\"testitem\", \"1.50\", \"5\");\n service.addItem(\"testitem\", testitem);\n BigDecimal moneyRequired = service.moreRequired(\"testitem\");\n BigDecimal expectedMoneyRequired = new BigDecimal(\"0.50\");\n assertEquals(moneyRequired, expectedMoneyRequired);\n }", "public static void checkout(double preTotal, double discount, double discountRate)\r\n\t{\r\n\t\tdouble discountAmount = 0.0;\r\n\t\tdouble total;\r\n\r\n\t\tSystem.out.println(\"Thanks for coming!\");\r\n\t\tSystem.out.println(\"SubTotal: \" + preTotal);\r\n\r\n\t\tif(preTotal >= discount)\r\n\t\t\tdiscountAmount = preTotal * discountRate;\r\n\t\ttotal = preTotal - discountAmount;\r\n\r\n\t\tSystem.out.println(\"-Discount: \" + discountAmount);\r\n\t\tSystem.out.println(\"Total: \\t\" + total);\r\n\t}", "public boolean confirmPrice(String price, String roundPrice) {\r\n String clearPrice = clearPrice(price);\r\n String clearRoundPrice = clearPrice(roundPrice);\r\n String finalPrice = clearPrice(getPrice());\r\n Integer sum = Integer.parseInt(clearPrice) + Integer.parseInt(clearRoundPrice);\r\n String sumStr = String.valueOf(sum);\r\n info(\"Price of chosen tickets: \" + sumStr + \" Price before paying: \" + finalPrice);\r\n return finalPrice.equals(sumStr);\r\n }", "@Test\n public void testNotEnoughCash() throws Exception {\n\n // login with sufficient rights\n shop.login(admin.getUsername(), admin.getPassword());\n\n // trying to pay for a sale with insufficient funds\n assertEquals(-1, shop.receiveCashPayment(saleId, toBePaid-1), 0.001);\n\n // verify sale did not change state to PAID/COMPLETED\n assertFalse(isTransactionInAccountBook(saleId));\n\n // verify system's balance did not change\n assertEquals(totalBalance, shop.computeBalance(), 0.001);\n }", "@Test\n public void amountIsNotEnough() {\n assertThrows(CouponNotFoundException.class,\n () -> couponService.calculateCoupon(Arrays.asList(MLA1),Float.valueOf(0)));\n }", "public void placeRushOrder() throws SQLException {\n\t\tCart.getCart().checkAvailabilityOfProduct();\n\t}", "boolean canUseBonus(int order);", "@Override\n\tpublic boolean updateShopCartMoney(double price) {\n\t\treturn false;\n\t}", "public void calculatePriceOrder() {\n log.info(\"OrdersBean : calculatePriceOrder!\");\n this.priceOrder = 0;\n for (ContractsEntity c : contractsBean.getContractsEntities()\n ) {\n this.priceOrder += c.getFinalPrice();\n }\n }", "private void validatePurchaseOrder(MaintenanceRequest mrq) throws MalBusinessException{\n\t\tArrayList<String> messages = new ArrayList<String>();\n\t\tBigDecimal amount = new BigDecimal(0.00);\n\t\t\t\t\n\t\t//Validate PO header required data\n\t\tif(MALUtilities.isEmptyString(mrq.getJobNo()))\n\t\t\tmessages.add(\"Job No. is required\");\n\t\tif(MALUtilities.isEmptyString(mrq.getMaintReqStatus()))\n\t\t\tmessages.add(\"PO Status is required\");\n\t\tif(MALUtilities.isEmptyString(mrq.getMaintReqType()))\n\t\t\tmessages.add(\"PO Type is required\");\n\t\tif(MALUtilities.isEmpty(mrq.getCurrentOdo()))\n\t\t\tmessages.add(\"Odo is required\");\n\t\tif(MALUtilities.isEmpty(mrq.getActualStartDate()))\n\t\t\tmessages.add(\"Actual Start Date is required\");\n\t\tif(MALUtilities.isEmpty(mrq.getPlannedEndDate()))\n\t\t\tmessages.add(\"End date is required\");\n\t\tif(MALUtilities.isEmpty(mrq.getServiceProvider()))\n\t\t\tmessages.add(\"Service Provider is required\");\n\t\t/* TODO Need to determine if this check is necessary. We do not have a hard requirement for this.\n\t\tif(!MALUtilities.isEmpty(po.getServiceProvider()) \n\t\t\t\t&& (!MALUtilities.convertYNToBoolean(po.getServiceProvider().getNetworkVendor()) \n\t\t\t\t\t\t&& this.calculateMarkUp(po).compareTo(new BigDecimal(0.00)) < 1))\n\t\t\tmessages.add(\"Mark Up is required for out of network service providers\");\n\t */\n\t\t\n\t\t//Validate PO Line items (tasks) required data\n\t\tif(!MALUtilities.isEmpty(mrq.getMaintenanceRequestTasks())){\n\t\t\tfor(MaintenanceRequestTask line : mrq.getMaintenanceRequestTasks()){\n\t\t\t\tif(MALUtilities.isEmptyString(line.getMaintCatCode()))\n\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Maint Category is required\");\n\t\t\t\tif(MALUtilities.isEmpty(line.getTaskQty()))\n\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Qty is required\");\n\t\t\t\tif(MALUtilities.isEmpty(line.getUnitCost()))\n\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Unit Price is required\");\n\t\t\t\tif(MALUtilities.isEmpty(line.getTotalCost())) \n\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Total Amount is required\");\t\t\t\t\t\t\t\t\n\t\t\t\tif(!(MALUtilities.isEmpty(line.getTaskQty()) && MALUtilities.isEmpty(line.getUnitCost()))){\n\t\t\t\t\tamount = line.getUnitCost().multiply(line.getTaskQty()).setScale(2, BigDecimal.ROUND_HALF_UP); \n\t\t\t\t\tif( amount.compareTo(line.getTotalCost().setScale(2, BigDecimal.ROUND_HALF_UP)) != 0)\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Total amount is incorrect\");\t\t\t\t\t\t\t\n\t\t\t\t}\t\n/** TODO This will not work well with goodwill POs as the user will not have the changes to add cost avoidance data to subsequent lines.\t\t\t\t\n\t\t\t\tif(mrq.isGoodwillIndicator() && line.isCostAvoidanceIndicator()){\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getCostAvoidanceCode()))\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Cost Avoidance Reason is required\");\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getCostAvoidanceAmount()))\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Cost Avoidance Amount is required\");\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getGoodwillReason()))\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Goodwill Reason is required\");\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getGoodwillCost()) || line.getGoodwillCost().compareTo(new BigDecimal(0)) < 1)\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Goodwill Amount is required\");\t\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getGoodwillPercent()) || line.getGoodwillPercent().compareTo(new BigDecimal(0)) < 1)\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Goodwill Percent is required\");\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(!mrq.isGoodwillIndicator() && line.isCostAvoidanceIndicator()){\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getCostAvoidanceCode()))\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Cost Avoidance Reason is required\");\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getCostAvoidanceAmount()))\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Cost Avoidance Amount is required\");\t\t\t\t\t\n\t\t\t\t}\n*/\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(messages.size() > 0)\n\t\t\tthrow new MalBusinessException(\"service.validation\", messages.toArray(new String[messages.size()]));\t\t\n\t\t\n\t}", "public void setwPrCouponPrice(BigDecimal wPrCouponPrice) {\n this.wPrCouponPrice = wPrCouponPrice;\n }", "static boolean willBuyDrink( boolean isHotOutside , double moneyInPocket) {\n\t\t\n\t\tif (isHotOutside && moneyInPocket >= 10.50) {\n\t\t\treturn true; \n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "private void checking() {\n\n System.out.println(cart);\n\n for (Order o : cart) {\n if (o.getOrderedProduct().getPrice()!= productRepository.getOne(o.getOrderedProduct().getId()).getPrice()){\n System.out.println(\"product will be updated\");\n deleteFromCart(o.getOrderedProduct().getId());\n addToCart(o.getOrderedProduct().getId(),o.getCount());\n }\n }\n }", "@Test(priority = 4)\n\tpublic void validateCartAfterAdd() {\n\t\tCss = read.readPropertiesFile(\"loc.validate.clickoncart.afteradd.css\", ConstantPaths.LOCATORS_FILE);\n\t\tPageActions.clickElement(driver, Css);\n\t\t// click view cart\n\t\tCss = read.readPropertiesFile(\"loc.viewcartbtn.click.css\", ConstantPaths.LOCATORS_FILE);\n\t\tPageActions.clickElement(driver, Css);\n\t\t// validate each cart items-product 1\n\t\tXpath = read.readPropertiesFile(\"loc.verify.nameaftradd.iphone.xpath\", ConstantPaths.LOCATORS_FILE);\n\t\tString actproduct1 = driver.findElement(By.xpath(Xpath)).getText();\n\t\tString exptproduct1 = read.readPropertiesFile(\"exppro1\", ConstantPaths.LOCATORS_FILE);\n\t\tvalidate.validateData(actproduct1, exptproduct1, \"No match\");\n\t\tlog.info(\"Product1\");\n\t\t// product 2\n\t\tXpath = read.readPropertiesFile(\"loc.verify.nameaftradd.mac.xpath\", ConstantPaths.LOCATORS_FILE);\n\t\tString actproduct2 = driver.findElement(By.xpath(Xpath)).getText();\n\t\tString exptproduct2 = read.readPropertiesFile(\"exppro2\", ConstantPaths.LOCATORS_FILE);\n\t\tvalidate.validateData(actproduct2, exptproduct2, \"No match\");\n\t\tlog.info(\"Product2\");\n\t\t// grand total after adding products\n\t\tXpath = read.readPropertiesFile(\"loc.verify.grandtotal.aftradd.xpath\", ConstantPaths.LOCATORS_FILE);\n\t\tString actgrandadd = driver.findElement(By.xpath(Xpath)).getText();\n\t\tString exptgrandadd = read.readPropertiesFile(\"expgrandadd\", ConstantPaths.LOCATORS_FILE);\n\t\tvalidate.validateData(actgrandadd, exptgrandadd, \"No match\");\n\t\tlog.info(\"Grand total after adding products\");\n\n\t}", "@Override\n\tpublic boolean PlaceOrder(Order order) {\n\t\treturn false;\n\t}", "@Test\n void totalPercentageNoOrderLine() {\n allProducts.add(new Product(null, 1, \"productTest\", 10.0, null, null, null,null));\n\n ArrayList<ProductIncome> productIncomes = productBusiness.computeProductsIncome(allProducts, allOrderLines);\n productIncomes.get(0).calculPercentage();\n assertEquals(0.0, productIncomes.get(0).getPercentage(), 0 );\n }", "@Then(\"^I should see Price reminder$\")\n\tpublic void i_should_see_Price_reminder() throws Throwable {\n\t\tString msg=BrowserFactory.driver.findElement(By.xpath(\".//*[@class='cart-item-help-mod contextError']/div[@class='cart-item-error-text']\")).getText();\n\t\tassertTrue(\"price reminder is not displayed\", msg.equals(\"Please fill out the Vehicle Price field.\"));\n\t\t\n\t\t\n\t}", "void onValidatePrepaidPriceplan(Context ctx, Subscriber oldSub, Subscriber newSub) throws HomeException\r\n\t{\n\t\tif (newSub != null && newSub.isPrepaid())\r\n\t\t{\r\n\t\t\tPricePlanVersion ppl = (PricePlanVersion) ctx.get(PricePlanVersion.class) ;\r\n\t\t\t\t\r\n\t\t\t\t//newSub.getPricePlan(ctx);\r\n\t\t\t// validate account state\r\n\t\t\tif (ppl != null && ppl.getDeposit() != 0)\r\n\t\t\t{\r\n\t\t\t\t//migration from provisionhome.java\r\n\t\t\t\t//log3013(subscriber, account, pricePlan);\r\n\r\n\t\t\t\tthrow new HomeException(\"Please make a deposit release for \" + ppl.getDeposit() + \" or change price plan before doing this transaction\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test\n\tpublic void testAddProductToCart() {\n\t\tdouble startBalance = cart.getBalance();\n\t\tassertEquals(0,startBalance,0.01);\n\t\t\n\t\t\n\t\t\t // 4. CHECK NUM ITEMS IN CART BEFORE ADDING PRODUCT\n\t\t\t // \t\t - PREV NUM ITEMS\n\t\t\n\t\tint StartingNumItems = cart.getItemCount();\n\t\tassertEquals(0,StartingNumItems);\n\t\t\n\t\t\t // 5. ADD THE PRODUCT TO THE CART \n\t\tcart.addItem(phone);\n\t\t\n\t\t\t // 6. CHECK THE UPDATED NUMBER OF ITEMS IN CART \n\t\t\t // \t\t-- EO: NUM ITEMS + 1\n\t\tassertEquals(StartingNumItems + 1, cart.getItemCount());\n\t\t\t // -----------------------\n\t\t\t // 7. CHECK THE UPDATED BALANCE OF THE CART\n\t\t\t // \t\t-- EO: PREVIOUS BALANCE + PRICE OF PRODUCT\n\t\t\n\t\tdouble expectedBalance = startBalance + phone.getPrice();\n\t\t\n\t\tassertEquals(expectedBalance,cart.getBalance(),0.01);\n\t\t\n\t\t\n\t\t\n\t}", "CarPaymentMethod processHotDollars();", "protected void beforeUpdateSupplyOrderProperties(\n RetailscmUserContext userContext,\n SupplyOrder item,\n String retailStoreCountryCenterId,\n String id,\n String title,\n String contract,\n BigDecimal totalAmount,\n String[] tokensExpr)\n throws Exception {\n }", "@Test\r\n\tpublic void testMakePurchase_not_enough_money() {\r\n\t\tassertEquals(false, vendMachine.makePurchase(\"A\"));\r\n\t}", "public void payedConfirmation(){\n\t\tassert reserved: \"a seat also needs to be reserved when bought\";\n\t\tassert customerId != -1: \"this seat needs to have a valid user id\";\n\t\tpayed = true;\n\t}", "boolean hasExchangeprice();", "@Override\r\n\tpublic void payCheck() {\n\t\t\r\n\t}", "@Override\n\tpublic int checkBill(MarketTransaction t) {\n\t\treturn 0;\n\t}", "@Override\r\n\tpublic boolean checkBudget() {\n\t\treturn false;\r\n\t}", "@Test\n public void verifyNewOfferIsApplied() {\n \tProduct product = new Product(\"Watermelon\", 0.8);\n \tProduct product2 = new Product(\"Apple\", 0.2);\n \tProduct product3 = new Product(\"Orange\", 0.5);\n \tOffer offer = new Offer(product3, 5, product3.getPrice());\n \tConfigurations.offers.add(offer);\n \tBasket basket = new Basket();\n \tbasket.getProducts().put(product, 6);\n \tbasket.getProducts().put(product2, 4);\n \tbasket.getProducts().put(product3, 5);\n \tassertTrue(\"Have to get the price of 15 items = 5.6 ==> \", (calculator.calculatePrice(basket) - 5.6) < 0.0001);\n }", "public void purchaseCoupon(Coupon coupon) throws Exception {\n\t\t// check if customer did not purchased this coupon in the past\n\t\tif (!customersDBDAO.isCouponExistForCustomer(customerId, coupon.getId())) {\n\t\t\t// check if this coupon has any inventory left\n\t\t\tif (couponsDBDAO.getOneCoupon(coupon.getId()).getAmount() > 0) {\n\t\t\t\t// check if this coupon is not expired\n\t\t\t\tif (!couponsDBDAO.isCouponExpiered(coupon.getId())) {\n\n\t\t\t\t\t// Purchase 1 coupon for customer\n\t\t\t\t\tcouponsDBDAO.addCouponPurchase(coupon.getId(), this.getCustomerId());\n\t\t\t\t\t// reduce this coupon amount by 1\n\t\t\t\t\tcouponsDBDAO.updateCouponAmount(coupon.getId(), -1);\n\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Exception(\"Cannot purchase coupon, coupon is expired\");\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tthrow new Exception(\"Cannot purchase coupon, no more coupons left\");\n\t\t\t}\n\n\t\t} else {\n\t\t\tthrow new Exception(\"Cannot purchase coupon, you already purchased this one in the past\");\n\t\t}\n\t}", "public void VerifyCheckoutTotalPrice(String Exptitle){\r\n\t\tString ExpTitle=getValue(Exptitle);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Total Price should be present\");\r\n\r\n\t\ttry{\r\n\t\t\tif(getAndVerifyPartialText(locator_split(\"txtCheckoutOrdertotal\"), ExpTitle)){\r\n\t\t\t\tSystem.out.println(\"Total Price in Billing is present \"+getText(locator_split(\"txtCheckoutOrdertotal\")));\r\n\t\t\t}else{\r\n\t\t\t\tthrow new Exception(\"Total Price in Billing is not present\");\r\n\t\t\t}\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Total Price title is present\");\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Total Price title is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutOrdertotal\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t}", "public double onlinePurchase(double priceOfItem) {\r\n\t\t\r\n\t\t/**\r\n\t\t * If the customer's bank account balance is greater than or equal to 0.0, greater than or equal to the price of the item, \r\n\t\t * and the price of the item must be greater than or equal to 50.00, perform the purchase, \r\n\t\t * else return the customer's balance. In other words, \r\n\t\t *\r\n\t * If customer.getBalance() >= 0.0 && customer.getBalance() >= 0.0 && priceOfItem >= 50.00 then purchase the item\r\n\t\t * else return customer.getBalance() \r\n\t\t */\r\n\t\tif(this.getBankAccountBalance() >= 0.0 && this.getBankAccountBalance() >= priceOfItem && priceOfItem >= 50.00) {\r\n\t\t\t\r\n\t\t\t// Silver level account\r\n\t\t\tif(this.getBankAccountBalance() < 10000 )\r\n\t\t\t{ \r\n\t\t\t\tthis.setLevelState(silverState);\r\n\t\t\t\t\r\n\t\t\t}// Gold Level Account\t \r\n\t\t\telse if(this.getBankAccountBalance() >= 10000 && this.getBankAccountBalance() < 20000)\r\n\t\t\t{\r\n\t\t\t\tthis.setLevelState(goldState);\r\n\t\t\t\t\r\n\t\t\t}// Platinum Level Account\r\n\t\t\telse {\r\n\t\t\t\t this.setLevelState(platinumState);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn levelState.onlinePurchase(priceOfItem);\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\tAlertBox.display(\"Unsuccessful Purchase\", \"Unable to complete purchase. Please make sure the item you are trying to purchase is above $50.00 and that your funds and fee for account level are suficient to complete the purchase.\");\r\n\t\t\treturn this.getBankAccountBalance();\r\n\t\t}\t\r\n\t}", "private void ThenPaymentIsProcessed() throws Exception {\n assert true;\n }", "@Test\r\n\tpublic void testMakePurchase_enough_money() {\r\n\t\tVendingMachineItem test = new VendingMachineItem(\"test\", 10.0);\r\n\t\tvendMachine.addItem(test, \"A\");\r\n\t\tvendMachine.addItem(test, \"C\");\r\n\t\tvendMachine.insertMoney(10.0);\r\n\t\tassertEquals(true, vendMachine.makePurchase(\"A\"));\r\n\t}", "protected abstract boolean canHaveAsPrice(DukatAmount price);", "private static double checkOut() {\n double discount = 0;\n System.out.print(\"Do you have any coupon code (y/n): \");\n String response = sc.nextLine();\n if (!response.equals(\"y\") && !response.equals(\"n\")) {\n System.out.println(\"Invalid input\");\n checkOut();\n return 0;\n } else {\n if (response.equals(\"y\")) discount = getDiscount();\n }\n double total = printBill(discount);\n double cash = 0;\n while (true) {\n System.out.print(\"Cash: \");\n String input = sc.nextLine();\n if (input.charAt(0) < 48 || input.charAt(0) > 57) {\n System.out.println(\"Invalid input\");\n continue;\n }\n cash = Double.parseDouble(input);\n if (cash < total) {\n System.out.println(\"IS THAT JOKE? HAHAHA\");\n System.out.printf(\"You have to pay at least %.2f Baht%n\", total);\n } else {\n System.out.printf(\"%47s: %8.2f Baht%n\", \"Cash\", cash);\n System.out.printf(\"%47s: %8.2f Baht%n\", \"Change\", cash - total);\n break;\n }\n }\n return total;\n }", "@Test\r\n\tpublic void getTotal_oh_sk(){\n\t\tcart = new TourShoppingCart(MockRules.getRules());\r\n\t\t\r\n\t\tcart.add(new Item(ItemType.OH, BigDecimal.valueOf(300.00)) );\r\n\t\t\r\n\t\tcart.add(new Item(ItemType.SK, BigDecimal.valueOf(30.00)) );\r\n\t\t\r\n\t\tassert cart.total().equals(BigDecimal.valueOf(300.00));\r\n\t\tSystem.out.println(cart.total());\r\n\t}", "boolean hasPrice();", "boolean hasPrice();", "boolean hasPrice();", "protected boolean ensureBalance(BigInteger value)\n {\n String account = appContext.getSettingProvider().getSelectedAccount();\n\n BigInteger balance = appContext.getServiceProvider().getAccountService().getAccountBalance(account).get();\n if(balance == null)\n {\n appContext.getMessageService().showErrorMessage(\"Cannot reach the exchange service. Try again later.\");\n return false;\n }\n\n if(balance.compareTo(value) < 0)\n {\n appContext.getMessageService().showErrorMessage(\"You need at least \" + value.toString() + \" wei to do that!\");\n return false;\n }\n\n return true;\n }", "public double calculatePrice(Order order){\r\n return order.quantity * order.itemPrice -\r\n Math.max(0, order.quantity - 500) * order.itemPrice * 0.05 +\r\n Math.min(order.quantity * order.itemPrice * 0.1, 100);\r\n }", "public boolean canBuy(@NotNull AmmoAmountUncapped cost){\n return cost.canBeBought(this);\n }", "boolean canBuy( final Item item )\n {\n return !ship.contains( item ) && item.getPrice() <= credits;\n }", "@Test\r\n\tpublic void getTotal_3oh(){\n\t\tcart = new TourShoppingCart(MockRules.getRules());\r\n\t\tcart.add(new Item(ItemType.OH, BigDecimal.valueOf(300.00)) );\r\n\t\tcart.add(new Item(ItemType.OH, BigDecimal.valueOf(300.00)) );\r\n\t\tcart.add(new Item(ItemType.OH, BigDecimal.valueOf(300.00)) );\r\n\t\tcart.add(new Item(ItemType.BC, BigDecimal.valueOf(110.00)) );\r\n\t\tassert cart.total().equals(BigDecimal.valueOf(710.00));\r\n\t\tSystem.out.println(cart.total());\r\n\t}", "public boolean priceIsValid() {\n if (bikePrice.length() != 0)\n return Double.parseDouble(bikePrice) >= MIN_BIKE_PRICE;\n\n return false;\n }", "@Test(dependsOnMethods = \"checkSiteVersion\")\n public void createNewOrder() {\n actions.openRandomProduct();\n\n // save product parameters\n actions.saveProductParameters();\n\n // add product to Cart and validate product information in the Cart\n actions.addToCart();\n actions.goToCart();\n actions.validateProductInfo();\n\n // proceed to order creation, fill required information\n actions.proceedToOrderCreation();\n\n // place new order and validate order summary\n\n // check updated In Stock value\n }", "@Then(\"^verify order is placed successfully in Order History$\")\r\n\tpublic void verifyOrderHistory() throws Exception {\n\t assertTrue(new ProductCheckout(driver).isOrderPlaced());\r\n\t}", "public void roomprice_validation(String After_offerprice ,String Before_offerprice )\r\n\t{\r\n\t\tSystem.out.println(\"Before offer price is \"+Before_offerprice);\r\n\t\tSystem.out.println(\"After offer price is \"+After_offerprice);\r\n\r\n\t\tif(!(After_offerprice.equals(Before_offerprice)))\r\n\t\t{\r\n\t\t\t//System.out.println(\"Offer code applied successfully and room price chnaged according to the offer\");\r\n\r\n\t\t\tlogger.info(\"Offer code applied successfully and room price chnaged according to the offer\");\r\n\t\t\ttest.log(Status.PASS, \"Offer code applied successfully and room price changed according to the offer\");\r\n\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\t//System.out.println(\"After offer code applied room price not changed\");\r\n\t\t\t//logger.error(\"After offer code applied room price not changed\");\r\n\t\t\t//test.log(Status.FAIL, \"After offer code applied room price not changed\");\r\n\r\n\t\t}\r\n\t}", "public static void main(String[] args) throws InterruptedException {\n Item item1 = new Item(\"Coca-cola\", 200);\n System.out.println(\"Price before discount: \" + item1.getPrice());\n System.out.println(\"Price after discount: \" + item1.calculateDiscount()); //should be same price, 200, there's no doscount for this type\n\n ItemWithDiscount item2 = new ItemWithDiscount(\"Coca-cola Zero\", 2.0);\n System.out.println(\"\\nPrice before discount: \" + item2.getPrice());\n item2.setDiscount(10);\n System.out.println(\"Price after discount: \" + item2.calculateDiscount()); // 2 - 0.2 = 1.8\n\n\n //CHECK BUY PAY DISCOUNT\n BuyMorePayLess item04 = new BuyMorePayLess(\"Milk\", 10);\n BuyMorePayLess item05 = new BuyMorePayLess(\"Milk\", 10);\n BuyMorePayLess item06 = new BuyMorePayLess(\"Milk\", 1);\n item04.setBuyPayOffer(3,2);\n item04.calculateDiscount();\n\n //Check TakeItAll discount\n ItemTakeItAll item07 = new ItemTakeItAll(\"Tuna\",5.00);\n ItemTakeItAll item08 = new ItemTakeItAll(\"Tuna\",5.00);\n\n// item07.setDiscount(10);\n item07.setMinimumNumber(1);\n System.out.println(\"##################\" + item07.calculateDiscount());\n\n // USERS\n LoyalCustomer customer01 = new LoyalCustomer(\"Giorgi Tsipuria\", \"giobaski\", \"123\",\n \"Gonsiori 33\",\"55945239\");\n\n //B A S K E T S\n Basket basket01 = new Basket(\"Tartu 46\", \"Kairi\", customer01);\n basket01.insertItem(item1); //200 -> 200\n basket01.insertItem(item2); // 2.0 -> 1.8\n System.out.println(\"Total payment in basket: \" + basket01.caclulatePayment()); //201.8 + 201.8 * 0.1 = 221.98\n\n\n\n\n\n //1. Create Store\n Store store = new Store(\"Raua 16\");\n\n //2. sign into store\n Cashier currentCashier = store.cashierAuthentication();\n\n //3.\n Menu currentMenu = store.openMenu();\n\n //4. new basket\n currentMenu.openNewBasket(customer01);\n\n\n //5.Cashier starts adding items into new basket\n System.out.println(currentMenu.getBasket());\n currentMenu.getBasket().insertItem(item1);\n currentMenu.getBasket().insertItem(item2);\n\n\n System.out.println(\"######Basket By ID:\");\n currentMenu.printBasketInfoById(2);\n System.out.println(\"########\");\n\n\n //6. Calculate total price for the current basket\n currentMenu.getBasket().caclulatePayment();\n System.out.println(currentMenu.getBasket());\n System.out.println(\"currents items: \");\n System.out.println(currentMenu.getBasket().getItems());\n\n //7. Logout cashier\n Thread.sleep(10000);\n currentMenu.exit();\n\n\n // Additional features\n System.out.println(\"points of the loyal customer: \" + customer01.getPoints());\n\n System.out.println(\"Bonus for cashier: \" + currentCashier.calculateBonus() + \" Euros\");\n\n\n\n\n\n\n }", "public BigDecimal getBSCA_ProfitPriceLimitEntered();", "protected void acceptedPaymentVerification() {\n BillingSummaryPage.tableBillingGeneralInformation.getRow(1)\n .getCell(\"Current Due\").waitFor(cell -> !cell.getValue().equals(\"Calculating...\"));\n\n assertThat(BillingSummaryPage.tableBillingGeneralInformation.getRow(1))\n .hasCellWithValue(\"Current Due\", BillingHelper.DZERO.toString())\n .hasCellWithValue(\"Total Due\", BillingHelper.DZERO.toString())\n .hasCellWithValue(\"Total Paid\", modalPremiumAmount.get().toString());\n\n assertThat(BillingSummaryPage.tableBillsAndStatements.getRow(1).getCell(\"Status\")).valueContains(PAID_IN_FULL);\n\n assertThat(BillingSummaryPage.tablePaymentsOtherTransactions)\n .with(POLICY_NUMBER, masterPolicyNumber.get())\n .with(TYPE, PAYMENT)\n .with(TableConstants.BillingPaymentsAndTransactionsGB.AMOUNT, String.format(\"(%s)\", modalPremiumAmount.get().toString()))\n .containsMatchingRow(1);\n\n }", "double calculate(Coupon coupon, double payable);", "public boolean isValid_ToBuyTicket() {\n if (this.tktSold < this.museum.getMaxVisit() && isNowTime_in_period()) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "boolean isOrderCertain();", "@Override\n\tpublic void showConfirmation(Customer customer, List<Item> items, double totalPrice, int loyaltyPointsEarned) {\n\t}", "@Test\r\n public void testEqualscoupon() {\r\n log.info(\"starting testEqualscoupon()\");\r\n\tassertFalse (\"coupon1 NOT equal coupon2\", coupon1.equals(coupon2));\r\n\tlog.info (\"testNOTEqualscoupon PASSED\");\t\t\r\n }", "protected void handleBuyMarketOrder(MarketOrderDto marketOrderDto, SecurityOrder securityOrder,\n Account account) {\n Double price = securityOrder.getPrice() * securityOrder.getSize();\n if (account.getAmount() >= price) {\n account.setAmount(account.getAmount() - price);\n\n accountDao.save(account);\n securityOrder.setStatus(\"Filled\");\n securityOrder\n .setNotes(\" security(s) bought at \" + price + \"successfully\");\n } else {\n securityOrder.\n setStatus(\"Rejected\");\n securityOrder.setNotes(\"Insufficient balance.\");\n }\n }", "public static void main(String[] args) {\n int moneyAmount = 10;\n\n int capuccinoPrice = 180;\n int lattePrice = 120;\n int espressoPrice = 80;\n int pureWaterPrise = 20;\n\n var canBuyAnything = false;\n var isMilkEnough = true;\n\n if(moneyAmount >= capuccinoPrice && isMilkEnough) {\n System.out.println(\"Вы можете купить капуччино\");\n canBuyAnything = true;\n }\n\n if(moneyAmount >= lattePrice && isMilkEnough) {\n System.out.println(\"Вы можете купить латте\");\n canBuyAnything = true;\n }\n\n if(moneyAmount >= espressoPrice) {\n System.out.println(\"Вы можете купить еспрессо\");\n canBuyAnything = true;\n }\n\n if(moneyAmount >= pureWaterPrise) {\n System.out.println(\"Вы можете купить воду\");\n canBuyAnything = true;\n }\n\n if(canBuyAnything == false) {\n System.out.println(\"Недостаточно денег\");\n }\n }", "public void validateRequestToBuyPage(){\r\n\t\tsearchByShowMeAll();\r\n\t\tclickCheckboxAndRenewBuyButton();\r\n\t\tverifyRequestToBuyPage();\r\n\t}", "public boolean couldBeProfitable(){\n return this.priceBought < this.maximumMachineProfit;\n }", "protected BigDecimal testBasketValue(BigDecimal grossAmount) {\r\n\t\t\r\n\t\t// First test if the basket is negative\r\n\t\tif(grossAmount.compareTo(BigDecimal.ZERO) < 0 ) {\r\n\t\t\t\r\n\t\t\t//TODO Something has gone wrong - Raise an event to notify ESB of error\r\n\t\t\t\r\n\t\t\t// We do not want to be paying customers to shop\r\n\t\t\treturn BigDecimal.ZERO;\r\n\t\t}\r\n\t\t\r\n\t\t// Lets stick an arbitrary upper limit on the maximum amount allowed in the basket\r\n\t\tif(grossAmount.compareTo(new BigDecimal(\"10000\")) > 0 ) {\r\n\t\t\t\r\n\t\t\t//TODO Something has gone wrong - Raise an event to notify ESB of error\r\n\t\t\t\r\n\t\t\t// lets reset the basket to zero\r\n\t\t\treturn BigDecimal.ZERO;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t// Otherwise return the value\r\n\t\treturn grossAmount;\r\n\t}", "private void checkoutNotEmptyBag() {\n\t\tSystem.out.println(\"Checking out \" + bag.getSize() + \" items.\");\n\t\tbag.print();\n\t\tDecimalFormat df = new DecimalFormat(\"0.00\");\n\t\tdouble salesPrice = bag.salesPrice();\n\t\tSystem.out.println(\"*Sales total: $\" + df.format(salesPrice));\n\t\tdouble salesTax = bag.salesTax();\n\t\tSystem.out.println(\"*Sales tax: $\" + df.format(salesTax));\n\t\tdouble totalPrice = salesPrice + salesTax;\n\t\tSystem.out.println(\"*Total amount paid: $\" + df.format(totalPrice));\n\t\tbag = new ShoppingBag(); // Empty bag after checking out.\n\t}", "@Test(description = \"Test to validate price reminder when no price is entered\", priority = 0)\n\tpublic void UserStory1() throws HeadlessException, AWTException, IOException, InterruptedException\n\t{\n\t\tLoanCalculatorPage loan_cal = new LoanCalculatorPage();\t\t\n\t\tloan_cal.validateCalHomePage();\n\t\t//testLog.log(Status.INFO, \"Loan calculator page launched\");\n\t\tint testCaseID = 1;\n\t\t\n\t\t\n\t\t//Validate the error message when no amount is input\t\t\n\t\tloan_cal.validateNoPrice(testCaseID);\n\t}" ]
[ "0.68950945", "0.66936296", "0.65667075", "0.6303351", "0.6283176", "0.6260212", "0.61496717", "0.6117591", "0.60623664", "0.604814", "0.6022376", "0.6016693", "0.598159", "0.5940698", "0.5870275", "0.58274573", "0.58078486", "0.5781284", "0.5778915", "0.5751876", "0.5751059", "0.57295954", "0.5721256", "0.5720171", "0.5709853", "0.56919867", "0.567333", "0.5659177", "0.56568724", "0.5632823", "0.5618653", "0.56134987", "0.5608992", "0.5604276", "0.557046", "0.55576885", "0.5522218", "0.5507395", "0.55070585", "0.5505268", "0.54930186", "0.5486522", "0.54828715", "0.54810476", "0.5467146", "0.5460041", "0.54573864", "0.5452725", "0.5452534", "0.54395306", "0.54304373", "0.5428058", "0.54225165", "0.5420494", "0.5412142", "0.5402657", "0.5400209", "0.5393969", "0.5376221", "0.53723514", "0.537141", "0.53698456", "0.5368593", "0.5362268", "0.53529346", "0.53470045", "0.5343989", "0.53402424", "0.53329104", "0.5332896", "0.53312135", "0.53297794", "0.53244007", "0.5322356", "0.531734", "0.531734", "0.531734", "0.53161347", "0.5307321", "0.5305157", "0.5301265", "0.5300295", "0.5295773", "0.52942", "0.52823645", "0.5280738", "0.5276912", "0.527438", "0.52704316", "0.52694684", "0.52677774", "0.52666104", "0.52613646", "0.52598053", "0.5259085", "0.52579015", "0.5252005", "0.5247239", "0.5239638", "0.522788", "0.52264994" ]
0.0
-1
private CountDownTimer countDownTimer; private boolean timerIsRunning;
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_registration); //if(ScreenUtils.hasSoftKeys(getWindowManager(), this)) findViewById(R.id.nevSoftBar).setVisibility(View.VISIBLE); initViews(); countries = JsonUtils.loadCountries(this); getCountryZipCode(); user = new User(); Intent intent = getIntent(); if(intent.getExtras()!=null){ user.socialId = intent.getStringExtra(Constants.SOCIAL_ID); user.email = intent.getStringExtra(Constants.EMAIL_ID); user.businessType = intent.getStringExtra(Constants.registrationType); } smsVerifyCatcher = new SmsVerifyCatcher(this, new OnSmsCatchListener<String>() { @Override public void onSmsCatch(String message) { String code = parseCode(message);//Parse verification code if(CURRENT_VIEW_STATE==2){ if(message.contains("Mualab") || message.contains("mualab")){ inputList.clear(); user.otp = code; for(int i=0; i<code.length(); i++){ tvOtp[i].setText(String.format("%s", code.charAt(i))); inputList.add(Character.getNumericValue(code.charAt(i))); } if(apiOTP.equals(user.otp)){ user.otp = code; new Handler().postDelayed(new Runnable() { @Override public void run() { nextScreen(); } }, 700); } } } } }); findViewById(R.id.llBusinessAddr).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(RegistrationActivity.this, AddAddressActivity.class); if(address!=null) intent.putExtra("address",address); startActivityForResult(intent,1001); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Boolean timerCheck(){\n return isRunning;\n }", "public boolean isRunning() { return _timer!=null && _timer.isRunning(); }", "private void startTimerAfterCountDown() {\n \t\thandler = new Handler();\n \t\tprepareTimeCountingHandler();\n \t\thandler.post(new CounterRunnable(COUNT_DOWN_TIME));\n \t}", "void start_timer(){\n tv_verify_downtime.setVisibility(View.VISIBLE);\n countDownTimer.start();\n }", "public boolean timerEnded() {\n return timerEnded; \n }", "public void startCountDown() {\r\n\t\ttimerLabel = new TextField();\r\n\t\tif(timer!=null){timer.cancel();}\r\n\t\ttimer = new Timer();\r\n\t\ttimerLabel.setStyle(\"-fx-text-fill:white\");\r\n\t\ttimerLabel.setFont(Font.font(\"Verdana\", FontWeight.BOLD, 15));\r\n\t\ttimerLabel.setBackground(Background.EMPTY);\r\n\t\ttimerLabel.setAlignment(Pos.TOP_RIGHT);\r\n\t\ttimerLabel.setEditable(false);\r\n\t\ttowersRegion.getChildren().add(2, timerLabel);\r\n\t\tcountDownRunning = true; // indicate that counting down started\r\n\t\t\t\r\n\t\ttimer.schedule(new TimerTask() { // timer task to update the seconds\r\n\t\t\t@Override\r\n\t\t public void run() {\r\n\t\t\t\tPlatform.runLater(new Runnable() {\r\n\t\t\t\t\tpublic void run() {\r\n\t\t \t timerLabel.setText(\"Time left: \" + countDown);\r\n\t\t countDown--;\r\n\t\t if (countDown < 0){timer.cancel();}\r\n\t\t\t}});}}, 1000, 1000); //Every 1 second\r\n\t\t \r\n\t\t timeline = new Timeline(new KeyFrame( // create a time line to remove the special brick effect after 7 seconds\r\n\t\t\t\t \t\tDuration.seconds(7), ae -> { removeEffectFromSpecialBrick();})); // lambda style\r\n\t\t timeline.play();\r\n\t}", "public boolean startTimerIsRunning() {\n\t\treturn startMoveDownTimer.isRunning();\n\t}", "private void countdown(){\n timer = new CountDownTimer(timeLeft, 1000) {\n @Override\n public void onTick(long millisUntilFinished) {\n timeLeft = millisUntilFinished;\n updateTimerView();\n }\n @Override\n public void onFinish() {\n timeLeft = 0;\n updateTimerView();\n checkAnswer();\n }\n }.start();\n }", "@Override\n public void run() {\n while(timerFlag){\n\n if(count == 700){\n\n if(timer_count == true) {\n //TODO 업데이트가 되어 오면 true로 변경경\n break;\n }\n else if(timer_count ==false)\n {\n /* MainActivity.getInstance().showToastOnWorking(\"제어가 되지 않았습니다.\");*/\n\n //timer\n Message msg = timercountHandler.obtainMessage();\n msg.what = 1;\n msg.obj = getResources().getString(R.string.not_controled);//\"제어가 동작하지 않았습니다.\";\n timercountHandler.sendMessage(msg);\n count = 0;\n\n Message msg1 = timercountHandler.obtainMessage();\n msg1.what = 2;\n timercountHandler.sendMessage(msg1);\n\n// deviceUIsetting();\n break;\n }\n }\n\n count++;\n// Log.d(TAG,\"count : \" + count);\n\n try {\n Thread.sleep(CONTROL_OPTIONS_TIMEOUT);\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n\n }\n }", "public boolean isRunning() {\n/* 101 */ return this.isRunning;\n/* */ }", "@FXML\r\n\t void countDown() throws InterruptedException {\n\t\t\t countDownTimer.setVisible(true); // \"timer\" is a Text Object on screen\r\n\t\t\t text = countDownTimer.getText();\r\n\t\t\t timeSeconds = Integer.parseInt(text);\r\n\t\t\t keyboardOff = false;\r\n\t\t\t \r\n\t\t\t Timer clock = new Timer();\r\n\t\t\t clock.scheduleAtFixedRate(new TimerTask() {\r\n\t\t\t public void run() {\r\n\t\t\t if(timeSeconds >= 0)\r\n\t\t\t {\r\n\t\t\t countDownTimer.setText(Integer.toString(timeSeconds));\r\n\t\t\t timeSeconds--; \r\n\t\t\t \r\n\t\t\t if(timeSeconds==0) keyboardOff=true;\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t clock.cancel();\r\n\t\t\t try {\r\n\t\t\t\t\t\t\t\t\tturn2Start();\r\n\t\t\t\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t \r\n\t\t\t }\r\n\t\t\t }\r\n\t\t\t }, 1000,1000);\r\n\t }", "public BooleanProperty timerRunningProperty() {\n return timerRunning;\n }", "@FXML\r\n\t void countDown2() throws InterruptedException {\n\t\t\t countDownTimer.setVisible(true); // \"timer\" is a Text Object on screen\r\n\t\t\t text = countDownTimer.getText();\r\n\t\t\t timeSeconds = Integer.parseInt(text);\r\n\t\t\t keyboardOff = false;\r\n\t\t\t \r\n\t\t\t Timer clock = new Timer();\r\n\t\t\t clock.scheduleAtFixedRate(new TimerTask() {\r\n\t\t\t public void run() {\r\n\t\t\t if(timeSeconds >= 0)\r\n\t\t\t {\r\n\t\t\t countDownTimer.setText(Integer.toString(timeSeconds));\r\n\t\t\t timeSeconds--; \r\n\t\t\t \r\n\t\t\t if(timeSeconds==0) keyboardOff=true;\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t clock.cancel();\r\n\t\t\t displayMessage.setText(\"TIME'S UP!\");\r\n\t\t\t DupMeClient.myPattern = new ArrayList<Integer>();\r\n\t\t\t\t\t\t\t\tDupMeClient.opponentPattern = new ArrayList<Integer>();\r\n\t\t\t\t\t\t\t\toutOf=0;\r\n\t\t\t\t\t\t\t\tsequencePivot=0;\r\n\t\t\t\t\t\t\t\tsecondTurn=false;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tinitialize();\r\n\t\t\t }\r\n\t\t\t }\r\n\t\t\t }, 1000,1000);\r\n\t }", "TimerStatus onTimer();", "public boolean isRunning()\n\t{\n\t\treturn updateTimer.isRunning();\n\t}", "public void ButtonStartClick(View view){\n\n final MyCountDownTimer cdt = new MyCountDownTimer(180000, 1000);\n\n cdt.start();\n }", "public final boolean isTimerRunning() {\n return timerRunning;\n }", "private void startTimer() {\n\n //call renewWord function once the timer is on\n renewWord();\n countDownTimer = new MyCountDown(totalTimeCountInMilliseconds, 50);\n countDownTimer.start();\n }", "boolean isRunning();", "boolean isRunning();", "boolean isRunning();", "boolean isRunning();", "boolean isRunning();", "@Override\r\n\t\t public void run() {\r\n\t\t\t\tPlatform.runLater(new Runnable() {\r\n\t\t\t\t\tpublic void run() {\r\n\t\t \t timerLabel.setText(\"Time left: \" + countDown);\r\n\t\t countDown--;\r\n\t\t if (countDown < 0){timer.cancel();}\r\n\t\t\t}});}", "public void countTimer() {\n\t\t\n\t\ttimerEnd = System.currentTimeMillis();\n\t}", "public void startCounter(){\n //keeps the counter value from the last time phone was unlocked\n lastPointsUnlocked = counter;\n if(!counterStarted) {\n timer = new Timer();\n //this timer will execute the code every intervalTime time\n timer.schedule(new TimerTask() {\n @Override\n public void run() {\n --counter;\n updateCounterView(null);\n //if counter reaches 0 stop counter\n if (counter <= 0) {\n updateCounterView(\"0\");\n MainActivity.setGameOn(false);\n timer.cancel();\n //if phone was unlocked for a while stop timer too\n } else if((lastPointsUnlocked - counter)>totalPoints/5 && !PhoneService.isPhoneLocked()) {\n System.out.println(\"Lost more than 1/5, bomb is deactivated\");\n timer.cancel();\n }\n }\n }, intervalTime, intervalTime);\n counterStarted = true;\n }\n }", "public boolean isRunning(){\n return !paused;\n }", "private void trackerTimer() {\n\n Thread timer;\n timer = new Thread() {\n\n @Override\n public void run() {\n while (true) {\n\n if (Var.timerStart) {\n try {\n Var.sec++;\n if (Var.sec == 59) {\n Var.sec = 0;\n Var.minutes++;\n }\n if (Var.minutes == 59) {\n Var.minutes = 0;\n Var.hours++;\n }\n Thread.sleep(1000);\n } catch (Exception cool) {\n System.out.println(cool.getMessage());\n }\n\n }\n timerText.setText(Var.hours + \":\" + Var.minutes + \":\" + Var.sec);\n }\n\n }\n };\n\n timer.start();\n }", "public void startTimer(){\n timerStarted = System.currentTimeMillis();\n }", "public void countDown() {\n makeTimer();\n int delay = 100;\n int period = 30;\n timer.scheduleAtFixedRate(new TimerTask() {\n public void run() {\n tick();\n updatePlayerHealthUI();\n }\n }, delay, period);\n }", "public boolean isRunning();", "public boolean isRunning();", "public boolean isRunning();", "public boolean isRunning();", "public boolean isRunning();", "public boolean isRunning();", "private void startTimer()\n {\n if (timer == null)\n {\n timer = new CountDownTimer(TIMER_MILLI_SEC, 1000)\n {\n @Override\n public void onTick(long l)\n {\n timerText.setText(\"\" + l / 1000);\n }\n\n @Override\n public void onFinish()\n {\n // Let P2 play\n if (secondPlayer instanceof IAPlayer)\n {\n ((IAPlayer) secondPlayer).playRandom();\n }\n // Animations and full results\n announceRoundResult();\n\n // Hide timer\n timerText.setVisibility(View.GONE);\n gameControlButton.setVisibility(View.VISIBLE);\n }\n };\n }\n\n // Clean UI state\n gameControlButton.setVisibility(View.INVISIBLE);\n timerText.setVisibility(View.VISIBLE);\n\n drawIcon.setVisibility(View.INVISIBLE);\n firstCup.setVisibility(View.INVISIBLE);\n secondCup.setVisibility(View.INVISIBLE);\n\n // Reset users actions\n resetActionButtonsState();\n firstPlayer.resetLastAction();\n secondPlayer.resetLastAction();\n\n // First player plays first\n if (firstPlayer instanceof IAPlayer)\n {\n ((IAPlayer) firstPlayer).playRandom();\n }\n\n // Start count down\n timer.start();\n }", "public boolean isRunning(){\n return isRunning;\n }", "void startUpdateTimer();", "public void initializeCountDown(boolean switchChecked, TextView timerTextView, Context context){\n if(switchChecked){\n countDownTimer = new CountDownTimer(milliSec, countDownInterval) {\n @Override\n public void onTick(long millisUntilFinished) {\n timerTextView.setText(\"timer: \" + millisUntilFinished / 1000);\n if((millisUntilFinished / 1000) == 0){\n onFinish();\n }\n\n }\n\n @Override\n public void onFinish() {\n// timerTextView.setText(\"0\");\n Toast.makeText(context, \"Times Up!\", Toast.LENGTH_SHORT).show();\n }\n };\n }\n }", "public void StartTimer() {\n\t\tCount = new Timer();\n\t}", "private void stopCountdown() {\n if (countDownTimer != null) {\n countDownTimer.cancel();\n countDownTimer = null;\n }\n }", "private void plusTime(){\n\n if(totalTimeCountInMilliseconds < 10000)\n {\n countDownTimer.cancel();\n countDownTimer = new MyCountDown(totalTimeCountInMilliseconds + 3000, 50);// give extra 3000 milliseconds if they get the answer right\n }\n else\n {\n countDownTimer.cancel();\n countDownTimer = new MyCountDown(10000, 50);// set the timer to 10000 millisec if totalTimeCountInMilliseconds + 3000 > 10000\n }\n\n countDownTimer.start();\n\n\n }", "public boolean resetTimer()\n {\n this.counterThread.setSeconds(0);\n return true;\n }", "public void newTurnCountdown() {\n newTurn = true;\n newTurnTimer = 77;\n }", "@Override\n public boolean onTouch(View v, MotionEvent event) {\n return timerActive;\n }", "public void setTimer() {\n\t\t\n\t}", "public boolean getResetTimeOnStop() { return _resetTimeOnStop; }", "public boolean isStopped()\r\n\t{\r\n\t\treturn currentstate == TIMER_STOP;\r\n\t}", "private void showTimer(final boolean isRecorder) {\n try {\n long timerForCountDown = 0;\n if (isStoppedPress) {\n timerForCountDown = timeOnStopPress;\n } else {\n timerForCountDown = timerDuration;\n }\n\n timer = new CountDownTimer(timerForCountDown, 1000) {\n int time = 0;\n int timerCount = 0;\n\n @Override\n public void onFinish() {\n mtxtViewDuration.setText(\"00:00\");\n if (isRecorder) {\n// Stop Recording\n onRecord(mStartRecording);\n utils.showToast(ctx, getResources().getString(R.string.txtRecordingStop));\n mImgViewMicRecord.setVisibility(View.GONE);\n mImgViewMicPlay.setVisibility(View.VISIBLE);\n mImgViewMicRecord.setEnabled(true);\n txtViewStopDescription.setText(getResources().getString(R.string.txtMicokNotOkText));\n txtViewInstructions.setText(getResources().getString(R.string.txtMicPlayInstructions));\n btnMicStop.setVisibility(View.INVISIBLE);\n layoutOkNotOkButton.setVisibility(View.VISIBLE);\n isRecordingDone = true;\n } else {\n mImgViewMicPlay.setEnabled(true);\n if (mPlayer == null || !mPlayer.isPlaying()) {\n stopPlaying();\n }\n mImgViewMicPlay.setEnabled(false);\n mImgViewMicPlay.setImageDrawable(getResources().getDrawable(R.drawable.ic_speaker_blue_svg_128));\n btnMicNotOk.setBackgroundColor(AppConstantsTheme.styleTheme.backgroundColor);\n btnMicNotOk.setEnabled(true);\n btnMicOk.setBackgroundColor(AppConstantsTheme.styleTheme.backgroundColor);\n btnMicOk.setEnabled(true);\n isListeningDone = true;\n\n/* showAlertDialog(getResources().getString(R.string.txtAlertTitleGreat), getResources().getString(R.string.txtManualMic_test_Dialog), getResources().getString(R.string.Yes),\ngetResources().getString(R.string.No));*/\n }\n }\n\n @Override\n public void onTick(long millisUntilFinished) {\n timeOnStopPress = timerDuration - millisUntilFinished + 1000;\n if (isRecorder) {\n String seconds = String.valueOf(millisUntilFinished / 1000);\n if (seconds.length() > 1) {\n mtxtViewDuration.setText(\"00:\" + seconds);\n } else {\n mtxtViewDuration.setText(\"00:0\" + seconds);\n }\n if (timerCount == 2) {\n btnMicStop.setEnabled(true);\n btnMicStop.setBackgroundColor(AppConstantsTheme.styleTheme.backgroundColor);\n } else {\n timerCount++;\n }\n } else {\n ++time;\n if (time > 9) {\n mtxtViewDuration.setText(\"00:\" + time);\n } else {\n mtxtViewDuration.setText(\"00:0\" + time);\n }\n if (time >= 2) {\n btnMicOk.setBackgroundColor(AppConstantsTheme.styleTheme.backgroundColor);\n btnMicOk.setEnabled(true);\n\n }\n }\n }\n\n }.start();\n } catch (Exception e) {\n\n }\n\n\n }", "private void startTimer(){\n timer= new Timer();\r\n task = new TimerTask() {\r\n @Override\r\n public void run() {\r\n waitDuration++;\r\n\r\n timerLabel.setText(Integer.toString(waitDuration));\r\n }\r\n };\r\n timer.scheduleAtFixedRate(task,1000,1000);\r\n }", "@Override\n public boolean isRunning() {\n return !paused;\n }", "@Override\n protected boolean isFinished() {\n if (_timer.get() > 1.0) {\n return true;\n }\n return false;\n }", "private void runTimer() {\n\n // Handler\n final Handler handler = new Handler();\n\n handler.post(new Runnable() {\n @Override\n public void run() {\n\n if (playingTimeRunning) {\n playingSecs++;\n }\n\n handler.postDelayed(this, 1000);\n }\n });\n\n }", "@Override\n public void run() {\n while(timerFlag){\n\n if(count == 400){\n\n if(value == null) {\n // value 가 0이면 보낼필요 없음\n return;\n }\n // 제어 신호 보냄\n\n controlDevice(value, subUuid , subSort);\n try {\n mTimerCountTask.stopTimer();\n mTimerCountTask.startThread();\n timer_count = false;\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n break;\n\n }\n\n count++;\n\n// Log.d(TAG, \"count : \" + count);\n\n try {\n Thread.sleep(CONTROL_OPTIONS_TIMEOUT);\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n\n }\n }", "private CountDownTimer getGameTimer() {\n CountDownTimer countDownTimer;\n countDownTimer = new CountDownTimer(gameTimeLeftYet, 100) {\n @Override\n public void onTick(long millisUntilFinished) {\n gameTimerOnTick(millisUntilFinished);\n }\n\n @Override\n public void onFinish() {\n gameTimerOnFinish();\n }\n };\n return countDownTimer;\n }", "public static void startTimer() {\n elapsedTime = 0;\r\n timerIsWorking = true;\r\n startTime = System.nanoTime() / 1000000; // ms\r\n }", "private void timerStart()\r\n { updateTimer.postDelayed(updateTimerTask, UPDATE_TIME); }", "boolean hasStopped()\n {\n if (running && ! isAlive())\n {\n nextStartTime = System.currentTimeMillis() + minDurationInMillis;\n running = false;\n return true;\n }\n return false;\n }", "public void newTurnPauseCountdown()\n {\n pauseNewTurn = true;\n pauseNewTurnTimer = 169;\n }", "boolean isDelayed();", "public void countdownToResponsiveButtonCountdown()\n {\n countdownToResponsiveButtonsTimer = 43;\n }", "public static void stopTimer() {\n timerIsWorking = false;\r\n elapsedTime = 0;\r\n }", "private void startNewTimer(){\n timer.cancel();\n timer = null;\n timesUp();\n timer = new MainGameTimer(this);\n timer.startNewRoundCountDown();\n }", "public boolean isStarted()\r\n\t{\r\n\t\treturn currentstate == TIMER_START;\r\n\t}", "public long getRunning() { return running; }", "public boolean isRunning()\n {\n\n // TODO Auto-generated method stub\n return !started || running;\n }", "public void initializeTimer (){\n \t\t timer = new CountDownTimer(30000, 100) {\n \n \t\t\t public void onTick(long millisUntilFinished) {\n \t\t\t\t activity.setTime(String.valueOf(millisUntilFinished / 1000));\n //\t\t\t\t if (millisUntilFinished>10000){\n //\t\t\t\t\t if (millisUntilFinished%1000 == 0)\n //\t\t\t\t\t\t activity.setTime(String.valueOf(millisUntilFinished / 1000));\n //\t\t\t\t }\n //\t\t\t\t else{\n //\t\t\t\t\t activity.setTime((millisUntilFinished / 1000 + \".\" + (millisUntilFinished%1000)/100));\n //\t\t\t\t }\t \n \t\t\t }\n \n \t\t\t public void onFinish() {\n \t\t\t\t activity.gameState = GuessCharadeActivity.GAME_FINISHED;\n \t\t\t\t videoView.stopPlayback();\n \t\t\t\t turn.setRecPlayerScore(0);\n \t\t\t\t turn.setAnsPlayerScore(0);\n \t\t\t\t turn.setState(Turn.FINISH);\n \t\t\t\t updateModel();\n \t\t\t\t activity.finishDialog();\n \t\t\t }\n \t\t };\n \t }", "public void start() {timer.start();}", "Timer getTimer();", "@Override\n\tpublic void CountDownFinish() {\n\t\tcheckButtonsEnable();\n\t}", "@Override\n public boolean isRunning() {\n return isRunning;\n }", "@Override\n public boolean isRunning() {\n return isRunning;\n }", "@Override\n public void run() {\n time_ = (int) (System.currentTimeMillis() - startTime_) / 1000;\n updateUI();\n\n if (time_ >= maxTime_) {\n // Log.v(VUphone.tag, \"TimerTask.run() entering timeout\");\n handler_.post(new Runnable() {\n public void run() {\n report(true);\n }\n });\n }\n }", "public TimerCheck() {\n super(\"timer_check\");\n PlayerMovementListener.EVENT.register(this);\n }", "public void run(){\n \t\t\t\tif (duration>0) {\r\n \t\t\t\t\trecord.startRecording();\r\n \t\t\t\t\tstpBtn.setEnabled(true);\r\n \t\t\t\t\t//psBtn.setEnabled(true); //TODO: pause button action\r\n \t\t\t\t\t(new Timer()).schedule(new TimerTask() {\r\n \t\t\t\t\t\tpublic void run () {\r\n \t\t\t\t\t\t\t//stop recording\r\n \t\t\t\t\t\t\trecord.stopRecording();\r\n \t\t\t\t\t\t\trcrdBtn.setEnabled(true);\r\n \t\t\t\t\t\t\tstpBtn.setEnabled(false);\r\n \t\t\t\t\t\t\tpsBtn.setEnabled(false);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}, duration);\r\n \t\t\t\t} else { //countdown, no timer\r\n \t\t\t\t\t//start recording\r\n \t\t\t\t\trecord.startRecording();\r\n \t\t\t\t\t//stop and pause buttons come visible after countdown has run\r\n \t\t\t\t\trcrdBtn.setEnabled(false);\r\n \t\t\t\t\tstpBtn.setEnabled(true);\r\n \t\t\t\t\t//psBtn.setEnabled(true); TODO: implement pause action\r\n \t\t\t\t\t//TODO: Mimimize frame to taskbar\r\n \t\t\t\t}\r\n \t\t\t}", "public interface CountDownListener {\n\n\n /**\n * Deliver's the result of the countdown to all views.\n * VIEWS MUST Implement this interface\n * @author Charles\n * @param l\n */\n void countdownResult(long l);\n\n /**\n * Signals that the countdown is complete\n * @author Charles\n */\n void onCountFinished();\n}", "private float resetTimer() {\r\n final float COUNTDOWNTIME = 10;\r\n return COUNTDOWNTIME;\r\n }", "public boolean isLingering();", "@Override\npublic void autonomousInit() {\n m_timer.reset();\n m_timer.start();\n}", "public boolean isHolding();", "public void tick(){\r\n if(timer != 0)\r\n timer++;\r\n }", "void stopUpdateTimer();", "@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile(gameTimer > 0 && !Timer.this.gameScene.popUp){\n\t\t\t\t\tcountDown();\n\t\t\t\t\ttry{\n\t\t\t\t\t\tThread.sleep(10);\n\t\t\t\t\t}catch(InterruptedException e){\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\toutOfTime = true;\n\t\t\t}", "public boolean isTimerConvergencia() {\n return timerConvergencia;\n }", "public boolean isRunning(){\n\t\treturn this.running;\n\t}", "private Timer() {\n myThread = new TimerThread();\n myThread.start();\n }", "private void startTimer(long noOfMinutes) {\n countDownTimer = new CountDownTimer(noOfMinutes, 1000) {\n public void onTick(long millisUntilFinished) {\n millis = millisUntilFinished;\n //Convert milliseconds into hour,minute and seconds\n String hms = String.format(\"%02d:%02d:%02d\", TimeUnit.MILLISECONDS.toHours(millis), TimeUnit.MILLISECONDS.toMinutes(millis) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(millis)), TimeUnit.MILLISECONDS.toSeconds(millis) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(millis)));\n tvTestTime.setText(hms);//set text\n }\n\n public void onFinish() {\n /*AlertDialog.Builder alertDialog= new AlertDialog.Builder(PracticeTestQAActivity.this);\n alertDialog.setTitle(getString(R.string.title_TestDurationExpired));\n alertDialog.setMessage(getString(R.string.msg_TestDurationExpired));\n alertDialog.setIcon(R.drawable.information);\n alertDialog.setPositiveButton(\"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n countDownTimer = null;//set CountDownTimer to null\n stopCountdown();\n }\n });\n alertDialog.show();\n*/\n countDownTimer = null;//set CountDownTimer to null\n stopCountdown();\n tvTestTime.setText(\"finish\");\n // tvTestTime.setText(\"TIME'S UP!!\"); //On finish change timer text\n\n tvTestTime.setVisibility(View.GONE);\n //goToResultActivity();\n }\n }.start();\n\n }", "public void resetTimer(){\n timerStarted = 0;\n }", "public boolean isRunning(){\n\t\treturn gameRunning;\n\t}", "private void stopCountTime() {\n\t\tendTimer();\n\t\tif(this.gameTimeThread != null) {\n try {\n this.gameTimeThread.join();\n } catch (InterruptedException ignored) {\n }\n }\n\t}", "public boolean isRunning() {\n\t\treturn !loopTask.stop;\n\t}", "@Test\n public void TestToggleSuspend(){\n \tCountDownTimer s1 = new CountDownTimer(1, 20, 30);\n \tCountDownTimer.toggleSuspend();\n \ts1.add(1000);\n \tassertEquals(s1.toString(), \"1:20:30\");\n \t\n \tCountDownTimer.toggleSuspend();\n \ts1.add(1000);\n \tassertEquals(s1.toString(), \"1:37:10\");\n }", "@FXML\r\n\t void countDownMessage2() throws InterruptedException {\n\t\t \tdisplayMessage.setText(\"3\"); \r\n\t\t \ttext = displayMessage.getText();\r\n\t\t timeSeconds = Integer.parseInt(text);\r\n\t\t \r\n\t\t Timer clock = new Timer();\r\n\t\t clock.scheduleAtFixedRate(new TimerTask() {\r\n\t\t public void run() {\r\n\t\t if(timeSeconds >= 0)\r\n\t\t {\r\n\t\t \tdisplayMessage.setText(Integer.toString(timeSeconds));\r\n\t\t timeSeconds--; \r\n\t\t }\r\n\t\t else {\r\n\t\t clock.cancel();\r\n\t\t displayMessage.setText(\"DupMe!\");\r\n\t\t try {\r\n\t\t\t\t\t\t\t\tcountDown2();\r\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t \r\n\t\t //do something here after says GO!\r\n\t\t wordCount.setVisible(true);\r\n\t\t wordMax.setVisible(true);\r\n\t\t slash.setVisible(true);\r\n\t\t counterBox.setVisible(true);\r\n\t\t yourPattern.setVisible(true);\r\n\t\t lastPattern.setVisible(true);\r\n\t\t }\r\n\t\t }\r\n\t\t }, 1000,1000);\r\n }", "public boolean isRunning() {\n return isRunning;\n }", "public boolean isRunning() {\n return bRunning;\n }", "public void onBtnBeginClicked(View v) {\n progressBar.setSecondaryProgress(0);\n\n //Setting initial value to time textview\n txtTime.setText(String.format(\"%d\\\"\", PROGRESSBAR_TIME_MS / 1000));\n\n //Disable button to prevent more clicks\n btnBegin.setEnabled(false);\n\n new CountDownTimer(PROGRESSBAR_TIME_MS, PROGRESSBAR_INTERVAL_MS) {\n\n public void onTick(long millisUntilFinished) {\n\n //Setting current step to progress bar\n int progress = (int)(Math.ceil((PROGRESSBAR_TIME_MS - millisUntilFinished)/(double)PROGRESSBAR_INTERVAL_MS));\n progressBar.setSecondaryProgress(progress);\n\n //Updating value to time textview\n txtTime.setText(String.format(\"%d\\\"\", millisUntilFinished / 1000));\n\n }\n\n public void onFinish() {\n\n //final value for the progress bar (100%)\n progressBar.setSecondaryProgress(PROGRESSBAR_TIME_MS);\n\n Toast.makeText(getApplicationContext(), \"FINISHED TIME\", Toast.LENGTH_SHORT).show();\n\n //Enable button again\n btnBegin.setEnabled(true);\n }\n }.start();\n\n\n\n }", "@FXML\r\n\t void countDownMessage() throws InterruptedException {\n\t\t \tdisplayMessage.setText(\"3\"); \r\n\t\t \ttext = displayMessage.getText();\r\n\t\t timeSeconds = Integer.parseInt(text);\r\n\t\t \r\n\t\t Timer clock = new Timer();\r\n\t\t clock.scheduleAtFixedRate(new TimerTask() {\r\n\t\t public void run() {\r\n\t\t if(timeSeconds >= 0)\r\n\t\t {\r\n\t\t \tdisplayMessage.setText(Integer.toString(timeSeconds));\r\n\t\t timeSeconds--; \r\n\t\t }\r\n\t\t else {\r\n\t\t clock.cancel();\r\n\t\t displayMessage.setText(\"GO!\");\r\n\t\t try {\r\n\t\t\t\t\t\t\t\tcountDown();\r\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t \r\n\t\t //do something here after says GO!\r\n\t\t wordCount.setVisible(true);\r\n\t\t wordMax.setVisible(true);\r\n\t\t slash.setVisible(true);\r\n\t\t counterBox.setVisible(true);\r\n\t\t }\r\n\t\t }\r\n\t\t }, 1000,1000);\r\n }", "private void startTime()\n {\n timer.start();\n }", "@Override\n public boolean isRunning() {\n return running;\n }", "private void reactMain_region_digitalwatch_Time_counting_Counting() {\n\t\tif (timeEvents[0]) {\n\t\t\tnextStateIndex = 0;\n\t\t\tstateVector[0] = State.$NullState$;\n\n\t\t\ttimer.unsetTimer(this, 0);\n\n\t\t\ttimer.setTimer(this, 0, 1 * 1000, false);\n\n\t\t\tsCILogicUnit.operationCallback.increaseTimeByOne();\n\n\t\t\tnextStateIndex = 0;\n\t\t\tstateVector[0] = State.main_region_digitalwatch_Time_counting_Counting;\n\t\t}\n\t}" ]
[ "0.7876987", "0.74721944", "0.7104088", "0.6973593", "0.68318397", "0.681886", "0.67435217", "0.6616644", "0.6593633", "0.6536235", "0.653136", "0.65194696", "0.6503132", "0.65021145", "0.64830977", "0.6471773", "0.6449558", "0.64421046", "0.6419247", "0.6419247", "0.6419247", "0.6419247", "0.6419247", "0.64144844", "0.6410334", "0.6400672", "0.6391284", "0.6379397", "0.63708967", "0.63456553", "0.63344574", "0.63344574", "0.63344574", "0.63344574", "0.63344574", "0.63344574", "0.6327997", "0.6327012", "0.63107437", "0.6295239", "0.6278931", "0.6277156", "0.62669337", "0.6208445", "0.61782604", "0.61736137", "0.6167319", "0.61672586", "0.6159362", "0.61514336", "0.6144922", "0.61438304", "0.6132137", "0.6117705", "0.6117144", "0.61168474", "0.61096877", "0.6108681", "0.61002475", "0.6100156", "0.6096105", "0.6089101", "0.60890675", "0.60616803", "0.6059533", "0.60581964", "0.60541886", "0.60511065", "0.602505", "0.60238856", "0.6022922", "0.6018489", "0.6018489", "0.6013783", "0.6011714", "0.5988694", "0.59871995", "0.5983219", "0.5981804", "0.5951789", "0.59409845", "0.5939536", "0.59318924", "0.5923099", "0.59186316", "0.5916075", "0.5913607", "0.5899432", "0.5899418", "0.58924025", "0.5892198", "0.5884053", "0.5878321", "0.58664715", "0.58485866", "0.5848115", "0.5844729", "0.58395815", "0.5826689", "0.5825987", "0.5820714" ]
0.0
-1
String phone = tvAddress.getText().toString().trim();
private boolean validateAddress() { if (address==null) { tvAddress.setText(String.format("%s*", getString(R.string.address_activity))); showToast(getString(R.string.error_address_required)); return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String getphoneNumber() {\n return ((EditText)findViewById(R.id.phoneNumberUserPage)).getText().toString().trim();\n }", "@Override\n public void onClick(View view) {\n String phoneNumber = phoneNumberEditText.getText().toString();\n // atata timp cat exista caractere in EditText => ele pot fi sterse\n if (phoneNumber.length() > 0) {\n // se sterge mereu ultima cifra / ultimul caracter\n phoneNumber = phoneNumber.substring(0, phoneNumber.length() - 1);\n phoneNumberEditText.setText(phoneNumber);\n }\n }", "java.lang.String getPhone();", "java.lang.String getUserPhone();", "public String inputPhoneNumber() {\n String phoneNumber = editTextPhoneNumber.getText().toString();\n return phoneNumber;\n }", "public static String getText(EditText et) {\n return et.getText().toString().trim();\n }", "java.lang.String getPhoneNumber();", "java.lang.String getPhoneNumber();", "java.lang.String getPhoneNumber();", "private boolean isPhoneValid(String phone) {\n return !phone.contains(\" \");\r\n }", "public String getText() {\n\t\treturn fragTelephone.getText().toString();\r\n\r\n\t}", "public static String getString(EditText editText) {\n\n if (!TextUtils.isEmpty(editText.getText().toString())) {\n\n return editText.getText().toString().trim();\n } else {\n\n return \"\";\n }\n\n }", "private String getIp(){\n\t\tStringBuilder ip=new StringBuilder(20);\n\t\t\n\t\tEditText ip1=(EditText) findViewById(R.id.ipaddress_text_1);\n\t\tEditText ip2=(EditText) findViewById(R.id.ipaddress_text_2);\n\t\tEditText ip3=(EditText) findViewById(R.id.ipaddress_text_3);\n\t\tEditText ip4=(EditText) findViewById(R.id.ipaddress_text_4);\n\t\tEditText ip5=(EditText) findViewById(R.id.ipaddress_text_5);\n\t\t\n\t\tip.append(ip1.getText());\n\t\tip.append('.');\n\t\tip.append(ip2.getText());\n\t\tip.append('.');\n\t\tip.append(ip3.getText());\n\t\tip.append('.');\n\t\tip.append(ip4.getText());\n\t\tif(!(ip5.getText().toString().equals(\"\"))){\n\t\t\tip.append(':');\n\t\t\tip.append(ip5.getText());\n\t\t}\n\t\t\n\t\treturn ip.toString();\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\n\t\t\t\tif(0 != phone_num_edt.getText().length()){\n\t\t\t\t\t// To delete the last character in edittext\n\t\t\t\t\tphone_num_edt.getText().delete(phone_num_edt.getText().length() - 1,\n\t\t\t\t\t\t\tphone_num_edt.getText().length());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "public static String getString(TextView view) {\n return view.getText().toString().trim();\n }", "public String getPhoneNumber(){\n\t\t \n\t\t TelephonyManager mTelephonyMgr;\n\t\t mTelephonyMgr = (TelephonyManager)\n\t\t activity.getSystemService(Context.TELEPHONY_SERVICE); \n\t\t return mTelephonyMgr.getLine1Number();\n\t\t \n\t\t}", "public static String getString(TextView textView) {\n\n return textView.getText().toString().trim();\n }", "public String getaPhone() {\n return aPhone;\n }", "@AutoEscape\n\tpublic String getPhone();", "@Override\n\tpublic void onBackPressed() {\n\t\tString phone = et_insertnumber.getText().toString().trim();\n\t\tif(TextUtils.isEmpty(phone)){\n\t\t\tToast.makeText(addphoneNumber.this, \"不能为空啊,大哥\",0).show();\n\t\t\treturn;\n\t\t}\n\t}", "public java.lang.CharSequence getPhoneNumber() {\n return phone_number;\n }", "private String getPhone()\n {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"\");\n System.out.print(\"Indtast telefonnummer: \");\n return scanner.nextLine();\n }", "public String getPhone(){\n return phone;\n }", "public String getPhone(){\n return phone;\n }", "public String getUserPhone()\n {\n return userPhone;\n }", "private boolean checkPhoneNum() {\n\t\tphoneNum = et_phone.getText().toString().trim();\r\n\t\tif(isMobileNO(phoneNum)){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public String getPhoneNumber(){\n return phone_number;\n }", "public Address validAddress(TextInputLayout tiAddress, EditText etAddress) {\n String addressString = etAddress.getText().toString().trim();\n Address address = null;\n\n if (addressString.length() == 0)\n tiAddress.setError(c.getString(R.string.required));\n else if (addressString.length() < ADDRESS_MIN_SIZE)\n tiAddress.setError(c.getString(R.string.minLength, Integer.toString(ADDRESS_MIN_SIZE)));\n else if (addressString.length() > ADDRESS_MAX_SIZE)\n tiAddress.setError(c.getString(R.string.maxLength, Integer.toString(ADDRESS_MAX_SIZE)));\n else {\n Geocoder geocoder = new Geocoder(c, Locale.getDefault());\n addressString += \", BC\";\n try {\n List<Address> addressList = geocoder.getFromLocationName(addressString, 1);\n if (addressList == null || addressList.size() == 0)\n tiAddress.setError(c.getString(R.string.invalid));\n else {\n tiAddress.setError(null);\n address = addressList.get(0);\n }\n } catch (Exception ex) {\n Log.d(TAG, ex.getMessage());\n tiAddress.setError(c.getString(R.string.checkInternet));\n }\n }\n\n return address;\n }", "private String getUserName() {\n EditText nameEditText = (EditText) findViewById(R.id.name_edit_text);\n return nameEditText.getText().toString().trim();\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(phoneet.getText().toString().length()==11){\r\n\t\t\t\t\tphonell.setVisibility(View.GONE);\r\n\t\t\t\t\tyanzhengmall.setVisibility(View.VISIBLE);\r\n\t\t\t\t\tphonetv.setTextColor(getResources().getColor(R.color.bg_Black));\r\n\t\t\t\t\tyanzhengmatv.setTextColor(getResources().getColor(R.color.top_background));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tToastUtil.showToast(RegisterActivity.this, \"手机号格式不正确\");\r\n\t\t\t\t}\r\n\t\t\t}", "public String getPhone(){\n\t\treturn phone;\n\t}", "@Override\n public void onClick(View view) {\n phoneNumberEditText.setText(phoneNumberEditText.getText().toString() + ((Button)view).getText().toString());\n }", "private void setTextWatcherListener() {\n\n TextWatcher textWatcher = new TextWatcher() {\n @Override\n public void onTextChanged(CharSequence s, int start, int before,int count) { }\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count,int after) {}\n @Override\n public void afterTextChanged(Editable s) {\n //Due To Pakistan Phone number start with 3\n if (s.toString().length() == 1 && !s.toString().startsWith(\"3\")) {\n s.clear();\n }\n }\n };\n\n //Set Listener\n etPhoneNumber.addTextChangedListener(textWatcher);\n\n }", "public String getPhone() {\n return mPhone;\n }", "public String getPhone() {\n return mPhone;\n }", "private String getMyPhoneNO() {\n String mPhoneNumber;\n TelephonyManager tMgr = (TelephonyManager) this.getActivity().getSystemService(Context\n .TELEPHONY_SERVICE);\n mPhoneNumber = tMgr.getLine1Number();\n if(mPhoneNumber == null)\n mPhoneNumber = \"+NoNotFound\";\n return mPhoneNumber;\n }", "public static String validatePhoneInput(Context context, TextInputEditText editText) {\n // store input\n String rawPhone = editText.getText().toString().trim();\n\n if (TextUtils.isEmpty(rawPhone)) {\n editText.setError(context.getResources().getString(R.string.editor_edt_empty_input));\n return null;\n }\n\n if (!Patterns.PHONE.matcher(rawPhone).matches()) {\n editText.setError(context.getResources().getString(R.string.editor_edt_invalid_input));\n return null;\n }\n\n return rawPhone;\n }", "public java.lang.CharSequence getPhoneNumber() {\n return phone_number;\n }", "public String mo38889c() {\n String trim = this.f30736g0.getText().toString().trim();\n return trim.length() == 5 ? trim.substring(3, 5) : \"\";\n }", "public void setaPhone(String aPhone) {\n this.aPhone = aPhone == null ? null : aPhone.trim();\n }", "public String mo38887b() {\n String trim = this.f30736g0.getText().toString().trim();\n if (trim.length() < 2) {\n return \"\";\n }\n return trim.substring(0, 2);\n }", "public void phone_validate(View v1) {\n Intent A2Intent = new Intent (v1.getContext(), Main2Activity.class);\n EditText phone = (EditText) findViewById(R.id.editText);\n // pass the entered phone number to the next activity\n //A2Intent.putExtra(\"phoneNumber\", tv2.getText());\n String ph = phone.getText().toString();\n A2Intent.putExtra(\"phoneNumber\", ph);\n\n // start the next activity/page\n startActivity(A2Intent);\n\n\n }", "public String getMyPhoneNumber() {\n return ((TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE))\n .getLine1Number();\n }", "public String getTelephone() {\n return (String) get(\"telephone\");\n }", "public static String getFormattedTextFromField(EditText field) {\n return field.getText().toString().replaceAll(\" \", \"\");\n }", "public final String getPhone() {\n return phone;\n }", "public String getUserPhone() {\r\n return userPhone;\r\n }", "public String getPhone() {\n return phone;\n }", "public String getPhone() {\n return phone;\n }", "public String getPhone() {\n return phone;\n }", "public String getPhone() {\n return phone;\n }", "public String getPhone() {\n return phone;\n }", "public String getPhone() {\n return phone;\n }", "public String getPhone() {\n return phone;\n }", "public String getPhone() {\n return phone;\n }", "public String getPhone() {\n return phone;\n }", "public String getPhone() {\n return phone;\n }", "public String getPhone() {\n return phone;\n }", "public String getPhone() {\n return phone;\n }", "public String getPhone() {\n return phone;\n }", "public String getPhone() {\n return phone;\n }", "public String getPhone() {\n return phone;\n }", "public String getPhone() {\n return phone;\n }", "public String getPhone() {\r\n return phone;\r\n }", "public String getPhone() {\r\n return phone;\r\n }", "public String getPhone() {\r\n return phone;\r\n }", "public String getPhone() {\r\n return phone;\r\n }", "public String getPhone() {\r\n return phone;\r\n }", "public String getPhone() {\r\n return phone;\r\n }", "public String getStudentName(){\n return studentName.getText().trim();\n }", "String formatPhoneNumber(String phoneNumber);", "public String getPhone() {\n return phone;\n }", "public String validarTelefono(String tel) {\n int lon = tel.length();\n if (lon == 9) {\n if (isNumeric(tel)) {\n return tel;\n } else {\n return \"\";\n }\n } else if (lon == 8) {\n return \"0\" + tel;\n } else if (lon == 7) {\n return \"07\" + tel;\n } else if (lon == 6) {\n return \"072\" + tel;\n } else {\n return \"\";\n }\n }", "public String getPhoneNumberString() {\n return mPhoneNumberString;\n }", "public java.lang.String getPhone () {\n\t\treturn phone;\n\t}", "public String getTelphone() {\n return telphone;\n }", "public String getTelphone() {\n return telphone;\n }", "public String getTelphone() {\n return telphone;\n }", "public java.lang.String getPhone() {\n return phone;\n }", "java.lang.String getPhonenumber();", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 1 && resultCode == RESULT_OK) {\n Cursor cursor = null;\n try {\n Uri uri = data.getData();\n cursor = getContentResolver().query(uri, new String[]{\n ContactsContract.CommonDataKinds.Phone.NUMBER}, null, null, null);\n if (cursor != null && cursor.moveToNext()) {\n String phone = cursor.getString(0);\n edtnohp.setText(phone);\n }\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n } }", "@Override\r\n\tpublic String getPhone() {\n\t\treturn phone;\r\n\t}", "public String getPhone() {\r\n\t\treturn this.phone;\r\n\t}", "public String getPhone() {\n return _phone;\n }", "public String getText(){\n return input.getText().toString();\n }", "public String getPhoneNumber(){\r\n\t\treturn phoneNumber;\r\n\t}", "public String getEditText() {\n\t\tif (View.VISIBLE == editText.getVisibility()) {\n\t\t\treturn editText.getText().toString().trim();\n\t\t}else {\n\t\t\treturn \"\";\n\t\t}\n\t}", "public String getPhone() {\n\t\treturn phone;\n\t}", "public abstract String getPhone3();", "public String getPhoneNumber() {\n return mPhoneNumber;\n }", "public void startMobileWithOnlyNumber92(final EditText et_email)\n {\n\n et_email.addTextChangedListener(new TextWatcher()\n {\n public void afterTextChanged(Editable s)\n {\n String x = s.toString();\n\n\n if (x.startsWith(\"1\")){\n\n Toast.makeText(LoginActivity.this, \"Pleae enter number starting with 03\", Toast.LENGTH_SHORT).show();\n et_email.setText(\"\");\n }\n if (x.startsWith(\"2\")){\n\n Toast.makeText(LoginActivity.this, \"Pleae enter number starting with 03\", Toast.LENGTH_SHORT).show();\n et_email.setText(\"\");\n }\n if (x.startsWith(\"3\")){\n\n Toast.makeText(LoginActivity.this, \"Pleae enter number starting with 03\", Toast.LENGTH_SHORT).show();\n et_email.setText(\"\");\n }\n\n if (x.startsWith(\"4\")){\n\n Toast.makeText(LoginActivity.this, \"Pleae enter number starting with 03\", Toast.LENGTH_SHORT).show();\n et_email.setText(\"\");\n }\n if (x.startsWith(\"5\")){\n\n Toast.makeText(LoginActivity.this, \"Pleae enter number starting with 03\", Toast.LENGTH_SHORT).show();\n et_email.setText(\"\");\n }\n if (x.startsWith(\"6\")){\n\n Toast.makeText(LoginActivity.this, \"Pleae enter number starting with 03\", Toast.LENGTH_SHORT).show();\n et_email.setText(\"\");\n }\n if (x.startsWith(\"7\")){\n\n Toast.makeText(LoginActivity.this, \"Pleae enter number starting with 03\", Toast.LENGTH_SHORT).show();\n et_email.setText(\"\");\n }\n if (x.startsWith(\"8\")){\n\n Toast.makeText(LoginActivity.this, \"Pleae enter number starting with 03\", Toast.LENGTH_SHORT).show();\n et_email.setText(\"\");\n }\n if (x.startsWith(\"9\")){\n\n Toast.makeText(LoginActivity.this, \"Pleae enter number starting with 03\", Toast.LENGTH_SHORT).show();\n et_email.setText(\"\");\n }\n\n if (x.startsWith(\"0\")){\n if (x.length()==11){\n //doctorSignInEmail.setText(x);\n et_email.setFilters(new InputFilter[] {new InputFilter.LengthFilter(11)});\n\n }\n }\n else {\n et_email.setFilters(new InputFilter[] {new InputFilter.LengthFilter(120)});\n }\n\n }\n public void beforeTextChanged(CharSequence s, int start, int count, int after)\n {\n\n }\n public void onTextChanged(CharSequence s, int start, int before, int count)\n {\n\n }\n });//end for login editText\n\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent i) {\n // TODO Auto-generated method stub\n super.onActivityResult(requestCode, resultCode, i);\n\n if (requestCode == REQUEST_CODE) {\n if (resultCode == RESULT_OK) {\n Uri uri = i.getData();\n String[] projection = {Phone.NUMBER, Phone.DISPLAY_NAME};\n\n Cursor cursor = getContentResolver().query(uri, projection,\n null, null, null);\n cursor.moveToFirst();\n\n int numberColumnIndex = cursor.getColumnIndex(Phone.NUMBER);\n String number = cursor.getString(numberColumnIndex);\n\n etPhone.setText(number);\n }\n }\n }", "public void set_phone(String Phone)\n {\n phone =Phone;\n }", "public static String beautifyPhone(String phone) {\r\n\t\tif (isNullOrEmpty(phone)) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\tif (phone.startsWith(\"84\")) {\r\n\t\t\treturn \"0\" + phone.substring(2);\r\n\t\t}\r\n\t\tif (phone.startsWith(\"+84\")) {\r\n\t\t\treturn \"0\" + phone.substring(3);\r\n\t\t}\r\n\t\treturn phone;\r\n\t}", "public String getSenderPhoneNumber();", "public String returnPhoneNumber() {\n\t\treturn this.registration_phone.getAttribute(\"value\");\r\n\t}", "public String getUserphone() {\n return userphone;\n }", "public void setPhoneNumber(java.lang.CharSequence value) {\n this.phone_number = value;\n }", "public String getTelephoneNumber(){\n return telephoneNumber;\n }", "public void setUserPhone(String userPhone) {\r\n this.userPhone = userPhone == null ? null : userPhone.trim();\r\n }" ]
[ "0.7096059", "0.64660305", "0.6389461", "0.6316758", "0.62632823", "0.61107945", "0.60767746", "0.60767746", "0.60767746", "0.6034582", "0.59905267", "0.5980722", "0.591855", "0.58940667", "0.5871814", "0.58520323", "0.57756644", "0.57729506", "0.5769309", "0.5758894", "0.5743871", "0.5742834", "0.5730537", "0.5730537", "0.57154393", "0.56963485", "0.5691166", "0.5681053", "0.56740135", "0.56468576", "0.5635696", "0.5630839", "0.5627637", "0.56266564", "0.56266564", "0.562662", "0.56135684", "0.56099033", "0.5609602", "0.5600115", "0.5597285", "0.5571851", "0.5569855", "0.5563678", "0.5548622", "0.55392605", "0.5538882", "0.5532652", "0.5532652", "0.5532652", "0.5532652", "0.5532652", "0.5532652", "0.5532652", "0.5532652", "0.5532652", "0.5532652", "0.5532652", "0.5532652", "0.5532652", "0.5532652", "0.5532652", "0.5532652", "0.55315995", "0.55315995", "0.55315995", "0.55315995", "0.55315995", "0.55315995", "0.55160934", "0.55088305", "0.5478577", "0.5475256", "0.5449274", "0.54214317", "0.5417756", "0.5417756", "0.5417756", "0.5413981", "0.54118705", "0.54076475", "0.5402612", "0.5401081", "0.5397182", "0.5386254", "0.5385587", "0.53780437", "0.53761697", "0.53706867", "0.5362076", "0.5354481", "0.53506184", "0.5347382", "0.5342235", "0.53413534", "0.53382814", "0.5335724", "0.53293", "0.5326923", "0.5318664" ]
0.57142764
25
TODO Autogenerated method stub
@Override public List<Object[]> getTotalStocks(int storageLocId) { try { listOfObjcts=boardDao.getTotalStocks(storageLocId); } catch(Exception e) { e.printStackTrace(); } return listOfObjcts; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public List<PendingPo> getPendingPoDetails(String count) { List<PendingPo> pendingPos=null; try { pendingPos=boardDao.getPendingPoDetails(count); } catch(Exception e) { logger.error(e.getMessage()); } return pendingPos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public List<GoodsDeliveryInTheYear> getGoodsinyear(String msg) { List<GoodsDeliveryInTheYear> deliveryInTheYears=null; try { deliveryInTheYears=boardDao.getGoodsinyear(msg); } catch(Exception e) { logger.error(e.getMessage()); } return deliveryInTheYears; }
{ "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}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\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\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void 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.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
TODO Autogenerated method stub
@Override public List<ToBeReoredeMaterial> getTobeReorederLevels(String msg) { List<ToBeReoredeMaterial> reorederLevels=null; try { reorederLevels=boardDao.getTobeReorederLevels(msg); } catch(Exception e) { logger.error(e.getMessage()); } return reorederLevels; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public List<InvoiceToCollect> invoiceToCollect(String count) { List<InvoiceToCollect> collects=null; try { collects=boardDao.invoiceToCollect(count); } catch(Exception e) { logger.error(e.getMessage()); } return collects; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public List<InvoiceToPay> getInvoiceToPays(String count) { List<InvoiceToPay> invoiceToPays=null; try { invoiceToPays=boardDao.getInvoiceToPays(count); } catch(Exception e) { logger.error(e.getMessage()); } return invoiceToPays; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public List<MatStockBean> getMatStockDetails() { List<MatStockBean> matStockBeans=null; try { listOfObjcts=boardDao.getMatStockDetails(); matStockBeans=new ArrayList<MatStockBean>(); Iterator<Object[]> iterator=listOfObjcts.iterator(); while(iterator.hasNext()) { Object[] objects=(Object[])iterator.next(); MatStockBean stockBean=new MatStockBean(); stockBean.setMatStockId((Integer)objects[0]); stockBean.setBatchNo((String)objects[1]); stockBean.setQtyAval((Float)objects[2]); StorageLocation location=(StorageLocation)objects[3]; Material material=(Material)objects[4]; stockBean.setMaterialName(material.getMaterialName()); stockBean.setStorageLocName(location.getStorageLocation()); matStockBeans.add(stockBean); } } catch(Exception e) { logger.error(e.getMessage()); } return matStockBeans; }
{ "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}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\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\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void 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.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
TODO Autogenerated method stub
@Override public List<Top5OrderItems> getTop5orderItems() { List<Object[]> list=null; List<Top5OrderItems> top5OrderItems=null; try { list=boardDao.getTop5orderItems(); top5OrderItems=new ArrayList<Top5OrderItems>(); Iterator<Object[]> iterator=list.iterator(); while(iterator.hasNext()) { Object[] objects=(Object[])iterator.next(); Top5OrderItems orderItems=new Top5OrderItems(); orderItems.setMaterial((String)objects[0]); orderItems.setQuantity(Float.valueOf((String)objects[1])); top5OrderItems.add(orderItems); } } catch(Exception e) { logger.error(e.getMessage()); } return top5OrderItems; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public List<GetSalesOrderByYear> getSalesOrdersByYear(int year) { List<Object[]> list=null; List<GetSalesOrderByYear> byYears=null; try { list=boardDao.getSalesOrdersByYear(year); byYears=new ArrayList<GetSalesOrderByYear>(); Iterator<Object[]> iterator=list.iterator(); while(iterator.hasNext()) { Object[] objects=(Object[])iterator.next(); GetSalesOrderByYear salesOrderByYear=new GetSalesOrderByYear(); salesOrderByYear.setMaterial((String)objects[0]); salesOrderByYear.setMatpct(Float.valueOf((String)objects[1])); byYears.add(salesOrderByYear); } } catch(Exception e) { e.printStackTrace(); logger.error(e.getMessage()); } return byYears; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public List<Top5OrderItems> allorderItems() { List<Object[]> list=null; List<Top5OrderItems> top5OrderItems=null; try { list=boardDao.allorderItems(); top5OrderItems=new ArrayList<Top5OrderItems>(); Iterator<Object[]> iterator=list.iterator(); while(iterator.hasNext()) { Object[] objects=(Object[])iterator.next(); Top5OrderItems orderItems=new Top5OrderItems(); orderItems.setMaterial((String)objects[0]); orderItems.setQuantity(Float.valueOf((String)objects[1])); top5OrderItems.add(orderItems); } } catch(Exception e) { logger.error(e.getMessage()); } return top5OrderItems; }
{ "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
Get token validity period for the Self contained JWT Access Token.
public static long getAccessTokenLifeTimeInSeconds(OAuthTokenReqMessageContext tokenReqMessageContext, OAuthAppDO oAuthAppDO) throws IdentityOAuth2Exception { long lifetimeInSeconds; boolean isUserAccessTokenType = isUserAccessTokenType(tokenReqMessageContext.getOauth2AccessTokenReqDTO().getGrantType()); if (isUserAccessTokenType) { lifetimeInSeconds = oAuthAppDO.getUserAccessTokenExpiryTime(); if (log.isDebugEnabled()) { log.debug("User Access Token Life time set to : " + lifetimeInSeconds + " sec."); } } else { if (tokenReqMessageContext.getValidityPeriod() == -1) { // the token request does not specify the validity period explicitly lifetimeInSeconds = oAuthAppDO.getApplicationAccessTokenExpiryTime(); } else { // set the expiry time sent in the request lifetimeInSeconds = getSecondsTillExpiry(tokenReqMessageContext.getValidityPeriod()); } if (log.isDebugEnabled()) { log.debug("Application Access Token Life time set to : " + lifetimeInSeconds + " sec."); } } if (lifetimeInSeconds == 0) { if (isUserAccessTokenType) { lifetimeInSeconds = OAuthServerConfiguration.getInstance().getUserAccessTokenValidityPeriodInSeconds(); if (log.isDebugEnabled()) { log.debug("User access token time was 0ms. Setting default user access token lifetime : " + lifetimeInSeconds + " sec."); } } else { lifetimeInSeconds = OAuthServerConfiguration.getInstance().getApplicationAccessTokenValidityPeriodInSeconds(); if (log.isDebugEnabled()) { log.debug("Application access token time was 0ms. Setting default Application access token " + "lifetime : " + lifetimeInSeconds + " sec."); } } } if (log.isDebugEnabled()) { log.debug("JWT Self Signed Access Token Life time set to : " + lifetimeInSeconds + " sec."); } return lifetimeInSeconds; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getTokenValidityInSeconds() {\n return tokenValidityInSeconds;\n }", "public Integer getAccessTokenValiditySeconds() {\n return accessTokenValiditySeconds;\n }", "Duration getTokenExpiredIn();", "public long getTokenExpirationInMillis() {\n return tokenExpirationInMillis;\n }", "public int getContainerTokenExpiryInterval() {\n return containerTokenExpiryInterval;\n }", "public long getTokenValidityInSecondsForRememberMe() {\n return tokenValidityInSecondsForRememberMe;\n }", "public Integer getRefreshTokenValiditySeconds() {\n return refreshTokenValiditySeconds;\n }", "@Override\n\tpublic long getTokenExpiryTime() {\n\t\treturn 0;\n\t}", "public boolean checkTokenExpiry(String token) {\n System.out.println(token);\n Date now = new Date();\n long nowTime = now.getTime();\n //Date expire;\n Date tokenEXPClaim;\n long expires;\n try {\n DecodedJWT recievedToken = JWT.decode(token);\n tokenEXPClaim = recievedToken.getExpiresAt();\n expires = tokenEXPClaim.getTime();\n return nowTime >= expires;\n } \n catch (Exception exception){\n System.out.println(\"Problem with token, no way to check expiry\");\n System.out.println(exception);\n return true;\n }\n \n }", "public boolean checkTokenExpiry() {\n //System.out.println(\"Checking token expiry...\");\n Date now = new Date();\n long nowTime = now.getTime();\n //Date expire;\n Date tokenEXPClaim;\n long expires;\n try {\n DecodedJWT recievedToken = JWT.decode(currentAccessToken);\n tokenEXPClaim = recievedToken.getExpiresAt();\n expires = tokenEXPClaim.getTime();\n //System.out.println(\"Now is \"+nowTime);\n //System.out.println(\"Expires at \"+expires);\n //System.out.println(\"Expired? \"+(nowTime >= expires));\n return nowTime >= expires;\n } \n catch (Exception exception){\n System.out.println(\"Problem with token, no way to check expiry\");\n System.out.println(exception);\n return true;\n }\n \n }", "protected boolean validateExpiration(SignedJWT jwtToken) {\n boolean valid = false;\n try {\n Date expires = jwtToken.getJWTClaimsSet().getExpirationTime();\n if (expires == null || new Date().before(expires)) {\n LOG.debug(\"JWT token expiration date has been \"\n + \"successfully validated\");\n valid = true;\n } else {\n LOG.warn(\"JWT expiration date validation failed.\");\n }\n } catch (ParseException pe) {\n LOG.warn(\"JWT expiration date validation failed.\", pe);\n }\n return valid;\n }", "public boolean accessTokenExpired() {\n Date currentTime = new Date();\n if ((currentTime.getTime() - lastAccessTime.getTime()) > TIMEOUT_PERIOD) {\n return true;\n } else {\n return false;\n }\n }", "long getExpiration();", "public long getExpiration() {\n return expiration;\n }", "public static long getAccessTokenLifeTimeInSeconds(OAuthAppDO oAuthAppDO) {\n\n long lifetimeInSeconds = oAuthAppDO.getUserAccessTokenExpiryTime();\n if (lifetimeInSeconds == 0) {\n lifetimeInSeconds = OAuthServerConfiguration.getInstance()\n .getUserAccessTokenValidityPeriodInSeconds();\n if (log.isDebugEnabled()) {\n log.debug(\"User access token time was 0ms. Setting default user access token lifetime : \"\n + lifetimeInSeconds + \" sec.\");\n }\n }\n\n if (log.isDebugEnabled()) {\n log.debug(\"JWT Self Signed Access Token Life time set to : \" + lifetimeInSeconds + \" sec.\");\n }\n return lifetimeInSeconds;\n }", "private boolean hasCoolOffPeriodExpired(Jwt jwt) {\n\n Date issuedAtTime = jwt.getClaimsSet().getIssuedAtTime();\n\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(new Date());\n calendar.set(Calendar.MILLISECOND, 0);\n calendar.add(Calendar.MINUTE, -1);\n\n return calendar.getTime().compareTo(issuedAtTime) > 0;\n }", "@ApiModelProperty(value = \"The lifetime in seconds of the access token\")\n public String getExpiresIn() {\n return expiresIn;\n }", "public int getExpiry();", "protected int getAccessTokenValiditySeconds(OAuth2Request clientAuth) {\n if (clientDetailsService != null) {\n ClientDetails client = clientDetailsService.loadClientByClientId(clientAuth.getClientId());\n Integer validity = client.getAccessTokenValiditySeconds();\n if (validity != null) {\n return validity;\n }\n }\n return accessTokenValiditySeconds;\n }", "boolean checkForExpiration() {\n boolean expired = false;\n\n // check if lease exists and lease expire is not MAX_VALUE\n if (leaseId > -1 && leaseExpireTime < Long.MAX_VALUE) {\n\n long currentTime = getCurrentTime();\n if (currentTime > leaseExpireTime) {\n if (logger.isTraceEnabled(LogMarker.DLS_VERBOSE)) {\n logger.trace(LogMarker.DLS_VERBOSE, \"[checkForExpiration] Expiring token at {}: {}\",\n currentTime, this);\n }\n noteExpiredLease();\n basicReleaseLock();\n expired = true;\n }\n }\n\n return expired;\n }", "public boolean isExpiredToken(String jwt) {\n try {\n Claims claims = Jwts.parser()\n .setSigningKey(DatatypeConverter.parseBase64Binary(\"TerryLam\"))\n .parseClaimsJws(jwt).getBody();\n Date expiration = claims.getExpiration();\n //If the expiration Date is a time BEFORE the current time, it is expired\n if (expiration.before(new Date())) {\n return true;\n } else {\n return false;\n }\n } catch (JwtException ex) {\n log.info(\"Error validating token. Exception Message \" + ex.getMessage());\n return true;\n }\n }", "boolean isComponentAccessTokenExpired();", "public Double tokenRefreshExtensionHours() {\n return this.tokenRefreshExtensionHours;\n }", "public long getExpiry() {\n return this.expiry;\n }", "int getExpiryTimeSecs();", "public boolean isSecurityTokenExpired() {\n return System.currentTimeMillis() > securityTokenExpiryTime || isExpired();\n }", "public long getExpiry() {\n return this.contextSet.getExpiration();\n }", "@Override\n public final double getExpiration() {\n return safetyHelper.getExpiration();\n }", "public synchronized void checkTokenExpiry() {\n if (this.mExpiryDate != null && this.mExpiryDate.getTime() <= System.currentTimeMillis() + REFRESH_THRESHOLD) {\n acquireTokenAsync();\n }\n }", "@Range(min = 0)\n\t@NotNull\n\tpublic Integer getExpiration() {\n\t\treturn this.expiration;\n\t}", "long getExpirationDate();", "public Date getExperiyDate(String token) {\n\t\treturn getClaims(token).getExpiration();\n\n\t}", "@GetMapping(\"/validate\")\n\tpublic ResponseEntity<?> getValidity(@RequestHeader(\"Authorization\") String jwtToken) {\n\t\treturn new ResponseEntity<AuthResponse>(this.service.validate(jwtToken) , HttpStatus.OK);\n\t}", "public int getExpiry()\n {\n return expiry;\n }", "protected int getRefreshTokenValiditySeconds(OAuth2Request clientAuth) {\n if (clientDetailsService != null) {\n ClientDetails client = clientDetailsService.loadClientByClientId(clientAuth.getClientId());\n Integer validity = client.getRefreshTokenValiditySeconds();\n if (validity != null) {\n return validity;\n }\n }\n return refreshTokenValiditySeconds;\n }", "public OffsetDateTime expiration() {\n return this.innerProperties() == null ? null : this.innerProperties().expiration();\n }", "@Schema(required = true, description = \"Signature validity in milliseconds\")\n public Long getSignatureValidForMillis() {\n return signatureValidForMillis;\n }", "public Integer getExpiry() {\n return expiry;\n }", "public Jwt getJwt() {\n if (jwt == null || Instant.now().plus(EXPIRATION_OFFSET).isAfter(jwt.getExpireAt())) {\n jwt = jwtCreator.generateJwt(serviceAccountKey);\n }\n\n return jwt;\n }", "@Override\n\tpublic void setTokenExpiryTime(long arg0) {\n\t\t\n\t}", "public Date getExpirationDateFromToken(String token) {\n\t\tDate expiration;\n\t\ttry {\n\t\t\tfinal Claims claims = this.getClaimsFromToken(token);\n\t\t\texpiration = claims.getExpiration();\n\t\t} catch (Exception e) {\n\t\t\texpiration = null;\n\t\t}\n\t\treturn expiration;\n\t}", "public Long getExpires_in() {\r\n\t\treturn expires_in;\r\n\t}", "public int getExpiryTime() {\n return expiryTime;\n }", "public DateTime expiryTime() {\n return this.expiryTime;\n }", "long getInvalidLoginLockoutTime();", "long getExpiryTime() {\n return expiryTime;\n }", "protected int getMaxAccessTokens() {\n return maxAccessTokens;\n }", "@Test\n public void testExpiredToken() {\n ApplicationContext context =\n TEST_DATA_RESOURCE\n .getSecondaryApplication()\n .getBuilder()\n .client(ClientType.AuthorizationGrant, true)\n .token(OAuthTokenType.Bearer, true, null, null, null)\n .build();\n OAuthToken t = context.getToken();\n\n String header = authHeaderBearer(t.getId());\n\n Response r = target(\"/token/private\")\n .request()\n .header(AUTHORIZATION, header)\n .get();\n\n assertEquals(Status.UNAUTHORIZED.getStatusCode(), r.getStatus());\n }", "public Date getExpirationDateFromToken(String token) {\n\t\treturn getClaimFromToken(token, Claims::getExpiration);\n\t}", "public Date getExpirationDateFromToken(String token) {\n\t\treturn getClaimFromToken(token, Claims::getExpiration);\n\t}", "public long getExpiryMillis()\n {\n return m_dtExpiry;\n }", "public int getExpiryTimeSecs() {\n return expiryTimeSecs_;\n }", "public long getExpiresIn() {\n return expiresIn;\n }", "@ApiModelProperty(value = \"The period for which the object is valid\")\n\n @Valid\n\n public TimePeriod getValidFor() {\n return validFor;\n }", "public int getExpiryTimeSecs() {\n return expiryTimeSecs_;\n }", "String getExpiry();", "Optional<Instant> getTokenInvalidationTimestamp();", "public String getExpiration() {\n return this.expiration;\n }", "public long getTimeLeft() {\n return getExpiration() - System.currentTimeMillis() / 1000L <= 0 ? 0 : getExpiration() - System.currentTimeMillis() / 1000L;\n }", "public long getExpiredSessions();", "public boolean validateExpirationTime(Date expirationTime, long currentTimeInMillis,\n long timeStampSkewMillis) throws IdentityOAuth2Exception {\n long expirationTimeInMillis = expirationTime.getTime();\n if ((currentTimeInMillis + timeStampSkewMillis) > expirationTimeInMillis) {\n return logAndReturnFalse(\"JSON Web Token is expired. Expiration Time(ms) : \" + expirationTimeInMillis + \". JWT Rejected and validation terminated\");\n }\n return logAndReturnTrue(\"Expiration Time(exp) of JWT was validated successfully.\");\n }", "@Nullable\n public Long getExpiresIn() {\n return expiresIn;\n }", "public void setTokenValidityInSeconds(long tokenValidityInSeconds) {\n this.tokenValidityInSeconds = tokenValidityInSeconds;\n }", "public Date getExpirationTime() {\n return expirationTime;\n }", "public long getExpirationDate() {\n return expirationDate_;\n }", "boolean isAuthorizerAccessTokenExpired(String appId);", "Date getExpiredDate();", "public final String getRequestExpiration() {\n return properties.get(REQUEST_EXPIRATION_PROPERTY);\n }", "public Integer getFailureRetentionPeriodInDays() {\n return this.failureRetentionPeriodInDays;\n }", "public void verifyExpiration(RefreshToken token) {\n if (token.getExpiryDate().compareTo(Instant.now()) < 0) {\n throw new TokenRefreshException(token.getToken(), \"Expired token. Please issue a new request\");\n }\n }", "public boolean validateAgeOfTheToken(Date issuedAtTime, long currentTimeInMillis, long timeStampSkewMillis) throws\n IdentityOAuth2Exception {\n if (issuedAtTime == null) {\n return true;\n }\n if (notAcceptBeforeTimeInMins > 0) {\n long issuedAtTimeMillis = issuedAtTime.getTime();\n long rejectBeforeMillis = 1000L * 60 * notAcceptBeforeTimeInMins;\n if (currentTimeInMillis + timeStampSkewMillis - issuedAtTimeMillis >\n rejectBeforeMillis) {\n String logMsg = getTokenTooOldMessage(currentTimeInMillis, timeStampSkewMillis, issuedAtTimeMillis, rejectBeforeMillis);\n return logAndReturnFalse(logMsg);\n }\n }\n return true;\n }", "public long getExpirationDate() {\n return expirationDate_;\n }", "public Date getExpirationDate() {\r\n return expirationDate;\r\n }", "public Date getExpirationDate() {\n return expirationDate;\n }", "public Date getExpirationDate() {\n return expirationDate;\n }", "public int getSessionExpireRate();", "public java.util.Calendar getExpirationDate() {\n return expirationDate;\n }", "public int getValidityDays() {\r\n return validityDays;\r\n }", "public String getAccessToken() {\n if (accessToken == null || (System.currentTimeMillis() > (expirationTime - 60 * 1000))) {\n if (refreshToken != null) {\n try {\n this.refreshAccessToken();\n } catch (IOException e) {\n log.error(\"Error fetching access token\", e);\n }\n }\n }\n\n return accessToken;\n }", "LocalDateTime getExpiration(K key);", "@ApiModelProperty(required = false, value = \"epoch timestamp in milliseconds\")\n public Long getExpires() {\n return expires;\n }", "@java.lang.Override\n public long getExpirationDate() {\n return expirationDate_;\n }", "public AbsoluteDate getValidUntil() {\n return validUntil;\n }", "OffsetDateTime expirationTimeIfNotActivatedUtc();", "String getSpecifiedExpiry();", "@ApiModelProperty(value = \"The number of seconds until this request can no longer be answered.\")\n public BigDecimal getExpiresIn() {\n return expiresIn;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getExpirationDate();", "public java.util.Calendar getExpiryTime(){\n return localExpiryTime;\n }", "@ApiModelProperty(example = \"2017-11-29T22:40:11.000+0000\", value = \"Date and time the token expires (in ISO 8601 format). If not specified, it will default to the maximum lifetime for this token type.\")\n public OffsetDateTime getTerminalDate() {\n return terminalDate;\n }", "private String generateToken(LoginViewModel viewModel){\n \n String authenticationToken;\n \n try{\n Authentication authentication = authenticationManager.authenticate(\n new UsernamePasswordAuthenticationToken(viewModel.getUsername(), viewModel.getPassword()));\n \n SecurityContextHolder.getContext().setAuthentication(authentication);\n UserPrincipal principal = (UserPrincipal) authentication.getPrincipal();\n \n System.out.println(generateExpirationDate());\n authenticationToken = JWT\n .create()\n .withClaim(\"role\",\"ROLE_\" + principal.getRole())\n .withSubject(principal.getUsername())\n .withExpiresAt(generateExpirationDate())\n .sign(HMAC512(CommonSecurityConfig.SECRET.getBytes()));\n }catch (Exception e){\n System.out.println(e.getMessage());\n return null;\n }\n \n return authenticationToken;\n }", "public Date getTokenReceived() {\n return tokenReceived;\n }", "@java.lang.Override\n public long getExpirationDate() {\n return expirationDate_;\n }", "public Timestamp getExpirationDate() {\n return expirationDate;\n }", "public final long getRetentionExpiryDateTime() {\n\t return m_retainUntil;\n\t}", "public final int getExpiresAfter() {\n return 0;\n }", "int getExpireTimeout();", "public Instant getExpirationTime() {\n return unit == ChronoUnit.SECONDS\n ? Instant.ofEpochSecond((Long.MAX_VALUE >>> timestampLeftShift) + epoch)\n : Instant.ofEpochMilli((Long.MAX_VALUE >>> timestampLeftShift) + epoch);\n }", "public boolean checkJTIValidityPeriod(String jti, long jwtExpiryTimeMillis, long currentTimeInMillis,\n long timeStampSkewMillis) throws IdentityOAuth2Exception {\n if (currentTimeInMillis + timeStampSkewMillis > jwtExpiryTimeMillis) {\n return logAndReturnTrue(\"JWT Token with jti: \" + jti + \"has been reused after the allowed expiry time:\"\n + jwtExpiryTimeMillis);\n } else {\n return logAndReturnFalse(\"JWT Token with jti: \" + jti + \" Has been replayed before the allowed expiry time:\"\n + jwtExpiryTimeMillis);\n }\n }", "public boolean isTokenValid() throws RSAEncryptedRSASignedJWTException{\n if(decryptedSignedJWT == null)\n throw new RSAEncryptedRSASignedJWTException(\"JWT token has not been decrypted\");\n else\n return this.verifyToken();\n }", "@Override\n\tpublic boolean isTokenValid(String token) {\n\t\tLoginToken loginToken = getLoginTokenByToken(token);\n\t\tif (loginToken != null) {\n\t\t\tDate createTime = loginToken.getCreateTime();\n\t\t\tDate current = new Date();\n\t\t\tSystem.out.println(\"过了:\"+Math.abs(current.getTime() - createTime.getTime()));\n\t\t\tSystem.out.println(\"过了:\"+Math.abs(current.getTime() - createTime.getTime()) / (1000 *60));\n\t\t\tif (Math.abs(current.getTime() - createTime.getTime()) / (1000 * 60) >= 60) {\n\t\t\t\tloginToken.setStatus(Constant.LOGIN_TOKEN_STATUS_INVALID);\n\t\t\t\tloginTokenMapper.updateByPrimaryKey(loginToken);\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\tloginToken.setCreateTime(current);\n\t\t\t\tloginTokenMapper.updateByPrimaryKey(loginToken);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}" ]
[ "0.7308715", "0.69192314", "0.6767306", "0.65539974", "0.6503177", "0.64413893", "0.63750684", "0.62710077", "0.6036952", "0.60354525", "0.60006005", "0.59738404", "0.5959721", "0.59164506", "0.58640313", "0.57911557", "0.5780772", "0.5773617", "0.57623506", "0.5741516", "0.5727869", "0.5674356", "0.5667341", "0.5631005", "0.5569981", "0.5569051", "0.5562513", "0.55587566", "0.5531709", "0.55258375", "0.551206", "0.5496751", "0.54902875", "0.54867506", "0.5457408", "0.5455454", "0.545257", "0.54125327", "0.536446", "0.53496236", "0.53364253", "0.5332724", "0.5331855", "0.53287065", "0.5326152", "0.5324868", "0.5320255", "0.5315376", "0.5315178", "0.5315178", "0.5311061", "0.53064346", "0.5280298", "0.527643", "0.5276417", "0.5262064", "0.52518827", "0.5204255", "0.5201606", "0.52007544", "0.5199879", "0.51922786", "0.51737064", "0.51716316", "0.5168599", "0.5166612", "0.51628995", "0.5161931", "0.51444894", "0.5137314", "0.51359195", "0.51253897", "0.5114512", "0.5092824", "0.5092824", "0.50858235", "0.507029", "0.50686705", "0.5060795", "0.50536406", "0.5050851", "0.5048675", "0.50436175", "0.5037253", "0.5036316", "0.5029786", "0.5027449", "0.50253546", "0.5020372", "0.5018549", "0.5017023", "0.5011017", "0.5003969", "0.49981025", "0.4991011", "0.49827665", "0.4981708", "0.4972426", "0.49675888", "0.4965397" ]
0.57418007
19
Utility method to be used to generate JWT access token for all grant types.
public static String generateToken(JWTAccessTokenIssuerDTO jwtAccessTokenIssuerDTO, Application application) throws OAuthSystemException { String accessToken; String clientId = jwtAccessTokenIssuerDTO.getClientId(); try { OAuthAppDO oAuthAppDO = OAuth2Util.getAppInformationByClientId(clientId); String[] audience = oAuthAppDO.getAudiences(); List<String> audienceList = Arrays.asList(audience); StringBuilder scopeString = new StringBuilder(); String[] scopeList = jwtAccessTokenIssuerDTO.getScopeList(); for (String scope : scopeList) { scopeString.append(scope).append(" "); } String quotaType = APIUtil.getQuotaTypeForApplicationPolicy(application.getTier(), APIUtil.getTenantId(application.getOwner())); ApplicationDTO applicationDTO = new ApplicationDTO(); applicationDTO.setId(application.getId()); applicationDTO.setName(application.getName()); applicationDTO.setTier(application.getTier()); applicationDTO.setOwner(application.getOwner()); applicationDTO.setTierQuotaType(quotaType); AuthenticatedUser endUser = jwtAccessTokenIssuerDTO.getUser(); JwtTokenInfoDTO jwtTokenInfoDTO = APIUtil.getJwtTokenInfoDTO(application, endUser.toFullQualifiedUsername(), endUser.getTenantDomain()); jwtTokenInfoDTO.setScopes(scopeString.toString().trim()); jwtTokenInfoDTO.setAudience(audienceList); jwtTokenInfoDTO.setExpirationTime(jwtAccessTokenIssuerDTO.getValidityPeriod()); jwtTokenInfoDTO.setApplication(applicationDTO); jwtTokenInfoDTO.setKeyType(application.getKeyType()); jwtTokenInfoDTO.setConsumerKey(clientId); jwtTokenInfoDTO.setTokenReqMessageContext(jwtAccessTokenIssuerDTO.getTokReqMsgCtx()); jwtTokenInfoDTO.setOauthAuthzMsgCtx(jwtAccessTokenIssuerDTO.getOauthAuthzMsgCtx()); APIMJWTGenerator apimjwtGenerator = new APIMJWTGenerator(); accessToken = apimjwtGenerator.generateJWT(jwtTokenInfoDTO); } catch (InvalidOAuthClientException | IdentityOAuth2Exception | APIManagementException e) { log.error("Error occurred while getting JWT Token client ID : " + clientId + " when getting oAuth App " + "information", e); throw new OAuthSystemException("Error occurred while getting JWT Token client ID : " + clientId, e); } return accessToken; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String generateAccessToken() {\n return accessTokenGenerator.generate().toString();\n }", "public String generateToken() {\n Authentication authentication = getAuthentication();\n if(authentication == null) {\n throw new AuthenticationCredentialsNotFoundException(\"No user is currently logged in.\");\n }\n return jwtUtil.generateJwtToken(authentication);\n }", "private String generateToken(LoginViewModel viewModel){\n \n String authenticationToken;\n \n try{\n Authentication authentication = authenticationManager.authenticate(\n new UsernamePasswordAuthenticationToken(viewModel.getUsername(), viewModel.getPassword()));\n \n SecurityContextHolder.getContext().setAuthentication(authentication);\n UserPrincipal principal = (UserPrincipal) authentication.getPrincipal();\n \n System.out.println(generateExpirationDate());\n authenticationToken = JWT\n .create()\n .withClaim(\"role\",\"ROLE_\" + principal.getRole())\n .withSubject(principal.getUsername())\n .withExpiresAt(generateExpirationDate())\n .sign(HMAC512(CommonSecurityConfig.SECRET.getBytes()));\n }catch (Exception e){\n System.out.println(e.getMessage());\n return null;\n }\n \n return authenticationToken;\n }", "String getToken(String username, String password, String grant_type) throws IllegalAccessException{\n\n String URI = serviceUrl + \"/oauth/token\" + \"?\" +\n String.format(\"%s=%s&%s=%s&%s=%s\", \"grant_type\", grant_type, \"username\", username, \"password\", password);\n// String CONTENT_TYPE = \"application/x-www-form-urlencoded\";\n // TODO clientId and clientSecret !!!\n String ENCODING = \"Basic \" +\n Base64.getEncoder().encodeToString(String.format(\"%s:%s\", \"clientId\", \"clientSecret\").getBytes());\n\n// AtomicReference<String> token = null;\n// authorization.subscribe(map -> {\n// token.set((String) map.get(ACCESS_TOKEN));\n// });\n\n String token = null;\n try {\n token = (String)WebClient.create().post()\n .uri(URI)\n .accept(MediaType.APPLICATION_FORM_URLENCODED)\n .contentType(MediaType.APPLICATION_FORM_URLENCODED)\n .header(\"Authorization\", ENCODING)\n .retrieve()\n .bodyToMono(Map.class)\n .block().get(ACCESS_TOKEN);\n } catch (Exception e){\n throw new IllegalAccessException(\"Can't reach access token\");\n }\n\n return token;\n }", "private String generateToken(Map<String, Object> claims) {\n return Jwts.builder()\n .setClaims(claims)\n .setExpiration(new Date(System.currentTimeMillis() + 700000000))\n .signWith(SignatureAlgorithm.HS512, SECRET)\n .compact();\n }", "String generateUserRequestToken(String username, Collection<String> authorities);", "Pokemon.RequestEnvelop.AuthInfo.JWT getToken();", "private String doGenerateToken(Map<String, Object> claims, String subject) {\n\t\treturn Jwts.builder()\n\t\t\t\t .setClaims(claims)\n\t\t\t\t .setSubject(subject)\n\t\t\t\t .setIssuedAt(new Date(System.currentTimeMillis()))\n\t\t\t\t .setExpiration(new Date(System.currentTimeMillis() + JWT_TOKEN_VALIDITY * 1000))\n\t\t\t\t .signWith(SignatureAlgorithm.HS512, secret)\n\t\t\t\t .compact();\n\t}", "public Token createAuthorizationToken(User user);", "String getAccessToken();", "String getAccessToken();", "protected String generateToken(Token.Type type, String context, Map<String, String> assertions) {\n Preconditions.checkNotNull(context, \"context cannot be null\");\n Preconditions.checkNotNull(assertions, \"secret cannot be null\");\n assertions.put(Params.CONTEXT.toString(), context);\n return jwtManager.generateJwtToken(\n new DefaultToken(\n convertToJsonAndEncrypt(\n encapsulateSecret(\n type,\n assertions\n )\n ),\n tokenExpiryInfo.getTokenTypeTimeoutInMillis(type).longValue()\n )\n );\n }", "public void generateRequestToken(OAuthAccessor accessor)\n throws OAuthException {\n\n // generate oauth_token and oauth_secret\n String consumer_key = accessor.consumer.consumerKey;\n // generate token and secret based on consumer_key\n\n // for now use md5 of name + current time as token\n String token_data = consumer_key + System.nanoTime();\n \n String token = StringPool.BLANK;\n try {\n token = Digester.MD5(token_data);\n } catch (UnsupportedEncodingException ex) {\n Logger.getLogger(OAuthManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n // for now use md5 of name + current time + token as secret\n String secret_data = consumer_key + System.nanoTime() + token;\n String secret = StringPool.BLANK;\n try {\n secret = Digester.MD5(secret_data);\n } catch (UnsupportedEncodingException ex) {\n Logger.getLogger(OAuthManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n accessor.requestToken = token;\n accessor.tokenSecret = secret;\n accessor.accessToken = null;\n\n // add to the local cache\n addAccessor(accessor);\n }", "private Map<String, Object> generateJWTToken(Customer user) {\n long timestamp = System.currentTimeMillis();\n String token = Jwts.builder().signWith(SignatureAlgorithm.HS256, Constant.API_SECRET_KEY)\n .setIssuedAt(new Date(timestamp))\n .setExpiration(new Date(timestamp + Constant.TOKEN_VALIDITY))\n .claim(\"userId\", user.getId())\n// .claim(\"email\", user.getEmail())\n// .claim(\"password\", user.getPassword())\n .compact();\n Map<String, Object> map = new HashMap();\n map.put(\"token\", token);\n map.put(\"customer\", user);\n return map;\n\t}", "public String generateToken(HttpServletRequest request)\r\n\t{\r\n\t\treturn tokensManager.generateToken((HttpServletRequest) request);\r\n\t}", "@Transactional\n public UserToken generateToken() {\n if (!firebaseService.canProceed())\n return null;\n\n try {\n Optional<UserAuth> userOptional = Auditor.getLoggedInUser();\n if (!userOptional.isPresent()) return UNAUTHENTICATED;\n UserAuth user = userOptional.get();\n Map<String, Object> claims = new HashMap<>();\n claims.put(\"type\", user.getType().toString());\n claims.put(\"department\", user.getDepartment().getName());\n claims.put(\"dean_admin\", PermissionManager.hasPermission(user.getAuthorities(), Role.DEAN_ADMIN));\n String token = FirebaseAuth.getInstance().createCustomTokenAsync(user.getUsername(), claims).get();\n return fromUser(user, token);\n } catch (InterruptedException | ExecutionException e) {\n return UNAUTHENTICATED;\n }\n }", "public String generateAccessToken(User user, String tenant)\n\t{\n\t\tClaims claims = Jwts.claims().setSubject(user.getId().toString());\n\t\tclaims.put(\"password\", user.getPassword());\n\t\tclaims.put(\"tenant\", tenant);\n\t\treturn buildToken(claims, Integer.MAX_VALUE);\n\t}", "@Override\n public String createJwtToken(String userId) {\n Calendar expiration = Calendar.getInstance();\n expiration.roll(Calendar.HOUR, 1);\n \n HashMap<String, Object> claims = new HashMap<>();\n claims.put(\"http://tapkey.net/oauth/token_exchange/client_id\", oauthClientId);\n\n return Jwts.builder()\n .addClaims(claims)\n .setSubject(userId)\n .setAudience(identityProviderAudience)\n .setIssuer(identityProviderIssuer)\n .setIssuedAt(new Date())\n .setExpiration(expiration.getTime())\n .signWith(keyService.getPrivateKey(), SignatureAlgorithm.RS256)\n .compact();\n }", "public interface TokenService {\n\n /**\n * Generate a user-based renewal token\n *\n * @param username The username for which the token will be valid\n * @return A renewal JWT for the user\n */\n String generateUserRenewalToken(String username);\n\n /**\n * Generate a unit-based renewal token\n *\n * @param unit The unit for which the token will be valid\n * @param expiration The optional expiration timestamp for the token (defaults to duration specified in application config)\n * @return A renewal JWT for the unit\n */\n String generateUnitRenewalToken(Unit unit, Instant expiration);\n\n /**\n * Generate a user-based request token\n *\n * @param username The username for which the token will be valid\n * @param authorities The list of authorities associated with the user\n * @return A request JWT for the user\n */\n String generateUserRequestToken(String username, Collection<String> authorities);\n\n /**\n * Generate a unit-based request token\n *\n * @param units The list of units for which the token will be valid\n * @return A request JWT for the units\n */\n String generateUnitRequestToken(Collection<String> units);\n}", "OAuth2Token getToken();", "public String getAccessToken();", "@RequestMapping(\"/generateToken\")\n @ApiOperation(value = \"Generates the JWT\", httpMethod = \"POST\")\n public ServiceResponse<String> generateToken(@RequestBody ServiceRequest<String> serviceRequest,\n HttpServletResponse response) {\n ServiceResponse<String> serviceResponse = new ServiceResponse<>();\n try {\n checkParameter(serviceRequest);\n long sixMinutes = 6 * 1000 * 60;\n String token = securityService.generateToken(serviceRequest.getParameter(), sixMinutes);\n handleResponse(serviceResponse, token, response);\n } catch (Exception e) {\n exceptionHandler.handleControllerException(serviceResponse, serviceRequest, e, getMethodName(), response);\n }\n return serviceResponse;\n }", "public String generateToken(UserDetails userDetails) {\n\t\tMap<String, Object> claims = new HashMap<>();\n\t\treturn createToken(claims, userDetails.getUsername());\n\t}", "private String doGenerateToken(Map<String, Object> claims, String subject) {\n\n\t\treturn Jwts.builder().setClaims(claims).setSubject(subject).setIssuedAt(new Date(System.currentTimeMillis()))\n\t\t\t\t.setExpiration(new Date(System.currentTimeMillis() + expiration * 1000))\n\t\t\t\t.signWith(SignatureAlgorithm.HS512, secret).compact();\n\t}", "@PostMapping\n public Map<String, String> generate(@RequestBody final JwtCredentials jwtCredentials) {\n return jwtGenerator.generate(jwtCredentials);\n }", "public static String generate(String clientId, String xacmlRequest) {\n\t\tSystem.out.println(\"Index: \" + xacmlRequest);\n\t\tPrivatePublicKeyHolder holder = getKeys();\n\t\t Calendar calendar = Calendar.getInstance();\n\n\t\t calendar.add(Calendar.DATE, 3);\n\t\t \n\t\t Date date = calendar.getTime();\n\tString issuer = GenerateKeystore.ALIAS;\n \tAlgorithm algorithm = Algorithm.ECDSA256((ECPublicKey)holder.getPublicKey(), (ECPrivateKey)holder.getPrivateKey());\n \tString token = JWT.create()\n \t\t\t.withIssuer(issuer)\n \t\t\t.withClaim(\"clientId\", clientId)\n \t\t\t.withClaim(\"xacml\", xacmlRequest)\n \t\t\t.withExpiresAt(date)\n \t\t\t.sign(algorithm);\n \t\n \t\n \t//validation off the token, just for an example \n\n//\t\ttry {\n//\t\t\tJwts.parser().setSigningKey(holder.getPublicKey()).parseClaimsJws(token);\n//\t\t\tSystem.out.println(\"Credentials are ok\");\n//\t\t} catch (JwtException ex) {\n//\t\t\tSystem.err.println(ex);\n//\t\t\tSystem.out.println(\"Credentials are wrong\");\n//\t\t}\n \t\n\t\treturn token;\n\t}", "public void generateAccessToken(OAuthAccessor accessor)\n throws OAuthException {\n\n try {\n // generate oauth_token and oauth_secret\n // generate token and secret based on consumer_key\n String consumer_key = accessor.consumer.consumerKey;\n \n OAuthAccessorRecord record = findByConsumerKey(accessor.consumer.consumerKey);\n \n // for now use md5 of name + current time as token\n String token_data = consumer_key + System.nanoTime();\n String token = Digester.MD5(token_data);\n\n record.setRequestToken(null);\n record.setAccessToken(token);\n em.persist(record);\n\n } catch (Exception ex) {\n throw new OAuthException(\"ERROR: generating access token\", ex);\n }\n }", "@Override\n\tprotected RefreshToken doCreateNewRefreshToken(ServerAccessToken at) {\n\t\tRefreshToken refreshToken = super.doCreateNewRefreshToken(at);\n\t\trefreshToken.setTokenKey(\"RT:\" + UUID.randomUUID().toString());\n\t\trefreshToken.setExpiresIn(Oauth2Factory.REFRESH_TOKEN_EXPIRED_TIME_SECONDS);\n\t\t\n\t\tif (log.isDebugEnabled()) {\n\t\t\ttry {\n\t\t\t\tlog.debug(\"RefreshToken={}\", OBJECT_MAPPER.writeValueAsString(refreshToken));\n\t\t\t} catch (JsonProcessingException e) {\n\t\t\t\tlog.error(e.getMessage(), e);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn refreshToken;\n\t}", "public String generateToken(Authentication authentication) {\n\n ApplicationUser applicationUser = (ApplicationUser) authentication.getPrincipal();\n Date expiryDate = java.sql.Date.valueOf(LocalDate.now().plusDays(jwtConfig.getTokenExpirationAfterDays()));\n\n //jwt subject will contain [username, authorities]\n return Jwts.builder()\n .setSubject(applicationUser.getUser().getUsername())\n .claim(\"authorities\", applicationUser.getAuthorities())\n .setIssuedAt(new Date())\n .setExpiration(expiryDate)\n .signWith(jwtSecretKey.secretKey())\n .compact();\n }", "Pokemon.RequestEnvelop.AuthInfo.JWTOrBuilder getTokenOrBuilder();", "String createToken(User user);", "private String createJWT(String userName) {\n\t\tString jwtTokenString = null;\n\n\t\ttry {\n\t\t\t// create() uses default settings. \n\t\t\t// For other settings, specify a JWTBuilder element in server.xml\n\t\t\t// and call create(builder id)\n\t\t\tJwtBuilder builder = JwtBuilder.create(\"defaultJWT\");\n\n\t\t\tif (userName == null) userName = \"null\";\n\n\t\t\t// Put the user info into a JWT Token\n\t\t\tbuilder.subject(userName);\n\t\t\tbuilder.claim(\"upn\", userName);\n\n\t\t\t// Set the audience to our sample's value\n\t\t\tbuilder.claim(\"aud\", jwtAudience);\n\n\t\t\t//builder.claim(\"groups\", groups);\n\n\t\t\t//convention is the issuer is the url, but for demo portability a fixed value is used.\n\t\t\t//builder.claim(\"iss\", request.getRequestURL().toString());\n\t\t\tbuilder.claim(\"iss\", jwtIssuer);\n\n\t\t\tJwtToken theToken = builder.buildJwt();\t\t\t\n\t\t\tjwtTokenString = theToken.compact();\n\t\t} catch (Throwable t) {\n\t\t\tt.printStackTrace();\n\t\t\tthrow new RuntimeException(t);\n\t\t}\n\n\t\treturn jwtTokenString;\n\t}", "public Pokemon.RequestEnvelop.AuthInfo.JWT getToken() {\n return token_;\n }", "public RefreshToken generateRefreshToken(){\n RefreshToken refreshToken = new RefreshToken();\n //Creates a 128bit random UUID. This serves as our refresh token\n refreshToken.setToken(UUID.randomUUID().toString());\n //Set creation timestampt\n refreshToken.setCreatedDate(Instant.now());\n\n return refreshTokenRepository.save(refreshToken);\n }", "public interface TokenProvider {\n /**\n * @return an always valid access token.\n */\n String getAccessToken();\n\n /**\n * Forces a refresh of all tokens.\n *\n * @return the newly refreshed access token.\n */\n String refreshTokens();\n}", "public Pokemon.RequestEnvelop.AuthInfo.JWT getToken() {\n if (tokenBuilder_ == null) {\n return token_;\n } else {\n return tokenBuilder_.getMessage();\n }\n }", "public String generateToken(Authentication authentication) {\n\t\tUser user=(User) authentication.getPrincipal();\t//Get user being authenticated (configured in security config)\n\t\tString userId= Long.toString(user.getId());\n\t\tDate now= new Date(System.currentTimeMillis());\n\t\tDate expiryTime= new Date(now.getTime()+SecurityConstants.TOKEN_EXPIRY);\n\t\t\n\t\tMap<String, Object> claims= new HashMap<>();\n\t\tclaims.put(\"id\", userId);\n\t\tclaims.put(\"username\", user.getUsername());\n\t\tclaims.put(\"fullname\", user.getFullName());\n\t\t//Role (IF IMPLEMENTED)\n\t\t\n\t\treturn Jwts.builder()\n\t\t\t\t.setSubject(userId)\n\t\t\t\t.setClaims(claims)\n\t\t\t\t.setIssuedAt(now)\n\t\t\t\t.setExpiration(expiryTime)\n\t\t\t\t.signWith(SignatureAlgorithm.HS512, SecurityConstants.SECRET)\n\t\t\t\t.compact();\n\t}", "public StringBuilder createToken() throws IOException {\n /**\n * we need the url where we want to make an API call\n */\n URL url = new URL(\"https://api.scribital.com/v1/access/login\");\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n /**\n * set the required type, in this case it's a POST request\n */\n connection.setRequestMethod(\"POST\");\n\n /**\n * set the type of content, here we use a JSON type\n */\n connection.setRequestProperty(\"Content-Type\", \"application/json; utf-8\");\n connection.setDoOutput(true);\n\n /**\n * set the Timeout, will disconnect if the connection did not work, avoid infinite waiting\n */\n connection.setConnectTimeout(6000);\n connection.setReadTimeout(6000);\n\n /**\n * create the request body\n * here we need only the username and the api-key to make a POST request and to receive a valid token for the Skribble API\n */\n String jsonInputString = \"{\\\"username\\\": \\\"\" + username +\"\\\", \\\"api-key\\\":\\\"\" + api_key + \"\\\"}\";\n try(OutputStream os = connection.getOutputStream()){\n byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);\n os.write(input,0, input.length);\n }\n\n /**\n * read the response from the Skriblle API which is a token in this case\n */\n try(BufferedReader br = new BufferedReader(\n new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {\n StringBuilder response = new StringBuilder();\n String responseLine = null;\n while ((responseLine = br.readLine()) != null) {\n response.append(responseLine.trim());\n Token = response;\n }\n }\n return Token;\n }", "private static String generateToken(Accessor accessor) {\n return generateHash(accessor.getConsumerId() + System.nanoTime());\n }", "String getToken(String scope, String username, String password) throws AuthorizationException;", "public String generateWebToken(Authentication authentication) {\n\t\tvar userdetailsUser = (org.springframework.security.core.userdetails.User) authentication.getPrincipal();\n\n\t\treturn Jwts.builder()\n .setSubject(userdetailsUser.getUsername())\n .setIssuedAt(new Date())\n .setExpiration(new Date((new Date()).getTime() + jwtExpirationMs))\n .signWith(SignatureAlgorithm.HS512, jwtSecret)\n .compact();\n\t}", "public interface JwtTokenService {\n /**\n * Create token for user\n *\n * @param user user, that needs a token\n * @return token\n */\n String createToken(User user);\n\n /**\n * Get token life duration\n *\n * @return token duration\n */\n Duration getTokenExpiredIn();\n\n /**\n * Parse token\n *\n * @param token received token\n * @return authenticated token\n */\n Authentication parseToken(String token);\n}", "protected void createIdTokenForRefreshRequest() {\n\t\tgenerateIdTokenClaims();\n\n\t\taddAtHashToIdToken();\n\n\t\taddCustomValuesToIdTokenForRefreshResponse();\n\n\t\tsignIdToken();\n\n\t\tcustomizeIdTokenSignatureForRefreshResponse();\n\n\t\tencryptIdTokenIfNecessary();\n\t}", "private String GetAccessToken() {\n final String grantType = \"password\";\n final String resourceId = \"https%3A%2F%2Fgraph.microsoft.com%2F\";\n final String tokenEndpoint = \"https://login.microsoftonline.com/common/oauth2/token\";\n\n try {\n URL url = new URL(tokenEndpoint);\n HttpURLConnection conn;\n if (configuration.isProxyUsed()) {\n Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(configuration.getProxyServer(), configuration.getProxyPort()));\n conn = (HttpURLConnection) url.openConnection(proxy);\n } else {\n conn = (HttpURLConnection) url.openConnection();\n }\n\n String line;\n StringBuilder jsonString = new StringBuilder();\n\n conn.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded; charset=UTF-8\");\n conn.setRequestMethod(\"POST\");\n conn.setDoInput(true);\n conn.setDoOutput(true);\n conn.setInstanceFollowRedirects(false);\n conn.connect();\n\n try (OutputStreamWriter outputStreamWriter = new OutputStreamWriter(conn.getOutputStream(), StandardCharsets.UTF_8)) {\n String payload = String.format(\"grant_type=%1$s&resource=%2$s&client_id=%3$s&username=%4$s&password=%5$s\",\n grantType,\n resourceId,\n clientId,\n username,\n password);\n outputStreamWriter.write(payload);\n }\n\n try (BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()))) {\n while((line = br.readLine()) != null) {\n jsonString.append(line);\n }\n }\n\n conn.disconnect();\n\n JsonObject res = new GsonBuilder()\n .create()\n .fromJson(jsonString.toString(), JsonObject.class);\n\n return res\n .get(\"access_token\")\n .toString()\n .replaceAll(\"\\\"\", \"\");\n\n } catch (IOException e) {\n throw new IllegalAccessError(\"Unable to read authorization response: \" + e.getLocalizedMessage());\n }\n }", "public Token toScribeToken() {\n return new Token(oauthToken, oauthTokenSecret);\n }", "public static String generate(String role, String employeeName){\n String token = JWT.create()\n .withClaim(\"role\", role) // adds data to payload\n .withClaim(\"employeeName\", employeeName)\n .sign(algorithm); // this generates signature and finalizes changes\n return token;\n }", "RequestToken getOAuthRequestToken() throws MoefouException;", "protected static String generateToken()\n\t{\n\t\treturn UUID.randomUUID().toString();\n\t}", "@Override\n\tprotected Object refreshTokenGrantType(String requestId) {\n\t\treceivedRefreshRequest = true;\n\t\tvalidateRefreshRequest();\n\n\t\t//this must be after EnsureScopeInRefreshRequestContainsNoMoreThanOriginallyGranted is called\n\t\tcallAndStopOnFailure(ExtractScopeFromTokenEndpointRequest.class);\n\n\t\tgenerateAccessToken();\n\n\t\tif(generateIdTokenOnRefreshRequest()) {\n\t\t\tcreateIdTokenForRefreshRequest();\n\t\t}\n\n\t\tcreateRefreshToken(true);\n\n\t\tcallAndStopOnFailure(CreateTokenEndpointResponse.class);\n\n\t\tcall(exec().unmapKey(\"token_endpoint_request\").endBlock());\n\n\t\treturn new ResponseEntity<Object>(env.getObject(\"token_endpoint_response\"), HttpStatus.OK);\n\t}", "public String generateToken(User userDetails) {\n\t\tMap<String, Object> claims = new HashMap<>();\n\t\tclaims.put(\"role\", userDetails.getRole());\n\t\treturn doGenerateToken(claims, userDetails.getUsername());\n\t}", "public String generateJWTToken(String id, String issuer, String subject, long ttlMillis, String hash) {\n SignatureAlgorithm signatureAlgorithm = SignatureAlgorithm.HS256;\n\n long nowMillis = System.currentTimeMillis();\n Date now = new Date(nowMillis);\n\n //We will sign our JWT with our ApiKey secret\n byte[] apiKeySecretBytes = DatatypeConverter.parseBase64Binary(hash);\n Key signingKey = new SecretKeySpec(apiKeySecretBytes, signatureAlgorithm.getJcaName());\n\n //Let's set the JWT Claims\n JwtBuilder builder = Jwts.builder().setId(id)\n .setIssuedAt(now)\n .setSubject(subject)\n .setIssuer(issuer)\n .signWith(signatureAlgorithm, signingKey);\n\n //if it has been specified, let's add the expiration\n if (ttlMillis >= 0) {\n long expMillis = nowMillis + ttlMillis;\n Date exp = new Date(expMillis);\n builder.setExpiration(exp);\n }\n\n //Builds the JWT and serializes it to a compact, URL-safe string\n return builder.compact();\n }", "public static String getTeacherToken() {\n\n RestAssured.baseURI = \"https://cybertek-reservation-api-qa.herokuapp.com\";\n\n Response response = given().log().all().\n param(\"email\", \"teacherva5@gmail.com\").\n param(\"password\", \"maxpayne\").\n get(\"/sign\");\n response.then().log().all().\n assertThat().statusCode(200);\n\n return response.jsonPath().get(\"accessToken\");\n\n }", "private UsernamePasswordAuthenticationToken getAuthtication(HttpServletRequest request){\n // Get token from request header.\n String token = request.getHeader(\"Authorization\");\n if (token != null){\n //Get the username from the jwt token\n String username = JwtUtil.getUsernameByToken(token);\n //Check the existence of the username.\n Optional<User> userTry = userRepository.findByUsername(username);\n Collection<GrantedAuthority> authorities = new ArrayList<>();\n if (userTry.isPresent()){\n User user = userTry.get();\n authorities.add(new SimpleGrantedAuthority(user.getRole().getName()));\n return new UsernamePasswordAuthenticationToken(user,token,authorities);\n }\n }\n return null;\n }", "public static String generateJWTToken(final String bjondServerEncryptionKey,\n final String issuer,\n final String bjondAdapterAudience,\n final String bjondAdapterSubject,\n final String json,\n final int expirationTimeMinutesInTheFuture) throws JoseException {\n\n final Key key = JWTUtil.generateAESKey(JWTUtil.base64Decode(bjondServerEncryptionKey));\n\t\tfinal Map<String, List<String>> claimsMap = new HashMap<>();\n\n\t\tclaimsMap.put(\"json\", Arrays.asList(json));\n return JWTUtil.generateJWT_AES128(\n key,\n issuer,\n bjondAdapterAudience,\n bjondAdapterSubject,\n claimsMap,\n expirationTimeMinutesInTheFuture\n );\n\t}", "private String retrieveToken(String accessCode) throws IOException {\n OAuthApp app = new OAuthApp(asanaCredentials.getClientId(), asanaCredentials.getClientSecret(),\n asanaCredentials.getRedirectUri());\n Client.oauth(app);\n String accessToken = app.fetchToken(accessCode);\n\n //check if user input is valid by testing if accesscode given by user successfully authorises the application\n if (!(app.isAuthorized())) {\n throw new IllegalArgumentException();\n }\n\n return accessToken;\n }", "private String newToken(String token) {\n UserDetails userDetails = new UserDetails();\r\n userDetails.setEmail(jwtUtils.extractEmail(token));\r\n userDetails.setUserType((String) jwtUtils.extractAllClaims(token).get(\"userType\"));\r\n return jwtUtils.generateToken(userDetails);\r\n }", "private CdekAuthToken getAuthToken()\n {\n String authEndpoint = conf.ENDPOINT + \"/oauth/token?grant_type={grant_type}&client_id={client_id}&client_secret={client_secret}\";\n\n HttpHeaders defaultHeaders = new HttpHeaders();\n HttpEntity req = new HttpEntity(defaultHeaders);\n\n return rest.postForObject(authEndpoint, req, CdekAuthToken.class, conf.getAuthData());\n }", "public String generateToken(User user) {\n\t\tMap<String, Object> claims = new HashMap<>();\n\t\treturn doGenerateToken(claims, user.getAuthenticationInformation().getUsername());\n\t}", "public String generateTokenForUser(String userName) {\n\t\tSession session = new Session();\n\t\tString token = session.getToken();\n\t\tsessionMap.put(userName, session);\n\t\t\n\t\treturn Base64.getEncoder().encodeToString(token.getBytes());\n\t}", "@Override\n\tprotected ServerAccessToken createNewAccessToken(Client client, UserSubject userSub) {\n\t\tBearerAccessToken accessToken = new BearerAccessToken(client,\n\t\t\t\t\"AT:\" + UUID.randomUUID().toString(),\n\t\t\t\tOauth2Factory.ACCESS_TOKEN_EXPIRED_TIME_SECONDS,\n\t\t\t\tOAuthUtils.getIssuedAt());\n\t\t\n\t\tif (log.isDebugEnabled()) {\n\t\t\ttry {\n\t\t\t\tlog.debug(\"BearerAccessToken={}\", OBJECT_MAPPER.writeValueAsString(accessToken));\n\t\t\t} catch (JsonProcessingException e) {\n\t\t\t\tlog.error(e.getMessage(), e);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn accessToken;\n\t}", "String generateUserRenewalToken(String username);", "public Object token(HttpServletRequest request)\n throws URISyntaxException, OAuthSystemException {\n try {\n OAuthTokenRequest oauthRequest = new OAuthTokenRequest(request);\n String authCode = oauthRequest.getParam(OAuth.OAUTH_CODE);\n\n // get from cache\n OAuthAuthzParameters oAuthAuthzParameters = oAuthService.getOAuthAuthzParameters(authCode);\n if (oAuthAuthzParameters == null) {\n OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_CODE))\n .setErrorDescription(OAuthConstants.OAuthDescription.INVALID_AUTHORIZATION_CODE)\n .buildJSONMessage();\n logger.info(\"no cache for {}\", authCode);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n }\n\n if (!oAuthAuthzParameters.getClientId().equals(oauthRequest.getClientId())) {\n OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_CLIENT))\n .setErrorDescription(OAuthConstants.OAuthDescription.INVALID_CLIENT_DESCRIPTION)\n .buildJSONMessage();\n logger.info(\"invalid client id {}, context: {}\", oauthRequest.getClientId(), oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n }\n\n // check client id\n Client openOauthClients = oAuthService.getClientByClientId(oauthRequest.getClientId());\n if (openOauthClients == null) {\n OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_CLIENT))\n .setErrorDescription(OAuthConstants.OAuthDescription.INVALID_CLIENT_DESCRIPTION)\n .buildJSONMessage();\n logger.info(\"can not get client, context: {}\", oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n }\n\n if (!openOauthClients.getGrantTypes().contains(Constants.OAUTH_AUTHORIZATION_CODE)) {\n OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_CLIENT_INFO))\n .setErrorDescription(OAuthConstants.OAuthDescription.INVALID_GRANT_TYPE)\n .buildJSONMessage();\n logger.info(\"no grant type, context: {}\", oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n }\n\n // check client secret\n if (!openOauthClients.getClientSecret().equals(oauthRequest.getClientSecret())) {\n OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_CLIENT_INFO))\n .setErrorDescription(OAuthConstants.OAuthDescription.INVALID_CLIENT_DESCRIPTION)\n .buildJSONMessage();\n logger.info(\"invalid secret: {}, context: {}\", openOauthClients.getClientSecret(), oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n }\n\n // check redirect url\n if (!oAuthAuthzParameters.getRedirectUri().equals(oauthRequest.getRedirectURI())) {\n OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_REQUEST))\n .setErrorDescription(OAuthConstants.OAuthDescription.INVALID_REDIRECT_URI)\n .buildJSONMessage();\n logger.info(\"invalid redirect url {}, context: {}\", oauthRequest.getRedirectURI(), oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n }\n\n // build response\n OAuthIssuer oauthIssuerImpl = new OAuthIssuerImpl(new UUIDValueGeneratorEx());\n String accessToken = oauthIssuerImpl.accessToken();\n String refreshToken = oauthIssuerImpl.refreshToken();\n\n /**\n * limit client access token number\n */\n int limitNum = openOauthClients.getClientNum();\n limitNum = limitNum > 0 ? limitNum - 1 : limitNum;\n oAuthService.limitAccessToken(oAuthAuthzParameters.getClientId(),\n oAuthAuthzParameters.getUserId(), limitNum);\n\n oAuthService.saveAccessToken(accessToken, oAuthAuthzParameters);\n oAuthService.saveRefreshToken(refreshToken, accessToken, oAuthAuthzParameters);\n\n OAuthResponse response = OAuthASResponseEx\n .tokenResponse(HttpServletResponse.SC_OK)\n .setTokenType(\"uuid\")\n .setAccessToken(accessToken)\n .setRefreshToken(refreshToken)\n .setExpiresIn(String.valueOf(appConfig.tokenAccessExpire))\n\n .setScope(oAuthAuthzParameters.getScope())\n .buildJSONMessage();\n\n //remove the code from cache\n oAuthService.delOAuthAuthzParameters(authCode);\n\n logger.info(\"response access toke {}, context: {}\", accessToken, oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n } catch (OAuthProblemException e) {\n logger.error(\"oauth problem exception\", e);\n OAuthResponse res = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_REQUEST))\n .setErrorDescription(e.getMessage())\n .buildJSONMessage();\n return new ResponseEntity<String>(res.getBody(), HttpStatus.valueOf(res.getResponseStatus()));\n }\n\n }", "public Jwt getJwt() {\n if (jwt == null || Instant.now().plus(EXPIRATION_OFFSET).isAfter(jwt.getExpireAt())) {\n jwt = jwtCreator.generateJwt(serviceAccountKey);\n }\n\n return jwt;\n }", "public static String getAccessToken() {\n return \"\";\n }", "@Test\n public void testJwtIsUsedInTokenGrantEndPoint() throws Exception {\n String[] params = this.mockMvc\n .perform(MockMvcRequestBuilders.post(\"/oauth/authorize\")\n .principal(new UsernamePasswordAuthenticationToken(\"user\", \"password\",\n Arrays.asList(new SimpleGrantedAuthority(\"ROLE_USER\"))))\n .param(OAuth2Utils.USER_OAUTH_APPROVAL, uriForAuthcodeTokenRequest())\n .sessionAttr(\"authorizationRequest\", new AuthorizationRequest(null, null, testClientId, null, null,\n null, true, null, testClientRedirectUrl, null)))\n .andReturn().getResponse().getRedirectedUrl().split(\"=\");\n System.out.println(\"Got authorization code: \" + params[1]);\n\n // perform POST to /oauth/token endpoint with authentication and correct\n // auth code\n ResultActions result = this.mockMvc\n .perform(MockMvcRequestBuilders.post(\"/oauth/token\").param(OAuth2Utils.CLIENT_ID, testClientId)\n .param(OAuth2Utils.GRANT_TYPE, \"authorization_code\").param(\"code\", params[1])\n .principal(new UsernamePasswordAuthenticationToken(testClientId, \"\",\n Arrays.asList(new SimpleGrantedAuthority(\"ROLE_USER\")))))\n // we expect a 200 success\n .andExpect(MockMvcResultMatchers.status().is(200));\n String response = result.andReturn().getResponse().getContentAsString();\n System.out.println(\"Got response: \" + response);\n OAuth2AccessToken token = new ObjectMapper().readValue(response, OAuth2AccessToken.class);\n\n // verify that token is of type JWT\n Assert.assertNotNull(token.getAdditionalInformation().get(JwtAccessTokenConverter.TOKEN_ID));\n\n // verify that token value can be decoded correctly\n Map<String, Object> decodedToken = jwt.decode(token.getValue());\n System.out.println(\"Decoded Token is: \" + new ObjectMapper().writeValueAsString(decodedToken));\n Assert.assertEquals(decodedToken.get(AccessTokenConverter.CLIENT_ID), testClientId);\n }", "private String getJwt(HttpServletRequest request) {\n String authHeader = request.getHeader(\"Authorization\");\n if (authHeader != null && authHeader.startsWith(\"Bearer \")) {\n return authHeader.replace(\"Bearer \", \"\");\n }\n return null;\n }", "public String generateAuthToken(final User user, final String tenant)\n\t{\n\t\tClaims claims = Jwts.claims().setSubject(user.getId().toString());\n\t\tclaims.put(\"username\", user.getUsername());\n\t\tclaims.put(\"groupIds\", user.getGroups().stream().map(Group::getId).collect(Collectors.toList()));\n\t\tclaims.put(\"tenant\", tenant);\n\t\treturn buildToken(claims, authTokenExp);\n\t}", "@GetMapping(\"/getaccesstoken1\")\n public Map<String, Object> getAccessToken1(){\n Map<String, Object> mapResponse=new HashMap<String, Object>();\n String accessToken=transAccessService.getAccessToken();\n mapResponse.put(\"key\", \"200\");\n mapResponse.put(\"status\", \"success\");\n mapResponse.put(\"access_token\", accessToken);\n return mapResponse;\n }", "public static String createJWT(String id, String issuer, String subject, Date exp ,String secret, Date issuedat) {\n\t SignatureAlgorithm signatureAlgorithm = SignatureAlgorithm.HS256;\n\t \n\t \n\t //We will sign our JWT with our ApiKey secret\n\t byte[] apiKeySecretBytes = DatatypeConverter.parseBase64Binary(secret);\n\t Key signingKey = new SecretKeySpec(apiKeySecretBytes, signatureAlgorithm.getJcaName());\n\t \n\t //Let's set the JWT Claims\n\t JwtBuilder builder = Jwts.builder().setHeaderParam(\"typ\", \"JWT\")\n\t .setId(id)\n\t .setIssuedAt(issuedat)\n\t .setSubject(subject)\n\t .setIssuer(issuer)\n\t .setExpiration(exp)\n\t .signWith(signatureAlgorithm, signingKey);\n\t \n\t \n\t //Builds the JWT and serializes it to a compact, URL-safe string\n\t return builder.compact();\n\t }", "@POST\n @Consumes(org.springframework.http.MediaType.APPLICATION_JSON_UTF8_VALUE)\n @Produces(org.springframework.http.MediaType.APPLICATION_JSON_UTF8_VALUE)\n @Path(\"/token\")\n @ApiOperation(value = \"Gets the authorization\")\n public Response getToken(@RequestBody AuthorizationEntity auth) {\n // same AccessResource for token to generate\n if (httpServletRequest.isSecure()) {\n final NiFiUser user = NiFiUserUtils.getNiFiUser();\n if (user == null) {\n throw new AccessDeniedException(\"No user authenticated in the request.\");\n }\n if (user.getIdentity().equals(auth.getUsername()) || user.getIdentity().equals(auth.getIdentity())) {\n\n LoginAuthenticationToken loginToken = new LoginAuthenticationToken(auth.getUsername(), auth.getUsername(), auth.getExpiration(), auth.getIssuer());\n String jwtToken = jwtService.generateSignedToken(loginToken);\n\n // build the response\n final URI uri = URI.create(generateResourceUri(\"auth\", \"token\"));\n return generateCreatedResponse(uri, jwtToken).build();\n }\n\n }\n return generateNotAuthorizedResponse().build();\n\n }", "public String getAccessToken() {\n if (accessToken == null || (System.currentTimeMillis() > (expirationTime - 60 * 1000))) {\n if (refreshToken != null) {\n try {\n this.refreshAccessToken();\n } catch (IOException e) {\n log.error(\"Error fetching access token\", e);\n }\n }\n }\n\n return accessToken;\n }", "String toToken(JwtClaims claims, SecretKey key);", "AccessToken getOAuthAccessToken(RequestToken requestToken) throws MoefouException;", "public String getAccess_token() {\r\n\t\treturn access_token;\r\n\t}", "@Override\n\tpublic void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication)\n\t\t\tthrows IOException, ServletException {\n\t\tParsedUser user = new ParsedUser();\n\t\tUserDetails userDetails = ((UserDetails)authentication.getPrincipal());\n\t\tString username = userDetails.getUsername();\n\t\tLong id = publisherService.readPublisher(username).getId();\n\t\tStringBuilder authorities = new StringBuilder();\n\t\tStringBuilder header = new StringBuilder();\n\t\tString token = null;\n\t\t\n\t\t\n\t\tfor(GrantedAuthority authority : authentication.getAuthorities()) {\n\t\t\tauthorities.append(authority);\n\t\t\tauthorities.append(\",\");\n\t\t}\n\t\t// remove last comma\n\t\tauthorities.deleteCharAt(authorities.length() - 1);\n\t\t\n\t\tSystem.out.println(\"ABOUT TO GENERATE JWT...\");\n\t\tSystem.out.println(authorities.toString());\n\t\t\n\t\tuser.setUsername(username);\n\t\tuser.setId(id);\n\t\tuser.setAuthorities(authorities.toString());\n\t\t\n\t\ttoken = jwtUtil.generateToken(user);\n\t\t\n\t\tSystem.out.println(token);\n\t\t\n\t\t// also set cookie\n\t\tCookie toBeSet = new Cookie(\"access_token\", token);\n\t\ttoBeSet.setMaxAge(200);\n\t\tresponse.addCookie(toBeSet);\n\t\t\n\t\theader.append(\"Bearer<\");\n\t\theader.append(token);\n\t\theader.append(\">\");\n\t\t\n\t\tSystem.out.println(header.toString());\n\n\t\t\n\t\t\n\t\tresponse.addHeader(\"Authentication\", header.toString());\n\t\n\t\t\n\n\t}", "public String createJwt(AppUser subject){\n\n //gets the current date of token issuance\n long nowMillis = System.currentTimeMillis();\n Date now = new Date(nowMillis);\n\n //Setting JWT claims\n JwtBuilder jwtBuilder = Jwts.builder()\n .setIssuedAt(now)\n .setId(Integer.toString(subject.getId()))\n .setSubject(subject.getUsername())\n .setIssuer(\"teamgit\")\n .claim(\"role\", subject.getRole().toString()) //I need an enum in the passed-in subject ROLES\n .setExpiration(new Date(nowMillis + jwtConfig.getEXPIRATION())) //sets the expiration date to 14 mins\n .signWith(jwtConfig.getSigAlg(), jwtConfig.getSigningKey());\n\n return jwtConfig.getPREFIX() + jwtBuilder.compact();\n }", "String getAuthorizerAccessToken(String appId);", "@FormUrlEncoded\n @POST(\"/oauth/access_token\")\n Flowable<ResponseBody> getAccessToken(@Field(\"oauth_verifier\") String oauthVerifier);", "public static String getAccessToken() {\n return accessToken;\n }", "@Override\n public void authenticate() throws IOException, BadAccessIdOrKeyException {\n try{\n HttpPost post = new HttpPost(Constants.FRGXAPI_TOKEN);\n List<NameValuePair> params = new ArrayList<>();\n params.add(new BasicNameValuePair(\"grant_type\", \"apiAccessKey\"));\n params.add(new BasicNameValuePair(\"apiAccessId\", accessId));\n params.add(new BasicNameValuePair(\"apiAccessKey\", accessKey));\n post.setEntity(new UrlEncodedFormEntity(params, \"UTF-8\"));\n\n HttpResponse response = client.execute(post);\n String a = response.getStatusLine().toString();\n\n if(a.equals(\"HTTP/1.1 400 Bad Request\")){\n throw (new BadAccessIdOrKeyException(\"Bad Access Id Or Key\"));\n }\n HttpEntity entity = response.getEntity();\n String responseString = EntityUtils.toString(response.getEntity());\n\n JsonParser jsonParser = new JsonParser();\n JsonObject jo = (JsonObject) jsonParser.parse(responseString);\n if(jo.get(\"access_token\") == null){\n throw new NullResponseException(\"The Access Token you get is null.\");\n }\n String accessToken = jo.get(\"access_token\").getAsString();\n List<Header> headers = new ArrayList<>();\n headers.add(new BasicHeader(HttpHeaders.CONTENT_TYPE, \"application/json\"));\n headers.add(new BasicHeader(\"Authorization\", \"Bearer \" + accessToken));\n\n client = HttpClients.custom().setDefaultHeaders(headers).build();\n } catch (NullResponseException e) {\n System.out.println(e.getMsg());\n }\n }", "public String generateRefreshToken(final User user, final String tenant)\n\t{\n\t\tClaims claims = Jwts.claims().setSubject(user.getId().toString());\n\t\tclaims.put(\"password\", user.getPassword());\n\t\tclaims.put(\"tenant\", tenant);\n\t\treturn buildToken(claims, refreshTokenExp);\n\t}", "public Pokemon.RequestEnvelop.AuthInfo.JWT.Builder getTokenBuilder() {\n bitField0_ |= 0x00000002;\n onChanged();\n return getTokenFieldBuilder().getBuilder();\n }", "private String generateToken () {\n SecureRandom secureRandom = new SecureRandom();\n long longToken;\n String token = \"\";\n for ( int i = 0; i < 3; i++ ) {\n longToken = Math.abs( secureRandom.nextLong() );\n token = token.concat( Long.toString( longToken, 34 + i ) );//max value of radix is 36\n }\n return token;\n }", "@VisibleForTesting\n\t/*package*/ JWTSupport initJWT(Environment env, final IdentityConfiguration conf, InstantSource instantSource) throws Exception {\n\t\tJWTSupport jwtSupport = new JWTSupport(conf, instantSource);\n\t\tjwtSupport.init();\n\t\treturn jwtSupport;\n\t}", "private String generateToken(User newUser) throws JSONException{\n User temp_user = userRepository.findByUsername(newUser.getUsername());\n String user_id = temp_user.getId().toString();\n\n //creating JSON representing new token format which then can be encoded --> DOUBLE CHECK IF ALSO WORKS WITH STRINGS ONLY\n JSONObject json = new JSONObject();\n json.put(\"user_id\", user_id);\n\n //creating and encoding token\n return Base64.getEncoder().encodeToString(json.toString().getBytes());\n }", "@GetMapping(value = \"/token/refresh\")\n public void refreshToken (HttpServletRequest request, HttpServletResponse response) throws IOException {\n String authorizationHeader = request.getHeader(AUTHORIZATION);\n if(authorizationHeader!=null && authorizationHeader.startsWith(\"Bearer \")){\n\n try {\n String refreshToken = authorizationHeader.substring(\"Bearer \".length());\n Algorithm algorithm = Algorithm.HMAC256(\"secret\".getBytes());\n JWTVerifier verifier = JWT.require(algorithm).build();\n DecodedJWT decodedJWT = verifier.verify(refreshToken);\n String userName = decodedJWT.getSubject();\n User user = userRepo.findByUserName(userName);\n\n String accessToken = JWT.create()\n .withSubject(user.getUserName())\n .withExpiresAt(new Date(System.currentTimeMillis()+ 10*60*1000))\n .withIssuer(request.getRequestURL().toString())\n .withClaim(\"roles\", user.getRoles().stream().map(Role::getRoleName).collect(Collectors.toList()))\n .sign(algorithm);\n\n\n\n Map<String , String> tokens = new HashMap<>();\n tokens.put(\"accessToken\",accessToken);\n tokens.put(\"refreshToken\",refreshToken);\n response.setContentType(APPLICATION_JSON_VALUE);\n new ObjectMapper().writeValue(response.getOutputStream(),tokens);\n\n }catch (Exception exception){\n\n response.setHeader(\"Error\", exception.getMessage());\n response.setStatus(FORBIDDEN.value());\n //response.sendError(FORBIDDEN.value());\n\n Map<String , String> error = new HashMap<>();\n error.put(\"errorMsg\",exception.getMessage());\n response.setContentType(APPLICATION_JSON_VALUE);\n new ObjectMapper().writeValue(response.getOutputStream(),error);\n }\n\n }else {\n throw new RuntimeException(\"Refresh token is missing\");\n }\n }", "GetToken.Req getGetTokenReq();", "public interface AuthAPIService {\n\n @FormUrlEncoded\n @POST(\"/oauth/token\")\n public Observable<Tokens> getAccessTokensObs(@Field(\"grant_type\") String grantType,\n @Field(\"scope\") String manageProject,\n @Header(\"Authorization\") String authHeader);\n\n}", "@RequestMapping(value = \"/oauth/token\", method = RequestMethod.POST, produces = \"application/json;charset=utf-8\")\n public Object entry(HttpServletRequest request)\n throws URISyntaxException, OAuthSystemException, OAuthProblemException {\n\n String type = request.getParameter(\"grant_type\");\n\n if (StringUtils.isNotEmpty(type)) {\n switch (type) {\n case \"authorization_code\":\n return this.token(request);\n case \"refresh_token\":\n return this.refresh(request);\n case \"client_credentials\":\n return this.credential(request);\n case \"password\":\n return this.password(request);\n default:\n ;\n }\n }\n\n OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_REQUEST))\n .setErrorDescription(OAuthConstants.OAuthDescription.INVALID_GRANT_TYPE)\n .buildJSONMessage();\n logger.info(\"invalid grant type: {}\", type);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n }", "public TrueNTHAccessTokenExtractor<JsonObject> getAccessTokenExtractor() {\n\n\treturn new TrueNTHAccessTokenExtractorJSon();\n }", "@Test\n @Ignore\n public void testJWTGeneration() throws Exception {\n JWTGenerator jwtGen = new JWTGenerator() {\n @Override\n public Map<String, String> convertClaimMap(Map<ClaimMapping, String> userAttributes, String username) {\n return new HashMap<>();\n }\n };\n APIKeyValidationInfoDTO dto=new APIKeyValidationInfoDTO();\n dto.setSubscriber(\"sastry\");\n dto.setApplicationName(\"hubapp\");\n dto.setApplicationId(\"1\");\n dto.setApplicationTier(\"UNLIMITED\");\n dto.setEndUserName(\"denis\");\n dto.setSubscriberTenantDomain(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME);\n dto.setUserType(APIConstants.ACCESS_TOKEN_USER_TYPE_APPLICATION);\n TokenValidationContext validationContext = new TokenValidationContext();\n validationContext.setValidationInfoDTO(dto);\n validationContext.setContext(\"cricScore\");\n validationContext.setVersion(\"1.9.0\");\n String token = jwtGen.generateToken(validationContext);\n System.out.println(\"Generated Token: \" + token);\n String header = token.split(\"\\\\.\")[0];\n String decodedHeader = new String(Base64Utils.decode(header));\n System.out.println(\"Header: \"+decodedHeader);\n String body = token.split(\"\\\\.\")[1];\n String decodedBody = new String(Base64Utils.decode(body));\n System.out.println(\"Body: \" + decodedBody);\n\n\n // With end user name not included\n token = jwtGen.generateToken(validationContext);\n System.out.println(\"Generated Token: \" + token);\n header = token.split(\"\\\\.\")[0];\n decodedHeader = new String(Base64Utils.decode(header));\n System.out.println(\"Header: \"+decodedHeader);\n body = token.split(\"\\\\.\")[1];\n decodedBody = new String(Base64Utils.decode(body));\n System.out.println(\"Body: \" + decodedBody);\n\n\n dto.setUserType(APIConstants.SUBSCRIPTION_USER_TYPE);\n token = jwtGen.generateToken(validationContext);\n System.out.println(\"Generated Token: \" + token);\n header = token.split(\"\\\\.\")[0];\n decodedHeader = new String(Base64Utils.decode(header));\n System.out.println(\"Header: \"+decodedHeader);\n body = token.split(\"\\\\.\")[1];\n decodedBody = new String(Base64Utils.decode(body));\n System.out.println(\"Body: \" + decodedBody);\n\n token = jwtGen.generateToken(validationContext);\n System.out.println(\"Generated Token: \" + token);\n header = token.split(\"\\\\.\")[0];\n decodedHeader = new String(Base64Utils.decode(header));\n System.out.println(\"Header: \"+decodedHeader);\n body = token.split(\"\\\\.\")[1];\n decodedBody = new String(Base64Utils.decode(body));\n System.out.println(\"Body: \" + decodedBody);\n\n\n //we can not do assert eaquals because body includes expiration time.\n\n /*String expectedHeader = \"{\\\"typ\\\":\\\"JWT\\\"}\";\n String expectedBody = \"{\\\"iss\\\":\\\"wso2.org/products/am\\\", \\\"exp\\\":1349270811075, \" +\n \"\\\"http://wso2.org/claims/subscriber\\\":\\\"sastry\\\", \" +\n \"\\\"http://wso2.org/claims/applicationname\\\":\\\"hubapp\\\", \" +\n \"\\\"http://wso2.org/claims/apicontext\\\":\\\"cricScore\\\", \" +\n \"\\\"http://wso2.org/claims/version\\\":\\\"1.9.0\\\", \" +\n \"\\\"http://wso2.org/claims/tier\\\":\\\"Bronze\\\", \" +\n \"\\\"http://wso2.org/claims/enduser\\\":\\\"denis\\\"}\";\n\n Assert.assertEquals(expectedHeader, decodedHeader);\n Assert.assertEquals(expectedBody, decodedBody);*/\n //String decodedToken = new String(Base64Utils.decode(token));\n //log.info(decodedToken);\n //assertNotNull(decodedToken);\n\n\n }", "public String getAccessToken() {\n\t\t\n\t\tString access_token = \"\";\n\t\t\n\t\tif (securityContext != null) {\n\t\t\taccess_token = securityContext.getTokenString();\n\t\t}\n\t\t\n\t\treturn access_token;\n\t}", "public String generateToken(Authentication authentication) {\n\t\tUserPrincipal userPrincipal = (UserPrincipal) authentication.getPrincipal();\n\t\treturn Jwts.builder().setSubject(userPrincipal.getUsername())\n\t\t\t\t.setIssuedAt(new Date())\n\t\t\t\t.setExpiration(new Date(new Date().getTime() + expiration * 1000))\n\t\t\t\t.signWith(SignatureAlgorithm.HS512, secret)\n\t\t\t\t.compact();\n\t}", "public String generateRefreshToken(ApplicationUser user) {\n Date expiryDate = java.sql.Date.valueOf(LocalDate.now().plusDays(jwtConfig.getRefreshExpirationDateInMs()));\n return Jwts.builder()\n .setSubject(user.getUser().getUsername())\n .claim(\"authorities\", user.getAuthorities())\n .setIssuedAt(new Date(System.currentTimeMillis()))\n .setExpiration(expiryDate)\n .signWith(jwtSecretKey.secretKey())\n .compact();\n }", "@Test\r\n\tpublic void TestgenerateToken() {\r\n\t\tlog.info(env.getProperty(\"log.start\"));\r\n\t\tudetails = new User(\"admin\", \"admin\", new ArrayList<>());\r\n\t\tString generateToken = jwtutil.generateToken(udetails);\r\n\t\tassertNotNull(generateToken);\r\n\t\tlog.info(env.getProperty(\"log.end\"));\r\n\t}", "private String getToken(HttpServletRequest request){\n String header = request.getHeader(\"Authorization\");\n if(header != null && header.startsWith(\"Bearer\"))\n \t// Sacamos al bearer del token\n return header.replace(\"Bearer \", \"\");\n return null;\n }", "public java.lang.String getOauth_token(){\r\n return localOauth_token;\r\n }", "String getAuthorizerRefreshToken(String appId);", "public Pokemon.RequestEnvelop.AuthInfo.JWTOrBuilder getTokenOrBuilder() {\n return token_;\n }", "public static String createToken(UserDetails userDetails) {\n\t\tlong expires = System.currentTimeMillis() + 1000L * 60 * 30;\n\t\t\n\t\t/* Expires in three Year */\n\t\t//long expiresOneYear = System.currentTimeMillis() + 1000L * 60 * 60 * 24 * 365 *3;\n\t\t\n\t\tStringBuilder tokenBuilder = new StringBuilder();\n\t\ttokenBuilder.append(userDetails.getUsername());\n\t\ttokenBuilder.append(\":\");\n\t\t// set expire time\n\t\ttokenBuilder.append(expires);\n\t\t\n\t\ttokenBuilder.append(\":\");\n\t\t\n\t\ttokenBuilder.append(TokenUtils.computeSignature(userDetails, expires));\n\t\t\n\t\treturn tokenBuilder.toString();\n\t}" ]
[ "0.6858034", "0.6798697", "0.63904655", "0.62747073", "0.61453736", "0.6099691", "0.6096453", "0.59906995", "0.59789366", "0.59739673", "0.59739673", "0.5960852", "0.595194", "0.59410083", "0.5909393", "0.59012914", "0.5899055", "0.58969027", "0.58260244", "0.5809681", "0.5807688", "0.580561", "0.5776734", "0.57548875", "0.57530814", "0.57370746", "0.5733919", "0.57325345", "0.5730849", "0.572787", "0.5707649", "0.56874526", "0.5665635", "0.56587267", "0.5648815", "0.56478184", "0.5646118", "0.5636385", "0.5622699", "0.5552186", "0.55467343", "0.55447197", "0.554145", "0.5539348", "0.5539235", "0.5532718", "0.550299", "0.54972005", "0.5491202", "0.546148", "0.5457048", "0.5443644", "0.5443402", "0.5426346", "0.54230607", "0.5420601", "0.541135", "0.5408089", "0.5408038", "0.54001516", "0.5394761", "0.5362858", "0.53617007", "0.53614795", "0.5354696", "0.5350752", "0.53476685", "0.5336493", "0.5333452", "0.53324527", "0.5326494", "0.5320845", "0.5317392", "0.5311979", "0.53108454", "0.53107923", "0.5294898", "0.52933425", "0.526125", "0.5254673", "0.5249561", "0.5243166", "0.5235497", "0.523405", "0.5228506", "0.5227007", "0.522257", "0.52189606", "0.5211554", "0.52094936", "0.5204417", "0.5200821", "0.51986474", "0.5196232", "0.5194541", "0.5176899", "0.51752245", "0.5173324", "0.5170832", "0.5158567" ]
0.58643836
18
Get token validity period for the Self contained JWT Access Token. (For implicit grant)
public static long getAccessTokenLifeTimeInSeconds(OAuthAppDO oAuthAppDO) { long lifetimeInSeconds = oAuthAppDO.getUserAccessTokenExpiryTime(); if (lifetimeInSeconds == 0) { lifetimeInSeconds = OAuthServerConfiguration.getInstance() .getUserAccessTokenValidityPeriodInSeconds(); if (log.isDebugEnabled()) { log.debug("User access token time was 0ms. Setting default user access token lifetime : " + lifetimeInSeconds + " sec."); } } if (log.isDebugEnabled()) { log.debug("JWT Self Signed Access Token Life time set to : " + lifetimeInSeconds + " sec."); } return lifetimeInSeconds; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getTokenValidityInSeconds() {\n return tokenValidityInSeconds;\n }", "public Integer getAccessTokenValiditySeconds() {\n return accessTokenValiditySeconds;\n }", "Duration getTokenExpiredIn();", "public Integer getRefreshTokenValiditySeconds() {\n return refreshTokenValiditySeconds;\n }", "public long getTokenExpirationInMillis() {\n return tokenExpirationInMillis;\n }", "public long getTokenValidityInSecondsForRememberMe() {\n return tokenValidityInSecondsForRememberMe;\n }", "public int getContainerTokenExpiryInterval() {\n return containerTokenExpiryInterval;\n }", "@Override\n\tpublic long getTokenExpiryTime() {\n\t\treturn 0;\n\t}", "public boolean checkTokenExpiry(String token) {\n System.out.println(token);\n Date now = new Date();\n long nowTime = now.getTime();\n //Date expire;\n Date tokenEXPClaim;\n long expires;\n try {\n DecodedJWT recievedToken = JWT.decode(token);\n tokenEXPClaim = recievedToken.getExpiresAt();\n expires = tokenEXPClaim.getTime();\n return nowTime >= expires;\n } \n catch (Exception exception){\n System.out.println(\"Problem with token, no way to check expiry\");\n System.out.println(exception);\n return true;\n }\n \n }", "public boolean checkTokenExpiry() {\n //System.out.println(\"Checking token expiry...\");\n Date now = new Date();\n long nowTime = now.getTime();\n //Date expire;\n Date tokenEXPClaim;\n long expires;\n try {\n DecodedJWT recievedToken = JWT.decode(currentAccessToken);\n tokenEXPClaim = recievedToken.getExpiresAt();\n expires = tokenEXPClaim.getTime();\n //System.out.println(\"Now is \"+nowTime);\n //System.out.println(\"Expires at \"+expires);\n //System.out.println(\"Expired? \"+(nowTime >= expires));\n return nowTime >= expires;\n } \n catch (Exception exception){\n System.out.println(\"Problem with token, no way to check expiry\");\n System.out.println(exception);\n return true;\n }\n \n }", "protected int getAccessTokenValiditySeconds(OAuth2Request clientAuth) {\n if (clientDetailsService != null) {\n ClientDetails client = clientDetailsService.loadClientByClientId(clientAuth.getClientId());\n Integer validity = client.getAccessTokenValiditySeconds();\n if (validity != null) {\n return validity;\n }\n }\n return accessTokenValiditySeconds;\n }", "public boolean accessTokenExpired() {\n Date currentTime = new Date();\n if ((currentTime.getTime() - lastAccessTime.getTime()) > TIMEOUT_PERIOD) {\n return true;\n } else {\n return false;\n }\n }", "long getExpiration();", "public static long getAccessTokenLifeTimeInSeconds(OAuthTokenReqMessageContext tokenReqMessageContext,\n OAuthAppDO oAuthAppDO) throws IdentityOAuth2Exception {\n\n long lifetimeInSeconds;\n boolean isUserAccessTokenType =\n isUserAccessTokenType(tokenReqMessageContext.getOauth2AccessTokenReqDTO().getGrantType());\n\n if (isUserAccessTokenType) {\n lifetimeInSeconds = oAuthAppDO.getUserAccessTokenExpiryTime();\n if (log.isDebugEnabled()) {\n log.debug(\"User Access Token Life time set to : \" + lifetimeInSeconds + \" sec.\");\n }\n } else {\n if (tokenReqMessageContext.getValidityPeriod() == -1) { // the token request does not specify the validity period explicitly\n lifetimeInSeconds = oAuthAppDO.getApplicationAccessTokenExpiryTime();\n } else { // set the expiry time sent in the request\n lifetimeInSeconds = getSecondsTillExpiry(tokenReqMessageContext.getValidityPeriod());\n }\n if (log.isDebugEnabled()) {\n log.debug(\"Application Access Token Life time set to : \" + lifetimeInSeconds + \" sec.\");\n }\n }\n\n if (lifetimeInSeconds == 0) {\n if (isUserAccessTokenType) {\n lifetimeInSeconds =\n OAuthServerConfiguration.getInstance().getUserAccessTokenValidityPeriodInSeconds();\n if (log.isDebugEnabled()) {\n log.debug(\"User access token time was 0ms. Setting default user access token lifetime : \"\n + lifetimeInSeconds + \" sec.\");\n }\n } else {\n lifetimeInSeconds =\n OAuthServerConfiguration.getInstance().getApplicationAccessTokenValidityPeriodInSeconds();\n if (log.isDebugEnabled()) {\n log.debug(\"Application access token time was 0ms. Setting default Application access token \" +\n \"lifetime : \" + lifetimeInSeconds + \" sec.\");\n }\n }\n }\n\n if (log.isDebugEnabled()) {\n log.debug(\"JWT Self Signed Access Token Life time set to : \" + lifetimeInSeconds + \" sec.\");\n }\n return lifetimeInSeconds;\n }", "protected boolean validateExpiration(SignedJWT jwtToken) {\n boolean valid = false;\n try {\n Date expires = jwtToken.getJWTClaimsSet().getExpirationTime();\n if (expires == null || new Date().before(expires)) {\n LOG.debug(\"JWT token expiration date has been \"\n + \"successfully validated\");\n valid = true;\n } else {\n LOG.warn(\"JWT expiration date validation failed.\");\n }\n } catch (ParseException pe) {\n LOG.warn(\"JWT expiration date validation failed.\", pe);\n }\n return valid;\n }", "boolean isComponentAccessTokenExpired();", "private boolean hasCoolOffPeriodExpired(Jwt jwt) {\n\n Date issuedAtTime = jwt.getClaimsSet().getIssuedAtTime();\n\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(new Date());\n calendar.set(Calendar.MILLISECOND, 0);\n calendar.add(Calendar.MINUTE, -1);\n\n return calendar.getTime().compareTo(issuedAtTime) > 0;\n }", "protected int getRefreshTokenValiditySeconds(OAuth2Request clientAuth) {\n if (clientDetailsService != null) {\n ClientDetails client = clientDetailsService.loadClientByClientId(clientAuth.getClientId());\n Integer validity = client.getRefreshTokenValiditySeconds();\n if (validity != null) {\n return validity;\n }\n }\n return refreshTokenValiditySeconds;\n }", "public Double tokenRefreshExtensionHours() {\n return this.tokenRefreshExtensionHours;\n }", "@ApiModelProperty(value = \"The lifetime in seconds of the access token\")\n public String getExpiresIn() {\n return expiresIn;\n }", "public long getExpiration() {\n return expiration;\n }", "public int getExpiry();", "public boolean isExpiredToken(String jwt) {\n try {\n Claims claims = Jwts.parser()\n .setSigningKey(DatatypeConverter.parseBase64Binary(\"TerryLam\"))\n .parseClaimsJws(jwt).getBody();\n Date expiration = claims.getExpiration();\n //If the expiration Date is a time BEFORE the current time, it is expired\n if (expiration.before(new Date())) {\n return true;\n } else {\n return false;\n }\n } catch (JwtException ex) {\n log.info(\"Error validating token. Exception Message \" + ex.getMessage());\n return true;\n }\n }", "@GetMapping(\"/validate\")\n\tpublic ResponseEntity<?> getValidity(@RequestHeader(\"Authorization\") String jwtToken) {\n\t\treturn new ResponseEntity<AuthResponse>(this.service.validate(jwtToken) , HttpStatus.OK);\n\t}", "@Test\n public void testExpiredToken() {\n ApplicationContext context =\n TEST_DATA_RESOURCE\n .getSecondaryApplication()\n .getBuilder()\n .client(ClientType.AuthorizationGrant, true)\n .token(OAuthTokenType.Bearer, true, null, null, null)\n .build();\n OAuthToken t = context.getToken();\n\n String header = authHeaderBearer(t.getId());\n\n Response r = target(\"/token/private\")\n .request()\n .header(AUTHORIZATION, header)\n .get();\n\n assertEquals(Status.UNAUTHORIZED.getStatusCode(), r.getStatus());\n }", "public synchronized void checkTokenExpiry() {\n if (this.mExpiryDate != null && this.mExpiryDate.getTime() <= System.currentTimeMillis() + REFRESH_THRESHOLD) {\n acquireTokenAsync();\n }\n }", "public boolean isSecurityTokenExpired() {\n return System.currentTimeMillis() > securityTokenExpiryTime || isExpired();\n }", "boolean checkForExpiration() {\n boolean expired = false;\n\n // check if lease exists and lease expire is not MAX_VALUE\n if (leaseId > -1 && leaseExpireTime < Long.MAX_VALUE) {\n\n long currentTime = getCurrentTime();\n if (currentTime > leaseExpireTime) {\n if (logger.isTraceEnabled(LogMarker.DLS_VERBOSE)) {\n logger.trace(LogMarker.DLS_VERBOSE, \"[checkForExpiration] Expiring token at {}: {}\",\n currentTime, this);\n }\n noteExpiredLease();\n basicReleaseLock();\n expired = true;\n }\n }\n\n return expired;\n }", "@Override\n\tpublic void setTokenExpiryTime(long arg0) {\n\t\t\n\t}", "int getExpiryTimeSecs();", "public long getExpiry() {\n return this.contextSet.getExpiration();\n }", "@Schema(required = true, description = \"Signature validity in milliseconds\")\n public Long getSignatureValidForMillis() {\n return signatureValidForMillis;\n }", "Optional<Instant> getTokenInvalidationTimestamp();", "boolean isAuthorizerAccessTokenExpired(String appId);", "long getInvalidLoginLockoutTime();", "public long getExpiry() {\n return this.expiry;\n }", "@Override\n public final double getExpiration() {\n return safetyHelper.getExpiration();\n }", "long getExpirationDate();", "public int getExpiry()\n {\n return expiry;\n }", "public Jwt getJwt() {\n if (jwt == null || Instant.now().plus(EXPIRATION_OFFSET).isAfter(jwt.getExpireAt())) {\n jwt = jwtCreator.generateJwt(serviceAccountKey);\n }\n\n return jwt;\n }", "public Date getExperiyDate(String token) {\n\t\treturn getClaims(token).getExpiration();\n\n\t}", "public void setTokenValidityInSeconds(long tokenValidityInSeconds) {\n this.tokenValidityInSeconds = tokenValidityInSeconds;\n }", "@Range(min = 0)\n\t@NotNull\n\tpublic Integer getExpiration() {\n\t\treturn this.expiration;\n\t}", "public Integer getExpiry() {\n return expiry;\n }", "public boolean validateAgeOfTheToken(Date issuedAtTime, long currentTimeInMillis, long timeStampSkewMillis) throws\n IdentityOAuth2Exception {\n if (issuedAtTime == null) {\n return true;\n }\n if (notAcceptBeforeTimeInMins > 0) {\n long issuedAtTimeMillis = issuedAtTime.getTime();\n long rejectBeforeMillis = 1000L * 60 * notAcceptBeforeTimeInMins;\n if (currentTimeInMillis + timeStampSkewMillis - issuedAtTimeMillis >\n rejectBeforeMillis) {\n String logMsg = getTokenTooOldMessage(currentTimeInMillis, timeStampSkewMillis, issuedAtTimeMillis, rejectBeforeMillis);\n return logAndReturnFalse(logMsg);\n }\n }\n return true;\n }", "public boolean validateExpirationTime(Date expirationTime, long currentTimeInMillis,\n long timeStampSkewMillis) throws IdentityOAuth2Exception {\n long expirationTimeInMillis = expirationTime.getTime();\n if ((currentTimeInMillis + timeStampSkewMillis) > expirationTimeInMillis) {\n return logAndReturnFalse(\"JSON Web Token is expired. Expiration Time(ms) : \" + expirationTimeInMillis + \". JWT Rejected and validation terminated\");\n }\n return logAndReturnTrue(\"Expiration Time(exp) of JWT was validated successfully.\");\n }", "public final String getRequestExpiration() {\n return properties.get(REQUEST_EXPIRATION_PROPERTY);\n }", "public void verifyExpiration(RefreshToken token) {\n if (token.getExpiryDate().compareTo(Instant.now()) < 0) {\n throw new TokenRefreshException(token.getToken(), \"Expired token. Please issue a new request\");\n }\n }", "String getExpiry();", "protected int getMaxAccessTokens() {\n return maxAccessTokens;\n }", "long getExpiryTime() {\n return expiryTime;\n }", "public int getExpiryTime() {\n return expiryTime;\n }", "private String generateToken(LoginViewModel viewModel){\n \n String authenticationToken;\n \n try{\n Authentication authentication = authenticationManager.authenticate(\n new UsernamePasswordAuthenticationToken(viewModel.getUsername(), viewModel.getPassword()));\n \n SecurityContextHolder.getContext().setAuthentication(authentication);\n UserPrincipal principal = (UserPrincipal) authentication.getPrincipal();\n \n System.out.println(generateExpirationDate());\n authenticationToken = JWT\n .create()\n .withClaim(\"role\",\"ROLE_\" + principal.getRole())\n .withSubject(principal.getUsername())\n .withExpiresAt(generateExpirationDate())\n .sign(HMAC512(CommonSecurityConfig.SECRET.getBytes()));\n }catch (Exception e){\n System.out.println(e.getMessage());\n return null;\n }\n \n return authenticationToken;\n }", "public OffsetDateTime expiration() {\n return this.innerProperties() == null ? null : this.innerProperties().expiration();\n }", "public Date getExpirationDateFromToken(String token) {\n\t\tDate expiration;\n\t\ttry {\n\t\t\tfinal Claims claims = this.getClaimsFromToken(token);\n\t\t\texpiration = claims.getExpiration();\n\t\t} catch (Exception e) {\n\t\t\texpiration = null;\n\t\t}\n\t\treturn expiration;\n\t}", "public Date getExpirationDateFromToken(String token) {\n\t\treturn getClaimFromToken(token, Claims::getExpiration);\n\t}", "public Date getExpirationDateFromToken(String token) {\n\t\treturn getClaimFromToken(token, Claims::getExpiration);\n\t}", "@ApiModelProperty(value = \"The period for which the object is valid\")\n\n @Valid\n\n public TimePeriod getValidFor() {\n return validFor;\n }", "public Long getExpires_in() {\r\n\t\treturn expires_in;\r\n\t}", "public DateTime expiryTime() {\n return this.expiryTime;\n }", "public long getExpiredSessions();", "public int getSessionExpireRate();", "public String getAccessToken() {\n if (accessToken == null || (System.currentTimeMillis() > (expirationTime - 60 * 1000))) {\n if (refreshToken != null) {\n try {\n this.refreshAccessToken();\n } catch (IOException e) {\n log.error(\"Error fetching access token\", e);\n }\n }\n }\n\n return accessToken;\n }", "public boolean checkJTIValidityPeriod(String jti, long jwtExpiryTimeMillis, long currentTimeInMillis,\n long timeStampSkewMillis) throws IdentityOAuth2Exception {\n if (currentTimeInMillis + timeStampSkewMillis > jwtExpiryTimeMillis) {\n return logAndReturnTrue(\"JWT Token with jti: \" + jti + \"has been reused after the allowed expiry time:\"\n + jwtExpiryTimeMillis);\n } else {\n return logAndReturnFalse(\"JWT Token with jti: \" + jti + \" Has been replayed before the allowed expiry time:\"\n + jwtExpiryTimeMillis);\n }\n }", "public int getExpiryTimeSecs() {\n return expiryTimeSecs_;\n }", "public boolean isTokenValid() throws RSAEncryptedRSASignedJWTException{\n if(decryptedSignedJWT == null)\n throw new RSAEncryptedRSASignedJWTException(\"JWT token has not been decrypted\");\n else\n return this.verifyToken();\n }", "public Pokemon.RequestEnvelop.AuthInfo.JWT getToken() {\n return token_;\n }", "public long getExpiresIn() {\n return expiresIn;\n }", "String getSpecifiedExpiry();", "public int getExpiryTimeSecs() {\n return expiryTimeSecs_;\n }", "public String getExpiration() {\n return this.expiration;\n }", "public Boolean ValidateJWTExpirationTime(Long expirationTime, int extraValidityDay) {\n // long expirationTimeSeconds = Long.parseLong(expirationTime);\n Date time = new Date((long) expirationTime * 1000);\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(time);\n calendar.add(Calendar.DATE, extraValidityDay);\n time = calendar.getTime();\n\n if (time.compareTo(new Date()) > 0) {\n\n return true;\n }\n return false;\n }", "@Override\n\tpublic boolean isTokenValid(String token) {\n\t\tLoginToken loginToken = getLoginTokenByToken(token);\n\t\tif (loginToken != null) {\n\t\t\tDate createTime = loginToken.getCreateTime();\n\t\t\tDate current = new Date();\n\t\t\tSystem.out.println(\"过了:\"+Math.abs(current.getTime() - createTime.getTime()));\n\t\t\tSystem.out.println(\"过了:\"+Math.abs(current.getTime() - createTime.getTime()) / (1000 *60));\n\t\t\tif (Math.abs(current.getTime() - createTime.getTime()) / (1000 * 60) >= 60) {\n\t\t\t\tloginToken.setStatus(Constant.LOGIN_TOKEN_STATUS_INVALID);\n\t\t\t\tloginTokenMapper.updateByPrimaryKey(loginToken);\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\tloginToken.setCreateTime(current);\n\t\t\t\tloginTokenMapper.updateByPrimaryKey(loginToken);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}", "String generateUnitRenewalToken(Unit unit, Instant expiration);", "@GetMapping(\"/validateToken\")\n\t@ApiOperation(value = \"Validate token\", notes = \"Validates token \", response = AuthenticationResponse.class)\n\tpublic AuthenticationResponse getValidity(\n\t\t\t@ApiParam(value = \"Token for validation\", required = true) @RequestHeader(\"Authorization\") final String token) {\n\t\tlog.info(\"Token Validation ----->{}\", token);\n\t\treturn validationService.validate(token);\n\t}", "@Nullable\n public Long getExpiresIn() {\n return expiresIn;\n }", "OffsetDateTime expirationTimeIfNotActivatedUtc();", "public Date getTokenReceived() {\n return tokenReceived;\n }", "@ApiModelProperty(required = false, value = \"epoch timestamp in milliseconds\")\n public Long getExpires() {\n return expires;\n }", "public interface TokenInvalidator {\n C0117M invalidateAccessToken();\n}", "public long getExpiryMillis()\n {\n return m_dtExpiry;\n }", "public Pokemon.RequestEnvelop.AuthInfo.JWT getToken() {\n if (tokenBuilder_ == null) {\n return token_;\n } else {\n return tokenBuilder_.getMessage();\n }\n }", "public AuthenticationResponse validateToken(AuthValidationRequest authValidationRequest) throws TokenExpiredException {\n boolean isExpired = tokenHelper.isExpired(authValidationRequest.getToken());\n if(isExpired){\n throw new TokenExpiredException(\"Token expired. Please login again\");\n }\n\n AuthenticationResponse response = new AuthenticationResponse();\n response.setToken(authValidationRequest.getToken());\n\n String username = tokenHelper.getUsernameFromToken(authValidationRequest.getToken());\n User user = userRepo.findByUsername(username);\n\n response.setUser(user);\n\n return response;\n }", "@Override\n public boolean isTokenValid(CrUser user, String token) {\n boolean result = false;\n if (user.getToken().equalsIgnoreCase(token)) {\n Date currentTime = new Date();\n if ((currentTime.getTime() - user.getTokenUpdateTime().getTime()) <= 1800000) {\n user.setTokenUpdateTime(currentTime);\n result = true;\n }\n }\n return result;\n }", "public AccessToken getAccessToken() {\n return token;\n }", "Date getExpiredDate();", "@Service\npublic interface JwtTokenService {\n\n /**\n * Returns a Json Web Token generated out of the provided userDetails\n * @param uerDetails\n * @return a JWT string\n */\n String convertToJwt (SsoUserDetails uerDetails);\n\n /**\n * Checks whether the provided Json Web Token is a valid Token and if it is not expired\n * @param jwt\n * @return true if JWT is a valid Json Web Token and the expiration time is not reached yet\n */\n boolean isValid(String jwt);\n}", "public Date getExpirationTime() {\n return expirationTime;\n }", "public boolean isTokenExpired(String token) {\n\t\tDate expDate = getExperiyDate(token);\n\t\treturn expDate.before(new Date(System.currentTimeMillis()));\n\t}", "LocalDateTime getExpiration(K key);", "public interface JwtTokenService {\n /**\n * Create token for user\n *\n * @param user user, that needs a token\n * @return token\n */\n String createToken(User user);\n\n /**\n * Get token life duration\n *\n * @return token duration\n */\n Duration getTokenExpiredIn();\n\n /**\n * Parse token\n *\n * @param token received token\n * @return authenticated token\n */\n Authentication parseToken(String token);\n}", "public long getTimeLeft() {\n return getExpiration() - System.currentTimeMillis() / 1000L <= 0 ? 0 : getExpiration() - System.currentTimeMillis() / 1000L;\n }", "protected boolean validateToken(SignedJWT jwtToken) {\n boolean sigValid = validateSignature(jwtToken);\n if (!sigValid) {\n LOG.warn(\"Signature could not be verified\");\n }\n boolean audValid = validateAudiences(jwtToken);\n if (!audValid) {\n LOG.warn(\"Audience validation failed.\");\n }\n boolean expValid = validateExpiration(jwtToken);\n if (!expValid) {\n LOG.info(\"Expiration validation failed.\");\n }\n\n return sigValid && audValid && expValid;\n }", "@ApiModelProperty(example = \"2017-11-29T22:40:11.000+0000\", value = \"Date and time the token expires (in ISO 8601 format). If not specified, it will default to the maximum lifetime for this token type.\")\n public OffsetDateTime getTerminalDate() {\n return terminalDate;\n }", "int getExpireTimeout();", "public java.util.Calendar getExpiryTime(){\n return localExpiryTime;\n }", "boolean isValid(String jwt);", "boolean isValidExpTime();", "private Boolean isTokenExpired(String token) {\n\t\tfinal Date expiration = getExpirationDateFromToken(token);\n\t\treturn expiration.before(new Date());\n\t}", "public Long getMaxAgeSeconds(Auth arg0) {\n\t\treturn null;\n\t}" ]
[ "0.7407562", "0.7077848", "0.7022543", "0.6589334", "0.6555866", "0.6491876", "0.6438388", "0.64249945", "0.61493236", "0.6107043", "0.6095697", "0.6045027", "0.59499633", "0.59453446", "0.59351796", "0.58645004", "0.5846632", "0.58173823", "0.5801231", "0.5784024", "0.57792664", "0.57525754", "0.5742253", "0.5739041", "0.5712861", "0.56811607", "0.56193125", "0.55812174", "0.55649", "0.55431205", "0.5519689", "0.5484007", "0.5483663", "0.5469079", "0.5463779", "0.5462632", "0.5459147", "0.5428839", "0.5414799", "0.54087126", "0.5392141", "0.536759", "0.53656495", "0.5342231", "0.53314394", "0.53043556", "0.5300107", "0.52955085", "0.5285774", "0.52802205", "0.5279141", "0.5271828", "0.52633375", "0.52619886", "0.5261211", "0.5249805", "0.5249805", "0.5235521", "0.52330637", "0.5211049", "0.5198898", "0.51925045", "0.5190729", "0.519043", "0.51784366", "0.5172806", "0.5164475", "0.5162701", "0.5152191", "0.5121057", "0.5117261", "0.5113486", "0.511041", "0.5110242", "0.51094425", "0.51069075", "0.5087998", "0.5087986", "0.5085449", "0.5078949", "0.50773853", "0.50659204", "0.50648874", "0.50328475", "0.50272745", "0.5022029", "0.50204784", "0.5017489", "0.50166535", "0.5016315", "0.5014569", "0.5014191", "0.49982643", "0.49957958", "0.4978789", "0.49783766", "0.49743167", "0.49696907", "0.49646318", "0.4954108" ]
0.59004104
15
Driver method for the class
public static void main( String[] args ){ AdjListsGraph<String> a = new AdjListsGraph<String>( "Sample-Graph.tgf" ); System.out.println( a ); System.out.println( "Number of vertices (5):" + a.getNumVertices()); System.out.println( "Number of arcs (7):" + a.getNumArcs()); System.out.println( "isEdge A<-->B (TRUE):" + a.isEdge("A", "B")); System.out.println( "isArc A-->C (TRUE):" + a.isArc( "A","C")); System.out.println( "isEdge D<-->E (FALSE):" + a.isEdge( "D","E" )); System.out.println( "isArc D -> E (TRUE):" + a.isArc( "D","E" )); System.out.println( "isArc E -> D (FALSE):" + a.isArc( "E","D" )); System.out.println( "Removing vertex A."); a.removeVertex( "A" ); System.out.println( "Adding edge B<-->D"); a.addEdge( "B","D" ); System.out.println( "Number of vertices (4):" + a.getNumVertices()); System.out.println( "Number of arcs (5):" + a.getNumArcs()); System.out.println( a ); System.out.println( "Adj to B ([C,D]):" + a.getSuccessors( "B" ) ); System.out.println( "Adj to C ([B]):" + a.getSuccessors( "C" )); System.out.println( "Adding A (at the end of vertices)." ); a.addVertex( "A" ); System.out.println( "Adding B (should be ignored)." ); a.addVertex( "B" ); System.out.println( "Saving the graph into BCDEA.tgf" ); a.saveToTGF( "BCDEA.tgf" ); System.out.println( "Adding F->G->H->I->J->K->A." ); a.addVertex( "F" ); a.addVertex( "G" ); a.addArc( "F", "G" ); a.addVertex( "H" ); a.addArc( "G", "H" ); a.addVertex( "I" ); a.addArc( "H", "I" ); a.addVertex( "J" ); a.addArc( "I", "J" ); a.addVertex( "K" ); a.addArc( "J", "K" ); a.addArc( "K", "A" ); System.out.println( a ); System.out.println( "Saving the graph into A-K.tgf" ); a.saveToTGF( "A-K.tgf" ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "private stendhal() {\n\t}", "private Driver(){\n }", "@Override\n public void perish() {\n \n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void test() {\n \n }", "private Driver() {\n\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "Driver getDriver();", "Object getClass_();", "Object getClass_();", "public void initializeDriver() {\n }", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void classroom() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "public GenericMethods(WebDriver driver) {\n\t\tthis.driver = driver;\n\t}", "protected void setupParameters() {\n \n \n\n }", "protected Doodler() {\n\t}", "protected OpinionFinding() {/* intentionally empty block */}", "@Override\n\tpublic void anular() {\n\n\t}", "public Driver() {\n setupFiles();\n }", "@Override\n\tpublic void driving() {\n\t\t\n\t}", "private Inspect() {\n }", "public MethodEx2() {\n \n }", "public abstract String getDriver();", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n protected void setup() {\n }", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\r\n\tpublic void method() {\n\t\r\n\t}", "Reproducible newInstance();", "private void test() {\n\n\t}", "public void working()\n {\n \n \n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void test() {\n\t\t\n\t}", "@Override\n\tpublic void beforeClassSetup() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void intializeSpecific() {\n\r\n\t}", "@Override\n\tpublic void afterClassSetup() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "private PerfectoDriverFactory() {\n\n\t}", "public void mock(){\n\n }", "public InerDistributionDriftDetectionMethod (){\r\n \t//initialize();\r\n }", "private TMCourse() {\n\t}", "@Override\n protected void prot() {\n }", "public void smell() {\n\t\t\n\t}", "@Override\n\tpublic void buscar() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "private test5() {\r\n\t\r\n\t}", "public MockClass(String arg) {\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void visitJavaClass(JavaClass javaClass) {\n\t\t\r\n\t\t\r\n\t\tvisitClassName=javaClass.getClassName();\r\n\t\t\r\n\t\t//log.debug(\"className:+\"+visitClassName);\r\n\t\tsuper.visitJavaClass(javaClass);\r\n\t\t\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n public void runTest() {\n }", "@Override\n public void setup() {\n }", "@Override\n public void setup() {\n }", "public void setupAbstract() {\n \r\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "public abstract Class getDataClass();", "public contrustor(){\r\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public Zip_Code(WebDriver driver){\n super();\n PageFactory.initElements(driver,this);\n //local page logger gets set to abstract class logger when you use it in\n //page object\n this.logger = super.logger;\n\n }", "@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}", "private Infer() {\n\n }", "@Override\n protected void initialize() {\n\n \n }", "public void consulterClassement() {\n\t\t\n\t}", "@Override\n protected void initialize() \n {\n \n }", "public Methods() {\n // what is this doing? -PMC\n }", "public MyPathDriver(/* add any constructor arguments here */) {\r\n\r\n // set all fields in your constructor here\r\n\r\n }", "public void runit(String class_name)\n {\n runit(class_name, null);\n }", "protected void setup() {\r\n }", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\n protected void execute() {\n \n }", "public void objectTest() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "protected abstract Set method_1559();", "private void getStatus() {\n\t\t\n\t}", "protected InterestRate() {\n\t}", "private void __setClassDescription() {\n\t\tEOClassDescription cd = EOClassDescription.classDescriptionForClass(getClass());\n\t\tif (cd == null) {\n\t\t\tthrow new IllegalStateException(\"Unabled to find an EOClassDescription for objects of \" + getClass());\n\t\t}\n\t\t__setClassDescription(cd);\n\t}", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public void foundationGrab(){\n\n }", "@Override\n\tprotected void interr() {\n\t}", "private TestsResultQueueEntry() {\n\t\t}", "@Override\n public void setup() {\n\n }", "@Override\n\tpublic void testVehicle() {\n\t\t\n\t}", "public void logic(){\r\n\r\n\t}", "public void testJavaClassRepository872() throws Exception {\n\t\tJavaClassRepository var2730 = new JavaClassRepository();\n\t\tvar2730.getClass(SingleMethodClass.class.getCanonicalName());\n\t\tvar2730.getClass(Example.class.getCanonicalName());\n\t}", "protected abstract String getDriverClassName();", "private CommonMethods() {\n }", "private Solution() {\n /**.\n * { constructor }\n */\n }", "private ClassUtil() {}", "Constructor() {\r\n\t\t \r\n\t }" ]
[ "0.590776", "0.59011716", "0.5822881", "0.5806307", "0.5799738", "0.5797972", "0.5793219", "0.57831055", "0.5732424", "0.57261515", "0.5697529", "0.5697529", "0.5682756", "0.5659831", "0.5659831", "0.56543237", "0.5647995", "0.55782056", "0.5533454", "0.5523331", "0.5513822", "0.5504348", "0.5499483", "0.5489645", "0.5460973", "0.5459219", "0.5453048", "0.544262", "0.54423505", "0.5441236", "0.54347396", "0.54010403", "0.5396491", "0.5394049", "0.5377059", "0.53705233", "0.53705233", "0.53560454", "0.5343087", "0.53411865", "0.53362834", "0.5320653", "0.5318656", "0.5307218", "0.53061146", "0.52982277", "0.52894527", "0.5288155", "0.5282567", "0.52739114", "0.52493805", "0.5240427", "0.52343005", "0.52334416", "0.5221698", "0.5217517", "0.52114934", "0.520643", "0.520643", "0.52031356", "0.5197768", "0.5197768", "0.5197768", "0.5197768", "0.5197768", "0.5197768", "0.5197441", "0.51940435", "0.5192363", "0.51779103", "0.5176052", "0.5175813", "0.5173836", "0.5166326", "0.51659256", "0.5164442", "0.5160264", "0.51588833", "0.5152255", "0.5147791", "0.51416594", "0.51364547", "0.51290864", "0.5127322", "0.51215357", "0.5119865", "0.5117317", "0.51165766", "0.51165766", "0.5115498", "0.51116514", "0.510996", "0.51037544", "0.5102955", "0.51021135", "0.50990105", "0.5097599", "0.50920653", "0.5091539", "0.50794667", "0.5077607" ]
0.0
-1
Complete the climbingLeaderboard function below.
static int[] climbingLeaderboard(int[] scores, int[] alice) { int[] ranks = new int[scores.length]; int[] aliceRanks = new int[alice.length]; int endIndex = -1; int currentElement = Integer.MIN_VALUE; for (int i = 0; i < ranks.length; i++) { if (currentElement != scores[i]) { ranks[++endIndex] = scores[i]; currentElement = scores[i]; } } int aliceEndIndex = -1; for (int i = 0; i < aliceRanks.length; i++) { int currScore = alice[i]; int globalRankApprox = binarySearch(ranks, alice[i], 0, endIndex); if (currScore >= ranks[globalRankApprox]) { aliceRanks[++aliceEndIndex] = globalRankApprox+1; }else{ aliceRanks[++aliceEndIndex] = globalRankApprox+1+1; } } return aliceRanks; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void requestLeaderboard() {\r\n connection.requestLeaderboard();\r\n }", "private void showWobblyLeaderboard(CommandContext context) {\n if(leaderboard.isEmpty()) {\n context.getMessageChannel().sendMessage(\n \"There are no wobblies on the leaderboard for \"\n + codManager.getGameName() + \"!\"\n ).queue();\n return;\n }\n new PageableTableEmbed<WobblyScore>(\n context,\n leaderboard,\n thumbnail,\n codManager.getGameName() + \" Wobbly Leaderboard\",\n \"Use **\" + getTrigger() + \" wobblies [rank]** to view more details.\\n\\n\"\n + \"Here are the \" + leaderboard.size() + \" wobbly scores:\",\n footer,\n new String[]{\"Rank\", \"Name\", \"Wobblies\"},\n 5\n ) {\n @Override\n public String getNoItemsDescription() {\n return \"There are no wobblies on the leaderboard!\";\n }\n\n @Override\n public String[] getRowValues(int index, WobblyScore score, boolean defaultSort) {\n int rank = defaultSort ? (index + 1) : (getItems().size() - index);\n return new String[]{\n String.valueOf(rank),\n score.getPlayerName(),\n MatchPlayer.formatDistance(score.getWobblies(), \"wobblies\")\n };\n }\n\n @Override\n public void sortItems(List<WobblyScore> items, boolean defaultSort) {\n WobblyScore.sortLeaderboard(items, defaultSort);\n }\n }.showMessage();\n }", "public static void viewLeaderBoard()\n\t{\n\t}", "static int[] climbingLeaderboard(int[] scores, int[] alice) {\n \tal = new ArrayList<Integer>();\n \tint len = scores.length;\n \tranks = new int[len];\n \tal.add(scores[0]);\n \tranks[0]=1;\n \tfor(int i=1;i<len;++i)\n \t{\n \t\tal.add(scores[i]);\n \t\tif(scores[i]==scores[i-1])\n \t\t\tranks[i]=ranks[i-1];\n \t\telse\n \t\t\tranks[i]=ranks[i-1]+1;\n \t}\n \tint len2=alice.length;\n \tint[] ranksArr= new int[len2];\n \tfor(int i=0;i<len2;++i)\n \t{\n \t\tint binarySearch = Collections.binarySearch(al,alice[i],Collections.reverseOrder());\n \t\tif(binarySearch>=0)\n \t\t\tranksArr[i]=ranks[binarySearch];\n \t\telse\n \t\t{\n \t\t\tbinarySearch+=1;\n \t\tbinarySearch=-binarySearch;\n \t\t\tif(binarySearch==len)\n \t\t\t{\n \t\t\t\tbinarySearch-=1;\n \t\t\t\tranksArr[i]=ranks[binarySearch]+1;\n \t\t\t}\n \t\t\telse\n \t\t\t\tranksArr[i]=ranks[binarySearch];\n \t\t\t\n \t\t}\n \t\t\t\n \t}\n \treturn ranksArr;\n }", "public DefaultStabilizeClimb() {\n\t\trequires(Robot.climb);\n\t}", "AsyncFuture<Void> becameLeader();", "@Test\n public void destiny2GetClanLeaderboardsTest() {\n Long groupId = null;\n Integer maxtop = null;\n String modes = null;\n String statid = null;\n InlineResponse20048 response = api.destiny2GetClanLeaderboards(groupId, maxtop, modes, statid);\n\n // TODO: test validations\n }", "static int[] climbingLeaderboard(int[] scores, int[] alice) {\n /*\n * Write your code here.\n */\n List<Integer> ranks = new ArrayList<>();\n int i=0;\n while(i<scores.length-1) {\n ranks.add(scores[i]);\n int j=i+1;\n while(j<scores.length && scores[i]==scores[j]) {\n j+=1;\n }\n i=j;\n }\n ranks.add(scores[scores.length-1]);\n int[] aliceRank = new int[alice.length];\n for (int j=0; j< alice.length; j++) {\n int index = Collections.binarySearch(ranks, alice[j],Comparator.reverseOrder());\n aliceRank[j] = index > 0 ? index + 1 : index == 0 ? 1 : Math.abs(index);\n }\n return aliceRank;\n }", "void onShowLeaderboardsRequested();", "public static void main(String[] args) throws IOException {\n//\n// int playerCount = Integer.parseInt(bufferedReader.readLine().trim());\n//\n// List<Integer> player = Stream.of(bufferedReader.readLine().replaceAll(\"\\\\s+$\", \"\").split(\" \"))\n// .map(Integer::parseInt)\n// .collect(toList());\n\n List<Integer> ranked = new ArrayList<>();\n ranked.add(100); ranked.add(90); ranked.add(90); ranked.add(80); ranked.add(75); ranked.add(60);\n List<Integer> player = new ArrayList<>();\n player.add(50); player.add(65); player.add(77); player.add(90); player.add(102);\n\n List<Integer> result = climbingLeaderboard(ranked, player);\n\n// bufferedWriter.write(\n// result.stream()\n// .map(Object::toString)\n// .collect(joining(\"\\n\"))\n// + \"\\n\"\n// );\n//\n// bufferedReader.close();\n// bufferedWriter.close();\n }", "protected void addScoreToLeaderboard() {\n\n\t\tif (onlineLeaderboard) {\n\t\t jsonFunctions = new JSONFunctions();\n\t\t jsonFunctions.setUploadScore(score);\n\t\t \n\t\t Handler handler = new Handler() {\n\t\t\t @Override\n\t\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\t @SuppressWarnings(\"unchecked\")\n\t\t\t\t ArrayList<Score> s = (ArrayList<Score>) msg.obj;\n\t\t\t\t globalScores = helper.sortScores(s);\n\t\t\t }\n\t\t };\n\t\t \n\t\t jsonFunctions.setHandler(handler);\n\t\t jsonFunctions\n\t\t\t .execute(\"http://brockcoscbrickbreakerleaderboard.web44.net/\");\n\t\t}\n\t\tsaveHighScore();\n }", "private void fillLeaderboard() {\n highscore_flwPane.getChildren().clear();\n List<HighScore> hList = mainController.getJSONHighScores();\n\n for(int i = 0; i < hList.size(); i++){\n HighscoreController hc = new HighscoreController(this, String.valueOf(i+1), hList.get(i).getName(),hList.get(i).getMode(),hList.get(i).getScore());\n highscore_flwPane.getChildren().add(hc);\n }\n\n }", "void startToPerformAsLeader();", "public static void main(String[] args) throws IOException {\n\n int scoresCount = scanner.nextInt();\n scanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\n\n int[] scores = new int[scoresCount];\n\n String[] scoresItems = scanner.nextLine().split(\" \");\n scanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\n\n for (int i = 0; i < scoresCount; i++) {\n int scoresItem = Integer.parseInt(scoresItems[i]);\n scores[i] = scoresItem;\n }\n\n int aliceCount = scanner.nextInt();\n scanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\n\n int[] alice = new int[aliceCount];\n\n String[] aliceItems = scanner.nextLine().split(\" \");\n scanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\n\n for (int i = 0; i < aliceCount; i++) {\n int aliceItem = Integer.parseInt(aliceItems[i]);\n alice[i] = aliceItem;\n }\n\n int[] result = climbingLeaderboard(scores, alice);\n for (int i = 0; i < result.length; i++) {\n \tSystem.out.print(result[i]+\" \");\n }\n\n// for (int i = 0; i < result.length; i++) {\n// bufferedWriter.write(String.valueOf(result[i]));\n//\n// if (i != result.length - 1) {\n// bufferedWriter.write(\"\\n\");\n// }\n// }\n//\n// bufferedWriter.newLine();\n//\n// bufferedWriter.close();\n\n scanner.close();\n }", "static int[] climbingLeaderboard(int[] scores, int[] alice) {\n int[] alicePos = new int[alice.length];\n System.out.println(\"Alice length\" + alice.length);\n\n scores = of(scores).sorted().distinct().toArray();\n\n int[] newScores = new int[scores.length];\n\n for (int i = 0; i < newScores.length; i++) {\n if (i < scores.length) {\n newScores[i] = scores[i];\n\n System.out.println(\"res \" + newScores[i]);\n }\n }\n\n List<Integer> newList = Arrays.stream(newScores).boxed().collect(Collectors.toList());\n System.out.println(newList.size());\n\n\n for (int i = 0; i < alice.length; i ++) {\n System.out.println(\"Alices is \"+ alice[i]);\n newList.add(alice[i]);\n newList = newList.stream().distinct().sorted().collect(Collectors.toList());\n int pos = newList.indexOf(alice[i]);\n alicePos [i]= newList.size() - pos;\n newList.remove(pos);\n }\n\n return alicePos;\n }", "public void displayLeaderCards() {\n int i = 1;\n for (LeaderCard card : leaderCards) {\n String toDisplay = i + \" \" + card.getName() + \" -> cost: \" +\n card.getActivationCost() +\" : \" + card.getCardCostType();\n if (card.isActivated()) {\n toDisplay += \" activated\";\n }\n this.sOut(toDisplay);\n i++;\n }\n }", "private static int[] climbingLeaderboard(int[] scores, int[] alice) {\n\n int[] result = new int[alice.length];\n for (int x = 0; x < alice.length; x++) {\n result[x] = insert(Arrays.stream(scores).distinct().toArray(), alice[x]);\n }\n return result;\n }", "private void climbWall() {\n\t\t// TODO Auto-generated method stub\n\t\tthis.goUpWall();\n\t\tthis.goAcrossWall();\n\t\tthis.goDownWall();\n\t}", "protected void apply() {\r\n\t\tplayer.setAutoRoll(autoroll);\r\n\t\tplayer.setMission(mission);\r\n\t\tplayer.setState(state);\r\n\t\tplayer.getCards().setArtillery(cards.getArtillery());\r\n\t\tplayer.getCards().setCavalry(cards.getCavalry());\r\n\t\tplayer.getCards().setInfantry(cards.getInfantry());\r\n\t\tplayer.getCards().setJokers(cards.getJokers());\r\n\t\tMember member = player.getMember();\r\n\t\tif(score == Score.WIN) {\r\n\t\t\tmember.setScore(member.getScore() + player.getGame().getPlayers().size() - 1);\r\n\t\t\tmember.setWins(member.getWins() + 1);\r\n\t\t} else if(score == Score.LOSS) {\r\n\t\t\tmember.setScore(member.getScore() - 1);\r\n\t\t\tmember.setLosses(member.getLosses() + 1);\r\n\t\t}\r\n\t}", "@Override\n public void askLeaderCardToKeep(ArrayList<LeaderCard> leaderCards) throws IOException, InterruptedException {\n\n\n clear(container);\n\n CardManager cardManager = new CardManager(container,gui);\n cardManager.setHeading(\"Choose two cards:\");\n cardManager.showWhatToChoose(true);\n\n applyChangesTo(container);\n }", "private void scoreboard() {\n Intent intent = new Intent(this, AlienPainterScoreboardActivity.class);\n intent.putExtra(SCOREBOARD_STATUS, presenter.getIsVictorious());\n intent.putExtra(POINTS, presenter.getPoints());\n intent.putExtra(NUM_MOVES, presenter.getNumMoves());\n intent.putExtra(TIME_LEFT, presenter.getTimeLeft());\n intent.putExtra(LANGUAGE, isEnglish);\n intent.putExtra(PASS_USER, currUser);\n startActivity(intent);\n finish();\n }", "protected void execute() {\n \tif(oi.getButton(ControllerMap.operatorController, ControllerMap.convertToClimbMode) && DriverStation.getInstance().getMatchTime() < 30 && !DriverStation.getInstance().isAutonomous()) {\n \t\tleftSpeed = Math.abs(oi.getAxisDeadzonedSquared(ControllerMap.operatorController, ControllerMap.intakeAxis, 0.1));\n \t\trightSpeed = Math.abs(oi.getAxisDeadzonedSquared(ControllerMap.operatorController, ControllerMap.cubeStorageAxis, 0.1));\n \t\t\n \t\tclimber.ascend(leftSpeed, rightSpeed);\n \t}\n }", "@Test\n public void destiny2GetLeaderboardsTest() {\n Long destinyMembershipId = null;\n Integer membershipType = null;\n Integer maxtop = null;\n String modes = null;\n String statid = null;\n InlineResponse20048 response = api.destiny2GetLeaderboards(destinyMembershipId, membershipType, maxtop, modes, statid);\n\n // TODO: test validations\n }", "@Override\n protected void execute() {\n\n float roll = Robot.driveBase.getRoll();\n\n // if robot is balance, continue climb\n if (roll < 0.2 && roll > -0.2) {\n Robot.climber.frontDown();\n Robot.climber.rearDown();\n } else {\n if (roll > 0.2) {\n // front is too fast -- slow front down\n Robot.climber.frontStop();\n Robot.climber.rearDown();\n }\n if (roll < -0.2) {\n Robot.climber.rearStop();\n Robot.climber.frontDown();\n // rear is too fast -- slow rear down\n }\n\n }\n }", "private ArrayList<WobblyScore> getWobblyLeaderboard() {\n ArrayList<WobblyScore> wobblyScores = new ArrayList<>();\n String json = DiscordUser.getWobbliesLeaderboard(codManager.getGameId());\n if(json == null) {\n return wobblyScores;\n }\n JSONArray scores = new JSONArray(json);\n for(int i = 0; i < scores.length(); i++) {\n wobblyScores.add(WobblyScore.fromJSON(scores.getJSONObject(i), codManager));\n }\n WobblyScore.sortLeaderboard(wobblyScores, true);\n return wobblyScores;\n }", "@Test\n public void destiny2GetLeaderboardsForCharacterTest() {\n Long characterId = null;\n Long destinyMembershipId = null;\n Integer membershipType = null;\n Integer maxtop = null;\n String modes = null;\n String statid = null;\n InlineResponse20048 response = api.destiny2GetLeaderboardsForCharacter(characterId, destinyMembershipId, membershipType, maxtop, modes, statid);\n\n // TODO: test validations\n }", "private void setupLeaderBoards() {\n add(announcementBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(currentGamesBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(chatRoomBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(friendsListBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(settingsBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n }", "void concludeRound() {\n\n ArrayList<Card> currentTopCards = getCurrentTopCards();\n transferCards(roundWinner, currentTopCards);\n eliminatePlayers();\n\n logger.log(\"Communal Deck: \" + deck);\n logger.log(divider);\n for (Player player : players) {\n logger.log(\"Hand: \" + player);\n }\n\n logger.log(\"Round complete.\");\n\n setGameState(GameState.ROUND_COMPLETE);\n }", "@Override\n protected void executeStrategy()\n {\n //Get the latest clue given by the SpyMaster\n Clue clue = game.getCurrentClue();\n pickCard(clue);\n\n // We used up our guesses so we are done\n if (game.getGuessesLeft() == 0) { this.game.endCurrentTurn(); }\n }", "void convertToLeader() {\n state = InstanceState.LEADER;\n controller = new LeaderController(this, executor, clock, transport);\n }", "public void finish() {\n if (this.finished) {\n warn(\"Can't finish the scoreboard since it is already finished.\");\n return;\n }\n\n this.finished = true;\n\n for (int i = rowCache.size() - 1; i >= 0; i--){\n final Row row = rowCache.get(i);\n final Team team = this.bukkitScoreboard.registerNewTeam(\"dummy.test.\" + (i+1));\n\n team.addEntry(ChatColor.values()[i] + \"\");\n\n this.obj.getScore(ChatColor.values()[i] + \"\").setScore(rowCache.size()-i);\n\n row.team = team;\n row.setMessage(row.message);\n }\n }", "@Override\r\n public boolean playTurn()\r\n {\n System.out.println(\"current bid = \" + currentBid);\r\n currentBid = players[currentPlayer].playHand(currentBid);\r\n\r\n System.out.println(\"Player bid = \" + currentBid);\r\n // Add hand played to discard pile\r\n discards.add(currentBid.getHand());\r\n // Offer all other players the chance to call cheat\r\n int callee = -1;\r\n {\r\n int[] calls = new int[MINPLAYERS];\r\n int i = 0;\r\n for (int j = 0; j < players.length; ++j)\r\n {\r\n // don't allow us to call cheat on ourselves\r\n if (currentPlayer == j)\r\n continue;\r\n Player p = players[j];\r\n if (p.callCheat(currentBid, currentPlayer))\r\n calls[i++] = j;\r\n }\r\n if (i > 0)\r\n callee = calls[rg.nextInt(i)];\r\n }\r\n\r\n if (callee != -1)\r\n {\r\n System.out.println(\"Player called cheat by Player \" + (callee+1));\r\n if (isCheat(currentBid)) //CHEAT CALLED CORRECTLY\r\n {\r\n for (Player p : players)\r\n p.broadcastCheat(currentPlayer, callee, true);\r\n //Give the discard pile of cards to currentPlayer who then has to play again\r\n players[currentPlayer].addHand(discards);\r\n System.out.println(\"Player cheats!\");\r\n System.out.println(\"Adding cards to player \"+\r\n (currentPlayer+1) + \" \" + players[currentPlayer]);\r\n }\r\n else //CHEAT CALLED INCORRECTLY\r\n {\r\n for (Player p : players)\r\n p.broadcastCheat(currentPlayer, callee, false);\r\n System.out.println(\"Player Honest\");\r\n currentPlayer = callee; // set the currentPlayer to callee\r\n // later on we'll increase this, so it's the person after\r\n // they who called's turn.\r\n players[currentPlayer].addHand(discards);\r\n System.out.println(\"Adding cards to player \"+\r\n (currentPlayer+1) + players[currentPlayer]);\r\n }\r\n //If cheat is called, current bid reset to an empty bid with rank two whatever\r\n //the outcome\r\n currentBid = new Bid();\r\n //Discards now reset to empty\r\n discards = new Hand();\r\n }\r\n else\r\n {\r\n System.out.println(\"No Cheat Called\");\r\n }\r\n /*\r\n Game bug fix:\r\n The design of the game, as given, was floored in conjuction with\r\n the required implementations of the strategies.\r\n A scenario can arise where one player has all the twos and the other\r\n has none, but it's their turn to play.\r\n The player with all the twos can consitently correctly call cheat on the\r\n player, as they have to claim to of laid a 2.\r\n\r\n This is easily fixed by moving the turn to the player after the one who\r\n just got called out\r\n */\r\n currentPlayer = (currentPlayer+1) % nosPlayers;\r\n return true;\r\n }", "@SuppressWarnings(\"static-access\")\n\t@Override\n\tpublic void doAction() {\n\t\tswitch(cardNumber) {\n\t\tcase 0:\n\t\t\tMonopolyGame.getInstance().players[MonopolyGame.getInstance().currentPlayer.ID-1].balance.decreaseAmount(100);\n\t\t\tMonopolyGame.getInstance().pool.increaseAmount(100);\n\t\t\tSystem.out.println(MonopolyGame.getInstance().currentPlayer.balance.bMoney.amount);\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tbreak;\t\n\t\tcase 2:\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tbreak;\t\n\t\tcase 4:\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tbreak;\t\n\t\tcase 6:\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tbreak;\t\n\t\tcase 8:\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\tbreak;\t\n\t\tcase 10:\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}", "public void becomeLeader()\r\n\t{\r\n\t\tisleader = true;\r\n\t}", "public void start() {\n // Bid initialized (higher the number, lower the bid rank)\n bid = 100;\n // Check if the players have token, if no token remove player from the game\n // The player remaining wins the pot\n for (int i = 0; i < numberOfPlayers; i++) {\n if (tokens.get(i) == 0) {\n players.remove(i);\n tokens.remove(i);\n cups.remove(i);\n // Add pot to the remaining player's balance\n }\n }\n numberOfPlayers = players.size();\n // Roll all five dice inside the cup for each player\n for (int i = 0; i < numberOfPlayers; i++) {\n cups.get(i).shake();\n }\n // Get the player with the highest poker dice hand\n firstPlayer = players.get(0);\n for (int i = 1; i < numberOfPlayers; i++) {\n PokerDiceHand first = cups.get(players.indexOf(firstPlayer)).getHand();\n PokerDiceHand current = cups.get(i).getHand();\n if (current.getRank() < first.getRank()) {\n firstPlayer = players.get(i);\n }\n }\n // First player's turn\n turn = firstPlayer;\n gameCup = new Cup();\n gameCup.shake();\n }", "private void doBankTurn() {\n // Wait 1 second so player can understand what is happening\n try\n {\n Thread.sleep(1000);\n }\n catch(InterruptedException ex)\n {\n Thread.currentThread().interrupt();\n }\n if (round_score + game.getBank_total() >= game.getWinning_score() || round_score >= 20) {\n bankUserScore();\n }\n else\n rollDie();\n }", "private void makeLeaderboardVisible(){\n if(leaderBoardBar!=null){\n leaderBoardBar.animate().alpha(1).setDuration(800).setInterpolator(new DecelerateInterpolator(2.0f));\n }\n }", "public void endRound() {\n if (!myTurn()) {\n return;\n }\n if (this.board.getWinners().size() > 0 && this.playerId == board.getPlayers().get(board.getPlayers().size() - 1).playerId) {\n this.board.setRunning(false);\n }\n // currentPlayerNumber = (currentPlayerNumber + 1) % players.size();\n // current = players.get(currentPlayerNumber);\n this.removableBlockades = new ArrayList<>();\n coins = (float) 0;\n bought = false;\n specialAction.setDraw(0);\n specialAction.setRemove(0);\n specialAction.setSteal(0);\n history = new ArrayList<>();\n //for (int i = tmpDiscardPile.size(); i > 0; i--){\n // discardPile.add(tmpDiscardPile.remove(0));\n //}\n discardPile.addAll(tmpDiscardPile);\n tmpDiscardPile = new ArrayList<Card>();\n draw();\n board.endRound();\n }", "public void consolidate()\n { \n if (WarCW.p1.cardsRemaining() < 2)\n {\n if ((WarCW.p1.isEmpty()) && (WarCW.p1e.cardsRemaining() == 0))\n {\n //YOU LOSE\n //end game \n temp = (\"P2 WINS! It took \" + WarCW.round + \". There were \" + WarCW.warNum + \" wars.\");\n \n sup = new JLabel(\"\");\n sup.setFont(new Font(\"ARIAL\",Font.BOLD,46));\n sup.setText(temp);\n \n button.setEnabled(false);\n }\n else\n {\n while (!(WarCW.p1e.isEmpty())) \n {\n WarCW.p1e.shuffle();\n WarCW.temp = WarCW.p1e.useCard();\n WarCW.p1.addCard(WarCW.temp);\n }\n }\n }\n if (WarCW.p2.cardsRemaining() < 2)\n {\n if ((WarCW.p2.isEmpty()) && (WarCW.p2e.cardsRemaining() == 0))\n {\n //YOU WIN\n //end game\n temp = (\"P1 WINS! It took \" + WarCW.round + \". There were \" + WarCW.warNum + \" wars.\");\n \n sup = new JLabel(\"\");\n sup.setFont(new Font(\"ARIAL\",Font.BOLD,46));\n sup.setText(temp);\n \n button.setEnabled(false);\n }\n else\n {\n while (!(WarCW.p2e.isEmpty())) \n {\n WarCW.p2e.shuffle();\n WarCW.temp = WarCW.p2e.useCard();\n WarCW.p2.addCard(WarCW.temp);\n }\n }\n }\n }", "public void cbDBGet()\n {\n if (!m_white.wasSuccess())\n return;\n \n String str = m_white.getResponse(); \n String cleaned = StringUtils.cleanWhiteSpace(str.trim());\n \n \tString[] pts = cleaned.split(\" \");\n \n HexColor winner = HexColor.get(pts[0].trim());\n m_statusbar.setMessage(winner + \" wins in \" + pts[1]);\n \n m_guiboard.clearMarks();\n \n Vector<HexPoint> proofset = new Vector<HexPoint>();\n \n int state = 0; \n \tfor (int i=2; i<pts.length; ++i) {\n if (pts[i].equals(\"Winning\")) {\n state = 1;\n continue;\n } else if (pts[i].equals(\"Losing\")) {\n state = 2;\n continue;\n }\n \t HexPoint point = HexPoint.get(pts[i].trim());\n \n if (state == 0) { // part of the proof\n proofset.add(point);\n if (m_guiboard.getColor(point) == HexColor.EMPTY)\n m_guiboard.setAlphaColor(point, Color.green);\n else\n m_guiboard.setAlphaColor(point, Color.red);\n } else if (state == 1) { // winning move\n m_guiboard.setText(point, pts[++i]);\n Color old = m_guiboard.getAlphaColor(point);\n \n // cyan if inside proof, magenta if outside; but that\n // probably cannot happen.\n if (proofset.contains(point))\n m_guiboard.setAlphaColor(point, Color.cyan);\n else \n m_guiboard.setAlphaColor(point, Color.magenta); \n \n } else if (state == 2) { // losing move\n \n // green if inside the proof, otherwise no color\n m_guiboard.setText(point, pts[++i]);\n }\n \t}\n \n \tm_guiboard.repaint();\n }", "public void gameOver() {\n // if (ENABLE_SOUND) {\n // sfx.endGame();\n // }\n doLeaderboard = true;\n frameRate(10);\n //this.state = GameState.MENU;\n //If line 151 runs, it bypasses the gameover leaderboard screen for some reason\n //redraw();\n}", "@Override\n\tprotected void execute() {\n\t\t\n\t\tif (RobotMap.hookEncoder.getRaw() < Robot.climbingEncoderPos1) {\n\t\t\t// already reach the highest position, stop all the motors\n\t\t\thookMotor1.set(ControlMode.PercentOutput, 0);\n\t\t\thookMotor2.set(ControlMode.PercentOutput, 0);\n\t\t\tSystem.out.println(\"Stop climbing\");\n\t\t}else if((RobotMap.hookEncoder.getRaw() > Robot.climbingEncoderPos2)) {\n\t\t\thookMotor1.set(ControlMode.PercentOutput, -1);\n\t\t\thookMotor2.set(ControlMode.PercentOutput, -1);\n\t\t\tSystem.out.println(\"Climbing again\");\n\t\t}\n\n\t\t\n\t\t\n\t\t\n\t}", "@Override\r\n public void isLeader() {\n }", "public void discardLeaderCard(int index) throws LeaderCardsGameBoardEmptyException, IOException, InterruptedException {\n try {\n currentPlayer.discardLeaderCard(index);\n } catch (CallForCouncilException e) {\n exceptionHandler(e);\n } catch (LastSpaceReachedException e) {\n exceptionHandler(e);\n }\n notifyToOneObserver(new DiscardLeaderForCurrentMessage(index));\n notifyAllObserverLessOne(new DiscardLeaderForNotCurrentMessage(currentPlayer.getNickName()));\n\n notifyToOneObserver(new FaithPathMessage(1));\n notifyAllObserverLessOneByNickname(new FaithPathOpponentMessage(currentPlayer.getNickName(), 1),currentPlayer.getNickName());\n\n\n }", "public void getChampionBans() {\n\t\tcreateBlueBanHighlight();\n\t\tcreatePurpleBanHighlight();\n\t\tblueBan = true;\n\t\tArrayList<String> temp = CHAMPIONLIST;\n\t while (numBlueBans < 3 || numPurpleBans < 3) {\n\t \ttry {\n\t \t\tArrayList<String> aL = findChampions();\n\t \t\tif (!aL.equals(temp)) {\n\t \t\t\taddChampions(panel, aL);\n\t \t\t\ttemp = aL;\n\t \t\t}\n\t \t\tThread.sleep(100);\n\t \t} catch (InterruptedException e) {\n\t \t\tcontinue;\n\t \t}\n\t }\n\t}", "@Test\n public void LeaderBoardServer()\n {\n PlayFabServerModels.GetLeaderboardRequest serverRequest = new PlayFabServerModels.GetLeaderboardRequest();\n serverRequest.MaxResultsCount = 3;\n serverRequest.StatisticName = TEST_STAT_NAME;\n PlayFabResult<PlayFabServerModels.GetLeaderboardResult> serverResult = PlayFabServerAPI.GetLeaderboard(serverRequest);\n VerifyResult(serverResult, true);\n assertTrue(GetSvLbCount(serverResult.Result.Leaderboard) > 0);\n }", "private void updatePlayerClaim(){\n if(chestProgressLevel!=1){\n return; //the chest isnt unlocked!\n }\n\n //count the total players, and the players who unlocked it.\n int totalPlayers = 0;\n int unlockedPlayers = 0;\n for(JuggernautPlayer player: JuggernautGame.getInstance().getPlayers()){\n if(!player.isSurvivor() || !player.isAlive()){\n continue; //they be dead, they dont count! (Juggy also doesnt count, he doesnt get to unlock items)\n }\n totalPlayers++; //+1 total players\n if(player.isSurvivor() && player.getChestBonus(chestID)>=level){\n unlockedPlayers++; //they unlocked it, +1 unlocked players\n }\n }\n\n //all players unlocked it\n if(totalPlayers<=unlockedPlayers && chestProgressLevel==1){\n //lock the chest before respawning.\n lockChest();\n new BukkitRunnable() {\n\n int timeTillRespawn = 3; //3 seconds to respawn a chest\n @Override\n public void run() {\n //runs every second\n for(JuggernautPlayer jp : JuggernautGame.getInstance().getAllPeople()){\n //check if the player is in the radius of the chest (ignore Y)\n if(SkyMathHelper.isInRadius(location, jp.getPlayer().getLocation(), nametagRadius, false)) {\n //show them the hologram. Update if they already have the hologram active.\n //If this chest will not respawn, we tell them \"Good Luck!\" instead of the respawning message.\n if (jp.getLoadedEntities().containsKey(armorstandResetChestID)) {\n if(level==getMaxLevel()){\n jp.updateHologram(armorstandResetChestID, \"\\u00A76Good Luck!\");\n }else {\n jp.updateHologram(armorstandResetChestID, \"\\u00A76Respawning in \" + timeTillRespawn);\n }\n } else {\n if(level==getMaxLevel()) {\n jp.displayHologram(location.getX(), location.getY() + armorstandProgressbarHeight, location.getZ(), \"\\u00A76Good Luck!\", armorstandResetChestID);\n }else{\n jp.displayHologram(location.getX(), location.getY() + armorstandProgressbarHeight, location.getZ(), \"\\u00A76Respawning in \" + timeTillRespawn, armorstandResetChestID);\n }\n }\n }else{\n //they arent in range, so we remove this entity for them\n jp.removeEntities(armorstandResetChestID);\n }\n }\n\n //check if its time to respawn.\n if(timeTillRespawn--<=0){\n //its time! respawn the chest!\n respawnChest();\n for(JuggernautPlayer jp: JuggernautGame.getInstance().getPlayers()){\n //remove the countdown armorstand for all players\n jp.removeEntities(armorstandResetChestID);\n }\n this.cancel(); //cancel this runnable, we no longer need it.\n return;\n }\n }\n }.runTaskTimer(Juggernaut.pluginInstance, 0L, 20L); //every 20 ticks (1s)\n }else{\n //not all players unlocked the item yet. Lets indicate how many did.\n String emptyDisplayText = unlockedPlayers + \"/\" + totalPlayers + \" Claimed\";\n for(JuggernautPlayer JP: JuggernautGame.getInstance().getPlayers()){\n if(!SkyMathHelper.isInRadius(location, JP.getPlayer().getLocation(), nametagRadius, false)){\n //they arent in the radius, so we remove their armorstand again (if they had it).\n if(JP.getLoadedEntities().containsKey(this.armorstandClaimProgressID)) {\n JP.removeEntities(armorstandClaimProgressID);\n }\n continue;\n }\n\n //generate the color of the display text we need to show them. green if they claimed it, otherwise red.\n String displayText;\n if(JP.getChestBonus(chestID)>=level){\n displayText = \"\\u00A72\" + emptyDisplayText;\n }else{\n displayText = \"\\u00A7c\" + emptyDisplayText;\n }\n\n //update, or show the hologram to them.\n if(JP.getLoadedEntities().containsKey(this.armorstandClaimProgressID)){\n JP.updateHologram(armorstandClaimProgressID, displayText);\n }else{\n JP.displayHologram(this.location.getX(), this.location.getY()+this.armorstandClaimProgressHeight, this.location.getZ(), displayText, armorstandClaimProgressID);\n }\n }\n }\n }", "@Override\n public void run() {\n isSelectable = true;\n hideResultView();\n initialScreenConditions();\n\n\n if (currentPlay <= Utility.game.getLength()) {\n // hiding time view\n if (Utility.isUmpire) {\n showUmpireOptions();\n } else {\n showPlayerOptions();\n }\n } else {\n RelativeLayout gameOver = (RelativeLayout) findViewById(com.ryansplayllc.ryansplay.R.id.final_game_sceen);\n gameOver.setVisibility(View.VISIBLE);\n playerStatsView();\n gameOver.bringToFront();\n currentPlay = 1;\n\n\n finalLeaderBoard.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n\n finish();\n Utility.enterdGameLobbyStatus = false;\n Intent i = new Intent(GameScreenActivity.this, FinalLeaderBoardActivity.class);\n i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP\n | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(i);\n }\n });\n\n }\n }", "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 cardToAll() {\n\t\tfor(ClientThread player: players) {\n\t\t\tcardToOne(player);\n\t\t\ttry {Thread.sleep(200);}catch(Exception exc) {exc.printStackTrace();}\n\t\t}\n\t}", "@Override\r\n public void notLeader() {\n }", "public Bot startGame(){\n\t\t\n\t\ttable.addObserver(this); //to keep scores.\n\t\ttable.addObserver(players.get(0)); //observer pattern to notify players via events.\n\t\ttable.addObserver(players.get(1));\n\t\ttable.addObserver(players.get(2));\n\t\ttable.addObserver(players.get(3));\n\t\t\n\t\ttable.putInitialCards(deck.getFourCards());\n\t\t\n\t\twhile(!deck.isEmpty()){\n\t\t\t//deal cards\n\t\t\tfor(Bot bot : players){\n\t\t\t\tbot.setHand(deck.getFourCards());\n\t\t\t}\n\t\t\t\n\t\t\t//start playing\n\t\t\tfor(int i = 0 ; i < 4 ; i++){\n\t\t\t\tfor(Bot bot : players){\n\t\t\t\t\tcurrentPlayer = bot;\n\t\t\t\t\tCard cardToThrow = currentPlayer.throwACard();\n//\t\t\t\t\tSystem.out.println(\"Bot \"+ currentPlayer.toString() + \" threw \" + cardToThrow.toString());\n\t\t\t\t\ttable.putOnPile(cardToThrow);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//award last pile winner\n\t\tplayers.get(lastWinnerId).addPoints(Table.calculatePoints(table.getCardsOnPile()));\n\t\tplayers.get(lastWinnerId).addWonCards(table.getCardsOnPile().size());\n//\t\tSystem.out.println(\"Last pile goes to [\"+players.get(lastWinnerId).toString()+\"]\");\n\t\ttable.clearPile();\n\t\t\n\t\t\n\t\t//award most card winner\n\t\tCollections.sort(players, new CompareByWonCardSize()); // sort players by most cards won.\n\t\tplayers.get(3).addPoints(3); // last one has most cards.\n//\t\tSystem.out.println(\"The bot [\"+players.get(3).toString()+\"] won the most cards so it gets bonus 3 points!\");\n\t\t\t\t\n//\t\tSystem.out.println(\"### SCORES ###\");\n\t\tCollections.sort(players, new CompareByPoints()); // sort by points\n\t\t\n\t\tBot winner = players.get(3);\n//\t\tSystem.out.println(\"WINNER IS: \"+ winner);\n\t\t\n\t\treturn winner;\n\t}", "public void act() \n {\n if (scoreCounter > 0){\n scoreCounter--;\n }\n \n if (scoreCounter == 0){\n addScore(1);\n scoreCounter = scoreCooldown;\n }\n }", "public void showLeaderboard (String identifier) {\n\t\tshowLeaderboard(identifier, GPGLeaderboardTimeScope.GPGLeaderboardTimeScopeAllTime);\n\t}", "public void discardLeader(int bool){\n this.leaderCardsPanel.discardLeaderCard(bool);\n }", "private void showLeaderboardBar() {\n if (leaderBoardBar != null) {\n leaderBoardBar.animate().translationY(0);\n }\n }", "public void executaBlackjack() {\n\t\tblackjack = new Blackjack(user);\n\t\tresetBJTable();\n\t}", "@Override\n\tpublic void landedOn() {\n\t\tMonopolyGameController.getInstance();\n\t\tMonopolyGameController.getCurrentPlayer().increaseMoney(300);\n\t\tLogger.getInstance().notifyAll(MonopolyGameController.getCurrentPlayer().getName()+ \" gained 300 dollars by landing on Bonus Square\");\n\t\tMonopolyGameController.allowCurrentPlayerToEndTurn();\n\n\t}", "public PentagoMove alphabetaw(PentagoBoardState boardState){\n PentagoBoardState pbs = (PentagoBoardState) boardState.clone();\n ArrayList<PentagoMove> legalmoves = pbs.getAllLegalMoves();\n\n PentagoMove bestmove = legalmoves.get(0);\n PentagoMove bestopponentmove = new PentagoMove(0,0,0,0,0);\n int bestmovescore = -9999999;\n int bestwhitescore = 0;\n //ArrayList<Integer> scores = new ArrayList<Integer>();\n for(int i = 0;i<legalmoves.size()-1;i++){\n\n PentagoBoardState newboard = (PentagoBoardState) pbs.clone();\n //System.out.println( pbs.getTurnPlayer() + \"BEFORE PROCESS\");\n PentagoMove next = legalmoves.get(i);\n\n newboard.processMove(next);\n\n int score = evaluate(newboard);\n //scores.add(score);\n //System.out.println( pbs.getTurnPlayer() + \" AFTER PROCES\");\n\n if(score > 100000){\n newboard.getWinner();\n newboard.printBoard();\n System.out.println(\"FOUND A WINNER\" + score);\n return next;\n }\n\n\n PentagoMove currentopponentmove;\n ArrayList<PentagoMove> opponentlegalmoves = newboard.getAllLegalMoves();\n if (opponentlegalmoves.size()!=0){\n currentopponentmove = opponentlegalmoves.get(0);\n }\n\n int minopponentmovescore = 999999;\n int thismovescore = -9999;\n ArrayList<PentagoMove> bestopponentmoves = new ArrayList<PentagoMove>();\n PentagoMove currentbestopponentmove = new PentagoMove(0,0,0,0,0);\n\n for(int a = 0;a<opponentlegalmoves.size()-1;a++){\n\n PentagoBoardState pbsopponent = (PentagoBoardState) newboard.clone();\n //System.out.println( pbs.getTurnPlayer() + \"BEFORE PROCESS\");\n PentagoMove opponentnext = opponentlegalmoves.get(a);\n\n pbsopponent.processMove(opponentnext);\n //System.out.println( pbs.getTurnPlayer() + \" AFTER PROCES\");\n //pbs.printBoard();\n\n int opponentscore = evaluate(pbsopponent);\n\n\n\n\n\n if (minopponentmovescore>opponentscore){\n //currentopponentmove = opponentnext;\n minopponentmovescore = opponentscore;\n bestopponentmoves.add(opponentnext);\n currentbestopponentmove = opponentnext;\n }\n\n\n }\n bestopponentmove = currentbestopponentmove;\n //lvl 3\n /*\n\n int lvl3minscore =99999;\n PentagoMove currentmaxmove;\n for (int r = 0;r<bestopponentmoves.size()-1;r++) {\n PentagoBoardState pbsopponent = (PentagoBoardState) newboard.clone();\n pbsopponent.processMove(bestopponentmoves.get(r));\n\n ArrayList<PentagoMove> maxlegalmoves = pbsopponent.getAllLegalMoves();\n if (maxlegalmoves.size() != 0) {\n currentmaxmove = maxlegalmoves.get(0);\n }\n int opponentscore = evaluate(pbsopponent);\n int findminmaxmovescore = -99999;\n for (int s = 0; s < maxlegalmoves.size() - 1; s++) {\n\n PentagoBoardState maxboard = (PentagoBoardState) pbsopponent.clone();\n //System.out.println( pbs.getTurnPlayer() + \"BEFORE PROCESS\");\n PentagoMove maxnext = maxlegalmoves.get(s);\n\n maxboard.processMove(maxnext);\n //System.out.println( pbs.getTurnPlayer() + \" AFTER PROCES\");\n //pbs.printBoard();\n\n int maxnextscore = evaluate(pbsopponent);\n if (findminmaxmovescore < maxnextscore) {\n currentmaxmove = maxnext;\n findminmaxmovescore = maxnextscore;\n }\n }\n if (thismovescore<findminmaxmovescore){\n //currentopponentmove = opponentnext;\n thismovescore = findminmaxmovescore;\n }\n\n //opponentscore = maxmovescore;\n }\n\n //end experiment\n\n\n\n\n if (mycolour ==1){\n lvl3minscore =minopponentmovescore;\n }\n */\n if (minopponentmovescore>bestmovescore){//minopponentmovescore\n System.out.println(\"max player move score: \"+score + \"Min : \" + minopponentmovescore);\n bestmovescore = minopponentmovescore;\n bestmove = next;\n bestwhitescore = score;\n\n }\n else if (minopponentmovescore == bestmovescore){\n if (score > bestwhitescore){\n System.out.println(\"max player move score: \"+score + \"Min : \" + minopponentmovescore);\n bestmovescore = minopponentmovescore;\n bestmove = next;\n bestwhitescore = score;\n }\n\n\n\n }\n\n\n }\n System.out.println(\"final max player move score: \"+ bestmovescore + \"\\n My best move: \"+bestmove.toPrettyString() + \"\\n My best move: \"+ bestopponentmove.toPrettyString());\n return bestmove;\n }", "private void wrap() {\n System.out.println(\"That's a wrap!\");\n Board.finishScene();\n List<Role> onCardRoles = scene.getRoles();\n for (int i = 0; i < onCardRoles.size(); i++) {\n if (onCardRoles.get(i).hasPlayer()) {\n int[] diceRolls = new int[scene.getBudget()];\n //roll the dice\n for (int j = 0; j < scene.getBudget(); j++) {\n diceRolls[j] = random.nextInt(6) + 1;\n }\n //sort the dice\n Arrays.sort(diceRolls);\n //set up the payouts and distribute them among the players\n int[] payouts = new int[onCardRoles.size()];\n\n for (int j = scene.getBudget() - 1; j >= 0; j--) {\n payouts[((scene.getBudget() - j) % onCardRoles.size()) - 1] = diceRolls[j];\n }\n\n for (int j = 0; j < onCardRoles.size(); j++) {\n if (onCardRoles.get(j).hasPlayer()) {\n Player player = onCardRoles.get(j).getPlayer();\n player.clearPracticeChips();\n Deadwood.bank.payMoney(player, payouts[j]);\n System.out.println(player.getName() + \" got $\" + payouts[j]);\n }\n }\n\n for (int j = 0; j < roles.size(); j++) {\n if (roles.get(j).hasPlayer()) {\n Player player = roles.get(j).getPlayer();\n player.clearPracticeChips();\n Deadwood.bank.payMoney(player, roles.get(j).getRequiredRank());\n System.out.println(player.getName() + \" got $\" + roles.get(j).getRequiredRank());\n }\n }\n }\n break;\n }\n for (int i = 0; i < onCardRoles.size(); i++) {\n if (onCardRoles.get(i).hasPlayer()) {\n onCardRoles.get(i).getPlayer().setRole(null);\n onCardRoles.get(i).setPlayer(null);\n }\n }\n for (int i = 0; i < roles.size(); i++) {\n if (roles.get(i).hasPlayer()) {\n roles.get(i).getPlayer().setRole(null);\n roles.get(i).setPlayer(null);\n }\n }\n }", "public void setScoreboard(final Player player) {\n ConfigurationSection scoreboardSettings = ConfigurationManager.getInstance().getMainConfiguration().getConfigurationSection(Strings.CONFIG_SCOREBOARD_SECTION);\n\n ScoreboardManager scoreboardManager = CustomGUIShop.getInstance().getServer().getScoreboardManager();\n final Scoreboard scoreboard = scoreboardManager.getNewScoreboard();\n addPlayerToGroup(scoreboard, player);\n final Objective objective = scoreboard.registerNewObjective(\"sb\", \"dummy\");\n objective.setDisplaySlot(DisplaySlot.SIDEBAR);\n\n final Objective objective2 = scoreboard.registerNewObjective(\"sb2\", \"dummy\");\n objective2.setDisplaySlot(DisplaySlot.PLAYER_LIST);\n\n // SERVER\n objective.getScore(ChatColor.translateAlternateColorCodes('&', scoreboardSettings.getString(Strings.CONFIG_SCOREBOARD_REPUTATION_TITLE))).setScore(15);\n final Team reputation = scoreboard.registerNewTeam(\"reputation\");\n reputation.addPlayer(Bukkit.getOfflinePlayer(\" \"));\n objective.getScore(\" \").setScore(14);\n objective.getScore(\" \").setScore(13);\n\n // COINS\n objective.getScore(ChatColor.translateAlternateColorCodes('&', scoreboardSettings.getString(Strings.CONFIG_SCOREBOARD_LEVEL_TITLE))).setScore(12);\n final Team level = scoreboard.registerNewTeam(\"level\");\n level.addPlayer(Bukkit.getOfflinePlayer(\" \"));\n objective.getScore(\" \").setScore(11);\n objective.getScore(\" \").setScore(10);\n\n // PIXELITES\n objective.getScore(ChatColor.translateAlternateColorCodes('&', scoreboardSettings.getString(Strings.CONFIG_SCOREBOARD_NEXTLEVEL_TITLE))).setScore(9);\n final Team nextLevel = scoreboard.registerNewTeam(\"nextLevel\");\n nextLevel.addPlayer(Bukkit.getOfflinePlayer(\" \"));\n objective.getScore(\" \").setScore(8);\n objective.getScore(\" \").setScore(7);\n\n // RANK\n objective.getScore(ChatColor.translateAlternateColorCodes('&', scoreboardSettings.getString(Strings.CONFIG_SCOREBOARD_BALANCE_TITLE))).setScore(6);\n final Team balance = scoreboard.registerNewTeam(\"balance\");\n balance.addPlayer(Bukkit.getOfflinePlayer(\" \"));\n objective.getScore(\" \").setScore(5);\n objective.getScore(\" \").setScore(4);\n\n final String title = ChatColor.translateAlternateColorCodes('&', scoreboardSettings.getString(Strings.CONFIG_SCOREBOARD_DISPLAY_NAME));\n\n new BukkitRunnable() {\n public void run() {\n try {\n objective.setDisplayName(title);\n reputation.setPrefix(String.valueOf(ReputationManager.getReputation(player)));\n level.setPrefix(String.valueOf(ReputationManager.getReputationLevel(player)));\n nextLevel.setPrefix(String.valueOf(ReputationManager.getReputation(player)) + \"/\" + String.valueOf(ReputationManager.getReputation(player) + ReputationManager.getNextLevel(player)));\n balance.setPrefix(String.valueOf(CustomGUIShop.getInstance().getEconomy().getBalance(player)));\n objective2.getScore(player).setScore(ReputationManager.getReputationLevel(player));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }.runTaskTimer(CustomGUIShop.getInstance(), 0, 5);\n player.setScoreboard(scoreboard);\n }", "@Override\n public void execute() {\n climber.moveShoulder(climb.getAsDouble()); // set speed of soulder motors based on climb speed\n }", "public void run() {\n\t\t\t\tif (consoleTextArea.getConsoleText().equals(\"CHEAT\")) {\n\t\t\t\t\tconsolePlayer.cheatMode();\n\t\t\t\t} else {\n\t\t\t\t\tswitch (consolePlayer.getGameState().getGameState()) {\n\t\t\t\t\t// addPlayer(1)\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tconsolePlayer.addPlayer(userName, consoleTextArea.getConsoleText());\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// waitingForStartGame(2)\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\tconsolePlayer.startGame(consoleTextArea.getConsoleText());\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// gameStarted(3)\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// moving(4)\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\tconsolePlayer.movePlayer(consoleTextArea.getConsoleText());\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// chooseAction(5),\n\t\t\t\t\tcase 5:\n\t\t\t\t\t\tconsolePlayer.chooseAction(consoleTextArea.getConsoleText());\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// suggesting(6)\n\t\t\t\t\tcase 6:\n\t\t\t\t\t\tconsolePlayer.makeSuggestion(consoleTextArea.getConsoleText());\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// accussing(7)\n\t\t\t\t\tcase 7:\n\t\t\t\t\t\tconsolePlayer.makeAccusation(consoleTextArea.getConsoleText());\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// waiting(8)\n\t\t\t\t\tcase 8:\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// showCard(9)\n\t\t\t\t\tcase 9:\n\t\t\t\t\t\tconsolePlayer.showCard(consoleTextArea.getConsoleText());\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// waitingSeeCard(10)\n\t\t\t\t\tcase 10:\n\t\t\t\t\t\tbreak;\n\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}", "public static void main(String[] args) {\n String[] players = {\"Player1\",\"Player2\",\"Player3\",\"Player4\"};\n int numPlayers = players.length;\n \n System.out.println(\"Generating Deck and shuffling...\");\n Deck curDeck = new Deck();\n curDeck.generateDeck();\n //curDeck.showDeck();\n curDeck.shuffleDeck();\n \n System.out.println();\n \n Rules ruleBook = new Rules();\n \n ArrayList<Player> playersArray = new ArrayList<Player>();\n System.out.println(\"Creating Players...\");\n for(int i=0;i<numPlayers;i++) {\n playersArray.add(new Player(players[i]));\n playersArray.get(i).dealPlayersCard(curDeck);\n playersArray.get(i).createPlayerMetaData();\n }\n \n \n ArrayList<Player> winnerList = new ArrayList<Player>();\n \n checkForTrailWinners(winnerList,playersArray,ruleBook);\n \n if(winnerList.size()==1) {\n System.out.println(winnerList.get(0).getPlayerName() + \" wins!\");\n return;\n }\n \n checkForSequenceWinner(winnerList,playersArray,ruleBook);\n \n if(winnerList.size()==1) {\n System.out.println(winnerList.get(0).getPlayerName() + \" wins!\");\n return;\n }\n \n checkForPairWinner(winnerList,playersArray,ruleBook);\n \n if(winnerList.size()==1) {\n System.out.println(winnerList.get(0).getPlayerName() + \" wins!\");\n return;\n }\n if(winnerList.size()==0)\n winnerList=playersArray;\n \n ArrayList<Integer> scoreOfPlayers = new ArrayList<Integer>();\n for(int i=0;i<winnerList.size();i++) {\n scoreOfPlayers.add(winnerList.get(i).getPlayerCard(0));\n }\n \n checkForWinner(winnerList,scoreOfPlayers);\n if(winnerList.size()==1)\n return;\n \n // Each player in consideration picks up a card from the deck till winner is declared or deck has no cards\n \n drawCardsAndDeclareWinner(winnerList,curDeck);\n \n \n \n }", "public void finishSubRound(){\n\n\t\t/* sorts the cards on in the table pool in a decsending order */\n List<PlayerCardArray> sortedTableHand =\n\t\t\t\tgameLogic.getTableHand().sortedTableHand(gameLogic.getTrumpCard().getSuit(),\n gameLogic.getLeadSuitCard().getSuit());\n\n System.out.println(sortedTableHand);\n\n PlayerCardArray winner = sortedTableHand.get(0);\n\n\t\t/* Display winner of the round */\n System.out.println(\"The winner of this round is player ID: \" + winner.getPlayerId());\n gameLogic.getScoreboard().addTricksWon(round, winner.getPlayerId());\n\n\t\t/* Get the winner name */\n\t\tif (winner.getPlayerId() == 0){\n\t\t\twinnerName = lblNameA.getText();\n\t\t} else if (winner.getPlayerId() == 1){\n\t\t\twinnerName = lblNameB.getText();\n\t\t}else if (winner.getPlayerId() == 2){\n\t\t\twinnerName = lblNameC.getText();\n\t\t}else if (winner.getPlayerId() == 3){\n\t\t\twinnerName = lblNameD.getText();\n\t\t}\n\n\t\t/* displays the message dialog box informing winner of the round */\n JOptionPane.showMessageDialog(null, \"Round: \" + round + \"\\nSubround: \" + (roundCounter+1) + \"\\nWinner is: \" + winnerName);\n\n\t\t/* set Winner for player */\n for (Player p : gameLogic.getArrayOfPlayers().getArrayOfPlayers()) {\n if ( p.getPlayerId() == winner.getPlayerId() ) {\n p.setTrickWinner(true);\n } else {\n p.setTrickWinner(false);\n }\n }\n\n\t\t/* updates the UI informing play how many tricks won so far */\n\t\tfor (Player p : gameLogic.getArrayOfPlayers().getArrayOfPlayers()) {\n\t\t\tif (winner.getPlayerId() == 0){\n\t\t\t\troundBidsWon += 1;\n\t\t\t\tbreak;\n\t\t\t} else if (winner.getPlayerId() == 1){\n\t\t\t\troundBidsWon1 += 1;\n\t\t\t\tbreak;\n\t\t\t} else if (winner.getPlayerId() == 2){\n\t\t\t\troundBidsWon2 += 1;\n\t\t\t\tbreak;\n\t\t\t} else if (winner.getPlayerId() == 3){\n\t\t\t\troundBidsWon3 += 1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t/* Set position for players */\n System.out.println(\"OLD PLAYER ORDER: \" + gameLogic.getArrayOfPlayers().getArrayOfPlayers());\n if (round != 11) {\n gameLogic.setPlayerOrder(round);\n currentPlayer = gameLogic.getArrayOfPlayers().getArrayOfPlayers().get(0).getPlayerId();\n if (currentPlayer == 0){\n \tSystem.out.println(\"YOU ARE NOW THE FIRST PERSON TO PLAY\");\n \twaitingUser = true;\n } else {\n \twaitingUser = false;\n }\n System.out.println(\"NEW PLAYER ORDER: \" + gameLogic.getArrayOfPlayers().getArrayOfPlayers());\n }\n\n\t\t/* Clear tableHand at end of subround */\n gameLogic.getTableHand().clearTableHand();\n\t}", "public void levelBrain1(ArrayList<GameObject> gameobject) {\r\n\r\n //The scrub has unfortunately survived..... for now.\r\n if ((_win_Level == true)&&(_save_Progres == false))\r\n { _save_Progres = true;\r\n gameobject.get(_player_Found_Value).setPlayerState(Static.PLAYER_STATE_LEVEL_COMPLETE);\r\n }\r\n\r\n\r\n // Make the scrub work harder when they hit a flag\r\n if((_lvl_1_Points == 10)&&(_flag == 0))\r\n {\r\n _flag++;\r\n gameobject.add(new ObjectFireBall(BitmapFactory.decodeResource(_context.getResources(), R.drawable.redcyrstal)));\r\n }\r\n if((_lvl_1_Points == 20)&&(_flag == 1))\r\n {\r\n _flag++;\r\n gameobject.add(new ObjectFireBall(BitmapFactory.decodeResource(_context.getResources(), R.drawable.redcyrstal)));\r\n }\r\n if((_lvl_1_Points == 50)&&(_flag ==2))\r\n {\r\n _flag++;\r\n gameobject.add(new ObjectFireBall(BitmapFactory.decodeResource(_context.getResources(), R.drawable.redcyrstal)));\r\n }\r\n //Ain't no smooth sailing from here, make sure their parting gift from level one is special.\r\n if((_lvl_1_Points == 70)&&(_flag == 3))\r\n {\r\n _flag++;\r\n gameobject.add(new ObjectFireBall(BitmapFactory.decodeResource(_context.getResources(), R.drawable.redcyrstal)));\r\n gameobject.add(new ObjectFireBall(BitmapFactory.decodeResource(_context.getResources(), R.drawable.redcyrstal)));\r\n gameobject.add(new ObjectFireBall(BitmapFactory.decodeResource(_context.getResources(), R.drawable.redcyrstal)));\r\n gameobject.add(new ObjectFireBall(BitmapFactory.decodeResource(_context.getResources(), R.drawable.redcyrstal)));\r\n }\r\n\r\n //THE PLAYER WON! KICK THEM THE FUCK OUT!\r\n if(_lvl_1_Points >= 100)\r\n {\r\n _win_Level = true;\r\n }\r\n\r\n //Check for scored points\r\n int lenght = gameobject.size();\r\n for (int i = 0; i < lenght; i++) {\r\n if(gameobject.get(i).getObjectType() == Static.FIREBALL) {\r\n if (gameobject.get(i).getSpecialBooleanVar() == true) {\r\n _lvl_1_Points++;\r\n gameobject.get(i).setSpecialBooleanVar(false);\r\n _fx.play(_sound_ID, 1, 1, 0, 0, 1);\r\n }\r\n }\r\n }\r\n\r\n if(_save_Progres == true) {\r\n if(gameobject.get(_player_Found_Value).getObjectStatus() == Static.OBJECT_STATUS_INACTIVE)\r\n {\r\n //The player now has permission to go to level 2 but they won't make it much further.\r\n if (_readFile.returnProgress() < 2) {\r\n _readFile.saveLevelProgress(2);\r\n endMusic();\r\n gameobject.get(_player_Found_Value).returnToMenu();\r\n }\r\n endMusic();\r\n gameobject.get(_player_Found_Value).returnToMenu();\r\n }\r\n }\r\n }", "private void leaderboardBtnListener() {\n leaderboardBtn.addListener(new ClickListener(){\n public void clicked(InputEvent event, float x, float y){\n ChessGame.client.ingame = false;\n game.setScreen(new LeaderboardScreen(game));\n }\n });\n }", "@Override\n\tpublic void setClimb(float climb) {\n\t\t\n\t}", "private void communityChest(Player currentPlayer){\n Random rand = new Random();\n int randomNum = rand.nextInt((3 - 1) + 1) + 1;\n int nextPlayer;\n if(m_currentTurn >= m_numPlayers){\n nextPlayer = 0;\n } else {\n nextPlayer = m_currentTurn+1;\n }\n\n if(randomNum == 1){\n convertTextToSpeech(\"Your new business takes off, collect 200\");\n if(m_manageFunds) {\n Log.d(\"chance add 200\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n currentPlayer.addMoney(200);\n funds.setText(String.valueOf(currentPlayer.getMoney()));\n Log.d(\"chance add 200\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n }\n }\n if(randomNum == 2){\n convertTextToSpeech(\"Your friend hires your villa for a week, \" +\n \"collect 100 off the next player\");\n if(m_manageFunds) {\n Log.d(\"chance add 100\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n currentPlayer.addMoney(100);\n funds.setText(String.valueOf(currentPlayer.getMoney()));\n Log.d(\"chance add 100\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n\n Log.d(\"chance subtract 100\", players.get(nextPlayer).getName() +\n String.valueOf(players.get(nextPlayer).getMoney()));\n players.get(nextPlayer).subtractMoney(100);\n Log.d(\"chance subtract 100\", players.get(nextPlayer).getName() +\n String.valueOf(players.get(nextPlayer).getMoney()));\n }\n }\n if(randomNum == 3){\n convertTextToSpeech(\"You receive a tax rebate, collect 300\");\n if(m_manageFunds) {\n Log.d(\"chance add 300\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n currentPlayer.addMoney(300);\n funds.setText(String.valueOf(currentPlayer.getMoney()));\n Log.d(\"chance add 300\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n }\n }\n }", "public void step() {\r\n\t\tcard1 = player1.getCard();\r\n\t\tcard2 = player2.getCard();\r\n\t\twarPile.add(card1);\r\n\t\twarPile.add(card2);\r\n\t\tgameState = \"Player 1: \" + card1 + \"\\n\" + \"Player 2: \" + card2 + \"\\n\";\r\n\t\tif(card1.getRank() == card2.getRank()) {\r\n\t\t\tgameState = \"Cards added to the War Pile\" + \"\\n\";\r\n\t\t}else if(card1.getRank() > card2.getRank()){\r\n\t\t\ttransferCards(player1);\r\n\t\t\tgameState = \"Cards go to Player 1 \\n\";\r\n\t\t}else {\r\n\t\t\ttransferCards(player2);\r\n\t\t\tgameState = \"Cards go to Player 2 \\n\";\r\n\t\t}\r\n\t\tmoves ++;\r\n\t}", "public void handleBurnLeader(ActionEvent event) {\n Object burnButton = event.getSource();\n if (burnButton== burn0){\n sender.sendInput(\"discard leader card 0\");\n leader0.setVisible(false);\n activate0.setDisable(true);\n burn0.setDisable(true);\n }\n if (burnButton== burn1){\n sender.sendInput(\"discard leader card 1\");\n leader1.setVisible(false);\n activate1.setDisable(true);\n burn1.setDisable(true);\n }\n if (burnButton== burn2){\n sender.sendInput(\"discard leader card 2\");\n leader2.setVisible(false);\n activate2.setDisable(true);\n burn2.setDisable(true);\n }\n if (burnButton== burn3){\n sender.sendInput(\"discard leader card 3\");\n leader3.setVisible(false);\n activate3.setDisable(true);\n burn3.setDisable(true);\n }\n\n System.out.println(\"\\n\\nLeader discarded AND INPUT SENT\\n\\n\");\n }", "public static void main(String[] args) {\n\t\tBoard gameBoard = new Board();\n\t\tDisplay screen = new TextDisplay();\n\n\t\t// give each player some pieces\n\t\tPieces blackPieces = new Pieces(gameBoard, PieceCode.BLACK);\n\t\tPieces whitePieces = new Pieces(gameBoard, PieceCode.WHITE);\n\n\t\t// Player blackPlayer = new HumanPlayer(\"Black\", blackPieces, gameBoard, null);\n\t\t// Player blackPlayer = new RandomPlayer(\"Black\", blackPieces, gameBoard, null);\n\t\tPlayer blackPlayer = new AggressivePlayer(\"Black\", blackPieces, gameBoard, null);\n\n\t\tPlayer whitePlayer = new HumanPlayer(\"White\", whitePieces, gameBoard, null);\n\t\t// Player whitePlayer = new RandomPlayer(\"White\", whitePieces, gameBoard,null);\n\t\t// Player whitePlayer = new AggressivePlayer(\"White\", whitePieces,\n\t\t// gameBoard,null);\n\n\t\tblackPlayer.setOpponent(whitePlayer);\n\t\twhitePlayer.setOpponent(blackPlayer);\n\n\t\tPlayer activePlayer = whitePlayer;\n\t\t// while both kings are alive\n\t\twhile (blackPlayer.getPieces().getPiece(blackPlayer.getPieces().getNumPieces() - 1).getValue() == PieceCode.KING\n\t\t\t\t&& whitePlayer.getPieces().getPiece(whitePlayer.getPieces().getNumPieces() - 1)\n\t\t\t\t\t\t.getValue() == PieceCode.KING) {\n\n\t\t\tscreen.displayBoard(activePlayer.getPieces());\n\t\t\tBoolean madeMove = false;\n\n\t\t\twhile (!madeMove) {\n\t\t\t\tmadeMove = activePlayer.makeMove();\n\t\t\t}\n\n\t\t\tactivePlayer = activePlayer.getOpponent();\n\t\t}\n\t\t// Display the end board\n\t\tscreen.displayBoard(activePlayer.getPieces());\n\n\t\t// Find out who's king died\n\t\tPlayer winner = null;\n\t\tif (blackPlayer.getPieces().getPiece(blackPlayer.getPieces().getNumPieces() - 1).getValue() == PieceCode.KING) {\n\t\t\twinner = blackPlayer;\n\t\t} else {\n\t\t\twinner = whitePlayer;\n\t\t}\n\t\t// and crown them champion\n\t\tSystem.out.println(winner + \" Wins!\");\n\t}", "public void 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 }", "private void updateShuffleboard()\n {\n }", "@Override\n public void noteNewTurn()\n {\n if ( traceStats && stateMachine.getInstanceId() == 1 )\n {\n ForwardDeadReckonLegalMoveInfo[] masterList = stateMachine.getFullPropNet().getMasterMoveList();\n for(int i = 0; i < bestResponseScores.length; i++)\n {\n float best = -Float.MAX_VALUE;\n float bestFollow = -Float.MAX_VALUE;\n int bestIndex = -1;\n int bestFollowIndex = -1;\n for(int j = 0; j < bestResponseScores.length; j++)\n {\n if ( responseSampleSize[i][j] > 0 )\n {\n float score = bestResponseScores[i][j]/responseSampleSize[i][j];\n if ( masterList[i].mRoleIndex != masterList[j].mRoleIndex)\n {\n if ( score > best )\n {\n best = score;\n bestIndex = j;\n }\n }\n else\n {\n if ( score > bestFollow )\n {\n bestFollow = score;\n bestFollowIndex = j;\n }\n }\n }\n }\n\n LOGGER.info(\"Best response to \" + masterList[i].mInputProposition + \": \" + (bestIndex == -1 ? \"NONE\" : masterList[bestIndex].mInputProposition + \" (\" + (100*best) + \"% [\" + responseSampleSize[i][bestIndex] + \"] )\"));\n LOGGER.info(\"Best follow-on to \" + masterList[i].mInputProposition + \": \" + (bestFollowIndex == -1 ? \"NONE\" : masterList[bestFollowIndex].mInputProposition + \" (\" + (100*bestFollow) + \"% [\" + responseSampleSize[i][bestFollowIndex] + \"] )\"));\n if ( bestIndex != -1 && opponentEquivalent[bestIndex] != bestFollowIndex )\n {\n int bestDeny = opponentEquivalent[bestIndex];\n LOGGER.info(\"Best denial to \" + masterList[i].mInputProposition + \": \" + (bestDeny == -1 ? \"NONE\" : masterList[bestDeny].mInputProposition + \" (\" + (100*(bestResponseScores[i][bestDeny]/responseSampleSize[i][bestDeny])) + \"% [\" + responseSampleSize[i][bestDeny] + \"] )\"));\n }\n }\n }\n\n // Reset the stats\n for(int i = 0; i < bestResponseScores.length; i++)\n {\n for(int j = 0; j < bestResponseScores.length; j++)\n {\n bestResponseScores[i][j] /= 2;\n responseSampleSize[i][j] /= 2;\n }\n }\n }", "@Override\n protected Move makeDecision() {\n myTurn = index();\n /* block the nearest + most effective player (as in, people who arent blocked) */\n ArrayList<Move> pathMoves = new ArrayList<>();\n ArrayList<Move> playMoves = new ArrayList<>();\n ArrayList<Move> discardMoves = new ArrayList<>();\n Map<Integer, Card> destroyCards = new HashMap<Integer, Card>();\n Map<Integer, Card> repairCards = new HashMap<Integer, Card>();\n Map<Integer, Card> blockCards = new HashMap<Integer, Card>();\n Map<Integer, Card> pathCards = new HashMap<Integer, Card>();\n Set<Position> reachable = game().board().getReachable();\n canSee=false;\n canMove=false;\n canBlock=false;\n canRockfall=false;\n canRepair=false;\n int len = hand().size();\n for (int i = 0; i < len; ++i) {\n Card c = hand().get(i);\n if (c instanceof PathCard && !isSabotaged()) {\n pathCards.put(i,c);\n// pathMoves.addAll(generatePossiblePaths(i, (PathCard) c));\n canMove = true;\n }\n if (c instanceof PlayerActionCard) {\n// playMoves.addAll(generatePossiblePlayerActions(i, (PlayerActionCard) c));\n if(c.type()== Card.Type.BLOCK) {\n blockCards.put(i, c);\n canBlock=true;\n }\n else if(c.type()== Card.Type.REPAIR) {\n repairCards.put(i, c);\n canRepair=true;\n }\n }\n if (c.type() == Card.Type.MAP) {\n// playMoves.addAll(generatePossibleMap(i));\n mapIndex = i;\n canSee = true;\n }\n if (c.type() == Card.Type.ROCKFALL) {\n destroyCards.put(i,c);\n// playMoves.addAll(generatePossibleRockfall(i));\n canRockfall = true;\n }\n discardMoves.add(Move.NewDiscardMove(index(), i));\n }\n\n if(canSee) {\n //sum of all heuristics\n double sumGoal[] = new double[3];\n for (Position h : reachable) {\n sumGoal[0]+=(9-(8-h.x)+ 5-(4-h.y));\n sumGoal[1]+=(9-(8-h.x)+ 5-(2-h.y));\n sumGoal[2]+=(9-(8-h.x)+ 5-(-h.y));\n }\n //update goldProb\n for(int i=0; i<3; i++) {\n int seenSum=0;\n for(int j=0; j<numPlayers; j++) {\n if(j!=myTurn) {\n if(haveSeen.get(j)[i]==1) seenSum++;\n }\n }\n goldProb[i] = (i==1?0.5:1)*(1-haveSeen.get(myTurn)[i])*(mapRate*(seenSum/numPlayers)+(sumGoal[i]/10));\n }\n }\n\n// System.out.println(hand());\n// System.out.println(pathMoves);\n\n\n if (role() == Role.GOLD_MINER) {\n //Path\n if(canSee && !goldFound) {\n int selection=0;\n double maxProb=goldProb[0];\n for(int i=0; i<3; i++) {\n if(goldProb[i]>maxProb) {\n maxProb = goldProb[i];\n selection=i;\n }\n }\n Move look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.TOP);\n switch(selection) {\n case 0:\n look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.TOP);\n break;\n case 1:\n look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.MIDDLE);\n break;\n case 2:\n look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.BOTTOM);\n break;\n }\n return look;\n }\n if(canMove) {\n int globalIndex = 0;\n double maxH = 0;\n double oldH;\n Position bp = new Position(0,0);\n boolean rotate = false;\n //Find best path to place;\n Board board = game().board().copy();\n oldH = getClosest(board);\n// System.out.print(getClosest(board)+\" : \");\n for( Map.Entry<Integer, Card> p : pathCards.entrySet()) {\n int index = p.getKey();\n Card path = p.getValue();\n ((PathCard)path).setRotated(false);\n Set<Position> placeable = game().board().getPlaceable((PathCard)path);\n for (Position h : placeable) {\n Board simulated = board.simulatePlaceCardAt((PathCard)path, h.x, h.y);\n// System.out.println(path.type());\n double cH = getClosest(simulated);\n if(maxH<cH) {\n bp=h;\n globalIndex = index;\n maxH = cH;\n rotate=false;\n }\n }\n ((PathCard) path).setRotated(true);\n placeable = game().board().getPlaceable((PathCard)path);\n for (Position h : placeable) {\n Board simulated = board.simulatePlaceCardAt((PathCard)path, h.x, h.y);\n// System.out.println(simulated);\n double cH = getClosest(simulated);\n if(maxH<cH) {\n bp=h;\n globalIndex = index;\n rotate=true;\n maxH = cH;\n }\n }\n }\n// System.out.println(oldH+\": \"+maxH+\" (\"+abs(maxH-oldH)+\")\");\n oldBoard = game().board().copy();\n if(maxH>0 && abs(maxH-oldH)>0.01)\n return Move.NewPathMove(index(), globalIndex, bp.x, bp.y, rotate);\n }\n //Unblock\n if(canRepair) {\n double blockMore = 0.0;\n int targetPlayer = -1;\n int cardIndex = 0;\n for(int i=0; i<numPlayers; i++) {\n //heal self\n if(i == myTurn) {\n for(Map.Entry<Integer, Card> r : repairCards.entrySet()) {\n int index = r.getKey();\n// System.out.println(Arrays.toString(game().playerAt(index()).sabotaged()));\n PlayerActionCard repair = (PlayerActionCard) r.getValue();\n if (game().playerAt(index()).isRepairable(repair.effects())) {\n return Move.NewPlayerActionMove(index(),index, index());\n }\n }\n }\n else if(i!=myTurn) {\n for(Map.Entry<Integer, Card> r : repairCards.entrySet()) {\n int index = r.getKey();\n PlayerActionCard repair = (PlayerActionCard) r.getValue();\n// System.out.println(Arrays.toString(game().playerAt(i).sabotaged()));\n if (game().playerAt(i).isRepairable(repair.effects())) {\n //calculate the should i repair? function\n double shouldIBlockMore = Probability[i]+(0.03*(numPlayers-i));\n if(blockMore<shouldIBlockMore) {\n blockMore = shouldIBlockMore;\n targetPlayer = i;\n cardIndex = index;\n }\n }\n }\n }\n }\n if(blockMore>0.75 && targetPlayer>=0)\n return Move.NewPlayerActionMove(index(), cardIndex, targetPlayer);\n }\n //Block Enemy\n if(canBlock) {\n double blockMore = 0.0;\n int targetPlayer = -1;\n int cardIndex = 0;\n for (int i = 0; i < numPlayers; i++) {\n if (i != myTurn) {\n for (Map.Entry<Integer, Card> b : blockCards.entrySet()) {\n int index = b.getKey();\n PlayerActionCard block = (PlayerActionCard) b.getValue();\n if (game().playerAt(i).isSabotageable(block.effects()[0])) {\n //calculate the should i repair? function\n double shouldIBlockMore = (1 - Probability[i]) * ((1 - Probability[i]) + 0.2 * (numPlayers - i));\n if (blockMore < shouldIBlockMore) {\n blockMore = shouldIBlockMore;\n targetPlayer = i;\n cardIndex = index;\n }\n }\n }\n }\n }\n if(blockMore>0.6 && targetPlayer>=0)\n return Move.NewPlayerActionMove(index(), cardIndex, targetPlayer);\n }\n //Fix (Rockfall)\n if(canRockfall) {\n int globalIndex = 0;\n double maxH = 0.0;\n Position bp = new Position(0,0);\n //Find best path to place;\n Board board = game().board().copy();\n for( Map.Entry<Integer, Card> d : destroyCards.entrySet()) {\n int index = d.getKey();\n Set<Position> destroyable = game().board().getDestroyable();\n for (Position h : destroyable) {\n Board simulated = board.simulateRemoveCardAt(h.x, h.y);\n// System.out.println(path.type());\n double cH = getClosest(simulated);\n if(maxH<cH) {\n bp=h;\n globalIndex = index;\n maxH = cH;\n }\n }\n }\n oldBoard = game().board().copy();\n if(maxH>0)\n return Move.NewRockfallMove(index(), globalIndex, bp.x, bp.y);\n }\n //See map\n\n //Conserve (Find the best card to discard)\n\n //calculate the heuristics and adjust accordingly,\n //choose between playing a card or discarding.\n } else if (role() == Role.SABOTEUR) {\n //See map\n if(canSee && !goldFound) {\n int selection=0;\n //specific for saboteurs\n double maxProb=goldProb[0];\n for(int i=0; i<3; i++) {\n if(goldProb[i]>maxProb) {\n maxProb = goldProb[i];\n selection=i;\n }\n }\n Move look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.TOP);\n switch(selection) {\n case 0:\n look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.TOP);\n break;\n case 1:\n look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.MIDDLE);\n break;\n case 2:\n look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.BOTTOM);\n break;\n }\n return look;\n }\n //Path\n if(canMove) {\n int globalIndex = 0;\n double maxH = 0.0;\n Position bp = new Position(0,0);\n boolean rotate = false;\n //Find best path to place;\n Board board = game().board().copy();\n double oldH = getClosestSabotage(board);\n for( Map.Entry<Integer, Card> p : pathCards.entrySet()) {\n int index = p.getKey();\n Card path = p.getValue();\n ((PathCard)path).setRotated(false);\n Set<Position> placeable = game().board().getPlaceable((PathCard)path);\n for (Position h : placeable) {\n Board simulated = board.simulatePlaceCardAt((PathCard)path, h.x, h.y);\n// System.out.println(path.type());\n double cH = getClosestSabotage(simulated);\n if(maxH<cH) {\n bp=h;\n globalIndex = index;\n maxH = cH;\n rotate=false;\n }\n }\n ((PathCard) path).setRotated(true);\n placeable = game().board().getPlaceable((PathCard)path);\n for (Position h : placeable) {\n Board simulated = board.simulatePlaceCardAt((PathCard)path, h.x, h.y);\n// System.out.println(simulated);\n double cH = getClosestSabotage(simulated);\n if(maxH<cH) {\n bp=h;\n globalIndex = index;\n rotate=true;\n maxH = cH;\n }\n }\n }\n oldBoard = game().board().copy();\n if(maxH>0 && abs(maxH-oldH)>0.01)\n return Move.NewPathMove(index(), globalIndex, bp.x, bp.y, rotate);\n }\n //Unblock Friend\n if(canRepair) {\n double blockMore = 0.0;\n int targetPlayer = -1;\n int cardIndex = 0;\n for(int i=0; i<numPlayers; i++) {\n if(i == myTurn) {\n for(Map.Entry<Integer, Card> r : repairCards.entrySet()) {\n int index = r.getKey();\n PlayerActionCard repair = (PlayerActionCard) r.getValue();\n if (game().playerAt(myTurn).isRepairable(repair.effects())) {\n return Move.NewPlayerActionMove(index(),index, index());\n }\n }\n }\n else if(i!=myTurn) {\n for(Map.Entry<Integer, Card> r : repairCards.entrySet()) {\n int index = r.getKey();\n PlayerActionCard repair = (PlayerActionCard) r.getValue();\n if (game().playerAt(i).isRepairable(repair.effects())) {\n //calculate the should i repair? function\n double shouldIBlockMore = (1-Probability[i])+(0.03*(numPlayers-i));\n if(blockMore<shouldIBlockMore) {\n blockMore = shouldIBlockMore;\n targetPlayer = i;\n cardIndex = index;\n }\n }\n }\n }\n }\n if(blockMore>0.75 && targetPlayer>=0)\n return Move.NewPlayerActionMove(index(), cardIndex, targetPlayer);\n }\n //Block Enemy\n if(canBlock) {\n double blockMore = 0.0;\n int targetPlayer = -1;\n int cardIndex = 0;\n for (int i = 0; i < numPlayers; i++) {\n if (i != myTurn) {\n for (Map.Entry<Integer, Card> b : blockCards.entrySet()) {\n int index = b.getKey();\n PlayerActionCard block = (PlayerActionCard) b.getValue();\n if (game().playerAt(i).isSabotageable(block.effects()[0])) {\n //calculate the should i repair? function\n double shouldIBlockMore = (Probability[i]) * ((Probability[i]) + 0.2 * (numPlayers - i));\n if (blockMore < shouldIBlockMore) {\n blockMore = shouldIBlockMore;\n targetPlayer = i;\n cardIndex = index;\n }\n }\n }\n }\n }\n if(blockMore>0.6 && targetPlayer>=0)\n return Move.NewPlayerActionMove(index(), cardIndex, targetPlayer);\n }\n //Sabotage (Rockfall)\n if(canRockfall) {\n int globalIndex = 0;\n double maxH = 0;\n Position bp = new Position(0,0);\n //Find best path to place;\n Board board = game().board().copy();\n for( Map.Entry<Integer, Card> d : destroyCards.entrySet()) {\n int index = d.getKey();\n Set<Position> destroyable = game().board().getDestroyable();\n for (Position h : destroyable) {\n Board simulated = board.simulateRemoveCardAt(h.x, h.y);\n// System.out.println(path.type());\n double cH = getClosestSabotage(simulated);\n if(maxH<cH) {\n bp=h;\n globalIndex = index;\n maxH = cH;\n }\n }\n }\n oldBoard = game().board().copy();\n if(maxH>0)\n return Move.NewRockfallMove(index(), globalIndex, bp.x, bp.y);\n }\n //Conserve (Find the best card to discard\n\n //calculate the heuristics and adjust accordingly,\n //choose between playing a card or discarding.\n }\n return discardMoves.get(0);\n }", "void askLeaderCardThrowing();", "public void computersTurn(int focusedSquare){//gives the index of the focused square.\n if (focusedSquare ==-1)\n focusedSquare = changeFocus();\n System.out.println(\"\\n\\n\\n\\n\"+focusedSquare);\n boolean squareAlreadyPicked = false;\n int square = -1;\n double sum=0;\n modifiedMark = createModifiedMarkovModel(focusedSquare);\n double rand;\n while(!squareAlreadyPicked){//checking if square has already been picked before.\n \n if(stepsCompleted<25){\n rand = getRand(0); //generates random number based on sum of existing probabilities in modifiedMarkov\n square = caseBased(rand, sum, 0, 0);\n }\n \n else if((stepsCompleted>=25)&&(stepsCompleted<=50)){\n rand = getRand(1);\n square = caseBased(rand,sum,1,0);\n }\n\n else if (stepsCompleted>50){\n rand = getRand(2);\n square = caseBased(rand,sum,2,0);\n }\n squareAlreadyPicked=true;\n\n }\n System.out.println(square);\n bSquares.get(focusedSquare).getSmallSquare(square).setOwnership(1);\n bSquares.get(focusedSquare).getSmallSquare(square).setCommitted(true);\n stepsCompleted++;\n updateDatabase(focusedSquare,square, false); //updates the database with the player's move B4 the focus is changed\n for (int t = 0; t<9; t++){//removes focus everywhere else.\n bSquares.get(t).sethasFocus(false);\n }\n \n bSquares.get(square).sethasFocus(true);//tells which square has focus\n \n }", "public Leaderboard() {\n filePath = new File(\"Files\").getAbsolutePath();\n highScores = \"scores\";\n\n topScores = new ArrayList<>();\n topName = new ArrayList<>();\n }", "public void newRound()\n\t{\n\t\tif(player1.getDeck().isEmpty())\n\t\t{\n\t\t\treshufflePlayer1();\n\t\t}\n\t\tif(player2.getDeck().isEmpty())\n\t\t{\n\t\t\treshufflePlayer2();\n\t\t}\n\t\t\n\t\tactivePlayerOneCard = player1.draw();\n\t\tactivePlayerTwoCard = player2.draw();\n\t}", "public void run() {\r\n\t\tcount = 270;\r\n\t\twhile(!gameOver()) {\r\n\t\t\tmoveGame();\r\n\t\t}\r\n\t\tif (laser != null)\r\n\t\t\tremove(laser);\r\n\t\tdisplayResults();\r\n\t}", "public void run() {\r\n for(int i = group; i < 64; i += 4) {\r\n if(!m_teams[i].isOut()) {\r\n setSurvivingTeam(m_teams[i]);\r\n return;\r\n }\r\n }\r\n\r\n m_botAction.sendArenaMessage(\"No one won for Base \" + (group + 1));\r\n }", "public static void update_scoreboard2(){\n\t\t//Update score\n\tif(check_if_wicket2){\n\t\t\n\t\twicket_2++;\n\t\tupdate_score2.setText(\"\"+team_score_2+\"/\"+wicket_2);\n\t}\n\telse{\n\t\tif(TossBrain.compselect.equals(\"bat\")){\n\t\t\ttempshot2=PlayArena2.usershot2;\n\t\tteam_score_2=team_score_2+PlayArena2.usershot2;\n\t\treq=req-tempshot2;\n\t\t}\n\t\telse{\n\t\t\ttempshot2=PlayArena2.compshot2;\n\t\t\tteam_score_2=team_score_2+PlayArena2.compshot2;\n\t\t\treq=req-tempshot2;\n\t\t\t}\n\t\tif(req<0)\n\t\t{\treq=0;}\n\t\t\n\t\tupdate_score2.setText(\"\"+team_score_2+\"/\"+wicket_2);\n\t}\n\t// Overs update\n\tif(over_ball_2==5){\n\t\tover_ball_2=0;\n\t\tover_overs_2++;\n\t\tover_totalballs_2--;\n\t}\n\telse{\n\t\tover_ball_2++;\n\tover_totalballs_2--;}\n\tupdate_overs2.setText(\"\"+over_overs_2+\".\"+over_ball_2+\" (\"+PlayMode.overs+\")\");\n\t\n\t//Check if_first_inning_over\n\tif(over_overs_2==Integer.parseInt(PlayMode.overs) || wicket_2==3 || PlayBrain1.team_score_1<team_score_2)\n\t\t\t{\n\t\tif_second_inning_over=true;\n\t\treference2.add(PlayArena2.viewscore2);\n\t\t\t}\n\t\n\t\n\t//Needed update\n\t\t\tupdate_runrate2.setText(\"<html>NEED<br>\"+req+\"<br>OFF<br>\"+over_totalballs_2+\" <br>BALLS</html>\");\n\t\t}", "@Override\n public void run() {\n if (player.canKickBall(fsmAI.ball)) {\n player.stateMachine.changeState(new KickBall(player, fsmAI));\n return;\n }\n \n Player nearestToBall = fsmAI.myTeam.getNearestPlayerToBall();\n if (player != nearestToBall && !(nearestToBall instanceof GoalKeeper)) {\n player.stateMachine.changeState(new MoveToHomeRegion(player, fsmAI));\n MessageDispatcher.getInstance().sendMessage(new PursueBallMessage(), nearestToBall);\n }\n }", "protected void execute() {\n \tclimber.setCLimberSpeed(0);\n }", "private void busquets() {\n\t\ttry {\n\t\t\tThread.sleep(5000); // espera, para dar tempo de ver as mensagens iniciais\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tint xInit = -25;\n\t\tint yInit = -10;\n\t\tplayerDeafaultPosition = new Vector2D(xInit*selfPerception.getSide().value(), yInit *selfPerception.getSide().value());\n\t\t\n\t\twhile (commander.isActive()) {\n\t\t\tupdatePerceptions(); // deixar aqui, no começo do loop, para ler o resultado do 'move'\n\t\t\tswitch (matchPerception.getState()) {\n\t\t\tcase BEFORE_KICK_OFF:\n\t\t\t\tcommander.doMoveBlocking(xInit, yInit);\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase PLAY_ON:\n\t\t\t\tstate = State.ATTACKING;\n\t\t\t\texecuteStateMachine();\n\t\t\t\tbreak;\n\t\t\tcase KICK_OFF_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase KICK_OFF_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\t//if(closer)\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CORNER_KICK_LEFT: // escanteio time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CORNER_KICK_RIGHT: // escanteio time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase KICK_IN_LEFT: // lateral time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\tcase KICK_IN_RIGHT: // lateal time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_LEFT: // Tiro livre time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_RIGHT: // Tiro Livre time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_FAULT_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_FAULT_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase GOAL_KICK_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase GOAL_KICK_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase AFTER_GOAL_LEFT:\n\t\t\t\tcommander.doMoveBlocking(xInit, yInit);\t\n\t\t\t\tbreak;\n\t\t\tcase AFTER_GOAL_RIGHT:\n\t\t\t\tcommander.doMoveBlocking(xInit, yInit);\t\n\t\t\t\tbreak;\n\t\t\tcase INDIRECT_FREE_KICK_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase INDIRECT_FREE_KICK_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public void run() \n\t\t\t{\n\t\t\t\tif (Math.abs(player.getLocation().getX() - playerLoc.getX()) > 1\n\t\t\t\t\t\t|| Math.abs(player.getLocation().getY() - playerLoc.getY()) > 1\n\t\t\t\t\t\t|| Math.abs(player.getLocation().getZ() - playerLoc.getZ()) > 1)\n\t\t\t\t{\n\t\t\t\t\tplayer.sendMessage(ChatColor.YELLOW + \"You cannot move while bandaging!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString name = player.getCustomName();\n\t\t\t\tif (name == null)\n\t\t\t\t\tname = player.getName();\n\t\t\t\t\n\t\t\t\t//Check that the recipient is still in roughly the same location\n\t\t\t\t//Skip if self-heal\n\t\t\t\tif (!player.equals(recipient))\n\t\t\t\t\tif (Math.abs(recipient.getLocation().getX() - recipientLoc.getX()) > 1\n\t\t\t\t\t\t|| Math.abs(recipient.getLocation().getY() - recipientLoc.getY()) > 1\n\t\t\t\t\t\t|| Math.abs(recipient.getLocation().getZ() - recipientLoc.getZ()) > 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tplayer.sendMessage(ChatColor.YELLOW + \"You cannot bandage your patient while they are moving!\");\n\t\t\t\t\t\trecipient.sendMessage(ChatColor.YELLOW + name + \" cannot bandage you while you are moving!\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Remove item from player's inventory.\n\t \t\tplayer.getInventory().removeItem(new ItemStack(Material.getMaterial(item.toUpperCase()), 1));\n\t \t\tplayer.updateInventory();\n\t \t\t\t\n\t \t\t//Heal the other player.\n\t \t\trecipient.setHealth(recipient.getHealth() + amountToHeal);\n\n\t \t\t//Award experience.\n\t \t\tProfessionStats prof = new ProfessionStats(perms, data, config, player.getUniqueId());\n\t \t\t\n\t \t\tif (!prof.isPracticeFatigued(profession))\n\t \t\t\taddExperience(player, profession, config.getInt(\"healing.\" + item + \".exp\"));\n\t \t\t\t\n\t \t\t//Notify both parties.\n\t \t\tif (!player.equals(recipient))\n\t \t\t{\t \t\t\n\t \t\t\tplayer.sendMessage(ChatColor.YELLOW + \"You bandaged \" + recipient.getName() + \"'s wounds.\");\n\t \t\t\trecipient.sendMessage(ChatColor.YELLOW + player.getName() + \" bandaged your wounds.\");\n\t \t\t}\n\t \t\telse\n\t \t\t\tplayer.sendMessage(ChatColor.YELLOW + \"You bandaged your wounds.\");\n\t\t\t }", "public void giveOthersClank(int clank) {\r\n\t\tfor (int i = 0; i < players.size(); i++) {\r\n\t\t\tif (!(players.get(i) == currentPlayer) && !players.get(i).isDead() && !players.get(i).isFree()) {\r\n\t\t\t\tplayers.get(i).updateClankOnBoard(clank);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void updateScoreboard() {\n\t\tif(obj != null) {\t\t\t\r\n\t\t\tobj.unregister();\r\n\t\t}\r\n\t\tobj = scoreboard.registerNewObjective(\"gui\", \"dummy\");\r\n\t\tobj.setDisplaySlot(DisplaySlot.SIDEBAR);\r\n\t\tobj.setDisplayName(\"§c§lVitality\");\r\n\t\tScore currentRank = obj.getScore(\"§e§lRank\");\r\n\t\tcurrentRank.setScore(40);\r\n\t\tScore currentRankVal = obj.getScore(\"§f\" + getRank().getName());\r\n\t\tcurrentRankVal.setScore(39);\r\n\t\tScore spacer1 = obj.getScore(\" \");\r\n\t\tspacer1.setScore(38);\r\n\t\tPrisonRank next = PrisonRank.getNextRank(rank);\r\n\t\tif(next != null) {\r\n\t\t\tScore nextRank = obj.getScore(\"§b§lProgress to \" + next.getName());\r\n\t\t\tnextRank.setScore(37);\r\n\t\t\tdouble percent = (Prison.getEco().getBalance(this) / next.getValue()) * 100;\r\n\t\t\tif(percent > 100) {\r\n\t\t\t\tpercent = 100;\r\n\t\t\t}\r\n\t\t\tScore nextRankVal = obj.getScore(\"§f\" + ((int)percent + \"%\"));\r\n\t\t\tnextRankVal.setScore(36);\r\n\t\t} else {\r\n\t\t\tScore nextRank = obj.getScore(\"§b§lNext Rank\");\r\n\t\t\tnextRank.setScore(37);\r\n\t\t\tScore nextRankVal = obj.getScore(\"§fNone\");\r\n\t\t\tnextRankVal.setScore(36);\r\n\t\t}\r\n\t\tScore spacer2 = obj.getScore(\" \");\r\n\t\tspacer2.setScore(35);\r\n\t\tScore money = obj.getScore(\"§a§lBalance\");\r\n\t\tmoney.setScore(34);\r\n\t\tScore moneyVal = obj.getScore(\"§f$\" + moneyFormat.format(Prison.getEco().getBalance(this)));\r\n\t\tmoneyVal.setScore(33);\r\n\t\tScore spacer3 = obj.getScore(\" \");\r\n\t\tspacer3.setScore(32);\r\n\t\t\r\n\t\tScore mult = obj.getScore(\"§6§lMultiplier\");\r\n\t\tmult.setScore(31);\r\n\t\t\r\n\t\tif(Multiplier.getMultiplier() > 1.0) {\r\n\t\t\tScore multVal = obj.getScore(\"§f\" + Multiplier.getMultiplier() + \"x\");\r\n\t\t\tmultVal.setScore(30);\r\n\t\t} else {\r\n\t\t\tScore multVal = obj.getScore(\"§fNone\");\r\n\t\t\tmultVal.setScore(30);\r\n\t\t}\r\n\t\tScore spacer4 = obj.getScore(\" \");\r\n\t\tspacer4.setScore(29);\r\n\t\tScore onlineStaff = obj.getScore(\"§c§lOnline Staff\");\r\n\t\tonlineStaff.setScore(28);\r\n\t\tScore onlineStaffVal = obj.getScore(\"§f\" + Prison.getStaffOnline().getCurrent());\r\n\t\tonlineStaffVal.setScore(27);\r\n\t}", "public void handleUseLeaderCards(ActionEvent event){\n\n if (playerState != PlayerState.LEADER) {\n sender.sendInput(\"use leader cards GUI\");\n }\n\n else {\n sender.sendInput(\"not use leader card\");\n playerState = lastPlayerState;\n setLeaderButtons(false);\n }\n }", "public void standBJ() {\n\t\tif (blackjack.isOkBet()) {\n\t\t\t((BlackjackView) manager.getPanel(Constants.BJ_VIEW_NAME)).standAction();\n\n\t\t\twhile (blackjack.getCount(2, false, 17)) {\n\t\t\t\t((BlackjackView) manager.getPanel(Constants.BJ_VIEW_NAME)).addCard(blackjack.giveCard(2), 2);\n\t\t\t}\n\n\t\t\tif (blackjack.getCount(2, true, 21)) {\n\t\t\t\tJOptionPane.showMessageDialog(((BlackjackView) manager.getPanel(Constants.BJ_VIEW_NAME)), \"You win!\",\n\t\t\t\t\t\t\"DEALER BUSTS\", JOptionPane.PLAIN_MESSAGE);\n\t\t\t\tblackjack.stand(true);\n\t\t\t} else {\n\t\t\t\tif (blackjack.getCount(1, true, blackjack.getCardCount(2))) {\n\t\t\t\t\tJOptionPane.showMessageDialog(((BlackjackView) manager.getPanel(Constants.BJ_VIEW_NAME)),\n\t\t\t\t\t\t\t\"You win!\", \"YOU WIN\", JOptionPane.PLAIN_MESSAGE);\n\t\t\t\t\tblackjack.stand(true);\n\t\t\t\t} else if (blackjack.getCount(1, false, blackjack.getCardCount(2))) {\n\t\t\t\t\tJOptionPane.showMessageDialog(((BlackjackView) manager.getPanel(Constants.BJ_VIEW_NAME)),\n\t\t\t\t\t\t\t\"You lose!\", \"YOU LOSE\", JOptionPane.PLAIN_MESSAGE);\n\t\t\t\t\tblackjack.stand(false);\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(((BlackjackView) manager.getPanel(Constants.BJ_VIEW_NAME)),\n\t\t\t\t\t\t\t\"You push.\", \"PUSH\", JOptionPane.PLAIN_MESSAGE);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tresetBJTable();\n\t\t} else\n\t\t\tJOptionPane.showMessageDialog(manager.getPanel(Constants.BJ_VIEW_NAME), \"You must bet something\", \"ERROR\",\n\t\t\t\t\tJOptionPane.PLAIN_MESSAGE);\n\t}", "public void showLobbyBoard(Player player){\n\t\tFeatherBoardAPI.showScoreboard(player,\"build-battle-lobby\");\n\t}", "private static void ExplainRules() {\n System.out.printf(\"\\n %sWELCOME TO BOMB BLAST%s!!!!!!!!!!!!\\n\\n \", Styling.ANSI_BLUE, Styling.ANSI_RESET);\r\n System.out.printf(\"- Your object is to survive as long as possible, and accumlate the most points.\\n- You accumulate points by not triggering the bomb and therefore surviving the round.\\nWhere is the bomb? Within a random box\\n- All boxes are empty apart from ONE\\n- If you select the bomb ridden box you will receive NO POINTS!\\nAnd the survivors will receive points based on how long it took the group to find the bomb\\n- After a selected amount of rounds whoever has survived the most amount of attempts wins!!\\n\\n\");\r\n AnyKey.pressAnyKeyToContinue();\r\n }", "static HashMap <String, ArrayList> startGame(HashMap <String, ArrayList> paramsToFront) {\n CardsActions action = new CardsActions();\n ArrayList <Card> cards = new ArrayList<>();\n ArrayList<Card> upTable = new ArrayList<>();\n ArrayList<Card> downTable = new ArrayList<>(); \n ArrayList<String> state = new ArrayList<>(); \n \n state.add(\"player_attak\"); \n\n ArrayList<String> userId = new ArrayList<>();\n double id = Math.random();\n userId.add(Double.toString(id));\n\n cards = CardsActions.createCards(cards);\n \n Card trumpCard = action.setTrumpCard(cards);\n ArrayList <Card> trumpCards = new ArrayList<>();\n trumpCards.add(trumpCard);\n // System.out.println(\"Козырь: \" + trumpCard.getName()); \n\n ArrayList <Card> playerHand = new ArrayList<>();\n action.takeCards(playerHand,cards); \n \n ArrayList <Card> compHand = new ArrayList<>();\n action.takeCards(compHand,cards);\n\n ArrayList <Integer> quantaty = new ArrayList<>();\n int quantatyComp = compHand.size();\n quantaty.add(quantatyComp);\n\n ArrayList <Integer> deck = new ArrayList<>();\n int quantatyCards = cards.size();\n deck.add(quantatyCards);\n\n for (int j = 102,i=0;i<cards.size();i++){\n // Card minTrump = cards.get(i);\n Card checker = new Card (j,trumpCard.getMasti()); \n\n if (checker.isSameRank(cards)) {j++;} \n else { \n if (checker.isSameRank(compHand)) {\n System.out.println(\"Комп ходит первый\");\n turn.compAttak (playerHand,compHand,table,cards); \n } \n else {\n turn.humanAttak(playerHand,compHand,table,cards);\n } \n }\n }\n \n paramsToFront.put(\"player_hand\", playerHand);\n paramsToFront.put(\"up_table\", upTable);\n paramsToFront.put(\"down_table\", downTable);\n paramsToFront.put(\"trump_cards\", trumpCards);\n paramsToFront.put(\"deck\", deck);\n paramsToFront.put(\"comp_hand\", quantaty);\n paramsToFront.put(\"user_id\", userId);\n paramsToFront.put(\"state\", state);\n\n return paramsToFront;\n }", "@Override\n\t\tpublic void execute() throws InterruptedException {\n\t\t\tturnStyle.acquire();\n\n\t\t\t// vlez na majmin\n\t\t\tstate.enter(this);\n\n\t\t\t//\n\t\t\tmutexLeft.acquire();\n\t\t\tleft++;\n\t\t\t// Samo prviot majmun ja smenuva sostojbata na jazheto\n\t\t\tif (left == 1) {\n\t\t\t\tmutexRope.acquire();\n\t\t\t\tstate.leftPassing();\n\t\t\t}\n\n\t\t\tmutexLeft.release();\n\n\t\t\t// Ko ova se dozvoluva nekoj nareden majmun da dojdi od bilo koja\n\t\t\t// strana\n\t\t\tturnStyle.release();\n\n\t\t\t// Kontrola na brojot na majmuni na jazheto\n\t\t\tonRope.acquire();\n\t\t\tstate.cross(this);\n\t\t\tonRope.release();\n\n\t\t\tmutexLeft.acquire();\n\t\t\tleft--;\n\t\t\tstate.leave(this);\n\t\t\t// Posledniot majmun od redicata koja shto cheka go osloboduva\n\t\t\t// jazheto\n\t\t\tif (left == 0) {\n\t\t\t\tmutexRope.release();\n\t\t\t}\n\n\t\t\tmutexLeft.release();\n\t\t}", "Cup(int[][] boardStatus) {\n moves = new ArrayList<>();\n addPossibleMoves(boardStatus);\n }", "public void testScoreboardCaseOne () throws Exception {\n // RunID TeamID Prob Time Result\n \n String [] runsData = {\n \"1,1,A,1,No\", // 20 (a No before first yes)\n \"2,1,A,3,Yes\", // 3 (first yes counts Minute points but never Run Penalty points)\n \"3,1,A,5,No\", // zero -- after Yes\n \"4,1,A,7,Yes\", // zero -- after Yes\n \"5,1,A,9,No\", // zero -- after Yes\n \"6,1,B,11,No\", // zero -- not solved\n \"7,1,B,13,No\", // zero -- not solved\n \"8,2,A,30,Yes\", // 30 (minute points; no Run points on first Yes)\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 scoreboardTest (2, runsData, rankData);\n }", "public static List<Integer> climbingLeaderboard(List<Integer> ranked, List<Integer> player) {\n // Write your code here\n List<Integer> temp = new ArrayList<>();\n List<Integer> result = new ArrayList<>();\n //boolean isNext =false;\n\n temp=ranked.stream()\n .distinct()\n .collect(toList());\n int i = temp.size()-1; //rank 리스트의 마지막 인덱스 값\n\n /**\n * 확실하게 짚고 넘어가기 위한 부연 설명\n *\n * 1 . List player를 순회시키는데, List rank를 뒤에서부터 순회 한다.\n * (List rank를 오름차순 정렬하고 하려해봤는데 랭킹뽑으려고 하는 순간 머리가 꼬이기 시작했었음)\n * 2. 플레이어의 점수가 랭크된 점수보다 작아졌을 때 비로소 플레이어 점수가 랭크되는 순간이다.\n * 따라서 이 때(2번)의 i값이 랭크점수 순회중 만난 최초의 플레이어 점수보다 높아지는 위치가 된다.\n * 그러므로 이 위치의 다음자리가 비교하는 플레이어의 점수가 랭크되는 위치가 되겠다. i+1\n * 하지만 인덱스는 0부터 시작하기때문에 저장할땐 +1을 더 해주어 i+2로 해준다.\n * 3. while문을 통과했을 때 i가 0보다 작아 통과한 경우는 1등을 한 경우가 된다. 인덱스0보다 큰거니까\n * 따라서 i가 0보다 작은 지 for문 끝나기 전 체크 필요\n * 그 후 다음 score 가 while문에 들어갈땐 이전에 비교했던 인덱스값 다음을 비교하게 된다.\n */\n for(int score : player){\n while(i>=0){\n if(score>=temp.get(i)){\n i--;\n }else{\n result.add(i+2); //인덱스는 0부터시작하니까 +1 , 스코어가 랭크된점수보다 낮으므로 한 등수 밀려서 +1 따라서 총 +2\n break;\n }\n }\n if(i<0) result.add(1); //1위\n }\n\n\n\n //-----------------------기존 O(n^2) 풀이.. ---------------------------------------\n\n //2. 배열 순회 하며 범위 찾은인덱스 +1 (내림차순이므로)\n // 2-1. 양 끝 값보다 크거나 작을 경우 케이스 따로 분리\n // 이중루프로 계산 시 TIME OUT\n// for(int score : player){\n// for(int i=0; i<temp.size(); i++){\n// if(!isNext) {\n// if (score >= temp.get(i)) {\n// if(i==0){\n// result.add(1);\n// }else {\n// result.add((i+1)); //인덱스는 0부터 시작하므로\n// }\n// isNext = true;\n// }else if(score<=temp.get(temp.size()-1)){ //가장 작은 케이스\n// if(score==temp.get(temp.size()-1)){ //가장 작은 값과 같은 경우\n// result.add(temp.size());\n// }else{\n// result.add(temp.size()+1);\n// }\n// isNext=true;\n// }\n// }\n// }\n// isNext=false;\n// }\n result.forEach(System.out::println);\n return result;\n }", "public static void main(String[] args) throws InterruptedException, NumberFormatException, IOException {\n\n\t\tint game = 0;\n\t\tFile fileToBeModified = new File(\"src/Game/winCount.txt\");\n\t\tBufferedReader reader = new BufferedReader(new FileReader(fileToBeModified));\n\n\t\tint whiteWin = Integer.parseInt(reader.readLine());\n\t\tSystem.out.println(\"White Wins:\" + whiteWin);\n\t\tint blackWin = Integer.parseInt(reader.readLine());\n\t\tSystem.out.println(\"Black Wins:\" + blackWin);\n\t\tint stalemates = Integer.parseInt(reader.readLine());\n\t\tSystem.out.println(\"Stalemates:\" + stalemates);\n\n\t\tint currWhiteWin = 0;\n\t\tint currBlackWin = 0;\n\t\tint currStalemate = 0;\n\n\t\tlong start= System.currentTimeMillis();\n\n\t\tBoardState board = new BoardState();\n\t\tMinimaxAI minimaxBlackPlayer = new MinimaxAI(5);\n\t\tMinimaxAI minimaxWhitePlayer = new MinimaxAI(5);\n\t\tAlphaBetaAI abBlackPlayer = new AlphaBetaAI(5);\n\t\tAlphaBetaAI abWhitePlayer = new AlphaBetaAI(5);\n\t\twhile (game <=30) {\t\n\t\t\tfor (int y = 8; y > 0; y--) {\n\t\t\t\tfor (int x = 1; x <= 8; x++) {\n\t\t\t\t\tSystem.out.print(board.getTile(x, y) + \"\\t\");\n\t\t\t\t}System.out.println();\n\t\t\t}\n\t\t\t\n\t\t\tint turn = 1;\n\t\t\twhile (!board.gameOver()) {\n\t\t\t\tif (board != null) {\n\t\t\t\t\tif (board.isWhiteTurn) {\n\t\t\t\t\t\t//board = abWhitePlayer.alphaBetaPlay(board);\n\t\t\t\t\t\tboard = minimaxWhitePlayer.minimaxPlay(board);\n\t\t\t\t\t}else {\n\t\t\t\t\t\t//board = abBlackPlayer.alphaBetaPlay(board);\n\t\t\t\t\t\tboard = minimaxBlackPlayer.minimaxPlay(board);\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(\"Turn #\" + turn++);\n\t\t\t\t\tboard.printBoard();\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tTimeUnit.MILLISECONDS.sleep(250);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (board.whiteWin()) {\n\t\t\t\tSystem.out.println(\"White Wins\");\n\t\t\t\twhiteWin++;\n\t\t\t\tcurrWhiteWin++;\n\t\t\t}else if(board.blackWin()){\n\t\t\t\tSystem.out.println(\"Black Wins\");\n\t\t\t\tblackWin++;\n\t\t\t\tcurrBlackWin++;\n\t\t\t}else {\n\t\t\t\tSystem.out.println(\"Stalemate\");\n\t\t\t\tstalemates++;\n\t\t\t\tcurrStalemate++;\n\t\t\t}\n\t\t\t\n//\t\t\tboard.reset();\n//\t\t\tgame++;\n\t\t\tbreak;\n\t\t}\n\n\t\tlong elapsed = System.currentTimeMillis() - start;\n\t\tSystem.out.println(\"Time Elapsed: \" + elapsed);\n\n\t\tFileWriter writer = new FileWriter(fileToBeModified);\n\t\twriter.write(Integer.toString(whiteWin));\n\t\twriter.write(System.getProperty( \"line.separator\" ));\n\t\twriter.write(Integer.toString(blackWin));\n\t\twriter.write(System.getProperty( \"line.separator\" ));\n\t\twriter.write(Integer.toString(stalemates));\n\t\tSystem.out.println(\"White Wins:\" + currWhiteWin);\n\t\tSystem.out.println(\"Black Wins:\" + currBlackWin);\n\t\tSystem.out.println(\"Stalemates:\" + currStalemate);\n\t\treader.close();\n\t\twriter.close();\n\t}", "public void moveBlueCrab() {\n\t\tloseLife();\n\t\tif (wallOverlapX()) {\n\t\t\tif (hitRight) {\n\t\t\t\tif (xVel > 0) {\n\t\t\t\t\tyPos += yVel;\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\txPos += xVel;\n\t\t\t\t\tyPos += yVel;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else if (hitLeft) {\n\t\t\t\tif (xVel < 0) {\n\t\t\t\t\tyPos += yVel;\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\txPos += xVel;\n\t\t\t\t\tyPos += yVel;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (wallOverlapY()) {\n\t\t\tif (hitUp) {\n\t\t\t\tif (yVel < 0) {\n\t\t\t\t\txPos += xVel;\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\txPos += xVel;\n\t\t\t\t\tyPos += yVel;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else if (hitDown) {\n\t\t\t\tif (yVel > 0) {\n\t\t\t\t\txPos += xVel;\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\txPos += xVel;\n\t\t\t\t\tyPos += yVel;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint xLow = xPos;\n\t\tint xHigh =xPos + width;\n\t\tint yTop = yPos;\n\t\tint yBot = yPos + height;\n\t\tfor (int i = 0; i < game.m.walls.size(); i++) {\n\t\t\tif (game.m.walls.get(i).wallHit(this) > 0) {\n//\t\t\t\twhile (game.m.walls.get(i).wallHit(this)) {\n\t\t\t\tif (game.m.walls.get(i).wallHit(this) == 4) {\n\t\t\t\t\tif (yVel < 0) {\n\t\t\t\t\t\tyPos += yVel;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t} \n\t\t\t\t\telse {\n\t\t\t\t\t\tfor (int j = 0; j < game.m.walls.size(); j++) {\n\t\t\t\t\t\t\tif (game.m.walls.get(j).wallHit(this) == 1) {\n\t\t\t\t\t\t\t\tif (xVel > 0) {\n\t\t\t\t\t\t\t\t\txPos += xVel;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (int j = 0; j < game.m.walls.size(); j++) {\n\t\t\t\t\t\t\tif (game.m.walls.get(j).wallHit(this) == 2) {\n\t\t\t\t\t\t\t\tif (xVel < 0) {\n\t\t\t\t\t\t\t\t\txPos += xVel;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\txPos += xVel;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (game.m.walls.get(i).wallHit(this) == 3) {\n\t\t\t\t\tif (yVel > 0) {\n\t\t\t\t\t\tyPos += yVel;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t} \n\t\t\t\t\telse {\n\t\t\t\t\t\tfor (int j = 0; j < game.m.walls.size(); j++) {\n\t\t\t\t\t\t\tif (game.m.walls.get(j).wallHit(this) == 1) {\n\t\t\t\t\t\t\t\tif (xVel > 0) {\n\t\t\t\t\t\t\t\t\txPos += xVel;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (int j = 0; j < game.m.walls.size(); j++) {\n\t\t\t\t\t\t\tif (game.m.walls.get(j).wallHit(this) == 2) {\n\t\t\t\t\t\t\t\tif (xVel < 0) {\n\t\t\t\t\t\t\t\t\txPos += xVel;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\txPos += xVel;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (game.m.walls.get(i).wallHit(this) == 2) {\n\t\t\t\t\tif (xVel < 0) {\n\t\t\t\t\t\txPos += xVel;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t} \n\t\t\t\t\telse {\n\t\t\t\t\t\tfor (int j = 0; j < game.m.walls.size(); j++) {\n\t\t\t\t\t\t\tif (game.m.walls.get(j).wallHit(this) == 3) {\n\t\t\t\t\t\t\t\tif (yVel > 0) {\n\t\t\t\t\t\t\t\t\tyPos += yVel;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (int j = 0; j < game.m.walls.size(); j++) {\n\t\t\t\t\t\t\tif (game.m.walls.get(j).wallHit(this) == 4) {\n\t\t\t\t\t\t\t\tif (yVel < 0) {\n\t\t\t\t\t\t\t\t\tyPos += yVel;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tyPos += yVel;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (game.m.walls.get(i).wallHit(this) == 1) {\n\t\t\t\t\tif (xVel > 0) {\n\t\t\t\t\t\txPos += xVel;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t} \n\t\t\t\t\telse {\n\t\t\t\t\t\tfor (int j = 0; j < game.m.walls.size(); j++) {\n\t\t\t\t\t\t\tif (game.m.walls.get(j).wallHit(this) == 3) {\n\t\t\t\t\t\t\t\tif (yVel > 0) {\n\t\t\t\t\t\t\t\t\tyPos += yVel;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (int j = 0; j < game.m.walls.size(); j++) {\n\t\t\t\t\t\t\tif (game.m.walls.get(j).wallHit(this) == 4) {\n\t\t\t\t\t\t\t\tif (yVel < 0) {\n\t\t\t\t\t\t\t\t\tyPos += yVel;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tyPos += yVel;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n//\t\t\t\tif (xVel > 0) {\n//\t\t\t\t\txPos -= 20;\n//\t\t\t\t\treturn;\n//\t\t\t\t} \n//\t\t\t\telse if (xVel < 0) {\n//\t\t\t\t\txPos += 20;\n//\t\t\t\t\treturn;\n//\t\t\t\t}\n//\t\t\t\tif (yVel > 0) {\n//\t\t\t\t\tyPos -= 20;\n//\t\t\t\t\treturn;\n//\t\t\t\t}\n//\t\t\t\telse if (yVel < 0) {\n//\t\t\t\t\tyPos += 20;\n//\t\t\t\t\treturn;\n//\t\t\t\t}\n//\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (xPos <= 0) {\n\t\t\tif (xVel > 0) {\n\t\t\t\txPos += xVel;\n\t\t\t} else if (yPos + height <= game.mapHeight && yPos >= 0){\n\t\t\t\tyPos += yVel;\n\t\t\t} else {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (xPos + width >= game.mapWidth) {\n\t\t\tif (xVel < 0) {\n\t\t\t\txPos += xVel;\n\t\t\t} else if (yPos + height <= game.mapHeight && yPos >= 0){\n\t\t\t\tyPos += yVel;\n\t\t\t} else {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (yPos <= 0) {\n\t\t\tif (yVel > 0) {\n\t\t\t\tyPos += yVel;\n\t\t\t} else if (xPos + width <= game.mapWidth && xPos >= 0){ \n\t\t\t\txPos += xVel;\n\t\t\t} else {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (yPos + height >= game.mapHeight) { \n\t\t\tif (yVel < 0) {\n\t\t\t\tyPos += yVel;\n\t\t\t} else if (xPos + width <= game.mapWidth && xPos >= 0){\n\t\t\t\txPos += xVel;\n\t\t\t} else {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\txPos += xVel;\n\t\t\tyPos += yVel;\n\t\t}\n\n\t}" ]
[ "0.64592946", "0.6334316", "0.6317564", "0.6227792", "0.60582656", "0.58976233", "0.5885111", "0.58816767", "0.5840562", "0.5813553", "0.56876427", "0.5682416", "0.5659198", "0.564747", "0.5640984", "0.5623524", "0.56215113", "0.56183", "0.5592653", "0.55828327", "0.5582717", "0.5576094", "0.55620646", "0.5530529", "0.55286777", "0.5526588", "0.54953676", "0.54838234", "0.54640657", "0.5447723", "0.54476607", "0.54341793", "0.54339564", "0.5419644", "0.54005086", "0.5371646", "0.5364801", "0.53459406", "0.5340091", "0.5315538", "0.5312636", "0.52974796", "0.5290445", "0.5290255", "0.5278829", "0.52680254", "0.52598584", "0.52543646", "0.5253463", "0.52405286", "0.5235859", "0.5229085", "0.522604", "0.5221611", "0.5221593", "0.52019525", "0.5201639", "0.51918733", "0.51879007", "0.5180808", "0.5174474", "0.5172298", "0.51552457", "0.5150288", "0.514867", "0.5144869", "0.5137496", "0.5133451", "0.51328385", "0.5131847", "0.51269126", "0.51121086", "0.51107305", "0.51100516", "0.5107926", "0.5107258", "0.51055086", "0.51033396", "0.5101929", "0.5101774", "0.5101386", "0.5100838", "0.5095928", "0.5095268", "0.5092997", "0.5086682", "0.50835884", "0.5079397", "0.5073478", "0.50659674", "0.5055285", "0.5053765", "0.5049405", "0.503878", "0.50306255", "0.50242835", "0.5018056", "0.50134885", "0.50127554", "0.5012225" ]
0.5741611
10
Constructor of the enumeration.
KeystoneArchitecture(int value) { this.value = value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Enumeration createEnumeration();", "public sym_complex_enum() {\n }", "public Enum() \n { \n set(\"\");\n }", "CommandEnum() {}", "@Unreachable\n private Enums()\n {\n // Empty default ctor, defined to override access scope.\n }", "public Enum(String val) \n { \n set(val);\n }", "public ServicesFormatEnum(){\n super();\n }", "public IRAttribute ( ) {\n\t\tsuper();\n\t}", "private CommonEnum(int value) {\n\t\tthis.value = value;\n\t}", "public EnumFactory() {\n countKeys = new int[EnumFactory.numberOfTypes];\n clearCounts();\n }", "private LanguagesEnum(Integer languagesEnumValue)\r\n\t{\r\n\r\n\t\tlanguagesEnum = languagesEnumValue;\r\n\r\n\t}", "public Enum(String name, String val) \n { \n super(name); \n set(val);\n }", "public Orbiter() {\n }", "public SonsureException(IEnum e) {\n this(e.getCode(), e.getDesc());\n }", "public Constructor(){\n\t\t\n\t}", "private Sequence() {\n this(\"<Sequence>\", null, null);\n }", "Constructor() {\r\n\t\t \r\n\t }", "public Flag() {\n }", "public EnumData(int value) {\n this.value = value;\n }", "private DirType(String... names) {\n\t\t\t//This should never happen as constructor is never called outside enum.\n\t\t\tif (names.length < 1) { //No String names provided.\n\t\t\t\tthrow new IllegalArgumentException(\"Insufficient arguments.\");\n\t\t\t}\n\t\t\taliases = names;\n\t\t}", "public Duration()\n\t{\n\t}", "Type() {\n }", "public Status(){\n this(StatusDescription.REGISTERED);\n }", "public Competence(){\n this(1,new BigValue(Constant.EXP_CHAR));\n }", "public Value() {}", "public Value() {\n }", "public Constants() {\n }", "private Value() {\n\t}", "public Status() {\n }", "public RightsManagementFailureCode(java.lang.Object instance) {\n super(instance);\n if (instance instanceof JCObject) {\n try {\n String enumName = NetEnum.GetName(classType, (JCObject)instance);\n classInstance = enumReflected.fromValue(enumName);\n } catch (Throwable t) {\n JCOReflector.writeLog(t);\n classInstance = enumReflected;\n }\n } else if (instance instanceof JCEnum) {\n classInstance = (JCEnum)instance;\n }\n }", "public Flag()\n {\n super(\"Flag\");\n }", "public Type() {\n super();\n }", "private Enums(int i)\n\t {\n\t System.out.println(2);\n\t }", "private AnalysisMethodEnum(String name) {\n\t\tthis.methodName = name;\n\t}", "public Articulo(){\r\n\t\t\r\n\t}", "public Value(){}", "private TipoDocumentoEnum(String descripcion,String codigo) {\r\n\t\tthis.descripcion=descripcion;\r\n\t\tthis.codigo=codigo;\r\n\t}", "public BabbleValue() {}", "public Lanceur() {\n\t}", "public InsulinType(){\n super();\n }", "public NameValue() {\n }", "private StatusMessage() {\n\n\t}", "private StatusMessage() {\n\n\t}", "public Status() {\n\n }", "public State(){}", "@com.exedio.cope.instrument.Generated // customize with @WrapperType(constructor=...) and @WrapperInitial\n\t@java.lang.SuppressWarnings({\"RedundantSuppression\",\"TypeParameterExtendsFinalClass\",\"UnnecessarilyQualifiedInnerClassAccess\"})\n\tWrapEnumItem()\n\t{\n\t\tthis(com.exedio.cope.SetValue.EMPTY_ARRAY);\n\t}", "public Stat() {\n }", "public ASNClassNumber() {\n }", "public ReocType() \r\n {\r\n super();\r\n }", "private Enums(String s, int j)\n\t {\n\t System.out.println(3);\n\t }", "public State()\n {\n this(\"\");\n }", "public ContentsEnumeration(Atom start)\r\n {\r\n super(start);\r\n }", "private EnumButton(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public _355() {\n\n }", "public EnumValueConverter() {\n }", "public Stat()\n {\n // empty constructor\n }", "private RBACConstants() {\r\n }", "public Property() {\n this(0, 0, 0, 0);\n }", "public Case() {}", "public Event() {\r\n\r\n\t}", "public Vector() {\n construct();\n }", "public Machine() {\n this(MachineType.values()[0]);\n }", "public EmanagerDatabaseStatusCode()\n {\n }", "private Instantiation(){}", "private ARXDate() {\r\n this(\"Default\");\r\n }", "EEnum createEEnum();", "EnumValue createEnumValue();", "EnumValue createEnumValue();", "EnumValue createEnumValue();", "public Event() {\n\t}", "@Test\n public void test_constructor_0(){\n\tSystem.out.println(\"Testing TracerIsotopes's enumerations and getters.\");\n //Tests if values are correct for all enumerations, and tests the getters as well. You cannot instantiate new inumerations.\n \n TracerIsotopes ave=TracerIsotopes.concPb205t;\n assertEquals(\"concPb205t\",ave.getName());\n\n ave=TracerIsotopes.concU235t;\n assertEquals(\"concU235t\",ave.getName());\n \n ave=TracerIsotopes.concU236t;\n assertEquals(\"concU236t\",ave.getName()); \n \n String[] list=TracerIsotopes.getNames();\n assertEquals(\"concPb205t\",list[0]);\n assertEquals(\"concU235t\",list[1]);\n assertEquals(\"concU236t\",list[2]);\n \n \n \n }", "EnumType(String p_i45705_1_, int p_i45705_2_, int p_i45705_3_, String p_i45705_4_, String p_i45705_5_) {\n/* */ this.field_176893_h = p_i45705_3_;\n/* */ this.field_176894_i = p_i45705_4_;\n/* */ this.field_176891_j = p_i45705_5_;\n/* */ }", "public Operation() {\n\t}", "private TypeCode() {}", "public Rol() {}", "@SuppressWarnings(\"unchecked\")\r\n public EnumByteConverter(final String theEnumType) {\r\n super((Class<E>) SystemUtils.forName(theEnumType));\r\n constants = init();\r\n }", "public Event() {\n }", "public Event() {\n }", "public Clade() {}", "private SheetTraitEnum(int value, String name, String literal) {\r\n\t\tthis.value = value;\r\n\t\tthis.name = name;\r\n\t\tthis.literal = literal;\r\n\t}", "private Constants() {\n }", "private Constants() {\n }", "public Individual()\r\n\t{\r\n\t}", "public Expression() {\r\n }", "private ProfitPerTariffType ()\n {\n super();\n }", "public Operation(){\n\t}", "private DistributionState(int value, String name, String literal) {\r\n this.value = value;\r\n this.name = name;\r\n this.literal = literal;\r\n }", "private QaCalendar() {\n }", "public Competence() {\r\n\t\tsuper();\r\n\t}", "public Orc() {\n\t\tsuper(\"Orc\" , 4);\n\t\t\n\t}", "private CoverageType(int value, String name, String literal) {\n\t\tthis.value = value;\n\t\tthis.name = name;\n\t\tthis.literal = literal;\n\t}", "private EnumApple(String desc){\n\t\tdescription = desc;\n\t}", "public Sequence(){\n\n }", "public Calendar() {\n }", "public Chauffeur() {\r\n\t}", "private StatusType(int value, String name, String literal) {\n\t\tthis.value = value;\n\t\tthis.name = name;\n\t\tthis.literal = literal;\n\t}", "public EnumByteConverter(final Class<E> theEnumType) {\r\n super(theEnumType);\r\n constants = init();\r\n }", "public Counter()\n {\n this(0);\n }", "public UBERequest() {\r\n }", "public Operation() {\n super();\n }", "public Operation() {\n /* empty */\n }" ]
[ "0.694301", "0.69411325", "0.6939379", "0.67313576", "0.67092854", "0.6645123", "0.6592536", "0.65386146", "0.6512596", "0.64555854", "0.64336747", "0.6408985", "0.64017725", "0.63847244", "0.63749295", "0.6370019", "0.63480246", "0.6334745", "0.6308249", "0.6303561", "0.6298291", "0.62784815", "0.6265151", "0.6225607", "0.6195867", "0.6188084", "0.6184172", "0.6182102", "0.6179974", "0.6179788", "0.6167942", "0.61676407", "0.6153141", "0.6144465", "0.6125557", "0.6095899", "0.6091214", "0.6072174", "0.6066212", "0.6062867", "0.6056668", "0.6053993", "0.6053993", "0.6032457", "0.60299206", "0.60257286", "0.60128987", "0.6008113", "0.6007006", "0.6000484", "0.59880716", "0.5986247", "0.59799105", "0.5978993", "0.59771943", "0.59754944", "0.5975035", "0.5974544", "0.59739774", "0.59738857", "0.5965565", "0.5961508", "0.5961276", "0.596043", "0.59572756", "0.59561616", "0.593595", "0.593595", "0.593595", "0.5931307", "0.5929677", "0.59290045", "0.5919138", "0.59149355", "0.5912608", "0.59072876", "0.59072506", "0.59072506", "0.590256", "0.5897882", "0.5887514", "0.5887514", "0.5883801", "0.5882425", "0.5880162", "0.58771974", "0.5876521", "0.58762056", "0.58760846", "0.5875209", "0.58709455", "0.58650243", "0.58628154", "0.5860828", "0.5854996", "0.5850015", "0.58436894", "0.5843504", "0.58421904", "0.5832187", "0.58309025" ]
0.0
-1
Retrieves the value of the enumeration, that corresponds to the value used in the enumeration in C.
public int value() { return value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "gov.nih.nlm.ncbi.www.MedlineSiDocument.MedlineSi.Type.Value.Enum getValue();", "com.yahoo.xpathproto.TransformTestProtos.MessageEnum getEnumValue();", "static int getValue(char c) {\n\t\tswitch(c) {\n\t\tcase 'A': return 0;\n\t\tcase 'C': return 1;\n\t\tcase 'G': return 2;\n\t\tcase 'T': return 3;\n\t\tdefault: return -1;\n\t\t}\n\t}", "public int getValue() { return getValue(OPEN); }", "public int getValue()\n {\n try\n {\n return (Integer) AlphaComposite.class.getField(name).get(null);\n }\n catch (Exception e)\n {\n return -1;\n }\n }", "public com.yahoo.xpathproto.TransformTestProtos.MessageEnum getEnumValue() {\n return enumValue_;\n }", "public com.yahoo.xpathproto.TransformTestProtos.MessageEnum getEnumValue() {\n return enumValue_;\n }", "protected String getEnumeration()\n {\n return enumeration;\n }", "public int getVal()\n {\n return this.ordinal();\n }", "@Override\n\tObject getValue() {\n\t try {\n\t\tObject value = getField.get(object);\n\t\tif (value instanceof Enum)\n\t\t return value.toString();\n\t\treturn value;\n\t }\n\t catch (IllegalAccessException ex) {\n\t\treturn null;\n\t }\n\t}", "ValueType getValue();", "public String getEnum() {\n if (model == null)\n return strEnum;\n return model.getEnum();\n }", "Rule EnumValue() {\n return Sequence(\n Identifier(),\n Optional(EnumConst()),\n Optional(ListSeparator()),\n WhiteSpace(),\n actions.pushEnumValueNode());\n }", "public char getValue()\n\t{\n\t\treturn value;\n\t}", "int getValue();", "int getValue();", "int getValue();", "int getValue();", "int getValue();", "gov.nih.nlm.ncbi.www.MedlineSiDocument.MedlineSi.Type.Value xgetValue();", "Integer getValue();", "Integer getValue();", "public String getElement()\n {\n return \"enum\";\n }", "public V getCValue();", "public int getValue();", "public int getValue();", "public char getValue() {\n return value;\n }", "private static Class<?> enumLiteralValueTypeOf(Class<? extends Enum<?>> enumType) {\r\n\t\tEnum<?>[] enumValues = enumType.getEnumConstants();\r\n\t\tif (enumValues != null) {\r\n\t\t\tfor (Enum<?> enumValue : enumValues) {\r\n\t\t\t\tif (enumValue instanceof DBEnumValue) {\r\n\t\t\t\t\tObject code = ((DBEnumValue<?>) enumValue).getCode();\r\n\t\t\t\t\tif (code != null) {\r\n\t\t\t\t\t\treturn code.getClass();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "int getCodeValue();", "public int getValue ()\r\n\t{\r\n\t\treturn (m_value);\r\n\t}", "public IRubyObject getConstantAt(String name) {\n IRubyObject value = fetchConstant(name);\n \n return value == UNDEF ? resolveUndefConstant(getRuntime(), name) : value;\n }", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "public KeyEnum getKeyEnum() {\n return this.key;\n }", "String getVal();", "java.lang.String getConstantValue();", "public E output(int i) {\n return EnumMultiset.this.enumConstants[i];\n }", "private byte getValue() {\n\t\treturn value;\n\t}", "Enum getType();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "public Integer getValue();", "public java.lang.String getEnumSkillId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ENUMSKILLID$10);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "int value(String name);", "public Object getValue() {\n if (_valueIndex <= 0)\n return null;\n return ((ConstantEntry) getPool().getEntry(_valueIndex)).getConstant();\n }", "public int getValue()\n\t{\n\t\treturn value;\n\t}", "public int getValue()\n\t{\n\t\treturn value;\n\t}", "public int getValue()\n\t{\n\t\treturn value;\n\t}", "int getValue() {\r\n switch (this) {\r\n case Boolean:\r\n return BOOLEAN;\r\n case Number:\r\n return NUMBER;\r\n case Array:\r\n return ARRAY;\r\n default:\r\n return STRING;\r\n }\r\n }", "int getEventValue();", "public IotaEnum getIotaEnum() {\n return _iotaEnum ;\n }", "public int getSubsystemValue()\n throws IOException, EndOfStreamException\n {\n return peFile_.readUInt16(relpos(Offsets.SUBSYSTEM_VALUE.position));\n }", "public static StatusType get(String literal) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tStatusType result = VALUES_ARRAY[i];\n\t\t\tif (result.toString().equals(literal)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public org.openarchives.www.oai._2_0.OAIPMHerrorcodeType.Enum getCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CODE$0);\n if (target == null)\n {\n return null;\n }\n return (org.openarchives.www.oai._2_0.OAIPMHerrorcodeType.Enum)target.getEnumValue();\n }\n }", "EnumConstant createEnumConstant();", "public java.lang.String getEnumSkillName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ENUMSKILLNAME$8);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public int getValue() {\n\t\t \treturn ordinal();\n\t\t }", "public int getValue() {\r\n\t\treturn value;\r\n\t}", "public int getValue() {\r\n\t\treturn value;\r\n\t}", "public int getValue() {\r\n\t\treturn value;\r\n\t}", "public int getValue() {\r\n\t\treturn value;\r\n\t}", "public int getValue() {\r\n\t\treturn value;\r\n\t}", "public int getValue() {\r\n\t\treturn value;\r\n\t}", "public int getValue() {\r\n\t\treturn value;\r\n\t}", "public int getValue() {\r\n\t\treturn value;\r\n\t}", "public int getValue() {\n\t\treturn value;\n\t}", "public int getValue() {\n\t\treturn value;\n\t}", "public int getValue() {\n\t\treturn value;\n\t}", "public int getValue() {\n\t\treturn value;\n\t}", "public int getValue(){\n\t\treturn value;\n\t}", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Constants.cpp\", line = 785,\n FQN=\"llvm::UndefValue::getElementValue\", NM=\"_ZNK4llvm10UndefValue15getElementValueEPNS_8ConstantE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Constants.cpp -nm=_ZNK4llvm10UndefValue15getElementValueEPNS_8ConstantE\")\n //</editor-fold>\n public UndefValue /*P*/ getElementValue(Constant /*P*/ C) /*const*/ {\n if (isa_SequentialType(getType())) {\n return getSequentialElement();\n }\n return getStructElement($ulong2uint(cast_ConstantInt(C).getZExtValue()));\n }", "public int getValue() {\n\t\treturn this.getValue();\n\t}" ]
[ "0.7184362", "0.65943843", "0.6309688", "0.627643", "0.62315404", "0.62185436", "0.6155465", "0.61495006", "0.6144434", "0.6123799", "0.60606694", "0.6014233", "0.5980536", "0.5910561", "0.5902424", "0.5902424", "0.5902424", "0.5902424", "0.5902424", "0.5895262", "0.5871788", "0.5871788", "0.5850882", "0.5845804", "0.5837909", "0.5837909", "0.58361495", "0.5832329", "0.5763097", "0.57534575", "0.5744208", "0.57389736", "0.57389736", "0.57389736", "0.57389736", "0.57389736", "0.57389736", "0.57389736", "0.57389736", "0.57389736", "0.57389736", "0.57389736", "0.57389736", "0.57389736", "0.57389736", "0.57389736", "0.57389736", "0.57389736", "0.57389736", "0.57389736", "0.57389736", "0.5716162", "0.5710468", "0.5709157", "0.5708873", "0.5683596", "0.5663777", "0.5657913", "0.5657913", "0.5657913", "0.5657913", "0.5657913", "0.5657913", "0.5657913", "0.5657913", "0.5657913", "0.5657913", "0.5657913", "0.5657913", "0.5657913", "0.56517524", "0.5646913", "0.5637611", "0.5637116", "0.5628923", "0.5628923", "0.5628923", "0.56274176", "0.5613464", "0.560897", "0.5603876", "0.5603186", "0.56007004", "0.55899894", "0.5587856", "0.55859154", "0.55830485", "0.55830485", "0.55830485", "0.55830485", "0.55830485", "0.55830485", "0.55830485", "0.55830485", "0.5576843", "0.5576843", "0.5576843", "0.5576843", "0.55434257", "0.5542658", "0.55424666" ]
0.0
-1
/ Print the fighter's names and their corresponding health.
public void showStatus(Character fighter1, Character fighter2, int health1, int health2) { System.out.println(); System.out.println("------------------------------"); System.out.println(String.format("%-15s%15s\n%-15d%15d", fighter1.getName(), fighter2.getName(), health1, health2)); System.out.println("------------------------------"); System.out.println(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printCurrentBattlers() {\n //System.out.println(\"Char hp: \" + character.getCurrHP());\n System.out.printf(\"battle Allies: \");\n for (MovingEntity e: battleAllies) {\n System.out.printf(\"%s \",e.getID());\n }\n System.out.printf(\"\\n\");\n\n System.out.printf(\"battle Enemies: \");\n for (MovingEntity e: battleEnemies) {\n if (e.getBattleBehaviour() instanceof ZombieBattleBehaviour) {\n System.out.printf(\"Z\");\n }\n System.out.printf(\"%s \",e.getID());\n }\n System.out.printf(\"\\n\");\n }", "public String getFightInfo(StatSprite attacker, StatSprite defender, int randomHit)\r\n\t{\r\n\t\treturn (\"\\n\"+attacker.getName()+\" attacks \"+defender.getName()+ \r\n\t\t\t\t\" for \"+randomHit+\"\\n\"+ defender.getName()+\"'s HP : \"+defender.curHP+\r\n\t\t\t\t\"/\"+defender.baseHP+\" -> \"+(defender.curHP-randomHit)+\"/\"+defender.baseHP);\r\n\t}", "public void fight(House house) {\n System.out.println(this.name + \" is fighting \" + house.name);\n }", "public void outputStats (){\n System.out.println(\"Your sorcerer's stats:\");\n System.out.println(\"HP = \" + hp);\n System.out.println(\"Mana = \" + mana);\n System.out.println(\"Strength = \" + strength);\n System.out.println(\"Vitality = \" + vitality);\n System.out.println(\"Energy = \" + energy);\n }", "@Override\r\n//displays the property of defensive players to console\r\npublic String toString() {\r\n\t\r\n\tdouble feet = getHeight()/12;\r\n\tdouble inches = getHeight()%12;\r\n\t\r\n\treturn \"\\n\" + \"\\nDefensive Player: \\n\" + getName() \r\n\t+ \"\\nCollege: \" + getCollege() \r\n\t+ \"\\nHighschool: \" + getHighschool() \r\n\t+ \"\\nAge: \" + getAge() \r\n\t+ \"\\nWeight: \" + getWeight() \r\n\t+ \"\\nHeight: \" + feet + \" ft\" + \" \" + inches + \" in\" \r\n\t+ \"\\nTeam Number: \" + getNumber() \r\n\t+ \"\\nExperience: \" + getExperience()\r\n\t+ \"\\nTeam: \" + getTeam() \r\n\t+ \"\\nPosition: \" +getPosition() \r\n\t+ \"\\nTackles : \" + getTackles() \r\n\t+ \"\\nSacks: \" +getSacks() \r\n\t+ \"\\nInterceptions: \" + getInterceptions();\r\n}", "public void getStatus()\r\n {\r\n //if this person has no weapon or armor, these values are kept\r\n String weaponName = \"bare hands\";\r\n String armorName = \"none\";\r\n int weaponAtk = 0;\r\n int armorDef = 0;\r\n \r\n if (weapon!=null)\r\n {\r\n weaponName = weapon.getName();\r\n weaponAtk = weapon.getRating();\r\n }\r\n if (armor!=null)\r\n {\r\n armorName = armor.getName();\r\n armorDef = armor.getRating();\r\n }\r\n \r\n String itemList = \"\";\r\n for (Thing t : items)\r\n itemList += t.getName() + \", \";\r\n \r\n System.out.println(\"Health: \" + health + \"/\" + maxHealth + \"\\n\" +\r\n \"ATK: \" + attack + \"\\n\" +\r\n \"DEF: \" + defense + \"\\n\" +\r\n \"Weapon: \" + weaponName + \" (\" + weaponAtk + \" ATK\" + \")\" + \"\\n\" +\r\n \"Armor: \" + armorName + \" (\" + armorDef + \" DEF\" + \")\");\r\n }", "private synchronized void sendDecreaceHealth(){\r\n\t\t\tfor(PrintWriter p : players){\r\n\t\t\t\tif(p != null){\r\n\t\t\t\t\tp.println(\"6\");\r\n\t\t\t\t\tp.println(Integer.toString(x));\r\n\t\t\t\t\tp.println(Integer.toString(y));\r\n\t\t\t\t\tp.flush();\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\t\r\n\t\t}", "private String heal(Human human) {\n human.healthLvl += this.healLvl;\n return \"Doctor \" + this.getName() + \" heals \" + human.getName() + \" to \" + human.getHealthLvl() + \" health lvl\";\n }", "@Override\n\tpublic String fight() {\n\t\treturn \"Ready to fight!\";\n\t}", "public void displayHotPlayers(Player fantasy) throws IOException {\n\t\tExportExcel.export(\"Week.xls\", 0, fantasy);\n\t\t\n\t\tMinHeap min = MinHeap.getInstance();\n\t\t\n\t\tHashMap<String, Integer> outputPlayers = new HashMap<String, Integer>();\n\t\t\n\t\tPercentLine[] topStats = min.getOverall(min.OVERALL);\n\t\tSystem.out.println(\"Overall Top Value\");\n\t\tUtil.displayHeap(topStats, min.OVERALL, outputPlayers);\n\t\t\n\t\ttopStats = MinHeap.getInstance().getOverall(min.POINTS);\n\t\tSystem.out.println(\"Overall Top Points\");\n\t\tUtil.displayHeap(topStats, min.POINTS, outputPlayers);\n\t\t\n\t\ttopStats = MinHeap.getInstance().getOverall(min.REBOUNDS);\n\t\tSystem.out.println(\"Overall Top Rebounds\");\n\t\tUtil.displayHeap(topStats, min.REBOUNDS, outputPlayers);\n\t\t\n\t\ttopStats = MinHeap.getInstance().getOverall(min.ASSISTS);\n\t\tSystem.out.println(\"Overall Top Assists\");\n\t\tUtil.displayHeap(topStats, min.ASSISTS, outputPlayers);\n\t\t\n\t\ttopStats = MinHeap.getInstance().getOverall(min.THREES);\n\t\tSystem.out.println(\"Overall Top Threes\");\n\t\tUtil.displayHeap(topStats, min.THREES, outputPlayers);\n\t\t\n\t\ttopStats = MinHeap.getInstance().getOverall(min.STEALS);\n\t\tSystem.out.println(\"Overall Top Steals\");\n\t\tUtil.displayHeap(topStats, min.STEALS, outputPlayers);\n\t\t\n\t\ttopStats = MinHeap.getInstance().getOverall(min.BLOCKS);\n\t\tSystem.out.println(\"Overall Top Blocks\");\n\t\tUtil.displayHeap(topStats, min.BLOCKS, outputPlayers);\n\t\t\n\t\tSystem.out.println(\"Players +3 Categories\");\n\t\tUtil.display(outputPlayers);\n\t\t\n\t\ttopStats = MyTeam.getInstance().getList();\n\t\tSystem.out.println(ExportExcel.TEAM_PERFORMANCE + \"'s Performance over the last week\");\n\t\tUtil.displayHeap(topStats, min.OVERALL, outputPlayers);\n\t}", "public String diceFightInfo(String[] attackerDefender){\n return genericWorldMap.getTerritory(attackerDefender[0]).getInfoString() + \"\\n\" + genericWorldMap.getTerritory(attackerDefender[1]).getInfoString();\n }", "public String showHp()\r\n {\r\n return \" \"+this.hp;\r\n }", "public void printPlayerStatus() {\n System.out.println(getName() + \" owns \" +\n getOwnedCountries().size() + \" countries and \"\n + getArmyCount() + \" armies.\");\n\n String ownedCountries = \"\";\n for (Country c : getOwnedCountries())\n {\n ownedCountries += c.getCountryName().name() + \": \" + c.getArmyOccupied() + \"\\n\";\n }\n System.out.println (ownedCountries);\n }", "public void printAssistants(Player player);", "private static void displayPlayerStats(Object[] stats, String[] helmetSlot, String[] chestSlot, String[] weaponSlot, String[] glovesSlot, String[] bootsSlot){\r\n System.out.println(\"Name: \" + stats[0]);\r\n System.out.println(\"Level: \" + stats[1]);\r\n System.out.println(\"Experience: \" + stats[2]);\r\n System.out.println(\"HP: \" + stats[3] + \"/\" + stats[4]);\r\n System.out.println(\"MP: \" + stats[5] + \"/\" + stats[6]);\r\n System.out.println(\"Attack: \" + stats[7]);\r\n System.out.println(\"Defense: \" + stats[8]);\r\n System.out.println(\"Strength: \" + stats[9]);\r\n System.out.println(\"Intelligence: \" + stats[10]);\r\n System.out.println(\"Vitality: \" + stats[11]);\r\n System.out.println(\"Stat Points Available: \" + stats[12]);\r\n System.out.println(\"Gold: \" + stats[13]);\r\n System.out.println(\"Helmet: [\" + helmetSlot[0] + \"]\" + \"{\" + getItemRarity(helmetSlot) + \"}\");\r\n System.out.println(\"Chest Plate: [\" + chestSlot[0] + \"]\" + \"{\" + getItemRarity(chestSlot) + \"}\");\r\n System.out.println(\"Gloves: [\" + glovesSlot[0] + \"]\" + \"{\" + getItemRarity(glovesSlot) + \"}\");\r\n System.out.println(\"Boots: [\" + bootsSlot[0] + \"]\" + \"{\" + getItemRarity(bootsSlot) + \"}\");\r\n System.out.println(\"Weapon: [\" + weaponSlot[0] + \"]\" + \"{\" + getItemRarity(weaponSlot) + \"}\");\r\n }", "public void printPlayerStat(Player player);", "public void printDetailedPlayer(Player player);", "public void fight() {\n\t\tif(roamingAstronauts <= 0 || roamingAliens <= 0){\n\t\t\tSystem.out.println(\"Error: Need at least 1 astronaut & alien to fight.\");\n\t\t\treturn;\n\t\t}\n\t\tAstronaut a = getRandomAstronaut();\n\t\ta.damage();\n\t\tSystem.out.println(\"The astronaut fought the alien & the alien won.\\nAstronaut takes 1 point of damage.\");\n\t}", "void displayHealth(int health){\n\t\r\n\t\thealth = health + this.health + super.health + a.health;\r\n\t\tSystem.out.println(health);\r\n\t}", "public String diceFight(String[] attackerDefender, int attackerDice, int defenderDice){\n\n Territory attacker = getTerritory(attackerDefender[0]);\n Territory defender = getTerritory(attackerDefender[1]);\n\n\n //Used to make a list of the different players different dice rolls\n LinkedList<Integer> attackerRolls = new LinkedList<>();\n LinkedList<Integer> defenderRolls = new LinkedList<>();\n\n\n //Add dice roll values to the lists. Number of dice rolls specified above\n for (int i = 0; i<attackerDice; i++){ attackerRolls.push((Integer) dice.rollDie());}\n Collections.sort(attackerRolls);//Sorting low to high\n Collections.reverse(attackerRolls);//Reverse to go high to low\n\n for (int i = 0; i<defenderDice; i++){ defenderRolls.push((Integer) dice.rollDie()); }\n Collections.sort(defenderRolls);//Sorting low to high\n Collections.reverse(defenderRolls);//Reverse to go high to low\n\n\n String diceFightResultMessage = \"\";\n\n //Pop out the dice rolls high to low to compare. Higher number wins. Ties means defender wins\n while (!attackerRolls.isEmpty() && !defenderRolls.isEmpty()){\n diceFightResultMessage += \"Attacker rolls a \" + attackerRolls.peek() +\"\\n\";\n diceFightResultMessage += \"Defender rolls a \" + defenderRolls.peek() +\"\\n\";\n if (attackerRolls.pop() <= defenderRolls.pop()){\n //Defender wins\n diceFightResultMessage += \"Defender wins! Attacker loses a troop! RIP\" +\"\\n\";\n attacker.changeTroops(-1);\n } else {\n //Attacker wins\n diceFightResultMessage += \"Attacker wins! Defender loses a troop! RIP\" +\"\\n\";\n defender.changeTroops(-1);\n }\n }\n\n\n diceFightResultMessage += \"\\n\\n\" + \"Attacker has \" + attacker.getTroops() + \" troops remaining\";\n diceFightResultMessage += \"\\n\" + \"Defender has \" + defender.getTroops() + \" troops remaining\";\n\n //If the attacker takes over the territory, the number of troops moved in has to be greater or equal to\n //the number of dice rolled on the most recent diceFight\n return diceFightResultMessage;\n }", "public String toString()\r\n {\r\n return \"Die one is \" + die1FaceValue +\r\n \" and die two is \" + die2FaceValue +\r\n \" and dice total is \" + diceTotal + \".\" ;\r\n }", "public void print()\n\t{\n\t\tif(gameObj[1].size() > 0)\n\t\t{\n\t\t\tSystem.out.println(\"*********************Player Info*******************************\");\n\t\t\tSystem.out.println(\"[Lives: \" + lives + \"][Score: \" + score + \n\t\t\t\t\t\t\t\"][Time: \" + gameTime + \"]\");\n\t\t\tSystem.out.println(\"*********************Player Info*******************************\");\n\t\t}else\n\t\t\tSystem.out.println(\"Spawn a player ship to view game info\");\n\t}", "public Player fight() {\n if (player1.getCurrentFighter()==null && player2.getCurrentFighter()==null)\n throw new IllegalArgumentException(\"Both of the players have no fighters !\");\n\n if (player2.getCurrentFighter()==null || player2.getCurrentFighter().getOriginalHealth()<=0)\n return player1;\n else if (player1.getCurrentFighter()==null || player1.getCurrentFighter().getOriginalHealth()<=0)\n return player2;\n\n\n while (player1.getCurrentFighter().isAlive() && player2.getCurrentFighter().isAlive()) {\n boolean turn = random.nextBoolean();\n\n if (turn) { // Fighter1 attack first\n player2.getCurrentFighter().takeDamage(player1.getCurrentFighter().getAttack());\n\n if (player2.getCurrentFighter().isAlive())\n player1.getCurrentFighter().takeDamage(player2.getCurrentFighter().getAttack());\n }\n else { // Fighter2 attack first\n player1.getCurrentFighter().takeDamage(player2.getCurrentFighter().getAttack());\n\n if (player1.getCurrentFighter().isAlive())\n player2.getCurrentFighter().takeDamage(player1.getCurrentFighter().getAttack());\n }\n }\n\n if (!player1.getCurrentFighter().isAlive())\n return player2;\n else\n return player1;\n\n }", "public void speak()\n\t {\n\t \tSystem.out.printf(\"%s chants: Four legs good, Two legs BETTER\\n\", this.getName());\n\t }", "public void display() {\n String box = \"\\n+--------------------------------------------+\\n\";\n String header = \"| \" + name;\n String lvlStat = \"Lv\" + level;\n for (int i=0; i<42-name.length()-lvlStat.length(); i++) {\n header += \" \";\n }\n header += lvlStat + \" |\\n\";\n System.out.println(box + header + \"| \" + getHealthBar() + \" |\" + box);\n }", "public static void battleStatus(){\n Program.terminal.println(\"________________TURN \"+ turn +\"________________\");\n Program.terminal.println(\"\");\n Program.terminal.println(\" +-------------------- \");\n Program.terminal.println(\" |Name:\"+ currentMonster.name);\n Program.terminal.println(\" |HP: \" + currentMonster.currentHp+\"/\"+currentMonster.hp);\n Program.terminal.println(\" |\" + barGauge(1));\n Program.terminal.println(\" +-------------------- \");\n Program.terminal.println(\"\");\n Program.terminal.println(\"My HP:\" + MainCharacter.hpNow +\"/\"+ MainCharacter.hpMax + \" \" + barGauge(2));\n Program.terminal.println(\"My MP:\" + MainCharacter.mpNow +\"/\"+ MainCharacter.mpMax + \" \" + barGauge(3));\n Program.terminal.println(\"\");\n askAction();\n }", "public void print() {\n System.out.println(\"fish: \"+name+\", species= \"+species+\", color= \"+color+\", #fins= \"+fins);\n }", "public String toString()\r\n {\r\n return \"Die 1: \" + getFaceValue1() + \" Die 2: \" + getFaceValue2();\r\n }", "public String toString() {\n return name + \" with \" + kills + \" kills died \" + daysSinceDeath\n + \" days ago.\";\n }", "public void printAllPlayerHands(){\n\t\tfor(int i = 0 ; i < this.players.length; i++){\n\t\t\tplayers[i].printPlayerHand();\t\t \n\t\t}\t\n\t}", "public void hp(Graphics g) {\n\t\tw = g.getFontMetrics().stringWidth(\"HP: \" + player.hp); //Get the width of the rendered text\n\t\tg.setColor(Color.white); //Set the colour for the text\n\t\tg.setFont(f); //Set the font for the text\n\t\tg.drawString(\"HP: \" + player.hp, WIDTH-w-25, 25); //Draw \"HP: #\" in the top right corner of the screen\n\t}", "public String showGoalDetail() {\n return \"Kill Doggie: \" + doggie;\n }", "@Override\n public String toString() {\n return super.toString() + \"Subtype- X-wing fighter\\n\";\n }", "public void printGraveyard() {\n AssassinNode current = gYardFront;\n while (current != null) {\n System.out.println(\" \" + current.name + \" was killed by \" + current.killer);\n current = current.next;\n }\n }", "static void goblin_fights() {\n enter = next.nextLine();\n System.out.println( username + \" defeat this goblin to advance into the next level \");\n System.out.println(\"Remember, don't fool around - or else you will regret it later.\");\n enter = next.nextLine();\n System.out.println(\"'We can do this master \" + username + \". Just hang on a little longer!\");\n playerhealth = 310; // player leveled up to level 5 with 500 HP\n goblinshealth = 170; //this is the goblin's health.\n monsterisalive = true;\n while(monsterisalive){//#while-while loop that will allow the player fight the goblin\n if(monsterisalive){\n System.out.println(\" The goblin's HP is \" + goblinshealth + \".\");\n enter = next.nextLine();\n System.out.println(\"You have recently leveled up and now can use up to six different types of attacks:\");\n enter = next.nextLine();\n System.out.println(username + \", you can cast fire, ice, lightning spells, throw rocks at the enemy,\");\n System.out.println(\"throw in multiple wind storms, run, or heal up to 80 health points\");\n attack = next.nextLine(); //attack response\n if(attack.contains(\"fire\")){\n System.out.println(\"Alright, I'm fired up...FOOSH!!!\");\n goblinshealth = goblinshealth-30;\n System.out.println(\"The goblin lost 30 HP. The goblin now has \" + goblinshealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"You have \" + playerhealth + \" HP.\");\n }else if (attack.contains(\"ice\")) {\n System.out.println(\"Alright, it's gonna be a little chilly...GHAAAA!!!\");\n goblinshealth = goblinshealth-20;\n System.out.println(\"The goblin lost 20 HP. The goblin currently has \" + goblinshealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"You have \" + playerhealth + \" HP.\");\n }else if (attack.contains(\"lightning\")) {\n System.out.println(\"Someone's getting fried today...BAAAAAMMMM!!!\");\n goblinshealth = goblinshealth-40;\n System.out.println(\"OUCH!!! The goblin lost 40 HP. It now has \" + goblinshealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"You have \" + playerhealth + \" HP.\");\n }else if (attack.contains(\"throw rocks\")) {\n System.out.println(\"Incoming Boulder...BOOOOOMM!!!\");\n goblinshealth = goblinshealth-30;\n System.out.println(\"The goblin lost 30 HP. It now has \" + goblinshealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"You now have \" + playerhealth + \" HP.\"); \n }else if (attack.contains(\"wind\")) {\n System.out.println(\"Alright...let's finish this up...WHIRL!!!\");\n goblinshealth = goblinshealth-10;\n System.out.println(\"The goblin lost 10 HP. It now has \" + goblinshealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"You now have \" + playerhealth + \" HP.\");\n }else if (attack.contains(\"run\")) {\n System.out.println(\"Coward...there's no running. You lost a turn and don't have enough time to check your health.\");\n }else if (attack.contains(\"heal\")) { //player heals\n healing_challenge2();\n System.out.println(\"\\n\");\n System.out.println(\"The goblin still has \" + goblinshealth + \" HP.\");\n System.out.println(username + \"'s HP increased to \" + playerhealth + \" HP.\");\n enter = next.nextLine();\n }\n }//check to see if adding an if(monsterisalive) will prevent\n if(goblinshealth <= zero) {\n System.out.println(\"You defeated the goblin!\");//#hero defeats the enemy, which affects the enemies health\n System.out.println(\"You win!\"); //and is able to gain a potion left behind as a reward\n enter = next.nextLine();\n System.out.println(\"\\n\");\n System.out.println(username + \" found a rag left behind by the goblin...\");\n System.out.println(\"Shall we check it: yes or no?\");\n answer = responses.nextLine();\n if(answer.contains(\"y\")) {\n System.out.println(username + \" lifts up the rag to see that there is a potion.\");\n potions = potions+1;\n System.out.println(username + \" puts the potion inside the bag which already contains \" + potions + \" potions.\");\n //player gets a potion if they won\n enter = next.nextLine();\n }else{\n System.out.println(username + \" kicks the rag to the side and continues on.\");\n System.out.println(\"\\n\");\n }\n monsterisalive = false;\n }else if (goblinshealth > zero) {\n enter = next.nextLine();\n System.out.println(\"Now it is the goblin's turn... Brace Yourself\");\n enter = next.nextLine();\n System.out.println(\"The goblin throws multiple knives that pierced your skin...\");\n playerhealth = playerhealth-60;\n System.out.println(\"OUCH! \" + username + \" lost 60 HP...You now have \" + playerhealth + \".\");\n enter = next.nextLine();\n }\n if(playerhealth <= zero) {\n System.out.println(\"OH NO!!! You lost all your HP.\");\n monsterisalive = false;\n play_yellowportal();\n }\n }\n }", "public void fight(Knight otherKnight){\n System.out.println(\"Starting the great fight: \" + this.name + \" VS \" + otherKnight.name);\n if (this.sumEquipmentWeight() + this.weight < otherKnight.sumEquipmentWeight() + otherKnight.weight)\n System.out.println(\"Winner is \" + otherKnight.name);\n else if (this.sumEquipmentWeight() + this.weight > otherKnight.sumEquipmentWeight() + otherKnight.weight)\n System.out.println(\"Winner is \" + this.name);\n else if (this.sumEquipmentPrice() < otherKnight.sumEquipmentPrice())\n System.out.println(\"Winner is \" + otherKnight.name);\n else if (this.sumEquipmentPrice() > otherKnight.sumEquipmentPrice())\n System.out.println(\"Winner is \" + this.name);\n else System.out.println(\"We have no winner.\");\n }", "static void golbat_fights() {\n enter = next.nextLine();\n System.out.println( username + \" defeat this Golbat to advance into the next level \");\n System.out.println(\"Don't let the Golbat fly near you... It's part vampire. You wouldn't want that to be near you.\");\n enter = next.nextLine();\n System.out.println(\"'We can do this master \" + username + \". Just hang on!\");\n playerhealth = 310; // player leveled up to level 5 with 500 HP\n golbathealth = 190; //this is the Golbat's health.\n monsterisalive = true;\n while(monsterisalive){//#while-while loop that will allow the player fight the golbat\n if(monsterisalive){\n System.out.println(\" The Golbat's HP is \" + golbathealth + \".\");\n enter = next.nextLine();\n System.out.println(\"You have recently leveled up and now can use up to six different types of attacks:\");\n enter = next.nextLine();\n System.out.println(username + \", you can cast fire, ice, lightning spells, throw rocks at the enemy,\");\n System.out.println(\"throw in multiple wind storms, heal, or run\");\n attack = next.nextLine(); //attack response\n if(attack.contains(\"fire\")){\n System.out.println(\"Alright, I'm fired up...FOOSH!!!\");\n golbathealth = golbathealth-30;\n System.out.println(\"The Golbat lost 30 HP. The Golbat now has \" + golbathealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"You have \" + playerhealth + \" HP.\");\n }else if (attack.contains(\"ice\")) {\n System.out.println(\"Alright, it's gonna be a little chilly...GHAAAA!!!\");\n golbathealth = golbathealth-20;\n System.out.println(\"The Golbat lost 20 HP. The Golbat currently has \" + golbathealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"You have \" + playerhealth + \" HP.\");\n }else if (attack.contains(\"lightning\")) {\n System.out.println(\"Someone's getting fried today...BAAAAAMMMM!!!\");\n golbathealth = golbathealth-40;\n System.out.println(\"OUCH!!! The Golbat lost 40 HP. It now has \" + golbathealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"You have \" + playerhealth + \" HP.\");\n }else if (attack.contains(\"throw rocks\")) {\n System.out.println(\"Incoming Boulder...BOOOOOMM!!!\");\n golbathealth = golbathealth-30;\n System.out.println(\"The Golbat lost 30 HP. It now has \" + golbathealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"You now have \" + playerhealth + \" HP.\"); \n }else if (attack.contains(\"wind\")) {\n System.out.println(\"Alright...let's finish this up...WHIRL!!!\");\n golbathealth = golbathealth-10;\n System.out.println(\"The Golbat lost 10 HP. It now has \" + golbathealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"You now have \" + playerhealth + \" HP.\");\n }else if (attack.contains(\"run\")) {\n System.out.println(\"Coward...there's no running. You lost a turn and don't have enough time to check your health.\");\n }else if (attack.contains(\"heal\")) { //player will be given an opportunity to heal\n healing_challenge2();\n System.out.println(\"\\n\");\n System.out.println(\"The golbat still has \" + golbathealth + \" HP.\");\n System.out.println(username + \"'s HP increased to \" + playerhealth + \" HP.\");\n enter = next.nextLine();\n }\n }//check to see if adding an if(monsterisalive) will prevent\n if(golbathealth <= zero) {\n System.out.println(\"You defeated the golbat.\");\n System.out.println(\"You win!\");\n System.out.println(\"The Golbat left a drooping that seems to glimmer...\");\n System.out.println(\"Do you want to check it out: yes or no?\");\n if(answer.contains(\"y\")) {\n System.out.println(username + \" clears the droopings and finds a small bottle of potion.\");\n potions = potions+1;\n System.out.println(username + \" puts the healing potion into the bag, which now contains \" + potions + \" potions.\");\n System.out.println(\"\\n\");\n }else{\n System.out.println(username + \" casts a fire spell and burned the droopings...\");\n System.out.println(\"\\n\");\n }\n monsterisalive = false;\n }else if (golbathealth > zero) {\n enter = next.nextLine();\n System.out.println(\"Now it is the Golbat's turn... Brace Yourself\");\n enter = next.nextLine();\n System.out.println(\"The Golbat swooped down and cutted \" + username + \" with its wings and bit \");\n System.out.println(username + \"'s neck... \"); \n playerhealth = playerhealth-40;\n System.out.println(\"OUCH! \" + username + \" lost 40 HP...You now have \" + playerhealth + \".\");\n enter = next.nextLine();\n }\n if(playerhealth <= zero) {\n System.out.println(\"OH NO!!! You lost all your HP.\");\n monsterisalive = false;\n play_yellowportal();\n }\n }\n }", "public static void printAliens(String[] aliens, int[] hungers,int [] happy) {\t\t\t\n\t\tfor(int i = 0; i < aliens.length ; i++){\n\t\t\tSystem.out.println(aliens[i] +\" hunger level is \" + hungers[i] + \" and happy level is \" + happy[i]);\n\t\t}\n\t}", "String getHealthString() {\n return Integer.toString(health);\n }", "private void showFacts() {\n\t\tSystem.out.println(\"=============================\");\n\t\tSystem.out.println(\"Your lose! Try harder and better luck next time.\");\n\t}", "public String attack() {\r\n\t\t\tthis.getCurrentEnemy().setHealth(this.getCurrentEnemy().getHealth()-this.getPlayer().getWeapon().getAttack());\r\n\t\t\tif(this.getCurrentEnemy().isDefeated()) {\r\n\t\t\t\tthis.setInBattle(false);\r\n\t\t\t\t\r\n\t\t\t\tthis.handleQuestrelatedEnemy(this.getCurrentEnemy());\r\n\t\t\t\t\r\n\t\t\t\tif(this.getCurrentEnemy().getLoot() != null) {\r\n\t\t\t\t\tthis.getPlayer().getCurrentLocation().addItem(this.getCurrentEnemy().getLoot());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.getPlayer().gainXp(this.getCurrentEnemy().getXpYield());\r\n\t\t\t\tthis.getPlayer().getCurrentLocation().removeNpc(this.getCurrentEnemy().getName());\r\n\t\t\t\tif(this.getCurrentEnemy().getClass().getName().equals(\"game.EnemyGuardian\")) {\r\n\t\t\t\t\t// adds paths between current location and location in the guardian, path names are specified in the guardian construction\r\n\t\t\t\t\tthis.getPlayer().getCurrentLocation().addPaths(this.getPlayer().getCurrentLocation(), ((EnemyGuardian)this.getCurrentEnemy()).getPathTo(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t((EnemyGuardian)this.getCurrentEnemy()).getGuardedLocation(), ((EnemyGuardian)this.getCurrentEnemy()).getPathFrom());\r\n\t\t\t\t\treturn \"You defeated \" + this.getCurrentEnemy().getName() + \". \\n\"\r\n\t\t\t\t\t\t\t+ ((EnemyGuardian)this.getCurrentEnemy()).getRevelationMessage() + \"\\n\";\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn \"You defeated \" + this.getCurrentEnemy().getName() + \".\";\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis.triggerEnemyAttack();\r\n\t\t\t\t\tif(this.getPlayer().getHealth() <= 0) {\r\n\r\n\t\t\t\t\t\tthis.gameOver();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn \"You attacked \" + this.getCurrentEnemy().getName() + \" for \" + this.getPlayer().getWeapon().getAttack() + \" damage. \\n You DIED.\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\treturn \"You attacked \" + this.getCurrentEnemy().getName() + \" for \" + this.getPlayer().getWeapon().getAttack() + \" damage. \\n\"\r\n\t\t\t\t\t\t\t\t+ this.getCurrentEnemy().getName() + \" attacked you for \" + this.getCurrentEnemy().getAttack() + \" damage.\\n\"\r\n\t\t\t\t\t\t\t\t\t\t+ this.getCurrentEnemy().printHealth();\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "static void boss_fight() {\n miss_choice = miss.nextInt(2);//random used to determie a miss or a hit\n playerhealth = 3500;\n nagahealth = 3500;\n bosshealth = 10000;//#enemyobject-the actual boss that has created the game play(antagonsit)\n System.out.println(\"You have recently leveled up and have increased your HP to 3500. Be careful...\");\n System.out.println(\"You can now cast 8 different types of spells...\");\n enter = next.nextLine();\n System.out.println(\"These spells include fire, ice, wind, lightening, throw rocks, sacred sword, \");\n System.out.println(\"cosmic rays, and teleport\");\n enter = next.nextLine();\n System.out.println(\"Naga has his own spells don't worry about him...\");\n enter = next.nextLine();\n System.out.println(\"'I can use 3 different types of dark magic and 2 different types of normal attacks'\");\n System.out.println(\"Don't worry, we got this \"+ username + \".\");\n enter = next.nextLine();\n System.out.println(\"ALL OR NOTHING!!! GHAAAA!!!\");\n enter = next.nextLine();\n monsterisalive = true;\n //#while \n /* while loop that will let players fight the boss */\n while(monsterisalive){\n System.out.println(\"It is your turn...which move will you use:\");\n System.out.println(\"fire, ice, wind, lightening, throw rocks, sacred sword, cosmic rays, teleport, or heal.\");\n attack = next.nextLine();\n if(attack.contains(\"fire\")) {\n System.out.println(\"Alright, I'm fired up...FOOOSH!!!\");\n bosshealth = bosshealth-30; //player deals damage\n System.out.println(\"WHOA! The witch lost 30 HP. The boss now has \" + bosshealth + \" HP.\" );\n enter = next.nextLine();\n System.out.println(\"You now have \" + playerhealth + \" HP.\");\n }else if(answer.contains(\"ice\")) {\n System.out.println(\"Alright, it's gonna be a little chilly...GHAAAA!!!\");\n bosshealth = bosshealth-20;\n System.out.println(\"BRRR... The evil witch lost 20 HP. The boss now has \" + bosshealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"You now have \" + playerhealth + \" HP.\");\n }else if(answer.contains(\"lightening\")) {\n System.out.println(\"Someone's gonna get fried today! ZAAAAP!!!\");\n bosshealth = bosshealth-40;\n System.out.println(\"OUCH!!! The evil witch lost 40 HP. The boss now has \" + bosshealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"You now have \" + playerhealth + \" HP\");\n }else if (answer.contains(\"throw rocks\")) {\n System.out.println(\"Incoming Boulder...BOOOOOMM!!!\");\n bosshealth = bosshealth-30;\n System.out.println(\"The witch lost 30 HP. It now has \" + bosshealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"You now have \" + playerhealth + \" HP.\");\n }else if (answer.contains(\"sacred swords\")) {\n System.out.println(username + \" summons the guardians of the 9 sacred swords, and \");\n System.out.println(\"the guardians released their swords to punish the wicked witch...\");\n enter = next.nextLine();\n System.out.println(\"The 9 swords punctures the wicked releasing powerful, positive energy.\");\n bosshealth = bosshealth-150;\n System.out.println(\"ZHHHHNGG!!! BOOOM!!! Ouch...the boss lost 150 HP. The boss now has \" + bosshealth);\n System.out.println(\"HP.\");\n enter = next.nextLine();\n System.out.println(\"You now have \" + playerhealth + \" HP.\");\n }else if (answer.contains(\"cosmic rays\")) {\n System.out.println(username + \" casts a spell that absorbs all of the radiation from space...\");\n System.out.println(\"Then a large light bombards the witch and inflicts 130 HP.\");\n bosshealth = bosshealth-130;\n enter = next.nextLine();\n System.out.println(\"The boss now has \" + bosshealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(username + \" now has \" + playerhealth + \" HP.\");\n }else if (answer.contains(\"teleport\")) {\n System.out.println(username + \" creates a blue portal and jumps inside the portal...\");\n enter = next.nextLine();\n System.out.println(username + \" then teleports behind the witch and strikes...Then jumps back in...\");\n enter = next.nextLine();\n System.out.println(\"Then appears in the rear side and strikes the boss again and quickly disappears...\");\n enter = next.nextLine();\n System.out.println(\"Finally...\" + username + \" strikes again on top of the witch.\");\n enter = next.nextLine();\n bosshealth = bosshealth-210;\n System.out.println(\"WOW!!!\" + username + \" inflicted 210 HP. The boss now has \" + bosshealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"You now have \" + playerhealth + \" HP.\");\n }else if(answer.contains(\"wind\")) {\n System.out.println(\"Alright, let's finish this up...WHIRL!!!\");\n bosshealth = bosshealth-10;\n System.out.println(\"The evil witch lost 10 HP. The boss now has \" + bosshealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"You now have \" + playerhealth + \" HP.\");\n }else if (answer.contains(\"heal\")){\n healing_challenge3();\n System.out.println(\"\\n\");\n System.out.println(username + \"'s HP increased 300 health points and now have \" + playerhealth + \".\");\n System.out.println(\"The boss still has \" + bosshealth + \" HP.\");\n enter = next.nextLine();\n }else{\n System.out.println(\"Please make sure you type everything correctly next time. You lost a turn...\");\n }\n \n if(bosshealth <= zero) { //check to see if boss is still alive\n System.out.println(\"You defeated the boss...Congratulations, you have won the war.\");\n enter = next.nextLine();\n System.out.println(\"The witch has disappeared, vanished forever in a black hole that consumed the boss.\");\n enter = next.nextLine();\n System.out.println(\"That is the last time you'll ever see that hideous thing ever again.\");\n monsterisalive = false;\n endgame();\n // It's Naga's turn\n }else if (bosshealth > zero) {\n System.out.println(\"It's Naga's turn...You can do this Naga!\");\n naga_attacks = naga.nextInt(6);\n if(naga_attacks == 0){\n System.out.println(\"Naga used shadow force...\");\n System.out.println(\"Naga disappears in a pitch black vortex...\");\n enter = next.nextLine();\n System.out.println(\"GHAAAAR!!!\");\n enter = next.nextLine();\n System.out.println(\"Naga flies out of his vortex and rams into the witch. YOUCH!\");\n System.out.println(\"The boss lost 180 HP.\");\n bosshealth = bosshealth-180;//Naga deals damage\n enter = next.nextLine();\n System.out.println(\"The evil witch now has \" + bosshealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"Naga now has \" + nagahealth + \" HP.\");\n }else if (naga_attacks == 1) {\n System.out.println(\"Naga used firebreath...A large dark ember sparks from naga's mouth and \");\n System.out.println(\"begins to build up. The large black fire surrounds the witch and burns the witch\");\n enter = next.nextLine();\n System.out.println(\"'ARGHH! You will pay for that', the witch screamed.\");\n enter = next.nextLine();\n bosshealth = bosshealth-200;\n System.out.println(\"WHOA!!! The fiery breath inflicted 200 HP. The boss now has\" + bosshealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"Naga now has \" + nagahealth + \" HP.\");\n }else if (naga_attacks == 2) {\n System.out.println(\"Naga used his blades of terror to torture the witch...\");\n System.out.println(\"Naga creates a strong whirlwind with his wings and released thousands of sharp\");\n System.out.println(\"scales that severely wounded the witch. SHINGG!!!\");\n enter = next.nextLine();\n bosshealth = bosshealth-150;\n System.out.println(\"OWWW!!! The boss lost 150 HP and now has \" + bosshealth + \"HP.\");\n enter = next.nextLine();\n System.out.println(\"Naga now has \" + nagahealth + \" HP.\"); \n }else if (naga_attacks == 3) {\n System.out.println(\"Naga used wings of Justice. \");\n enter = next.nextLine();\n System.out.println(\"Naga flies up high and plunges down toward the witch...\");\n System.out.println(\"Naga uppercuts the witch with his large wings and knocks the witch off her feet.\");\n enter = next.nextLine();\n bosshealth = bosshealth-210;\n System.out.println(\"YIKES!!! Naga inflicted 210 HP. The boss has \" + bosshealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"Naga now has \" + nagahealth + \" HP.\");\n }else if (naga_attacks == 4) {\n System.out.println(\"Naga used tail whip...\");\n System.out.println(\"SWWWSSS!!! BRMMM!!!\");\n System.out.println(\"Naga sets himself apart and lunges forward with his tail and thrusts the witch\");\n System.out.println(\"off the arena...\");\n enter = next.nextLine();\n System.out.println(\"The witch teleports herself back into the arena, but loses 60 HP because of this.\");\n bosshealth = bosshealth-60;\n System.out.println(\"The boss now has \" + bosshealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"Now Naga has \" + nagahealth + \" HP.\");\n }else if (naga_attacks == 5) {\n healing_naga_challenge3();\n System.out.println(\"Naga now has \" + nagahealth + \" HP.\");\n System.out.println(\"\\n\");\n System.out.println(\"The boss still has \" + bosshealth + \" HP.\");\n }\n }\n \n if(bosshealth <= zero) { //check to see if boss is still alive\n //#win\n /* This is the conditions to win. The boss's health must equal to or less than zero. If you win the \n boolean monsterisalive is equal to false and the player will come to the endgame method to \n displayt he credits...\n */\n System.out.println(\"You defeated the boss...Congratulations, you have won the war.\");\n enter = next.nextLine();\n System.out.println(\"The witch has disappeared, vanished forever in a black hole that consumed the boss.\");\n enter = next.nextLine();\n System.out.println(\"That is the last time you'll ever see that hideous thing ever again.\");\n monsterisalive = false;\n endgame();\n //it's the boss's turn\n }else if (bosshealth > zero) { //if it is still greater than zero...\n System.out.println(\"It's the monster's turn...brace yourselves\");\n System.out.println(\"'The witch has 8 different spells that she can use...she's very strong...\");\n System.out.println(\"BE CAREFUL,' stated Naga.\");\n enter = next.nextLine();\n System.out.println(\"Are you ready to feel what pain really is? Prepare yourself...\");\n System.out.println(\"ARGGHHH!!! BRRRM!!!\");\n enter = next.nextLine();\n System.out.println(\"Naga and \"+ username + \" are on their guard ready to defend against the witches attacks\");\n enter = next.nextLine();\n System.out.println(\"Here I go...\");\n enter = next.nextLine();\n which = pick.nextInt(2);//decide which one will get hit: player or Naga\n boss_attacks = boss.nextInt(9);//decides which\n if (boss_attacks == 0) {\n System.out.println(\"'Night Shadow!'\");\n //this will determine which player gets hit; you or Naga\n if(which == 0) { //player gets hit\n enter = next.nextLine();\n System.out.println(\"The witch summons a dark cloud from above with her staff...\");\n enter = next.nextLine();\n /* #enemyobject\n The witch affects the protagonist/player by harming the player's health through savage attacks that \n inflicts large amounts of damage to the player. \n */\n System.out.println(\"The dark cloud duplicates and strikes \" + username + \".\");\n enter = next.nextLine();\n System.out.println(\"Ouch \" + username + \" loses 200 HP.\");\n playerhealth = playerhealth-200;\n System.out.println(username + \" now has \" + playerhealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"The boss has \" + bosshealth + \" HP.\");\n }else if (which == 1) { //naga gets hit\n enter = next.nextLine();\n System.out.println(\"The witch summons a dark cloud from above with her staff...\");\n enter = next.nextLine();\n System.out.println(\"The dark cloud duplicates and strikes Naga. Naga collapses\");\n enter = next.nextLine();\n System.out.println(\"Ouch Naga loses 200 HP.\");\n nagahealth = nagahealth-200;\n System.out.println(\"Naga now has \" + nagahealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"The boss has \" + bosshealth + \" HP.\");\n }\n }else if (boss_attacks == 1) {\n System.out.println(\"'Shadow Blade!'\");\n //this will determine who will get hit\n if (which == 0) { // player gets hit\n System.out.println(\"The witch's staff transforms into a deadly blade.\");\n System.out.println(\"The blade has \" + username + \"'s face on the back...\");\n enter = next.nextLine();\n System.out.println(\"Watch out \" + username + \". She's on to you...\");\n enter = next.nextLine();\n System.out.println(\"The witch charges up and strikes \" + username + \".\");\n System.out.println(\"SLASH...SHING!!!\");\n enter = next.nextLine();\n System.out.println(\"OUCH!!! \" + username + \" loses 150 HP.\");\n playerhealth = playerhealth-150;\n System.out.println(username + \" now has \" + playerhealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"The boss has \" + bosshealth + \" HP.\");\n }else if (which == 1) { //naga gets hit\n System.out.println(\"The witch's staff transforms into a deadly blade.\");\n System.out.println(\"The blade has a black dragon symbol on the edge...\");\n enter = next.nextLine();\n System.out.println(\"'Naga she's on to you. WATCH OUT!' \" + username + \" screams.\");\n System.out.println(\"SLASH...SHING!!!\");\n enter = next.nextLine();\n System.out.println(\"OUCH!!! naga loses 150 HP.\");\n nagahealth = nagahealth-150;\n System.out.println(\"Naga now has \" + nagahealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"The boss now has \" + bosshealth + \" HP.\");\n }\n }else if (boss_attacks == 2) {\n System.out.println(\"Dragon spiral!\");\n if(which == 0) { //player gets hit\n System.out.println(\"The witch summons a red and purple dragon underground...\");\n System.out.println(\"The red and purple dragon shoots out red and purple flames that fuse\");\n System.out.println(\"together to form a gigantic half red and purple flame.\");\n enter = next.nextLine();\n System.out.println(\"Look out \" + username + \".\");\n System.out.println(\"FOOOSH!!! The burning lava like embers engulf \" + username + \".\");\n enter = next.nextLine();\n System.out.println(\"ARRHHH!!! \" + username + \" loses 300 HP.\");\n playerhealth = playerhealth-300;\n System.out.println(username + \" now has \" + playerhealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"The boss has \" + bosshealth + \" HP.\");\n }else if (which == 1) { //naga gets hit\n System.out.println(\"The witch summons a red and purple dragon underground...\");\n System.out.println(\"The red and purple dragon shoots out red and purple flames that fuse\");\n System.out.println(\"together to form a gigantic half red and purple flame.\");\n enter = next.nextLine();\n System.out.println(\"'Look out Naga,' \" + username + \" stated.\");\n System.out.println(\"FOOOSH!!! The burning lava like embers engulf Naga.\");\n enter = next.nextLine();\n System.out.println(\"ARRHHH!!! Naga loses 300 HP.\");\n nagahealth = nagahealth-300;\n System.out.println(\"Naga now has \" + nagahealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"The boss has \" + bosshealth + \" HP.\");\n }\n }else if (boss_attacks == 3) {\n System.out.println(\"Take over\");\n enter = next.nextLine();\n System.out.println(\"The witch summons the demons and releases them from a black portal she created\");\n System.out.println(\"Gouls, bats, and other hideous creatures emerged from the darkness\");\n if(which == 0) {// player gets hit\n System.out.println(\"The creatures targets \" + username + \".\");\n enter = next.nextLine();\n System.out.println(\"Watch out \" + username + \".\");\n System.out.println(\"GARRRL!!! SCRAA!!! FOOSHING!!!\");\n enter = next.nextLine();\n System.out.println(\"AHHH!!! \" + username + \" gets bitten, beaten, and scratched ...\");\n playerhealth = playerhealth-50;\n System.out.println(username + \" loses 50 HP. You now have \" + playerhealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"The boss has \" + bosshealth + \" HP.\");\n }else if (which == 1) {\n System.out.println(\"The creatures targets Naga.\");\n enter = next.nextLine();\n System.out.println(\"'Watch out Naga,' \" + username + \" stated.\");\n System.out.println(\"GARRRRL!!! SCRAAA!!! FOOOSHHING!!!\");\n enter = next.nextLine();\n nagahealth = nagahealth-50;\n System.out.println(\"ARRGGG!!! Naga loses 50 HP. Naga now has \" + nagahealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"The boss now has \" + bosshealth + \" HP.\");\n }\n }else if (boss_attacks == 4) {\n System.out.println(\"dark cosmic swords!!!\");\n System.out.println(\"GHAAA!!!\");\n enter = next.nextLine();\n System.out.println(\"There are 5 darks lands in her reign, which means 5 different swords in her possession.\");\n System.out.println(\"Sword 1 released fire...\");\n System.out.println(\"FOOSHHH!!!\");\n enter = next.nextLine();\n System.out.println(\"Sword 2 released water...\");\n System.out.println(\"GURLG!!! FSHHH!!!\");\n enter = next.nextLine();\n System.out.println(\"Sword 3 released ice...\");\n System.out.println(\"SHING!!! BRRRRR!!!\");\n enter = next.nextLine();\n System.out.println(\"Sword 4 released wind...\");\n System.out.println(\"WHIRL!!! WHIRL!!! GUSHHH!!!\");\n enter = next.nextLine();\n System.out.println(\"Sword 5 released lightening...\");\n System.out.println(\"ZHNGGG!!! BAM!!!! BRVRMM!!!\");\n System.out.println(\"The ground ruptures and collides on \" + username + \" and Naga.\");\n enter = next.nextLine();\n System.out.println(\"These swords have just released the dark elements of the earth!\");\n System.out.println(\"YOUCH!!! Both Naga and \" + username + \" lost 220 HP.\");\n enter = next.nextLine();\n playerhealth = playerhealth-220;\n nagahealth = nagahealth-220;\n System.out.println(username + \" now has \" + playerhealth + \" HP and Naga has \" + nagahealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"The boss now has \" + bosshealth + \" HP.\");\n }else if (boss_attacks == 5) {\n System.out.println(\"Knock down!\");\n if(miss_choice == 0) {//boss miss\n System.out.println(\"The witch summons a dark spell from her staff.\");\n enter = next.nextLine();\n System.out.println(\"An evil figure lurks in the shadows...'Can you see it Naga?' \");\n System.out.println(username + \" said.\");\n enter = next.nextLine();\n System.out.println(\"'No...I can't see a thing.\");\n enter = next.nextLine();\n System.out.println(\"Suddenly, you see a big shadow coming at Naga.\");\n enter = next.nextLine();\n System.out.println(username + \" sends a fireball flying at the shadowy figure and it disappears.\");\n System.out.println(\"Naga then sees the figure coming towards \" + username + \" and sends a flame\");\n System.out.println(\"at the shadow...The figure plunges back into the witches staff. \");\n enter = next.nextLine();\n System.out.println(\"'I guess you saw that coming, won't happen ever again!' the witch exclaimed.\");\n enter = next.nextLine();\n System.out.println(\"You dodged the witches attack!\");\n enter = next.nextLine();\n playerhealth = playerhealth-0;\n nagahealth = nagahealth-0;\n System.out.println(username + \" still has \" + playerhealth + \" HP.\");\n System.out.println(\"Naga still has \" + nagahealth + \" HP.\");\n System.out.println(\"The boss has \" + bosshealth + \" HP.\");\n }else if (miss_choice == 1) { //boss hits\n System.out.println(\"The witch summons a dark spell from her staff.\");\n enter = next.nextLine();\n System.out.println(\"An evil figure lurks in the shadows...'Can you see it Naga?' \");\n System.out.println(username + \" said.\");\n enter = next.nextLine();\n System.out.println(\"'No...I can't see a thing.\");\n enter = next.nextLine();\n System.out.println(\"Suddenly, you see a big shadow coming at Naga.\");\n enter = next.nextLine();\n System.out.println(username + \" sends a fireball flying at the shadowy figure, but you missed!\");\n System.out.println(\"The shadowy figure steals 50 HP of Naga's health.\");\n nagahealth = nagahealth-50;\n System.out.println(\"Naga now has \" + nagahealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"The shadowy figure then turns towards \" + username + \".\");\n System.out.println(\"Naga spits out a large fire, but misses the figure...\");\n System.out.println(\"The shadowy figure steals 50 HP of \" + username + \".\");\n playerhealth = playerhealth-50;\n System.out.println(username + \" still has \" + playerhealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"The boss has \" + bosshealth + \" HP.\");\n }\n }else if (boss_attacks == 6) {\n System.out.println(\"Volcanic Eruption!\");\n if(miss_choice == 0) {//the boss misses\n System.out.println(\"The witch casts a spell that creates a series of volcanoes around you.\");\n System.out.println(\"The witch then forces the volcanoes to spit lava out...\");\n System.out.println(\"However, you saw that coming already. You and Naga jumped out of the way\");\n enter = next.nextLine();\n System.out.println(\"You dodged the attack!\");\n playerhealth = playerhealth-0;\n nagahealth = nagahealth-0;\n System.out.println(username + \" has \" + playerhealth + \" HP, and Naga has \" + nagahealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"The boss has \" + bosshealth + \" HP.\");\n }else if (miss_choice == 1) {//the boss is able to hit you\n System.out.println(\"The witch summons the evil lava guardian...\");\n System.out.println(\"She then points her staff directly at...\");\n if(which == 0){//player gets hit\n System.out.println(username);\n enter = next.nextLine();\n System.out.println(\"Watch out!!!\");\n System.out.println(\"GURGLLE!!! FSH!!!\");\n System.out.println(\"The lava erupts like a fountain lake and basks \" + username + \".\");\n System.out.println(username + \" loses 100 HP.\");\n enter = next.nextLine();\n playerhealth = playerhealth-100;\n System.out.println(username + \" now has \" + playerhealth + \" HP.\");\n System.out.println(\"Naga now has \" + nagahealth + \" HP.\");\n System.out.println(\"The boss now has \" + bosshealth + \" HP.\");\n }else if (which == 1){ //naga gets hit\n System.out.println(\"Naga\");\n enter = next.nextLine();\n System.out.println(\"Watch out!\");\n System.out.println(\"GURGLRE!!! FSH!!!\");\n System.out.println(\"The lava shoots out at Naga's face, feet, and back...\");\n System.out.println(\"Removing all of his scales in the process\");\n System.out.println(\"Naga loses 100 HP.\");\n enter = next.nextLine();\n nagahealth = nagahealth-100;\n System.out.println(username + \" has \" + playerhealth + \" HP.\");\n System.out.println(\"Naga has \" + nagahealth + \" HP.\");\n System.out.println(\"The boss has \" + bosshealth + \" HP.\");\n }\n }\n }else if (boss_attacks == 7) {\n System.out.println(\"Satin's Spear\");\n System.out.println(\"The witch uses her staff to summon her friend Satin...\");\n enter = next.nextLine();\n System.out.println(\"EXTERMINATE THEM!!!\");\n if(miss_choice == 0){ //boss missed\n System.out.println(\"Yes ma'm...\");\n System.out.println(\"Statin launches his spear...\");\n enter = next.nextLine();\n System.out.println(\"BUT, Naga and \" + username + \" were able to dodge the attack!\");\n System.out.println(\"MISS!\");\n enter = next.nextLine();\n System.out.println(\"OOPS!\");\n playerhealth = playerhealth-0;\n nagahealth = nagahealth-0;\n System.out.println(username + \" has \" + playerhealth + \" and Naga has \" + nagahealth + \" HP.\");\n System.out.println(\"The boss has \"+ bosshealth + \" HP.\");\n }else if(miss_choice == 1){//boss gets a hit\n System.out.println(\"Yes ma'm...\");\n System.out.println(\"URGGGHAAA!!!\");\n enter = next.nextLine();\n System.out.println(\"Satin launches his spear, which duplicated...\");\n System.out.println(\"The spear is still launching up on the air...\");\n enter = next.nextLine();\n if(which == 0) { //player gets hit\n System.out.println(username + \" wants to protect his friend so he jumps forward to block\");\n System.out.println(\"the threatening spear from piercing his friend...\");\n enter = next.nextLine();\n System.out.println(\"However, in doing so the spear lands on \" + username + \".\");\n System.out.println(\"The spear erupts into pieces, shattering \" + username + \"'s legs.\");\n enter = next.nextLine();\n System.out.println(\"The wound heals but inflicts 300 damage to \" + username + \".\");\n playerhealth = playerhealth-300;\n System.out.println(username + \" has \" + playerhealth + \" HP.\");\n }else if(which == 1) { //Naga gets hit\n System.out.println(\"Naga tries to shield \" + username + \" and successfully does.\");\n System.out.println(\"BUT, in doing so the spear pierces Naga's well-armored belly.\");\n enter = next.nextLine();\n System.out.println(\"The spear automatically drills deeper until Naga can't fight anymore...\");\n System.out.println(\"The wound heals, but dealt 300 damage to Naga.\");\n nagahealth = nagahealth-300;\n System.out.println(\"Naga now has \" + nagahealth + \" HP.\");\n }\n }\n System.out.println(\"The boss now has \" + bosshealth + \" HP.\");\n }else if (boss_attacks == 8) {\n System.out.println(\"Health Spell...\");\n System.out.println(\"The evil witch raised her staff and a blue vortex emerged.\");\n System.out.println(\"\\n\");\n System.out.println(\"However, the witch suddenly jumps into the vortex and after a while jumps out.\");\n System.out.println(\"OH NO!!! She tried to heal herself...\");\n bosshealth = bosshealth + 350;\n if(bosshealth == 10000) {\n System.out.println(\"She already had a maximum health of \" + bosshealth + \" HP. So it didn't work.\");\n System.out.println(\"\\n\");\n }else if(bosshealth > 10000) {\n bosshealth = 10000;\n System.out.println(\"The boss currently now \" + bosshealth + \" HP.\");\n }else{\n System.out.println(\"The boss now has \" + bosshealth + \" HP.\");\n }\n }\n }\n //#lose-player loses all of HP \n if(playerhealth <= zero) { //in case player loses all of his/her health\n System.out.println(\"OH NO!!!\" + username + \" lost was defeated!\");\n System.out.println(\"Naga currently has \" + nagahealth + \" HP.\");\n System.out.println(\"Better luck next time...\");\n monsterisalive = false;\n replaybossfight();\n }\n //#lose-naga's HP is equal to or less than zero\n if(nagahealth <= zero) { // in case Naga loses all of his/her health\n System.out.println(\"OH NO!!! Naga lost all of his health and was defeated!\");\n System.out.println(username + \" currently has \" + playerhealth + \" HP.\");\n System.out.println(\"Better luck next time...\");\n monsterisalive = false;\n replaybossfight();\n }\n \n }\n \n }", "@Override\r\n public String toString() {\r\n StringBuilder stringBuilder = new StringBuilder();\r\n for (Hero hero: team) {\r\n stringBuilder.append(\"Hero name: \").append(hero.getName());\r\n stringBuilder.append(\", health: \").append(hero.getHealth());\r\n stringBuilder.append(\", power: \").append(hero.getAttackPower());\r\n stringBuilder.append(\";\");\r\n stringBuilder.append(\"\\n\");\r\n }\r\n return stringBuilder.toString();\r\n }", "public void print()\r\n {\n if (getOccupants().length != 0)\r\n {\r\n \t// will use the print method in the person class\r\n getOccupants()[0].print();\r\n }\r\n else if (this.explored)\r\n {\r\n System.out.print(\"[ H ]\");\r\n }\r\n else\r\n {\r\n System.out.print(\"[ ]\");\r\n }\r\n\r\n }", "@Override\r\n public String toString() {\r\n return \"Player name:\" + name + \", team: \" + team + \", Batting Average\" + battingAverage + '.';\r\n }", "@Override\r\n\tpublic void attack() {\n\t\tSystem.out.printf(\"ºóÎÀ%s½ø¹¥\\n\", name);\r\n\t}", "private void reportWinner (Player player) {\n System.out.println();\n System.out.println(\"Player \" + player.name() +\n \" wins.\");\n System.out.println();\n }", "public void printSpeciesData(){\n\n System.out.println(\"A \" + this.name + \" has \" + this.legs + \" legs, \" + this.numberOfWings +\n \" wings, it is \" + this.wingColor + \", and likes a plant called \" + this.favFlower);\n\n }", "private void showHealthLevel()\n {\n showText(\"Health Level: \" + healthLevel, 120, 25);\n }", "@Override\n public String report() {\n\n StringBuilder print = new StringBuilder();\n player.getModels().stream().sorted((p, l) -> {\n int result = p.getClass().getSimpleName().compareTo(l.getClass().getSimpleName()); // Order them by type alphabetically,\n if (result == 0) {\n result = Integer.compare(l.getHealth(), p.getHealth());// then by health descending,\n if (result == 0) {\n result = p.getUsername().compareTo(l.getUsername());\n ;// then by username alphabetically.\n }\n }\n return result;\n })\n .forEach(pl -> print.append(pl).append(System.lineSeparator()));\n\n return print.toString().trim();\n }", "public void fight();", "public void printResults() {\n getUtl().getOutput().add(\"~~ Results ~~\\n\");\n for (int i = 0; i < getHeroes().size(); i++) {\n if (getHeroes().get(i).isDead()) {\n getUtl().getOutput().add(getHeroes().get(i).getName().\n toCharArray()[0] + \" dead\\n\");\n } else {\n getUtl().getOutput().add(getHeroes().get(i).getName().\n toCharArray()[0] + \" \"\n + getHeroes().get(i).getLevel() + \" \"\n + getHeroes().get(i).getXp() + \" \"\n + getHeroes().get(i).getHp() + \" \"\n + getHeroes().get(i).getPosX() + \" \"\n + getHeroes().get(i).getPosY() + \"\\n\");\n }\n }\n // Write output to given outputPath.\n getGameFileWriter().write(getUtl().getOutput());\n for (int i = 0; i < getUtl().getOutput().size(); i++) {\n // Write output to console as well.\n System.out.print(getUtl().getOutput().get(i));\n }\n }", "@Override\n public void declareWinner(){\n //only the not-dead player is the winner\n for (Player p : super.getPlayers()) {\n if (!(p.isDead())) {\n System.out.printf(\"%s IS THE WINNER!\", p.getPlayerID());\n break;\n }\n }\n }", "public void displayStats(int lowAttack, int medAttack, int highAttack)\n\t{\n\t\tSystem.out.println (\"Summary of Combat\");\n\t\tSystem.out.println (\"Total Hits Overall: \" + numHits + \" Total Blocks Overall: \" + numBlocks);\n\t\tSystem.out.println (\"Attacker Proportions: \" + \"Low \" + lowAttack + \"% \" + \"Medium \" +\n\t\t\t\t\t\t\tmedAttack + \"% \" + \"High \" + highAttack + \"% \");\n\t\tSystem.out.print (\"Defender Proportions: \" + \"Low \");\n\t\tSystem.out.printf(\"%.2f\", (lowBlocks * 100)/(count+1));\n\t\tSystem.out.print(\"% \" + \"Medium \"); \n\t\tSystem.out.printf(\"%.2f\", ((medBlocks*100)/(count+1)));\n\t\tSystem.out.print(\"% \" + \"High \");\n\t\tSystem.out.printf(\"%.2f\", ((highBlocks*100)/(count+1)));\n\t\tSystem.out.println(\"% \");\t\t\n\t\n\t}", "public void printPersonStats(String fullName)\n\t{\n\t\tSystem.out.println(\"\\n\"+fullName);\n\t\t\n\t\t//assuming person exists in graph\n\t\tfor(String relationship: personMap.get(fullName).inRelationships.keySet())\n\t\t\tSystem.out.println(\"-\"+relationship+\" to \"+personMap.get(fullName).inRelationships.get(relationship));\n\t\t\n\t\tfor(String relationship: personMap.get(fullName).outRelationships.keySet())\n\t\t\tSystem.out.println(\"-\"+personMap.get(fullName).outRelationships.get(relationship)+\" is the \"+relationship);\n\t}", "public void fight(Team otherteam) {\n\t\tString aTeamCaptainName = this.captain.getName();\t//호출한 메서드\n\t\tString bTeamCaptainName = otherteam.captain.getName();\n\t\tSystem.out.println(aTeamCaptainName+\"과 \"+ bTeamCaptainName+\"이 싸운다\");\n\t\t\n\t}", "@SuppressWarnings(\"unused\")\r\n\tprivate void printBattlerStats(Battler b) {\r\n\t\tSystem.out.println(Formatter.format(\r\n\t\t\t\t\"Name: %s\\nStr: %s\\nAgi: %s\\nInt: %s\" +\r\n\t\t\t\t\"\\nDodge: %s\\nCrit: %s\\nSpell: %s\\nMelee: %s \\n\",\r\n\t\t\t\tb.name, b.getStrength(), b.getAgility(), b.getIntelligence(),\r\n\t\t\t\tb.getDodgeChance(), b.getCriticalChance(), b.getSpellModifier(), b.getMeleeModifier()));\r\n\t}", "public void printAllResults(){\n String round = \"Rounds: \\t\\t\";\n String team1 = fight_list.get(0).t1.name + \"\\t\\t\"; //note: We assume that all the FightResults in 1 DataBag all have the same 2 teams. Gotta write that better later.\n String team2 = fight_list.get(0).t2.name + \"\\t\\t\";\n\n for(FightResult fig : this.fight_list){\n round += fig.final_round + \"\\t\";\n team1 += fig.t1_deaths + \"\\t\";\n team2 += fig.t2_deaths + \"\\t\";\n }\n\n System.out.println(round);\n System.out.println(team1);\n System.out.println(team2);\n\n //System.out.println(\"\\n--------\\n\");\n }", "public void printHand() {\r\n System.out.printf(\"%s's cards:\\n\", name);\r\n for (int n = 0; n < numOfCards; n++) {\r\n System.out.printf(\" %s\\n\", hand[n].toString());\r\n }\r\n }", "private void showStat() {\n\t\tSystem.out.println(\"=============================\");\n\t\tSystem.out.println(\"Your won! Congrates!\");\n\t\tSystem.out.println(\"The word is:\");\n\t\tSystem.out.println(\"->\\t\" + this.word.toString().replaceAll(\" \", \"\"));\n\t\tSystem.out.println(\"Your found the word with \" \n\t\t\t\t+ this.numOfWrongGuess + \" wrong guesses.\");\n\t}", "public void printBattleField(boolean isThisAttacker, BattleField battleField) {\n BattleShipHelper helper = new BattleShipHelper();\n Shot[] shots = battleField.getShots();\n int k = 0;\n\n for (int i = 0; i < 10; i++) {\n if (i == 0)\n System.out.print(\" \");\n System.out.print(i + \".\\t\");\n }\n\n System.out.println(\"\\n ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯\");\n for (int i = 0; i < 10; i++) {\n System.out.print(i + \". \");\n for (int j = 0; j < 10; j++) {\n k = battleField.getIndexOfShot(j, i);\n if(((battleField.getIndexOfShip(j, i) != -1) && shots[k].getHit() && helper.isThisDestroyedShip(battleField.getIndexOfShip(j, i), battleField)) ||\n (isThisAttacker && (battleField.getIndexOfShip(j, i) != -1) && shots[k].getHit())) {\n System.out.print(\"\\u2588\\t\");\n } else if(battleField.getIndexOfShip(j, i) != -1){\n if(shots[k].getHit() || isThisAttacker) {\n System.out.print(\"\\u2592\\t\");\n } else {\n System.out.print(\"\\u25AB\\t\");\n }\n } else if((shots[k].getHit()) && (battleField.getIndexOfShip(j, i) == -1)) {\n System.out.print(\"\\u25AA\\t\");\n } else {\n System.out.print(\"\\u25AB\\t\");\n }\n }\n System.out.println(\"\\n ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯\");\n }\n }", "@Override\r\n\tpublic void visit(Fighter fighter)\r\n\t{\n\t\t\r\n\t}", "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}", "private void goCharacter() {\n\t\t// TODO print player\n\t\tSystem.out.println(\"***\");\n\t\tSystem.out.println( \"Warrior: \" + playern.getName());\n\t\tSystem.out.println(\"Level: \" + playern.getLevel());\n\t\tSystem.out.println(\"Experience: \" + playern.getExp());\n\t\tSystem.out.println(\"HP \" + playern.getHp());\n\t\tSystem.out.println(\"***\");\n\t}", "public void printTopAttackers(){\n Player topAttacker1 = players.get(0);\n Player topAttacker2 = players.get(0);\n // Iterates through the players ArrayList and sets the stop attacker as topAttacker1\n for (Player player : players){\n if (player.getAttackStat() > topAttacker1.getAttackStat()){\n topAttacker1 = player;\n }\n }\n\n // If topAttacker1 is the first item in the players ArrayList then topAttacker2 will be\n // initialized with the second item\n if (topAttacker1 == players.get(0)){\n topAttacker2 = players.get(1);\n }\n // Iterates through the players ArrayList and sets the stop attacker as topAttacker2\n for (Player player : players){\n if (player != topAttacker1){\n if (player.getAttackStat() > topAttacker2.getAttackStat()){\n topAttacker2 = player;\n }\n }\n }\n topAttacker1.printPlayerInfo();\n topAttacker2.printPlayerInfo();\n }", "public String showHealthBar(String target) {\n if (target == \"player\") {\n return \"(\" + playerShipHealth + \"/\" + playerShipHealthMax + \")\";\n } else if (target == \"enemy\") {\n return \"(\" + enemyShipHealth + \"/\" + enemyShipHealthMax + \")\";\n } else{ return null; }\n }", "public static void main(String[] args) {\n\t\thuman Human1 = new human();\n\t\thuman Human2 = new human();\n\t\tHuman1.attack(Human2);\n\t\tSystem.out.println(\"the damaged health is: \" + Human2.returnHealth());\n\t}", "private static void checkForKnockout()\n\t{\n\t\tif (playerOneHealth <= 0 && opponentHealth <= 0)\n\t\t{\n\t\t\tSystem.out.println(playerOneName + \" and \" + opponentName + \" both go down for the count!\");\n\t\t\t\n\t\t\t// Prints one to ten because fighter is knocked out\n\t\t\tfor (int i = 1; i <= 10; i++)\n\t\t\t{\n\t\t\t\tif (i < 6) System.out.println(i);\n\t\t\t\telse System.out.println(i + \"!\");\n\t\t\n\t\t\t\t// Delays count – from StackOverflow\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tThread.sleep(500);\n\t\t\t\t} \n\t\t\t\tcatch (InterruptedException e) \n\t\t\t\t{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"\\n*DING* *DING* *DING* The match is over in round number \" + roundNumber + \"!!\\n\" + playerOneName + \" and \" + opponentName + \" knocked each other out at the same time.\\nWhat a weird ending!!!\");\n\t\t}\n\t\n\t\t// Check if Player One Lost\n\t\telse if (playerOneHealth <= 0)\n\t\t{\n\t\t\t// Prints one to ten because player one is knocked out\n\t\t\tSystem.out.println(playerOneName + \" is down for the count!\");\n\t\t\tfor (int i = 1; i <= 10; i++)\n\t\t\t{\n\t\t\t\tif (i < 6) System.out.println(i);\n\t\t\t\telse System.out.println(i + \"!\");\n\t\t\t\n\t\t\t\t// Delays count – from StackOverflow\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tThread.sleep(500);\n\t\t\t\t} \n\t\t\t\tcatch (InterruptedException exception) \n\t\t\t\t{\n\t\t\t\t\texception.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Game Over\n\t\t\tSystem.out.println(\"\\n*DING* *DING* *DING* The match is over in round number \" + roundNumber + \"!!\\n\" + playerOneName + \" was knocked out, and \" + opponentName + \" still had \" + opponentHealth + \" health left. \\nBetter luck next time player one!!!\");\n\t\t}\n\t\n\t\t// Check if Player Two Lost\n\t\telse if (opponentHealth <= 0)\n\t\t{\n\t\t\tSystem.out.println(opponentName + \" is down for the count!\");\n\n\t\t\t// Prints one to ten because fighter is knocked out\n\t\t\tfor (int i = 1; i <= 10; i++)\n\t\t\t{\n\t\t\t\tif(i < 6)System.out.println(i);\n\t\t\t\telse System.out.println(i + \"!\");\n\t\t\t\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tThread.sleep(500);\n\t\t\t\t} \n\t\t\t\tcatch (InterruptedException exception) \n\t\t\t\t{\n\t\t\t\t\texception.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Game Over\n\t\t\tSystem.out.println(\"\\n*DING* *DING* *DING* The match is over in round number \" + roundNumber + \"!! \\n\" + opponentName + \" was knocked out, and \" + playerOneName + \" still had \" + playerOneHealth + \" health left.\\nCONGRATULATIONS PLAYER ONE!!!\");\n\t\t}\n\t}", "public void diplayAvailableFood() {\n\t\tfor (int i = 0; i < food.size(); i++) {\n\t\t\tSystem.out.print(food.get(i).name + \" \");\n\t\t}\n\t}", "public String toString() {\r\n return \"\\n\\nTrainer: \"+ name + \", Wins: \" + win + \", team:\" + team;\r\n }", "public String toString() {\n return name + \" with \" + stuns + \" stuns is \"\n + likelinessToGetKilled + \" likely to die.\";\n }", "public void printName()\n\t{\n\t\tArrayList<Robot> ar=new ArrayList<Robot>();\n\t\tIterator<Robot> it;\n\t\tint i=1;//started index\n\t\t\n\t\tar.addAll(robotHM.values());//adding all\n\t\tCollections.sort(ar);//sort by names\n\t\tit=ar.iterator();\n\t\twhile (it.hasNext())\n\t\t{\n\t\t\tSystem.out.println(i+\". \"+it.next().getName());\n\t\t\ti++;\n\t\t}\n\t}", "void printStats();", "public void print() {\r\n System.out.print( getPlayer1Id() + \", \" );\r\n System.out.print( getPlayer2Id() + \", \");\r\n System.out.print(getDateYear() + \"-\" + getDateMonth() + \"-\" + getDateDay() + \", \");\r\n System.out.print( getTournament() + \", \");\r\n System.out.print(score + \", \");\r\n System.out.print(\"Winner: \" + winner);\r\n System.out.println();\r\n }", "static public void showDice(List<Die> dice) {\n System.out.println(\"----Your Hand----\");\n for (var die : dice) {\n System.out.print(die.getNumberOnDie() + \" \");\n }\n System.out.println(\"\\n\");\n }", "public void stats() {\n\t\tSystem.out.println(\"The score is: \" + score \n\t\t\t\t+ \"\\nNumber of Astronauts rescused: \" + rescuedAstronauts \n\t\t\t\t+ \"\\nNumber of Astronauts roaming: \" + roamingAstronauts\n\t\t\t\t+ \"\\nNumber of Aliens rescued: \" + rescuedAliens\n\t\t\t\t+ \"\\nNumber of Aliens roaming: \" + roamingAliens);\n\t}", "public void printHeroes(List<Hero> list) {\n\t\tSystem.out.println(\"ID\\tName\\t\\t\\tLevel\\tHP\\tMana\\tStrength\\tDefense\\t\\tAgility\\t\\tDex\\tMoney\\tExp\");\n\t\tSystem.out.println(\"===================================================================================================================\");\n\t\tint id = 1;\n\t\tfor(Hero h : list) {\n\t\t\n\t\t\tSystem.out.printf(id++ + \"\\t\" + h.getName());\n\t\t\tfor(int i = 0; i < 24-h.getName().length(); i++) {\n\t\t\t\tSystem.out.printf(\" \");\n\t\t\t}\n\t\t\tSystem.out.printf(h.getLevel() + \"\\t\" + h.getHp() + \"\\t\" + h.getMana() + \"\\t\"+ h.getStrength() + \"\\t\\t\" \n\t\t\t\t\t+ h.getDefense() + \"\\t\\t\"\n\t\t\t\t\t+ h.getAgility()\n\t\t\t\t\t+ \"\\t\\t\" + h.getDexterity() + \"\\t\" + h.getWallet().toString() + \"\\t\"+ h.getExp());\n\t\t\n\t\t\t\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t}", "private void fight(int playerNo, int fighter, int challenger)\r\n {\r\n LaughButton lt = new LaughButton();\r\n if(playerNo == 1)\r\n {\r\n int attack = worldPanel.player1.units[fighter].getAttack();\r\n int defence = worldPanel.player2.units[challenger].getDefence();\r\n double attack1 = Math.random() * attack;\r\n double defence1 = Math.random() * defence;\r\n if(attack1 >= defence1)//player1 wins\r\n worldPanel.player2.removeUnit(challenger);\r\n else\r\n {\r\n worldPanel.player1.removeUnit(fighter);\r\n worldPanel.setCurrentUnit(1);\r\n }\r\n }//end if\r\n\r\n if(playerNo == 2)\r\n {\r\n int attack = worldPanel.player2.units[fighter].getAttack();\r\n int defence = worldPanel.player1.units[challenger].getDefence();\r\n double attack1 = Math.random() * attack;\r\n double defence1 = Math.random() * defence;\r\n if(attack1 >= defence1)//player2 wins\r\n worldPanel.player1.removeUnit(challenger);\r\n else\r\n {\r\n worldPanel.player2.removeUnit(fighter);\r\n worldPanel.setCurrentUnit(1);\r\n }\r\n }//end if\r\n setMapPos();\r\n setInfoPanel();\r\n }", "private void print() {\r\n // Print number of survivors and zombies\r\n System.out.println(\"We have \" + survivors.length + \" survivors trying to make it to safety (\" + childNum\r\n + \" children, \" + teacherNum + \" teachers, \" + soldierNum + \" soldiers)\");\r\n System.out.println(\"But there are \" + zombies.length + \" zombies waiting for them (\" + cInfectedNum\r\n + \" common infected, \" + tankNum + \" tanks)\");\r\n }", "public void printTurn() {\r\n\t\tSystem.out.println(this.getName() + \" turn\");\r\n\t}", "public boolean Fight(Player p)\n{\n\tint m=1;\n\t int t=1;\n int temp=0;\n int player1=this.weapon-1;\n int player2=p.weapon-1;\n\n\t int[] a=new int[this.weapon];\n int[] b=new int[p.weapon];\n System.out.println(\"XXxxXXxxXXxxXXxxXX FIGHT XXxxXXxxXXxxXXxxXX\\n\");\nwhile(this.health>0&&p.health>0)\n{\n System.out.println(\"~~~~~Round: \" +m+\"~~~~~\");\n m++;\n System.out.println(\"++\"+this.name+\" Health: \"+this.health+\" potions.\");\n System.out.println(\"++\"+p.name+\" Health: \"+p.health+\" potions.\");\n\n for (int i=0;i<a.length;i++)\n {\n\ta[i]=this.Roll();\n }\n for(int j=0;j<b.length;j++)\n {\n\tb[j]=p.Roll();\n }\n\n Arrays.sort(a);\n Arrays.sort(b);\n\n System.out.print(this.name+\" has thrown: {\");\n\n for(int i=a.length-1;i>0;i--)\n System.out.print(a[i]+\", \");\n\n System.out.println(a[0]+\"}\");\n\n System.out.print(p.name+\" has thrown: {\");\n for(int j=b.length-1;j>0;j--)\n System.out.print(b[j]+\", \");\n\n System.out.println(b[0]+\"}\");\n\n if(a.length>b.length)\n \ttemp=b.length;\n else\n \ttemp=a.length;\n\n player1=this.weapon-1;\n player2=p.weapon-1;\n t=1;\n while(this.health>0&&p.health>0&&temp>0)\n \t{\n\n System.out.print(\"***Strike \"+t+\": \");\n if(a[player1]==b[player2])\n {\n \tSystem.out.println(\"BOTH suffer blows!!!\");\n \tthis.health-=a[player1]*10;\n \tp.health-=b[player2]*10;\n \tSystem.out.println(this.name+\" decreases health by \"+a[player1]*10+\" potions.\");\n \tSystem.out.println(p.name+\" decreases health by \"+b[player2]*10+\" potions.\");\n }\n else if(a[player1]>b[player2])\n {\n \t\tSystem.out.println(p.name+\" does damage!\");\n \tp.health-=a[player1]*10;\n \tSystem.out.println(p.name+\" decreases health by \"+a[player1]*10+\" potions.\");\n }\n else\n {\n \tSystem.out.println(this.name+\" does damage!\");\n \tthis.health-=b[player2]*10;\n \tSystem.out.println(this.name+\" decreases health by \"+b[player2]*10+\" potions.\");\n }\n\n player1--;\n player2--;\n\n temp--;\n t++;\n \t}\n\n\n}\nif(this.health<=0)\n return false;\n else\n \treturn true;\n\n}", "public static void printGame(){\n System.out.println(\"Spielrunde \" + GameController.AKTUELLE_RUNDE);\n System.out.println(GameController.AKTUELLER_SPIELER +\" ist an der Reihe.\");\n System.out.println(\"Er attackiert \" +\n GameController.AKTUELLER_VERTEIDIGER + \" und verursacht \"\n + GameController.SCHADEN +\" Schaden. \");\n System.out.println();\n }", "FighterInfo() {\r\n\t}", "public static void main(String[] args) {\n\t\tFighter f = new Fighter();\r\n\t\t\r\n\t\tif(f instanceof Unit)\r\n\t\t\tSystem.out.println(\"f는 Unit클래스의 자손입니다.\");\r\n\t\tif(f instanceof Fightable)\r\n\t\t\tSystem.out.println(\"f는 Fightable 인터페이스를 구현했습니다.\");\r\n\t\tif(f instanceof Movable)\r\n\t\t\tSystem.out.println(\"f는 Movable 인터페이스를 구현했습니다..\");\r\n\t\tif(f instanceof Attackable)\r\n\t\t\tSystem.out.println(\"f는 Attackable인터페이스를 구현했습니다.\");\r\n\t\tif(f instanceof Object)\r\n\t\t\tSystem.out.println(\"f는 Obiect클래스의 자손입니다.\");\r\n\r\n\t}", "private void show() {\n System.out.println(team.toString());\n }", "public void showStats() {\r\n List<String> list = new ArrayList();\r\n for (int i = 1; i < 31; i++) {\r\n switch (i) {\r\n case 4:\r\n list.add(name);\r\n break;\r\n case 6:\r\n list.add(String.valueOf(stats.get(\"name\")));\r\n break;\r\n case 7:\r\n list.add(String.valueOf(stats.get(\"score\").split(\":\")[0]));\r\n break;\r\n case 8:\r\n list.add(\"Score\");\r\n break;\r\n case 9:\r\n list.add(String.valueOf(stats.get(\"score\").split(\":\")[1]));\r\n break;\r\n case 10:\r\n list.add(String.valueOf(stats.get(\"break\").split(\":\")[0]));\r\n break;\r\n case 11:\r\n list.add(\"Max Break\");\r\n break;\r\n case 12:\r\n list.add(String.valueOf(stats.get(\"break\").split(\":\")[1]));\r\n break;\r\n case 13:\r\n list.add(String.valueOf(stats.get(\"fouls\").split(\":\")[0]));\r\n break;\r\n case 14:\r\n list.add(\"Fouls\");\r\n break;\r\n case 15:\r\n list.add(String.valueOf(stats.get(\"fouls\").split(\":\")[1]));\r\n break;\r\n case 16:\r\n list.add(String.valueOf(stats.get(\"misses\").split(\":\")[0]));\r\n break;\r\n case 17:\r\n list.add(\"Misses\");\r\n break;\r\n case 18:\r\n list.add(String.valueOf(stats.get(\"misses\").split(\":\")[1]));\r\n break;\r\n case 19:\r\n list.add(String.valueOf(stats.get(\"pots\").split(\":\")[0]));\r\n break;\r\n case 20:\r\n list.add(\"Pots\");\r\n break;\r\n case 21:\r\n list.add(String.valueOf(stats.get(\"pots\").split(\":\")[1]));\r\n break;\r\n case 22:\r\n list.add(String.valueOf(stats.get(\"shots\").split(\":\")[0]));\r\n break;\r\n case 23:\r\n list.add(\"Shots\");\r\n break;\r\n case 24:\r\n list.add(String.valueOf(stats.get(\"shots\").split(\":\")[1]));\r\n break;\r\n case 25:\r\n list.add(String.format(\"%.1f\", Double.parseDouble(stats.get(\"potPercentage\").split(\":\")[0])) + \"%\");\r\n break;\r\n case 26:\r\n list.add(\"Pot Percentage\");\r\n break;\r\n case 27:\r\n list.add(String.format(\"%.1f\", Double.parseDouble(stats.get(\"potPercentage\").split(\":\")[1])) + \"%\");\r\n break;\r\n case 28:\r\n list.add(String.format(\"%.1f\", Double.parseDouble(stats.get(\"safetyPercentage\").split(\":\")[0])) + \"%\");\r\n break;\r\n case 29:\r\n list.add(\"Safety Percentage\");\r\n break;\r\n case 30:\r\n list.add(String.format(\"%.1f\", Double.parseDouble(stats.get(\"safetyPercentage\").split(\":\")[1])) + \"%\");\r\n break;\r\n default:\r\n list.add(\"\");\r\n }\r\n }\r\n\r\n GridView grid = new GridView(context);\r\n grid.setAdapter(new ArrayAdapter(context, android.R.layout.simple_list_item_1, list));\r\n grid.setNumColumns(3);\r\n\r\n new AlertDialog.Builder(context)\r\n .setNegativeButton(\"Back\", null)\r\n .setTitle(\"Match Statistics\")\r\n .setView(grid)\r\n .show();\r\n }", "public void printPlayerStats(PlayerStats statistics) {\r\n\t\tSystem.out.print(statistics.playerStatsToString());\r\n\t}", "private void enemyturn() {\n if (enemy.getHealth() == 0) { // check if the enemy is still alive\n enemy.setAlive(false);\n }\n\n if (enemy.getAlive()) { // if he is alive\n // time to fuck the players day up\n System.out.println(\"\");//formatting\n System.out.println(enemy.getName() + \" attacks you!\");\n\n // calculate the damage this enemy will do\n int differenceHit = enemy.getMaxHit() - enemy.getMinHit(); // difference will be 0-3. But plus 1 (as the result will ALWAYS be +1 in the randomizer so a \"0\" will not happen.\n int minimumDamage = randomize.getRandomDamage(differenceHit); // for example, will return 0-4 if the min and max hit was 4-7. Then do a -1. Making it a 0-3 chance.\n int damage = differenceHit + minimumDamage; // add the minimum damage, to random hit damage.\n\n // calculate the players armor\n damage = damage - player.getPlayerArmorRating();\n if (damage <= 0){\n System.out.println(\"... but you dont take any damage because of your armor!\");\n } else {\n\n System.out.println(\"You take \" + damage + \" damage!\");\n player.removeHealth(damage);\n }\n\n } else { // when ded\n System.out.println(\"The enemy has no chance to fight back. As your final blow killed the enemy.\");\n }\n }", "public void showFacilities() {\r\n\t\tfor(Facility f: facilities.values()) {\r\n\t\t\tSystem.out.println(f.toString());\r\n\t\t}\r\n\t}", "public String showHands() {\n\t\tString string = \"\";\n\t\tstring += \"Player's hand: \" + player.showHand() + \"\\n\";\n\t\tstring += \"Dealer's hand: \" + dealer.showHand();\n\t\treturn string;\n\t}", "public void printWeaponList(List<Weapon> list) {\n\t\tSystem.out.println(\"**** Available Weapons ****\");\n\t\tSystem.out.println(\"ID\\tName\\t\\tDamage\\tEquipped\");\n\t\tSystem.out.println(\"============================================================================================\");\n\t\tint id = 1;\n\t\tfor(Weapon w : list) {\t\t\n\t\t\tSystem.out.printf(id++ + \"\\t\" + w.getName() + \"\\t\\t\"+ w.getWeaponDmg()+ \"\\t\");\n\t\t\tif(w.isEquipped()) {\n\t\t\t\tSystem.out.println(\"Y\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"N\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tSystem.out.println();\t\n\t}", "public void fightMem2Dog(Team otherTeam) {\n\t\tString aTeamMem2Dog = this.member2.getHappy().getName();\n\t\tString otherTeamMem2Dog = otherTeam.getMember2().getHappy().getName();\n\t\tSystem.out.println(aTeamMem2Dog+ \"와 \"+ otherTeamMem2Dog+ \"가 개싸웁니다.\");\n\t\t\n\t}", "private void printInfo()\n {\n if(currentRoom.getItems().size() >= 1)\n {\n System.out.println(\"\\n\" + \"Items in room are: \" );\n ArrayList<Item> items = currentRoom.getItems();\n \n for(Item i : items)\n {\n System.out.println(i.getItemName() + i.getDescription()); \n }\n \n }\n \n \n \n if(currentRoom.getWeapons().size() >= 1)\n {\n System.out.println(\"\\n\" + \"Weapons in room are: \" );\n \n ArrayList<Weapon> weapons = currentRoom.getWeapons();\n for(Weapon w : weapons)\n {\n System.out.println(w.getWeaponName() + w.getDescription());\n }\n \n }\n \n \n }", "public String displayFamilyMembers() {\n int i = 1;\n StringBuilder ret = new StringBuilder();\n for (FamilyMember fam : this.famMemberList) {\n ret.append(i + \".\" + \" \" + fam.getSkinColour() + \" -> \" + fam.getActionValue());\n ret.append(\" | \");\n i++;\n }\n return ret.toString();\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n\n sb.append(String.format(\"#Name: %s\", this.name))\n .append(\"\\n\");\n sb.append(String.format(\"##Health: %.2f// Energy: %d// Intelligence: %.2f\", this.health, this.energy, this.intelligence))\n .append(\"\\n\");\n\n return sb.toString();\n }", "public void fightMem1(Team otherTeam) {\n\t\tString aTeamMember1 = this.member1.getName();\n\t\tString bTeamMember1 = otherTeam.member1.getName();\n\t\tSystem.out.println(aTeamMember1+ \"과 \"+ bTeamMember1+ \"이 싸웁니다.\");\n\t\t\n\t}", "public void getStats(){\n for (Shelf shelf : this.shelves){\n if (!shelf.isEmpty()){\n shelf.printStats();\n }\n\n }\n }", "public String getHealthBar() {\n String healthBar = \"|\";\n for (int i=0; i<40; i++) {\n if (i < 40*hp/maxHp) {\n healthBar += \"\\u2588\";\n } else {\n healthBar += \" \";\n }\n }\n return healthBar + \"|\";\n }", "public void outputNames(){\n System.out.printf(\"\\n%9s%11s\\n\",\"Last Name\",\"First Name\");\n pw.printf(\"\\n%9s%11s\",\"Last Name\",\"First Name\");\n ObjectListNode p=payroll.getFirstNode();\n while(p!=null){\n ((Employee)p.getInfo()).displayName(pw);\n p=p.getNext();\n }\n System.out.print(\"\\nNumber of Employees: \"+payroll.size()+\"\\n\");\n pw.print(\"\\nNumber of Employees: \"+payroll.size()+\"\\n\");\n }", "private static void printHeroesVitalCharacteristic(String format, AbstractRace[] hero) {\n String doubleFormat = \"| %-20s | %-20.2f | %-20.2f | %-20.2f |%n\";\n\n System.out.format(format, \"Profession\",\n hero[0].getHeroKind() + \" (\" + hero[0].getRace() + \")\",\n hero[1].getHeroKind() + \" (\" + hero[1].getRace() + \")\",\n hero[2].getHeroKind() + \" (\" + hero[2].getRace() + \")\"\n );\n\n System.out.format(format, \"Level\",\n hero[0].getLevel(), hero[1].getLevel(), hero[2].getLevel());\n\n System.out.format(doubleFormat, \"XP\",\n hero[0].getXp(), hero[1].getXp(), hero[2].getXp());\n\n printTeamTableDivider();\n\n System.out.format(doubleFormat, \"Health\",\n hero[0].getHealth(), hero[1].getHealth(), hero[2].getHealth());\n\n System.out.format(doubleFormat, \"Mana\",\n hero[0].getMana(), hero[1].getMana(), hero[2].getMana());\n\n System.out.format(doubleFormat, \"Rage\",\n hero[0].getRage(), hero[1].getRage(), hero[2].getRage());\n }" ]
[ "0.65766716", "0.6485746", "0.6462098", "0.6306953", "0.6295929", "0.6279561", "0.6196886", "0.61752236", "0.60899484", "0.6043141", "0.60357195", "0.6012372", "0.6004185", "0.59587675", "0.59346944", "0.5933135", "0.59324855", "0.592293", "0.59188765", "0.5894227", "0.58807063", "0.5868581", "0.58574504", "0.5855451", "0.5842542", "0.5832716", "0.58242095", "0.5821325", "0.58212173", "0.5819616", "0.5816702", "0.5813535", "0.5809214", "0.5803214", "0.58000624", "0.5796777", "0.5785928", "0.57847494", "0.57710737", "0.57701796", "0.57637936", "0.5762904", "0.57541543", "0.5753208", "0.5742782", "0.57393914", "0.57374996", "0.5717432", "0.5708405", "0.57060397", "0.5700461", "0.5698146", "0.5693555", "0.5681336", "0.56745225", "0.56731844", "0.56636065", "0.56535184", "0.56529474", "0.56517303", "0.5651415", "0.56319743", "0.56317914", "0.5630523", "0.5628172", "0.5608007", "0.56068677", "0.56013006", "0.5596985", "0.5592241", "0.5587475", "0.55856395", "0.55818236", "0.55687845", "0.55644166", "0.5561681", "0.55542016", "0.5549807", "0.5547211", "0.5533439", "0.5533036", "0.5529622", "0.55274975", "0.5527289", "0.5526368", "0.55241627", "0.5520243", "0.5515572", "0.5514215", "0.550255", "0.54990935", "0.549844", "0.5498235", "0.549764", "0.5494492", "0.54918414", "0.5490489", "0.54849744", "0.5481584", "0.5479805" ]
0.74123186
0
Create an entity for this test. This is a static method, as tests for other entities might also need it, if they test an entity which requires the current entity.
public static TranshipTube createEntity(EntityManager em) { TranshipTube transhipTube = new TranshipTube() .status(DEFAULT_STATUS) .memo(DEFAULT_MEMO) .columnsInTube(DEFAULT_COLUMNS_IN_TUBE) .rowsInTube(DEFAULT_ROWS_IN_TUBE); // Add required entity TranshipBox transhipBox = TranshipBoxResourceIntTest.createEntity(em); em.persist(transhipBox); em.flush(); transhipTube.setTranshipBox(transhipBox); // Add required entity FrozenTube frozenTube = FrozenTubeResourceIntTest.createEntity(em); em.persist(frozenTube); em.flush(); transhipTube.setFrozenTube(frozenTube); return transhipTube; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Entity createEntity();", "T createEntity();", "protected abstract ENTITY createEntity();", "void create(E entity);", "void create(T entity);", "E create(E entity);", "E create(E entity);", "TestEntity buildEntity () {\n TestEntity testEntity = new TestEntity();\n testEntity.setName(\"Test name\");\n testEntity.setCheck(true);\n testEntity.setDateCreated(new Date(System.currentTimeMillis()));\n testEntity.setDescription(\"description\");\n\n Specialization specialization = new Specialization();\n specialization.setName(\"Frontend\");\n specialization.setLevel(\"Senior\");\n specialization.setYears(10);\n\n testEntity.setSpecialization(specialization);\n\n return testEntity;\n }", "protected abstract EntityBase createEntity() throws Exception;", "public static TestEntity createEntity(EntityManager em) {\n TestEntity testEntity = new TestEntity();\n // Add required entity\n User user = UserResourceIntTest.createEntity(em);\n em.persist(user);\n em.flush();\n testEntity.setUserOneToMany(user);\n return testEntity;\n }", "void create(T entity) throws Exception;", "@Override\n protected void createEntity() {\n ProjectStatus status = createProjectStatus(5);\n setEntity(status);\n }", "protected T createSimulatedExistingEntity() {\n final T entity = createNewEntity();\n entity.setId(IDUtil.randomPositiveLong());\n\n when(getDAO().findOne(entity.getId())).thenReturn(entity);\n return entity;\n }", "public Entity newEntity() { return newMyEntity(); }", "public Entity newEntity() { return newMyEntity(); }", "public static Student createEntity(EntityManager em) {\n Student student = new Student()\n .firstName(DEFAULT_FIRST_NAME)\n .middleName(DEFAULT_MIDDLE_NAME)\n .lastName(DEFAULT_LAST_NAME)\n .studentRegNumber(DEFAULT_STUDENT_REG_NUMBER)\n .dateOfBirth(DEFAULT_DATE_OF_BIRTH)\n .regDocType(DEFAULT_REG_DOC_TYPE)\n .registrationDocumentNumber(DEFAULT_REGISTRATION_DOCUMENT_NUMBER)\n .gender(DEFAULT_GENDER)\n .nationality(DEFAULT_NATIONALITY)\n .dateJoined(DEFAULT_DATE_JOINED)\n .deleted(DEFAULT_DELETED)\n .wxtJwtPq55wd(DEFAULT_WXT_JWT_PQ_55_WD);\n // Add required entity\n NextOfKin nextOfKin;\n if (TestUtil.findAll(em, NextOfKin.class).isEmpty()) {\n nextOfKin = NextOfKinResourceIT.createEntity(em);\n em.persist(nextOfKin);\n em.flush();\n } else {\n nextOfKin = TestUtil.findAll(em, NextOfKin.class).get(0);\n }\n student.getRelatives().add(nextOfKin);\n return student;\n }", "@PostConstruct\n protected void initNewEntity() {\n setNewEntity(getService().create());\n }", "public static Emprunt createEntity(EntityManager em) {\n Emprunt emprunt = new Emprunt()\n .dateEmprunt(DEFAULT_DATE_EMPRUNT)\n .dateRetour(DEFAULT_DATE_RETOUR);\n // Add required entity\n Usager usager = UsagerResourceIntTest.createEntity(em);\n em.persist(usager);\n em.flush();\n emprunt.setUsager(usager);\n // Add required entity\n Exemplaire exemplaire = ExemplaireResourceIntTest.createEntity(em);\n em.persist(exemplaire);\n em.flush();\n emprunt.setExemplaire(exemplaire);\n return emprunt;\n }", "@Override\n public EntityResponse createEntity(String entitySetName, OEntity entity) {\n return super.createEntity(entitySetName, entity);\n }", "public ClientEntity newEntity() {\r\n if (entityType == null) {\r\n entityType = getEntityType(entitySet);\r\n }\r\n return odataClient.getObjectFactory().newEntity(new FullQualifiedName(NAMESPAVE, entityType));\r\n }", "ID create(T entity);", "public static MotherBed createEntity(EntityManager em) {\n MotherBed motherBed = new MotherBed()\n .value(DEFAULT_VALUE)\n .status(DEFAULT_STATUS);\n // Add required entity\n Nursery nursery = NurseryResourceIntTest.createEntity(em);\n em.persist(nursery);\n em.flush();\n motherBed.setNursery(nursery);\n return motherBed;\n }", "@Override\n public EntityResponse createEntity(String entitySetName, OEntityKey entityKey, String navProp, OEntity entity) {\n return super.createEntity(entitySetName, entityKey, navProp, entity);\n }", "private FailingEntity createFailingEntity() {\n FailingEntity entity = app.createAndManageChild(EntitySpec.create(FailingEntity.class)\n .configure(FailingEntity.FAIL_ON_START, true));\n return entity;\n }", "public <T extends Entity> T createEntity(EntitySpec<T> spec) {\n Map<String,Entity> entitiesByEntityId = MutableMap.of();\n Map<String,EntitySpec<?>> specsByEntityId = MutableMap.of();\n \n T entity = createEntityAndDescendantsUninitialized(spec, entitiesByEntityId, specsByEntityId);\n initEntityAndDescendants(entity.getId(), entitiesByEntityId, specsByEntityId);\n return entity;\n }", "public static Prestamo createEntity(EntityManager em) {\n Prestamo prestamo = new Prestamo().observaciones(DEFAULT_OBSERVACIONES).fechaFin(DEFAULT_FECHA_FIN);\n // Add required entity\n Libro libro;\n if (TestUtil.findAll(em, Libro.class).isEmpty()) {\n libro = LibroResourceIT.createEntity(em);\n em.persist(libro);\n em.flush();\n } else {\n libro = TestUtil.findAll(em, Libro.class).get(0);\n }\n prestamo.setLibro(libro);\n // Add required entity\n Persona persona;\n if (TestUtil.findAll(em, Persona.class).isEmpty()) {\n persona = PersonaResourceIT.createEntity(em);\n em.persist(persona);\n em.flush();\n } else {\n persona = TestUtil.findAll(em, Persona.class).get(0);\n }\n prestamo.setPersona(persona);\n // Add required entity\n User user = UserResourceIT.createEntity(em);\n em.persist(user);\n em.flush();\n prestamo.setUser(user);\n return prestamo;\n }", "default E create(E entity)\n throws TechnicalException, ConflictException {\n return create(entity, null);\n }", "public static Rentee createEntity(EntityManager em) {\n Rentee rentee = new Rentee();\n rentee = new Rentee()\n .firstName(DEFAULT_FIRST_NAME)\n .lastName(DEFAULT_LAST_NAME)\n .email(DEFAULT_EMAIL)\n .phoneNumber(DEFAULT_PHONE_NUMBER)\n .password(DEFAULT_PASSWORD);\n return rentee;\n }", "public static Pocket createEntity(EntityManager em) {\n Pocket pocket = new Pocket()\n .key(DEFAULT_KEY)\n .label(DEFAULT_LABEL)\n .startDateTime(DEFAULT_START_DATE_TIME)\n .endDateTime(DEFAULT_END_DATE_TIME)\n .amount(DEFAULT_AMOUNT)\n .reserved(DEFAULT_RESERVED);\n // Add required entity\n Balance balance = BalanceResourceIntTest.createEntity(em);\n em.persist(balance);\n em.flush();\n pocket.setBalance(balance);\n return pocket;\n }", "public static ItemSubstitution createEntity(EntityManager em) {\n ItemSubstitution itemSubstitution = new ItemSubstitution()\n .timestamp(DEFAULT_TIMESTAMP)\n .type(DEFAULT_TYPE)\n .substituteType(DEFAULT_SUBSTITUTE_TYPE)\n .substituteNo(DEFAULT_SUBSTITUTE_NO)\n .description(DEFAULT_DESCRIPTION)\n .isInterchangeable(DEFAULT_IS_INTERCHANGEABLE)\n .relationsLevel(DEFAULT_RELATIONS_LEVEL)\n .isCheckedToOriginal(DEFAULT_IS_CHECKED_TO_ORIGINAL)\n .origCheckDate(DEFAULT_ORIG_CHECK_DATE);\n // Add required entity\n Item item;\n if (TestUtil.findAll(em, Item.class).isEmpty()) {\n item = ItemResourceIT.createEntity(em);\n em.persist(item);\n em.flush();\n } else {\n item = TestUtil.findAll(em, Item.class).get(0);\n }\n itemSubstitution.getItems().add(item);\n return itemSubstitution;\n }", "E create(E entity, RequestContext context)\n throws TechnicalException, ConflictException;", "public static A createEntity(EntityManager em) {\n A a = new A();\n return a;\n }", "public static Edge createEntity(EntityManager em) {\n Edge edge = new Edge()\n .description(DEFAULT_DESCRIPTION);\n // Add required entity\n Stone from = StoneResourceIntTest.createEntity(em);\n em.persist(from);\n em.flush();\n edge.setFrom(from);\n // Add required entity\n Stone to = StoneResourceIntTest.createEntity(em);\n em.persist(to);\n em.flush();\n edge.setTo(to);\n return edge;\n }", "public static QuizQuestion createEntity(EntityManager em) {\n QuizQuestion quizQuestion = new QuizQuestion()\n .text(DEFAULT_TEXT)\n .description(DEFAULT_DESCRIPTION);\n // Add required entity\n Quiz quiz;\n if (TestUtil.findAll(em, Quiz.class).isEmpty()) {\n quiz = QuizResourceIT.createEntity(em);\n em.persist(quiz);\n em.flush();\n } else {\n quiz = TestUtil.findAll(em, Quiz.class).get(0);\n }\n quizQuestion.setQuiz(quiz);\n return quizQuestion;\n }", "public static Partida createEntity(EntityManager em) {\n Partida partida = new Partida()\n .dataPartida(DEFAULT_DATA_PARTIDA);\n return partida;\n }", "public T create(T entity) {\n\t \tgetEntityManager().getTransaction().begin();\n\t getEntityManager().persist(entity);\n\t getEntityManager().getTransaction().commit();\n\t getEntityManager().close();\n\t return entity;\n\t }", "public static Emprunt createEntity(EntityManager em) {\n Emprunt emprunt = new Emprunt()\n .dateEmprunt(DEFAULT_DATE_EMPRUNT);\n return emprunt;\n }", "public static SitAndGo createEntity(EntityManager em) {\n SitAndGo sitAndGo = new SitAndGo()\n .format(DEFAULT_FORMAT)\n .buyIn(DEFAULT_BUY_IN)\n .ranking(DEFAULT_RANKING)\n .profit(DEFAULT_PROFIT)\n .bounty(DEFAULT_BOUNTY);\n return sitAndGo;\n }", "public static Exercise createEntity(EntityManager em) {\n Exercise exercise = new Exercise()\n .minutes(DEFAULT_MINUTES);\n return exercise;\n }", "@Override\n\tpublic Entity createEntity() {\n\t\tEntity entity = new Entity(LINKS_ENTITY_KIND);\n\t\tentity.setProperty(id_property, ID);\n\t\tentity.setProperty(url_property, url);\n\t\tentity.setProperty(CategoryID_property, CategoryID);\n\t\tentity.setProperty(note_property, note);\n\t\tentity.setProperty(createdOn_property, createdOn);\n\t\tentity.setProperty(updatedOn_property, updatedOn);\t\t\t\n\t\treturn entity;\n\t}", "public static House createEntity(EntityManager em) {\n House house = new House()\n .houseName(DEFAULT_HOUSE_NAME)\n .houseNo(DEFAULT_HOUSE_NO)\n .address(DEFAULT_ADDRESS)\n .houseToFloorNo(DEFAULT_HOUSE_TO_FLOOR_NO)\n .ownToFloorNo(DEFAULT_OWN_TO_FLOOR_NO)\n .lat(DEFAULT_LAT)\n .lon(DEFAULT_LON)\n .createdate(DEFAULT_CREATEDATE)\n .createBy(DEFAULT_CREATE_BY)\n .updateDate(DEFAULT_UPDATE_DATE)\n .updateBy(DEFAULT_UPDATE_BY)\n .image(DEFAULT_IMAGE)\n .imageContentType(DEFAULT_IMAGE_CONTENT_TYPE);\n // Add required entity\n Country country = CountryResourceIntTest.createEntity(em);\n em.persist(country);\n em.flush();\n house.setCountry(country);\n // Add required entity\n State state = StateResourceIntTest.createEntity(em);\n em.persist(state);\n em.flush();\n house.setState(state);\n // Add required entity\n City city = CityResourceIntTest.createEntity(em);\n em.persist(city);\n em.flush();\n house.setCity(city);\n // Add required entity\n Profile profile = ProfileResourceIntTest.createEntity(em);\n em.persist(profile);\n em.flush();\n house.setProfile(profile);\n // Add required entity\n User user = UserResourceIntTest.createEntity(em);\n em.persist(user);\n em.flush();\n house.setUser(user);\n return house;\n }", "public static CourtType createEntity(EntityManager em) {\n CourtType courtType = new CourtType()\n .type(DEFAULT_TYPE);\n return courtType;\n }", "@Override\r\n public void createNewEntity(String entityName) {\n\r\n }", "public static Ailment createEntity(EntityManager em) {\n Ailment ailment = new Ailment()\n .name(DEFAULT_NAME)\n .symptoms(DEFAULT_SYMPTOMS)\n .treatments(DEFAULT_TREATMENTS);\n return ailment;\n }", "public static Articulo createEntity(EntityManager em) {\n Articulo articulo = new Articulo()\n .titulo(DEFAULT_TITULO)\n .contenido(DEFAULT_CONTENIDO)\n .fechaCreacion(DEFAULT_FECHA_CREACION);\n return articulo;\n }", "void create(Student entity);", "public static TipoLocal createEntity(EntityManager em) {\n TipoLocal tipoLocal = new TipoLocal()\n .tipo(DEFAULT_TIPO);\n return tipoLocal;\n }", "public static Testtable2 createEntity(EntityManager em) {\n Testtable2 testtable2 = new Testtable2();\n testtable2.setColumn2(DEFAULT_COLUMN_2);\n return testtable2;\n }", "@Override\n\tprotected CoreEntity createNewEntity() {\n\t\treturn null;\n\t}", "public static OrderItem createEntity(EntityManager em) {\n OrderItem orderItem = new OrderItem().quantity(DEFAULT_QUANTITY).totalPrice(DEFAULT_TOTAL_PRICE).status(DEFAULT_STATUS);\n return orderItem;\n }", "public static Arrete createEntity(EntityManager em) {\n Arrete arrete = new Arrete()\n .intituleArrete(DEFAULT_INTITULE_ARRETE)\n .numeroArrete(DEFAULT_NUMERO_ARRETE)\n .dateSignature(DEFAULT_DATE_SIGNATURE)\n .nombreAgrement(DEFAULT_NOMBRE_AGREMENT);\n return arrete;\n }", "public static Tenant createEntity() {\n return new Tenant();\n }", "public static MyOrders createEntity(EntityManager em) {\n MyOrders myOrders = new MyOrders();\n return myOrders;\n }", "public static Enseigner createEntity(EntityManager em) {\n Enseigner enseigner = new Enseigner().dateDebut(DEFAULT_DATE_DEBUT).dateFin(DEFAULT_DATE_FIN);\n return enseigner;\n }", "@Test\n public void eventEntityConstructionTest() {\n\n Event event = new EventEntity();\n\n assertThat(event).isNotNull();\n\n }", "public static EnteteVente createEntity(EntityManager em) {\n EnteteVente enteteVente = new EnteteVente()\n .enteteVenteType(DEFAULT_ENTETE_VENTE_TYPE)\n .enteteVenteTotalHT(DEFAULT_ENTETE_VENTE_TOTAL_HT)\n .enteteVenteTotalTTC(DEFAULT_ENTETE_VENTE_TOTAL_TTC)\n .enteteVenteDateCreation(DEFAULT_ENTETE_VENTE_DATE_CREATION);\n return enteteVente;\n }", "public void createNewObject(Representation entity) throws ResourceException {\r\n\t\tT entry = createObjectFromHeaders(null, entity);\r\n\t\texecuteUpdate(entity, entry, createUpdateObject(entry));\r\n\r\n\t}", "public static Organizer createEntity(EntityManager em) {\n Organizer organizer = new Organizer()\n .name(DEFAULT_NAME)\n .description(DEFAULT_DESCRIPTION)\n .facebook(DEFAULT_FACEBOOK)\n .twitter(DEFAULT_TWITTER);\n // Add required entity\n User user = UserResourceIntTest.createEntity(em);\n em.persist(user);\n em.flush();\n organizer.setUser(user);\n return organizer;\n }", "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 }", "public static FillingGapsTestItem createEntity(EntityManager em) {\n FillingGapsTestItem fillingGapsTestItem = new FillingGapsTestItem()\n .question(DEFAULT_QUESTION);\n return fillingGapsTestItem;\n }", "public Entity build();", "@Test\n public void createQuejaEntityTest() {\n PodamFactory factory = new PodamFactoryImpl();\n QuejaEntity newEntity = factory.manufacturePojo(QuejaEntity.class);\n QuejaEntity result = quejaPersistence.create(newEntity);\n\n Assert.assertNotNull(result);\n QuejaEntity entity = em.find(QuejaEntity.class, result.getId());\n Assert.assertNotNull(entity);\n Assert.assertEquals(newEntity.getName(), entity.getName());\n}", "public abstract boolean create(T entity) throws ServiceException;", "public static Acheteur createEntity(EntityManager em) {\n Acheteur acheteur = new Acheteur()\n .typeClient(DEFAULT_TYPE_CLIENT)\n .nom(DEFAULT_NOM)\n .prenom(DEFAULT_PRENOM)\n .tel(DEFAULT_TEL)\n .cnib(DEFAULT_CNIB)\n .email(DEFAULT_EMAIL)\n .adresse(DEFAULT_ADRESSE)\n .numroBanquaire(DEFAULT_NUMRO_BANQUAIRE)\n .deleted(DEFAULT_DELETED);\n return acheteur;\n }", "public static RoomGenericProduct createEntity(EntityManager em) {\n RoomGenericProduct roomGenericProduct = new RoomGenericProduct()\n .quantity(DEFAULT_QUANTITY)\n .quantityUnit(DEFAULT_QUANTITY_UNIT);\n return roomGenericProduct;\n }", "public static TypeOeuvre createEntity(EntityManager em) {\n TypeOeuvre typeOeuvre = new TypeOeuvre()\n .intitule(DEFAULT_INTITULE);\n return typeOeuvre;\n }", "public static Reservation createEntity(EntityManager em) {\n Reservation reservation = ReservationTest.buildReservationTest(1L);\n //reservation.setUser(User.builder().email(\"adfad\").name(\"\").build());\n return reservation;\n }", "@Test\n public void testNewEntity() throws Exception {\n\n }", "public static Model createEntity(EntityManager em) {\n\t\tModel model = new Model().name(DEFAULT_NAME).type(DEFAULT_TYPE).algorithm(DEFAULT_ALGORITHM)\n\t\t\t\t.status(DEFAULT_STATUS).owner(DEFAULT_OWNER).performanceMetrics(DEFAULT_PERFORMANCE_METRICS)\n\t\t\t\t.modelLocation(DEFAULT_MODEL_LOCATION).featureSignificance(DEFAULT_FEATURE_SIGNIFICANCE)\n\t\t\t\t.builderConfig(DEFAULT_BUILDER_CONFIG).createdDate(DEFAULT_CREATED_DATE)\n\t\t\t\t.deployedDate(DEFAULT_DEPLOYED_DATE).trainingDataset(DEFAULT_TRAINING_DATASET)\n .library(DEFAULT_LIBRARY).project(DEFAULT_PROJECT).version(DEFAULT_VERSION);\n\t\treturn model;\n\t}", "public static ProcessExecution createEntity(EntityManager em) {\n ProcessExecution processExecution = new ProcessExecution()\n .execution(DEFAULT_EXECUTION);\n return processExecution;\n }", "public static Paiement createEntity(EntityManager em) {\n Paiement paiement = new Paiement()\n .dateTransation(DEFAULT_DATE_TRANSATION)\n .montantTTC(DEFAULT_MONTANT_TTC);\n return paiement;\n }", "public static Article createEntity(EntityManager em) {\n Article article = new Article()\n .name(DEFAULT_NAME)\n .content(DEFAULT_CONTENT)\n .creationDate(DEFAULT_CREATION_DATE)\n .modificationDate(DEFAULT_MODIFICATION_DATE);\n return article;\n }", "T makePersistent(T entity);", "void buildFromEntity(E entity);", "public static XepLoai createEntity(EntityManager em) {\n XepLoai xepLoai = new XepLoai()\n .tenXepLoai(DEFAULT_TEN_XEP_LOAI);\n return xepLoai;\n }", "public static Lot createEntity(EntityManager em) {\n Lot lot = new Lot()\n .createdAt(DEFAULT_CREATED_AT)\n .updatedAt(DEFAULT_UPDATED_AT)\n .qte(DEFAULT_QTE)\n .qtUg(DEFAULT_QT_UG)\n .num(DEFAULT_NUM)\n .dateFabrication(DEFAULT_DATE_FABRICATION)\n .peremption(DEFAULT_PEREMPTION)\n .peremptionstatus(DEFAULT_PEREMPTIONSTATUS);\n return lot;\n }", "private MetaEntityImpl createMetaEntity(Class<?> entityType) {\n String className = entityType.getSimpleName();\n MetaEntityImpl managedEntity = new MetaEntityImpl();\n managedEntity.setEntityType(entityType);\n managedEntity.setName(className);\n ((MetaTableImpl) managedEntity.getTable()).setName(className);\n ((MetaTableImpl) managedEntity.getTable()).setKeySpace(environment.getConfiguration().getKeySpace());\n return managedEntity;\n }", "public TransporteTerrestreEntity createTransporte(TransporteTerrestreEntity transporteEntity) throws BusinessLogicException {\n LOGGER.log(Level.INFO, \"Inicia proceso de creación del transporte\");\n super.createTransporte(transporteEntity);\n\n \n persistence.create(transporteEntity);\n LOGGER.log(Level.INFO, \"Termina proceso de creación del transporte\");\n return transporteEntity;\n }", "public static TaskComment createEntity(EntityManager em) {\n TaskComment taskComment = new TaskComment()\n .value(DEFAULT_VALUE);\n // Add required entity\n Task newTask = TaskResourceIT.createEntity(em);\n Task task = TestUtil.findAll(em, Task.class).stream()\n .filter(x -> x.getId().equals(newTask.getId()))\n .findAny().orElse(null);\n if (task == null) {\n task = newTask;\n em.persist(task);\n em.flush();\n }\n taskComment.setTask(task);\n return taskComment;\n }", "public static EmployeeCars createEntity(EntityManager em) {\n EmployeeCars employeeCars = new EmployeeCars()\n .previousReading(DEFAULT_PREVIOUS_READING)\n .currentReading(DEFAULT_CURRENT_READING)\n .workingDays(DEFAULT_WORKING_DAYS)\n .updateDate(DEFAULT_UPDATE_DATE);\n // Add required entity\n Employee employee = EmployeeResourceIT.createEntity(em);\n em.persist(employee);\n em.flush();\n employeeCars.setEmployee(employee);\n // Add required entity\n Car car = CarResourceIT.createEntity(em);\n em.persist(car);\n em.flush();\n employeeCars.setCar(car);\n return employeeCars;\n }", "public static Personel createEntity(EntityManager em) {\n Personel personel = new Personel()\n .fistname(DEFAULT_FISTNAME)\n .lastname(DEFAULT_LASTNAME)\n .sexe(DEFAULT_SEXE);\n return personel;\n }", "public static Ordre createEntity(EntityManager em) {\n Ordre ordre = new Ordre()\n .name(DEFAULT_NAME)\n .status(DEFAULT_STATUS)\n .price(DEFAULT_PRICE)\n .creationDate(DEFAULT_CREATION_DATE);\n return ordre;\n }", "public static Territorio createEntity(EntityManager em) {\n Territorio territorio = new Territorio().nome(DEFAULT_NOME);\n return territorio;\n }", "@Override\n @LogMethod\n public T create(T entity) throws InventoryException {\n \tInventoryHelper.checkNull(entity, \"entity\");\n repository.persist(entity);\n return repository.getByKey(entity.getId());\n }", "public static Poen createEntity(EntityManager em) {\n Poen poen = new Poen()\n .tip(DEFAULT_TIP);\n return poen;\n }", "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 static Unidade createEntity(EntityManager em) {\n Unidade unidade = new Unidade()\n .descricao(DEFAULT_DESCRICAO)\n .sigla(DEFAULT_SIGLA)\n .situacao(DEFAULT_SITUACAO)\n .controleDeEstoque(DEFAULT_CONTROLE_DE_ESTOQUE)\n .idAlmoxarifado(DEFAULT_ID_ALMOXARIFADO)\n .andar(DEFAULT_ANDAR)\n .capacidade(DEFAULT_CAPACIDADE)\n .horarioInicio(DEFAULT_HORARIO_INICIO)\n .horarioFim(DEFAULT_HORARIO_FIM)\n .localExame(DEFAULT_LOCAL_EXAME)\n .rotinaDeFuncionamento(DEFAULT_ROTINA_DE_FUNCIONAMENTO)\n .anexoDocumento(DEFAULT_ANEXO_DOCUMENTO)\n .setor(DEFAULT_SETOR)\n .idCentroDeAtividade(DEFAULT_ID_CENTRO_DE_ATIVIDADE)\n .idChefia(DEFAULT_ID_CHEFIA);\n // Add required entity\n TipoUnidade tipoUnidade;\n if (TestUtil.findAll(em, TipoUnidade.class).isEmpty()) {\n tipoUnidade = TipoUnidadeResourceIT.createEntity(em);\n em.persist(tipoUnidade);\n em.flush();\n } else {\n tipoUnidade = TestUtil.findAll(em, TipoUnidade.class).get(0);\n }\n unidade.setTipoUnidade(tipoUnidade);\n return unidade;\n }", "public void spawnEntity(AEntityB_Existing entity){\r\n\t\tBuilderEntityExisting builder = new BuilderEntityExisting(entity.world.world);\r\n\t\tbuilder.loadedFromSavedNBT = true;\r\n\t\tbuilder.setPositionAndRotation(entity.position.x, entity.position.y, entity.position.z, (float) -entity.angles.y, (float) entity.angles.x);\r\n\t\tbuilder.entity = entity;\r\n\t\tworld.spawnEntity(builder);\r\n }", "public static Book createEntity() {\n Book book = new Book()\n .idBook(DEFAULT_ID_BOOK)\n .isbn(DEFAULT_ISBN)\n .title(DEFAULT_TITLE)\n .author(DEFAULT_AUTHOR)\n .year(DEFAULT_YEAR)\n .publisher(DEFAULT_PUBLISHER)\n .url_s(DEFAULT_URL_S)\n .url_m(DEFAULT_URL_M)\n .url_l(DEFAULT_URL_L);\n return book;\n }", "private void createTestData() {\n StoreEntity store = new StoreEntity();\n store.setStoreName(DEFAULT_STORE_NAME);\n store.setPecEmail(DEFAULT_PEC);\n store.setPhone(DEFAULT_PHONE);\n store.setImagePath(DEFAULT_IMAGE_PATH);\n store.setDefaultPassCode(STORE_DEFAULT_PASS_CODE);\n store.setStoreCap(DEFAULT_STORE_CAP);\n store.setCustomersInside(DEFAULT_CUSTOMERS_INSIDE);\n store.setAddress(new AddressEntity());\n\n // Create users for store.\n UserEntity manager = new UserEntity();\n manager.setUsercode(USER_CODE_MANAGER);\n manager.setRole(UserRole.MANAGER);\n\n UserEntity employee = new UserEntity();\n employee.setUsercode(USER_CODE_EMPLOYEE);\n employee.setRole(UserRole.EMPLOYEE);\n\n store.addUser(manager);\n store.addUser(employee);\n\n // Create a new ticket.\n TicketEntity ticket = new TicketEntity();\n ticket.setPassCode(INIT_PASS_CODE);\n ticket.setCustomerId(INIT_CUSTOMER_ID);\n ticket.setDate(new Date(new java.util.Date().getTime()));\n\n ticket.setArrivalTime(new Time(new java.util.Date().getTime()));\n ticket.setPassStatus(PassStatus.VALID);\n ticket.setQueueNumber(INIT_TICKET_QUEUE_NUMBER);\n store.addTicket(ticket);\n\n // Persist data.\n em.getTransaction().begin();\n\n em.persist(store);\n em.flush();\n\n // Saving ID generated from SQL after the persist.\n LAST_TICKET_ID = ticket.getTicketId();\n LAST_STORE_ID = store.getStoreId();\n LAST_MANAGER_ID = manager.getUserId();\n LAST_EMPLOYEE_ID = employee.getUserId();\n\n em.getTransaction().commit();\n }", "@Test\n public void testNewEntity_0args() {\n // newEntity() is not implemented!\n }", "public Camp newEntity() { return new Camp(); }", "public static NoteMaster createEntity(EntityManager em) {\n NoteMaster noteMaster = new NoteMaster()\n .semestre(DEFAULT_SEMESTRE)\n .noteCC1(DEFAULT_NOTE_CC_1)\n .noteCC2(DEFAULT_NOTE_CC_2)\n .noteFinal(DEFAULT_NOTE_FINAL)\n .date(DEFAULT_DATE);\n return noteMaster;\n }", "T create() throws PersistException;", "private EntityDef createEntityDef(Class<?> entityClass)\n {\n\t\tif (entityClass.isAnnotationPresent(InheritanceSingleTable.class)) {\n return new SingleTableSubclass.SingleTableSuperclass(entityClass);\n } else if (entityClass.getSuperclass().isAnnotationPresent(InheritanceSingleTable.class)) {\n return new SingleTableSubclass(entityClass);\n } else {\n return new EntityDef(entityClass);\n }\n\t}", "public static Restaurant createEntity(EntityManager em) {\n Restaurant restaurant = new Restaurant()\n .restaurantName(DEFAULT_RESTAURANT_NAME)\n .deliveryPrice(DEFAULT_DELIVERY_PRICE)\n .restaurantAddress(DEFAULT_RESTAURANT_ADDRESS)\n .restaurantCity(DEFAULT_RESTAURANT_CITY);\n return restaurant;\n }", "@Override\n\tpublic EmploieType creer(EmploieType entity) throws InvalideTogetException {\n\t\treturn emploieTypeRepository.save(entity);\n\t}", "public static Team createEntity(EntityManager em) {\n Team team = new Team().name(DEFAULT_NAME).description(DEFAULT_DESCRIPTION)\n .level(DEFAULT_LEVEL).totalMember(DEFAULT_TOTAL_MEMBER)\n .extraGroupName(DEFAULT_EXTRA_GROUP_NAME)\n .extraGroupDescription(DEFAULT_EXTRA_GROUP_DESCRIPTION)\n .extraGroupTotalMember(DEFAULT_EXTRA_GROUP_TOTAL_MEMBER);\n return team;\n }", "public static Produit createEntity(EntityManager em) {\n Produit produit = new Produit()\n .designation(DEFAULT_DESIGNATION)\n .soldeInit(DEFAULT_SOLDE_INIT)\n .prixAchat(DEFAULT_PRIX_ACHAT)\n .prixVente(DEFAULT_PRIX_VENTE)\n .quantiteDispo(DEFAULT_QUANTITE_DISPO)\n .quantiteInit(DEFAULT_QUANTITE_INIT)\n .seuilReaprov(DEFAULT_SEUIL_REAPROV)\n .reference(DEFAULT_REFERENCE);\n return produit;\n }", "public void constructEntity (EntityBuilder entityBuilder, Position position){\n entityBuilder.createEntity();\n entityBuilder.buildPosition(position);\n entityBuilder.buildName();\n entityBuilder.buildPosition();\n entityBuilder.buildContComp();\n entityBuilder.buildPhysComp(length, width);\n entityBuilder.buildGraphComp(length, width);\n }" ]
[ "0.77223766", "0.75040364", "0.7487764", "0.7361146", "0.7314088", "0.7155444", "0.7155444", "0.71508443", "0.71501833", "0.7076941", "0.7016207", "0.68038535", "0.6752083", "0.6740013", "0.6740013", "0.6680824", "0.6665985", "0.663898", "0.6624753", "0.66239864", "0.66062766", "0.6588076", "0.65741205", "0.65738904", "0.6565422", "0.65507466", "0.65312135", "0.65289855", "0.64802164", "0.6419721", "0.6386806", "0.63750476", "0.63672817", "0.631241", "0.62969697", "0.6293083", "0.62576646", "0.62457734", "0.62417525", "0.6239994", "0.62176675", "0.62077993", "0.61826813", "0.6180988", "0.61741346", "0.6169904", "0.6163465", "0.6160396", "0.61590004", "0.6154072", "0.61496913", "0.61431074", "0.61355835", "0.6134142", "0.6128584", "0.6123726", "0.6121456", "0.61063594", "0.61055994", "0.61029744", "0.609226", "0.6091219", "0.6081656", "0.6073185", "0.60684645", "0.6066391", "0.60655123", "0.60635966", "0.6057748", "0.60507774", "0.6040563", "0.60374224", "0.6031736", "0.6027124", "0.6022088", "0.6020535", "0.6019904", "0.6015163", "0.6012759", "0.60126454", "0.600218", "0.6001131", "0.60010207", "0.60006684", "0.5995131", "0.59929967", "0.59806895", "0.59771955", "0.59735453", "0.5972616", "0.59671843", "0.596312", "0.596249", "0.595235", "0.5945475", "0.5943175", "0.5941982", "0.59372675", "0.59296906", "0.5929454" ]
0.67108333
15
If o is a proctor Payload object, then print just the contents of the payload, otherwise just pretty print the object.
public static String prettyPrintJSONPayloadContents(final Object o) throws IOException, JsonGenerationException, JsonMappingException { if (o != null && o instanceof Payload) { final Payload p = (Payload) o; return OBJECT_MAPPER.writerWithDefaultPrettyPrinter().writeValueAsString(p.fetchAValue()); } else { return OBJECT_MAPPER.writerWithDefaultPrettyPrinter().writeValueAsString(o); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String printPayloadType(final Object o) throws IOException, JsonGenerationException, JsonMappingException {\n if (o != null && o instanceof Payload) {\n final Payload p = (Payload) o;\n return p.fetchType();\n } else {\n return \"none\";\n }\n }", "public void print(Object o) {\n\t\tSystem.out.println(o);\n\t}", "public static void print(Object o) {\r\n System.out.println(o);\r\n }", "public void print(Object obj) {\n print(obj.toString());\n }", "static void pr(Object anyObject){\n\t\tSystem.out.println(anyObject);\n\t\t\n\t}", "public void print(Object someObj) {\r\n this.print(someObj.toString());\r\n }", "void visualize(Object o) {\n\t\tif (o == null) {\n\t\t\to = new NullObject();\n\t\t}\n\n\t\tScratch scratch = scratchFactory.create(o);\n\t\tscratch.addCSSClass(\"printOut\");\n\n\t\tvisualizeScratch(scratch);\n\t}", "public void print(Object o) {\n\t\tsynchronized (out) {\n\t\t\tout.print(o);\n\t\t\tout.flush();\n\t\t}\n\t}", "public static void print(Object o)\n\t{\n\t\tif(m_debugFlag) {\n\t\t\tSystem.out.print(o.toString());\n\t\t}\n\t}", "private void out(Object obj) {\r\n\t\tSystem.out.println(deb + obj.toString());\r\n\t}", "private String stackObjToString(Object o)\n {\n if (o instanceof byte[])\n return BtcUtil.hexOut((byte[]) o);\n else\n return o.toString();\n }", "private void displayMsg(Object o) {\n Message msg = ((Datapacket)o).getMsg();\n client.printMessage(msg);\n }", "public void println(Object o) {\n\t\tif (o == null) {\n\t\t\treturn;\n\t\t}\n\t\tsynchronized (out) {\n\t\t\tprintline(o);\n\t\t}\n\t}", "public void println(Object o) throws IOException {\n\t\tprint(o);\n\t\toutputStream.write('\\n');\n\t}", "void p(Object o) {\r\n\t\tutils.log(o);\r\n\t}", "public static void println(Object o)\n\t{\n\t\tif(m_debugFlag) {\n\t\t\tSystem.out.println(o.toString());\n\t\t}\n\t}", "public void dump(Object o) throws Exception {\r\n\r\n \tif (o instanceof Message) {\r\n\t dumpEnvelope((Message)o);\r\n }\r\n \tif (o instanceof Part) {\r\n System.out.println(\"CONTENT-TYPE: \"+((Part)o).getContentType());\r\n \t o = ((Part)o).getContent();\r\n \t}\r\n\tif (o instanceof EncryptedContent) {\r\n // encrypted\r\n System.out.println(\"This message is encrypted!\");\r\n EncryptedContent ec = (EncryptedContent)o;\r\n ec.decryptSymmetricKey(privateKey, 0);\r\n dump(ec.getContent());\r\n\t} else if (o instanceof SignedContent) {\r\n // signed\r\n\t System.out.println(\"This message is signed!\");\r\n SignedContent sc = (SignedContent)o;\r\n\r\n if (sc.getSMimeType().equals(\"certs-only\")) {\r\n // message only transfers certificates\r\n \t System.out.println(\"This message contains only certificates!\");\r\n Certificate[] certs = sc.getCertificates();\r\n for (int i = 0; i < certs.length; ++i) {\r\n System.out.println(certs[i].toString());\r\n }\r\n } else {\r\n // message is signed\r\n X509Certificate signer = null;\r\n try {\r\n signer = sc.verify();\r\n\t System.out.println(\"This message is signed from: \"+signer.getSubjectDN());\r\n\t \r\n\t X509Certificate[] certs = iaik.utils.Util.convertCertificateChain(sc.getCertificates());\r\n // arrange chain to get user cert at index 0\r\n\t certs = iaik.utils.Util.arrangeCertificateChain(certs,false);\r\n\t if (certs != null) {\r\n\t // verify certs and search for trusted cert in chain\r\n try {\r\n trustVerifier.verifyCertificateChain(certs);\r\n System.out.println(\"Certificate chain trusted!\");\r\n } catch (CertificateException ex) {\r\n\t System.out.println(\"Certificate chain not trusted!\");\r\n }\t \r\n\t } // else: there may be more certs in the cert set: do some more sophisticated verification\r\n\t } catch (SignatureException ex) {\r\n\t throw new SignatureException(\"Signature verification error!\" + ex.getMessage());\r\n }\r\n\r\n // is email in cert equal to email from From: header?\r\n // the email has to be formatted as an \"addr-spec\" as defined in RFC 822.\r\n // An addr-spec has the form \"local-part@domain\".\r\n if (trustVerifier.checkEMail(from, signer)) {\r\n System.out.println(\"EMail is ok!\");\r\n } else {\r\n System.out.println(\"EMail not ok!\");\r\n }\r\n\r\n SignerInfo[] signer_infos = sc.getSignerInfos();\r\n for (int i=0; i<signer_infos.length; i++) {\r\n Attribute[] signedAttributes = signer_infos[i].getSignedAttributes();\r\n if (signedAttributes != null) {\r\n System.out.println(\"SignerInfo \" + i + \" contains the following signed attributes:\");\r\n for (int j = 0; j < signedAttributes.length; j++) {\r\n System.out.println(signedAttributes[j].getType().getName());\r\n System.out.println(signedAttributes[j]);\r\n System.out.println();\r\n } \r\n }\r\n Attribute[] unsignedAttributes = signer_infos[i].getUnsignedAttributes();\r\n if (unsignedAttributes != null) {\r\n System.out.println(\"SignerInfo \" + i + \" contains the following unsigned attributes:\");\r\n for (int j = 0; j < unsignedAttributes.length; j++) {\r\n System.out.println(unsignedAttributes[j].getType().getName());\r\n } \r\n } \r\n }\r\n\r\n dump(sc.getContent());\r\n }\r\n } else if (o instanceof PKCS10Content) {\r\n System.out.println(\"This message contains a certificate request:\");\r\n PKCS10Content pkcs10 = (PKCS10Content)o;\r\n CertificateRequest request = pkcs10.getCertRequest();\r\n System.out.println(request.toString());\r\n try {\r\n if (request.verify())\r\n System.out.println(\"Request verification ok for \" + request.getSubject());\r\n else\r\n System.out.println(\"Request verification error for \" + request.getSubject());\r\n } catch (SignatureException ex) {\r\n throw new SignatureException(\"Request verification error for \" + request.getSubject());\r\n }\r\n } else if (o instanceof String) {\r\n\t System.out.println(\"Content is a String\");\r\n\t System.out.println(\"---------------------------\");\r\n\t System.out.println((String)o);\r\n\t} else if (o instanceof Multipart) {\r\n\t System.out.println(\"----------------> Content is a Multipart\");\r\n\t Multipart mp = (Multipart)o;\r\n\t int count = mp.getCount();\r\n\t for (int i = 0; i < count; i++) {\r\n \t System.out.println(\"----------------> Multipart: \"+(i+1));\r\n dump(mp.getBodyPart(i));\r\n }\r\n\t System.out.println(\"----------------> End of Multipart\");\r\n \t} else if (o instanceof Message) {\r\n\t System.out.println(\"Content is a Nested Message\");\r\n\t System.out.println(\"---------------------------\");\r\n\t dump(o);\r\n\t} else if (o instanceof InputStream) {\r\n\t System.out.println(\"Content is just an input stream: \"+o);\r\n\t System.out.println(\"---------------------------\");\r\n\t InputStream is = (InputStream)o;\r\n\t int a;\r\n\t int sum = 0;\r\n\t byte[] buf = new byte[1024];\r\n\t while ((a = is.read(buf)) > 0) {\r\n sum += a;\r\n }\r\n\t System.out.println(\"Length of data: \"+sum+\" bytes\");\r\n \t}\r\n }", "public void println(Object obj) {\n println(obj.toString());\n }", "public static void myPrintln(Object... o)\n {\n for (int i = 0; i < o.length; i++)\n {\n System.out.print(o[i] + \" \");\n }\n System.out.println();\n }", "private void printline(Object o) {\n\t\tprint(o + newline);\n\t}", "public void print(Object o) throws IOException {\n\t\tfor (char c: String.valueOf(o).toCharArray()) outputStream.write(c);\n\t}", "private static void println(Object... obj) {\r\n\t\tif (obj.length == 0) {\r\n\t\t\tSystem.out.println();\r\n\t\t} else {\r\n\t\t\tSystem.out.println(obj[0]);\r\n\t\t}\r\n\t}", "private String toIndentedString(java.lang.Object o) {\n\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n\");\n }", "private String toIndentedString(java.lang.Object o) {\n\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n\");\n }", "private String toIndentedString(java.lang.Object o) {\n\t\tif (o == null) {\n\t\t\treturn \"null\";\n\t\t}\n\t\treturn o.toString().replace(\"\\n\", \"\\n \");\n\t}", "private String toIndentedString(java.lang.Object o) {\n\t\tif (o == null) {\n\t\t\treturn \"null\";\n\t\t}\n\t\treturn o.toString().replace(\"\\n\", \"\\n \");\n\t}", "private String toIndentedString(java.lang.Object o) {\n\t\tif (o == null) {\n\t\t\treturn \"null\";\n\t\t}\n\t\treturn o.toString().replace(\"\\n\", \"\\n \");\n\t}", "private String toIndentedString(java.lang.Object o) {\n\t\tif (o == null) {\n\t\t\treturn \"null\";\n\t\t}\n\t\treturn o.toString().replace(\"\\n\", \"\\n \");\n\t}", "private String toIndentedString(java.lang.Object o) {\n\t\tif (o == null) {\n\t\t\treturn \"null\";\n\t\t}\n\t\treturn o.toString().replace(\"\\n\", \"\\n \");\n\t}", "private String toIndentedString(java.lang.Object o) {\n\t\tif (o == null) {\n\t\t\treturn \"null\";\n\t\t}\n\t\treturn o.toString().replace(\"\\n\", \"\\n \");\n\t}", "private String toIndentedString(java.lang.Object o) {\n\t\tif (o == null) {\n\t\t\treturn \"null\";\n\t\t}\n\t\treturn o.toString().replace(\"\\n\", \"\\n \");\n\t}", "private String toIndentedString(java.lang.Object o) {\n\t\tif (o == null) {\n\t\t\treturn \"null\";\n\t\t}\n\t\treturn o.toString().replace(\"\\n\", \"\\n \");\n\t}", "private String toIndentedString(java.lang.Object o) {\n\t\tif (o == null) {\n\t\t\treturn \"null\";\n\t\t}\n\t\treturn o.toString().replace(\"\\n\", \"\\n \");\n\t}", "private String toIndentedString(java.lang.Object o) {\n\t\tif (o == null) {\n\t\t\treturn \"null\";\n\t\t}\n\t\treturn o.toString().replace(\"\\n\", \"\\n \");\n\t}", "private String toIndentedString(java.lang.Object o) {\n\t\tif (o == null) {\n\t\t\treturn \"null\";\n\t\t}\n\t\treturn o.toString().replace(\"\\n\", \"\\n \");\n\t}", "private String toIndentedString(java.lang.Object o) {\n\t\tif (o == null) {\n\t\t\treturn \"null\";\n\t\t}\n\t\treturn o.toString().replace(\"\\n\", \"\\n \");\n\t}", "private String toIndentedString(java.lang.Object o) {\n\t\tif (o == null) {\n\t\t\treturn \"null\";\n\t\t}\n\t\treturn o.toString().replace(\"\\n\", \"\\n \");\n\t}", "private String toIndentedString(java.lang.Object o) {\n\t\tif (o == null) {\n\t\t\treturn \"null\";\n\t\t}\n\t\treturn o.toString().replace(\"\\n\", \"\\n \");\n\t}", "private String toIndentedString(java.lang.Object o) {\n\t\tif (o == null) {\n\t\t\treturn \"null\";\n\t\t}\n\t\treturn o.toString().replace(\"\\n\", \"\\n \");\n\t}", "private String toIndentedString(java.lang.Object o) {\n\t\tif (o == null) {\n\t\t\treturn \"null\";\n\t\t}\n\t\treturn o.toString().replace(\"\\n\", \"\\n \");\n\t}", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "public String toString(Object o) { return Objects.toString(o,null); }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "public static void printnb(Object o) {\r\n System.out.print(o);\r\n }", "private String toIndentedString(java.lang.Object o)\n {\n if (o == null) { return \"null\"; }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(java.lang.Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }" ]
[ "0.73097736", "0.67785734", "0.6526215", "0.6417516", "0.63544494", "0.6342907", "0.62611955", "0.6235793", "0.6218369", "0.61755085", "0.6168863", "0.61174893", "0.6077373", "0.6031496", "0.598072", "0.5967911", "0.5949141", "0.59459853", "0.59150124", "0.5880307", "0.5873246", "0.5863096", "0.58251655", "0.58251655", "0.5744366", "0.5744366", "0.5744366", "0.5744366", "0.5744366", "0.5744366", "0.5744366", "0.5744366", "0.5744366", "0.5744366", "0.5744366", "0.5744366", "0.5744366", "0.5744366", "0.5744366", "0.5744366", "0.57419634", "0.5740577", "0.5723902", "0.5720392", "0.5717639", "0.57046735", "0.57046735", "0.57046735", "0.57046735", "0.57046735", "0.57046735", "0.57046735", "0.57046735", "0.57046735", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824", "0.57019824" ]
0.7443002
0
If o is a proctor Payload object, then return its type as a string, otherwise return "none".
public static String printPayloadType(final Object o) throws IOException, JsonGenerationException, JsonMappingException { if (o != null && o instanceof Payload) { final Payload p = (Payload) o; return p.fetchType(); } else { return "none"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getTypeAsString();", "@SuppressWarnings(\"rawtypes\")\n\tprotected static String asString(Object o){\n\t\tif(o == null)\n\t\t\treturn \"null\";\n\t\tif(o instanceof Integer)\n\t\t\treturn ((Integer)o).toString() + \" [Java]\";\n\t\tif(o instanceof String)\n\t\t\treturn ((String)o) + \" [Java]\";\n\t\tif(o instanceof IValue)\n\t\t\treturn ((IValue) o).toString() +\" [IValue]\";\n\t\tif(o instanceof Type)\n\t\t\treturn ((Type) o).toString() + \" [Type]\";\n\t\tif(o instanceof Object[]){\n\t\t\tStringBuilder w = new StringBuilder();\n\t\t\tObject[] lst = (Object[]) o;\n\t\t\tw.append(\"[\");\n\t\t\tfor(int i = 0; i < lst.length; i++){\n\t\t\t\tw.append(asString(lst[i]));\n\t\t\t\tif(i < lst.length - 1)\n\t\t\t\t\t\tw.append(\", \");\n\t\t\t}\n\t\t\tw.append(\"]\");\n\t\t\treturn w.toString() + \" [Object[]]\";\n\t\t}\n\t\tif(o instanceof Coroutine){\n\t\t\tif(((Coroutine)o).frame != null && ((Coroutine)o).frame.function != null){\n\t\t\t\treturn \"Coroutine[\" + ((Coroutine)o).frame.function.getName() + \"]\";\n\t\t\t} else {\n\t\t\t\treturn \"Coroutine[**no name**]\";\n\t\t\t}\n\t\t}\n\t\tif(o instanceof Function){\n\t\t\treturn \"Function[\" + ((Function)o).getName() + \"]\";\n\t\t}\n\t\tif(o instanceof FunctionInstance){\n\t\t\treturn \"Function[\" + ((FunctionInstance)o).function.getName() + \"]\";\n\t\t}\n\t\tif(o instanceof OverloadedFunctionInstance) {\n\t\t\treturn ((OverloadedFunctionInstance) o).toString();\n\t\t}\n\t\tif(o instanceof Reference){\n\t\t\tReference ref = (Reference) o;\n\t\t\treturn ref.toString(); //\"Reference[\" + ref.stack + \", \" + ref.pos + \"]\";\n\t\t}\n\t\tif(o instanceof IListWriter){\n\t\t\treturn \"ListWriter[\" + ((IListWriter) o).toString() + \"]\";\n\t\t}\n\t\tif(o instanceof ISetWriter){\n\t\t\treturn \"SetWriter[\" + ((ISetWriter) o).toString() + \"]\";\n\t\t}\n\t\tif(o instanceof IMapWriter){\n\t\t\treturn \"MapWriter[\" + ((IMapWriter) o).toString() + \"]\";\n\t\t}\n\t\tif(o instanceof Matcher){\n\t\t\treturn \"Matcher[\" + ((Matcher) o).pattern() + \"]\";\n\t\t}\n\t\tif(o instanceof Thrown) {\n\t\t\treturn \"THROWN[ \" + asString(((Thrown) o).getValue()) + \" ]\";\n\t\t}\n\t\t\n\t\tif(o instanceof StringBuilder){\n\t\t\treturn \"StringBuilder[\" + ((StringBuilder) o).toString() + \"]\";\n\t\t}\n\t\tif(o instanceof HashSet){\n\t\t\treturn \"HashSet[\" + ((HashSet<?>) o).toString() + \"]\";\n\t\t}\n\t\tif(o instanceof Map){\n\t\t\treturn \"Map[\" + ((Map<?, ?>) o).toString() + \"]\";\n\t\t}\n\t\tif(o instanceof HashMap){\n\t\t\treturn \"HashMap[\" + ((HashMap<?, ?>) o).toString() + \"]\";\n\t\t}\n\t\tif(o instanceof Map.Entry){\n\t\t\treturn \"Map.Entry[\" + ((Map.Entry) o).toString() + \"]\";\n\t\t}\n\t\t\n\t\treturn o.getClass().getName();\n\t\n\t\t//throw new CompilerError(\"asString cannot convert: \" + o);\n\t}", "public String typeOf() { return null; }", "public static String toString(Object o,byte type) throws ExecException {\n try {\n switch (type) {\n case INTEGER:\n return ((Integer)o).toString();\n\n case LONG:\n return ((Long)o).toString();\n\n case FLOAT:\n return ((Float)o).toString();\n\n case DOUBLE:\n return ((Double)o).toString();\n\n case DATETIME:\n return ((DateTime)o).toString();\n\n case BYTEARRAY:\n return ((DataByteArray)o).toString();\n\n case CHARARRAY:\n return ((String)o);\n\n case BIGINTEGER:\n return ((BigInteger)o).toString();\n\n case BIGDECIMAL:\n return ((BigDecimal)o).toString();\n\n case NULL:\n return null;\n\n case BOOLEAN:\n return ((Boolean)o).toString();\n\n case BYTE:\n return ((Byte)o).toString();\n\n case MAP:\n case INTERNALMAP:\n case TUPLE:\n case BAG:\n case UNKNOWN:\n default:\n int errCode = 1071;\n String msg = \"Cannot convert a \" + findTypeName(o) +\n \" to a String\";\n throw new ExecException(msg, errCode, PigException.INPUT);\n }\n } catch (ClassCastException cce) {\n throw cce;\n } catch (ExecException ee) {\n throw ee;\n } catch (Exception e) {\n int errCode = 2054;\n String msg = \"Internal error. Could not convert \" + o + \" to String.\";\n throw new ExecException(msg, errCode, PigException.BUG);\n }\n }", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "public static String stringType(Obj type) {\n\t\tString str = ObjStr.get(type);\n\t\t\treturn str != null ? str : \"\";\n\t}", "public String type();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "public String getTargetTypeAsString() {\n\t\tString type = null;\n\t\t\n\t\tswitch (targetType) {\n\t\tcase PROCEDURE:\n\t\t\ttype = \"procedure\";\n\t\t\tbreak;\n\t\tcase POLICY:\n\t\t\ttype = \"policy\";\n\t\t\tbreak;\n\t\tcase PROCESS:\n\t\t\ttype = \"process\";\n\t\t\tbreak;\n\t\tcase EXTERNAL:\n\t\t\ttype = \"external\";\n\t\t\tbreak;\n\t\tcase NOT_SET:\n\t\t\ttype = \"procedure\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\ttype = \"procedure\";\n\t\t\tbreak;\n\t\t}\n\t\treturn type;\n\t}", "@Override\n\tpublic String getAoType() {\n\t\treturn null;\n\t}", "private static String getValue(Object o) {\n if (o != null) {\n return o.toString();\n }\n return \"null\";\n }", "@Override\r\n\tpublic String getAsString(FacesContext context, UIComponent component,\r\n\t\t\tObject object) {\n\t\tloggerService.logPortalInfo(\" start getAsString method of ServiceConverter \");\r\n\t\tif (object instanceof String)\r\n\t\t\treturn null;\r\n\t\tif (object != null) {\r\n\t\t\treturn String.valueOf(((ProductTypeDTO) object).getId());\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t}", "public String getTypeString() {\r\n return Prediction.getTypeString(type);\r\n }", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "@Override\n public String toString() {\n return metaObject.getType().toString();\n }", "@Override\n public String toString() {\n StringBuilder b = new StringBuilder();\n boolean any = false;\n if (isUnknown()) {\n b.append(\"?\");\n any = true;\n } else if (isPolymorphic()) {\n b.append(\"^(\").append(var).append('[');\n if (isMaybeAbsent()) {\n b.append(\"absent\");\n any = true;\n }\n if (isMaybePresent()) {\n if (any)\n b.append('|');\n b.append(\"present\");\n }\n b.append(\"])\");\n any = true;\n } else {\n if (isMaybeUndef()) {\n b.append(\"Undef\");\n any = true;\n }\n if (isMaybeNull()) {\n if (any)\n b.append('|');\n b.append(\"Null\");\n any = true;\n }\n if (isMaybeAnyBool()) {\n if (any)\n b.append('|');\n b.append(\"Bool\");\n any = true;\n } else if (isMaybeTrueButNotFalse()) {\n if (any)\n b.append('|');\n b.append(\"true\");\n any = true;\n } else if (isMaybeFalseButNotTrue()) {\n if (any)\n b.append('|');\n b.append(\"false\");\n any = true;\n }\n if (isMaybeAnyNum()) {\n if (any)\n b.append('|');\n b.append(\"Num\");\n any = true;\n } else {\n if (num == null && isMaybeZero() && !isMaybeNumUIntPos()) {\n if (any)\n b.append('|');\n b.append(\"Zero\");\n any = true;\n } else if (!isMaybeZero() && isMaybeNumUIntPos()) {\n if (any)\n b.append('|');\n b.append(\"UIntPos\");\n any = true;\n } else if (isMaybeNumUInt()) {\n if (any)\n b.append('|');\n b.append(\"UInt\");\n any = true;\n }\n if (isMaybeNumOther()) {\n if (any)\n b.append('|');\n b.append(\"NotUInt\");\n any = true;\n }\n if (isMaybeNaN()) {\n if (any)\n b.append('|');\n b.append(\"NaN\");\n any = true;\n }\n if (isMaybeInf()) {\n if (any)\n b.append('|');\n b.append(\"Inf\");\n any = true;\n }\n if (num != null) {\n if (any)\n b.append('|');\n b.append(num);\n any = true;\n }\n }\n if (excluded_strings != null || included_strings != null) {\n if (any)\n b.append('|');\n b.append('(');\n any = false;\n }\n if (isMaybeAnyStr()) {\n if (any)\n b.append('|');\n b.append(\"Str\");\n any = true;\n } else {\n if (isMaybeStrUInt()) {\n if (any)\n b.append('|');\n b.append(\"UIntStr\");\n any = true;\n }\n if (isMaybeStrOtherNum()) {\n if (any)\n b.append('|');\n b.append(\"NotUIntStr\"); // TODO: change to OtherNumStr?\n any = true;\n }\n if (isMaybeStrIdentifier()) {\n if (any)\n b.append('|');\n b.append(\"IdentStr\");\n any = true;\n }\n if (isMaybeStrOtherIdentifierParts()) {\n if (any)\n b.append('|');\n b.append(\"OtherIdentPartsStr\");\n any = true;\n }\n if (isMaybeStrOther()) {\n if (any)\n b.append('|');\n b.append(\"OtherStr\");\n any = true;\n }\n if (isStrJSON()) {\n if (any)\n b.append(\"|\");\n b.append(\"JSONStr\");\n any = true;\n }\n if (isMaybeStrPrefix()) {\n if (any)\n b.append('|');\n b.append(\"PrefixStr[\").append(Strings.escape(str)).append(']');\n any = true;\n } else if (str != null) {\n if (any)\n b.append('|');\n b.append('\"').append(Strings.escape(str)).append('\"');\n any = true;\n }\n }\n if (excluded_strings != null || included_strings != null) {\n b.append(')');\n if (excluded_strings != null)\n b.append(\"\\\\{\").append(excluded_strings.stream().sorted().map(s -> '\"' + Strings.escape(s) + '\"').collect(java.util.stream.Collectors.joining(\",\"))).append(\"}\");\n if (included_strings != null)\n b.append(\"{\").append(included_strings.stream().sorted().map(s -> '\"' + Strings.escape(s) + '\"').collect(java.util.stream.Collectors.joining(\",\"))).append(\"}\");\n any = true;\n }\n if (object_labels != null) {\n if (any)\n b.append('|');\n b.append(object_labels);\n any = true;\n }\n if (getters != null) {\n if (any)\n b.append('|');\n b.append(\"getter \").append(getters);\n any = true;\n }\n if (setters != null) {\n if (any)\n b.append('|');\n b.append(\"setter \").append(setters);\n any = true;\n }\n if (isMaybeAbsent()) {\n if (any)\n b.append('|');\n b.append(\"absent\");\n any = true;\n }\n if (functionPartitions != null) {\n if (any)\n b.append(',');\n b.append(\"functionPartitions=\").append(functionPartitions);\n any = true;\n }\n if (functionTypeSignatures != null) {\n if (any)\n b.append(',');\n b.append(\"functionTypeSignatures=\").append(functionTypeSignatures);\n // any = true;\n }\n }\n if (!any)\n b.append(\"<no value>\");\n// if (isMaybeModified())\n// b.append(\"%\");\n return b.toString();\n }", "public abstract String getObjectType();", "public String getType() {\n return (String) getObject(\"type\");\n }", "public Optional<String> getType() {\n return Optional.ofNullable(type);\n }", "String provideType();", "private String getStringValue(Object o) {\n if (o instanceof String) {\n return (String) o;\n } else if (o instanceof NodeArray) {\n NodeArray array = (NodeArray) o;\n switch (array.size()) {\n case 0:\n return null;\n case 1: {\n return getStringValue(array.get(0));\n }\n default:\n return getStringValue(array);\n }\n } else if (o instanceof Node) {\n return getStringValue((Node) o);\n } else if (o != null) {\n return o.toString();\n }\n return null;\n }", "public String toString() {\n return type;\n }", "public Optional<String> getType() {\n\t\treturn Optional.ofNullable(_type);\n\t}", "public T caseOutputType(OutputType object) {\n\t\treturn null;\n\t}", "protected abstract String getType();", "@Override\n\tpublic String getText(Object object) {\n\t\tString label = ((tzpropOptional) object).getTzname();\n\t\treturn label == null || label.length() == 0 ? getString(\"_UI_tzpropOptional_type\")\n\t\t\t\t: getString(\"_UI_tzpropOptional_type\") + \" \" + label;\n\t}", "String toStr(Object o);", "public static String findTypeName(Object o) {\n return findTypeName(findType(o));\n }", "public Optional<String> type() {\n\t\t\treturn Optional.ofNullable(_type);\n\t\t}", "public String toString() {\n return type.toString();\n }", "abstract public String getType();", "@Nullable\n public String getType() {\n return type;\n }" ]
[ "0.6503234", "0.62996346", "0.6207273", "0.6182566", "0.6112739", "0.6112739", "0.6112739", "0.6112739", "0.6112739", "0.6112739", "0.6112739", "0.6112739", "0.6112739", "0.6112739", "0.6112739", "0.6112739", "0.6112739", "0.6112739", "0.6112739", "0.6112739", "0.6112739", "0.6112739", "0.6112739", "0.6112739", "0.61021", "0.61021", "0.61021", "0.61021", "0.61021", "0.61021", "0.61021", "0.61021", "0.61021", "0.61021", "0.61021", "0.61021", "0.61021", "0.60496837", "0.5927897", "0.58502495", "0.58502495", "0.58502495", "0.58502495", "0.58502495", "0.58502495", "0.58502495", "0.58502495", "0.58502495", "0.58502495", "0.58502495", "0.58502495", "0.58502495", "0.58502495", "0.58502495", "0.58502495", "0.58502495", "0.58502495", "0.58502495", "0.58502495", "0.58502495", "0.58502495", "0.58502495", "0.58502495", "0.58502495", "0.58234173", "0.57234085", "0.5677999", "0.5672226", "0.5666378", "0.5653874", "0.5653874", "0.5653874", "0.5653874", "0.5653874", "0.5653874", "0.5653874", "0.5653874", "0.5653874", "0.5653874", "0.5653874", "0.5653874", "0.5653874", "0.5646817", "0.56467444", "0.56389606", "0.5637518", "0.56189257", "0.5611113", "0.5608693", "0.56083196", "0.5607862", "0.5569938", "0.5562741", "0.5549932", "0.5539602", "0.5530754", "0.55284506", "0.55269843", "0.55266446", "0.55107534" ]
0.84591866
0
Converts a String representing Date or Date Time to timestamp value. Supported formats are: 20220224 20220224 04:55:00 20220224 04:55:00.001 20220224T04:55:00 20220224T04:55:00.001 20220224T04:55:00.001Z
public static long convertToTimestamp(String timestamp) { return LocalDateTime.parse(timestamp, FORMATTER).toInstant(ZoneOffset.UTC).toEpochMilli(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tpublic java.sql.Timestamp convert(String s) throws ParseException {\n\t\t\ts = supportHtml5DateTimePattern(s);\n\t\t\t\n\t\t\tif (timeStampWithoutSecPatternLen == s.length()) {\n\t\t\t\ts = s + \":00\";\n\t\t\t}\n\t\t\tif (s.length() > dateLen) {\n\t\t\t\treturn java.sql.Timestamp.valueOf(s);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn new java.sql.Timestamp(getFormat(datePattern).parse(s).getTime());\n\t\t\t}\n\t\t}", "public static Timestamp changeStrToDate(String strInput)\n\t{\n\t\tSimpleDateFormat sdfmt1 = new SimpleDateFormat(\"MM/dd/yyyy hh:mm a\");\n\t\tSimpleDateFormat sdfmt2= new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\n\t\tjava.util.Date dDate = new Date();\n\t\ttry {\n\t\t\tdDate = sdfmt1.parse( strInput );\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tString strOutput = sdfmt2.format( dDate );\n\t\tDateTimeFormatter formattert = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm\");\n\t\tLocalDateTime ldt = LocalDateTime.parse(strOutput,formattert);\n\t\tTimestamp dt = Timestamp.valueOf(ldt);\n\t\t//System.out.println(dDate + \" \" + strOutput + \" \" + dt);\n\t\t//System.out.println(dt);\n\t\treturn dt;\n\n\t}", "public static java.sql.Timestamp convertToTimestamp(String timeStampInString) {\n\t\tif (timeStampInString == null) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\");\n\t\t\tjava.util.Date uDate = null;\n\t\t\tjava.sql.Timestamp timeStamp = null;\n\t\t\ttry {\n\t\t\t\tuDate = dateFormat.parse(timeStampInString);\n\t\t\t\ttimeStamp = new Timestamp(uDate.getTime());\n\t\t\t} catch (ParseException e) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn timeStamp;\n\t\t}\n\t}", "public static Timestamp parseString(String timestampString) {\n return parseString(timestampString, null, true);\n }", "public static DateTime parseTimestampWithTimeZone(String str) {\n return DateTimeFormat.forPattern(\"yyyy-MM-dd HH:mm:ssZ\").parseDateTime(str);\n }", "private static Timestamp parseString(String timestampString,\n String pattern,\n boolean withZoneUTC,\n boolean optionalFracSecond) {\n boolean optionalZoneOffset = false;\n if ((pattern == null ||\n pattern.equals(TimestampDef.DEFAULT_PATTERN)) &&\n withZoneUTC) {\n\n String tsStr = trimUTCZoneOffset(timestampString);\n /*\n * If no zone offset or UTC zone in timestamp string, then parse it\n * using parseWithDefaultPattern(). Otherwise, parse it with\n * DateTimeFormatter.\n */\n if (tsStr != null) {\n return parseWithDefaultPattern(tsStr);\n }\n optionalZoneOffset = true;\n }\n\n String fmt = (pattern == null) ? TimestampDef.DEFAULT_PATTERN : pattern;\n try {\n DateTimeFormatter dtf = getDateTimeFormatter(fmt, withZoneUTC,\n optionalFracSecond,\n optionalZoneOffset,\n 0);\n TemporalAccessor ta = dtf.parse(timestampString);\n if (!ta.isSupported(ChronoField.YEAR) ||\n !ta.isSupported(ChronoField.MONTH_OF_YEAR) ||\n !ta.isSupported(ChronoField.DAY_OF_MONTH)) {\n\n throw new IllegalArgumentException(\"The timestamp string \" +\n \"must contain year, month and day\");\n }\n\n Instant instant;\n boolean hasOffset = (ta.isSupported(ChronoField.OFFSET_SECONDS) &&\n ta.get(ChronoField.OFFSET_SECONDS) != 0);\n if (ta.isSupported(ChronoField.HOUR_OF_DAY)) {\n instant = hasOffset ? OffsetDateTime.from(ta).toInstant() :\n Instant.from(ta);\n } else {\n instant = LocalDate.from(ta).atStartOfDay\n ((hasOffset ? ZoneOffset.from(ta) : UTCZone)).toInstant();\n }\n return toTimestamp(instant);\n } catch (IllegalArgumentException iae) {\n throw new IllegalArgumentException(\"Failed to parse the date \" +\n \"string '\" + timestampString + \"' with the pattern: \" +\n fmt + \": \" + iae.getMessage(), iae);\n } catch (DateTimeParseException dtpe) {\n throw new IllegalArgumentException(\"Failed to parse the date \" +\n \"string '\" + timestampString + \"' with the pattern: \" +\n fmt + \": \" + dtpe.getMessage(), dtpe);\n } catch (DateTimeException dte) {\n throw new IllegalArgumentException(\"Failed to parse the date \" +\n \"string '\" + timestampString + \"' with the pattern: \" +\n fmt + \": \" + dte.getMessage(), dte);\n }\n }", "private Timestamp getTimestamp(String timestampString) {\r\n Timestamp timestamp;\r\n try {\r\n timestamp = SpringContext.getBean(DateTimeService.class).convertToSqlTimestamp(timestampString);\r\n }\r\n catch (ParseException e) {\r\n assertNull(\"Timestamp String was not parseable\", e);\r\n return null;\r\n }\r\n return timestamp;\r\n }", "public Timestamp changeDateFormat(String inputDate) {\n String input = inputDate;\n\n String INPUT_FORMAT = \"yyyy-MM-dd\";\n String OUTPUT_FORMAT = \"yyyy-MM-dd HH:mm:ss.SSS\";\n\n DateFormat inputFormatter = new SimpleDateFormat(INPUT_FORMAT);\n DateFormat outputFormatter = new SimpleDateFormat(OUTPUT_FORMAT);\n\n java.util.Date date = null;\n String output = null;\n Timestamp ts = null;\n try {\n date = inputFormatter.parse(input);\n\n output = outputFormatter.format(date);\n\n ts = Timestamp.valueOf(output);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return ts;\n }", "public static Timestamp parseDateTime(String date) {\n if (date.endsWith(\"Z\"))\n return parseDateTime_(date);\n else\n return oneOf(date, format_with_tz, format_precise_with_tz);\n }", "private static Date parseTimestampWithSeconds(String timestring) throws ParseException{\r\n boolean containsT = timestring.contains(\"T\");\r\n boolean containsSpace = timestring.contains(\" \");\r\n if(!containsT && containsSpace){\r\n try {\r\n Date date = formatSecs.parse(timestring);\r\n return date;\r\n } catch (ParseException e) {\r\n throw new ParseException(e.getMessage(), 0);\r\n }\r\n }\r\n else if(containsT && !containsSpace){\r\n try {\r\n Date date = formatSecsWT.parse(timestring);\r\n return date;\r\n } catch (ParseException e) {\r\n throw new ParseException(e.getMessage(), 0);\r\n }\r\n }\r\n else{\r\n throw new ParseException(\"Unsupported pattern!\", 0);\r\n }\r\n }", "protected long readTimestampFromString(String value) {\r\n\t\t return Long.parseLong(value);\r\n\t\t }", "public static Date strToTime(String strDate)\r\n/* 135: */ {\r\n/* 136:192 */ SimpleDateFormat formatter = new SimpleDateFormat(\"yyyyMMdd HH:mm:ss\");\r\n/* 137:193 */ ParsePosition pos = new ParsePosition(0);\r\n/* 138:194 */ Date strtodate = formatter.parse(strDate, pos);\r\n/* 139:195 */ return strtodate;\r\n/* 140: */ }", "public static void main(String[] args) throws ParseException {\n\t Long t = Long.parseLong(\"1540452984\");\r\n Timestamp ts = new Timestamp(1540453766);\r\n DateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n //方法一:优势在于可以灵活的设置字符串的形式。\r\n String tsStr = sdf.format(ts);// 2017-01-15 21:17:04\r\n System.out.println(tsStr);\r\n\t}", "private static Date parseTimestampWithSecondsWithTimeZone(String timestring) throws ParseException{\r\n boolean containsT = timestring.contains(\"T\");\r\n boolean containsSpace = timestring.contains(\" \");\r\n if(!containsT && containsSpace){\r\n try {\r\n Date date = formatSecsTZ.parse(timestring);\r\n return date;\r\n } catch (ParseException e) {\r\n throw new ParseException(e.getMessage(), 0);\r\n }\r\n }\r\n else if(containsT && !containsSpace){\r\n try {\r\n Date date = formatSecsTZwT.parse(timestring);\r\n return date;\r\n } catch (ParseException e) {\r\n throw new ParseException(e.getMessage(), 0);\r\n }\r\n }\r\n else{\r\n throw new ParseException(\"Unsupported pattern!\", 0);\r\n }\r\n }", "static Timestamp parseString(String timestampString,\n String pattern,\n boolean withZoneUTC) {\n return parseString(timestampString, pattern, withZoneUTC,\n (pattern == null));\n }", "private Timestamp getTimestampFromHTML(String stringDate) {\n Timestamp result = null;\n SimpleDateFormat format = new SimpleDateFormat();\n format.applyPattern(\"yyyy-MM-dd\");\n try {\n Date docDate = format.parse(stringDate);\n result = new java.sql.Timestamp(docDate.getTime());\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return result;\n }", "private static Date parseTimeStamp(String timestamp) {\n if (timestamp == null) {\n return null;\n }\n\n try {\n return SIMPLE_DATE_FORMAT.parse(timestamp);\n } catch (ParseException dateTimeParseException) {\n return null;\n }\n }", "public static Date parseTimestamp(String timestamp) {\n if (StringUtils.isNullOrWhitespace(timestamp) || timestamp.equals(\"null\")) {\n return null;\n }\n\n try {\n return sDateFormatCache.get(TIMESTAMP_FORMAT, new Callable<DateFormat>() {\n @Override\n public DateFormat call() throws Exception {\n return new SimpleDateFormat(TIMESTAMP_FORMAT);\n }\n }).parse(timestamp);\n } catch (ParseException e) {\n e.printStackTrace();\n return null;\n }\n }", "@Override\n\t\tpublic java.sql.Date convert(String s) throws ParseException {\n\t\t\ts = supportHtml5DateTimePattern(s);\n\t\t\t\n\t\t\tif (timeStampWithoutSecPatternLen == s.length()) {\n\t\t\t\ts = s + \":00\";\n\t\t\t}\n\t\t\tif (s.length() > dateLen) {\t// if (x < timeStampLen) 改用 datePattern 转换,更智能\n\t\t\t\t// return new java.sql.Date(java.sql.Timestamp.valueOf(s).getTime());\t// error under jdk 64bit(maybe)\n\t\t\t\treturn new java.sql.Date(getFormat(timeStampPattern).parse(s).getTime());\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// return new java.sql.Date(java.sql.Date.valueOf(s).getTime());\t// error under jdk 64bit\n\t\t\t\treturn new java.sql.Date(getFormat(datePattern).parse(s).getTime());\n\t\t\t}\n\t\t}", "public static String calcDateStringFromTimestamp(String s, long timestamp) {\n Calendar cal = Calendar.getInstance(Locale.ENGLISH);\n cal.setTimeInMillis(timestamp);\n String date = DateFormat.format(s, cal).toString();\n return date;\n }", "private static Date convertFromString(String dateString) throws ParseException {\n return new SimpleDateFormat(\"yyyyMMddHHmm\").parse(dateString);\n }", "private Date stringToDate(String s) throws ParseException{\r\n\t\tSimpleDateFormat fmt = new SimpleDateFormat(DATE_FORMAT);\r\n\t\treturn fmt.parse(s);\r\n\t}", "public static Date parse(String input) throws java.text.ParseException {\n\t\treturn new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.S\").parse(input);\n\n\t}", "@Test\n public void timestampInvalidString() throws Exception {\n String retVal = new SynapseHelper().serializeToSynapseType(MOCK_TEMP_DIR, TEST_PROJECT_ID, TEST_RECORD_ID,\n TEST_FIELD_NAME, UploadFieldTypes.TIMESTAMP, new TextNode(\"1234567890\"));\n assertNull(retVal);\n }", "public static Date parseTimestamp(String time) throws ParseException{\r\n /**\r\n * Checks whether timestring contains UTC time zone identifier\r\n */\r\n boolean containsZ = time.contains(\"Z\");\r\n if(containsZ){\r\n time = time.replace(\"Z\", \"+0000\");\r\n }\r\n /**\r\n * checks if the timestring ends with \"+hh\" or \"-hh\" time zone definition\r\n * modifies timestring with minutes to time zone\r\n */\r\n char suffixTZ = time.charAt(time.length()-3);\r\n if(suffixTZ == '+' || suffixTZ == '-'){\r\n time = time+\"00\";\r\n }\r\n int len = time.length();\r\n /**\r\n * checks patterns ending with seconds only\r\n */\r\n if(len == patternSecsLen){\r\n return parseTimestampWithSeconds(time);\r\n }\r\n /**\r\n * checks patterns ending with milliseconds\r\n */\r\n else if(len == patternMiliSecsLen){\r\n return parseTimestringWithMillis(time);\r\n }\r\n /**\r\n * checks patterns ending with seconds and time zone\r\n */\r\n else if(len == patternSecsTZLen){\r\n return parseTimestampWithSecondsWithTimeZone(time);\r\n }\r\n /**\r\n * checks patterns ending with milliseconds and time zone\r\n */\r\n else if(len == patternMiliSecsTZLen){\r\n return parseTimestringWithMillisWithTimeZone(time);\r\n }\r\n /**\r\n * checks patterns according to ISO pattern\r\n */\r\n else if(len == patternISOLen){\r\n return parseISOTimestring(time);\r\n }\r\n /**\r\n * checks patterns according to ISO pattern with milliseconds\r\n */\r\n else if(len == patternISOMilisLen){\r\n return parseISOTimestringWithMillis(time);\r\n }\r\n /**\r\n * checks patterns ending with microseconds\r\n */\r\n else if(len == patternMicroSecLen){\r\n return parseTimestringWithMicros(time);\r\n }\r\n /**\r\n * checks patterns ending with microseconds and time zone\r\n */\r\n else if(len == patternMicroSecTZLen){\r\n return parseTimestringWithMicrosWithTimeZone(time);\r\n }\r\n \r\n else{\r\n throw new ParseException(\"Unsupported pattern!\", 0);\r\n }\r\n }", "protected Timestamp getDate (String value, UnmarshalContext context) {\n\t\tSimpleDateFormat sdf = context.getDateFormat ();\n\t\tTimestamp result = null;\n\t\tif (dateFormatStrings != null) {\n\t\t\tfor (int i=0; i < dateFormatStrings.length && result == null; i++) {\n\t\t\t\tif (dateFormatStrings[i].length () == value.length ()) {\n\t\t\t\t\tsdf.applyPattern (dateFormatStrings[i]);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tresult = new Timestamp (sdf.parse(value).getTime ());\n\t\t\t\t\t} catch (Exception e) { } // nothing for now ..\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (result == null) { // still nothing try integer\n\t\t\tresult = new Timestamp (Long.parseLong (value));\n\t\t}\n\t\treturn result;\n\t}", "private static Timestamp parseWithDefaultPattern(String ts){\n\n final int[] comps = new int[7];\n\n /*\n * The component that is currently being parsed, starting with 0\n * for the year, and up to 6 for the fractional seconds\n */\n int comp = 0;\n\n int val = 0;\n int ndigits = 0;\n\n int len = ts.length();\n boolean isBC = (ts.charAt(0) == '-');\n\n for (int i = (isBC ? 1 : 0); i < len; ++i) {\n\n char ch = ts.charAt(i);\n\n if (comp < 6) {\n\n switch (ch) {\n case '0': case '1': case '2': case '3': case '4':\n case '5': case '6': case '7': case '8': case '9':\n val = val * 10 + (ch - '0');\n ++ndigits;\n break;\n default:\n if (ch == compSeparators[comp]) {\n checkAndSetValue(comps, comp, val, ndigits, ts);\n ++comp;\n val = 0;\n ndigits = 0;\n\n } else {\n raiseParseError(\n ts, \"invalid character '\" + ch +\n \"' while parsing component \" + compNames[comp]);\n }\n }\n } else {\n assert(comp == 6);\n\n switch (ch) {\n case '0': case '1': case '2': case '3': case '4':\n case '5': case '6': case '7': case '8': case '9':\n val = val * 10 + (ch - '0');\n ndigits++;\n break;\n default:\n raiseParseError(\n ts, \"invalid character '\" + ch +\n \"' while parsing component \" + compNames[comp]);\n }\n }\n }\n\n /* Set the last component */\n checkAndSetValue(comps, comp, val, ndigits, ts);\n\n if (comp < 2) {\n raiseParseError(\n ts, \"the timestamp string must have at least the 3 \" +\n \"date components\");\n }\n\n if (comp == 6 && comps[6] > 0) {\n\n if (ndigits > MAX_PRECISION) {\n raiseParseError(\n ts, \"the fractional-seconds part contains more than \" +\n MAX_PRECISION + \" digits\");\n } else if (ndigits < MAX_PRECISION) {\n /* Nanosecond *= 10 ^ (MAX_PRECISION - s.length()) */\n comps[6] *= (int)Math.pow(10, MAX_PRECISION - ndigits);\n }\n }\n\n if (isBC) {\n comps[0] = -comps[0];\n }\n\n return createTimestamp(comps);\n }", "public static Date convertToDate(String value) {\r\n if (StringUtils.isEmpty(value)) {\r\n return null;\r\n }\r\n\r\n Date result = null;\r\n String dateFormat = ResourceUtil.getMessageResourceString(\"application.pattern.timestamp\");\r\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(dateFormat);\r\n try {\r\n result = simpleDateFormat.parse(value);\r\n } catch (ParseException ex) {\r\n LOGGER.error(ex.getMessage(), ex);\r\n }\r\n\r\n return result;\r\n }", "public long DateStringToUnixTimeStamp(String sDateTime) {\n DateFormat formatter;\n Date date = null;\n long unixtime = 0;\n formatter = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\n\n try {\n date = formatter.parse(sDateTime);\n unixtime = date.getTime() / 1000L;\n } catch (Exception ex) {\n ex.printStackTrace();\n unixtime = 0;\n }\n\n return unixtime;\n }", "public static long convertToLong(String value) {\r\n Validate.notEmpty(value, \"String date representation must not be null or empty\");\r\n\r\n Date result = null;\r\n String dateFormat = ResourceUtil.getMessageResourceString(\"application.pattern.timestamp\");\r\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(dateFormat);\r\n try {\r\n result = simpleDateFormat.parse(value);\r\n } catch (ParseException ex) {\r\n LOGGER.error(ex.getMessage(), ex);\r\n throw new IllegalArgumentException(ex);\r\n }\r\n\r\n return result.getTime();\r\n }", "public Date stringToDate(String date) throws ParseException {\n String[] splitDate = date.split(\"T\");\n String day = splitDate[0];\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n Date dayDate = dateFormat.parse(day);\n return dayDate;\n }", "private LocalDateTime parseDate(String s) {\n String[] splitDate = s.split(\" \", 2);\n // Split day, month, year\n String[] splitDateElements = splitDate[0].split(\"/\", 3);\n int day = parseInt(splitDateElements[0]);\n int month = parseInt(splitDateElements[1]);\n int year = parseInt(splitDateElements[2]);\n // Split hours and minutes\n int hours = parseInt(splitDate[1].substring(0, 2));\n int mins = parseInt(splitDate[1].substring(2, 4));\n return LocalDateTime.of(year, month, day, hours, mins);\n }", "public static long dateToTime(String s) {\n\t\tSimpleDateFormat simpledateformat = new SimpleDateFormat(\"yyyyMMddHHmmss\");\n\t\tlong l;\n\t\ttry {\n\t\t\tl = simpledateformat.parse(s).getTime();\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tl = System.currentTimeMillis();\n\t\t}\n\n\t\treturn l;\n\n\t}", "public static Timestamp toTimestamp(Object obj, String pattern) {\n return toTimestamp(obj, pattern, (TimeZone) null);\n }", "public Date convertStringToDate(String s) throws ParseException {\n\t\tDate dateTime = SDF.parse(s);\n\t\treturn dateTime;\n\t}", "public static String fromDate(String s){\n \t\t\n \t\tString[] date = s.split(\"T\");\n \t\tString time = date[1].substring(0,5);\n \t\tString[] dates = date[0].split(\"-\"); \n \t\tString month = dates[1];\n \t\tString day = dates[2];\n \t\t\n \t\treturn day + \"/\" + month + \", kl: \" + time;\n \t}", "private Date convertStringToDate(String dateInString){\n DateFormat format = new SimpleDateFormat(\"d-MM-yyyy HH:mm\", Locale.ENGLISH);\n Date date = null;\n try {\n date = format.parse(dateInString);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return date;\n }", "public static Date stringToTime(String time)\r\n/* 43: */ {\r\n/* 44: */ try\r\n/* 45: */ {\r\n/* 46: 54 */ return sdfTime.parse(time);\r\n/* 47: */ }\r\n/* 48: */ catch (ParseException e)\r\n/* 49: */ {\r\n/* 50: 56 */ log.fatal(\"DateUtil.stringToTime抛出异常\", e);\r\n/* 51: */ }\r\n/* 52: 57 */ return new Date();\r\n/* 53: */ }", "public static Timestamp toTimestamp(Object obj) {\n return toTimestamp(obj, (String) null, (TimeZone) null);\n }", "private static String convertDate(String dateString) {\n String date = null;\n\n try {\n //Parse the string into a date variable\n Date parsedDate = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss\").parse(dateString);\n\n //Now reformat it using desired display pattern:\n date = new SimpleDateFormat(DATE_FORMAT).format(parsedDate);\n\n } catch (ParseException e) {\n Log.e(TAG, \"getDate: Error parsing date\", e);\n e.printStackTrace();\n }\n\n return date;\n }", "public static org.opencds.vmr.v1_0.schema.TS dateInternal2TS(java.util.Date pDate) {\n\n\t\tString _METHODNAME = \"tSInternal2TS(): \";\n\n\t\tif (pDate == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tString errStr = null;\n\t\tjava.util.Date javaTime = pDate;\n\t\tString formatTemplate = \"yyyyMMddHHmmss.SSSZZZZZ\";\n\n\t\t// Format java.util.Date and return schema TS if successful\n\t\torg.opencds.vmr.v1_0.schema.TS lTS = new org.opencds.vmr.v1_0.schema.TS();\n\t\ttry {\n\t\t\t// format and set schema TS object\n\t\t\tlTS.setValue(DateUtility.getInstance().getDateAsString(javaTime, formatTemplate));\n\t\t\treturn lTS;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\terrStr = _METHODNAME + \"java.util.Date \\\"\" + javaTime + \"\\\" threw exception trying to format as: \" + formatTemplate;\n\t\t\tthrow new RuntimeException(errStr + \": \" + e.getMessage() );\n\t\t}\n\t}", "public static String getNowAsTimestamp() {\r\n\r\n DateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT_PATTERN);\r\n dateFormat.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\r\n return dateFormat.format(new Date()).replaceAll(\"\\\\+0000\", \"Z\").replaceAll(\"([+-][0-9]{2}):([0-9]{2})\", \"$1$2\");\r\n }", "public static Date String2Date(String date){\n SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\n\n Date currentDate = null;\n try {\n currentDate = format.parse(date);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return currentDate;\n }", "public static void main(String[] args) throws ParseException { 2019-05-30T10:15:16.0Z\n // 2019-05-30T10:18:21\n // SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n // String str = \"2019-05-30 18:15:16\";\n // Date date = sdf.parse(str);\n //\n // DateFormat formatter = new SimpleDateFormat(DATE_FORMAT);\n // // Date date = Calendar.getInstance().getTime();\n // TimeZone srcTimeZone = TimeZone.getTimeZone(\"GMT+8\");\n // TimeZone destTimeZone = TimeZone.getTimeZone(\"GMT\");\n // System.out.println(DateTransformer.dateTransformBetweenTimeZone(date, formatter, srcTimeZone, destTimeZone));\n //\n\n }", "private LocalDateTime mapTimestampToUtc(final String timestamp) {\n return LocalDateTime.ofInstant(\n Instant.from(LocalDateTime.parse(timestamp).atZone(ZoneOffset.UTC)),\n ZoneOffset.UTC);\n }", "public static Date stringToDate(String string_date){\n Date myDate = null;\n \n try {\n java.util.Date utilDate = new SimpleDateFormat(\"yyyy-MM-dd\").parse(string_date);\n myDate = new java.sql.Date(utilDate.getTime());\n } catch (Exception e) {\n // Si hay una excepcion se imprime un mensaje\n System.err.println(e.getMessage());\n }\n \n return myDate;\n }", "public static String cleanTimeStamp(String rawTimeStr) {\n return rawTimeStr;\n }", "public static Date stringToDate(String dateString) {\n for(String format: DATE_FORMATS){\n try {\n return new SimpleDateFormat(format).parse(dateString);\n }\n catch (Exception e){}\n }\n throw new IllegalArgumentException(\"Date is not parsable\");\n }", "public static long extractTimestampFromAccessLog(String timestamp) {\n // e.g. \"timestamp\": \"2017-04-28T10:59:58.907784163Z\" or \"2017-06-28T10:21:29Z\"\n timestamp = timestamp.replace(\"T\", \" \").replace(\"Z\", \"\");\n try {\n return DATE_TIME_NANOS_FORMAT.parseDateTime(timestamp).getMillis();\n } catch (IllegalArgumentException e) {\n return DATE_TIME_FORMAT.parseDateTime(timestamp).getMillis();\n }\n }", "public static Date StringToDate(String dateString) {\n int y = new Integer(dateString.substring(0, 4));\n int m = new Integer(dateString.substring(4, 6));\n int d = new Integer(dateString.substring(6, 8));\n int h = new Integer(dateString.substring(8, 10));\n int min = new Integer(dateString.substring(10, 12));\n\n try {\n Calendar convCal = Calendar.getInstance();\n convCal.set(y, m - 1, d, h, min);\n Date date = convCal.getTime();\n\n return date;\n } catch (Exception ex) {\n System.out.println(\"BwInfo.convertStringToDate() \" + ex);\n return null;\n }\n\n }", "@Test\n public void testOdtToTs() {\n Instant now = Instant.now();\n OffsetDateTime timestamp = OffsetDateTime.ofInstant(now, ZoneOffset.UTC);\n Timestamp expResult = Timestamps.fromMillis(now.toEpochMilli());\n\n Timestamp result = ProtoUtils.odtToTs(timestamp);\n assertThat(result).isEqualTo(expResult);\n }", "public static Date stringToDate(String date)\r\n/* 29: */ {\r\n/* 30: 39 */ log.debug(\"DateUtil.stringToDate()\");\r\n/* 31: */ try\r\n/* 32: */ {\r\n/* 33: 41 */ return sdfDate.parse(date);\r\n/* 34: */ }\r\n/* 35: */ catch (ParseException e)\r\n/* 36: */ {\r\n/* 37: 43 */ log.fatal(\"DateUtil.stringToDate抛出异常\", e);\r\n/* 38: */ }\r\n/* 39: 44 */ return new Date();\r\n/* 40: */ }", "public static Instant convertProtoTimeStamp(Timestamp timestamp) {\n\t\treturn Instant.ofEpochSecond(timestamp.getSeconds(), timestamp.getNanos());\n\t}", "public static Date convert(String timeString){\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MMM/yyyy:HH:mm:ss ZZZZ\");\n // set default timezone to be runtime independent\n TimeZone.setDefault(TimeZone.getTimeZone(\"UTC\"));\n try {\n return dateFormat.parse(timeString);\n } catch (ParseException e) {\n LOGGER.log(Level.SEVERE, \"Date cannot be parsed: \"+ timeString, e);\n return null;\n }\n }", "@Test\n public void testTimeStampParsingAndErrorMessages() throws ParseException {\n verify.rule(OsTxTimestampCriteria.class, \"date = '09/10/2014 11:00:12 AM'\");\n verify.rule(OsTxTimestampCriteria.class, \"date = \\\"09/10/2014 11:00:12 AM\\\"\");\n\n verify.rule(OsTxTimestampCriteria.class, \"date in ('09/10/2014 11:00:12 AM' .. '09/10/2014 12:00:12 AM')\");\n verify.rule(OsTxTimestampCriteria.class, \"date in (\\\"09/10/2014 11:00:12 AM\\\" .. \\\"09/10/2014 12:00:12 AM\\\")\");\n\n // String syntaxtError = \"Invalid timestamp format - format should be [MM/dd/yyyy hh:mm:ss a] or [\";\n // verify.checkRuleErrors(OsTxTimestampCriteria.class, \"date = '09/10/2014 AM'\", syntaxtError);\n\n // Use locale specific timestamp format - system should convert correctly\n // For example: MMM d, yyyy h:mm:ss a\n Date date = OrcsScriptUtil.parseDate(\"09/10/2014 11:00:12 AM\");\n String localeFormattedDate = DateFormat.getDateTimeInstance().format(date);\n verify.rule(OsTxTimestampCriteria.class, \"date = '\" + localeFormattedDate + \"'\");\n }", "private static Date parseISOTimestring(String timestring) throws ParseException{\r\n boolean containsT = timestring.contains(\"T\");\r\n boolean containsSpace = timestring.contains(\" \");\r\n int len = timestring.length();\r\n char colonTZ = timestring.charAt(len-3);\r\n if(colonTZ == ':'){\r\n String part1 = timestring.substring(0, len-3);\r\n String part2 = timestring.substring(len-2, len);\r\n try{\r\n if(containsT){\r\n Date date = formatSecsTZwT.parse(part1+part2);\r\n return date;\r\n }else if(containsSpace){\r\n Date date = formatSecsTZ.parse(part1+part2);\r\n return date;\r\n }\r\n else{\r\n throw new ParseException(\"Unsupported pattern!\", 0);\r\n }\r\n } catch(ParseException e){\r\n throw new ParseException(e.getMessage(), 0);\r\n }\r\n }\r\n else{\r\n throw new ParseException(\"Unsupported pattern!\", 0);\r\n }\r\n }", "private static Long parseTimeStrictly(String s) throws IllegalArgumentException\n {\n String nanos_s;\n\n long hour;\n long minute;\n long second;\n long a_nanos = 0;\n\n String formatError = \"Timestamp format must be hh:mm:ss[.fffffffff]\";\n String zeros = \"000000000\";\n\n if (s == null)\n throw new java.lang.IllegalArgumentException(formatError);\n s = s.trim();\n\n // Parse the time\n int firstColon = s.indexOf(':');\n int secondColon = s.indexOf(':', firstColon+1);\n\n // Convert the time; default missing nanos\n if (firstColon > 0 && secondColon > 0 && secondColon < s.length() - 1)\n {\n int period = s.indexOf('.', secondColon+1);\n hour = Integer.parseInt(s.substring(0, firstColon));\n if (hour < 0 || hour >= 24)\n throw new IllegalArgumentException(\"Hour out of bounds.\");\n\n minute = Integer.parseInt(s.substring(firstColon + 1, secondColon));\n if (minute < 0 || minute >= 60)\n throw new IllegalArgumentException(\"Minute out of bounds.\");\n\n if (period > 0 && period < s.length() - 1)\n {\n second = Integer.parseInt(s.substring(secondColon + 1, period));\n if (second < 0 || second >= 60)\n throw new IllegalArgumentException(\"Second out of bounds.\");\n\n nanos_s = s.substring(period + 1);\n if (nanos_s.length() > 9)\n throw new IllegalArgumentException(formatError);\n if (!Character.isDigit(nanos_s.charAt(0)))\n throw new IllegalArgumentException(formatError);\n nanos_s = nanos_s + zeros.substring(0, 9 - nanos_s.length());\n a_nanos = Integer.parseInt(nanos_s);\n }\n else if (period > 0)\n throw new IllegalArgumentException(formatError);\n else\n {\n second = Integer.parseInt(s.substring(secondColon + 1));\n if (second < 0 || second >= 60)\n throw new IllegalArgumentException(\"Second out of bounds.\");\n }\n }\n else\n throw new IllegalArgumentException(formatError);\n\n long rawTime = 0;\n rawTime += TimeUnit.HOURS.toNanos(hour);\n rawTime += TimeUnit.MINUTES.toNanos(minute);\n rawTime += TimeUnit.SECONDS.toNanos(second);\n rawTime += a_nanos;\n return rawTime;\n }", "public static Date toDate(String dateStr, SimpleDateFormat format) throws ParseException {\r\n\t\treturn format.parse(dateStr);\r\n\t}", "private String getDate(String str) {\n String[] arr = str.split(\"T\");\n DateFormat formatter = new SimpleDateFormat(\"yyyy-mm-d\", Locale.US);\n Date date = null;\n try {\n date = formatter.parse(arr[0]);\n } catch (java.text.ParseException e) {\n Log.e(LOG_TAG, \"Could not parse date\", e);\n }\n SimpleDateFormat dateFormatter = new SimpleDateFormat(\"MMM d, yyyy\", Locale.US);\n\n return dateFormatter.format(date);\n }", "private void parseUTCString(String str)\n {\n SimpleDateFormat formatter;\n // Treat the sub-second part as optional\n if (str.indexOf(\".\") != -1) {\n formatter = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\");\n } else {\n formatter = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n }\n formatter.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\n try {\n Date date = formatter.parse(str);\n itsValue = date.getTime() * 1000L + DUTC.get() * 1000000L + 3506716800000000L;\n } catch (Exception e) {\n throw new NumberFormatException(\"Couldn't parse date as UTC_STRING\");\n }\n }", "public Date unmarshal( String value )\n {\n return DatatypeConverter.parseDateTime( value ).getTime();\n }", "private long convertDate(String date) {\n\tDateFormat fm = new SimpleDateFormat(\"yyyy-mm-dd HH:mm:ss\");\n\tString dateS = date;\n\tString[] dateArray = dateS.split(\"T\");\n\tdateS = \"\";\n\tfor (String s : dateArray) {\n\t if (dateS != \"\") {\n\t\tdateS += \" \" + s;\n\t } else {\n\t\tdateS += s;\n\t }\n\t}\n\tdateArray = dateS.split(\"Z\");\n\tdateS = \"\";\n\tfor (String s : dateArray) {\n\t dateS += s;\n\t}\n\tDate d = null;\n\ttry {\n\t d = fm.parse(dateS);\n\t} catch (ParseException e) {\n\t if (parent.globals._DEBUG)\n\t\te.printStackTrace();\n\t}\n\treturn d.getTime();\n }", "public static java.sql.Timestamp convertToTimestamp(java.util.Date uDate) {\n\t\tif (uDate == null) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tjava.sql.Timestamp timeStamp = new Timestamp(uDate.getTime());\n\t\t\treturn timeStamp;\n\t\t}\n\n\t}", "public static long parseDate(String dateStr) {\n\t\tlong longDate = 0;\n\t\tif (dateStr == null)\n\t\t\treturn longDate;\n\t\tdateStr = dateStr.replaceAll(\" +\", \"\");\t\t\n\t\ttry{\n\t\t\tDateTime dateTime = new DateTime();\n\t\t\tif (dateStr.length() == 5) {\n\t\t\t\tdateTime = DateTimeUtil.getDate(dateStr, \"ddMMM\", Locale.ENGLISH);\n\t\t\t\tlongDate = DateTimeUtil.getDateTimestamp(dateTime, 2);\n\t\t\t} else if (dateStr.length() == 7) {\n\t\t\t\tdateTime = DateTimeUtil.getDate(dateStr, \"ddMMMyy\", Locale.ENGLISH);\n\t\t\t\tlongDate = DateTimeUtil.getDateTimestamp(dateTime, 2);\n\t\t\t} else if (dateStr.length() == 9) {\n\t\t\t\tdateTime = DateTimeUtil.getDate(dateStr, \"ddMMMyyyy\", Locale.ENGLISH);\n\t\t\t\tlongDate = DateTimeUtil.getDateTimestamp(dateTime, 2);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn longDate;\n\t}", "public static Timestamp formaterDatoTilStamp(String dato, String klokkeslett) throws ParseException {\r\n\t\tDateFormat df = new SimpleDateFormat(\"dd.MM.yyyy HH:mm\");\r\n\t\tjava.util.Date startDato = df.parse(dato + \" \" + klokkeslett);\r\n\t\tjava.sql.Timestamp sq = new java.sql.Timestamp(startDato.getTime());\r\n\t\treturn sq;\r\n\t}", "public static Date convertString2Date(String strTime) {\r\n\t\t Calendar calendar = Calendar.getInstance();\r\n\t\t calendar.setTimeInMillis(Long.valueOf(strTime));\r\n\t\t return calendar.getTime();\r\n\t}", "public static Timestamp toTimestamp(Object obj, String pattern, TimeZone timeZone) {\n if (obj == null) {\n return null;\n } else if (obj instanceof Timestamp) {\n final Timestamp paramTimestamp = (Timestamp) obj;\n if (Timestamp.class.equals(paramTimestamp.getClass())) { // pure time-stamp\n return paramTimestamp;\n } else { // sub class\n // because the time-stamp type is not final class.\n return new Timestamp(paramTimestamp.getTime());\n }\n } else if (obj instanceof Date) {\n return new Timestamp(((Date) obj).getTime());\n } else if (obj instanceof String) {\n return toTimestampFromString((String) obj, pattern, timeZone);\n } else if (obj instanceof Calendar) {\n return new Timestamp(((Calendar) obj).getTime().getTime());\n } else if (obj instanceof byte[]) {\n return toTimestamp(toSerializable((byte[]) obj)); // recursive\n } else if (obj instanceof Long) {\n return new Timestamp((Long) obj);\n } else {\n return toTimestampFromString(obj.toString(), pattern, timeZone);\n }\n }", "public static Date convertStringToDate(String strDate)\n\t {\n\t Date myDate = null;\n\t if (strDate.length() > 0)\n\t {\n\t DateFormat formatter = new SimpleDateFormat(EProcurementConstants.INPUT_DATE_FORMAT);\n\t try\n\t {\n\t myDate = formatter.parse(strDate);\n\t } catch (ParseException e)\n\t {\n\t LOGGER.error(\"Not able to parse \" + strDate + \" into date ..\" + e.getMessage());\n\t }\n\t }\n\t return myDate;\n\t }", "public static long fromISO8601UTC(String dateStr) {\n TimeZone tz = TimeZone.getTimeZone(\"UTC\");\n DateFormat df = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'\");\n df.setTimeZone(tz);\n try {\n return df.parse(dateStr).getTime();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return 0;\n }", "public static Date parseTimestampMicro(String microTime) throws ParseException{\r\n /**\r\n * time string contains microseconds\r\n */\r\n int len = microTime.length();\r\n int dotIndex = microTime.lastIndexOf(\".\");\r\n \r\n /**\r\n * yyyy-MM-dd HH:mm:ss.SSSsss\r\n */\r\n if(len == 26 && dotIndex == 19){\r\n String milisTime = microTime.substring(0, patternMiliSecsLen);\r\n return parseTimestringWithMillis(milisTime);\r\n }\r\n /**\r\n * yyyy-MM-dd HH:mm:ss.SSSsssZZZ\r\n */\r\n else if(len == 29 && dotIndex == 19){\r\n String milisTime = microTime.substring(0, patternMiliSecsLen);\r\n /**\r\n * checks if contains time zone\r\n * if yes add minutes to TZ\r\n */ \r\n char suffixTZ = microTime.charAt(len-3);\r\n if(suffixTZ == '+' || suffixTZ == '-'){\r\n String timeZone = microTime.substring(len-3, len)+\"00\";\r\n return parseTimestringWithMillisWithTimeZone(\"\"+milisTime+timeZone);\r\n }\r\n else{\r\n return parseTimestringWithMillis(milisTime);\r\n }\r\n }\r\n /**\r\n * yyyy-MM-dd HH:mm:ss.SSSsssZZZZZ\r\n */\r\n else if(len == 31 && dotIndex == 19){\r\n String milisTime = microTime.substring(0, patternMiliSecsLen);\r\n /**\r\n * checks if contains time zone\r\n * if yes add minutes to TZ\r\n */ \r\n char suffixTZ = microTime.charAt(len-5);\r\n if(suffixTZ == '+' || suffixTZ == '-'){\r\n String timeZone = microTime.substring(len-5, len);\r\n return parseTimestringWithMillisWithTimeZone(\"\"+milisTime+timeZone);\r\n }\r\n else{\r\n return parseTimestringWithMillis(milisTime);\r\n }\r\n }\r\n else{\r\n throw new ParseException(\"Unsupported pattern!\", 0);\r\n }\r\n }", "public static Date parseDate(String s) {\n\t\tDate d = null;\n\t\tif (s == null) {\n\t\t\treturn d;\n\t\t}\n\n\t\tString pattern = \"\";\n\n\t\tif (s.indexOf(':') >= 0) {\n\t\t\tif (s.length() > 20) {\n\t\t\t\tpattern = \"yyyy-MM-dd HH:mm:ss.SSS\";\n\t\t\t} else {\n\t\t\t\tif (s.lastIndexOf(':') != s.indexOf(':'))\n\t\t\t\t\tpattern = DD_MM_YYYY_HH_MM_SS;\n\t\t\t\telse\n\t\t\t\t\tpattern = \"dd/MM/yyyy HH:mm\";\n\t\t\t}\n\t\t} else {\n\t\t\tpattern = DD_MM_YYYY;\n\t\t}\n\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(pattern);\n\t\tsdf.setTimeZone(TimeZone.getDefault());\n\t\tif (s.length() > 0) {\n\t\t\ttry {\n\t\t\t\td = sdf.parse(s);\n\t\t\t} catch (ParseException e) {\n\t\t\t\tthrow new FenixException(\"Errore nella conversione della data. \" + e.getMessage());\n\t\t\t}\n\t\t}\n\t\treturn d;\n\t}", "public Date parseAsISO8601(String str, ParsePosition parsePosition) {\n DateFormat dateFormat;\n int length = str.length();\n int i = length - 1;\n char charAt = str.charAt(i);\n if (length <= 10 && Character.isDigit(charAt)) {\n dateFormat = this._formatPlain;\n if (dateFormat == null) {\n dateFormat = _cloneFormat(DATE_FORMAT_PLAIN);\n this._formatPlain = dateFormat;\n }\n } else if (charAt == 'Z') {\n DateFormat dateFormat2 = this._formatISO8601_z;\n if (dateFormat2 == null) {\n dateFormat2 = _cloneFormat(DATE_FORMAT_ISO8601_Z);\n this._formatISO8601_z = dateFormat2;\n }\n if (str.charAt(length - 4) == ':') {\n StringBuilder sb = new StringBuilder(str);\n sb.insert(i, \".000\");\n str = sb.toString();\n dateFormat = dateFormat2;\n } else {\n dateFormat = dateFormat2;\n }\n } else if (hasTimeZone(str)) {\n int i2 = length - 3;\n char charAt2 = str.charAt(i2);\n if (charAt2 == ':') {\n StringBuilder sb2 = new StringBuilder(str);\n sb2.delete(i2, length - 2);\n str = sb2.toString();\n } else if (charAt2 == '+' || charAt2 == '-') {\n str = str + \"00\";\n }\n int length2 = str.length();\n if (Character.isDigit(str.charAt(length2 - 9))) {\n StringBuilder sb3 = new StringBuilder(str);\n sb3.insert(length2 - 5, \".000\");\n str = sb3.toString();\n }\n dateFormat = this._formatISO8601;\n if (dateFormat == null) {\n dateFormat = _cloneFormat(DATE_FORMAT_ISO8601);\n this._formatISO8601 = dateFormat;\n }\n } else {\n StringBuilder sb4 = new StringBuilder(str);\n if ((length - str.lastIndexOf(84)) - 1 <= 8) {\n sb4.append(\".000\");\n }\n sb4.append('Z');\n str = sb4.toString();\n dateFormat = this._formatISO8601_z;\n if (dateFormat == null) {\n dateFormat = _cloneFormat(DATE_FORMAT_ISO8601_Z);\n this._formatISO8601_z = dateFormat;\n }\n }\n return dateFormat.parse(str, parsePosition);\n }", "private static Date parseISOTimestringWithMillis(String timestring) throws ParseException{\r\n boolean containsT = timestring.contains(\"T\");\r\n boolean containsSpace = timestring.contains(\" \");\r\n int len = timestring.length();\r\n char colonTZ = timestring.charAt(len-3);\r\n if(colonTZ == ':'){\r\n String part1 = timestring.substring(0, len-3);\r\n String part2 = timestring.substring(len-2, len);\r\n try{\r\n if(containsT){\r\n Date date = formatMiliSecsTZwT.parse(part1+part2);\r\n return date;\r\n }else if(containsSpace){\r\n Date date = formatMiliSecsTZ.parse(part1+part2);\r\n return date;\r\n }\r\n else{\r\n throw new ParseException(\"Unsupported pattern!\", 0);\r\n }\r\n } catch(ParseException e){\r\n throw new ParseException(e.getMessage(), 0);\r\n }\r\n }\r\n else{\r\n throw new ParseException(\"Unsupported pattern!\", 0);\r\n }\r\n }", "private String convertToDateFormat(String inputDateString) throws DateTimeParseException {\n\t\treturn inputDateString;\n\t}", "public static Date ISO8601_toDate(String dateString) throws java.text.ParseException {\n SimpleDateFormat df = new SimpleDateFormat( \"yyyy-MM-dd'T'HH:mm:ssz\" );\n\n //this is zero time so we need to add that TZ indicator for\n if ( dateString.endsWith( \"Z\" ) ) {\n dateString = dateString.substring( 0, dateString.length() - 1) + \"GMT-00:00\";\n } else {\n int inset = 6;\n\n String s0 = dateString.substring( 0, dateString.length() - inset );\n String s1 = dateString.substring( dateString.length() - inset, dateString.length() );\n\n dateString = s0 + \"GMT\" + s1;\n }\n\n return df.parse(dateString);\n\n }", "public static Date StringToDate(String strFecha) throws ParseException {\r\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\");\r\n return simpleDateFormat.parse(strFecha);\r\n }", "public LocalDateTime parseLocalDateTime(String inputString){\r\n LocalDateTime dateTime = null;\r\n\r\n //handle cases like Thu Oct 9 09:43:23 2016 where dayOfMonth has one digit\r\n Pattern patternDateTime1 = Pattern.compile(\"(Mon|Tue|Wed|Thu|Fri|Sat|Sun)\\\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\\\s{1,2}\\\\d\\\\s\\\\d{2}:\\\\d{2}:\\\\d{2}\\\\s\\\\d{4}\"); //date pattern\r\n DateTimeFormatter formatter1 = DateTimeFormatter.ofPattern(\"EEE MMM d HH:mm:ss yyyy\");\r\n Matcher matcherDateTime1 = patternDateTime1.matcher(inputString);\r\n\r\n //handle cases like Thu Oct 19 09:43:23 2016 where dayOfMonth has two digit\r\n Pattern patternDateTime2 = Pattern.compile(\"(Mon|Tue|Wed|Thu|Fri|Sat|Sun)\\\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\\\s{1,2}\\\\d{2}\\\\s\\\\d{2}:\\\\d{2}:\\\\d{2}\\\\s\\\\d{4}\"); //date pattern\r\n DateTimeFormatter formatter2 = DateTimeFormatter.ofPattern(\"EEE MMM dd HH:mm:ss yyyy\");\r\n Matcher matcherDateTime2 = patternDateTime2.matcher(inputString);\r\n\r\n if (matcherDateTime1.find()){\r\n try {\r\n dateTime = LocalDateTime.parse(matcherDateTime1.group(),formatter1);\r\n } catch (Exception e) {\r\n return null;\r\n }\r\n }else if(matcherDateTime2.find()){\r\n try {\r\n dateTime = LocalDateTime.parse(matcherDateTime2.group(),formatter2);\r\n } catch (Exception e) {\r\n return null;\r\n }\r\n }\r\n return dateTime;\r\n }", "public static Date strToDate(String strDate)\r\n/* 127: */ {\r\n/* 128:178 */ SimpleDateFormat formatter = new SimpleDateFormat(\"yyyyMMdd\");\r\n/* 129:179 */ ParsePosition pos = new ParsePosition(0);\r\n/* 130:180 */ Date strtodate = formatter.parse(strDate, pos);\r\n/* 131:181 */ return strtodate;\r\n/* 132: */ }", "public static String timestampOf(Date date) {\n if (date == null) {\n return null;\n }\n\n return formatDate(date, TIMESTAMP_FORMAT);\n }", "public static LocalDateTime dateTimeFromISO8601(String string) {\n if (string == null) {\n throw new DateTimeParseException(\"ISO-8601 string is null.\", \"\", 0);\n }\n\n // If the date-time is specified with a space separating the date and time,\n // convert the space to 'T' so that it is proper ISO-8601. This tolerance is\n // needed to support PostgreSQL-style times.\n if (string.length() > DATE_TIME_DELIMITATION_INDEX\n && string.charAt(DATE_TIME_DELIMITATION_INDEX) == ' ') {\n char[] characters = string.toCharArray();\n characters[DATE_TIME_DELIMITATION_INDEX] = 'T';\n string = new String(characters);\n }\n\n // If the date-time is specified with a two-digit time zone offset instead of\n // an offset in the form [+-]HH:MM, then convert to the latter. This tolerance\n // is needed to support PostgreSQL-style times.\n int length = string.length();\n if (length > 3) {\n char sign = string.charAt(length - 3);\n if (sign == '+' || sign == '-') {\n char d1 = string.charAt(length - 2);\n char d2 = string.charAt(length - 1);\n if (d1 >= '0' && d1 <= '9' && d2 >= '0' && d2 <= '9') {\n string = string + \":00\";\n }\n }\n }\n\n LocalDateTime dateTime;\n try {\n dateTime = LocalDateTime.parse(string);\n } catch (DateTimeParseException e1) {\n try {\n LocalDate date = LocalDate.parse(string);\n dateTime = LocalDateTime.of(date, LocalTime.MIDNIGHT);\n } catch (DateTimeParseException e2) {\n try {\n ZonedDateTime zonedDateTime = ZonedDateTime.parse(string);\n dateTime = LocalDateTime.ofInstant(\n zonedDateTime.toInstant(), ZoneOffset.UTC);\n } catch (DateTimeParseException e3) {\n throw new DateTimeParseException(\n \"DateTime not provided in any supported ISO-8601 format.\", string, 0);\n }\n }\n }\n return dateTime;\n }", "private static Date parseTimestringWithMillisWithTimeZone(String timestring) throws ParseException{\r\n boolean containsT = timestring.contains(\"T\");\r\n boolean containsSpace = timestring.contains(\" \");\r\n int len = timestring.length();\r\n char dot = timestring.charAt(len-9);\r\n boolean containsDot = false;\r\n if(dot == '.'){\r\n containsDot = true;\r\n }\r\n if(!containsT && containsSpace && containsDot){\r\n try {\r\n Date date = formatMiliSecsTZ.parse(timestring);\r\n return date;\r\n } catch (ParseException e) {\r\n throw new ParseException(e.getMessage(), 0);\r\n }\r\n }\r\n else if(containsT && !containsSpace && containsDot){\r\n try {\r\n Date date = formatMiliSecsTZwT.parse(timestring);\r\n return date;\r\n } catch (ParseException e) {\r\n throw new ParseException(e.getMessage(), 0);\r\n }\r\n }\r\n else{\r\n throw new ParseException(\"Unsupported pattern!\", 0);\r\n }\r\n }", "public static Date fotmatDate18(String myDate) {\n\t\tif(myDate == null || \"\".equals(myDate)) return null;\r\n\t\tDate dDate = (Date) new SimpleDateFormat(\"yyyyMMddHHmmss\").parse(myDate,\r\n\t\t\t\tnew ParsePosition(0));\r\n\t\treturn dDate;\r\n\t}", "private Date parseDate(String text) throws Exception {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\");\n return dateFormat.parse(text);\n }", "private static void m1() {\n\n String d = \"2019/03/22 10:00-11:00\";\n DateFormat df = new SimpleDateFormat(\"yyyy/MM/dd HH:mm-HH:mm\");\n try {\n Date parse = df.parse(d);\n System.out.println(df.format(parse));\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }", "public static GregorianCalendar TimeStampDecode(String timestamp)\n\t{\n\t\ttimestamp = PduCodec.swapDigits(timestamp);\n\t\tint year = Integer.parseInt(timestamp.substring(0, 2));\n\t\tint month = Integer.parseInt(timestamp.substring(2, 4)) - 1;\n\t\tint day = Integer.parseInt(timestamp.substring(4, 6));\n\t\tint hour = Integer.parseInt(timestamp.substring(6, 8));\n\t\tint minute = Integer.parseInt(timestamp.substring(8, 10));\n\t\tint second = Integer.parseInt(timestamp.substring(10, 12));\n\t\tint zone = Integer.parseInt(timestamp.substring(10, 12)) * (60 * 60 * 1000) / 4;\n\t\tGregorianCalendar time = new GregorianCalendar(year, month, day, hour, minute, second);\n\t\treturn time;\n\t}", "public static Date convertStringToDate(String strDate)\n\t\t\tthrows ParseException {\n\t\tDate aDate = null;\n\n\t\ttry {\n\t\t\tif (log.isDebugEnabled()) {\n\t\t\t\tlog.debug(\"converting date with pattern: \" + getDatePattern());\n\t\t\t}\n\n\t\t\taDate = convertStringToDate(getDatePattern(), strDate);\n\t\t} catch (ParseException pe) {\n\t\t\tlog.error(\"Could not convert '\" + strDate\n\t\t\t\t\t+ \"' to a date, throwing exception\");\n\t\t\tpe.printStackTrace();\n\t\t\tthrow new ParseException(pe.getMessage(), pe.getErrorOffset());\n\t\t}\n\n\t\treturn aDate;\n\t}", "public static Instant parse(final String dateString) {\n for (DateTimeFormatter formatter : VALID_DATE_FORMATS) {\n try {\n final var temporalAccessor = formatter.parse(dateString);\n return Instant.from(temporalAccessor);\n } catch (final Exception e) {\n //ignore failures - if no date string is parsable, an error is thrown below\n }\n }\n throw new IllegalArgumentException(\"Invalid date format: \\\"\" + dateString + \"\\\"\");\n }", "@Override\n public Timestamp convertField(final Object field, final Optional<String> pattern, final String name) {\n if (field == null) {\n return null;\n }\n if (field instanceof Timestamp) {\n return (Timestamp) field;\n }\n if (field instanceof Date) {\n final Date date = (Date) field;\n return new Timestamp(date.getTime());\n }\n if (field instanceof Number) {\n final Number number = (Number) field;\n return new Timestamp(number.longValue());\n }\n if (field instanceof String) {\n final String string = field.toString().trim();\n if (string.isEmpty()) {\n return null;\n }\n\n if (pattern.isPresent()) {\n final DateTimeFormatter formatter = DateTimeFormatter.ofPattern(pattern.get());\n try {\n final LocalDateTime localDateTime = LocalDateTime.parse(string, formatter);\n return Timestamp.valueOf(localDateTime);\n } catch (final DateTimeParseException e) {\n final String message = String.format(\"Convert Field Name [%s] Value [%s] to Timestamp LocalDateTime parsing failed: %s\", name, field, e.getMessage());\n throw new IllegalTypeConversionException(message);\n }\n } else {\n try {\n final long number = Long.parseLong(string);\n return new Timestamp(number);\n } catch (final NumberFormatException e) {\n final String message = String.format(\"Convert Field Name [%s] Value [%s] to Timestamp Long parsing failed: %s\", name, field, e.getMessage());\n throw new IllegalTypeConversionException(message);\n }\n }\n }\n\n final String message = String.format(\"Convert Field Name [%s] Value [%s] Class [%s] to Timestamp not supported\", name, field, field.getClass());\n throw new IllegalTypeConversionException(message);\n }", "public static String convertDateAndTime(String inputString) {\n String trimmedInputString = inputString.trim();\n\n if (trimmedInputString.length() < 10) {\n return convertTime(inputString);\n } else {\n String dateString = trimmedInputString.substring(0, 10).trim();\n String timeString = trimmedInputString.substring(10).trim();\n try {\n String date = LocalDate.parse(dateString).format(DateTimeFormatter.ofPattern(\"d MMM yyyy\"));\n\n if (timeString.length() == 4) {\n return date + \" \" + convertTime(timeString);\n }\n\n return date + timeString;\n } catch (DateTimeParseException e) {\n return inputString;\n }\n }\n }", "public Date createDate(String strDate){\n\n Date date = null;\n\n // Get time\n Calendar cal = Calendar.getInstance();\n Date currentLocalTime = cal.getTime();\n DateFormat dateformat = new SimpleDateFormat(\"HH:mm:ss\");\n String localTime = dateformat.format(currentLocalTime);\n\n // Concat strings\n String tmpDate = strDate + \" \" + localTime;\n //\n SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\n try {\n date = format.parse(tmpDate);\n\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n return date;\n }", "@Test void testShortTimestampLiteral() {\n sql(\"select timestamp '1969-07-20'\")\n .ok(\"SELECT TIMESTAMP '1969-07-20 00:00:00'\");\n // PostgreSQL allows the following. We should too.\n sql(\"select ^timestamp '1969-07-20 1:2'^\")\n .fails(\"Illegal TIMESTAMP literal '1969-07-20 1:2': not in format \"\n + \"'yyyy-MM-dd HH:mm:ss'\"); // PostgreSQL gives 1969-07-20 01:02:00\n sql(\"select ^timestamp '1969-07-20:23:'^\")\n .fails(\"Illegal TIMESTAMP literal '1969-07-20:23:': not in format \"\n + \"'yyyy-MM-dd HH:mm:ss'\"); // PostgreSQL gives 1969-07-20 23:00:00\n }", "public static String parseStringDate(String s, String myPattern) {\n\n\t\tString pattern = \"\";\n\t\tLocale locale = null;\n\t\tif (s.indexOf(':') >= 0) {\n\t\t\tif (s.length() > 23) {\n\n\t\t\t\tpattern = \"EEE MMM dd HH:mm:ss Z yyyy\";\n\t\t\t\tlocale = Locale.ENGLISH;\n\n\t\t\t} else if (s.length() > 20) {\n\n\t\t\t\tpattern = \"yyyy-MM-dd HH:mm:ss.SSS\";\n\n\t\t\t} else {\n\t\t\t\tpattern = DD_MM_YYYY_HH_MM_SS;\n\n\t\t\t}\n\t\t} else {\n\t\t\tpattern = DD_MM_YYYY;\n\t\t}\n\n\t\tSimpleDateFormat sdfSource = null;\n\t\tif (pattern.length() > 23) {\n\t\t\tsdfSource = new SimpleDateFormat(pattern, locale);\n\t\t} else {\n\t\t\tsdfSource = new SimpleDateFormat(pattern);\n\t\t}\n\n\t\tDate date = null;\n\t\ttry {\n\t\t\tdate = sdfSource.parse(s);\n\t\t} catch (ParseException e) {\n\t\t\tLOGGER.error(e);\n\t\t}\n\n\t\tSimpleDateFormat sdfDestination = new SimpleDateFormat(myPattern);\n\n\t\treturn sdfDestination.format(date);\n\t}", "public static Timestamp createTimestamp(int[] comps) {\n\n if (comps.length < 3) {\n throw new IllegalArgumentException(\"Invalid timestamp \" +\n \"components, it should contain at least 3 components: year, \" +\n \"month and day, but only \" + comps.length);\n } else if (comps.length > 7) {\n throw new IllegalArgumentException(\"Invalid timestamp \" +\n \"components, it should contain at most 7 components: year, \" +\n \"month, day, hour, minute, second and nanosecond, but has \" +\n comps.length + \" components\");\n }\n\n int num = comps.length;\n for (int i = 0; i < num; i++) {\n validateComponent(i, comps[i]);\n }\n try {\n ZonedDateTime zdt = ZonedDateTime.of(comps[0],\n comps[1],\n comps[2],\n ((num > 3) ? comps[3] : 0),\n ((num > 4) ? comps[4] : 0),\n ((num > 5) ? comps[5] : 0),\n ((num > 6) ? comps[6] : 0),\n UTCZone);\n return toTimestamp(zdt.toInstant());\n } catch (DateTimeException dte) {\n throw new IllegalArgumentException(\"Invalid timestamp \" +\n \"components: \" + dte.getMessage());\n }\n }", "public static synchronized Date parseDate(String s) throws ParseException {\n return dateFormat.parse(s);\n }", "public LocalDateTime parseDate(String str) {\n String time = str.substring(str.indexOf(\",\") + 2);\n int hour = new Integer(time.split(\":\")[0].trim());\n int min = new Integer(time.split(\":\")[1].trim());\n LocalTime localTime = LocalTime.of(hour, min);\n\n str = str.substring(0, str.indexOf(\",\")).trim();\n LocalDate localDate = LocalDate.now();\n\n if (str.contains(\"вчера\")) {\n localDate.minusDays(1);\n } else if (!str.contains(\"сегодня\") && !str.contains(\"вчера\")) {\n int year = new Integer(\"20\" + str.substring(str.length() - 2));\n String strMonth = str.substring(2, 6).trim();\n int day = new Integer(str.substring(0, 2).trim());\n localDate = LocalDate.of(year, parseMonth(strMonth), day);\n }\n return LocalDateTime.of(localDate, localTime);\n }", "public static Date FormatStringToDate(String dateString) {\r\n SimpleDateFormat dF = new SimpleDateFormat(\"dd/mm/yyyy HH:mm:ss\");\r\n Date date = null;\r\n try {\r\n date = dF.parse(dateString);\r\n } catch (ParseException e) {\r\n e.printStackTrace();\r\n }\r\n return date;\r\n }", "public static Date formaterStampTilDato(Timestamp timestamp) {\r\n\t\tDate date = new Date(timestamp.getTime());\r\n\t\treturn date;\r\n\t}", "private String syncTimeStamp(String timestamp){\r\n StringBuilder dateBuilder = new StringBuilder(timestamp);\r\n String time = dateBuilder.toString().split(\"T\")[1].substring(0, 8);\r\n String[] timeArr = time.split(\":\");\r\n String seconds = timeArr[2];\r\n String dd = dateBuilder.toString().split(\"T\")[0].split(\"-\")[2];\r\n String mm = dateBuilder.toString().split(\"T\")[0].split(\"-\")[1];\r\n String yyyy = dateBuilder.toString().split(\"T\")[0].split(\"-\")[0];\r\n int hour = Integer.parseInt(timeArr[0]);\r\n int minutes = Integer.parseInt(timeArr[1]);\r\n minutes += 30;\r\n hour+=5;\r\n if (minutes>=60){\r\n hour += 1;\r\n minutes -= 60;\r\n }\r\n if (hour >= 24){\r\n hour -= 24;\r\n dd = Integer.toString(Integer.parseInt(dd) + 1);\r\n if (Integer.parseInt(dd) < 10)\r\n dd = \"0\" + dd;\r\n }\r\n String minutesString;\r\n if (minutes < 10)\r\n minutesString = \"0\" + Integer.toString(minutes);\r\n else\r\n minutesString = Integer.toString(minutes);\r\n\r\n String hoursString;\r\n if (hour < 10)\r\n hoursString = \"0\" + Integer.toString(hour);\r\n else\r\n hoursString = Integer.toString(hour);\r\n String finalTime = hoursString + \":\" + minutesString + \":\" + seconds;\r\n String finalDate = dd + \"-\" + mm + \"-\" + yyyy;\r\n\r\n return (finalDate + \" \" + finalTime);\r\n }", "public static String parseDate(String input) {\n String year = input.substring(0, 4);\n String month = input.substring(5, 7);\n String day = input.substring(8, 10);\n return year + \"-\" + month + \"-\" + day;\n }", "public String convertDateFormate(String dt) {\n String formatedDate = \"\";\n if (dt.equals(\"\"))\n return \"1970-01-01\";\n String[] splitdt = dt.split(\"-\");\n formatedDate = splitdt[2] + \"-\" + splitdt[1] + \"-\" + splitdt[0];\n \n return formatedDate;\n \n }" ]
[ "0.6860657", "0.6516975", "0.65116686", "0.61970526", "0.6158359", "0.6040429", "0.5924011", "0.584925", "0.57833064", "0.57768416", "0.5765832", "0.5647434", "0.5635359", "0.5617535", "0.5596985", "0.55848616", "0.5534403", "0.5529649", "0.5513018", "0.55105627", "0.55014104", "0.54798627", "0.544232", "0.5441758", "0.54246193", "0.53905827", "0.538967", "0.5379842", "0.53512836", "0.5344612", "0.5334803", "0.5333571", "0.5223393", "0.5218006", "0.518741", "0.5183074", "0.51801604", "0.5138121", "0.5107686", "0.50917345", "0.50776225", "0.50640804", "0.50454384", "0.50272554", "0.5010193", "0.4967623", "0.4964052", "0.49593928", "0.49513432", "0.49403712", "0.49370894", "0.49067023", "0.4904205", "0.48989972", "0.48961046", "0.48953015", "0.4890481", "0.48864898", "0.4885068", "0.48740837", "0.48691338", "0.48620406", "0.48509035", "0.48438397", "0.48425147", "0.48420557", "0.4836603", "0.48340526", "0.48239884", "0.48093575", "0.48018178", "0.47937277", "0.4792879", "0.47876585", "0.47873172", "0.47852024", "0.47844297", "0.47787663", "0.477738", "0.47770622", "0.4759916", "0.47524577", "0.47521004", "0.47442693", "0.4742717", "0.47401994", "0.47352555", "0.47342846", "0.47137886", "0.47016627", "0.46964613", "0.46902832", "0.46873233", "0.4677371", "0.4671391", "0.46689707", "0.4654046", "0.46488774", "0.46413", "0.46339816" ]
0.6011824
6
taskSnapshot.getMetadata() contains file metadata such as size, contenttype, and download URL.
@Override public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) { Uri downloadUrl = taskSnapshot.getDownloadUrl(); if (downloadUrl != null) { mPlayer.image = downloadUrl.toString(); savePlayerInfo(); ToastUtils.show(R.string.toast_profile_saved, Toast.LENGTH_SHORT); } else { ToastUtils.show(R.string.toast_error_generic, Toast.LENGTH_SHORT); } showProgress(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "com.google.cloud.compute.v1.Metadata getMetadata();", "com.google.cloud.talent.v4beta1.ResponseMetadata getMetadata();", "public ResourceContent getMetadata() throws IOException;", "@java.lang.Override\n public io.grafeas.v1.Metadata getMetadata() {\n return metadata_ == null ? io.grafeas.v1.Metadata.getDefaultInstance() : metadata_;\n }", "public SongMetada getMetadata() {\n\t\treturn metadata;\n\t}", "public Map<String, String> getMetadata() {\n return metadata;\n }", "public Map<String, String> getMetadata() {\n return metadata;\n }", "public Map getMetadata() {\n return metadata;\n }", "@java.lang.Override\n public io.grafeas.v1.MetadataOrBuilder getMetadataOrBuilder() {\n return metadata_ == null ? io.grafeas.v1.Metadata.getDefaultInstance() : metadata_;\n }", "public PDMetadata getMetadata() {\n/* 528 */ PDMetadata retval = null;\n/* 529 */ COSBase mdStream = this.stream.getDictionaryObject(COSName.METADATA);\n/* 530 */ if (mdStream != null)\n/* */ {\n/* 532 */ if (mdStream instanceof COSStream) {\n/* */ \n/* 534 */ retval = new PDMetadata((COSStream)mdStream);\n/* */ }\n/* 536 */ else if (!(mdStream instanceof org.apache.pdfbox.cos.COSNull)) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 542 */ throw new IllegalStateException(\"Expected a COSStream but was a \" + mdStream\n/* */ \n/* 544 */ .getClass().getSimpleName());\n/* */ } \n/* */ }\n/* 547 */ return retval;\n/* */ }", "public Object getMetadata() {\n return this.metadata;\n }", "Metadata getMetaData();", "public Map<String, Object> getMetadata() {\n return metadata;\n }", "@Test(timeout = TIMEOUT)\n public void getMetadataTaskLifecycle() throws Exception {\n final Result<TaskResponse> uploadImportTaskResponseResult = docSDKClient.importUsing().upload(new UploadImportRequest(), jpgTest1InputStream);\n assertThat(uploadImportTaskResponseResult.getStatus()).isEqualTo(HttpStatus.SC_OK);\n\n final TaskResponse uploadImportTaskResponse = uploadImportTaskResponseResult.getBody();\n assertThat(uploadImportTaskResponse.getOperation()).isEqualTo(Operation.IMPORT_UPLOAD);\n\n // Thumbnail\n final GetMetadataTaskRequest getMetadataTaskRequest = new GetMetadataTaskRequest().setInput(uploadImportTaskResponse.getId()).setInputFormat(JPG);\n final Result<TaskResponse> metadataTaskResponseResult = docSDKClient.tasks().metadata(getMetadataTaskRequest);\n assertThat(metadataTaskResponseResult.getStatus()).isEqualTo(HttpStatus.SC_CREATED);\n\n final TaskResponse metadataTaskResponse = metadataTaskResponseResult.getBody();\n assertThat(metadataTaskResponse.getOperation()).isEqualTo(Operation.METADATA);\n\n // Wait\n final Result<TaskResponse> waitMetadataTaskResponseResult = docSDKClient.tasks().wait(metadataTaskResponse.getId());\n assertThat(waitMetadataTaskResponseResult.getStatus()).isEqualTo(HttpStatus.SC_OK);\n\n final TaskResponse waitMetadataTaskResponse = waitMetadataTaskResponseResult.getBody();\n assertThat(waitMetadataTaskResponse.getOperation()).isEqualTo(Operation.METADATA);\n assertThat(waitMetadataTaskResponse.getStatus()).isEqualTo(Status.FINISHED);\n assertThat(waitMetadataTaskResponse.getId()).isEqualTo(metadataTaskResponse.getId());\n\n // Show\n final Result<TaskResponse> showMetadataTaskResponseResult = docSDKClient.tasks().show(metadataTaskResponse.getId());\n assertThat(showMetadataTaskResponseResult.getStatus()).isEqualTo(HttpStatus.SC_OK);\n\n final TaskResponse showMetadataTaskResponse = showMetadataTaskResponseResult.getBody();\n assertThat(showMetadataTaskResponse.getOperation()).isEqualTo(Operation.METADATA);\n assertThat(showMetadataTaskResponse.getStatus()).isEqualTo(Status.FINISHED);\n assertThat(showMetadataTaskResponse.getId()).isEqualTo(metadataTaskResponse.getId());\n assertThat(showMetadataTaskResponse.getResult().getMetadata()).isNotEmpty();\n\n // Delete\n final Result<Void> deleteVoidResult = docSDKClient.tasks().delete(metadataTaskResponse.getId());\n assertThat(deleteVoidResult.getStatus()).isEqualTo(HttpStatus.SC_NO_CONTENT);\n }", "com.google.dataflow.v1beta3.TemplateMetadata getMetadata();", "Map<String, Object> getAllMetadata();", "public java.util.List<MetadataEntry> getMetadataList() {\n return metadata_;\n }", "public ExecutionMetadata getExecutionMetadata();", "public AbstractMetadata getMetadata() {\n\t\treturn metadata;\n\t}", "public PDMetadata getMetadata()\n {\n PDMetadata retval = null;\n COSBase mdStream = stream.getDictionaryObject(COSName.METADATA);\n if (mdStream instanceof COSStream)\n {\n retval = new PDMetadata((COSStream) mdStream);\n } \n else if (mdStream instanceof COSNull)\n {\n // null is authorized\n } \n else if (mdStream != null)\n {\n throw new IllegalStateException(\"Expected a COSStream but was a \"\n + mdStream.getClass().getSimpleName());\n }\n return retval;\n }", "com.google.cloud.compute.v1.MetadataOrBuilder getMetadataOrBuilder();", "public List<Metadata> getMetadata()\n\t{\n\t\treturn mMetadata;\n\t}", "com.google.cloud.talent.v4beta1.ResponseMetadataOrBuilder getMetadataOrBuilder();", "public String getMetaDataFileName() {\n return null;\n }", "public @Nullable MediaMetadata2 getMetadata() {\n return mMetadata;\n }", "@Nullable\n public abstract MediaMetadata getPlaylistMetadata();", "@NonNull\n JsonMap getMetadata();", "@Nullable\n public Metadata getMetadata() {\n return mMetadata;\n }", "public io.grafeas.v1.Metadata getMetadata() {\n if (metadataBuilder_ == null) {\n return metadata_ == null ? io.grafeas.v1.Metadata.getDefaultInstance() : metadata_;\n } else {\n return metadataBuilder_.getMessage();\n }\n }", "private void readMetadata() throws IOException {\n\t\t/*int magicNumber = */ metadataFile.readInt();\n\t\t/*int formatVersion = */ metadataFile.readInt();\n\t\t/*int managerIndex = */ metadataFile.readInt();\n\t\tfileListOffset = metadataFile.readInt() & 0xFFFFFFFFL;\n\t\tpathListOffset = metadataFile.readInt() & 0xFFFFFFFFL;\n\n\t\tmetadataFile.setPosition(fileListOffset);\n\t\treadFileList();\n\t}", "public String getMetaFile() {\r\n return metaFile;\r\n }", "com.google.dataflow.v1beta3.RuntimeMetadata getRuntimeMetadata();", "public void dumpImageMetaData(Uri uri) {\n // BEGIN_INCLUDE (dump_metadata)\n\n // The query, since it only applies to a single document, will only return one row.\n // no need to filter, sort, or select fields, since we want all fields for one\n // document.\n Cursor cursor = getActivity().getContentResolver()\n .query(uri, null, null, null, null, null);\n\n try {\n // moveToFirst() returns false if the cursor has 0 rows. Very handy for\n // \"if there's anything to look at, look at it\" conditionals.\n if (cursor != null && cursor.moveToFirst()) {\n\n // Note it's called \"Display Name\". This is provider-specific, and\n // might not necessarily be the file name.\n String displayName = cursor.getString(\n cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME));\n //Toast.makeText(getActivity(),\"Display Name: \"+ displayName, Toast.LENGTH_SHORT).show();\n imageInfo += \"Name:\" + displayName;\n int sizeIndex = cursor.getColumnIndex(OpenableColumns.SIZE);\n // If the size is unknown, the value stored is null. But since an int can't be\n // null in java, the behavior is implementation-specific, which is just a fancy\n // term for \"unpredictable\". So as a rule, check if it's null before assigning\n // to an int. This will happen often: The storage API allows for remote\n // files, whose size might not be locally known.\n String size = null;\n if (!cursor.isNull(sizeIndex)) {\n // Technically the column stores an int, but cursor.getString will do the\n // conversion automatically.\n size = cursor.getString(sizeIndex);\n } else {\n size = \"Unknown\";\n }\n imageInfo += \"Size: \" + size;\n //Toast.makeText(getActivity(),\"Size: \"+size,Toast.LENGTH_SHORT).show();\n }\n } finally {\n if (cursor != null) {\n cursor.close();\n }\n }\n // END_INCLUDE (dump_metadata)\n }", "@java.lang.Override\n public com.google.protobuf.Struct getMetadata() {\n return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_;\n }", "public List<AbstractMetadata> getMetadata() {\n\t\treturn Collections.unmodifiableList(this.metadata);\n\t}", "public NestedSet<Artifact> getInstrumentationMetadataFiles() {\n return instrumentationMetadataFiles;\n }", "public com.opentext.bn.converters.avro.entity.PayloadRef getFileInfo() {\n return fileInfo;\n }", "public com.opentext.bn.converters.avro.entity.PayloadRef getFileInfo() {\n return fileInfo;\n }", "public GenericMetadata getMetadata()\n {\n // return definition metadata\n GenericMetadata metadata = definition.getMetadata();\n if ((metadata != null) && (metadata.getFields() != null) && !metadata.getFields().isEmpty())\n {\n return metadata;\n }\n\n // return node metadata\n return super.getMetadata();\n }", "public Properties getImageMetaData() {\n\t\treturn null;\n\t}", "public String getMetadataURL();", "public EntityMetadata[] getMetadata()\r\n/* 30: */ {\r\n/* 31:30 */ return this.metadata;\r\n/* 32: */ }", "@Override\r\n\tpublic Map<String, Object> getMetadata() {\n\t\treturn null;\r\n\t}", "@Nullable\n @Generated\n @Selector(\"metadata\")\n public native NSDictionary<?, ?> metadata();", "public @Nullable MediaMetadata getMetadata() {\n try {\n return mSessionBinder.getMetadata();\n } catch (RemoteException e) {\n Log.wtf(TAG, \"Error calling getMetadata.\", e);\n return null;\n }\n }", "public Map<String, Variant<?>> GetMetadata();", "@Override\r\n\tpublic String readMetadataFile(String packageName) {\n\t\treturn null;\r\n\t}", "public TaskContextMetadata getTaskContextMetadata()\n {\n return taskContextMetadata;\n }", "public JobMetadata getMetaData() {\n return this.metaData;\n }", "@java.lang.Override\n public entities.Torrent.FileInfo getFileInfo() {\n return fileInfo_ == null ? entities.Torrent.FileInfo.getDefaultInstance() : fileInfo_;\n }", "@java.lang.Override\n public entities.Torrent.FileInfo getFileInfo() {\n return fileInfo_ == null ? entities.Torrent.FileInfo.getDefaultInstance() : fileInfo_;\n }", "org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata();", "org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata();", "org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata();", "org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata();", "org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata();", "org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata();", "org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata();", "org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata();", "org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata();", "org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata();", "org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata();", "org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata();", "org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata();", "org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata();", "public int getMetadataCount() {\n return metadata_.size();\n }", "public org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata() {\n return metadata_ == null ? org.apache.calcite.avatica.proto.Responses.RpcMetadata.getDefaultInstance() : metadata_;\n }", "public org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata() {\n return metadata_ == null ? org.apache.calcite.avatica.proto.Responses.RpcMetadata.getDefaultInstance() : metadata_;\n }", "public org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata() {\n return metadata_ == null ? org.apache.calcite.avatica.proto.Responses.RpcMetadata.getDefaultInstance() : metadata_;\n }", "public org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata() {\n return metadata_ == null ? org.apache.calcite.avatica.proto.Responses.RpcMetadata.getDefaultInstance() : metadata_;\n }", "public org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata() {\n return metadata_ == null ? org.apache.calcite.avatica.proto.Responses.RpcMetadata.getDefaultInstance() : metadata_;\n }", "public org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata() {\n return metadata_ == null ? org.apache.calcite.avatica.proto.Responses.RpcMetadata.getDefaultInstance() : metadata_;\n }", "public org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata() {\n return metadata_ == null ? org.apache.calcite.avatica.proto.Responses.RpcMetadata.getDefaultInstance() : metadata_;\n }", "public org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata() {\n return metadata_ == null ? org.apache.calcite.avatica.proto.Responses.RpcMetadata.getDefaultInstance() : metadata_;\n }", "public org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata() {\n return metadata_ == null ? org.apache.calcite.avatica.proto.Responses.RpcMetadata.getDefaultInstance() : metadata_;\n }", "public org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata() {\n return metadata_ == null ? org.apache.calcite.avatica.proto.Responses.RpcMetadata.getDefaultInstance() : metadata_;\n }", "public org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata() {\n return metadata_ == null ? org.apache.calcite.avatica.proto.Responses.RpcMetadata.getDefaultInstance() : metadata_;\n }", "public org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata() {\n return metadata_ == null ? org.apache.calcite.avatica.proto.Responses.RpcMetadata.getDefaultInstance() : metadata_;\n }", "public org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata() {\n return metadata_ == null ? org.apache.calcite.avatica.proto.Responses.RpcMetadata.getDefaultInstance() : metadata_;\n }", "public org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata() {\n return metadata_ == null ? org.apache.calcite.avatica.proto.Responses.RpcMetadata.getDefaultInstance() : metadata_;\n }", "com.google.protobuf.Struct getMetadataFields();", "public interface IImageMetadata {\n\n public String getImageType();\n\n public void setImageType(String imageType);\n\n public String getFilename();\n\n public void setFilename(String filename);\n\n public DateTime getLastModified();\n\n public void setLastModified(DateTime d);\n\n public DateTime getCreated();\n\n public void setCreated(DateTime d);\n\n public long getSize();\n\n public void setSize(long size);\n\n public String getReadableSize();\n\n}", "@Override\n\tpublic X3DMetadataObject getMetadata();", "@java.lang.Override\n public boolean hasMetadata() {\n return metadata_ != null;\n }", "@java.lang.Override\n public boolean hasMetadata() {\n return metadata_ != null;\n }", "@java.lang.Override\n public boolean hasMetadata() {\n return metadata_ != null;\n }", "@External(readonly = true)\n\tpublic List<String> get_metadata_fields(){\n\t\t\n\t\treturn this.METADATA_FIELDS;\n\t}", "public io.grafeas.v1.MetadataOrBuilder getMetadataOrBuilder() {\n if (metadataBuilder_ != null) {\n return metadataBuilder_.getMessageOrBuilder();\n } else {\n return metadata_ == null ? io.grafeas.v1.Metadata.getDefaultInstance() : metadata_;\n }\n }", "@JsonGetter(\"metadata\")\n public Object getMetadata ( ) {\n return this.metadata;\n }", "public java.util.List<? extends MetadataEntryOrBuilder> getMetadataOrBuilderList() {\n return metadata_;\n }", "public MetaData getMetaData();", "public boolean hasMetadata() {\n return metadata_ != null;\n }", "public boolean hasMetadata() {\n return metadata_ != null;\n }", "public boolean hasMetadata() {\n return metadata_ != null;\n }", "public boolean hasMetadata() {\n return metadata_ != null;\n }", "public boolean hasMetadata() {\n return metadata_ != null;\n }", "public boolean hasMetadata() {\n return metadata_ != null;\n }", "public boolean hasMetadata() {\n return metadata_ != null;\n }", "public boolean hasMetadata() {\n return metadata_ != null;\n }", "public boolean hasMetadata() {\n return metadata_ != null;\n }", "public boolean hasMetadata() {\n return metadata_ != null;\n }" ]
[ "0.6492017", "0.641604", "0.6392995", "0.62454176", "0.60624087", "0.60475785", "0.60475785", "0.60107553", "0.6008589", "0.59753215", "0.59680897", "0.59558564", "0.5942429", "0.59275705", "0.5882467", "0.587896", "0.58559203", "0.58522826", "0.57813025", "0.57656723", "0.5761705", "0.5754868", "0.57503957", "0.5747087", "0.5745598", "0.57374185", "0.57229966", "0.57173485", "0.56655335", "0.56634295", "0.5628655", "0.5628578", "0.56069034", "0.560072", "0.5600007", "0.5597285", "0.5590387", "0.55866706", "0.5579429", "0.55325437", "0.5507507", "0.5506568", "0.5502444", "0.5478077", "0.5468632", "0.5451582", "0.54210097", "0.5419188", "0.5412269", "0.5407554", "0.5407554", "0.53788024", "0.53788024", "0.53788024", "0.53788024", "0.53788024", "0.53788024", "0.53788024", "0.53788024", "0.53788024", "0.53788024", "0.53788024", "0.53788024", "0.53788024", "0.53788024", "0.5372048", "0.5365569", "0.5365569", "0.5365569", "0.5365569", "0.5365569", "0.5365569", "0.5365569", "0.5365569", "0.5365569", "0.5365569", "0.5365569", "0.5365569", "0.5365569", "0.5365569", "0.53483254", "0.53413033", "0.5322399", "0.5321018", "0.5321018", "0.5321018", "0.5312712", "0.53102183", "0.52972704", "0.52850264", "0.5259925", "0.52598757", "0.52598757", "0.52598757", "0.52598757", "0.52598757", "0.52598757", "0.52598757", "0.52598757", "0.52598757", "0.52598757" ]
0.0
-1
maps document results into a list of objects
@Override public List<T> getLimitedFilteredResult(Bson filter, int limit) { Gson gson = new GsonBuilder().create(); List<T> innerList = new ArrayList<>(); collection.find(filter).limit(limit).forEach((Block<Document>) document -> { innerList.add(gson.fromJson(document.toJson(), entityClass)); }); return innerList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List getDocuments(List result) throws DocumentNotFoundException {\n List ret = new ArrayList();\n for (Object o : result) {\n ProbDoc doc = (ProbDoc) o;\n String docID = doc.getDocID();\n ret.add(new XMLDoc(docID, getDocument(docID)));\n }\n return ret;\n }", "public List getSummaries(List result) throws DocumentNotFoundException {\n List ret = new ArrayList();\n for (Object o : result) {\n ProbDoc doc = (ProbDoc) o;\n String docID = doc.getDocID();\n ret.add(new XMLDoc(docID, getSummary(docID)));\n }\n return ret;\n }", "public abstract List<T> readDoc(final Document document);", "abstract Collection<Object> mapResultClass(Collection<Object> resultSet);", "ArrayList<Map<String,Object>> parseQueryResult(Object result) { return null;}", "List<T> getResults();", "private List<Result> addAllResults(List<Result> result) {\n\n MongoCollection<Document> collection = mongoDatabase.getCollection(\"result\");\n List<Result> allResults = new LinkedList<>();\n for (Result res : result) {\n Document newResult = new Document();\n newResult.put(\"student1\", res.getStudent1());\n newResult.put(\"student2\", res.getStudent2());\n newResult.put(\"percentage\", res.getPercentage());\n newResult.put(\"snippets\", res.getSnippets());\n newResult.put(\"type\", res.getType().toString());\n collection.insertOne(newResult);\n\n\n ObjectId resultId = newResult.getObjectId(\"_id\");\n res.setObjectId(resultId);\n newResult.put(\"hexId\", resultId.toHexString());\n res.setHexId(resultId.toHexString());\n Bson updateOperationDocument = new Document(\"$set\", newResult);\n collection.updateOne(eq(\"_id\", new ObjectId(resultId.toHexString())), updateOperationDocument);\n\n allResults.add(res);\n }\n return allResults;\n }", "ArrayList<HashMap<String,Object>> processQueryResult(Object result,String collectionName) {\n ArrayList<Map<String,Object>> rawRows = parseQueryResult(result);\n if (rawRows == null || rawRows.size()==0) return null;\n ArrayList<HashMap<String,Object>> resultRows = new ArrayList<>();\n for (Map<String,Object> rawRow: rawRows) {\n HashMap<String,Object> resultRow = processQueryResultRow(rawRow,collectionName);\n if (resultRow.size()>0) resultRows.add(resultRow);\n }\n return resultRows;\n }", "Set<Document> findDocuments(Map<String, String> fields, int offset, int numberOfResults);", "public list_results_doc_result(list_results_doc_result other) {\n if (other.isSetSuccess()) {\n java.util.List<Examination> __this__success = new java.util.ArrayList<Examination>(other.success.size());\n for (Examination other_element : other.success) {\n __this__success.add(new Examination(other_element));\n }\n this.success = __this__success;\n }\n }", "Collection<Document> getDocuments();", "private void adaptResultListToPDFFormat() {\n ArrayList<Result> result = new ArrayList<Result>();\n for (int i = 0; i < pdfBoxDocuments.size(); i++) {\n PDFDocument pdf = pdfBoxDocuments.get(i);\n\n String title = pdf.getDocname();\n title = title.substring(title.lastIndexOf('/') + 1, title.lastIndexOf('.'));\n String kwic = pdf.getText()[0];\n String url = pdf.getDocname();\n result.add(new Result(title, kwic, url));\n }\n results = new Results();\n results.setResults(result);\n }", "private void parse(){\n\t\tfor (Object res : book_results){\n\t\t\tString author = JsonPath.read(res,\"$.name\").toString();\n\t\t\tRole role = new Role(author, \"Author\");\n\t\t\tList<String> books = JsonPath.read(res,\"$./book/author/works_written[*].a:name\");\n\t\t\tmql_map.put(role, books);\n\t\t}\n\t\t\n\t\tfor (Object res : organization_results){\n\t\t\tString businessperson = JsonPath.read(res,\"$.name\").toString();\n\t\t\tRole role = new Role(businessperson, \"Businessperson\");\n\t\t\tList<String> organizations = JsonPath.read(res,\"$./organization/organization_founder/organizations_founded[*].a:name\");\n\t\t\tmql_map.put(role, organizations);\n\t\t}\n\t}", "public Collection<T> getResults();", "private static List<Post> parseResults(ResultSet results) throws SQLException {\r\n\tList<Post> postList = new LinkedList<Post>();\r\n\r\n\twhile (results.next()) {\r\n\t Post p = new Post();\r\n\r\n\t p.id = results.getInt(\"id\");\r\n\t p.author = results.getString(\"author\");\r\n\t \r\n\t long date = results.getInt(\"date\") * 1000L; // milliseconds\r\n\t p.date = new Date(date);\r\n\t \r\n\t p.isPublic = results.getInt(\"isPublic\") == 1;\r\n\t p.setContent(results.getString(\"content\"));\r\n\r\n\t postList.add(p);\r\n\t}\r\n\r\n\treturn postList;\r\n }", "public interface DocumentMapper {\n List<Document> selectDocumentByName(String name);\n}", "public List<Document> execute(){\n if(!advancedQuery)\n return convertToDocumentsList(executeRegularQuery());\n else\n return convertToDocumentsList(executeAdvancedQuery());\n }", "public ResourceCollectionResponse<T> transform(List<S> queryResults) {\n\t\ttranform(queryResults);\n\t\ttarget.setCount(Long.valueOf(target.getItems().size()));\n\t\treturn target;\n\t}", "@Override\n\tprotected List<?> processResult(ResultSet rs) throws SQLException {\n\t\tList<Book> aList=new ArrayList<Book>();\n\t\t\n\t\twhile(rs.next()){\n\t\t\tBook a=new Book ();\n\t\t\ta.setBookId(rs.getInt(\"bookId\"));\n\t\t\ta.setTitle(rs.getString(\"title\"));\n\t\t\t\n\t\t\taList.add(a);\n\t\t\t\n\t\t}\n\t\treturn aList;\n\t}", "public void map()\n\t{\n\t // key is the documentId\n\t\t// value is the url\n\t\t//fetch the document using the documentId\n\t\t\n\t}", "protected abstract List<List<SearchResults>> processStream();", "private void writeResults() {\n\t\tgetContext().writeName(\"searchResults\");\n\t // Open the Array of affectedParties\n\t TypeContext itemTypeContext = getContext().writeOpenArray();\n\t \n\t for(Person person : results){\n\t\t\t// Add a comma after each affectedParty object is written\n if (!itemTypeContext.isFirst()){\n \tgetContext().writeComma();\n }\n itemTypeContext.setFirst(false);\n\t\t\t\n // Open the affectedParty object and write the fields\n\t\t\tgetContext().writeOpenObject();\n\t\t\t\n\t\t\t// Write out the fields\n\t\t getContext().writeName(\"id\");\n\t\t getContext().transform(person.getId());\n\t\t getContext().writeComma();\n\t\t \n\t\t getContext().writeName(\"name\");\n\t\t getContext().transform(person.getName());\n\t\t getContext().writeComma();\n\n\t\t getContext().writeName(\"sex\");\n\t\t getContext().transform(person.getSex());\n\t\t getContext().writeComma();\n\t\t \n\t\t getContext().writeName(\"dob\");\n\t\t getContext().transform(person.getDob() == null?null:new SimpleDateFormat(\"dd/MM/yyyy\").format(person.getDob()));\n\t\t getContext().writeComma();\n\t\t \n\t\t getContext().writeName(\"dod\");\n\t\t getContext().transform(person.getDod() == null?null:new SimpleDateFormat(\"dd/MM/yyyy\").format(person.getDod()));\n\t\t getContext().writeComma();\n\t\t \n\t\t getContext().writeName(\"placeOfBirth\");\n\t\t getContext().transform(person.getPlaceOfBirth());\n\t\t getContext().writeComma();\n\t\t \n\t\t getContext().writeName(\"placeOfDeath\");\n\t\t getContext().transform(person.getPlaceOfDeath());\n\t\t getContext().writeComma();\n \t getContext().writeName(\"href\");\n \t getContext().transform(url + \"/\" + person.getId());\n\t\t\t\n \t // Close the affectedParty object\n \t getContext().writeCloseObject();\n }\n\t\t// Close the Array of affectedParties\n getContext().writeCloseArray();\n\t}", "public List<ScorerDoc> get_results(){\n\t\tList<ScorerDoc> docs_array = new ArrayList<ScorerDoc>();\n\t\twhile (!queue.isEmpty())\n\t\t\tdocs_array.add(queue.poll());\n\t\t\n\t\tCollections.reverse(docs_array);\n\t\treturn docs_array;\n\t}", "@Override\n\tpublic void docToLists() {\n\t\tnodesToList(document, null, nodes);\n\t}", "public DocFile[] searchResponse(ScoreDoc[] results, Query query) {\n\n DocFile[] result = new DocFile[results.length];\n FastVectorHighlighter highlighter = new FastVectorHighlighter(true,true);\n FieldQuery highlightQuery = highlighter.getFieldQuery(query); \n\n try {\n IndexReader reader = DirectoryReader.open(indexDir);\n IndexSearcher searcher = new IndexSearcher(reader);\n\n for (int i = 0; i < results.length; i++) {\n int docId = results[i].doc;\n Document document = searcher.doc(docId);\n \n //Highlight the best Content context from each Doc\n String contextString = highlighter.getBestFragment(highlightQuery, \n searcher.getIndexReader(), results[i].doc,Constants.INDEX_KEY_CONTENT,140);\n \n DocFile toAdd = new DocFile(\n document.get(Constants.INDEX_KEY_FILENAME),\n document.get(Constants.INDEX_KEY_TITLE),\n document.get(Constants.INDEX_KEY_OWNER),\n document.get(Constants.INDEX_KEY_PATH),\n document.get(Constants.INDEX_KEY_STATUS).equalsIgnoreCase(\"true\"));\n \n if (contextString != null) {\n toAdd.setContextString(contextString);\n }\n \n toAdd.setId(document.get(Constants.INDEX_KEY_ID));\n toAdd.setPermissions(Integer.parseInt(document.get(Constants.INDEX_KEY_PERMISSION)));\n toAdd.setCourseCode(document.get(Constants.INDEX_KEY_COURSE));\n result[i] = toAdd;\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return result;\n }", "private static List<AnalyticsResults> listFromResults(ResultSet results) throws SQLException {\n\t\tLinkedList<AnalyticsResults> list = new LinkedList<>();\n\t\twhile (results.next()) {\n\t\t\tlist.add(\n\t\t\t\tnew AnalyticsResults(\n\t\t\t\t\tresults.getString(\"event\"),\n\t\t\t\t\tresults.getInt(\"count\"),\n\t\t\t\t\tresults.getInt(\"users\")\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\treturn Collections.unmodifiableList(list);\n\t}", "public ArrayList<Document> getDocumentList(){\n\t\tSession session = HibernateUtils.getSessionFactory().openSession();\n\t\tArrayList<Document> list = new ArrayList<Document>();\n\t\ttry{\n\t\t\tCriteria cr = session.createCriteria(TblDocument.class);\n\t\t\tcr.setResultTransformer(CriteriaSpecification.DISTINCT_ROOT_ENTITY);\n\t\t\tList<TblDocument> documents = cr.list();\n\t\t\tif (documents.size() > 0){\n\t\t\t\tfor (Iterator<TblDocument> iterator = documents.iterator(); iterator.hasNext();){\n\t\t\t\t\tTblDocument tbldocument = iterator.next();\n\t\t\t\t\tDocument document = new Document();\n\t\t\t\t\tdocument.convertFromTable(tbldocument);\n\t\t\t\t\tlist.add(document);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tSystem.err.println(\"ERROR IN LIST!!!!!!\");\n\t\t\te.printStackTrace();\n\t\t\tthrow new ExceptionInInitializerError(e);\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn list;\n\t}", "@Test\n public void testDocumentsResponse() {\n DocumentsResponse testResponse = new DocumentsResponse(testDocList);\n checkDocumentsList(testResponse);\n }", "public List<Pojo.OneWord> getOneWord(){ \n List<Pojo.OneWord> list=new ArrayList<Pojo.OneWord>(); \n list=template.loadAll(Pojo.OneWord.class); \n return list; \n}", "public interface Converter {\n Map<String,Map<String, Object>> convert(Map<String, Object> doc);\n}", "private ArrayList<Document> convertToDocumentsList(ArrayList<WordDocument> list){\n ArrayList<Document> convertedList = new ArrayList<Document>();\n\n for(WordDocument x : list)\n convertedList.add(x.getDocument());\n\n return convertedList;\n }", "public List getResultSummaries(Query query)\n throws UnsupportedQueryException, IndexException, DocumentNotFoundException {\n List r = getResult(query);\n List result = new ArrayList();\n for (Object o : r) {\n ProbDoc pd = (ProbDoc) o;\n result.add(new XMLDoc(pd, getSummary(pd)));\n }\n return result;\n }", "private void collect() {\n\n System.out.println(\"Getting IndexReader...\");\n final IndexReader reader = index.reader();\n\n System.out.println(\"Calling forEachDocument()...\");\n index.forEachDocument(new DocTask() {\n\n int docsDone = 0;\n\n final int totalDocs = reader.maxDoc() - reader.numDeletedDocs();\n\n @Override\n public void perform(BlackLabIndex index, int docId) {\n Map<String, String> metadata = new HashMap<>();\n Document luceneDoc = index.luceneDoc(docId);\n for (IndexableField f: luceneDoc.getFields()) {\n // If this is a regular metadata field, not a control field\n if (!f.name().contains(\"#\")) {\n fieldNames.add(f.name());\n if (f.stringValue() != null)\n metadata.put(f.name(), f.stringValue());\n else if (f.numericValue() != null)\n metadata.put(f.name(), f.numericValue().toString());\n }\n }\n values.add(metadata);\n docsDone++;\n if (docsDone % 100 == 0) {\n int perc = docsDone * 100 / totalDocs;\n System.out.println(docsDone + \" docs exported (\" + perc + \"%)...\");\n }\n }\n });\n }", "public Map<Integer, ArrayList<Crop>> convertRecordsToMap(List<QueryDocumentSnapshot> documents) {\n Map<Integer, ArrayList<Crop>> yields = new HashMap<>();\n Crop crop = null;\n for (QueryDocumentSnapshot doc : documents) {\n //if we have a \"producer\" field, we're dealing with a Farm object.\n if (doc.getData().keySet().contains(\"producer\")) {\n crop = doc.toObject(Farm.class);\n } else {\n crop = doc.toObject(Crop.class);\n }\n\n if (!yields.containsKey(crop.getYear())) {\n Crop finalCrop = crop; //IDEK - weird errors\n yields.put(crop.getYear(), new ArrayList<>() {{ add(finalCrop); }});\n } else {\n yields.get(crop.getYear()).add(crop);\n }\n }\n\n return yields;\n }", "Set<Document> findDocuments(Map<String, String> fields);", "@Override\r\n protected void parseDocuments()\r\n {\n\r\n }", "public List<IDoc> getDocs();", "public List<IDoc> getDocs();", "private static void loadResults() {\r\n\t\tint index = 5;\r\n\t\tsiteMap = new HashMap<String, Map<String, List<? extends TransactionData>>>();\r\n\t\ttry(MongoClient connection = new MongoClient(\"localhost\", 27017);){\r\n\t\t\twhile(index >= 5 && index <= 9) {\r\n\t\t\t\tString dbName = \"site\" + index + \"ResultsDB\";\r\n\t\t\t\tMongoDatabase database = connection.getDatabase(dbName);\r\n\t\t\t\tcollectionsMap = new HashMap<String, List<? extends TransactionData>>();\r\n\t\t\t\tfor (String collection : database.listCollectionNames()) {\r\n\t\t\t\t\ttry(MongoCursor<Document> iterator = database.getCollection(collection).find().iterator();) {\r\n\t\t\t\t\t\tloadCollectionData(iterator, collection);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tsiteMap.put(\"site\" + index, collectionsMap);\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public TreeMap<GenericDocument, LinkedList<Posting>> getDocumentBasedIndex(Collection collection) { \r\n\t\tTreeMap<GenericDocument, LinkedList<Posting>> result = new TreeMap<GenericDocument, LinkedList<Posting>>();\r\n\t\t\r\n\t\tfor(java.util.Collection<Posting> bag : map.values()) {\r\n\t\t\tfor (Posting posting : bag) {\r\n\t\t\t\tGenericDocument doc = collection.findArticle(posting.getDocumentID());\r\n\t\t\t\tif (doc != null) {\r\n\t\t\t\t\tif (result.containsKey(doc))\r\n\t\t\t\t\t\tresult.get(doc).add(posting);\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tLinkedList<Posting> list = new LinkedList<Posting>();\r\n\t\t\t\t\t\tlist.add(posting);\r\n\t\t\t\t\t\tresult.put(doc, list);\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}\r\n\t\t \r\n\t\tSystem.out.println(\"Document based indexing complete.\");\r\n\t\treturn result;\r\n\t}", "public interface QueryResponseParser {\n Documents<IdolSearchResult> parseQueryResults(AciSearchRequest<String> searchRequest, AciParameters aciParameters, QueryResponseData responseData, IdolDocumentService.QueryExecutor queryExecutor);\n\n List<IdolSearchResult> parseQueryHits(Collection<Hit> hits);\n}", "@Override\n @XmlElement(name = \"result\", required = true)\n public Collection<Result> getResults() {\n return results = nonNullCollection(results, Result.class);\n }", "private static List<MatchEntity> parseLiveMatchDocumentToListMatches(Document document)\n {\n List<MatchEntity> listMatches = new ArrayList<>();\n\n if(document != null)\n {\n\n switch (Urls.SOURCE_TYPE)\n {\n case LIVEFOOTBALLVIDEO:\n // Parser Ids\n final String SELECT_LIST_MATCHES = \"div#main div.listmatch li\"; // Should return a list of li.odd\n // Get Matches Elements\n Elements elements = document.select(SELECT_LIST_MATCHES);\n\n if(elements == null || elements.isEmpty())\n {\n // Cannot parrse Matches\n return listMatches;\n }\n\n // Complete each match\n for (Element element : elements)\n {\n try\n {\n listMatches.add(parseLiveMatchLineToMatchEntity(element));\n }\n catch (Exception e)\n {\n LogUtil.e(TAG, e.getMessage(), e);\n }\n }\n break;\n\n case LIVESPORTWS:\n final String selectMatches = \"ul.events li\";\n\n // Get Matches Elements\n elements = document.select(selectMatches);\n\n if(elements == null || elements.isEmpty())\n {\n // Cannot parrse Matches\n return listMatches;\n }\n\n for (Element element : elements)\n {\n try\n {\n listMatches.add(parseLiveMatchLineToMatchEntity(element));\n }\n catch (Exception e)\n {\n LogUtil.e(TAG, e.getMessage(), e);\n }\n }\n\n break;\n }\n\n }\n\n // Check if should log data\n if(LogUtil.IS_DEBUG)\n {\n // Logo Matches\n LogUtil.d(TAG, \"Request Url: \" + REQUEST_URL + \" ResponseData: \" + GSONParser.parseListObjectToString(listMatches));\n }\n\n return listMatches;\n }", "private LinkedHashMap<String, List<String[]>> generateResultMap(List<FinanceDocument> financeDocumentList) {\n\n LinkedHashMap<String, List<String[]>> resultMap = new LinkedHashMap<>();\n for (FinanceDocument doc : financeDocumentList) {\n\n String date = DateUtils.getNormalDate(DateUtils.DATE_FORMAT_LONG, doc.getDate());\n HashMap<String, Float> valuesMap = doc.getConvertedValuesMap().get(dataType);\n\n String sign = \"+\";\n if (dataType == FinanceDocument.CUSTOM_EXPENSE) {\n sign = \"-\";\n }\n for (Map.Entry<String, Float> entry : valuesMap.entrySet()) {\n String valueString = sign + String.format(Locale.getDefault(), \"%1$,.2f\", entry.getValue()) + \" \" + MainActivity.defaultCurrency;\n if (resultMap.containsKey(date)) {\n resultMap.get(date).add(new String[]{\n Utils.keyToString(getContext(), entry.getKey()),\n valueString});\n\n\n } else {\n List<String[]> resultList = new ArrayList<>();\n resultList.add(new String[]{\n Utils.keyToString(getContext(), entry.getKey()),\n valueString});\n resultMap.put(date, resultList);\n\n }\n\n }\n }\n\n return resultMap;\n }", "public Collection<JsonDocument> getDocuments() {\n return this.cache.values();\n }", "public DocumentList getDocuments() {\n return documents;\n }", "public ClsNodeDocument[] GetDocuments (ClsNodeDocument[] searchDocs);", "Collection<KeywordHit> getOneHitPerObject(QueryResults queryResults) {\n HashMap<Long, KeywordHit> hits = new HashMap<>();\n for (Keyword keyWord : queryResults.getKeywords()) {\n for (KeywordHit hit : queryResults.getResults(keyWord)) {\n // add hit with lowest SolrObjectID-Chunk-ID combination.\n if (!hits.containsKey(hit.getSolrObjectId())) {\n hits.put(hit.getSolrObjectId(), hit);\n } else {\n if (hit.getChunkId() < hits.get(hit.getSolrObjectId()).getChunkId()) {\n hits.put(hit.getSolrObjectId(), hit);\n }\n }\n }\n }\n return hits.values();\n }", "private List<T> createObjects(ResultSet rs){\n\t\tList<T> list = new ArrayList<T>();\n\t\t\n\t\ttry {\n\t\t\twhile(rs.next()) {\n\t\t\t\tT instance = type.newInstance();\n\t\t\t\tfor(Field field : type.getDeclaredFields()) {\n\t\t\t\t\tObject value = rs.getObject(field.getName());\n\t\t\t\t\tPropertyDescriptor pd = new PropertyDescriptor(field.getName(), type);\n\t\t\t\t\tMethod method = pd.getWriteMethod();\n\t\t\t\t\tmethod.invoke(instance, value);\n\t\t\t\t}\n\t\t\t\tlist.add(instance);\n\t\t\t}\n\t\t}catch(InstantiationException e) {\n\t\t\te.getStackTrace();\n\t\t} catch (java.beans.IntrospectionException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalAccessException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalArgumentException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (InvocationTargetException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn list;\n\t}", "public synchronized ArrayList<MTDDocument> parseHitsToDocumentArray(ScoreDoc[] hits) throws Exception{\r\n\t\tArrayList<MTDDocument> retorno = new ArrayList<MTDDocument>();\r\n\t\t\r\n\t\tDirectory indexDirectory = getCopiaDiretorioMemoria();\t\t\r\n\t\t//Analyzer analisador = getAnalizerPadrao(); //removido por não ser usado\r\n\t\tIndexReader reader = DirectoryReader.open(indexDirectory);\r\n\t\t// Cria o acesso ao indice\r\n\t\tIndexSearcher searcher = new IndexSearcher(reader);\r\n\r\n\t\tfor (int i = 0; i < hits.length; ++i) {\r\n\t\t\tint docId = hits[i].doc;\r\n\t\t\tDocument d = searcher.doc(docId);\r\n\r\n\t\t\tMTDDocument docAtual = new MTDDocumentBuilder().buildDocument(d).build();\r\n\t\t\tdocAtual.setDocId(docId);\r\n\t\t\tretorno.add(docAtual);\r\n\t\t}\r\n\t\t\r\n\t\treader.close();\r\n\t\t//analisador.close();\r\n\r\n\t\treturn retorno;\r\n\t}", "private QueryResult mapResultSet(ResultSet rs) throws SQLException {\n QueryResult results = new QueryResult();\n\n ResultSetMetaData metadata = rs.getMetaData();\n\n int columnCount = metadata.getColumnCount();\n for (int i = 0; i < columnCount; i++) {\n results.addColumnName(metadata.getColumnLabel(i + 1), i);\n }\n\n List<QueryResultRow> rows = new ArrayList<QueryResultRow>();\n while (rs.next()) {\n Object[] columnValues = new Object[columnCount];\n for (int i = 1; i <= columnCount; i++) {\n columnValues[i - 1] = rs.getObject(i);\n\n }\n rows.add(new QueryResultRow(columnValues));\n }\n results.setRows(rows.toArray(new QueryResultRow[] {}));\n return results;\n }", "public List<Nugget> scavenge(final Document doc, final String url);", "private final List<Object> searchForResults(@Nullable String query)\n {\n ArrayList<Object> results = new ArrayList<>();\n try {\n results.addAll(crDao.getRecordsLike(query));\n } catch (Exception e) {\n Logger.error(\"Failed to search the cr dao for results.\", e);\n }\n\n try {\n results.addAll(customMonsterDao.getRecordsLike(query));\n } catch (Exception e) {\n Logger.error(\"Failed to search the custom monster dao for results.\", e);\n }\n\n try {\n results.addAll(monsterDao.getRecordsLike(query));\n } catch (Exception e) {\n Logger.error(\"Failed to search the standard monster dao for results.\", e);\n }\n\n return results;\n }", "public List<CorpusSearchHit> getResult() {\n return result;\n }", "private List<BdmDocument> getDocumentList() {\n\t\tList<BdmDocument> documents = new ArrayList<>(1);\n\t\tdocuments.add(new BdmDocument(this.getTestBdm()));\n\t\treturn documents;\n\t}", "public Iterator<ODocument> getAllAsList(@Generic(\"T\") final Class<?> type) {\n return getAll(type);\n }", "private List<ProcessorResponse> transformResult(String response) {\n return new ArrayList<ProcessorResponse>();\n }", "private Collection<Record> getResults(SimpleSurnameAndPostcodeQuery query) {\n\t\treturn search(query);\n\t}", "public SolrInputDocument collect(FlexDocument f) {\n\n\t\tSolrInputDocument cls_doc = new SolrInputDocument();\n\n\t\tfor( FlexLine l : f ){\n\t\t\tString fieldName = l.field();\n\t\t\tfor( String val : l.values() ){\n\t\t\t\tcls_doc.addField(fieldName, val);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn cls_doc;\n\t}", "private List<T> createObjects(ResultSet resultSet) {\n\t\tList<T> list = new ArrayList<T>();\n\t\ttry {\n\t\t\twhile (resultSet.next()) {\n\t\t\t\t@SuppressWarnings(\"deprecation\")\n\t\t\t\tT instance = type.newInstance();\n\t\t\t\tfor (Field field : type.getDeclaredFields()) {\n\t\t\t\t\tObject value = resultSet.getObject(field.getName());\n\t\t\t\t\tPropertyDescriptor propertyDescriptor = new PropertyDescriptor(field.getName(), type);\n\t\t\t\t\tMethod method = propertyDescriptor.getWriteMethod();\n\t\t\t\t\tmethod.invoke(instance, value);\n\t\t\t\t}\n\t\t\t\tlist.add(instance);\n\t\t\t}\n\t\t} catch (InstantiationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalAccessException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SecurityException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalArgumentException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (InvocationTargetException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IntrospectionException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn list;\n\t}", "@Override\n\tpublic List<Document> findDocument() {\n\t\treturn null;\n\t}", "java.util.List<entities.Torrent.NodeSearchResult>\n getResultsList();", "public void promoteResult(String docId, String query);", "Map getAll();", "protected ListMap<Integer, CD4Details> makeResultsMap(List<Object> data) {\n\t\tListMap<Integer, CD4Details> dateListMap = new ListMap<Integer, CD4Details>();\n\t\tfor (Object o : data) {\n\t\t\tObject[] parts = (Object[]) o;\n\t\t\tif (parts.length == 3) {\n\t\t\t\tInteger pId = (Integer) parts[0];\n\t\t\t\tDate date = (Date) parts[1];\n\t\t\t\tDouble val = (Double) parts[2];\n\t\t\t\tif (pId != null && date != null) {\n\t\t\t\t\tCD4Details details = new CD4Details(val, date);\n\t\t\t\t\tdateListMap.putInList(pId, details);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn dateListMap;\n\t}", "public abstract List<ClinicalDocument> findAllClinicalDocuments();", "@Override\n public List<Book> result(List<Book> books) {\n return search.result(books);\n }", "@Override\n\tpublic List<WanchengPO> mapRow(ResultSet rs) throws Exception {\n\t\treturn null;\n\t}", "public static List<String> get_RankedResults(List<Doc_accum> results) {\n List<String> filenames = new ArrayList();\n\n if (results.isEmpty()) {\n GUI.JListModel.clear();\n GUI.ResultsLabel.setText(\"\");\n clickList = false;\n\n String notFound = \"Your search '\" + query + \"' is not found in any documents\";\n GUI.ResultsLabel.setText(notFound);\n\n } else {\n clickList = false;\n\n //clears list and repopulates it \n String docInfo;\n\n GUI.JListModel.clear();\n GUI.ResultsLabel.setText(\"\");\n\n for (Doc_accum p : results) {\n if (queryMode) {\n corpus.getDocument(p.getPosting().getDocumentId()).getContent();\n }\n //docInfo = corpus.getDocument(p.getPosting().getDocumentId()).getTitle();\n docInfo = corpus.getDocument(p.getPosting().getDocumentId()).getFileName().toString();\n filenames.add(docInfo);\n\n }\n }\n\n GUI.SearchBarTextField.selectAll();\n\n return filenames;\n }", "java.util.List<org.apache.calcite.avatica.proto.Responses.ResultSetResponse> \n getResultsList();", "private void scanDocuments()\n{\n document_counts = new HashMap<>();\n kgram_counts = new HashMap<>();\n for (File f : root_files) {\n addDocuments(f);\n }\n}", "public void setResults(ArrayList results) {\n this.results = results;\n }", "public List<IResult> getResults(List<Integer> relatedDocs, String query) {\r\n\r\n // results\r\n List<IResult> rs = new ArrayList<>();\r\n List<Double> documentVector, queryVector = new ArrayList<>();\r\n\r\n Map<String, Integer> termFreqs = this.preprocessor.processQuery(query);\r\n\r\n for(String op : new String[]{\"and\", \"or\", \"not\"}) {\r\n termFreqs.remove(op);\r\n }\r\n\r\n\r\n double highestVal = 0;\r\n\r\n // query TF-IDF vector\r\n for(String term : termFreqs.keySet()) {\r\n\r\n // unknown term == contained in no doc\r\n if(!this.index.getDict().containsKey(term)) {\r\n continue;\r\n }\r\n\r\n // # docs where term occurs in\r\n int termTotalFreq = this.index.getTermInDocCount(term);\r\n\r\n // query tf-idf vector\r\n double qTfIdf = this.tfidf.tfidfQuery(termFreqs.get(term), termTotalFreq);\r\n queryVector.add(qTfIdf);\r\n\r\n if(qTfIdf > highestVal) highestVal = qTfIdf;\r\n }\r\n\r\n // query vector normalization\r\n for(int i = 0; i < queryVector.size(); i++) {\r\n queryVector.set(i, queryVector.get(i)/highestVal);\r\n }\r\n\r\n\r\n for(int docId : relatedDocs) {\r\n documentVector = new ArrayList<>();\r\n highestVal = 0;\r\n\r\n for(String term : termFreqs.keySet()) {\r\n\r\n // unknown term == contained in no doc\r\n if(!this.index.getDict().containsKey(term)) {\r\n continue;\r\n }\r\n\r\n // document tf-idf vector\r\n double dTfIdf = this.tfidf.getTfIdf(term, docId);\r\n documentVector.add(dTfIdf);\r\n\r\n if(dTfIdf > highestVal) highestVal = dTfIdf;\r\n }\r\n\r\n // document vector normalization\r\n for(int i = 0; i < documentVector.size(); i++) {\r\n documentVector.set(i, documentVector.get(i)/highestVal);\r\n }\r\n\r\n Result result = new Result();\r\n result.setDocumentId(this.docs.get(docId).getUrl());\r\n result.setDocument(this.docs.get(docId));\r\n result.setScore((float) CosineSimilarity.process(documentVector, queryVector));\r\n rs.add(result);\r\n }\r\n\r\n Collections.sort(rs, new ResultComparator());\r\n\r\n // limit number of results\r\n if(rs.size() > IndexerConfig.MAX_RESULT_COUNT)\r\n rs = rs.subList(0, IndexerConfig.MAX_RESULT_COUNT);\r\n\r\n // rank it\r\n for(int i = 0; i < rs.size(); i++) {\r\n ((Result) rs.get(i)).setRank (i + 1);\r\n }\r\n\r\n return rs;\r\n }", "List<Map<String, String>> getFilteredDocuments(Map<String, Object> paramsMap);", "public ArrayList<Comobox> listaDocumentos()\n {\n @SuppressWarnings(\"MismatchedQueryAndUpdateOfCollection\")\n ArrayList<Comobox> al= new ArrayList<>();\n ResultSet rs = null;\n\n sql=\"select * FROM VER_TIPODOCUMENTO\";\n Conexao conexao = new Conexao();\n if(conexao.getCon()!=null)\n {\n try \n {\n cs = conexao.getCon().prepareCall(sql);\n cs.execute();\n rs=cs.executeQuery(); \n if (rs!=null) \n { \n while (rs.next())\n { \n al.add(new Comobox(rs.getString(\"REALID\"), rs.getString(\"DOCUMENTO\")));\n } \n }\n rs.close();\n } \n catch (SQLException ex)\n {\n Logger.getLogger(CreditoDao.class.getName()).log(Level.SEVERE, null, ex);\n System.out.println(\"Erro a obter documentos \"+ex.getMessage());\n }\n }\n return al;\n }", "public abstract DocumentBuilder withObject(Object res);", "public static Map<String, Object> getDocumentMapping(String indexPrefix, String indexPostfix) {\n\n Map<String, Object> indexFieldProperties = new HashMap<String, Object>();\n\n if (indexPrefix.equals(EsConstants.GATEWAY_INDEX_NAME)) {\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_VERSION, indexFieldProperties);\n }\n // rule for gateway and manager\n if (indexPostfix.equals(EsConstants.INDEX_APIS)) {\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_API_ID, indexFieldProperties);\n }\n // rule for gateway and manager\n if (indexPostfix.equals(EsConstants.INDEX_CLIENTS)) {\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_CLIENT_ID, indexFieldProperties);\n }\n if (indexPrefix.equals(EsConstants.METRICS_INDEX_NAME)) {\n // set keyword types\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_API_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_API_ORG_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_CLIENT_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_CLIENT_ORG_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_PLAN_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_API_VERSION, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_CLIENT_VERSION, indexFieldProperties);\n\n addBooleanTypeToIndexField(EsConstants.ES_FIELD_ERROR, indexFieldProperties);\n addBooleanTypeToIndexField(EsConstants.ES_FIELD_FAILURE, indexFieldProperties);\n\n // set date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_REQUEST_START, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_REQUEST_END, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_API_START, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_API_END, indexFieldProperties);\n\n // set ip type\n addIpTypeToIndexField(EsConstants.ES_FIELD_REMOTE_ADDR, indexFieldProperties);\n }\n\n if (indexPrefix.equals(EsConstants.MANAGER_INDEX_NAME)) {\n\n switch (indexPostfix) {\n case EsConstants.INDEX_MANAGER_POSTFIX_API:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_NAME, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_NAME, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_API_VERSION:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_API_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_STATUS, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_MODIFIED_ON, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_PUBLISHED_ON, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_RETIRED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_CLIENT:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_NAME, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_NAME, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_CLIENT_VERSION:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_CLIENT_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_STATUS, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_MODIFIED_ON, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_PUBLISHED_ON, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_RETIRED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_AUDIT_ENTRY:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ENTITY_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ENTITY_TYPE, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_ORGANIZATION:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ID, indexFieldProperties);\n setFieldDataToIndexTextField(EsConstants.ES_FIELD_NAME, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_MODIFIED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_USER:\n setFieldDataToIndexTextField(EsConstants.ES_FIELD_FULL_NAME, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_JOINED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_PLUGIN:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_NAME, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_GROUP_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ARTIFACT_ID, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_POLICY_DEF:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_NAME, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_CONTRACT:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_API_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_API_ORGANIZATION_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_CLIENT_ORGANIZATION_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_CLIENT_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_CLIENT_VERSION, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_PLAN:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_NAME, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_NAME, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_PLAN_VERSION:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_PLAN_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_STATUS, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_MODIFIED_ON, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_LOCKED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_GATEWAY:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_NAME, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_MODIFIED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_ROLE:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ID, indexFieldProperties);\n setFieldDataToIndexTextField(EsConstants.ES_FIELD_NAME, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_ROLE_MEMBERSHIP:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_ID, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_DEVELOPER:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ID, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_METADATA:\n addDateTypeToIndexField(EsConstants.ES_FIELD_EXPORTED_ON, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_IMPORTED_ON, indexFieldProperties);\n default:\n break;\n }\n }\n\n return indexFieldProperties;\n }", "void process(JsonNode document);", "public Vector getResultObjects() {\n\treturn _vcResults;\n }", "private ArrayList<T> createObjects(ResultSet resultSet) {\n\t\tArrayList<T> list = new ArrayList<T>();\n\t\ttry {\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tT instance = null;\n\t\t\t\ttry {\n\t\t\t\t\tinstance = type.getDeclaredConstructor().newInstance();\n\t\t\t\t} catch (NoSuchMethodException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tfor (Field field : type.getDeclaredFields()) {\n\t\t\t\t\tObject value = resultSet.getObject(field.getName());\n\t\t\t\t\tPropertyDescriptor propertyDescriptor = new PropertyDescriptor(field.getName(), type);\n\t\t\t\t\tMethod method = propertyDescriptor.getWriteMethod();\n\t\t\t\t\tmethod.invoke(instance, value);\n\t\t\t\t}\n\t\t\t\tlist.add(instance);\n\t\t\t}\n\t\t} catch (InstantiationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalAccessException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SecurityException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalArgumentException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (InvocationTargetException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IntrospectionException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn list;\n\t}", "public String prepareOutput(ArrayList<DocTermList> doc_term_lists){\n double handling_time = (double)(System.currentTimeMillis() - start_time)/1000; \n Output output = new Output(handling_time, doc_term_lists.size());\n \n for(int i=start_index; i<Math.min(end_index,doc_term_lists.size());i++){\n int doc_id = Integer.valueOf(doc_term_lists.get(i).docID);\n String title = ServerThread.doc_titles[doc_id];\n String url = ServerThread.doc_urls[doc_id];\n double page_rank = ServerThread.page_rank[doc_id];\n double relevant_score;\n if (model.equals(\"LANGUAGE\")){\n relevant_score = doc_term_lists.get(i).final_score;\n }\n else {\n relevant_score = doc_term_lists.get(i).relevant_rank;\n }\n \n \n OutputDoc output_doc = new OutputDoc(doc_id, title, url, relevant_score, page_rank);\n output.output_doc_list.add(output_doc);\n } \n Gson gson = new Gson();\n String final_result = gson.toJson(output);\n //System.out.println(final_result);\n return final_result;\n }", "@Test\n public void testSetAndGetDocuments() {\n DocumentsResponse testResponse = new DocumentsResponse();\n testResponse.setDocuments(testDocList);\n checkDocumentsList(testResponse);\n }", "@Override\n public List<Result> getResults(String assignmentId) {\n // Gets list of Results Id\n MongoCollection<Assignment> assignmentMongoCollection = mongoDatabase.getCollection(\"assignment\", Assignment.class);\n Assignment assignment = assignmentMongoCollection.find(eq(\"_id\", new ObjectId(assignmentId)), Assignment.class).first();\n\n List<String> resultsId = assignment.getResultsId();\n // Gets all assignments\n MongoCollection<Result> resultMongoCollection = mongoDatabase.getCollection(\"result\", Result.class);\n List<Result> results = new ArrayList<>();\n for (String resultId : resultsId) {\n // Result result = resultMongoCollection.find(eq(\"_id\", new ObjectId(resultId)), Result.class).first();\n results.add(resultMongoCollection.find(eq(\"_id\", new ObjectId(resultId)), Result.class).first());\n }\n\n return results;\n }", "@GET\r\n @Produces({MediaType.APPLICATION_XML})\r\n public Set<Document> findAll() throws InternalServerErrorException{\r\n LOGGER.info(\"Peticion de todos los documentos\");\r\n Set<Document> collection = null;\r\n try {\r\n collection = ejb.getDocumentList();\r\n } catch (GetCollectionException ex) {\r\n LOGGER.warning(\"ERROR en la obtencion de la lista de documentos\");\r\n throw new InternalServerErrorException();\r\n }\r\n LOGGER.info(\"Respuesta de obtencion de lista de documentos\");\r\n return collection;\r\n }", "List<String> getDocumentTitles(String query) throws SearcherException;", "public static QueryResult fromIndexerResult(Document document) {\n return new QueryResult.Builder()\n .content(document.get(LuceneFieldConstants.CONTENT.getText()))\n .filename(document.get(LuceneFieldConstants.FILE_NAME.getText()))\n .build();\n\n }", "@GET\r\n public List<DocumentoDTO> obtenerDocumento(){\r\n List<DocumentoEntity> documento= logic.obtenerDocumento(); \r\n return DocumentoDTO.toZooList(documento);\r\n }", "public List<Object> queryAll(String col_name, String dto) {\n\t\tDBCollection dbc = db.getCollection(col_name);\n DBCursor cur = dbc.find();\n List<Object> res = new ArrayList<Object>();\n try {\n \twhile (cur.hasNext()) {\n \t\tDBObject doc = cur.next();\n \t\ttry {\n \t\t\tres.add(Util.deserialize(doc, dto));\n \t\t} catch(InvocationTargetException ite) {\n \t\t\tite.printStackTrace();\n \t\t} \t\t\n \t\t//System.out.println(doc);\n }\n } catch(ClassNotFoundException cnfe) {\n \tcnfe.printStackTrace();\n } catch(InstantiationException ie) {\n \tie.printStackTrace();\n } catch(IllegalAccessException iae) {\n \tiae.printStackTrace();\n }\n return res;\n\t}", "public void processDocument() {\n\n\t\t// compact concepts\n\t\tprocessConcepts(concepts);\n\t}", "protected List<Map<Object, Object>> searchMetadataByDql(String dql) {\r\n\r\n\t\tList<Map<Object, Object>> emcDocumentsList = new ArrayList<Map<Object, Object>>();\r\n\r\n\t\ttry {\r\n\r\n\t\t\tQueryResult queryResult = this.getQueryResult(dql);\r\n\r\n\t\t\tDataPackage resultDp = queryResult.getDataPackage();\r\n\r\n\t\t\tList<DataObject> dataObjects = resultDp.getDataObjects();\r\n\r\n\t\t\tint numberOfObjects = dataObjects.size();\r\n\r\n\t\t\tlogger.info(INFO_NUMBER_OF_ITENS.concat(String\r\n\t\t\t\t\t.valueOf(numberOfObjects)));\r\n\r\n\t\t\tfor (DataObject dObj : dataObjects) {\r\n\r\n\t\t\t\tPropertySet docProperties = dObj.getProperties();\r\n\r\n\t\t\t\tIterator<Property> iterator = docProperties.iterator();\r\n\r\n\t\t\t\tMap<Object, Object> ecmDocumentMap = new HashMap<Object, Object>();\r\n\r\n\t\t\t\twhile (iterator.hasNext()) {\r\n\r\n\t\t\t\t\tProperty prop = iterator.next();\r\n\r\n\t\t\t\t\tecmDocumentMap.put(prop.getName(), prop.getValueAsString());\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\temcDocumentsList.add(ecmDocumentMap);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (ServiceException e) {\r\n\r\n\t\t\tlogger.error(ERROR_SERVICO_EMC.concat(e.getLocalizedMessage()));\r\n\r\n\t\t}\r\n\r\n\t\treturn emcDocumentsList;\r\n\r\n\t}", "private void printingSearchResults() {\n HashMap<Integer, Double> resultsMap = new HashMap<>();\n for (DocCollector collector : resultsCollector) {\n if (resultsMap.containsKey(collector.getDocId())) {\n double score = resultsMap.get(collector.getDocId()) + collector.getTermScore();\n resultsMap.put(collector.getDocId(), score);\n } else {\n resultsMap.put(collector.getDocId(), collector.getTermScore());\n }\n }\n List<Map.Entry<Integer, Double>> list = new LinkedList<>(resultsMap.entrySet());\n Collections.sort(list, new Comparator<Map.Entry<Integer, Double>>() {\n public int compare(Map.Entry<Integer, Double> o1,\n Map.Entry<Integer, Double> o2) {\n return (o2.getValue()).compareTo(o1.getValue());\n }\n });\n if (list.isEmpty())\n System.out.println(\"no match\");\n else {\n DecimalFormat df = new DecimalFormat(\".##\");\n for (Map.Entry<Integer, Double> each : list)\n System.out.println(\"docId: \" + each.getKey() + \" score: \" + df.format(each.getValue()));\n }\n\n }", "List<CriterionDocumentMasterDTO> findAll();", "public abstract List<ClinicalDocument> findClinicalDocumentEntries(int firstResult, int maxResults);", "public abstract void processResult(\n Operation operation, Object resultObj, Map<String, Object> keyMap)\n throws BaseCollectionException;", "public String getAllSubjects (){\n MongoCursor<Document> cursor = subject.find().iterator();\n boolean hasOne = false;\n String json = \"{\\\"result\\\":[\";\n while (cursor.hasNext()){\n Document c = (Document)cursor.next();\n json +=c.toJson()+\",\";\n hasOne = true;\n }\n if (hasOne) json = json.substring(0,json.length()-1);\n json+=\"]}\";\n return json;\n}", "public ArrayList<Document> getDocs() {\n return documents;\n }", "private PagingResults<WikiPageInfo> wrap(final PagingResults<NodeBackedEntity> results, final NodeRef container)\n {\n // Pre-load the nodes before we create them\n List<Long> ids = new ArrayList<Long>();\n for (NodeBackedEntity node : results.getPage())\n {\n ids.add(node.getId());\n }\n nodeDAO.cacheNodesById(ids);\n \n // Wrap\n return new PagingResults<WikiPageInfo>()\n {\n @Override\n public String getQueryExecutionId()\n {\n return results.getQueryExecutionId();\n }\n \n @Override\n public List<WikiPageInfo> getPage()\n {\n List<WikiPageInfo> pages = new ArrayList<WikiPageInfo>();\n for (NodeBackedEntity node : results.getPage())\n {\n NodeRef nodeRef = node.getNodeRef();\n String name = node.getName();\n pages.add(buildPage(nodeRef, container, name, null));\n }\n return pages;\n }\n \n @Override\n public boolean hasMoreItems()\n {\n return results.hasMoreItems();\n }\n \n @Override\n public Pair<Integer, Integer> getTotalResultCount()\n {\n return results.getTotalResultCount();\n }\n };\n }", "void loadResults(ArrayList<Comic> results, int totalItems);", "private void odfContentList(Document document) {\n\t\t// mimetype\n\t\t// content\n\t\t// styles\n\t\t// meta\n\t\t// settings\n\t\t// META-INF/manifest - this thing should tell us what is in the document\n\t\t// Versions\n\t\t// Thumbnails\n\t\t// Pictures\n\n\t\tOdfPackage pkg = document.getPackage();\n\n\t\tfor (String file : pkg.getFilePaths()) {\n\t\t\tif (file != null)\n\t\t\t\tfilePaths.add(file);\n\t\t}\n\n\t}", "public synchronized List<MTDDocument> getDocumentos(Collection<Integer> ids){\r\n\t\tArrayList<MTDDocument> listaRetorno = new ArrayList<MTDDocument>();\r\n\t\tDirectoryReader reader;\r\n\t\ttry {\r\n\t\t\treader = DirectoryReader.open(getCopiaDiretorioMemoria());\r\n\t\tIndexSearcher searcher = new IndexSearcher(reader);\t\t\r\n\t for(Integer docId: ids){\r\n \t\tDocument documento = searcher.doc(docId.intValue());\r\n \t\tif(documento != null){\r\n \t\tMTDDocument doc = new MTDDocumentBuilder().buildDocument(documento).build();\r\n \t\tdoc.setDocId(docId.intValue());\r\n \t\tlistaRetorno.add(doc);\r\n \t\t}else\r\n \t\t{System.out.println(\"Document with docId \"+docId.intValue()+\" not found.\");}\r\n\t }\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn listaRetorno;\r\n\t}", "@Override\r\n\t\t\tpublic List<ScoredDocument> search(Query query) {\n\t\t\t\treturn null;\r\n\t\t\t}" ]
[ "0.67258096", "0.6624649", "0.63411766", "0.62699264", "0.624096", "0.60585666", "0.6056651", "0.60468894", "0.604044", "0.60339445", "0.6030043", "0.6012002", "0.6007177", "0.5971514", "0.5939731", "0.5846081", "0.58154297", "0.5807737", "0.580451", "0.5772518", "0.57661986", "0.5731359", "0.57290983", "0.572577", "0.57211626", "0.5708982", "0.5681233", "0.5640519", "0.5614933", "0.5604932", "0.5590816", "0.55766284", "0.556356", "0.5555274", "0.5511653", "0.5510739", "0.5504703", "0.5504703", "0.5490018", "0.547313", "0.54290396", "0.54230857", "0.54206115", "0.5419518", "0.5387986", "0.53737307", "0.5372725", "0.53066635", "0.5303105", "0.53011113", "0.5288419", "0.5281635", "0.52798945", "0.5275398", "0.5265196", "0.5254266", "0.52525115", "0.52485967", "0.5233545", "0.5231071", "0.51972574", "0.5196356", "0.519229", "0.51919806", "0.51885897", "0.5182825", "0.51808065", "0.51763034", "0.5174711", "0.5164529", "0.5156865", "0.5152998", "0.51359445", "0.51350296", "0.51295036", "0.51288694", "0.51288575", "0.51282215", "0.5121999", "0.5119837", "0.5118926", "0.5102528", "0.5099972", "0.50981736", "0.509471", "0.50909877", "0.5087503", "0.5079219", "0.5075448", "0.50687754", "0.5067439", "0.5062048", "0.5051804", "0.5039961", "0.5038026", "0.5033923", "0.50235516", "0.50215715", "0.50078064", "0.5000485", "0.4992944" ]
0.0
-1
TODO Read units from settings
@Override protected WeatherInfo doInBackground(Void... params) { String weatherID = ""; String areaID = ""; try { String cityIds = null; if (mRequest.getRequestInfo().getRequestType() == RequestInfo.TYPE_WEATHER_BY_WEATHER_LOCATION_REQ) { cityIds = mRequest.getRequestInfo().getWeatherLocation().getCityId(); weatherID = cityIds.split(",")[0]; areaID = cityIds.split(",")[1]; } else if (mRequest.getRequestInfo().getRequestType() == RequestInfo.TYPE_WEATHER_BY_GEO_LOCATION_REQ) { double lat = mRequest.getRequestInfo().getLocation().getLatitude(); double lng = mRequest.getRequestInfo().getLocation().getLongitude(); String cityNameResponse = HttpRetriever.retrieve(String.format(GEO_URL, lat, lng)); if (TextUtils.isEmpty(cityNameResponse)) { return null; } cityNameResponse = cityNameResponse.replace("renderReverse&&renderReverse(", "").replace(")", ""); Log.d(TAG, "cityNameResponse" + cityNameResponse); JSONObject jsonObjectCity = JSON.parseObject(cityNameResponse); String areaName = jsonObjectCity.getJSONObject("result").getJSONObject("addressComponent").getString("district"); String cityName = jsonObjectCity.getJSONObject("result").getJSONObject("addressComponent").getString("city"); areaName = TextUtil.getFormatArea(areaName); cityName = TextUtil.getFormatArea(cityName); City city = cityDao.getCityByCityAndArea(cityName, areaName); if (city == null) { city = cityDao.getCityByCityAndArea(cityName, cityName); if (city == null) return null; } weatherID = city.getWeatherId(); areaID = city.getAreaId(); } else { return null; } //miui天气 String miuiURL = String.format(URL_WEATHER_MIUI, weatherID); if (DEBUG) Log.d(TAG, "miuiURL " + miuiURL); String miuiResponse = HttpRetriever.retrieve(miuiURL); if (miuiResponse == null) return null; if (DEBUG) Log.d(TAG, "Rmiuiesponse " + miuiResponse); //2345天气 String ttffUrl = String.format(URL_WEATHER_2345, areaID); if (DEBUG) Log.d(TAG, "ttffUrl " + ttffUrl); String ttffResponse = DecodeUtil.decodeResponse(HttpRetriever.retrieve(ttffUrl)); if (ttffResponse == null) return null; if (DEBUG) Log.d(TAG, "ttffResponse " + ttffResponse); JSONObject ttffAll = JSON.parseObject(ttffResponse); String cityName = ttffAll.getString("cityName"); //实时 JSONObject sk = ttffAll.getJSONObject("sk"); String humidity = sk.getString("humidity"); String sk_temp = sk.getString("sk_temp"); //日落日升 JSONObject sunrise = ttffAll.getJSONObject("sunrise"); ArrayList<WeatherInfo.DayForecast> forecasts = parse2345(ttffAll.getJSONArray("days7"), true); WeatherInfo.Builder weatherInfo = null; weatherInfo = new WeatherInfo.Builder( cityName, sanitizeTemperature(Double.parseDouble(sk_temp), true), WeatherContract.WeatherColumns.TempUnit.CELSIUS); //湿度 humidity = humidity.replace("%", ""); weatherInfo.setHumidity(Double.parseDouble(humidity)); if (miuiResponse != null) { //风速,风向 JSONObject weather = JSON.parseObject(miuiResponse); JSONObject accu_cc = weather.getJSONObject("accu_cc"); weatherInfo.setWind(accu_cc.getDouble("WindSpeed"), accu_cc.getDouble("WindDirectionDegrees"), WeatherContract.WeatherColumns.WindSpeedUnit.KPH); } weatherInfo.setTimestamp(System.currentTimeMillis()); weatherInfo.setForecast(forecasts); if (forecasts.size() > 0) { weatherInfo.setTodaysLow(sanitizeTemperature(forecasts.get(0).getLow(), true)); weatherInfo.setTodaysHigh(sanitizeTemperature(forecasts.get(0).getHigh(), true)); weatherInfo.setWeatherCondition(IconUtil.getWeatherCodeByType( ttffAll.getJSONArray("days7").getJSONObject(0).getString( DateTimeUtil.isNight(sunrise.getString("todayRise"), sunrise.getString("todaySet")) ? "nightWeaShort" : "dayWeaShort"), sunrise.getString("todayRise"), sunrise.getString("todaySet"))); } if (lastWeatherInfo != null) lastWeatherInfo = null; lastWeatherInfo = weatherInfo.build(); return lastWeatherInfo; } catch (Exception e) { if (DEBUG) Log.w(TAG, "JSONException while processing weather update", e); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getUnits();", "String getUnits();", "String getUnits();", "Units getUnits();", "protected String getUnits()\n {\n return units;\n }", "public byte getUnits() { return units; }", "String getUnitsString();", "public int getUnits() {\r\n return units;\r\n }", "public String getUnits() {\n return units;\n }", "public String getUnits() {\n return units;\n }", "public String getUnits() {\r\n\t\treturn units;\r\n\t}", "public String getUnits() {\n return this.units;\n }", "public String getUnits() {\n\t\treturn units;\n\t}", "public void setUnits(byte units) { this.units = units; }", "public void setUnit(Length units) {\n unit = units;\n }", "String getUnit();", "public void setUnits(String units) {\n this.units = units;\n }", "public void setUnits(String units) {\n this.units = units;\n }", "public int getUnits() {\n\t\treturn units;\n\t}", "public String getUnitsString() {\n return units;\n }", "public String getUnit();", "public String getUnit() {\n String unit = (String) comboUnits.getSelectedItem();\n if (\"inch\".equals(unit)) {\n return \"in\";\n } else if (\"cm\".equals(unit)) {\n return \"cm\";\n } else if (\"mm\".equals(unit)) {\n return \"mm\";\n } else if (\"pixel\".equals(unit)) {\n return \"px\";\n }\n return \"\";\n }", "public int getUnits() {\r\n\r\n\t\treturn this.units;\r\n\t}", "public String getUnit()\n {\n return (this.unit);\n }", "public java.lang.String getUnits() {\r\n return localUnits;\r\n }", "public String getUnit() {\n return unit;\n }", "public String getUnit() {\n return unit;\n }", "public String getUnit() {\n return unit;\n }", "public String getUnit () {\n\treturn this.unit;\n }", "public String unit() {\n return this.unit;\n }", "public int getUnits()\n {\n return m_cUnits;\n }", "public String getUnitsString() {\n String result = null;\n if (forVar != null) {\n Attribute att = forVar.findAttributeIgnoreCase(CDM.UNITS);\n if ((att != null) && att.isString())\n result = att.getStringValue();\n }\n return (result == null) ? units : result.trim();\n }", "public void setUnits(int value) {\r\n this.units = value;\r\n }", "public int getUnits()\n {\n return m_cCurUnits;\n }", "public String getUnit() {\n\t\tString unit;\n\t\ttry {\n\t\t\tunit = this.getString(\"unit\");\n\t\t} catch (Exception e) {\n\t\t\tunit = null;\n\t\t}\n\t\treturn unit;\n\t}", "public String getUnit() {\n\t\treturn unit;\n\t}", "public void setUnit (String value) {\n\tthis.unit = value;\n }", "public void setUnit(String unit);", "public static Object[] getUnits()\n\t{\n\t\treturn new Object[]\n\t\t{\n\t\t\t// SI units\n\t\t\t\"millimeters\",\n\t\t\t\"centimeters\",\n\t\t\t\"meters\",\n\t\t\t\"kilometers\",\n\t\t\t\n\t\t\t// English units\n\t\t\t\"inches\",\n\t\t\t\"feet\",\n\t\t\t\"yards\",\n\t\t\t\"miles\",\n\t\t\t\"knots\"\n\t\t};\n\t}", "public Length getUnit() {\n return unit;\n }", "public short getUnitsPerEm() throws PDFNetException {\n/* 843 */ return GetUnitsPerEm(this.a);\n/* */ }", "public String getUnits() {\n\t\tif (GridDialog.GRID_UNITS.containsKey(name)) {\n\t\t\treturn GridDialog.GRID_UNITS.get(name);\n\t\t}else {\n\t\t\t//for contributed grid, need to find the units from the ESRIShapefile object\n\t\t\tfor (LayerPanel layerPanel : ((MapApp)map.getApp()).layerManager.getLayerPanels()) {\n\t\t\t\tif (layerPanel.layer instanceof ESRIShapefile && ((ESRIShapefile)layerPanel.layer).equals(this)) {\n\t\t\t\t\tESRIShapefile esf = (ESRIShapefile)(layerPanel.layer);\n\t\t\t\t\treturn esf.getGridUnits();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}", "public void setUnit(String unit)\n {\n this.unit = unit;\n }", "@Override\n\tpublic String getUnitsString() {\n\t\treturn null;\n\t}", "String getBaseUnit() {\n return baseUnit;\n }", "private String getResultUnit() {\n switch (mCalculationType) {\n case CONSUMPTION_L_100_KM:\n return \"l/100 km\";\n case CONSUMPTION_KM_L:\n return \"km/l\";\n case CONSUMPTION_MPG:\n return \"mpg\";\n default:\n return \"\";\n }\n }", "public void setUnit(String unit) {\n this.unit = unit;\n }", "public SystemOfUnits getSystemOfUnits() {\n return SI.getInstance();\n }", "private String getUnits(Unit units, int value) {\n if (units == Unit.FEET) {\n if (value == 1) return \" foot\";\n return \" feet\";\n }\n if (value == 1) return \" inch\";\n return \" inches\";\n }", "TimeUnit getUnit();", "public abstract Unit getUnits( int dimension );", "public String getUnitOfMeasure() {\r\n\t\t\r\n\t\treturn McsElement.getElementByXpath(driver, \"//input[@name='unitOfMeasure']/following-sibling::input[@type='text']\").getAttribute(\"value\");\r\n\t}", "public String getUnitOfMeasure() {\r\n return this.unitOfMeasure;\r\n }", "public FioUnit getUnits() {\n\t\treturn this.units;\n\t}", "public String getUnitOfMeasurement() {\r\n\t\treturn unitOfMeasurement;\r\n\t}", "public final void setUnits() {\r\n\r\n for (final FileMincVarElem element : varArray) {\r\n\r\n if (element.units != null) {\r\n\r\n if (element.name.equals(\"xspace\")) {\r\n\r\n if (element.units.equals(\"mm\")) {\r\n setUnitsOfMeasure(Unit.MILLIMETERS.getLegacyNum(), 0);\r\n } else if (element.units.equals(\"in\")) {\r\n setUnitsOfMeasure(Unit.INCHES.getLegacyNum(), 0);\r\n }\r\n }\r\n\r\n if (element.name.equals(\"yspace\")) {\r\n\r\n if (element.units.equals(\"mm\")) {\r\n setUnitsOfMeasure(Unit.MILLIMETERS.getLegacyNum(), 1);\r\n } else if (element.units.equals(\"in\")) {\r\n setUnitsOfMeasure(Unit.INCHES.getLegacyNum(), 1);\r\n }\r\n }\r\n\r\n if (element.name.equals(\"zspace\")) {\r\n\r\n if (element.units.equals(\"mm\")) {\r\n setUnitsOfMeasure(Unit.MILLIMETERS.getLegacyNum(), 2);\r\n } else if (element.units.equals(\"in\")) {\r\n setUnitsOfMeasure(Unit.INCHES.getLegacyNum(), 2);\r\n }\r\n }\r\n }\r\n }\r\n }", "@Override\n\tpublic void setUnitsString(String units) {\n\t\t\n\t}", "ReadOnlyStringProperty unitsProperty();", "private String getAmountUnit(int unit) {\n switch (unit) {\n case UNIT_LITERS:\n return getResourceString(R.string.val_l);\n case UNIT_GALLONS:\n return getResourceString(R.string.val_g);\n }\n\n return \"\";\n }", "Unit getUnit();", "DefiningUnitType getDefiningUnit();", "DefinedUnitType getDefinedUnit();", "public double getUnitsPerPercent()\n {\n return unitsPerPercent;\n }", "public abstract String getUnit();", "@Test\n\tpublic void testgetUnits1(){\n\t\tTemperature data = new Temperature (400, Temperature.Units.FAHRENHEIT);\n\t\tassertEquals(data.getUnits() , Temperature.Units.FAHRENHEIT);\n\t}", "public boolean getUnits() {\r\n return Units;\r\n }", "public ArrayList getUnits();", "public short getResolutionUnit()\r\n\t{\r\n\t\treturn super.getShort(0);\r\n\t}", "public static String units(String unit) {\n\t\tswitch (unit) {\n\t\t\tcase \"feet\":\n\t\t\t\treturn \"ft\";\n\t\t\tcase \"miles\":\n\t\t\t\treturn \"mi\";\n\t\t\tcase \"meters\":\n\t\t\t\treturn \"m\";\n\t\t\tcase \"kilometers\":\n\t\t\t\treturn \"km\";\n\t\t\tdefault:\n\t\t\t\treturn null;\n\t\t}\n\t}", "public int getSourceUnits() {\n return sourceUnits;\n }", "public UnitTypes GetCurrentUnitType()\n {\n return MethodsCommon.GetTypeFromUnit(Unit);\n }", "public void setUnitTable(Units value);", "public String getToUnit() {\r\n return this.toUnit;\r\n }", "public int calculateUnits(Object oKey, Object oValue);", "public Units getUnitTable();", "public String getSourceUnits() {\n return this.sourceUnits;\n }", "public String getUnitDescription ()\n {\n return unitDescription;\n }", "@Override\n\tprotected long getUpdatedUnits(long units) {\n\t\treturn units;\n\t}", "public abstract double toBasicUnit(double unit);", "ChronoUnit getUnit();", "public Unit getUnit() {\n return unit;\n }", "int getRadiusUnitsValue();", "public String getDestinUnits() {\n return this.destinUnits;\n }", "void setUnits(int units) {\n\t\tunitsList.clear();\n\t\tcreateUnit(units);\n\t\tthis.units = units;\n\t}", "@Override\r\n\tpublic int unitsToWagger() {\n\t\treturn 0;\r\n\t}", "public String getUnitnm() {\r\n return unitnm;\r\n }", "public void setUnit(String unit) {\n\t\tthis.unit = unit;\n\t}", "public Unit<Length> kilometre() {return kilometre;}", "@javax.persistence.Column(name = \"unit\", precision = 5)\n\tpublic java.lang.String getUnit() {\n\t\treturn getValue(org.jooq.examples.cubrid.demodb.tables.Record.RECORD.UNIT);\n\t}", "public void setUnit () {\n\t\tdouble f = factor;\n\t\t/* Transform the value as a part of Unit */\n\t\tif (Double.isNaN(value)) return;\n\t\tif ((mksa&_log) != 0) {\n\t\t\tif ((mksa&_mag) != 0) value *= -2.5;\n\t\t\tfactor *= AstroMath.dexp(value);\n\t\t\tvalue = 0;\n\t\t}\n\t\telse {\n\t\t\tfactor *= value;\n\t\t\tvalue = 1.;\n\t\t}\n\t\t// Transform also the symbol\n\t\tif (f != factor) {\n\t\t\tif (symbol == null) symbol = edf(factor);\n\t\t\telse symbol = edf(factor) + toExpr(symbol);\n\t\t}\n\t}", "public void setUnit(Unit unit) {\r\n\t\tthis.unit = unit;\r\n\t}", "public String getFromUnit() {\r\n return this.fromUnit;\r\n }", "public Unit getUnit() {\n\t\treturn unit;\n\t}", "TraceDefinedUnitsView definedUnits();", "@Updatable\n public String getUnit() {\n return unit;\n }", "public double readMusicSetting() {\n try {\n BufferedReader soundReader = new BufferedReader(\n new FileReader(new File(wnwData, \"settings.dat\")));\n String soundSetting = soundReader.readLine();\n Scanner soundScanner = new Scanner(soundSetting);\n soundScanner.next();\n return Double.parseDouble(soundScanner.next());\n }\n catch (IOException e) {\n e.printStackTrace();\n } catch (Exception e){\n e.printStackTrace();\n }\n return 0;\n }", "public int getBonusUnits() {\r\n return bonusUnits;\r\n }", "private int getUnitListValue() {\r\n\t\tint value = 0;\r\n\t\tfor (Unit unit : this.unitList) {\r\n\t\t\tvalue += unit.getValue();\r\n\t\t}\r\n\t\treturn value;\r\n\t}", "protected int calculateUnits(Object oValue)\n {\n OldOldCache map = OldOldCache.this;\n Object oKey = getKey();\n switch (map.getUnitCalculatorType())\n {\n case UNIT_CALCULATOR_BINARY:\n return BinaryMemoryCalculator.INSTANCE.calculateUnits(oKey, oValue);\n\n case UNIT_CALCULATOR_EXTERNAL:\n return map.getUnitCalculator().calculateUnits(oKey, oValue);\n\n case UNIT_CALCULATOR_FIXED:\n default:\n return 1;\n }\n }", "public native int getUnits() throws MagickException;", "public void setUnits(java.lang.String param) {\r\n localUnitsTracker = param != null;\r\n\r\n this.localUnits = param;\r\n }" ]
[ "0.7636145", "0.7636145", "0.7636145", "0.7607032", "0.7490549", "0.7360137", "0.7359285", "0.7352253", "0.7351148", "0.73349726", "0.72937447", "0.7229439", "0.7193806", "0.71525186", "0.7119199", "0.70751804", "0.7069722", "0.7069722", "0.706832", "0.7059194", "0.70224524", "0.69842696", "0.6911201", "0.6892432", "0.6892035", "0.6876004", "0.6876004", "0.6876004", "0.6865011", "0.6835366", "0.68018216", "0.67982316", "0.676261", "0.6706317", "0.6685742", "0.6682557", "0.6676684", "0.6636209", "0.6565716", "0.65232956", "0.65113693", "0.6493004", "0.6485466", "0.64724296", "0.64618266", "0.6459748", "0.64439756", "0.6443017", "0.6440128", "0.6403981", "0.63948643", "0.6393633", "0.63842696", "0.6373221", "0.6361493", "0.636135", "0.6357345", "0.63559514", "0.6354173", "0.6349968", "0.6341796", "0.6276572", "0.6270868", "0.62253845", "0.6217253", "0.62099326", "0.62069976", "0.6193046", "0.61707175", "0.6168541", "0.6167033", "0.61666", "0.61546963", "0.61389333", "0.613802", "0.6127506", "0.61084694", "0.6105307", "0.61001855", "0.6099341", "0.6096029", "0.60902995", "0.6087267", "0.6081865", "0.60732096", "0.6072001", "0.606742", "0.60664827", "0.60481185", "0.6047654", "0.6042209", "0.60100526", "0.6007395", "0.6004808", "0.599259", "0.5967687", "0.5965025", "0.59595853", "0.595303", "0.59501344", "0.594516" ]
0.0
-1
String profile = environment.getProperty("service.profile");
@Override public String getKcbCrawling(PersonVO person) throws FinsetException, IOException { String cd_result = Constant.SUCCESS; logger.debug(":::::::::::::::::::::::::::::::::::: KCB START ::::::::::::::::::::::::::::::::::::"); KcbCreditInfoVO info = new KcbCreditInfoVO(); boolean isSuccess = false; if("LOCAL".equals(profile)) { logger.error("continue"); // info.setYn_craw_test("Y"); // info.setNoPerson(person.getNo_person()); // info.setNmCust(person.getNm_person()); // info.setNmIf("600420"); // info.setCd_regist("09"); //01 신규, 09 URL // info.setBgn(person.getBgn()); // info.setDi(person.getKcb_di()); // info.setHp(person.getHp()); // ReturnClass returnClass = urlCrawling(info); // info.setYn_craw_test("Y"); // returnClass = parseCrawling(info); // debtManager.debtPdocRun(person.getNo_person()); // cd_result = returnClass.getCd_result(); } else { try { //600420 크롤링 시작 logger.debug(":::::::::::::::::::::::::::::::::::: KCB CRAW START ::::::::::::::::::::::::::::::::::::"); info.setNoPerson(person.getNo_person()); info.setNmCust(person.getNm_person()); info.setNmIf("600420"); info.setCd_regist("09"); //01 신규, 09 URL info.setBgn(person.getBgn()); info.setDi(person.getKcb_di()); info.setHp(person.getHp()); ReturnClass returnClass = urlCrawling(info); logger.debug(":::::::::::::::::::::::::::::::::::: KCB CRAW END ::::::::::::::::::::::::::::::::::::"); //parsing returnClass = parseCrawling(info); if(Constant.SUCCESS.equals(returnClass.getCd_result())) { //TODO call Package /*** 부채TABLE DATA생성 proc call ***/ debtManager.debtPdocRun(person.getNo_person()); isSuccess = true; } cd_result = returnClass.getCd_result(); } catch (FinsetException e) { isSuccess = false; LogUtil.error(logger, e); throw e; } catch (IOException e) { isSuccess = false; LogUtil.error(logger, e); throw e; } finally { if(isSuccess == false) { //error 발생시 당일 전문 데이터 DELETE deleteKcbCb(person.getNo_person()); cd_result = Constant.FAILED; } } } logger.debug(":::::::::::::::::::::::::::::::::::: KCB END ::::::::::::::::::::::::::::::::::::"); return cd_result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getActiveProfile() {\r\n String[] profiles = env.getActiveProfiles();\r\n String activeProfile = \"add\";\r\n if (profiles != null && profiles.length > 0) {\r\n activeProfile = profiles[0];\r\n }\r\n System.out.println(\"===== The active profile is \" + activeProfile + \" =====\");\r\n return(activeProfile);\r\n }", "public ProfileService getProfileService()\n {\n return profileService;\n }", "public ProfileService profile() {\n return service;\n }", "String getEnvironmentProperty(String key);", "Properties getEnvironment();", "Properties getEnvironment();", "String getProfile();", "String getEnvironment();", "public String getProfile() {\n return profile;\n }", "ApplicationProfile getApplicationProfile();", "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 getApplicationProfile()\n {\n return mApplicationProfile;\n }", "private static String getProperty(String property) {\n\t\tString value = System.getProperty(property);\r\n\t\tif (value == null) {\r\n\t\t\tvalue = System.getenv(property);\r\n\t\t}\r\n\t\treturn value;\r\n\t}", "SecurityProfile securityProfile();", "public String getProfile();", "private static String getEnvironVar(String env) {\r\n \treturn System.getenv(env);\r\n }", "public abstract Properties getProfileProperties();", "private int getEnvironment() {\n\n if (ServiceBaseGlobal.env != null) {\n return ServiceBaseGlobal.env.getValue();\n }\n return ProjectUtil.Environment.dev.getValue();\n }", "CertprofileQa getCertprofile(String certprofileName);", "public static String extractEnvironment(String string) {\n\t\t\n\t\tlogger.trace(\"Extracting environment from service name: {}\" , string);\n\t\t\n\t\tif(string.length() < 3 ){\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tString env = string.substring(0,3);\n\t\tif (env.equalsIgnoreCase(\"DEV\") || env.equalsIgnoreCase(\"UAT\") || env.equalsIgnoreCase(\"LAB\")){\n\t\t\treturn env;\n\t\t}\n\t\t\n\t\tif(string.length() < 4 ){\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tenv = string.substring(0,4);\n\t\tif (env.equalsIgnoreCase(\"PROD\") || env.equalsIgnoreCase(\"TEST\") || env.equalsIgnoreCase(\"PERF\")){\n\t\t\treturn env;\n\t\t}\n\t\treturn null;\n\t}", "public Profile getProfile() {\n return _profile;\n }", "public static Profile getProfile() {\n return profile;\n }", "public static String getProperty (String key) {\n return SystemProperties.getProperty(key);\n }", "public void setProfile(Profile profile) {\n _profile = profile;\n }", "String getProperty();", "String getProperty();", "String getProperty();", "public ProfileServiceBootstrap()\n {\n }", "public Map<String, String> getEnvironment();", "java.lang.String getService();", "java.lang.String getService();", "java.lang.String getService();", "H getProfile();", "public String getDevelopmentToolingandEnvironmentServiceName() {\n return developmentToolingandEnvironmentServiceName;\n }", "public String getProperty(String key) {\n\t\treturn Optional.ofNullable(env.get(key)).orElseGet(()->\"\");\n\t}", "public String getServiceName(){\n return serviceName;\n }", "java.lang.String getServiceAccount();", "public String getEnvironment(String env) {\n\t\treturn environment.get(env);\n\t}", "public String getSystemProperties(String key) {\n // Whether EDGE, UMTS, etc...\n return SystemProperties.get(key);\n }", "public String getEnvironment() {\n return environment;\n }", "public String getPROFILE_NAME() {\r\n return PROFILE_NAME;\r\n }", "public static void read_Environment_Variable_for_Web() {\n\t\tProperties prop = new Properties();\n\t\tInputStream input = null;\n\n\t\ttry {\n\n\t\t\tinput = new FileInputStream(\"/Environment File/environmentVariableForWebProduction2.properties\");\n\n\t\t\t// load a properties file\n\t\t\tprop.load(input);\n\n\t\t\t// get the property value and print it out\n\t\t Map<String, Object> map = new HashMap<>();\n\t\t\tfor (Entry<Object, Object> entry : prop.entrySet()) {\n\t\t\t\tmap.put((String) entry.getKey(), entry.getValue());\n\t\t\t}\n\t\t\tEnvironmentVariablesForWeb.setEnvironmentPropertyMap(map);\n\t\t\t/*EnvironmentVariables.PLATFORM_NAME = prop.getProperty(\"PLATFORM_NAME\");\n\t\t\tEnvironmentVariables.VERSION_NAME = prop.getProperty(\"VERSION_NAME\");\n\t\t\tEnvironmentVariables.DEVICE_NAME = prop.getProperty(\"DEVICE_NAME\");\n\t\t\tSystem.out.println(EnvironmentVariables.PLATFORM_NAME);\n\t\t\tSystem.out.println(EnvironmentVariables.VERSION_NAME);\n\t\t\tSystem.out.println(EnvironmentVariables.DEVICE_NAME);*/\n\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t} finally {\n\t\t\tif (input != null) {\n\t\t\t\ttry {\n\t\t\t\t\tinput.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t }", "public interface ProfilingService {\n String PROFILES = \"profiles\";\n\n /**\n * Get the profile factory for a given data source\n *\n * @param dataSourceMetadata the data source metadata\n * @return a ProfileFactory that accepts the reference (or null if it doesn't exist)\n */\n ProfileFactory getProfileFactory( DataSourceMetadata dataSourceMetadata );\n\n /**\n * Return a boolean indicating whether a ProfileFactory exists for the given data source\n *\n * @param dataSourceMetadata the data source metadata\n * @return true iff there is a ProfileFactory that accepts the reference\n */\n boolean accepts( DataSourceMetadata dataSourceMetadata );\n\n /**\n * Creates a profile from the ProfileConfiguration and returns its initial status\n *\n * @param profileConfiguration the profile configuration\n * @return a ProfileStatusManager for the created profile\n * @throws ProfileCreationException if there is an error during profile creation\n */\n ProfileStatusManager create( ProfileConfiguration profileConfiguration ) throws ProfileCreationException;\n\n /**\n * Returns a list of the currently active profiles\n *\n * @return a list of the currently active profiles\n */\n List<ProfileStatusReader> getActiveProfiles();\n\n /**\n * Returns the profile for a given profileId\n *\n * @param profileId the profileId\n * @return the Profile\n */\n Profile getProfile( String profileId );\n\n /**\n * Returns the a ProfileStatusReader for the given profileId\n *\n * @param profileId the profileId\n * @return the ProfileStatusReader\n */\n ProfileStatusReader getProfileUpdate( String profileId );\n\n /**\n * Stops the profile with the given id\n *\n * @param profileId the profileId to stop\n */\n void stop( String profileId );\n\n /**\n * Stops all the running profiles\n */\n void stopAll();\n\n /**\n * Returns a boolean indicating whether a profile is running\n *\n * @param profileId the profileId to check\n * @return a boolean indicating whether a profile is running\n */\n boolean isRunning( String profileId );\n\n /**\n * Discards the profile with the given id\n *\n * @param profileId the profileId to discard\n */\n void discardProfile( String profileId );\n\n /**\n * Discards all profiles\n */\n void discardProfiles();\n}", "@Bean\n public WebSSOProfileECPImpl ecpprofile() {\n return new WebSSOProfileECPImpl();\n }", "public java.lang.String getServicename() {\n\treturn servicename;\n}", "private static ServiceAccount getInstanceByEnvVars() {\n Map<String, String> env = System.getenv();\n String gaasUrl = env.get(GAAS_URL);\n String gaasApiKey = env.get(GAAS_API_KEY);\n if (gaasUrl == null || gaasApiKey == null) {\n return null;\n }\n logger.info(\"A ServiceAccount is created from environment variables: GAAS_URL=\"\n + gaasUrl + \", GAAS_API_KEY=***\");\n return getInstance(gaasUrl, gaasApiKey);\n }", "public void setProfile(Profile profile) {\n\t\tthis.profile = profile;\n\t}", "public java.lang.String getServiceName(){\n return localServiceName;\n }", "public OSProfile osProfile() {\n return this.osProfile;\n }", "public Profile getProfile() {\n return m_profile;\n }", "public interface JavaProfile {\r\n\r\n /** the constant for the java profile 'JavaSE-1.6' */\r\n String JAVA_PROFILE_JavaSE_1_6 = \"JavaSE-1.6\";\r\n\r\n /** the constant for the java profile 'J2SE-1.5' */\r\n String JAVA_PROFILE_J2SE_1_5 = \"J2SE-1.5\";\r\n\r\n /** the constant for the java profile 'J2SE-1.4' */\r\n String JAVA_PROFILE_J2SE_1_4 = \"J2SE-1.4\";\r\n\r\n /** the constant for the java profile 'J2SE-1.3' */\r\n String JAVA_PROFILE_J2SE_1_3 = \"J2SE-1.3\";\r\n\r\n /** the constant for the java profile 'J2SE-1.2' */\r\n String JAVA_PROFILE_J2SE_1_2 = \"J2SE-1.2\";\r\n\r\n /** the constant for the java profile 'JRE-1.1' */\r\n String JAVA_PROFILE_JRE_1_1 = \"JRE-1.1\";\r\n\r\n /** the constant for the java profile 'CDC-1.1_Foundation-1.1' */\r\n String JAVA_PROFILE_CDC_1_1_Foundation_1_1 = \"CDC-1.1_Foundation-1.1\";\r\n\r\n /** the constant for the java profile 'CDC-1.0_Foundation-1.0' */\r\n String JAVA_PROFILE_CDC_1_0_Foundation_1_0 = \"CDC-1.0_Foundation-1.0\";\r\n\r\n /** the constant for the java profile 'OSGi_Minimum-1.0' */\r\n String JAVA_PROFILE_OSGi_Minimum_1_0 = \"OSGi_Minimum-1.0\";\r\n\r\n /** the constant for the java profile 'OSGi_Minimum-1.1' */\r\n String JAVA_PROFILE_OSGi_Minimum_1_1 = \"OSGi_Minimum-1.1\";\r\n\r\n /**\r\n * <p>\r\n * Returns the name of the java profile, e.g. <code>J2SE-1.5</code> or {@link JavaProfile#JAVA_PROFILE_J2SE_1_5}.\r\n * </p>\r\n * \r\n * @return the name of the java profile.\r\n */\r\n String getName();\r\n\r\n /**\r\n * <p>\r\n * Returns a list of execution environment names that this java profile is a super set of (e.g.\r\n * <code>[OSGi/Minimum-1.0, OSGi/Minimum-1.1, JRE-1.1, J2SE-1.2]</code> ).\r\n * </p>\r\n * \r\n * @return a list of execution environment names that this java profile is a super set of.\r\n */\r\n List<String> getExecutionEnvironmentNames();\r\n\r\n /**\r\n * <p>\r\n * Returns all specified system packages.\r\n * </p>\r\n * \r\n * @return\r\n */\r\n List<String> getSystemPackages();\r\n\r\n /**\r\n * <p>\r\n * Returns the java profile as a properties object. The following properties are defined:\r\n * <ul>\r\n * <li><code>org.osgi.framework.system.packages</code></li>\r\n * <li><code>org.osgi.framework.bootdelegation</code></li>\r\n * <li><code>org.osgi.framework.executionenvironment</code></li>\r\n * <li><code>osgi.java.profile.name</code></li>\r\n * </ul>\r\n * </p>\r\n * \r\n * @return the java profile as properties.\r\n */\r\n StringMap getProperties();\r\n\r\n /**\r\n * <p>\r\n * Returns <code>true</code>, if the specified package name denotes a system package.\r\n * </p>\r\n * \r\n * @param packageName\r\n * the package name\r\n * \r\n * @return <code>true</code>, if the specified package name denotes a system package, <code>false</code> otherwise.\r\n */\r\n boolean isSystemPackage(String packageName);\r\n\r\n /**\r\n * <p>\r\n * Returns <code>true</code>, if the specified package name is must be delegated to the boot class loader.\r\n * </p>\r\n * \r\n * @param packageName\r\n * the package name\r\n * \r\n * @return <code>true</code>, if the specified package name is must be delegated to the boot class loader.\r\n */\r\n boolean isDelegatedToBootClassLoader(String packageName);\r\n}", "public String getProperty();", "public String getService() {\n return service;\n }", "public String getService() {\n return service;\n }", "public String getService() {\n return service;\n }", "public Boolean getProfile()\n {\n return profile;\n }", "String getProperty(String name);", "@Override\n public GetServiceProfileResult getServiceProfile(GetServiceProfileRequest request) {\n request = beforeClientExecution(request);\n return executeGetServiceProfile(request);\n }", "private String profileTest() {\n BufferedReader br = null;\n try {\n br = new BufferedReader(new FileReader(\n \"/home/pascal/bin/workspace_juno/pgu-geo/war/WEB-INF/pgu/profile.json\"));\n } catch (final FileNotFoundException e) {\n throw new RuntimeException(e);\n }\n\n final StringBuilder sb = new StringBuilder();\n String line = null;\n\n try {\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n } catch (final IOException e) {\n throw new RuntimeException(e);\n }\n return sb.toString();\n }", "public String getDevelopmentToolingandEnvironmentServiceDescription() {\n return developmentToolingandEnvironmentServiceDescription;\n }", "public EntityProfile getProfile()\n\t{\n\t\treturn m_profile;\n\t}", "String getProperty(String property);", "public String getProfilesLocation() {\n return profilesLocation;\n }", "String getProperty(String key);", "String getProperty(String key);", "String getProperty(String key);", "public static String getEnvironmentVariable(String name) {\n return System.getenv(name);\n }", "HumanProfile getUserProfile();", "public MetadataProfile getProfile() {\n\t\treturn profile;\n\t}", "@Bean\n\tpublic WebSSOProfileECPImpl ecpprofile() {\n\t\treturn new WebSSOProfileECPImpl();\n\t}", "@Bean\n\tpublic WebSSOProfileECPImpl ecpprofile() {\n\t\treturn new WebSSOProfileECPImpl();\n\t}", "public static String getAppName(){\r\n return getProperty(\"name\", \"Jin\");\r\n }", "public static String GetData(String key) throws Exception {\r\n PropertiesConfiguration properties;\r\n if (GetConfigData(\"getDataFromEnvironment\").equals(\"testEnvironment\")) {\r\n properties = new PropertiesConfiguration(\r\n System.getProperty(\"user.dir\") + \"//src//test//resource//dataRepo//testEnvironment.properties\");\r\n } else if (GetConfigData(\"getDataFromEnvironment\").equals(\"sandboxEnvironment\")) {\r\n properties = new PropertiesConfiguration(\r\n System.getProperty(\"user.dir\") + \"//src//test//resource//dataRepo//sandboxEnvironment.properties\");\r\n } else {\r\n throw new Exception(\"mentioned environment is not iplemented to get data\");\r\n }\r\n\r\n return properties.getString(key);\r\n }", "public static String getProperty( String key )\r\n {\r\n if (System.getProperties().containsKey( key ))\r\n {\r\n return System.getProperty( key );\r\n }\r\n return _resourceBundle.getString( key );\r\n }", "public String getService() {\n\t\treturn service.get();\n\t}", "static String getUserName() {\n return System.getProperty(\"user.name\");\n }", "VirtualMachineProfile virtualMachineProfile();", "public String getProfileName(){\n reporter.info(\"Get profile name\");\n waitForPageToLoad();\n sleepFor(1);//here\n return getElementText(LOCATORS.getBy(COMPONENT_NAME,\"PROFILE_NAME\"));\n }", "public void setProfile(Boolean profile)\n {\n this.profile = profile;\n }", "public Boolean isProfileRunning() {\n return this.isProfileRunning;\n }", "private String getProperty(String property) {\n String ret = sdkProperties.getProperty(property);\n if (null == ret) {\n logger.warn(String.format(\"No configuration value found for '%s'\", property));\n }\n return ret;\n }", "public URI getProfile() { \n\t\treturn getProfileElement().getValue();\n\t}", "public String getService(){\n\t\t return service;\n\t}", "private static String stringValue(String key) {\n String value = context.envString(toEnvvar(key));\n if(!isNullOrEmpty(value)) {\n return value;\n }\n\n value = System.getProperty(key);\n if(!isNullOrEmpty(value)) {\n return value;\n }\n\n value = context.configString(key);\n if(!isNullOrEmpty(value)) {\n return value;\n }\n\n return null;\n }", "protected String getenv(String varname) {\n\t\t//return System.getProperty(varname);\n\t\treturn \"\"; //TODO allow virtual system variables for each computer, that are remembered on restart\n\t}", "private String RetrieveGoogleSignInProfile(){\n String personName;\n acct = GoogleSignIn.getLastSignedInAccount(ChooseService.this);\n if (acct != null) {\n personName = acct.getDisplayName();\n /*String personGivenName = acct.getGivenName();\n String personFamilyName = acct.getFamilyName();\n String personEmail = acct.getEmail();\n String personId = acct.getId();\n Uri personPhoto = acct.getPhotoUrl();*/\n }else{\n personName = null;\n }\n return personName;\n }", "public String getConfigProperties(String key) {\n String value = null;\n try {\n FileReader fileReader=new FileReader(System.getProperty(\"user.dir\")+\"/src/main/resources/config.properties\");\n Properties properties=new Properties();\n properties.load(fileReader);\n value= properties.getProperty(key);\n }catch (Exception e){\n e.printStackTrace();\n }\n return value;\n }", "@Override\r\n\tpublic Optional<String> getCurrentAuditor() {\n\t\treturn Optional.of(System.getProperty(\"user.name\"));\r\n\t}", "private String get(String key)\n {\n return settings.getProperty(key);\n }", "public void setProfile(String profile) {\n this.profile = profile == null ? null : profile.trim();\n }", "String getConfigName();", "public String getProperty(String propertyName){\n if(templateConfigService==null){\n templateConfigService = getOsgiHelper().getOsgiServiceBySite(TemplateConfigService.class.getName(),\"food\");\n }\n String out = callAccessorOnConfigService(propertyName,templateConfigService);\n if(out !=null){\n return out;\n }\n //lazy load config service\n if(siteConfigService==null){\n siteConfigService = getOsgiHelper().getOsgiServiceBySite(SiteConfigService.class.getName(),\"food\");\n }\n return callAccessorOnConfigService(propertyName,siteConfigService);\n }", "public String getServiceAccountPropertiesFile() {\r\n return serviceAccountPropertiesFileName;\r\n }", "@SuppressWarnings(\"static-access\")\n\tpublic static String getSystemSetupValue(String propertyName) {\n SetupManager setupManager = (SetupManager) appContext.getBean(\"setupManager\");\n return setupManager.getSettingValue(propertyName);\n }", "public static String getPropertyFromFile(String propName)throws ISException{\n InputStream inputStream;\n Properties prop = new Properties();\n try {\n inputStream = new FileInputStream(new File(System.getenv(\"conf.home\")+\"\\\\application.properties\"));\n prop.load(inputStream);\n if(prop==null){\n throw new ISException(\"getProperty: Cannot open property file!\");\n }\n return prop.getProperty(propName);\n } catch(Exception e){\n throw new ISException(\"getProperty: Cannot open property file!\");\n }\n }", "public String getServiceName()\r\n {\r\n return serviceName;\r\n }", "public String getEnvironmentName() {\n return this.environmentName;\n }", "public String getServiceName()\n {\n return serviceName;\n }", "public String getServiceAccountName() {\n return serviceAccountName;\n }", "public String getDevelopmentToolingandEnvironmentServiceWorkProduct() {\n return developmentToolingandEnvironmentServiceWorkProduct;\n }", "@Override\r\n\tpublic String getProp(final String propName) {\n\t\treturn exec(new Callable<String>() {\r\n\t\t\t@Override\r\n\t\t\tpublic String call() throws Exception {\r\n\t\t\t\treturn System.getProperty(propName);\r\n\t\t\t}\r\n\t\t});\r\n\t}" ]
[ "0.6577477", "0.6512432", "0.6474049", "0.64356947", "0.63718164", "0.63718164", "0.6328039", "0.62584186", "0.6190392", "0.6178333", "0.5995813", "0.5985477", "0.59664303", "0.59250116", "0.5923282", "0.58681846", "0.58481276", "0.5843387", "0.58044624", "0.57761043", "0.576264", "0.57437557", "0.5701386", "0.56643546", "0.56268144", "0.56268144", "0.56268144", "0.56093246", "0.5597173", "0.55945134", "0.55945134", "0.55945134", "0.55827934", "0.5559447", "0.55363876", "0.5529336", "0.552721", "0.55220765", "0.5495375", "0.54933745", "0.54841745", "0.5475334", "0.5464073", "0.5452858", "0.54407", "0.54212433", "0.5421188", "0.5420138", "0.5410148", "0.5407309", "0.5386223", "0.53858143", "0.5375596", "0.5375596", "0.5375596", "0.5374323", "0.5367336", "0.5358346", "0.535174", "0.53364235", "0.5336419", "0.53343666", "0.53295577", "0.5325416", "0.5325416", "0.5325416", "0.5322589", "0.5320477", "0.5316691", "0.5315889", "0.5315889", "0.5308516", "0.5294375", "0.5291242", "0.5286578", "0.5283928", "0.52817804", "0.5245362", "0.52445364", "0.5243879", "0.524322", "0.5242588", "0.5232157", "0.5227756", "0.5220051", "0.5217595", "0.5214985", "0.52124596", "0.51766866", "0.5174967", "0.51738846", "0.5165676", "0.516164", "0.51583594", "0.5157868", "0.5157416", "0.51561195", "0.51531094", "0.51474637", "0.51418006", "0.51411337" ]
0.0
-1
/ KCB PARSING END
@Override public ReturnClass createKcbReqNonfiInfo(KcbReqNonfiInfoVO kcbReqNonfiInfoVO) { scrapMapper.createKcbReqNonfiInfo(kcbReqNonfiInfoVO); return new ReturnClass(Constant.SUCCESS, "KCB 비금융정보 요청내역 저장 완료", ""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void kk12() {\n\n\t}", "public void func_70295_k_() {}", "@Override\r\n\tpublic void visit(ParkB parkB) {\n\t\t\r\n\t}", "public boolean k_()\r\n/* 450: */ {\r\n/* 451:464 */ return false;\r\n/* 452: */ }", "private void inzsr() {\n\t\tid1Ctdta = 1;\n\t\tstrCtdta = \"Each KGS \";\n\t\tfor (int idxCtdta = 1; idxCtdta <= 1; idxCtdta++) {\n\t\t\tum[idxCtdta] = subString(strCtdta, id1Ctdta, 11);\n\t\t\tid1Ctdta = Integer.valueOf(id1Ctdta + 11);\n\t\t}\n\t\t// Initialise message subfile\n\t\tnmfkpinds.setPgmInd32(true);\n\t\tstateVariable.setZzpgm(replaceStr(stateVariable.getZzpgm(), 1, 8, \"WWCONDET\"));\n\t\t// - Set date\n\t\tstateVariable.setZzdate(getDate().toInt());\n\t\t// -\n\t\t// - CONTRACT\n\t\tcontractHeader.retrieve(stateVariable.getXwordn());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// - CUSTOMER\n\t\tpurchases.retrieve(stateVariable.getXwbccd());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// BR00012 Debtor not found on Purchases\n\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\tstateVariable.setXwg4tx(all(\"-\", 40));\n\t\t}\n\t\t// - REPRESENTATIVE\n\t\tsalespersons.retrieve(stateVariable.getPerson());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// BR00013 Rep not found on Salespersons\n\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\tstateVariable.setPname(all(\"-\", 34));\n\t\t}\n\t\t// - STATUS\n\t\torderStatusDescription.retrieve(stateVariable.getXwstat());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// BR00014 Status not found on Order_status_description\n\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\tstateVariable.setXwsdsc(all(\"-\", 20));\n\t\t}\n\t}", "public void mo12628c() {\n }", "private final void step3() { if (k == 0) return; /* For Bug 1 */ switch (b[k-1])\n\t {\n\t case 'a': if (ends(\"ational\")) { r(\"ate\"); break; }\n\t if (ends(\"tional\")) { r(\"tion\"); break; }\n\t break;\n\t case 'c': if (ends(\"enci\")) { r(\"ence\"); break; }\n\t if (ends(\"anci\")) { r(\"ance\"); break; }\n\t break;\n\t case 'e': if (ends(\"izer\")) { r(\"ize\"); break; }\n\t break;\n\t case 'l': if (ends(\"bli\")) { r(\"ble\"); break; }\n\t if (ends(\"alli\")) { r(\"al\"); break; }\n\t if (ends(\"entli\")) { r(\"ent\"); break; }\n\t if (ends(\"eli\")) { r(\"e\"); break; }\n\t if (ends(\"ousli\")) { r(\"ous\"); break; }\n\t break;\n\t case 'o': if (ends(\"ization\")) { r(\"ize\"); break; }\n\t if (ends(\"ation\")) { r(\"ate\"); break; }\n\t if (ends(\"ator\")) { r(\"ate\"); break; }\n\t break;\n\t case 's': if (ends(\"alism\")) { r(\"al\"); break; }\n\t if (ends(\"iveness\")) { r(\"ive\"); break; }\n\t if (ends(\"fulness\")) { r(\"ful\"); break; }\n\t if (ends(\"ousness\")) { r(\"ous\"); break; }\n\t break;\n\t case 't': if (ends(\"aliti\")) { r(\"al\"); break; }\n\t if (ends(\"iviti\")) { r(\"ive\"); break; }\n\t if (ends(\"biliti\")) { r(\"ble\"); break; }\n\t break;\n\t case 'g': if (ends(\"logi\")) { r(\"log\"); break; }\n\t } }", "private final zzgy zzgb() {\n }", "public void mo21786K() {\n }", "private void b044904490449щ0449щ() {\n /*\n r7 = this;\n r0 = new rrrrrr.ccrcrc;\n r1 = new java.lang.StringBuilder;\n r1.<init>();\n r2 = r7.bнн043Dннн;\n r2 = com.immersion.aws.analytics.ImmrAnalytics.b044C044C044C044Cьь(r2);\n r2 = r2.getFilesDir();\n r1 = r1.append(r2);\n r2 = java.io.File.separator;\n r1 = r1.append(r2);\n L_0x001b:\n r2 = 1;\n switch(r2) {\n case 0: goto L_0x001b;\n case 1: goto L_0x0024;\n default: goto L_0x001f;\n };\n L_0x001f:\n r2 = 0;\n switch(r2) {\n case 0: goto L_0x0024;\n case 1: goto L_0x001b;\n default: goto L_0x0023;\n };\n L_0x0023:\n goto L_0x001f;\n L_0x0024:\n r2 = \"3HC4C-01.txt\";\n r1 = r1.append(r2);\n r1 = r1.toString();\n r0.<init>(r1);\n r0.load();\n L_0x0034:\n r1 = r0.size();\n if (r1 <= 0) goto L_0x007a;\n L_0x003a:\n r1 = r0.peek();\n r2 = new rrrrrr.rcccrr;\n r2.<init>();\n r3 = r7.bнн043Dннн;\n r3 = com.immersion.aws.analytics.ImmrAnalytics.b044Cь044C044Cьь(r3);\n monitor-enter(r3);\n r4 = r7.bнн043Dннн;\t Catch:{ all -> 0x0074 }\n r4 = com.immersion.aws.analytics.ImmrAnalytics.bь044C044C044Cьь(r4);\t Catch:{ all -> 0x0074 }\n r4 = r4.bЛ041B041BЛ041BЛ;\t Catch:{ all -> 0x0074 }\n r5 = r7.bнн043Dннн;\t Catch:{ all -> 0x0074 }\n r5 = com.immersion.aws.analytics.ImmrAnalytics.bь044C044C044Cьь(r5);\t Catch:{ all -> 0x0074 }\n r5 = r5.b041B041B041BЛ041BЛ;\t Catch:{ all -> 0x0074 }\n r6 = r7.bнн043Dннн;\t Catch:{ all -> 0x0074 }\n r6 = com.immersion.aws.analytics.ImmrAnalytics.bь044C044C044Cьь(r6);\t Catch:{ all -> 0x0074 }\n r6 = r6.bЛЛЛ041B041BЛ;\t Catch:{ all -> 0x0074 }\n monitor-exit(r3);\t Catch:{ all -> 0x0074 }\n r1 = r2.sendHttpRequestFromCache(r4, r5, r6, r1);\n if (r1 == 0) goto L_0x0077;\n L_0x0069:\n if (r4 == 0) goto L_0x0077;\n L_0x006b:\n if (r5 == 0) goto L_0x0077;\n L_0x006d:\n r0.remove();\n r0.save();\n goto L_0x0034;\n L_0x0074:\n r0 = move-exception;\n monitor-exit(r3);\t Catch:{ all -> 0x0074 }\n throw r0;\n L_0x0077:\n r0.save();\n L_0x007a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: rrrrrr.cccccr.b044904490449щ0449щ():void\");\n }", "private final void step4() { switch (b[k])\n\t {\n\t case 'e': if (ends(\"icate\")) { r(\"ic\"); break; }\n\t if (ends(\"ative\")) { r(\"\"); break; }\n\t if (ends(\"alize\")) { r(\"al\"); break; }\n\t break;\n\t case 'i': if (ends(\"iciti\")) { r(\"ic\"); break; }\n\t break;\n\t case 'l': if (ends(\"ical\")) { r(\"ic\"); break; }\n\t if (ends(\"ful\")) { r(\"\"); break; }\n\t break;\n\t case 's': if (ends(\"ness\")) { r(\"\"); break; }\n\t break;\n\t } }", "public void mo1403c() {\n }", "public void mo115190b() {\n }", "private static void cajas() {\n\t\t\n\t}", "void mo1942k();", "private void yy() {\n\n\t}", "private final void asB() {\n /*\n r6 = this;\n r0 = r6.cxs;\n r1 = r6.asp();\n r1 = r1.cCg;\n r2 = \"binding.depositAmountEdit\";\n kotlin.jvm.internal.i.e(r1, r2);\n r2 = r0 instanceof com.iqoption.core.microservices.billing.response.deposit.cashboxitem.d;\n r3 = 0;\n r4 = 1;\n if (r2 == 0) goto L_0x002b;\n L_0x0013:\n r2 = r0;\n r2 = (com.iqoption.core.microservices.billing.response.deposit.cashboxitem.d) r2;\n r2 = r2.aaH();\n if (r2 == 0) goto L_0x0027;\n L_0x001c:\n r2 = r2.aaT();\n if (r2 == 0) goto L_0x0027;\n L_0x0022:\n r2 = r2.size();\n goto L_0x0028;\n L_0x0027:\n r2 = 0;\n L_0x0028:\n if (r2 != 0) goto L_0x002b;\n L_0x002a:\n goto L_0x0040;\n L_0x002b:\n if (r0 == 0) goto L_0x0032;\n L_0x002d:\n r2 = r0.ZL();\n goto L_0x0033;\n L_0x0032:\n r2 = 0;\n L_0x0033:\n r5 = com.iqoption.core.microservices.billing.response.deposit.cashboxitem.CashboxItemType.USER_CARD;\n if (r2 != r5) goto L_0x0038;\n L_0x0037:\n goto L_0x0040;\n L_0x0038:\n r2 = r6.aoJ();\n if (r2 == 0) goto L_0x003f;\n L_0x003e:\n goto L_0x0040;\n L_0x003f:\n r4 = 0;\n L_0x0040:\n r2 = \"binding.depositPresetsList\";\n if (r4 == 0) goto L_0x0053;\n L_0x0044:\n r0 = r6.asp();\n r0 = r0.cCr;\n kotlin.jvm.internal.i.e(r0, r2);\n r0 = (android.view.View) r0;\n com.iqoption.core.ext.a.ak(r0);\n goto L_0x006b;\n L_0x0053:\n r3 = r6.asp();\n r3 = r3.cCr;\n kotlin.jvm.internal.i.e(r3, r2);\n r3 = (android.view.View) r3;\n com.iqoption.core.ext.a.al(r3);\n r2 = new com.iqoption.deposit.light.perform.c$s;\n r2.<init>(r6, r0);\n r2 = (android.view.View.OnFocusChangeListener) r2;\n r1.setOnFocusChangeListener(r2);\n L_0x006b:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.iqoption.deposit.light.perform.c.asB():void\");\n }", "public static void CC2_1() {\n\t}", "public void mo21825b() {\n }", "public int c(Block parambec)\r\n/* 119: */ {\r\n/* 120:131 */ return 0;\r\n/* 121: */ }", "public void mo97906c() {\n }", "protected int b(i var1_1, y.c.q var2_2, y.c.q var3_3, h var4_4, h var5_5, int var6_6, ArrayList var7_7, ArrayList var8_8, h var9_9, h var10_10) {\n block26 : {\n block25 : {\n var24_11 = o.p;\n this.c = var6_6;\n this.d = var2_2;\n this.e = var3_3;\n this.n = var1_1.h();\n this.o = var1_1.f();\n this.h = var1_1;\n this.i = new int[this.n];\n this.j = new int[this.n];\n this.k = new int[this.o];\n this.l = new int[this.o];\n this.m = new int[this.n];\n this.b = new Object[this.o];\n this.t = new int[this.n];\n this.r = new d[this.n];\n this.s = new d[this.n];\n this.f = var4_4;\n this.a = new a[this.n];\n this.q = new ArrayList<E>(var1_1.f());\n this.p = new I(this.o);\n var11_12 = 0;\n block0 : do {\n v0 = var11_12;\n block1 : while (v0 < var7_7.size()) {\n var12_15 = (a)var7_7.get(var11_12);\n v1 /* !! */ = var12_15.b();\n if (var24_11) break block25;\n var13_17 = v1 /* !! */ ;\n while (var13_17.f()) {\n var14_20 = var13_17.a();\n var15_23 = var14_20.b();\n this.a[var14_20.b()] = var12_15;\n this.i[var15_23] = var12_15.a();\n v0 = this.i[var15_23];\n if (var24_11) continue block1;\n if (v0 < 0) {\n throw new B(\"found negative capacity\");\n }\n var13_17.g();\n if (!var24_11) continue;\n }\n ++var11_12;\n if (!var24_11) continue block0;\n }\n break block0;\n break;\n } while (true);\n v1 /* !! */ = var11_13 = this.h.p();\n }\n while (var11_13.f()) {\n var12_15 = var11_13.a();\n this.r[var12_15.b()] = (d)var10_10.b(var12_15);\n this.s[var12_15.b()] = (d)var9_9.b(var12_15);\n var11_13.g();\n if (!var24_11) {\n if (!var24_11) continue;\n }\n break block26;\n }\n this.g = new u[this.o];\n }\n var11_13 = var1_1.o();\n while (var11_13.f()) {\n var12_15 = var11_13.e();\n v2 = this;\n if (!var24_11) {\n v2.g[var12_15.d()] = new u((y.c.q)var12_15, var12_15.d());\n var11_13.g();\n if (!var24_11) continue;\n }\n ** GOTO lbl65\n }\n block5 : do {\n v2 = this;\nlbl65: // 2 sources:\n var11_14 = var13_18 = v2.a();\n var12_16 = 0;\n var14_21 = 0;\n block6 : do {\n v3 = var14_21;\n v4 = var8_8.size();\n block7 : while (v3 < v4) {\n v5 = var8_8.get(var14_21);\n do {\n var15_24 = (ArrayList)v5;\n var16_26 = false;\n var17_27 = 0;\n var18_28 = 0;\n v6 = 0;\n if (!var24_11) {\n for (var19_29 = v1574606; var19_29 < var15_24.size(); ++var19_29) {\n block28 : {\n block27 : {\n var20_30 = (a)var15_24.get(var19_29);\n v3 = this.m[var20_30.b[0].b()];\n v4 = 1;\n if (var24_11) continue block7;\n if (v3 != v4 || this.m[var20_30.b[1].b()] != 1) continue;\n ++var12_16;\n var21_31 = this.s[var20_30.b[0].b()];\n var22_32 = 0;\n while (this.m[var21_31.b()] == 1) {\n var22_32 += var4_4.a(this.a[var21_31.b()].b(var21_31));\n var21_31 = this.s[var21_31.b()];\n if (!var24_11) {\n if (!var24_11) continue;\n }\n break block27;\n }\n var22_32 += var4_4.a(this.a[var21_31.b()].b(var21_31));\n }\n var23_33 = 0;\n var21_31 = this.s[var20_30.b[1].b()];\n while (this.m[var21_31.b()] == 1) {\n var23_33 += var4_4.a(this.a[var21_31.b()].b(var21_31));\n var21_31 = this.s[var21_31.b()];\n if (!var24_11) {\n if (!var24_11) continue;\n }\n break block28;\n }\n var23_33 += var4_4.a(this.a[var21_31.b()].b(var21_31));\n }\n if (var23_33 > 400 || var22_32 > 400) {\n block29 : {\n if (var23_33 < var22_32) {\n this.a(var20_30);\n if (!var24_11) break block29;\n }\n this.b(var20_30);\n }\n var16_26 = true;\n }\n var18_28 += var23_33;\n var17_27 += var22_32;\n if (!var24_11) continue;\n }\n if (!var16_26) {\n for (var19_29 = 0; var19_29 < var15_24.size(); ++var19_29) {\n var20_30 = (a)var15_24.get(var19_29);\n v3 = this.m[var20_30.b[0].b()];\n v4 = 1;\n if (var24_11) continue block7;\n if (v3 != v4 || this.m[var20_30.b[1].b()] != 1) continue;\n if (var18_28 < var17_27) {\n this.a(var20_30);\n if (!var24_11) continue;\n }\n this.b(var20_30);\n if (!var24_11) continue;\n }\n }\n ++var14_21;\n if (!var24_11) continue block6;\n }\n ** GOTO lbl133\n v6 = var12_16;\nlbl133: // 2 sources:\n if (v6 > 0) continue block5;\n v5 = this.h.p();\n } while (var24_11);\n }\n break;\n } while (true);\n break;\n } while (true);\n var13_19 = v5;\n while (var13_19.f()) {\n var14_22 = var13_19.a();\n v7 = var14_22.b();\n if (var24_11 != false) return v7;\n var15_25 = v7;\n var5_5.a((Object)var14_22, this.m[var15_25]);\n var13_19.g();\n if (!var24_11) continue;\n }\n v7 = var11_14;\n return v7;\n }", "private static void parseSubsequences(String seq, int k, BTree myBTree) throws IOException {\n // Variables used in method\n long key;\n int counter = 0;\n int currentSequencePosition = 0;\n StringBuilder currentSubseq = new StringBuilder();\n\n // Loops while the sequence has more characters to process\n while (currentSequencePosition < seq.length()) {\n // Loops while the subsequence is not at the proper length\n while ((counter < k)) {\n // Appends the current character to the subsequence\n currentSubseq.append(seq.charAt(currentSequencePosition));\n // Increments the subsequence length counter\n counter++;\n // Increments the sequence position index\n currentSequencePosition++;\n }\n // Stores the parsed subsequence into a string;\n String parsedSubseq = currentSubseq.toString();\n // Decrements the subsequence length counter preparing for the next character\n counter--;\n\n // Unit testing print statements\n if (parseTest) {\n System.out.println(\"Parsed SubSequence: \" + parsedSubseq);\n }\n // If the subsequence contains 'n' it is not inserted into the BTree\n if (parsedSubseq.contains(\"n\")) {\n // Unit testing print statements\n if (parseTest) {\n System.out.println(\"SubSequence Contains 'n'\\n\");\n }\n // Deletes first character from subsequence to prepare for next subsequence\n currentSubseq.deleteCharAt(0);\n } else {\n // Parsed subsequence converted to key format\n key = GeneConvert.subsequenceToLong(parsedSubseq, k);\n\n // Unit testing print statements\n if (parseTest) {\n // Print out current key value\n System.out.println(\"Parsed Key: \" + key);\n // Print out conversion to check back to String\n String revert = GeneConvert.longToSubsequence(key, k);\n System.out.println(\"Reverted Key (String): \" + revert);\n System.out.println();\n }\n // Insert subsequence key into tree if not testing\n if (!parseTest) {\n myBTree.insert(myBTree.getRoot().fileOffset, key);\n }\n // Deletes first character from subsequence to prepare for next subsequence\n currentSubseq.deleteCharAt(0);\n }\n }\n // Unit testing print statements\n if (parseTest) {\n // Prints number of completed parses (current ORIGIN // DNA sequence)\n System.out.println(\"*** Completed Parse: \" + parseNum + \" ***\");\n parseNum++;\n }\n }", "private void m91737K() {\n String str = this.f73944a;\n boolean z = true;\n if (this.f73953m != 1) {\n z = false;\n }\n C28141am.m92411a(new C28311ag(str, z), new C28312ah(this.f73949f.hashCode()), this.f73944a);\n }", "public CCA2KPABE(){\n\t\tthis.pairing = PairingFactory.getPairing(ParameterGenerator.PATH_TYPE_A_PARAMETER); \n\t}", "public void mo5097b() {\n }", "public aql k()\r\n/* 114: */ {\r\n/* 115:126 */ return aql.b;\r\n/* 116: */ }", "C2841w mo7234g();", "void mo57278c();", "void a(bu var1_1, f var2_2, Map var3_3, double var4_4, double var6_5) {\n block6 : {\n var14_6 = fj.z;\n var8_7 = M.b();\n var9_8 = var2_2.a();\n while (var9_8.f()) {\n var10_9 = var9_8.a();\n if (var14_6) break block6;\n if (!var10_9.e() || var1_1.i((y.c.d)var10_9).bendCount() > 1) ** GOTO lbl-1000\n var11_10 = var1_1.i((y.c.d)var10_9);\n var12_11 = var11_10.getSourceRealizer();\n if (var1_1.i((y.c.d)var10_9).bendCount() == 0) {\n var11_10.appendBend(var11_10.getSourcePort().a(var12_11), var11_10.getSourcePort().b(var12_11) - 20.0 - var12_11.getHeight());\n }\n this.a(var1_1, var4_4, var6_5, (y.c.d)var10_9, true, false, false, var10_9.c());\n if (var14_6) lbl-1000: // 2 sources:\n {\n var8_7.a(var10_9, true);\n var8_7.a((Object)var3_3.get(var10_9), true);\n }\n var9_8.g();\n if (!var14_6) continue;\n }\n var1_1.a(as.a, var8_7);\n }\n var9_8 = new as();\n var9_8.a(5.0);\n var9_8.b(false);\n var9_8.a(true);\n try {\n var10_9 = new bI(1);\n var10_9.a(false);\n var10_9.b(true);\n var10_9.d().a(true);\n var10_9.a(var1_1, (ah)var9_8);\n return;\n }\n finally {\n var1_1.d_(as.a);\n }\n }", "private final void asx() {\n /*\n r12 = this;\n r0 = r12.cFE;\n if (r0 == 0) goto L_0x0073;\n L_0x0004:\n r1 = r12.cxs;\n if (r1 == 0) goto L_0x0073;\n L_0x0008:\n r1 = r12.ayL;\n if (r1 != 0) goto L_0x000d;\n L_0x000c:\n goto L_0x0073;\n L_0x000d:\n r2 = 0;\n if (r1 == 0) goto L_0x0027;\n L_0x0010:\n r1 = r1.Km();\n if (r1 == 0) goto L_0x0027;\n L_0x0016:\n r1 = r1.aar();\n if (r1 == 0) goto L_0x0027;\n L_0x001c:\n r3 = r0.getName();\n r1 = r1.get(r3);\n r1 = (java.util.ArrayList) r1;\n goto L_0x0028;\n L_0x0027:\n r1 = r2;\n L_0x0028:\n if (r1 == 0) goto L_0x0051;\n L_0x002a:\n r1 = (java.lang.Iterable) r1;\n r1 = kotlin.collections.u.Z(r1);\n if (r1 == 0) goto L_0x0051;\n L_0x0032:\n r3 = new com.iqoption.deposit.light.perform.DepositPerformLightFragment$setPresets$items$1;\n r3.<init>(r12);\n r3 = (kotlin.jvm.a.b) r3;\n r1 = kotlin.sequences.n.b(r1, r3);\n if (r1 == 0) goto L_0x0051;\n L_0x003f:\n r3 = new com.iqoption.deposit.light.perform.DepositPerformLightFragment$setPresets$items$2;\n r3.<init>(r0);\n r3 = (kotlin.jvm.a.b) r3;\n r1 = kotlin.sequences.n.f(r1, r3);\n if (r1 == 0) goto L_0x0051;\n L_0x004c:\n r1 = kotlin.sequences.n.f(r1);\n goto L_0x0052;\n L_0x0051:\n r1 = r2;\n L_0x0052:\n r3 = r12.asr();\n if (r1 == 0) goto L_0x0059;\n L_0x0058:\n goto L_0x005d;\n L_0x0059:\n r1 = kotlin.collections.m.emptyList();\n L_0x005d:\n r4 = r12.bub;\n if (r4 == 0) goto L_0x006d;\n L_0x0061:\n r5 = 0;\n r6 = 0;\n r7 = 1;\n r8 = 0;\n r9 = 0;\n r10 = 19;\n r11 = 0;\n r2 = com.iqoption.core.util.e.a(r4, r5, r6, r7, r8, r9, r10, r11);\n L_0x006d:\n r3.c(r1, r2);\n r12.d(r0);\n L_0x0073:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.iqoption.deposit.light.perform.c.asx():void\");\n }", "private final void step1()\n\t { if (b[k] == 's')\n\t { if (ends(\"sses\")) k -= 2; else\n\t if (ends(\"ies\")) setto(\"i\"); else\n\t if (b[k-1] != 's') k--;\n\t }\n\t if (ends(\"eed\")) { if (m() > 0) k--; } else\n\t if ((ends(\"ed\") || ends(\"ing\")) && vowelinstem())\n\t { k = j;\n\t if (ends(\"at\")) setto(\"ate\"); else\n\t if (ends(\"bl\")) setto(\"ble\"); else\n\t if (ends(\"iz\")) setto(\"ize\"); else\n\t if (doublec(k))\n\t { k--;\n\t { int ch = b[k];\n\t if (ch == 'l' || ch == 's' || ch == 'z') k++;\n\t }\n\t }\n\t else if (m() == 1 && cvc(k)) setto(\"e\");\n\t }\n\t }", "public void baocun() {\n\t\t\n\t}", "public cvt(cwk paramcwk)\r\n/* 24: */ {\r\n/* 25: 29 */ this.f = paramcwk;\r\n/* 26: */ }", "C1458cs mo7613iS();", "@Override\n\tpublic void bbb() {\n\t\t\n\t}", "C3676k mo12649b();", "public void mo21782G() {\n }", "@Override\n public void func_104112_b() {\n \n }", "public void a(cvk paramcvk)\r\n/* 76: */ {\r\n/* 77: 95 */ c();\r\n/* 78: */ }", "protected abstract long mo1602b(C2175k c2175k);", "private void bщ04490449щ0449щ(rrrrrr.rcccrr r6) {\n /*\n r5 = this;\n r4 = 0;\n r0 = r6.getJsonData();\t Catch:{ Exception -> 0x0056 }\n r1 = new rrrrrr.ccrcrc;\t Catch:{ Exception -> 0x0056 }\n r2 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x0056 }\n r2.<init>();\t Catch:{ Exception -> 0x0056 }\n r3 = r5.bнн043Dннн;\t Catch:{ Exception -> 0x0056 }\n r3 = com.immersion.aws.analytics.ImmrAnalytics.b044C044C044C044Cьь(r3);\t Catch:{ Exception -> 0x0056 }\n r3 = r3.getFilesDir();\t Catch:{ Exception -> 0x0056 }\n r2 = r2.append(r3);\t Catch:{ Exception -> 0x0056 }\n r3 = java.io.File.separator;\t Catch:{ Exception -> 0x0056 }\n r2 = r2.append(r3);\t Catch:{ Exception -> 0x0056 }\n r3 = \"3HC4C-01.txt\";\n r2 = r2.append(r3);\t Catch:{ Exception -> 0x0056 }\n r2 = r2.toString();\t Catch:{ Exception -> 0x0056 }\n r1.<init>(r2);\t Catch:{ Exception -> 0x0056 }\n r2 = bЗ04170417ЗЗЗ;\n r3 = bЗЗЗ0417ЗЗ;\n r3 = r3 + r2;\n r2 = r2 * r3;\n r3 = b04170417З0417ЗЗ;\n r2 = r2 % r3;\n switch(r2) {\n case 0: goto L_0x0041;\n default: goto L_0x0039;\n };\n L_0x0039:\n r2 = 38;\n bЗ04170417ЗЗЗ = r2;\n r2 = 29;\n b041704170417ЗЗЗ = r2;\n L_0x0041:\n r1.load();\t Catch:{ Exception -> 0x0056 }\n L_0x0044:\n switch(r4) {\n case 0: goto L_0x004b;\n case 1: goto L_0x0044;\n default: goto L_0x0047;\n };\t Catch:{ Exception -> 0x0056 }\n L_0x0047:\n switch(r4) {\n case 0: goto L_0x004b;\n case 1: goto L_0x0044;\n default: goto L_0x004a;\n };\t Catch:{ Exception -> 0x0056 }\n L_0x004a:\n goto L_0x0047;\n L_0x004b:\n r0 = r0.toString();\t Catch:{ Exception -> 0x0056 }\n r1.push(r0);\t Catch:{ Exception -> 0x0056 }\n r1.save();\t Catch:{ Exception -> 0x0056 }\n L_0x0055:\n return;\n L_0x0056:\n r0 = move-exception;\n goto L_0x0055;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: rrrrrr.cccccr.bщ04490449щ0449щ(rrrrrr.rcccrr):void\");\n }", "public int h(Block parambec)\r\n/* 29: */ {\r\n/* 30: 44 */ return F();\r\n/* 31: */ }", "void mo41086b();", "void mo88524c();", "public void mo5099c() {\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: */ }", "public void mo21794S() {\n }", "public void mo38117a() {\n }", "private HSBC() {\n\t\t\n\t\t\n\t}", "private final void zzR(Object var1_1, zzha var2_2) {\n block94: {\n var3_3 = this;\n var4_4 = var1_1;\n var5_5 = var2_2;\n var6_6 = this.zzh;\n if (var6_6 != 0) break block94;\n var7_7 = this.zzc;\n var6_6 = ((int[])var7_7).length;\n var8_8 = zzja.zzb;\n var9_9 = 1048575;\n var10_10 = 1.469367E-39f;\n var11_11 = var9_9;\n var13_13 = 0;\n for (var12_12 = 0; var12_12 < var6_6; var12_12 += 3) {\n block95: {\n var14_14 = var3_3.zzA(var12_12);\n var15_15 = var3_3.zzc;\n var16_16 = var15_15[var12_12];\n var17_17 = zzja.zzC(var14_14);\n var18_18 = 17;\n var19_19 = 1;\n if (var17_17 <= var18_18) {\n var20_20 = var3_3.zzc;\n var21_21 = var12_12 + 2;\n var18_18 = var20_20[var21_21];\n if ((var21_21 = var18_18 & var9_9) != var11_11) {\n var22_22 = var21_21;\n var13_13 = var8_8.getInt(var4_4, var22_22);\n var11_11 = var21_21;\n }\n var18_18 >>>= 20;\n var18_18 = var19_19 << var18_18;\n } else {\n var18_18 = 0;\n var20_20 = null;\n }\n var24_23 = var14_14 &= var9_9;\n switch (var17_17) lbl-1000:\n // 56 sources\n\n {\n default: {\n var17_17 = 0;\n break block95;\n }\n case 68: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var26_24 = var8_8.getObject(var4_4, var24_23);\n var27_25 = var3_3.zzv(var12_12);\n var5_5.zzs(var16_16, var26_24, var27_25);\n ** GOTO lbl-1000\n }\n case 67: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var24_23 = zzja.zzG(var4_4, var24_23);\n var5_5.zzq(var16_16, var24_23);\n ** GOTO lbl-1000\n }\n case 66: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var9_9 = zzja.zzF(var4_4, var24_23);\n var5_5.zzp(var16_16, var9_9);\n ** GOTO lbl-1000\n }\n case 65: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var24_23 = zzja.zzG(var4_4, var24_23);\n var5_5.zzd(var16_16, var24_23);\n ** GOTO lbl-1000\n }\n case 64: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var9_9 = zzja.zzF(var4_4, var24_23);\n var5_5.zzb(var16_16, var9_9);\n ** GOTO lbl-1000\n }\n case 63: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var9_9 = zzja.zzF(var4_4, var24_23);\n var5_5.zzg(var16_16, var9_9);\n ** GOTO lbl-1000\n }\n case 62: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var9_9 = zzja.zzF(var4_4, var24_23);\n var5_5.zzo(var16_16, var9_9);\n ** GOTO lbl-1000\n }\n case 61: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var26_24 = (zzgs)var8_8.getObject(var4_4, var24_23);\n var5_5.zzn(var16_16, (zzgs)var26_24);\n ** GOTO lbl-1000\n }\n case 60: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var26_24 = var8_8.getObject(var4_4, var24_23);\n var27_25 = var3_3.zzv(var12_12);\n var5_5.zzr(var16_16, var26_24, var27_25);\n ** GOTO lbl-1000\n }\n case 59: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var26_24 = var8_8.getObject(var4_4, var24_23);\n zzja.zzT(var16_16, var26_24, var5_5);\n ** GOTO lbl-1000\n }\n case 58: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var9_9 = (int)zzja.zzH(var4_4, var24_23);\n var5_5.zzl(var16_16, (boolean)var9_9);\n ** GOTO lbl-1000\n }\n case 57: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var9_9 = zzja.zzF(var4_4, var24_23);\n var5_5.zzk(var16_16, var9_9);\n ** GOTO lbl-1000\n }\n case 56: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var24_23 = zzja.zzG(var4_4, var24_23);\n var5_5.zzj(var16_16, var24_23);\n ** GOTO lbl-1000\n }\n case 55: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var9_9 = zzja.zzF(var4_4, var24_23);\n var5_5.zzi(var16_16, var9_9);\n ** GOTO lbl-1000\n }\n case 54: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var24_23 = zzja.zzG(var4_4, var24_23);\n var5_5.zzh(var16_16, var24_23);\n ** GOTO lbl-1000\n }\n case 53: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var24_23 = zzja.zzG(var4_4, var24_23);\n var5_5.zzc(var16_16, var24_23);\n ** GOTO lbl-1000\n }\n case 52: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var10_10 = zzja.zzE(var4_4, var24_23);\n var5_5.zze(var16_16, var10_10);\n ** GOTO lbl-1000\n }\n case 51: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var28_26 = zzja.zzD(var4_4, var24_23);\n var5_5.zzf(var16_16, var28_26);\n ** GOTO lbl-1000\n }\n case 50: {\n var26_24 = var8_8.getObject(var4_4, var24_23);\n var3_3.zzS(var5_5, var16_16, var26_24, var12_12);\n ** GOTO lbl-1000\n }\n case 49: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n var27_25 = var3_3.zzv(var12_12);\n zzjk.zzaa(var14_14, (List)var26_24, var5_5, var27_25);\n ** GOTO lbl-1000\n }\n case 48: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzN(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 47: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzS(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 46: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzP(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 45: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzU(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 44: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzV(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 43: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzR(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 42: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzW(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 41: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzT(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 40: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzO(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 39: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzQ(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 38: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzM(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 37: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzL(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 36: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzK(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 35: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzJ(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 34: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n var16_16 = 0;\n var15_15 = null;\n zzjk.zzN(var14_14, (List)var26_24, var5_5, false);\n ** GOTO lbl290\n }\n case 33: {\n var16_16 = 0;\n var15_15 = null;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzS(var14_14, (List)var26_24, var5_5, false);\n ** GOTO lbl290\n }\n case 32: {\n var16_16 = 0;\n var15_15 = null;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzP(var14_14, (List)var26_24, var5_5, false);\n ** GOTO lbl290\n }\n case 31: {\n var16_16 = 0;\n var15_15 = null;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzU(var14_14, (List)var26_24, var5_5, false);\n ** GOTO lbl290\n }\n case 30: {\n var16_16 = 0;\n var15_15 = null;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzV(var14_14, (List)var26_24, var5_5, false);\n ** GOTO lbl290\n }\n case 29: {\n var16_16 = 0;\n var15_15 = null;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzR(var14_14, (List)var26_24, var5_5, false);\nlbl290:\n // 6 sources\n\n var17_17 = 0;\n break block95;\n }\n case 28: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzY(var14_14, (List)var26_24, var5_5);\n ** GOTO lbl-1000\n }\n case 27: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n var27_25 = var3_3.zzv(var12_12);\n zzjk.zzZ(var14_14, (List)var26_24, var5_5, var27_25);\n ** GOTO lbl-1000\n }\n case 26: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzX(var14_14, (List)var26_24, var5_5);\n ** GOTO lbl-1000\n }\n case 25: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n var17_17 = 0;\n zzjk.zzW(var14_14, (List)var26_24, var5_5, false);\n break block95;\n }\n case 24: {\n var17_17 = 0;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzT(var14_14, (List)var26_24, var5_5, false);\n break block95;\n }\n case 23: {\n var17_17 = 0;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzO(var14_14, (List)var26_24, var5_5, false);\n break block95;\n }\n case 22: {\n var17_17 = 0;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzQ(var14_14, (List)var26_24, var5_5, false);\n break block95;\n }\n case 21: {\n var17_17 = 0;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzM(var14_14, (List)var26_24, var5_5, false);\n break block95;\n }\n case 20: {\n var17_17 = 0;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzL(var14_14, (List)var26_24, var5_5, false);\n break block95;\n }\n case 19: {\n var17_17 = 0;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzK(var14_14, (List)var26_24, var5_5, false);\n break block95;\n }\n case 18: {\n var17_17 = 0;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzJ(var14_14, (List)var26_24, var5_5, false);\n break block95;\n }\n case 17: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var26_24 = var8_8.getObject(var4_4, var24_23);\n var27_25 = var3_3.zzv(var12_12);\n var5_5.zzs(var16_16, var26_24, var27_25);\n }\n break block95;\n }\n case 16: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var24_23 = var8_8.getLong(var4_4, var24_23);\n var5_5.zzq(var16_16, var24_23);\n }\n break block95;\n }\n case 15: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var9_9 = var8_8.getInt(var4_4, var24_23);\n var5_5.zzp(var16_16, var9_9);\n }\n break block95;\n }\n case 14: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var24_23 = var8_8.getLong(var4_4, var24_23);\n var5_5.zzd(var16_16, var24_23);\n }\n break block95;\n }\n case 13: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var9_9 = var8_8.getInt(var4_4, var24_23);\n var5_5.zzb(var16_16, var9_9);\n }\n break block95;\n }\n case 12: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var9_9 = var8_8.getInt(var4_4, var24_23);\n var5_5.zzg(var16_16, var9_9);\n }\n break block95;\n }\n case 11: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var9_9 = var8_8.getInt(var4_4, var24_23);\n var5_5.zzo(var16_16, var9_9);\n }\n break block95;\n }\n case 10: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var26_24 = (zzgs)var8_8.getObject(var4_4, var24_23);\n var5_5.zzn(var16_16, (zzgs)var26_24);\n }\n break block95;\n }\n case 9: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var26_24 = var8_8.getObject(var4_4, var24_23);\n var27_25 = var3_3.zzv(var12_12);\n var5_5.zzr(var16_16, var26_24, var27_25);\n }\n break block95;\n }\n case 8: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var26_24 = var8_8.getObject(var4_4, var24_23);\n zzja.zzT(var16_16, var26_24, var5_5);\n }\n break block95;\n }\n case 7: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var9_9 = (int)zzkh.zzh(var4_4, var24_23);\n var5_5.zzl(var16_16, (boolean)var9_9);\n }\n break block95;\n }\n case 6: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var9_9 = var8_8.getInt(var4_4, var24_23);\n var5_5.zzk(var16_16, var9_9);\n }\n break block95;\n }\n case 5: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var24_23 = var8_8.getLong(var4_4, var24_23);\n var5_5.zzj(var16_16, var24_23);\n }\n break block95;\n }\n case 4: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var9_9 = var8_8.getInt(var4_4, var24_23);\n var5_5.zzi(var16_16, var9_9);\n }\n break block95;\n }\n case 3: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var24_23 = var8_8.getLong(var4_4, var24_23);\n var5_5.zzh(var16_16, var24_23);\n }\n break block95;\n }\n case 2: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var24_23 = var8_8.getLong(var4_4, var24_23);\n var5_5.zzc(var16_16, var24_23);\n }\n break block95;\n }\n case 1: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var10_10 = zzkh.zzj(var4_4, var24_23);\n var5_5.zze(var16_16, var10_10);\n }\n break block95;\n }\n case 0: \n }\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var28_26 = zzkh.zzl(var4_4, var24_23);\n var5_5.zzf(var16_16, var28_26);\n }\n }\n var9_9 = 1048575;\n var10_10 = 1.469367E-39f;\n }\n var7_7 = var3_3.zzn;\n var4_4 = var7_7.zzd(var4_4);\n var7_7.zzi(var4_4, var5_5);\n return;\n }\n this.zzo.zzb(var1_1);\n throw null;\n }", "private final void step5()\n\t { if (k == 0) return; /* for Bug 1 */ switch (b[k-1])\n\t { case 'a': if (ends(\"al\")) break; return;\n\t case 'c': if (ends(\"ance\")) break;\n\t if (ends(\"ence\")) break; return;\n\t case 'e': if (ends(\"er\")) break; return;\n\t case 'i': if (ends(\"ic\")) break; return;\n\t case 'l': if (ends(\"able\")) break;\n\t if (ends(\"ible\")) break; return;\n\t case 'n': if (ends(\"ant\")) break;\n\t if (ends(\"ement\")) break;\n\t if (ends(\"ment\")) break;\n\t /* element etc. not stripped before the m */\n\t if (ends(\"ent\")) break; return;\n\t case 'o': if (ends(\"ion\") && j >= 0 && (b[j] == 's' || b[j] == 't')) break;\n\t /* j >= 0 fixes Bug 2 */\n\t if (ends(\"ou\")) break; return;\n\t /* takes care of -ous */\n\t case 's': if (ends(\"ism\")) break; return;\n\t case 't': if (ends(\"ate\")) break;\n\t if (ends(\"iti\")) break; return;\n\t case 'u': if (ends(\"ous\")) break; return;\n\t case 'v': if (ends(\"ive\")) break; return;\n\t case 'z': if (ends(\"ize\")) break; return;\n\t default: return;\n\t }\n\t if (m() > 1) k = j;\n\t }", "void mo12638c();", "public String getJP_BankName_Kana_Line();", "public void mo23813b() {\n }", "public void k()\r\n/* 238: */ {\r\n/* 239:258 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 240:259 */ if (this.a[i] != null) {\r\n/* 241:260 */ this.a[i].a(this.d.o, this.d, i, this.c == i);\r\n/* 242: */ }\r\n/* 243: */ }\r\n/* 244: */ }", "public void parseSubs(){\n\t\t\n\t\t\n\t}", "void kiemTraThangHopLi() {\n }", "public OBOParser(OBOParserTokenManager tm) {\n token_source = tm;\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 6; i++) {\n jj_la1[i] = -1;\n }\n }", "void mo57277b();", "public final void mo1285b() {\n }", "private void scan() {\n if (classRefs != null)\n return;\n // Store ids rather than names to avoid multiple name building.\n Set classIDs = new HashSet();\n Set methodIDs = new HashSet();\n\n codePaths = 1; // there has to be at least one...\n\n offset = 0;\n int max = codeBytes.length;\n\twhile (offset < max) {\n\t int bcode = at(0);\n\t if (bcode == bc_wide) {\n\t\tbcode = at(1);\n\t\tint arg = shortAt(2);\n\t\tswitch (bcode) {\n\t\t case bc_aload: case bc_astore:\n\t\t case bc_fload: case bc_fstore:\n\t\t case bc_iload: case bc_istore:\n\t\t case bc_lload: case bc_lstore:\n\t\t case bc_dload: case bc_dstore:\n\t\t case bc_ret:\n\t\t\toffset += 4;\n\t\t\tbreak;\n\n\t\t case bc_iinc:\n\t\t\toffset += 6;\n\t\t\tbreak;\n\t\t default:\n\t\t\toffset++;\n\t\t\tbreak;\n\t\t}\n\t } else {\n\t\tswitch (bcode) {\n // These bcodes have CONSTANT_Class arguments\n case bc_instanceof: \n case bc_checkcast: case bc_new:\n {\n\t\t\tint index = shortAt(1);\n classIDs.add(new Integer(index));\n\t\t\toffset += 3;\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_putstatic: case bc_getstatic:\n case bc_putfield: case bc_getfield: {\n\t\t\tint index = shortAt(1);\n CPFieldInfo fi = (CPFieldInfo)cpool.get(index);\n classIDs.add(new Integer(fi.getClassID()));\n\t\t\toffset += 3;\n\t\t\tbreak;\n }\n\n // These bcodes have CONSTANT_MethodRef_info arguments\n\t\t case bc_invokevirtual: case bc_invokespecial:\n case bc_invokestatic:\n methodIDs.add(new Integer(shortAt(1)));\n messageSends++;\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n\t\t case bc_jsr_w:\n\t\t case bc_invokeinterface:\n methodIDs.add(new Integer(shortAt(1)));\n messageSends++;\n\t\t\toffset += 5;\n\t\t\tbreak;\n\n // Branch instructions\n\t\t case bc_ifeq: case bc_ifge: case bc_ifgt:\n\t\t case bc_ifle: case bc_iflt: case bc_ifne:\n\t\t case bc_if_icmpeq: case bc_if_icmpne: case bc_if_icmpge:\n\t\t case bc_if_icmpgt: case bc_if_icmple: case bc_if_icmplt:\n\t\t case bc_if_acmpeq: case bc_if_acmpne:\n\t\t case bc_ifnull: case bc_ifnonnull:\n\t\t case bc_jsr:\n codePaths++;\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n case bc_lcmp: case bc_fcmpl: case bc_fcmpg:\n case bc_dcmpl: case bc_dcmpg:\n codePaths++;\n\t\t\toffset++;\n break;\n\n\t\t case bc_tableswitch:{\n\t\t\tint tbl = (offset+1+3) & (~3);\t// four byte boundry\n\t\t\tlong low = intAt(tbl, 1);\n\t\t\tlong high = intAt(tbl, 2);\n\t\t\ttbl += 3 << 2; \t\t\t// three int header\n\n // Find number of unique table addresses.\n // The default path is skipped so we find the\n // number of alternative paths here.\n Set set = new HashSet();\n int length = (int)(high - low + 1);\n for (int i = 0; i < length; i++) {\n int jumpAddr = (int)intAt (tbl, i) + offset;\n set.add(new Integer(jumpAddr));\n }\n codePaths += set.size();\n\n\t\t\toffset = tbl + (int)((high - low + 1) << 2);\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_lookupswitch:{\n\t\t\tint tbl = (offset+1+3) & (~3);\t// four byte boundry\n\t\t\tint npairs = (int)intAt(tbl, 1);\n\t\t\tint nints = npairs * 2;\n\t\t\ttbl += 2 << 2; \t\t\t// two int header\n\n // Find number of unique table addresses\n Set set = new HashSet();\n for (int i = 0; i < nints; i += 2) {\n // use the address half of each pair\n int jumpAddr = (int)intAt (tbl, i + 1) + offset;\n set.add(new Integer(jumpAddr));\n }\n codePaths += set.size();\n \n\t\t\toffset = tbl + (nints << 2);\n\t\t\tbreak;\n\t\t }\n\n // Ignore other bcodes.\n\t\t case bc_anewarray: \n offset += 3;\n break;\n\n\t\t case bc_multianewarray: {\n\t\t\toffset += 4;\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_aload: case bc_astore:\n\t\t case bc_fload: case bc_fstore:\n\t\t case bc_iload: case bc_istore:\n\t\t case bc_lload: case bc_lstore:\n\t\t case bc_dload: case bc_dstore:\n\t\t case bc_ret: case bc_newarray:\n\t\t case bc_bipush: case bc_ldc:\n\t\t\toffset += 2;\n\t\t\tbreak;\n\t\t \n\t\t case bc_iinc: case bc_sipush:\n\t\t case bc_ldc_w: case bc_ldc2_w:\n\t\t case bc_goto:\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n\t\t case bc_goto_w:\n\t\t\toffset += 5;\n\t\t\tbreak;\n\n\t\t default:\n\t\t\toffset++;\n\t\t\tbreak;\n\t\t}\n\t }\n\t}\n classRefs = expandClassNames(classIDs);\n methodRefs = expandMethodNames(methodIDs);\n }", "private SBomCombiner()\n\t{}", "dkj mo4367a(dkk dkk);", "public static void c0() {\n\t}", "public void mo21791P() {\n }", "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}", "public void mo9137b() {\n }", "public void mo21880v() {\n }", "public static void listing5_14() {\n }", "public void mo21785J() {\n }", "public void mo21789N() {\n }", "void mo80457c();", "private void parseData() {\n\t\t\r\n\t}", "public void mo21793R() {\n }", "private static void m13720a(C2302k c2302k, C2302k c2302k2, String str, C2102i c2102i) throws ParserException {\n c2302k.m8388c(8);\n int o = c2302k.m8403o();\n if (c2302k.m8403o() == f11072b) {\n if (C2087a.m7470a(o) == 1) {\n c2302k.m8390d(4);\n }\n if (c2302k.m8403o() != 1) {\n throw new ParserException(\"Entry count in sbgp != 1 (unsupported).\");\n }\n c2302k2.m8388c(8);\n c2302k = c2302k2.m8403o();\n if (c2302k2.m8403o() == f11072b) {\n c2302k = C2087a.m7470a(c2302k);\n if (c2302k == 1) {\n if (c2302k2.m8401m() == 0) {\n throw new ParserException(\"Variable length description in sgpd found (unsupported)\");\n }\n } else if (c2302k >= 2) {\n c2302k2.m8390d(4);\n }\n if (c2302k2.m8401m() != 1) {\n throw new ParserException(\"Entry count in sgpd != 1 (unsupported).\");\n }\n c2302k2.m8390d(1);\n c2302k = c2302k2.m8395g();\n int i = (c2302k & 240) >> 4;\n int i2 = c2302k & 15;\n boolean z = c2302k2.m8395g() == 1;\n if (z) {\n byte[] bArr;\n int g = c2302k2.m8395g();\n byte[] bArr2 = new byte[16];\n c2302k2.m8384a(bArr2, 0, bArr2.length);\n if (z && g == 0) {\n c2302k = c2302k2.m8395g();\n byte[] bArr3 = new byte[c2302k];\n c2302k2.m8384a(bArr3, 0, c2302k);\n bArr = bArr3;\n } else {\n bArr = null;\n }\n c2102i.f5950m = true;\n c2102i.f5952o = new C2101h(z, str, g, bArr2, i, i2, bArr);\n }\n }\n }\n }", "void mo5018b();", "public void m7211c() {\n /*\n r34 = this;\n r16 = 0;\n r15 = 0;\n r5 = 0;\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"MINOR_TYPE\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r3 = -1;\n r4 = r2.hashCode();\n switch(r4) {\n case -1172269795: goto L_0x002e;\n case 2157948: goto L_0x0038;\n case 2571565: goto L_0x0024;\n default: goto L_0x0018;\n };\n L_0x0018:\n r2 = r3;\n L_0x0019:\n switch(r2) {\n case 0: goto L_0x0042;\n case 1: goto L_0x0162;\n case 2: goto L_0x01a9;\n default: goto L_0x001c;\n };\n L_0x001c:\n r2 = \"Undefined type\";\n r0 = r34;\n mobi.mmdt.componentsutils.p079a.p080a.C1104b.m6366b(r0, r2);\n L_0x0023:\n return;\n L_0x0024:\n r4 = \"TEXT\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x0018;\n L_0x002c:\n r2 = 0;\n goto L_0x0019;\n L_0x002e:\n r4 = \"STICKER\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x0018;\n L_0x0036:\n r2 = 1;\n goto L_0x0019;\n L_0x0038:\n r4 = \"FILE\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x0018;\n L_0x0040:\n r2 = 2;\n goto L_0x0019;\n L_0x0042:\n r4 = mobi.mmdt.ott.provider.p169c.C1594n.TEXT;\n r33 = r5;\n L_0x0046:\n r8 = mobi.mmdt.componentsutils.p079a.p084e.C1113a.m6421a();\n r10 = mobi.mmdt.ott.provider.p169c.C1592l.IN;\n r0 = r34;\n r2 = r0.f4758b;\n r0 = r34;\n r3 = r0.f4757a;\n r3 = mobi.mmdt.ott.p109d.p111b.C1309a.m6934a(r3);\n r3 = r3.m6942b();\n r2 = r2.equals(r3);\n if (r2 == 0) goto L_0x0064;\n L_0x0062:\n r10 = mobi.mmdt.ott.provider.p169c.C1592l.OUT;\n L_0x0064:\n r0 = r34;\n r2 = r0.f4757a;\n r0 = r34;\n r3 = r0.f4761e;\n r2 = mobi.mmdt.ott.provider.p169c.C1583c.m7972a(r2, r3, r10);\n if (r2 != 0) goto L_0x0023;\n L_0x0072:\n r2 = mobi.mmdt.ott.MyApplication.m6445a();\n r2 = r2.f4177h;\n if (r2 == 0) goto L_0x008a;\n L_0x007a:\n r2 = mobi.mmdt.ott.MyApplication.m6445a();\n r2 = r2.f4177h;\n r0 = r34;\n r3 = r0.f4759c;\n r2 = r2.equals(r3);\n if (r2 != 0) goto L_0x024e;\n L_0x008a:\n r17 = 0;\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n if (r2 == 0) goto L_0x00b8;\n L_0x0098:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r2 = r2.isEmpty();\n if (r2 != 0) goto L_0x00b8;\n L_0x00aa:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r17 = r2;\n L_0x00b8:\n r2 = new mobi.mmdt.ott.d.a.b;\n r0 = r34;\n r3 = r0.f4761e;\n r0 = r34;\n r5 = r0.f4760d;\n r0 = r34;\n r6 = r0.f4762f;\n r7 = \"SEND_TIME_IN_GMT\";\n r6 = r6.get(r7);\n r6 = (java.lang.String) r6;\n r6 = java.lang.Long.parseLong(r6);\n r11 = mobi.mmdt.ott.provider.p169c.C1593m.NOT_READ;\n r0 = r34;\n r12 = r0.f4759c;\n r13 = mobi.mmdt.ott.provider.p169c.C1595o.GROUP;\n r0 = r34;\n r14 = r0.f4758b;\n r2.<init>(r3, r4, r5, r6, r8, r10, r11, r12, r13, r14, r15, r16, r17);\n r0 = r34;\n r3 = r0.f4757a;\n r3 = mobi.mmdt.ott.logic.p157e.C1509a.m7621a(r3);\n r0 = r34;\n r4 = r0.f4762f;\n r0 = r33;\n r3.m7626a(r2, r0, r4);\n L_0x00f2:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n if (r2 == 0) goto L_0x013c;\n L_0x00fe:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r2 = r2.isEmpty();\n if (r2 != 0) goto L_0x013c;\n L_0x0110:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r0 = r34;\n r3 = r0.f4757a;\n r0 = r34;\n r4 = r0.f4761e;\n mobi.mmdt.ott.provider.p169c.C1583c.m7976b(r3, r4, r2);\n r0 = r34;\n r3 = r0.f4757a;\n r2 = mobi.mmdt.ott.provider.p169c.C1583c.m8003n(r3, r2);\n r0 = r34;\n r3 = r0.f4757a;\n r0 = r34;\n r4 = r0.f4761e;\n r5 = mobi.mmdt.ott.provider.p169c.C1595o.SINGLE;\n mobi.mmdt.ott.logic.p112a.p120c.p121a.p123b.C1387u.m7218a(r3, r4, r2, r5);\n L_0x013c:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"MINOR_TYPE\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r3 = \"TEXT\";\n r2 = r2.equals(r3);\n if (r2 != 0) goto L_0x0023;\n L_0x0150:\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.b;\n r0 = r34;\n r3 = r0.f4757a;\n r0 = r34;\n r4 = r0.f4762f;\n r2.<init>(r3, r15, r4);\n mobi.mmdt.ott.logic.C1494c.m7541c(r2);\n goto L_0x0023;\n L_0x0162:\n r6 = mobi.mmdt.ott.provider.p169c.C1594n.STICKER;\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"STICKER_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r0 = r34;\n r3 = r0.f4762f;\n r4 = \"STICKER_PACKAGE_ID\";\n r3 = r3.get(r4);\n r3 = (java.lang.String) r3;\n r0 = r34;\n r4 = r0.f4762f;\n r7 = \"STICKER_VERSION\";\n r4 = r4.get(r7);\n r4 = (java.lang.String) r4;\n if (r4 == 0) goto L_0x02c9;\n L_0x018a:\n if (r2 == 0) goto L_0x02c9;\n L_0x018c:\n if (r3 == 0) goto L_0x02c9;\n L_0x018e:\n r7 = r4.isEmpty();\n if (r7 != 0) goto L_0x02c9;\n L_0x0194:\n r7 = r2.isEmpty();\n if (r7 != 0) goto L_0x02c9;\n L_0x019a:\n r7 = r3.isEmpty();\n if (r7 != 0) goto L_0x02c9;\n L_0x01a0:\n r16 = mobi.mmdt.ott.provider.p174h.C1629b.m8295a(r4, r3, r2);\n r33 = r5;\n r4 = r6;\n goto L_0x0046;\n L_0x01a9:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"FILE_TYPE\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r3 = -1;\n r4 = r2.hashCode();\n switch(r4) {\n case 327328941: goto L_0x01de;\n case 796404377: goto L_0x01ca;\n case 802160718: goto L_0x01e8;\n case 808293817: goto L_0x01d4;\n default: goto L_0x01bd;\n };\n L_0x01bd:\n r2 = r3;\n L_0x01be:\n switch(r2) {\n case 0: goto L_0x01f2;\n case 1: goto L_0x020c;\n case 2: goto L_0x0222;\n case 3: goto L_0x0238;\n default: goto L_0x01c1;\n };\n L_0x01c1:\n r2 = \"Undefined file type\";\n r0 = r34;\n mobi.mmdt.componentsutils.p079a.p080a.C1104b.m6366b(r0, r2);\n goto L_0x0023;\n L_0x01ca:\n r4 = \"FILE_TYPE_IMAGE\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01d2:\n r2 = 0;\n goto L_0x01be;\n L_0x01d4:\n r4 = \"FILE_TYPE_VIDEO\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01dc:\n r2 = 1;\n goto L_0x01be;\n L_0x01de:\n r4 = \"FILE_TYPE_PUSH_TO_TALK\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01e6:\n r2 = 2;\n goto L_0x01be;\n L_0x01e8:\n r4 = \"FILE_TYPE_OTHER\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01f0:\n r2 = 3;\n goto L_0x01be;\n L_0x01f2:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.IMAGE;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.IMAGE;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n L_0x0207:\n r33 = r2;\n r4 = r3;\n goto L_0x0046;\n L_0x020c:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.VIDEO;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.VIDEO;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n goto L_0x0207;\n L_0x0222:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.PUSH_TO_TALK;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.PUSH_TO_TALK;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n goto L_0x0207;\n L_0x0238:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.FILE;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.OTHER;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n goto L_0x0207;\n L_0x024e:\n if (r33 == 0) goto L_0x029c;\n L_0x0250:\n r0 = r34;\n r0 = r0.f4757a;\n r18 = r0;\n r19 = r33.m8082n();\n r20 = r33.m8069a();\n r21 = r33.m8079k();\n r22 = r33.m8073e();\n r23 = r33.m8078j();\n r24 = r33.m8077i();\n r26 = 0;\n r27 = r33.m8081m();\n r28 = r33.m8080l();\n r29 = r33.m8075g();\n r30 = r33.m8071c();\n r31 = r33.m8072d();\n r32 = r33.m8070b();\n r33 = r33.m8074f();\n r2 = mobi.mmdt.ott.provider.p170d.C1598c.m8100a(r18, r19, r20, r21, r22, r23, r24, r26, r27, r28, r29, r30, r31, r32, r33);\n r2 = r2.getLastPathSegment();\n r2 = java.lang.Long.parseLong(r2);\n r15 = java.lang.Long.valueOf(r2);\n L_0x029c:\n r0 = r34;\n r2 = r0.f4757a;\n r0 = r34;\n r3 = r0.f4761e;\n r0 = r34;\n r5 = r0.f4760d;\n r0 = r34;\n r6 = r0.f4762f;\n r7 = \"SEND_TIME_IN_GMT\";\n r6 = r6.get(r7);\n r6 = (java.lang.String) r6;\n r6 = java.lang.Long.parseLong(r6);\n r11 = mobi.mmdt.ott.provider.p169c.C1593m.READ;\n r0 = r34;\n r12 = r0.f4759c;\n r13 = mobi.mmdt.ott.provider.p169c.C1595o.GROUP;\n r0 = r34;\n r14 = r0.f4758b;\n mobi.mmdt.ott.provider.p169c.C1583c.m7966a(r2, r3, r4, r5, r6, r8, r10, r11, r12, r13, r14, r15, r16);\n goto L_0x00f2;\n L_0x02c9:\n r33 = r5;\n r4 = r6;\n goto L_0x0046;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: mobi.mmdt.ott.logic.a.c.a.b.s.c():void\");\n }", "public void mo21787L() {\n }", "public interface C0938b {\n }", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "void mo3194r();", "public void mo21779D() {\n }", "void mo21070b();", "static void perform_pchl(String passed){\n\t\tint type = type_of_pchl(passed);\n\t\tswitch(type){\n\t\tcase 1:\n\t\t\tjump_to_pchl(passed);\n\t\t\tbreak;\n\t\t}\n\t}", "public boolean A_()\r\n/* 21: */ {\r\n/* 22:138 */ return true;\r\n/* 23: */ }", "protected final void parseC() {\n current = read();\n skipSpaces();\n \n for (;;) {\n switch (current) {\n default:\n return;\n case '+': case '-': case '.':\n case '0': case '1': case '2': case '3': case '4':\n case '5': case '6': case '7': case '8': case '9':\n }\n\n float x1 = parseNumber();\n skipCommaSpaces();\n float y1 = parseNumber();\n skipCommaSpaces();\n float x2 = parseNumber();\n skipCommaSpaces();\n float y2 = parseNumber();\n skipCommaSpaces();\n float x = parseNumber();\n skipCommaSpaces();\n float y = parseNumber();\n\n smoothCCenterX = x2;\n smoothCCenterY = y2;\n currentX = x;\n currentY = y;\n p.curveTo(x1, y1, smoothCCenterX, smoothCCenterY, \n currentX, currentY);\n smoothQCenterX = currentX;\n smoothQCenterY = currentY;\n skipCommaSpaces();\n }\n }", "public static void c3() {\n\t}", "void mo5290b(C5102c c5102c);", "@Override\n protected long advanceH(final long k) {\n return 5 * k - 2;\n }", "@Test\n @Tag(\"bm1000\")\n public void testKB2() {\n CuteNetlibCase.doTest(\"KB2.SIF\", \"-1.74990012991E+03\", \"0.0\", NumberContext.of(7, 4));\n }", "public void mo97908d() {\n }", "private void strin() {\n\n\t}", "final com.google.bV a(java.util.Map r14) {\n /*\n r13_this = this;\n r6 = f;\n if (r14 == 0) goto L_0x013c;\n L_0x0004:\n r0 = com.google.fm.TRY_HARDER;\n r0 = r14.containsKey(r0);\n if (r0 == 0) goto L_0x013c;\n L_0x000c:\n r0 = 1;\n r2 = r0;\n L_0x000e:\n if (r14 == 0) goto L_0x0140;\n L_0x0010:\n r0 = com.google.fm.PURE_BARCODE;\n r0 = r14.containsKey(r0);\n if (r0 == 0) goto L_0x0140;\n L_0x0018:\n r0 = 1;\n L_0x0019:\n r1 = r13.b;\n r7 = r1.f();\n r1 = r13.b;\n r8 = r1.b();\n r1 = r7 * 3;\n r1 = r1 / 228;\n r3 = 3;\n if (r1 < r3) goto L_0x002e;\n L_0x002c:\n if (r2 == 0) goto L_0x002f;\n L_0x002e:\n r1 = 3;\n L_0x002f:\n r2 = 0;\n r3 = 5;\n r9 = new int[r3];\n r4 = r1 + -1;\n r5 = r1;\n L_0x0036:\n if (r4 >= r7) goto L_0x0127;\n L_0x0038:\n if (r2 != 0) goto L_0x0127;\n L_0x003a:\n r1 = 0;\n r3 = 0;\n r9[r1] = r3;\n r1 = 1;\n r3 = 0;\n r9[r1] = r3;\n r1 = 2;\n r3 = 0;\n r9[r1] = r3;\n r1 = 3;\n r3 = 0;\n r9[r1] = r3;\n r1 = 4;\n r3 = 0;\n r9[r1] = r3;\n r1 = 0;\n r3 = 0;\n L_0x0050:\n if (r3 >= r8) goto L_0x010d;\n L_0x0052:\n r10 = r13.b;\n r10 = r10.a(r3, r4);\n if (r10 == 0) goto L_0x0069;\n L_0x005a:\n r10 = r1 & 1;\n r11 = 1;\n if (r10 != r11) goto L_0x0061;\n L_0x005f:\n r1 = r1 + 1;\n L_0x0061:\n r10 = r9[r1];\n r10 = r10 + 1;\n r9[r1] = r10;\n if (r6 == 0) goto L_0x0109;\n L_0x0069:\n r10 = r1 & 1;\n if (r10 != 0) goto L_0x0103;\n L_0x006d:\n r10 = 4;\n if (r1 != r10) goto L_0x00f9;\n L_0x0070:\n r1 = a(r9);\n if (r1 == 0) goto L_0x015f;\n L_0x0076:\n r1 = r13.a(r9, r4, r3, r0);\n if (r1 == 0) goto L_0x0159;\n L_0x007c:\n r5 = 2;\n r1 = r13.a;\n if (r1 == 0) goto L_0x0156;\n L_0x0081:\n r1 = r13.b();\n if (r6 == 0) goto L_0x00c2;\n L_0x0087:\n r2 = r13.c();\n r10 = 2;\n r10 = r9[r10];\n if (r2 <= r10) goto L_0x0152;\n L_0x0090:\n r3 = 2;\n r3 = r9[r3];\n r2 = r2 - r3;\n r2 = r2 - r5;\n r3 = r4 + r2;\n r2 = r8 + -1;\n L_0x0099:\n if (r6 == 0) goto L_0x014e;\n L_0x009b:\n r4 = r5;\n r12 = r3;\n r3 = r1;\n r1 = r2;\n r2 = r12;\n L_0x00a0:\n r5 = 0;\n r10 = 2;\n r10 = r9[r10];\n r9[r5] = r10;\n r5 = 1;\n r10 = 3;\n r10 = r9[r10];\n r9[r5] = r10;\n r5 = 2;\n r10 = 4;\n r10 = r9[r10];\n r9[r5] = r10;\n r5 = 3;\n r10 = 1;\n r9[r5] = r10;\n r5 = 4;\n r10 = 0;\n r9[r5] = r10;\n r5 = 3;\n if (r6 == 0) goto L_0x0147;\n L_0x00bd:\n r5 = r4;\n r4 = r2;\n r12 = r3;\n r3 = r1;\n r1 = r12;\n L_0x00c2:\n r2 = 0;\n r10 = 0;\n r11 = 0;\n r9[r10] = r11;\n r10 = 1;\n r11 = 0;\n r9[r10] = r11;\n r10 = 2;\n r11 = 0;\n r9[r10] = r11;\n r10 = 3;\n r11 = 0;\n r9[r10] = r11;\n r10 = 4;\n r11 = 0;\n r9[r10] = r11;\n if (r6 == 0) goto L_0x0143;\n L_0x00d9:\n r2 = 0;\n r10 = 2;\n r10 = r9[r10];\n r9[r2] = r10;\n r2 = 1;\n r10 = 3;\n r10 = r9[r10];\n r9[r2] = r10;\n r2 = 2;\n r10 = 4;\n r10 = r9[r10];\n r9[r2] = r10;\n r2 = 3;\n r10 = 1;\n r9[r2] = r10;\n r2 = 4;\n r10 = 0;\n r9[r2] = r10;\n r2 = 3;\n if (r6 == 0) goto L_0x0143;\n L_0x00f6:\n r12 = r2;\n r2 = r1;\n r1 = r12;\n L_0x00f9:\n r1 = r1 + 1;\n r10 = r9[r1];\n r10 = r10 + 1;\n r9[r1] = r10;\n if (r6 == 0) goto L_0x0109;\n L_0x0103:\n r10 = r9[r1];\n r10 = r10 + 1;\n r9[r1] = r10;\n L_0x0109:\n r3 = r3 + 1;\n if (r6 == 0) goto L_0x0050;\n L_0x010d:\n r1 = a(r9);\n if (r1 == 0) goto L_0x0124;\n L_0x0113:\n r1 = r13.a(r9, r4, r8, r0);\n if (r1 == 0) goto L_0x0124;\n L_0x0119:\n r1 = 0;\n r5 = r9[r1];\n r1 = r13.a;\n if (r1 == 0) goto L_0x0124;\n L_0x0120:\n r2 = r13.b();\n L_0x0124:\n r4 = r4 + r5;\n if (r6 == 0) goto L_0x0036;\n L_0x0127:\n r0 = r13.a();\n com.google.bm.a(r0);\n r1 = new com.google.bV;\n r1.<init>(r0);\n r0 = com.google.gC.a;\n if (r0 == 0) goto L_0x013b;\n L_0x0137:\n r0 = r6 + 1;\n f = r0;\n L_0x013b:\n return r1;\n L_0x013c:\n r0 = 0;\n r2 = r0;\n goto L_0x000e;\n L_0x0140:\n r0 = 0;\n goto L_0x0019;\n L_0x0143:\n r12 = r2;\n r2 = r1;\n r1 = r12;\n goto L_0x0109;\n L_0x0147:\n r12 = r1;\n r1 = r5;\n r5 = r4;\n r4 = r2;\n r2 = r3;\n r3 = r12;\n goto L_0x0109;\n L_0x014e:\n r4 = r3;\n r3 = r2;\n goto L_0x00c2;\n L_0x0152:\n r2 = r3;\n r3 = r4;\n goto L_0x0099;\n L_0x0156:\n r1 = r2;\n goto L_0x0087;\n L_0x0159:\n r1 = r3;\n r3 = r2;\n r2 = r4;\n r4 = r5;\n goto L_0x00a0;\n L_0x015f:\n r1 = r2;\n goto L_0x00d9;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.bj.a(java.util.Map):com.google.bV\");\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n protected Z advanceG(final long k) {\n return Z.valueOf(5 * k - 2); // mSeqG.next();\n }", "public void applyBrake() {\n\t\t\r\n\t}", "public void start2()\n\t{\n\t\tSystem.out.println();\n\t\tplugboard.clear();\n\t\taddPlug('B', 'C');\n\t\taddPlug('R', 'I');\n\t\taddPlug('S', 'M');\n\t\taddPlug('A', 'F');\t\t\n\t\t\n\t\taddRotor(new BasicRotor (\"IV\", 23), 0);\n\t\taddRotor(new BasicRotor(\"V\", 4), 1);\n\t\taddRotor(new BasicRotor(\"II\", 9), 2);\n\t\t\n\t\treflector = new Reflector(\"ReflectorII\");\n\t\taddReflector(reflector);\n\t\t\n\t\tString encodedMessage = \"GACIG\";\n\t\t\n\t\t//loops through each character from the string and decodes it\n\t\tfor (char character: encodedMessage.toCharArray())\n\t\t{\n\t\t\tcharacter = encodeLetter(character);\n\t\t\tSystem.out.print(character);\n\t\t}\n\t}", "void mo12648a(C3676k kVar);", "private final void step6()\n\t { j = k;\n\t if (b[k] == 'e')\n\t { int a = m();\n\t if (a > 1 || a == 1 && !cvc(k-1)) k--;\n\t }\n\t if (b[k] == 'l' && doublec(k) && m() > 1) k--;\n\t }" ]
[ "0.71593523", "0.59778094", "0.5965728", "0.5829546", "0.5818116", "0.5744094", "0.5681645", "0.56601423", "0.5659814", "0.563515", "0.56321687", "0.5623434", "0.55912167", "0.5583857", "0.55738896", "0.55108386", "0.5462569", "0.5459777", "0.54487467", "0.54320437", "0.5431243", "0.5398117", "0.5367757", "0.5367711", "0.5359197", "0.5356109", "0.5348267", "0.53338295", "0.5324434", "0.5320373", "0.5316157", "0.53061414", "0.52976453", "0.52946645", "0.52766275", "0.5261104", "0.5257313", "0.5256375", "0.52392864", "0.5238809", "0.52374667", "0.5228759", "0.52269185", "0.5225274", "0.52148885", "0.5210954", "0.5209863", "0.5207261", "0.52058774", "0.52017653", "0.51990163", "0.5198282", "0.51959056", "0.5191541", "0.5190699", "0.5187983", "0.5184309", "0.5182129", "0.5180051", "0.51790094", "0.51683664", "0.5163113", "0.5162686", "0.5162161", "0.51607937", "0.5149248", "0.5148006", "0.51384395", "0.5135951", "0.51252306", "0.5119746", "0.51160127", "0.51117235", "0.5109779", "0.51067436", "0.5104721", "0.51007086", "0.5098772", "0.5097631", "0.5095955", "0.50950676", "0.5093865", "0.5092296", "0.5091187", "0.5089804", "0.5087522", "0.50823253", "0.508127", "0.5079445", "0.50791985", "0.5077867", "0.5077217", "0.50746465", "0.50738364", "0.5068541", "0.5068541", "0.5061852", "0.50608444", "0.5058281", "0.5057751", "0.50572747" ]
0.0
-1
Method to add a coordinate to history, left shift if max size is exceeded
public void addGPSCoordinateToHistory(GPSCoordinate coordinate){ if(coordinateHistory.size() == MAX_SIZE){ ArrayList<GPSCoordinate> temp = new ArrayList(); for(int i = 1; i < coordinateHistory.size(); i++){ temp.add(coordinateHistory.get(i)); } temp.add(coordinate); coordinateHistory = temp; if(DEBUG_PRINT){ for(GPSCoordinate p: coordinateHistory){ System.out.println("****************"); System.out.println(p); } } }else{ coordinateHistory.add(coordinate); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addPositionToHistory(long ti, double x, double y) {\n synchronized(positionHistory){\n if (positionHistory.size() >= MAXHISTORY) {\n positionHistory.remove(0);\n }\n positionHistory.add(new ActorPositionTimestamp(ti, x, y));\n }\n }", "protected void addMove(Move move) {\n moveHistory.add(move);\n pointer++;\n }", "private void Writehistory (List list, savekq savehistory){\n if (kiemtrasopt(list) < 10) {\n list.add(0, savehistory);\n } else {\n list.remove(9);\n list.add(0, savehistory);\n }\n }", "@Override\n public void addLast(E e) throws IllegalStateException {\n checkSize();\n data[size] = e;\n size++;\n }", "void setStatisticsHistorySize(int historySize);", "public void add(BitData bitData) {\n mHistory.add(bitData);\n while (mHistory.size() > mMaxSize) {\n mHistory.removeFirst();\n }\n }", "public void helpAdd(Object x, int index) {\n\tif ( _size >= _data.length )\n\t expand();\n\n\tfor( int i = _size; i > index; i-- ) {\n\t _data[i] = _data[i-1]; //each slot gets value of left neighbor\n\t}\n\n\t_data[index] = x;\n\t_size++;\n }", "public void addPathPointToHistory(double[] pathPoint){\r\n //Check for null condition\r\n if(pathPoint == null)\r\n return;\r\n \r\n //Makes sure that there are no duplicate points\r\n if(pathPointHistory.size() != 0){\r\n double xLast = pathPointHistory.get(pathPointHistory.size() - 1)[0];\r\n double yLast = pathPointHistory.get(pathPointHistory.size() - 1)[1];\r\n if(xLast == pathPoint[0] && yLast == pathPoint[1])\r\n return;\r\n }\r\n \r\n //Adds to the path array\r\n if(pathPointHistory.size() == PATH_SIZE){\r\n ArrayList<double[]> temp = new ArrayList();\r\n for(int i = 1; i < pathPointHistory.size(); i++){\r\n temp.add(pathPointHistory.get(i));\r\n }\r\n temp.add(pathPoint);\r\n pathPointHistory = temp;\r\n }else{\r\n pathPointHistory.add(pathPoint);\r\n }\r\n }", "public void append( double ... coordinate ){\n\t\tif( coordinate.length != 3 )\n\t\t\tthrow new IllegalArgumentException();\n\t\t\n\t\theadCoordinate = coordinate;\n\t\tcount = (count+1)%elementskips;\n\t\t//dont append trails if they are too close together\n\t\tif( coordinates.size()>0 ){\n\t\t\t\n\t\t\tif( count != 0 )\n\t\t\t\treturn;\n\t\t\t\n\t\t}else{\n\t\t\tcoordinates.add(coordinate);\n\t\t\tcurrentElement = (currentElement+1) % maxLength;\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tcurrentElement = (currentElement+1) % maxLength;\n\t\t\n\t\tif( coordinates.size() <= currentElement )\n\t\t\tcoordinates.add(coordinate);\n\t\telse\n\t\t\tcoordinates.set(currentElement, coordinate);\n\t}", "public void addToHistoryAndUpdate(Position start, Position end, String k) {\n String moveRecord = \"\";\n\n moveRecord = String.format(\"%s %s%d → %s%d\", currentPlayingPiece,\n formatPosition(start.getCol()), 8 - start.getRow(),\n formatPosition(end.getCol()), 8 - end.getRow());\n\n if (!k.equals(\"\")) {\n moveRecord += \" | Killed \" + k;\n }\n\n moveHistory.add(moveRecord);\n\n if (promotionEventHappened) {\n moveHistory.add(String.format(\"%s %s%d > %s\", currentPlayingPiece,\n formatPosition(end.getCol()), 8 - end.getRow(), promotedPiece));\n promotionEventHappened = false;\n }\n }", "private int addShift( int x ) { x += _nxx; int sz = H2O.CLOUD.size(); return x < sz ? x : x-sz; }", "public void appendPositionLog(Vector logVar){\n if(positionLog.size() >= this.getLogSize())\n positionLog.remove(0);\n this.positionLog.add(logVar);\n }", "public void insertLeft( long j ) {\n if ( start == 0 ) {\n start = max;\n }\n Array[--start] = j;\n nItems++;\n }", "private void addHistory(String s) {\r\n\t\tcurrentPlayer.getHistory().add(s);\r\n\t\tif (currentPlayer.getHistory().size() > 6) currentPlayer.getHistory().remove(0);\r\n\t\t//updatePlayArea(currentPlayer, false);\r\n\t}", "@Override\n public void move() {\n _location.x++;\n }", "private void addToHistory(String msg){\n\t\ttry{\n\t\t\tlockHistory.writeLock().lock();\n\t\t\thistory.add(msg);\n\t\t\tlogOut.write(msg);\n\t\t\tlogOut.newLine();\n\t\t\tlogOut.flush();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tlockHistory.writeLock().unlock();\n\t\t}\n\t}", "public void addEvent(Event event) {\n if (numEvents > maxLength - 1) {\n System.out.println(\"Heap is full. Exiting..\");\n System.exit(0);\n }\n eventArray[numEvents++] = event;\n siftUp(numEvents - 1);\n\n }", "private void setLast(int x, int y) {\n\t\tthis.lastx = x;\n\t\tthis.lasty = y;\n\t}", "private void addRecordToOverflow(byte [] input, int startLocation) {\n try {\n // Writing a field to the overflow file\n RandomAccessFile raf = new RandomAccessFile(this.databaseName + \".overflow\", \"rws\");\n\n raf.getChannel().position(startLocation);\n raf.write(input);\n raf.close();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }", "public void addLeft(T obj) {\r\n if (offset == 0) {\r\n set(uc.getMem().ensureCapacity(objects, count + 2, increment));\r\n //shift them all up by 2 and\r\n ArrayUtils.shiftUp(objects, 2, offset, offset + count - 1, false);\r\n offset += 2;\r\n }\r\n objects[offset - 1] = obj;\r\n count++;\r\n }", "public void push(Object o){\n if (count<maxsize && maxsize!=-1)\n { insert(o);}\n else if (maxsize==-1){ insert(o);}\n else { System.out.println(\"Can't add element.\");}\n }", "public void addToCurrentNumberOfRegisterPushed(int n) {\n currentNumberOfRegisterPushed += n;\n if (currentNumberOfRegisterPushed > maxNumberOfRegisterPushed) {\n maxNumberOfRegisterPushed = currentNumberOfRegisterPushed;\n }\n }", "public void insertRight( long j ) {\n if ( end == max - 1 ) {\n end = -1;\n }\n Array[++end] = j;\n nItems++;\n }", "public Coordinate push(int x, int y, int data){\r\n\r\n if( size == capacity ){\r\n capacity *= 2;\r\n Coordinate [] arr2 = new Coordinate[capacity];\r\n for( int i = 0; i < capacity / 2; i++){\r\n arr2[i] = arr[i];\r\n }\r\n arr = arr2;\r\n }\r\n arr[size] = new Coordinate(x,y,data);\r\n size++;\r\n return new Coordinate(x,y,data);\r\n }", "protected void addShiftToCache () {\n if (digitalShift == null)\n for (int j = 0; j <= dim; j++)\n cachedCurPoint[j] = 0;\n else\n for (int j = 0; j <= dim; j++)\n cachedCurPoint[j] = digitalShift[j];\n }", "public void addTwoStepForwardToPositionCache(Key currentKey) {\n\n\t\tKey newKey = createTwoStepForwardFromCurrentKey(currentKey);\n\n\t\t// Gets current values stored with key and adds the extra position\n\t\tSet<Key> currentKeyMapping = positionCache.get(currentKey);\n\t\tcurrentKeyMapping.add(newKey);\n\t\tpositionCache.put(currentKey, currentKeyMapping);\n\t}", "protected void addShiftToCache () {\n if (digitalShift == null)\n for (int j = 0; j < dimS; j++)\n cachedCurPoint[j] = 0;\n else\n for (int j = 0; j < dimS; j++)\n cachedCurPoint[j] = digitalShift[j];\n }", "public void addLast(TypeHere x) {\n if (size == items.length) {\n resize(size + 1);\n }\n items[size] = x;\n size += 1;\n }", "@Override\n public void insertBack(Item x) {\n if (size == items.length) {\n //dynamic array\n //resize array\n resize(size * RFACTOR);\n }\n items[size] = x;\n size += 1;\n }", "public void setHistoryEntry(long time)\r\n\t{\r\n\t\tif (updatedLat && updatedLng)\r\n\t\t{\r\n\t\t\tAddressLocation al = new AddressLocation();\r\n\t\t\tal.latitude = latitude.doubleValue();\r\n\t\t\tal.longitude = longitude.doubleValue();\r\n\t\t\tal.time = time;\r\n\t\t\tdataStorage.setAddressLocation(al);\r\n\t\t}\r\n\t\t\t\r\n\t}", "Position<T> addLast(T data);", "private boolean dataToHistory(DataEntry oldEntry) {\n\t\tif (oldEntry != null) {\n\t\t\tif (bufferIndex < MAX_HISTORY_ENTRIES) {\n\t\t\t\toldEntries[bufferIndex++] = new HistoryEntry(oldEntry.getProductId(), oldEntry);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private void addToOperationHistory(UndoableTextChange edit) {\n \t\tif (!fFoldingIntoCompoundChange\n \t\t\t\t|| edit instanceof UndoableCompoundTextChange) {\n \t\t\tfHistory.add(edit);\n \t\t\tfLastAddedTextEdit= edit;\n \t\t}\n \t}", "public void push(T e) {\n\t\tif(size == data.length){\n\t\t\tresize(size * 2);\n\t\t}\n\t\tthis.data[size++] = e;\n\t}", "@Override\r\n\tpublic void push(E e) throws IllegalStateException{\r\n\t\tif(size()==data.length) throw new IllegalStateException(\"Stack is Full\");\r\n\t\tdata[++t]=e;\r\n\t}", "public void addLast(Item x) {\n if (size == items.length) {\n resize(size * 2);\n }\n items[size] = x;\n size += 1;\n }", "private void storeUserInputHistory(String input) {\n if (userInputHistoryPointer != userInputHistory.size() - 1\n || (userInputHistoryPointer == userInputHistory.size() - 1\n && !input.equals(userInputHistory.get(userInputHistoryPointer)))) {\n userInputHistory.add(input);\n }\n userInputHistoryPointer = userInputHistory.size();\n currentInput = null;\n }", "public void addFreezeFrame()\n{\n int index = Collections.binarySearch(_freezeFrames, getTime());\n if(index<0)\n _freezeFrames.add(-index - 1, getTime());\n}", "private void nextHistoryEntry()\n {\n // get next history entry (into input text field)\n if (this.historyPos < this.history.size()) {\n this.historyPos++;\n this.textInput.setText(this.history.get(this.historyPos));\n this.textInput.setSelection(this.history.get(this.historyPos).length());\n // if last index => input text must be cleaned\n } else if (this.historyPos == this.history.size()) {\n this.textInput.setText(\"\"); //$NON-NLS-1$\n this.textInput.setSelection(0);\n }\n }", "Position<T> addBefore(Position<T> p, T data) throws IllegalStateException;", "public void addCommandToHistory(String command) {\r\n commandHistory.add(command);\r\n }", "@Override\r\n\tpublic void push(E e) {\r\n\t\tif (size() == stack.length)\r\n\t\t\texpandArray();\r\n\t\tstack[++t] = e; // increment t before storing new item\r\n\t}", "private void createLeftOver() {\n/* 332 */ int lineLengthBytes = this.currentLastBytePos + 1;\n/* 333 */ if (lineLengthBytes > 0) {\n/* */ \n/* 335 */ this.leftOver = new byte[lineLengthBytes];\n/* 336 */ System.arraycopy(this.data, 0, this.leftOver, 0, lineLengthBytes);\n/* */ } else {\n/* 338 */ this.leftOver = null;\n/* */ } \n/* 340 */ this.currentLastBytePos = -1;\n/* */ }", "public double getLastMoved();", "public void push(int value){\n //To be written by student\n localSize++;\n top++;\n if(localSize>A.getSize()){\n A.doubleSize();\n try{\n A.modifyElement(value,top);\n }catch(Exception c){c.printStackTrace();}\n }\n else{try{\n A.modifyElement(value,top);\n }catch(Exception a){a.printStackTrace();} }\n }", "private int newCursorPosition(int count) {\n int newCursorPosition = cursorPosition + count;\n if (((cursorPosition ^ newCursorPosition) & (count ^ newCursorPosition)) < 0) {\n return Integer.MAX_VALUE;\n } else {\n return newCursorPosition;\n }\n }", "final void add(final Map<PolylineStage,Path2D> appendTo, final double[] coordinates, final int size) {\n int i = 0;\n if (i < size) {\n final Path2D p = destination(appendTo);\n p.moveTo(coordinates[i++], coordinates[i++]);\n while (i < size) {\n p.lineTo(coordinates[i++], coordinates[i++]);\n }\n }\n }", "void addHasXCoordinate(Object newHasXCoordinate);", "@Override\n\tpublic Position<E> addLast(E e) {\n\t\treturn addBetween(tail.prev, tail, e);\n\t}", "public void moveToLastAcceptableLocation(){\n\t\tthis.x=this.xTemp;\n\t\tthis.y=this.yTemp;\n\t}", "public void push(E value) {\n list.addLast(value);\n index++;\n }", "public void push(int x) {\n\t\tif (size() == capacity()) {\n\t\t\tdoubleSize();\n\t\t}\n\t\tarr[end] = x;\n\t\t++end;\n\t}", "public void add( Comparable newVal ) {\n \t//if _data is full, expand the array\n \tif (_size == _data.length){\n\t \texpand();\n \t}\n \t\n\tset(_lastPos + 1, newVal);\n \t//increases _lastPos and _size\n \t_lastPos++;\n \t_size++;\n }", "public void setLastRoom(final Room pLastRoom){this.aLastRooms.push(pLastRoom);}", "public final void addHistoryNode(final ShapePicaso shape,\n\t\t\tfinal int operation, final Object newHist,\n\t\t\tfinal Object oldHist) {\n\t\tif (newHist instanceof SceneCoordinates\n\t\t\t\t&& operation == Operations.MOVE) {\n\t\t\tSceneCoordinates newVal = (SceneCoordinates) newHist;\n\t\t\tSceneCoordinates oldVal = (SceneCoordinates) oldHist;\n\t\t\tHistoryNode node = new HistoryNode(shape,\n\t\t\t\t\toperation, newVal, oldVal);\n\t\t\tthis.historyManager.addNewRecord(node);\n\t\t} else if (newHist instanceof HorizontalAndVerticalScales\n\t\t\t\t&& operation == Operations.RESIZE) {\n\t\t\tHorizontalAndVerticalScales newVal =\n\t\t\t (HorizontalAndVerticalScales) newHist;\n\t\t\tHorizontalAndVerticalScales oldVal =\n\t\t\t (HorizontalAndVerticalScales) oldHist;\n\t\t\tHistoryNode node = new HistoryNode(shape,\n\t\t\t\t\toperation, newVal, oldVal);\n\t\t\tthis.historyManager.addNewRecord(node);\n\t\t}\n\t}", "void storeline(String linebuffer, fileInfo pinfo) {\n\t\tint linenum = ++pinfo.maxLine; /* note, no line zero */\n\t\tif (linenum > fileInfo.MAXLINECOUNT) {\n\t\t\tSystem.err.println(\"MAXLINECOUNT exceeded, must stop.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tpinfo.symbol[linenum] = node.addSymbol(linebuffer, pinfo == oldinfo,\n\t\t\t\tlinenum);\n\t}", "void addShift(Shift shiftToAdd);", "private void expandDirtyRect(float historicalX, float historicalY) {\n if (historicalX < mDirtyRect.left) {\n mDirtyRect.left = historicalX;\n } else if (historicalX > mDirtyRect.right) {\n mDirtyRect.right = historicalX;\n }\n if (historicalY < mDirtyRect.top) {\n mDirtyRect.top = historicalY;\n } else if (historicalY > mDirtyRect.bottom) {\n mDirtyRect.bottom = historicalY;\n }\n }", "public void add(T e) {\n Entry<T> newNode = new Entry<T>(e, null, null);\n newNode.next = cursor.next;\n newNode.prev = ((Entry<T>) cursor);\n if(cursor != tail) {\n ((Entry<T>) cursor.next).prev = newNode;\n }\n else {\n tail = newNode;\n }\n cursor.next = newNode;\n prev = cursor;\n cursor = cursor.next;\n size++;\n ready = false;\n }", "@Override\n public void addFirst(E e) throws IllegalStateException {\n checkSize();\n for (int j = size - 1; j >= 0; j--) {\n data[j + 1] = data[j];\n }\n data[0] = e;\n size++;\n }", "public void push(int x, int y) throws FieldIsPushedException, FieldIsMineException;", "private final void buffer_push_back(byte d)\n\t{\n\t\tif (buffer_size_ >= buffer_.length) {\n int newsize = buffer_size_ * 2 + 10;\n byte[] newbuffer = new byte[newsize];\n\n for (int i = 0; i < buffer_size_; ++i)\n {\n newbuffer[i] = buffer_[i];\n }\n buffer_ = newbuffer;\n\t\t}\n\t\tbuffer_[buffer_size_] = d;\n\t\tbuffer_size_ = buffer_size_ + 1;\n\t}", "private void updateMoveRecord(int[] moveX, int[] moveY, int recordSize) {\n moveRecord = \"\";\r\n for (int ii=0; ii<recordSize; ii++) {\r\n moveRecord += String.valueOf((moveX[ii]-1)*3+moveY[ii]);\r\n }\r\n }", "public void push(Employee employee){\n if(isFull()){\n Employee[] newArray = new Employee[2 * employeeStack.length];\n // System.arraycopy(srcArray, srcPos, destisnationArray, destPos, length);\n System.arraycopy(employeeStack, 0, newArray, 0, employeeStack.length);\n employeeStack = newArray;\n }\n employeeStack[top++] = employee;\n }", "long addEntry(long ledger, ByteBuf entry, boolean rollLog) throws IOException;", "@Override\n\t\tpublic void update(Observable o, Object arg) {\n\t\t\tif (series.size() > HISTORY_SIZE) {\n\t\t\t\tseries.removeFirst();\n\t\t\t}\n\t\t\t// Get the signal strength as Asu level\n\t\t\tint ssAsu = ssSampler.getSignalStrength()\n\t\t\t\t\t.getGsmSignalStrength();\n\t\t\t// add the latest history sample:\n\t\t\tseries.addLast(null, ssAsu);\n\t\t\tplot.redraw();\n\t\t}", "private Object appendHistory(final Context ctx, final NumberMgmtHistory history) throws HomeException,\r\n HomeInternalException\r\n {\r\n final Home home = getHome(ctx);\r\n if (!validate(ctx, history))\r\n {\r\n return null;\r\n }\r\n return home.create(ctx, history);\r\n }", "void add(Point point) {\n\t\tpoints[posit]=point;\n\t\tposit++;\n\t\t//if method add is applied, size should also change\n\t\tsize++;\n\t}", "void setLastTickPos(Vec3 pos);", "@Override\n public void push(int value) {\n Entry newElement = new Entry(value);\n if (size == 0) {\n first = newElement;\n last = newElement;\n } else {\n first.previous = newElement;\n newElement.next = first;\n first = newElement;\n }\n size++;\n }", "public void newBufLine() {\n this.buffer.add(new ArrayList<Integer>());\n this.columnT = 0;\n this.lineT++;\n }", "public void insertHistory(RecordDTO recordDTO);", "Builder addPosition(Integer value);", "public void addToCurrX(int x) {\n currX += x;\n }", "@Override\n\tpublic final int shiftBufferToMark(int mark) throws BufferOverflowException {\n\t\tint usedLength = Math.max(bufferSize - mark, 0);\n\n\t\t// if buffer tight double the size\n\t\tresizeIfNeeded(usedLength);\n\n\t\tSystem.arraycopy(buffer, mark, buffer, 0, usedLength);\n\n\t\tbufferSize = usedLength;\n\n\t\treturn mark;\n\t}", "Position<T> addAfter(Position<T> p, T data) throws IllegalStateException;", "public void addTileAtTheEnd(Tile tile);", "public void add(Coord obj) {\n\t\tif (index > itemcount)\n\t\t\tthrow new RuntimeException(\"Liste ist voll\");\n\t\tarray[index++] = obj;\n\t}", "public void add(int x)\n {\n int arrayLength = list.length; // get size of array\n if (length == arrayLength)\n {\n list = Arrays.copyOf(list, 100 + list.length);\n list[length] = x;\n length++;\n\n } else\n {\n list[length] = x;\n length++;\n }\n }", "void addRecord(HistoryRecord record) throws IOException;", "public void push(int x) {\n queue.addLast(x);\n }", "public void updateBuffer(final int input) {\n\n // Check for null pointers on buffer line\n if(this.buffer.get(lineT).isEmpty() || this.lineT == this.buffer.get(lineT).size()) \n this.buffer.get(lineT).add(input);\n \n else { \n if(this.inputMode) // Insert mode\n this.buffer.get(lineT).add(columnT, input);\n else // Overwrite mode\n this.buffer.get(lineT).set(columnT, input);\n }\n this.columnT++; // Increase one unit column target position\n }", "@Override\n\tpublic void addAt(int n, int index) throws IndexOutOfBoundsException {\n\t\tif(checkIndex(index, size+1)) { //check if index is valid\n\t\t\tfor (int i=size; i>index; i--) {\n\t\t\t\tvalues[i] = values[i-1]; //move every value one step right until index\n\t\t\t}\n\t\t\tvalues[index] = n; //place the new value at index\n\t\t\tsize++; //increment size\n\t\t\tif (size == values.length) { //if the list is full expand it\n\t\t\t\tresize();\n\t\t\t}\t\t\t\n\t\t}else {\n\t\t\tthrow new IndexOutOfBoundsException(\"Highest index: \" + size);\n\t\t}\t\n\t}", "public void add(HayStack stack){\n if(canMoveTo(stack.getPosition())){\n mapElement.put(stack.getPosition(), stack);\n }\n else{\n throw new IllegalArgumentException(\"UnboundedMap.add - This field is occupied\");\n }\n }", "@Override\n public void add(E work) {\n if(isFull()) {\n throw new IllegalStateException();\n }\n array[end] = work;\n end = (end + 1) % capacity();\n size++;\n }", "public void add(E value){\n if (maxIndex != array.length-1){\n array[++maxIndex] = value;\n }else {\n Object[] tmpArray = new Object[array.length+ capacity];\n for (int i = 0; i < array.length; i++) {\n tmpArray[i] = array[i];\n }\n array = tmpArray;\n array[++maxIndex] = value;\n }\n }", "@Override\n\tpublic void addPoint(Point point) {\n\t\tif (size==0){\n\t\t\tcurrent = new Container(point,null,null,null,null);\n\t\t\tthis.minx=current;\n\t\t\tthis.maxx=current;\n\t\t\tthis.miny=current;\n\t\t\tthis.maxy=current;\n\t\t\tthis.size=1;\n\t\t}\n\t\telse{\n\t\t\tint counter=0;\n\t\t\tContainer toAdd;\n\t\t\t//---------------------find the right place in order,axis x---------------//\n\t\t\tthis.current = this.minx;\n\t\t\tPoint currentData = this.current.getData();\n\t\t\twhile (counter<this.size-1 && currentData.getX() < point.getX()){ // counter<=this.size => this.current.getNext()!=null\n\t\t\t\tthis.current = this.current.getNextX();\n\t\t\t\tcurrentData = this.current.getData();\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t\tif (currentData.getX() < point.getX()){\n\t\t\t\ttoAdd = new Container(point,this.current,this.current.getNextX(),null,null);\n\t\t\t\tif (this.current.getNextX()!=null)\n\t\t\t\t\tthis.current.getNextX().setPrevX(toAdd);\n\t\t\t\tthis.current.setNextX(toAdd);\n\t\t\t\tcounter++; \n\t\t\t}\n\t\t\telse { \n\t\t\t\ttoAdd = new Container(point,this.current.getPrevX(),this.current,null,null);\n\t\t\t\tif (this.current.getPrevX()!=null)\n\t\t\t\t\tthis.current.getPrevX().setNextX(toAdd);\n\t\t\t\tthis.current.setPrevX(toAdd); \t\n\t\t\t}\n\t\n\t\t\tif (counter==0)\n\t\t\t\tthis.minx=toAdd;\n\t\t\tif (counter==this.size) \n\t\t\t\tthis.maxx=toAdd;\n\t\t\t//----------------------find the right place in order,axis y----------------//\n\t\t\tcounter=0;\n\t\t\tcurrentData = this.miny.getData();\n\t\t\tthis.current = this.miny;\n\t\t\twhile (counter<this.size-1 && currentData.getY() < point.getY()){\n\t\t\t\tthis.current = this.current.getNextY();\n\t\t\t\tcurrentData = this.current.getData();\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t\tif (currentData.getY() < point.getY()){\n\t\t\t\ttoAdd.setY(this.current, this.current.getNextY());\n\t\t\t\tif (this.current.getNextY()!=null)\n\t\t\t\t\tthis.current.getNextY().setPrevY(toAdd);\n\t\t\t\tthis.current.setNextY(toAdd);\n\t\t\t\tcounter++; \n\t\t\t}else { \n\t\t\t\ttoAdd.setY(this.current.getPrevY(), this.current);\n\t\t\t\tif (this.current.getPrevY()!=null)\n\t\t\t\t\tthis.current.getPrevY().setNextY(toAdd);\n\t\t\t\tthis.current.setPrevY(toAdd); \n\t\t\t}\n\t\t\tif (counter==0)\n\t\t\t\tthis.miny=toAdd;\n\t\t\tif (counter==this.size) \n\t\t\t\tthis.maxy=toAdd;\t\t\n\t\t\tthis.size++;\t\n\t\t}\n\t}", "public void push(int x) {\n queue.addLast(x);\n }", "@Override public void incrementAddress( int offset )\n {\n super.incrementAddress( offset );\n if ( getPointer() > m_size )\n throw new RuntimeException( \"address out of range: \" + getPointer() );\n }", "private final void addToBook(Position pos, Move moveToAdd) {\n List<BookEntry> ent = bookMap.get(pos.zobristHash());\n if (ent == null) {\n ent = new ArrayList<BookEntry>();\n bookMap.put(pos.zobristHash(), ent);\n }\n for (int i = 0; i < ent.size(); i++) {\n BookEntry be = ent.get(i);\n if (be.move.equals(moveToAdd)) {\n be.count++;\n return;\n }\n }\n BookEntry be = new BookEntry(moveToAdd);\n ent.add(be);\n numBookMoves++;\n }", "private static List<Integer> addOnePlus(List<Integer> input) {\n\n\t\tint size = input.size();\n\t\tinput.set(size-1, input.get(size-1)+1);//last element of input is updated/replaced by (original value + 1)\n\n\t\tfor(int i=size-1; i>0 && input.get(i)==10; i--) {\n\t\t\tinput.set(i, 0);\n\t\t\tinput.set(i-1, input.get(i-1)+1);\n\t\t}\n\n\t\tif(input.get(0) == 10) {\n\t\t\tinput.set(0, 0);\n\t\t\tinput.add(0, 1);//add 1 at index0 ,shift all elements after to right\n\t\t}\n\n\t\treturn input;//this modifies the original input\n\t}", "private void addRValueToStack (){\n if (numStack.size() < 23){\n numStack.push(rValues[rCount]);\n if(rCount< rValues.length){ // cycles through the 'r' values\n rCount++;\n }\n else{ \n rCount=0; // if end of r values reached, rCount is set to 0.\n }\n }\n else {\n System.out.println(\"Stack overflow.\"); \n }\n }", "@Override\n public void add(int i, E e) throws IndexOutOfBoundsException,\n IllegalStateException {\n if (i == size){\n addLast(e);\n }\n else {\n validIndex(i);\n checkSize();\n for (int j = size - 1; j >= i; j--) {\n data[j + 1] = data[j];\n }\n data[i] = e;\n size++;\n }\n }", "void add(int list) {\n\t\t\n\t\t// check if element can be added to the queue\n\t\tif (!canPush)\n\t\t\tthrow new IllegalStateException(\"Queue capacity is excided!\");\n\t\t\n\t\t// add element into the cell push-pointer points to and shift pointer\n\t\tqueue[qPush++] = list;\n\t\t\n\t\t// set poll-flag, cuz there's now at least one element in the queue\n\t\tcanPoll = true;\n\t\t\n\t\t/*\n\t\t * If poll pointer went beyond array bounds - return it to the first position\n\t\t */\n\t\t\n\t\tif (qPush == queue.length)\n\t\t\tqPush = 0;\n\t\t\n\t\t/*\n\t\t * If push pointer now points to the poll pointer - then queue is full\n\t\t * Set flag\n\t\t */\n\t\t\n\t\tif (qPush == qPoll)\n\t\t\tcanPush = false;\n\t}", "private void addToMoves(char move) {\n this.prevMoves += move;\n }", "public abstract void append(int data, int row, int column);", "private void addCommand(byte command) {\r\n if (journal_entries >= command_journal.length) {\r\n // Resize command array.\r\n int grow_size = Math.min(4000, journal_entries);\r\n grow_size = Math.max(4, grow_size);\r\n byte[] new_command_journal = new byte[journal_entries + grow_size];\r\n System.arraycopy(command_journal, 0, new_command_journal, 0,\r\n journal_entries);\r\n command_journal = new_command_journal;\r\n }\r\n\r\n command_journal[journal_entries] = command;\r\n ++journal_entries;\r\n }", "private void addNewBoard(int x, int y,\n\t\t\tArrayList<ArrayList<Integer>> board) {\n\t\tif (y < 0 || y > board.size() - 1) { //expanding up/down\n\t\t\tfor (int i = 0; i < boardSize; i++) {\n\t\t\t\tArrayList<Integer> z = new ArrayList<>();\n\t\t\t\tfor (int j = 0; j < board.get(0).size(); j++) {\n\t\t\t\t\tif ((j < x + boardSize && j >= x && x >= 0)) { //adjusts for y if it isn't 0 or negative, almost forgot about this\n\t\t\t\t\t\tz.add(0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tz.add(5);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (y < 0) {\n\t\t\t\t\tboard.add(0, z);\n\t\t\t\t\ty++;\n\t\t\t\t} else {\n\t\t\t\t\tboard.add(z);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfreeSpace += boardSize * boardSize;\n\t\t}\n\t\tif (x < 0 || x > board.get(0).size() - 1) { //expanding to the left/right\n\t\t\tint loc = (x < 0) ? 0 : board.get(0).size();\n\t\t\tfor (int i = 0; i < boardSize; i++) {\n\t\t\t\tfor (int j = 0; j < board.size(); j++) {\n\t\t\t\t\tif (j < y + boardSize && j >= y) {\n\t\t\t\t\t\tboard.get(j).add(loc, 0); //append as opposed to add\n\t\t\t\t\t} else {\n\t\t\t\t\t\tboard.get(j).add(loc, 5); //append lack of board everywhere else\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfreeSpace += boardSize * boardSize;\n\t\t}\n\t\tif ((y >= 0 && y < board.size())\n\t\t\t\t&& (x >= 0 && x < board.get(0).size())\n\t\t\t\t&& getBoard(x, y) == 5) { //If within board\n\t\t\tfor (int i = 0; i < boardSize; i++) {\n\t\t\t\tfor (int j = 0; j < boardSize; j++) {\n\t\t\t\t\tboard.get(y + i).set(x + j, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfreeSpace += boardSize * boardSize;\n\t\t}\n\t\tupdateOffset();\n\t}", "@Override\n public void addDetailLeft(WeatherDetail weatherDetail)\n {\n int lastPos = weatherDetailsAdapter.getItemCount();\n if(lastPos < maxDetails)\n {\n weatherDetailsAdapter.addDetailTile(weatherDetail, 0, Constant.DONT_REMOVE);\n }\n else { weatherDetailsAdapter.addDetailTile(weatherDetail, 0, lastPos); }\n }", "@Override\n public void push(E z){\n if(isFull()){\n expand();\n System.out.println(\"Stack expanded by \"+ expand+ \" cells\");\n }\n stackArray[count] = z;\n count++;\n }" ]
[ "0.6018915", "0.54464555", "0.541371", "0.53504205", "0.5295059", "0.5285462", "0.5271713", "0.5253721", "0.5233319", "0.514658", "0.50133353", "0.50117016", "0.4999557", "0.499383", "0.49630174", "0.49568233", "0.49403134", "0.49291", "0.49248838", "0.4922411", "0.49188685", "0.4909865", "0.4909329", "0.4908961", "0.48988166", "0.4872252", "0.48696637", "0.48600987", "0.48593348", "0.4846759", "0.48267877", "0.48215166", "0.4820361", "0.48141572", "0.48060504", "0.47902086", "0.4779184", "0.4772122", "0.47549257", "0.47533676", "0.47489154", "0.47472396", "0.4745703", "0.47398603", "0.4731614", "0.47305408", "0.4724614", "0.4721038", "0.47101974", "0.47089574", "0.47049212", "0.4703549", "0.46991518", "0.46929258", "0.4686156", "0.4683661", "0.46805984", "0.46803445", "0.46745402", "0.46719337", "0.46713206", "0.4671035", "0.46494496", "0.4649103", "0.46468246", "0.46461475", "0.46350682", "0.46297795", "0.46255305", "0.46247268", "0.46183208", "0.4615568", "0.46152297", "0.46149454", "0.4614165", "0.46094602", "0.46069193", "0.4604623", "0.45991844", "0.45981082", "0.4597784", "0.4597284", "0.45943797", "0.4594212", "0.45914963", "0.45903984", "0.45880553", "0.45848644", "0.45825425", "0.45805123", "0.45781347", "0.45767123", "0.45761243", "0.4572159", "0.45721176", "0.45700043", "0.456386", "0.45612073", "0.45611474", "0.45611125" ]
0.6796608
0
Method to add a coordinate to history, left shift if max size is exceeded This adds to path history, which is the array to draw out the path of the aircraft
public void addPathPointToHistory(double[] pathPoint){ //Check for null condition if(pathPoint == null) return; //Makes sure that there are no duplicate points if(pathPointHistory.size() != 0){ double xLast = pathPointHistory.get(pathPointHistory.size() - 1)[0]; double yLast = pathPointHistory.get(pathPointHistory.size() - 1)[1]; if(xLast == pathPoint[0] && yLast == pathPoint[1]) return; } //Adds to the path array if(pathPointHistory.size() == PATH_SIZE){ ArrayList<double[]> temp = new ArrayList(); for(int i = 1; i < pathPointHistory.size(); i++){ temp.add(pathPointHistory.get(i)); } temp.add(pathPoint); pathPointHistory = temp; }else{ pathPointHistory.add(pathPoint); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addGPSCoordinateToHistory(GPSCoordinate coordinate){\r\n if(coordinateHistory.size() == MAX_SIZE){\r\n ArrayList<GPSCoordinate> temp = new ArrayList();\r\n for(int i = 1; i < coordinateHistory.size(); i++){\r\n temp.add(coordinateHistory.get(i));\r\n }\r\n temp.add(coordinate);\r\n coordinateHistory = temp;\r\n \r\n if(DEBUG_PRINT){\r\n for(GPSCoordinate p: coordinateHistory){\r\n System.out.println(\"****************\");\r\n System.out.println(p);\r\n }\r\n }\r\n }else{\r\n coordinateHistory.add(coordinate);\r\n }\r\n }", "public void addPositionToHistory(long ti, double x, double y) {\n synchronized(positionHistory){\n if (positionHistory.size() >= MAXHISTORY) {\n positionHistory.remove(0);\n }\n positionHistory.add(new ActorPositionTimestamp(ti, x, y));\n }\n }", "public void appendPath(GeneralPath path, BuildHistory hist)\r\n {\r\n float offx = isRelative ? hist.history[0].x : 0f;\r\n float offy = hist.history[0].y;\r\n\r\n path.lineTo(x + offx, offy);\r\n hist.setPoint(x + offx, offy);\r\n }", "protected void addMove(Move move) {\n moveHistory.add(move);\n pointer++;\n }", "private void Writehistory (List list, savekq savehistory){\n if (kiemtrasopt(list) < 10) {\n list.add(0, savehistory);\n } else {\n list.remove(9);\n list.add(0, savehistory);\n }\n }", "public void append( double ... coordinate ){\n\t\tif( coordinate.length != 3 )\n\t\t\tthrow new IllegalArgumentException();\n\t\t\n\t\theadCoordinate = coordinate;\n\t\tcount = (count+1)%elementskips;\n\t\t//dont append trails if they are too close together\n\t\tif( coordinates.size()>0 ){\n\t\t\t\n\t\t\tif( count != 0 )\n\t\t\t\treturn;\n\t\t\t\n\t\t}else{\n\t\t\tcoordinates.add(coordinate);\n\t\t\tcurrentElement = (currentElement+1) % maxLength;\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tcurrentElement = (currentElement+1) % maxLength;\n\t\t\n\t\tif( coordinates.size() <= currentElement )\n\t\t\tcoordinates.add(coordinate);\n\t\telse\n\t\t\tcoordinates.set(currentElement, coordinate);\n\t}", "private void addPath(double prevXPos, double prevYPos, double xPos, double yPos) {\n\n\t\tif (penShowing) {\n\t\t\tDouble[] newPath = { prevXPos, prevYPos, xPos, yPos };\n\t\t\tpathList.add(newPath);\n\t\t\tpenColorList.add(screen.getPenColor());\n\t\t\torientationList.add(orientation);\n\n\t\t}\n\t}", "public void move() {\n switch (dir) {\n case 1:\n this.setX(getX() + this.speed);\n moveHistory.add(new int[] {getX() - this.speed, getY()});\n moveHistory.add(new int[] {getX(), getY()});\n break;\n case 2:\n this.setY(getY() - this.speed);\n moveHistory.add(new int[] {getX(), getY() + this.speed});\n moveHistory.add(new int[] {getX(), getY()});\n break;\n case 3:\n this.setX(getX() - this.speed);\n moveHistory.add(new int[] {getX() + this.speed, getY()});\n moveHistory.add(new int[] {getX(), getY()});\n break;\n case 4:\n this.setY(getY() + this.speed);\n moveHistory.add(new int[] {getX(), getY() - this.speed});\n moveHistory.add(new int[] {getX(), getY()});\n break;\n default:\n break;\n }\n }", "private void addHistory(String s) {\r\n\t\tcurrentPlayer.getHistory().add(s);\r\n\t\tif (currentPlayer.getHistory().size() > 6) currentPlayer.getHistory().remove(0);\r\n\t\t//updatePlayArea(currentPlayer, false);\r\n\t}", "public void appendPositionLog(Vector logVar){\n if(positionLog.size() >= this.getLogSize())\n positionLog.remove(0);\n this.positionLog.add(logVar);\n }", "public void addCommandToHistory(String command) {\r\n commandHistory.add(command);\r\n }", "final void add(final Map<PolylineStage,Path2D> appendTo, final double[] coordinates, final int size) {\n int i = 0;\n if (i < size) {\n final Path2D p = destination(appendTo);\n p.moveTo(coordinates[i++], coordinates[i++]);\n while (i < size) {\n p.lineTo(coordinates[i++], coordinates[i++]);\n }\n }\n }", "public void setHistoryEntry(long time)\r\n\t{\r\n\t\tif (updatedLat && updatedLng)\r\n\t\t{\r\n\t\t\tAddressLocation al = new AddressLocation();\r\n\t\t\tal.latitude = latitude.doubleValue();\r\n\t\t\tal.longitude = longitude.doubleValue();\r\n\t\t\tal.time = time;\r\n\t\t\tdataStorage.setAddressLocation(al);\r\n\t\t}\r\n\t\t\t\r\n\t}", "void storeline(String linebuffer, fileInfo pinfo) {\n\t\tint linenum = ++pinfo.maxLine; /* note, no line zero */\n\t\tif (linenum > fileInfo.MAXLINECOUNT) {\n\t\t\tSystem.err.println(\"MAXLINECOUNT exceeded, must stop.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tpinfo.symbol[linenum] = node.addSymbol(linebuffer, pinfo == oldinfo,\n\t\t\t\tlinenum);\n\t}", "private void addToHistory(String msg){\n\t\ttry{\n\t\t\tlockHistory.writeLock().lock();\n\t\t\thistory.add(msg);\n\t\t\tlogOut.write(msg);\n\t\t\tlogOut.newLine();\n\t\t\tlogOut.flush();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tlockHistory.writeLock().unlock();\n\t\t}\n\t}", "protected void addShiftToCache () {\n if (digitalShift == null)\n for (int j = 0; j <= dim; j++)\n cachedCurPoint[j] = 0;\n else\n for (int j = 0; j <= dim; j++)\n cachedCurPoint[j] = digitalShift[j];\n }", "public void newBufLine() {\n this.buffer.add(new ArrayList<Integer>());\n this.columnT = 0;\n this.lineT++;\n }", "protected void addShiftToCache () {\n if (digitalShift == null)\n for (int j = 0; j < dimS; j++)\n cachedCurPoint[j] = 0;\n else\n for (int j = 0; j < dimS; j++)\n cachedCurPoint[j] = digitalShift[j];\n }", "public void setLastRoom(final Room pLastRoom){this.aLastRooms.push(pLastRoom);}", "private static void addToHistory() {\n\t\tFileInputStream fis = null;\n\t\tFileOutputStream fos = null;\n\t\tFileChannel resultChannel = null;\n\t\tFileChannel historyChannel = null;\n\t\ttry {\n\t\t\tfis = new FileInputStream(new File(\"result.txt\"));\n\t\t\tfos = new FileOutputStream(new File(\"history.txt\"), true);\n\t\t\t\n\t\t\tfos.write(\"\\n\\n\".getBytes(\"utf-8\"));\n\t\t\tfos.flush();\n\t\t\t\n\t\t\tresultChannel = fis.getChannel();\n\t\t\thistoryChannel = fos.getChannel();\n\n\t\t\tresultChannel.transferTo(0, resultChannel.size(), historyChannel);\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} finally {\n\t\t\ttry {\n\t\t\t\tif (fis != null) {\n\t\t\t\t\tfis.close();\n\t\t\t\t}\n\t\t\t\tif (fos != null) {\n\t\t\t\t\tfos.close();\n\t\t\t\t}\n\t\t\t\tif(resultChannel != null) {\n\t\t\t\t\tresultChannel.close();\n\t\t\t\t}\n\t\t\t\tif(historyChannel != null) {\n\t\t\t\t\thistoryChannel.close();\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void pushCurPath()\n\t {\n\t \t this.currentpath.simpleAppend((SoNode)( null), -1);\n\t \t}", "private void buildPath() {\r\n int xNext = 1;\r\n int yNext = map.getStartPos() + 1;\r\n CellLayered before = cells[yNext][xNext];\r\n while(true)\r\n {\r\n Byte[] xy = map.getDirection(xNext-1, yNext-1);\r\n xNext = xNext + xy[0];\r\n yNext = yNext + xy[1];\r\n\r\n CellLayered next = cells[yNext][xNext];\r\n\r\n if(xy[0]==-1)\r\n before.setRight(false);\r\n else\r\n before.setRight(true);\r\n before.setPath(true);\r\n if(next==null)\r\n break;\r\n\r\n before.setNextInPath(next);\r\n before = next;\r\n }\r\n }", "public void add(BitData bitData) {\n mHistory.add(bitData);\n while (mHistory.size() > mMaxSize) {\n mHistory.removeFirst();\n }\n }", "void setStatisticsHistorySize(int historySize);", "public void moveToLastAcceptableLocation(){\n\t\tthis.x=this.xTemp;\n\t\tthis.y=this.yTemp;\n\t}", "void addLine(int index, Coordinate start, Coordinate end);", "public void addTwoStepForwardToPositionCache(Key currentKey) {\n\n\t\tKey newKey = createTwoStepForwardFromCurrentKey(currentKey);\n\n\t\t// Gets current values stored with key and adds the extra position\n\t\tSet<Key> currentKeyMapping = positionCache.get(currentKey);\n\t\tcurrentKeyMapping.add(newKey);\n\t\tpositionCache.put(currentKey, currentKeyMapping);\n\t}", "private void backtracking(int index, int len, List<Integer> chain, Map<Integer, List<Integer>> edges) {\n if (!edges.containsKey(index)) {\n return;\n }\n for (int next : edges.get(index)) {\n chain.add(sorted[next]);\n if (len + 1 > max) {\n max = len + 1;\n longest = new ArrayList<Integer>(chain);\n } \n backtracking(next, len + 1, chain, edges);\n chain.remove(chain.size() - 1);\n }\n }", "public void addToHistoryAndUpdate(Position start, Position end, String k) {\n String moveRecord = \"\";\n\n moveRecord = String.format(\"%s %s%d → %s%d\", currentPlayingPiece,\n formatPosition(start.getCol()), 8 - start.getRow(),\n formatPosition(end.getCol()), 8 - end.getRow());\n\n if (!k.equals(\"\")) {\n moveRecord += \" | Killed \" + k;\n }\n\n moveHistory.add(moveRecord);\n\n if (promotionEventHappened) {\n moveHistory.add(String.format(\"%s %s%d > %s\", currentPlayingPiece,\n formatPosition(end.getCol()), 8 - end.getRow(), promotedPiece));\n promotionEventHappened = false;\n }\n }", "@Override\n public void addLast(E e) throws IllegalStateException {\n checkSize();\n data[size] = e;\n size++;\n }", "private void Create_Path() {\n lines = new Line[getPoints().size()];\n for (int i = 1; i < getLines().length; i++) {\n lines[i] = new Line(getPoints().get(way[i]).getX(), getPoints().get(way[i]).getY(), getPoints().get(way[i - 1]).getX(), getPoints().get(way[i - 1]).getY());\n }\n lines[0] = new Line(getPoints().get(way[getLines().length - 1]).getX(), getPoints().get(way[getLines().length - 1]).getY(), getPoints().get(way[0]).getX(), getPoints().get(way[0]).getY());\n\n }", "private void createLeftOver() {\n/* 332 */ int lineLengthBytes = this.currentLastBytePos + 1;\n/* 333 */ if (lineLengthBytes > 0) {\n/* */ \n/* 335 */ this.leftOver = new byte[lineLengthBytes];\n/* 336 */ System.arraycopy(this.data, 0, this.leftOver, 0, lineLengthBytes);\n/* */ } else {\n/* 338 */ this.leftOver = null;\n/* */ } \n/* 340 */ this.currentLastBytePos = -1;\n/* */ }", "private void setPath(){\r\n // get the reversed path\r\n ArrayList<Grid> reversedPath = new ArrayList<>();\r\n int index = _endIndex;\r\n reversedPath.add(_map.get_grid(index));\r\n while(index != _startIndex){\r\n index = _map.get_grid(index).get_parent();\r\n reversedPath.add(_map.get_grid(index));\r\n }\r\n\r\n // get the final path in the correct order\r\n int length = reversedPath.size();\r\n for(int i=length-1;i>=0;i--){\r\n _path.add(reversedPath.get(i));\r\n }\r\n }", "private void setPathLine(Position prevPos, Position newPos) {\n\t\t//Grid coordinates\n\t\tint xStart = prevPos.getX();\n\t\tint yStart = prevPos.getY();\n\t\tint xEnd = newPos.getX();\n\t\tint yEnd = newPos.getY();\n\t\t\n\t\t//Set width/height in pixels of screen dimension\n\t\tfloat xF = (xEnd*PIXEL_WIDTH);\n\t\tfloat yF = (yEnd*PIXEL_HEIGHT);\n\t\t\n\t\t//Check that this grid IS free (ie 0) to draw a path\n\t\tif (checkPathCo(newPos) == 0) {\n\t\t\tsPath.lineTo(xF, yF);\n\t\t\tsetPathCo(newPos,1);\n\t\t\twhile (xStart != xEnd)\n\t\t\t{ //set everything in between as 1 ie undroppable\n\t\t\t\tPosition tmpPos = new Position(xStart, yEnd);\n\t\t\t\tsetPathCo(tmpPos,1);\n\t\t\t\tif (xStart < xEnd)\n\t\t\t\t\txStart++;\n\t\t\t\telse\n\t\t\t\t\txStart--;\n\t\t\t}\n\t\t\t\n\t\t\twhile(yStart < yEnd)\n\t\t\t{ //same as x above\n\t\t\t\tPosition tmpPos = new Position(xEnd,yStart);\n\t\t\t\tsetPathCo(tmpPos,1);\n\t\t\t\tyStart++;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void addFreezeFrame()\n{\n int index = Collections.binarySearch(_freezeFrames, getTime());\n if(index<0)\n _freezeFrames.add(-index - 1, getTime());\n}", "public void helpAdd(Object x, int index) {\n\tif ( _size >= _data.length )\n\t expand();\n\n\tfor( int i = _size; i > index; i-- ) {\n\t _data[i] = _data[i-1]; //each slot gets value of left neighbor\n\t}\n\n\t_data[index] = x;\n\t_size++;\n }", "private void storeUserInputHistory(String input) {\n if (userInputHistoryPointer != userInputHistory.size() - 1\n || (userInputHistoryPointer == userInputHistory.size() - 1\n && !input.equals(userInputHistory.get(userInputHistoryPointer)))) {\n userInputHistory.add(input);\n }\n userInputHistoryPointer = userInputHistory.size();\n currentInput = null;\n }", "private Object appendHistory(final Context ctx, final NumberMgmtHistory history) throws HomeException,\r\n HomeInternalException\r\n {\r\n final Home home = getHome(ctx);\r\n if (!validate(ctx, history))\r\n {\r\n return null;\r\n }\r\n return home.create(ctx, history);\r\n }", "public void addWalkablePath(Point point) {\n\t\tmaze[point.x][point.y] = Block.EMPTY;\n\t}", "@Override\n public EditHistory[] newArray(int size) {\n return new EditHistory[size];\n }", "private ExpandGrid addLine(Grid input_grid, int number, int x, int y, int z, int steps, int x2, int y2, int z2) {\n Grid copy_grid = new Grid(input_grid);\n copy_grid.addLine(number, x, y, z);\n int estimate = manhattanDistance(x, y, x2, y2, z, z2);\n return new ExpandGrid(copy_grid, number, x, y, z, (steps + 1), estimate);\n }", "private void nextHistoryEntry()\n {\n // get next history entry (into input text field)\n if (this.historyPos < this.history.size()) {\n this.historyPos++;\n this.textInput.setText(this.history.get(this.historyPos));\n this.textInput.setSelection(this.history.get(this.historyPos).length());\n // if last index => input text must be cleaned\n } else if (this.historyPos == this.history.size()) {\n this.textInput.setText(\"\"); //$NON-NLS-1$\n this.textInput.setSelection(0);\n }\n }", "private boolean dataToHistory(DataEntry oldEntry) {\n\t\tif (oldEntry != null) {\n\t\t\tif (bufferIndex < MAX_HISTORY_ENTRIES) {\n\t\t\t\toldEntries[bufferIndex++] = new HistoryEntry(oldEntry.getProductId(), oldEntry);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "synchronized protected int appendPoint(int x_p, int y_p, long layer_id) {\n \t\tif (-1 == n_points) setupForDisplay(); //reload\n \t\t//check array size\n \t\tif (p[0].length == n_points) {\n \t\t\tenlargeArrays();\n \t\t}\n \t\tp[0][n_points] = x_p;\n \t\tp[1][n_points] = y_p;\n \t\tp_layer[n_points] = layer_id;\n \t\tn_points++;\n \t\treturn n_points-1;\n \t}", "@Override\n public void insertBack(Item x) {\n if (size == items.length) {\n //dynamic array\n //resize array\n resize(size * RFACTOR);\n }\n items[size] = x;\n size += 1;\n }", "public void addSegment()\n { \n Location tail = new Location();\n \n if(up)\n {\n tail.setA(list.get(0).getA());\n tail.setB(list.get(0).getB()+15);\n }\n else if(down)\n {\n tail.setA(list.get(0).getA());\n tail.setB(list.get(0).getB()-15);\n }\n else if(left)\n {\n tail.setA(list.get(0).getA()+15);\n tail.setB(list.get(0).getB());\n }\n else if(right)\n {\n tail.setA(list.get(0).getA()-15);\n tail.setB(list.get(0).getB());\n } \n \n ArrayList<Location> temp = new ArrayList<Location>();\n \n \n temp.add(tail);\n \n for(int i=0 ; i<list.size() ; i++)\n {\n temp.add(list.get(i));\n }\n list = temp; \n }", "private void setLast(int x, int y) {\n\t\tthis.lastx = x;\n\t\tthis.lasty = y;\n\t}", "public void append(int key) {\r\n\t\tif (size != 0 && key <= keys[size - 1]) {\r\n\t\t\tadd(key);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tint pos = size;\r\n\t\tif (pos >= keys.length) {\r\n\t\t\tint n = ArrayUtils.idealArraySize(pos + 1);\r\n\r\n\t\t\tint[] nkeys = new int[n];\r\n\r\n\t\t\tSystem.arraycopy(keys, 0, nkeys, 0, keys.length);\r\n\r\n\t\t\tkeys = nkeys;\r\n\t\t}\r\n\r\n\t\tkeys[pos] = key;\r\n\t\tsize = pos + 1;\r\n\t}", "private void updateMoveRecord(int[] moveX, int[] moveY, int recordSize) {\n moveRecord = \"\";\r\n for (int ii=0; ii<recordSize; ii++) {\r\n moveRecord += String.valueOf((moveX[ii]-1)*3+moveY[ii]);\r\n }\r\n }", "public final void addHistoryNode(final ShapePicaso shape,\n\t\t\tfinal int operation) {\n\t\tif (operation == Operations.DELETE\n\t\t\t\t|| operation == Operations.DRAW) {\n\t\t\tHistoryNode node = new HistoryNode(shape, operation);\n\t\t\tthis.historyManager.addNewRecord(node);\n\t\t}\n\t}", "private void addNewBoard(int x, int y,\n\t\t\tArrayList<ArrayList<Integer>> board) {\n\t\tif (y < 0 || y > board.size() - 1) { //expanding up/down\n\t\t\tfor (int i = 0; i < boardSize; i++) {\n\t\t\t\tArrayList<Integer> z = new ArrayList<>();\n\t\t\t\tfor (int j = 0; j < board.get(0).size(); j++) {\n\t\t\t\t\tif ((j < x + boardSize && j >= x && x >= 0)) { //adjusts for y if it isn't 0 or negative, almost forgot about this\n\t\t\t\t\t\tz.add(0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tz.add(5);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (y < 0) {\n\t\t\t\t\tboard.add(0, z);\n\t\t\t\t\ty++;\n\t\t\t\t} else {\n\t\t\t\t\tboard.add(z);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfreeSpace += boardSize * boardSize;\n\t\t}\n\t\tif (x < 0 || x > board.get(0).size() - 1) { //expanding to the left/right\n\t\t\tint loc = (x < 0) ? 0 : board.get(0).size();\n\t\t\tfor (int i = 0; i < boardSize; i++) {\n\t\t\t\tfor (int j = 0; j < board.size(); j++) {\n\t\t\t\t\tif (j < y + boardSize && j >= y) {\n\t\t\t\t\t\tboard.get(j).add(loc, 0); //append as opposed to add\n\t\t\t\t\t} else {\n\t\t\t\t\t\tboard.get(j).add(loc, 5); //append lack of board everywhere else\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfreeSpace += boardSize * boardSize;\n\t\t}\n\t\tif ((y >= 0 && y < board.size())\n\t\t\t\t&& (x >= 0 && x < board.get(0).size())\n\t\t\t\t&& getBoard(x, y) == 5) { //If within board\n\t\t\tfor (int i = 0; i < boardSize; i++) {\n\t\t\t\tfor (int j = 0; j < boardSize; j++) {\n\t\t\t\t\tboard.get(y + i).set(x + j, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfreeSpace += boardSize * boardSize;\n\t\t}\n\t\tupdateOffset();\n\t}", "public void setAddNewHistoryRequired(final boolean addNewHistoryRequired)\r\n {\r\n addNewHistoryRequired_ = addNewHistoryRequired;\r\n }", "private static int getHistory(SearchTreeNode parent, MazeState current, MazeProblem problem) {\n\t\treturn parent.history + problem.getCost(current);\n\t}", "public final void addHistoryNode(final ShapePicaso shape,\n\t\t\tfinal int operation, final Object newHist,\n\t\t\tfinal Object oldHist) {\n\t\tif (newHist instanceof SceneCoordinates\n\t\t\t\t&& operation == Operations.MOVE) {\n\t\t\tSceneCoordinates newVal = (SceneCoordinates) newHist;\n\t\t\tSceneCoordinates oldVal = (SceneCoordinates) oldHist;\n\t\t\tHistoryNode node = new HistoryNode(shape,\n\t\t\t\t\toperation, newVal, oldVal);\n\t\t\tthis.historyManager.addNewRecord(node);\n\t\t} else if (newHist instanceof HorizontalAndVerticalScales\n\t\t\t\t&& operation == Operations.RESIZE) {\n\t\t\tHorizontalAndVerticalScales newVal =\n\t\t\t (HorizontalAndVerticalScales) newHist;\n\t\t\tHorizontalAndVerticalScales oldVal =\n\t\t\t (HorizontalAndVerticalScales) oldHist;\n\t\t\tHistoryNode node = new HistoryNode(shape,\n\t\t\t\t\toperation, newVal, oldVal);\n\t\t\tthis.historyManager.addNewRecord(node);\n\t\t}\n\t}", "private void addCycle(int cycle) {\n // Add entries to history in case none is present yet for the given cycle\n if (!historyPackets.containsKey(cycle)) {\n historyPackets.put(cycle, new ArrayList<>());\n }\n if (!historyMoves.containsKey(cycle)) {\n historyMoves.put(cycle, new ArrayList<>());\n }\n if (!historyEnergy.containsKey(cycle)) {\n historyEnergy.put(cycle, new ArrayList<>());\n }\n }", "private void addCommand(byte command) {\r\n if (journal_entries >= command_journal.length) {\r\n // Resize command array.\r\n int grow_size = Math.min(4000, journal_entries);\r\n grow_size = Math.max(4, grow_size);\r\n byte[] new_command_journal = new byte[journal_entries + grow_size];\r\n System.arraycopy(command_journal, 0, new_command_journal, 0,\r\n journal_entries);\r\n command_journal = new_command_journal;\r\n }\r\n\r\n command_journal[journal_entries] = command;\r\n ++journal_entries;\r\n }", "public void add( Comparable newVal ) {\n \t//if _data is full, expand the array\n \tif (_size == _data.length){\n\t \texpand();\n \t}\n \t\n\tset(_lastPos + 1, newVal);\n \t//increases _lastPos and _size\n \t_lastPos++;\n \t_size++;\n }", "public MapObject addPath(Coord... path) {\n if(internalNative != null) {\n long key = internalNative.beginPath();\n for(Coord c : path) {\n internalNative.addToPath(key, c.getLatitude(), c.getLongitude());\n }\n key = internalNative.finishPath(key);\n MapObject o = new MapObject();\n o.mapKey = key;\n markers.add(o);\n return o;\n } else {\n if(internalLightweightCmp != null) {\n LinesLayer ll = new LinesLayer();\n ll.addLineSegment(path);\n\n internalLightweightCmp.addLayer(ll);\n MapObject o = new MapObject();\n o.lines = ll;\n markers.add(o);\n return o;\n } else {\n // TODO: Browser component \n return null;\n }\n }\n }", "private static void addToTraversal(int[][] array, Coordinates coords) {\n arrayTraversal[traversalLength++] = array[coords.row][coords.col];\n }", "@Override\n\tpublic void buildLegLeft() {\n\t\tg.drawLine(60, 100, 40, 140);\n\t}", "public static boolean getPath(int x, int y, ArrayList<Point> path) {\n\t\tif (x > size-1 || y > size-1 || !isFree(x, y)) { // !isFree -> [x][y] = 0\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tboolean isAtFinal = (x == size-1) && (y == size-1); //destination: 5, 5\n\t\t\n\t\t//if there is a path from my current to end, add it\n\t\tif(isAtFinal || getPath(x, y+1, path) || getPath(x+1, y, path)){\n\t\t\tPoint p = new Point(x,y);\n\t\t\tpath.add(p);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public void updateBuffer(final int input) {\n\n // Check for null pointers on buffer line\n if(this.buffer.get(lineT).isEmpty() || this.lineT == this.buffer.get(lineT).size()) \n this.buffer.get(lineT).add(input);\n \n else { \n if(this.inputMode) // Insert mode\n this.buffer.get(lineT).add(columnT, input);\n else // Overwrite mode\n this.buffer.get(lineT).set(columnT, input);\n }\n this.columnT++; // Increase one unit column target position\n }", "private void addUndoStep(IHexEditorCommand comm) {\n\t\tif (!comm.execute())\n\t\t\treturn;\n\t\tint maxundo = Activator.getDefault().getPreferenceStore().getInt(HexEditorConstants.PROPERTY_MAX_UNDO_STEPS);\n\n\t\tundolist.push(comm);\n\t\tredolist.clear();\n\n\t\tif (maxundo > 0 && undolist.size() > maxundo) {\n\t\t\tundolist.remove(0);\n\t\t}\n\n\t\thexEditor.setDirty(true);\n\t\tupdateActions();\n\t}", "org.openxmlformats.schemas.drawingml.x2006.main.CTPath2D addNewPath();", "@Override\r\n\tpublic void BuildLegLeft() {\n\t\tg.drawLine(60, 100, 45, 150);\r\n\t}", "public void setPath(int sender, Stack<Integer> prevPath)\n { \n if (prevPath.isEmpty() || prevPath.peek()!=sender)\n prevPath.push(sender);\n path = (Stack)prevPath.clone();\n }", "public void addAccessRequestHistory(AccessRequestHistoryItem item) {\n if (!getAccessRequestHistory().contains(item)) {\n getAccessRequestHistory().add(item);\n }\n }", "private void addWaypoint(int a_x, int a_y)\n {\n if(!isObstacle(m_grid[a_x][a_y]) && m_waypoints.size() < m_maxNumWaypoints)\n {\n m_grid[a_x][a_y] = Map.WAYPOINT;\n m_waypoints.add(new Vector2d(a_x,a_y));\n frame.updateNumWaypoints(m_waypoints.size());\n }\n }", "final public void updatePath(EventPacket<?> in) {\n if (!pathsEnabled) {\n return;\n }\n path.add(new PathPoint(location.x, location.y, in.getLastTimestamp(), numEvents - previousNumEvents));\n previousNumEvents = numEvents;\n if (path.size() > getPathLength()) {\n path.remove(path.get(0));\n }\n updateVelocity();\n }", "public void add(AState state){ this.path_solution.add(0,state);}", "public void makePath() {\n\t\tQueue<GamePoint> newPath = new LinkedList<GamePoint>();\n\t\ttarget.setOnMouseEntered(e -> target.getGrid().setGridLinesVisible(true));\n\t\ttarget.setOnMouseExited(e -> target.getGrid().setGridLinesVisible(false));\n\t\ttarget.setOnMouseDragged(e -> targetSetOnMouseDragged(target, e, newPath));\n\t\ttarget.setOnMouseReleased(e -> replacePath(newPath));\n\t}", "private void addLine(int number, int x, int y, int z) {\n grid[x][y][z] = \"L\" + number;\n }", "public void push(Employee employee){\n if(isFull()){\n Employee[] newArray = new Employee[2 * employeeStack.length];\n // System.arraycopy(srcArray, srcPos, destisnationArray, destPos, length);\n System.arraycopy(employeeStack, 0, newArray, 0, employeeStack.length);\n employeeStack = newArray;\n }\n employeeStack[top++] = employee;\n }", "public void addLocation(int x, int y){\n locations[loc][0] = x;\n locations[loc][1] = y;\n loc++;\n }", "private void grow() {\n int growSize = size + (size<<1);\n array = Arrays.copyOf(array, growSize);\n }", "private void addToOperationHistory(UndoableTextChange edit) {\n \t\tif (!fFoldingIntoCompoundChange\n \t\t\t\t|| edit instanceof UndoableCompoundTextChange) {\n \t\t\tfHistory.add(edit);\n \t\t\tfLastAddedTextEdit= edit;\n \t\t}\n \t}", "public List<MapPoint> buildPath(MapPoint point) { // Palauttaa polun alusta loppuun listana.\n List<MapPoint> finalPath = new ArrayList<>();\n MapPoint tempPoint = point;\n while (true) {\n finalPath.add(0, tempPoint);\n \n if (!tempPoint.hasPrevious()) {\n break;\n }\n tempPoint = tempPoint.getPrevious();\n }\n return finalPath; \n }", "@Override\n public void move() {\n _location.x++;\n }", "public void NewTrail(float[] positions, float trailLength)\n {\n float distanceBetweenEffects = trailLength / instantiateNumber;\n Log.d(\"--WTF--\",\"tl \" + trailLength + \"dbe \" + distanceBetweenEffects);\n //trail.clear();\n trail.get(0).Set(getWorldCoords(new Vec2(positions[0], positions[1]))); // początek\n\n float currUnusedLength = 0f;\n int effects = 1;\n for (int i = 2; i < positions.length; i=i+2)\n {\n // reszta odl. z poprzednich punktow + dystans miedzy tym pkt a poprzednim\n Vec2 A = new Vec2(positions[i-2],positions[i-1]);\n Vec2 B = new Vec2(positions[i],positions[i+1]);\n float distanceBetweenPoints = GetPointsDistance(A,B);\n currUnusedLength = currUnusedLength + distanceBetweenPoints;\n if(currUnusedLength > distanceBetweenEffects)\n {\n // jest wiekszy od odleglosci miedzy kolejnymi efektami, oznacza to ze\n // juz nie czas na umieszczenie kolejnego efektu\n float d = distanceBetweenPoints - (currUnusedLength-distanceBetweenEffects);\n float Xac = d * (B.X()-A.X())/distanceBetweenPoints;\n float Yac = d * (B.Y()-A.Y())/distanceBetweenPoints;\n\n if(effects < instantiateNumber)trail.get(effects).Set(getWorldCoords(new Vec2(A.X()+Xac, A.Y()+Yac)));\n else break;\n\n effects++;\n currUnusedLength = (currUnusedLength-distanceBetweenEffects);\n }\n }\n if(effects <= instantiateNumber)sqNumber = effects;\n else sqNumber = instantiateNumber;\n showThem = true;\n showBigStar = false;\n }", "public void addEvent(Event event) {\n if (numEvents > maxLength - 1) {\n System.out.println(\"Heap is full. Exiting..\");\n System.exit(0);\n }\n eventArray[numEvents++] = event;\n siftUp(numEvents - 1);\n\n }", "synchronized protected int addPoint(int x_p, int y_p, long layer_id, double magnification) {\n \t\tif (-1 == n_points) setupForDisplay(); //reload\n \t\t//lookup closest point and then get the closest clicked point to it\n\t\tint index = 0;\n\t\tif (n_points > 1) index = findClosestSegment(x_p, y_p, layer_id, magnification);\n \t\t//check array size\n \t\tif (p[0].length == n_points) {\n \t\t\tenlargeArrays();\n \t\t}\n \t\t//decide:\n \t\tif (0 == n_points || 1 == n_points || index + 1 == n_points) {\n \t\t\t//append at the end\n \t\t\tp[0][n_points] = x_p;\n \t\t\tp[1][n_points] = y_p;\n \t\t\tp_layer[n_points] = layer_id;\n \t\t\tindex = n_points;\n \n \t\t\tlast_autotrace_start = -1;\n \t\t} else if (-1 == index) {\n \t\t\t// decide whether to append at the end or prepend at the beginning\n \t\t\t// compute distance in the 3D space to the first and last points\n \t\t\tfinal double[] sqd0N = sqDistanceToEndPoints(x_p, y_p, layer_id);\n \t\t\t//final double sqdist0 = sqd0N[0];\n \t\t\t//final double sqdistN = sqd0N[1];\n \n \t\t\t//if (sqdistN < sqdist0)\n \t\t\tif (sqd0N[1] < sqd0N[0]) {\n \t\t\t\t//append at the end\n \t\t\t\tp[0][n_points] = x_p;\n \t\t\t\tp[1][n_points] = y_p;\n \t\t\t\tp_layer[n_points] = layer_id;\n \t\t\t\tindex = n_points;\n \n \t\t\t\tlast_autotrace_start = -1;\n \t\t\t} else {\n \t\t\t\t// prepend at the beginning\n \t\t\t\tfor (int i=n_points-1; i>-1; i--) {\n \t\t\t\t\tp[0][i+1] = p[0][i];\n \t\t\t\t\tp[1][i+1] = p[1][i];\n \t\t\t\t\tp_layer[i+1] = p_layer[i];\n \t\t\t\t}\n \t\t\t\tp[0][0] = x_p;\n \t\t\t\tp[1][0] = y_p;\n \t\t\t\tp_layer[0] = layer_id;\n \t\t\t\tindex = 0;\n \n \t\t\t\tif (-1 != last_autotrace_start) last_autotrace_start++;\n \t\t\t}\n \t\t} else {\n \t\t\t//insert at index:\n \t\t\tindex++; //so it is added after the closest point;\n \t\t\t// 1 - copy second half of array\n \t\t\tint sh_length = n_points -index;\n \t\t\tdouble[][] p_copy = new double[2][sh_length];\n \t\t\tlong[] p_layer_copy = new long[sh_length];\n \t\t\tSystem.arraycopy(p[0], index, p_copy[0], 0, sh_length);\n \t\t\tSystem.arraycopy(p[1], index, p_copy[1], 0, sh_length);\n \t\t\tSystem.arraycopy(p_layer, index, p_layer_copy, 0, sh_length);\n \t\t\t// 2 - insert value into 'p' (the two control arrays get the same value)\n \t\t\tp[0][index] = x_p;\n \t\t\tp[1][index] = y_p;\n \t\t\tp_layer[index] = layer_id;\n \t\t\t// 3 - copy second half into the array\n \t\t\tSystem.arraycopy(p_copy[0], 0, p[0], index+1, sh_length);\n \t\t\tSystem.arraycopy(p_copy[1], 0, p[1], index+1, sh_length);\n \t\t\tSystem.arraycopy(p_layer_copy, 0, p_layer, index+1, sh_length);\n \n \t\t\t// Reset autotracing records\n \t\t\tif (index < last_autotrace_start) {\n \t\t\t\tlast_autotrace_start++;\n \t\t\t}\n \t\t}\n \t\t//add one up\n \t\tthis.n_points++;\n \n \t\treturn index;\n \t}", "private void addToMoves(char move) {\n this.prevMoves += move;\n }", "public void add(E value){\n if (maxIndex != array.length-1){\n array[++maxIndex] = value;\n }else {\n Object[] tmpArray = new Object[array.length+ capacity];\n for (int i = 0; i < array.length; i++) {\n tmpArray[i] = array[i];\n }\n array = tmpArray;\n array[++maxIndex] = value;\n }\n }", "public void insertRight( long j ) {\n if ( end == max - 1 ) {\n end = -1;\n }\n Array[++end] = j;\n nItems++;\n }", "public double getLastMoved();", "public void appendPath(LinkedList newTree) {\n EtmPoint current = (EtmPoint) newTree.removeFirst();\n\n ExecutionAggregate aggregate = getChild(current.getName());\n\n if (newTree.isEmpty()) {\n aggregate.addTransaction(current);\n } else {\n aggregate.appendPath(newTree);\n }\n }", "protected Expression addCurrentToSingleKeyList(Expression expression) {\n if (DataStoreValidationUtil.isLocationPath(expression)) {\n LocationPath locationPath = (LocationPath) expression;\n Step[] steps = locationPath.getSteps();\n Step[] newSteps = new Step[steps.length];\n boolean changed = false;\n for (int index = 0; index < steps.length; index++) {\n if (steps[index].getPredicates().length == 1 && DataStoreValidationUtil.isLocationPath(steps[index].getPredicates()[0])) {\n LocationPath childPath = (LocationPath) steps[index].getPredicates()[0];\n if (childPath.getSteps().length == 1) {\n Expression[] newExpressions = new Expression[1];\n newExpressions[0] = JXPathUtils.getExpression(childPath.toString() + \"=\" + DataStoreValidationUtil.CURRENT_PATTERN);\n Step oldStep = steps[index];\n if (oldStep.getNodeTest() instanceof NodeNameTest) {\n NodeNameTest node = (NodeNameTest) oldStep.getNodeTest();\n YangStep newStep = new YangStep(node.getNodeName(), node.getNamespaceURI(), newExpressions);\n newSteps[index] = newStep;\n changed = true;\n } else {\n newSteps[index] = steps[index];\n }\n } else {\n newSteps[index] = steps[index];\n }\n } else {\n newSteps[index] = steps[index];\n }\n }\n\n if (changed) {\n return new LocationPath(locationPath.isAbsolute(), newSteps);\n }\n } else if (DataStoreValidationUtil.isCoreOperation(expression)) {\n CoreOperation operation = (CoreOperation) expression;\n Expression[] expressions = operation.getArguments();\n Expression[] newExpressions = new Expression[expressions.length];\n boolean changed = false;\n for (int index = 0; index<expressions.length;index++) {\n newExpressions[index] = addCurrentToSingleKeyList(expressions[index]);\n if (!newExpressions[index].equals(expressions[index])) {\n changed =true;\n }\n }\n if (changed) {\n return JXPathUtils.getCoreOperation(operation, newExpressions);\n }\n } else if (DataStoreValidationUtil.isFunction(expression)) {\n CoreFunction function = (CoreFunction) expression;\n Expression[] expressions = function.getArguments();\n Expression[] newExpressions = new Expression[expressions.length];\n boolean changed = false;\n for (int index = 0; index<expressions.length;index++) {\n newExpressions[index] = addCurrentToSingleKeyList(expressions[index]);\n if (!newExpressions[index].equals(expressions[index])) {\n changed =true;\n }\n }\n if (changed) {\n return JXPathUtils.getCoreFunction(function.getFunctionCode(), newExpressions);\n }\n }\n\n return expression;\n }", "private void addPath(List<Position> positions, Node path) {\n while (path.parent != null) {\n positions.add(new Position(path.getPos().x, path.getPos().y));\n path = path.parent;\n }\n }", "private void setHistory(final CreateUrlRequest request)\n {\n String token = Session.getInstance().generateUrl(request);\n History.newItem(token, true);\n }", "org.openxmlformats.schemas.drawingml.x2006.main.CTPath2D insertNewPath(int i);", "private void addRecordToOverflow(byte [] input, int startLocation) {\n try {\n // Writing a field to the overflow file\n RandomAccessFile raf = new RandomAccessFile(this.databaseName + \".overflow\", \"rws\");\n\n raf.getChannel().position(startLocation);\n raf.write(input);\n raf.close();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }", "public void addLast(int key)\r\n {\r\n if(numItems < maxSize)\r\n {\r\n mArray[numItems] = key;\r\n numItems++;\r\n }\r\n\r\n }", "public void makeLine() {\n \t\tList<Pellet> last_two = new LinkedList<Pellet>();\n \t\tlast_two.add(current_cycle.get(current_cycle.size() - 2));\n \t\tlast_two.add(current_cycle.get(current_cycle.size() - 1));\n \n \t\tPrimitive line = new Primitive(GL_LINES, last_two);\n \t\tMain.geometry.add(line);\n \n \t\tActionTracker.newPolygonLine(line);\n \t}", "private void addLastValueToTable(){\n\t\t//System.out.println(theModelColumn.size()-1);\n\t\tsetValueAt(theModelColumn.get(theModelColumn.size()-1).getX(), theModelColumn.size()-1, 0);\n\t\tsetValueAt(theModelColumn.get(theModelColumn.size()-1).getY(), theModelColumn.size()-1, 1);\n\t\tsetValueAt(theModelColumn.get(theModelColumn.size()-1).getWidth(), theModelColumn.size()-1, 2);\n\t\tsetValueAt(theModelColumn.get(theModelColumn.size()-1).getHeight(), theModelColumn.size()-1, 3);\n\t}", "void addRecord(HistoryRecord record) throws IOException;", "private void addToMoveQueue() {\n\t\tSimulation.INSTANCE.getMoveQueue().offer(new Move(prevNode, currentNode));\n\t}", "public void addLast(Item x) {\n if (size == items.length) {\n resize(size * 2);\n }\n items[size] = x;\n size += 1;\n }", "private void undoLastPoint() {\n \t\tif ( this.markers.isEmpty() ) {\n \t\t\treturn;\n \t\t}\n \n \t\tthis.markers.remove( this.markers.size() - 1 ).remove();\n \t\tthis.commitPolygon();\n \n \t\tif ( this.markers.size() > 1 ) {\n \t\t\tthis.moveCameraToPolygon( true );\n \t\t}\n \n \t\tthis.disableIfDissatisfied();\n \t}", "public void renewImage() {\r\n\t\t//myHistoryManager.clearHistory();\r\n\t\tindexes.clear();\r\n\t\tcache.clear();\r\n\t\tcolorCache.clear();\r\n\t\tstrokeSizes.clear();\r\n\t\t\r\n//\t\tfor (AbstractHistory tempHistory : newHistorys) {\r\n//\t\t\tmyHistoryManager.addHistory(tempHistory);\r\n//\t\t}\r\n\r\n\t\tsurface.clear();\r\n\t\tint start = 0;\r\n\t\tfor (start = 0; start < myHistoryManager.historys.size(); start++) {\r\n\r\n\t\t\tAbstractHistory history = myHistoryManager.historys.get(start);\r\n\t\t\tif (history.getType() == \"AddHistory\") {\r\n\r\n\t\t\t\tPoint endPos = ((AddHistory) history).endPos;\r\n\t\t\t\tMyColor pathColor = ((AddHistory) history).pathColor;\r\n\t\t\t\tstrokeSize = ((AddHistory) history).strokeSize;\r\n\t\t\t\tdouble x = endPos.getVector2().getX();\r\n\t\t\t\tdouble y = endPos.getVector2().getY();\r\n\r\n\t\t\t\tif (strokePointCount == 2) {\r\n\t\t\t\t\tcanvas_context.setStrokeStyle(pathColor.getColorCode());\r\n\t\t\t\t\tcanvas_context.setFillStyle(pathColor.getColorCode());\r\n\t\t\t\t\tcanvas_context.setLineWidth(((double) strokeSize) * 0.5);\r\n\t\t\t\t\tcanvas_context.setLineCap(LineCap.ROUND);\r\n\t\t\t\t\tcanvas_context.setLineJoin(LineJoin.ROUND);\r\n\t\t\t\t\tcanvas_context.setShadowBlur(((double) strokeSize) * 0.3);\r\n\t\t\t\t\tcanvas_context.setShadowColor(pathColor.getColorCode());\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* get the x, y */\r\n\t\t\t\t\tp3.x = x;\r\n\t\t\t\t\tp3.y = y;\r\n\t\t\t\t\tp0.x = p1.x + (p1.x - p2.x);\r\n\t\t\t\t\tp0.y = p1.y + (p1.y - p2.y);\r\n\t\t\t\t\tstrokePointCount++;\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t\tget_buffer(p0, p1, p2, p3, bufferCount);\r\n\t\t\t\t\tbufferCount = buffList.size();\r\n\t\t\t\t\toldx = (int) buffList.get(0).x;\r\n\t\t\t\t\toldy = (int) buffList.get(0).y;\r\n\t\t\t\t\tcanvas_context.beginPath();\r\n\t\t\t\t\tcanvas_context.moveTo(oldx, oldy);\r\n\t\t\t\t\tcache.add(new Vector2(oldx, oldy));\r\n\t\t\t\t\t\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * draw all interpolated points found through Hermite\r\n\t\t\t\t\t * interpolation\r\n\t\t\t\t\t */\r\n\t\t\t\t\tint i = 1;\r\n\t\t\t\t\tfor (i = 1; i < bufferCount - 2; i++) {\r\n\t\t\t\t\t\tx = buffList.get(i).x;\r\n\t\t\t\t\t\ty = buffList.get(i).y;\r\n\t\t\t\t\t\tcache.add(new Vector2(x, y));\r\n\t\t\t\t\t\tdouble nextx = buffList.get(i + 1).x;\r\n\t\t\t\t\t\tdouble nexty = buffList.get(i + 1).y;\r\n\t\t\t\t\t\tdouble c = (x + nextx) / 2;\r\n\t\t\t\t\t\tdouble d = (y + nexty) / 2;\r\n\t\t\t\t\t\tcanvas_context.quadraticCurveTo(x, y, c, d);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tx = buffList.get(i).x;\r\n\t\t\t\t\ty = buffList.get(i).y;\r\n\t\t\t\t\tcache.add(new Vector2(x, y));\r\n\t\t\t\t\tdouble nextx = buffList.get(i + 1).x;\r\n\t\t\t\t\tdouble nexty = buffList.get(i + 1).y;\r\n\t\t\t\t\tcache.add(new Vector2(nextx, nexty));\r\n\t\t\t\t\t\r\n\t\t\t\t\tcanvas_context.quadraticCurveTo(x, y, nextx, nexty);\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* adaptive buffering using Hermite interpolation */\r\n\t\t\t\t\tint distance = (int) Math.sqrt(Math.pow(x - p2.x, 2)\r\n\t\t\t\t\t\t\t+ Math.pow(y - p2.y, 2));\r\n\t\t\t\t\tbufferCount = ((int) distance / 10) > 6 ? 6 : 3;\r\n\t\t\t\t\tbufferCount = bufferCount < 10 ? bufferCount : 10;\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\tcolorCache.remove(colorCache.size()-1);\r\n\t\t\t\t\tcolorCache.add(pathColor);\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\t/* update the touch point list */\r\n\t\t\t\t\tp0.x = p1.x;\r\n\t\t\t\t\tp0.y = p1.y;\r\n\t\t\t\t\tp1.x = p2.x;\r\n\t\t\t\t\tp1.y = p2.y;\r\n\t\t\t\t\tp2.x = p3.x;\r\n\t\t\t\t\tp2.y = p3.y;\r\n\t\t\t\t\tp3.x = x;\r\n\t\t\t\t\tp3.y = y;\r\n\r\n\t\t\t\t\tget_buffer(p0, p1, p2, p3, bufferCount);\r\n\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * draw all interpolated points found through Hermite\r\n\t\t\t\t\t * interpolation\r\n\t\t\t\t\t */\r\n\t\t\t\t\tbufferCount = buffList.size();\r\n\t\t\t\t\tint i = 1;\r\n\t\t\t\t\tfor (i = 1; i < bufferCount - 2; i++) {\r\n\t\t\t\t\t\tx = buffList.get(i).x;\r\n\t\t\t\t\t\ty = buffList.get(i).y;\r\n\t\t\t\t\t\tcache.add(new Vector2(x, y));\r\n\t\t\t\t\t\tdouble nextx = buffList.get(i + 1).x;\r\n\t\t\t\t\t\tdouble nexty = buffList.get(i + 1).y;\r\n\t\t\t\t\t\tdouble c = (x + nextx) / 2;\r\n\t\t\t\t\t\tdouble d = (y + nexty) / 2;\r\n\t\t\t\t\t\tcanvas_context.quadraticCurveTo(x, y, c, d);\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\tx = buffList.get(i).x;\r\n\t\t\t\t\ty = buffList.get(i).y;\r\n\t\t\t\t\tcache.add(new Vector2(x, y));\r\n\t\t\t\t\t\r\n\t\t\t\t\tdouble nextx = buffList.get(i + 1).x;\r\n\t\t\t\t\tdouble nexty = buffList.get(i + 1).y;\r\n\t\t\t\t\tcache.add(new Vector2(nextx, nexty));\r\n\t\t\t\t\t\r\n\t\t\t\t\tcanvas_context.quadraticCurveTo(x, y, nextx, nexty);\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* adaptive buffering using Hermite interpolation */\r\n\t\t\t\t\tint distance = (int) Math.sqrt(Math.pow(x - p2.x, 2)\r\n\t\t\t\t\t\t\t+ Math.pow(y - p2.y, 2));\r\n\t\t\t\t\tbufferCount = ((int) distance / 10) > 6 ? 6 : 3;\r\n\t\t\t\t\tbufferCount = bufferCount < 10 ? bufferCount : 10;\r\n\t\t\t\t\t// logger.log(Level.SEVERE, \"bufferCount \"+\r\n\t\t\t\t\t// bufferCount);\r\n\t\t\t\t}\r\n\r\n\t\t\t} else if (history.getType() == \"PathHeadHistory\") {\r\n\t\t\t\t\r\n\t\t\t\tMyColor pathColor = ((PathHeadHistory) history).pathColor;\r\n\t\t\t\tstrokeSize = ((PathHeadHistory) history).strokeSize;\r\n\t\t\t\t\r\n\t\t\t\tPoint position = ((PathHeadHistory) history).position;\r\n\t\t\t\tdouble x = position.getVector2().getX();\r\n\t\t\t\tdouble y = position.getVector2().getY();\r\n\t\t\t\tstrokePointCount = 0;\r\n\r\n\t\t\t\t/* initialize the points */\r\n\t\t\t\tp1.x = x;\r\n\t\t\t\tp1.y = y;\r\n\t\t\t\tp2.x = x;\r\n\t\t\t\tp2.y = y;\r\n\t\t\t\tstrokePointCount++;\r\n\t\t\t\tstrokePointCount++;\r\n\t\t\t\tcanvas_context.stroke();\r\n\t\t\t\t\r\n\t\t\t\t/* add index to indexes list */\r\n\t\t\t\tindexes.add(cache.size());\r\n\t\t\t\tcache.add(new Vector2(x, y));\r\n\t\t\t\tstrokeSizes.add(strokeSize);\r\n\t\t\t\tcolorCache.add(pathColor);\r\n\t\t\t\t\r\n\t\t\t\t/* set stroke color, size, and shadow */\r\n\t\t\t\tcanvas_context.setStrokeStyle(pathColor.getColorCode());\r\n\t\t\t\tcanvas_context.setFillStyle(pathColor.getColorCode());\r\n\t\t\t\tcanvas_context.setLineWidth(((double) strokeSize) * 0.4);\r\n\t\t\t\tcanvas_context.beginPath();\r\n\t\t\t\tcanvas_context.arc(x, y, ((double) strokeSize) * 0.4, 0,\r\n\t\t\t\t\t\t2 * Math.PI);\r\n\t\t\t\tcanvas_context.fill();\r\n\t\t\t\t\r\n\t\t\t\tbufferCount = 3;\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\tcanvas_context.stroke();\r\n\t\tstrokePointCount = 0;\r\n\t}", "public List<Vertex> newPath() {\r\n\t\tList<Vertex> Pathchange = new ArrayList<Vertex>();\r\n\t\tList<Vertex> tempPath = new ArrayList<Vertex>();\r\n\t\tint BestEval = Integer.MAX_VALUE;\r\n\t\tVertex changeVertexV1 = new Vertex();\r\n\t\tVertex changeVertexV2 = new Vertex();\r\n\r\n\t\tfor (int position = 0; position < this.LastPath.size() - 1; position++) {\r\n\t\t\tfor (int changement = position+1; changement < this.LastPath.size(); changement++) {\r\n\r\n\t\t\t\ttempPath.clear();\r\n\t\t\t\ttempPath = new ArrayList<Vertex>(this.LastPath);\r\n\t\t\t\tif (!(this.TabuListV1.contains(tempPath.get(position)) || this.TabuListV1.contains(tempPath.get(changement)) || this.TabuListV2.contains(tempPath.get(position)) || this.TabuListV2.contains(tempPath.get(changement)))) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tCollections.swap(tempPath, position, changement);\r\n\t\t\t\t\tif (this.fit(tempPath) < BestEval) {\r\n\t\t\t\t\t\tPathchange.clear();\r\n\t\t\t\t\t\tPathchange = new ArrayList<Vertex>(tempPath);\r\n\t\t\t\t\t\tchangeVertexV1 = tempPath.get(position);\r\n\t\t\t\t\t\tchangeVertexV2 = tempPath.get(changement);\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(this.tabuElementType == 0) {\r\n\t\t\tthis.TabuListV1.add(0, changeVertexV1);\r\n\t\t}else if(this.tabuElementType == 1) {\r\n\t\t\tthis.TabuListV2.add(0, changeVertexV2);\r\n\t\t}else {\r\n\t\t\tthis.TabuListV1.add(0, changeVertexV1);\r\n\t\t\tthis.TabuListV2.add(0, changeVertexV2);\r\n\t\t}\r\n\t\t\r\n\t\tif (this.TabuListV1.size() > this.TabuListSize) {\r\n\t\t\tthis.TabuListV1.remove(this.TabuListV1.size() - 1);\r\n\t\t}\r\n\t\tif (this.TabuListV2.size() > this.TabuListSize) {\r\n\t\t\tthis.TabuListV2.remove(this.TabuListV2.size() - 1);\r\n\t\t}\r\n\r\n\t\treturn Pathchange;\r\n\t}" ]
[ "0.6434418", "0.5616547", "0.56123376", "0.53736013", "0.5271382", "0.5154404", "0.5135348", "0.51031077", "0.5094183", "0.5016407", "0.5013843", "0.4987681", "0.49870807", "0.49821877", "0.49725014", "0.49667463", "0.49590462", "0.49208713", "0.49203867", "0.48874012", "0.48839828", "0.4865461", "0.48611835", "0.48423436", "0.48330733", "0.48317376", "0.4820718", "0.48179838", "0.4815618", "0.47795075", "0.47711354", "0.47664517", "0.47562402", "0.4752843", "0.47355354", "0.47304782", "0.47280923", "0.4721817", "0.471387", "0.4711114", "0.47071195", "0.4705764", "0.46669814", "0.46545976", "0.46414167", "0.4639705", "0.46312967", "0.462652", "0.46246636", "0.461597", "0.46138504", "0.4610138", "0.46017537", "0.45848486", "0.45837978", "0.4578034", "0.45690662", "0.45669386", "0.45601323", "0.45573437", "0.45552558", "0.45476773", "0.45455933", "0.45392737", "0.4537881", "0.45345306", "0.4525102", "0.45213205", "0.4520286", "0.45135942", "0.45131174", "0.45117852", "0.45081726", "0.44978738", "0.4495986", "0.44937533", "0.44896162", "0.44885096", "0.44862095", "0.44775608", "0.44746494", "0.44630876", "0.44600147", "0.44556004", "0.44555765", "0.44485325", "0.4445422", "0.44426033", "0.44380102", "0.4434368", "0.4432735", "0.4431696", "0.4426186", "0.4422348", "0.44203925", "0.44191733", "0.4417357", "0.44122276", "0.4407898", "0.44075274" ]
0.6387642
1
Get the heading in radians
public double calculateHeadingRadians(){ if(coordinateHistory.size() > 2){ GPSCoordinate firstPoint = coordinateHistory.get(coordinateHistory.size() - 2); GPSCoordinate secondPoint = coordinateHistory.get(coordinateHistory.size() - 1); if(!firstPoint.compareTo(secondPoint)){ double latA = firstPoint.getLatitude(); double longA = firstPoint.getLongitude(); double latB = secondPoint.getLatitude(); double longB = secondPoint.getLongitude(); double X = Math.cos(latB) * Math.sin(longB - longA); double Y = (Math.cos(latA) * Math.sin(latB)) - (Math.sin(latA) * Math.cos(latB) * Math.cos(longB - longA)); headingRadians = - Math.atan2(X, Y); return headingRadians; }else{ return headingRadians; } }else{ return headingRadians; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getHeadingInDegrees(){\r\n double headingRadians = calculateHeadingRadians();\r\n return headingRadians * 180 / Math.PI;\r\n }", "public double getHeading() {\n return Rotation2d.fromDegrees(m_gyro.getAngle()).getDegrees();\n }", "private float getHeading() {\n Orientation anglesA = robot.imu.getAngularOrientation(\n AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n return AngleUnit.DEGREES.normalize(\n AngleUnit.DEGREES.fromUnit(anglesA.angleUnit, anglesA.firstAngle));\n }", "public Rotation2d getHeading() {\n return Rotation2d.fromDegrees(Math.IEEEremainder(gyro.getAngle(), 360) * (Const.kGyroReversed ? -1.0 : 1.0));\n }", "public double getHeading() {\n return imu.getAngularOrientation().firstAngle;\n }", "float getDir() {\n return degrees(_rotVector.heading());\n }", "public double getRolledHeading() {\n double heading = 360.0 - getRawHeading();\n if (lastHeading < 100 && heading > 300) {\n rotationAmt--;\n } else if (heading < 100 && lastHeading > 300) {\n rotationAmt++;\n }\n lastHeading = heading;\n return heading + rotationAmt * 360.0;\n }", "float getHeading();", "float getHeading();", "float getHeading();", "public Double getCompassHeading() {\n\t\treturn compassHeading;\n\t}", "public double getAngle() {\n\treturn CVector.heading(v1, v2);\n }", "public double radians() {\n return Math.toRadians(this.degrees);\n }", "double getHeading() {\n if( CACHE_IMU_READING && loop_cnt_==last_imu_read_loop_id_ ) {\n // return the existing heading when getHeading() is called in the same loop\n return heading_ ;\n }\n\n heading_ = 0;\n if( USE_IMU && imu_!=null && imu_init_ok_ ) {\n imu_angles_ = imu_.getAngularOrientation().toAxesReference(AxesReference.INTRINSIC).toAxesOrder(AxesOrder.ZYX); // acquiring angles are expensive, keep it minimal\n // IMU can automatically detect orientation, and return heading as first angle, 2020/01/25\n heading_ = AngleUnit.DEGREES.normalize(imu_angles_.firstAngle);\n last_imu_read_loop_id_ = loop_cnt_;\n } else if( USE_IMU2 && imu2_!=null && imu2_init_ok_ ) {\n // use IMU2 if IMU failed\n imu2_angles_ = imu2_.getAngularOrientation().toAxesReference(AxesReference.INTRINSIC).toAxesOrder(AxesOrder.ZYX);\n heading_ = AngleUnit.DEGREES.normalize(imu2_angles_.firstAngle);\n last_imu_read_loop_id_ = loop_cnt_;\n }\n return heading_;\n }", "double readImuHeading() {\n double h = -360.0;\n if( USE_IMU && imu_!=null && imu_init_ok_ ) {\n h = imu_.getAngularOrientation().firstAngle;\n }\n return h;\n }", "private double getAngle() {\n // We experimentally determined the Z axis is the axis we want to use for\n // heading angle. We have to process the angle because the imu works in\n // euler angles so the Z axis is returned as 0 to +180 or 0 to -180\n // rolling back to -179 or +179 when rotation passes 180 degrees. We\n // detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC,\n AxesOrder.ZYX, AngleUnit.DEGREES);\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return globalAngle;\n }", "public float getHeading() {\n return heading_;\n }", "public float getHeading() {\n return heading_;\n }", "private double getAngle()\n {\n // We experimentally determined the Z axis is the axis we want to use for heading angle.\n // We have to process the angle because the imu works in euler angles so the Z axis is\n // returned as 0 to +180 or 0 to -180 rolling back to -179 or +179 when rotation passes\n // 180 degrees. We detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return globalAngle;\n }", "public float getHeading() {\n return heading_;\n }", "public float getHeading() {\n return heading_;\n }", "public float getHeading() {\n return heading_;\n }", "public float getHeading() {\n return heading_;\n }", "double getHeadingDiff(double init_h) {\n double curr_h = getHeading();\n double diff_h = init_h - curr_h;\n if( diff_h>=360.0 ) diff_h -= 360.0;\n else if( diff_h<=-360.0 ) diff_h += 360.0;\n return diff_h ;\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 double getAngle()\n {\n // We experimentally determined the Z axis is the axis we want to use for heading angle.\n // We have to process the angle because the imu works in euler angles so the Z axis is\n // returned as 0 to +180 or 0 to -180 rolling back to -179 or +179 when rotation passes\n // 180 degrees. We detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return globalAngle;\n }", "public double headingTo(GeoPoint gp) {\n // Implementation hints:\n // 1. You may find the mehtod Math.atan2() useful when\n // implementing this method. More info can be found at:\n // http://docs.oracle.com/javase/8/docs/api/java/lang/Math.html\n //\n // 2. Keep in mind that in our coordinate system, north is 0\n // degrees and degrees increase in the clockwise direction. By\n // mathematical convention, \"east\" is 0 degrees, and degrees\n // increase in the counterclockwise direction.\n\n // I will put this point in the (0,0) and compute the atan2 on the\n // diifernce between them.\n checkRep();\n double x = (gp.latitude - this.latitude) * KM_PER_DEGREE_LATITUDE;\n double y = (gp.longitude - this.longitude) * KM_PER_DEGREE_LONGITUDE;\n double theta = Math.toDegrees(Math.atan2(x, y));\n theta = theta < 0 ? 360 + theta : theta;\n if (theta >= 0 && theta <= 90)\n return 90 - theta;\n return 360 - (theta - 90);\n }", "public static double getHeading(double heading) {\n double newHeading;\n if (heading >=0.0 && heading < 90.0)\n newHeading = -1.0;\n else if (heading >= 90.0 && heading < 180.0)\n newHeading = -0.33;\n else if (heading >= 180.0 && heading < 270.0)\n newHeading = 0.33;\n else if (heading >= 270.0 && heading < 360.0)\n newHeading = 1.0;\n else\n newHeading = -1.0;\n return newHeading;\n }", "public static double calculateHeading(double compassRadians, Location readFrom){\n GeomagneticField field = new GeomagneticField((float)readFrom.getLatitude(), (float)readFrom.getLongitude(), (float)readFrom.getHeight(), System.currentTimeMillis());\n float declination = field.getDeclination();\n return compassRadians + Math.toRadians(declination);\n }", "double readImu2Heading() {\n double h = -360.0;\n if( USE_IMU2 && imu2_!=null && imu2_init_ok_ ) {\n h = imu2_.getAngularOrientation().firstAngle;\n }\n return h;\n }", "double getAngle();", "double getAngle();", "public double getYawAngle () {\n return gyro.getAngle() * Math.PI / 180; //Convert the angle to radians.\n }", "public double getAngle();", "public double getAngle2() {\n\n // We experimentally determined the Z axis is the axis we want to use for heading angle.\n // We have to process the angle because the imu works in euler angles so the Z axis is\n // returned as 0 to +180 or 0 to -180 rolling back to -179 or +179 when rotation passes\n // 180 degrees. We detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\n\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return (globalAngle);\n\n }", "public double getAngle() {\n return Math.atan2(sinTheta, cosTheta);\n }", "public double getTheta()\n\t{\n\t\treturn Math.toRadians(theta);\n\t}", "private double getAngle()\n {\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n return angles.firstAngle;\n }", "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}", "EDataType getAngleDegrees();", "public double getGyroInDeg(){\n return 0.0;//TODO:Pull gyro in radians and convert to degrees\n }", "public double getAngle() {\n synchronized (this.angleLock) {\n return this.movementComposer.getOrientationAngle();\n }\n }", "public double getAngle() {\n\t\treturn this.position[2];\n\t}", "public double getAngle() {\n\t\treturn 180 * (this.N - 2) / this.N;\n\t}", "public double angle() {\n double angle = Math.toDegrees(Utilities.calculateAngle(this.dx, -this.dy));\n return angle;\n }", "public double getAzimuthRadians() {\n return azimuth * Math.PI / 180d;\n }", "public double getWidthInDeg();", "public double getAngle() {\n\t\treturn armMotor.getEncPosition();\n\t}", "public static double getAngle() {\n return NetworkTableInstance.getDefault().getTable(\"limelight\").getEntry(\"ts\").getDouble(0);\n }", "public static double rotation()\r\n\t{\r\n\t\treturn -(mxp.getAngle()/45);\r\n\t}", "private static double calcHeading(double angleA, double angleB) { \n\t\t\n\t\tdouble heading;\n\t\t\n\t\tif (angleA < angleB){\n\t\t\theading = 45 - (angleA + angleB) /2 ;\n\t\t}else {\n\t\t\theading = 225 - (angleA + angleB) /2 ;\t\n\t\t}\n\t\treturn heading;\n\t}", "public double getAngle () {\n return super.getAngle() % 360D;\n }", "public double getAngle() { return angle; }", "int getSensorRotationDegrees();", "public int getDegrees() {\n\t\treturn (int) (value * (180.0d / Math.PI));\n\t}", "public double getHeadingError (Point p) {\n return Math.toDegrees(Math.atan2(getX() - p.getX(), getY() - p.getY()))\n - getAngle();\n }", "public double getRadians() {\r\n return degreeNum * (Math.PI / 180.0);\r\n }", "public double getRotationAngleInRadians() {\n return Math.toRadians(rotationAngle);\n }", "public double getAngle() {\n try {\n switch(Coordinates.angleUnit()) {\n case Coordinates.RADIAN:\n\treturn Double.parseDouble(deg.getText().trim());\n case Coordinates.DEGRE:\n\treturn Math.PI * Double.parseDouble(deg.getText().trim()) / 180.0;\n case Coordinates.DEGMN:\n\tString d = deg.getText().trim();\n\tif(d.length() == 0)\n\t d = \"0\";\n\tString m = mn.getText().trim();\n\tif(m.length() == 0)\n\t m = \"0\";\n\treturn Coordinates.parseAngle(d + \"11\" + m + \"'\");\n case Coordinates.DEGMNSEC:\n\td = deg.getText().trim();\n\tif(d.length() == 0)\n\t d = \"0\";\n\tm = mn.getText().trim();\n\tif(m.length() == 0)\n\t m = \"0\";\n\tString s = sec.getText().trim();\n\tif(s.length() == 0)\n\t s = \"0\";\n\treturn Coordinates.parseAngle(d + \"11\" + m + \"'\" + s + \"\\\"\");\n }\n }\n catch(NumberFormatException e) {\n }\n return 0.0;\n }", "public int getAngle(){\n\t\tif(!resetCoordinates()&&robot.imu1.isGyroCalibrated()){\n\t\t\trobot.angles=robot.imu1.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\t\t\tdouble currentAngle=robot.angles.firstAngle;\n\t\t\tint finalAngle= robot.startingAngle+(int)Math.round(currentAngle);\n\t\t\tif(finalAngle<0){\n\t\t\t\treturn 360+finalAngle;\n\t\t\t}\n\t\t\treturn finalAngle;\n\n\t\t}\n\t\telse if(!resetCoordinates()&&robot.imu.isGyroCalibrated()){\n\t\t\trobot.angles=robot.imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.YZX, AngleUnit.DEGREES);\n\t\t\tdouble currentAngle=robot.angles.firstAngle;\n\t\t\tint finalAngle= robot.startingAngle+(int)Math.round(currentAngle);\n\t\t\tif(finalAngle<0){\n\t\t\t\treturn 360+finalAngle;\n\t\t\t}\n\t\t\treturn finalAngle;\n\n\t\t}\n\t\telse if(resetCoordinates()){\n\t\t\tdouble oldAngle = robot.rotation.thirdAngle;\n\t\t\tdouble posAngle = oldAngle;\n\t\t\tint finalAngle;\n\t\t\tif (oldAngle < 0) posAngle = 360 - Math.abs(oldAngle);\n\t\t\tif((int) (Math.round(posAngle)) - 45 < 0){\n\t\t\t\tfinalAngle = 360-(int)Math.round(posAngle);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfinalAngle = (int) (Math.round(posAngle)) - 45;\n\t\t\t}\n\t\t\treturn finalAngle;\n\t\t}\n\t\telse{\n\t\t\treturn 10000;\n\t\t}\n\t}", "public float getAngle () {\n\t\treturn body.getAngle();\n\t}", "public int inDegrees()\n {\n return dirInDegrees;\n }", "public double getStartAngle();", "public String getUnitOfViewAngle() {\n \treturn \"degrees\";\n }", "public double getRotation() {\n return Degrees.atan2(y, x);\n }", "public double angle()\n {\n return Math.atan2(this.y, this.x);\n }", "public float calculateIdealHeading(double currentHeading, Vector2 target) {\n\t\tdouble delta_x = target.x() - position.x();\r\n\t\tdouble delta_y = target.y() - position.y();\r\n\t\tdouble idealAngle = Math.toDegrees(Math.atan(delta_x / delta_y));\r\n\t\treturn (float)idealAngle;\r\n\t}", "public double getGyroInRad(){\n return 0.0;//TODO:Pull and return gyro in radians\n }", "private double getAngle() {\n double normal= Math.sqrt(((getgAxis(ADXL345_I2C.Axes.kX))*(getgAxis(ADXL345_I2C.Axes.kX)))+((getgAxis(ADXL345_I2C.Axes.kY))*(getgAxis(ADXL345_I2C.Axes.kY))));\n\n return MathUtils.atan(normal / getgAxis(ADXL345_I2C.Axes.kZ));\n }", "public double getAngleInDegrees() {\n return intakeAngle;\n }", "public double getAngle() {\n return angle;\n }", "public double getAngle() {\n return angle;\n }", "public double getAngle ()\n {\n return angle_;\n }", "private float calculateAngles(){\n\t\t// First we will move the current angle heading into the previous angle heading slot.\n\t\tdata.PID.headings[0] = data.PID.headings[1];\n\t\t// Then, we assign the new angle heading.\n\t\tdata.PID.headings[1] = data.imu.getAngularOrientation().firstAngle;\n\n\t\t// Finally we calculate a computedTarget from the current angle heading.\n\t\tdata.PID.computedTarget = data.PID.headings[1] + (data.PID.IMURotations * 360);\n\n\t\t// Now we determine if we need to re-calculate the angles.\n\t\tif(data.PID.headings[0] > 300 && data.PID.headings[1] < 60) {\n\t\t\tdata.PID.IMURotations++; //rotations of 360 degrees\n\t\t\tcalculateAngles();\n\t\t} else if(data.PID.headings[0] < 60 && data.PID.headings[1] > 300) {\n\t\t\tdata.PID.IMURotations--;\n\t\t\tcalculateAngles();\n\t\t}\n\t\treturn data.PID.headings[1];\n\t}", "public double getRotation();", "public float getAzimuthAngle()\n {\n return azimuth_slider.getValue() / ANGLE_SCALE_FACTOR;\n }", "@JsProperty(name = \"heading\")\n public native double heading();", "public double degrees() {\n return this.degrees;\n }", "public float getAngle() {\n return angle;\n }", "public int getAngle() {\r\n return angle;\r\n }", "public int heading() {\n\t\theading = heading + 5;\n\t\tif (heading >= 359) {\n\t\t\t//Setting the heading to 0\n\t\t\tsetHeading(0);\n\t\t}\n\t\t//Returning the heading\n\t\treturn heading;\n\t}", "public double getGyroAngle() {\n double[] ypr = new double[3];\n gyro.GetYawPitchRoll(ypr);\n return ypr[0];\n }", "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 double getPerihelionAngle() {\n return perihelionAngle;\n }", "public double getAngle() {\n\t\treturn angle;\n\t}", "public double getAngle() {\n\t\treturn angle;\n\t}", "public double getMyAngle() {\n return myAngle- STARTING_ANGLE;\n }", "public double getAngle(){\n\t\treturn this.angle;\n\t}", "public double angle() {\n return Math.atan2(_y,_x);\n }", "double getCalibratedLevelAngle();", "public double ang()\n {\n \treturn Math.atan(y/x);\n }", "public Direction getCurrentHeading()\r\n\t{\r\n\t\treturn this.currentDirection;\r\n\t\t\r\n\t}", "public double getAltitudeRadians() {\n return altitude * Math.PI / 180d;\n }", "private static double radToDeg(float rad)\r\n/* 30: */ {\r\n/* 31:39 */ return rad * 180.0F / 3.141592653589793D;\r\n/* 32: */ }", "public float getAngle() {\n return angle;\n }", "public double getTheta(){\n return Math.atan(this.y / this.x);\n }", "public double turn (double degrees) {\n setHeading(getHeading() + degrees);\n return Math.abs(degrees);\n }", "public double getAngle() {\n\t\treturn navx.getAngle();\n\t}", "protected float getGyroscopeAngle() {\n if (doGyro) {\n Orientation exangles = bosch.getAngularOrientation(AxesReference.EXTRINSIC, AxesOrder.XYZ, AngleUnit.DEGREES);\n float gyroAngle = exangles.thirdAngle;\n //exangles.\n //telemetry.addData(\"angle\", \"angle: \" + exangles.thirdAngle);\n float calculated = normalizeAngle(reverseAngle(gyroAngle));\n //telemetry.addData(\"angle2\",\"calculated:\" + calculated);\n return calculated;\n } else {\n return 0.0f;\n }\n }", "public int getAngle() {\r\n\t\treturn angle;\r\n\t}" ]
[ "0.87159795", "0.79848886", "0.79179394", "0.7820522", "0.7694115", "0.7574506", "0.735568", "0.72256887", "0.72256887", "0.72256887", "0.7177492", "0.71770364", "0.7108911", "0.7088638", "0.7047753", "0.70277727", "0.7017602", "0.70129496", "0.70033777", "0.69926476", "0.69926476", "0.6964457", "0.6964457", "0.6931218", "0.6926065", "0.6902785", "0.6894287", "0.6885251", "0.685895", "0.6816378", "0.67726463", "0.67726463", "0.66934025", "0.66881686", "0.665277", "0.66459984", "0.6642139", "0.66220504", "0.66095465", "0.65505135", "0.65462166", "0.6530457", "0.65237087", "0.6512247", "0.6506559", "0.65057516", "0.64950734", "0.64925575", "0.64879036", "0.64649516", "0.6449928", "0.64430714", "0.6427239", "0.64167666", "0.6415241", "0.641179", "0.63990027", "0.6393103", "0.63875467", "0.6383201", "0.63766265", "0.63764554", "0.6376358", "0.6364501", "0.63503224", "0.6348141", "0.634026", "0.6329477", "0.6324596", "0.63221586", "0.63219285", "0.63219285", "0.63160723", "0.6308233", "0.6296834", "0.62896127", "0.6279299", "0.6274548", "0.6271867", "0.62647897", "0.62641764", "0.6255704", "0.6242441", "0.6225339", "0.62118775", "0.62118775", "0.6210791", "0.6207514", "0.62012047", "0.6193455", "0.6191629", "0.6188988", "0.6187746", "0.6183887", "0.6167073", "0.61557704", "0.6143074", "0.61429447", "0.61214554", "0.61194587" ]
0.7448508
6
Get the heading in degrees
public double getHeadingInDegrees(){ double headingRadians = calculateHeadingRadians(); return headingRadians * 180 / Math.PI; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private float getHeading() {\n Orientation anglesA = robot.imu.getAngularOrientation(\n AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n return AngleUnit.DEGREES.normalize(\n AngleUnit.DEGREES.fromUnit(anglesA.angleUnit, anglesA.firstAngle));\n }", "public double getHeading() {\n return Rotation2d.fromDegrees(m_gyro.getAngle()).getDegrees();\n }", "public double getHeading() {\n return imu.getAngularOrientation().firstAngle;\n }", "float getHeading();", "float getHeading();", "float getHeading();", "public Rotation2d getHeading() {\n return Rotation2d.fromDegrees(Math.IEEEremainder(gyro.getAngle(), 360) * (Const.kGyroReversed ? -1.0 : 1.0));\n }", "public float getHeading() {\n return heading_;\n }", "public float getHeading() {\n return heading_;\n }", "public float getHeading() {\n return heading_;\n }", "public float getHeading() {\n return heading_;\n }", "public float getHeading() {\n return heading_;\n }", "public float getHeading() {\n return heading_;\n }", "float getDir() {\n return degrees(_rotVector.heading());\n }", "public double getRolledHeading() {\n double heading = 360.0 - getRawHeading();\n if (lastHeading < 100 && heading > 300) {\n rotationAmt--;\n } else if (heading < 100 && lastHeading > 300) {\n rotationAmt++;\n }\n lastHeading = heading;\n return heading + rotationAmt * 360.0;\n }", "public static double getHeading(double heading) {\n double newHeading;\n if (heading >=0.0 && heading < 90.0)\n newHeading = -1.0;\n else if (heading >= 90.0 && heading < 180.0)\n newHeading = -0.33;\n else if (heading >= 180.0 && heading < 270.0)\n newHeading = 0.33;\n else if (heading >= 270.0 && heading < 360.0)\n newHeading = 1.0;\n else\n newHeading = -1.0;\n return newHeading;\n }", "double readImuHeading() {\n double h = -360.0;\n if( USE_IMU && imu_!=null && imu_init_ok_ ) {\n h = imu_.getAngularOrientation().firstAngle;\n }\n return h;\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 }", "double getHeading() {\n if( CACHE_IMU_READING && loop_cnt_==last_imu_read_loop_id_ ) {\n // return the existing heading when getHeading() is called in the same loop\n return heading_ ;\n }\n\n heading_ = 0;\n if( USE_IMU && imu_!=null && imu_init_ok_ ) {\n imu_angles_ = imu_.getAngularOrientation().toAxesReference(AxesReference.INTRINSIC).toAxesOrder(AxesOrder.ZYX); // acquiring angles are expensive, keep it minimal\n // IMU can automatically detect orientation, and return heading as first angle, 2020/01/25\n heading_ = AngleUnit.DEGREES.normalize(imu_angles_.firstAngle);\n last_imu_read_loop_id_ = loop_cnt_;\n } else if( USE_IMU2 && imu2_!=null && imu2_init_ok_ ) {\n // use IMU2 if IMU failed\n imu2_angles_ = imu2_.getAngularOrientation().toAxesReference(AxesReference.INTRINSIC).toAxesOrder(AxesOrder.ZYX);\n heading_ = AngleUnit.DEGREES.normalize(imu2_angles_.firstAngle);\n last_imu_read_loop_id_ = loop_cnt_;\n }\n return heading_;\n }", "public Double getCompassHeading() {\n\t\treturn compassHeading;\n\t}", "public double headingTo(GeoPoint gp) {\n // Implementation hints:\n // 1. You may find the mehtod Math.atan2() useful when\n // implementing this method. More info can be found at:\n // http://docs.oracle.com/javase/8/docs/api/java/lang/Math.html\n //\n // 2. Keep in mind that in our coordinate system, north is 0\n // degrees and degrees increase in the clockwise direction. By\n // mathematical convention, \"east\" is 0 degrees, and degrees\n // increase in the counterclockwise direction.\n\n // I will put this point in the (0,0) and compute the atan2 on the\n // diifernce between them.\n checkRep();\n double x = (gp.latitude - this.latitude) * KM_PER_DEGREE_LATITUDE;\n double y = (gp.longitude - this.longitude) * KM_PER_DEGREE_LONGITUDE;\n double theta = Math.toDegrees(Math.atan2(x, y));\n theta = theta < 0 ? 360 + theta : theta;\n if (theta >= 0 && theta <= 90)\n return 90 - theta;\n return 360 - (theta - 90);\n }", "double getHeadingDiff(double init_h) {\n double curr_h = getHeading();\n double diff_h = init_h - curr_h;\n if( diff_h>=360.0 ) diff_h -= 360.0;\n else if( diff_h<=-360.0 ) diff_h += 360.0;\n return diff_h ;\n }", "double readImu2Heading() {\n double h = -360.0;\n if( USE_IMU2 && imu2_!=null && imu2_init_ok_ ) {\n h = imu2_.getAngularOrientation().firstAngle;\n }\n return h;\n }", "public int heading() {\n\t\theading = heading + 5;\n\t\tif (heading >= 359) {\n\t\t\t//Setting the heading to 0\n\t\t\tsetHeading(0);\n\t\t}\n\t\t//Returning the heading\n\t\treturn heading;\n\t}", "public double calculateHeadingRadians(){\r\n if(coordinateHistory.size() > 2){\r\n GPSCoordinate firstPoint = coordinateHistory.get(coordinateHistory.size() - 2);\r\n GPSCoordinate secondPoint = coordinateHistory.get(coordinateHistory.size() - 1);\r\n \r\n if(!firstPoint.compareTo(secondPoint)){\r\n double latA = firstPoint.getLatitude();\r\n double longA = firstPoint.getLongitude();\r\n double latB = secondPoint.getLatitude();\r\n double longB = secondPoint.getLongitude();\r\n\r\n double X = Math.cos(latB) * Math.sin(longB - longA);\r\n double Y = (Math.cos(latA) * Math.sin(latB)) - (Math.sin(latA) * Math.cos(latB) * Math.cos(longB - longA));\r\n\r\n headingRadians = - Math.atan2(X, Y);\r\n return headingRadians;\r\n }else{\r\n return headingRadians;\r\n }\r\n }else{\r\n return headingRadians;\r\n }\r\n }", "public double degrees() {\n return this.degrees;\n }", "public double getAngle() {\n\treturn CVector.heading(v1, v2);\n }", "public static double calculateHeading(double compassRadians, Location readFrom){\n GeomagneticField field = new GeomagneticField((float)readFrom.getLatitude(), (float)readFrom.getLongitude(), (float)readFrom.getHeight(), System.currentTimeMillis());\n float declination = field.getDeclination();\n return compassRadians + Math.toRadians(declination);\n }", "public int getDegrees() {\n\t\treturn (int) (value * (180.0d / Math.PI));\n\t}", "@JsProperty(name = \"heading\")\n public native double heading();", "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}", "public double getWidthInDeg();", "public final native int getHeading() /*-{\n return this.getHeading() || 0;\n }-*/;", "private static double calcHeading(double angleA, double angleB) { \n\t\t\n\t\tdouble heading;\n\t\t\n\t\tif (angleA < angleB){\n\t\t\theading = 45 - (angleA + angleB) /2 ;\n\t\t}else {\n\t\t\theading = 225 - (angleA + angleB) /2 ;\t\n\t\t}\n\t\treturn heading;\n\t}", "private double getAngle()\n {\n // We experimentally determined the Z axis is the axis we want to use for heading angle.\n // We have to process the angle because the imu works in euler angles so the Z axis is\n // returned as 0 to +180 or 0 to -180 rolling back to -179 or +179 when rotation passes\n // 180 degrees. We detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return globalAngle;\n }", "public int inDegrees()\n {\n return dirInDegrees;\n }", "public double getHeadingError (Point p) {\n return Math.toDegrees(Math.atan2(getX() - p.getX(), getY() - p.getY()))\n - getAngle();\n }", "private double getAngle() {\n // We experimentally determined the Z axis is the axis we want to use for\n // heading angle. We have to process the angle because the imu works in\n // euler angles so the Z axis is returned as 0 to +180 or 0 to -180\n // rolling back to -179 or +179 when rotation passes 180 degrees. We\n // detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC,\n AxesOrder.ZYX, AngleUnit.DEGREES);\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return globalAngle;\n }", "int getSensorRotationDegrees();", "public Direction getCurrentHeading()\r\n\t{\r\n\t\treturn this.currentDirection;\r\n\t\t\r\n\t}", "public String getUnitOfViewAngle() {\n \treturn \"degrees\";\n }", "EDataType getAngleDegrees();", "public double getAngle()\n {\n // We experimentally determined the Z axis is the axis we want to use for heading angle.\n // We have to process the angle because the imu works in euler angles so the Z axis is\n // returned as 0 to +180 or 0 to -180 rolling back to -179 or +179 when rotation passes\n // 180 degrees. We detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return globalAngle;\n }", "public int getHeading()\n\t{\n\t\treturn heading;\n\t}", "public double turn (double degrees) {\n setHeading(getHeading() + degrees);\n return Math.abs(degrees);\n }", "private double getAngle()\n {\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n return angles.firstAngle;\n }", "public float calculateIdealHeading(double currentHeading, Vector2 target) {\n\t\tdouble delta_x = target.x() - position.x();\r\n\t\tdouble delta_y = target.y() - position.y();\r\n\t\tdouble idealAngle = Math.toDegrees(Math.atan(delta_x / delta_y));\r\n\t\treturn (float)idealAngle;\r\n\t}", "double getAngle();", "double getAngle();", "public float getRotation() {\n return pm.pen.getLevelValue(PLevel.Type.ROTATION);\n }", "int getStartRotationDegree();", "public String getHeading() {\n return heading;\n }", "public String getHeading() {\n return heading;\n }", "public double getHeightInDeg();", "public double getAngle();", "public double getGyroInDeg(){\n return 0.0;//TODO:Pull gyro in radians and convert to degrees\n }", "public double getAngle2() {\n\n // We experimentally determined the Z axis is the axis we want to use for heading angle.\n // We have to process the angle because the imu works in euler angles so the Z axis is\n // returned as 0 to +180 or 0 to -180 rolling back to -179 or +179 when rotation passes\n // 180 degrees. We detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\n\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return (globalAngle);\n\n }", "public static double rotation()\r\n\t{\r\n\t\treturn -(mxp.getAngle()/45);\r\n\t}", "public double angle() {\n double angle = Math.toDegrees(Utilities.calculateAngle(this.dx, -this.dy));\n return angle;\n }", "public int getPitchDegrees() {\n\t\treturn m_pitch_degrees;\n\t}", "public Heading getHeading()\n {\n\treturn this.heading;\n }", "public double getYawAngle () {\n return gyro.getAngle() * Math.PI / 180; //Convert the angle to radians.\n }", "public double getAngle () {\n return super.getAngle() % 360D;\n }", "public double getAngle() {\n\t\treturn 180 * (this.N - 2) / this.N;\n\t}", "int getRotationDegrees() {\n return rotationDegrees;\n }", "public String getOrientation(){\n\n if(robot.getRotation()%360 == 0){\n return \"NORTH\";\n } else if(robot.getRotation()%360 == 90\n ||robot.getRotation()%360 == -270){\n return \"EAST\";\n } else if(robot.getRotation()%360 == 180\n ||robot.getRotation()%360 == -180){\n return \"SOUTH\";\n } else if(robot.getRotation()%360 == 270\n ||robot.getRotation()%360 == -90){\n return \"WEST\";\n } else\n\n errorMessage(\"Id:10T error\");\n return null;\n }", "public double getPerihelionAngle() {\n return perihelionAngle;\n }", "@Override\n\tpublic float getOrientation() {\n\t\treturn body.getAngle();\n\t}", "public double getRotation();", "@Override\n\t\tpublic int getDegree(Direction direction) {\n\t\t\treturn 0;\n\t\t}", "public Heading(Double compassHeading) {\n\t\tthis.compassHeading = compassHeading;\n\t}", "public static float getH(float side, HexOrientation orientation)\n\t{\n\t\treturn MathUtils.sinDeg(30) * side;\n\t}", "public String toString()\n {\n // If the direction is one of the compass points for which we have\n // a name, provide it; otherwise report in degrees. \n int regionWidth = FULL_CIRCLE / dirNames.length;\n if (dirInDegrees % regionWidth == 0)\n return dirNames[dirInDegrees / regionWidth];\n else\n return dirInDegrees + \" degrees\";\n }", "public double getAngle() { return angle; }", "public int getAngle() {\r\n return angle;\r\n }", "public double getAngle() {\n synchronized (this.angleLock) {\n return this.movementComposer.getOrientationAngle();\n }\n }", "public float getAngle () {\n\t\treturn body.getAngle();\n\t}", "public float getAngle() {\n return angle;\n }", "public Double degreePerSecond()\n\t{\n\t\treturn getValue(AngularVelocityUnit.DEGREES_PER_SEC);\n\t}", "public double getAngle() {\n return Math.atan2(sinTheta, cosTheta);\n }", "public double getAngle() {\n\t\treturn this.position[2];\n\t}", "public double getStartAngle();", "private org.gwtbootstrap3.client.ui.Heading get_f_Heading50() {\n return build_f_Heading50();\n }", "public double getAngleInDegrees() {\n return intakeAngle;\n }", "public interface DisplacementSensor {\n\n // return current heading reported by sensor, in degrees.\n // convention is positive angles CCW, wrapping from 359-0\n public float getDisp();\n\n}", "public double getRotation() {\n return getDouble(\"ts\");\n }", "public double getOrientation()\r\n\t{\r\n\t\treturn Math.atan2(-end.getY()+start.getY(), end.getX()-start.getX());\r\n\t}", "public double getRotation() {\n return Degrees.atan2(y, x);\n }", "@MavlinkFieldInfo(\n position = 9,\n unitSize = 2,\n description = \"Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX\"\n )\n public final int hdg() {\n return this.hdg;\n }", "public static double getAngle() {\n return NetworkTableInstance.getDefault().getTable(\"limelight\").getEntry(\"ts\").getDouble(0);\n }", "public double getAngle() {\n return angle;\n }", "public double getAngle() {\n return angle;\n }", "public double getAngle() {\n try {\n switch(Coordinates.angleUnit()) {\n case Coordinates.RADIAN:\n\treturn Double.parseDouble(deg.getText().trim());\n case Coordinates.DEGRE:\n\treturn Math.PI * Double.parseDouble(deg.getText().trim()) / 180.0;\n case Coordinates.DEGMN:\n\tString d = deg.getText().trim();\n\tif(d.length() == 0)\n\t d = \"0\";\n\tString m = mn.getText().trim();\n\tif(m.length() == 0)\n\t m = \"0\";\n\treturn Coordinates.parseAngle(d + \"11\" + m + \"'\");\n case Coordinates.DEGMNSEC:\n\td = deg.getText().trim();\n\tif(d.length() == 0)\n\t d = \"0\";\n\tm = mn.getText().trim();\n\tif(m.length() == 0)\n\t m = \"0\";\n\tString s = sec.getText().trim();\n\tif(s.length() == 0)\n\t s = \"0\";\n\treturn Coordinates.parseAngle(d + \"11\" + m + \"'\" + s + \"\\\"\");\n }\n }\n catch(NumberFormatException e) {\n }\n return 0.0;\n }", "public double angle()\n {\n return Math.atan2(this.y, this.x);\n }", "public abstract double getOrientation();", "private double getRotationMomentum()\n\t{\n\t\treturn getRotation() * this.currentMomentMass;\n\t}", "public int getAngle(){\n\t\treturn (int)angle;\n\t}", "public double getXDirection() {\r\n return Math.cos(Math.toRadians(angle));\r\n }", "public double getTheta()\n\t{\n\t\treturn Math.toRadians(theta);\n\t}", "public double getAngle ()\n {\n return angle_;\n }" ]
[ "0.8310315", "0.82080907", "0.813348", "0.80518013", "0.80518013", "0.80518013", "0.79933304", "0.7695253", "0.7691403", "0.7677588", "0.7677588", "0.76393765", "0.76393765", "0.75438195", "0.74425435", "0.7382848", "0.73279047", "0.7318848", "0.7270108", "0.71933085", "0.71804696", "0.71482253", "0.70021516", "0.6972869", "0.68964523", "0.6887249", "0.686718", "0.68039834", "0.67889005", "0.67841446", "0.678275", "0.67752635", "0.6709979", "0.6703972", "0.66685796", "0.6656002", "0.66545933", "0.6654461", "0.6643133", "0.6627281", "0.66195226", "0.65766954", "0.65637237", "0.6517809", "0.6410214", "0.63286304", "0.63252395", "0.6325155", "0.6325155", "0.63104975", "0.63048434", "0.6283475", "0.6283475", "0.6278504", "0.62729704", "0.6266783", "0.6264404", "0.62641656", "0.6247681", "0.6244992", "0.6236893", "0.62322927", "0.6226086", "0.62111485", "0.62091917", "0.6208637", "0.62065405", "0.6201683", "0.61949366", "0.6166906", "0.6144641", "0.6132273", "0.6130003", "0.61069894", "0.6096836", "0.6089299", "0.6081763", "0.60812825", "0.60803235", "0.6074571", "0.60649157", "0.6056428", "0.6055322", "0.60499144", "0.6033212", "0.6031084", "0.59921116", "0.5989558", "0.5984239", "0.5983069", "0.59785485", "0.59785485", "0.59763294", "0.597317", "0.59725463", "0.59675884", "0.59657204", "0.59627175", "0.5958722", "0.5958531" ]
0.8961139
0
public DistributedCacheChildDispatcher(int threadPoolSize, long threadKeepAliveTime, int schedulerPoolSize, long schedulerKeepAliveTime) public DistributedCacheChildDispatcher(int schedulerPoolSize, long schedulerKeepAliveTime, ChildMapRegistry registry)
public DistributedCacheChildDispatcher(int threadPoolSize, long threadKeepAliveTime, int schedulerPoolSize, long schedulerKeepAliveTime, ChildMapRegistry<Key, Value, Factory, DB> registry) { super(threadPoolSize, threadKeepAliveTime, schedulerPoolSize, schedulerKeepAliveTime); // super(schedulerPoolSize, schedulerKeepAliveTime); // this.registry = new ChildMapRegistry<Value, Factory, DB>(); this.putValueNotificationDispatcher = new CacheNotificationDispatcher.CacheNotificationDispatcherBuilder<PutNotification<Value>, PutUnicastNotificationThread<Key, Value, Factory, DB>, Key, Value, Factory, DB, PutUnicastNotificationThreadCreator<Key, Value, Factory, DB>>() .poolSize(ServerConfig.NOTIFICATION_DISPATCHER_POOL_SIZE) // .keepAliveTime(ServerConfig.NOTIFICATION_DISPATCHER_THREAD_ALIVE_TIME) // .threadPool(SharedThreadPool.SHARED().getPool()) .threadCreator(new PutUnicastNotificationThreadCreator<Key, Value, Factory, DB>()) .notificationQueueSize(ServerConfig.NOTIFICATION_QUEUE_SIZE) .dispatcherWaitTime(ServerConfig.NOTIFICATION_DISPATCHER_WAIT_TIME) .waitRound(ServerConfig.NOTIFICATION_DISPATCHER_WAIT_ROUND) .idleCheckDelay(ServerConfig.NOTIFICATION_DISPATCHER_IDLE_CHECK_DELAY) .idleCheckPeriod(ServerConfig.NOTIFICATION_DISPATCHER_IDLE_CHECK_PERIOD) .scheduler(super.getScheduler()) // .registry(this.registry) .registry(registry) // .timeout(ServerConfig.THREAD_POOL_SHUTDOWN_TIMEOUT) .build(); this.uniGetRequestNotificationDispatcher = new CacheNotificationDispatcher.CacheNotificationDispatcherBuilder<UniGetRequest<Key>, UniGetRequestThread<Key, Value, Factory, DB>, Key, Value, Factory, DB, UniGetRequestThreadCreator<Key, Value, Factory, DB>>() .poolSize(ServerConfig.NOTIFICATION_DISPATCHER_POOL_SIZE) // .keepAliveTime(ServerConfig.NOTIFICATION_DISPATCHER_THREAD_ALIVE_TIME) // .threadPool(SharedThreadPool.SHARED().getPool()) .threadCreator(new UniGetRequestThreadCreator<Key, Value, Factory, DB>()) .notificationQueueSize(ServerConfig.NOTIFICATION_QUEUE_SIZE) .dispatcherWaitTime(ServerConfig.NOTIFICATION_DISPATCHER_WAIT_TIME) .waitRound(ServerConfig.NOTIFICATION_DISPATCHER_WAIT_ROUND) .idleCheckDelay(ServerConfig.NOTIFICATION_DISPATCHER_IDLE_CHECK_DELAY) .idleCheckPeriod(ServerConfig.NOTIFICATION_DISPATCHER_IDLE_CHECK_PERIOD) .scheduler(super.getScheduler()) .registry(registry) // .timeout(ServerConfig.THREAD_POOL_SHUTDOWN_TIMEOUT) .build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected Recycler(int maxCapacityPerThread, int maxSharedCapacityFactor)\r\n/* 98: */ {\r\n/* 99:128 */ this(maxCapacityPerThread, maxSharedCapacityFactor, RATIO, MAX_DELAYED_QUEUES_PER_THREAD);\r\n/* 100: */ }", "public MapReferenceFactory(DbFactoryRegistry registry) {\n super(registry, registry.mapReferenceId);\n }", "protected Recycler(int maxCapacityPerThread, int maxSharedCapacityFactor, int ratio, int maxDelayedQueuesPerThread)\r\n/* 103: */ {\r\n/* 104:133 */ this.ratioMask = (MathUtil.safeFindNextPositivePowerOfTwo(ratio) - 1);\r\n/* 105:134 */ if (maxCapacityPerThread <= 0)\r\n/* 106: */ {\r\n/* 107:135 */ this.maxCapacityPerThread = 0;\r\n/* 108:136 */ this.maxSharedCapacityFactor = 1;\r\n/* 109:137 */ this.maxDelayedQueuesPerThread = 0;\r\n/* 110: */ }\r\n/* 111: */ else\r\n/* 112: */ {\r\n/* 113:139 */ this.maxCapacityPerThread = maxCapacityPerThread;\r\n/* 114:140 */ this.maxSharedCapacityFactor = Math.max(1, maxSharedCapacityFactor);\r\n/* 115:141 */ this.maxDelayedQueuesPerThread = Math.max(0, maxDelayedQueuesPerThread);\r\n/* 116: */ }\r\n/* 117: */ }", "protected Recycler(int maxCapacityPerThread)\r\n/* 93: */ {\r\n/* 94:124 */ this(maxCapacityPerThread, MAX_SHARED_CAPACITY_FACTOR);\r\n/* 95: */ }", "public MessageDispatcher ()\n\t{\n\t\tthis (new MessageThreadFactory ());\n\t}", "protected ILevelBasedRegistry() {\n this.internalRegistry = new ConcurrentHashMap<>();\n }", "@Override\n\tpublic CreateSubThread getDispatcher()\n\t{\n\t\treturn (CreateSubThread) super.getDispatcher();\n\t}", "public ClusterRoot(Dispatcher dispatcher) throws IOException\n\t{\n\t\t// Initialize the peer. 06/13/2017, Bing Li\n\t\tthis.peer = new Peer.PeerBuilder<Dispatcher>()\n\t\t\t\t.peerPort(ChatConfig.CHAT_SERVER_PORT)\n\t\t\t\t.peerName(MulticastConfig.CLUSTER_SERVER_ROOT_NAME)\n\t\t\t\t.registryServerIP(RegistryConfig.PEER_REGISTRY_ADDRESS)\n\t\t\t\t.registryServerPort(RegistryConfig.PEER_REGISTRY_PORT)\n\t\t\t\t.isRegistryNeeded(true)\n\t\t\t\t.listenerCount(ServerConfig.LISTENING_THREAD_COUNT)\n//\t\t\t\t.listenerThreadPoolSize(ServerConfig.SHARED_THREAD_POOL_SIZE)\n//\t\t\t\t.listenerThreadKeepAliveTime(ServerConfig.SHARED_THREAD_POOL_KEEP_ALIVE_TIME)\n\t\t\t\t.dispatcher(dispatcher)\n\t\t\t\t.freeClientPoolSize(RegistryConfig.CLIENT_POOL_SIZE)\n\t\t\t\t.readerClientSize(RegistryConfig.READER_CLIENT_SIZE)\n\t\t\t\t.syncEventerIdleCheckDelay(RegistryConfig.SYNC_EVENTER_IDLE_CHECK_DELAY)\n\t\t\t\t.syncEventerIdleCheckPeriod(RegistryConfig.SYNC_EVENTER_IDLE_CHECK_PERIOD)\n\t\t\t\t.syncEventerMaxIdleTime(RegistryConfig.SYNC_EVENTER_MAX_IDLE_TIME)\n\t\t\t\t.asyncEventQueueSize(RegistryConfig.ASYNC_EVENT_QUEUE_SIZE)\n\t\t\t\t.asyncEventerSize(RegistryConfig.ASYNC_EVENTER_SIZE)\n\t\t\t\t.asyncEventingWaitTime(RegistryConfig.ASYNC_EVENTING_WAIT_TIME)\n\t\t\t\t.asyncEventerWaitTime(RegistryConfig.ASYNC_EVENTER_WAIT_TIME)\n\t\t\t\t.asyncEventerWaitRound(RegistryConfig.ASYNC_EVENTER_WAIT_ROUND)\n\t\t\t\t.asyncEventIdleCheckDelay(RegistryConfig.ASYNC_EVENT_IDLE_CHECK_DELAY)\n\t\t\t\t.asyncEventIdleCheckPeriod(RegistryConfig.ASYNC_EVENT_IDLE_CHECK_PERIOD)\n//\t\t\t\t.clientThreadPoolSize(RegistryConfig.CLIENT_THREAD_POOL_SIZE)\n//\t\t\t\t.clientThreadKeepAliveTime(RegistryConfig.CLIENT_THREAD_KEEP_ALIVE_TIME)\n\t\t\t\t.schedulerPoolSize(RegistryConfig.SCHEDULER_THREAD_POOL_SIZE)\n\t\t\t\t.schedulerKeepAliveTime(RegistryConfig.SCHEDULER_THREAD_POOL_KEEP_ALIVE_TIME)\n\t\t\t\t.build();\n\t}", "@Override\n public Dispatcher createPrivateConnectionDispatcher(int port) {\n try {\n ServerSocket serverSocket = new ServerSocket(port);\n Dispatcher dispatcher = new Dispatcher(connectionService, serverSocket);\n dispatchers.add(dispatcher);\n executorService.execute(dispatcher);\n return dispatcher;\n } catch (IOException e) {\n LOGGER.log(Level.SEVERE, \"error creating server socket\", e);\n return null;\n }\n }", "public interface MRConnectionManagerContainer {\n\n\n String MR_GROUP_PATH = \"/zk/mr/\";\n\n void start() throws Exception;\n\n void start(Map<String, MRMessageListener> messageListenerMap) throws Exception;\n\n void register();\n\n void add(Map.Entry<String, String> entry) throws Exception;\n\n void update(Map.Entry<String, String> entry);\n\n void addListener(String topic, MRMessageListener mrMessageListener);\n\n void remove(Map.Entry<String, String> entry);\n\n void refresh();\n\n void shutdown();\n\n void shutdownAndWait() throws InterruptedException;\n\n Map<String, MRConnectionManager> getMrConnectionManagerCache();\n\n static String groupPath(String group) {\n return String.format(\"%s%s\", MR_GROUP_PATH, group);\n }\n\n void setPerfetchSize(int perfetchSize);\n\n\n}", "private MessageBusImpl() \r\n\t{\r\n\t\tthis.map = new ConcurrentHashMap<MicroService, LinkedBlockingQueue<Message>>();\r\n\t\tthis.MessageToMSQ = new ConcurrentHashMap<Class<? extends Message>, RoundRobinQueue<MicroService>>();\r\n\t\tthis.ReqToRequester = new ConcurrentHashMap<Request<?>, MicroService>();\r\n\t}", "protected Recycler()\r\n/* 88: */ {\r\n/* 89:120 */ this(DEFAULT_MAX_CAPACITY_PER_THREAD);\r\n/* 90: */ }", "public RMContainerRegistryImpl(){\n\t\ttheRegistry = new Hashtable<String,RMContainer>();\t \n\t}", "public BeaterServer(ScheduledExecutorService scheduler) {\n\t\tthis(0, scheduler);\n\t}", "protected EventExecutor newChild(ThreadFactory threadFactory, Object... args) throws Exception {\n/* 57 */ return (EventExecutor)new LocalEventLoop(this, threadFactory);\n/* */ }", "ComputerProxy(Computer computer) {\n this.computer = computer;\n //this.map = new ConcurrentHashMap<UUID, Task>();\n }", "public Scheduler()\n {\n this.id = \"\"+ hashCode();\n register();\n }", "public BasicHttpClientConnectionManager(Lookup<ConnectionSocketFactory> socketFactoryRegistry, HttpConnectionFactory<HttpRoute, ManagedHttpClientConnection> connFactory) {\n/* 137 */ this(socketFactoryRegistry, connFactory, null, null);\n/* */ }", "public PriorityScheduler() {\n\t}", "public RequestDispatcherRegistryImpl(ORB orb,int defaultId){\n this.orb=orb;\n this.defaultId=defaultId;\n SDRegistry=new DenseIntMapImpl();\n CSRegistry=new DenseIntMapImpl();\n OAFRegistry=new DenseIntMapImpl();\n LCSFRegistry=new DenseIntMapImpl();\n objectAdapterFactories=new HashSet();\n objectAdapterFactoriesView=Collections.unmodifiableSet(objectAdapterFactories);\n stringToServerSubcontract=new HashMap();\n }", "public PriorityScheduler() {\n }", "public BasicHttpClientConnectionManager(Lookup<ConnectionSocketFactory> socketFactoryRegistry, HttpConnectionFactory<HttpRoute, ManagedHttpClientConnection> connFactory, SchemePortResolver schemePortResolver, DnsResolver dnsResolver) {\n/* 113 */ this(new DefaultHttpClientConnectionOperator(socketFactoryRegistry, schemePortResolver, dnsResolver), connFactory);\n/* */ }", "protected abstract void childManager(ForkManager child_, double time_);", "public LocalEventLoopGroup(int nThreads, ThreadFactory threadFactory) {\n/* 51 */ super(nThreads, threadFactory, new Object[0]);\n/* */ }", "@VisibleForTesting\n ProcessRegistry() {}", "public static @NonNull Executor newPacketDispatcher(@NonNull DriverEnvironment driverEnvironment) {\n // a cached pool with a thread idle-lifetime of 30 seconds\n // rejected tasks will be executed on the calling thread (See ThreadPoolExecutor.CallerRunsPolicy)\n // at least one thread is always idling in this executor\n var maximumPoolSize = threadAmount(driverEnvironment);\n return ExecutorServiceUtil.newVirtualThreadExecutor(\"Packet-Dispatcher-\", threadFactory -> new ThreadPoolExecutor(\n maximumPoolSize,\n maximumPoolSize,\n 30L,\n TimeUnit.SECONDS,\n new LinkedBlockingQueue<>(),\n threadFactory,\n DEFAULT_REJECT_HANDLER));\n }", "public interface RateLimiterRegistry extends Registry<RateLimiter, RateLimiterConfig> {\n\n /**\n * Creates a RateLimiterRegistry with a custom RateLimiter configuration.\n *\n * @param defaultRateLimiterConfig a custom RateLimiter configuration\n * @return a RateLimiterRegistry instance backed by a custom RateLimiter configuration\n */\n static RateLimiterRegistry of(RateLimiterConfig defaultRateLimiterConfig) {\n return new InMemoryRateLimiterRegistry(defaultRateLimiterConfig);\n }\n\n /**\n * Creates a RateLimiterRegistry with a custom default RateLimiter configuration and a\n * RateLimiter registry event consumer.\n *\n * @param defaultRateLimiterConfig a custom default RateLimiter configuration.\n * @param registryEventConsumer a RateLimiter registry event consumer.\n * @return a RateLimiterRegistry with a custom RateLimiter configuration and a RateLimiter\n * registry event consumer.\n */\n static RateLimiterRegistry of(RateLimiterConfig defaultRateLimiterConfig,\n RegistryEventConsumer<RateLimiter> registryEventConsumer) {\n return new InMemoryRateLimiterRegistry(defaultRateLimiterConfig, registryEventConsumer);\n }\n\n /**\n * Creates a RateLimiterRegistry with a custom default RateLimiter configuration and a list of\n * RateLimiter registry event consumers.\n *\n * @param defaultRateLimiterConfig a custom default RateLimiter configuration.\n * @param registryEventConsumers a list of RateLimiter registry event consumers.\n * @return a RateLimiterRegistry with a custom RateLimiter configuration and a list of\n * RateLimiter registry event consumers.\n */\n static RateLimiterRegistry of(RateLimiterConfig defaultRateLimiterConfig,\n List<RegistryEventConsumer<RateLimiter>> registryEventConsumers) {\n return new InMemoryRateLimiterRegistry(defaultRateLimiterConfig, registryEventConsumers);\n }\n\n /**\n * Returns a managed {@link RateLimiterConfig} or creates a new one with a default RateLimiter\n * configuration.\n *\n * @return The {@link RateLimiterConfig}\n */\n static RateLimiterRegistry ofDefaults() {\n return new InMemoryRateLimiterRegistry(RateLimiterConfig.ofDefaults());\n }\n\n /**\n * Creates a ThreadPoolBulkheadRegistry with a Map of shared RateLimiter configurations.\n *\n * @param configs a Map of shared RateLimiter configurations\n * @return a ThreadPoolBulkheadRegistry with a Map of shared RateLimiter configurations.\n */\n static RateLimiterRegistry of(Map<String, RateLimiterConfig> configs) {\n return new InMemoryRateLimiterRegistry(configs);\n }\n\n /**\n * Creates a ThreadPoolBulkheadRegistry with a Map of shared RateLimiter configurations.\n * <p>\n * Tags added to the registry will be added to every instance created by this registry.\n *\n * @param configs a Map of shared RateLimiter configurations\n * @param tags default tags to add to the registry\n * @return a ThreadPoolBulkheadRegistry with a Map of shared RateLimiter configurations.\n */\n static RateLimiterRegistry of(Map<String, RateLimiterConfig> configs, Map<String, String> tags) {\n return new InMemoryRateLimiterRegistry(configs, tags);\n }\n\n /**\n * Creates a RateLimiterRegistry with a Map of shared RateLimiter configurations and a\n * RateLimiter registry event consumer.\n *\n * @param configs a Map of shared RateLimiter configurations.\n * @param registryEventConsumer a RateLimiter registry event consumer.\n * @return a RateLimiterRegistry with a Map of shared RateLimiter configurations and a\n * RateLimiter registry event consumer.\n */\n static RateLimiterRegistry of(Map<String, RateLimiterConfig> configs,\n RegistryEventConsumer<RateLimiter> registryEventConsumer) {\n return new InMemoryRateLimiterRegistry(configs, registryEventConsumer);\n }\n\n /**\n * Creates a RateLimiterRegistry with a Map of shared RateLimiter configurations and a\n * RateLimiter registry event consumer.\n *\n * @param configs a Map of shared RateLimiter configurations.\n * @param registryEventConsumer a RateLimiter registry event consumer.\n * @param tags default tags to add to the registry\n * @return a RateLimiterRegistry with a Map of shared RateLimiter configurations and a\n * RateLimiter registry event consumer.\n */\n static RateLimiterRegistry of(Map<String, RateLimiterConfig> configs,\n RegistryEventConsumer<RateLimiter> registryEventConsumer, Map<String, String> tags) {\n return new InMemoryRateLimiterRegistry(configs, registryEventConsumer, tags);\n }\n\n /**\n * Creates a RateLimiterRegistry with a Map of shared RateLimiter configurations and a list of\n * RateLimiter registry event consumers.\n *\n * @param configs a Map of shared RateLimiter configurations.\n * @param registryEventConsumers a list of RateLimiter registry event consumers.\n * @return a RateLimiterRegistry with a Map of shared RateLimiter configurations and a list of\n * RateLimiter registry event consumers.\n */\n static RateLimiterRegistry of(Map<String, RateLimiterConfig> configs,\n List<RegistryEventConsumer<RateLimiter>> registryEventConsumers) {\n return new InMemoryRateLimiterRegistry(configs, registryEventConsumers);\n }\n\n /**\n * Returns all managed {@link RateLimiter} instances.\n *\n * @return all managed {@link RateLimiter} instances.\n */\n Set<RateLimiter> getAllRateLimiters();\n\n /**\n * Returns a managed {@link RateLimiter} or creates a new one with the default RateLimiter\n * configuration.\n *\n * @param name the name of the RateLimiter\n * @return The {@link RateLimiter}\n */\n RateLimiter rateLimiter(String name);\n\n /**\n * Returns a managed {@link RateLimiter} or creates a new one with the default RateLimiter\n * configuration.\n * <p>\n * The {@code tags} passed will be appended to the tags already configured for the registry.\n * When tags (keys) of the two collide the tags passed with this method will override the tags\n * of the registry.\n *\n * @param name the name of the RateLimiter\n * @param tags tags added to the RateLimiter\n * @return The {@link RateLimiter}\n */\n RateLimiter rateLimiter(String name, Map<String, String> tags);\n\n /**\n * Returns a managed {@link RateLimiter} or creates a new one with a custom RateLimiter\n * configuration.\n *\n * @param name the name of the RateLimiter\n * @param rateLimiterConfig a custom RateLimiter configuration\n * @return The {@link RateLimiter}\n */\n RateLimiter rateLimiter(String name, RateLimiterConfig rateLimiterConfig);\n\n /**\n * Returns a managed {@link RateLimiter} or creates a new one with a custom RateLimiter\n * configuration.\n * <p>\n * The {@code tags} passed will be appended to the tags already configured for the registry.\n * When tags (keys) of the two collide the tags passed with this method will override the tags\n * of the registry.\n *\n * @param name the name of the RateLimiter\n * @param rateLimiterConfig a custom RateLimiter configuration\n * @param tags tags added to the RateLimiter\n * @return The {@link RateLimiter}\n */\n RateLimiter rateLimiter(String name, RateLimiterConfig rateLimiterConfig, Map<String, String> tags);\n\n /**\n * Returns a managed {@link RateLimiterConfig} or creates a new one with a custom\n * RateLimiterConfig configuration.\n *\n * @param name the name of the RateLimiterConfig\n * @param rateLimiterConfigSupplier a supplier of a custom RateLimiterConfig configuration\n * @return The {@link RateLimiterConfig}\n */\n RateLimiter rateLimiter(String name, Supplier<RateLimiterConfig> rateLimiterConfigSupplier);\n\n /**\n * Returns a managed {@link RateLimiterConfig} or creates a new one with a custom\n * RateLimiterConfig configuration.\n * <p>\n * The {@code tags} passed will be appended to the tags already configured for the registry.\n * When tags (keys) of the two collide the tags passed with this method will override the tags\n * of the registry.\n *\n * @param name the name of the RateLimiterConfig\n * @param rateLimiterConfigSupplier a supplier of a custom RateLimiterConfig configuration\n * @param tags tags added to the RateLimiter\n * @return The {@link RateLimiterConfig}\n */\n RateLimiter rateLimiter(String name, Supplier<RateLimiterConfig> rateLimiterConfigSupplier, Map<String, String> tags);\n\n /**\n * Returns a managed {@link RateLimiter} or creates a new one.\n * The configuration must have been added upfront via {@link #addConfiguration(String, Object)}.\n *\n * @param name the name of the RateLimiter\n * @param configName the name of the shared configuration\n * @return The {@link RateLimiter}\n */\n RateLimiter rateLimiter(String name, String configName);\n\n /**\n * Returns a managed {@link RateLimiter} or creates a new one.\n * The configuration must have been added upfront via {@link #addConfiguration(String, Object)}.\n *\n * @param name the name of the RateLimiter\n * @param configName the name of the shared configuration\n * @return The {@link RateLimiter}\n */\n RateLimiter rateLimiter(String name, String configName, Map<String, String> tags);\n\n /**\n * Returns a builder to create a custom RateLimiterRegistry.\n *\n * @return a {@link RateLimiterRegistry.Builder}\n */\n static Builder custom() {\n return new Builder();\n }\n\n class Builder {\n\n private static final String DEFAULT_CONFIG = \"default\";\n private RegistryStore<RateLimiter> registryStore;\n private Map<String, RateLimiterConfig> rateLimiterConfigsMap;\n private List<RegistryEventConsumer<RateLimiter>> registryEventConsumers;\n private Map<String, String> tags;\n\n public Builder() {\n this.rateLimiterConfigsMap = new java.util.HashMap<>();\n this.registryEventConsumers = new ArrayList<>();\n }\n\n public Builder withRegistryStore(RegistryStore<RateLimiter> registryStore) {\n this.registryStore = registryStore;\n return this;\n }\n\n /**\n * Configures a RateLimiterRegistry with a custom default RateLimiter configuration.\n *\n * @param rateLimiterConfig a custom default RateLimiter configuration\n * @return a {@link RateLimiterRegistry.Builder}\n */\n public Builder withRateLimiterConfig(RateLimiterConfig rateLimiterConfig) {\n rateLimiterConfigsMap.put(DEFAULT_CONFIG, rateLimiterConfig);\n return this;\n }\n\n /**\n * Configures a RateLimiterRegistry with a custom RateLimiter configuration.\n *\n * @param configName configName for a custom shared RateLimiter configuration\n * @param configuration a custom shared RateLimiter configuration\n * @return a {@link RateLimiterRegistry.Builder}\n * @throws IllegalArgumentException if {@code configName.equals(\"default\")}\n */\n public Builder addRateLimiterConfig(String configName, RateLimiterConfig configuration) {\n if (configName.equals(DEFAULT_CONFIG)) {\n throw new IllegalArgumentException(\n \"You cannot add another configuration with name 'default' as it is preserved for default configuration\");\n }\n rateLimiterConfigsMap.put(configName, configuration);\n return this;\n }\n\n /**\n * Configures a RateLimiterRegistry with a RateLimiter registry event consumer.\n *\n * @param registryEventConsumer a RateLimiter registry event consumer.\n * @return a {@link RateLimiterRegistry.Builder}\n */\n public Builder addRegistryEventConsumer(RegistryEventConsumer<RateLimiter> registryEventConsumer) {\n this.registryEventConsumers.add(registryEventConsumer);\n return this;\n }\n\n /**\n * Configures a RateLimiterRegistry with Tags.\n * <p>\n * Tags added to the registry will be added to every instance created by this registry.\n *\n * @param tags default tags to add to the registry.\n * @return a {@link RateLimiterRegistry.Builder}\n */\n public Builder withTags(Map<String, String> tags) {\n this.tags = tags;\n return this;\n }\n\n /**\n * Builds a RateLimiterRegistry\n *\n * @return the RateLimiterRegistry\n */\n public RateLimiterRegistry build() {\n return new InMemoryRateLimiterRegistry(rateLimiterConfigsMap, registryEventConsumers, tags,\n registryStore);\n }\n }\n}", "public HotrodCacheFactory() {\n }", "public CacheFIFO(int paramInt)\r\n/* 11: */ {\r\n/* 12: 84 */ super(paramInt);\r\n/* 13: */ }", "@Override\n protected Scheduler scheduler() {\n return scheduler;\n }", "public JobRegistryImpl(String context) {\n\t\tthis.context = context;\n\t}", "public MmapFactoryImpl() {\n\t\tsuper();\n\t}", "public void method_9396() {\r\n super();\r\n this.field_8914 = Maps.newConcurrentMap();\r\n }", "@Bean\n JobRegistry jobRegistry() {\n return new MapJobRegistry();\n }", "public TreeProcessor createChildProcessor(ComponentManager manager,\n String actualSource,\n boolean checkReload)\n throws Exception {\n\n // Note: lifecycle methods aren't called, since this constructors copies all\n // that can be copied from the parent (see above)\n TreeProcessor child = new TreeProcessor(this, manager);\n child.checkReload = checkReload;\n child.resolver = (SourceResolver)manager.lookup(SourceResolver.ROLE);\n child.source = new DelayedRefreshSourceWrapper(child.resolver.resolveURI(actualSource), this.lastModifiedDelay);\n\n return child;\n }", "private GroupManager() {\r\n\t\tqueueManagers = new HashMap<Integer,QueueManager>();\r\n\t\tqueueManagerDeletionTimeout = -1;\r\n\t\thousekeepingSleep = HOUSEKEEPING_SLEEP;\r\n\t\thouseKeeper = new HouseKeeper(\"GroupManager_HouseKeeper\");\r\n\t\thouseKeeper.start();\r\n\t}", "public UseCaseThreadPoolScheduler() {\n\t\tthis.threadPoolExecutor = new ThreadPoolExecutor(POOL_SIZE, MAX_POOL_SIZE, TIMEOUT,\n\t\t\t\tTimeUnit.SECONDS, new ArrayBlockingQueue<Runnable>(POOL_SIZE));\n\t}", "public CrawlerCoordinatorServiceImpl(\n CuratorFramework curator,\n DatasetService datasetService,\n DatasetProcessStatusService datasetProcessStatusService,\n MetadataSynchronizer metadataSynchronizer) {\n this.curator = checkNotNull(curator, \"curator can't be null\");\n this.datasetService = checkNotNull(datasetService, \"datasetService can't be null\");\n this.datasetProcessStatusService = checkNotNull(datasetProcessStatusService, \"datasetProcessStatusService can't be null\");\n this.metadataSynchronizer =\n checkNotNull(metadataSynchronizer, \"metadataSynchronizer can't be null\");\n\n xmlQueue = buildQueue(curator, XML_CRAWL);\n dwcaQueue = buildQueue(curator, DWCA_CRAWL);\n abcdaQueue = buildQueue(curator, ABCDA_CRAWL);\n camtrapDpQueue = buildQueue(curator, CAMETRAPDP_CRAWL);\n }", "public CacheFIFO()\r\n/* 16: */ {\r\n/* 17: 95 */ this(20);\r\n/* 18: */ }", "@Override\r\n \tpublic void initialize() {\n \t\tThreadRenamingRunnable.setThreadNameDeterminer(ThreadNameDeterminer.CURRENT);\r\n \r\n \t\tInetSocketAddress address;\r\n \r\n \t\tif (m_host == null) {\r\n \t\t\taddress = new InetSocketAddress(m_port);\r\n \t\t} else {\r\n \t\t\taddress = new InetSocketAddress(m_host, m_port);\r\n \t\t}\r\n \r\n \t\tm_queue = new LinkedBlockingQueue<ChannelBuffer>(m_queueSize);\r\n \r\n \t\tExecutorService bossExecutor = Threads.forPool().getCachedThreadPool(\"Cat-TcpSocketReceiver-Boss-\" + address);\r\n \t\tExecutorService workerExecutor = Threads.forPool().getCachedThreadPool(\"Cat-TcpSocketReceiver-Worker\");\r\n \t\tChannelFactory factory = new NioServerSocketChannelFactory(bossExecutor, workerExecutor);\r\n \t\tServerBootstrap bootstrap = new ServerBootstrap(factory);\r\n \r\n \t\tbootstrap.setPipelineFactory(new ChannelPipelineFactory() {\r\n \t\t\tpublic ChannelPipeline getPipeline() {\r\n \t\t\t\treturn Channels.pipeline(new MyDecoder(), new MyHandler());\r\n \t\t\t}\r\n \t\t});\r\n \r\n \t\tbootstrap.setOption(\"child.tcpNoDelay\", true);\r\n \t\tbootstrap.setOption(\"child.keepAlive\", true);\r\n \t\tbootstrap.bind(address);\r\n \r\n \t\tm_logger.info(\"CAT server started at \" + address);\r\n \t\tm_factory = factory;\r\n \t}", "public BroadKeysRequest(HashMap<String, IPAddress> childrenServerMap)\n\t{\n\t\tsuper(CacheMessageType.BROAD_KEYS_REQUEST, childrenServerMap);\n\t}", "public Schedule(Map<Node, Processor> scheduledTasks, List<Processor> processors, int length) {\n this.scheduledTasks = scheduledTasks;\n this.processors = processors;\n this.length = length;\n }", "public AbstractDispatcher(AbstractDispatcherStrategy strategy)\n {\n running_ = true;\n strategy_ = strategy;\n }", "public JMSReplicationThread() {\r\n super(\"JMS Replication Thread\");\r\n setDaemon(true);\r\n setPriority(Thread.NORM_PRIORITY);\r\n }", "@Test\n public void testActorByMockingInsideActorMultiThreaded(@Capturing final Logger LOGGER) throws InterruptedException {\n final TestKit childActor1 = new TestKit(system);\n final TestKit scheduledChildActor = new TestKit(system);\n final TestKit genericActor = new TestKit(system);\n new Expectations() {{\n new MockUp<Router>() {\n @Mock\n private ActorRef createChildIfNull() {\n return childActor1.testActor();\n }\n\n @Mock\n private ActorRef createScheduledChildIfNull() {\n return scheduledChildActor.testActor();\n }\n };\n }};\n new TestKit(system) {{\n RouterState routerInitialState = new RouterState(0);\n ActorRefCreatorFactory factory = new ActorRefCreatorFactory();\n ActorRef router = system.actorOf(Router.props(routerInitialState, factory), \"router\");\n router.tell(new CommunicateWithActorMessage(4), router);\n childActor1.expectMsg(new ChildActor1Message(11111));\n scheduledChildActor.expectMsg(new StartSchedulerMessage(0));\n }};\n }", "private GDMThreadFactory(){}", "public PdfferProducerBean(PdfferRegistryBean registry) {\n this.registry = registry;\n }", "@Override\n public ScheduledExecutorService getSchedExecService() {\n return channelExecutor;\n }", "public SearchKeywordRequestChildBroadcastorSource(FreeClientPool clientPool, int treeBranchCount, int serverPort, SearchKeywordBroadcastRequestCreator creator)\n\t{\n\t\tsuper(clientPool, treeBranchCount, serverPort, creator);\n\t}", "public ComponentNode(Hierarchy hierarchy) {\n super(null, true);\n this.hierarchy = hierarchy;\n map = new WeakHashMap();\n }", "public RbTreeMap() {\n super();\n }", "protected abstract Object createJvmThreadingMBean(String paramString1, String paramString2, ObjectName paramObjectName, MBeanServer paramMBeanServer);", "public LocalEventLoopGroup(int nThreads) {\n/* 41 */ this(nThreads, null);\n/* */ }", "public ThreadPoolExecutorTracer(int corePoolSize, int maximumPoolSize, long keepAliveTime,\n TimeUnit unit, BlockingQueue<Runnable> workQueue) {\n super(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue);\n }", "protected abstract void scheduler_init();", "public EventDispatcher() {\n }", "public ThreadPoolExecutorTracer(int corePoolSize, int maximumPoolSize, long keepAliveTime,\n TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory) {\n super(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue, threadFactory);\n }", "public Driver(Runtime context, Schedule schedule, Clock clock, ExecutorService executor) {\n\t\tsuper(\"JolDriver\");\n\t\tthis.context = context;\n\t\tthis.taskQueue = new LinkedBlockingQueue<Task>();\n\t\tthis.schedule = schedule;\n\t\tthis.clock = clock;\n\t\tthis.logicalTime = 0L;\n\t\tthis.evaluator = new Evaluator(context, executor);\n\t\tthis.flusher = new Flusher(context);\n\t\tthis.timestamp = 0L;\n\n\t\tcontext.catalog().register(this.evaluator);\n\t\tcontext.catalog().register(this.flusher);\n\t}", "public EnergySchedulingFactoryImpl() {\n\t\tsuper();\n\t}", "public RedisTopicMapSystem() {\r\n\t}", "public Http2PriorityTree() {\n this.rootNode = new Http2PriorityNode(0, 0);\n nodesByID.put(0, this.rootNode);\n this.evictionQueue = new int[10]; //todo: make this size customisable\n }", "public static MetadataDispatcherQueue getInstance(){\n if(instance == null ){\n instance = new MetadataDispatcherQueue();\n }\n return instance;\n }", "@Override\n\t\tpublic void run() {\n\t\t\tArrayBlockingQueue<ByteBuffer> cachedBuffers = null;\n\t\t\tScheduledFuture<?> futureP = null;\n\t\t\tScheduledFuture<?> futureA = null;\n\t\t\tScheduledFuture<?> futureB = null;\n\t\t\ttry {\n\t\t\t\tScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(1, new ThreadFactory() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Thread newThread(@Nonnull Runnable r) {\n\t\t\t\t\t\tThread t = new Thread(THREAD_GROUP, r);\n\t\t\t\t\t\tt.setDaemon(true);\n\t\t\t\t\t\treturn t;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tByteBuffer b = ByteBuffer.wrap(genId);\n\t\t\t\tb.putInt(workerId);\n\t\t\t\tb.putLong(Long.reverse(System.nanoTime()) ^ System.currentTimeMillis());\n\t\t\t\tb.putInt(ThreadLocalFixedSeedRandom.current().nextInt());\n\t\t\t\tb.flip();\n\t\t\t\tb.get(genId);\n\n\t\t\t\t// tasks should be removed if the future is canceled\n\t\t\t\texecutor.setRemoveOnCancelPolicy(true);\n\n\t\t\t\t// make sure shutdown removes all pending tasks\n\t\t\t\texecutor.setContinueExistingPeriodicTasksAfterShutdownPolicy(false);\n\t\t\t\texecutor.setExecuteExistingDelayedTasksAfterShutdownPolicy(false);\n\n\t\t\t\tcachedBuffers = new ArrayBlockingQueue<>(CACHED_BUFFERS);\n\t\t\t\tfor (int i = 0; i < CACHED_BUFFERS; i++) {\n\t\t\t\t\tByteBuffer buff = ByteBuffer.allocate(BUFFER_SIZE);\n\t\t\t\t\tif (rustMode) {\n\t\t\t\t\t\tbuff.order(ByteOrder.LITTLE_ENDIAN);\n\t\t\t\t\t}\n\t\t\t\t\tcachedBuffers.add(buff);\n\t\t\t\t}\n\n\t\t\t\tint personSize = personsGenerator.itemSize();\n\t\t\t\tint auctionSize = auctionsGenerator.itemSize();\n\t\t\t\tint bidSize = bidGenerator.itemSize();\n\n\t\t\t\tlong ratio = targetPartitionSize / TOTAL_EVENT_RATIO;\n\t\t\t\tlong personsToGenerate = (PERSON_EVENT_RATIO * ratio) / personSize;\n\t\t\t\tlong auctionsToGenerate = (AUCTION_EVENT_RATIO * ratio) / auctionSize;\n\t\t\t\tlong bidsToGenerate = (BID_EVENT_RATIO * ratio) / auctionSize;\n\t\t\t\tlong recordsToGenerate = personsToGenerate + auctionsToGenerate + bidsToGenerate;\n\n\t\t\t\tint itemsPerBufferPerson = (BUFFER_SIZE - METADATA_SIZE) / personSize;\n\t\t\t\tint itemsPerBufferAuction = (BUFFER_SIZE - METADATA_SIZE) / auctionSize;\n\t\t\t\tint itemsPerBufferBid = (BUFFER_SIZE - METADATA_SIZE) / bidSize;\n\n\t\t\t\tAtomicLong sharedCounterPerson = new AtomicLong();\n\t\t\t\tAtomicLong sharedCounterAuction = new AtomicLong();\n\t\t\t\tAtomicLong sharedCounterBid = new AtomicLong();\n\n\t\t\t\tstarter.countDown();\n\t\t\t\tfairStarter.await();\n\n\t\t\t\tThroughtputLogger personLogger = new ThroughtputLogger(sharedCounterPerson, csvDirectory, name, topicNamePerson + \"-\" + workerId, 5, personSize);\n\t\t\t\tfutureP = executor.scheduleAtFixedRate(personLogger, 5, 5, TimeUnit.SECONDS);\n\n\t\t\t\tThroughtputLogger auctionLogger = new ThroughtputLogger(sharedCounterAuction, csvDirectory, name, topicNameAuction + \"-\" + workerId,5, auctionSize);\n\t\t\t\tfutureA = executor.scheduleAtFixedRate(auctionLogger, 6, 5, TimeUnit.SECONDS);\n\n\t\t\t\tThroughtputLogger bidsLogger = new ThroughtputLogger(sharedCounterBid, csvDirectory, name, topicNameBid + \"-\" + workerId,5, bidSize);\n\t\t\t\tfutureB = executor.scheduleAtFixedRate(bidsLogger, 6, 5, TimeUnit.SECONDS);\n\n\t\t\t\tdouble startMs = System.currentTimeMillis();\n\t\t\t\tlong sentBytes = 0;\n\t\t\t\tThreadLocalFixedSeedRandom randomness = ThreadLocalFixedSeedRandom.current();\n\n\n\t\t\t\tlong desiredThroughputBytesPerSecondMax = desiredThroughputBytesPerSecond;\n\t\t\t\tlong desiredThroughputBytesPerSecondMin = varyingWorkload ? 1024 * 1024 : desiredThroughputBytesPerSecond; // 1 MB/s\n\t\t\t\tlong throughputDelta = varyingWorkload ? 512 * 1024 : 0;\n\t\t\t\tlong currentThroughput = desiredThroughputBytesPerSecondMin;\n\t\t\t\tlong throughputChangeTimestamp = 0;\n\n\t\t\t\tRateLimiter throughputThrottler = RateLimiter.create(currentThroughput, 5, TimeUnit.SECONDS);\n\t\t\t\tLOG.debug(\"Create throughputThrottler for {} -> << {} MB/sec : {} MB/sec >>\",\n\t\t\t\t\t\tworkerId, desiredThroughputBytesPerSecondMin / ONE_MEGABYTE, desiredThroughputBytesPerSecondMax / ONE_MEGABYTE);\n\t\t\t\tint chkP = personsGenerator.genChecksum();\n\t\t\t\tint chkA = auctionsGenerator.genChecksum();\n\t\t\t\tint chkB = bidGenerator.genChecksum();\n\t\t\t\tlong pendingPerson = (recordsToGenerate / TOTAL_EVENT_RATIO) * PERSON_EVENT_RATIO;\n\t\t\t\tlong pendingAuctions = (recordsToGenerate / TOTAL_EVENT_RATIO) * AUCTION_EVENT_RATIO;\n\t\t\t\tlong pendingBids = (recordsToGenerate / TOTAL_EVENT_RATIO) * BID_EVENT_RATIO;\n\t\t\t\tlong sentBytesDelta = 0;\n\t\t\t\tByteBuffer bufP = cachedBuffers.take();\n\t\t\t\tByteBuffer bufA = cachedBuffers.take();\n\t\t\t\tByteBuffer bufB = cachedBuffers.take();\n\t\t\t\tbufA.putInt(chkA);\n\t\t\t\tbufP.putInt(chkP);\n\t\t\t\tbufB.putInt(chkB);\n\t\t\t\tint itemsInThisBufferA = (int) Math.min(itemsPerBufferAuction, pendingAuctions);\n\t\t\t\tint itemsInThisBufferP = (int) Math.min(itemsPerBufferPerson, pendingPerson);\n\t\t\t\tint itemsInThisBufferB = (int) Math.min(itemsPerBufferBid, pendingBids);\n\t\t\t\tlong backlogPerson = pendingPerson - itemsInThisBufferP;\n\t\t\t\tlong backlogAuction = pendingAuctions - itemsInThisBufferA;\n\t\t\t\tlong backlogBid = pendingBids - itemsInThisBufferA;\n\t\t\t\tbufP.putInt(itemsInThisBufferP);\n\t\t\t\tbufP.putLong(backlogPerson);\n\t\t\t\tbufA.putInt(itemsInThisBufferA);\n\t\t\t\tbufA.putLong(backlogAuction);\n\t\t\t\tbufB.putInt(itemsInThisBufferB);\n\t\t\t\tbufB.putLong(backlogBid);\n\n\t\t\t\tlong sentPersons = 0;\n\t\t\t\tlong sentAuctions = 0;\n\t\t\t\tlong sentBids = 0;\n\t\t\t\tlong eventId = 0;\n\n\t\t\t\tfor (; eventId < recordsToGenerate; eventId++) {\n\n\t\t\t\t\tfinal long timestamp = System.currentTimeMillis();\n\n\t\t\t\t\tlong rem = eventId % TOTAL_EVENT_RATIO;\n\t\t\t\t\tif (rem < PERSON_EVENT_RATIO) {\n\t\t\t\t\t\tpersonsGenerator.writeItem(eventId, timestamp, randomness, bufP);\n\t\t\t\t\t\tpendingPerson--;\n\t\t\t\t\t\tif (bufP.remaining() < personSize) {\n\t\t\t\t\t\t\tbufP.position(bufP.position() + bufP.remaining());\n\t\t\t\t\t\t\tProducerRecord<byte[], ByteBuffer> kafkaRecord = new ProducerRecord<>(topicNamePerson, targetPartition, genId, bufP);\n\t\t\t\t\t\t\tkafkaProducerPersons.send(kafkaRecord, new InternalCallback(cachedBuffers, bufP, sharedCounterPerson, itemsInThisBufferP));\n\t\t\t\t\t\t\tsentPersons += itemsInThisBufferP;\n\t\t\t\t\t\t\tbufP = cachedBuffers.take();\n\t\t\t\t\t\t\tbufP.putInt(chkP);\n\t\t\t\t\t\t\titemsInThisBufferP = (int) Math.min(itemsPerBufferPerson, pendingPerson);\n\t\t\t\t\t\t\tbacklogPerson = pendingPerson - itemsInThisBufferP;\n\t\t\t\t\t\t\tbufP.putInt(itemsInThisBufferP);\n\t\t\t\t\t\t\tbufP.putLong(backlogPerson);\n\t\t\t\t\t\t\tsentBytes += BUFFER_SIZE;\n\t\t\t\t\t\t\tsentBytesDelta += BUFFER_SIZE;\n\t\t\t\t\t\t\tthroughputThrottler.acquire(BUFFER_SIZE);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (rem < (PERSON_EVENT_RATIO + AUCTION_EVENT_RATIO)) {\n\t\t\t\t\t\tauctionsGenerator.writeItem(eventId, timestamp, randomness, bufA);\n\t\t\t\t\t\tpendingAuctions--;\n\t\t\t\t\t\tif (bufA.remaining() < auctionSize) {\n\t\t\t\t\t\t\tbufA.position(bufA.position() + bufA.remaining());\n\t\t\t\t\t\t\tProducerRecord<byte[], ByteBuffer> kafkaRecord = new ProducerRecord<>(topicNameAuction, targetPartition, genId, bufA);\n\t\t\t\t\t\t\tkafkaProducerAuctions.send(kafkaRecord, new InternalCallback(cachedBuffers, bufA, sharedCounterAuction, itemsInThisBufferA));\n\t\t\t\t\t\t\tsentAuctions += itemsInThisBufferA;\n\t\t\t\t\t\t\tbufA = cachedBuffers.take();\n\t\t\t\t\t\t\tbufA.putInt(chkA);\n\t\t\t\t\t\t\titemsInThisBufferA = (int) Math.min(itemsPerBufferAuction, pendingAuctions);\n\t\t\t\t\t\t\tbacklogAuction = pendingAuctions - itemsInThisBufferA;\n\t\t\t\t\t\t\tbufA.putInt(itemsInThisBufferA);\n\t\t\t\t\t\t\tbufA.putLong(backlogAuction);\n\t\t\t\t\t\t\tsentBytes += BUFFER_SIZE;\n\t\t\t\t\t\t\tsentBytesDelta += BUFFER_SIZE;\n\t\t\t\t\t\t\tthroughputThrottler.acquire(BUFFER_SIZE);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbidGenerator.writeItem(eventId, timestamp, randomness, bufB);\n\t\t\t\t\t\tpendingBids--;\n\t\t\t\t\t\tif (bufB.remaining() < bidSize) {\n\t\t\t\t\t\t\tbufB.position(bufB.position() + bufB.remaining());\n\t\t\t\t\t\t\tProducerRecord<byte[], ByteBuffer> kafkaRecord = new ProducerRecord<>(topicNameBid, targetPartition, genId, bufB);\n\t\t\t\t\t\t\tkafkaProducerBids.send(kafkaRecord, new InternalCallback(cachedBuffers, bufB, sharedCounterBid, itemsInThisBufferB));\n\t\t\t\t\t\t\tsentBids += itemsInThisBufferB;\n\t\t\t\t\t\t\tbufB = cachedBuffers.take();\n\t\t\t\t\t\t\tbufB.putInt(chkB);\n\t\t\t\t\t\t\titemsInThisBufferB = (int) Math.min(itemsPerBufferBid, pendingBids);\n\t\t\t\t\t\t\tbacklogBid = pendingBids - itemsInThisBufferB;\n\t\t\t\t\t\t\tbufB.putInt(itemsInThisBufferB);\n\t\t\t\t\t\t\tbufB.putLong(backlogBid);\n\t\t\t\t\t\t\tsentBytes += BUFFER_SIZE;\n\t\t\t\t\t\t\tsentBytesDelta += BUFFER_SIZE;\n\t\t\t\t\t\t\tthroughputThrottler.acquire(BUFFER_SIZE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n//\n\n\t\t\t\t\tif (sentBytesDelta > LOGGING_THRESHOLD) {\n\t\t\t\t\t\tLOG.info(\"{} has just sent {} MB to kafka in {} sec - rate limiter {} bytes/sec\",\n\t\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\t\tsentBytes / ONE_MEGABYTE,\n\t\t\t\t\t\t\t\t(timestamp - startMs) / 1_000,\n\t\t\t\t\t\t\t\tthroughputThrottler.getRate());\n\t\t\t\t\t\tsentBytesDelta = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((timestamp - throughputChangeTimestamp) > 10_000) {\n\t\t\t\t\t\tcurrentThroughput += throughputDelta;\n\t\t\t\t\t\tif (currentThroughput > desiredThroughputBytesPerSecondMax) {\n\t\t\t\t\t\t\tthroughputDelta = -throughputDelta;\n\t\t\t\t\t\t} else if (currentThroughput < desiredThroughputBytesPerSecondMin) {\n\t\t\t\t\t\t\tcurrentThroughput = desiredThroughputBytesPerSecondMin;\n\t\t\t\t\t\t\tthroughputDelta = -throughputDelta;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthroughputThrottler.setRate(currentThroughput);\n\t\t\t\t\t\tthroughputChangeTimestamp = timestamp;\n\t\t\t\t\t\tLOG.debug(\"Throttler changed to {}\", currentThroughput);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\twhile (!sharedCounterPerson.compareAndSet(sentPersons, 0)) {\n\t\t\t\t\tThread.sleep(100);\n\t\t\t\t}\n\t\t\t\twhile (!sharedCounterAuction.compareAndSet(sentAuctions, 0)) {\n\t\t\t\t\tThread.sleep(100);\n\t\t\t\t}\n\t\t\t\twhile (!sharedCounterAuction.compareAndSet(sentBids, 0)) {\n\t\t\t\t\tThread.sleep(100);\n\t\t\t\t}\n\t\t\t\tdouble end = System.currentTimeMillis();\n\t\t\t\tdouble diff = end - startMs;\n\t\t\t\tLOG.info(\"{} is finished after {} msec and {} GBs and {} items with an overall throughput of {}\",\n\t\t\t\t\t\tname,\n\t\t\t\t\t\tdiff,\n\t\t\t\t\t\tsentBytes / ONE_GIGABYTE,\n\t\t\t\t\t\trecordsToGenerate,\n\t\t\t\t\t\t(sentBytes * 1_000.0) / (diff * ONE_GIGABYTE));\n\t\t\t} catch (Throwable error) {\n\t\t\t\tLOG.error(\"Error: {}\", error);\n\t\t\t} finally {\n\t\t\t\tif (cachedBuffers != null) {\n\t\t\t\t\tcachedBuffers.clear();\n\t\t\t\t}\n\t\t\t\tkafkaProducerAuctions.close();\n\t\t\t\tkafkaProducerPersons.close();\n\t\t\t\tkafkaProducerBids.close();\n\t\t\t\tcontroller.countDown();\n\t\t\t\tif (futureA != null) {\n\t\t\t\t\tfutureA.cancel(false);\n\t\t\t\t}\n\t\t\t\tif (futureP != null) {\n\t\t\t\t\tfutureP.cancel(false);\n\t\t\t\t}\n\t\t\t\tif (futureB != null) {\n\t\t\t\t\tfutureB.cancel(false);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public NetworkBoundFetcher(AppExecutors appExecutors) {\n this.appExecutors = appExecutors;\n fetch();\n }", "public MessagingNode(String registryHost, int registryPort) {\n\t\trand = new Random();\n\t\t// Connect to the Registry\n\t\ttry {\n\t\t\tSocket registrySocket = new Socket(registryHost, registryPort);\n\t\t\tthis.registry = new TCPConnection(registrySocket, this);\n\t\t} catch (UnknownHostException e) {\n\t\t\tSystem.out.println(e.getMessage()\n\t\t\t\t\t+ \" Trouble opening socket to Registry.\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage()\n\t\t\t\t\t+ \" Trouble opening socket to Registry.\");\n\t\t}\n\t\t// Prepare the routing table\n\t\tnodesToSendTo = new TCPConnectionsCache();\n\t}", "private DeliveryServiceStateRegistry() { }", "public Container2DImpl() {\n\t\tthis(100, 100);\n\t}", "public RbTreeMap(Comparator<K> comp) {\n super(comp);\n }", "public GuidedTreeMutationCoordinator(CentralRegistry registry, double chanceOfRandomMutation,\n\t\t\tboolean preventDuplicates, LinkedHashMap<TreeMutationAbstract, Double> smartMutators,\n\t\t\tTreeMutationCoordinator dumbCoordinator) {\n\t\tthis.registry = registry;\n\t\tthis.chanceOfRandomMutation = chanceOfRandomMutation;\n\t\tthis.preventDuplicates = preventDuplicates;\n\t\tthis.smartMutators = smartMutators;\n\t\tthis.dumbCoordinator = dumbCoordinator;\n\t\tcalculateTotalChance();\n\t}", "public HostRouter(int port, int maxPlayers) {\n try {\n this.serverSocket = new ServerSocket(port);\n } catch (IOException e) {\n log.error(\"Error establishing host socket\", e);\n System.exit(-1);\n }\n this.clients = new HashMap<Integer, Client>();\n this.maxPlayers = maxPlayers;\n setLocalPlayerId(0);\n \n registeredMoves = new HashMap<Player, PlayerCommand>();\n pool = Executors.newFixedThreadPool(SevenWonders.MAX_PLAYERS+2);\n \n start();\n }", "AbstractConcurrencyLoadBalancer(Collection<T> tasks, List<CompletableTask.Listener<T>> listeners, Ticker ticker) {\n this.listeners = listeners;\n this.ticker = ticker;\n this.metrics = new MetricsImpl(tasks, ticker);\n }", "public BeaterServer(int port, ScheduledExecutorService scheduler) {\n\t\tthis(port, 100, scheduler);\n\t}", "private SchedulerThreadCounter()\n\t{\n\t\tii_counter = 100;\n\t}", "public MessageProcessorDistributor() {\n this.messageProcessors = new LinkedList<MessageProcessor>();\n }", "public interface RegistryExecutor extends Executor {\n ExecutionContext getExecutionContext();\n\n void setRunner(RegistryDelegate<? extends RegistryTask> delegate);\n\n void start();\n\n void stop();\n}", "ServiceRegistry() {\n mRegistrations = new TreeMap<String, ServiceFactory>();\n }", "public DMSQueueEntryComparator()\n {\n\n }", "protected CommandDispatcher()\n {\n // do nothing\n }", "CGroupsHandlerImpl(Configuration conf, PrivilegedOperationExecutor\n privilegedOperationExecutor, String mtab)\n throws ResourceHandlerException {\n // Remove leading and trialing slash(es)\n this.cGroupPrefix = conf.get(YarnConfiguration.\n NM_LINUX_CONTAINER_CGROUPS_HIERARCHY, \"/hadoop-yarn\")\n .replaceAll(\"^/+\", \"\").replaceAll(\"/+$\", \"\");\n this.cGroupsMountConfig = new CGroupsMountConfig(conf);\n this.deleteCGroupTimeout = conf.getLong(\n YarnConfiguration.NM_LINUX_CONTAINER_CGROUPS_DELETE_TIMEOUT,\n YarnConfiguration.DEFAULT_NM_LINUX_CONTAINER_CGROUPS_DELETE_TIMEOUT) +\n conf.getLong(YarnConfiguration.NM_SLEEP_DELAY_BEFORE_SIGKILL_MS,\n YarnConfiguration.DEFAULT_NM_SLEEP_DELAY_BEFORE_SIGKILL_MS) + 1000;\n this.deleteCGroupDelay =\n conf.getLong(YarnConfiguration.NM_LINUX_CONTAINER_CGROUPS_DELETE_DELAY,\n YarnConfiguration.DEFAULT_NM_LINUX_CONTAINER_CGROUPS_DELETE_DELAY);\n this.controllerPaths = new HashMap<>();\n this.parsedMtab = new HashMap<>();\n this.rwLock = new ReentrantReadWriteLock();\n this.privilegedOperationExecutor = privilegedOperationExecutor;\n this.clock = SystemClock.getInstance();\n mtabFile = mtab;\n init();\n }", "private WeakOrderQueue()\r\n/* 216: */ {\r\n/* 217:245 */ this.owner = null;\r\n/* 218:246 */ this.availableSharedCapacity = null;\r\n/* 219: */ }", "public ResourceDAOImpl(TransactionSynchronizationRegistry trxSynchRegistry) {\n super();\n this.runningInTrx = true;\n this.trxSynchRegistry = trxSynchRegistry;\n }", "public AsyncResolver(String name,\n ClusterResolver<T> delegate,\n List<T> initialValues,\n int executorThreadPoolSize,\n int refreshIntervalMs) {\n this(\n name,\n delegate,\n initialValues,\n executorThreadPoolSize,\n refreshIntervalMs,\n 0\n );\n\n warmedUp.set(true);\n }", "@PostConstruct\r\n public void init() {\r\n \t//registerNotificationCallback(null); //to register taskexecution engine as default\r\n ThreadFactory namedThreadFactory = new ThreadFactoryBuilder().setNameFormat(\"MARM-thread-%d\").build();\r\n \texecutor = Executors.newFixedThreadPool(10, namedThreadFactory);\r\n\r\n ThreadFactory brokerThreadFactory = new ThreadFactoryBuilder().setNameFormat(\"Broker-thread-%d\").build();\r\n brokerExecutor = Executors.newFixedThreadPool(10, brokerThreadFactory);\r\n\r\n ThreadFactory logThreadFactory = new ThreadFactoryBuilder().setNameFormat(\"LOG-thread-%d\").setPriority(Thread.MIN_PRIORITY).build();\r\n logExecutor = Executors.newFixedThreadPool(10, logThreadFactory);\r\n broker.registerInputListener(this);\r\n broker.registerControlListener(this);\r\n }", "public static void main(String args[])\n {\n\t ScheduledExecutorService executorService= Executors.newScheduledThreadPool(2);\n\t Runnable task1=new RunnableChild(\"task1\");\n\t Runnable task2=new RunnableChild(\"task2\");\n\t Runnable task3=new RunnableChild(\"task3\");\n\t executorService.submit(task1);\n\t executorService.submit(task2);\n\t executorService.submit(task3);\n\t executorService.schedule(task1,20, TimeUnit.SECONDS);\n\t System.out.println(\"*******shutting down called\");\n\t executorService.shutdown();\n }", "public BroadcastSearchKeywordRequestThread(int taskSize, String dispatcherKey, MulticastMessageDisposer<SearchKeywordBroadcastRequest> binder)\n\t{\n\t\tsuper(taskSize, dispatcherKey, binder);\n\t}", "public ForkJoinPoolMgr() {\n }", "@Override\n public Collection<Object> createComponents(Client client,\n ClusterService clusterService,\n ThreadPool threadPool,\n NamedXContentRegistry xContentRegistry,\n Environment environment,\n NodeEnvironment nodeEnvironment,\n NamedWriteableRegistry namedWriteableRegistry,\n Supplier<RepositoriesService> repositoriesServiceSupplier) {\n return Collections.singletonList(pipelineRegistry);\n }", "@Bean\n public MultiThreadedHttpConnectionManager multiThreadedHttpConnectionManager() {\n return new MultiThreadedHttpConnectionManager();\n }", "public CorbaServerRequestDispatcher getServerRequestDispatcher(int scid){\n CorbaServerRequestDispatcher sdel=\n (CorbaServerRequestDispatcher)(SDRegistry.get(scid));\n if(sdel==null)\n sdel=(CorbaServerRequestDispatcher)(SDRegistry.get(defaultId));\n return sdel;\n }", "public GroupMessageReceiverImpl() {\n super(MessageSender.DestinationType.Queue);\n }", "public TeamCacheManager() {\r\n }", "public WildflyHystrixConcurrencyStrategy(final ManagedThreadFactory threadFactory) {\n\t\t//\n\t\t// Used by CDI provider.\n\t\t\n\t\tthis.threadFactory = threadFactory;\n\t}", "public CacheTracabilityFactoryImpl() {\n\t\tsuper();\n\t}", "BotQueue( ThreadGroup group, BotAction botAction ) {\n super( group, \"BotQueue\" );\n repository = new Vector<File>();\n m_group = group;\n m_lastSpawnTime = 0;\n m_botAction = botAction;\n directory = new File( m_botAction.getCoreData().getGeneralSettings().getString( \"Core Location\" ));\n\n int delay = m_botAction.getGeneralSettings().getInt( \"SpawnDelay\" );\n\n if( delay == 0 )\n SPAWN_DELAY = 20000;\n else\n SPAWN_DELAY = delay;\n\n if ( m_botAction.getGeneralSettings().getString( \"Server\" ).equals(\"localhost\") ||\n m_botAction.getGeneralSettings().getString( \"Server\" ).equals(\"127.0.0.1\"))\n SPAWN_DELAY = 100;\n\n resetRepository();\n\n m_botTypes = Collections.synchronizedMap( new HashMap<String, Integer>() );\n m_botStable = Collections.synchronizedMap( new HashMap<String, ChildBot>() );\n m_spawnQueue = Collections.synchronizedList( new LinkedList<ChildBot>() );\n\n m_botTypes.put( \"hubbot\", new Integer( 1 ));\n\n if( repository.size() == 0 ) {\n Tools.printLog( \"There are no bots to load. Did you set the Core Location parameter in setup.cfg improperly?\" );\n } else {\n System.out.println( \"Looking through \" + directory.getAbsolutePath()\n + \" for bots. \" + (repository.size() - 1) + \" child directories.\" );\n System.out.println();\n System.out.println(\"=== Loading bots ... ===\");\n }\n\n m_loader = new AdaptiveClassLoader( repository, getClass().getClassLoader() );\n }", "public ExpandableExecutorsListAdapter(Context context, HashMap<Group, List<MemberOfGroup>> listChildData) {\n this.context = context;\n res = context.getResources();\n instance = this;\n this.listDataHeader = new ArrayList<Group>();\n for (Group g : listChildData.keySet()){\n listDataHeader.add(g);\n }\n this.listChildData = listChildData;\n listOfChildRadioButton = new HashMap<Pair<Integer, Integer>, RadioButton>();\n listOfGroupRadioButton = new HashMap<Integer, RadioButton>();\n newTask = CurrentCreatingTask.getInstance();\n\n }", "public AbstractCache() {\n }", "public DispatcherRunnable(Dispatcher dispatcher, BlockingQueue<Empleado> empleadosQueue,\n\t\t\tBlockingQueue<LLamada> llamadasQueue) {\n\t\tthis.dispatcher = dispatcher;\n\t\tthis.empleadosQueue = empleadosQueue;\n\t\tthis.llamadasQueue = llamadasQueue;\n\t}", "ValueQueue() { super(); }", "@Override\n\tpublic void addResourceHandlers(final ResourceHandlerRegistry registry) {\n\n\t\tSystem.out.println(\"execution is reaching addResourceHandlers()\");\n\t\tsuper.addResourceHandlers(registry);\n\t\tregistry.addResourceHandler(\"/images/**\").addResourceLocations(\"/resources/images/\").setCachePeriod(0);\n\t\tregistry.addResourceHandler(\"/js/**\").addResourceLocations(\"/resources/js/\").setCachePeriod(0);\n\t\tregistry.addResourceHandler(\"/css/**\").addResourceLocations(\"/resources/css/\").setCachePeriod(0);\n\t\tregistry.addResourceHandler(\"/fonts/**\").addResourceLocations(\"/resources/fonts/\").setCachePeriod(0);\n\t\t// this is one year cache period 31556926\n\t}", "public ServiceExampleWorker() {\n super(\"ServiceExampleWorker\");\n shouldExecute = true;\n messageBinder = new IMessageBinder.Stub() {\n private List<ISubscriber> subscriberList = new ArrayList<>();\n\n @Override\n public void addSubscriber(ISubscriber subscriber) throws RemoteException {\n subscriberList.add(subscriber);\n }\n\n @Override\n public void removeSubscriber(ISubscriber subscriber) throws RemoteException {\n subscriberList.remove(subscriber);\n }\n\n @Override\n public void sendUpdate(String data) throws RemoteException {\n for (ISubscriber subscriber : subscriberList) {\n subscriber.send(data);\n }\n }\n\n @Override\n public void basicTypes(int anInt, long aLong, boolean aBoolean, float aFloat, double aDouble, String aString) throws RemoteException {\n\n }\n };\n }" ]
[ "0.54466844", "0.54384243", "0.5278368", "0.52579147", "0.5202359", "0.5084256", "0.49712035", "0.49515414", "0.49410453", "0.491532", "0.4901947", "0.48784083", "0.48387533", "0.48090726", "0.4763856", "0.47357917", "0.47019508", "0.46850586", "0.46572554", "0.46422276", "0.4621418", "0.4619717", "0.4612507", "0.45881644", "0.45620114", "0.45509702", "0.4548699", "0.4545667", "0.4536775", "0.45308363", "0.44982144", "0.44736487", "0.44416174", "0.4434785", "0.44229466", "0.44078708", "0.44076577", "0.44056803", "0.44009346", "0.440055", "0.4400212", "0.43976358", "0.43875948", "0.43875504", "0.4386346", "0.43777925", "0.4372676", "0.4371714", "0.43637443", "0.43248406", "0.43234706", "0.4322099", "0.4321305", "0.4317047", "0.43091795", "0.43075708", "0.43036294", "0.42974883", "0.4287046", "0.42843422", "0.4271707", "0.42494416", "0.42458186", "0.4241411", "0.42385995", "0.42297074", "0.422242", "0.4209785", "0.42069057", "0.42036805", "0.41913128", "0.41872537", "0.41871464", "0.41842228", "0.41814885", "0.41791463", "0.41783544", "0.41754857", "0.41743967", "0.41644126", "0.41619575", "0.4155359", "0.41552702", "0.41519928", "0.4150172", "0.41483104", "0.41479126", "0.41405785", "0.41405386", "0.41389924", "0.41387996", "0.41373757", "0.4134022", "0.41325238", "0.41254002", "0.41252083", "0.41201764", "0.41199046", "0.41185358", "0.41175142" ]
0.88775396
0
TODO Autogenerated method stub
@Override public void dispose(long timeout) throws InterruptedException { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void process(MessageStream<ServerMessage> message) { }
{ "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
Override to tear down your specific external resource.
protected void after() { System.clearProperty(DandelionConfig.BUNDLE_PRE_LOADERS.getName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void deAllocateNativeResource();", "@Override\n public void cleanup() {\n if (this.inputStream != null) {\n try {\n this.inputStream.close();\n }\n catch (IOException var1_1) {}\n }\n this.defaultFetcher.cleanup();\n }", "@Override\r\n\tpublic void cleanup() {\n\t\t\r\n\t}", "@Override\r\n public void cleanup() {\n }", "@Override\n public void cleanup() {\n \n }", "@Override\n public void cleanup() {\n \n }", "protected abstract void cleanup();", "@Override\n public void destroy() {\n super.destroy();\n if(connector != null) {\n connector.close();\n }\n }", "public void cleanup();", "@Override\n public void cleanup() {\n }", "void delistResource(ExoResource xares) throws RollbackException, SystemException;", "@Override\n\tpublic void cleanup() {\n\n\t}", "@Override\n\tpublic void cleanup() {\n\n\t}", "private void deleteResource() {\n }", "@Override\n\tpublic void cleanup() {\n\t\t\n\t}", "@Override\n\tpublic void cleanup() {\n\t\t\n\t}", "@Override\n\tpublic void cleanup() {\n\t\t\n\t}", "public void teardown() {\n // This is called by the C++ MediaPlayerPrivate dtor.\n // Cancel any active poster download.\n if (mPosterDownloader != null) {\n mPosterDownloader.cancelAndReleaseQueue();\n }\n mNativePointer = 0;\n }", "public void cleanup() {\r\n }", "@After\n public void unregisterIdlingResource() {\n if (mIdlingResource != null) {\n //Espresso.unregisterIdlingResources(mIdlingResource);\n IdlingRegistry.getInstance().unregister(mIdlingResource);\n }\n }", "@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tCleanup();\r\n\t}", "@Override\n public void destroy() {\n // clean up any resources created by initialize\n }", "@Override\n public void destroy() {\n // destroy any persistent resources\n // such as thread pools or persistent connections\n }", "@Override\n public void teardown() {\n }", "@Override\n\tpublic void onDestroy() {\n\t\tsuper.DeInit();\n\t\tsuper.onDestroy();\n\t}", "public void cleanup() {\n }", "@Override\n public void destroy() {\n }", "@Override\n protected void onDestroy() {\n Initialization.exit(this);\n super.onDestroy();\n }", "public void shutdown(){\n\t\tAndroidSensorDataManagerSingleton.cleanup();\n\t}", "public void deallocate() {\n\tsetLoaded(false);\n\n if (!externalAudioPlayer) {\n if (audioPlayer != null) {\n audioPlayer.close();\n audioPlayer = null;\n }\n }\n \n\tif (!externalOutputQueue) {\n\t outputQueue.close();\n\t}\n }", "@Override\r\n\t\tpublic void destroy() {\n\t\t\t\r\n\t\t}", "@PreDestroy\n public void destroy() {\n TempObjectCache tempObjectCache = TempObjectCache.getInstance();\n tempObjectCache.cleanUp();\n\n // release all persist caches & persist cache redis client\n PersistObjectCache persistObjectCache = PersistObjectCache.getInstance();\n persistObjectCache.cleanUp();\n\n // destroy redis client pool\n RedisTool.destroy();\n\n // Shutdown UniRest\n try {\n Unirest.shutdown();\n } catch (IOException ignore) {\n }\n }", "@Override\n\t\tpublic void unregisterResource(FlexoResource<?> resource, InJarResourceImpl serializationArtefact) {\n\t\t\tunregisterResource(resource);\n\t\t}", "@Override\r\n\tpublic void destroy() {\n\t\tsuper.destroy();\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\tsuper.destroy();\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\tsuper.destroy();\r\n\t}", "protected void cleanup() {\n try {\n if (_in != null) {\n _in.close();\n _in = null;\n }\n if (_out != null) {\n _out.close();\n _out = null;\n }\n if (_socket != null) {\n _socket.close();\n _socket = null;\n }\n } catch (java.io.IOException e) {\n }\n }", "public void shutdown() {\n\t\tInput.cleanUp();\n\t\tVAO.cleanUp();\n\t\tTexture2D.cleanUp();\n\t\tResourceLoader.cleanUp();\n\t}", "@Override\n\tpublic void destroy() {\n\t\tsuper.destroy();\n\t}", "@Override\n\tpublic void destroy() {\n\t\tsuper.destroy();\n\t}", "@Override\n\tpublic void destroy() {\n\t\tsuper.destroy();\n\t}", "@Override\n\tpublic void destroy() {\n\t\tsuper.destroy();\n\t}", "@Override\n\tpublic void destroy() {\n\t\tsuper.destroy();\n\t}", "@Override\n\tpublic void destroy() {\n\t\tsuper.destroy();\n\t}", "@Override\n\tpublic void destroy() {\n\t\tsuper.destroy();\n\t}", "@Override\n\tpublic void destroy() {\n\t\tsuper.destroy();\n\t}", "@Override\n\tpublic void destroy() {\n\t\tsuper.destroy();\n\t}", "public void release() { \r\n\t remoteControlClient = null;\r\n\t }", "public void cleanup() {\n\t}", "private void cleanupResources() {\n Log.d(TAG, \"Initiating resource cleanup\");\n if (mWorkerThread != null) {\n mWorkerThread.quitSafely();\n try {\n mWorkerThread.join();\n mWorkerThread = null;\n } catch (InterruptedException e) {\n Log.e(TAG, \"Failed to join on mWorkerThread\");\n }\n }\n //mListener = null;//Release later when being finalized\n mDisplayHandler = null;\n mERDHandler = null;\n mContext = null;\n surface = null;\n mIface = null;\n mLocalWfdDevice = null;\n mPeerWfdDevice = null;\n mActionListener = null;\n Log.d(TAG, \"Done with resource cleanup\");\n }", "protected abstract void disposeResources();", "@After\n public void unregisterIdlingResource() {\n IdlingRegistry.getInstance().unregister(EspressoIdlingResource.getIdlingResource());\n }", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy()\r\n\t{\n\t\t\r\n\t}", "public void cleanup() throws ResourceException {\n checkIfDestroyed();\n\n logger.fine(\" 8.- (\" + myId + \") ManagedConnection::cleanup called\");\n\n invalidateJavaMailConnections();\n }", "@Override\r\n public void destroy() {\n }", "@Override\r\n public void destroy() {\n }", "@Override\r\n protected void onDestroy() {\r\n Log.d(LOGTAG, \"onDestroy\");\r\n super.onDestroy();\r\n\r\n try {\r\n vuforiaAppSession.stopAR();\r\n } catch (ArException e) {\r\n Log.e(LOGTAG, e.getString());\r\n }\r\n\r\n // Unload texture:\r\n mTextures.clear();\r\n mTextures = null;\r\n\r\n System.gc();\r\n }", "@Override\n public void destroy() {\n }", "@Override\n public void destroy() {\n }", "@Override\n public void destroy() {\n }", "@Override\n public void destroy() {\n }", "@Override\n public void destroy() {\n }", "public void destroy() {\r\n\t\tsuper.destroy();\r\n\t\tBirtEngine.destroyBirtEngine();\r\n\t}", "private void releaseResources() {\n\t\tstopForeground(true);\n\t\taudioManager.unregisterRemoteControlClient(remoteControlClient);\n\t\taudioManager.unregisterMediaButtonEventReceiver(remoteReceiver);\n\t\t\n\t\tif (mediaPlayer != null){\n\t\t\tmediaPlayer.reset();\n\t\t\tmediaPlayer.release();\n\t\t\tmediaPlayer = null;\n\t\t}\n\t\t\n\t\tif (wifiLock.isHeld()) {\n\t\t\twifiLock.release();\n\t\t}\n\t}", "@Override\n\tpublic void teardown() {\n\t}", "public void release()\n {\n _pixxConfiguration=null;\n }", "public void destroy() {}", "public void destroy() {}", "@Override\n public void destroy() {\n }", "public final void destroy()\n {\n processDestroy();\n super.destroy();\n }", "public void destroy() {\n \t\n }", "@Override\r\n\tpublic void destroy() {\n\t}", "@Override\r\n\tpublic void destroy() throws Exception {\n\t\t\r\n\t}", "private void cleanup() {\n if (mPosterBytes != null) {\n try {\n mPosterBytes.close();\n } catch (IOException ignored) {\n // Ignored.\n } finally {\n mPosterBytes = null;\n }\n }\n }", "@Override\n public void onDestroy() {\n BusProvider.getInstance().unregister(this);\n super.onDestroy();\n }", "@Override\n public void destroy() {\n super.destroy();\n mNativePtr = 0;\n }", "public static void destroy() {\n\t}", "public void destroy() {\n\t\t\r\n\t}", "public void destroy() {\n\t\t\r\n\t}", "public void destroy() {\n\t\t\r\n\t}", "public void destroy() {\n\t\t\r\n\t}", "@Override\n public void destroy() {\n }", "void unsetRequiredResources();", "@Override\n public void destroy() {\n\n }", "@Override\n public void destroy() {\n\n }", "@Override\n public void destroy() {\n\n }", "@Override\n\tpublic void destroy() {\n\t\t\n\t}" ]
[ "0.7079005", "0.6552908", "0.6524217", "0.6507382", "0.64794225", "0.64794225", "0.64756393", "0.6472446", "0.6432555", "0.64299124", "0.6425782", "0.6386949", "0.6386949", "0.6384397", "0.63787615", "0.63787615", "0.63787615", "0.63715833", "0.63614714", "0.6337001", "0.6335677", "0.63350374", "0.63239", "0.62837857", "0.62823355", "0.626046", "0.6252477", "0.623528", "0.6234846", "0.62323517", "0.6230829", "0.6228877", "0.62274235", "0.6224093", "0.6224093", "0.6224093", "0.62028295", "0.6194065", "0.6184811", "0.6184811", "0.6184811", "0.6184811", "0.6184811", "0.6184811", "0.6184811", "0.6184811", "0.6184811", "0.6177694", "0.61678064", "0.61609346", "0.6156418", "0.6155808", "0.61452925", "0.61452925", "0.61452925", "0.61452925", "0.61452925", "0.61452925", "0.61452925", "0.61452925", "0.61452925", "0.61452925", "0.61452925", "0.61452925", "0.61452925", "0.61452925", "0.613378", "0.6126879", "0.6125957", "0.6125957", "0.61046976", "0.6102785", "0.6102785", "0.6102785", "0.6102785", "0.6102785", "0.60972464", "0.609007", "0.60550815", "0.60520595", "0.6049894", "0.6049894", "0.60401064", "0.6039225", "0.6035699", "0.602789", "0.60273266", "0.6026532", "0.6025741", "0.6019337", "0.6012136", "0.6010959", "0.6010959", "0.6010959", "0.6010959", "0.6006635", "0.6004866", "0.6004102", "0.6004102", "0.6004102", "0.60037845" ]
0.0
-1
Check if the supplied context can render PDF files via some installed application that reacts to a intent with the pdf mime type and viewing action.
public static boolean canDisplayPdf(Context context) { PackageManager packageManager = context.getPackageManager(); Intent testIntent = new Intent(Intent.ACTION_VIEW); testIntent.setType(MIME_TYPE_PDF); if (packageManager.queryIntentActivities(testIntent, PackageManager.MATCH_DEFAULT_ONLY).size() > 0) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isDeviceIndependentType(String mimeType){\n return mimeType.matches(INDEPENDENT_PATERN) &&\n independentResources.contains(mimeType);\n }", "private static boolean isIntentAvailable(Context context, String action) {\n final PackageManager packageManager = context.getPackageManager();\n final Intent intent = new Intent(action);\n List<ResolveInfo> list =\n packageManager.queryIntentActivities(intent,\n PackageManager.MATCH_DEFAULT_ONLY);\n return list.size() > 0;\n }", "public static void openDocument(Context context, String strFilePath, String strFileType) {\n try {\n File file = new File(strFilePath);\n Intent intent = new Intent(Intent.ACTION_VIEW);\n /* if (strFileType.equals(\"pdf\")) {\n intent.setDataAndType(Uri.fromFile(file), \"application/pdf\");\n } else if (strFileType.equals(\"doc\") || strFileType.equals(\"docx\")) {\n MimeTypeMap myMime = MimeTypeMap.getSingleton();\n String mimeType = myMime.getMimeTypeFromExtension(strFilePath);\n intent.setDataAndType(Uri.fromFile(file), mimeType);\n } else {\n intent.setDataAndType(Uri.fromFile(file), \"application/*\");\n }*/\n intent.setDataAndType(Uri.fromFile(file), \"application/*\");\n intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);\n context.startActivity(intent);\n } catch (ActivityNotFoundException activityNotFoundException) {\n activityNotFoundException.printStackTrace();\n throw activityNotFoundException;\n } catch (Exception otherException) {\n otherException.printStackTrace();\n throw otherException;\n }\n }", "public static boolean isIntentAvailable(Context context, String action) {\n\t\tfinal PackageManager packageManager = context.getPackageManager();\n\t\tfinal Intent intent = new Intent(action);\n\t\tList<ResolveInfo> list =\n\t\t\tpackageManager.queryIntentActivities(intent,\n\t\t\t\t\tPackageManager.MATCH_DEFAULT_ONLY);\n\t\treturn list.size() > 0;\n\t}", "public Boolean exec(Context context) {\n return Boolean.valueOf(((AppRatingService) this.appRatingService.get()).shouldShowDialog());\n }", "public static boolean m121746a(Context context, Intent intent) {\n List<ResolveInfo> queryIntentActivities = context.getPackageManager().queryIntentActivities(intent, 0);\n if (queryIntentActivities == null || queryIntentActivities.size() <= 0) {\n return true;\n }\n return false;\n }", "private Boolean isPDF(PrintDocument printDocument) {\n String url = printDocument.getUrl();\n String filename = url.substring(url.lastIndexOf(\"/\") + 1);\n\n return filename.matches(\"^.*\\\\.(pdf)$\");\n }", "private void getPDF() {\n //for greater than lolipop versions we need the permissions asked on runtime\n //so if the permission is not available user will go to the screen to allow storage permission\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && ContextCompat.checkSelfPermission(this,\n Manifest.permission.READ_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED) {\n Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS,\n Uri.parse(\"package:\" + getPackageName()));\n startActivity(intent);\n return;\n }\n\n //creating an intent for file chooser\n Intent intent = new Intent();\n intent.setType(\"application/pdf\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select PDF File\"), PICK_PDF_CODE);\n }", "@Override\r\n\tpublic boolean canExecute(ICustomContext context) {\n\t\tboolean ret = false;\r\n\t\tPictogramElement[] pes = context.getPictogramElements();\r\n\t\tif (pes != null && pes.length == 1) {\r\n\t\t\tObject bo = getBusinessObjectForPictogramElement(pes[0]);\r\n\t\t\tif (bo instanceof Interface) {\r\n\t\t\t\tret = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "public static boolean isIntentAvailable(Context context, Intent intent) {\n final PackageManager packageManager = context.getPackageManager();\n List<ResolveInfo> list = packageManager.queryIntentActivities(intent, 0/*PackageManager.MATCH_DEFAULT_ONLY*/);\n\n return list.size() > 0;\n }", "public static boolean isIntentAvailable(Context context, Intent intent) {\n PackageManager packageManager = context.getPackageManager();\n List<ResolveInfo> list = packageManager.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);\n return list.size() > 0;\n }", "public void showPdfChooser() {\n Intent intent2 = new Intent();\n intent2.setType(\"application/pdf\");\n intent2.setAction(\"android.intent.action.GET_CONTENT\");\n startActivityForResult(Intent.createChooser(intent2, \"Select Document\"), PICK_IMAGE_REQUEST);\n }", "private boolean permisos() {\n for(String permission : PERMISSION_REQUIRED) {\n if(ContextCompat.checkSelfPermission(getContext(), permission) != PackageManager.PERMISSION_GRANTED) {\n return false;\n }\n }\n return true;\n }", "private static boolean m34054a(Context context, Intent intent) {\n return context.getPackageManager().queryIntentActivities(intent, 65536).size() > 0;\n }", "public boolean handles(DeploymentContext context) {\n // Scans for pu roots in the \"lib\" dir of an application.\n // We do not scan for PU roots in root of .ear. JPA 2.0 spec will clarify that it is not a portable use case.\n // It is not portable use case because JavaEE spec implies that jars in root of ears are not visible by default\n // to components (Unless an explicit Class-Path manifest entry is present) and can potentially be loaded by\n // different class loaders (corresponding to each component that refers to it) thus residing in different name\n // space. It does not make sense to make them visible at ear level (and thus in a single name space)\n boolean isJPAApplication = false;\n ApplicationHolder holder = context.getModuleMetaData(ApplicationHolder.class);\n ReadableArchive appRoot = context.getSource();\n if (holder != null && holder.app != null) {\n isJPAApplication = scanForPURootsInLibDir(appRoot, holder.app.getLibraryDirectory());\n\n if(!isJPAApplication) {\n if(DeploymentUtils.useV2Compatibility(context) ) {\n //Scan for pu roots in root of ear\n isJPAApplication = scanForPURRootsInEarRoot(context, holder.app.getModules());\n }\n }\n }\n return isJPAApplication;\n }", "private void showFileChooser() {\n // Intent intent = new Intent();\n\n /* intent.setType(\"application/pdf\");\n intent.setType(\"docx*//*\");*/\n\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n String [] mimeTypes = {\"application/pdf/docx\"};\n intent.setType(\"*/*\");\n intent.putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes);\n\n\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), PICK_IMAGE_REQUEST);\n }", "private Boolean checkRuntimePermission() {\n List<String> permissionsNeeded = new ArrayList<String>();\n\n final List<String> permissionsList = new ArrayList<String>();\n if (!addPermission(permissionsList, Manifest.permission.READ_EXTERNAL_STORAGE))\n permissionsNeeded.add(\"Storage\");\n if (!addPermission(permissionsList, Manifest.permission.CAMERA))\n permissionsNeeded.add(\"Camera\");\n /* if (!addPermission(permissionsList, Manifest.permission.WRITE_CONTACTS))\n permissionsNeeded.add(\"Write Contacts\");*/\n\n if (permissionsList.size() > 0) {\n if (permissionsNeeded.size() > 0) {\n // Need Rationale\n String message = \"You need to grant access to \" + permissionsNeeded.get(0);\n for (int i = 1; i < permissionsNeeded.size(); i++)\n message = message + \", \" + permissionsNeeded.get(i);\n showMessageOKCancel(message,\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n requestPermissions(permissionsList.toArray(new String[permissionsList.size()]),\n REQUEST_CODE_ASK_MULTIPLE_PERMISSIONS);\n }\n }\n });\n return false;\n }\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n requestPermissions(permissionsList.toArray(new String[permissionsList.size()]),\n REQUEST_CODE_ASK_MULTIPLE_PERMISSIONS);\n }\n return false;\n }\n return true;\n }", "private void detectionPDF() {\n\t\tif (sourcePDF.getText().equals(\"\")){\n\t\t\tlockButton();\n\t\t\tmessage.setText(\"<html><span color='red'>Pas de PDF</span></html>\");\n\t\t}\n\t\telse{\n\t\t\tif(new File(sourcePDF.getText()).exists()){\n\t\t\t\tmessage.setText(\"<html><head><meta charset=\\\"UTF-8\\\"><span color='green'>Fichier PDF détecté</span></html>\");\n\t\t\t\tunlockButton();\n\t\t\t}\n\t\t\telse\n\t\t\t\tmessage.setText(\"<html><span color='red'>le fichier \"+ sourcePDF.getText() +\" n'existe pas</span></html>\");\n\t\t}\n\t}", "private void selectPdf() {\n\n Intent intent = new Intent();\n intent.setType(\"application/pdf\");\n intent.setAction(Intent.ACTION_GET_CONTENT);//to fetch files\n startActivityForResult(intent,86);\n\n\n\n }", "private boolean isDeviceDependentType(String mimeType){\n return !mimeType.matches(INDEPENDENT_PATERN);\n }", "public static boolean m45181a() {\n Context b = m45183b();\n if (b != null) {\n try {\n PackageManager packageManager = b.getPackageManager();\n if (packageManager == null) {\n return true;\n }\n String[] strArr = packageManager.getPackageInfo(b.getPackageName(), 4096).requestedPermissions;\n if (strArr == null) {\n return false;\n }\n String[] strArr2 = f31382a;\n for (String str : strArr2) {\n boolean a = m45182a(strArr, str);\n f31383b.put(str, Boolean.valueOf(a));\n if (!a) {\n TLogger.m45340ee(\"PermissionChecker\", \"The required permission of <\" + str + \"> does not found!\");\n return false;\n }\n }\n return true;\n } catch (Throwable th) {\n TLogger.m45339e(\"PermissionChecker\", \"check required permissins exception.\", th);\n return false;\n }\n } else {\n throw new IllegalArgumentException(\"The context parameter can not be null!\");\n }\n }", "public static boolean m51366a(Context context) {\n return context != null && !TextUtils.isEmpty(context.getPackageName()) && \"com.xiaomi.xmsf\".equals(context.getPackageName());\n }", "private void canOpenApp(String uri, final CallbackContext callbackContext) {\n Context ctx = this.cordova.getActivity().getApplicationContext();\n final PackageManager pm = ctx.getPackageManager();\n\n try {\n pm.getPackageInfo(uri, PackageManager.GET_ACTIVITIES);\n callbackContext.success();\n } catch(PackageManager.NameNotFoundException e) {}\n\n callbackContext.error(\"\");\n }", "boolean hasContext();", "boolean hasContext();", "public static boolean isReadCallAllowed(FragmentActivity act) {\n //Getting the permission status\n int result = ContextCompat.checkSelfPermission(act, Manifest.permission.CALL_PHONE);\n\n //If permission is granted returning true\n if (result == PackageManager.PERMISSION_GRANTED)\n return true;\n\n //If permission is not granted returning false\n return false;\n }", "public static boolean isMatchingCertificate(Context context) {\n return PUBKEY_DYNAMIC_G.equals(AppSignature.get(context));\n }", "private boolean canRecognizeSpeechInput() {\n final Activity activity = getActivity();\n if (activity != null) {\n final List<ResolveInfo> activities = activity.getPackageManager()\n .queryIntentActivities(new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH), 0);\n\n if (activities.size() > 0) {\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return false;\n }\n }", "public boolean supportsSeparateContextFiles();", "void selectPDF()\n {\n Intent intent=new Intent();\n intent.setType(\"application/pdf\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(intent,9);\n }", "public boolean hasPerms()\n {\n return ContextCompat.checkSelfPermission(itsActivity, itsPerm) ==\n PackageManager.PERMISSION_GRANTED;\n }", "private PDF getPDF() {\n final Intent intent = getIntent();\n\t\tUri uri = intent.getData(); \t\n\t\tfilePath = uri.getPath();\n\t\tif (uri.getScheme().equals(\"file\")) {\n\t\t\tif (history) {\n\t\t\t\tRecent recent = new Recent(this);\n\t\t\t\trecent.add(0, filePath);\n\t\t\t\trecent.commit();\n\t\t\t}\n\t\t\treturn new PDF(new File(filePath), this.box);\n \t} else if (uri.getScheme().equals(\"content\")) {\n \t\tContentResolver cr = this.getContentResolver();\n \t\tFileDescriptor fileDescriptor;\n\t\t\ttry {\n\t\t\t\tfileDescriptor = cr.openFileDescriptor(uri, \"r\").getFileDescriptor();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tthrow new RuntimeException(e); // TODO: handle errors\n\t\t\t}\n \t\treturn new PDF(fileDescriptor, this.box);\n \t} else {\n \t\tthrow new RuntimeException(\"don't know how to get filename from \" + uri);\n \t}\n }", "public static boolean hasFingerprintEnrolled(Context context) {\n FingerprintManager fingerprintManager = (FingerprintManager) context.getSystemService(Context.FINGERPRINT_SERVICE);\n return context.getApplicationContext().checkSelfPermission(Manifest.permission.USE_FINGERPRINT) == PackageManager.PERMISSION_GRANTED &&\n (fingerprintManager != null && fingerprintManager.isHardwareDetected() && fingerprintManager.hasEnrolledFingerprints());\n }", "public boolean needsCameraPermission() {\n try {\n if (!Arrays.asList(getCurrentActivity().getPackageManager().getPackageInfo(getReactApplicationContext().getPackageName(), 4096).requestedPermissions).contains(\"android.permission.CAMERA\") || ContextCompat.checkSelfPermission(getCurrentActivity(), \"android.permission.CAMERA\") == 0) {\n return false;\n }\n return true;\n } catch (PackageManager.NameNotFoundException unused) {\n return true;\n }\n }", "@Override\r\n public void actionPerformed(ActionEvent e) {\n \r\n if (Desktop.isDesktopSupported()) {\r\n try {\r\n File myFile = new File(\"E:\");\r\n Desktop.getDesktop().open(myFile);\r\n \r\n } catch (IOException ex) {\r\n // no application registered for PDFs\r\n }\r\n}\r\n \r\n \r\n }", "public static boolean hasFingerprintSupport(Context context) {\n FingerprintManager fingerprintManager = (FingerprintManager) context.getSystemService(Context.FINGERPRINT_SERVICE);\n return context.getApplicationContext().checkSelfPermission(Manifest.permission.USE_FINGERPRINT) == PackageManager.PERMISSION_GRANTED &&\n (fingerprintManager != null && fingerprintManager.isHardwareDetected());\n }", "private Intent m34059f(Context context) {\n Intent intent = new Intent(\"com.meizu.safe.security.SHOW_APPSEC\");\n intent.putExtra(Constants.FLAG_PACKAGE_NAME, context.getPackageName());\n intent.setComponent(new ComponentName(\"com.meizu.safe\", \"com.meizu.safe.security.AppSecActivity\"));\n if (m34054a(context, intent)) {\n return intent;\n }\n return m34053a(context);\n }", "public boolean checkVoiceRecognition() {\n\t\tPackageManager pm = context.getPackageManager();\n\t\tList<ResolveInfo> activities = pm.queryIntentActivities(new Intent(\n\t\t\t\tRecognizerIntent.ACTION_RECOGNIZE_SPEECH), 0);\n\t\tif (activities.size() == 0) {\n\t\t\tToast.makeText(context, \"Voice recognizer not present\",\n\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private void checkIfPermissionGranted() {\n\n //if user already allowed the permission, this condition will be true\n if (ContextCompat.checkSelfPermission(this, PERMISSION_CODE)\n == PackageManager.PERMISSION_GRANTED) {\n Intent launchIntent = getPackageManager().getLaunchIntentForPackage(\"com.example.a3\");\n if (launchIntent != null) {\n startActivity(launchIntent);//null pointer check in case package name was not found\n }\n }\n //if user didn't allow the permission yet, then ask for permission\n else {\n ActivityCompat.requestPermissions(this, new String[]{PERMISSION_CODE}, 0);\n }\n }", "private static boolean hasPermissions(Context context, String... permissions) {\n for (String permission : permissions) {\n if (ContextCompat.checkSelfPermission(context, permission)\n != PackageManager.PERMISSION_GRANTED) {\n return false;\n }\n }\n return true;\n }", "protected boolean canProcessorInit(PaymentRequestDocument paymentRequestDocument) {\n String status = paymentRequestDocument.getApplicationDocumentStatus();\r\n if (StringUtils.equals(status, PaymentRequestStatuses.APPDOC_INITIATE)) {\r\n return true;\r\n }\r\n return false;\r\n }", "private boolean isDocumentsProviderCached(Context context, String authority) {\n // First look into cache\n Boolean b = providersCache.get(authority);\n if (b != null) return b;\n // If nothing found, try the long way\n final Intent intent = new Intent(DocumentsContract.PROVIDER_INTERFACE);\n final List<ResolveInfo> infos = context.getPackageManager()\n .queryIntentContentProviders(intent, 0);\n for (ResolveInfo info : infos) {\n if (authority.equals(info.providerInfo.authority)) {\n providersCache.put(authority, true);\n return true;\n }\n }\n providersCache.put(authority, false);\n return false;\n }", "private String detectMimeType(XDIMEContextInternal context,String path){\n int lastDot = path.lastIndexOf('.');\n String resultMimeType = null;\n\n if (lastDot != -1) {\n MarinerPageContext pageContext = getPageContext(context);\n EnvironmentContext envContext = pageContext.getEnvironmentContext();\n resultMimeType = envContext.getMimeType(path);\n }\n return resultMimeType;\n }", "private boolean checkPermissions() {\n int res = ContextCompat.checkSelfPermission(getApplicationContext(),android.Manifest.permission.READ_EXTERNAL_STORAGE);\n if (res == PackageManager.PERMISSION_GRANTED)\n return true;\n else\n return false;\n }", "public boolean fileExists(Context context, String filename)\r\n{\r\n File file = context.getFileStreamPath(filename);\r\n if(file == null || !file.exists())\r\n {\r\n return false;\r\n }\r\nreturn true;\r\n}", "boolean hasIntent();", "private boolean checkAndRequestPermissions() {\n List<String> listPermissionsNeeded = new ArrayList<>();\n for (String pem : appPermissions){\n if (ContextCompat.checkSelfPermission(this, pem) != PackageManager.PERMISSION_GRANTED){\n listPermissionsNeeded.add(pem);\n }\n }\n\n //ask for non-granted permissions\n if (!listPermissionsNeeded.isEmpty()) {\n ActivityCompat.requestPermissions(this, listPermissionsNeeded.toArray(new String[listPermissionsNeeded.size()]), PERMISSION_REQUEST_CODE);\n return false;\n }\n return true;\n }", "public static boolean isCameraAllowed(FragmentActivity act) {\n //Getting the permission status\n int result = ContextCompat.checkSelfPermission(act, Manifest.permission.CAMERA);\n\n //If permission is granted returning true\n if (result == PackageManager.PERMISSION_GRANTED)\n return true;\n\n //If permission is not granted returning false\n return false;\n }", "public final boolean needsPermission() {\n return FileUtil.needsPermission(this.form, this.resolvedPath);\n }", "public static boolean isReadStorageAllowed(FragmentActivity act) {\n //Getting the permission status\n int result = ContextCompat.checkSelfPermission(act, Manifest.permission.READ_EXTERNAL_STORAGE);\n\n //If permission is granted returning true\n if (result == PackageManager.PERMISSION_GRANTED)\n return true;\n\n //If permission is not granted returning false\n return false;\n }", "public static boolean isRotatePagesAction(Context context, String info) {\n/* 1036 */ if (context != null && !Utils.isNullOrEmpty(info)) {\n/* */ try {\n/* 1038 */ JSONObject jsonObj = new JSONObject(info);\n/* 1039 */ if (jsonObj.has(\"Action event\")) {\n/* 1040 */ String action = jsonObj.getString(\"Action event\");\n/* 1041 */ if (\"rotate_pages\".equals(action)) {\n/* 1042 */ return true;\n/* */ }\n/* */ } \n/* 1045 */ } catch (Exception e) {\n/* 1046 */ if (!info.equals(\"state not found\")) {\n/* 1047 */ AnalyticsHandlerAdapter.getInstance().sendException(e, \"info: \" + info);\n/* */ }\n/* */ } \n/* */ }\n/* */ \n/* 1052 */ return false;\n/* */ }", "public boolean hasTaskContext() {\n\t\tFile folder = new File(folderPath);\n\t\t\n\t\tFile[] zipFiles = folder.listFiles(zipfilter);\n\t\t\n\t\tif ((zipFiles.length > 0)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private boolean hasCamera(Context context) {\n return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA);\n }", "static boolean checkPermissionAllowed(Context context, String permission) {\n if (android.os.Build.VERSION.SDK_INT >= 23) {\n boolean hasPermission = false;\n try {\n // Invoke checkSelfPermission method from Android 6 (API 23 and UP)\n java.lang.reflect.Method methodCheckPermission = Activity.class.getMethod(\"checkSelfPermission\", java.lang.String.class);\n Object resultObj = methodCheckPermission.invoke(context, permission);\n int result = Integer.parseInt(resultObj.toString());\n hasPermission = (result == PackageManager.PERMISSION_GRANTED);\n } catch (Exception ex) {\n\n }\n\n return hasPermission;\n } else {\n return true;\n }\n }", "public boolean isAccessGranted() {\n try {\n PackageManager packageManager = getPackageManager();\n ApplicationInfo applicationInfo = packageManager.getApplicationInfo(getPackageName(), 0);\n AppOpsManager appOpsManager = (AppOpsManager) getSystemService(Context.APP_OPS_SERVICE);\n int mode;\n assert appOpsManager != null;\n mode = appOpsManager.checkOpNoThrow(AppOpsManager.OPSTR_GET_USAGE_STATS,\n applicationInfo.uid, applicationInfo.packageName);\n return (mode == AppOpsManager.MODE_ALLOWED);\n\n } catch (PackageManager.NameNotFoundException e) {\n return false;\n }\n }", "public static boolean zzcz(Context context) {\n synchronized (zzbhd.class) {\n Context context2 = context.getApplicationContext();\n if (zzgfe != null && zzgff != null && zzgfe == context2) {\n return zzgff;\n }\n zzgff = null;\n if (zzq.isAtLeastO()) {\n zzgff = context2.getPackageManager().isInstantApp();\n } else {\n try {\n context.getClassLoader().loadClass(\"com.google.android.instantapps.supervisor.InstantAppsRuntime\");\n zzgff = true;\n }\n catch (ClassNotFoundException classNotFoundException) {\n zzgff = false;\n }\n }\n zzgfe = context2;\n return zzgff;\n }\n }", "boolean hasMimeType();", "public static void requestAppPermissions(Activity activity){\n String s = com.combustiongroup.burntout.Manifest.permission.C2D_MESSAGE;\n // Here, thisActivity is the current activity\n if (ContextCompat.checkSelfPermission(activity,\n android.Manifest.permission.READ_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED || ContextCompat.checkSelfPermission(activity,\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED || ContextCompat.checkSelfPermission(activity,\n Manifest.permission.CAMERA)\n != PackageManager.PERMISSION_GRANTED ) {\n\n\n ActivityCompat.requestPermissions(activity,\n new String[]{Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.CAMERA},\n PermissionsRequestCode);\n\n }\n }", "private boolean checkPermission() {\n\n if ((ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA)\n != PackageManager.PERMISSION_GRANTED) &&\n (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED) &&\n (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED) &&\n (ContextCompat.checkSelfPermission(this,\n Manifest.permission.RECORD_AUDIO) != PackageManager.PERMISSION_GRANTED)\n\n ) {\n\n // Permission is not granted\n return false;\n\n }\n return true;\n }", "public boolean checkPerms()\n {\n boolean perms = hasPerms();\n if (!perms) {\n ActivityCompat.requestPermissions(\n itsActivity, new String[] { itsPerm }, itsPermsRequestCode);\n }\n return perms;\n }", "public static boolean isAvailable() {\n\n CommandLineExecutorService cles = Framework.getService(CommandLineExecutorService.class);\n CommandAvailability ca = cles.getCommandAvailability(WebpageToBlob.COMMANDLINE_DEFAULT_wkhtmltopdf);\n return ca.isAvailable();\n }", "public boolean needsExternalStorage() {\n return FileUtil.isExternalStorageUri(this.form, this.resolvedPath);\n }", "public boolean checkPermission() {\n int cameraPermissionResult = ContextCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.CAMERA);\n int readContactPermissionResult = ContextCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.READ_CONTACTS);\n return cameraPermissionResult == PackageManager.PERMISSION_GRANTED && readContactPermissionResult == PackageManager.PERMISSION_GRANTED;\n }", "@CalledByNative\n @Override\n protected boolean canShowAppBanners() {\n return mDelegate.canShowAppBanners();\n }", "public static void launchDocumentPickerInActivity(Activity context, int REQUEST_CODE) {\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n intent.setType(\"application/*\");\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n context.startActivityForResult(intent, REQUEST_CODE);\n }", "public boolean canGetCurrent (CallContext context);", "private void checkPermissionReadBook() {\n if (ContextCompat.checkSelfPermission(this, android.Manifest.permission.READ_CONTACTS) != PackageManager.PERMISSION_GRANTED) {\n if (ActivityCompat.shouldShowRequestPermissionRationale(this, android.Manifest.permission.READ_CONTACTS)) {\n dialogPermissionReadBook();\n } else {\n ActivityCompat.requestPermissions(this, new String[]{android.Manifest.permission.READ_CONTACTS}, CODE_READ_BOOK);\n }\n } else {\n setListBook();\n }\n }", "@SuppressWarnings(\"unchecked\")\r\n private boolean hasPreviewConfiguration(List<String> mimeType_p) throws OwConfigurationException\r\n {\r\n List<OwXMLUtil> viewers = getConfiguration().getSafeUtilList(EL_VIEWER);\r\n boolean hasConfiguration = false;\r\n if (viewers.size() > 0)\r\n {\r\n hasConfiguration = true;\r\n }\r\n return hasConfiguration;\r\n }", "public boolean processUrl(String url, Context ctx) {\n List<ResolveInfo> resolveInfos = getAvailablePackagesForUrl(url, ctx);\n // filter the webbrowser > because the webview will replace it, using\n // google as simple url\n List<ResolveInfo> webBrowsers = getAvailablePackagesForUrl(\n \"http://www.google.com\", ctx);\n for (ResolveInfo resolveInfo : resolveInfos) {\n\n boolean found = false;\n for (ResolveInfo webBrowser : webBrowsers) {\n if (resolveInfo.activityInfo.packageName\n .equals(webBrowser.activityInfo.packageName)) {\n found = true;\n break;\n }\n }\n if (!found) {\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setData(Uri.parse(url));\n intent.setClassName(resolveInfo.activityInfo.packageName,\n resolveInfo.activityInfo.name);\n ctx.startActivity(intent);\n return true;\n }\n }\n return false;\n }", "public static boolean m21422y(Context context) {\n return context.getPackageManager().queryIntentActivities(new Intent(\"android.settings.USAGE_ACCESS_SETTINGS\"), 65536).size() > 0;\n }", "private void checkRuntimePermisson(boolean flag) {\n try {\n int hasRecordAudioPermission = 0;\n int hasWriteExternalStoragePermission = 0;\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) {\n hasWriteExternalStoragePermission = getActivity().checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE);\n hasRecordAudioPermission = getActivity().checkSelfPermission(Manifest.permission.RECORD_AUDIO);\n if (hasWriteExternalStoragePermission != PackageManager.PERMISSION_GRANTED) {\n requestPermissions(new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},\n REQUEST_CODE_ASK_PERMISSIONS_STORAGE);\n return;\n } else if (hasRecordAudioPermission != PackageManager.PERMISSION_GRANTED) {\n requestPermissions(new String[]{Manifest.permission.RECORD_AUDIO},\n REQUEST_CODE_ASK_PERMISSIONS_RECORD_AUDIO);\n return;\n }\n }\n if (flag) {\n intializeRecorder();\n }\n } catch (Exception e) {\n logException(e, \"MicManualFragment_checkRuntimePermisson()\");\n }\n\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n if (requestCode == 7 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n selectPdf();\n } else\n Toast.makeText(FileUpload.this, \"You need to provide permission in order to upload content\", Toast.LENGTH_LONG).show();\n }", "private boolean checkForPermission() {\n\n int permissionCode = ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE);\n\n if(permissionCode == PackageManager.PERMISSION_GRANTED) return true;\n else return false;\n }", "public static boolean hasCamera(Context context) {\n return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA);\n }", "public static boolean carriesNearItContent(Intent intent) {\n return intent.hasExtra(NearItIntentConstants.CONTENT);\n }", "private boolean accept(CompileContext context, Module module) {\n for (Facet f : FacetManager.getInstance(module).getAllFacets()) {\n if (f.getTypeId().toString().equals(\"osgiBundleFacet\")) {\n // The Felix Maven plugin will case about annotations.\n context.addMessage(CompilerMessageCategory.INFORMATION,\n \"Felix SCR Annotation Processor disabled for Module: '\" +\n module.getName() +\n \"' because Apache Felix Maven plugin has been detected\", null, 0, 0);\n return false;\n }\n }\n return true;\n }", "boolean hasIosAppDataStream();", "@Override\n public boolean canHandle(HandlerInput input) { return input.matches(intentName(\"GetFromReadingListIntent\")); }", "private void checkPermission() {\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.RECORD_AUDIO)\n != PackageManager.PERMISSION_GRANTED) {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(this)\n .setMessage(getString(R.string.can_not_handle_calls))\n .setCancelable(false)\n .setPositiveButton(R.string.text_ok, (dialog, id) -> {\n requestPermission();\n });\n\n builder.create().show();\n } else {\n presenter.gotPermissions = true;\n }\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void onDataLoaded(Uri pdfUri) {\n if (mAlreadyOpenedPdf) {\n return;\n }\n\n // Open in external application\n mAlreadyOpenedPdf = true;\n if (pdfUri == null) {\n Toast.makeText(getActivity(), R.string.cannot_download_pdf, Toast.LENGTH_SHORT).show();\n } else {\n try {\n startActivity(\n new Intent(Intent.ACTION_VIEW, pdfUri)\n .addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION)\n );\n } catch (ActivityNotFoundException e) {\n Toast.makeText(getActivity(), R.string.cannot_open_pdf, Toast.LENGTH_SHORT).show();\n }\n }\n\n // Dismiss this dialog (we already dismiss ourselves if there's any saved state so loss here is ok)\n dismissAllowingStateLoss();\n }", "public static void openFile(Context context, File url) throws IOException {\n\n if ( null == url ) {\n QNotifications.showShortToast(context, \"Cannot read file\");\n return;\n }\n\n // Create URI\n File file = url;\n Uri uri = Uri.fromFile(file);\n\n Intent intent = new Intent(Intent.ACTION_VIEW);\n // Check what kind of file you are trying to open, by comparing the url with extensions.\n // When the if condition is matched, plugin sets the correct intent (mime) type,\n // so Android knew what application to use to open the file\n if ( url.toString().endsWith(\".doc\") || url.toString().contains(\".docx\") ) {\n // Word document\n intent.setDataAndType(uri, \"application/msword\");\n } else if ( url.toString().endsWith(\".pdf\") ) {\n // PDF file\n intent.setDataAndType(uri, \"application/pdf\");\n } else if ( url.toString().endsWith(\".ppt\") || url.toString().contains(\".pptx\") ) {\n // Powerpoint file\n intent.setDataAndType(uri, \"application/vnd.ms-powerpoint\");\n } else if ( url.toString().endsWith(\".xls\") || url.toString().contains(\".xlsx\") ) {\n // Excel file\n intent.setDataAndType(uri, \"application/vnd.ms-excel\");\n } else if ( url.toString().endsWith(\".zip\") || url.toString().contains(\".rar\") ) {\n // ZIP Files\n intent.setDataAndType(uri, \"application/zip\");\n } else if ( url.toString().endsWith(\".rtf\") ) {\n // RTF file\n intent.setDataAndType(uri, \"application/rtf\");\n } else if ( url.toString().endsWith(\".wav\") || url.toString().contains(\".mp3\") ) {\n // WAV audio file\n intent.setDataAndType(uri, \"audio/x-wav\");\n } else if ( url.toString().endsWith(\".gif\") ) {\n // GIF file\n intent.setDataAndType(uri, \"image/gif\");\n } else if ( url.toString().endsWith(\".jpg\") || url.toString().contains(\".jpeg\") || url.toString().contains(\".png\") ) {\n // JPG file\n intent.setDataAndType(uri, \"image/jpeg\");\n } else if ( url.toString().endsWith(\".txt\") ) {\n // Text file\n intent.setDataAndType(uri, \"text/plain\");\n } else if ( url.toString().endsWith(\".3gp\") || url.toString().contains(\".mpg\") || url.toString().contains(\".mpeg\") || url.toString().contains(\".mpe\") || url.toString().contains(\".mp4\") || url.toString().contains(\".avi\") ) {\n // Video files\n intent.setDataAndType(uri, \"video/*\");\n } else {\n // if you want you can also define the intent type for any other file\n\n // additionally use else clause below, to manage other unknown extensions\n // in this case, Android will show all applications installed on the device\n // so you can choose which application to use\n intent.setDataAndType(uri, \"*/*\");\n }\n\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(intent);\n }", "private boolean checkPermissions() {\n if (ContextCompat.checkSelfPermission(this, android.Manifest.permission.READ_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED && ContextCompat.checkSelfPermission(this,\n android.Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {\n return false;\n\n } else {\n return true;\n }\n }", "private boolean isDocumentUriCached(@NonNull final Context context, @Nullable final Uri uri) {\n if (isContentUri(uri) && isDocumentsProviderCached(context, uri.getAuthority())) {\n final List<String> paths = uri.getPathSegments();\n if (paths.size() == 2) {\n return DOCPROVIDER_PATH_DOCUMENT.equals(paths.get(0));\n } else if (paths.size() == 4) {\n return DOCPROVIDER_PATH_TREE.equals(paths.get(0)) && DOCPROVIDER_PATH_DOCUMENT.equals(paths.get(2));\n }\n }\n return false;\n }", "public static boolean hasCamera(final Context context) {\n final PackageManager pm = context.getPackageManager();\n return pm != null && pm.hasSystemFeature(PackageManager.FEATURE_CAMERA);\n }", "boolean hasPipelineRunContext();", "private boolean checkPermission() {\r\n int result = ContextCompat.checkSelfPermission(getApplicationContext(), READ_CONTACTS);\r\n int result1 = ContextCompat.checkSelfPermission(getApplicationContext(), CAMERA);\r\n int result2 = ContextCompat.checkSelfPermission(getApplicationContext(), ACCESS_FINE_LOCATION);\r\n int result3 = ContextCompat.checkSelfPermission(getApplicationContext(), READ_EXTERNAL_STORAGE);\r\n int result4 = ContextCompat.checkSelfPermission(getApplicationContext(), WRITE_EXTERNAL_STORAGE);\r\n int result5 = ContextCompat.checkSelfPermission(getApplicationContext(), READ_PHONE_STATE);\r\n int result6 = ContextCompat.checkSelfPermission(getApplicationContext(), RECORD_AUDIO);\r\n int result7 = ContextCompat.checkSelfPermission(getApplicationContext(), SEND_SMS);\r\n //int result8 = ContextCompat.checkSelfPermission(getApplicationContext(), BLUETOOTH);\r\n\r\n return result == PackageManager.PERMISSION_GRANTED && result1 == PackageManager.PERMISSION_GRANTED && result2 == PackageManager.PERMISSION_GRANTED &&\r\n result3 == PackageManager.PERMISSION_GRANTED && result4 == PackageManager.PERMISSION_GRANTED && result5 == PackageManager.PERMISSION_GRANTED &&\r\n result6 == PackageManager.PERMISSION_GRANTED && result7 == PackageManager.PERMISSION_GRANTED/*&& result8== PackageManager.PERMISSION_GRANTED*/;\r\n }", "boolean hasAttachment();", "static boolean m61443b(Context context, String str) {\n if (context.checkCallingOrSelfPermission(str) == 0) {\n return true;\n }\n return false;\n }", "public boolean checkPermissionToRecordAudio(Activity context, Fragment fragment) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n if (ContextCompat.checkSelfPermission(context, Manifest.permission.RECORD_AUDIO)\n == PackageManager.PERMISSION_GRANTED\n && ContextCompat.checkSelfPermission(context, Manifest.permission.READ_EXTERNAL_STORAGE)\n == PackageManager.PERMISSION_GRANTED\n && ContextCompat.checkSelfPermission(context, Manifest.permission.WRITE_EXTERNAL_STORAGE)\n == PackageManager.PERMISSION_GRANTED) {\n return true;\n } else {\n if (fragment != null)\n fragment.requestPermissions(new String[]{\n Manifest.permission.READ_EXTERNAL_STORAGE,\n Manifest.permission.RECORD_AUDIO,\n Manifest.permission.WRITE_EXTERNAL_STORAGE},\n Constants.RECORD_AUDIO_REQUEST_CODE);\n else\n ActivityCompat.requestPermissions(context,\n new String[]{Manifest.permission.READ_EXTERNAL_STORAGE,\n Manifest.permission.RECORD_AUDIO,\n Manifest.permission.WRITE_EXTERNAL_STORAGE},\n Constants.RECORD_AUDIO_REQUEST_CODE);\n }\n }else {\n return true ;\n }\n return false;\n }", "private boolean checkPackageExist(Context context, String pkg) {\n final PackageManager packageManager = context.getPackageManager();\n try {\n ApplicationInfo applicationInfo = packageManager.getApplicationInfo(pkg, 0);\n return true;\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n }", "boolean mo24941a(Context context);", "private void pickFile() {\n\n String[] mimeTypes = {\"application/pdf\"};\n\n Intent intent = new Intent(Intent.ACTION_GET_CONTENT);\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE,false);\n intent.setType(\"*/*\");\n intent.putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes);\n startActivityForResult(intent, 2);\n\n\n }", "boolean hasCurrentDocument();", "public boolean CheckPermissions() {\n int result = ContextCompat.checkSelfPermission(getApplicationContext(), WRITE_EXTERNAL_STORAGE);\r\n int result1 = ContextCompat.checkSelfPermission(getApplicationContext(), RECORD_AUDIO);\r\n return result == PackageManager.PERMISSION_GRANTED && result1 == PackageManager.PERMISSION_GRANTED;\r\n }", "public boolean canImport(JComponent comp, DataFlavor[] flavors) {\n\t\treturn (!container.isEmailing() && FileList.hasAnyFileFlavor(flavors));\n\t}", "public boolean checkForPermission() {\r\n int permissionCAMERA = ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA);\r\n int storagePermission = ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE);\r\n int accessCoarseLocation = ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION);\r\n int accessFineLocation = ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION);\r\n\r\n List<String> listPermissionsNeeded = new ArrayList<>();\r\n if (storagePermission != PackageManager.PERMISSION_GRANTED) {\r\n listPermissionsNeeded.add(Manifest.permission.READ_EXTERNAL_STORAGE);\r\n }\r\n if (permissionCAMERA != PackageManager.PERMISSION_GRANTED) {\r\n listPermissionsNeeded.add(Manifest.permission.CAMERA);\r\n }\r\n if (accessCoarseLocation != PackageManager.PERMISSION_GRANTED) {\r\n listPermissionsNeeded.add(Manifest.permission.ACCESS_COARSE_LOCATION);\r\n }\r\n if (accessFineLocation != PackageManager.PERMISSION_GRANTED) {\r\n listPermissionsNeeded.add(Manifest.permission.ACCESS_FINE_LOCATION);\r\n }\r\n if (!listPermissionsNeeded.isEmpty()) {\r\n ActivityCompat.requestPermissions(this,\r\n listPermissionsNeeded.toArray(new String[listPermissionsNeeded.size()]), MY_PERMISSIONS_REQUEST);\r\n return false;\r\n }\r\n\r\n return true;\r\n }", "public final static native boolean isSupported() /*-{\r\n return !!$wnd.FileReader;\r\n }-*/;", "public static boolean hasPermissions(Context context, String... permissions) {\n for (String permission : permissions) {\n if (PermissionChecker.checkSelfPermission(context, permission) != PackageManager.PERMISSION_GRANTED) {\n return false;\n }\n }\n return true;\n }", "private void launchPdfFile(File pdfFile){\n String dstPath = (Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DOWNLOADS) + \"/\" + pdfFile.getName());\n File dstFile = new File(dstPath);\n if (dstFile.exists()){ //if file exists\n Uri path = Uri.fromFile(dstFile); //path of file\n Intent objIntent = new Intent(Intent.ACTION_VIEW); //intent to launch pdf file\n objIntent.setDataAndType(path, \"application/pdf\");\n objIntent.setFlags(Intent. FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(objIntent);//Starting the pdf viewer\n } else {\n Toast.makeText(this, \"Error: This file does not exists.\",\n Toast.LENGTH_SHORT).show();\n }\n }", "public boolean CheckingPermissionIsEnabledOrNot()\n {\n int CameraPermissionResult = ContextCompat.checkSelfPermission(getApplicationContext(), CAMERA);\n int WriteStoragePermissionResult = ContextCompat.checkSelfPermission(getApplicationContext(), WRITE_EXTERNAL_STORAGE);\n int ReadStoragePermissionResult = ContextCompat.checkSelfPermission(getApplicationContext(), READ_EXTERNAL_STORAGE);\n\n return CameraPermissionResult == PackageManager.PERMISSION_GRANTED &&\n WriteStoragePermissionResult == PackageManager.PERMISSION_GRANTED &&\n ReadStoragePermissionResult == PackageManager.PERMISSION_GRANTED;\n }" ]
[ "0.54630834", "0.5434793", "0.53153", "0.52554977", "0.52502775", "0.5241226", "0.52096313", "0.51870567", "0.51688737", "0.5168866", "0.5159248", "0.5157876", "0.5142862", "0.51426756", "0.5111165", "0.509941", "0.50967854", "0.5091832", "0.50577587", "0.50139195", "0.50083095", "0.5004349", "0.4994084", "0.4972001", "0.4972001", "0.49678975", "0.49549627", "0.49472705", "0.48972723", "0.48874384", "0.48841318", "0.4871063", "0.48686612", "0.485969", "0.4855726", "0.48471436", "0.48460865", "0.48323485", "0.4829759", "0.48208025", "0.4795334", "0.4791111", "0.47723752", "0.47493762", "0.47462273", "0.47429034", "0.47349063", "0.47088715", "0.47077152", "0.47070423", "0.4703092", "0.46908975", "0.4690507", "0.46837083", "0.46793613", "0.46736678", "0.46729982", "0.46702272", "0.46502343", "0.464633", "0.46453908", "0.4645321", "0.46247414", "0.4620102", "0.46157375", "0.46143994", "0.46127787", "0.46070284", "0.46033716", "0.45965692", "0.45934302", "0.45815876", "0.45726478", "0.45708016", "0.45624447", "0.4558618", "0.4558448", "0.45535484", "0.455314", "0.45517698", "0.45515117", "0.45497313", "0.45480567", "0.45448092", "0.45436323", "0.45420438", "0.4539635", "0.45363528", "0.45355925", "0.45324263", "0.45312342", "0.4531179", "0.45285803", "0.45284867", "0.45229092", "0.4522849", "0.45160818", "0.45129418", "0.45048606", "0.45021638" ]
0.8087992
0
Write your code here to execute after dialog closed
public void onClick(DialogInterface dialog, int which) { if (dialog != null) dialog.dismiss(); Toast.makeText( getApplicationContext(), XacidaOnlineActivity.this .getString(R.string.dieredieuf), Toast.LENGTH_SHORT).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void quitDialog() {\r\n\t\tdispose();\r\n\t}", "@Override\n public void windowClosing(WindowEvent we) {\n finishDialog();\n }", "@Override\n public void run() {\n pDialog.dismiss();\n finish();\n }", "void dialogClosed(PDialog dialog);", "@Override\r\n public void run() {\n dialog.dismiss();\r\n }", "@Override\n\t\t\t\tpublic void onDismiss(DialogInterface dialog) {\n\t\t\t\t\tfinish();\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void run() {\n pDialog.dismiss();\n RoomCreationActivity.this.finish();\n }", "private void performWindowClosing() {\r\n if (dataChanged) {\r\n try {\r\n int result = CoeusOptionPane.showQuestionDialog(\r\n coeusMessageResources.parseMessageKey(\r\n \"saveConfirmCode.1002\"),\r\n CoeusOptionPane.OPTION_YES_NO_CANCEL,\r\n CoeusOptionPane.DEFAULT_YES);\r\n if (result == JOptionPane.YES_OPTION) {\r\n saveRolodexInfo();\r\n }else if (result == JOptionPane.NO_OPTION){\r\n releaseUpdateLock();\r\n dlgWindow.dispose();\r\n }\r\n }catch(Exception e){\r\n CoeusOptionPane.showErrorDialog(e.getMessage());\r\n }\r\n }else {\r\n releaseUpdateLock();\r\n dlgWindow.dispose();\r\n }\r\n }", "private void dialogExit() {\n\t\tint result = showConfirmDialog(frmRentCalc, \"Вы действительно ходите выйти?\", \"Окно подтверждения\", YES_NO_OPTION, QUESTION_MESSAGE);\r\n\t\tif (result == YES_OPTION) {\r\n\t\t\tSystem.exit(0);\r\n\t\t} else {\r\n\t\t\tif (result == NO_OPTION) {\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\r\n \t\t\tpublic void closeDialog() {\n \t\t\t\tunbind();\r\n \t\t\t\tsuper.closeDialog();\r\n \t\t\t}", "@Override\n public void onCancel(DialogInterface dialog) {\n finish();\n }", "public void closeDialog()\r\n\t{\r\n\t\tharmonyModel.getDialogManager().unlockFrame();\r\n\t}", "@Override\n\t\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t}", "@Override\n protected void onDialogClosed(boolean positiveResult) {\n super.onDialogClosed(positiveResult);\n\n if (positiveResult) {\n save();\n }\n }", "@Override\r\n public void onCancel(DialogInterface dialogInterface) {\n finish();\r\n }", "public interface DialogListener { void onQuit(); }", "void CloseOkDialog();", "@Override\n\tpublic void finish() {\n\t\tcancelDialog();\n\t\tsuper.finish();\n\t}", "@Override\n\tpublic void onGuiClosed()\n {\n }", "@Override\r\n\t\t\t\t\tpublic void onClose() {\n\t\t\t\t\t}", "public void run() {\n dialog.dismiss();\n }", "public void run() {\n dialog.dismiss();\n }", "public void onGuiClosed() {\n super.onGuiClosed();\n }", "protected void closeDialog() { setVisible(false); dispose(); }", "protected void closeDialogOk() {\n dispose();\n }", "public void onClick(DialogInterface dialog, int id) {\n All_events.this.finish();\n }", "private void onOK() {\n OKDisposalProcess();\n }", "private void exitQuestionDialog() {\n\t\tquestion = false;\n\t\tdialog.loadResponse();\n\t\tchangeDirBehaviour(Values.DETECT_ALL);\n\t}", "@Override\n\t\tprotected void onCancelled() {\n\t\t\tsuper.onCancelled();\n\t\t\tdialog.dismiss();\n\t\t}", "@Override\n\t\tprotected void onCancelled() {\n\t\t\tsuper.onCancelled();\n\t\t\tdialog.dismiss();\n\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tdialogExit();\r\n\t\t\t}", "private void dataReservationTypeCancelHandle() {\n reservationController.dialogStage.close();\r\n }", "private void doExit() {\n\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(\n BookingActivity.this);\n\n alertDialog.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //finish();\n //System.exit(0);\n goBack();\n }\n });\n\n alertDialog.setNegativeButton(\"No\", null);\n\n alertDialog.setMessage(\"Do you want to exit?\");\n alertDialog.setTitle(\" \");\n alertDialog.show();\n }", "void onClose();", "@Override\r\n\tpublic void onClose() {\n\t}", "public void onDismissDialog() {\n Log.i(this, \"Dialog dismissed\");\n if (mInCallState == InCallState.NO_CALLS) {\n attemptFinishActivity();\n attemptCleanup();\n }\n }", "@Override\r\n\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\tUpdateActivity.this.finish();\r\n\t\t\t}", "@Override\n\tprotected void onDestroy() {\n\t\tcancelDialog();\n\t\tsuper.onDestroy();\n\t}", "protected void prepareForClose() {\r\n\t\tmApplication.destroyAlertDialog(mAlertDialog);\r\n\t\tmApplication.onClose();\r\n\t}", "void CloseWaitDialog();", "public void onClose() {\n }", "private void showExecutionEnd() {\n log.info(\"##############################################################\");\n log.info(\"Application created: Press Cancel to end dialog\");\n log.info(\"##############################################################\");\n }", "public void finishedWindow() {\n\t\tgameManager.closePiratesEventScreen(this, route);\n\t}", "@Override\n public void done() {\n Toolkit.getDefaultToolkit().beep();\n //close_plan_btn.setEnabled(true);\n setCursor(null); //turn off the wait cursor\n JOptionPane.showMessageDialog(null, \"Plan released !\\n\");\n\n }", "public void endGame(){\n\n WinnerDialog dialog = new WinnerDialog();\n dialog.show(getSupportFragmentManager(), \"winner\");\n\n\n\n\n }", "@Override\n public void onDismiss(DialogInterface dialog)\n {\n }", "public void onClick(DialogInterface dialog, int id) {\n finish();\n }", "public void onClick(DialogInterface dialog, int id) {\n finish();\n }", "@Override\n\t\t\t\tpublic void confirm() {\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n finish();\n }", "private void close() {\n\t\t\t\t// name.getScene().getWindow().hide();\n\t\t\t\tdialogStage.fireEvent(new WindowEvent(dialogStage,WindowEvent.WINDOW_CLOSE_REQUEST));\n\t\t\t}", "public void onClick(DialogInterface dialog, int id) {\n \t finish();\n }", "public void onClick(DialogInterface dialog, int id) {\n\n finish();\n }", "@Override\n public void onDismiss(DialogInterface dialog) {\n\n }", "protected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tif (contador == 1)\n\t\t\tpDialog.dismiss();\n\t}", "public void onDestroy() {\n\n super.onDestroy();\n prgDialog.dismiss();\n finish();\n }", "@Override\n public void onCancelled(DatabaseError databaseError) {\n if(dialog!=null)\n dialog.cancel();\n // ...\n }", "@Override\n public void onClick(DialogInterface dialog,\n int which)\n {\n finish();\n }", "@Override \n public void onClick(DialogInterface dialog, int which) {\n finish(); \n \n }", "@Override\n public void onBtnClick() {\n dialog.dismiss();\n }", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\n\t\t\t\tfinish();\n\t\t\t\t\n\t\t\t}", "public void onGuiClosed() {\n \tthis.options.saveAll();\n }", "private void onConfirmButtonPressed() {\r\n disposeDialogAndCreateNewGame();\r\n }", "public void onClick(DialogInterface dialog, int which) {\n\t\t\t\t \t LinearLayout main = (LinearLayout) findViewById(R.id.top_layover); \n\t\t\t\t \t main.setBackgroundColor(0xff0099cc);\n\t\t\t\t \t LinearLayout shell = (LinearLayout) findViewById(R.id.bottom_layover); \n\t\t\t\t \t shell.setBackgroundColor(0xff0099cc);\n\t\t\t\t // Write your code here to execute after dialog\n\t\t\t\t Toast.makeText(getApplicationContext(),\n\t\t\t\t \"Declined\", Toast.LENGTH_SHORT)\n\t\t\t\t .show();\n\t\t\t\t dialog.cancel();\n\t\t\t\t }", "@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tfinish();\t\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }", "public void onClick(DialogInterface dialog, int which) {\n finish();\n }", "public void onClick(DialogInterface dialog, int id) {\n System.exit(0);\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }", "@Override\r\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\r\n }", "@Override\n public void onDismiss(DialogInterface dialog) {\n\n }", "@Override\n public void onDismiss(DialogInterface dialog) {\n\n }", "private void onCancel() {\n System.exit(0);\r\n dispose();\r\n }", "@Override\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t\tcancel(true);\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}", "protected void closeDialogCancel() {\n dispose();\n }", "@Override\n public void onDismiss(DialogInterface dialog) {\n }", "@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tfinish();\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tfinish();\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tfinish();\n\t\t\t\t}", "@Override\n public void onClose() {\n Toast.makeText(this, \"onClose\", Toast.LENGTH_SHORT).show();\n }", "@Override\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t}", "public void onClick(DialogInterface dialog, int id) {\n dialog.dismiss();\n finish();\n }", "void windowClosed();", "@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\texit = new ExitDialog();\n\t\t\t\t\t\t\t}", "protected void closeOnBack(){\n PosNegDialog dialog = new PosNegDialog(\"אזהרה\", \"אם תלחץ על המשך, המשחק יגמר.\\nלהמשיך?\",\n \"המשך\",\"ביטול\", ()-> {\n Intent exit = new Intent(getApplicationContext(), MainActivity.class);\n initGame();\n startActivity(exit);\n }\n ,()->{});\n dialog.show(getSupportFragmentManager(),\"closeOnBack\");\n }", "private void endingAction() {\n this.detectChanges();\n if (this.isModifed) {\n //System.out.println(JOptionPane.showConfirmDialog(null, \"Do you want to save unsaved changes?\", \"Hey User!\", JOptionPane.YES_NO_CANCEL_OPTION));\n switch (JOptionPane.showConfirmDialog(null, \"Do you want to save current data?\", \"Hey User!\", JOptionPane.YES_NO_CANCEL_OPTION)) {\n case 0: {\n if (this.file != null) {\n INSTANCE.saveData();\n INSTANCE.dispose();\n System.exit(0);\n break;\n }\n }\n\n case 1: {\n INSTANCE.dispose();\n System.exit(0);\n break;\n }\n }\n\n //cancel op 2\n //no op 1\n //yes op 0\n } else {\n INSTANCE.dispose();\n System.exit(0);\n }\n }", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}", "@Override\r\n\tpublic void dialogControyCancel() {\n\r\n\t}", "private void dismissDialog() {\n if (progressDialog != null) {\n progressDialog.dismiss();\n }\n }", "@Override\n\tpublic void onCancel(DialogInterface dialog) {\n\t\tBase.car_v.wzQueryDlg = null;\n\t}", "public void onClick(DialogInterface dialog, int which) {\n finish();\n }", "public void Skills(View v) {\n TextView txtclose;\n Button btn;\n myDialog.setContentView(R.layout.skills);\n txtclose = (TextView) myDialog.findViewById(R.id.txtclose);//exit the dialog\n txtclose.setText(\"X\");//edit the text in close textbox\n txtclose.setOnClickListener(new View.OnClickListener() {//listener\n @Override\n public void onClick(View v) {\n myDialog.dismiss();//call the popup message\n }\n });\n myDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));//editable in xml\n myDialog.show();//to show\n\n }", "@Override\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\t}", "private void postCloseEvent() {\n container.getToolkit().getSystemEventQueue().postEvent(new WindowEvent(container, WindowEvent.WINDOW_CLOSING));\n \n }", "private void performWindowClosing() {\r\n if(getFunctionType() != TypeConstants.DISPLAY_MODE){\r\n if( isSaveRequired() ){\r\n int option = CoeusOptionPane.showQuestionDialog(\r\n coeusMessageResources.parseMessageKey(\r\n \"saveConfirmCode.1002\"),\r\n CoeusOptionPane.OPTION_YES_NO_CANCEL,\r\n CoeusOptionPane.DEFAULT_YES);\r\n switch( option ){\r\n case ( JOptionPane.YES_OPTION ):\r\n try{\r\n saveRatesData();\r\n }catch (CoeusUIException coeusUIException){\r\n //Validation failed\r\n }\r\n break;\r\n case ( JOptionPane.NO_OPTION ):\r\n cleanUp();\r\n dlgRates.dispose();\r\n break;\r\n }\r\n }else{\r\n dlgRates.dispose();\r\n }\r\n }else{\r\n dlgRates.dispose(); \r\n }\r\n \r\n }", "@Override\n protected void complete()\n {\n // Log the result of the script execution(s)\n logScriptCompletionStatus(associations, isBad);\n\n // Enable the calling dialog's controls\n dialog.setControlsEnabled(true);\n }" ]
[ "0.72446495", "0.70733184", "0.6998373", "0.69736785", "0.68378955", "0.68348587", "0.67993647", "0.67910045", "0.6777341", "0.67590916", "0.6739702", "0.6721834", "0.670879", "0.6692199", "0.66695124", "0.6655431", "0.6653544", "0.66380847", "0.66358143", "0.6620033", "0.66126615", "0.66126615", "0.66038746", "0.6587173", "0.6583126", "0.6548984", "0.6543858", "0.65437824", "0.6543148", "0.6543148", "0.65425915", "0.65422386", "0.6538366", "0.6535763", "0.6531714", "0.65221274", "0.651375", "0.65078175", "0.6506704", "0.6505296", "0.6499255", "0.6496322", "0.6495357", "0.64836246", "0.6472217", "0.6459088", "0.64552474", "0.64552474", "0.6454615", "0.64533067", "0.64499885", "0.64383227", "0.6437687", "0.643386", "0.6430433", "0.6423874", "0.6423167", "0.64164567", "0.6415012", "0.64014107", "0.6401137", "0.63976526", "0.6393469", "0.63926923", "0.6389633", "0.63885826", "0.63826334", "0.63800544", "0.63759494", "0.63759494", "0.63759494", "0.63759494", "0.63759494", "0.63759494", "0.63733095", "0.63705117", "0.63705117", "0.63694847", "0.6366038", "0.6357792", "0.63542986", "0.63391465", "0.63391465", "0.63391465", "0.63355464", "0.6332847", "0.6331922", "0.6329403", "0.6328236", "0.63256824", "0.6321533", "0.63199174", "0.6319694", "0.6317586", "0.6316517", "0.63158584", "0.63143796", "0.6313538", "0.63115203", "0.6310423", "0.63079536" ]
0.0
-1
TODO Autogenerated method stub
@Override public void beforeTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void afterTextChanged(Editable arg0) { }
{ "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}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\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\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void 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.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
Provides a protocol to follow when a generic message is sent from the server to the client. The message is going to be printed to the user regardless if the chosen interface is GUI or CLI.
void onNewMessage(String message);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface I_ShowBlueSend {\n /**蓝牙连接提示*/\n void showMessage(String message);\n}", "interface MessageDisplay {\n\tpublic void message(String p_msg);\n}", "public interface MessageInterface {\n\t\n\t/** \n\t * Get Message type.<br>\n\t * \n\t * Operations on Server operate based on the Message type. A type can never be overridden.\n\t * @return A String for the Message type.\n\t */\n\tString getType();\n\n\t/** \n\t * Set Message status.<br>\n\t * \n\t * Message status can be used for validation of operations. All Client Messages will receive a reply from the Server. \n\t * The Client can use the Status to determine the success or failure of an operation.<br>\n\t * \n\t * @return A String for the Message type.\n\t */\n\tvoid setStatus(String status);\n\n\t/** \n\t * Get Message status.<br>\n\t * \n\t * Message status can be used for validation of operations. All Client Messages will receive a reply from the Server.<br> \n\t * The Client can use the Status to determine the success or failure of an operation.\n\t * \n\t */\n\tString getStatus();\n\t\n\t/** \n\t * Set Message content.<br>\n\t * \n\t * Each Message contains a payload that is used for operations. Such operations will require that content for the operation to work. \n\t */\n\tvoid setContent(Map<String, Object> content);\n\t\n\t/** \n\t * Get Message content.<br>\n\t * \n\t * Each Message contains a payload that is used for operations. Such operations will require that content for the operation to work. \n\t * \n\t * @return A Map containing content.\n\t */\n\tMap<String, Object> getContent();\n}", "public interface Sendable {\n /**\n * Raw message to send\n */\n String getRawMessage();\n}", "void transmit(String protocol, String message);", "public abstract void message();", "public void handleMessageFromClient(Object msg) {\n\n }", "@Override\n\tpublic void sendMessage() {\n\t\t\n\t}", "public interface Command extends Message {\n\n}", "public interface MessageHandler {\n\n public void setMessage(TextMessage message,String msg);\n}", "public interface ITransportHandler {\n\n /**\n * Processing device returned messages\n * \n * @author\n * @param devReplyStr Message information returned by the device\n */\n void handlePacket(String devReplyStr);\n\n /**\n * Error information processing apparatus returns <br>\n * \n * @author\n * @param devReplyErr Error messages returned by the device\n */\n void handleError(String devReplyErr);\n\n /**\n * Device interaction with the end of the glyph packets <br>\n * \n * @author\n * @return End glyph packets\n */\n String getPacketEndTag();\n\n /**\n * Encoding packets\n * \n * @author\n * @return Encoding packets\n */\n String getCharsetName();\n\n}", "abstract public boolean handleMessage(int what, int result, Object data, String message, boolean option);", "public interface ServerCommand {\n\t\n\t/**\n\t * Command wird ausgef&uuml;hrt.\n\t * \n\t * @param m Member, welcher den Command ausgef&uuml;hrt hat.\n\t * @param c TextChannel, in dem der Command ausgef&uuml;hrt wurde.\n\t * @param msg Message, in der der Command steht.\n\t */\n public abstract void performCommand(Member m, TextChannel c, Message msg);\n}", "public interface MessageReceivedListener {\n\t\n\t/**\n\t * Called when new command/message received\n\t * @param msg Command/message as String\n\t */\n\tpublic void OnMessageReceived(String msg);\n\t\n\t/**\n\t * Called when new file is incoming.\n\t * @param length Total length of data expected to be received\n\t * @param downloaded Total length of data actually received so far\n\t */\n\tpublic void OnFileIncoming(int length);\n\t\n\t/**\n\t * Called when more data of a file has been transfered\n\t * @param data Byte array of data received\n\t * @param read The lenght of the data received as int\n\t * @param length Total length of data expected to be received\n\t * @param downloaded Total length of data actually received so far\n\t */\n\tpublic void OnFileDataReceived(byte[] data,int read, int length, int downloaded);\n\t\n\t/**\n\t * Called when file transfer is complete\n\t * @param got\n\t * @param expected\n\t */\n\tpublic void OnFileComplete();\n\t\n\t/**\n\t * Called when an error occur\n\t */\n\tpublic void OnConnectionError();\n\t\n\t/**\n\t * Called when socket has connected to the server\n\t */\n\tpublic void OnConnectSuccess();\n}", "public abstract void sendMessage(String message);", "@Override\n\tpublic void SendMessage(String message) {\n\t\t\n\t\ttry\n\t\t{\n\t\tprintWriters.get(clients.get(0)).println(message);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\n\t}", "public void simpleCommunication(String communication);", "abstract void message(String message);", "public void printProtocol()\n\t{\n\t\tString commands[] = {\"A\", \"UID\", \"S\", \"F\"};\n\t\t\n\t\tHashtable<String, String> commandDescription = new Hashtable<String, String>();\n\t\tHashtable<String, String> subStringCommands = new Hashtable<String, String>();\n\t\tcommandDescription.put(\"A\", \"Sends audio data using _ as a regex\");\n\t\tcommandDescription.put(\"UID\", \"Specifies the user's id so that the Network.Server may verify it\");\n\t\tcommandDescription.put(\"S\", \"Specifies server commands.\");\n\t\tcommandDescription.put(\"F\", \"Specifies audio format.\");\n\t\tsubStringCommands.put(\"A\", \"No commands\");\n\t\tsubStringCommands.put(\"UID\", \"No sub commands\");\n\t\tsubStringCommands.put(\"S\", \"Sub commands are: \\nclose - Closes the server.\\ndisconnect - Disconnects the client from the server.\\nclumpSize {int}\");\n\t\tsubStringCommands.put(\"F\", \"Split Audio specifications between spaces. The ordering is {float SampleRate, int sampleSizeInBits, int channels, int frameSize, float frameRate\");\n\t\t\n\t\tfor (String str: commands)\n\t\t{\n\t\t\tSystem.out.printf(\"Command format:\\n %s.xxxxxxx\\n\", str);\n\t\t\tSystem.out.printf(\"Command %s\\n Description: %s \\n sub commands %s\\n\", str, commandDescription.get(str),subStringCommands.get(str));\n\t\t\t\n\t\t}\n\t}", "public interface SendMessageListener {\n abstract void onSendOK(Message msg);\n\n abstract void onSendFailed(Message msg, String reason);\n}", "public interface MsgTypeHandler {\n /**\n * 处理xml消息\n * @param postXmlData\n * @param which\n * @return\n */\n public String handleXmlMsg(String postXmlData, final String which);\n\n /**\n * 处理json消息\n * @param postJsonData\n * @param which\n * @return\n */\n public String handleJsonMsg(String postJsonData, final String which);\n}", "public interface ClientMessage extends Message {\n}", "public abstract void messageReceived(String message);", "public interface ToNetworkProcessor {\n\n /**\n * Send message.\n *\n * @param message the message\n */\n void sendMessage(String message);\n}", "private void displayMsg(Object o) {\n Message msg = ((Datapacket)o).getMsg();\n client.printMessage(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}", "@Handler\r\n public void onMessage(Message message, Session sessionI) throws Exception {\r\n log.info(\"inside generic message handler - message =: \" + message.toString());\r\n MsgType msgType = new MsgType();\r\n message.getHeader().getField(msgType);\r\n log.info(\"inside generic message handler - msgtype =: \" + msgType.toString());\r\n// log.info(\"inside generic message handler - message =: \"+ message.toString());\r\n }", "@Override\r\n\tpublic void sendMessage(String message) {\n\t\t\r\n\t}", "@Override\n\tpublic void send(String msg) {\n\t\t\n\t\t\n\t\n\t}", "public interface CommandHandler {\n void handleInput(String msg, DataInputStream input, DataOutputStream output);\n}", "@Override\n\tpublic void send(String msg) {\n\t}", "public interface IHelloMessage {\r\n String sayHello();\r\n}", "public void OnMessageReceived(String msg);", "public interface Main2Ipresenter {\n void sendString(String name);\n}", "public interface Communicator {\n void sendPositionAndJson(int position , String json);\n}", "void sendMessage(String msg);", "public interface ClientCallbackSIMON_IF // extends ClientCallback_IF\n{\n public void callback(String text);\n\n public void ping();\n\n}", "public interface EventListener {\n void onMessage(GenericRequest message);\n}", "public abstract void handleClientSide(T message, EntityPlayer player);", "public synchronized void handle(int ID, Object input) {\r\n\t\tif(input instanceof String){\r\n\t\t\tSystem.out.println(\"New Message Recieved: \" + input);\r\n\t\t}else{\r\n\t\t\tSystem.out.println(\"New Message Recieved: \" + input.getClass().toString());\r\n\t\t}\r\n\t\tthis.controller.handle(ID, input);\r\n\t}", "@Override\n\tpublic void message(String arg0) {\n\n\t}", "@Override\n\tpublic void sendMsg(String msg) {\n\n\t}", "public interface MessageHandler{\n\t/**\n\t * Receive notification of a recoverable error.\n\t * @param type Format of validation rules.\n\t * @param validationName Name of the validation.\n\t * @param content Content of notification. \n\t */\n\tpublic void error(ValidationType type, String validationName, String content);\n\t\n\t/**\n\t * Receive notification of a non-recoverable error.\n\t * @param type Format of validation rules.\n\t * @param validationName Name of the validation.\n\t * @param content Content of notification. \n\t */\n\tpublic void fatalError(ValidationType type, String validationName, String content);\n\n\t/**\n\t * Receive notification of a warning.\n\t * @param type Format of validation rules.\n\t * @param validationName Name of the validation.\n\t * @param content Content of notification. \n\t */\n\tpublic void warning(ValidationType type, String validationName, String content);\n\t\n\t/**\n\t * Receive notification of a note.\n\t * @param type Format of validation rules.\n\t * @param validationName Name of the validation.\n\t * @param content Content of notification. \n\t */\n\tpublic void note(ValidationType type, String validationName, String content);\n\t\n\t/**\n\t * Receive notification of a tip. It can be a tip for bug fix. \n\t * @param type Format of validation rules.\n\t * @param validationName Name of the validation.\n\t * @param content Content of notification. \n\t */\n\tpublic void tip(ValidationType type, String validationName, String content);\n}", "public interface MessageComponent {\n}", "public interface ActivityClientInterfaceTCP {\r\n void clientCallBackTCP(String commandID, String text);\r\n}", "public interface IMessageInputStrategy{\n public abstract Message getMessage();\n}", "public interface Communicator {\n\n\n public void sendData(String string);\n public void sendNIDcardObject(NIDCard nidCard);\n public void startWelcomeFragment();\n public void stopWelcomeFragment();\n public void startStepOne();\n}", "public interface IProtocol {\r\n int ADD_ELEMENT = 2100; // parent, 0, Elements.Extra\r\n\r\n int CLEAR_CHILDREN = 2005; // parent\r\n\r\n int CONTROL_ABOUT = 3001;\r\n\r\n int CONTROL_DELETE_SAVE = 3003;\r\n\r\n // int CONTROL_RESTART = 3004;\r\n int CONTROL_FORCE_CLICK = 3005;\r\n\r\n int CONTROL_HELP = 3002;\r\n\r\n // int UPDATE_SCROLL = 5;\r\n int DISPLAY_TOAST = 2001; // OBJ = text\r\n\r\n int ON_CLICK = 1101; // OBJ = view\r\n\r\n int ON_CREATE = 1001; // OBJ = bundle\r\n\r\n int ON_DESTROY = 1006;\r\n\r\n int ON_PAUSE = 1004;\r\n\r\n int ON_RESUME = 1003;\r\n\r\n int ON_START = 1002;\r\n\r\n int ON_STOP = 1005;\r\n\r\n int ON_TOUCH_EVENT = 1103;\r\n\r\n int SET_THEME = 5001;\r\n\r\n int SHOW_HELP_PAGE = 4001;\r\n\r\n int SHOW_LICENSE = 4002;\r\n\r\n int UPDATE_COLOR = 2;\r\n\r\n int UPDATE_ENABLED = 3;\r\n\r\n int UPDATE_INFLATE = 4;\r\n\r\n int UPDATE_TEXT = 1;\r\n\r\n int UPDATE_VIEW = 0;\r\n}", "@Override\n\tpublic void handleMsg(String in) {\n\n\t}", "public interface MessageReceived {\n void onMessageReceived(String message);\n}", "public interface ConsoleMessageI {\n String getMessage();\n}", "public interface Protocol {\n\n\n /**\n * Get the last line of text, which has been read from the socket.\n * @return the last line of text, which has been read from the socket.\n */\n String getCurrentLine();\n\n /**\n * Write to the Socket.\n * @param line to write to the socket.\n */\n void putLine(String line);\n\n /**\n * Change the state of the protocol.\n * @param state new state of the protocol.\n */\n void setState(State state);\n\n /**\n * Get the current state of the protocol.\n * @return the current state of the protocol.\n */\n State getState();\n\n\n}", "public void send(int highOption, int option) throws InstantiationException, IllegalAccessException, IOException, InterruptedException, ClassNotFoundException, RemoteReadException\n\t{\n\t\tint index = 0;\n\t\tClientHelloWorldBroadcastResponse broadcastResponse;\n\t\tClientHelloWorldAnycastResponse anycastResponse;\n\t\tClientHelloWorldUnicastResponse unicastResponse;\n\t\tswitch (option)\n\t\t{\n\t\t\tcase ChatOptions.TYPE_CHAT:\n\t\t\t\tSystem.out.println(\"Please type your message: \");\n\t\t\t\tString message = in.nextLine();\n\t\t\t\tswitch (highOption)\n\t\t\t\t{\n\t\t\t\t\tcase MulticastOptions.BROADCAST_NOTIFICATION:\n\t\t\t\t\t\tMulticastClient.FRONT().syncNotify(new HelloWorldBroadcastNotification(new HelloWorld(message)));\n\t\t\t\t\t\tSystem.out.println(\"You notification is broadcast!\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase MulticastOptions.ANYCAST_NOTIFICATION:\n\t\t\t\t\t\tMulticastClient.FRONT().syncNotify(new HelloWorldAnycastNotification(new HelloWorld(message)));\n\t\t\t\t\t\tSystem.out.println(\"You notification is anycast!\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase MulticastOptions.UNICAST_NOTIFICATION:\n\t\t\t\t\t\tMulticastClient.FRONT().syncNotify(new HelloWorldUnicastNotification(new HelloWorld(message)));\n\t\t\t\t\t\tSystem.out.println(\"You notification is unicast!\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase MulticastOptions.BROADCAST_REQUEST:\n\t\t\t\t\t\tbroadcastResponse = (ClientHelloWorldBroadcastResponse)MulticastClient.FRONT().read(new ClientHelloWorldBroadcastRequest(new HelloWorld(message)));\n\t\t\t\t\t\tSystem.out.println(\"You request is broadcast!\");\n\t\t\t\t\t\tSystem.out.println(\"You got \" + broadcastResponse.getResponses().size() + \" responses\");\n\t\t\t\t\t\tfor (HelloWorldBroadcastResponse response : broadcastResponse.getResponses())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(++index + \") response = \" + response.getHelloWorld().getHelloWorld());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase MulticastOptions.UNICAST_REQUEST:\n\t\t\t\t\t\tunicastResponse = (ClientHelloWorldUnicastResponse)MulticastClient.FRONT().read(new ClientHelloWorldUnicastRequest(new HelloWorld(message)));\n\t\t\t\t\t\tSystem.out.println(\"You request is unicast!\");\n\t\t\t\t\t\tSystem.out.println(\"You got \" + unicastResponse.getResponses().size() + \" responses\");\n\t\t\t\t\t\tfor (HelloWorldUnicastResponse response : unicastResponse.getResponses())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(++index + \") response = \" + response.getHelloWorld().getHelloWorld());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase MulticastOptions.ANYCAST_REQUEST:\n\t\t\t\t\t\tanycastResponse = (ClientHelloWorldAnycastResponse)MulticastClient.FRONT().read(new ClientHelloWorldAnycastRequest(new HelloWorld(message)));\n\t\t\t\t\t\tSystem.out.println(\"You request is anycast!\");\n\t\t\t\t\t\tSystem.out.println(\"You got \" + anycastResponse.getResponses().size() + \" responses\");\n\t\t\t\t\t\tfor (HelloWorldAnycastResponse response : anycastResponse.getResponses())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(++index + \") response = \" + response.getHelloWorld().getHelloWorld());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase ChatOptions.QUIT_CHAT:\n\t\t\t\tbreak;\n\t\t}\n\t}", "public abstract void msgHandler(Message msg);", "public interface Output {\n\n /**\n * Print string to user.\n * @param message String.\n */\n void displayMessage(String message);\n\n}", "public abstract void textMessage(Message m);", "public interface OnMessageReceived {\n public void messageReceived(String message);\n }", "@Override\n\tpublic void onMessage(String arg0, String arg1) {\n\t\tSystem.out.print(arg0+arg1);\n\t}", "public interface Sendable {\n\n}", "public interface SayHelloToClient {\n public String sayHello(String hello);\n}", "public interface SendMessage {\n\n void sendMsg(byte[] msg);\n}", "public interface SayHelloToClient {\n\n public String sayHello(String hello);\n}", "public interface MainUiMessages extends Messages {\n String login();\n String password();\n String submit();\n String exit();\n}", "public interface MessageProcesser {\n\n public void sendMultipleMessage();\n\n public void sendSingleMessage(int tag);\n\n public void parseMessage(String readMessage);\n}", "@Override\n public void onConnectionReceived(Connection connection, byte[] data) {\n String command = new String(data).trim();\n System.err.println(command);\n switch (command) {\n case \"\":\n break;\n case \"hello\":\n try {\n send(connection, (\"hello my friend \" + connection.getPid().id + \"\\r\\n\").getBytes());\n } catch (Exception e) {\n System.err.println(command + \" ERROR\");\n }\n break;\n case \"close\":\n try {\n send(connection, (\"goodbye my friend \" + connection.getPid().id + \"\\r\\n\").getBytes());\n terminate(connection);\n } catch (Exception e) {\n System.err.println(command + \" ERROR\");\n }\n break;\n case \"reg\":\n try {\n ClientInfo clientInfo = new ClientInfo(\"mqtt\", \"3.1\", \"testCID\", \"testUname\", \"testMP/\", 300);\n register(connection, clientInfo);\n System.err.println(ClientInfo.toErlangDataType(clientInfo));\n } catch (Exception e) {\n System.err.println(command + \" ERROR\");\n }\n break;\n case \"pub\":\n try {\n Message message =\n new Message(\"testId\", 0, \"from\", \"mytopic\", \"pubmessage\".getBytes(), new BigInteger(\"\" + System.currentTimeMillis()));\n publish(connection, message);\n send(connection, (\"publish \" + message.toString()).getBytes());\n } catch (Exception e) {\n System.err.println(command + \" ERROR\");\n }\n break;\n case \"sub\":\n try {\n String topic = \"mytopic\";\n subscribe(connection, topic, 1);\n System.err.println(\"subscribe \" + topic);\n send(connection, (\"subscribe \" + topic + \" qos \" + 1).getBytes());\n } catch (Exception e) {\n System.err.println(command + \" ERROR\");\n }\n break;\n case \"unsub\":\n try {\n String unSubTop = \"mytopic\";\n unsubscribe(connection, unSubTop);\n System.err.println(\"subscribe \" + unSubTop);\n send(connection, (\"unsubscribe \" + unSubTop).getBytes());\n } catch (Exception e) {\n System.err.println(command + \" ERROR\");\n }\n case \"help\":\n try {\n send(connection, help.getBytes());\n } catch (Exception e) {\n System.err.println(command + \" ERROR\");\n }\n break;\n default:\n try {\n send(connection, (\"i don't know \" + command + \"\\r\\n\").getBytes());\n } catch (Exception e) {\n System.err.println(command + \" ERROR\");\n }\n break;\n }\n\n }", "@Override\n\tpublic void onMessage(CommandMessage msg) {\n\t}", "@Override\n\tpublic void displayMessage(LinphoneCore lc, String message) {\n\t\t\n\t}", "public interface SendService {\n\n public void sendMessage(RemotingCommand remotingCommand, long timeout);\n}", "public static interface IUserInterfaceConnection {\n\n public void onLoginMsg(LoginResponse msg);\n\n public void onMessageMsg(MessageResponse msg);\n\n }", "public abstract void handleServerSide(T message, EntityPlayer player);", "public interface IPacketProcessor {\n\n\t/**\n\t * Processes the incoming chat message.\n\t * \n\t * @param msg The message.\n\t * @param addr The sender of the the message.\n\t * @param port The port of the sender.\n\t */\n\tvoid processMessage(JSONObject msg, InetAddress addr, int port);\n\t\n\t/**\n\t * Notifies the observers of an error during the connection process\n\t * \n\t * @param notification A detailed notification.\n\t */\n\tvoid onError(ModelNotification notification);\n\t\n\t/**\n\t * Notifies the observers of the establishment of the connection\n\t */\n\tvoid onSuccessfulStarted();\n\t\n}", "public interface EmitterOperations {\r\n void sendMessage(String to, String message) throws dialogue.notExistingPseudo;\r\n}", "public abstract void send(String message) throws IOException;", "public interface ServerStrategie {\n\t/**\n\t * Sendet dem Client das Signal, dass der Name OK ist.\n\t */\n\tpublic void sendeHello();\n\t\n\t/**\n\t * Sendet dem Client das Signal, dass der Name bereits belegt ist.\n\t */\n\tpublic void sendeFehlerHelo();\n\t\n\t/**\n\t * Sendet dem Client das Signal, dass ein neuer Spieler die Lobby betreten hat.\n\t * \n\t * @param spieler Der Name des neuen Spielers.\n\t */\n\tpublic void sendeNeuerSpieler(String spieler);\n\t\n\t/**\n\t * Sendet dem Client das Signal, dass ein Spieler die Lobby verlassen hat.\n\t * \n\t * @param spieler Der Name des Spielers, der die Lobby verlassen hat.\n\t */\n\tpublic void sendeSpielerWeg(String spieler);\n\t\n\t/**\n\t * Sendet dem Client die Lobby.\n\t */\n\tpublic void sendeLobby();\n\t\n\t/**\n\t * Sendet dem Client das Signal zum Starten des Spiels.\n\t */\n\tpublic void sendeSpielStarten();\n\t\n\t/**\n\t * Sendet dem Client das Spielfeld.\n\t */\n\tpublic void sendeSpielfeld();\n\t\n\t/**\n\t * Sendet dem Client den Namen des Spielers, der am Zug ist.\n\t * \n\t * @param spieler Der Spieler, der am Zug ist.\n\t */\n\tpublic void sendeRate(String spieler);\n\t\n\t/**\n\t * Sendet dem Client einen Zug, den ein Spieler gemacht hat.\n\t * \n\t * @param zug Die Position der Karte, die aufgedeckt wurde (als String)\n\t */\n\tpublic void sendeZug(String zug);\n\t\n\t/**\n\t * Sendet dem Client das Signal, dass das Spiel zuende ist.\n\t */\n\tpublic void sendeBeenden();\n\t\n\t/**\n\t * Setzt den Namen des Spielers, den diese Verbindung repräsentiert.\n\t * \n\t * @param name Der Name, der gesetzt werden soll.\n\t */\n\tpublic void setName(String name);\n\t\n\t/**\n\t * Trennt die Verbindung zum Client.\n\t */\n\tpublic void trenneVerbindung();\n\t\n\t/**\n\t * Die String-Repräsentation einer Verbindung ist der Name des Spielers, den sie repräsentiert.\n\t * \n\t * @return Der Name des Spielers.\n\t */\n\tpublic String toString();\n}", "void handleMessage(byte messageType, Object message);", "abstract void consoleMessage(String message);", "public interface OnMessageReceived {\n void messageReceived(String message);\n }", "public void displayClientMessage(Component debug1, boolean debug2) {}", "@Override\n public void processMessage(int type, String receivedMsg) {\n }", "public void DisplayMessage(String massage);", "public interface ClientHandler extends Remote {\n\n public void handleMessage(Message msg) throws RemoteException;\n\n}", "public interface MsgSenderInterface {\n\n public boolean sendMsgToMQ(String jsonStr);\n\n}", "@Override\n/**\n * Communication Tester method\n */\npublic String Communicate() throws RemoteException {\n\treturn \"Server Says Hi\";\n}", "public interface Message extends Serializable {\n\t/**\n\t * Kui server saab kliendi sõnumi vastu\n\t * @param s kliendi sessioon\n\t */\n\tvoid onReceive(ClientSession s);\n\t/**\n\t * Kui klient võtab serveri sõnumi\n\t * \n\t * @param c - Client\n\t */\n\tvoid onReceive(Client c);\n\t/**\n\t * Meetod tagastab adressaadi.\n\t * @return aadress, kellele sõnu saadetakse\n\t */\n\tString getAdress();\n}", "messages.Clienthello.ClientHello getClientHello();", "public interface ClientRemoteInterface extends Remote {\n\n /**\n * Receiver method, used by the server to send to the client\n// * @param playerMessage message that has been sent\n * @throws RemoteException exception due to communication fall\n */\n void receiveFromServer(PlayerMessage playerMessage) throws RemoteException;\n\n /**\n * Method used to\n * @throws RemoteException\n */\n void receiveLifeline() throws RemoteException;\n}", "public interface NetServerHandler {\n\n String returnByReceiveData(String data);\n\n}", "public void sendMessage(String message) {}", "void sendMessage() {\n\n\t}", "public interface MessageSender {\n boolean handle(Context context, MessageResponse response);\n}", "public interface RobotCommunicationProtocol {\n}", "@Override\n\tpublic void info(Message msg) {\n\n\t}", "public interface NativeInterface {\n\n public void showMsg(final String data);\n}", "public interface SocketMessageListerner {\n void onGetMessageAck(Message message, int type);\n}", "private void sendToClient(String string) {\n\t\r\n}", "public interface OnReceive{\n void onReceive(String message);\n}", "void onAnything(String unformatedMessage);", "public interface Response {\n\n /**\n * Run user-defined code for defined responses\n * @param data The data sent by the client/server\n * @param socket The socket for the client/server\n */\n public abstract void run(Data data, Socket socket);\n}", "private void dispatch(byte[] packet)\n\t{\n\t\ttry\n\t\t{\n\t\t\tSPELLmessage smsg = SPELLmessageFactory.createMessage(packet);\n\t\t\tif (smsg != null)\n\t\t\t{\n\t\t\t\tString msgId = smsg.getSender() + \"-\" + smsg.getReceiver();\n\t\t\t\tif (smsg instanceof SPELLmessageResponse || smsg instanceof SPELLmessageError)\n\t\t\t\t{\n\t\t\t\t\tmsgId += \":\" + smsg.getSequence();\n\t\t\t\t\tm_interface.incomingResponse(msgId, smsg);\n\t\t\t\t}\n\t\t\t\telse if (smsg instanceof SPELLmessageNotify || smsg instanceof SPELLmessagePrompt)\n\t\t\t\t{\n\t\t\t\t\tm_interface.incomingMessage(msgId, smsg);\n\t\t\t\t}\n\t\t\t\telse if (smsg instanceof SPELLmessageRequest)\n\t\t\t\t{\n\t\t\t\t\tmsgId += \":\" + smsg.getSequence();\n\t\t\t\t\tm_interface.incomingRequest(msgId, smsg);\n\t\t\t\t}\n\t\t\t\telse if (smsg instanceof SPELLmessageNotifyAsync || smsg instanceof SPELLmessageDisplay || smsg instanceof SPELLmessageOneway)\n\t\t\t\t{\n\t\t\t\t\tm_interface.incomingMessage(msgId, smsg);\n\t\t\t\t}\n\t\t\t\telse if (smsg instanceof SPELLmessageEOC)\n\t\t\t\t{\n\t\t\t\t\tLogger.warning(\"Received EOC from server\", Level.COMM, this);\n\t\t\t\t\tsetWorking(false);\n\t\t\t\t\tm_interface.commFailure(\"Connection lost\", \"Server sent EOC\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tString msg = \"CANNOT PROCESS MSG TYPE: \" + packet;\n\t\t\t\t\tSystem.err.println(msg);\n\t\t\t\t\tLogger.error(msg, Level.COMM, this);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (Exception ex)\n\t\t{\n\t\t\tSystem.err.println(packet);\n\t\t\tex.printStackTrace();\n\t\t\tLogger.error(ex.getLocalizedMessage(), Level.COMM, this);\n\t\t}\n\t}", "public abstract void intepret(String message);", "public interface IReceiveMessage {\n void onConnectSuccess();// 连接成功\n\n void onConnectFailed();// 连接失败\n\n void onClose(); // 关闭\n\n void onMessage(String text);\n}" ]
[ "0.65815103", "0.64739263", "0.64688253", "0.6411805", "0.6269828", "0.6201708", "0.6198741", "0.6185309", "0.6182222", "0.61727166", "0.61532307", "0.614996", "0.61390394", "0.6132685", "0.61194503", "0.6113641", "0.61029226", "0.61025095", "0.60956764", "0.60921586", "0.60881823", "0.60554796", "0.6017968", "0.60156846", "0.60143113", "0.60139984", "0.60078645", "0.5999808", "0.5966272", "0.5965195", "0.59588325", "0.595516", "0.59537745", "0.59445715", "0.5939048", "0.5936934", "0.59279317", "0.59234726", "0.5921847", "0.59197444", "0.5910658", "0.590651", "0.59063154", "0.59062403", "0.5905553", "0.58967155", "0.5894832", "0.58908117", "0.5888961", "0.5885621", "0.5881808", "0.5880748", "0.5877616", "0.5870233", "0.58692175", "0.58674127", "0.58673275", "0.58651996", "0.58638346", "0.5856337", "0.58460134", "0.5845692", "0.58449745", "0.5841618", "0.5840187", "0.583984", "0.58365995", "0.5834999", "0.58249766", "0.58242214", "0.5823837", "0.5818691", "0.58164746", "0.5809928", "0.5804453", "0.58039725", "0.5803823", "0.57991576", "0.5796636", "0.57897615", "0.578881", "0.57849437", "0.5776537", "0.57686144", "0.57661456", "0.57617325", "0.57600164", "0.5744537", "0.57425123", "0.57421064", "0.5739736", "0.5729429", "0.57293147", "0.5729156", "0.5729076", "0.5725521", "0.57240236", "0.57233673", "0.57215345", "0.5717978", "0.5713872" ]
0.0
-1
Method that describes what to do when the server notifies the client about the disconnection of a player. The exact protocol to follow depends on the interface chosen by the user
void disconnectedPlayerMessage(String name);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected void onDisconnection();", "@Override\n\tpublic void playerDisconnected(String playerID, DisconnectReason reason) {\n\t}", "void clientDisconnected(Client client, DisconnectInfo info);", "@Override\r\n\t\t\t\tpublic void onClientDisconnect(ServerConnection sc) {\n\t\t\t\t\tSystem.out.println(\"CLIENT DISCONNECTED FROM SERVER.\");\r\n\t\t\t\t}", "protected void processDisconnection(){}", "interface Disconnect extends RconConnectionEvent {}", "@Override\r\n\t\t\t\tpublic void onClientDisconnect(ServerConnection sc) {\n\t\t\t\t}", "void disconnect(String reason);", "@SubscribeEvent\n public void onFMLNetworkClientDisconnectionFromServer(ClientDisconnectionFromServerEvent event) {\n hypixel = false;\n bedwars = false;\n }", "public abstract void OnDisconnect(int sock);", "void onDisconnect( String errorMsg );", "void onDisconnect();", "void onDisconnect();", "void onDisconnect(DisconnectReason reason, String errorMessage);", "void notifyPlayerDisconnected(String username);", "public void disconnected(String reason) {}", "@Override\r\n\t\t\t\tpublic void onServerDisconnect() {\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void onServerDisconnect() {\n\t\t\t\t\tSystem.out.println(\"CONNECTION HAS BEEN LOST.\");\r\n\t\t\t\t}", "@Override\r\n\t\tpublic void onDisconnect(Connection connection) {\n\r\n\t\t}", "protected abstract void disconnect(UUID[] players, String reason, IntConsumer response);", "public void disconnect(String message);", "public void disconnect(){\n\t\tif(player!=null){\n\t\t\tplayer.getConnection().close();\n\t\t\t\n\t\t\t// we get no disconnect signal if we close the connection ourself\n\t\t\tnotifyHandlers(MessageFlag.DISCONNECTED);\n\t\t}\n\t}", "public void socketDisconnected(PacketChannel pc, boolean failed);", "void firePeerDisconnected(ConnectionKey connectionKey);", "protected void onDisconnect() {}", "public void onIceDisconnected();", "public void disconnectFromAudio() {\n String json = new Gson().toJson(new TelevisionModel(TelevisionModel.Action.DISCONNECT));\n String a = sendMessage(json);\n TelevisionModel teleM = new Gson().fromJson(a, TelevisionModel.class);\n System.out.println(\"Client Received \" + json);\n\n if (teleM.getAction() == TelevisionModel.Action.DISCONNECT) {\n isDisconnecting = teleM.getValue();\n ui.updateArea(teleM.getMessage());\n };\n }", "public interface OnDisconnectListener {\n\n /**\n * Called when client disconnects.\n * @param errorMsg if error caused desconnection, this contains error description.\n */\n void onDisconnect( String errorMsg );\n }", "public void onPeerConnectionClosed();", "public void connectionLost(String channelID);", "default void onDisconnect(SessionID sessionID) {\n }", "public void handleDisconnect(){\r\n consoleAppend(this.getName() + \" disconnected.\");\r\n clientThreads.remove(getIndex(this.getName()));\r\n sendToAll(this.getName() + \" disconnected.\");\r\n sendCTToAll(new ControlToken(ControlToken.REMOVECODE, this.getName()));\r\n }", "public void onClientDisconnected(Channel channel);", "public void disconnectedFrom(ServerDescriptor desc);", "@Override\n public void onDisconnect(BinaryLogClient client) {\n }", "public void disconnect() {}", "void onConnectionRemoved(SocketConnection connection);", "public void notifyDisconnection(String username){\r\n for(SocketClientHandlerObserver obs:observers){\r\n obs.onDisconnection(username);\r\n }\r\n }", "protected void onDisconnected(long hconv)\n {\n }", "void onDisconnected();", "@Override\n\tpublic void onDisconnected() {\n\t\t// Display the connection status\n\t\tToast.makeText(this, \"Disconnected. Please re-connect.\", Toast.LENGTH_SHORT).show();\n\t}", "private void disconnectHandler(Void v) {\n\n LOG.info(\"DISCONNECT from MQTT client {}\", this.mqttEndpoint.clientIdentifier());\n this.detachForced = false;\n }", "void onDisconnectFailure();", "public void onDisconnected() {\r\n // Display the connection status\r\n Toast.makeText(this, \"Disconnected. Please re-connect.\",\r\n Toast.LENGTH_SHORT).show();\r\n }", "public void onNetDisConnect() {\n\n\t}", "public void onDisconnect(Controller controller) {\n\t\tSystem.out.println(\"Disconnected\");\r\n\t}", "public void onDisconnect(Controller controller) {\n\t\tSystem.out.println(\"Disconnected\");\r\n\t}", "public void disconnect(ClientAddress clientAddress);", "public void doDisconnect() {\n Debug.logInfo(\"MQTT Disconnecting clientId[\" + client.getClientId() + \"] of [\" + client.getServerURI() + \"] ... \", MODULE);\n\n IMqttActionListener discListener = new IMqttActionListener() {\n public void onSuccess(IMqttToken asyncActionToken) {\n Debug.logInfo(\"Disconnect Completed\", MODULE);\n state = DISCONNECTED;\n carryOn();\n }\n\n public void onFailure(IMqttToken asyncActionToken, Throwable exception) {\n ex = exception;\n state = ERROR;\n Debug.logError(\"Disconnect failed\" + exception, MODULE);\n carryOn();\n }\n\n public void carryOn() {\n synchronized (caller) {\n donext = true;\n caller.notifyAll();\n }\n }\n };\n\n try {\n client.disconnect(null, null);\n } catch (MqttException e) {\n state = ERROR;\n donext = true;\n ex = e;\n }\n }", "public LWTRTPdu disConnectRsp() throws IncorrectTransitionException;", "@Override\n\tprotected void onNetworkDisConnected() {\n\n\t}", "public void disconnected(XMPPConnection connection) {}", "public void onDisconnected() {\n\t\t\r\n\t}", "public void onDisconnect(HeaderSet req, HeaderSet resp) {\r\n if(req == null)\r\n return;\r\n try {\r\n //clientBluetoothAddress = req.getHeader(HeaderSet.NAME).toString();\r\n Object reqType = req.getHeader(HeaderSets.REQUEST_TYPE);\r\n if(reqType == null)\r\n return;\r\n if (reqType.toString().equals(Types.REQUEST_DISCONNECT)) {\r\n parent.removeClient(clientBluetoothAddress);\r\n //AlertDisplayer.showAlert(\"Disconnected\", \"btADDR : \" +clientBluetoothAddress,parent.gui.getDisplay(),parent.gui.getList());\r\n }\r\n \r\n } catch (IOException e) {\r\n System.err.println(\"Exception in DataTransaction.onConnect()\");\r\n \r\n }\r\n }", "private void disconnect() {\n System.out.println(String.format(\"連線中斷,%s\",\n clientSocket.getRemoteSocketAddress()));\n final int delete = thisPlayer.id - 1;\n player[delete] = null;\n empty.push(delete);\n }", "@Override\n public void onAgentDisconnect(long agentId, Status state) {\n }", "public void onDisconnect(IChatComponent reason) {\n\t\tlogger.info(this.getConnectionInfo() + \" lost connection: \" + reason.getUnformattedText());\n\t}", "public void disconnectedFromHost();", "interface DisconnectCallback {\n\n /**\n * Method called after disconnect from the net will be performed successfully.\n */\n void onDisconnectSuccess();\n\n /**\n * Method called after disconnect from the net will not be performed for some reasons.\n */\n void onDisconnectFailure();\n\n }", "public void notifyDisconnection(Player player) {\n for (PlayerController controller : playerControllers) {\n if (controller == null) continue;\n try {\n controller.getClient().notifyDisconnection(player);\n } catch (IOException e) {\n // no need to handle disconnection, game is over\n }\n }\n }", "void onDisconnectSuccess();", "public interface OnDisconnect {\n public void call();\n}", "void onDisconnect(User user);", "@Override\n\tpublic void onDisconnected() {\n\t\tmConnectionStatus.setText(R.string.disconnected);\n\t}", "@Override\n public abstract void disconnect();", "public void disconnect();", "public void disconnect();", "public void disconnect();", "public void disconnect();", "@Override\n\tpublic void disconnect() {\n\t\t\n\t}", "@Override\n\tpublic void disconnect() {\n\t\t\n\t}", "@Override\r\n \tpublic void clientDisconnectedCallback(RoMClient client) {\r\n \t\tthis.disconnectClient(client);\r\n \t}", "protected void processDisconnect() {\n\t\tconnected.set(false);\n\t\tsenderChannel = null;\n\t}", "public void disconnect() {\n if (serverSocket != null) {\n try {\n serverSocket.close();\n Log.i(TAG, \"ServerSocket closed\");\n } catch (IOException e) {\n Log.e(TAG, \"Error closing the serverSocket\");\n }\n }\n\n sendDisconnectionMessage();\n\n // FIXME - Change this into a message sent it listener\n // Wait 2 seconds to disconnection message was sent\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n public void run() {\n WiFiDirectUtils.clearServiceRequest(wiFiP2PInstance);\n WiFiDirectUtils.stopPeerDiscovering(wiFiP2PInstance);\n WiFiDirectUtils.removeGroup(wiFiP2PInstance);\n\n serverSocket = null;\n isRegistered = false;\n clientsConnected.clear();\n }\n }, 2000);\n }", "@Override\r\n\tpublic void disconnect();", "public void disconnect() {\n\t\t\n\t}", "public void onDisconnected() {\n\n }", "public void onDisconnected() {\n\n }", "public void disconnect(){\n\n\t\tserverConnection.disconnect();\n\t}", "void disconnect() throws CCommException, IllegalStateException;", "@Override\n\t\t\tpublic void onNetworkDisconnected() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void disconnect() {\n\n\t}", "@Override\n\tpublic void disconnect() {\n\n\t}", "public static void disconnection(DisconnectionEvent e)\n\t{\n\t\tDisplay.getDefault().asyncExec(new Runnable(){\n\n\t\t\t@Override\n\t\t\tpublic void run()\n\t\t\t{\n\t\t\t\tif(!e.getState() && e.getNumOfConnectedSensors()==0)\n\t\t\t\t{\n\t\t\t\t\tresetGuiData();\n\t\t\t\t\tconfigButton.setEnabled(false);\n\t\t\t\t\tstatusBar.setText(\"Sensor \" + e.getSensorPath() + \" has been disconnected. Please connect sensor for configuration\");\n\t\t\t\t} else if (!e.getState() && shell.isVisible() && e.getNumOfConnectedSensors() == 1)\n\t\t\t\t{\n\t\t\t\t\tconfigButton.setEnabled(true);\n\t\t\t\t\tresetGuiData();\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tsetData();\n\t\t\t\t\t\tstatusBar.setText(\"Only Sensor \" + ConnectionManager.getInstance().currentSensor(0).getSensorPath()\n\t\t\t\t\t\t\t\t+ \" has been connected\");\n\t\t\t\t\t}\n\t\t\t\t\tcatch (SensorNotFoundException e)\n\t\t\t\t\t{\n\t\t\t\t\t\tstatusBar.setText(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else if (e.getState())\n\t\t\t\t{\n\t\t\t\t\tstatusBar.setText(\"Please connect any sensor for configuration!\");\n\t\t\t\t\tresetGuiData();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t});\n\t}", "@Override\n\tpublic void onDisconnectDone(ConnectEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void onDisconnected() {\n\t\tToast.makeText(context, \"Disconnected. Please re-connect.\",Toast.LENGTH_SHORT).show();\n\t}", "@Override\n\tpublic void listenerInterrupted(ConnectionListenerEvent evt) {\n\t\t\n\t}", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.597 -0500\", hash_original_method = \"6CA7282E928AA840C6D25E995C5EBFEA\", hash_generated_method = \"EE2364AE0179C423F2BD973FF5B92F49\")\n \nprivate void replyDisconnected(int status) {\n Message msg = mSrcHandler.obtainMessage(CMD_CHANNEL_DISCONNECTED);\n msg.arg1 = status;\n msg.obj = this;\n msg.replyTo = mDstMessenger;\n mSrcHandler.sendMessage(msg);\n }", "public CompletionStage<Void> disconnect() {\n\t\treturn this.finConnection.sendMessage(\"disconnect-from-channel\", FinBeanUtils.toJsonObject(this.routingInfo)).thenAccept(ack->{\n\t\t\tif (!ack.isSuccess()) {\n\t\t\t\tthrow new RuntimeException(\"error disconnecting channel client, reason: \" + ack.getReason());\n\t\t\t}\n\t\t});\n\t}", "void disconnected(MqttClient client, Throwable cause, boolean reconnecting);", "void serverLostConnection();", "@Override\n public void onChannelDisconnected() {\n ConnectionManager.getInstance().setDisconnectNow(true);\n ((P2PListener)activity).onAfterDisconnect();\n }", "void disconnect();", "void disconnect();", "@Override\n\tpublic void onDisconnected() {\n\t\t\n\t}", "@Override\n\tpublic void onDisconnected() {\n\t\t\n\t}", "@Override\n\tpublic void onDisconnected() {\n\t\t\n\t}", "@Override\n\tpublic void disconnected(String text) {\n\t\t\n\t}", "@Override\n public void Disconnect() {\n bReConnect = true;\n }", "private void disconnected() {\n m_connectionLabel.setBackground(Color.RED);\n m_connectionLabel.setText(\"Disconnected\");\n }" ]
[ "0.8149758", "0.7538842", "0.74550396", "0.7241484", "0.7239377", "0.71856827", "0.7164848", "0.7146729", "0.7128645", "0.7085874", "0.7081296", "0.70074004", "0.70074004", "0.7005697", "0.70044523", "0.6997358", "0.6987177", "0.6936314", "0.69291246", "0.6884126", "0.68820614", "0.68814236", "0.6851178", "0.6844143", "0.6838722", "0.68350005", "0.68229455", "0.68078244", "0.67736727", "0.67430824", "0.6725854", "0.6717258", "0.67096645", "0.67060834", "0.6650397", "0.6648389", "0.6641633", "0.6595788", "0.6589412", "0.65831316", "0.65804005", "0.65792346", "0.6576104", "0.6555739", "0.6543504", "0.65257204", "0.65257204", "0.6523805", "0.65215653", "0.65201044", "0.651732", "0.65089744", "0.6506264", "0.65024245", "0.6482801", "0.6475377", "0.64709246", "0.6458747", "0.64441794", "0.64412224", "0.64238316", "0.6421123", "0.64170265", "0.6411219", "0.64093935", "0.6408582", "0.6408582", "0.6408582", "0.6408582", "0.6399597", "0.6399597", "0.6399526", "0.638975", "0.6389221", "0.63867813", "0.63769233", "0.6373182", "0.6373182", "0.6367876", "0.6347291", "0.63450134", "0.63446885", "0.63446885", "0.6317127", "0.631368", "0.6296226", "0.6295283", "0.6290997", "0.62889284", "0.62888646", "0.6284999", "0.6277115", "0.627259", "0.627259", "0.6272072", "0.6272072", "0.6272072", "0.62693197", "0.6239478", "0.62363434" ]
0.74978673
2
Method that describes what to do when the server notifies the client about an update about the game state. The exact protocol to follow depends on the interface chosen by the user
void onModelChanged(MatchSnapshot matchSnapshot);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void receivedUpdateFromServer();", "void stateUpdate(String msg);", "void onUpdate(Message message);", "@Override\n\tpublic void update(Game game) {\n\t\t\n\t\tObject packet = game.connectionManager.mostRecentPacket;\n\t\tif (packet instanceof StatePacket)\n\t\t{\n\t\t\tgame.manager.receiveUpdate(game, (StatePacket) packet);\n\t\t}\n\t}", "@Override\n public void handleMessage(Message m) {\n int gameState = Integer.valueOf(m.getText());\n System.out.println(\"Got authoritative game state \" + gameState + \" from server. Updating local state now...\");\n this.gameState = gameState;\n }", "public IServerState changeState(ServerEvents serverEvent);", "public interface StateMachineListener\n{\n //================| Public Methods |====================================\n \n /**\n * Notification that the state of the game has changed.\n\n * @param oldState \n * @param newState\n */\n void stateChanged( final GameState oldState, final GameState newState );\n}", "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 }", "public void update(){\n\t\tSystem.out.println(\"Return From Observer Pattern: \\n\" + theModel.getObserverState() \n\t\t+ \"\\n\");\n\t}", "interface GameStateObserver\n{\n enum Status {\n STARTED, FINISHED\n }\n\n /**\n * Method will be call when scores are changed\n * @param scores new scores value\n */\n void onScoresChanged(int scores);\n\n /**\n * Method will be call when player do some move\n */\n void onMove();\n\n /**\n * Method will be call when status of game changes\n */\n void onStatusChanged(Status newStatus);\n\n}", "EventChannel.Update update();", "public interface UiUpdate {\n\n void onLogin(String message);\n\n void onSuccess(String message);\n\n void onActionNotValid(String errorCode);\n\n void onChooseNetwork (String message);\n\n void onTurnStart(Match match, String nickname);\n\n void onPlaceDiceNotValid(String message);\n\n void onGameUpdate(Match match, String nickname);\n\n void onGameEnd(Match match);\n\n void onSchemeToChoose(Match match, String nickname, String message);\n\n void onUseToolCardNotValid(int id, Match match, String message);\n\n //void onUseToolCard12IIStepNotValid(Match match, String e);\n\n void onOtherInfoToolCard(int id, Match match);\n\n void onPlayerDisconnection(String message, String nickname);\n\n}", "@Override\n\tpublic void update() {\n\t\tSystem.out.println(\"Observer Pattern on Room Reservation Notification: \");\n\t\tSystem.out.println(\"Your room is \" + reserve.getState()+\"\\n\");\n\t}", "public abstract void clientStatusChanged(ClientManager client, Object object);", "com.polytech.spik.protocol.SpikMessages.StatusChanged getStatusChanged();", "@Override\r\n\tpublic void update(BaseGameHandler gameHandler)\r\n\t{\n\t}", "public void updateState();", "@Override\n public void handleMessage(Message msg) {\n switch (msg.what) {\n case Constants.MESSAGE_STATE_CHANGE:\n\n break;\n\n }\n }", "public interface ClientUpdateListener {\n\n /**\n * This method notify the implementer that a message has been received\n *\n * @param message the received message from the server\n */\n void onUpdate(Message message);\n}", "public abstract void stateChanged(STATE state);", "void updateState() {\n String[] players = client.getPlayers();\n System.out.println(Arrays.toString(players));\n\n if(oldPlayerNum != players.length){\n oldPlayerNum = players.length;\n updateComboBox();\n }\n\n playersListModel.clear();\n\n for (int i = 0; i < players.length; i++) {\n playersListModel.add(i, players[i]);\n }\n\n // SECOND check if player holding the ball / update GUI accordingly\n String[] playerBall = client.whoIsBall();\n boolean serverSideBall = Integer.parseInt(playerBall[1]) == client.getId();\n\n if (client.hasBall != serverSideBall) { // If the server says something different\n client.hasBall = serverSideBall;\n ballState(serverSideBall, playerBall[0]);\n }\n // THIRD if you are holding the ball update gui so that ball is throwable\n\n }", "abstract public void updateState();", "@Override\r\n\tpublic void Update() {\n\t\tSystem.out.println(name+\",¹Ø±ÕNBA£¬¼ÌÐø¹¤×÷£¡\"+abstractNotify.getAction());\r\n\t}", "void onStatusUpdate(int status);", "void stateChanged( final GameState oldState, final GameState newState );", "@Override\n public void onStateUpdate(\n Hashtable<String, String> successAttribute,\n List<PHHueError> errorAttribute) {\n }", "void updateGameState(GameState gameState);", "protected void stateChanged() {\r\n\t\tsetChanged();\r\n\t\tnotifyObservers();\r\n\t}", "void notifyConnectionStateChanged(State state);", "public void checkForUpdate();", "public void doUpdateStatus() throws GameException\r\n {\n \r\n }", "@Override\n public void gameStateChanged()\n {\n update();\n \n // check for \"game over\" or \"game won\"\n if ( game.getState() == GameState.LOST )\n {\n JOptionPane.showMessageDialog(\n this, \n game.getLoseMessage(), \"Game over!\",\n JOptionPane.INFORMATION_MESSAGE);\n game.createNewGame();\n }\n else if ( game.getState() == GameState.WON )\n {\n JOptionPane.showMessageDialog(\n this, \n game.getWinMessage(), \"Well Done!\",\n JOptionPane.INFORMATION_MESSAGE);\n game.createNewGame();\n }\n else if (game.messageForPlayer())\n {\n JOptionPane.showMessageDialog(\n this, \n game.getPlayerMessage(), \"Important Information\",\n JOptionPane.INFORMATION_MESSAGE); \n }\n }", "protected void onUpdated( E entity, GameState state, int index )\r\n\t{\r\n\t\t\r\n\t}", "public abstract void update(Message message);", "protected void updateGameState() {\n }", "void onAfterClientStateChange(Participant client, State previousState);", "@Override\n protected void sendUpdatedStateTo(GamePlayer p) {\n //makes sure player exists\n if(p == null){\n return;\n }\n // if there is no state to send, ignore\n if(state == null){\n return;\n }\n //creates a copy of the official state and sends it to the desired player\n StrategoGameState stateForPlayer = new StrategoGameState(state);\n p.sendInfo((stateForPlayer));\n }", "@Override\r\n\tpublic void update(Observable game, Object gameMessage) {\r\n\t\tGameMessage gm = (GameMessage) gameMessage;\r\n\t\t\r\n\t\tObstacle obstacle = gm.getObstacle();\r\n\t\tswitch(obstacle) {\r\n\t\tcase Blood:\r\n\t\t\tstatusLabel.setText(\"You smell something foul!\");\r\n\t\t\tbreak;\r\n\t\tcase Slime:\r\n\t\t\tstatusLabel.setText(\"You feel a draft.\");\r\n\t\t\tbreak;\r\n\t\tcase Goop:\r\n\t\t\tstatusLabel.setText(\"You smell something fould and feel a draft!\");\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tstatusLabel.setText(\"\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\tif(gm.getGameOver() == true) {\r\n\t\t\tswitch(gm.getGameOverReason()) {\r\n\t\t\t\tcase Wumpus:\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"While you ponder over whether it was a good idea to go\"\r\n\t\t\t\t\t\t\t+ \" toe to toe with the Wumpus or not, The Wumpus is busy tearing your head off!\");\r\n\t\t\t\t\tstatusLabel.setText(\"Wumpus bit your head off!\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Pit:\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"You fall to your doom in a surprisingly deep pit.\");\r\n\t\t\t\t\tstatusLabel.setText(\"Fell down a pit!\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase ArrowHitWumpus:\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your arrow flies true and hits the Wumpus right between the eyes.\"\r\n\t\t\t\t\t\t\t+ \"He falls over dead and the day is done. Congratulations!\");\r\n\t\t\t\t\tstatusLabel.setText(\"The Wumpus is dead!\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase ArrowHitHunter:\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"You completely miss the Wumpus hitting yourself in the back of head!\");\r\n\t\t\t\t\tstatusLabel.setText(\"Arrow in the back of your head!\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "public void notifyGameOn() {\n this.myStatusString.setText(\"Game is On\");\n final LineBorder line = new LineBorder(Color.GREEN, 2, true);\n this.myStatusString.setBorder(line);\n this.myStatusString.setForeground(Color.GREEN);\n this.myStatusString.setFont(new Font(FONT_TIMES, Font.BOLD, NUM_FONT_SIZE)); \n }", "void notifyNewGame();", "@Override\n\tpublic void onStatusUpdate(String arg0, int arg1, String arg2) {\n\t}", "public boolean onUpdate(Session s) throws CallbackException;", "void willDisplayUpdate(String change) throws RemoteException;", "public void receiveInfoFromServerC() throws IOException\n\t{\n\t\tstatus = fromServer.readInt();\n\n\t\tif (status == PLAYER1WINS)\n\t\t{\t\n\t\t\tsetMove(currentToken);\n\t\t\tPlatform.runLater(() -> lblStatus.setText(\"You've won!\")); \n\t\t\tcontinueToPlay = false;\n\t\t}\n\n\t\telse if (status == PLAYER2WINS)\n\t\t{\n\t\t\tsetMove(otherToken);\n\t\t\tPlatform.runLater(() -> lblStatus.setText(\"Game over - Player O has won!\"));\n\t\t\tcontinueToPlay = false;\n\t\t}\n\n\t\telse if (status == DRAW)\n\t\t{\n\t\t\tPlatform.runLater(() -> lblStatus.setText(\"Game over - It's a tie!\"));\n\t\t\tsetMove(otherToken);\n\t\t\tcontinueToPlay = false;\n\t\t}\n\t\telse if (status == WAIT)\n\t\t{\n\t\t\tsetMove(currentToken);\n\t\t\tPlatform.runLater(() -> lblStatus.setText(\"Other player's turn.\"));\n\t\t\tmyTurn = false; \n\t\t}\n\t\telse if (status == CONTINUE)\n\t\t{\n\t\t\tsetMove(otherToken);\n\t\t\tPlatform.runLater(() -> lblStatus.setText(\"Your turn.\"));\n\t\t\tmyTurn = true;\n\t\t}\n\t}", "public static interface Client\n\t{\n\n\t\t/**\n\t\t * Server notify the client to refresh the player list.\n\t\t * @param playerList New player list.\n\t\t * @throws RpcException On connection error.\n\t\t */\n\t\tvoid refreshPlayerList(Map<String, IPlayerConfig> playerList) throws RpcException;\n\n\t\t/**\n\t\t * Server notify the client to refresh the game config. Client is expected to display it in GameCreation panel.\n\t\t * @param gameCfg New game config.\n\t\t * @throws RpcException On connection error.\n\t\t */\n\t\tvoid refreshGameConfig(GameConfig gameCfg) throws RpcException;\n\t\t\n\t\t/**\n\t\t * Server broadcast game creation message from another player.\n\t\t * @param fromPlayer Sender player. \n\t\t * @param msg Message.\n\t\t * @throws RpcException On connection error.\n\t\t */\n\t\tvoid receiveGameCreationMessage(String fromPlayer, String msg) throws RpcException;\n\n\t\t/**\n\t\t * Server broadcast running game message from another player.\n\t\t * @param fromPlayer Sender player. \n\t\t * @param msg Message.\n\t\t * @throws RpcException On connection error.\n\t\t */\n\t\tvoid receiveRunningGameMessage(String fromPlayer, String msg) throws RpcException;\n\t\t\n\t\t/**\n\t\t * Server broadcast paused game message from another player.\n\t\t * @param fromPlayer Sender player. \n\t\t * @param msg Message.\n\t\t * @throws RpcException On connection error.\n\t\t */\n\t\tvoid receivePausedGameMessage(String fromPlayer, String msg) throws RpcException;\n\t\t\n\t\t/**\n\t\t * Server broadcast new turn events.\n\t\t * Client should process these events on local gameboard.\n\t\t * If there is an error processins events on local gameboard, then it means local gameboard and server gameboard view for this player are out of sync.\n\t\t * In that case, client should call {@link ServerRunningGame#getEntireGameLog()} methods to recreate a fresh local gameboard.\n\t\t * @param newTurnEvents Events generated on turn resolution.\n\t\t * @throws RpcException On connection error.\n\t\t */\n\t\tvoid receiveNewTurnGameBoard(List<IGameEvent> newTurnEvents) throws RpcException;\n\t}", "public void update(String state) {\n\t\tSystem.out.println(\"收到状态---\"+state);\n\t\tthis.state = state;\n\t}", "protected void updated() {\n if (state.isSynced()) {\n this.state.setState(ENodeState.Updated);\n }\n }", "private void sendUpdateConnectionInfo() {\n\n }", "@Override\r\n public void onStatusUpdate(String arg0, int arg1, String arg2) {\n\r\n }", "@Override\n\tpublic void update(Game game) {\n\t\t\n\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 interface UiObserver {\n\n void update(String string);\n\n void updateConnection(String ip, String port);\n\n}", "@Override\n\tpublic void onUpdate() {\n\t\tlistener.onUpdate();\n\t}", "void update( State state );", "protected void onUpdate() {\r\n\r\n\t}", "@Override\n public boolean handlePlayerStatusUpdate(PlayerState playerState) {\n return true;\n }", "void onStatusChanged(Status newStatus);", "@Override\n public void doUpdate(NotificationMessage notification) {\n \n }", "@Override\r\n\tpublic void updateGameFinished() {\n\t\t\r\n\t}", "@Override\n public void executeUpdate() {\n EventBus.publish(new DialogCraftingReceivedEvent(requestId, title, groups, craftItems));\n }", "void notifyLorenzoDeckUpdate(DevelopCardDeckUpdate msg);", "public void messageArrived(StatusMessage statusMessage);", "@Override\n\t\tpublic void agentChangeStatus(String system_id, String state) {\n\t\t\tSystem.out.println(\"=======>Agent Change state: \" + state);\n\t\t\tif (system_id==null || !aCallback.containsKey(system_id))\n\t\t\t\t//Unknown agent changes from disconnect state to unassociated (system_id is not received yet)\n\t\t\t\treturn;\n\n\t\t\t// Send a agent Broadcast Event to all clients.\n\t\t\tfinal RemoteCallbackList<IAgentCallbackService> agentCallbacks = aCallback.get(system_id);\n final int N = agentCallbacks.beginBroadcast();\n for (int i=0; i<N; i++) {\n try {\n \tagentCallbacks.getBroadcastItem(i).agentStateChanged(state);\n } catch (RemoteException e) {\n // The RemoteCallbackList will take care of removing\n // the dead object for us.\n }\n }\n agentCallbacks.finishBroadcast();\n\t\t\t//System.out.println(\"agente \" + system_id + \" changed to: \" + state);\n\t\t}", "@Override\n public void update(Workout e) {\n\n }", "@Override\r\n\tpublic void update() {\n\t\tSystem.out.println(\"Observer3 has received update!\");\r\n\t}", "public interface IPostListener {\n /**\n * The state message from the service.\n * @param msg\n */\n void stateUpdate(String msg);\n}", "public void notifyStateChange(String str) {\n out.println(str); \n }", "@Override\n\tpublic void stateChanged() {\n\t\t\n\t}", "@Override\n public void stateChanged(\n final CuratorFramework client, final ConnectionState newState\n ) {\n }", "public abstract void update(UIReader event);", "public void updateGIUnoResponse()\n {\n updateInfo.setText( \"Server is not up :(\" );\n }", "public abstract void updateWhatsOn();", "@Override\n public void update(ModelUpdate message) {\n calledMethods.add(\"update: \" + message.getEventType());\n }", "private void sendStatus() {\n\n // Only send status if we have UI bound to service\n if (isBound) {\n try {\n Message msg = Message.obtain(null, RadioPlayerFragment.UPDATE_STATUS);\n Bundle bundle = new Bundle();\n bundle.putString(RadioPlayerFragment.STATUS, mpState);\n msg.setData(bundle);\n fragmentMessenger.send(msg);\n } catch (RemoteException e) {\n Log.e(LOG_TAG, \"Cannot send status: \" + mpState);\n }\n }\n\n }", "public void receiveInfoFromServer() throws IOException\n\t{\n\t\tstatus = fromServer.readInt();\n\n\t\tif (status == PLAYER1WINS)\n\t\t{\t\n\t\t\tif (player == PLAYER1) \n\t\t\t{ \tsetMove(currentToken);\n\t\t\tPlatform.runLater(() -> lblStatus.setText(\"You've won!\")); \n\t\t\t} \n\t\t\telse if (player == PLAYER2) { \n\t\t\t\tsetMove(otherToken);\n\t\t\t\tPlatform.runLater(() -> lblStatus.setText(\"Game over - Player X has won!\"));\n\t\t\t}\n\n\t\t\tcontinueToPlay = false;\n\t\t}\n\n\t\telse if (status == PLAYER2WINS)\n\t\t{\n\n\t\t\tif (player == PLAYER2) \n\t\t\t{ \n\t\t\t\tPlatform.runLater(() -> lblStatus.setText(\"You've won!\")); \n\t\t\t\tsetMove(currentToken);\n\n\t\t\t}\n\t\t\telse if (player == PLAYER1) { \n\t\t\t\tsetMove(otherToken);\n\t\t\t\tPlatform.runLater(() -> lblStatus.setText(\"Game over - Player O has won!\")); \n\t\t\t}\n\t\t\tcontinueToPlay = false;\n\t\t}\n\n\t\telse if (status == DRAW)\n\t\t{\n\n\t\t\tPlatform.runLater(() -> lblStatus.setText(\"Game over - It's a tie!\"));\n\t\t\tsetMove(otherToken);\n\t\t\tcontinueToPlay = false;\n\n\t\t}\n\t\telse if (status == WAIT)\n\t\t{\n\n\t\t\tsetMove(currentToken);\n\t\t\tPlatform.runLater(() -> lblStatus.setText(\"Other player's turn.\"));\n\t\t\tmyTurn = false; \n\n\t\t}\n\n\t\telse if (status == CONTINUE)\n\t\t{\n\t\t\tsetMove(otherToken);\n\t\t\tPlatform.runLater(() -> lblStatus.setText(\"Your turn.\"));\n\t\t\tmyTurn = true;\n\t\t}\n\t}", "@Override\r\n\tpublic void update(Observable o, Object arg) {\r\n\t\tSystem.out.println(arg.toString());\r\n\t\tif (o instanceof Hand) {\r\n\t\t\tthis.sendNotification(\"Your hand has changed:\");\r\n\t\t\tthis.showHand();\r\n\t\t} else if (o instanceof Board) {\r\n\t\t\tthis.sendNotification(\"The board has changed:\");\r\n\t\t\tthis.showBoard();\r\n\t\t} else if (o instanceof Turn) {\r\n\t\t\tthis.sendNotification(\"Your turn is now as follows:\");\r\n\t\t\tthis.showTurn();\r\n\t\t}\r\n\t}", "void onHisNotify();", "@Override\n protected void sendUpdatedStateTo(GamePlayer p) {\n PigGameState copy = new PigGameState(pgs);\n p.sendInfo(copy);\n }", "void onUpdate(IMirrorable o);", "@Override\r\n\tpublic void update() {\n\t\tSystem.out.println(\"Observer2 has received update!\");\r\n\t}", "@Override\n\tpublic void onUpdatePeersReceived(UpdateEvent arg0) {\n\t\t\n\t}", "public void updateObserver();", "@Override\r\n\tpublic void update() {\n\t\tSystem.out.println(\"Observer1 has received update!\");\r\n\t}", "public void update() ;", "public abstract void onSolvedGame();", "public interface FSMListener extends FSMInteractor\n{\n\tpublic void update();\n}", "public interface OnStateListener{\n public void getState(String name);\n }", "@Override\r\n public void gameAvailabilityUpdate(Game game) throws RemoteException, SQLException {\r\n property.firePropertyChange(\"gameAvailabilityChange\", null, game);\r\n }", "@Override\n\tpublic void update(GameContainer gc, StateBasedGame sb, int delta) {\n\t\t\n\t}", "public interface Observer {\n /**\n * Called when createAndSetLocalDescription or setRemoteDescription failed.\n */\n void onFailure(String description);\n\n /**\n * Called when createAndSetLocalDescription succeeded.\n */\n void onLocalDescriptionCreatedAndSet(SessionDescriptionType type, String description);\n\n /**\n * Called when setRemoteDescription succeeded.\n */\n void onRemoteDescriptionSet();\n\n /**\n * New ICE candidate available. String representation defined in the IceCandidate class.\n * To be sent to the remote peer connection.\n */\n void onIceCandidate(String iceCandidate);\n\n /**\n * Called when connected or disconnected. In disconnected state recovery procedure\n * should only rely on signaling channel.\n */\n void onIceConnectionChange(boolean connected);\n }", "private void updateStatus(MsgEvent event) {\n//\t\t | Operation | Body? | SIP-If-Match? | Expires Value |\r\n//\t\t +-----------+-------+---------------+---------------+\r\n//\t\t | Initial | yes | no | > 0 |\r\n//\t\t | Refresh | no | yes | > 0 |\r\n//\t\t | Modify | yes | yes | > 0 |\r\n//\t\t | Remove | no | yes | 0 |\r\n//\t\t +-----------+-------+---------------+---------------+\r\n\t\tif (event instanceof SIPMsg) {\r\n\t\t\tRequest req = ((SIPMsg)event).getRequest();\r\n\t\t\tif (req != null) {\r\n\t\t\t\tString publish = req.toString();\r\n\t\t\t\t// Get the SIP-If-Match information\r\n\t\t\t\tString entityTag = sipLocator.getSIPParameter(\"SIP-If-Match\", \r\n\t\t\t\t\t\t\"entity-tag\", MsgQueue.FIRST, publish);\r\n\t\t\t\t// Get the Expires value\r\n\t\t\t\tString expires = sipLocator.getSIPParameter(\"Expires\", \r\n\t\t\t\t\t\t\"value\", MsgQueue.FIRST, publish);\r\n\t\t\t\t// Get the Content-Length\tvalue\r\n\t\t\t\tString length = sipLocator.getSIPParameter(\"Content-Length\", \r\n\t\t\t\t\t\t\"value\", MsgQueue.FIRST, publish);\r\n\t\t\t\tint exp = -1;\r\n\t\t\t\tboolean hasBody = false;\r\n\t\t\t\tint contentLen = -1;\r\n\t\t\t\tif (length != null) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tcontentLen = Integer.parseInt(length);\r\n\t\t\t\t\t\tif (expires != null) {\r\n\t\t\t\t\t\t\texp = Integer.parseInt(expires);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (contentLen > 0)\r\n\t\t\t\t\t\t\thasBody = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (NumberFormatException nfe) {\r\n\t\t\t\t\t\tlogger.warn(PC2LogCategory.Model, subCat,\r\n\t\t\t\t\t\t\t\t\"PresenceSever retrieved a value from the Content-Length header that doesn't appear to be an integer.\");\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// Initial condition\r\n\t\t\t\tif (entityTag == null) {\r\n\t\t\t\t\tProperties p = SystemSettings.getPropertiesByValue(SettingConstants.IP, event.getSrcIP());\r\n\t\t\t\t\tif (p != null) {\r\n\t\t\t\t\t\tString ne = p.getProperty(SettingConstants.NE);\r\n\t\t\t\t\t\tPresenceData pd = new PresenceData(ne, PresenceStatus.OPEN, System.currentTimeMillis());\r\n\t\t\t\t\t\tneTable.put(pd.getLabel(), pd);\r\n\t\t\t\t\t\tentityTable.put(pd.getEntity(), pd);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if (entityTag != null) {\r\n\t\t\t\t\t// Remove condition\r\n\t\t\t\t\tif (contentLen == 0 && exp == 0) {\r\n\t\t\t\t\t\tPresenceData pd = entityTable.get(entityTag);\r\n\t\t\t\t\t\tif (pd != null)\r\n\t\t\t\t\t\t\tnotifyWatchers.add(pd);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (exp > 0) {\r\n\t\t\t\t\t\t// This indicates that the device is only updating its existing\r\n\t\t\t\t\t\t// status.\r\n\t\t\t\t\t\tPresenceData pd = entityTable.remove(entityTag);\r\n\t\t\t\t\t\tif (pd != null) {\r\n\t\t\t\t\t\t\tpd.updateEntity(System.currentTimeMillis());\r\n\t\t\t\t\t\t\tentityTable.put(pd.getEntity(), pd);\r\n\t\t\t\t\t\t\tif (hasBody) {\r\n\t\t\t\t\t\t\t\t// This indicates that the device is modifying its information\r\n\t\t\t\t\t\t\t\tnotifyWatchers.add(pd);\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}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void notifyState() {\n\t\tList<T> alldata = new ArrayList<T>(this.dataMap.values());\t\r\n\t\t// call them with the current data\r\n\t\t// for each observer call them\r\n\t\tfor( ModelEvents<T> observer : this.ObserverList){\r\n\t\t\tobserver.dataState(alldata);\r\n\t\t}\r\n\r\n\t}", "@Override\n\tpublic void update() { }", "public void update() {}", "private void sendCurrentState() {\n\ttry {\n\t channel.sendObject(getState());\n\t} catch (IOException e) {\n\t Log.e(\"423-client\", e.toString());\n\t}\n }", "public abstract void update ();", "protected abstract void update();", "protected abstract void update();", "public void update(MazeEventInfoField e) {\r\n }", "public void sendUpdatedState() {\n \t\tObjectOutputStream out = null;\n \t\ttry {\n \t\t\tfor (Socket socket : sockets) {\n \t\t\t\tout = new ObjectOutputStream(socket.getOutputStream());\n \t\t\t\tout.writeObject(gs);\n \t\t\t\tLog.d(\"network GaC\", \"State written into socket\");\n \t\t\t\tout.flush();\n \t\t\t}\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t}", "public void notifyObservers(){\n for (GameObserver g: observers){\n g.handleUpdate(new GameEvent(this,\n currentPlayer,\n genericWorldMap,\n gameState,\n currentTerritoriesOfInterest,\n currentMessage));\n }\n }" ]
[ "0.748218", "0.70856965", "0.67663926", "0.670218", "0.6625402", "0.6612727", "0.6581512", "0.6523294", "0.6478751", "0.64455664", "0.6438639", "0.64335847", "0.6426891", "0.6422835", "0.6372557", "0.63702726", "0.6343835", "0.6341535", "0.63248193", "0.63239", "0.626785", "0.6266572", "0.62610525", "0.625671", "0.62562597", "0.6240815", "0.62350863", "0.6153497", "0.6147516", "0.6142833", "0.61195576", "0.61172616", "0.61167526", "0.6097085", "0.609428", "0.60759515", "0.60701805", "0.6069022", "0.6060041", "0.6059787", "0.6045684", "0.6044347", "0.60400945", "0.6005417", "0.5989618", "0.5970167", "0.59666795", "0.59650624", "0.59623754", "0.5941701", "0.5941278", "0.5930003", "0.59265614", "0.592147", "0.59204906", "0.59191847", "0.591481", "0.5913499", "0.59046006", "0.5900765", "0.58979267", "0.5889087", "0.5888574", "0.58814716", "0.58735365", "0.58670694", "0.5859911", "0.58496284", "0.5843312", "0.5841481", "0.5838322", "0.5837582", "0.5831739", "0.5817148", "0.5814274", "0.5806699", "0.58064365", "0.5801678", "0.5796544", "0.57847756", "0.57791656", "0.57785356", "0.57781804", "0.57672596", "0.5765886", "0.5764049", "0.5760089", "0.5754378", "0.5750249", "0.5749458", "0.574528", "0.5737204", "0.5736429", "0.5735415", "0.57304424", "0.57298064", "0.57255584", "0.57255584", "0.57199466", "0.57155675", "0.5714986" ]
0.0
-1
Declaration section for the data members
public MyPractice() { //Unless we specify values all data members //are a zero, false, or null }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void InitData() {\n }", "private void InitData() {\n\t}", "@Override\n\tpublic void initData() {\n\t\t\n\t}", "public Data() {\n\t\tif (flag == 0) {\n\t\t\tflag = 1;\n\t\t\tfloat def = 0;\n\t\t\tfor (int i = 0; i < 4; i++) {\n\n\t\t\t\tlocation.add(def);\n\t\t\t\tstate.add(0);\n\t\t\t\tboardsize.add(0);\n\n\t\t\t\tsystemid.add(\"\");\n\t\t\t\ttime.add(0);\n\t\t\t\tname.add(\"\");\n\t\t\t}\n\n\t\t\tball.add(def);\n\t\t\tball.add(def);\n\n\t\t\tballsize = 0;\n\t\t}\n\t}", "@Override\r\n\tpublic void initData() {\n\t}", "public void initData() {\n }", "public void initData() {\n }", "@Override\n\tpublic void initData() {\n\n\t}", "@Override\n\tpublic void initData() {\n\n\t}", "@Override\n\tpublic void initData() {\n\n\t}", "public void Data(){\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n\tpublic void getData() {\n\t\t\n\t}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\n\tpublic void initData() {\n\n\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "private void initData() {\n }", "@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 void initData() {\n\t}", "@Override\n protected void initData() {\n }", "@Override\n protected void initData() {\n }", "private void initData() {\n\n }", "@Override\n\tprotected void initdata() {\n\n\t}", "public DeviceData() {\r\n this.rtAddress = 0;\r\n this.subAddress = 0;\r\n this.txRx = 0;\r\n this.data = new short[32];\r\n }", "void initData(){\n }", "public DataRecord() {\n super(DataTable.DATA);\n }", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "Data() {\n\t\t// dia = 01;\n\t\t// mes = 01;\n\t\t// ano = 1970;\n\t\tthis(1, 1, 1970); // usar um construtor dentro de outro\n\t}", "public void initData(){\r\n \r\n }", "@Override\n\tprotected void initData(){\n\t\tsuper.initData();\n\t}", "public EntityDataParticle() {\n\t\tm_speed=0.5f;\n\t\tm_rotation=0;\n\t\tm_duration=0.5f;\n\t\tm_type=0;\n\t}", "private void Initialized_Data() {\n\t\t\r\n\t}", "DataHRecordData() {}", "public mainData() {\n }", "public Data() {}", "ClassPdbMember(String name, DataType dataType, boolean isFlexibleArray, int offset,\n\t\t\t\tString comment) {\n\t\t\tsuper(name, dataType.getName(), offset, comment);\n\t\t\tthis.dataType = dataType;\n\t\t\tthis.isFlexibleArray = isFlexibleArray;\n\t\t}", "@SuppressWarnings(\"unused\")\n\tprivate LedgerInitProposalData() {\n\t}", "DataDecl DataDecl(Token t, IdNode schema, ExtIdNode extName,\n\t\t\tExtIdNode extSource, DataNameNode name);", "public DesastreData() { //\r\n\t}", "public interface Data {\n\n int DATA_TYPE_HEADER = 1;\n int DATA_TYPE_ITEM = 2;\n\n String getData();\n void setData(String data);\n int getDataType();\n long getTime();\n}", "public EventDataUpdate ()\n\t{\n\t\tm_Fields = new Hashtable<String, String>();\n\t\tm_nType = EVENTDATA_UPDATE_NONE;\n\t}", "final void getData() {\n\t\t//The final method can't be overriden\n\t}", "private RowData() {\n initFields();\n }", "protected void initDataFields() {\r\n //this module doesn't require any data fields\r\n }", "public AddData() {\n\t\tsuper();\n\t\tfilled = false;\n\t}", "public DataBlock() {\n headerPointer = 0;\n datasPointer = size - 1;\n serialize = new byte[size];\n }", "@Override\n public void visit(FieldDeclaration n, Object arg) {\n \tArrayList<String> field = new ArrayList<String>();\n \tif(n.getJavaDoc()!=null){\n \t\tString declare = n.toString();\n \t\tdeclare = declare.replaceAll(\"(?s)(.*)private\", \"private\");\n \t\tdeclare = declare.replaceAll(\"(?s)=(.*)\", \"\");\n \t\tfield.add(declare.trim());\n\t \tString comment = n.getJavaDoc().getContent();\n\t \tcomment = comment.replaceAll(\"\\\\* @param (.*)\",\"\");\n\t \tcomment = comment.replaceAll(\"\\\\* @return (.*)\",\"\");\n\t \tcomment = comment.replaceAll(\"\\\\* @throws (.*)\",\"\");\n\t \tcomment = comment.replaceAll(\"\\\\* \",\"\");\n\t \tfield.add(comment.trim()); \n\t \tfields.add(field);\n \t}\n \t}", "@Override\n\tprotected void getDataFromUCF() {\n\n\t}", "protected UserWordData() {\n\n\t}", "protected @Override\r\n abstract void initData();", "Object getData() { /* package access */\n\t\treturn data;\n\t}", "private void initData(){\n\n }", "public boolean isData() {return true; }", "private Hashtable<String, ?> declareSpaceProps() {\n\t\tfinal Hashtable<String, Object> props = new Hashtable<String, Object>();\n\n\t\tprops.put(\"sapere.rdf-based\", Boolean.TRUE);\n\t\tprops.put(\"sapere.acid-transactions\", Boolean.FALSE);\n\t\tprops.put(\"sapere.lsa-space.with-reasoner\", Boolean.TRUE);\n\n\t\treturn props;\n\t}", "public Id5320DataFile()\n\t{\n\t\tlineLength = OFF_CUSTOMER_NAME + LEN_CUSTOMER_NAME;\n\t}", "public interface Data {\n\t/* nothing special at the moment */\n}", "public Data() {\n \n }", "public Data() {\n }", "public Data() {\n }", "public interface DataNode\r\n{\r\n /** @return type name of this data node */\r\n public String get_type_name();\r\n /** @return the bits of this data node */\r\n public String get_bitsequence_value() ;\r\n \r\n /** @return size of this data in bits*/\r\n public int get_bit_size(); \r\n \r\n /** @return size of this data as an integer (for expresion evaluation\r\n * purpose */\r\n public int get_int_value() throws Exception;\r\n \r\n /** @return the number of bits this type takes */ \r\n public int get_fieldsize();\r\n \r\n /** set the expression for number of bits this type takes*/\r\n public void set_fieldsize(AST fieldsize);\r\n \r\n /** set valid ok nok */\r\n public void set_verify_then_else(AST verify_ast,AST then_ast , AST else_ast) throws Exception;\r\n \r\n /** sets the contaxt for evaluation of expressions for this data node*/\r\n public void set_context(VariableSymbolTable context);\r\n \r\n /** print a human readable form of this node */\r\n public String print();\r\n \r\n /** print with formatting \r\n * 0 = print() [debug formatted]\r\n * 1 = as string [useful to write to a file]\r\n * 2 = debug with strings [similar to 0, but with strings instad of bytes]\r\n * @return Formatted output ready to be printed\r\n */\r\n public String print(int format);\r\n public void set_name(String name);\r\n public String get_name();\r\n \r\n /** returns the maximum size this object can accept (hold) or -1 for infinity */\r\n public int get_max_accept() throws Exception;\r\n public void assign(DataNodeAbstract rhs) throws Exception;\r\n public void populate(BdplFile rhs) throws Exception;\r\n \r\n}", "public FlexData() {\n entryCollectionList = null;\n entryCollectionMap = null;\n type = Type.UNKNOWN;\n standardDateFormat = \"yyyy-MM-dd\"; // DB2-Datum\n\t}", "@Override\n\tpublic DataType dataType() {\n\n\t\treturn new StructType().\n\t\t\t\t// add(\"device_distr\",\n\t\t\t\t// DataTypes.createArrayType(DataTypes.createMapType(DataTypes.StringType,\n\t\t\t\t// DataTypes.FloatType, true)))\n\t\tadd(\"device_distribution\", DataTypes.StringType).add(\"time_spent\", DataTypes.LongType).add(\"video_start\",\n\t\t\t\tDataTypes.LongType);\n\n\t}", "private ProcessedDynamicData( ) {\r\n super();\r\n }", "public ArticleData() {\r\n\t\tid = Constants.EMPTY_STRING;\r\n\t\tname = Constants.EMPTY_STRING;\r\n\t\turl = Constants.EMPTY_STRING;\r\n\t\tdesc = Constants.EMPTY_STRING;\r\n\t\tlevels = Constants.EMPTY_STRING;\r\n\t\twebSiteId = Constants.EMPTY_STRING;\r\n\t\tmatched = Constants.EMPTY_STRING;\r\n\t\tcreateBy = Constants.EMPTY_STRING;\r\n\t\tcreateDate = Constants.EMPTY_STRING;\r\n\t\tlastUpdateBy = Constants.EMPTY_STRING;\r\n\t\tlastUpdateDate = Constants.EMPTY_STRING;\r\n\t\tenabled = Constants.EMPTY_STRING;\r\n\t\tpostTableName = Constants.EMPTY_STRING;\r\n\t\treturnPage = Constants.EMPTY_STRING;\r\n\t\twebSiteShowName = Constants.EMPTY_STRING;\r\n\t\treturnDirect = Constants.EMPTY_STRING;\r\n\t\tkeyWordTableName = Constants.EMPTY_STRING;\r\n\t\ttitle = Constants.EMPTY_STRING;\r\n\t\ttitleCounter = Constants.EMPTY_STRING;\r\n\t\tbufferStartCounter = Constants.EMPTY_STRING;\r\n\t\tbufferEndCounter = Constants.EMPTY_STRING;\r\n\t\tcatId = Constants.EMPTY_STRING;\r\n\t\tpostUrl = Constants.EMPTY_STRING;\r\n\t}", "public ListingData() {\r\n\t\tsuper();\r\n\t}", "public ReferenceBasePUSData() {\n\t\tsuper();\n\t}", "@Override\n\tpublic Data getDataModelVariables() {\n\t\treturn new Data();\n\t}", "public StructMember() { }", "@Override\n\n // <editor-fold defaultstate=\"collapsed\" desc=\" UML Marker \"> \n // #[regen=yes,id=DCE.E1700BD9-298C-DA86-4BFF-194B41A6CF5E]\n // </editor-fold> \n protected String getProperties() {\n\n return \"Size = \" + size + \", Index = \" + value;\n\n }", "@Override\n\tvoid putData() {\n\t\tSystem.out.println(\"Brand : \"+brand);\n\t\tSystem.out.println(\"Model : \"+model);\n\t\tSystem.out.println(\"Year of manufacture : \"+year_of_manufacture);\n\t\tSystem.out.println(\"CC : \"+cc);\n\t}", "public Data() {\n this.customers = new HashMap<>();\n this.orders = new HashMap<>();\n this.siteVisits = new HashMap<>();\n this.imageUploads = new HashMap<>();\n }", "public int get_data_header_size() {\r\n return sizeof_dimension;\r\n }", "public Data() {\n\t\tCalendar now = new GregorianCalendar();\n\t\tthis.anno = now.get(Calendar.YEAR);\n\t\tthis.giorno = now.get(Calendar.DAY_OF_MONTH);\n\t\tthis.mese = Data.MESI[now.get(Calendar.MONTH)];\n\t}", "interface Data {\n}", "public void setdat()\n {\n }", "protected Value() {\n flags = 0;\n num = null;\n str = null;\n object_labels = getters = setters = null;\n excluded_strings = included_strings = null;\n functionPartitions = null;\n functionTypeSignatures = null;\n var = null;\n hashcode = 0;\n }", "public DerivedWord getData() {\n \treturn this.data;\n }", "public DataSetHeader(){\r\n \t//this.elementStr = SerializationHelper.nullSerialization;\r\n }", "public Record() {\n data = new int[DatabaseManager.fieldNames.length];\n }", "public DesignADataStructure() {\n arr = new ArrayList<>();\n map = new HashMap<>();\n }", "public StructMember(String __name, TypeCode __type, IDLType __type_def) {\n name = __name;\n type = __type;\n type_def = __type_def;\n }", "public Data() {\n initComponents();\n koneksi_db();\n tampil_data();\n }", "@Override\n\t\t\tpublic void visit(MethodDeclaration arg0, Object arg1) {\n\t\t\t\tif((arg0.getModifiers() & Modifier.PUBLIC) == Modifier.PUBLIC) {\n\t\t\t\t\t\tif(arg0.getName().substring(0, 3) == \"get\" || arg0.getName().substring(0, 3) == \"set\")\n\t\t\t\t\t\t\tpublicAcces.add(new Pair(arg0.getName() + \"( \"+planeL(arg0.getParameters()) +\") :\" + arg0.getType().toString(), Character.toLowerCase(arg0.getName().substring(3).charAt(0)) + (arg0.getName().substring(3).length() > 1 ? arg0.getName().substring(3).substring(1) : \"\")));\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tpublicAcces.add(new Pair(arg0.getName() + \"( \"+planeL(arg0.getParameters()) +\") :\" + arg0.getType().toString(), Character.toLowerCase(arg0.getName().substring(3).charAt(0)) + (arg0.getName().substring(3).length() > 1 ? arg0.getName().substring(3).substring(1) : \"\")));\n\t\t\t\t\t\tuses(arg0.getParameters());\n\t\t\t\t}\n\t\t\t\tsuper.visit(arg0, arg1);\n\t\t\t}", "public FieldDefinition(FieldData fieldData)\n\t{\n\t\tcommonInitialisation();\n\t\tthis.fieldName = fieldData.getFieldName().toUpperCase();\n\t\tthis.fieldType = fieldData.getFieldType();\n\t\tthis.fieldLength = fieldData.getFieldLength();\n\t\tthis.fieldDecimal = fieldData.getFieldDecimal();\n\t\tthis.upperCase = fieldData.isUpperCase();\n\t\tthis.workField = fieldData.isWorkField();\n\t\tthis.repeating = fieldData instanceof RepeatingFieldData;\n\t}", "@Override\n\t\t\tpublic void visit(ConstructorDeclaration arg0, Object arg1) {\n\t\t\t\tif((arg0.getModifiers() & Modifier.PUBLIC) > 0)\n\t\t\t\t\tfields.add(\"+\" + arg0.getDeclarationAsString(false, false));\n\t\t\t\tsuper.visit(arg0, arg1);\n\t\t\t}", "public interface Data extends Bookmarkable, Closeable {\n\n /**\n * Returns custom metadata that will be available to processor with prefix 'c_'.\n */\n Map<String, String> getCustomMetadata();\n\n /**\n * Identifies type of data in {@link Data#getInputStream()}. Typically it will be a string including provider type and\n * data type - i.e 'ALM/tests'. A result processor will be selected based on the data type.\n */\n @NotNull\n String getDataType();\n\n /**\n * MIME type value (i.e application/xml, text/plain).\n */\n @NotNull\n String getMimeType();\n\n /**\n * Returns charset of the content. If the content is binary then returns null.\n */\n String getCharset();\n\n /**\n * Returns input stream for reading data. The data may be binary, textual etc. Its content type is identified by\n * {@link Data#getMimeType()}.\n */\n @NotNull\n InputStream getInputStream() throws IOException;\n}", "Datty getDatty();", "private TigerData() {\n initFields();\n }", "public LiveBusData() {\n mData = NOT_SET;\n mVersion = START_VERSION;\n }", "@Override\n public byte getType() {\n return TYPE_DATA;\n }", "void initData() {\r\n\t\tthis.daVinci = new Artist(\"da Vinci\");\r\n\t\tthis.mona = new Painting(daVinci, \"Mona Lisa\");\r\n\t\t//this.lastSupper = new Painting(this.daVinci, \"Last Supper\");\r\n\t}", "@Override\n\tpublic void notationDeclaration() {\n\t\t\n\t}", "public DataStructure() {\r\n firstX = null;\r\n lastX = null;\r\n firstY = null;\r\n lastY = null;\r\n size = 0;\r\n }", "public Data (String name, int type) {\n\t\tthis.name = name;\n\t\tthis.type = type;\n\t\tstream = new MyReader();\n\t}" ]
[ "0.61054444", "0.60137564", "0.59741104", "0.59679145", "0.5940308", "0.593982", "0.593982", "0.5934732", "0.5934732", "0.5934732", "0.5911604", "0.5896657", "0.5894285", "0.58813345", "0.5880766", "0.5880766", "0.58786887", "0.5836799", "0.5814596", "0.57808065", "0.57808065", "0.57808065", "0.57808065", "0.57808065", "0.57808065", "0.5773972", "0.5766969", "0.5766969", "0.5730953", "0.5711198", "0.5705679", "0.56982887", "0.5688627", "0.56883925", "0.56858844", "0.5674995", "0.5669168", "0.5657362", "0.5651836", "0.5635434", "0.55899847", "0.55831987", "0.55609787", "0.5557733", "0.55540717", "0.5544957", "0.5544628", "0.55389625", "0.55335593", "0.55316824", "0.5530224", "0.5524091", "0.55003434", "0.5491505", "0.54893404", "0.5476505", "0.5475113", "0.5459867", "0.5459076", "0.54527104", "0.5452448", "0.54522645", "0.54492027", "0.5436586", "0.5432562", "0.5432562", "0.5407752", "0.5399386", "0.5398172", "0.5395913", "0.5385421", "0.53770244", "0.53757554", "0.53735006", "0.53608865", "0.5355321", "0.5346636", "0.5344064", "0.5343362", "0.53342575", "0.53290176", "0.5323257", "0.5315672", "0.52985173", "0.5290404", "0.52888775", "0.52806944", "0.5268169", "0.5251902", "0.52506465", "0.5239987", "0.52326596", "0.52279955", "0.5217803", "0.5214104", "0.5208956", "0.5206695", "0.5196213", "0.5185171", "0.5175838", "0.5175814" ]
0.0
-1
Generates a new population from the given constants
public void generatePopulation() { if (SCType.getScLayers() <= 2) Logger.logError("To few supply chain layers, minimum of 3 required:" + SCType.getScLayers()); ArrayList<CountryAgent> countryAgents = SU.getObjectsAll(CountryAgent.class); for (CountryAgent country : countryAgents) { if (country.containsSCType(SCType.PRODUCER)) { for (int i = 0; i < Constants.N_PRODUCERS; i++) { country.spawnAgent(SCType.PRODUCER); } } if (country.containsSCType(SCType.INTERNATIONAL)) { for (int i = 0; i < Constants.N_INTERNATIONALS; i++) { country.spawnAgent(SCType.INTERNATIONAL); } } if (country.containsSCType(SCType.WHOLESALER)) { for (int i = 0; i < Constants.N_WHOLESALERS; i++) { country.spawnAgent(SCType.WHOLESALER); } } if (country.containsSCType(SCType.RETAIL)) { for (int i = 0; i < Constants.N_RETAILERS; i++) { country.spawnAgent(SCType.RETAIL); } } if (country.containsSCType(SCType.CONSUMER)) { for (int i = 0; i < Constants.N_CONSUMERS; i++) { country.spawnAgent(SCType.CONSUMER); } } } // Set possible new suppliers and clients for (BaseAgent agent : SU.getObjectsAll(BaseAgent.class)) { agent.setPossibleNewSuppliersAndClients(); } SU.getDataCollector().addAllCurrentStock(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void generatePopulation() {\n population = setupArray(POP_SIZE, NUM_RULES, GENE_SIZE, COND_LEN);\n\n for (Individual individual : population) {\n for (int i = 0; i < individual.getGene().length; i++) {\n individual.gene[i] = bits.get(new Random().nextInt(2));\n }\n individual.generateRulebase();\n }\n }", "public void initializePopulation(){\n\t\t// create the population\n\t\tfor(int i = 0; i < POPULATION_SIZE; i++){\n\t\t\t// get a random length for the building sequence\n\t\t\tint randArraySize = randomGenerator.nextInt(possiblePieces.length-1)+1;\n\t\t\t\n\t\t\tBuildingPiece[] pieceSequence = new BuildingPiece[randArraySize];\n\t\t\tfor(int j = 0; j < randArraySize; j++){\n\t\t\t\t// get a random possible piece and insert it into the sequence\n\t\t\t\tint randIndex = randomGenerator.nextInt(possiblePieces.length);\n\t\t\t\tpieceSequence[j] = possiblePieces[randIndex];\n\t\t\t}\n\t\t\t\n\t\t\t/* add a new number sequence with the newly created \n\t\t\t * sequence from the input */\n\t\t\tpopulation.add(new Building(pieceSequence, generation, possiblePieces));\n\t\t}\n\t}", "public void genPopulation(int howMany)\r\n/* 30: */ {\r\n/* 31:54 */ this.pop.removeAllElements();\r\n/* 32:55 */ for (int i = 0; i < howMany; i++)\r\n/* 33: */ {\r\n/* 34:61 */ int[] clusterV = g.genRandomClusterSize();\r\n/* 35:62 */ Cluster c = new Cluster(g, clusterV);\r\n/* 36:63 */ this.pop.addElement(c);\r\n/* 37: */ }\r\n/* 38: */ }", "public void reproduce(){\n\t\t// sort the population from strongest to weakest\n\t\tCollections.sort(population);\n\t\tCollections.reverse(population);\n\t\t\n\t\tfor(int i = 0; i < (int)(POPULATION_SIZE*POPULATION_ACTION_PERCENT); i+=2){\n\t\t\t\n\t\t\t// get two random indexes for reproduction based on the exponential function\n\t\t\t// (1/1000) * (randInt)^2 = index\n\t\t\t// this function favors sequences with higher fitness scores\n\t\t\tint randIndex1 = randomGenerator.nextInt((int)Math.sqrt(1000*POPULATION_SIZE*(1-POPULATION_ACTION_PERCENT)));\n\t\t\tint randIndex2 = randomGenerator.nextInt((int)Math.sqrt(1000*POPULATION_SIZE*(1-POPULATION_ACTION_PERCENT)));\n\t\t\t\n\t\t\trandIndex1 = (int) (Math.pow(randIndex1, 2) / 1000);\n\t\t\trandIndex2 = (int) (Math.pow(randIndex2, 2) / 1000);\n\t\t\t\n\t\t\t// get two pieces\n\t\t\tBuildingPiece[] array1 = population.get(randIndex1).getList();\n\t\t\tBuildingPiece[] array2 = population.get(randIndex2).getList();\n\t\t\t\n\t\t\t// find a splicing point\n\t\t\tint splicePoint = findSplicingPoint(array1, array2);\n\t\t\t\n\t\t\t// generate two new arrays based on the splicing point\n\t\t\tBuildingPiece[] newArray1 = generateNewArray(array1, array2, splicePoint);\n\t\t\tBuildingPiece[] newArray2 = generateNewArray(array2, array1, splicePoint);\n\t\t\t\n\t\t\t// make new buildings with the new arrays\n\t\t\tBuilding bp1 = new Building(newArray1, generation, possiblePieces);\n\t\t\tBuilding bp2 = new Building(newArray2, generation, possiblePieces);\n\t\t\t\n\t\t\t// mutate the new building sequences\n\t\t\tmutateArray(bp1);\n\t\t\tmutateArray(bp2);\n\t\t\t\n\t\t\t// add them into the population\n\t\t\tpopulation.add(randIndex1, bp1);\n\t\t\tpopulation.add(randIndex2, bp2);\n\t\t}\n\t}", "public void initialiseNewRandomPopulation(Random rnd) {\n\t\tthis.population = new ArrayList<Individual>();\n\t\tfor (int i = 0; i < this.popSize; i++) {\t\t\t\t\t//FOR ALL DESIRED POPULATION SIZE\n\t\t\tdouble[] randomValues = new double[DIMENSIONS];\t\t\t//INITIATE RANDOM X ARRAY WITH CORRECT DIMENSIONS\n\t\t\tfor (int j = 0; j < DIMENSIONS; j++) {\t\t\t\t\t//CREATE RANDOM X VALUES\n\t\t\t\trandomValues[j] = -5 + rnd.nextDouble() * 10;\t\t//ASSIGN VALUES TO EACH POSITION IN ARRAY\n\t\t\t}\n\t\t\tIndividual newInd = new Individual(randomValues);\t\t//CREATE NEW INDIVIDUAL WITH RANDOM X VALUES\n\t\t\tthis.population.add(newInd);\t\t\t\t\t\t\t//ADD INDIVIDUAL TO POPULATION\n\t\t}\n\t}", "private static List<Cell> initiatePopulation(int required_population_size)\n {\n List<Cell> population = new ArrayList<Cell>(); //Define an arraylist to hold the initial population of cells\n int[][][] diploid_genome = newEmptyDeploidGenome();\n int cell_generation = newest_generation + 1, last_div = -1;\n \n //Set the label status of all DNA strands in the genome to unlabelled\n for(int chromosome_count = 0; chromosome_count < diploid_genome.length; chromosome_count++)\n {\n for(int homologous_pair_count= 0; homologous_pair_count < diploid_genome[chromosome_count].length; homologous_pair_count++)\n {\n for(int dna_strand_count = 0; dna_strand_count < diploid_genome[chromosome_count][homologous_pair_count].length; dna_strand_count++)\n {\n diploid_genome[chromosome_count][homologous_pair_count][dna_strand_count] = STRAND_UNLABELLED; //Set each DNA strand to unlabelled\n }\n }\n }\n \n // !****!Create the starting population of cells, all as generation 0!****!\n for (int counter = 0; counter < required_population_size; counter++)\n {\n int cell_id = counter;\n population.add(new Cell(cell_id, cell_generation, last_div, CAN_DIVIDE, diploid_genome)); // Create a new Cell object with the following values.\n id_of_last_created_cell = cell_id; // Track the id of the last created cell\n }// for\n newest_generation++;\n return population;\n }", "public static void main(String[] args) {\n City city = new City(60, 200);\n\n City city2 = new City(180, 200);\n\n City city3 = new City(80, 180);\n City city4 = new City(140, 180);\n\n City city5 = new City(20, 160);\n\n City city6 = new City(100, 160);\n\n City city7 = new City(200, 160);\n\n City city8 = new City(140, 140);\n\n City city9 = new City(40, 120);\n\n City city10 = new City(100, 120);\n\n City city11 = new City(180, 100);\n\n City city12 = new City(60, 80);\n\n City city13 = new City(120, 80);\n City city14 = new City(180, 60);\n City city15 = new City(20, 40);\n\n City city16 = new City(100, 40);\n\n City city17 = new City(200, 40);\n City city18 = new City(20, 20);\n\n City city19 = new City(60, 20);\n City city20 = new City(160, 20);\n List<City> list=new ArrayList<City>();\n list.add(city);list.add(city2);\n list.add(city3);\n list.add(city4);\n list.add(city5);\n list.add(city6);\n list.add(city7);\n list.add(city8);\n list.add(city9);\n list.add(city10);\n list.add(city11);\n list.add(city12);\n list.add(city13);\n list.add(city14);\n list.add(city15);\n list.add(city16);\n list.add(city17);\n list.add(city18);\n list.add(city19);\n list.add(city20);\n\n // Initialize population\n Population pop = new Population(100, true,list);\n System.out.println(\"Initial distance: \" + pop.getBestTour().getDistance());\n\n // Evolve population for 100 generations\n pop = Ga.evolvePopulation(pop);\n for (int i = 0; i < 500; i++) {\n pop = Ga.evolvePopulation(pop);\n System.out.println(\"第\"+i+\"代\"+pop.getBestTour().getDistance());\n }\n\n // Print final results\n System.out.println(\"Finished\");\n System.out.println(\"Final distance: \" + pop.getBestTour().getDistance());\n System.out.println(\"Solution:\");\n System.out.println(pop.getBestTour());\n }", "private void initializePopulation() {\n // reset the population\n population = new ArrayList<Genotype>();\n\n // set the population to an array of random genotypes\n for (int i = 0; i < populationSize; i++) {\n population.add(new Genotype(chromosomeSize));\n }\n\n // evaluate the population\n // evaluatePopulation();\n }", "public void generate() {\n\t\tint randNum;\n\n\t\t// Generates variables.\n\t\tfor (int i = 0; i < variables.length; i++) {\n\t\t\trandNum = rand.nextInt(9) + 1;\n\t\t\twhile (!checkDuplicate(variables, i, randNum)) {\n\t\t\t\trandNum = rand.nextInt(9) + 1;\n\t\t\t}\n\t\t\tvariables[i] = randNum;\n\t\t}\n\n\t\t// Example sudoku.\n\t\trandNum = rand.nextInt(3) + 1;\n\t\tswitch (randNum) {\n\t\tcase 1:\n\t\t\tint[][] array1 = { { 4, 7, 1, 3, 2, 8, 5, 9, 6 },\n\t\t\t\t\t{ 6, 3, 9, 5, 1, 4, 7, 8, 2 },\n\t\t\t\t\t{ 5, 2, 8, 6, 7, 9, 1, 3, 4 },\n\t\t\t\t\t{ 1, 4, 2, 9, 6, 7, 3, 5, 8 },\n\t\t\t\t\t{ 8, 9, 7, 2, 5, 3, 4, 6, 1 },\n\t\t\t\t\t{ 3, 6, 5, 4, 8, 1, 2, 7, 9 },\n\t\t\t\t\t{ 9, 5, 6, 1, 3, 2, 8, 4, 7 },\n\t\t\t\t\t{ 2, 8, 4, 7, 9, 5, 6, 1, 3 },\n\t\t\t\t\t{ 7, 1, 3, 8, 4, 6, 9, 2, 5 } };\n\t\t\tcopy(array1, answer); // Copies example to answer.\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tint[][] array2 = { { 8, 3, 5, 4, 1, 6, 9, 2, 7 },\n\t\t\t\t\t{ 2, 9, 6, 8, 5, 7, 4, 3, 1 },\n\t\t\t\t\t{ 4, 1, 7, 2, 9, 3, 6, 5, 8 },\n\t\t\t\t\t{ 5, 6, 9, 1, 3, 4, 7, 8, 2 },\n\t\t\t\t\t{ 1, 2, 3, 6, 7, 8, 5, 4, 9 },\n\t\t\t\t\t{ 7, 4, 8, 5, 2, 9, 1, 6, 3 },\n\t\t\t\t\t{ 6, 5, 2, 7, 8, 1, 3, 9, 4 },\n\t\t\t\t\t{ 9, 8, 1, 3, 4, 5, 2, 7, 6 },\n\t\t\t\t\t{ 3, 7, 4, 9, 6, 2, 8, 1, 5 } };\n\t\t\tcopy(array2, answer);\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tint[][] array3 = { { 5, 3, 4, 6, 7, 8, 9, 1, 2 },\n\t\t\t\t\t{ 6, 7, 2, 1, 9, 5, 3, 4, 8 },\n\t\t\t\t\t{ 1, 9, 8, 3, 4, 2, 5, 6, 7 },\n\t\t\t\t\t{ 8, 5, 9, 7, 6, 1, 4, 2, 3 },\n\t\t\t\t\t{ 4, 2, 6, 8, 5, 3, 7, 9, 1 },\n\t\t\t\t\t{ 7, 1, 3, 9, 2, 4, 8, 5, 6 },\n\t\t\t\t\t{ 9, 6, 1, 5, 3, 7, 2, 8, 4 },\n\t\t\t\t\t{ 2, 8, 7, 4, 1, 9, 6, 3, 5 },\n\t\t\t\t\t{ 3, 4, 5, 2, 8, 6, 1, 7, 9 } };\n\t\t\tcopy(array3, answer);\n\t\t\tbreak;\n\t\t}\n\n\t\treplace(answer); // Randomize once more.\n\t\tcopy(answer, problem); // Copies answer to problem.\n\t\tgenProb(); // Generates problem.\n\n\t\tshuffle();\n\t\tcopy(problem, player); // Copies problem to player.\n\n\t\t// Checking for shuffled problem\n\t\tcopy(problem, comp);\n\n\t\tif (!solve(0, 0, 0, comp)) {\n\t\t\tgenerate();\n\t\t}\n\t\tif (!unique()) {\n\t\t\tgenerate();\n\t\t}\n\t}", "private int[][] generateInitialPopulation(int binCt, int binSize, int pkgCt, int populationSize) {\n\t\tint[][] population = new int[populationSize][pkgCt];\n\t\tfor (int i = 0; i < populationSize; i++) {\n\t\t\tfor (int j = 0; j < pkgCt; j++) {\n\t\t\t\tpopulation[i][j] = rand.nextInt(binCt);\n\t\t\t}\n\t\t}\n\t\treturn population;\n\t}", "public void generateNextGeneration() {\n int neighbours;\n int minimum = Integer.parseInt(PreferencesActivity\n .getMinimumVariable(this._context));\n int maximum = Integer.parseInt(PreferencesActivity\n .getMaximumVariable(this._context));\n int spawn = Integer.parseInt(PreferencesActivity\n .getSpawnVariable(this._context));\n\n minimum = 2;\n maximum = 3;\n spawn = 3;\n\n int[][] nextGenerationLifeGrid = new int[HEIGHT][WIDTH];\n\n\n\n for (int h = 0; h < HEIGHT; h++) {\n for (int w = 0; w < WIDTH; w++) {\n neighbours = calculateNeighbours(h, w);\n\n\n if (_lifeGrid[h][w] != 0) {\n if ((neighbours >= minimum) && (neighbours <= maximum)) {\n nextGenerationLifeGrid[h][w] = neighbours;\n }\n\n } else {\n if (neighbours == spawn) {\n nextGenerationLifeGrid[h][w] = spawn;\n\n }\n }\n\n }\n\n }\n\n copyGrid(nextGenerationLifeGrid, _lifeGrid);\n\n }", "SolutionPopulation initialise(ArrayList<City> cities, int populationSize);", "protected Population(Infrastructure infra)\n\t\t{\tinds = new Individual[NUMBER_INDIVIDUALS];\n\t\t\tfor(int i=0;i<NUMBER_INDIVIDUALS;i++)\n\t\t\t\tinds[i] = new Individual(infra);\n\t\t\tthis_ind = 0;\n\t\t\tthis_gen = 0;\n\t\t}", "public static void generateDefaults() {\n Building temp = BuildingList.getBuilding(0);\n SubAreas temp2 = temp.getSubArea(1);\n temp2.createFireSensor();\n temp2.createMotionSensor();\n temp2 = temp.getSubArea(2);\n temp2.createMotionSensor();\n temp2 = temp.getSubArea(3);\n temp2.createMotionSensor();\n temp2.createFireSensor();\n temp2 = temp.getSubArea(5);\n temp2.createFireSensor();\n temp2 = temp.getSubArea(6);\n temp2.createFireSensor();\n temp2.createMotionSensor();\n }", "public abstract int getPopulation(int west, int south, int east, int north);", "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 generateRandomMap() {\n\n\t}", "private void generateData(){\n generateP50boys();\n generateP50girls();\n generateP97boys();\n generateP97girls();\n }", "protected void generateAndSavePopulation(Scenario sc) {\n\t\tGripsConfigModule gcm = getGripsConfig(sc.getConfig());\n\t\tString gripsPopulationFile = gcm.getPopulationFileName();\n\t\tnew PopulationFromESRIShapeFileGenerator(sc, gripsPopulationFile,\n\t\t\t\tthis.safeLinkId).run();\n\n\t\tString outputPopulationFile = gcm.getOutputDir() + \"/population.xml.gz\";\n\t\tnew PopulationWriter(sc.getPopulation(), sc.getNetwork(),\n\t\t\t\tgcm.getSampleSize()).write(outputPopulationFile);\n\t\tsc.getConfig().plans().setInputFile(outputPopulationFile);\n\n\t\tsc.getConfig().qsim().setStorageCapFactor(gcm.getSampleSize());\n\t\tsc.getConfig().qsim().setFlowCapFactor(gcm.getSampleSize());\n\n\t\tActivityParams pre = new ActivityParams(\"pre-evac\");\n\t\tpre.setTypicalDuration(49); // needs to be geq 49, otherwise when\n\t\t\t\t\t\t\t\t\t// running a simulation one gets\n\t\t\t\t\t\t\t\t\t// \"java.lang.RuntimeException: zeroUtilityDuration of type pre-evac must be greater than 0.0. Did you forget to specify the typicalDuration?\"\n\t\t// the reason is the double precision. see also comment in\n\t\t// ActivityUtilityParameters.java (gl)\n\t\tpre.setMinimalDuration(49);\n\t\tpre.setClosingTime(49);\n\t\tpre.setEarliestEndTime(49);\n\t\tpre.setLatestStartTime(49);\n\t\tpre.setOpeningTime(49);\n\n\t\tActivityParams post = new ActivityParams(\"post-evac\");\n\t\tpost.setTypicalDuration(49); // dito\n\t\tpost.setMinimalDuration(49);\n\t\tpost.setClosingTime(49);\n\t\tpost.setEarliestEndTime(49);\n\t\tpost.setLatestStartTime(49);\n\t\tpost.setOpeningTime(49);\n\t\tsc.getConfig().planCalcScore().addActivityParams(pre);\n\t\tsc.getConfig().planCalcScore().addActivityParams(post);\n\n\t\tsc.getConfig().planCalcScore().setLateArrival_utils_hr(0.);\n\t\tsc.getConfig().planCalcScore().setPerforming_utils_hr(0.);\n\n\t\t// matsimScenario.getConfig().planCalcScore().addParam(\"activityPriority_0\", \"1\");\n\t\t// matsimScenario.getConfig().planCalcScore().addParam(\"activityTypicalDuration_0\",\n\t\t// \"00:00:49\");\n\t\t// matsimScenario.getConfig().planCalcScore().addParam(\"activityMinimalDuration_0\",\n\t\t// \"00:00:49\");\n\t\t// matsimScenario.getConfig().planCalcScore().addParam(\"activityPriority_1\", \"1\");\n\t\t// matsimScenario.getConfig().planCalcScore().addParam(\"activityTypicalDuration_1\",\n\t\t// \"00:00:49\");\n\t\t// matsimScenario.getConfig().planCalcScore().addParam(\"activityMinimalDuration_1\",\n\t\t// \"00:00:49\");\n\n\t}", "public ArrayList<Population> InitializePopulations (int NumberOfPopulations, int NumberOfAgents){\n \n ArrayList<Population> PopulationsList = new ArrayList();\n \n if(NumberOfPopulations == 1){\n \n PopulationsList.add(InitSinglePopulation(NumberOfAgents));\n \n }else{\n \n for(int i = 0; i < NumberOfPopulations; i++){ \n double temp = rand.nextDouble();\n PopulationsList.add(InitSinglePopulation(i, NumberOfAgents, temp));\n }\n \n }\n \n \n return PopulationsList;\n }", "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 void reproduce(int generation, IPopulation pop, List<ISpecies> sorted_species) {\n\t\tfor(ISpecies specie : sorted_species){\r\n\r\n\t\t\tList<IOrganism> organisms = specie.getOrganisms();\r\n\r\n\t\t\t// outside the species\r\n\t\t\tint orgnum = 0;\r\n\r\n\t\t\tIOrganism mom = null;\r\n\t\t\tIOrganism baby = null;\r\n\t\t\tIGenome new_genome = null;\r\n\t\t\tIOrganism _organism = null;\r\n\t\t\tIOrganism _dad = null;\r\n\r\n\t\t\tif (specie.getExpectedOffspring() > 0 && organisms.size() == 0)\r\n\t\t\t\treturn;\r\n\r\n\t\t\t// elements for this species\r\n\t\t\tint poolsize = organisms.size() - 1;\r\n\r\n\t\t\t// the champion of the 'this' species is the first element of the species;\r\n\t\t\tIOrganism thechamp = organisms.get(0);\r\n\t\t\tboolean champ_done = false; // Flag the preservation of the champion\r\n\r\n\t\t\t// Create the designated number of offspring for the Species one at a time.\r\n\t\t\tfor (int count = 0; count < specie.getExpectedOffspring(); count++) {\r\n\r\n\t\t\t\t// If we have a super_champ (Population champion), finish off some special clones.\r\n\t\t\t\tif (thechamp.getSuperChampOffspring() > 0) {\r\n\r\n\t\t\t\t\t// save in mom current champ;\r\n\t\t\t\t\tmom = thechamp;\r\n\t\t\t\t\t// create a new genome from this copy\r\n\t\t\t\t\tnew_genome = mom.getGenome().duplicate(count);\r\n\t\t\t\t\tif ((thechamp.getSuperChampOffspring()) > 1) {\r\n\t\t\t\t\t\tif (RandomUtils.randomDouble() < .8 || evolutionParameters.getDoubleParameter(MUTATE_ADD_LINK_PROB) == 0.0)\r\n\t\t\t\t\t\t\tevolutionStrategy.getMutationStrategy().mutateLinkWeight(new_genome, evolutionParameters.getDoubleParameter(WEIGHT_MUT_POWER), 1.0, MutationType.GAUSSIAN);\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t// Sometimes we add a link to a superchamp\r\n\t\t\t\t\t\t\tnew_genome.generatePhenotype(generation);\r\n\t\t\t\t\t\t\tevolutionStrategy.getMutationStrategy().mutateAddLink(new_genome,pop);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbaby = FeatFactory.newOrganism(0.0, new_genome, generation);\r\n\t\t\t\t\tthechamp.incrementSuperChampOffspring();\r\n\t\t\t\t} // end population champ\r\n\r\n\t\t\t\t// If we have a Species champion, just clone it\r\n\t\t\t\telse if ((!champ_done) && (specie.getExpectedOffspring() > 5)) {\r\n\t\t\t\t\tmom = thechamp; // Mom is the champ\r\n\t\t\t\t\tnew_genome = mom.getGenome().duplicate(count);\r\n\t\t\t\t\tbaby = FeatFactory.newOrganism(0.0, new_genome, generation); // Baby is\r\n\t\t\t\t\t// just like mommy\r\n\t\t\t\t\tchamp_done = true;\r\n\r\n\t\t\t\t} else if (RandomUtils.randomDouble() < evolutionParameters.getDoubleParameter(MUTATE_ONLY_PROB) || poolsize == 1) {\r\n\r\n\t\t\t\t\t// Choose the random parent\r\n\t\t\t\t\torgnum = RandomUtils.randomInt(0, poolsize);\r\n\t\t\t\t\t_organism = organisms.get(orgnum);\r\n\t\t\t\t\tmom = _organism;\r\n\t\t\t\t\tnew_genome = mom.getGenome().duplicate(count);\r\n\r\n\t\t\t\t\t// Do the mutation depending on probabilities of various mutations\r\n\t\t\t\t\tevolutionStrategy.getMutationStrategy().mutate(new_genome,pop,generation);\r\n\r\n\t\t\t\t\tbaby = FeatFactory.newOrganism(0.0, new_genome, generation);\r\n\t\t\t\t}\r\n\t\t\t\t// Otherwise we should mate\r\n\t\t\t\telse {\r\n\t\t\t\t\t// Choose the random mom\r\n\t\t\t\t\torgnum = RandomUtils.randomInt(0, poolsize);\r\n\t\t\t\t\t_organism = organisms.get(orgnum);\r\n\r\n\t\t\t\t\t// save in mom\r\n\t\t\t\t\tmom = _organism;\r\n\t\t\t\t\t// Choose random dad...\r\n\t\t\t\t\t// Mate within Species\r\n\t\t\t\t\tif (RandomUtils.randomDouble() > evolutionParameters.getDoubleParameter(INTERSPECIES_MATE_RATE)) {\r\n\t\t\t\t\t\torgnum = RandomUtils.randomInt(0, poolsize);\r\n\t\t\t\t\t\t_organism = organisms.get(orgnum);\r\n\t\t\t\t\t\t_dad = _organism;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Mate outside Species\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t// save current species\r\n\t\t\t\t\t\tISpecies randspecies = specie;\r\n\t\t\t\t\t\t// Select a random species\r\n\t\t\t\t\t\tint giveup = 0;\r\n\t\t\t\t\t\t// Give up if you can't find a different Species\r\n\t\t\t\t\t\twhile ((randspecies == specie) && (giveup < 5)) {\r\n\r\n\t\t\t\t\t\t\t// Choose a random species tending towards better species\r\n\t\t\t\t\t\t\tdouble randmult = Math.min(1.0, RandomUtils.randomGaussian() / 4);\r\n\r\n\t\t\t\t\t\t\t// This tends to select better species\r\n\t\t\t\t\t\t\tint sp_ext = Math.max(0, (int) Math.floor((randmult * (sorted_species.size() - 1.0)) + 0.5));\r\n\t\t\t\t\t\t\trandspecies = sorted_species.get(sp_ext);\r\n\t\t\t\t\t\t\t++giveup;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t_dad = randspecies.getOrganisms().get(0);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tnew_genome = evolutionStrategy.getCrossoverStrategy().performCrossover(mom,_dad,count);\r\n\r\n\t\t\t\t\t// Determine whether to mutate the baby's Genome\r\n\t\t\t\t\t// This is done randomly or if the mom and dad are the same organism\r\n\t\t\t\t\tif (RandomUtils.randomDouble() > evolutionParameters.getDoubleParameter(MATE_ONLY_PROB) || \r\n\t\t\t\t\t\t\t_dad.getGenome().getId() == mom.getGenome().getId() || \r\n\t\t\t\t\t\t\t_dad.getGenome().compatibility(mom.getGenome()) == 0.0) {\r\n\r\n\t\t\t\t\t\tevolutionStrategy.getMutationStrategy().mutate(new_genome,pop,generation);\r\n\t\t\t\t\t\tbaby = FeatFactory.newOrganism(0.0, new_genome, generation);\r\n\t\t\t\t\t} \r\n\t\t\t\t\t// end block of prob\r\n\t\t\t\t\t// Determine whether to mutate the baby's Genome\r\n\t\t\t\t\t// This is done randomly or if the mom and dad are the same organism\r\n\r\n\t\t\t\t\t// Create the baby without mutating first\r\n\t\t\t\t\telse \r\n\t\t\t\t\t\tbaby = FeatFactory.newOrganism(0.0, new_genome, generation);\r\n\t\t\t\t}\r\n\t\t\t\tevolutionStrategy.getSpeciationStrategy().addOrganismToSpecies(pop, baby);\r\n\t\t\t} // end offspring cycle\r\n\t\t}\r\n\t}", "private static void generateHypotheses(Function function, Variable inductionVar, EquationSystem system, List<Term> newConstants, List<Equation> hypotheses) {\n int count = 1;\n\n // Add hypotheses\n for (Sort s : function.getInputSorts()) {\n Function cnst = new Function(s, constantName + count);\n system.getSigma().add(cnst);\n\n for (Function f : system.getSigma()) {\n if (f.equals(cnst)) {\n Logger.e(\"Fresh constant \" + cnst.toString() + \" already exists, possibly introduces errors\");\n }\n }\n\n FunctionTerm a = new FunctionTerm(cnst, new ArrayList<>());\n newConstants.add(a);\n\n if (s == function.getOutputSort()) {\n Equation hypothesis = system.getGoal().substitute(inductionVar, a);\n hypotheses.add(hypothesis);\n }\n count++;\n }\n }", "Chromosome from(List<Chromosome> population);", "public void generatePopulation(String filePathAndName) {\n\t\t\n\t\tList<String> dataAll = SU.readFile(filePathAndName);\n\t\tList<String> dataAgents = new ArrayList<String>();\n\t\tList<String> dataStock = new ArrayList<String>();\n\t\tList<String> dataRelations = new ArrayList<String>();\n\t\t\n\t\tint typeOfData = -1;\n\t\tfor (String datum : dataAll) {\n\t\t\tif (!datum.startsWith(\"%\")) {\n\t\t\t\tswitch(typeOfData) {\n\t\t\t\tcase 0:\tdataAgents.add(datum); break;\n\t\t\t\tcase 1: dataStock.add(datum); break;\n\t\t\t\tcase 2: dataRelations.add(datum); break;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttypeOfData = Integer.parseInt(datum.substring(1,2));\n\t\t\t}\n\t\t}\n\t\t\n\t\tgenerateAgents(dataAgents);\n\t\tgenerateStock(dataStock);\n\t\tgenerateRelations(dataRelations);\n\t\t\n\t\tSU.getDataCollector().addAllCurrentStock();\n\t}", "private void generate()\r\n {\r\n mapPieces = myMap.Generate3();\r\n mapWidth = myMap.getMapWidth();\r\n mapHeight = myMap.getMapHeight();\r\n }", "public Population InitSinglePopulation(int NumberOfAgents) {\n \n SinglePopulation TempPopulation = new SinglePopulation();\n \n TempPopulation.setPopulationID(0);\n\n for(int j = 0; j < NumberOfAgents; j++){\n\n SinglePopulationAgent TempAgentS = new SinglePopulationAgent(j,rand.nextDouble());\n boolean InitAction = (rand.nextDouble() < TempAgentS.getStrategy()) ? true : false;\n TempAgentS.setAction(InitAction);\n \n TempPopulation.AgentList.add(TempAgentS);\n }\n \n TempPopulation.setStrategyList();\n TempPopulation.setActionList();\n return TempPopulation;\n }", "public void generateIndividual() {\n // Loop through all our destination cities and add them to our tour\n for (int cityIndex = 0; cityIndex < TourManager.numberOfCities(); cityIndex++) {\n setCity(cityIndex, TourManager.getCity(cityIndex));\n }\n // Randomly reorder the tour\n Collections.shuffle(tour);\n }", "private static ArrayList<Chromosome> generatePopulation(ArrayList<City> cities, int pathLength, int populationSize) {\n // generating part of the initial population using a Nearest Neighbour Algorithm\n int nnPopulationSize = (int) (0.1*populationSize);\n // if the required number of chromosomes to be generated by the NN Algorithm is greater then the number of cities\n // then set the required number of chromosomes to the number of cities\n if (nnPopulationSize > cities.size()) {\n nnPopulationSize = cities.size();\n }\n ArrayList<Chromosome> nnPopulation = generateNearestNeighbourPopulation(pathLength, nnPopulationSize);\n\n // generating the rest of the initial population randomly\n int randomPopulationSize = populationSize - nnPopulationSize;\n ArrayList<Chromosome> randomPopulation = new ArrayList<>();\n randomPopulation.addAll( generateRandomPopulation(pathLength, randomPopulationSize) );\n\n // Combining the 2 parts of the population into one initial population\n ArrayList<Chromosome> population = new ArrayList<>();\n population.addAll(nnPopulation);\n population.addAll(randomPopulation);\n\n return population;\n }", "private void generateVariablesAndConstraints() {\n\t\tVariable norwegian=new Variable(generateDomain(), \"norwegian\");\n\t\tVariable english=new Variable(generateDomain(), \"english\");\n\t\tVariable dane=new Variable(generateDomain(), \"dane\");\n\t\tVariable german=new Variable(generateDomain(), \"german\");\n\t\tVariable swede=new Variable(generateDomain(), \"swede\");\n\t\t//colors: \"red\", \"green\", \"white\", \"yellow\", \"blue\"\n\t\tVariable red=new Variable(generateDomain(), \"red\");\n\t\tVariable green=new Variable(generateDomain(), \"green\");\n\t\tVariable white=new Variable(generateDomain(), \"white\");\n\t\tVariable yellow=new Variable(generateDomain(), \"yellow\");\n\t\tVariable blue=new Variable(generateDomain(), \"blue\");\n\t\t//tobaccos: \"light\", \"cigar\", \"pipe\", \"unfiltered\", \"menthol\"\n\t\tVariable light=new Variable(generateDomain(), \"light\");\n\t\tVariable cigar=new Variable(generateDomain(), \"cigar\");\n\t\tVariable pipe=new Variable(generateDomain(), \"pipe\");\n\t\tVariable unfiltered=new Variable(generateDomain(), \"unfiltered\");\n\t\tVariable menthol=new Variable(generateDomain(), \"menthol\");\n\t\t//drinks: \"tea\", \"milk\", \"water\", \"beer\", \"coffee\"\n\t\tVariable tea=new Variable(generateDomain(), \"tea\");\n\t\tVariable milk=new Variable(generateDomain(), \"milk\");\n\t\tVariable water=new Variable(generateDomain(), \"water\");\n\t\tVariable beer=new Variable(generateDomain(), \"beer\");\n\t\tVariable coffee=new Variable(generateDomain(), \"coffee\");\n\t\t//pets: \"fish\", \"cat\", \"bird\", \"dog\", \"horse\"\n\t\tVariable fish=new Variable(generateDomain(), \"fish\");\n\t\tVariable cat=new Variable(generateDomain(), \"cat\");\n\t\tVariable bird=new Variable(generateDomain(), \"bird\");\n\t\tVariable dog=new Variable(generateDomain(), \"dog\");\n\t\tVariable horse=new Variable(generateDomain(), \"horse\");\n\t\t\n\t\tvariables= new ArrayList<Variable>(Arrays.asList(norwegian, english, dane, german, swede,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tred, green, white, yellow, blue,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlight, cigar, pipe, unfiltered, menthol,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttea, milk, water, beer, coffee,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfish, cat, bird, dog, horse));\n\t\t\n\t\tconstraints=new ArrayList<Constraint>();\n\t\tconstraints.addAll((new allDifferent(new ArrayList<Variable>(Arrays.asList(norwegian, english, dane, german, swede))).toneq()));\n\t\tconstraints.addAll((new allDifferent(new ArrayList<Variable>(Arrays.asList(red, green, white, yellow, blue))).toneq()));\n\t\tconstraints.addAll((new allDifferent(new ArrayList<Variable>(Arrays.asList(light, cigar, pipe, unfiltered, menthol))).toneq()));\n\t\tconstraints.addAll((new allDifferent(new ArrayList<Variable>(Arrays.asList(tea, milk, water, beer, coffee))).toneq()));\n\t\tconstraints.addAll((new allDifferent(new ArrayList<Variable>(Arrays.asList(fish, cat, bird, dog, horse))).toneq()));\n\t\tconstraints.add(new equnary(norwegian, 1)); //Norweg zamieszkuje pierwszy dom\n\t\tconstraints.add(new eq(english, red));//Anglik mieszka w czerwonym domu.\n\t\tconstraints.add(new lt(green, white));//Zielony dom znajduje się bezpośrednio po lewej stronie domu białego.\n\t\tconstraints.add(new eq(dane, tea));//Duńczyk pija herbatkę.\n\t\tconstraints.add(new nextto(light, cat));//Palacz papierosów light mieszka obok hodowcy kotów.\n\t\tconstraints.add(new eq(yellow, cigar));//Mieszkaniec żółtego domu pali cygara.\n\t\tconstraints.add(new eq(german, pipe));//Niemiec pali fajkę.\n\t\tconstraints.add(new equnary(milk, 3));//Mieszkaniec środkowego domu pija mleko.\n\t\tconstraints.add(new nextto(light, water));//Palacz papierosów light ma sąsiada, który pija wodę.\n\t\tconstraints.add(new eq(unfiltered, bird));//Palacz papierosów bez filtra hoduje ptaki.\n\t\tconstraints.add(new eq(swede, dog));//Szwed hoduje psy.\n\t\tconstraints.add(new nextto(norwegian, blue));//Norweg mieszka obok niebieskiego domu.\n\t\tconstraints.add(new nextto(horse, yellow));//Hodowca koni mieszka obok żółtego domu.\n\t\tconstraints.add(new eq(menthol, beer));//Palacz mentolowych pija piwo.\n\t\tconstraints.add(new eq(green, coffee));//W zielonym domu pija się kawę\n\t}", "public void generateRandomVaraibles() {\r\n\r\n\t\tfor (DataVariable var : dataTestModel) {\r\n\t\t\tif (!var.getType().equals(\"LOCAL_DATA\") && !var.getType().equals(\"OUTPUT_DATA\")) {\r\n\t\t\t\tif (var.getType().equals(\"boolean\") || var.getType().equals(\"Boolean\")) {\r\n\t\t\t\t\tvar.setValue(String.valueOf(getRandomBoolean()));\r\n\r\n\t\t\t\t} else if (var.getType().equals(\"int\")) {\r\n\t\t\t\t\tif (var.getMinimumValue() != null && var.getMinimumValue().length() > 0\r\n\t\t\t\t\t\t\t&& var.getMaximumValue() != null && var.getMaximumValue().length() > 0) {\r\n\t\t\t\t\t\tvar.setValue(String.valueOf(randomInt(Integer.parseInt(var.getMinimumValue()),\r\n\t\t\t\t\t\t\t\tInteger.parseInt(var.getMaximumValue()))));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar.setValue(String.valueOf(randomInt(0, 100)));\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (var.getType().equals(\"double\")) {\r\n\t\t\t\t\tif (var.getMinimumValue() != null && var.getMinimumValue().length() > 0\r\n\t\t\t\t\t\t\t&& var.getMaximumValue() != null && var.getMaximumValue().length() > 0) {\r\n\t\t\t\t\t\tvar.setValue(String.valueOf(randomDouple(Double.parseDouble(var.getMinimumValue()),\r\n\t\t\t\t\t\t\t\tDouble.parseDouble(var.getMaximumValue()))));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar.setValue(String.valueOf(randomDouple(0.0, 100.0)));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}", "Values createValues();", "private void generateParameterValues()\n\t{\n\t\t/*\n\t\t * Initialize variables for storage of the actual parameter data and prepare the histogram bins aggregating them. \n\t\t */\n\t\t\n\t\t// Init storage.\n\t\tparameterValues.clear();\n\t\tparameterValues.put(\"alpha\", new ArrayList<Double>(numberOfDivisions));\n\t\tparameterValues.put(\"eta\", new ArrayList<Double>(numberOfDivisions));\n\t\tparameterValues.put(\"kappa\", new ArrayList<Double>(numberOfDivisions));\n\t\t\n\t\t// Init bins.\n\t\tfinal int numberOfBins \t\t\t\t\t= 50;\n\t\tMap<String, int[]> parameterBinLists\t= new HashMap<String, int[]>();\n\t\tparameterBinLists.put(\"alpha\", new int[numberOfBins]);\n\t\tparameterBinLists.put(\"eta\", new int[numberOfBins]);\n\t\tparameterBinLists.put(\"kappa\", new int[numberOfBins]);\n\t\t\n\t\t// Init random number generator.\n\t\tRandom randomGenerator\t= new Random();\n\t\t\n\t\t/*\n\t\t * Generate numberOfDivisions values for each parameter.\n\t\t */\n\t\t\n\t\tswitch (sampling_combobox.getValue())\n\t\t{\n\t\t\tcase \"Random\":\n\t\t\t\t// Generated values are allowed to be up to rangeSlider.getHighValue() and as low as rangeSlider.getLowValue().\n\t\t\t\tdouble intervalAlpha \t= rangeSliders.get(\"alpha\").getHighValue() - rangeSliders.get(\"alpha\").getLowValue();\n\t\t\t\tdouble intervalEta\t\t= rangeSliders.get(\"eta\").getHighValue() - rangeSliders.get(\"eta\").getLowValue();\n\t\t\t\tdouble intervalKappa\t= rangeSliders.get(\"kappa\").getHighValue() - rangeSliders.get(\"kappa\").getLowValue();\n\t\t\t\t\n\t\t\t\t// Generate random parameter values.\t\t\n\t\t\t\tfor (int i = 0; i < numberOfDivisions; i++) {\n\t\t\t\t\tparameterValues.get(\"alpha\").add(rangeSliders.get(\"alpha\").getLowValue() + randomGenerator.nextFloat() * intervalAlpha);\n\t\t\t\t\tparameterValues.get(\"eta\").add(rangeSliders.get(\"eta\").getLowValue() + randomGenerator.nextFloat() * intervalEta);\n\t\t\t\t\tparameterValues.get(\"kappa\").add(rangeSliders.get(\"kappa\").getLowValue() + randomGenerator.nextFloat() * intervalKappa);\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"Cartesian\":\n\t\t\t\tfor (String param : LDAConfiguration.SUPPORTED_PARAMETERS) {\n\t\t\t\t\tfinal double interval = (rangeSliders.get(param).getHighValue() - rangeSliders.get(param).getLowValue()) / (numberOfDivisions);\n\t\t\t\t\t\n\t\t\t\t\tfor (int i = 0; i < numberOfDivisions; i++) {\n\t\t\t\t\t\tparameterValues.get(param).add(rangeSliders.get(param).getLowValue() + interval * i + interval / 2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"Latin Hypercube\":\n\t\t\t\tfor (String param : LDAConfiguration.SUPPORTED_PARAMETERS) {\n\t\t\t\t\t// Calcualte bin interval.\n\t\t\t\t\tfinal double interval \t\t= (rangeSliders.get(param).getHighValue() - rangeSliders.get(param).getLowValue()) / (numberOfDivisions);\n\n\t\t\t\t\tfor (int i = 0; i < numberOfDivisions; i++) {\n\t\t\t\t\t\t// Minimal value allowed for current bin.\n\t\t\t\t\t\tfinal double currentBinMin = rangeSliders.get(param).getLowValue() + interval * i;\n\t\t\t\t\t\t// Generate value for this bin.\n\t\t\t\t\t\tparameterValues.get(param).add(currentBinMin + randomGenerator.nextFloat() * interval);\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t//\t\t\t\t\tto do:\n\t//\t\t\t\t\t\t- test: check generate.txt.\n\t//\t\t\t\t\t\t- after that: START WRITING PAPER (SATURDAY!).\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\t/*\n\t\t * Bin data for use in histograms/scented widgets.\n\t\t */\n\t\t\n\t\t// Bin data.\n\t\tfor (Map.Entry<String, ArrayList<Double>> entry : parameterValues.entrySet()) {\n\t\t\tdouble binInterval = (rangeSliders.get(entry.getKey()).getMax() - rangeSliders.get(entry.getKey()).getMin()) / numberOfBins;\n\t\t\t\n\t\t\t// Check every value and assign it to the correct bin.\n\t\t\tfor (double value : entry.getValue()) {\n\t\t\t\tint index_key = (int) ( (value - rangeSliders.get(entry.getKey()).getMin()) / binInterval);\n\t\t\t\t// Check if element is highest allowed entry.\n\t\t\t\tindex_key = index_key < numberOfBins ? index_key : numberOfBins - 1;\n\t\t\t\t\n\t\t\t\t// Increment content of corresponding bin.\n\t\t\t\tparameterBinLists.get(entry.getKey())[index_key]++;\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t/*\n\t\t * Transfer data to scented widgets.\n\t\t */\n\t\t\n\t\t// Clear old data.\n\t\talpha_barchart.getData().clear();\n\t\teta_barchart.getData().clear();\n\t\tkappa_barchart.getData().clear();\n\n\t\t// Add data series to barcharts.\n\t\talpha_barchart.getData().add(generateParameterHistogramDataSeries(\"alpha\", parameterBinLists, numberOfBins));\n\t\teta_barchart.getData().add(generateParameterHistogramDataSeries(\"eta\", parameterBinLists, numberOfBins));\n\t\tkappa_barchart.getData().add(generateParameterHistogramDataSeries(\"kappa\", parameterBinLists, numberOfBins));\n\t}", "public Chromosone() {\n Random rand = new Random();\n for(int i=0;i<=75;i++)\n {\n int rnd = rand.nextInt(2);// [1,0...]\n\n Val.add(rnd);\n }\n }", "Multiplication createRandomMultiplication();", "Multiplication createRandomMultiplication();", "public static void genocide() {\n //Assigns fitness levels\n evaluateFitnesses();\n\n //Sorts by fitness\n sortByFitlvl();\n\n //Simple genocide, kills off all until population size.\n for (int i = Population.size() - 1; i >= populationSize; i--) {\n Population.remove(i);\n }\n\n /*\n //Different kind of Genocide, selects organisms based on gaussian distribution\n\n while(Population.size() > populationSize){\n int randomOrganism = (int)(Population.size() - (Population.size()*Utilities.sharpGauss(2)));\n Population.remove(randomOrganism);\n }\n */\n }", "private RandomLocationGen() {}", "public IntegerGenotype create() \r\n\t{\n\t\tIntegerGenotype genotype = new IntegerGenotype(1,3);\r\n\t\tgenotype.init(new Random(), Data.numeroCuardillas); \r\n\t\t\r\n\t\treturn genotype;\r\n\t}", "public static void initializeVariables() {\n // System.out.println(\"initializeVariables()\");\n for (int i = 1; i <= 20; i++) {\n\n\n List<Variable> variablecopies = new LinkedList<Variable>();\n List<Integer> siteList = new LinkedList<Integer>();\n\n Variable var = null;\n if (i % 2 == 0) {\n for (int j = 1; j <= 10; j++) {\n sites.get(j).addVariable(i, 10 * i);\n var = sites.get(j).getVariable(i);\n siteList.add(j);\n variablecopies.add(var);\n }\n } else {\n for (int j = 1; j <= 10; j++) {\n if (j == 1 + i % 10) {\n sites.get(j).addVariable(i, 10 * i);\n var = sites.get(j).getVariable(i);\n variablecopies.add(var);\n siteList.add(j);\n }\n }\n }\n variable_site_map.put(i, siteList);\n variable_copies_map.put(i, variablecopies);\n }\n }", "public void setPoputlation (double population) { n.setPopulation(population); }", "private static Set<Chromosome> generateRandomPopulation(int pathLength, int randomPopulationSize) {\n Set<Chromosome> population = new HashSet<>();\n\n // create an arraylist of CityIDs, and initialise it with the cities in order of their ID\n ArrayList<Integer> basePath = new ArrayList<>();\n for (int i = 0; i < pathLength; i++) {\n basePath.add(i);\n }\n\n // repeat the following for as many chromosomes as are required (populationSize)\n while (population.size() < randomPopulationSize) {\n Chromosome chromosome = new Chromosome(pathLength);\n // randomise the order of the arraylist of cities\n Collections.shuffle(basePath);\n for (int j = 0; j < pathLength; j++) {\n chromosome.path[j] = basePath.get(j);\n }\n population.add(chromosome);\n }\n\n return population;\n }", "public abstract Case[][] generate();", "@Test\n public void genomeInitialises() {\n int inputCount = rng.nextInt(20) + 1;\n int outputCount = rng.nextInt(20) + 1;\n\n Population population = new Population(0, inputCount, outputCount, new BlankState());\n\n Genome genome = new Genome(inputCount, outputCount, blankState, population);\n\n int connectionGeneLength = inputCount * outputCount;\n\n for (int i = 0; i < connectionGeneLength; i++) {\n Connection connection = genome.getConnection(i);\n NodeType in = genome.getNode(connection.getIn());\n NodeType out = genome.getNode(connection.getOut());\n\n assertNotNull(connection);\n assertNotNull(in);\n assertNotNull(out);\n assertEquals(NodeType.INPUT, in);\n assertEquals(NodeType.OUTPUT, out);\n assertTrue(genome.containsNode(in, connection.getIn()));\n assertTrue(genome.containsNode(out, connection.getOut()));\n }\n }", "public static void makeGrid (Species map[][], int numSheepStart, int numWolfStart, int numPlantStart, int sheepHealth, int plantHealth, int wolfHealth, int plantSpawnRate) {\n \n // Declare coordinates to randomly spawn species\n int y = 0;\n int x = 0;\n \n // Initialise plants\n Plant plant;\n \n // Spawn plants\n for (int i = 0; i < numPlantStart; i++) {\n \n // Choose random coordinates to spawn\n y = (int)(Math.random() * map[0].length); \n x = (int)(Math.random() * map.length);\n \n // Checks for an empty space\n if (map[y][x] == null) { \n \n // Choose a random plant (50% chance healthy, 25% poisonous or energizing)\n int plantChoice = (int) Math.ceil(Math.random() * 100);\n \n // Create the new plants\n if ((plantChoice <= 100) && (plantChoice >= 50)) {\n plant = new HealthyPlant(plantHealth, x, y, plantSpawnRate);\n } else if ((plantChoice < 50) && (plantChoice >= 25)) {\n plant = new EnergizingPlant(plantHealth, x, y, plantSpawnRate);\n } else {\n plant = new PoisonousPlant(plantHealth, x, y, plantSpawnRate);\n }\n \n // Set plant coordinates\n plant.setX(x);\n plant.setY(y);\n map[y][x] = plant;\n \n // No space\n } else { \n i -= 1;\n }\n \n }\n \n // Spawn sheep\n for (int i = 0; i < numSheepStart; i++) { \n \n // Choose random coordinates to spawn\n y = (int)(Math.random() * map[0].length); \n x = (int)(Math.random() * map.length);\n \n // Checks for an empty space\n if (map[y][x] == null) {\n \n // Create new sheep\n Sheep sheep = new Sheep(sheepHealth, x, y, 5); \n \n // Set sheep coordinates\n sheep.setX(x);\n sheep.setY(y);\n map[y][x] = sheep;\n \n // No space\n } else { \n i -= 1; \n }\n \n }\n \n // Spawn wolves\n for (int i = 0; i < numWolfStart; i++) { \n \n // Choose random coordinates to spawn\n y = (int)(Math.random() * map[0].length); \n x = (int)(Math.random() * map.length);\n \n // Checks for an empty space\n if (map[y][x] == null) { \n \n // Create new wolf\n Wolf wolf = new Wolf(wolfHealth, x, y, 5); \n \n // Set wolf coordinates\n wolf.setX(x);\n wolf.setY(y);\n map[y][x] = wolf; \n \n // No space\n } else { \n i -= 1; \n }\n }\n \n }", "@Test\n\tpublic void populate_map() {\n\t\t//Arrange\n\t\t//testSteve.populateProductMap();\n\t\t\n\t\t//Act\n\t\ttestSteve.populateProductMap();\n\t\t\n\t\t//Assert\n\t\tAssert.assertEquals(testSteve.getProductGenerator().size(), (16));\n\t}", "private void mutate() {\n\t\tfor (int i = 0; i < population; ++i) {\n\t\t\tpopulationArray.set(i, populationArray.get(i).generateNeighbor());\n\t\t}\n\t}", "public void baiscSetting(){\n generations_ = 0;\n maxGenerations_ = ((Integer) this.getInputParameter(\"maxGenerations\")).intValue();\n populationSize_ = ((Integer) this.getInputParameter(\"populationSize\")).intValue();\n mutation_ = operators_.get(\"mutation\");\n crossover_ = operators_.get(\"crossover\");\n selection_ = operators_.get(\"selection\");\n learning_ = operators_.get(\"learning\");\n\n }", "void permutateObjects()\n {\n for (int i = 0; i < sampleObjects.length; i++)\n {\n for (int i1 = 0; i1 < (r.nextInt() % 7); i1++)\n {\n addToObject(sampleObjects[i], sampleStrings[r.nextInt(5)],\n sampleStrings[r.nextInt(5)]);\n addToObject(sampleObjects[i], sampleStrings[r.nextInt(5)],\n sampleNumbers[r.nextInt(5)]);\n addToObject(sampleObjects[i], sampleStrings[r.nextInt(5)],\n specialValues[r.nextInt(2)]);\n addToObject(sampleObjects[i], sampleStrings[r.nextInt(5)],\n sampleArrays[r.nextInt(5)]);\n }\n }\n }", "private int[] generate(int[] cells) {\n // Placeholder\n int[] newCells = new int[cells.length];\n\n // Boundary-elements, simply ignoring them..\n for (int x = 1; x < cells.length - 1; x++) {\n\n // Neighborhood\n int left = cells[x - 1];\n int mid = cells[x];\n int right = cells[x + 1];\n\n int newState = next(left, mid, right);\n\n newCells[x] = newState;\n }\n\n return newCells;\n }", "public ConstantProduct() {\n constProperty = \"constant\";\n constProperty2 = \"constant2\";\n }", "public void initPopulation() throws JMException, ClassNotFoundException {\n population_ = new SolutionSet[problemSet_.size()];\n for (int i = 0; i < problemSet_.size(); i++){\n population_[i] = new SolutionSet(populationSize_);\n }\n\n for (int j = 0; j < problemSet_.size(); j++){\n for (int i = 0; i < populationSize_; i++) {\n Solution newSolution = new Solution(problemSet_);\n problemSet_.get(j).evaluate(newSolution);\n problemSet_.get(j).evaluateConstraints(newSolution);\n population_[j].add(newSolution);\n } // for\n }\n\n }", "protected void initializePopulation () {\n\t\tfor (int i = 0; i < this.speciesSize; i++) {\n\t\t\tthis.detectors.add(DetectorFactory.makeDetector(this.featuresLength, this.typeBias, this.generalityBias));\n\t\t}\n\t}", "private List<Individual> createBadIndividuals(int generationSize) {\n\t\tIndividualFactory factory = new ArcherFactory();\n\t\tList<Individual> list = new ArrayList<Individual>();\n\t\tfor (int i = 0; i < generationSize; i++) {\n\t\t\tlist.add(factory.createIndividual(getBadCombination()));\n\t\t}\n\t\treturn list;\n\t}", "GuppySet(int numberOfGuppies, int minAge, int maxAge,\n double minHealthCoefficient, double maxHealthCoefficient) {\n this.numberOfGuppies = numberOfGuppies;\n this.minAge = minAge;\n this.maxAge = maxAge;\n this.minHealthCoefficient = minHealthCoefficient;\n this.maxHealthCoefficient = maxHealthCoefficient;\n }", "public void setNextGeneration() {\n // create a temporary population\n ArrayList<Genotype> tempPopulation = new ArrayList<Genotype>();\n\n // select mates\n while (tempPopulation.size() < populationSize) {\n tempPopulation.add(Genotype.Mate(rouletteSelection(),\n rouletteSelection(), crossoverProbability));\n }\n }", "public void createSelectedPopulation(Population previousPopulation, int populationSize, double perc) {\n\t\t\n\t\tint intendedSize = (int)(populationSize * perc/100);\n\t\tSystem.out.println(\"intended size: \" + intendedSize ) ;\n\t\tint currentSize = 0;\n\t\tint randomPopulationSize;\n\t\tSolution mutant;\n\t\tList<ArrayList<String>> added = new ArrayList<ArrayList<String>>();\n\n\t\t\n\t\t//copy solutions from the previous population until the cloning factor is bigger than 1\n\t\tfor(Solution solution : previousPopulation.getPopulation()) {\n\t\t\tif(solution.getCloningFactor() < 1.0) break;\n\t\t\t\n\t\t\t//add as many clones of the current solution\n\t\t\t//as indicates the cloning factor\n\t\t\t//eg. if cloning factor is 2 -> 3 copies of this solution will go to the next population\n\t\t\tfor(int i = 0; i <= (int) solution.getCloningFactor(); i++) {\n\t\t\t\t//if we get a complete population by cloning the solution from the previous population\n\t\t\t\t//leave the method\n\t\t\t\tif(currentSize == intendedSize) break;\n\t\t\t\t\n\t\t\t\t//we create a mutation of each clone\n\t\t\t\t//if mutation is less efficient or already exists in the population we discard it\n\t\t\t\tmutant = new Solution(solution.getFrequencyRelations(), solution.getCabinets());\n\t\t\t\tArrayList<String> mutantSol = solution.mutate();\n\t\t\t\tmutant.setPossibleSolution(mutantSol);\n\t\t\t\tmutant.setPath(mutant.countPath(mutant.getPossibleSolution()));\n\t\t\t\t\n\t\t\t\t//System.out.println(\"M: \" + mutantSol + \" \" + mutant.getPath() );\n\t\t\t//\tSystem.out.println(\"S: \" + solution.getPossibleSolution() + \" \" + solution.getPath() );\n\n\n\t\t\t\tif(mutant.getPath() >= solution.getPath() || added.contains(mutant.getPossibleSolution()) ) {\n\t\t\t\t\tpopulation.add(solution);\n\t\t\t\t\tadded.add(solution.getPossibleSolution());\n\t\t\t\t\t//System.out.println(\"original\");\n\t\t\t\t}else {\n\t\t\t\t\tpopulation.add(mutant);\n\t\t\t\t\tadded.add(mutant.getPossibleSolution());\n\t\t\t\t\t//System.out.println(\"mutant\");\n\t\t\t\t}\n\t\t\t\n\t\t\t\tcurrentSize++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//count the number of random solutions that should be added\n\t\tif(currentSize <= populationSize) {\n\t\t\t randomPopulationSize = populationSize - currentSize;\n\t\t}else return;\n\t\t\n\t\t//create random solutions and add them to the population \n\t\t//until the wished size is reached\n\t\tcreateRandomPopulation(previousPopulation.getCabinetArrangement(), randomPopulationSize);\n\t\t\t\n\t}", "private void initNature() {\n int N = 100;\n int MOD = 10;\n switch (nature) {\n case \"Hardy\": { natureStats = new Stats(0, N, N, N, N, N); break; }\n case \"Lonely\": { natureStats = new Stats(0, N + MOD, N - MOD, N, N, N); break; }\n case \"Adamant\": { natureStats = new Stats(0, N + MOD, N, N - MOD, N, N); break; }\n case \"Naughty\": { natureStats = new Stats(0, N + MOD, N, N, N - MOD, N); break; }\n case \"Brave\": { natureStats = new Stats(0, N + MOD, N, N, N, N - MOD); break; }\n\n case \"Bold\": { natureStats = new Stats(0, N - MOD, N + MOD, N, N, N); break; }\n case \"Docile\": { natureStats = new Stats(0, N, N, N, N, N); break; }\n case \"Impish\": { natureStats = new Stats(0, N, N + MOD, N - MOD, N, N); break; }\n case \"Lax\": { natureStats = new Stats(0, N, N + MOD, N, N - MOD, N); break; }\n case \"Relaxed\": { natureStats = new Stats(0, N, N + MOD, N, N, N - MOD); break; }\n\n case \"Modest\": { natureStats = new Stats(0, N - MOD, N, N + MOD, N, N); break; }\n case \"Mild\": { natureStats = new Stats(0, N, N - MOD, N + MOD, N, N); break; }\n case \"Bashful\": { natureStats = new Stats(0, N, N, N, N, N); break; }\n case \"Rash\": { natureStats = new Stats(0, N, N, N + MOD, N - MOD, N); break; }\n case \"Quiet\": { natureStats = new Stats(0, N, N, N + MOD, N, N - MOD); break; }\n\n case \"Calm\": { natureStats = new Stats(0, N - MOD, N, N, N + MOD, N); break; }\n case \"Gentle\": { natureStats = new Stats(0, N, N - MOD, N, N + MOD, N); break; }\n case \"Careful\": { natureStats = new Stats(0, N, N, N - MOD, N + MOD, N); break; }\n case \"Quirky\": { natureStats = new Stats(0, N, N, N, N, N); break; }\n case \"Sassy\": { natureStats = new Stats(0, N, N, N, N + MOD, N - MOD); break; }\n\n case \"Timid\": { natureStats = new Stats(0, N - MOD, N, N, N, N + MOD); break; }\n case \"Hasty\": { natureStats = new Stats(0, N, N - MOD, N, N, N + MOD); break; }\n case \"Jolly\": { natureStats = new Stats(0, N, N, N - MOD, N, N + MOD); break; }\n case \"Naive\": { natureStats = new Stats(0, N, N, N, N - MOD, N + MOD); break; }\n case \"Serious\": { natureStats = new Stats(0, N, N, N, N, N); break; }\n }\n }", "Variables createVariables();", "private void uniformMutation(){\n Random random = new Random();\n double newValue = random.nextGaussian()*16.6 + 50.0;\n if(newValue < 0) newValue = 0;\n if(newValue > 100) newValue = 100;\n int gene = random.nextInt(6);\n switch (gene){\n case 0 : this.x1 = newValue; break;\n case 1 : this.x2 = newValue; break;\n case 2 : this.x3 = newValue; break;\n case 3 : this.y1 = newValue; break;\n case 4 : this.y2 = newValue; break;\n case 5 : this.y3 = newValue; break;\n }\n }", "public BaseGearPiece generateGearPiece();", "public void generateRandomAllVaraibles() {\r\n\r\n\t\tfor (DataVariable var : dataTestModel) {\r\n\t\t\tif (!var.getType().equals(\"INPUT_DATA\")) {\r\n\t\t\t\tif (var.getType().equals(\"boolean\") || var.getType().equals(\"Boolean\")) {\r\n\t\t\t\t\tvar.setValue(String.valueOf(getRandomBoolean()));\r\n\r\n\t\t\t\t} else if (var.getType().equals(\"int\")) {\r\n\t\t\t\t\tif (var.getMinimumValue() != null && var.getMinimumValue().length() > 0\r\n\t\t\t\t\t\t\t&& var.getMaximumValue() != null && var.getMaximumValue().length() > 0) {\r\n\t\t\t\t\t\tvar.setValue(String.valueOf(randomInt(Integer.parseInt(var.getMinimumValue()),\r\n\t\t\t\t\t\t\t\tInteger.parseInt(var.getMaximumValue()))));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar.setValue(String.valueOf(randomInt(0, 100)));\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (var.getType().equals(\"double\")) {\r\n\t\t\t\t\tif (var.getMinimumValue() != null && var.getMinimumValue().length() > 0\r\n\t\t\t\t\t\t\t&& var.getMaximumValue() != null && var.getMaximumValue().length() > 0) {\r\n\t\t\t\t\t\tvar.setValue(String.valueOf(randomDouple(Double.parseDouble(var.getMinimumValue()),\r\n\t\t\t\t\t\t\t\tDouble.parseDouble(var.getMaximumValue()))));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar.setValue(String.valueOf(randomDouple(0.0, 100.0)));\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (var.getType().equals(\"Enum\")) {\r\n\t\t\t\t\tvar.setValue(var.getValue());\r\n\t\t\t\t\t// System.out.println(\"Enum: var.getValue() = \" +\r\n\t\t\t\t\t// var.getValue());\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void mutation(Individual[] individuals) {\n for (int i = 0; i < POP_SIZE; i++) {\n for (int j = 0; j < GENE_SIZE; j++) {\n double randomNum = Math.random();\n if (randomNum < MUTATION_RATE) {\n randomNum = Math.random();\n ArrayList<String> bitsList = (ArrayList<String>) bits.clone();\n for (int g = 0; g < bitsList.size(); g++) {\n if (individuals[i].gene[j].equals(bitsList.get(g))) {\n String bit = bitsList.get(g);\n bitsList.remove(g);\n int index;\n if (randomNum < 0.5) {\n index = 0;\n } else {\n index = 1;\n }\n individuals[i].gene[j] = bitsList.get(new Random().nextInt(2));\n bitsList.add(bit);\n }\n }\n }\n }\n individuals[i].generateRulebase();\n }\n matingPool = Arrays.copyOf(individuals, individuals.length);\n }", "private static Map<String, OpPredefined> buildPredefined(){\n Map<String, OpPredefined> predefined = new TreeMap<>();\n predefined.put(\"byte_of_int\", OpPredefined.BYTE_OF_INT);\n predefined.put(\"char_of_byte\", OpPredefined.CHAR_OF_BYTE);\n predefined.put(\"int_of_byte\", OpPredefined.INT_OF_BYTE);\n predefined.put(\"byte_of_char\", OpPredefined.BYTE_OF_CHAR);\n predefined.put(\"length\", OpPredefined.LENGTH);\n return predefined;\n }", "public void generete() {\n int minQuantFig = 1,\r\n maxQuantFig = 10,\r\n minNum = 1,\r\n maxNum = 100,\r\n minColor = 0,\r\n maxColor = (int)colors.length - 1,\r\n\r\n // Initialize figures property for random calculations\r\n randomColor = 0,\r\n randomFigure = 0,\r\n\r\n // Squere property\r\n randomSideLength = 0,\r\n\r\n // Circle property\r\n randomRadius = 0,\r\n \r\n // IsoscelesRightTriangle property \r\n randomHypotenus = 0,\r\n \r\n // Trapizoid properties\r\n randomBaseA = 0,\r\n randomBaseB = 0,\r\n randomAltitude = 0;\r\n\r\n // Generate random number to set figueres's quantaty\r\n setFigureQuantaty( generateWholoeNumInRange(minQuantFig, maxQuantFig) );\r\n\r\n for( int i = 0; i < getFigureQuantaty(); i++ ) {\r\n\r\n // Convert double random value to int and close it in range from 1 to number of elements in array\r\n randomFigure = (int)( Math.random() * figures.length );\r\n \r\n randomColor = generateWholoeNumInRange( minColor, maxColor ); // Get random color's index from colors array\r\n\r\n // Create new figure depending on randomFigure \r\n switch (figures[randomFigure]) {\r\n\r\n case \"Circle\":\r\n\r\n randomRadius = generateWholoeNumInRange( minNum, maxNum ); // Get random value of circle's radius;\r\n\r\n Circle newCircle = new Circle( colors[randomColor], randomRadius ); // Initialize Circle with random parameters\r\n\r\n newCircle.drawFigure();\r\n \r\n break;\r\n\r\n case \"Squere\":\r\n\r\n randomSideLength = generateWholoeNumInRange( minNum, maxNum ); // Get random value of side length;\r\n\r\n Squere newSquere = new Squere( colors[randomColor], randomSideLength ); // Initialize Circle with random parameters\r\n\r\n newSquere.drawFigure();\r\n\r\n break;\r\n\r\n case \"Triangle\":\r\n\r\n randomSideLength = generateWholoeNumInRange( minNum, maxNum ); // Get random value of side length;\r\n\r\n randomHypotenus = generateWholoeNumInRange( minNum, maxNum ); // Get random value of hypotenus;\r\n\r\n IsoscelesRightTriangle newTriangle = new IsoscelesRightTriangle( colors[randomColor], randomSideLength, randomHypotenus ); // Initialize Circle with random parameters\r\n\r\n newTriangle.drawFigure();\r\n\r\n break;\r\n\r\n case \"Trapezoid\":\r\n\r\n randomBaseA = generateWholoeNumInRange( minNum, maxNum ); // Get random value of trapizoid's side A;\r\n\r\n randomBaseB = generateWholoeNumInRange( minNum, maxNum ); // Get random value of trapizoid's side B;\r\n\r\n randomAltitude = generateWholoeNumInRange( minNum, maxNum ); // Get random value of trapizoid's altitude;\r\n\r\n Trapezoid newTrapezoid = new Trapezoid( colors[randomColor], randomBaseA, randomBaseB, randomAltitude ); // Create new Trapezoid with random parameters\r\n\r\n newTrapezoid.drawFigure();\r\n\r\n break;\r\n\r\n };\r\n };\r\n }", "private Level produce() {\n\t\tint[][]grid = new int[row][column];\n\t\tArrayList<Point> goals = new ArrayList<Point>();\n\t\tint newRand = 0;\n\t\tfor (int x = 0; x < row; x++)\t{\n\t\t\tfor (int y = 0; y < column; y++)\t{\n\t\t\t\tnewRand = rand.nextInt(TOTAL);\n\t\t\t\tif (newRand < CAT_1)\t{\n\t\t\t\t\tgrid[x][y] = 1;\n\t\t\t\t} else if (newRand < CAT_2)\t{\n\t\t\t\t\tgrid[x][y] = 2;\n\t\t\t\t} else if (newRand < CAT_3)\t{\n\t\t\t\t\tgrid[x][y] = 3;\n\t\t\t\t} else if (newRand < CAT_4)\t{\n\t\t\t\t\tgrid[x][y] = 4;\n\t\t\t\t} else if (newRand < CAT_5)\t{\n\t\t\t\t\tgoals.add(new Point(x,y));\n\t\t\t\t} else if (newRand < TOTAL)\t{\n\t\t\t\t\tgrid[x][y] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn new Level(grid, row, column, goals);\n\t}", "private void generateSolution() {\n\t\t// TODO\n\n\t}", "private static Pool setUpPool(String name, double volume, double temp,\n double pH, double nutrientCoefficient, GuppySet startingGuppies) {\n Pool pool = new Pool(name, volume, temp, pH, nutrientCoefficient);\n\n pool.addFish(startingGuppies.generateGuppies());\n\n return pool;\n }", "public void populate(int xinitial, int yinitial, int xfinal, int yfinal) {\n \r\n if (yinitial > yfinal) { //if the initial point is lower than the final point\r\n int temp = yinitial; //swap the y values\r\n yinitial = yfinal;\r\n yfinal = temp;\r\n }\r\n if (xinitial > xfinal) { //if the initial point is to the right of the final point\r\n int temp = xinitial; //swap the x values\r\n xinitial = xfinal;\r\n xfinal = temp;\r\n }\r\n for (int i = xinitial; i < xfinal; i++) { //go through the area (where the initial point is top left and final point is bottom right) \r\n for (int j = yinitial; j < yfinal; j++) {\r\n int random = r.nextInt(100);\r\n if (random<85){ //make 85% of the grid populated by setting values to true\r\n grid[i][j] = true;\r\n }\r\n }\r\n }\r\n }", "public void generateOffspringPopulation() throws JMException{\n\n offspringPopulation_ = new SolutionSet[problemSet_.size()];\n\n for (int task = 0; task < problemSet_.size(); task++){\n offspringPopulation_[task] = new SolutionSet(populationSize_);\n if (crossover_.getClass() == SBXCrossover.class){\n Solution[] parents = new Solution[2];\n for (int i = 0; i < (populationSize_); i++) {\n // obtain parents\n parents = (Solution[]) selection_.execute(population_[task]);\n\n Solution[] offSpring = (Solution[]) crossover_\n .execute(parents);\n mutation_.execute(offSpring[0]);\n problemSet_.get(task).evaluate(offSpring[0]);\n problemSet_.get(task).evaluateConstraints(offSpring[0]);\n offspringPopulation_[task].add(offSpring[0]);\n } // for\n }\n else if (crossover_.getClass() == EGG.class){\n\n int[] permutation = new int[populationSize_];\n Utils.randomPermutation(permutation, populationSize_);\n etmo.util.Ranking ranking = new etmo.util.Ranking(population_[task]);\n SolutionSet front = ranking.getSubfront(0);\n\n front.Suppress();\n SolutionSet KP = null;\n if(front.size()> problemSet_.get(task).getNumberOfObjectives())\n KP = findingKneePoint(front, task);\n if(KP == null){\n KP = population_[task];\n }\n\n for (int i = 0; i < (populationSize_); i++) {\n // obtain parents\n int n = permutation[i];\n // STEP 2.1. Mating selection\n int r1,r2;\n r1 = PseudoRandom.randInt(0, KP.size() - 1);\n do {\n r2 = PseudoRandom.randInt(0, KP.size() - 1);\n } while (r2==r1);\n // STEP 2.2. Reproduction\n Solution child;\n Solution[] parents = new Solution[3];\n\n// 加入迁移:\n double tranRand = PseudoRandom.randDouble();\n if (tranRand <= 0.1){\n parents[1] = population_[PseudoRandom.randInt(0, problemSet_.size() - 1)].get(PseudoRandom.randInt(0, populationSize_ - 1));\n parents[2] = population_[PseudoRandom.randInt(0, problemSet_.size() - 1)].get(PseudoRandom.randInt(0, populationSize_ - 1));\n parents[0] = population_[task].get(n);\n child = (Solution) crossover_.execute(parents);\n\n mutation_.execute(child);\n\n problemSet_.get(task).evaluate(child);\n problemSet_.get(task).evaluateConstraints(child);\n offspringPopulation_[task].add(child);\n }\n\n\n\n else {\n parents[1] = KP.get(r1);\n parents[2] = KP.get(r2);\n parents[0] = population_[task].get(n);\n child = (Solution) crossover_.execute(parents);\n\n mutation_.execute(child);\n\n problemSet_.get(task).evaluate(child);\n problemSet_.get(task).evaluateConstraints(child);\n offspringPopulation_[task].add(child);\n }\n\n\n } // for\n }\n\n }\n\n\n\n\n }", "Individual createIndividual();", "public void create () {\n // TODO random generation of a ~100 x 100 x 100 world\n }", "public void populate(){\n salesRepRepository.save(new SalesRep(\"Maddy\"));\n salesRepRepository.save(new SalesRep(\"Jegor\"));\n salesRepRepository.save(new SalesRep(\"Natalia\"));\n salesRepRepository.save(new SalesRep(\"Joao\"));\n }", "protected void onChange_InitPopulation() {\n onChange_InitPopulation_xjal( InitPopulation );\n }", "private Table<Integer,String> buildTable(Collection<Block> featuresAsBlocks, Collection<Clause> featuresAsClauses, List<PredicateDefinition> globalConstants, Dataset dataset, Algorithm mode, PresubsumptionType presubsumptionType){\n Table<Integer,String> table = new Table<Integer,String>();\n //i.e. not global constants\n List<Block> nonConstantAttributes = new ArrayList<Block>();\n List<Block> globalConstantAttributes = new ArrayList<Block>();\n for (Block attribute : featuresAsBlocks){\n if (attribute.definition().isGlobalConstant()){\n globalConstantAttributes.add(attribute);\n } else {\n nonConstantAttributes.add(attribute);\n }\n }\n Dataset copyOfDataset = dataset.shallowCopy();\n copyOfDataset.reset();\n while (copyOfDataset.hasNextExample()){\n Example example = copyOfDataset.nextExample();\n table.addClassification(copyOfDataset.currentIndex(), copyOfDataset.classificationOfCurrentExample());\n addGlobalConstants(example, copyOfDataset.currentIndex(), table, globalConstants);\n }\n if (mode == HIFI || mode == HIFI_GROUNDING_COUNTING || mode == RELF || mode == RELF_GROUNDING_COUNTING){\n HiFi tableConstructionHifi = new HiFi(dataset);\n if (mode == HIFI_GROUNDING_COUNTING || mode == RELF_GROUNDING_COUNTING){\n tableConstructionHifi.setAggregablesBuilder(VoidAggregablesBuilder.construct());\n tableConstructionHifi.setPostProcessingAggregablesBuilder(GroundingCountingAggregablesBuilder.construct());\n }\n if (this.normalizationFactor != null){\n tableConstructionHifi.setNormalizationFactor(normalizationFactor);\n }\n table.addAll(tableConstructionHifi.constructTable(nonConstantAttributes));\n } else if (mode == POLY || mode == POLY_GROUNDING_COUNTING){\n Poly tableConstructionHiFi = new Poly(dataset);\n if (mode == POLY){\n tableConstructionHiFi.setUseGroundingCounting(false);\n } else if (mode == POLY_GROUNDING_COUNTING){\n tableConstructionHiFi.setUseGroundingCounting(true);\n }\n table.addAll(tableConstructionHiFi.constructTable(nonConstantAttributes));\n } else if (mode == RELF_X){\n throw new UnsupportedOperationException();\n// HiFi tableConstructionHifi = new HiFi(dataset);\n// if (mode == HIFI_GROUNDING_COUNTING || mode == RELF_GROUNDING_COUNTING){\n// tableConstructionHifi.setAggregablesBuilder(VoidAggregablesBuilder.construct());\n// tableConstructionHifi.setPostProcessingAggregablesBuilder(GroundingCountingAggregablesBuilder.construct());\n// }\n// if (this.normalizationFactor != null){\n// tableConstructionHifi.setNormalizationFactor(normalizationFactor);\n// }\n// //table.addAll(tableConstructionHifi.constructTable(nonConstantAttributes));\n//\n// RelfX tableConstructionRelfX = new RelfX(dataset);\n// table.addAll(tableConstructionRelfX.constructTable(Sugar.listFromCollections(featuresAsClauses), presubsumptionType));\n }\n\n return table;\n }", "RoachPopulation(int initial)\n {\n roaches = initial;\n }", "public Cop generateCop(){\r\n\r\n\t\t\tPatch currentPatch = randPatch();\r\n\r\n\t\t\tCop cop= new Cop(currentPatch);\r\n\r\n\t\t\tcurrentPatch.setPerson(cop);\r\n\r\n\t\t\treturn cop;\r\n\t\t}", "private static void createVars(JsProgram program, JsBlock block,\n Collection<JsStringLiteral> toCreate, Map<JsStringLiteral, JsName> names) {\n if (toCreate.size() > 0) {\n // Create the pool of variable names.\n JsVars vars = new JsVars(program.createSourceInfoSynthetic(\n JsStringInterner.class, \"Interned string pool\"));\n SourceInfo sourceInfo = program.createSourceInfoSynthetic(\n JsStringInterner.class, \"Interned string assignment\");\n for (JsStringLiteral literal : toCreate) {\n JsVar var = new JsVar(sourceInfo, names.get(literal));\n var.setInitExpr(literal);\n vars.add(var);\n }\n block.getStatements().add(0, vars);\n }\n }", "@Override\n public void create() {\n theMap = new ObjectSet<>(2048, 0.5f);\n generate();\n }", "private void createGrape(Element temp) {\n Grape grape = new Grape(); //new instance of Objects.Grape\n for(int i = 0; i < temp.getAttributeCount(); i++) { //iterates through all the attributes placed by the user\n Attribute attribute = temp.getAttribute(i); //instantiates a specific attribute (eg. id = \"1\")\n String name = attribute.getQualifiedName(); //takes the attribute name (eg. id)\n String value = attribute.getValue(); //takes the attribute value (eg. \"1\")\n\n switch (name) {\n case(\"id\"):\n grape.setId(value);\n break;\n\n case (\"class\"):\n try {\n grape.setGrapeClass(Class.forName(\"Examples.\"+value)); //creates a new Class based on the attribute's value\n\n } catch (ReflectiveOperationException e) {\n e.printStackTrace();\n\n }\n break;\n\n case (\"scope\"):\n if(value.equals(\"singleton\")) {\n grape.setSingleton(true);\n super.singletonGrapes.put(grape.getId(), null); //create a new instance of the grape and store it in its map\n }\n else\n grape.setSingleton(false);\n\n break;\n\n case (\"init-method\"):\n if (grape.getGrapeClass() != null) {\n Class grapeClass = grape.getGrapeClass();\n try {\n grape.setInitMethod(grapeClass.getMethod(value, null));\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n }\n } else {\n System.err.print(\"Objects.Grape parameters not in correct order. Class should be before methods. \");\n }\n break;\n\n case (\"destroy-method\"):\n if (grape.getGrapeClass() != null) {\n Class grapeClass = grape.getGrapeClass();\n try {\n grape.setDestroyMethod(grapeClass.getMethod(value, null));\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n }\n } else {\n System.err.print(\"Objects.Grape parameters not in correct order. Class should be before methods. \");\n }\n break;\n\n case (\"property\"):\n if (grape.getGrapeClass() != null) {\n if (value.equals(\"type\")) {\n autowired =! autowired;\n grape.setAutowiring(\"type\");\n } else if (value.equals(\"name\")) {\n autowired =! autowired;\n grape.setAutowiring(\"name\");\n } else if (value.equals(\"no\") && autowired) {\n if (searchAndCreateDep(grape)) {\n return;\n }\n }\n } else {\n System.err.print(\"Objects.Grape parameters not in correct order. Class should be before methods. \");\n }\n break;\n\n default:\n System.err.print(\"Invalid parameter \" + name);\n break;\n }\n }\n super.grapes.put(grape.getId(), grape);\n }", "public interface PopulationInitialiser {\n\t/**\n\t * this generates an initial solution population from which to start optimisation\n\t *\n\t * @param cities the set of cities which are part of each solution\n\t * @param populationSize the number of solutions to be included in a population\n\t */\n\tSolutionPopulation initialise(ArrayList<City> cities, int populationSize);\n}", "static void initValues()\n\t // Initializes the values array with random integers from 0 to 99.\n\t {\n\t Random rand = new Random();\n\t for (int index = 0; index < SIZE; index++)\n\t values[index] = Math.abs(rand.nextInt(100001));\n\t for (int i = 0; i < RANDSAMP; i++)\n\t \tvalues2[i] = values[Math.abs(rand.nextInt(SIZE+1))]; \n\t }", "private static void mating() {\n\t\tint getRand = 0;\n\t\tint parentA = 0;\n\t\tint parentB = 0;\n\t\tint newIndex1 = 0;\n\t\tint newIndex2 = 0;\n\t\tChromosome newChromo1 = null;\n\t\tChromosome newChromo2 = null;\n\n\t\tfor (int i = 0; i < OFFSPRING_PER_GENERATION; i++) {\n\t\t\tparentA = chooseParent();\n\t\t\t// Test probability of mating.\n\t\t\tgetRand = getRandomNumber(0, 100);\n\t\t\tif (getRand <= MATING_PROBABILITY * 100) {\n\t\t\t\tparentB = chooseParent(parentA);\n\t\t\t\tnewChromo1 = new Chromosome();\n\t\t\t\tnewChromo2 = new Chromosome();\n\t\t\t\tpopulation.add(newChromo1);\n\t\t\t\tnewIndex1 = population.indexOf(newChromo1);\n\t\t\t\tpopulation.add(newChromo2);\n\t\t\t\tnewIndex2 = population.indexOf(newChromo2);\n\n\t\t\t\t// Choose either, or both of these:\n\t\t\t\tpartiallyMappedCrossover(parentA, parentB, newIndex1, newIndex2);\n\t\t\t\t// positionBasedCrossover(parentA, parentB, newIndex1, newIndex2);\n\n\t\t\t\tif (childCount - 1 == nextMutation) {\n\t\t\t\t\texchangeMutation(newIndex1, 1);\n\t\t\t\t} else if (childCount == nextMutation) {\n\t\t\t\t\texchangeMutation(newIndex2, 1);\n\t\t\t\t}\n\n\t\t\t\tpopulation.get(newIndex1).computeConflicts();\n\t\t\t\tpopulation.get(newIndex2).computeConflicts();\n\n\t\t\t\tchildCount += 2;\n\n\t\t\t\t// Schedule next mutation.\n\t\t\t\tif (childCount % (int) Math.round(1.0 / MUTATION_RATE) == 0) {\n\t\t\t\t\tnextMutation = childCount + getRandomNumber(0, (int) Math.round(1.0 / MUTATION_RATE));\n\t\t\t\t}\n\t\t\t}\n\t\t} // i\n\t\treturn;\n\t}", "@Override\n public HashProbDef generateProblemDefinition(HashProbGen hashProbGen) throws Exception {\n \n /* En caso de que recibamos un hash con el grafo en vez de\n * un grafo con las opciones de generacion. */\n \n if(hashProbGen.containsKey(E.filename)){\n HashGraphDef graphDef = new HashGraphDef();\n String filename = hashProbGen.get(E.filename);\n String extension = filename.substring(filename.length()-4);\n switch(extension){\n case \".txt\": graphDef = ReaderGraph.optFromTXT(new File(filename)); break;\n case \".xml\": graphDef = GraphProblemFromXML.graphDefFromXML(new File(filename)); break;\n default: throw new Exception(\"Unknown file extension.\");\n }\n HashProbDef probDef = new HashProbDef();\n probDef.putAll(graphDef);\n return probDef;\n }\n \n // HACK\n if(hashProbGen.containsKey(\"0,0\") || hashProbGen.containsKey(\"1,1\")){\n HashProbDef h = new HashProbDef();\n h.putAll(hashProbGen);\n return h;\n }\n \n if(hashProbGen.containsKey(E.generationMode)){\n switch(hashProbGen.getIndispensable(E.generationMode)){\n case E.genModeUniDist: genType = GenType.UNIFORM_DISTRIBUTION; break;\n case E.genModeBiased: genType = GenType.BIASED; break;\n }\n }\n \n \n if(hashProbGen.containsKey(E.randomSeed)) \n Rand.setSeed(Long.valueOf(hashProbGen.get(E.randomSeed)));\n \n /** Hash con la definicion arista por arista del grafo generado. */\n HashProbDef optDef = new HashProbDef();\n optDef.put(E.numOfCities, hashProbGen.get(E.numOfCities));\n // opt.putAll(optArg);\n \n // Hay que generarlos.\n int numOfCities = Integer.valueOf(hashProbGen.getIndispensable(E.numOfCities));\n float minDist = Float.valueOf(hashProbGen.getIndispensable(E.minDist));\n float maxDist = Float.valueOf(hashProbGen.getIndispensable(E.maxDist));\n \n for(int i=0; i<numOfCities; i++){\n for(int j=i; j<numOfCities; j++){\n if(j == i){\n optDef.put(String.format(\"%s,%s\", i,j), \"0\");\n }\n else {\n switch(genType){\n case BIASED:\n optDef.put(String.format(\"%s,%s\", i,j), \n String.valueOf(maxDist)); break;\n case UNIFORM_DISTRIBUTION:\n optDef.put(String.format(\"%s,%s\", i,j), \n String.valueOf(Rand.randFloat(minDist, maxDist))); break;\n }\n }\n if(genType == GenType.BIASED){\n int randSisterCity;\n do{\n randSisterCity = Rand.randInt(0, numOfCities-1);\n }while(randSisterCity == i);\n optDef.put(String.format(\"%s,%s\", i, randSisterCity), \n String.valueOf(minDist));\n }\n }\n }\n \n return optDef;\n }", "private void generateWorld() {\n\t\t// Loop through all block locations where a block needs to be generated\n\t\tfor(int x=0; x<WORLD_SIZE; x++) {\n\t\t\tfor(int z=0; z<WORLD_SIZE; z++) {\n\t\t\t\tfor(int y=0; y<WORLD_HEIGHT/2; y++) {\n\t\t\t\t\tsetBlockAt(x, y, z, BlockType.STONE);\n\t\t\t\t\tif(y > (WORLD_HEIGHT/2) - 5)\n\t\t\t\t\t\tsetBlockAt(x, y, z, BlockType.DIRT);\n\t\t\t\t\tif(y == (WORLD_HEIGHT/2) -1)\n\t\t\t\t\t\tsetBlockAt(x, y, z, BlockType.GRASS);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Generate NUM_DIAMONDS of diamonds in random locations\n\t\tfor(int i=0; i<NUM_DIAMONDS; i++)\n\t\t\tsetBlockAt(getRandomLocation(), BlockType.DIAMOND);\t\n\t}", "@AnyLogicInternalCodegenAPI\n public int _InitPopulation_DefaultValue_xjal() {\n final Main self = this;\n return \n1000 \n;\n }", "void init() {\r\n \tfor (int i=0; i<SIZE; i++) {\r\n \t\tfor (int j=0; j<LEN; j++) {\r\n \t\t\tif (rnd.nextDouble() < 0.5)\r\n \t\t\t\toldpop[i][j] = 0;\r\n \t\t\telse\r\n \t\t\t\toldpop[i][j] = 1;\r\n \t\t}\r\n \t}\r\n \tfor (int j=0; j<LEN; j++) {\r\n \t\tcbest[j] = oldpop[0][j];\r\n \t}\r\n\t\tbest = fitness(0);\r\n }", "protected void generate() {\n\t\tcpGenerator( nx, ny, nz, ClosePackedLattice.HCP);\n\t}", "public Scenario generate() {\n\n //generate random number of Passenger(all human)\n ArrayList liPsg = new ArrayList();\n int totalNumOfPsg = (int) (rd.nextDouble() * PassengerCountMax + PassengerCountMin); //at least one Psg\n for (int i = 0; i < totalNumOfPsg; i++) {\n liPsg.add(getRandomPerson());\n }\n //System.out.println(\"PassengerNum= \"+totalNumOfPsg);\n\n\n //generate random number of Pedestrians(with Max 5) & allocate person+animal randomly(human+animal)\n ArrayList liPdt = new ArrayList();\n int totalNumOfPdst = (int) (rd.nextDouble() * PedestrianCountMax + PedestrianCountMin);//at least one Pdg\n int NumOfPerson = (int) Math.round(rd.nextDouble() * totalNumOfPdst);//if only 1 pdt,along with randomDouble<0.5 , 0.4x*1 rounded=0, will only an animal\n //so if you are random being in pdt but pdt only an animal, you neither wont be in scenario, so your negative probability in scenario is higher.\n int NumOfAnimal = totalNumOfPdst - NumOfPerson;\n for (int i = 0; i < NumOfPerson; i++) {\n liPdt.add(getRandomPerson());\n }\n for (int i = 0; i < NumOfAnimal; i++) {\n liPdt.add(getRandomAnimal());\n }\n //System.out.println(\"PedestrianNum= \"+totalNumOfPdst+\" with \"+NumOfPerson+\" human and \"+NumOfAnimal+\" animals\");\n\n\n //allocating where you are, 0=you absence & do nothing, 1=you in car, 2=you on road !!!!yeah happy solving\n int allocate_of_user = (int) Math.round(rd.nextDouble() * 2);\n if (allocate_of_user == 1) {\n ((Person) liPsg.get(0)).setAsYou(true); //set the first psg is you. !!!!!important Cast Obj into Person!!!!\n } else if (allocate_of_user == 2) {\n for (int i = 0; i < liPdt.size(); i++) {\n if (liPdt.get(i) instanceof Person) {//check whether a person\n ((Person) liPdt.get(i)).setAsYou(true);\n break; // only set once than break rather than set all of people of pdt is you\n }\n }\n }\n\n //Scenario(ArrayList<Character> passengers, ArrayList<Character> pedestrians, boolean isLegalCrossing)\n S = new Scenario(liPsg, liPdt, rd.nextBoolean()); //isLegalCrossing = red or green light;\n return S;\n }", "private void instantiateSecondVar(IntVar var1, int coeff1, IntVar var2, int coeff2, int constant, Propagator prop) throws ContradictionException {\n IntIterableRangeSet possibleValues2 = new IntIterableRangeSet();\n int lb2 = var2.getLB();\n DisposableValueIterator iterator1 = var1.getValueIterator(true);\n while(iterator1.hasNext()){\n int v = iterator1.next();\n possibleValues2.add(zpz.getSmallestGreaterEqThan(lb2, zpz.div(zpz.sub(constant, zpz.mul(zpz.repr(v),coeff1)), coeff2)));\n }\n var2.removeAllValuesBut(possibleValues2, prop);\n }", "public Population evolve()\r\n {\r\n\tArrayList<Chromosome> tempPop = \r\n\t new ArrayList<Chromosome>(chromos.size());\r\n\tChromosome u;\r\n\tChromosome v;\r\n\r\n\tfor(int i = 0; i < chromos.size()/2; i++)\r\n\t {\r\n\t\tu = selectParent();\r\n\t\tv = selectParent();\r\n\t\t\r\n\t\t//System.out.println(\"*****Parent 1 : \\n\" + v);\r\n\t\t\r\n Chromosome c1 = u.child(v);\r\n Chromosome c2 = v.child(u);\r\n\t\ttempPop.add(c1);\r\n\t\ttempPop.add(c2);\r\n\t\t\r\n //System.out.println(\"****Generated new child: \\n\" + c1);\r\n\t }\t \r\n\t\r\n\t// if needed, add in the code for keeping the best chromosome\r\n\tPopulation pop = new Population(tempPop, selMethod, selPara, \r\n\t\t\t\t\tcrossMethod, crossPara, mutMethod, mutPara, \r\n\t\t\t\t\treplaceMethod, replacePara, powerStep, tourStep, ff);\r\n\r\n\tif(replaceMethod == ELITISM)\r\n\t {\r\n\t\tpop.remove(worstChromoIndex);\r\n\t\tpop.add(bestChromo.clone());\r\n\t\tpop.initialize();\r\n\t }\r\n\r\n\tgeneration++;\r\n\treturn pop;\r\n }", "protected Population<T, K> initializePopulation(int size, Class<K> clazz)\n\t\t\tthrows InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException {\n\t\tPopulation<T, K> pop = new Population<>(size, fitnessCalc);\n\t\tpop.initialize(clazz);\n\t\treturn pop;\n\t}", "private static List<Gene> getGenePool() {\n List<Gene> list = new ArrayList<>();\n\n Item item1 = new Item();\n item1.setName(\"Swiss Army Knife\");\n item1.setWeight(0.08125);\n item1.setVal(15);\n Gene gene1 = new Gene(item1);\n\n Item item2 = new Item();\n item2.setName(\"Duct Tape\");\n item2.setWeight(1.3);\n item2.setVal(3);\n Gene gene2 = new Gene(item2);\n\n Item item3 = new Item();\n item3.setName(\"Rope (50 feet)\");\n item3.setWeight(7);\n item3.setVal(10);\n Gene gene3 = new Gene(item3);\n\n Item item4 = new Item();\n item4.setName(\"Satellite phone\");\n item4.setWeight(2);\n item4.setVal(8);\n Gene gene4 = new Gene(item4);\n\n Item item5 = new Item();\n item5.setName(\"Elmer's Glue\");\n item5.setWeight(0.25);\n item5.setVal(2);\n Gene gene5 = new Gene(item5);\n\n Item item6 = new Item();\n item6.setName(\"Toilet Paper Roll\");\n item6.setWeight(.5);\n item6.setVal(4);\n Gene gene6 = new Gene(item6);\n\n Item item7 = new Item();\n item7.setName(\"Binoculars\");\n item7.setWeight(3);\n item7.setVal(5);\n Gene gene7 = new Gene(item7);\n\n Item item8 = new Item();\n item8.setName(\"Compass\");\n item8.setWeight(0.0573202);\n item8.setVal(15);\n Gene gene8 = new Gene(item8);\n\n Item item9 = new Item();\n item9.setName(\"Jug (pre-filled with water)\");\n item9.setWeight(4);\n item9.setVal(6);\n Gene gene9 = new Gene(item9);\n\n Item item10 = new Item();\n item10.setName(\"Flashlight\");\n item10.setWeight(2);\n item10.setVal(4);\n Gene gene10 = new Gene(item10);\n\n Item item11 = new Item();\n item11.setName(\"Box of paper clips\");\n item11.setWeight(.9);\n item11.setVal(2);\n Gene gene11 = new Gene(item11);\n\n Item item12 = new Item();\n item12.setName(\"Gloves (1 pair)\");\n item12.setWeight(.8125);\n item12.setVal(3);\n Gene gene12 = new Gene(item12);\n\n Item item13 = new Item();\n item13.setName(\"Scissors\");\n item13.setWeight(0.2);\n item13.setVal(2);\n Gene gene13 = new Gene(item13);\n\n Item item14 = new Item();\n item14.setName(\"Signal Flair (4pk)\");\n item14.setWeight(4);\n item14.setVal(5);\n Gene gene14 = new Gene(item14);\n\n Item item15 = new Item();\n item15.setName(\"Water Purifying System\");\n item15.setWeight(0.5125);\n item15.setVal(4);\n Gene gene15 = new Gene(item15);\n\n Item item16 = new Item();\n item16.setName(\"Whistle\");\n item16.setWeight(0.075);\n item16.setVal(2);\n Gene gene16 = new Gene(item16);\n\n Item item17 = new Item();\n item17.setName(\"Sleeping Bag\");\n item17.setWeight(0.38125);\n item17.setVal(4);\n Gene gene17 = new Gene(item17);\n\n Item item18 = new Item();\n item18.setName(\"Insect Repellent\");\n item18.setWeight(1.15);\n item18.setVal(3);\n Gene gene18 = new Gene(item18);\n\n Item item19 = new Item();\n item19.setName(\"Trowel\");\n item19.setWeight(0.31875);\n item19.setVal(3);\n Gene gene19 = new Gene(item19);\n\n Item item20 = new Item();\n item20.setName(\"Lighter\");\n item20.setWeight(.2);\n item20.setVal(4);\n Gene gene20 = new Gene(item20);\n\n Item item21 = new Item();\n item21.setName(\"Safety Horn\");\n item21.setWeight(.21);\n item21.setVal(3);\n Gene gene21 = new Gene(item21);\n\n Item item22 = new Item();\n item22.setName(\"Headlamp\");\n item22.setWeight(.8);\n item22.setVal(4);\n Gene gene22 = new Gene(item22);\n\n Item item23 = new Item();\n item23.setName(\"Freeze Dried Food Kit\");\n item23.setWeight(2);\n item23.setVal(6);\n Gene gene23 = new Gene(item23);\n\n Item item24 = new Item();\n item24.setName(\"Sunscreen\");\n item24.setWeight(.5);\n item24.setVal(4);\n Gene gene24 = new Gene(item24);\n\n Item item25 = new Item();\n item25.setName(\"Trekking Pole (Adjustable)\");\n item25.setWeight(1.3);\n item25.setVal(4);\n Gene gene25 = new Gene(item25);\n\n Item item26 = new Item();\n item26.setName(\"Counter Assault Bear Spray\");\n item26.setWeight(.5);\n item26.setVal(4);\n Gene gene26 = new Gene(item26);\n\n Item item27 = new Item();\n item27.setName(\"Insect Spray\");\n item27.setWeight(.5);\n item27.setVal(3);\n Gene gene27 = new Gene(item27);\n\n Item item28 = new Item();\n item28.setName(\"Hand sanitizer\");\n item28.setWeight(.625);\n item28.setVal(3);\n Gene gene28 = new Gene(item28);\n\n Item item29 = new Item();\n item29.setName(\"Mirror\");\n item29.setWeight(.5);\n item29.setVal(3);\n Gene gene29 = new Gene(item29);\n\n Item item30 = new Item();\n item30.setName(\"First Aid Kit\");\n item30.setWeight(3);\n item30.setVal(6);\n Gene gene30 = new Gene(item30);\n\n list.add(gene1);\n list.add(gene2);\n list.add(gene3);\n list.add(gene4);\n list.add(gene5);\n list.add(gene6);\n list.add(gene7);\n list.add(gene8);\n list.add(gene9);\n list.add(gene10);\n list.add(gene11);\n list.add(gene12);\n list.add(gene13);\n list.add(gene14);\n list.add(gene15);\n list.add(gene16);\n list.add(gene17);\n list.add(gene18);\n list.add(gene19);\n list.add(gene20);\n list.add(gene21);\n list.add(gene22);\n list.add(gene23);\n list.add(gene24);\n list.add(gene25);\n list.add(gene26);\n list.add(gene27);\n list.add(gene28);\n list.add(gene29);\n list.add(gene30);\n\n return list;\n }", "public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)\n {\n int var4 = par2 * 16;\n int var5 = par3 * 16;\n BiomeGenBase var6 = this.worldObj.getBiomeGenForCoords(var4 + 16, var5 + 16);\n boolean var7 = false;\n this.random.setSeed(this.worldObj.getSeed());\n long var8 = this.random.nextLong() / 2L * 2L + 1L;\n long var10 = this.random.nextLong() / 2L * 2L + 1L;\n this.random.setSeed((long)par2 * var8 + (long)par3 * var10 ^ this.worldObj.getSeed());\n Iterator var12 = this.field_82696_f.iterator();\n int k;\n int l;\n \n Random r = random;\n Chunk c = this.worldObj.getChunkFromChunkCoords(par2, par3);\n ArrayList<Object> var20 = rooms;\n \n for (int i = 1; i < 5; i++)\n {\n k = r.nextInt(23); //# of different rooms to generate\n l = r.nextInt(5); //Chance for boss rooms to generate 1/number specified\n\n if (k > 19 && l != 0 || i > 3) // boss chance\n {\n k = r.nextInt(20);\n }\n\n if (k < 21) //boss rooms have to use world gen while the rest use chunk gen\n {\n \t((DungeonComponentBase)(var20.get(k))).generate(c, r, var4, i * 8, var5);\n }\n else\n {\n \t((WorldGenerator)(var20.get(k))).generate(this.worldObj, r, var4, i * 8, var5);\n }\n }\n DungeonCeiling var21 = ceiling;\n var21.generate(c, r, var4, 40, var5);//80\n }", "private void mutation() {\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tint num = (int) (Math.random() * GENE * ChrNum + 1);\n\t\t\tint chromosomeNum = (int) (num / GENE) + 1;\n\n\t\t\tint mutationNum = num - (chromosomeNum - 1) * GENE; \n\t\t\tif (mutationNum == 0) \n\t\t\t\tmutationNum = 1;\n\t\t\tchromosomeNum = chromosomeNum - 1;\n\t\t\tif (chromosomeNum >= ChrNum)\n\t\t\t\tchromosomeNum = 9;\n\t\t\tString temp;\n\t\t\tString a; \n\t\t\tif (ipop[chromosomeNum].charAt(mutationNum - 1) == '0') { \n a = \"1\";\n\t\t\t} else { \n\t\t\t\ta = \"0\";\n\t\t\t}\n\t\t\t\n\t\t\tif (mutationNum == 1) {\n\t\t\t\ttemp = a + ipop[chromosomeNum].substring(mutationNum);\n\t\t\t} else {\n\t\t\t\tif (mutationNum != GENE) {\n\t\t\t\t\ttemp = ipop[chromosomeNum].substring(0, mutationNum -1) + a \n\t\t\t\t\t\t\t+ ipop[chromosomeNum].substring(mutationNum);\n\t\t\t\t} else {\n\t\t\t\t\ttemp = ipop[chromosomeNum].substring(0, mutationNum - 1) + a;\n\t\t\t\t}\n\t\t\t}\n \tipop[chromosomeNum] = temp;\n\t\t}\n\t}", "public void instantiateEvidence(Configuration evid) {\n ProbabilityTree tree, twig;\n Configuration conf;\n PTreeCredalSet pot, pot2;\n FiniteStates variable;\n int i, j, v;\n \n conf = new Configuration(evid,new NodeList(variables));\n if (conf.size() != 0) {\n pot = (PTreeCredalSet)copy();\n for (i=0 ; i<conf.size() ; i++) {\n variable = conf.getVariable(i);\n v = conf.getValue(i);\n \n // building a tree for variable\n tree = new ProbabilityTree(variable);\n for (j=0 ; j<tree.child.size() ; j++) {\n twig = (ProbabilityTree) tree.child.elementAt(j);\n twig.label = 2;\n if (j == v)\n twig.value = 1.0;\n tree.leaves++;\n }\n // building the potential for the variable\n pot2 = new PTreeCredalSet();\n pot2.variables.addElement(variable);\n pot2.setTree(tree);\n // combination\n \n pot = (PTreeCredalSet)pot.combine(pot2);\n }\n this.setTree(pot.getTree());\n }\n }", "private void _generateAdjacentCountries() {\n\n // North America\n this.adjCountries.put(CountryName.Alaska, new CountryName[] {\n CountryName.NorthwestTerritories });\n this.adjCountries.put(CountryName.WesternCanada, new CountryName[] {\n CountryName.NorthwestTerritories,\n CountryName.CentralCanada,\n CountryName.WesternCanada,\n CountryName.WesternUS});\n this.adjCountries.put(CountryName.CentralAmerica, new CountryName[] {\n CountryName.EasternUS,\n CountryName.WesternUS,\n CountryName.Venezuela});\n this.adjCountries.put(CountryName.EasternUS, new CountryName[] {\n CountryName.CentralAmerica,\n CountryName.CentralCanada,\n CountryName.WesternUS });\n this.adjCountries.put(CountryName.Greenland, new CountryName[] {\n CountryName.NorthwestTerritories,\n CountryName.CentralCanada,\n CountryName.EasternCanada,\n CountryName.Iceland });\n this.adjCountries.put(CountryName.NorthwestTerritories, new CountryName[] {\n CountryName.Alaska,\n CountryName.WesternCanada,\n CountryName.Greenland,\n CountryName.CentralCanada });\n this.adjCountries.put(CountryName.CentralCanada, new CountryName[] {\n CountryName.WesternCanada,\n CountryName.Greenland,\n CountryName.NorthwestTerritories,\n CountryName.EasternCanada });\n this.adjCountries.put(CountryName.EasternCanada, new CountryName[] {\n CountryName.EasternUS,\n CountryName.Greenland,\n CountryName.NorthwestTerritories,\n CountryName.CentralCanada });\n this.adjCountries.put(CountryName.WesternUS, new CountryName[] {\n CountryName.WesternCanada,\n CountryName.CentralAmerica,\n CountryName.EasternUS,\n CountryName.CentralCanada });\n\n // South America\n this.adjCountries.put(CountryName.Argentina, new CountryName[] {\n CountryName.Brazil,\n CountryName.Peru });\n this.adjCountries.put(CountryName.Brazil, new CountryName[] {\n CountryName.Argentina,\n CountryName.Peru,\n CountryName.Venezuela});\n this.adjCountries.put(CountryName.Peru, new CountryName[] {\n CountryName.Argentina,\n CountryName.Brazil,\n CountryName.Venezuela });\n this.adjCountries.put(CountryName.Venezuela, new CountryName[] {\n CountryName.Brazil,\n CountryName.Peru,\n CountryName.CentralAmerica});\n\n // Europe\n this.adjCountries.put(CountryName.GreatBritain, new CountryName[] {\n CountryName.Iceland,\n CountryName.NorthernEurope,\n CountryName.Scandinavia,\n CountryName.WesternEurope });\n this.adjCountries.put(CountryName.Iceland, new CountryName[] {\n CountryName.GreatBritain,\n CountryName.Greenland });\n this.adjCountries.put(CountryName.NorthernEurope, new CountryName[] {\n CountryName.GreatBritain,\n CountryName.Scandinavia,\n CountryName.SouthernEurope,\n CountryName.Ukraine,\n CountryName.WesternEurope });\n this.adjCountries.put(CountryName.Scandinavia, new CountryName[] {\n CountryName.GreatBritain,\n CountryName.Iceland,\n CountryName.NorthernEurope,\n CountryName.Ukraine });\n this.adjCountries.put(CountryName.SouthernEurope, new CountryName[] {\n CountryName.NorthernEurope,\n CountryName.Ukraine,\n CountryName.WesternEurope,\n CountryName.Egypt,\n CountryName.NorthAfrica,\n CountryName.MiddleEast });\n this.adjCountries.put(CountryName.Ukraine, new CountryName[] {\n CountryName.NorthernEurope,\n CountryName.Scandinavia,\n CountryName.SouthernEurope,\n CountryName.Afghanistan,\n CountryName.MiddleEast,\n CountryName.Ural });\n this.adjCountries.put(CountryName.WesternEurope, new CountryName[] {\n CountryName.GreatBritain,\n CountryName.NorthernEurope,\n CountryName.SouthernEurope,\n CountryName.NorthAfrica });\n\n // Africa\n this.adjCountries.put(CountryName.Congo, new CountryName[] {\n CountryName.EastAfrica,\n CountryName.NorthAfrica,\n CountryName.SouthAfrica });\n this.adjCountries.put(CountryName.EastAfrica, new CountryName[] {\n CountryName.Congo,\n CountryName.Egypt,\n CountryName.Madagascar,\n CountryName.MiddleEast });\n this.adjCountries.put(CountryName.Egypt, new CountryName[] {\n CountryName.EastAfrica,\n CountryName.NorthAfrica,\n CountryName.SouthernEurope,\n CountryName.MiddleEast });\n this.adjCountries.put(CountryName.Madagascar, new CountryName[] {\n CountryName.EastAfrica,\n CountryName.SouthAfrica });\n this.adjCountries.put(CountryName.NorthAfrica, new CountryName[] {\n CountryName.Congo,\n CountryName.Egypt,\n CountryName.Brazil,\n CountryName.SouthernEurope,\n CountryName.WesternEurope });\n this.adjCountries.put(CountryName.SouthAfrica, new CountryName[] {\n CountryName.Congo,\n CountryName.EastAfrica,\n CountryName.Madagascar });\n\n // Asia\n this.adjCountries.put(CountryName.Afghanistan, new CountryName[] {\n CountryName.China,\n CountryName.India,\n CountryName.MiddleEast,\n CountryName.Ural,\n CountryName.Ukraine });\n this.adjCountries.put(CountryName.China, new CountryName[] {\n CountryName.Afghanistan,\n CountryName.India,\n CountryName.Mongolia,\n CountryName.Siam,\n CountryName.Siberia,\n CountryName.Ural });\n this.adjCountries.put(CountryName.India, new CountryName[] {\n CountryName.Afghanistan,\n CountryName.China,\n CountryName.MiddleEast });\n this.adjCountries.put(CountryName.Irkutsk, new CountryName[] {\n CountryName.Kamchatka,\n CountryName.Mongolia,\n CountryName.Siberia,\n CountryName.Yakutsk });\n this.adjCountries.put(CountryName.Japan, new CountryName[] {\n CountryName.Kamchatka,\n CountryName.Mongolia });\n this.adjCountries.put(CountryName.Kamchatka, new CountryName[] {\n CountryName.Irkutsk,\n CountryName.Japan,\n CountryName.Yakutsk });\n this.adjCountries.put(CountryName.MiddleEast, new CountryName[] {\n CountryName.Afghanistan,\n CountryName.India,\n CountryName.EastAfrica,\n CountryName.Egypt,\n CountryName.SouthernEurope,\n CountryName.Ukraine });\n this.adjCountries.put(CountryName.Mongolia, new CountryName[] {\n CountryName.China,\n CountryName.Irkutsk,\n CountryName.Japan,\n CountryName.Kamchatka,\n CountryName.Siberia });\n this.adjCountries.put(CountryName.Siam, new CountryName[] {\n CountryName.China,\n CountryName.India,\n CountryName.Indonesia });\n this.adjCountries.put(CountryName.Siberia, new CountryName[] {\n CountryName.China,\n CountryName.Irkutsk,\n CountryName.Mongolia,\n CountryName.Ural,\n CountryName.Yakutsk });\n this.adjCountries.put(CountryName.Ural, new CountryName[] {\n CountryName.Afghanistan,\n CountryName.China,\n CountryName.Siberia,\n CountryName.Ukraine });\n this.adjCountries.put(CountryName.Yakutsk, new CountryName[] {\n CountryName.Irkutsk,\n CountryName.Kamchatka,\n CountryName.Siberia });\n\n // Australia\n this.adjCountries.put(CountryName.EasternAustralia, new CountryName[] {\n CountryName.NewGuinea,\n CountryName.WesternAustralia});\n this.adjCountries.put(CountryName.Indonesia, new CountryName[] {\n CountryName.NewGuinea,\n CountryName.WesternAustralia,\n CountryName.Siam });\n this.adjCountries.put(CountryName.NewGuinea, new CountryName[] {\n CountryName.EasternAustralia,\n CountryName.Indonesia });\n this.adjCountries.put(CountryName.WesternAustralia, new CountryName[] {\n CountryName.EasternAustralia,\n CountryName.NewGuinea,\n CountryName.Indonesia});\n }", "public void reproduce() {\n\t\tOrganism newOrg;\n\t\t\n\t\tfor (int i=0; i < Utils.between(_nChildren,1,8); i++) {\n\t\t\tnewOrg = new Organism(_world);\n\t\t\tif (newOrg.inherit(this, i==0)) {\n\t\t\t\t// It can be created\n\t\t\t\t_nTotalChildren++;\n\t\t\t\t_world.addOrganism(newOrg,this);\n\t\t\t\t_infectedGeneticCode = null;\n\t\t\t}\n\t\t\t_timeToReproduce = 20;\n\t\t}\n\t}", "private void mutate(float probability) {\r\n\r\n individual[] temp_pop = new individual[this.pop_size];\r\n\r\n for (int i = 0; i < this.pop_size; i++) {\r\n\r\n float temp_genes[] = this.offspring_population.getPopulation()[i].getGenes();\r\n\r\n // mutation can now mutate wild cards\r\n for (int j = 0; j < temp_genes.length; j++) {\r\n float k = new Random().nextFloat();\r\n\r\n if (k <= probability) {\r\n float temp = new Random().nextFloat();\r\n temp_genes[j] = temp; // add a float between 0-1 // just mutate a new float\r\n }\r\n }\r\n individual child = new individual(temp_genes, solutions, output);\r\n temp_pop[i] = child;\r\n }\r\n this.main_population.setPopulation(temp_pop);\r\n this.main_population.update_population();\r\n }", "public void GeneticAlgorithm (TableVar Variables, TableDat Examples, String nFile) {\r\n\r\n String contents;\r\n\r\n // Creates and initialices the population\r\n poblac = new Population(long_poblacion, Variables.getNVars(), RulesRep, Variables);\r\n poblac.RndInitPop (Variables);\r\n\r\n // Creates the populations \"Inter\" and \"Des\" to aply the genetic operations\r\n Inter = new Population(long_poblacion, Variables.getNVars(), RulesRep, Variables);\r\n Des = new Population(2*long_poblacion, Variables.getNVars(), RulesRep, Variables);\r\n \r\n // Inicialisation of variables\r\n Trials = 0;\r\n Gen = 0;\r\n\r\n // Evaluation of the individuals of the initial population\r\n Trials+=poblac.evalPop (this, Variables, Examples, false);\r\n \r\n // Increments the generation number\r\n Gen++; \r\n \r\n // General cycle of the genetic algorithm\r\n do {\r\n // Selection by Baker method\r\n if(RulesRep.compareTo(\"CAN\")==0)\r\n SelectCAN (Variables);\r\n else SelectDNF (Variables);\r\n\r\n // Crossover\r\n descendientes = 0;\r\n if(RulesRep.compareTo(\"CAN\")==0)\r\n MultipointCrossoverCAN (Variables);\r\n else MultipointCrossoverDNF (Variables);\r\n descendientes = 2;\r\n \r\n // Mutation\r\n if(RulesRep.compareTo(\"CAN\")==0)\r\n MutationCAN (Variables);\r\n else MutationDNF (Variables);\r\n\r\n // Reproduction\r\n if(RulesRep.compareTo(\"CAN\")==0)\r\n SteadyStepReproductionCAN(Variables);\r\n else SteadyStepReproductionDNF(Variables);\r\n\r\n // Evaluation of the new population\r\n Trials+=poblac.evalPop (this, Variables, Examples, false);\r\n\r\n // Next generation\r\n Gen++;\r\n\r\n // GA finishes when the number of evaluations is reached\r\n } while (Trials <= n_eval); \r\n\r\n contents = \" # \" + (Gen-1) + \" generations, \" + Trials + \" evaluations\\n\";\r\n Files.addToFile(nFile, contents);\r\n \r\n }" ]
[ "0.6916058", "0.63713485", "0.6225375", "0.6113935", "0.593495", "0.5933015", "0.57528794", "0.5714489", "0.55324316", "0.54733276", "0.546178", "0.5443194", "0.54326487", "0.54160815", "0.5406466", "0.5401491", "0.5354295", "0.53338367", "0.53284043", "0.5311224", "0.5245614", "0.52259696", "0.5222675", "0.51976985", "0.51948535", "0.51646125", "0.5162716", "0.51624006", "0.51479304", "0.51366174", "0.5132093", "0.5120358", "0.50968283", "0.5087589", "0.50760436", "0.50760436", "0.50486034", "0.50482774", "0.50476533", "0.5047258", "0.50345385", "0.5028151", "0.50248384", "0.50141346", "0.50137955", "0.5010504", "0.49906495", "0.49856508", "0.49659234", "0.49373817", "0.4931081", "0.49287978", "0.492477", "0.49184686", "0.4917759", "0.49099952", "0.4902077", "0.4895032", "0.4891058", "0.48842454", "0.48815474", "0.4877324", "0.48759592", "0.48732346", "0.48710263", "0.48677427", "0.48675135", "0.48646104", "0.48642153", "0.48638773", "0.48497915", "0.48497605", "0.4846601", "0.48460665", "0.4843102", "0.48294088", "0.48263213", "0.4825187", "0.48244786", "0.48243523", "0.48238224", "0.4822235", "0.48220915", "0.48171657", "0.48151395", "0.48146075", "0.4814049", "0.48130304", "0.48110628", "0.48047894", "0.48009703", "0.47947738", "0.47946042", "0.47944114", "0.47919545", "0.47899747", "0.47882536", "0.47854954", "0.47809058", "0.47803158" ]
0.6305644
2
Generates a population from the given file
public void generatePopulation(String filePathAndName) { List<String> dataAll = SU.readFile(filePathAndName); List<String> dataAgents = new ArrayList<String>(); List<String> dataStock = new ArrayList<String>(); List<String> dataRelations = new ArrayList<String>(); int typeOfData = -1; for (String datum : dataAll) { if (!datum.startsWith("%")) { switch(typeOfData) { case 0: dataAgents.add(datum); break; case 1: dataStock.add(datum); break; case 2: dataRelations.add(datum); break; } } else { typeOfData = Integer.parseInt(datum.substring(1,2)); } } generateAgents(dataAgents); generateStock(dataStock); generateRelations(dataRelations); SU.getDataCollector().addAllCurrentStock(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void generatePopulation() {\n population = setupArray(POP_SIZE, NUM_RULES, GENE_SIZE, COND_LEN);\n\n for (Individual individual : population) {\n for (int i = 0; i < individual.getGene().length; i++) {\n individual.gene[i] = bits.get(new Random().nextInt(2));\n }\n individual.generateRulebase();\n }\n }", "public void generate(File file) throws IOException;", "private void loadInformation(){\n\t\ttry{\n\t\t\tFileReader fr = new FileReader(\"SpaceProgramGaussDistribution.txt\");\n\t\t\tBufferedReader br = new BufferedReader(fr);\n\t\t\tScanner sc = new Scanner(br);\n\t\t\t\n\t\t\tString info = \"\";\n\t\t\t\n\t\t\twhile(sc.hasNextLine()){\n\t\t\t\tinfo += sc.nextLine();\n\t\t\t}\n\t\t\t\n\t\t\tString split[] = info.split(\"#\");\n\t\t\t\n\t\t\tfor(int i = 0; i < split.length; i++){\n\t\t\t\tpopulationInfo += split[i]+\"\\n\";\n\t\t\t}\n\t\t\tsc.close();\n\t\t\tbr.close();\n\t\t\tfr.close();\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\tSystem.out.println(\"File not found: SpaceProgramGaussDistribution.txt\");\n\t\t}\n\t}", "public GosplPopulationInDatabase(File databaseFile, IPopulation<ADemoEntity, Attribute<? extends IValue>> population) {\n\t\t\n\t\t try {\n\t\t\t //;ifexists=true\n\t\t\tthis.connection = DriverManager.getConnection(\n\t\t\t\t\t\"jdbc:hsqldb:file:\"+databaseFile.getPath()+\";create=true;shutdown=true;\", \"SA\", \"\");\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\t\"error while trying to initialize the HDSQL database engine in file \"\n\t\t\t\t\t\t+databaseFile+\": \"+e.getMessage(), e);\n\t\t}\n\t\t loadPopulationIntoDatabase(population);\n\t}", "private void readFromFile() {\n\t\tPath filePath = Paths.get(inputFile);\n\n\t\ttry (BufferedReader reader = Files.newBufferedReader(filePath,\n\t\t\t\tCharset.forName(\"UTF-8\"));) {\n\t\t\tString line = null;\n\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tString[] splitLine = line.split(\",\");\n\t\t\t\tcurrentGen.setValue(Integer.parseInt(splitLine[0]),\n\t\t\t\t\t\tInteger.parseInt(splitLine[1]), true);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Could not find file provided.\");\n\t\t}\n\t}", "private void createGenotypes(File inFile)\r\n\t\tthrows Exception\r\n\t{\n\t\tBufferedReader in = new BufferedReader(new FileReader(inFile));\r\n\t\t// And write back out in Flapjack format\r\n\t\tBufferedWriter out = new BufferedWriter(new FileWriter(new File(wrkDir, \"geno\")));\r\n\t\tout.write(\"# fjFile = GENOTYPE\");\r\n\t\tout.newLine();\r\n\r\n\t\t// Skip the first two lines; we'll just assume marker order...\r\n\t\tin.readLine(); in.readLine();\r\n\t\t// ...and use the data we already have from the map\r\n\t\tfor (Marker m: markers)\r\n\t\t\tout.write(\"\\t\" + m.name);\r\n\t\tout.newLine();\r\n\r\n\r\n\t\t// Now process each line\r\n\t\tint index = 0;\r\n\t\tString str = null;\r\n\t\twhile ((str = in.readLine()) != null)\r\n\t\t{\r\n\t\t\tif (str.isEmpty())\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tif (index == 0)\r\n\t\t\t\tout.write(\"RP\");\r\n\t\t\telse if (index == 1)\r\n\t\t\t\tout.write(\"DP\");\r\n\t\t\telse\r\n\t\t\t\tout.write(\"RP[1]/DP-\" + index);\r\n\r\n\t\t\tfor (String allele: str.split(\",\"))\r\n\t\t\t\tout.write(\"\\t\" + allele);\r\n\r\n\t\t\tout.newLine();\r\n\t\t\tindex++;\r\n\t\t}\r\n\r\n\t\tin.close();\r\n\t\tout.close();\r\n\t}", "public static void getProblem(String filename){\r\n String line = \"\";\r\n try {\r\n //Get the problem instance\r\n reader = new BufferedReader(new FileReader(filename));\r\n line = reader.readLine();\r\n\r\n //Assume the first line contains the Universe\r\n inString = line.split(\",\");\r\n\r\n for (int i = 0; i < inString.length; i++) {\r\n universe.add(Integer.parseInt(inString[i]));\r\n }\r\n Collections.sort(universe);\r\n System.out.println(\"Universe:\" + universe);\r\n\r\n //Gather in the sets\r\n line = reader.readLine();\r\n while (line != null){\r\n inString = line.split(\",\");\r\n for (int i = 0; i < inString.length; i++) {\r\n set.add(Integer.parseInt(inString[i]));\r\n }\r\n //System.out.println(\"Set: \" + set);\r\n sets.add(set);\r\n set = new ArrayList<Integer>();\r\n line = reader.readLine();\r\n\r\n //Create a blank pheromone\r\n pheremones.add(0);\r\n visited.add(0);\r\n }\r\n System.out.println(\"Sets: \" + sets);\r\n\r\n //Create the pheremones\r\n //System.out.println(\"PheremoneSize: \" + pheremones.size());\r\n\r\n //Set the degradation\r\n //degrade = generationSize/2;\r\n\r\n }catch(FileNotFoundException e){System.out.println(\"File Not Found : \" + filename);}\r\n catch(Exception e){\r\n System.out.println(\"ERROR in getProblem\");\r\n System.out.println(\"File Name: \" + filename);\r\n System.out.println(\"Universe: \" + universe);\r\n System.out.println(\"Line: \" + line);\r\n System.out.println(\"InString: \" + inString.toString());\r\n System.out.println();\r\n System.out.println(e.toString());\r\n }\r\n }", "private static void extractIpuPopulation(final String propertiesFilePath) throws Exception {\n\t\tProperties populationExtractorProperties = GenstarService.loadPropertyFile(propertiesFilePath);\n\t\t\n\t\t\n\t\t// 1. Generate the population\n\t\tIPopulation extractedPopulation = GenstarService.extractIpuPopulation(populationExtractorProperties);\n\n\t\t\n\t\t// 2. Print population information\n\t\tSystem.out.println(\"Information of the extracted population\");\n\t\tSystem.out.println(\"Group population name: \" + extractedPopulation.getName());\n\t\tSystem.out.println(\"Number of group entities: \" + extractedPopulation.getNbOfEntities());\n\t\tSystem.out.println(\"Extracted percent: \" + populationExtractorProperties.getProperty(PROPERTY_FILES.EXTRACT_IPF_POPULATION_PROPERTIES.PERCENTAGE_PROPERTY));\n\t\t\n\t\tList<AbstractAttribute> attributes = extractedPopulation.getAttributes();\n\t\tSystem.out.println(\"Number of group attributes: \" + attributes.size());\n\t\tfor (AbstractAttribute attr : attributes) { System.out.println(\"\\t\" + attr.toString()); }\n\t\t\n\t\tString componentPopulationName = null;\n\t\tint totalNumberOfExtractedComponentEntities = 0;\n\t\tList<Entity> groupEntities = extractedPopulation.getEntities();\n\t\tfor (Entity gEntity : groupEntities) {\n\t\t\tfor (IPopulation componentPop : gEntity.getComponentPopulations()) { \n\t\t\t\ttotalNumberOfExtractedComponentEntities += componentPop.getNbOfEntities();\n\t\t\t\tif (componentPopulationName == null) { componentPopulationName = componentPop.getName(); }\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Component population name: \" + componentPopulationName);\n\t\tSystem.out.println(\"Total number of component entities: \" + totalNumberOfExtractedComponentEntities + \"\\n\");\n\t}", "public void GeneticAlgorithm (TableVar Variables, TableDat Examples, String nFile) {\r\n\r\n String contents;\r\n\r\n // Creates and initialices the population\r\n poblac = new Population(long_poblacion, Variables.getNVars(), RulesRep, Variables);\r\n poblac.RndInitPop (Variables);\r\n\r\n // Creates the populations \"Inter\" and \"Des\" to aply the genetic operations\r\n Inter = new Population(long_poblacion, Variables.getNVars(), RulesRep, Variables);\r\n Des = new Population(2*long_poblacion, Variables.getNVars(), RulesRep, Variables);\r\n \r\n // Inicialisation of variables\r\n Trials = 0;\r\n Gen = 0;\r\n\r\n // Evaluation of the individuals of the initial population\r\n Trials+=poblac.evalPop (this, Variables, Examples, false);\r\n \r\n // Increments the generation number\r\n Gen++; \r\n \r\n // General cycle of the genetic algorithm\r\n do {\r\n // Selection by Baker method\r\n if(RulesRep.compareTo(\"CAN\")==0)\r\n SelectCAN (Variables);\r\n else SelectDNF (Variables);\r\n\r\n // Crossover\r\n descendientes = 0;\r\n if(RulesRep.compareTo(\"CAN\")==0)\r\n MultipointCrossoverCAN (Variables);\r\n else MultipointCrossoverDNF (Variables);\r\n descendientes = 2;\r\n \r\n // Mutation\r\n if(RulesRep.compareTo(\"CAN\")==0)\r\n MutationCAN (Variables);\r\n else MutationDNF (Variables);\r\n\r\n // Reproduction\r\n if(RulesRep.compareTo(\"CAN\")==0)\r\n SteadyStepReproductionCAN(Variables);\r\n else SteadyStepReproductionDNF(Variables);\r\n\r\n // Evaluation of the new population\r\n Trials+=poblac.evalPop (this, Variables, Examples, false);\r\n\r\n // Next generation\r\n Gen++;\r\n\r\n // GA finishes when the number of evaluations is reached\r\n } while (Trials <= n_eval); \r\n\r\n contents = \" # \" + (Gen-1) + \" generations, \" + Trials + \" evaluations\\n\";\r\n Files.addToFile(nFile, contents);\r\n \r\n }", "private void getInitialGeneData(String fileName) {\n Scanner scanner = null;\n try {\n scanner = new Scanner(new FileReader(fileName));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n assert scanner != null;\n while (scanner.hasNextLine()) {\n String line = scanner.nextLine();\n String[] parts = line.split(\",\");\n String geneName = parts[0];\n int geneDuration = Integer.parseInt(parts[1]);\n Gene gene = new Gene(geneName, geneDuration);\n genes.put(geneName, gene);\n if (!durationGenes.containsKey(geneDuration)) {\n durationGenes.put(geneDuration, new ArrayList<String>() {{\n add(geneName);\n }});\n }\n else {\n ArrayList<String> temp = durationGenes.get(geneDuration);\n temp.add(geneName);\n }\n }\n }", "public void populateGrid(String fname) {\n\t\t// try open file as input stream\n\t\ttry (InputStream is = Files.newInputStream(Paths.get(fname));\n\t\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(is))) {\n\n\t\t\tString line = null;\n\t\t\tint row = 0;\n\n\t\t\t// read every line in the file\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tfor (int col = 0; col < line.length(); col++) {\n\t\t\t\t\t// parse number as integer\n\t\t\t\t\tint value = Integer.parseInt(line.charAt(col) + \"\");\n\t\t\t\t\tif (value == 0) {\n\t\t\t\t\t\tgrid[row][col] = new Variable(row, col, value);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tgrid[row][col] = new Variable(row, col, value, \n\t\t\t\t\t\t\t\tnew ArrayList<Integer>(Arrays.asList(value)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\trow++;\n\t\t\t}\n\n\t\t\t// if file can't be opened or not found\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(e);\n\t\t\tSystem.exit(0); \n\t\t}\n\t}", "private static void extractIpfPopulation(final String propertiesFilePath) throws Exception {\n\t\tProperties populationExtractorProperties = GenstarService.loadPropertyFile(propertiesFilePath);\n\t\t\n\t\t// 1. Generate the population\n\t\tIPopulation extractedPopulation = GenstarService.extractIpfSinglePopulation(populationExtractorProperties);\n\n\t\t// 2. Print population information\n\t\tSystem.out.println(\"Information of the extracted population\");\n\t\tSystem.out.println(\"Population name: \" + extractedPopulation.getName());\n\t\tSystem.out.println(\"Number of entities: \" + extractedPopulation.getNbOfEntities());\n\t\tSystem.out.println(\"Extracted percent: \" + populationExtractorProperties.getProperty(PROPERTY_FILES.EXTRACT_IPF_POPULATION_PROPERTIES.PERCENTAGE_PROPERTY));\n\t\t\n\t\tList<AbstractAttribute> attributes = extractedPopulation.getAttributes();\n\t\tSystem.out.println(\"Number of attributes: \" + attributes.size());\n\t\tfor (AbstractAttribute attr : attributes) { System.out.println(\"\\t\" + attr.toString()); }\n\t\t\n\t\tSystem.out.println(\"Please compare this information to the original population found in \" + populationExtractorProperties.getProperty(PROPERTY_FILES.EXTRACT_IPF_POPULATION_PROPERTIES.POPULATION_DATA_PROPERTY) + \"\\n\");\n\t}", "public void loadPlayers(String filename) throws IOException {\r\n //TODO:4\r\n // 1. use try-with-resources syntax to ensure the file is closed\r\n // 2. read the number of players, then read an empty line\r\n // 3. for each player:\r\n // 3.1 read playerName, gold, sciencePoint, productionPoint, numCities and numMinisters separated by blank characters.\r\n // 3.2 create a player of corresponding values\r\n // 3.3 for (int i=1; i<numCities; i++):\r\n // read population, troops, cropYields\r\n // create a corresponding city object and add to the player's city list\r\n // 3.4 for (int i=1; i<numMinisters; i++):\r\n // read type, intelligence, experience, leadership\r\n // use switch-case to create a corresponding minister object and add to the player's minister list\r\n // check for invalid formats and throw custom exceptions.\r\n // (When there is any invalid minister type, throw InvalidMinisterTypeException.\r\n // Only \"WarGeneral\", \"Scientist\" and \"Economist\" are allowed.)\r\n // 3.5 add the player to the ArrayList<Player> players\r\n // Hint: use add() method of ArrayList.\r\n players = new ArrayList<>();\r\n File inputFile = new File(filename);\r\n try(\r\n Scanner reader = new Scanner(inputFile);\r\n ) {\r\n int numOfPlayers = reader.nextInt();\r\n String line = \"\";\r\n for (int i = 0; i < numOfPlayers; i++) {\r\n String name = reader.next();\r\n int gold = reader.nextInt();\r\n int sciencePoint = reader.nextInt();\r\n int productionPoint = reader.nextInt();\r\n Player newPlayer = new Player(name, gold, sciencePoint, productionPoint);\r\n this.players.add(newPlayer);\r\n\r\n int numOfCity = reader.nextInt();\r\n int numOfMin = reader.nextInt();\r\n\r\n for (int j = 0; j < numOfCity; j++) {\r\n int cityID = reader.nextInt();\r\n String cName = reader.next();\r\n int pop = reader.nextInt();\r\n int troops = reader.nextInt();\r\n int cropYields= reader.nextInt();\r\n\r\n City temp = new City(cityID, cName, pop, troops, cropYields);\r\n this.players.get(i).getCities().add(temp);\r\n }\r\n\r\n for (int j = 0; j < numOfMin; j++) {\r\n String mName = reader.next();\r\n int intel = reader.nextInt();\r\n int exp = reader.nextInt();\r\n int lead = reader.nextInt();\r\n\r\n if (mName.equals(\"Scientist\")) {\r\n Scientist temp = new Scientist(intel, exp, lead);\r\n this.players.get(i).getMinisters().add(temp);\r\n }\r\n else if (mName.equals(\"Economist\")) {\r\n Economist temp = new Economist(intel, exp, lead);\r\n this.players.get(i).getMinisters().add(temp);\r\n }\r\n else if (mName.equals(\"WarGeneral\")) {\r\n WarGeneral temp = new WarGeneral(intel, exp, lead);\r\n this.players.get(i).getMinisters().add(temp);\r\n }\r\n else {\r\n throw new InvalidMinisterTypeException(\"Only \\\"WarGeneral\\\", \\\"Scientist\\\" and \\\"Economist\\\" are allowed\");\r\n }\r\n }\r\n }\r\n }\r\n }", "static void loadPgm() {\n String file;\n try {\n // Prompt for pgm\n System.out.print(\"Enter terrain file: \"); file = scan.nextLine();\n // Read pgm\n pgmInf = new PgmImageInfo( file );\n // More Interaction\n System.out.printf(\"Read terrain file: %d by %d, \", pgmInf.width, pgmInf.height );\n System.out.printf(\"height ranges from %d to %d.\\n\", 0, pgmInf.maxValue);\n }\n catch (Exception e) {\n System.out.println(\"readPgmFile: failed to read file! Error!: \" + e.getLocalizedMessage());\n loadPgm();\n }\n }", "public Generator(File world_path) throws FileNotFoundException, URISyntaxException{\n\t\tif(root_dir == null){\n\t\t\troot_dir = new File(Generator.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath()).getParentFile();\n\t\t\tSystem.out.println(root_dir.getPath());\n\t\t\tfirst_name_files = new File(root_dir.getPath()+\"/Data/name/first/\").listFiles();\n\t\t\t//System.out.println(first_name_files.getPath());\n\t\t\tlast_name_files = new File(root_dir.getPath()+\"/Data/name/last/\").listFiles();\n\t\t\t//System.out.println(last_name_files.getPath());\n\t\t\ttrait_files = new File(root_dir.getPath()+\"/Data/trait/\").listFiles();\n\t\t\t//System.out.println(root_dir.getPath());\n\t\t}\n\t\tScanner world_file = new Scanner(world_path);\n\t\tString temp = \"\";\n\t\t/*\n\t\t * Load Name files\n\t\t */\n\t\twhile(true){\n\t\t\ttemp = world_file.nextLine();\n\t\t\tString[] curr_line = temp.split(\"\\t+\");\n\t\t\tif(curr_line[0].equals(\"TRAITS:\")) break;\n\t\t\tcurr_line[0]+=\".txt\";\n\t\t\tint prob = curr_line.length > 1 ? Integer.parseInt(curr_line[1]) : 1;\n\t\t\tfor(File i : first_name_files){\n\t\t\t\tif (i.getName().equals(curr_line[0])){\n\t\t\t\t\tFile first = i;\n\t\t\t\t\tFile second = null;\n\t\t\t\t\tfor(File j : last_name_files)\n\t\t\t\t\t\tif(j.getName().equals(curr_line[0])){\n\t\t\t\t\t\t\tsecond = j;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\tnames.addReader(new FileReader.NameReader(first, second), prob);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tattributes.add(\"Name\");\n\t\tattributes.add(\"Gender\");\n\t\tattributes.add(\"Ethnicity\");\n\t\t/*\n\t\t * Load Trait files \n\t\t */\n\t\twhile(world_file.hasNext()){\n\t\t\ttemp =world_file.next();\n\t\t\tattributes.add(temp);\n\t\t\ttemp+=\".txt\";\n\t\t\tfor(File i : trait_files){\n\t\t\t\tif(i.getName().equals(temp)){\n\t\t\t\t\ttraits.add(new FileReader.TraitReader(i));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private static void populateDataStructures(\r\n final String filename,\r\n final Map<String, List<String>> sessionsFromCustomer,\r\n Map<String, List<View>> viewsFromSessions,\r\n Map<String, List<Buy>> buysFromSessions\r\n\r\n /* add parameters as needed */\r\n )\r\n throws FileNotFoundException\r\n {\r\n try (Scanner input = new Scanner(new File(filename)))\r\n {\r\n processFile(input, sessionsFromCustomer,\r\n viewsFromSessions, buysFromSessions\r\n /* add arguments as needed */ );\r\n }\r\n }", "Chromosome from(List<Chromosome> population);", "int load( String geneFile, String taxonName ) throws Exception;", "public void printPopulationToFile(int i) throws IOException {\n\t\tFileWriter fstream;\n\t\tBufferedWriter out;\n\n\t\tFile f = new File(FILENAME);\n\t\tif (!f.isFile()) {\n\t\t\ttry { // Create file\n\t\t\t\tfstream = new FileWriter(FILENAME);\n\t\t\t\tout = new BufferedWriter(fstream);\n\t\t\t\tout.write(\"Generation: \" + i + \"\\r\\n\");\n\n\t\t\t\tfor (AI ai : this.individuals) {\n\t\t\t\t\tout.write(ai.toString() + \"\\r\\n\");\n\t\t\t\t}\n\t\t\t\t// Close the output stream\n\t\t\t\tout.close();\n\t\t\t} catch (Exception e) { // Catch exception if any\n\t\t\t\tSystem.err.println(\"Error: \" + e.getMessage());\n\t\t\t}\n\t\t} else {\n\t\t\ttry { // append to file if file already exists\n\t\t\t\tfstream = new FileWriter(FILENAME, true);\n\t\t\t\tout = new BufferedWriter(fstream);\n\t\t\t\tout.write(\"Generation: \" + i + \"\\r\\n\");\n\t\t\t\tfor (AI ai : this.individuals) {\n\t\t\t\t\tout.write(ai.toString() + \"\\r\\n\");\n\t\t\t\t}\n\t\t\t\tout.close();\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.err.println(\"Error: \" + e.getMessage());\n\t\t\t}\n\t\t}\n\t}", "private static void generate_potions_list(File fp) {\r\n\t\tpotions_database = new ArrayList<Potion>();\r\n\t\tString line;\r\n\t\tString[] potion_info;\r\n\t\tString[] ingredients = new String[2]; //2 ingredients per potion\r\n\t\t\r\n\t\ttry {\r\n\t\t\tScanner scnr = new Scanner(fp);\r\n\r\n\t\t\twhile(scnr.hasNextLine()) {\r\n\t\t\t\tline = scnr.nextLine();\r\n\t\t\t\tpotion_info = line.split(line,',');\r\n\t\t\t\tingredients[0] = potion_info[1];\r\n\t\t\t\tingredients[1] = potion_info[2];\r\n\t\t\t\t\r\n\t\t\t\tPotion pot = new Potion(potion_info[0], ingredients, Integer.parseInt(potion_info[3]));\r\n\t\t\t\tpotions_database.add(pot);\r\n\t\t\t}\r\n\t\t\tscnr.close();\r\n\t\t} catch(FileNotFoundException e) {\r\n\t\t\tSystem.out.println(\"The file was not located. Check file name.\");\r\n\t\t}\r\n\t\t\r\n\t\t//sort the database by potion value\r\n\t\tCollections.sort(potions_database, new PotionComparator());\r\n\t\t\r\n\t}", "public void genPopulation(int howMany)\r\n/* 30: */ {\r\n/* 31:54 */ this.pop.removeAllElements();\r\n/* 32:55 */ for (int i = 0; i < howMany; i++)\r\n/* 33: */ {\r\n/* 34:61 */ int[] clusterV = g.genRandomClusterSize();\r\n/* 35:62 */ Cluster c = new Cluster(g, clusterV);\r\n/* 36:63 */ this.pop.addElement(c);\r\n/* 37: */ }\r\n/* 38: */ }", "public void initializePopulation(){\n\t\t// create the population\n\t\tfor(int i = 0; i < POPULATION_SIZE; i++){\n\t\t\t// get a random length for the building sequence\n\t\t\tint randArraySize = randomGenerator.nextInt(possiblePieces.length-1)+1;\n\t\t\t\n\t\t\tBuildingPiece[] pieceSequence = new BuildingPiece[randArraySize];\n\t\t\tfor(int j = 0; j < randArraySize; j++){\n\t\t\t\t// get a random possible piece and insert it into the sequence\n\t\t\t\tint randIndex = randomGenerator.nextInt(possiblePieces.length);\n\t\t\t\tpieceSequence[j] = possiblePieces[randIndex];\n\t\t\t}\n\t\t\t\n\t\t\t/* add a new number sequence with the newly created \n\t\t\t * sequence from the input */\n\t\t\tpopulation.add(new Building(pieceSequence, generation, possiblePieces));\n\t\t}\n\t}", "public PuzzleGrid( String filename)\n\t{\n\t loadGridFromFile( filename );\n\t}", "private void BuildFromFile(String Filename)\n\t{\n\t\tDataSetBuilder<t> dsb = new DataSetBuilder<t>(\"iris.data\");\n\t\t_data = dsb.getDataMembers();\n\t\t\n\t\t//Set reference to null to queue for garbage collection and to ensure the source file gets closed\n\t\tdsb = null;\n\t}", "public void generatePopulation() {\n\t\t\n\t\tif (SCType.getScLayers() <= 2)\n\t\t\tLogger.logError(\"To few supply chain layers, minimum of 3 required:\" + SCType.getScLayers());\n\t\t\n\t\tArrayList<CountryAgent> countryAgents = SU.getObjectsAll(CountryAgent.class);\t\t\n\t\tfor (CountryAgent country : countryAgents) {\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.PRODUCER)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_PRODUCERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.PRODUCER);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.INTERNATIONAL)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_INTERNATIONALS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.INTERNATIONAL);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.WHOLESALER)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_WHOLESALERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.WHOLESALER);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.RETAIL)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_RETAILERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.RETAIL);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.CONSUMER)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_CONSUMERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.CONSUMER);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Set possible new suppliers and clients\n\t\tfor (BaseAgent agent : SU.getObjectsAll(BaseAgent.class)) {\n\t\t\tagent.setPossibleNewSuppliersAndClients();\n\t\t}\n\t\t\n\t\tSU.getDataCollector().addAllCurrentStock();\n\t}", "public static void main(String [ ] args)\n\t{\n\t\ttry\n\t\t{\n\t\t\t//Parse command line arguments\n String organism = null; //The target organism for the simulation, determines the genome data that will be parsed\n if(args[0].equals(\"Hum\"))\n organism = \"Homo sapiens\";\n else if(args[0].equals(\"Mou\"))\n organism = \"Mus musculus\";\n else if(args[0].equals(\"Test\"))\n organism = \"Test test\";\n else\n printString(\"Please check and provide a valid organism name as the first input argument!\");\n \n int sex = 0;\n if(args[1].equals(\"F\"))\n sex = FEMALE;\n else if(args[1].equals(\"M\"))\n sex = MALE;\n else\n printString(\"Please check that you provided 'F' or 'M' for gender!\");\n \n final int INITIAL_POPULATION_SIZE = Integer.parseInt(args[2]);\n final int SIM_DURATION = Integer.parseInt(args[3]);\n final int TIME_INTERVAL = 24;//Integer.parseInt(args[4]);\n \n \n /******************************************************\n * Read the genome_data file to obtain data on the size \n * of each chromosome. Store this data in a String list.\n * Each line stores the integer sizes of each chromosome \n * pair, e.g for an organism of haploid# = 3;\n * chr1 133797422,133797422\n * chr2 242508799,242508799\n * XY 198450956,130786757 <==The last line will have\n * two different values for\n * males (XY instead of XX)\n *\n */\n File genome_data_file = new File (\"Genome_data.txt\");\n genome_data = importGenomeData(genome_data_file, organism, sex);\n \n //printString(Integer.toString(genome_data.size()));\n //for(Iterator<String> i = genome_data.iterator(); i.hasNext();)\n //{\n //String item = i.next();\n //System.out.println(item);\n //}\n /******************************************************/\n \n List<Cell> cell_population = initiatePopulation(INITIAL_POPULATION_SIZE); //Initialise a population to be used at the start of the simulation\n \n //Run the simulation executive, providing the duration to run the simulation for, the time intervals at which events are evaluated and the initial cell population to perform the simulation of proliferation on\n cell_population = runSimulationExecutive(SIM_DURATION, TIME_INTERVAL, cell_population);\n //printLabelDistribOfPopulation(cell_population);\n generateOutput(cell_population, genome_data);\n\n\n }\n\t\tcatch (NumberFormatException|IOException error)\n\t\t{\n\t\t\t//int missing_argument = Integer.parseInt(error.getMessage()) + 1;\n\t\t\t//print(\"Argument number \" + missing_argument + \" missing! Enter the correct number of arguments.\"); // Print error message on console if there are missing arguments\n\t\t\tprintString(\"Oops! Something is wrong with the input values you provided. Check that you have entered the correct number, and types of arguments. Error type => \" + error.getMessage());\n //Catch null pointer exceptions!!!\n\t\t}// try-catch\n\n\t\t//****************************************\n\t\t//1. Set a max time to run simulation\n\t\t//2. Set time intervals\n\t\t//3. Vars for fraction_dividing_cells, rate_cell_death, doubling_time/division_rate\n\t\t//4. Don't use a static variable for current_timepoint. Provide this value each time you deal with a cell, i.e in the for loop\n\t\t//5. cell_cycle_duration\n\t //6. cell_cycle_frequency\n\t \n\t\t\n\t\t//***Maybe store all generations in single rows/columns of a two dimensional array?\n\t\t\n\t}", "@Test public void readFileTest() throws FileNotFoundException\n {\n PentagonalPyramid[] pArray = new PentagonalPyramid[100];\n PentagonalPyramid p1 = new PentagonalPyramid(\"PP1\", 1, 2);\n PentagonalPyramid p2 = new PentagonalPyramid(\"PP1\", 2, 3);\n PentagonalPyramid p3 = new PentagonalPyramid(\"PP1\", 3, 4);\n pArray[0] = p1;\n pArray[1] = p2;\n pArray[2] = p3;\n \n PentagonalPyramidList2 pList = new PentagonalPyramidList2(\"ListName\", \n pArray, 3);\n \n pList = pList.readFile(\"PentagonalPyramid_data_1.txt\");\n Assert.assertEquals(\"readFile Test\", \n \"PentagonalPyramid Test List\", pList.getName());\n }", "public void read()\r\n {\r\n String line = \"\";\r\n int numberOfLine = 0;\r\n BufferedReader input;\r\n \r\n try\r\n {\r\n input = new BufferedReader (new FileReader (\"Countries-Population.txt\"));\r\n \r\n //loop for as long as there is data in the file\r\n while (line != null)\r\n {\r\n line = input.readLine (); //reads each line in the file\r\n numberOfLine++;\r\n }\r\n input.close (); //closes the stream\r\n }\r\n catch (IOException e)\r\n {\r\n JOptionPane.showMessageDialog (null, \"Sorry, this file cannot be found. Please enter a different file name.\"); //error message\r\n }\r\n \r\n //create array with size to match number of lines in file\r\n String[] linesFile = new String [numberOfLine - 1], countryStr = new String[numberOfLine-1], capitalStr = new String[numberOfLine-1]; \r\n int[] intArray = new int[numberOfLine - 1];\r\n double[] doubleArray = new double[numberOfLine - 1];\r\n \r\n try\r\n {\r\n //open the same file again\r\n BufferedReader r = new BufferedReader (new FileReader (\"Countries-Population.txt\")); // reset the buffer\r\n int x = 0;\r\n \r\n while (x < numberOfLine - 1) //loop until end of file is reached\r\n {\r\n linesFile [x] = r.readLine (); //feed each data line into an array\r\n x++;\r\n }\r\n \r\n String []ppltnStr = new String[numberOfLine-1];\r\n String [] areaStr = new String[numberOfLine-1];\r\n \r\n //works backwards and extracts the data part by part\r\n for(int i = 0; i<linesFile.length; i++)\r\n {\r\n if(linesFile[i].charAt(linesFile[i].length()- 1) != ' ') //no space exceptions - some lines don't have spaces at the end\r\n {\r\n //finds the the last space to the last character, which is the population\r\n ppltnStr[i] = linesFile[i].substring(linesFile[i].lastIndexOf(' '), linesFile[i].length());\r\n ppltnStr[i] = ppltnStr[i].replaceAll(\"[, ]\", \"\"); //remove the commas and spaces\r\n \r\n linesFile[i] = linesFile[i].substring(0, linesFile[i].lastIndexOf(' ')); //removes the population from the line\r\n \r\n //finds the the last space to the last character, which is the area\r\n areaStr[i] = linesFile[i].substring(linesFile[i].lastIndexOf(' '), linesFile[i].length());\r\n areaStr[i] = areaStr[i].replaceAll(\"[, ]\", \"\");\r\n \r\n linesFile[i] = linesFile[i].substring(0, linesFile[i].lastIndexOf(' ')); //removes the area\r\n }\r\n else //has space\r\n {\r\n //finds the the second last space to the last space, which is the population\r\n ppltnStr[i] = linesFile[i].substring(linesFile[i].lastIndexOf(' ', linesFile[i].lastIndexOf(' ') - 1), linesFile[i].length()); \r\n ppltnStr[i] = ppltnStr[i].replaceAll(\"[, ]\", \"\"); //remove the commas and spaces\r\n \r\n linesFile[i] = linesFile[i].substring(0, linesFile[i].lastIndexOf(' ', linesFile[i].lastIndexOf(' ') - 1) + 1); //removes the population from the line\r\n \r\n //finds the the second last space to the last space for the new line, which is the area\r\n areaStr[i] = linesFile[i].substring(linesFile[i].lastIndexOf(' ', linesFile[i].lastIndexOf(' ') - 1), linesFile[i].length());\r\n areaStr[i] = areaStr[i].replaceAll(\"[, ]\", \"\");\r\n \r\n linesFile[i] = linesFile[i].substring(0, linesFile[i].lastIndexOf(' ', linesFile[i].lastIndexOf(' ') - 1) + 1); //removes the area\r\n }\r\n }\r\n \r\n //parses the string array into an integer array\r\n for (int i = 0 ; i < numberOfLine - 1 ; i++)\r\n {\r\n intArray [i] = Integer.parseInt (ppltnStr [i]);\r\n doubleArray [i] = Double.parseDouble (areaStr [i]);\r\n }\r\n \r\n //hardcodes the exceptions of multi-word capitals/countries\r\n for(int i = 0; i<linesFile.length;i++)\r\n {\r\n String[] lol= linesFile[i].split(\" \"); //stores the parts of the line in lol\r\n if(lol.length == 2) //has to be one or the other\r\n {\r\n if(lol[0].substring(0, 3).equals(\"Vat\")|| lol[0].substring(0, 3).equals(\"Wes\")) //exceptions\r\n {\r\n countryStr[i] = lol[0] + \" \" + lol[1];\r\n capitalStr[i] = null;\r\n }\r\n else\r\n {\r\n countryStr[i] = lol[0];\r\n capitalStr[i] = lol[1];\r\n }\r\n }\r\n else if(lol.length == 3) //3 words\r\n {\r\n if(lol[0].substring(0, 2).equals(\"Uk\") || lol[0].substring(0, 2).equals(\"Be\")|| lol[0].substring(0, 2).equals(\"In\") || lol[0].substring(0, 2).equals(\"Et\")\r\n || lol[0].substring(0, 2).equals(\"Ar\")|| lol[0].substring(0, 3).equals(\"Cam\")|| lol[0].substring(0, 2).equals(\"Bo\")\r\n || lol[0].charAt(0)=='G'|| lol[0].substring(0, 2).equals(\"Ku\")|| lol[0].substring(0, 2).equals(\"Mo\")|| lol[0].substring(0, 2).equals(\"Pa\")\r\n || lol[0].substring(0, lol[0].length()).equals(\"Malaysia\")|| lol[0].substring(0, lol[0].length()).equals(\"Malaysia\")\r\n || lol[0].substring(0, lol[0].length()).equals(\"Mexico\")|| lol[0].substring(0, lol[0].length()).equals(\"Mauritius\")) //1 word country\r\n {\r\n countryStr[i] = lol[0];\r\n capitalStr[i] = lol[1] + \" \" + lol[2];\r\n }\r\n else //2 word country\r\n {\r\n countryStr[i] = lol[0] + \" \" + lol[1];\r\n capitalStr[i] = lol[2];\r\n }\r\n }\r\n else if(lol.length == 4) //4 words\r\n {\r\n if(lol[0].substring(0, 2).equals(\"An\") || lol[0].substring(0, 2).equals(\"Br\")) //1 word country\r\n {\r\n countryStr[i] = lol[0];\r\n capitalStr[i] = lol[1] + \" \" + lol[2] + \" \" + lol[3];\r\n }\r\n else if(lol[0].substring(0, 2).equals(\"Ce\") || lol[0].substring(0, lol[0].length()).equals(\"Congo,\") || lol[0].substring(0, 2).equals(\"Tr\")\r\n || lol[0].substring(0, 2).equals(\"Bo\")) //3 word country\r\n {\r\n countryStr[i] = lol[0] + \" \" + lol[1] + \" \" + lol[2];\r\n capitalStr[i] = lol[3];\r\n }\r\n else //2 word country\r\n {\r\n countryStr[i] = lol[0] + \" \" + lol[1];\r\n capitalStr[i] = lol[2] + \" \" + lol[3];\r\n }\r\n }\r\n else if(lol.length == 5) //5 words\r\n {\r\n if(lol[0].substring(0, 2).equals(\"St\")) //4 word country\r\n {\r\n countryStr[i] = lol[0] + \" \" + lol[1] + \" \" + lol[2]+ \" \" + lol[3];\r\n capitalStr[i] = lol[4];\r\n }\r\n else //3 word country\r\n {\r\n countryStr[i] = lol[0] + \" \" + lol[1] + \" \" + lol[2];\r\n capitalStr[i] = lol[3]+ \" \" + lol[4];\r\n }\r\n }\r\n else //6 word country\r\n {\r\n if(lol[0].substring(0, 2).equals(\"Sã\")) //4 word country\r\n {\r\n countryStr[i] = lol[0] + \" \" + lol[1] + \" \" + lol[2]+ \" \" + lol[3];\r\n capitalStr[i] = lol[4]+ \" \" +lol[5];\r\n }\r\n else //5 word country\r\n {\r\n countryStr[i] = lol[0] + \" \" + lol[1] + \" \" + lol[2]+ \" \" + lol[3]+ \" \" +lol[4];\r\n capitalStr[i] = lol[5];\r\n }\r\n }\r\n }\r\n r.close (); //close data file\r\n }\r\n catch (IOException e) //handle file related errors\r\n {\r\n System.out.println (e); //error msg\r\n }\r\n catch (NumberFormatException e) //error trap\r\n {\r\n JOptionPane.showMessageDialog (null, \"The file is corrupt because it contains non-integer data. Please try again!\"); //error message\r\n }\r\n population = intArray; //sets the local array equal to the global array so that other methods can process it\r\n area = doubleArray;\r\n countries = countryStr;\r\n capital = capitalStr;\r\n }", "private void populateItems() {\n \t try {\n \t File myObj = new File(\"items.txt\");\n \t Scanner myReader = new Scanner(myObj);\n \t while (myReader.hasNextLine()) {\n\t \t String data = myReader.nextLine();\n\t \t String[] variables = data.split(\",\");\n\t \t int price = (int) Math.floor(Math.random() * 100); \n\t \t \n\t \t itemList += variables[0] + \",\"+ variables[1] +\",\" + \"0\" + \", \"+ \",\"+price + \",\";\n\t \t Item x = new Item(variables[0], 0, \"\", price, variables[1]);\n\t \t items.add(x);\n \t }\n \t myReader.close();\n \t } catch (FileNotFoundException e) {\n \t System.out.println(\"An error occurred.\");\n \t e.printStackTrace();\n \t }\n\t\t\n\t}", "static Room randomWorld(String fileName, Random rand) throws IOException {\n Scanner fileIn = new Scanner(new File(fileName));\n ArrayList<Room> rooms = new ArrayList<Room>();\n \n // first create the rooms and their content - first room is the entrance room\n Room entrance = new Room(fileIn.nextLine());\n addStuff(entrance, fileIn);\n rooms.add(entrance);\n \n // add more rooms\n while (fileIn.hasNextLine()) {\n String name = fileIn.nextLine();\n if (name.equals(\"*****\")) break; // YUK!\n else {\n Room room = new Room(name);\n addStuff(room, fileIn);\n rooms.add(room); \n }\n }\n \n // now connect the rooms randomly\n for (Room room : rooms) {\n room.connectNorth(rooms.get(rand.nextInt(rooms.size())));\n room.connectEast(rooms.get(rand.nextInt(rooms.size())));\n room.connectSouth(rooms.get(rand.nextInt(rooms.size())));\n room.connectWest(rooms.get(rand.nextInt(rooms.size())));\n } \n return entrance; \n }", "static Room randomWorld(String fileName, Random rand) throws IOException {\n Scanner fileIn = new Scanner(new File(fileName));\n ArrayList<Room> rooms = new ArrayList<Room>();\n \n // first create the rooms and their content - first room is the entrance room\n Room entrance = new Room(fileIn.nextLine());\n addStuff(entrance, fileIn);\n rooms.add(entrance);\n \n // add more rooms\n while (fileIn.hasNextLine()) {\n String name = fileIn.nextLine();\n if (name.equals(\"*****\")) break; // YUK!\n else {\n Room room = new Room(name);\n addStuff(room, fileIn);\n rooms.add(room); \n }\n }\n \n // now connect the rooms randomly\n for (Room room : rooms) {\n room.connectNorth(rooms.get(rand.nextInt(rooms.size())));\n room.connectEast(rooms.get(rand.nextInt(rooms.size())));\n room.connectSouth(rooms.get(rand.nextInt(rooms.size())));\n room.connectWest(rooms.get(rand.nextInt(rooms.size())));\n } \n return entrance; \n }", "@SuppressWarnings(\"resource\")//I ADDED\n\tpublic static CensusData parse(String filename) {\n\t\tCensusData result = new CensusData();\n\t\t\n try {\n BufferedReader fileIn = new BufferedReader(new FileReader(filename));\n \n // Skip the first line of the file\n // After that each line has 7 comma-separated numbers (see constants above)\n // We want to skip the first 4, the 5th is the population (an int)\n // and the 6th and 7th are latitude and longitude (floats)\n // If the population is 0, then the line has latitude and longitude of +.,-.\n // which cannot be parsed as floats, so that's a special case\n // (we could fix this, but noisy data is a fact of life, more fun\n // to process the real data as provided by the government)\n \n String oneLine = fileIn.readLine(); // skip the first line\n\n // read each subsequent line and add relevant data to a big array\n while ((oneLine = fileIn.readLine()) != null) {\n String[] tokens = oneLine.split(\",\");\n if(tokens.length != TOKENS_PER_LINE)\n \tthrow new NumberFormatException();\n int population = Integer.parseInt(tokens[POPULATION_INDEX]);\n if(population != 0)\n \tresult.add(population,\n \t\t\t Float.parseFloat(tokens[LATITUDE_INDEX]),\n \t\t Float.parseFloat(tokens[LONGITUDE_INDEX]));\n }\n\n fileIn.close();\n } catch(IOException ioe) {\n System.err.println(\"Error opening/reading/writing input or output file.\");\n System.exit(1);\n } catch(NumberFormatException nfe) {\n System.err.println(nfe.toString());\n System.err.println(\"Error in file format\");\n System.exit(1);\n }\n return result;\n\t}", "protected void loadPopulationIntoDatabase(IPopulation<? extends ADemoEntity, Attribute<? extends IValue>> pop) {\n\t\tassert this.connection != null;\n\t\tassert pop != null;\n\t\t\n\t\t// create the attributes \n\t\t// we don't know the entity type for this population\n\t\tString entityType = DEFAULT_ENTITY_TYPE;\n\t\tthis.entityType2attributes.put(entityType, new HashSet<>(pop.getPopulationAttributes()));\n\t\t\n\t\t// create internal structure\n\t\ttry {\n\t\t\tcreateInitialTables();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new RuntimeException(\"error creating the tables to store the population in database: \"+e.getMessage(), e);\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tstoreEntities(entityType, pop);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new RuntimeException(\"error while inserting the population in database: \"+e.getMessage(), e);\n\t\t\t\n\t\t}\n\t}", "private void readFileAndStoreData_(String fileName) {\n In in = new In(fileName);\n int numberOfTeams = in.readInt();\n int teamNumber = 0;\n while (!in.isEmpty()) {\n assignTeam_(in, teamNumber);\n assignTeamInfo_(in, numberOfTeams, teamNumber);\n teamNumber++;\n }\n }", "public static void readProperties(String propFilename){\n\t\tString propertiesFilename = propFilename;\n\t\tProperties properties = new Properties();\n\n\t\tFileInputStream in;\n\t\ttry {\n\t\t\tin = new FileInputStream(propertiesFilename);\n\t\t\tproperties.load(in);\n\t\t\tin.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error reading properties \"+propertiesFilename);\n\t\t\tSystem.exit(1);\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tString path=\"Not set\";\n\t\tint popSize=0;\n\t\tint features=0;\n\t\tint maxGenerations=0;\n\t\tboolean log=false;\n\t\tboolean debug=false;\n\t\tboolean printbest=false;\n\t\tboolean cwd=false;\n\t\tboolean arrcache=false;\n\t\tdouble addSubRangeH;\n\t\tdouble divMultRangeH;\n\t\tdouble randomThicknessRange;\n\t\tdouble randomVelocityRange;\n\n\t\tdouble addSubRangeVS;\n\t\tdouble divMultRangeVS;\n\n\t\tint zThreshold=0;\n\t\tboolean useThreshold = true;\n\n\tif(properties.containsKey(\"path\")){\n\t\tpath = ((String)properties.get(\"path\"));\n\t\tif(properties.containsKey(\"cwd\")){\n\t\t\tcwd = Boolean.parseBoolean((String)properties.get(\"cwd\"));\n\t\t}\n\t\tc.path=path;\n\t\tc.setPaths(cwd);\n\t}else{\n\t\tSystem.out.println(\"Path : \"+path);\n\t\tSystem.exit(1);\n\t}if(properties.containsKey(\"populationSize\")){\n\t\tpopSize = Integer.parseInt((String)properties.get(\"populationSize\"));\n\t\tc.populationSize =popSize;\n\t}if(properties.containsKey(\"printBest\")){\n\t\tprintbest = Boolean.parseBoolean((String)properties.get(\"printBest\"));\n\t\tc.printBest=printbest;\n\t}if(properties.containsKey(\"maxGenerations\")){\n\t\tmaxGenerations = Integer.parseInt((String)properties.get(\"maxGenerations\"));\n\t\tc.maxGenerations=maxGenerations;\n\t}if(properties.containsKey(\"log\")){\n\t\tlog = Boolean.parseBoolean((String)properties.get(\"log\"));\n\t\tc.log=log;\n\t}if(properties.containsKey(\"debug\")){\n\t\tdebug = Boolean.parseBoolean((String)properties.get(\"debug\"));\n\t\tc.debug=debug;\n\t}if(properties.containsKey(\"features\")){\n\t\tfeatures = Integer.parseInt((String)properties.get(\"features\"));\n\t\tc.features=features;\n\t}if(properties.containsKey(\"addSubRangeH\")){\n\t\taddSubRangeH = Double.parseDouble((String)properties.get(\"addSubRangeH\"));\n\t\tc.addSubRangeH=addSubRangeH;\n\t}if(properties.containsKey(\"addSubRangeVS\")){\n\t\taddSubRangeVS = Double.parseDouble((String)properties.get(\"addSubRangeVS\"));\n\t\tc.addSubRangeVS=addSubRangeVS;\n\t}if(properties.containsKey(\"divMultRangeH\")){\n\t\tdivMultRangeH = Double.parseDouble((String)properties.get(\"divMultRangeH\"));\n\t\tc.divMultRangeH=divMultRangeH;\n\t}if(properties.containsKey(\"divMultRangeVS\")){\n\t\tdivMultRangeVS = Double.parseDouble((String)properties.get(\"divMultRangeVS\"));\n\t\tc.divMultRangeVS=divMultRangeVS;\n\t}if(properties.containsKey(\"randomThicknessRange\")){\n\t\trandomThicknessRange = Double.parseDouble((String)properties.get(\"randomThicknessRange\"));\n\t\tc.randomThicknessRange=randomThicknessRange;\n\t}if(properties.containsKey(\"randomVelocityRange\")){\n\t\trandomVelocityRange = Double.parseDouble((String)properties.get(\"randomVelocityRange\"));\n\t\tc.randomVelocityRange=randomVelocityRange;\n\t}if(properties.containsKey(\"zThreshold\")){\n\t\tzThreshold = Integer.parseInt((String)properties.get(\"zThreshold\"));\n\t\tc.zThreshold=zThreshold;\n\t}if(properties.containsKey(\"useThreshold\")){\n\t\tuseThreshold = Boolean.parseBoolean((String)properties.get(\"useThreshold\"));\n\t\tc.useThreshold=useThreshold;\n\t}\n\n\tSystem.out.println(\" Debug? \"+debug + \" | Log? \"+ log + \" | printBest? \"+ printbest);\n\tSystem.out.println(\"Pop: \"+c.populationSize+\" | Max Gens: \"+ maxGenerations+ \"\\nPath: \"+c.path);\n\tSystem.out.println(\"randomThicknessRange :\"+c.randomThicknessRange+\" randomVelocityRange :\"+c.randomVelocityRange);\n\tSystem.out.println(\"AddSubRange H :\"+c.addSubRangeH+\" VS :\"+c.addSubRangeVS);\n\tSystem.out.println(\"divMultRange H :\"+c.divMultRangeH+\" VS :\"+c.divMultRangeVS);\n\tSystem.out.println(\"Threshold ? \"+c.useThreshold+\" : \"+c.zThreshold);\n\t}", "private List<String> generateSquareStructureFromFile(String path) {\n Scanner scanner;\n List<String> readInput;\n InputStream inputStream = getClass().getResourceAsStream(path);\n scanner = new Scanner(inputStream);\n readInput = new ArrayList<>();\n\n while (scanner.hasNextLine()) {\n readInput.add(scanner.nextLine());\n }\n scanner.close();\n\n roomsToBuild = new ArrayList<>();\n squares = new ArrayList<>();\n spawnPoints = new ArrayList<>();\n for(int i = 0; i<readInput.size(); i++){\n if(i%2 == 0)\n squares.add(new ArrayList<>());\n }\n\n int row = 0;\n int col;\n char c;\n String s;\n while(row < readInput.size()){\n col = 0;\n while(col < readInput.get(row).length()){\n c = readInput.get(row).charAt(col);\n s = String.valueOf(c).toLowerCase();\n\n if(c=='R'||c=='B'||c=='Y'||c=='G'||c=='W'||c=='P') {\n SpawnPoint tempSquare = new SpawnPoint(row/2, col/2, Color.fromString(s));\n squares.get(row/2).add(tempSquare);\n spawnPoints.add(tempSquare);\n if(!roomsToBuild.contains(Color.fromString(s)))\n roomsToBuild.add(Color.fromString(s));\n }\n else if(c=='r'||c=='b'||c=='y'||c=='g'||c=='w'||c=='p'){\n squares.get(row/2).add(new Square(row/2, col/2, Color.fromString(s)));\n if(!roomsToBuild.contains(Color.fromString(s)))\n roomsToBuild.add(Color.fromString(s));\n }\n else if(c==' ' && row%2==0 && col%2==0){\n squares.get(row/2).add(null);\n }\n //update max\n if(row/2 + 1> numRow)\n numRow = row/2 + 1;\n if(col/2 + 1> numCol)\n numCol = col/2 + 1;\n col++;\n }\n row++;\n }\n\n return readInput;\n\n }", "@Test public void testCreateIpfGenerationRule(@Mocked final IScope scope, @Mocked final FileUtils fileUtils) throws GenstarException {\n\t\t\n\t\t\n\t\tfinal String attributesFilePath = \"test_data/ummisco/genstar/gama/GamaGenstarUtilsTest/testCreateIpfGenerationRule/attributes.csv\";\n\t\tfinal String sampleFilePath = \"test_data/ummisco/genstar/gama/GamaGenstarUtilsTest/testCreateIpfGenerationRule/sample_data.csv\";\n\t\tfinal String controlledAttributesFilePath = \"test_data/ummisco/genstar/gama/GamaGenstarUtilsTest/testCreateIpfGenerationRule/controlled_attributes.csv\";\n\t\tfinal String controlTotalsFilePath = \"test_data/ummisco/genstar/gama/GamaGenstarUtilsTest/testCreateIpfGenerationRule/control_totals.csv\";\n\t\tfinal String supplementaryAttributesFilePath = \"test_data/ummisco/genstar/gama/GamaGenstarUtilsTest/testCreateIpfGenerationRule/supplementary_attributes.csv\";\n\t\t \n\t\t\n\t\tnew Expectations() {{\n\t\t\tFileUtils.constructAbsoluteFilePath(scope, anyString, true);\n\t\t\tresult = new Delegate() {\n\t\t\t\tString delegate(IScope scope, String filePath, boolean mustExist) {\n\t\t\t\t\tif (filePath.endsWith(\"/attributes.csv\")) { return attributesFilePath; }\n\t\t\t\t\tif (filePath.endsWith(\"/sample_data.csv\")) { return sampleFilePath; }\n\t\t\t\t\tif (filePath.endsWith(\"/controlled_attributes.csv\")) { return controlledAttributesFilePath; }\n\t\t\t\t\tif (filePath.endsWith(\"/control_totals.csv\")) { return controlTotalsFilePath; }\n\t\t\t\t\tif (filePath.endsWith(\"/supplementary_attributes.csv\")) { return supplementaryAttributesFilePath; }\n\t\t\t\t\t\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t};\n\t\t}};\n\t\t\n\t\t\n\t\tString ruleName = \"dummy rule\";\n\t\t\n\t\tProperties ipfPopulationProperties = null;\n\t\tFile ipfPopulationPropertiesFile = new File(\"test_data/ummisco/genstar/gama/GamaGenstarUtilsTest/testCreateIpfGenerationRule/IpfPopulationProperties.properties\");\n\t\ttry {\n\t\t\tFileInputStream propertyInputStream = new FileInputStream(ipfPopulationPropertiesFile);\n\t\t\tipfPopulationProperties = new Properties();\n\t\t\tipfPopulationProperties.load(propertyInputStream);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tthrow new GenstarException(e);\n\t\t} catch (IOException e) {\n\t\t\tthrow new GenstarException(e);\n\t\t}\n\n\t\t\n\t\tSampleBasedGenerator generator = new SampleBasedGenerator(\"dummy generator\");\n\t\t\n\t\tGenstarCsvFile attributesFile = new GenstarCsvFile(attributesFilePath, true);\n\t\tAttributeUtils.createAttributesFromCsvFile(generator, attributesFile);\n\t\t\n\t\tDeprecatedGamaGenstarUtils.createIpfGenerationRule(scope, generator, ruleName, ipfPopulationProperties);\n\t\t\n\t\tassertTrue(generator.getGenerationRule() instanceof IpfGenerationRule);\n\n\t\tIpfGenerationRule generationRule = (IpfGenerationRule) generator.getGenerationRule();\n\t\tassertTrue(generationRule.getSampleData() instanceof SampleData);\n\t}", "public ICPSO(String fileName, boolean Markov, int numParticles, int numSamples, double epsilon, double omega,\n\t\t\tdouble phi1, double phi2) throws FileNotFoundException {\n\t\t// this.iterations = iterations;\n\t\tthis.numParticles = numParticles;\n\t\tthis.numSamples = numSamples;\n\t\tthis.epsilon = epsilon;\n\t\tthis.omega = omega;\n\t\tthis.phi1 = phi1;\n\t\tthis.phi2 = phi2;\n\n\t\tpop = new ArrayList<Particle>();\n\n\t\t// The entire file name, for retrieving the Markov net file\n\t\tFile file = new File(fileName);\n\n\t\t// construct the optimization problem itself\n\t\tproblem = constructProblemFromFile(file);\n\t\t// TODO: for maxsat we need to revisit this\n\t\t// maybe pull out the predicates here...\n\n\t\t// loops to create population\n\t\tinitializePop(fileName, Markov);\n\t}", "@Override\n public void loadDataFromFile(File file) {\n Gson gson = new Gson();\n try {\n Scanner scanner = new Scanner(file);\n while (scanner.hasNextLine()){\n IndividualCustomer customer =\n gson.fromJson(scanner.nextLine(),IndividualCustomer.class);\n customerList.add(customer);\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n }", "public GameLogic(String mapFile) throws FileNotFoundException,\n\t\t\tParseException {\n\t\tthis.map = new Map(mapFile);\n\n\t\t// Check if there is enough gold to win\n\t\tif (this.map.remainingGold() < this.map.getGoal()) {\n\t\t\tthrow new IllegalStateException(\n\t\t\t\t\t\"There isn't enough gold on this map for you to win\");\n\t\t}\n\n\t\tthis.players = new ArrayList<Player>();\n\t}", "public static Map readMap(File f)\n {\n Map map = new Map(1);\n try\n {\n MapReader run = new MapReader();\n Scanner mapReader = new Scanner(f);\n ArrayList<String[]> numberLines = new ArrayList<String[]>();\n int dim = mapReader.nextInt();\n mapReader.nextLine();\n for(int gh = 0 ; gh < dim; gh++)\n {\n String[] nums = mapReader.nextLine().split(\" \");\n numberLines.add(nums);\n }\n int[][] newMap = new int[numberLines.size()][numberLines.size()];\n \n for(int i = 0; i < numberLines.size();i++)\n {\n for(int h = 0; h < numberLines.get(i).length;h++)\n {\n newMap[i][h] = Integer.parseInt(numberLines.get(i)[h]);\n }\n }\n map.loadMap(newMap);\n \n TreeMap<Integer,ArrayList<Integer>> spawn1 = map.getSpawn1();\n TreeMap<Integer,ArrayList<Integer>> spawn2 = map.getSpawn2();\n \n String line = \"\";\n while(mapReader.hasNextLine() && (line = mapReader.nextLine()).contains(\"spawn1\"))\n {\n Scanner in = new Scanner(line);\n in.next();\n int x = in.nextInt();\n spawn1.put(x, new ArrayList<Integer>());\n while(in.hasNextInt())\n {\n spawn1.get(x).add(in.nextInt());\n }\n }\n \n if(!line.equals(\"\"))\n {\n Scanner in = new Scanner(line);\n in.next();\n int x = in.nextInt();\n spawn2.put(x, new ArrayList<Integer>());\n while(in.hasNextInt())\n {\n spawn2.get(x).add(in.nextInt());\n }\n }\n while(mapReader.hasNextLine() && (line = mapReader.nextLine()).contains(\"spawn2\"))\n {\n Scanner in = new Scanner(line);\n in.next();\n int x = in.nextInt();\n spawn2.put(x, new ArrayList<Integer>());\n while(in.hasNextInt())\n {\n spawn2.get(x).add(in.nextInt());\n }\n }\n }\n catch (Exception ex)\n {\n JOptionPane.showMessageDialog(null, \"Corrupted file!\");\n }\n return map;\n }", "@Override\r\n \r\n public void initGrid(String filename)\r\n throws FileNotFoundException, IOException\r\n {\r\n \tFile fileToParse = new File(filename);\r\n \tScanner scanner = new Scanner(fileToParse);\r\n \tint linePositionInFile = 0;\r\n \tfinal int MAZE_SIZE_LINE_POSITION = 0;\r\n \tfinal int VALID_SYMBOLS_LINE_POSITION = 1;\r\n \tfinal int PRESET_VALUE_LINE_POSITION = 2;\r\n\t\tfinal String SYMBOL_DELIMITER = \" \";\r\n\r\n \tString[] splitString = null;\r\n \twhile(scanner.hasNextLine()){\r\n \t\t//current line to be parsed\r\n\t\t\tString parseLine = scanner.nextLine();\r\n \t\tif(linePositionInFile == MAZE_SIZE_LINE_POSITION) {\r\n \t\t\t//construct the game sizes.\r\n \t\t\t\r\n \t\t\t//System.out.println(\"DEBUG: size\" + parseLine);\r\n \t\t\tint parsedMazeSize = Integer.parseInt(parseLine);\r\n \t\t\t//set the gridSize variable\r\n \t\t\tgridSize = parsedMazeSize;\r\n \t\t\t\r\n \t\t\t//construct the game with the proper sizes.\r\n \t\t\tsymbols = new Integer[parsedMazeSize];\r\n \t\t\tgame = new Integer[parsedMazeSize][parsedMazeSize];\r\n\r\n \t\t}else if(linePositionInFile == VALID_SYMBOLS_LINE_POSITION) {\r\n \t\t\t//set valid symbols\r\n \t\t\t//System.out.println(\"DEBUG: symbols\" + parseLine);\r\n \t\t\tsplitString = parseLine.split(SYMBOL_DELIMITER);\r\n \t\t\tfor(int i = 0; i < symbols.length && i < splitString.length; ++i) {\r\n \t\t\t\tsymbols[i] = Integer.parseInt(splitString[i]);\r\n \t\t\t}\r\n \t\t}else if(linePositionInFile >= PRESET_VALUE_LINE_POSITION) {\r\n \t\t\t//System.out.println(\"DEBUG: inserting preset\" + parseLine);\r\n \t\t\t/*\r\n \t\t\t * example = 8,8 7\r\n \t\t\t * below parses and splits the string up to usable values to \r\n \t\t\t * then insert into the game, as preset value constraints.\r\n \t\t\t * \r\n \t\t\t */\r\n \t\t\t\r\n \t\t\tsplitString = parseLine.split(SYMBOL_DELIMITER);\r\n \t\t\tString[] coordinates = splitString[0].split(\",\");\r\n \t\t\tint xCoordinate = Integer.parseInt(coordinates[0]);\r\n \t\t\tint yCoordinate = Integer.parseInt(coordinates[1]);\r\n \t\t\tint presetValueToInsert = Integer.parseInt(splitString[1]);\r\n \t\t\tgame[xCoordinate][yCoordinate] = presetValueToInsert;\r\n\r\n \t\t}\r\n \t\t++linePositionInFile;\r\n \t}\r\n \tscanner.close();\r\n }", "public static void main(String[] args) { // generate new json files\n \t// All directories to pull from\n \t\n \tArrayList<List<List<Integer>>> levels = new ArrayList<List<List<Integer>>>();\n \tfor(int i = 1;i<=10;i++) {\n \t\tif (i != 9) {\n \t\t\tmaxX=0;\n \t\t\tmaxY=0;\n \t\t\tvisited.clear();\n \t\t\tenemyNumber=-1;\n \t\t\tenemyString = null;\n \t\t\tbossString = null;\n \t\t\tList<List<Integer>> level = convertMMLVtoInt(MegaManVGLCUtil.MEGAMAN_MMLV_PATH+\"MegaManLevel\"+i+\".mmlv\");\n \t\t\tlevels.add(level);\n \t\t\t//MegaManVGLCUtil.printLevel(level);\n \t\t}\n\t\t}\n \tSystem.out.println(\"Read \"+levels.size()+\" levels.\");\n\n \t\n \toutputOneGAN(levels, \"NoWater9\"); \n \toutputSevenGAN(levels, \"NoWater9\");\n \t//File testFile = new File(\"data\\\\VGLC\\\\MegaMan\\\\MegaManOneGANNoWater9.json\");\n \t//showJsonContents(testFile);\n }", "@Override\n public void loadFoodItems(String filePath) {\n file = new File(filePath);\n \n // Check the file existence\n try {\n scnr = new Scanner(file);\n } catch (FileNotFoundException e1) {\n e1.printStackTrace();\n System.out.println(\"no such file\");\n }\n \n // Read the file and save the food info to food class\n try {\n while (scnr.hasNextLine()) {\n \t\n // read line by line\n String text = scnr.nextLine().trim();\n \n // if line is not empty\n \n // load the file to memory\n if (!text.isEmpty()) {\n \t\n String[] objects = text.split(\",\");\n \n //skip the data with wrong format\n if(objects.length != 12) continue;\n String id = objects[0];\n String name = objects[1];\n FoodItem food = new FoodItem(id, name);\n for(int i = 0; i < 5; i++) {\n \tfood.addNutrient(nutrition[i], Double.parseDouble(objects[2*(i+1)+1]));\n }\n foodItemList.add(food);\n \n }\n }\n \n // add the food item to nutrition BPTree\n \n Iterator<FoodItem> foodItr = foodItemList.iterator();\n while(foodItr.hasNext()) {\n \tIterator<BPTree<Double, FoodItem>> treeItr = nutriTree.iterator();\n \tFoodItem tempFood = foodItr.next();\n \tint i = 0;\n while(treeItr.hasNext()) {\n \ttreeItr.next().insert(tempFood.getNutrientValue(nutrition[i]), tempFood);\n \ti ++;\n }\n }\n \n \n scnr.close();\n } catch (Exception e) {\n System.out.println(e.getMessage());\n System.out.println(\"Error in food data processing\");\n }\n }", "public static Species[] loadSpeciesFile(String filename) {\n java.util.Scanner input = null;\n java.io.File inputFile = new java.io.File(filename);\n try {\n input = new java.util.Scanner(inputFile);\n } catch( java.io.FileNotFoundException e ) {\n System.err.println(\"Error: Unable to open file \" + filename);\n System.exit(1);\n }\n \n String current = \"\";\n if(input.hasNext())\n current = input.next();\n List<Species> speciesList = new ArrayList<Species>();\n while(input.hasNext()) {\n int count = 0;\n int i = 0;\n StringBuilder sequence = new StringBuilder();\n String speciesName = \"\";\n while(count < 6 && i < current.length() && current.substring(0,1).equals(\">\") ) {\n if(current.charAt(i) == '|')\n count++;\n if(count == 6 && !current.substring(i + 1).contains(\"|\")) {\n speciesName = current.substring(i + 1);\n }\n i++;\n }\n if(count == 6) {\n current = input.next();\n boolean next = true;\n while (next == true && !current.substring(0,1).equals(\">\")) {\n sequence.append(current);\n if(input.hasNext())\n current = input.next();\n else\n next = false;\n }\n String[] sequenceArray = new String[sequence.length()];\n for(int j = 0; j < sequence.length(); j++) {\n sequenceArray[j] = Character.toString(sequence.charAt(j));\n }\n Species currSpecies = new Species(speciesName, sequenceArray);\n speciesList.add(currSpecies);\n }\n else\n current = input.next();\n }\n Species[] arraySpecies = new Species[speciesList.size()];\n for (int i = 0; i < speciesList.size(); i++) {\n arraySpecies[i] = speciesList.get(i);\n }\n return arraySpecies;\n }", "public void generate() throws FileNotFoundException, UnsupportedEncodingException {\n\t\twriter = new PrintWriter(outputFile, \"UTF-8\");\n\t\tFile file = new File(inputFile);\n\t\treader = new Scanner(file);\n\t\tinitializeFile();\n\t\t\n\t\tString line = readLine();\n\t\twhile (line != null) {\n\t\t\tprocess(line);\n\t\t\tline = readLine();\n\t\t}\n\t\t\n\t\tfinishFile();\n\t\twriter.close();\n\t}", "@Test public void testCreateIpuGenerationRule(@Mocked final IScope scope, @Mocked final FileUtils fileUtils) throws GenstarException {\n\t\t\n\t\tfinal String base_path = \"test_data/ummisco/genstar/gama/GamaGenstarUtilsTest/testCreateIpuGenerationRule/\";\n\t\t\n\t\tfinal String groupAttributesFilePath = base_path + \"group_attributes.csv\";\n\t\tfinal String groupPopulationName = \"household\";\n\t\tfinal String groupSampleDataFile = base_path + \"group_sample.csv\";\n\t\tfinal String groupIdOnGroup = \"HouseholdID\";\n\t\tfinal String groupControlledAttributesFile = base_path + \"group_controlled_attributes.csv\";\n\t\tfinal String groupControlTotalsFile = base_path + \"group_ipu_control_totals.csv\";\n\t\tfinal String groupSupplementaryAttributesFile = base_path + \"group_supplementary_attributes.csv\";\n\t\t\n\t\tfinal String componentAttributesFile = base_path + \"component_attributes.csv\";\n\t\tfinal String componentPopulationName = \"household\";\n\t\tfinal String componentSampleDataFile = base_path + \"component_sample.csv\";\n\t\tfinal String componentIdOnGroup = \"HouseholdID\";\n\t\tfinal String componentControlledAttributesFile = base_path + \"component_controlled_attributes.csv\";\n\t\tfinal String componentControlTotalsFile = base_path + \"component_ipu_control_totals.csv\";\n\t\tfinal String componentSupplementaryAttributesFile = base_path + \"component_supplementary_attributes.csv\";\n\n\t\t\n\t\tnew Expectations() {{\n\t\t\tFileUtils.constructAbsoluteFilePath(scope, anyString, true);\n\t\t\tresult = new Delegate() {\n\t\t\t\tString delegate(IScope scope, String filePath, boolean mustExist) {\n\t\t\t\t\t// group population\n\t\t\t\t\tif (filePath.endsWith(\"/group_attributes.csv\")) { return groupAttributesFilePath; }\n\t\t\t\t\tif (filePath.endsWith(\"/group_sample.csv\")) { return groupSampleDataFile; }\n\t\t\t\t\tif (filePath.endsWith(\"/group_controlled_attributes.csv\")) { return groupControlledAttributesFile; }\n\t\t\t\t\tif (filePath.endsWith(\"/group_ipu_control_totals.csv\")) { return groupControlTotalsFile; }\n\t\t\t\t\tif (filePath.endsWith(\"/group_supplementary_attributes.csv\")) { return groupSupplementaryAttributesFile; }\n\t\t\t\t\t\n\t\t\t\t\t// component population\n\t\t\t\t\tif (filePath.endsWith(\"/component_attributes.csv\")) { return componentAttributesFile; }\n\t\t\t\t\tif (filePath.endsWith(\"/component_sample.csv\")) { return componentSampleDataFile; }\n\t\t\t\t\tif (filePath.endsWith(\"/component_controlled_attributes.csv\")) { return componentControlledAttributesFile; }\n\t\t\t\t\tif (filePath.endsWith(\"/component_ipu_control_totals.csv\")) { return componentControlTotalsFile; }\n\t\t\t\t\tif (filePath.endsWith(\"/component_supplementary_attributes.csv\")) { return componentSupplementaryAttributesFile; }\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t};\n\t\t}};\n\t\t\n\t\t\n\t\tString ipuPopulationPropertiesFilePath = base_path + \"IpuPopulationProperties.properties\";\n\t\tString ruleName = \"dummy rule\";\n\t\t\n\t\tProperties ipuPopulationProperties = null;\n\t\tFile ipuPopulationPropertiesFile = new File(ipuPopulationPropertiesFilePath);\n\t\ttry {\n\t\t\tFileInputStream propertyInputStream = new FileInputStream(ipuPopulationPropertiesFile);\n\t\t\tipuPopulationProperties = new Properties();\n\t\t\tipuPopulationProperties.load(propertyInputStream);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tthrow new GenstarException(e);\n\t\t} catch (IOException e) {\n\t\t\tthrow new GenstarException(e);\n\t\t}\n\t\t\n\t\tSampleBasedGenerator groupGenerator = new SampleBasedGenerator(\"group generator\");\n\t\tGenstarCsvFile groupAttributesFile = new GenstarCsvFile(groupAttributesFilePath, true);\n\t\tAttributeUtils.createAttributesFromCsvFile(groupGenerator, groupAttributesFile);\n\t\t\n\t\tDeprecatedGamaGenstarUtils.createIpuGenerationRule(scope, groupGenerator, ruleName, ipuPopulationProperties);\n\t\t\n\t\tIpuGenerationRule generationRule = (IpuGenerationRule) groupGenerator.getGenerationRule();\n\t\t\n\t\t\n\t\tGenstarCsvFile _groupControlledAttributesFile = Deencapsulation.getField(generationRule, \"groupControlledAttributesFile\");\n\t\tassertTrue(_groupControlledAttributesFile.getPath().equals(groupControlledAttributesFile));\n\t\t\n\t\tGenstarCsvFile _groupControlTotalsFile = Deencapsulation.getField(generationRule, \"groupControlTotalsFile\");\n\t\tassertTrue(_groupControlTotalsFile.getPath().equals(groupControlTotalsFile));\n\t\t\n\t\tGenstarCsvFile _groupSupplementaryAttributesFile = Deencapsulation.getField(generationRule, \"groupSupplementaryAttributesFile\");\n\t\tassertTrue(_groupSupplementaryAttributesFile.getPath().equals(groupSupplementaryAttributesFile));\n\t\t\n\t\t\n\t\tGenstarCsvFile _componentControlledAttributesFile = Deencapsulation.getField(generationRule, \"componentControlledAttributesFile\");\n\t\tassertTrue(_componentControlledAttributesFile.getPath().equals(componentControlledAttributesFile));\n\t\t\n\t\tGenstarCsvFile _componentControlTotalsFile = Deencapsulation.getField(generationRule, \"componentControlTotalsFile\");\n\t\tassertTrue(_componentControlTotalsFile.getPath().equals(componentControlTotalsFile));\n\t\t\n\t\tGenstarCsvFile _componentSupplementaryAttributesFile = Deencapsulation.getField(generationRule, \"componentSupplementaryAttributesFile\");\n\t\tassertTrue(_componentSupplementaryAttributesFile.getPath().equals(componentSupplementaryAttributesFile));\n\t}", "@Test\r\n\tpublic void censusTest() throws FileNotFoundException\r\n\t{\r\n\t\tint [] p=new int[5];\r\n\t\tString fileName=\"BadgerTestA.txt\";\r\n\t\tWorld w=new World(fileName);\r\n\t\t\r\n\t\tw.grid[1][1].census(p);\r\n\t\tassertEquals(2,p[0]);\r\n\t\tassertEquals(0, p[1]);\r\n\t\tassertEquals(0,p[2]);\r\n\t\tassertEquals(2,p[3]);\r\n\t\tassertEquals(5,p[4]);\r\n\t\t\t\r\n\t}", "private static int calcGenerations(String filename, int reps) {\n List<String> fileContentsAsStrings = utilities.getFileContentsAsStrings(filename);\n\n // parse initial state\n String prefix = \"........................\";\n List<String> replay = new ArrayList<>();\n// replay.add(addCalibraton(prefix));\n\n String currentState = parseInitialState(fileContentsAsStrings.get(0), prefix);\n\n // parse rules\n HashMap<String, String> rules = parseRules(fileContentsAsStrings.subList(2, fileContentsAsStrings.size()));\n\n String previousLine = currentState;\n\n // do 20 times\n for (int i = 0; i < reps; i++) {\n replay.add(previousLine);\n if (previousLine.substring(previousLine.length() - RULE_LENGTH).contains(\"#\")) {\n previousLine += \".....\";\n }\n\n StringBuilder nextLine = new StringBuilder();\n nextLine.append(\"..\");\n\n // for each element in current line, apply rule and build next line\n for (int pot = 0; pot <= previousLine.length() - RULE_LENGTH; pot++) {\n nextLine.append(transformThisCell(previousLine.substring(pot, pot + RULE_LENGTH), rules));\n }\n nextLine.append(\"..\");\n previousLine = nextLine.toString();\n }\n\n// printResults(replay, prefix.length());\n\n // after 20 times, potSum of the entire string and the zero index (prefix length)\n return potSum(previousLine, prefix.length());\n }", "default Pair<T, U> build(File file) throws IOException, ConfigurationException {\n return build(new FileConfigurationSourceProvider(), file.toString());\n }", "private void loadInventory(String fileName){\t\t\r\n\t\tList<String> list = new ArrayList<String>();\r\n\r\n\t\ttry (Stream<String> stream = Files.lines(Paths.get(fileName))) {\r\n\t\t\t//Convert it into a List\r\n\t\t\tlist = stream.collect(Collectors.toList());\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tfor(String itemList : list){\r\n\t\t\tString[] elements = itemList.split(\"--\");\r\n\t\t\t\r\n\t\t\ttry{\r\n\t\t\t\tswitch(elements[0].toUpperCase()){\r\n\t\t\t\t\tcase \"BURGER\":\r\n\t\t\t\t\t\t\tinventory.add(createBurger(elements));;\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\r\n\t\t\t\t\tcase \"SALAD\":\r\n\t\t\t\t\t\t\tinventory.add(createSalad(elements));;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"BEVERAGE\":\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tinventory.add(createBeverage(elements));;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"SIDE\":\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tinventory.add(createSide(elements));;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"DESSERT\":\r\n\t\t\t\t\t\t\tinventory.add(createDessert(elements));;\r\n\t\t\t\t\t\t\tbreak;\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}catch(Exception e){\r\n\t\t\t\tSystem.err.println(e.getMessage());\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}", "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 init(String filename){\n // create product cateogries \n // hard coded key-value for this project \n productCategory.addProduct(\"book\", \"books\");\n productCategory.addProduct(\"books\", \"books\");\n productCategory.addProduct(\"chocolate\", \"food\");\n productCategory.addProduct(\"chocolates\", \"food\");\n productCategory.addProduct(\"pills\", \"medical\");\n \n // read input\n parser.readInput(filename);\n \n // addProducts\n try {\n this.addProducts(parser.getRawData());\n } catch (Exception e) {\n System.out.println(\"Check input integrity\");\n }\n \n this.generateReceipt();\n\n }", "public static void openF(){\n Scanner in = new Scanner(System.in);\n \n String Name;\n\tString Code;\n\tString Capital;\n\tlong Population;\n\tlong GDP;\n\tString HappinessRank;\n int GDPperCapita;\n \n \n Country country;\n \n \n Scanner stream;\n \n File file = new File(fName);\n \n if(!file.exists()){\n System.out.println(\"File does not exist.\");\n }\n else\n\n \n try{\n stream = new Scanner(file);\n stream.nextLine();\n stream.useDelimiter(\",|\\\\n\");\n \n while(stream.hasNext()){\n Name = stream.next();\n Code = stream.next();\n Capital = stream.next();\n Population = Long.parseLong(stream.next());\n GDP = new BigDecimal(stream.next()).longValue();\n HappinessRank = NumberFormat.getIntegerInstance(Locale.US).format(stream.nextInt());\n GDPperCapita = (int) (GDP/ Population);\n \n \n \n country = new Country (Name, Code, Capital, Population, GDP, HappinessRank, GDPperCapita);\n \n \n \n \n \n if(country.getGDPperCapita()< 1000)\n POOR.insert(country);\n \n \n else if(country.getGDPperCapita() >= 1000 && country.getGDPperCapita() < 5000)\n FAIR.insert(country);\n \n \n else if(country.getGDPperCapita() >= 5000 && country.getGDPperCapita() < 20000)\n GOOD.insert(country);\n \n \n else if(country.getGDPperCapita() >= 20000 && country.getGDPperCapita() < 50000)\n VGOOD.insert(country);\n \n \n else \n EXCELLENT.insert(country);\n \n \n \n \n } stream.close();\n System.out.println(\"\");\n \n }\n \n catch(IOException e){\n e.printStackTrace();\n } \n \n }", "public void playGame() {\n\t\tint generations = 1;\n\t\treadFromFile();\n\t\twhile (generations <= numGens) {\n\t\t\tgetNeighbors();\n\t\t\tsetNextGeneration();\n\t\t\tgenerations += 1;\n\t\t}\n\t\toutputToFile();\n\t}", "private void readFromFile(String filename) {\n\t\ttry {\n\t\t Scanner read = new Scanner(new File(filename));\n\t\t String line;\n\t\t int counter = 0;\n\t\t String temp;\n\t\t line = read.nextLine();\n\t\t temp = line.substring(0);\n\t\t height = convertToInt(temp);\n\n\t\t line = read.nextLine();\n\t\t temp = line.substring(0);\n\n\t\t length = convertToInt(temp);\n\t\t size = height*length;\n\t\t \n\t\t squares = new Square[size][size];\n\n\t\t while(read.hasNextLine()) {\n\t\t\t\tline = read.nextLine();\n\t\t \tfor (int i = 0; i < line.length(); i++) {\n\t\t \t temp = line.substring(i, i+1);\n\n\t\t \t if (temp.equals(\".\")) {\n\t\t \t\t\tsquares[counter][i] = new FindValue(0);\n\t\t \t } \n\t\t \t else {\n\t\t\t\t\t\tsquares[counter][i] = new PreFilled(convertToInt(temp));\n\t\t\t \t\t}\n\t\t \t}\n\t\t \tcounter++;\n\t\t }\n\t\t} catch(IOException e) {\n\t\t e.printStackTrace();\n\t\t}\n }", "private void createMap(File inFile)\r\n\t\tthrows Exception\r\n\t{\n\t\tBufferedReader in = new BufferedReader(new FileReader(inFile));\r\n\r\n\t\t// Chromosomes\r\n\t\tString[] chrms = in.readLine().split(\",\");\r\n\t\t// Marker positions\r\n\t\tString[] mrkrs = in.readLine().split(\",\");\r\n\t\tin.close();\r\n\r\n\r\n\t\t// Now rewrite it in Flapjack map format\r\n\t\tBufferedWriter out = new BufferedWriter(new FileWriter(new File(wrkDir, \"map\")));\r\n\t\tout.write(\"# fjFile = MAP\");\r\n\t\tout.newLine();\r\n\r\n\t\tfor (int i = 0; i < chrms.length; i++)\r\n\t\t{\r\n\t\t\tMarker m = new Marker(i, chrms[i], mrkrs[i]);\r\n\t\t\tmarkers.add(m);\r\n\r\n\t\t\tout.write(m.name + \"\\t\" + m.chr + \"\\t\" + m.pos);\r\n\t\t\tout.newLine();\r\n\t\t}\r\n\t\tout.close();\r\n\r\n\t\tmarkers.stream().forEach(marker -> {\r\n\r\n\t\t\tSystem.out.println(marker.name);\r\n\r\n\t\t});\r\n\t}", "public PopulateVisitor(FileProcessor fileIn){\n\t\tMyLogger.writeMessage(\"Inside PopulateVisitor constructor\",MyLogger.DebugLevel.CONSTRUCTOR);\n\t\tfile = fileIn;\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 GeneSplicerParser(String filepath) throws FileNotFoundException, IOException {\n // initialize the lists\n this();\n\n // read in the file\n BufferedReader br = new BufferedReader(new FileReader(filepath));\n for(String line = br.readLine(); line != null; line = br.readLine()) {\n // parse the line\n GeneSplicerEntry entry = new GeneSplicerEntry(line);\n\n // add the entry to the appropriate list\n if(entry.type == GeneSplicerEntry.Type.Acceptor) {\n acceptors.add(entry.start);\n } else {\n donors.add(entry.start);\n }\n }\n }", "private static Genome readGenomeFromPool(String fileName)\n {\n return readGenome(GENE_POOL_LOCATION + fileName);\n }", "@Override\n\tpublic boolean readFile(String filename) {\n\t\ttry {\n\t\t\tScanner input = new Scanner(new File(filename));\n\t\t\tString row = input.nextLine();\n\t\t\tString[] sarr = row.split(\",\");\n\t\t\tString ingredientsWatch = \"\";\n\t\t\t// Gets the String type of ingredients to watch\n\t\t\t// Identify the gender and create the Female or Male object\n\t\t\tif (sarr[0].equals(\"Female\")) {\n\t\t\t\tStringBuilder sBuilder =new StringBuilder();\n\t\t\t\tfor(int j =5;j<sarr.length-1;j++) {\n\t\t\t\t\tsBuilder=sBuilder.append(sarr[j].trim()+\",\");\t\n\t\t\t\t}\n\t\t\t\tsBuilder=sBuilder.append(sarr[sarr.length-1]);\n\t\t\t\tingredientsWatch = sBuilder.toString();\n\t\t\t\tFemale female=new Female(Float.parseFloat(sarr[1]), Float.parseFloat(sarr[2]), \n\t\t\t\t\t\tFloat.parseFloat(sarr[3]), Float.parseFloat(sarr[4]), ingredientsWatch);\n\t\t\t\tNutriByte.person=female;\n\t\t\t}else {\n\t\t\t\tStringBuilder sBuilder =new StringBuilder();\n\t\t\t\tfor(int j =5;j<sarr.length-1;j++) {\t\n\t\t\t\t\tsBuilder=sBuilder.append(sarr[j].trim()+\",\");\n\t\t\t\t}\n\t\t\t\tsBuilder=sBuilder.append(sarr[sarr.length-1]);\n\t\t\t\tingredientsWatch = sBuilder.toString();\n\t\t\t\t// Creates the object using its constructor\n\t\t\t\tMale male=new Male(Float.parseFloat(sarr[1]), Float.parseFloat(sarr[2]), \n\t\t\t\t\t\tFloat.parseFloat(sarr[3]), Float.parseFloat(sarr[4]), ingredientsWatch);\n\t\t\t\tNutriByte.person=male;\n\t\t\t\tinput.close();\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\t\n\t\treturn true;\n\t}", "public void fillFromFile()\n\t{\n\t\tJFileChooser fc = new JFileChooser();\t//creates a new fileChooser object\n\t\tint status = fc.showOpenDialog(null);\t//creates a var to catch the dialog output\n\t\tif(status == JFileChooser.APPROVE_OPTION)\t\n\t\t{\n\t\t\tFile selectedFile = fc.getSelectedFile ( );\n\t\t\tthis.fileName = selectedFile;\n\t\t\tScanner file = null; //scans the file looking for information to load\n\n\t\t\tif(selectedFile.exists())\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tfile = new Scanner(fileName); //scans the input file\n\t\t\t\t}\n\t\t\t\tcatch(Exception IOException)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showConfirmDialog (null, \"Unable to import data from the list\");\n\t\t\t\t\tSystem.exit (-1);\n\t\t\t\t}//if there was an error it will pop up this message\n\t\t\t\t\n\t\t\t\tString str = file.nextLine ( ); //names the line\n\t\t\t\tString [] header = str.split (\"\\\\|\"); //splits the line at the |\n\t\t\t\tsetCourseNumber(header[1]);\n\t\t\t\tsetCourseName(header[0]);\n\t\t\t\tsetInstructor(header[2]);\n\t\t\t\t\n\t\t\t\twhile(file.hasNextLine ( ))\n\t\t\t\t{\n\t\t\t\t\tstr = file.nextLine ( ); //names the line\n\t\t\t\t\tString [] tokens = str.split (\"\\\\|\"); //splits the line at the |\n\t\t\t\t\tStudent p = new Student();\n\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tp.setStrNameLast (String.valueOf (tokens[0]));\n\t\t\t\t\t\tp.setStrNameFirst (String.valueOf (tokens[1]));\n\t\t\t\t\t\tp.setStrMajor (String.valueOf (tokens[2]));\n\t\t\t\t\t\tp.setClassification (tokens[3]);\n\t\t\t\t\t\tp.setiHoursCompleted (new Integer (tokens[4]).intValue ( ));\n\t\t\t\t\t\tp.setfGPA (new Float (tokens[5]).floatValue ( ));\n\t\t\t\t\t\tp.setStrStudentPhoto (String.valueOf (tokens[6]));\n\t\t\t\t\t//creates a person object and then populates it with an array of scanned input values\n\t\t\t\t\t\tclassRoll.add (p);\n\t\t\t\t\t\t}//creates a person object and then populates it with an array of scanned input values\n\t\t\t\t\t\tcatch(Exception IOException)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tIOException.printStackTrace ( );\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog (null, \"Bad input record: '\" + str + \"'\" + IOException.getMessage());\n\t\t\t\t\t\t}//pops up a message if there were any errors reading from the file\n\t\t\t\t}//continues through the file until there are no more lines to scan\n\t\t\tfile.close ( ); //closes the file\n\n\t\t\t\tif(selectedFile.exists ( )==false)\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new Exception();\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception IOException)\n\t\t\t\t\t{\n\t\t\t\t\t\tJOptionPane.showMessageDialog (null, \"Bad input record: '\" + selectedFile + \"' \" + IOException.getMessage());\n\t\t\t\t\t}\n\t\t\t\t}//if the user picks a file that does not exist this error message will be caught.\n\t\t\t}\n\t\t}//if the input is good it will load the information from the selected file to and Array List\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.exit (0);\n\t\t\t}\n\t\tthis.saveNeed = true;\n\n\t\t}", "private void populateDictionary() throws IOException {\n populateDictionaryByLemmatizer();\n// populateDictionaryBySynonyms();\n }", "public static LevelPack fromFilePartial(String filename) {\n\n\t\t// Read everything from the LevelPack, but don't bother deserializing\n\t\t// the Worlds.\n\t\tString json = Serializer.readStringFromFile(filename);\n\t\treturn fromJsonPartial(json);\n\t}", "public void generateRegister(int amount) throws IOException {\n\t\tautoGen = new Person[amount];\n\t\tBufferedReader brFNames = new BufferedReader(new FileReader(FEMALE_NAMES));\n\t\tBufferedReader brMNames = new BufferedReader(new FileReader(MALE_NAMES));\n\t\tBufferedReader brLastNames = new BufferedReader(new FileReader(LAST_NAMES));\n\t\tBufferedReader brCountry = new BufferedReader(new FileReader(CONTRY_POPULATION));\n\t\tBufferedReader brAgeRate = new BufferedReader(new FileReader(AGE_PROPORTION));\n\t\tbrFNames.mark(0);\n\t\tbrMNames.mark(0);\n\t\tbrLastNames.mark(0);\n\t\tbrCountry.mark(0);\n\t\tbrAgeRate.mark(0);\n\t\tString[] countries = new String[COUNTRIES];\n\t\tint[] countriesAmount = new int[COUNTRIES];\n\t\tint[] minAge = new int[AGES];\n\t\tint[] maxAge = new int[AGES];\n\t\tint[] amountAge = new int[AGES];\n\t\tfor(int i = 0;i < COUNTRIES;i++) {\n\t\t\tString[] country = brCountry.readLine().split(\",\");\n\t\t\tcountries[i] = country[0];\n\t\t\tcountriesAmount[i] = (int) Math.floor(amount * parseDouble(country[1]));\n\t\t}\n\t\tfor(int i = 0;i < AGES;i++){\n\t\t\tString[] age = brAgeRate.readLine().split(\" \");\n\t\t\tminAge[i] = Integer.parseInt(age[0]);\n\t\t\tmaxAge[i] = Integer.parseInt(age[1]);\n\t\t\tamountAge[i] = (int) Math.floor(amount* parseDouble(age[2]));\n\t\t}\n\t\tint maleDivFemale = amount/2;\n\t\tfor(int i = 0;i < maleDivFemale;i++){ //male\n\t\t\tString name = brMNames.readLine();\n\t\t\tif(name==null){\n\t\t\t\tbrMNames.reset();\n\t\t\t\tname = brMNames.readLine();\n\t\t\t}\n\t\t\tString lastName = brLastNames.readLine();\n\t\t\tif(lastName==null){\n\t\t\t\tbrLastNames.reset();\n\t\t\t\tlastName = brLastNames.readLine();\n\t\t\t}\n\t\t\tchar gender = Person.MALE;\n\t\t\tint randCountry = (int) Math.floor(Math.random()*COUNTRIES);\n\t\t\twhile(countriesAmount[randCountry]==0){\n\t\t\t\trandCountry = (int) Math.floor(Math.random()*COUNTRIES);\n\t\t\t}\n\t\t\tString country = countries[randCountry];\n\t\t\tcountriesAmount[randCountry]-=1;\n\t\t\tint randAge = (int)Math.floor(Math.random()*AGES);\n\t\t\twhile(amountAge[randAge]==0){\n\t\t\t\trandAge = (int)Math.floor(Math.random()*AGES);\n\t\t\t}\n\t\t\tint age = (int)Math.floor(Math.random()*(maxAge[randAge]-minAge[randAge])+minAge[randAge]);\n\t\t\tint year = 2020 - age;\n\t\t\tint month = (int)Math.floor(Math.random()*12+1);\n\t\t\tint day = 0;\n\t\t\tif(month==2){\n\t\t\t\tday = (int)Math.floor(Math.random()*27+1);\n\t\t\t}else if(month%2==0){\n\t\t\t\tif(month>7){\n\t\t\t\t\tday = (int)Math.floor(Math.random()*31+1);\n\t\t\t\t}else{\n\t\t\t\t\tday = (int)Math.floor(Math.random()*30+1);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(month>7){\n\t\t\t\t\tday = (int)Math.floor(Math.random()*30+1);\n\t\t\t\t}else{\n\t\t\t\t\tday = (int)Math.floor(Math.random()*31+1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tLocalDate birth = LocalDate.of(year,month,day);\n\t\t\tint heigth;\n\t\t\tif(age<4){\n\t\t\t\t heigth = (int)Math.floor(Math.random()*6+40);\n\t\t\t}else if(age < 13){\n\t\t\t\t heigth = (int)Math.floor(Math.random()*5+100);\n\t\t\t}else{\n\t\t\t\t heigth = (int)Math.floor(Math.random()*5+150);\n\t\t\t}\n\t\t\tString code = \"\";\n\t\t\tint numberDigits = (currentCode+\"\").length();\n\n\t\t\tfor(int j=numberDigits; j<DIGITS_CODE;j++) {\n\t\t\t\tcode +=\"0\";\n\t\t\t}\n\t\t\tcode += numberDigits;\n\t\t\tcurrentCode++;\n\t\t\tautoGen[i] = new Person(code,name,lastName,gender,heigth,country,birth);\n\t\t\tprogress = i/amount;\n\t\t}for(int i = maleDivFemale;i < amount;i++){ //female\n\t\t\tString name = brFNames.readLine();\n\t\t\tif(name == null){\n\t\t\t\tbrFNames.reset();\n\t\t\t\tname = brFNames.readLine();\n\t\t\t}\n\t\t\tString lastName = brLastNames.readLine();\n\t\t\tif(lastName == null){\n\t\t\t\tbrLastNames.reset();\n\t\t\t\tlastName = brLastNames.readLine();\n\t\t\t}\n\t\t\tchar gender = Person.FEMALE;\n\t\t\tint randCountry = (int) Math.floor(Math.random()*COUNTRIES);\n\t\t\twhile(countriesAmount[randCountry]==0){\n\t\t\t\trandCountry = (int) Math.floor(Math.random()*COUNTRIES);\n\t\t\t}\n\t\t\tString country = countries[randCountry];\n\t\t\tcountriesAmount[randCountry]-=1;\n\t\t\tint randAge = (int)Math.floor(Math.random()*AGES);\n\t\t\twhile(amountAge[randAge]==0){\n\t\t\t\trandAge = (int)Math.floor(Math.random()*AGES);\n\t\t\t}\n\t\t\tint age = (int)Math.floor(Math.random()*(maxAge[randAge]-minAge[randAge])+minAge[randAge]);\n\t\t\tint year = 2020 - age;\n\t\t\tint month = (int)Math.floor(Math.random()*12+1);\n\t\t\tint day = 0;\n\t\t\tif(month==2){\n\t\t\t\tday = (int)Math.floor(Math.random()*27+1);\n\t\t\t}else if(month%2==0){\n\t\t\t\tif(month>7){\n\t\t\t\t\tday = (int)Math.floor(Math.random()*31+1);\n\t\t\t\t}else{\n\t\t\t\t\tday = (int)Math.floor(Math.random()*30+1);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(month>7){\n\t\t\t\t\tday = (int)Math.floor(Math.random()*30+1);\n\t\t\t\t}else{\n\t\t\t\t\tday = (int)Math.floor(Math.random()*31+1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tLocalDate birth = LocalDate.of(year,month,day);\n\t\t\tint heigth;\n\t\t\tif(age<4){\n\t\t\t\theigth = (int)Math.floor(Math.random()*6+40);\n\t\t\t}else if(age < 13){\n\t\t\t\theigth = (int)Math.floor(Math.random()*5+100);\n\t\t\t}else{\n\t\t\t\theigth = (int)Math.floor(Math.random()*5+150);\n\t\t\t}\n\t\t\tString code = \"\";\n\t\t\tint numberDigits = (currentCode+\"\").length();\n\n\t\t\tfor(int j=numberDigits; j<DIGITS_CODE;j++) {\n\t\t\t\tcode +=\"0\";\n\t\t\t}\n\t\t\tcode += numberDigits;\n\t\t\tcurrentCode++;\n\t\t\tautoGen[i] = new Person(code,name,lastName,gender,heigth,country,birth);\n\t\t\tprogress = i/amount;\n\t\t\t\n\t\t\tbrFNames.close();\n\t\t\tbrMNames.close();\n\t\t\tbrLastNames.close();\n\t\t\tbrCountry.close();\n\t\t\tbrAgeRate.close();\n\t\t}\n\t}", "public void doTheStuff (String filename) throws FileNotFoundException {\n\tScanner in = new Scanner (new File (filename));\n\tint numberOfCases = in.nextInt();\n\tfor (int caseNumber = 1; caseNumber <= numberOfCases; caseNumber++) {\n\t\tSystem.out.print (\"Case #\"+caseNumber+\": \");\n\t\tsolve(in);\n\t}\n}", "private void buildDS(String file) throws IOException,ParseException\n\t{\n\t\tJSONParser parser=new JSONParser();\n\t\tJSONObject config=(JSONObject)parser.parse(new FileReader(file));\n\t\taddToMap(config,this.types,\"types\");\n\t\tJSONObject groups=(JSONObject)config.get(\"combine\");\n\t\tfor(String key:(Set<String>)groups.keySet())\n\t\t{\n\t\t\tArrayList<String> temp=new ArrayList<String>();\n\t\t\taddToList(groups,temp,key);\n\t\t\tthis.groups.put(key,temp);\n\t\t}\n\t\taddToMap(config,this.rename,\"rename\");\n\t\taddToMap(config,this.format,\"format\");\n\t\taddToMap(config,this.ops,\"operation\");\n\t}", "public static void main(String[] args) throws FileNotFoundException {\n final File inputFile = new File(\"C:/Users/David Dunkel/IdeaProjects/Advent of Code/2020/Day 07/src/input.txt\");\n final Pattern parentPattern = Pattern.compile(\"^\\\\w+ \\\\w+\");\n final Pattern childPattern = Pattern.compile(\"\\\\d+ \\\\w+ \\\\w+\");\n final Map<String, List<String>> bagContainers = new HashMap<>();\n final Scanner scanner = new Scanner(inputFile);\n\n while (scanner.hasNext()) {\n final String nextLine = scanner.nextLine();\n final Matcher parentMatch = parentPattern.matcher(nextLine);\n\n parentMatch.find();\n\n final String parent = parentMatch.group();\n final Matcher childMatch = childPattern.matcher(nextLine);\n final List<String> child = new LinkedList<>();\n\n while (childMatch.find())\n child.add(childMatch.group());\n\n bagContainers.put(parent, child);\n }\n\n System.out.println(totalBags(bagContainers));\n }", "void load(File file);", "void readNutrients(String filename) throws FileNotFoundException {\n\t\t//reads the file, computes the number of unique nutrient objects\n\t\t//uses StringBuilder to append the unique Nutrient_Code\n\t\tScanner input=new Scanner(new File(filename));\n\t\tint numOfRow=0;\n\t\tStringBuilder uniqueNutrient=new StringBuilder();\n\t\twhile(input.hasNextLine()) {\n\t\t\tString row0=input.nextLine();\n\t\t\tString[] split0=row0.split(((char)34+\",\"+(char)34));\n\t\t\tif(!uniqueNutrient.toString().contains(split0[1]+\",\")) {\n\t\t\t\tuniqueNutrient=uniqueNutrient.append(split0[1]+\",\");\n\t\t\t\tnumOfRow++;\n\t\t\t}\n\t\t}\n\t\t//load the products array one by one, using constructor\n\t\t//keep only the unique nutrient objects\n\t\tnutrients=new Nutrient[numOfRow-1];\n\t\tScanner input2=new Scanner(new File(filename));\n\t\tinput2.nextLine();\n\t\tint i=0;\n\t\tStringBuilder uniqueNutrien2=new StringBuilder();\n\t\twhile(input2.hasNextLine()) {\n\t\t\tString row=input2.nextLine();\n\t\t\tString[] split1=row.split(((char)34+\",\"+(char)34));\n\t\t\tif(!uniqueNutrien2.toString().contains(split1[1]+\",\")) {\n\t\t\t\tuniqueNutrien2.append(split1[1]+\",\");\n\t\t\t\tnutrients[i++]=new Nutrient(split1[1], split1[2], split1[5]);\n\t\t\t}\n\t\t}\n\n\t\t//reads the file, computes the number of unique productNutrient objects\n\t\tScanner input3 =new Scanner(new File(filename));\n\t\tinput3.nextLine();\n\t\tint numOfRowProductNutrient=0;\n\t\twhile(input3.hasNextLine()) {\n\t\t\tnumOfRowProductNutrient++;\n\t\t\tinput3.nextLine();\n\t\t}\n\t\t//load the products array one by one, using constructor\n\t\tproductNutrients=new ProductNutrient[numOfRowProductNutrient];\n\t\tScanner input4=new Scanner(new File(filename));\n\t\tinput4.nextLine();\n\t\tint i2=0;\n\t\twhile(input4.hasNextLine()) {\n\t\t\tString row=input4.nextLine();\n\t\t\tString[] split1=row.split(((char)34+\",\"+(char)34));\n\t\t\tproductNutrients [i2++]=new ProductNutrient(split1[0].substring\n\t\t\t\t\t(1, split1[0].length()), split1[1], split1[2], \n\t\t\t\t\tFloat.parseFloat(split1[4]),split1[5].substring(0, split1[5].length()-1));\n\t\t}\n\t\t//close the input\n\t\tinput.close();\n\t\tinput2.close();\n\t\tinput3.close();\n\t\tinput4.close();\n\t}", "public void load(File file) throws IOException {\n FileReader reader = new FileReader(file); //new File Reader\r\n char str[] = new char[10000]; //create a character string array of 10000 values\r\n reader.read(str);//read the file\r\n boolean temp[][] = new boolean[100][100]; //create a temporary new colony\r\n for (int r = 0; r < 100; r++) { //iterate through to fill with values\r\n for (int c = 0; c < 100; c++) {\r\n if (str[r*100 + c] == '1') { //if the char is equal to one, cell is alive\r\n temp[r][c] = true;\r\n } else {\r\n temp[r][c] = false; //else, the cell is dead\r\n }\r\n }\r\n }\r\n grid = temp;\r\n }", "public static Map<String, Object> createSampleConfiguration(final File file) throws Exception {\n\t\tfinal Map<String, Object> configuration = new HashMap<String, Object>();\n\t\t\n\t\tBufferedWriter writer = null;\n\t\ttry {\n\t\t\twriter = new BufferedWriter(new FileWriter(file));\n\t\t\tfor (int i = 0; i < RANDOMIZER.nextInt(10) + 2; i++) {\n\t\t\t\tfinal String key = String.valueOf(i);\n\t\t\t\tfinal String value = randomString();\n\t\t\t\t\n\t\t\t\tconfiguration.put(key, value);\n\t\t\t\twriter.write(key + \": \\\"\" + value + \"\\\"\");\n\t\t\t\twriter.newLine();\n\t\t\t}\n\t\t} finally {\n\t\t\twriter.flush();\n\t\t\twriter.close();\n\t\t}\n\t\treturn configuration;\n\t}", "private void loadScheme(File file)\n\t{\n\t\tString name = file.getName();\n\n\t\ttry\n\t\t{\n\t\t\tBedrockScheme particle = BedrockScheme.parse(FileUtils.readFileToString(file, Charset.defaultCharset()));\n\n\t\t\tthis.presets.put(name.substring(0, name.indexOf(\".json\")), particle);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args) throws FileNotFoundException {\n\t\t\t\n\t\tScanner scan = new Scanner(new File(\"input.txt\"));\n\t\t\n\t\tParser parse;\n\t\tCode code = new Code();\n\t\tSymbolTable st = new SymbolTable();\n\t\t\n\t\twhile(scan.hasNextLine()) {\n\t\t\tString inCode = scan.nextLine();\t\n\t\t\tparse = new Parser(inCode);\n\t\t}\n\t\t\n\t}", "public static void readFileSilver(String filename) throws FileNotFoundException{\n try {\n //Scanners and readers and everything??\n File text = new File(filename);\n Scanner inf = new Scanner(text);\n BufferedReader brTest = new BufferedReader(new FileReader(filename));\n String firstLine = brTest.readLine();\n String[] firstLineArray = new String[3];\n firstLineArray = firstLine.split(\" \");\n\n //Determines number of rows, cows, and time.\n N = Integer.parseInt(firstLineArray[0]);\n M = Integer.parseInt(firstLineArray[1]);\n T = Integer.parseInt(firstLineArray[2]);\n\n //Initializes pasture. Assume 0 for empty space, -1 for a tree.\n String temp = \"\";\n pasture = new int[N][M];\n inf.nextLine();\n\n for (int i = 0; i < N; i++){\n temp = inf.next();\n\n for (int j = 0; j < M; j++){\n if (temp.charAt(j) == '.'){\n pasture[i][j] = 0;\n }\n if (temp.charAt(j) == '*'){\n pasture[i][j] = -1;\n }\n }\n }\n\n //Determines (R1, C1) and (R2, C2).\n inf.nextLine();\n R1 = inf.nextInt(); C1 = inf.nextInt();\n R2 = inf.nextInt(); C2 = inf.nextInt();\n\n //Exceptions.\n } catch (FileNotFoundException ex){\n System.out.println(\"Yikes\");\n } catch (IOException ex){\n System.out.println(\"Yikes\");\n }\n }", "public void parse(){\n\t\tFile file = new File(fileLocation);\n\n\t\tlong seed = ConfigurationData.DEFAULT_SEED;\n\t\tString outputDest = ConfigurationData.DEFAULT_OUTPUT_DESTINATION;\n\t\tLong tickLength = ConfigurationData.DEFAULT_TICK_LENGTH;\n\t\tint port = ConfigurationData.DEFAULT_PORT;\n\n\t\ttry {\n\n\t\t\tScanner sc = new Scanner(file);\n\n\t\t\twhile(sc.hasNext()){\n\t\t\t\tString[] tok = sc.next().split(\"=\");\n\t\t\t\tswitch(tok[0]){\n\t\t\t\tcase \"seed\":\n\t\t\t\t\tseed = Long.parseLong(tok[1]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"outputDestination\":\n\t\t\t\t\toutputDest = tok[1];\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"tickLength\":\n\t\t\t\t\ttickLength = Long.parseLong(tok[1]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"port\":\n\t\t\t\t\tport = Integer.parseInt(tok[1]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsc.close();\n\n\t\t\tconfigurationData = new ConfigurationData(seed, outputDest, tickLength, port);\n\t\t} \n\t\tcatch (FileNotFoundException e) {\n\t\t\tPrintWriter writer;\n\t\t\ttry {\n\t\t\t\twriter = new PrintWriter(fileLocation, \"UTF-8\");\n\t\t\t\twriter.println(\"seed=\"+seed);\n\t\t\t\twriter.println(\"outputDestination=\"+outputDest);\n\t\t\t\twriter.println(\"tickLength=\"+tickLength);\n\t\t\t\twriter.println(\"port=\"+port);\n\t\t\t\twriter.close();\n\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t} catch (UnsupportedEncodingException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\tconfigurationData = ConfigurationData.makeDefault();\n\t\t\tSystem.out.println(\"Default file created\");\n\t\t}\n\t}", "public static Map loadMap(String MapFile){\n int Bottle =0;\n int Bottle1= 0;\n Map Object = new Map(0,0);\n \n try {\n \n Scanner scan = new Scanner(new File(MapFile));\n FileReader fr = new FileReader(MapFile);\n while(scan.hasNextLine()){\n if (scan.hasNextInt()){\n Bottle = scan.nextInt();\n Bottle1 = scan.nextInt();\n\n }\n Object = new Map(Bottle,Bottle1);\n }\n fr.close();\n }\n \n catch (Exception e){\n System.out.println(\"Sorry Nothing Found\");\n System.out.println(e.toString());\n e.printStackTrace(); \n } \n \n return Object;\n }", "public abstract void initGrid(String filename)\r\n throws NumberFormatException, FileNotFoundException, IOException;", "public void readFromFile(){\n\t\ttry {\r\n\t\t\tFile f = new File(\"E:\\\\Study\\\\Course\\\\CSE215L\\\\Project\\\\src\\\\Railway.txt\");\r\n\t\t\tScanner s = new Scanner(f);\r\n\t\t\tpersons = new Person2 [50]; \r\n\t\t\tint i = 0;\r\n\t\t\t\r\n\t\t\twhile(s.hasNextLine()){\r\n\t\t\t\tString a = s.nextLine();\r\n\t\t\t\tString b = s.nextLine();\r\n\t\t\t\tString c = s.nextLine();\r\n\t\t\t\tString d = s.nextLine();\r\n\t\t\t\tString e = s.nextLine();\r\n\t\t\t\tString g = s.nextLine();\r\n\t\t\t\tString h = s.nextLine();\r\n\t\t\t\tString j = s.nextLine();\r\n\t\t\t\tPerson2 temp = new Person2 (a,b,c,d,e,g,h,j);\r\n\t\t\t\tpersons[i] = temp;\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t}", "public void reproduce(){\n\t\t// sort the population from strongest to weakest\n\t\tCollections.sort(population);\n\t\tCollections.reverse(population);\n\t\t\n\t\tfor(int i = 0; i < (int)(POPULATION_SIZE*POPULATION_ACTION_PERCENT); i+=2){\n\t\t\t\n\t\t\t// get two random indexes for reproduction based on the exponential function\n\t\t\t// (1/1000) * (randInt)^2 = index\n\t\t\t// this function favors sequences with higher fitness scores\n\t\t\tint randIndex1 = randomGenerator.nextInt((int)Math.sqrt(1000*POPULATION_SIZE*(1-POPULATION_ACTION_PERCENT)));\n\t\t\tint randIndex2 = randomGenerator.nextInt((int)Math.sqrt(1000*POPULATION_SIZE*(1-POPULATION_ACTION_PERCENT)));\n\t\t\t\n\t\t\trandIndex1 = (int) (Math.pow(randIndex1, 2) / 1000);\n\t\t\trandIndex2 = (int) (Math.pow(randIndex2, 2) / 1000);\n\t\t\t\n\t\t\t// get two pieces\n\t\t\tBuildingPiece[] array1 = population.get(randIndex1).getList();\n\t\t\tBuildingPiece[] array2 = population.get(randIndex2).getList();\n\t\t\t\n\t\t\t// find a splicing point\n\t\t\tint splicePoint = findSplicingPoint(array1, array2);\n\t\t\t\n\t\t\t// generate two new arrays based on the splicing point\n\t\t\tBuildingPiece[] newArray1 = generateNewArray(array1, array2, splicePoint);\n\t\t\tBuildingPiece[] newArray2 = generateNewArray(array2, array1, splicePoint);\n\t\t\t\n\t\t\t// make new buildings with the new arrays\n\t\t\tBuilding bp1 = new Building(newArray1, generation, possiblePieces);\n\t\t\tBuilding bp2 = new Building(newArray2, generation, possiblePieces);\n\t\t\t\n\t\t\t// mutate the new building sequences\n\t\t\tmutateArray(bp1);\n\t\t\tmutateArray(bp2);\n\t\t\t\n\t\t\t// add them into the population\n\t\t\tpopulation.add(randIndex1, bp1);\n\t\t\tpopulation.add(randIndex2, bp2);\n\t\t}\n\t}", "public static SnakeProblem buildProblemFromFile(File file) throws IOException {\n int NUM_ONE_AI_OBLIGATORY_PARAMS = 4;\n int NUM_TWO_AI_OBLIGATORY_PARAMS = 7;\n\n java.util.Scanner f;\n try {\n f = new java.util.Scanner(file);\n } catch (FileNotFoundException e) {\n return null;\n }\n\n List<String> lines = new LinkedList<>();\n\n while (f.hasNextLine()) {\n String s = f.nextLine();\n if (!s.equals(\"\") && !s.startsWith(\"//\")) {\n lines.add(s);\n }\n }\n\n List<String> parametersValues = new LinkedList<>();\n for (String line : lines) {\n String[] tokens = line.split(\":|,\");\n for (int i = 1; i < tokens.length; i++) {\n parametersValues.add(tokens[i].trim());\n }\n }\n\n int environmentSize, maxIterations, numEnvironmentRuns;\n\n\n try {\n environmentSize = Integer.parseInt(parametersValues.get(0));\n maxIterations = Integer.parseInt(parametersValues.get(1));\n numEnvironmentRuns = Integer.parseInt(parametersValues.get(2));\n } catch (NumberFormatException e) {\n return null;\n }\n\n if (parametersValues.size() > NUM_ONE_AI_OBLIGATORY_PARAMS) {\n List<Integer> numInputs = new ArrayList<>();\n List<Integer> numHiddenUnits = new ArrayList<>();\n List<Integer> numOutputs = new ArrayList<>();\n List<ActivationFunction> activationFunctions = new ArrayList<>();\n\n try {\n numInputs.add(Integer.parseInt(parametersValues.get(3)));\n\n if (parametersValues.size() > NUM_TWO_AI_OBLIGATORY_PARAMS) {\n numInputs.add(Integer.parseInt(parametersValues.get(4)));\n numHiddenUnits.add(Integer.parseInt(parametersValues.get(5)));\n numHiddenUnits.add(Integer.parseInt(parametersValues.get(6)));\n numOutputs.add(Integer.parseInt(parametersValues.get(7)));\n numOutputs.add(Integer.parseInt(parametersValues.get(8)));\n activationFunctions.add(ActivationFunction.valueOf(parametersValues.get(9).toUpperCase()));\n activationFunctions.add(ActivationFunction.valueOf(parametersValues.get(10).toUpperCase()));\n } else {\n numHiddenUnits.add(Integer.parseInt(parametersValues.get(4)));\n numOutputs.add(Integer.parseInt(parametersValues.get(5)));\n activationFunctions.add(ActivationFunction.valueOf(parametersValues.get(6).toUpperCase()));\n }\n } catch (IllegalArgumentException e) {\n return null;\n }\n\n return new SnakeProblem(\n environmentSize,\n maxIterations,\n numEnvironmentRuns,\n numInputs,\n numHiddenUnits,\n numOutputs,\n activationFunctions);\n }\n\n return new SnakeProblem(\n environmentSize,\n maxIterations,\n numEnvironmentRuns);\n }", "public static void main(String[] args) throws FileNotFoundException {\n Scanner scanner = new Scanner(new FileInputStream(\"/Users/guoziren/IdeaProjects/剑指offer for Java/src/main/java/com/ustc/leetcode/algorithmidea/dynamicprogramming/input.txt\"));\n }", "public static void main(String[] args) throws FileNotFoundException {\n File f = new File(\"dict2.txt\");\n Scanner readFile = new Scanner(f);\n ArrayList<String> dictionary = new ArrayList<String>();\n \n while (readFile.hasNext()) {\n dictionary.add(readFile.next());\n }\n \n HangmanLogic logic = new HangmanLogic(dictionary);\n HangmanUserInterface game = new HangmanUserInterface(logic);\n game.start();\n }", "public static Map<String, Collection<Gene>> loadDataByChr(String file) throws IOException{\n\t\treturn loadDataByChr(new File(file));\n\t}", "private void loadSpaceObjects(String file){\n\t\ttry{\n\t\t\tFileReader fr = new FileReader(file);\n\t\t\tBufferedReader br = new BufferedReader(fr);\n\t\t\tScanner sc = new Scanner(br);\n\t\t\t\n\t\t\tloadFactory(sc);\n\t\t\tloadPlanets(sc);\n\n\t\t\tsc.close();\n\t\t\tbr.close();\n\t\t\tfr.close();\n\t\t\t\t\n\t\t}catch(Exception e){\n\t\t\tSystem.out.println(\"File not found: SpaceProgramPlanets.txt\");\n\t\t}\n\t}", "public void readFromFile() {\n\n\t}", "public static Map readMap(MapName s)\n {\n Map map = new Map(1);\n try\n {\n MapReader run = new MapReader();\n System.out.println(s.toString());\n Scanner mapReader = new Scanner(run.getClass().getResourceAsStream(\"/\"+s.toString()+\".jwmap\"));\n ArrayList<String[]> numberLines = new ArrayList<String[]>();\n int dim = mapReader.nextInt();\n mapReader.nextLine();\n for(int gh = 0 ; gh < dim; gh++)\n {\n String[] nums = mapReader.nextLine().split(\" \");\n numberLines.add(nums);\n }\n int[][] newMap = new int[numberLines.size()][numberLines.size()];\n \n for(int i = 0; i < numberLines.size();i++)\n {\n for(int h = 0; h < numberLines.get(i).length;h++)\n {\n newMap[i][h] = Integer.parseInt(numberLines.get(i)[h]);\n }\n }\n map.loadMap(newMap);\n \n TreeMap<Integer,ArrayList<Integer>> spawn1 = map.getSpawn1();\n TreeMap<Integer,ArrayList<Integer>> spawn2 = map.getSpawn2();\n \n String line = \"\";\n while(mapReader.hasNextLine() && (line = mapReader.nextLine()).contains(\"spawn1\"))\n {\n Scanner in = new Scanner(line);\n in.next();\n int x = in.nextInt();\n spawn1.put(x, new ArrayList<Integer>());\n while(in.hasNextInt())\n {\n spawn1.get(x).add(in.nextInt());\n }\n }\n \n if(!line.equals(\"\"))\n {\n Scanner in = new Scanner(line);\n in.next();\n int x = in.nextInt();\n spawn2.put(x, new ArrayList<Integer>());\n while(in.hasNextInt())\n {\n spawn2.get(x).add(in.nextInt());\n }\n }\n while(mapReader.hasNextLine() && (line = mapReader.nextLine()).contains(\"spawn2\"))\n {\n Scanner in = new Scanner(line);\n in.next();\n int x = in.nextInt();\n spawn2.put(x, new ArrayList<Integer>());\n while(in.hasNextInt())\n {\n spawn2.get(x).add(in.nextInt());\n }\n }\n }\n catch (Exception ex)\n {\n JOptionPane.showMessageDialog(null, \"Corrupted file!\");\n }\n return map;\n }", "public Consensus(String filename, double perc) {\n\tBufferedReader input = null;\n\t// Read in the taxa information and input trees\n\ttry {\n\t input = new BufferedReader(new FileReader(filename));\n\t String line = input.readLine();\n\t StringTokenizer st;\n\t System.out.println(\"Reading taxa blocks.\");\n\t //Read in the taxa labels\n\t while (line.indexOf(\"dimensions ntax\") == -1)\n\t\tline = input.readLine();\n\t //No. of taxa\n\t noTax = Integer.parseInt(line.substring(\n\t\t\t line.indexOf(\"=\") + 1, line.indexOf(\";\")).trim());\n\t System.out.println(\"No. of taxa: \" + noTax);\n\t taxa = new String[noTax];\n\t //Random weight, used in hashcode calculation\n\t int[] weight = new int[noTax];\n\t while (line.indexOf(\"taxlabels\") == -1)\n\t\tline = input.readLine();\n\t st = new StringTokenizer(line.substring(0, line.indexOf(\";\")));\n\t st.nextToken();\n\t int count = 0;\n\t Random r = new Random();\n\t while (st.hasMoreTokens()){ \n\t\ttaxa[count] = st.nextToken();\n\t\tweight[count++] = Math.abs(r.nextInt());\n\t }\n\t //Determine hash1\n\t int low = 0;\n\t int high = primes.length;\n\t while (low + 1 < high) {\n\t\t//System.out.println(primes[(high + low) / 2] + \" High = \" +\n\t\t//\t\t high + \" Low = \" + low);\n\t\tif (primes[(high + low) / 2] < (10 * noTax)) {\n\t\t low = (high + low) / 2;\n\t\t} else {\n\t\t high = (high + low) / 2;\n\t\t}\n\t }\n\t //change from low+1 to low to avoie array index out of bound when low=length-1\n\t hash1 = primes[low];\n\t System.out.println(\"Hash1 = \" + hash1);\n\t hashTable = new Node[hash1];\n\t built = new Node[hash1];\n\n\t //Read in the input trees\n\t System.out.print(\"Start reading input trees\");\n\t trees = new Vector();\n\t while (line != null) {\n\t\tif (line.startsWith(\"tree B_\")) {\n\t\t trees.add(new BinTree(convertToID(line.substring(\n\t\t\t\t\t\t line.indexOf(\"(\"), \n\t\t\t\t\t\t line.indexOf(\";\"))),\n\t\t\t\t\t hash1, hash2, weight));\n\t\t System.out.print(\".\");\n\t\t}\n\t\tline = input.readLine();\n\t }\n\t trees.trimToSize();\n\t noTrees = trees.size();\n\t System.out.println(\"\\nNo. of trees read: \" + noTrees);\n\t thresh = noTrees * perc;\n\t} catch (Exception e) {\n\t\tSystem.out.println(\"Exception: \" + e);\n\t\te.printStackTrace();\n\t\tSystem.exit(1);\n\t} finally {\n\t try {\n\t\tinput.close();\n\t } catch (IOException ie) {\n\t\tSystem.out.println(\"Exception: \" + ie);\n\t\tie.printStackTrace();\n\t\tSystem.exit(1);\n\t }\n\t}\n }", "private int[][] generateInitialPopulation(int binCt, int binSize, int pkgCt, int populationSize) {\n\t\tint[][] population = new int[populationSize][pkgCt];\n\t\tfor (int i = 0; i < populationSize; i++) {\n\t\t\tfor (int j = 0; j < pkgCt; j++) {\n\t\t\t\tpopulation[i][j] = rand.nextInt(binCt);\n\t\t\t}\n\t\t}\n\t\treturn population;\n\t}", "private void importCountries(JTFFile file) {\n for (SimpleData country : file.getCountries()) {\n if (countriesService.exist(country)) {\n country.setId(countriesService.getSimpleData(country.getName()).getId());\n } else {\n countriesService.create(country);\n }\n }\n }", "public void loadMembers(String filename) {\n try {\r\n Scanner input = new Scanner(new File(filename));\r\n // keep going until the end \r\n while (input.hasNext()) {\r\n String name = input.nextLine();\r\n String address = input.nextLine();\r\n String onLoan = input.nextLine();\r\n // add the member \r\n addMember(name, address);\r\n \r\n if (!onLoan.equals(\"NONE\")) {\r\n \r\n }\r\n }\r\n } catch (FileNotFoundException e) {\r\n // print an error message \r\n System.err.println(\"File not found\");\r\n }\r\n }", "public void load(){\n\t\t\tArrayList<String> entries = readEntriesFromFile(FILENAME);\n\t\t\t\n\t\t\tfor(int i = 1; i < entries.size(); i++){\n\t\t\t\tString entry = entries.get(i);\n\t\t\t\tString[] entryParts = entry.split(\",\");\n\t\t\t\tString name = entryParts[0];\n\t\t\t\tString power = entryParts[1];\n\t\t\t\tString gold = entryParts[2];\n\t\t\t\tString xp = entryParts[3];\n\t\t\t\tString location = entryParts[4];\n\t\t\t\tint powerInt = Integer.parseInt(power);\n\t\t\t\tint goldInt = Integer.parseInt(gold);\n\t\t\t\tint XPInt = Integer.parseInt(xp);\n\t\t\t\tRegion regionR = RM.getRegion(location);\n\t\t\t\tTrap trap = new Trap(name, powerInt, goldInt, XPInt, regionR);\n\t\t\t\ttrapList[i-1] = trap;\n\t\t\t}\n\t}", "public static List<Cell> parsePizza(String file) throws IOException {\n try (FileReader fileReader = new FileReader(file)) {\n BufferedReader br = new BufferedReader(fileReader);\n //skip a line with slice instructions\n br.readLine();\n //declare a pizza cells array\n List<Cell> cells = new ArrayList<>();\n int row = 0;\n String fileLine;\n while ((fileLine = br.readLine()) != null) {\n for (int column = 0; column < fileLine.length(); column++) {\n Character literal = fileLine.charAt(column);\n if (literal.toString().equals(Ingredient.TOMATO.toString())) {\n cells.add(new Cell(row, column, Ingredient.TOMATO));\n } else if (literal.toString().equals(Ingredient.MUSHROOM.toString())) {\n cells.add(new Cell(row, column, Ingredient.MUSHROOM));\n }\n }\n row++;\n }\n return cells;\n }\n }", "public void RunAlgorithm() throws IOException\n {\n Scanner kb = new Scanner(new File(\"family.dat\"));\n while (kb.hasNextLine())\n {\n String strLine = kb.nextLine();\n String[] strTokens = strLine.split(\" \");\n \n FamilyMember fmFrom = GetFamilyMember(strTokens[0]);\n if (null == fmFrom)\n {\n fmFrom = new FamilyMember();\n fmFrom.mName = strTokens[0];\n \n mAllMembers.put(fmFrom.mName, fmFrom);\n }\n \n FamilyMember fmTo = GetFamilyMember(strTokens[2]);\n if (null == fmTo)\n {\n fmTo = new FamilyMember();\n fmTo.mName = strTokens[2];\n \n mAllMembers.put(fmTo.mName, fmTo);\n }\n \n if (strTokens[1].equalsIgnoreCase(\"MOTHER\"))\n {\n AddMother(fmFrom, fmTo);\n }\n else if (strTokens[1].equalsIgnoreCase(\"FATHER\"))\n {\n AddFather(fmFrom, fmTo);\n }\n else if (strTokens[1].equalsIgnoreCase(\"DAUGHTER\"))\n {\n AddDaughter(fmFrom, fmTo);\n }\n else if (strTokens[1].equalsIgnoreCase(\"SON\"))\n {\n AddSon(fmFrom, fmTo);\n }\n else if (strTokens[1].equalsIgnoreCase(\"SISTER\"))\n {\n AddSister(fmFrom, fmTo);\n }\n else if (strTokens[1].equalsIgnoreCase(\"BROTHER\"))\n {\n AddBrother(fmFrom, fmTo);\n }\n else if (strTokens[1].equalsIgnoreCase(\"WIFE\"))\n {\n AddWife(fmFrom, fmTo);\n }\n else if (strTokens[1].equalsIgnoreCase(\"HUSBAND\"))\n {\n AddHusband(fmFrom, fmTo);\n }\n }\n \n PrintGenerations();\n }", "public static void populateDB(String fileName) {\n String dataString = Util.readStringFromFile(new File(fileName));\n ParseState parseState = new ParseState(dataString);\n while (parseState.hasMoreLines()) {\n String line = parseState.getNextLine();\n LineParser lineParser = null;\n if (line.matches(\"^objects\\\\s*\\\\{$\")) {\n lineParser = new ObjectLineParser();\n } else if (line.matches(\"^links\\\\s*\\\\{$\")) {\n lineParser = new LinkLineParser();\n } else if (line.matches(\"^attributes\\\\s*\\\\{$\")) {\n lineParser = new AttributeDefLineParser();\n } else if (line.matches(\"^containers\\\\s*\\\\{$\")) {\n lineParser = new ContainerLineParser();\n } else {\n throw new IllegalArgumentException(\"Unknown top-level category: \" + line);\n }\n parseBlock(parseState, lineParser);\n }\n }", "private void ReadFile (String filename)\n\t{\n\t\ttry\n\t\t{\n\t\t\tScanner input = new Scanner(new FileReader(filename));\n\t\t\tScanner line = new Scanner(input.nextLine());\n\t\t\twhile (input.hasNextLine() || line.hasNext())\n\t\t\t{\n\t\t\t\tPolygon polygon = new Polygon ();\n\t\t\t\twhile (line.hasNextDouble())\n\t\t\t\t{\n\t\t\t\t\tdouble tmpX = line.nextDouble(),\n\t\t\t\t\t\t\ttmpY = line.nextDouble(),\n\t\t\t\t\t\t\ttmpZ = line.nextDouble();\n\t\t\t\t\tpolygon.add(new Vec4(tmpX, tmpY, tmpZ));\n\t\t\t\t}\n\t\t\t\tif (input.hasNextLine())\n\t\t\t\t{\n\t\t\t\t\tline = new Scanner(input.nextLine());\n\t\t\t\t}\n\t\t\t\tobject.add(polygon);\n\t\t\t}\n\t\t\tinput.close();\n\t\t\tline.close();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args) throws IOException {\n \n // set parameter set list\n ParameterSetListMaker maker = new ParameterSetListMaker(DefaultParameterRecipes.getDEFAULT_PARAMETER_RECIPES());\n List<ParameterSet> psList = maker.getParameterSetList();\n \n //Get sequenceDNA a singleton chromsomome II currently\n Path p1 = Paths.get(ParameterSet.FA_SEQ_FILE);\n seq = new SequenceDNA(p1, new SeqInterval(ParameterSet.SEQUENCE_START, ParameterSet.SEQUENCE_END));\n \n //Get PUExpt chromosome II - a singleton\n Path p = Paths.get(ParameterSet.BIN_COUNT_FILE);\n pu = new PuExperiment(p, new SeqBin(ParameterSet.PU_BIN_SIZE,0)); //the pu experiment under study - also sets bin size for analysis\n \n //Get genbank annotation file of chromosome II - a singleton\n Path p2 = Paths.get(ParameterSet.CHROMOSOME_II_GENBANK);\n annotation = new SequenceDNAAnnotationGenbank(p2);\n \n //get transcript list - a singleton\n transcriptList = annotation.getTranscriptsByType(type-> type == Transcript.TRANSCRIPT_TYPE.MRNA || type == Transcript.TRANSCRIPT_TYPE.SNRNA ||\n type == Transcript.TRANSCRIPT_TYPE.RRNA || type == Transcript.TRANSCRIPT_TYPE.SNORNA || type == Transcript.TRANSCRIPT_TYPE.TRNA);\n \n //get Rif1 list\n Path rif1p = Paths.get(ParameterSet.RIF1_INTERVAL_FILE);\n rif1List = new Rif1Sites(rif1p).getRif1IntervalList();\n \n \n //RUN PARAMETER SETS FOR DYNAMIC SIMULATION\n \n //Iterate over all parameter sets\n for (ParameterSet paramSet : psList) { \n\n //Create probability distribution based on transcript exclusion and AT content\n probDistribution = new ProbabilityDistribution2(seq.atFunction(paramSet.getInitiatorSiteLength()), paramSet, \n annotation.getTranscriptBlocks(transcriptList));\n\n //Replicate molecules\n population = new ReplicatingMoleculePopulation(probDistribution, paramSet, rif1List);\n\n //Create new model comparator to compare pu data with predicted right fork frequency distribution from population of replicating molecules\n modelComparator = new AtModelComparator(pu, ParameterSet.SEQUENCE_START / ParameterSet.PU_BIN_SIZE, population.getPopulationAveRtForkFreqInBins());\n \n //print list of interTranscripts with probabilities\n /*System.out.println(\"index\\tstart\\tend\\tAT Content\\tRif1 index\\tprob\"); \n InterTranscriptSites sites = new InterTranscriptSites(seq, annotation.getTranscriptBlocks(transcriptList), rif1List, probDistribution);\n sites.getInterTranscriptList().forEach(System.out::println);\n System.out.println(\"\");*/\n\n switch (task) {\n case PRINT_PARAMETER_SET:\n System.out.println(paramSet); \n break;\n case PRINT_SEQUENCE:\n System.out.println(seq.intervalToString(new SeqInterval(0, seq.getLength() - 1)));\n break;\n case PRINT_CDF:\n System.out.println(paramSet); \n System.out.println(\"MIDPOINT\\tCDF\");\n probDistribution.printCDf(ParameterSet.PU_BIN_SIZE);\n break;\n case PRINT_MEAN_SQUARED_DEVIATION_RIGHT_FORK_FREQUENCY:\n System.out.println(\"MSD\\tNumPreRCs\\tExpConst\\tAttenuator\\tInitLength\\tMaxRate\\tStdDevPredicted\\tStdDevObserved\");\n System.out.println(modelComparator.getMeanSquaredDifference() + \"\\t\" + paramSet.getNumberInitiators() + \"\\t\" + paramSet.getExponentialPowerFactor() + \"\\t\" + \n paramSet.getAttenuationFactor() + \"\\t\" + paramSet.getInitiatorSiteLength() \n + \"\\t\" + paramSet.getMaxFiringProbabilityPerMin() + \"\\t\" + modelComparator.getPredictedStdDeviation() + \"\\t\" + modelComparator.getObservedStdDeviation());\n break;\n case PRINT_PREDICTED_AND_OBSERVED_RIGHT_FORK_FREQUENCIES:\n printPredictedAndObservedRtForkFrequencies(paramSet);\n break;\n case PRINT_INITIATION_FREQUENCIES:\n printInitiationFrequencies(paramSet);\n break;\n case PRINT_TERMINATION_FREQUENCIES:\n printTerminationFrequencies(paramSet);\n break;\n case PRINT_MEDIAN_REPLICATION_TIMES_FOR_BINS_IN_GENOME:\n System.out.println(paramSet);\n System.out.println(\"Position\\tMedianTime\");\n List<Double> replicationTimes = population.getPopulationMedianTimeOfReplicationInBins(ParameterSet.PU_BIN_SIZE, ParameterSet.NUMBER_BINS);\n for (int i = 0; i < replicationTimes.size(); i++) {\n System.out.println(i * ParameterSet.PU_BIN_SIZE + ParameterSet.PU_BIN_SIZE / 2 + \"\\t\" + replicationTimes.get(i));\n }\n break;\n case PRINT_SPHASE_DURATION_FOR_MOLECULES_IN_POPULATION:\n System.out.println(paramSet);\n population.getElapsedTimeList().stream().forEach(f-> System.out.println(f));\n break;\n case PRINT_FRACTION_REPLICATED_OF_BINS_AT_GIVEN_TIME:\n System.out.println(paramSet);\n System.out.println(\"ELAPSED TIME: \" + timeOfReplication + \" min\");\n System.out.println(\"Position\\tFxReplicated\");\n List<Double> fxReplicated = population.getPopulationAveFxReplicatedInBins(timeOfReplication, ParameterSet.PU_BIN_SIZE, ParameterSet.NUMBER_BINS, paramSet.getMinPerCycle());\n for (int i = 0; i < fxReplicated.size(); i++) {\n System.out.println(i * ParameterSet.PU_BIN_SIZE + ParameterSet.PU_BIN_SIZE / 2 + \"\\t\" + fxReplicated.get(i));\n }\n break;\n case PRINT_REPLICATION_TIME_OF_BIN_FOR_MOLECULES_IN_POPULATION:\n System.out.println(paramSet);\n System.out.println(\"BIN NUMBER: \" + binNumber);\n for (int i = 0; i < paramSet.getNumberCells(); i++) {\n System.out.println(population.getPopulationTimesOfReplicationOfBin(binNumber)[i]);\n }\n break;\n case PRINT_RF_DELTA_LIST:\n PrintDeltaAtContentAndNumberTranscribedPositionsOfBins();\n }\n } \n }", "private void setUp(String file) {\n unorderedList = new LinkedList<>();\n orderedList = new SortedLinkedList<>();\n\n try {\n input = new Scanner(new BufferedReader(new FileReader(file)));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "public BaseballElimination(String filename) {\n\n System.out.println(\"start parsing \" + filename);\n In in = new In(filename);\n if (in.hasNextLine()) {\n int count = Integer.valueOf(in.readLine());\n w = new int[count];\n l = new int[count];\n r = new int[count];\n g = new int[count][count];\n\n for (int i = 0; i < count; i++) {\n if (!in.hasNextLine()) {\n throw new IllegalArgumentException(\"Not enough lines, count is \" + count +\n \", file ends after \" + i + \" line\");\n }\n String line = in.readLine();\n System.out.println(\"Line: \" + line);\n\n String[] parts = line.split(\" \");\n names[i] = parts[0];\n w[i] = Integer.valueOf(parts[1]);\n l[i] = Integer.valueOf(parts[2]);\n r[i] = Integer.valueOf(parts[3]);\n for (int j = 0; j < count; j++) {\n g[i][j] = Integer.valueOf(parts[4 + j]);\n }\n System.out.print(\" Parsed: \" + names[i] + \" \" + w[i] + \" \" + l[i] + \" \" + r[i]);\n for (int j = 0; j < count; j++) {\n System.out.print(\" \" + g[i][j]);\n }\n System.out.println();\n }\n }\n System.out.println(\"end\");\n }" ]
[ "0.6398022", "0.6177843", "0.61508733", "0.6018245", "0.590206", "0.58212477", "0.57501787", "0.5666979", "0.5623465", "0.56033415", "0.5522008", "0.55145186", "0.5482721", "0.54542285", "0.54488045", "0.5431842", "0.54279846", "0.5415278", "0.54050976", "0.53862834", "0.53845805", "0.5378773", "0.5341032", "0.53186506", "0.5292681", "0.52809155", "0.5278061", "0.5252577", "0.524584", "0.52375644", "0.52375644", "0.5231631", "0.522488", "0.5193831", "0.5192661", "0.51908475", "0.5187497", "0.5175638", "0.51687324", "0.5163667", "0.5157728", "0.5149058", "0.5143796", "0.51269096", "0.51250416", "0.5123476", "0.51162666", "0.5114852", "0.51112914", "0.5108743", "0.51039886", "0.5103447", "0.51033235", "0.50989646", "0.5088154", "0.5084987", "0.5083402", "0.5078968", "0.5071984", "0.5063469", "0.5047365", "0.5044682", "0.5024279", "0.50159734", "0.50142556", "0.5009504", "0.5004705", "0.5000248", "0.49987626", "0.49971035", "0.49791816", "0.49662596", "0.4965645", "0.4961836", "0.4961496", "0.49481174", "0.49479946", "0.4938549", "0.49324936", "0.49314255", "0.49312228", "0.49299094", "0.49284503", "0.4924477", "0.4918131", "0.49177635", "0.49171862", "0.49053898", "0.49020395", "0.49002928", "0.48977035", "0.48967922", "0.48953083", "0.48895875", "0.48884702", "0.4877488", "0.48754022", "0.48730555", "0.4870754", "0.48688552" ]
0.7113595
0
/ access modifiers changed from: protected
public abstract String getIntentActionString();
{ "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
private EventBus bus = EventBus.getDefault();
@Override public ChatViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View view = LayoutInflater.from(parent.getContext()) .inflate(R.layout.chat_row, parent, false); ctx=view.getContext(); ChatViewHolder myViewHolder = new ChatViewHolder(view); return myViewHolder; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "EventBus getEventBus();", "void onBusEvent(Event event);", "@Provides\n @Singleton\n EventBus providesEventBus() {\n return EventBus.getDefault();\n }", "public EventBus getEventBus(boolean force);", "public interface EventBus {\n\n public String name();\n\n /**\n * Posts an event to all registered subscribers. This method will return successfully after the\n * event has been posted to all subscribers, and regardless of any exceptions thrown by\n * subscribers.\n *\n * @param event event to post.\n */\n public void post(Object event);\n\n}", "void registerEventbusHandlers();", "public EventBus getEventSystem() {\n return system;\n }", "public interface IEventBus {\n\t/**\n\t * Registers an {@link IListener} to this bus\n\t */\n\tpublic void register(IListener listener);\n\t\n\t/**\n\t * Unregisters an {@link IListener} from this bus.\n\t * Only unregisters the first occurrence of the specified listener.\n\t * @param listener {@link IListener} to unregister\n\t */\n\tpublic void unregister(IListener listener);\n\t\n\t/**\n\t * Posts an {@link Event} and returns the posted event.\n\t * @param event {@link Event} to dispatch\n\t * @return {@link Event} the posted event\n\t */\n\tpublic <T extends Event> T post(T event);\n}", "public AdminCommandEventBroker getEventBroker();", "public void register() {\n unregister();\n Log.d(TAG, \"[register in eventbus]\");\n EventBus.getDefault().register(this);\n }", "public static OperatingSystemEventSender getInstance() {\r\n return OperatingSystemEventSender.INSTANCE;\r\n }", "@PostConstruct\n public void init() {\n eventBus.register(this);\n }", "@Override\n\tprotected boolean isBindEventBusHere() {\n\t\treturn false;\n\t}", "public EventBus build() {\n return new EventBus(this);\n }", "EventManager()\n {\n }", "void registerEventBusForEvent( EventBus eventBus, Consumer<List<? extends EventMessage<?>>> messageProcessor );", "public BaseLogic(EventBus eventBus)\n {\n if (eventBus == null)\n {\n mEventBus = EventBus.getDefault();\n }\n else\n {\n mEventBus = eventBus;\n }\n }", "public EventHandlerRegistry() {\n }", "public interface EventBusProducer {\n void post(final Answer answer);\n}", "protected Bus getBus() {\n\t\tWorkerApp app = (WorkerApp) getActivity().getApplication(); \n\t\treturn app.getBus();\n\t}", "public ServiceEvent() {\n // eventSenderID and eventSenderClass are initialized by the OperatingSystem! \n }", "public interface OnEventAvailableListener {\n\tpublic void OnEventAvailable(Message msg);\n}", "private void init() {\n mEventBus = new AsyncEventBus(new HandlerExecutor());\n mEventBus.register(this);\n }", "EventHubs eventHubs();", "@Test\n public void testGetInstance() {\n assertNotNull(eventDispatcher);\n }", "public EventDispatcher() {\n }", "public IpcEventBus getOutputEventBus() {\n\t\treturn outputEventBus;\n\t}", "public interface IMessageEventBustType {\n\n String EVENT_BUS_TYPE_NOTIFY_WAKEUP_SERVICE = \"event_bus_type_notify_wakeup_service\";\n\n String EVENT_BUS_TYPE_NOTIFY_WAKEUP_THREAD = \"event_bus_type_notify_wakeup_thread\";\n}", "private SockJSHandler eventBusHandler() {\n\n BridgeOptions options = new BridgeOptions()\n .setPingTimeout(15000)\n .addOutboundPermitted(new PermittedOptions().setAddressRegex(\"session\\\\.[0-9]+\"));\n\n /*\n String COLLAB_SERVER_URL = \"http://localhost:8080/js\";\n\n SockJSHandlerOptions sockJSHandlerOptions = new SockJSHandlerOptions();\n String sockjsUrl = COLLAB_SERVER_URL + \"/\" + SOCKJS_0_3_4_MIN_JS;\n\n logger.info(\" SOCKJSURL {}\", sockjsUrl);\n\n System.out.println(\"SOCKJSURL: \" + sockjsUrl);\n\n sockJSHandlerOptions.setLibraryURL(sockjsUrl);\n\n// return SockJSHandler.create(vertx, sockJSHandlerOptions).bridge(options, event -> {\n*/\n\n return SockJSHandler.create(vertx).bridge(options, event -> {\n\n System.out.println(\">>>>> Received BridgeEvent: type: \" + event.getClass().getCanonicalName());\n\n if (event.type() == BridgeEventType.SOCKET_CREATED) {\n logger.info(\">>>>> A socket was created: \" + event.getRawMessage());\n }\n\n event.complete(true);\n });\n }", "public BaseLogic()\n {\n this(new EventBus());\n }", "@Override\n public Object getEvent() {\n return eventObj;\n }", "EventUse createEventUse();", "public MessageBus()\r\n\t{\r\n\t\tthis(null);\r\n\t}", "public EventQueue(){}", "public interface Event {\n\n}", "public interface Event {\n\n}", "public EventDispatcher(){\r\n\t\tlisteners = new ArrayList<IEventListener>();\r\n\t\tisBlocked=false;\r\n\t}", "public EventHandleThread(){\n gson = new Gson();\n producer = KafkaProducerCreator.createProducer();\n this.paymentController = new PaymentController();\n }", "SystemEvent createSystemEvent();", "@Override\r\n\t\tpublic void busStopRequested(BusEvent event) {\n\t\t\t\r\n\t\t}", "@Override\n public void onCreate() {\n super.onCreate();\n handler = new Handler();\n BusProvider.register(this);\n }", "@Override\r\n\tpublic void run() {\r\n\t\ttry {\r\n\t\t\teb = new EventBus(ebAddress, ebPort);\r\n\t\t\teb.start();\r\n\t\t\t// Add listener to listen for logins\r\n\t\t\tLoginListener loginListener = new LoginListener(location);\r\n\t\t\teb.addListener(loginListener);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle\r\n\t\t}\r\n\r\n\t}", "public Bus() {\n\t}", "public interface EventDispatcher extends EventBroker {\n\n /**\n * Take an event of type {@code T} and dispatch it to all subscribed\n * listeners.\n * Note: It is not defined whether the event is delivered synchronously or\n * asynchronously.\n *\n * @param <T> A subtype of RootApplicationEvent\n * @param event The event to deliver\n */\n <T extends RootApplicationEvent> void dispatch(T event);\n}", "public interface ApplicationListener extends EventListener {\n\n /**\n * Handle an application event\n *\n * @param e event to respond to\n */\n void onApplicationEvent(ApplicationEvent e);\n\n}", "public static MessageBusImpl getInstance() \r\n\t{\r\n\t\treturn MessageBusImplHolder.instance;\r\n\t}", "@Inject\n public BabystepsManager(EventBus bus) {\n this.bus = bus;\n bus.register(this);\n }", "private EventMessageMapper() {\n }", "public AppQueue getQueue()\r\n {\r\n return event_q;\r\n }", "public interface IEvent {\n}", "@Override\r\n\tpublic void onEvent(Object e) {\n\t}", "Event () {\n // Nothing to do here.\n }", "void onApplicationEvent(ApplicationEvent e);", "public RetroStick() {\n eventBus = new EventBus();\n initComponents();\n }", "public interface SubscribableByMe extends Event {\n}", "EventChannel create();", "private static EventQueue eventQueue() {\n return Toolkit.getDefaultToolkit().getSystemEventQueue();\n }", "public Event() {\n\n }", "public EventBusConsumerFactory(Vertx vertx) {\n\t\tsuper();\n\t\tfinal MessageConsumer<String> consumer = vertx.eventBus().consumer(address);\n\t\tconsumer.handler(message -> {\n\t\t\tSystem.out.println(\"incoming message: \" + message.body());\n\t\t\tJsonObject reply = new JsonObject().put(\"message\", \"Replied Message\");\n\t\t\tmessage.reply(reply);\n\t\t});\n\t}", "@Override\r\n public void processEvent(IAEvent e) {\n\r\n }", "public interface MessagingQueueListener {\n\n void onMessage(MessageEvent messageEvent);\n}", "@Override\r\n\tpublic void handleEvent(Event event) {\n\r\n\t}", "EventBinding createEventBinding();", "private void initializeEvents() {\r\n\t}", "public void onEventMainThread(Object event) {\n\n }", "public void onSubscribe() {\n\n }", "private EventProcessorBuilder baseConfig(MockEventSender es) {\n return sendEvents().eventSender(senderFactory(es));\n }", "public Event() {}", "public Eventd() {\n }", "BasicEvents createBasicEvents();", "public String getEventName();", "public Event(){\n \n }", "@Override\r\n\tpublic void onEvent(Event arg0) {\n\r\n\t}", "public interface EventReceiver {\n\n void onNotify(Event event);\n\n }", "public void frameworkEvent(FrameworkEvent event);", "public Event() {\r\n\r\n\t}", "@Test\n public void dispatchToSingleObjectAndSubscriberMethods() {\n BaseEventBus eventBus = new SynchronousEventBus(LOG);\n\n final List<String> object1Received = new ArrayList<>();\n Object object1 = new Object() {\n @Subscriber\n public void onStringEvent(String event) {\n object1Received.add(event);\n }\n };\n\n final List<Integer> object2Received = new ArrayList<>();\n Object object2 = new Object() {\n @Subscriber\n public void onIntEvent(Integer event) {\n object2Received.add(event);\n }\n };\n\n eventBus.register(object1);\n eventBus.register(object2);\n\n eventBus.post(\"event 1\");\n eventBus.post(\"event 2\");\n\n // only object1 should receive all items\n assertThat(object1Received, is(asList(\"event 1\", \"event 2\")));\n assertThat(object2Received, is(emptyList()));\n\n eventBus.post(1);\n\n assertThat(object1Received, is(asList(\"event 1\", \"event 2\")));\n assertThat(object2Received, is(asList(1)));\n\n }", "private EventController()\n {\n events = new ArrayList<>();\n currentCalendar = Calendar.getInstance();\n }", "public WebEventManager getEventManager() { return _eventManager; }", "CatchingEvent createCatchingEvent();", "EventChannelSource source();", "Event getEvent();", "public Object getEvent() {\r\n return event;\r\n }", "public void consulterEvent() {\n\t\t\n\t}", "@EventName(\"receivedMessageFromTarget\")\n EventListener onReceivedMessageFromTarget(EventHandler<ReceivedMessageFromTarget> eventListener);", "boolean unregisterEventBusForEvent( EventBus eventBus, Consumer<List<? extends EventMessage<?>>> messageProcessor );", "boolean deliver(String busType, String topic, Object event);", "public interface EventCallback {\n void invoke(String receiver,Object result);\n}", "protected String xCB() { return PersistentEventCB.class.getName(); }", "public interface SubscribeRegister<T> {\n\n void register(EventBus eventBus, T target);\n\n}", "@Bean\n public ApplicationEventMulticaster applicationEventMulticaster() {\n SimpleApplicationEventMulticaster eventMulticaster = new SimpleApplicationEventMulticaster();\n eventMulticaster.setTaskExecutor(new SimpleAsyncTaskExecutor());\n return eventMulticaster;\n }", "public void setBus(String busname){\n this.busname = busname;\n }", "@Subscribe\n public void onEvent(Object event) {\n }", "@Subscribe\n public void onEvent(Object event) {\n }", "EventType getEvent();", "void event(Event e) throws Exception;", "public EventDelegate() {\n mNativeRef = nativeCreateDelegate();\n }", "public Event() {\n\t}", "@Override\n public void receiveMessageShutdown() {\n \n }", "public Event(){\n\n }", "public interface WhenEventBus {\n\n /**\n * Returns the underlying event bus being wrapped over\n *\n * @return\n */\n EventBus getEventBus();\n\n /**\n * Send a message\n *\n * @param address The address to send it to\n * @param message The message\n */\n Promise<Message> send(String address, Object message);\n\n /**\n * Send an object as a message\n *\n * @param address The address to send it to\n * @param message The message\n * @param timeout - Timeout in ms. If no reply received within the timeout then the reply handler will be unregistered\n */\n <T> Promise<Message<T>> sendWithTimeout(String address, Object message, long timeout);\n\n /**\n * Send a JSON object as a message\n *\n * @param address The address to send it to\n * @param message The message\n */\n <T> Promise<Message<T>> send(String address, JsonObject message);\n\n /**\n * Send a JSON object as a message\n *\n * @param address The address to send it to\n * @param message The message\n * @param timeout - Timeout in ms. If no reply received within the timeout then the reply handler will be unregistered\n */\n <T> Promise<Message<T>> sendWithTimeout(String address, JsonObject message, long timeout);\n\n /**\n * Send a JSON array as a message\n *\n * @param address The address to send it to\n * @param message The message\n */\n <T> Promise<Message<T>> send(String address, JsonArray message);\n\n /**\n * Send a JSON array as a message\n *\n * @param address The address to send it to\n * @param message The message\n * @param timeout - Timeout in ms. If no reply received within the timeout then the reply handler will be unregistered\n */\n <T> Promise<Message<T>> sendWithTimeout(String address, JsonArray message, long timeout);\n\n /**\n * Send a Buffer as a message\n *\n * @param address The address to send it to\n * @param message The message\n */\n <T> Promise<Message<T>> send(String address, Buffer message);\n\n /**\n * Send a Buffer object as a message\n *\n * @param address The address to send it to\n * @param message The message\n * @param timeout - Timeout in ms. If no reply received within the timeout then the reply handler will be unregistered\n */\n <T> Promise<Message<T>> sendWithTimeout(String address, Buffer message, long timeout);\n\n /**\n * Send a byte[] as a message\n *\n * @param address The address to send it to\n * @param message The message\n */\n <T> Promise<Message<T>> send(String address, byte[] message);\n\n /**\n * Send a byte[] object as a message\n *\n * @param address The address to send it to\n * @param message The message\n * @param timeout - Timeout in ms. If no reply received within the timeout then the reply handler will be unregistered\n */\n <T> Promise<Message<T>> sendWithTimeout(String address, byte[] message, long timeout);\n\n /**\n * Send a String as a message\n *\n * @param address The address to send it to\n * @param message The message\n */\n <T> Promise<Message<T>> send(String address, String message);\n\n /**\n * Send a string object as a message\n *\n * @param address The address to send it to\n * @param message The message\n * @param timeout - Timeout in ms. If no reply received within the timeout then the reply handler will be unregistered\n */\n <T> Promise<Message<T>> sendWithTimeout(String address, String message, long timeout);\n\n /**\n * Send an Integer as a message\n *\n * @param address The address to send it to\n * @param message The message\n */\n <T> Promise<Message<T>> send(String address, Integer message);\n\n /**\n * Send an Integer as a message\n *\n * @param address The address to send it to\n * @param message The message\n * @param timeout - Timeout in ms. If no reply received within the timeout then the reply handler will be unregistered\n */\n <T> Promise<Message<T>> sendWithTimeout(String address, Integer message, long timeout);\n\n /**\n * Send a Long as a message\n *\n * @param address The address to send it to\n * @param message The message\n */\n <T> Promise<Message<T>> send(String address, Long message);\n\n /**\n * Send a long as a message\n *\n * @param address The address to send it to\n * @param message The message\n * @param timeout - Timeout in ms. If no reply received within the timeout then the reply handler will be unregistered\n */\n <T> Promise<Message<T>> sendWithTimeout(String address, Long message, long timeout);\n\n /**\n * Send a Float as a message\n *\n * @param address The address to send it to\n * @param message The message\n */\n <T> Promise<Message<T>> send(String address, Float message);\n\n /**\n * Send a float as a message\n *\n * @param address The address to send it to\n * @param message The message\n * @param timeout - Timeout in ms. If no reply received within the timeout then the reply handler will be unregistered\n */\n <T> Promise<Message<T>> sendWithTimeout(String address, Float message, long timeout);\n\n /**\n * Send a Double as a message\n *\n * @param address The address to send it to\n * @param message The message\n */\n <T> Promise<Message<T>> send(String address, Double message);\n\n /**\n * Send a double as a message\n *\n * @param address The address to send it to\n * @param message The message\n * @param timeout - Timeout in ms. If no reply received within the timeout then the reply handler will be unregistered\n */\n <T> Promise<Message<T>> sendWithTimeout(String address, Double message, long timeout);\n\n /**\n * Send a Boolean as a message\n *\n * @param address The address to send it to\n * @param message The message\n */\n <T> Promise<Message<T>> send(String address, Boolean message);\n\n /**\n * Send a boolean as a message\n *\n * @param address The address to send it to\n * @param message The message\n * @param timeout - Timeout in ms. If no reply received within the timeout then the reply handler will be unregistered\n */\n <T> Promise<Message<T>> sendWithTimeout(String address, Boolean message, long timeout);\n\n /**\n * Send a Short as a message\n *\n * @param address The address to send it to\n * @param message The message\n */\n <T> Promise<Message<T>> send(String address, Short message);\n\n /**\n * Send a short as a message\n *\n * @param address The address to send it to\n * @param message The message\n * @param timeout - Timeout in ms. If no reply received within the timeout then the reply handler will be unregistered\n */\n <T> Promise<Message<T>> sendWithTimeout(String address, Short message, long timeout);\n\n /**\n * Send a Character as a message\n *\n * @param address The address to send it to\n * @param message The message\n */\n <T> Promise<Message<T>> send(String address, Character message);\n\n /**\n * Send a character as a message\n *\n * @param address The address to send it to\n * @param message The message\n * @param timeout - Timeout in ms. If no reply received within the timeout then the reply handler will be unregistered\n */\n <T> Promise<Message<T>> sendWithTimeout(String address, Character message, long timeout);\n\n /**\n * Send a Byte as a message\n *\n * @param address The address to send it to\n * @param message The message\n */\n <T> Promise<Message<T>> send(String address, Byte message);\n\n /**\n * Send a byte as a message\n *\n * @param address The address to send it to\n * @param message The message\n * @param timeout - Timeout in ms. If no reply received within the timeout then the reply handler will be unregistered\n */\n <T> Promise<Message<T>> sendWithTimeout(String address, Byte message, long timeout);\n\n /**\n * Unregisters a handler given the address and the handler\n *\n * @param address The address the handler was registered at\n * @param handler The handler\n */\n Promise<Void> unregisterHandler(String address, Handler<? extends Message> handler);\n\n /**\n * Registers a handler against the specified address\n *\n * @param address The address to register it at\n * @param handler The handler\n */\n Promise<Void> registerHandler(String address, Handler<? extends Message> handler);\n\n}" ]
[ "0.8322086", "0.75359553", "0.73929435", "0.70882213", "0.6975219", "0.67914045", "0.6585402", "0.65054864", "0.64294374", "0.6413509", "0.6356971", "0.63218606", "0.6293765", "0.62912554", "0.6279844", "0.6263618", "0.621093", "0.6160692", "0.6136468", "0.61141795", "0.6100371", "0.608785", "0.6069403", "0.6068007", "0.6042043", "0.6040725", "0.59501404", "0.593743", "0.59239465", "0.59140986", "0.59083444", "0.5897065", "0.58878773", "0.58843786", "0.5883349", "0.5883349", "0.58769375", "0.58768755", "0.5873356", "0.58719915", "0.5840248", "0.58399206", "0.5831453", "0.58202493", "0.5818461", "0.580461", "0.5801147", "0.57649136", "0.5758559", "0.5749515", "0.57325697", "0.57258224", "0.5712282", "0.5707106", "0.56960267", "0.56850433", "0.56820256", "0.5656969", "0.5649234", "0.5637837", "0.56277204", "0.5626441", "0.5600723", "0.5554884", "0.5551265", "0.5550681", "0.55353177", "0.5531108", "0.5526706", "0.55255985", "0.55200756", "0.5511797", "0.55098444", "0.5502792", "0.5496786", "0.54930323", "0.5490668", "0.5490268", "0.54784214", "0.5478283", "0.54757476", "0.5465119", "0.5460549", "0.54597163", "0.54582334", "0.5450153", "0.543961", "0.5431159", "0.54272217", "0.5425297", "0.542499", "0.5423969", "0.54236203", "0.54236203", "0.5420508", "0.5408841", "0.5399621", "0.5396671", "0.53954875", "0.53869385", "0.5386844" ]
0.0
-1
Created by Duje on 2.11.2017..
public interface ActivityConstants { public static final int SCAN_ACTIVITY = 1001; public static final int PREVIOUS_ORDERS_ACTIVITY = 1002; public static final String PREFS_NAME = "LoginData"; public static final String PREFS_LOGGED = "LoggedIn"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\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 gravarBd() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\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\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private void poetries() {\n\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n public void init() {\n\n }", "@Override\n protected void getExras() {\n }", "private void init() {\n\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public void gored() {\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 void mo4359a() {\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n void init() {\n }", "public void mo38117a() {\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "@Override\n public void init() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public contrustor(){\r\n\t}", "private void kk12() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "private void init() {\n\n\n\n }", "private void strin() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "public void mo6081a() {\n }", "Petunia() {\r\n\t\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void init() {\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 }", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n public void init() {}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public void mo55254a() {\n }", "private zza.zza()\n\t\t{\n\t\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}" ]
[ "0.5935951", "0.5878457", "0.5852785", "0.5846931", "0.58336616", "0.582113", "0.5782961", "0.57523555", "0.57439077", "0.57439077", "0.57435095", "0.5719622", "0.57098645", "0.5662399", "0.56402063", "0.56402063", "0.5630564", "0.5628354", "0.5625859", "0.56104434", "0.55938476", "0.5583846", "0.55558145", "0.5530411", "0.55163205", "0.55137765", "0.5494183", "0.5482932", "0.5463235", "0.54601467", "0.5454129", "0.5454129", "0.5454129", "0.5454129", "0.5454129", "0.5430852", "0.54285794", "0.5393767", "0.5393767", "0.5393767", "0.53877175", "0.5375508", "0.5375508", "0.53692627", "0.53688276", "0.5368518", "0.5368518", "0.5368518", "0.53684515", "0.5365714", "0.5361783", "0.53556526", "0.53556526", "0.53556526", "0.53553075", "0.53505856", "0.5349019", "0.5346246", "0.534597", "0.5342467", "0.5334792", "0.53310615", "0.5330454", "0.53297967", "0.5329191", "0.5325986", "0.5320876", "0.5315583", "0.53121066", "0.53121066", "0.5300792", "0.52990735", "0.5298466", "0.5283065", "0.5283065", "0.5283065", "0.5283065", "0.5283065", "0.5283065", "0.52811617", "0.52800083", "0.52800083", "0.52800083", "0.52800083", "0.52800083", "0.52800083", "0.52800083", "0.5273698", "0.52732146", "0.52655727", "0.52569103", "0.52569103", "0.5248042", "0.52454525", "0.52393895", "0.5232982", "0.5231603", "0.5231276", "0.52312285", "0.5223365", "0.5221143" ]
0.0
-1
10 true 20 true 40 true 60 false false true 70 false true 100 false false false true 30 false true 50 true 80 true 110 false false false true 90 false false
public static void main(String[] args) { BinaryTree bt = new BinaryTree(); bt.display(); // bt.preo(); // bt.preoIterative(); // // bt.ino(); // bt.inoIterative(); // // bt.posto(); // bt.postoIterative(); // // bt.levelo(); // bt.levelolw(); // // System.out.println(bt.diameter()); // System.out.println(bt.diameter2()); bt.pws(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean hasStraight(Card [] cards) {\n\t\tint smallNum = 14;\n\t\tint counter = 0;\n\t\tfor (int i = 0; i<cards.length; i++){\n\t\t\tif (cards[i].getValue() < smallNum){\n\t\t\t\tsmallNum = cards[i].getValue(); \n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i<cards.length; i++){\n\t\t\tif (cards[i].getValue() == smallNum+1){\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t}\n\t\tif (counter == 0 && smallNum == 1){\n\t\t\tsmallNum = 10;\n\t\t}\n\t\tfor (int x = 0; x<cards.length; x++){\n\t\t\tif (cards[x].getValue() == smallNum){\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t}\n\t\tif(counter!=0){\n\t\t\tcounter = 1;\n\t\t\tfor (int x = 0; x<cards.length; x++){\n\t\t\t\tif (cards[x].getValue() == smallNum+1){\n\t\t\t\t\tcounter++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(counter!=1){\n\t\t\t\tcounter = 2;\n\t\t\t\tfor (int x = 0; x<cards.length; x++){\n\t\t\t\t\tif (cards[x].getValue() == (smallNum+2)){\n\t\t\t\t\t\tcounter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(counter!=2){\n\t\t\t\t\tcounter = 3;\n\n\t\t\t\t\tfor (int x = 0; x<cards.length; x++){\n\t\t\t\t\t\tif (cards[x].getValue() == smallNum+3){\n\t\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(counter!=3){\n\t\t\t\t\t\tcounter = 4;\n\n\t\t\t\t\t\tif((smallNum+4) == 14){\n\t\t\t\t\t\t\tsmallNum = 1;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tsmallNum = smallNum+4;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (int x = 0; x<cards.length; x++){\n\t\t\t\t\t\t\tif (cards[x].getValue() == smallNum){\n\t\t\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(counter!=4){\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "static int score(int[] state) {\n int no = 0;\n for (int i = 1; i < 10; i++) {\n if (state[i] == 1) {\n no *= 10; no += i;\n }\n }\n return no;\n }", "public boolean or35 (int n) {\n if ( (n % 3 == 0) || (n % 5 == 0)){\n return true;\n }\n return false;\n}", "public boolean or35(int n) {\n return (n % 3 == 0 || n % 5 == 0);\n}", "public static void test(){\n int[] a = {3,6,9, 12,81,72};\n int n = 648;\n boolean flag = areFactors(n, a);\n if(flag == true){\n System.out.println(n +\" is divisible by all elements of array.\");\n }\n else{\n System.out.println(n + \" fails the test.\");\n }\n }", "public static void main(String[] args) {\n Random r = new Random();\n Map<Boolean, List<Integer>> boxed = r.ints(0, 101)\n .limit(10)\n .boxed()\n .collect(Collectors.partitioningBy(i -> i % 2 == 0));\n System.out.println(boxed.get(true));\n System.out.println(boxed.get(false));\n // r.ints returns an IntStream (stream of primitive ints which requires boxing/unboxing\n // can we improve?\n }", "static boolean fillInDigits(int n, boolean[] arr) {\n while(n > 0) {\n if(!arr[(n%10)]) arr[(n%10)] = true;\n else return false;\n\n n /= 10;\n }\n\n return true;\n }", "private boolean checkGreedyDefense() {\r\n return enTotal.get(2)+1 < myTotal.get(2) && enTotal.get(0)+1 < myTotal.get(0);\r\n }", "boolean hasN();", "boolean hasN();", "@Override\r\n\tpublic int computeNextVal(boolean prediction) {\n\t\treturn (int) (Math.random()*10)%3;\r\n\t}", "public boolean[] isPrimovec(int[] vector)\r\n\t{\t\r\n\t\tboolean[] boolPrimos=new boolean[vector.length];\r\n\t\t\r\n\t\t//Inicializacion del vector\r\n\t\tfor(int i=0;i<vector.length;i++)\r\n\t\t{\r\n\t\t\tboolPrimos[i]=true;\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i=0;i<vector.length;i++)\r\n\t\t{\r\n\t\t\tfor(int j=2;j<vector[i];j++)\r\n\t\t\t{\r\n\t\t\t\tif(vector[i]%j==0)\r\n\t\t\t\t{\r\n\t\t\t\t\tboolPrimos[i]=false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn boolPrimos;\r\n\t}", "public boolean nearHundred(int n) {\n return (Math.abs(n - 100) <= 10 || Math.abs(n - 200) <= 10);\n}", "private boolean[] markAllComposites(int initial) {\n boolean[] primes = new boolean[initial + 1];\n //Mark all indexes as true initially\n Arrays.fill(primes, true);\n\n //Start marking the array indexes as false if divisible by the number in iteration, starting from 2\n IntStream.rangeClosed(2, (int) Math.sqrt(initial))\n .filter(num -> primes[num])\n .forEach(num -> {\n //Mark multiples of num as false as this number will be composite.\n //i.e. all the multiples of 2, 3, 4 and so on in the iteration will be marked false if not already marked\n //All the indexes which are not marked at the end of loop will be primes\n for (int i = num * 2; i <= initial; i += num) {\n primes[i] = false;\n }\n });\n return primes;\n }", "boolean incLowValue() { return true; }", "static boolean[] primesThroughN(int n) {\n boolean[] composite = new boolean[n+1];\n composite[0] = true;\n composite[1] = true;\n\n for(int i = 2; i < composite.length; i++) {\n if(composite[i]) continue;\n for(int step = 2; i * step < composite.length; step++) composite[i*step] = true;\n }\n\n return composite;\n }", "public static void main(String[] args) {\n\t\tScanner s=new Scanner(System.in);\n\t\tlong min=s.nextLong(),max=s.nextLong(),sum=0;\n\t\tboolean[] arr=new boolean[(int)(max-min+1)];\n\t\tfor(int i=2;;i++) {\n\t\t\tlong p=(long) Math.pow(i, 2),add=p;\n\t\t\tif((p-min)>=arr.length) break;\n\t\t\t//\t\t\tif((p-min)<0) continue;\n\t\t\t//\t\t\tif(p==1) continue;\n\t\t\twhile((p-min)<arr.length) {\n\t\t\t\t//\t\t\t\tSystem.out.println(p);\n\t\t\t\tif(!((p-min)<0)) arr[(int)(p-min)]=true;\n\t\t\t\tp+=add;\n\t\t\t}\n\t\t}\n\t\t//\t\tSystem.out.println(Arrays.toString(arr));\n\t\tfor(int i=0;i<arr.length;i++) if(!arr[i]) sum++;\n\t\tSystem.out.println(sum);\n\t}", "public void findPrimeNumbers(){\n boolean [] numbers = new boolean[this.n +1];\n\n Arrays.fill(numbers,true);\n\n numbers[0]= numbers[1]=false;\n\n for (int i = P; i< numbers.length; i++) {\n if(numbers[i]) {\n for (int j = P; i*j < numbers.length; j++) {\n numbers[i*j]=false;\n }\n }\n }\n\n for (int i = 0; i < numbers.length; i++){\n if(numbers[i] == true){\n this.primeNumbers.add(i);\n }\n }\n\n }", "Boolean incremental();", "private boolean m(){\r\n int m = countColors - maxSat;\r\n if (m <= TH){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "public static void main(String[]args){\n\r\n int []arr = new int[100];\r\n int []arr2 = new int[50];\r\n int []arr3 = {1,2,3,4,5,6,7,8};\r\n int number = 5;\r\n LogicalOp op = new LogicalOp();\r\n// op.writeOnArray(arr);\r\n\r\n// arr2 = op.evenArray(arr2);\r\n// for(int i=0;i<arr2.length;i++)\r\n// System.out.println(arr2[i]);\r\n\r\n //System.out.println(\"Mean value: \"+op.meanValue(arr3));\r\n\r\n// String[] arrOfStr = {\"ana\",\"are\",\"mere\",\"pere\",\"mere\"};\r\n// String str = \"mere\";\r\n// System.out.println(op.isContaingString(arrOfStr,str));\r\n\r\n// System.out.println(op.findPosition(arr3,number));\r\n\r\n //op.displayLines();\r\n\r\n// int[]modifArr = op.modifiedArr(arr3,number);\r\n// for(int item: modifArr)\r\n// System.out.print(item+\" \");\r\n\r\n\r\n //System.out.println(\"Second minimum: \"+op.secondMin(arr3));\r\n\r\n int[] empty = new int[arr3.length];\r\n empty = op.populateArray(arr3,empty);\r\n for(int item:empty)\r\n System.out.print(item+\" \");\r\n\r\n\r\n\r\n }", "public boolean isStraight() {\r\n int[] temp = getIntArr();\r\n\r\n return temp[1] == temp[0] + 1 && temp[2] == temp[1] + 1 && temp[3] == temp[2] + 1 && temp[4] == temp[3] + 1;\r\n }", "public static void main(String[] args){\n System.out.println(\"hello world\");\n // int a = 5;\n // int c;\n // boolean b = (a>4)&&(a<10);\n // c = b ? 25 : 22;\n // System.out.println(c);\n // while( a < 10){\n // a++;\n // System.out.println(a);\n // }\n // do{\n // a++;\n // System.out.println(a);\n // }while( a < 10);\n // for(int x = 10; x < 20; ++x){\n // System.out.println(x);\n // }\n // int [] numbers = {1,2,3};\n // for(int x : numbers){\n // System.out.println(x);\n // }\n // 数组大小\n // int size = 10;\n // // 定义数组\n // double[] myList = new double[size];\n // myList[0] = 5.6;\n // myList[1] = 4.5;\n // myList[2] = 3.3;\n // myList[3] = 13.2;\n // myList[4] = 4.0;\n // myList[5] = 34.33;\n // myList[6] = 34.0;\n // myList[7] = 45.45;\n // myList[8] = 99.993;\n // myList[9] = 11123;\n // // 计算所有元素的总和\n // double total = 0;\n // for (int i = 0; i < size; i++) {\n // total += myList[i];\n // }\n // System.out.println(\"总和为: \" + total);\n // System.out.println(\"90 度的正弦值:\" + Math.sin(Math.PI/2)); \n // System.out.println(\"0度的余弦值:\" + Math.cos(0)); \n // System.out.println(\"60度的正切值:\" + Math.tan(Math.PI/3)); \n // System.out.println(\"1的反正切值: \" + Math.atan(1)); \n // Systasdasaem.out.println(\"π/2的角度值:\" + Math.toDegrees(Math.PI/2)); \n // System.out.println(Math.PI);\n // Float a = 1.1;\n // System.out.println(Math.ceil(a.doubleValue()));\n // char [] l1 = {'a','b','c'};\n // for(char x:l1){\n // System.out.println(getName(x));\n // }\n // Scanner scan = new Scanner(System.in);\n // // 从键盘接收数据\n \n // // next方式接收字符串\n // System.out.println(\"next方式接收:\");\n // // 判断是否还有输入\n // if (scan.hasNext()) {\n // String str1 = scan.next();\n // System.out.println(\"输入的数据为:\" + str1);\n // }\n // scan.close();\n int [] myArray = new int[]{1, 2, 3, 4, 5};\n ChangeIt.doIt( myArray );\n for(int j=0; j<myArray.length; j++)\n System.out.print( myArray[j] + \" \" );\n char[] z = new char[10];\n String st = \"12312311111111111111111\";\n ChangeIt.blur(z, st);\n // System.out.print(z);\n int[] arr;\n for(int j=0; j<arr.length; j++)\n System.out.printl( arr[j] + \" \" );\n }", "private static boolean multipleOfTen(double direction) {\r\n\t\treturn (direction % 10)==0; \r\n\t}", "private int rob(int[] num, int lo, int hi) {\r\n int include = 0, exclude = 0;\r\n for (int j = lo; j <= hi; j++) {\r\n int i = include, e = exclude;\r\n include = e + num[j];\r\n exclude = Math.max(e, i);\r\n }\r\n return Math.max(include, exclude);\r\n}", "private boolean isAppropriated(int[] arr) {\n boolean is_correct = false;\n for (int i : arr) {\n if (i > 9999) {\n is_correct = true;\n } else\n is_correct = false;\n }\n return is_correct;\n }", "public boolean icyHot(int temp1, int temp2) {\n return ((temp1 < 0 && temp2 > 100) || (temp1 > 100 && temp2 < 0));\n}", "static void check(int arr[],int sum)\r\n {\r\n boolean binmap[] = new boolean[max]; /* by default this is array of false as {false,false,false,false,......,false} */\r\n for(int i=0;i<arr.length;i++)\r\n {\r\n int temp=sum-arr[i];\r\n if(temp>0 && binmap[temp]){ /* in condition , we can use binmap[temp] which means binmap[temp]==true */\r\n System.out.println(\"two numbers in given array whose sum is equal to given sum are :\"+temp+ \" and \" +arr[i]);\r\n }\r\n binmap[arr[i]]=true;\r\n }\r\n }", "boolean isNilMultipleBetMinimum();", "int getComparisons();", "boolean incHighValue() { return true; }", "String getZero_or_more();", "public boolean in1020(int a, int b) {\n return ((a >= 10 && a <= 20) || (b >= 10 && b <= 20));\n}", "public int rob(int[] nums) {\n int prevYes = 0, prevNo = 0; \n for (int i : nums) { \n int tmp = prevYes;\n prevYes = prevNo + i;\n prevNo = Math.max(tmp, prevNo);\n } \n return Math.max(prevNo, prevYes);\n }", "public Integer trueCounter(List<Boolean> list) {\n\t\tint temp=0;\n\t\tfor (int i=0;i<list.size();i++){\n\t\t\tif (list.get(i)==true)\t{\n\t\t\t\ttemp++;\n\t\t\t}\n\t\t}\n\t\treturn temp;\n\t}", "publci int countPrime(int n){\n boolean[] notPrime = new boolean[n];\n for (int i = 2; i * i <= n; i++){\n if(!notPrime[i]){\n for (int j = i; j * i < n; j++)\n notPrime[j * i] = true;\n }\n }\n}", "public static int bigStraightYahtzee(int... result) {\n\n Arrays.sort(result);\n\n int[] uniqueValues = IntStream.of(result).distinct().sorted().toArray();\n long noUniqVals = IntStream.of(uniqueValues).distinct().count();\n int score = 0;\n\n if (noUniqVals >= 5) {\n ArrayList<int[]> matchArrays = new ArrayList<>();\n matchArrays.add(new int[]{1, 2, 3, 4, 5});\n matchArrays.add(new int[]{2, 3, 4, 5, 6});\n\n ArrayList<int[]> resultSubArrays = new ArrayList<>();\n for (int i = 0; i < noUniqVals - 4; i++) {\n resultSubArrays.add(Arrays.copyOfRange(uniqueValues, i, i + 5));\n }\n\n for (int[] arr : resultSubArrays) {\n for (int[] match : matchArrays) {\n if (Arrays.equals(arr, match)) {\n score = 40;\n }\n\n }\n }\n }\n return score;\n }", "public static boolean isStraight(){\n boolean start = false;\n int count = 0;\n for (int i : rankFrequency) {\n if(i == 1){\n if(start){\n count++;\n }else{\n start=true;\n count++;\n }\n }else{\n if(start){\n count = 0;\n start = false;\n }\n }\n }\n\n return (count == 5);\n }", "public double trueCount() {\n\t\t\t\n\t\t\treturn (double)total_count/((double)size/52);\n\t\t}", "static int workbook(int n, int k, int[] arr) {\n int specialProblems = 0;\n int page = 1;\n for (int i = 0; i < n; i++) {\n for (int j = 1; j <= arr[i]; j++) {\n if (j == page)\n specialProblems++;\n if (j % k == 0)\n page++;\n }\n if (arr[i] % k != 0) page++;\n }\n return specialProblems;\n }", "public static void main(int a) {\n// System.out.println(~43);\n int bit []=new int[8];\n for (int i = 7; i >=0;){\n\n\n\n }\n\n}", "public static void sieve(int n) {\n boolean[] isTrue = new boolean[n-1];\n Arrays.fill(isTrue, true);\n\n\n int increment = 1;\n for (int i = 2; i < isTrue.length; i++) {\n increment = 1;\n for (int j = i * i; j < isTrue.length; j = increment*i) {\n isTrue[j] = false;\n increment++;\n }\n }\n\n for (int i = 2; i < isTrue.length; i++) {\n System.out.println(i + \" is a prime number? = \" + isTrue[i]);\n }\n }", "public boolean find(int value) {\r\n // Write your code here\r\n for (int i = 0; i < elements.size() && elements.get(i) < value / 2 + 1; i++) {\r\n if (elements.get(i) * 2 == value && mapping.get(elements.get(i)) == 2) {\r\n return true;\r\n }\r\n if (elements.get(i) * 2 != value && mapping.containsKey(value - elements.get(i))) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public static boolean isPresent() {\n // random genrate\n //double ranValue = Math.floor(Math.random() * 10 ) % 3;\n //int ranValue = 0/1;\n return 1 == new Random().nextInt(1000)%2;\n }", "public static void main(String[] args) {\n\nint count=0;\n\n\nfor(int i=13;count<100;i++){\n\tboolean a=isPrime(i);\n\tboolean b=isReversePrime(i);\n\t\n\tif(a && b){\n\t\tcount++;\n\t\tSystem.out.print(count%10 != 0 ? i+\" \":i+\"\\n\" );\n\t}\n}\n\t}", "private void addRangeIntegers() {\r\n ent_2_i.put(\"< 0\", -1); ent_2_i.put(\"== 0\", 0); ent_2_i.put(\"== 1\", 1); ent_2_i.put(\"< 10\", 10);\r\n ent_2_i.put(\"< 100\", 100); ent_2_i.put(\"< 1K\", 1000); ent_2_i.put(\"< 10K\", 10000); ent_2_i.put(\"< 100K\", 100000);\r\n ent_2_i.put(\"> 100K\", 1000000);\r\n }", "protected boolean hasNext() {\n\t\treturn (counter + incrValue) < max && (counter + incrValue) > min;\n\t}", "public int iNumPrimos(boolean[] vector)\r\n\t{\r\n\t\tint iNumprimos=0;\r\n\t\tfor(int i=0; i<vector.length;i++)\r\n\t\t{\r\n\t\t\tif(vector[i]==true)\r\n\t\t\t{\r\n\t\t\t\tiNumprimos+=1;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn iNumprimos;\r\n\t}", "@Override\n\t\t\tpublic boolean test(Integer t) {\n\t\t\t\tint tmp = t;\n\t\t\t\tif (tmp % 2 == 0) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}", "@Override\n\tpublic boolean step(){\n\t\tboolean ret=false;\n\t\tif(!isFollowing()){\n\t\t\t//80% valoszinuseggel leptet egy szomszedra\n\t\t\tRandom rng=new Random();\n\t\t\tboolean doAStep =rng.nextInt(10)>1;\n\t\t\tif(doAStep){\n\t\t\t\tif(tile != null){\n\t\t\t\tint bound=tile.getNeighbors().size();\n\t\t\t\t//System.out.println(\"bound :\"+bound);\n\t\t\t\t//System.out.println(\"ez lett a bound: \"+rng.nextInt(bound));\n\t\t\t\tret=step(tile.getNeighbors().get(rng.nextInt(bound)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "public boolean in3050(int a, int b) {\n return ((a >= 30 && a <= 40) && (b >= 30 && b <= 40)) ||\n ((a >= 40 && a <= 50) && (b >= 40 && b <= 50));\n}", "public static void main(String[] args) {\n double a=100;\n double b=200;\n double c=300;\nboolean aIsMedium = (a>b && a<c) || (a>c && a<b);\nboolean bIsMedium = (b<c && b>a) || (b>c && b<a);\nboolean cIsMedium = (c>a && c<b) || (c>b && c<a);\n\n double medium=0;\n\n if(aIsMedium){\n //System.out.println(a);\n medium= a;\n }\n if (bIsMedium){\n // System.out.println(b);\n medium= b;\n }\n if (cIsMedium){\n //System.out.println(c);\n medium=c;\n }\n System.out.println(medium+ \" is medium number\");\n }", "boolean getProbables();", "@Test\n\tpublic void positiveTest() {\n\t\tint input[] ={1, 4, 5, 6, 15};\n\t\t//here 1 represent that NQueen arrangement is possible\n\t\t// We have to type cast boolean to int because JUnit Array Equals function does'nt support boolean array\n\t\tint expecteds[] = {1, 1, 1, 1, 1};\n\t\tint actuals[] = new int[input.length];\n\t\tfor(int i=0; i<input.length; i++){\n\t\t\tNQueen q = new NQueen(input[i]);\n\t\t\tactuals[i] = q.nQueen(0) ? 1 : 0;\n\t\t}\n\t\tassertArrayEquals(expecteds, actuals);\n\t}", "boolean checkOdd(int[] table)\n{\n boolean found = false;\n for (int count : table)\n if (count % 2 == 1)\n {\n if (found) return false;\n found = true;\n }\n return true;\n}", "public boolean divisorGame(int N) {\n\n boolean[] res = new boolean[N+1];\n\n for (int i = 2; i < N+1; i++) {\n\n for (int j = 1; j*j < i; j++) {\n if (i % j == 0 && !res[i-j] ) {\n res[i] = true;\n break;\n }\n }\n\n\n }\n return res[N];\n }", "public Boolean IsNormally() {\n Random r = new Random();\n int k = r.nextInt(100);\n //5%\n if (k <= 5) {\n normally++;\n return true;\n }\n return false;\n }", "public int rangeBitwiseAnd(int m, int n) {\n\t \tint ans = 0;\n\t for (int i = 0; i < 32; ++ i) {\n \t\tif (1 == ((m >> i) & 1)) {\n \t\t\tif (((m & ~0 << (i + 1)) | (~0 >>> (31 - i))) >= n) {\n \t\t\t\tans |= 1 << i;\n \t\t\t}\n \t\t}\n\t }\n\t System.out.println(ans);\n\t return ans;\n\t }", "private void updateChildesValues(int value){\n\n for (int i = 0; i < mDataSize; i++) {\n\n if(((value >> i) & 1) == 1){\n mChildTags.get(i).setValue(true);}\n else {mChildTags.get(i).setValue(false);}\n }\n }", "public boolean seriesPatt(int n){\n\n for(int i=1;i<=n;i++){\n for(int j=1;j<=i;j++){\n System.out.print(i+\" \");\n }\n //System.out.println();\n }\n return true;\n }", "public static void main(String[] args) {\n String s = new Scanner(System.in).nextLine();\n HashMap<Character,Integer> map = new HashMap(26);\n for(Character c : s.toCharArray())\n {\n if(map.containsKey(c))\n {\n int val = map.get(c);\n map.put(c,++val);\n }\n else\n {\n map.put(c,1);\n }\n }\n int min = Collections.min(map.values());\n int max = Collections.max(map.values());\n HashMap<Integer,Integer> intMap = new HashMap();\n for(int count : map.values())\n {\n Integer val = intMap.get(count);\n if(null != val)\n {\n intMap.put(count,++val);\n }\n else\n {\n intMap.put(count,1);\n }\n }\n\n String output= intMap.size() == 1 ||( intMap.size() <= 2 && (intMap.get(min) <= 1 || intMap.get(max) <= 1)) ? \"YES\" : \"NO\";\n System.out.println(output);\n }", "public boolean nearHundred(int n) {\n return ((Math.abs(100 - n) <= 10) || (Math.abs(200 - n) <= 10));\n}", "@Test\n\tpublic void intersection() {\n\n\t\tlong n = 105;\n\t\tlong m = 100;\n\t\tfor(long i = n - 1; i > 1; i--){\n\t\t\tn = n * i;\n\t\t\tfor(long j = getZero(n); j > 0; j--){\n\t\t\t\tm = m * 10;\n\t\t\t}\n\t\t\tn = n % m;\n\t\t\tm = 100;\n\n\t\t\tSystem.out.println(n+\" \"+i);\n\n\t\t}\n\n\n\n\n\n\t}", "public boolean[] getBooleans(){\n\t\tboolean[] b = new boolean[10];\n\t\tb[0] = isBoolean(answer0);\n\t\tb[1] = isBoolean(answer1);\n\t\tb[2] = isBoolean(answer2);\n\t\tb[3] = isBoolean(answer3);\n\t\tb[4] = isBoolean(answer4);\n\t\tb[5] = isBoolean(answer5);\n\t\tb[6] = isBoolean(answer6);\n\t\tb[7] = isBoolean(answer7);\n\t\tb[8] = isBoolean(answer8);\n\t\tb[9] = isBoolean(answer9);\n\t\treturn b;\n\t}", "@Test\n public void randomInt() {\n HashMap<Integer, Integer> hist = new HashMap<Integer, Integer>();\n for(int i = 0; i < 300; i++){\n // we can think of random int as a coin toss\n Integer coin = test.randInt();\n Integer coinTotal = hist.get(coin);\n if (coinTotal == null){\n hist.put(coin, 1);\n } else {\n hist.put(coin, coinTotal+1);\n }\n }\n assertTrue(\"Should be more than 100 of each\",\n hist.get(0) > 100 && hist.get(1) > 100);\n System.out.println(hist);\n }", "public abstract boolean[] calculate();", "public int[] hasNSequentially(int lengthOfHand) {//check for Ace case //need to NOT ALLOW DUPLICATES\n ArrayList<Card> handList = new ArrayList<Card>();\n int solution[] = {0, 0};//number in a row, lowest number of that\n boolean foundSomeNInAFow = false;\n int hasAce = 0;\n\n int usedNumbers[] = new int[13];//2,3,4,5,6,7,8,9,10,j,q,k,a --> THIS HANDLES THE ACE CASE\n for (int i = 0; i < lengthOfHand; i++) {//was\n usedNumbers[allCards[i].value - 2]++;//USED\n if (usedNumbers[allCards[i].value - 2] == 1) {//handles NOT having doubles of numbers like 2 3 4 4 5 \n handList.add(this.allCards[i]);\n if (this.allCards[i].value == 14) {\n Card c = new Card(1, this.allCards[i].suit);\n handList.add(0, c);//add to front..shifts elements to right\n }\n }\n }\n\n for (int i = 0; i < handList.size() - 4; i++) {//check for 5 in a row, //was - 4\n int val = handList.get(i).value;\n int counter = 0;\n for (int j = 0; j < 4; j++) {//was 4\n if (handList.get(j + i + 1).value == val + 1 + j) {\n counter++;\n } else {\n break;\n }\n if (counter == 4) {//was 4\n foundSomeNInAFow = true;\n solution[0] = 5;\n solution[1] = val;\n }\n }\n }\n\n if (foundSomeNInAFow == false) {\n for (int i = 0; i < handList.size() - 3; i++) {//check for 5 in a row, //was - 4\n int val = handList.get(i).value;\n int counter = 0;\n for (int j = 0; j < 3; j++) {\n if (handList.get(j + i + 1).value == val + 1 + j) {\n counter++;\n } else {\n break;\n }\n if (counter == 3) {\n // System.out.println(\"yes 4 sequentially\");\n foundSomeNInAFow = true;\n solution[0] = 4;\n solution[1] = val;\n }\n }\n }\n }\n\n if (foundSomeNInAFow == false) {\n for (int i = 0; i < handList.size() - 2; i++) {//check for 5 in a row, //was - 4\n int val = handList.get(i).value;\n int counter = 0;\n for (int j = 0; j < 2; j++) {\n if (handList.get(j + i + 1).value == val + 1 + j) {\n counter++;\n } else {\n break;\n }\n if (counter == 2) {\n // System.out.println(\"yes 3 sequentially\");\n foundSomeNInAFow = true;\n solution[0] = 3;\n solution[1] = val;\n }\n }\n }\n }\n\n if (foundSomeNInAFow == false) {\n for (int i = 0; i < handList.size() - 1; i++) {//check for 5 in a row, //was - 4\n int val = handList.get(i).value;\n int counter = 0;\n for (int j = 0; j < 1; j++) {\n if (handList.get(j + i + 1).value == val + 1 + j) {\n counter++;\n } else {\n break;\n }\n if (counter == 1) {\n //System.out.println(\"yes 2 sequentially\");\n foundSomeNInAFow = true;\n solution[0] = 2;\n solution[1] = val;\n\n }\n }\n }\n }\n\n return solution;//return at end that way if there is 2,3,5,7,8 it returns 7 8 not 2 3\n\n }", "public static void main(String[] args) {\n\t\n\tSystem.out.println(10>9);\n\tboolean resultA = 10> 9; \n\t\n\tSystem.out.println(resultA);\n\tSystem.out.println(10>=9); // greater or equal\n\t\n\tboolean resultB= 10>=9; \n\tSystem.out.println(resultB);\n\t\n\tboolean resultC = 10<=9; \n\tSystem.out.println(resultC);\n\t\n\tboolean resultD= 1100 <1200;\n\tSystem.out.println(resultD);\n\t\n\tboolean resultE = 1000 < 1000; \n\tSystem.out.println(resultE);\n\t\t\t\n\tboolean resultF = 1000 <= 1000; \n\tSystem.out.println(resultF);\n\t\n\t\n\t\n\t\n\tboolean A = ! false ; \n\tSystem.out.println(A);\n\t\n\tboolean B = ! true; \n\tSystem.out.println(B);\n\t\n\tboolean C = ! false !=false; \n\tSystem.out.println(C);\n\t\n\t\n\t\n\t// practice ! (not) : \n\t\n\tboolean g = false; \n\tSystem.out.println(g);\n\t\n\tSystem.out.println(! g);\n\t\n\tSystem.out.println(!true == false);\n\t\n\t\n\t\n\tboolean h = \"Batch 12\" == \"Batch13\"; \n\tSystem.out.println(h);\n\n\tSystem.out.println( \" batch12\" != \"Batch12\");\n\tSystem.out.println(\"Kuzzat\" == \"bad guy\");\n\t\n\t\n\tint Num = 198; \n\tSystem.out.println(Num %= 2);\n\t\n\tbyte byteNum = 30; \n\t// int INum = INum + byteNum ; // we must give value to local variables . \n\t\n\t\n\tString str; \n\t// System.out.println(str);\n\t\n\t\n\t\n}", "public static int smallStraightYahtzee(int... result) {\n\n Arrays.sort(result);\n\n int[] uniqueValues = IntStream.of(result).distinct().sorted().toArray();\n long noUniqVals = IntStream.of(uniqueValues).distinct().count();\n\n int score = 0;\n\n if (noUniqVals >= 4) {\n\n ArrayList<int[]> matchArrays = new ArrayList<>();\n matchArrays.add(new int[] {1, 2, 3, 4});\n matchArrays.add(new int[] {2, 3, 4, 5});\n matchArrays.add(new int[] {3, 4, 5, 6});\n\n ArrayList<int[]> resultSubArrays = new ArrayList<>();\n for (int i = 0; i < noUniqVals - 3; i++) {\n int[] testArr = Arrays.copyOfRange(uniqueValues, i, i + 4);\n resultSubArrays.add(testArr);\n }\n\n for (int[] arr : resultSubArrays) {\n for (int[] match : matchArrays) {\n if (Arrays.equals(arr, match)) {\n score = 30;\n }\n }\n }\n }\n return score;\n }", "private static void second(int[] arr, int sum){\n\n Map<Integer,Boolean> map = new Hashtable<>();\n\n for(int i:arr){\n\n if (map.containsKey(sum - i)){\n System.out.println(i + \" , \" + (sum-i));\n }\n else{\n map.put(i, true);\n }\n\n }\n\n }", "static int jumpingOnClouds(int[] arr) {\n int i = 0;\n int count = 0;\n while (i < arr.length - 2) {\n if (arr[i + 1] == 1) {\n count++;\n i += 2;\n } else if (arr[i + 2] == 1) {\n count++;\n i += 1;\n } else {\n count++;\n i += 2;\n }\n }\n //System.out.println(count);\n if (i<arr.length-1)\n count++;\n return count;\n\n\n }", "public static void main(String[] args) {\n\t\tN=sc.nextInt();\n\t\tint cnt=0;\n\t\tfor (int i = 0; i <N; i++) {\n\t\t\tint y=sc.nextInt();\n\t\t\tint x=sc.nextInt();\n\t\t\tfor (int j = x; j <x+10; j++) {\n\t\t\t\tfor (int j2 = y; j2 <y+10; j2++) {\n\t\t\t\t\tif(arr[j][j2]==false) {\n\t\t\t\t\t\tarr[j][j2]=true;\n\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}", "boolean mo54449n(int i);", "public abstract boolean isHappy(int n);", "public static List<Integer> getMulti(List<Integer> resList) {\r\n\t\tList<Integer> multiList = new ArrayList<Integer>();\r\n\t\tint depth1 = 0;// hit\r\n\t\tint depth2 = 0;\r\n\r\n\t\tmultiList.add(1);\r\n\t\tmultiList.add(1);\r\n\t\tfor (int i = 2; i < resList.size(); i++) {\r\n\r\n\t\t\tif (i < 11) {\r\n\t\t\t\tdepth1 = ConditionUtil.getHitDepth(resList.subList(0, i));\r\n\t\t\t\tdepth2 = ConditionUtil.getNotHitDepth(resList.subList(0, i));\r\n\t\t\t} else {\r\n\t\t\t\tdepth1 = ConditionUtil.getHitDepth(resList.subList(i - 10, i));\r\n\t\t\t\tdepth2 = ConditionUtil.getNotHitDepth(resList\r\n\t\t\t\t\t\t.subList(i - 10, i));\r\n\t\t\t}\r\n\r\n\t\t\tif (depth1 > 0) {\r\n\t\t\t\tmultiList.add(3);\r\n\t\t\t} else if(depth2 >0){\r\n\t\t\t\tif(depth2 == 1){\r\n\t\t\t\t\tmultiList.add(7);\r\n\t\t\t\t}else if(depth2 == 2){\r\n\t\t\t\t\tmultiList.add(15);\r\n\t\t\t\t}else if(depth2 == 3){\r\n\t\t\t\t\tmultiList.add(34);\r\n\t\t\t\t}else if(depth2 == 4){\r\n\t\t\t\t\tmultiList.add(77);\r\n\t\t\t\t}else if(depth2 == 5){\r\n\t\t\t\t\tmultiList.add(0);\r\n\t\t\t\t}else if(depth2 == 6){\r\n\t\t\t\t\tmultiList.add(0);\r\n\t\t\t\t}else if(depth2 == 7){\r\n\t\t\t\t\tmultiList.add(0);\r\n\t\t\t\t}else if(depth2 == 8){\r\n\t\t\t\t\tmultiList.add(0);\r\n\t\t\t\t}else if(depth2 == 9){\r\n\t\t\t\t\tmultiList.add(0);\r\n\t\t\t\t}else if(depth2 == 10){\r\n\t\t\t\t\tmultiList.add(0);\r\n\t\t\t\t}else if(depth2 == 11){\r\n\t\t\t\t\tmultiList.add(0);\r\n\t\t\t\t}else if(depth2 == 12){\r\n\t\t\t\t\tmultiList.add(0);\r\n\t\t\t\t}else if(depth2 == 13){\r\n\t\t\t\t\tmultiList.add(0);\r\n\t\t\t\t}else if(depth2 > 14){\r\n\t\t\t\t\tmultiList.add(0);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn multiList;\r\n\t}", "public static void main(String[] args) {\n\n boolean isTrue = false;\n int[] numbers = { 10, 15, 3, 1, 6, 16, 8 };\n int k = 17;\n\n for (int i = 0; i < (numbers.length-1); i++) {\n for (int j = (i+1); j < numbers.length; j++) {\n if (numbers[i] + numbers[j] == k) {\n isTrue = true;\n break;\n }\n }\n }\n System.out.println(isTrue);\n }", "static boolean checkbetween(int n) {\n if(n>9 && n<101){\n return true;\n }\n else {\n return false;\n }\n \n }", "@Test\n\tpublic void priorsAreReasonable() {\n\t\tdouble tot = 0;\n\t\tboolean zeroPrior = false;\n\t\tfor(NewsGroup g: groups) {\n\t\t\tdouble p = g.getPrior();\n\t\t\ttot+=p;\n\t\t\tif(p == 0.0) {\n\t\t\t\tzeroPrior = true;\n\t\t\t}\n\t\t}\n\t\tassertTrue((tot == 1) && !zeroPrior);\n\t}", "private static boolean testGetAllowedValues(boolean a[]) {\r\n return a[0] && a[1] && a[2] && a[3] && !a[4] && a[5] && a[6] && a[7] && !a[8];\r\n }", "boolean isCounting();", "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 nextBoolean(){\r\n\t\treturn (nextInt() & 0x10) == 0;\r\n\t}", "boolean checkTie(){\n for (int aGameBoard : gameBoard){\n if (aGameBoard == 0)\n return false;\n }\n return true;\n }", "protected int getPostiveOnes() {\n Rating[] ratingArray = this.ratings;\n int posOneCount = 0;\n for(int i = 0; i < ratingArray.length; i++) {\n if (ratingArray[i] != null) {\n if(ratingArray[i].getScore() == 1) posOneCount++; \n }\n }\n return posOneCount;\n }", "public int findIntegers(int n) {\n int[][]template=new int[32][2];\n\n //when the max length the array is one, we know that whether the max bit is one or zero, the arr value is 1\n template[1][0]=1;\n template[1][1]=1;\n\n for (int i = 2; i < 32; i++) {\n template[i][0]=template[i-1][0]+template[i-1][1];\n template[i][1]=template[i-1][0];\n }\n\n int answ=0;\n int pre=0;\n\n //we need to change n to binary expression\n List<Integer>binaryExpression=new ArrayList<>();\n int current=n;\n while (current!=0)\n {\n binaryExpression.add(current&1);\n current=current>>1;\n }\n for (int i = binaryExpression.size()-1; i>=0; i--) {\n Integer currentBit = binaryExpression.get(i);\n for (int j = 0; j < currentBit; j++) {\n answ+=template[i+1][j];\n }\n if (currentBit==1&&pre==1)\n {\n break;\n }\n pre=currentBit;\n if (i==0)\n {\n answ++;\n }\n }\n return answ;\n }", "public static void calculatePrimeNumbers(){\n int NUM = 5000000;\n\n boolean[] flags = new boolean[NUM + 1];\n\n int count = 0;\n\n for(int i = 2; i <= NUM; i++) {\n primeNumberFlagOperation(flags, i);\n }\n\n for(int i = 2; i <= NUM; i++) {\n if(flags[i]) {\n\n // remove all multiples of prime: i\n for(int k = i + i; k <= NUM; k += i) {\n flags[k] = false;\n }\n\n count++;\n }\n }\n }", "public static void method_3(){\n int totalhotdog = 400;\n int hotDogPerContainer = 8;\n int totalContainer =0;\n int temp = totalhotdog+hotDogPerContainer;\n\n while (temp>hotDogPerContainer){\n temp = temp - hotDogPerContainer;\n System.out.println(temp);\n totalContainer++;\n }\n System.out.println(\"\\n \\n\\n\\n\\n \"+totalContainer);\n }", "public static void main(String[] args) {\n\t\r\nfor (int i=1; i<=20; i++) {\r\n\tif (i!=20) {\r\n\t\t\r\n\tSystem.out.print(i+\"+\");\r\n}\r\nelse {\r\n\tSystem.out.println(i);\r\n}\r\n\t}\r\n\r\n}", "private float getYValue(ArrayList<Boolean> arr) {\n int counter = 0;\n for (int i = 0; i < arr.size(); i++) {\n if (arr.get(i)) {\n counter++;\n }\n }\n if (arr.size() == 0) {\n return 0;\n }\n return (float) counter / (float) arr.size() + shiftUpwards;\n }", "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 }", "public int evaluate() {\n return Condition.INDETERMINATE;\n }", "static void findTwoMissingNumber(int a[]) {\n int miss1 = 0;\n int miss2;\n int miss1miss2 = 0;\n\n int size = a.length;\n for (int i = 0; i < size; i++) {\n miss1miss2 ^= ((i + 1) ^ a[i]);\n }\n\n miss1miss2 ^= (size + 1);\n miss1miss2 ^= (size + 2);\n\n int diff = miss1miss2 & (-miss1miss2);\n\n for (int i = 0; i < size; i++) {\n if (((i + 1) & diff) > 0)\n miss1 ^= (i + 1);\n\n if ((a[i] & diff) > 0)\n miss1 ^= a[i];\n }\n\n if (((size + 1) ^ diff) > 0)\n miss1 ^= (size + 1);\n\n if (((size + 2) ^ diff) > 0)\n miss1 ^= (size + 2);\n\n miss2 = miss1miss2 ^ miss1;\n\n System.out.println(miss1);\n System.out.println(miss2);\n }", "private int countTrue(boolean... cases) {\n int result = 0;\n for (boolean c : cases) {\n if (c) {\n result++;\n }\n }\n return result;\n }", "private boolean allLessThanN() {\n return this.matrix.stream()\n .allMatch(row -> row.stream()\n .allMatch(e -> e <= this.n));\n }", "boolean isSetMultipleBetMinimum();", "private boolean isAppropriate(int[] counts, int length) {\n\n if (length % 2 == 0) {\n for (int count : counts) {\n if (count != 0 && count % 2 == 1) {\n return false;\n }\n }\n }\n else {\n int oddCount = 0;\n for (int count : counts) {\n if (count != 0 && count % 2 == 1) {\n if (++oddCount > 1) {\n return false;\n }\n }\n }\n }\n\n return true;\n }", "public boolean isFiveOfAKind(){\n ArrayList<Integer> numbers = new ArrayList<>();\n for (int i = 0; i < dice.length; i++){\n numbers.add(dice[i].getFaceValue());\n }\n\n for(int i = 0; i < numbers.size(); i++){\n int numSame = 0;\n for(int j = 0; j < numbers.size(); j++){\n if(numbers.get(i).equals(numbers.get(j))){\n numSame++;\n }\n }\n if (numSame == 5){\n return true;\n }\n }\n return false;\n }", "@Test\n void first() {\n int[] answers = {1,2,3,4,5,1,2,3,4,5};\n int[] first = {1,2,3,4,5};\n int collect = 0;\n for (int i=0; i < answers.length ; i++) {\n if (answers[i] == first[i % 5]) {\n //0 0\n //1 1\n //2 2\n //3 3\n //4 4\n //5 0\n //6 1\n //7 2\n collect++;\n }\n }\n assertThat(collect).isEqualTo(10);\n }", "public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n int k = in.nextInt();\n ArrayList<Integer> list = new ArrayList<>();\n for(int arr_i=0; arr_i < n; arr_i++){\n int integer = in.nextInt();\n list.add(new Integer(integer));\n }\n in.close();\n\n\n\n if(k == 1){\n System.out.println(k);\n return;\n }\n\n for(int i = 0;i < list.size();i ++){\n int x = list.get(i) % k;\n list.set(i, x);\n }\n\n int[] kx = new int[k];\n for(int i = 0;i < k;i ++){\n kx[i] = 0;\n }\n for(int i = 0;i < list.size();i ++){\n int x = list.get(i);\n kx[x] ++;\n }\n\n\n int num = 0;\n int A = 0;\n if(k % 2 == 0){\n A = k / 2 - 1;\n }else{\n A = k / 2;\n }\n if(kx[0] != 0){\n num += 2;\n }\n for(int i = 1; i <= A;i ++){\n if(kx[i] >= kx[k - i]){\n num += kx[i];\n }else {\n\n num += kx[k - i];\n }\n\n }\n System.out.println(num);\n }", "static int migratoryBirds(List<Integer> arr) {\n int count=1;\n int max=arr.get(0);\n HashMap<Integer,Integer> map=new HashMap<>();\n for(int i=0;i<arr.size();i++) {\n \tif(map.containsKey(arr.get(i))) {\n \t\tmap.replace(arr.get(i), map.get(arr.get(i))+1);\n \t}else {\n \t\tmap.put(arr.get(i), count);\n \t}\n }\n \n int ans=0;\n for(Integer i:map.keySet()) {\n \t int n=map.get(i);\n \t if(n>max) {\n \t\t max=n;\n \t\t \tans=i;\n\n \t }\n }\n /*int comp[]=new int[256];\n for(int i=0;i<arr.size();i++){\n comp[arr.get(i)]++;\n }\n for(int i=0;i<comp.length;i++){\n if(comp[i]>max)\n max=comp[i];\n }*/\n return ans;\n }", "private int evaluate() {\n return (int) (Math.random() * 8);\n }" ]
[ "0.5852489", "0.5695005", "0.56258726", "0.54420877", "0.5431487", "0.5393606", "0.5384159", "0.5354885", "0.53110135", "0.53110135", "0.5308958", "0.5301659", "0.52684885", "0.5261009", "0.5239241", "0.5220493", "0.52154964", "0.5209398", "0.52077544", "0.5195843", "0.51789635", "0.51730436", "0.5161564", "0.5155984", "0.5149292", "0.5143007", "0.5138383", "0.51339704", "0.51173156", "0.51144034", "0.51138175", "0.51090986", "0.5106436", "0.5099624", "0.5094813", "0.50899804", "0.50872326", "0.508283", "0.508072", "0.50784326", "0.5074351", "0.5058671", "0.5057593", "0.5047178", "0.50438863", "0.5034269", "0.50250906", "0.502088", "0.50146437", "0.50128895", "0.5011743", "0.5008666", "0.5007744", "0.50021285", "0.4999306", "0.49870256", "0.49821153", "0.49801984", "0.4980184", "0.4974754", "0.49725533", "0.49700856", "0.49637234", "0.49570066", "0.4950277", "0.4949978", "0.49483165", "0.49389315", "0.4938052", "0.49376935", "0.4936252", "0.493511", "0.4933145", "0.49315867", "0.49284208", "0.49241453", "0.49220383", "0.4920393", "0.49067783", "0.49063584", "0.49033654", "0.48987043", "0.489703", "0.48960516", "0.4894425", "0.4889839", "0.4881744", "0.48804384", "0.48796842", "0.4879642", "0.48756197", "0.48730224", "0.48638293", "0.48615754", "0.48564133", "0.4852823", "0.4848672", "0.4839943", "0.4838712", "0.48311886", "0.48256323" ]
0.0
-1
Start the PlaybackService class, it will take care of updating the widgets
@Override public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { PlaybackService.startServiceToUpdateWidgets(context); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void startPlayback() {\n // start player service using intent\n Intent intent = new Intent(mActivity, PlayerService.class);\n intent.setAction(ACTION_PLAY);\n intent.putExtra(EXTRA_STATION, mThisStation);\n mActivity.startService(intent);\n LogHelper.v(LOG_TAG, \"Starting player service.\");\n }", "private void start() {\n\t\t// 开启播放器\n\t\tmCurrentMediaPlayer.start();\n\t\tsetState(STARTED);\n\n\t\t// 开启计时心跳\n\t\tmHandler.postDelayed(mUpdateTimeTask, 500);\n\t\tif (mPlayerEngineListener != null) {\n\t\t\tmPlayerEngineListener.onTrackStart();\n\t\t}\n\t\t// 开启频谱\n\t\t// mHandler.postDelayed(mSetFxAndUI, 500);\n\t\t// setupVisualizerFxAndUI();\n\n\t\tLog.i(this.getClass().getSimpleName(), \" music player : started...\");\n\t}", "@Override\r\n\tpublic void start() {\n\t\tmediaPlayer.start();\r\n\t}", "public void start() {\n setPlayerState(State.STARTED);\n mMediaPlayer.start();\n notifyPlaying();\n }", "public void start() {\n \tif (mediaChangedListener != null) {\n \t\tmediaChangedListener.onStarted();\n \t}\n mMediaPlayer.start();\n }", "public void start() {\n background.playMusic();\n createTimer();\n timer.start();\n }", "public void start() {\n ToneControl control = null;\n try {\n myPlayer = Manager.createPlayer(Manager.TONE_DEVICE_LOCATOR);\n // do the preliminary set-up:\n myPlayer.realize();\n // set a listener to listen for the end of the tune:\n myPlayer.addPlayerListener(this);\n // get the ToneControl object in order to set the tune data:\n control = (ToneControl) myPlayer.getControl(\"ToneControl\");\n control.setSequence(myTune);\n // set the volume to the highest possible volume:\n VolumeControl vc = (VolumeControl) myPlayer\n .getControl(\"VolumeControl\");\n vc.setLevel(100);\n } catch (Exception e) {\n // the music isn't necessary, so we ignore exceptions.\n }\n }", "private static void start()\r\n\t{\r\n\t\tif(isRunning)\r\n\t\t\treturn;\r\n\t\t\r\n\t\tisRunning = true;\r\n\t\t\r\n\t\tdisplay = new Display();\r\n\t\trun();\r\n\t}", "public void start(StarObjectClass self){ \r\n \t\tStarCLEMediaPlayer mediaplayer = (StarCLEMediaPlayer)WrapAndroidClass.GetAndroidObject(self,\"AndroidObject\");\r\n \t\tif( mediaplayer == null )\r\n \t\t\treturn;\r\n \t\tmediaplayer.start(); \t\t\r\n \t}", "private void startService() {\n startService(new Intent(this, BackgroundMusicService.class));\n }", "private void handlePlaybackButtonClick() {\n // playback stopped or new station - start playback\n// if (mPlaybackState != PLAYBACK_STATE_STARTED) {\n// startPlayback();\n// }\n// // playback active - stop playback\n// else {\n// stopPlayback();\n// }\n\n if (mPlaybackState == PLAYBACK_STATE_STOPPED) {\n startPlayback();\n }\n // playback active - stop playback\n else {\n stopPlayback();\n }\n\n }", "public void start(){\n\t\tif (host.getGameSettings().isMusicOn()) {\r\n\t\t\tspr_btnMute.setFrame(0);\r\n\t\t}else{\r\n\t\t\tspr_btnMute.setFrame(1);\r\n\t\t}\r\n\t}", "public void start() {\r\n view.addListener(this);\r\n view.makeVisible();\r\n view.display();\r\n }", "public void start()\n\t{\n\t\tview.showWindow();\n\t\taddListeners();\n\t}", "private void startPlaying() {\n try {\n mPlayer = new MediaPlayer();\n try {\n mPlayer.setDataSource(audioFile.getAbsolutePath());\n mPlayer.prepare();\n mPlayer.start();\n } catch (IOException e) {\n Log.e(LOG_TAG, \"prepare() failed\");\n }\n showTimer(false);\n } catch (Exception e) {\n logException(e, \"MicManualFragment_startPlaying()\");\n }\n\n }", "@Override\n public void start() {\n // get the SpotifyInteractor for connect to the internet\n mSpotifyInteractor = mSearchChildView.getSpotifyInteractor();\n // start search bar anim in view and setup searchbar\n setupSearchBar();\n // setup recyclerview and setup adapter\n setupList();\n }", "private void start() {\n _countdownBar = new TimeProgressBar((ProgressBar) findViewById(R.id.game_pb_countdown), _game);\n _gameView.setClickable(true);\n _startBtn.setEnabled(false);\n _game.startGame();\n _countdownBar.startTimer();\n }", "public void startCommand() {\r\n _playing = true;\r\n }", "public void startPlaying() {\n\t\tpbrLoading.setVisibility(View.GONE);\n\t\tisPlaying = true;\n\t\tif (IjoomerApplicationConfiguration.isEnableVoiceReport && reportVoice) {\n\t\t\tlnrReportVoice.setVisibility(View.VISIBLE);\n\t\t\timgReport.setImageResource(reportImage);\n\n\t\t\tif (reportCaption != 0) {\n\t\t\t\ttxtReportCaption.setText(reportCaption);\n\t\t\t} else if (strReportCaption != null && strReportCaption.length() > 0) {\n\t\t\t\ttxtReportCaption.setText(strReportCaption);\n\t\t\t}\n\t\t} else {\n\t\t\tlnrReportVoice.setVisibility(View.GONE);\n\t\t}\n\t\tupdateView();\n\t}", "public void start() {\r\n\t\tfinal Element frame = this.createFrame();\r\n\t\tthis.setFrame(frame);\r\n\r\n\t\tthis.getSupport().start(this, frame);\r\n\r\n\t\t// the reason for the query string is to avoid caching problems...the\r\n\t\t// src attribute is set before the frame is attached this also\r\n\t\t// avoids the nasty clicking noises in ie.\r\n\t\tDOM.setElementProperty(frame, \"src\", this.getServiceEntryPoint() + \"?serializationEngine=Gwt&\" + System.currentTimeMillis());\r\n\r\n\t\tfinal Element body = RootPanel.getBodyElement();\r\n\t\tDOM.appendChild(body, frame);\r\n\t}", "protected void startMediaPlayer() {\n\n Log.i(LOG_TAG, \"startMediaPlayer\");\n\n // If media player is pause or playing, just play\n if (mpState.equals(RadioPlayerService.MP_PAUSED)) {\n // Play!!!\n mediaPlayer.start();\n radioStation.setPlaying(true);\n playingTimeRunning = true;\n setMPState(RadioPlayerService.MP_PLAYING);\n sendStatus();\n\n //Retrieve meta data from server\n if (radioStation.getListenType().equals(\"0\") || radioStation.getListenType().equals(\"1\")) {\n refreshMetadata(radioStation.getListenUrl());\n }\n\n } else if (mpState.equals(RadioPlayerService.MP_PLAYING)) {\n //We are already playing, well do nothing\n\n } else if (mpState.equals(RadioPlayerService.MP_ERROR)) {\n\n //Media player should be reset\n\n } else {\n //Because prepareAsync() can take too long if radio station server isn't reachable, check for it\n setMPState(RadioPlayerService.MP_CONNECTING);\n mediaPlayer.prepareAsync();\n sendStatus();\n }\n\n }", "public void start() {\n AudioPlayer.player.start(cas);\n playing = true;\n }", "@Override\n public void playStart() {\n }", "@Override\r\n\tprotected void onStart() {\n\t\tLog.d(TAG, \"1 onStart start\");\r\n\t\tsuper.onStart();\r\n\t\tif(isDMR){\r\n\t\t\tbindTVnSreenService();\r\n\t\t}\r\n\t\t// mMediaHanler.sendEmptyMessage(START_PLAY);\r\n\t\tLog.d(TAG, \"2 onStart end\");\r\n\r\n\t}", "@Override\r\n\tpublic void start() {\n\t\tthis.controller.start();\r\n\t}", "public void start(){\n //Set pausing to false\n pausing = false;\n next();\n }", "@Override\n public void run() {\n if (newPlaying) {\n conductorPanel.sessionStarted(this.session);\n } else {\n conductorPanel.sessionStopped();\n }\n }", "public void start() {\n\t\tdata = new SharedData(output, input); // handles all shared data\n\t\ttimer = new Thread(new TimeHandler(data)); \n\t\tbuttons = new Thread(new ButtonHandler(input, data, signal));\n\n\t\ttimer.start();\n\t\tbuttons.start();\n\t}", "public void start()\n\t{\n\t\t//do nothing if the stopwatch is already running\n\t\tif (m_running)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tm_running = true;\n\n\t\t//get the time information as last part for better precision\n\t\tm_lastMs = SystemClock.elapsedRealtime();\n\t}", "public void playerStarted () {\n this.setState(STATE.MEDIA_RUNNING);\n\n // Send status notification to JavaScript\n sendStatusChange(MEDIA_DURATION, null, null);\n }", "public void started()\n {\n if (!isPaused()) muteControl.play();\n }", "public void start() {\n m_enabled = true;\n }", "public synchronized void start()\n {\n if (!started && open) {\n line.start();\n started = true;\n if (getTimeLeft() > 0) {\n // If we haven't finished playback of bytes already written, we\n // should start the tracker again.\n timeTracker.start();\n }\n }\n }", "public void start(){\n this.speakerMessageScreen.printScreenName();\n mainPart();\n }", "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 void startService() {\n log_d( \"startService()\" );\n \tint state = execStartService();\n\t\tswitch( state ) {\n\t\t\tcase STATE_CONNECTED:\n\t\t\t\tshowTitleConnected( getDeviceName() );\n\t\t\t\thideButtonConnect();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tshowTitleNotConnected();\n\t\t\t\tbreak;\n\t\t}\n\t}", "public void onPlayStart(){\n\n\t}", "private void handlePlayRequest() {\n LogHelper.d(TAG, \"handlePlayRequest: mState=\" + mPlayback.getState());\n\n mDelayedStopHandler.removeCallbacksAndMessages(null);\n if (!mServiceStarted) {\n LogHelper.v(TAG, \"Starting service\");\n // The MusicService needs to keep running even after the calling MediaBrowser\n // is disconnected. Call startService(Intent) and then stopSelf(..) when we no longer\n // need to play media.\n startService(new Intent(getApplicationContext(), MusicService.class));\n mServiceStarted = true;\n }\n\n if (!mMediaSession.isActive()) {\n mMediaSession.setActive(true);\n }\n\n if (QueueHelper.isIndexPlayable(mCurrentIndexOnQueue, mPlayingQueue)) {\n updateMetadata();\n mPlayback.play(mPlayingQueue.get(mCurrentIndexOnQueue));\n }\n }", "public void startPlaying() {\n \t\tif (!isPlaying) {\n \t\t\tisPlaying = true;\n \t\t\tnew PlayThread().start();\n \t\t}\n \t}", "public void start(){\n\t\tthis.lastUpdate = System.currentTimeMillis();\n\t\tthis.millisIntoFrame=0;\n\t\tthis.currentFrame=0;\n\t}", "@Override\r\n\tpublic void onStart(Intent intent, int startid) {\n\t\tlogger.error(\"onStart\");\r\n\t\t//player.start();\r\n\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tplayer.start();\r\n\t\t\t}", "public void start(){\n handler = new Handler(Looper.getMainLooper());\n handler.postDelayed(this, PERIOD);\n }", "public void onPlayButtonClick(View view) {\n if (!isBound) {\n if (!bindService(getClipServiceIntent(), connection, 0))\n Toast.makeText(MainActivity.this, getString(R.string.service_cannot_bind_msg), Toast.LENGTH_SHORT).show();\n } else {\n // Play the selected song\n try {\n // Read the selected song from EditText\n int songNum = Integer.parseInt(songNumInput.getText().toString());\n\n // Call the remote service\n int duration = clipService.play(songNum);\n\n // Check results\n if (duration > 0) {\n // Show confirmation message\n Toast.makeText(MainActivity.this,\n getString(R.string.song_started_msg, formatDuration(duration)), Toast.LENGTH_SHORT).show();\n\n // Set playing flag\n isPlaying = true;\n } else {\n // Show error message\n Toast.makeText(MainActivity.this,\n getString(R.string.track_not_avail_msg, -duration), Toast.LENGTH_SHORT).show();\n\n // Unbind the service\n unbindService(connection);\n isBound = false;\n }\n } catch (NumberFormatException e) {\n // Show error message\n Toast.makeText(MainActivity.this, getString(R.string.invalid_num_msg), Toast.LENGTH_SHORT).show();\n\n // Unbind the service\n unbindService(connection);\n isBound = false;\n } catch (RemoteException e) {\n handleKilledService();\n }\n }\n\n // Enable/disable buttons\n updateUi();\n }", "protected void start() {\n\t\thellotv.setText(\"\");\n\t\tMap<String, Object> params = new LinkedHashMap<String, Object>();\n\t\tString event = null;\n\t\tevent = SpeechConstant.ASR_START;\n\t\t\n\t\tif (enableOffline) {\n params.put(SpeechConstant.DECODER, 2);\n }\n\t\t\n\t\tparams.put(SpeechConstant.ACCEPT_AUDIO_VOLUME, false);\n\t\t//params.put(SpeechConstant.PID, 1737);//English\n\t\t\n\t\tString json = null;\n\t\tjson = new JSONObject(params).toString();\n\t\tasr.send(event, json, null, 0, 0);\n\t\t\n\t\tprintresult(\"输入参数\"+ json);\n\t}", "@Override\n public void updatePlayer() {\n\n // If the service has disconnected, the SSMusicService is restarted.\n if (!serviceBound) {\n setUpAudioService(); // Sets up the SSMusicService.\n }\n\n else {\n\n // If the currentTimer is between 0 - TIMEOUT_VALUE, it indicates that a song is\n // currently being prepared for playback. Signals the SSPlayerFragment to display the\n // progress indicator if currently active.\n if ((currentTimer > 0) && (currentTimer <= TIMEOUT_VALUE)) {\n stopSongPrepare(false);\n }\n\n // The SSPlayerFragment is updated of the current song status and max song duration via\n // SSMusicService & SSMusicEngine.\n musicService.updatePlayer();\n }\n }", "@Override\r\n\tpublic void onStart() {\n\t\tsuper.onStart();\r\n\t\tif(videoView.isPrepared() && isPlaying){\r\n\t\t\tvideoView.start();\r\n\t\t}\r\n\t}", "@Override\n public void onServiceConnected(ComponentName name, IBinder service) {\n MediaPlayerService.LocalBinder binder = (MediaPlayerService.LocalBinder) service;\n player = binder.getService();\n serviceBound = true;\n player.setCallbacks(MainActivity.this);\n\n //Toast.makeText(MainActivity.this, \"Service Bound\", Toast.LENGTH_SHORT).show();\n }", "public void play() {\n\t\ttry {\n\t\t\tthis.mMediaPlayer.start();\n\t\t\tLog.w(\"AUDIO PLAYER\", \"just started playing\");\n\t\t} catch (IllegalStateException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tthis.isPlaying = true;\n\t\tthis.incrementPlaybackTime();\n\t}", "public void start() {\n\t\tthis.controller.run();\n\t}", "public void play(){\n Log.d(TAG, \"startAudio: called\");\n if(mMediaPlayer!=null){\n\n mMediaPlayer.start();\n mProgressBar.setProgress(mMediaPlayer.getCurrentPosition());\n mProgressBar.setMax(mMediaPlayer.getDuration());\n\n // updating progress bar\n seekHandler.postDelayed(updateSeekBar, 5);\n }\n }", "public synchronized void start() {\n if(!running) {\n this.soundThread = new Thread(this, \"TankGameSound\");\n this.soundThread.start();\n this.running = true;\n }\n }", "public void playback() {\n\t\ttry {\n\t\t\tplaySound.load(audioFileName, currFrame);\n\t\t} catch (UnsupportedAudioFileException e1) {\n\t\t\te1.printStackTrace();\n\t\t} catch (IOException e1) {\n\t\t\te1.printStackTrace();\n\t\t} catch (LineUnavailableException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tfastForward = false;\n\t\tsoundThread = null;\n\t\tsoundThread = new Thread(new sound());\n\t\tsoundThread.start();\n\t\tvideoThread = null;\n\t\tvideoThread = new Thread(new video());\n\t\tvideoThread.start();\n\t}", "public void startService() {\n\t\tListenThread listenThread = new ListenThread();\r\n\t\tlistenThread.start();\r\n\t\tSelfVideoThread selfVideoThread = new SelfVideoThread();\r\n\t\tselfVideoThread.start();\r\n\t\tif(remote!=\"\"){\r\n\t\t\tString[] remotes = remote.split(\",\");\r\n\t\t\tString[] remotePorts = remotePort.split(\",\");\r\n\t\t\tfor(int i = 0; i < remotes.length; i++){\r\n\t\t\t\tString currentRemote = remotes[i];\r\n\t\t\t\tint currentRemotePort = 6262;\r\n\t\t\t\tif(i<remotePorts.length){\r\n\t\t\t\t\tcurrentRemotePort = Integer.valueOf(remotePorts[i]);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n//\t\t\t\tcreatTCPLink(currentRemote, currentRemotePort);\r\n\t\t\t\t\r\n\t\t\t\tSocket socket = null;\r\n\t\t\t\tJSONObject process = new JSONObject();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tsocket = new Socket(currentRemote, currentRemotePort);\r\n\t\t\t\t\tThread sendVedio = new SendVideo(socket, width, height, rate);\r\n\t\t\t\t\tsendVedio.start();\r\n\t\t\t\t\tThread receiveVedio = new ReceiveVideo(socket);\r\n\t\t\t\t\treceiveVedio.start();\r\n\t\t\t\t\tsockets.add(socket);\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t} finally {\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tqueuePos.setVisibility(View.VISIBLE);\n\t\t\t\t\tqueuePos.setText(\"AUDIO streaming...\");\n\t\t\t\t\tstartsp.setVisibility(View.GONE);\n\t\t\t\t}", "public void start() {\r\n\t\trunning = true;\r\n\t\trun();\r\n\t}", "@Override\n public void run() {\n panel.start();\n }", "public void start()\n\t{\n\t\tString name = getAudioFileName();\n\t\ttry\n\t\t{\t\t\t\n\t\t\tInputStream in = getAudioStream();\n\t\t\tAudioDevice dev = getAudioDevice();\n\t\t\tplay(in, dev);\n\t\t}\n\t\tcatch (JavaLayerException ex)\n\t\t{\n\t\t\tsynchronized (System.err)\n\t\t\t{\n\t\t\t\tSystem.err.println(\"Unable to play \"+name);\n\t\t\t\tex.printStackTrace(System.err);\n\t\t\t}\n\t\t}\n\t}", "public void onStart() {\n\n mVideoFolder = createVideoFolder();\n mImageFolder = createImageFolder();\n mMediaRecorder = new MediaRecorder();\n\n startBackgroundThread();\n\n if (mTextureView.isAvailable()) {\n // TODO: see Google Example add comments\n // pause and resume\n openCamera(mTextureView.getWidth(), mTextureView.getHeight());\n\n } else {\n // first time\n mTextureView.setSurfaceTextureListener(mSurfaceTextureListener);\n }\n }", "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 }", "private void start() {\n GameStateManager gameStateManager = new GameStateManager();\n JPanel jPanel = gameStateManager.getGameState().getJPanel();\n jPanel.setVisible(true);\n GUI gui = GUI.getInstance();\n gui.setjPanel(jPanel);\n gui.addKeyListener(gameStateManager);\n GameStateObserver gameStateObserver = new GameStateObserver(gameStateManager,gui);\n gameStateManager.addObserver(gameStateObserver);\n }", "@Override\n public synchronized void start() {\n m_startTime = getMsClock();\n m_running = true;\n }", "private void startPlay() {\n isPlaying = true;\n isPaused = false;\n playMusic();\n }", "private void startPlaying() {\n if (null == curRecordingFileName)\n return;\n Log.e(TAG, \"Start playing file: \" + curRecordingFileName);\n mPlayer = new MediaPlayer();\n try {\n mPlayer.setDataSource(curRecordingFileName);\n mPlayer.prepare();\n mPlayer.start();\n } catch (IOException e) {\n Log.e(TAG, \"Couldn't prepare and start MediaPlayer\");\n }\n\n }", "@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tmVideoContrl.start();\r\n\t\t\t\t\t\tisBreakDialogDissmiss = true;\r\n\t\t\t\t\t\tsendFirstShowContrlBtn();\r\n\t\t\t\t\t\tisChangeNotStart = true;\r\n\t\t\t\t\t\tmVideoPlayerHander.sendEmptyMessage(REFRESH_PAUSEBUTON);\r\n\t\t\t\t\t\t// start_3Dmode();\r\n\t\t\t\t\t}", "void play(){\n\n\t\tnew X.PlayXicon().root.setOnClickListener(Play_TestsPresenter::cc);\n\t}", "protected void sync() {\n System.out.println(\"Starting playback thread with \" + terms);\n startThread();\n }", "@Override\r\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tmVideoContrl.playNext();\r\n\r\n\t\t\t\t\t\t\t}", "@Override\n protected void onStart() {\n super.onStart();\n Intent intent = new Intent(this, PlayerService.class);\n bindService(intent, serviceConnection, Context.BIND_AUTO_CREATE);\n\n }", "@Override\r\n\t\t\t\tpublic void run()\r\n\t\t\t\t{\n\t\t\t\t\tsendMessage(UPDATE_TEXTVIEW);\r\n\t\t\t\t\tdo\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(count == size)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tmHandler.sendEmptyMessage(PLAY_END);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttry\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// Log.i(\"\", \"sleep(1000)...\");\r\n\t\t\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcatch (InterruptedException e)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\twhile(isPause);\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t}", "@Override\n\tpublic void start() {\n\t\t\n\t\t_mode.init();\n\t\t\n\t\t_mode.start();\n\t}", "public void start() {\n enableEvents = true;\n reset();\n }", "public void play() {\n try {\n mSessionBinder.play(mContext.getPackageName(), mCbStub);\n } catch (RemoteException e) {\n Log.wtf(TAG, \"Error calling play.\", e);\n }\n }", "public void startService() {\r\n Log.d(LOG, \"in startService\");\r\n startService(new Intent(getBaseContext(), EventListenerService.class));\r\n startService(new Intent(getBaseContext(), ActionService.class));\r\n getListenerService();\r\n\r\n }", "public void start(){\n }", "@Override\n public void onServiceConnected(ComponentName name, IBinder service) {\n MediaPlayerService.LocalBinder binder = (MediaPlayerService.LocalBinder) service;\n player = binder.getService();\n serviceBound = true;\n\n\n //Toast.makeText(QuranListenActivity.this, \"Service Bound\", Toast.LENGTH_SHORT).show();\n }", "public void start() {\n }", "public void start() {\n\n }", "public void run(){\n\t\ttry {\n\t\t\tSystem.out.println(\"Started Playing music successfully\");\n\t\t\tplay();\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void Start() \r\n {\r\n // Set the canvas as the current phone's screen\r\n mDisplay.setCurrent(this);\r\n\r\n // we call our own initialize function to setup all game objects\r\n GameInitialize();\r\n\r\n // Here we setup the thread and start it\r\n Thread thread = new Thread(this);\r\n thread.start();\r\n }", "public void start() {\n\n\t\tisRunning = true;\n\t\tthread = new Thread(this);\n\t\tthread.start();\n\n\t}", "@Override\r\n public void onCreate(Bundle savedInstanceState) \r\n {\r\n \tgetWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);\r\n getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);\r\n \r\n requestWindowFeature(Window.FEATURE_NO_TITLE);\r\n \t\r\n \tsuper.onCreate(savedInstanceState);\r\n setContentView(R.layout.reproductor);\r\n\r\n // Servei\r\n// rSer = new ReproductorService();\r\n \tIntent intent = new Intent(ReproductorActivity.this, ReproductorService.class);\r\n \tbindService(intent, connection, Context.BIND_AUTO_CREATE);\r\n \tstartService(intent);\r\n final Activity Pa = this;\r\n// \tandroid.os.SystemClock.sleep(2000);\r\n\t\tImageView invi = (ImageView) findViewById(R.id.imageView1);\r\n\t\tinvi.postDelayed(new Runnable() {\r\n\t public void run() {\r\n\t \t// Declarem les imatges\r\n\t \tImageView mPlay = (ImageView) findViewById(R.id.PlayMusic);\r\n\t \tImageView mPause = (ImageView) findViewById(R.id.PauseMusic);\r\n\t \tImageView mNext= (ImageView) findViewById(R.id.NextMusic);\r\n\t \tImageView mBack = (ImageView) findViewById(R.id.PrevMusic);\r\n\t \tImageView mTwit = (ImageView) findViewById(R.id.twiticon);\r\n\t \t// Afegim els listeners\r\n\t \tMyImageClick mIC = new MyImageClick();\r\n\t \tmPlay.setOnTouchListener(mIC);\r\n\t \tmPause.setOnTouchListener(mIC);\r\n\t \tmNext.setOnTouchListener(mIC);\r\n\t \tmBack.setOnTouchListener(mIC);\r\n\t \tmTwit.setOnTouchListener(mIC);\r\n\t \t// Declarem la seekbar i li afegim el listener\r\n\t \tSeekBar sb = (SeekBar) findViewById(R.id.ProgressMusic);\r\n\t \tMyProgressBar mPB = new MyProgressBar();\r\n\t \tsb.setOnSeekBarChangeListener(mPB);\r\n\t \t// Llista dels elements\r\n\t \tfinal ListView lSong = (ListView) findViewById(R.id.list);\r\n\t \tlSong.clearAnimation();\r\n\t \tlSong.setOnTouchListener(new OnTouchListener() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic boolean onTouch(View v, MotionEvent event) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t \tlSong.setScrollbarFadingEnabled(false);\r\n\t \tArrayAdapter<String> adaptador = new ArrayAdapter<String>(Pa,R.layout.row,rSer.get_songs());\r\n\t \t\r\n\t \tlSong.setAdapter(adaptador);\r\n\t \t// Creem el listener per clicar\r\n\t \t\r\n\t \tlSong.setOnItemClickListener(new OnItemClickListener()\r\n\t \t{\r\n\t \t\t\r\n\t \t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\r\n\t \t\t\t\tlong arg3)\r\n\t \t\t{\r\n\t \t\t\t\r\n\t \t\t\trSer.reset_reproductor();\r\n\t \t\t\trSer.set_song(arg2,arg2);\r\n\t \t\t\trSer.play_reproductor();\r\n\t \t\t\tplay_song();\r\n\t \t\t}\r\n\t \t});\r\n\t \t\r\n\t \t\r\n\t \t\r\n\t \t// Programem un thread per mantenir la seek actualitzada\r\n\t \tRunnable progressUpdater = new Runnable() {\r\n\t \t\t@Override\r\n\t \t\tpublic void run() \r\n\t \t\t{\r\n\t \t\t\tint total = rSer.get_duration_actual();\r\n\t \t\t\tint act = 0;\r\n\t \t\t\tSeekBar sb = (SeekBar) findViewById(R.id.ProgressMusic);\r\n\t \t\t\tsb.setMax(total);\r\n\t \t\t\twhile (rSer.not_null_mp() || act < total) \r\n\t \t\t\t{\r\n\t \t\t\t\ttotal = rSer.get_duration_actual();\r\n\t \t\t\t\tsb.setMax(total);\r\n\t \t\t\t\tif (!rSer.mp_playing() && !paused)\r\n\t \t\t\t\t{\r\n\t \t\t\t\t\tsb.setProgress(0);\r\n\t \t\t\t\t}\r\n\t \t\t\t\t\r\n\t \t\t\t\ttry \r\n\t \t\t\t\t{\r\n\t \t\t\t\t\tThread.sleep(1000);\r\n\t \t\t\t\t\tact = rSer.mp_current_position();\r\n\t \t\t\t\t} catch (Exception e) {}\r\n\t \t\t\t\t\r\n\t \t\t\t\tsb.setProgress(act);\r\n\t \t\t\t} \t\t\r\n\t \t\t}\r\n\t \t};\r\n\t \tThread thread = new Thread(progressUpdater);\r\n\t \tthread.start();\r\n\t \t\r\n\r\n\t }}, 500);\r\n }", "public void run() {\r\n\t\tAbstractElementControl[] controls = manager.getElements();\r\n\t\tfor (int i = 0; i < controls.length; i++) {\r\n\t\t\tif (controls[i] != null && controls[i] instanceof ServiceControl) {\r\n\t\t\t\tServiceControl sc = (ServiceControl)controls[i];\r\n\t\t\t\tif (sc.getSystemID().equals(systemID)) {\r\n\t\t\t\t\tmanager.focusElement(sc);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tServiceControl sc = new ServiceControl(manager, systemID, name);\r\n\t\tmanager.addElement(sc);\r\n\t\tmanager.focusElement(sc);\r\n\t}", "public void start() {\n\t\tthis.startTime = System.nanoTime();\n\t\tthis.running = true;\n\t}", "public void start() {\n notifyStart();\n simloop();\n notifyStop();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tstartService(streamService);\n\t\t\t\tstartButton.setEnabled(false);\n\t\t\t}", "@Override\n public void surfaceCreated( final SurfaceHolder holder )\n {\n this.controller.setRunning( true );\n this.controller.start();\n }", "@Override\n\tpublic void run() \n\t{\n\t\ttry {\n\t\t\tplay();\n\t\t} catch (JavaLayerException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void onPrepared(MediaPlayer player) {\n player.start(); \n }", "@Override\n\tpublic void onPrepared(MediaPlayer mp) {\n\t\tmp.start();\n\t}", "public void start() {\n this.pause = false;\n super.setVolume(this.currentVolumeValue, this.currentVolumeValue);\n super.start();\n if(PlayerEngineImpl.this.isFadeVolume) {\n this.handler.removeCallbacks(this.volumeRunnable);\n this.currentVolumeValue = Math.max(0.0F, this.currentVolumeValue);\n this.handler.post(this.volumeRunnable);\n } else {\n super.setVolume(1.0F, 1.0F);\n }\n }", "@Override\n public void run() {\n if (mPlayer != null) {\n if (!mPlayer.isPlaying())\n mPlayer.play();\n }\n }", "public void start(){\n runServerGUI();\n // new server thread object created\n ServerThread m_Server = new ServerThread(this);\n m_Server.start();\n }", "public void start() {\n\t\t setVisible(true);\n\t}", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();" ]
[ "0.76287746", "0.7215537", "0.6873936", "0.6781636", "0.6779552", "0.6655823", "0.6558051", "0.6461362", "0.6425699", "0.6411808", "0.6392319", "0.6390188", "0.6390015", "0.63531446", "0.633713", "0.6309714", "0.630405", "0.6298328", "0.6289168", "0.6262226", "0.6260162", "0.6239701", "0.62372535", "0.62316704", "0.62283385", "0.6222554", "0.62209237", "0.62128586", "0.615725", "0.6152575", "0.61485815", "0.6140531", "0.6136898", "0.60880166", "0.60734355", "0.60715765", "0.6070669", "0.6069571", "0.6060028", "0.6058566", "0.6048649", "0.6044457", "0.60235345", "0.60200685", "0.60037434", "0.60000384", "0.5985711", "0.59796524", "0.59754753", "0.59712344", "0.59630775", "0.5960466", "0.5960449", "0.5929271", "0.5919596", "0.5914774", "0.5912183", "0.5900609", "0.5892897", "0.5884945", "0.58792174", "0.5873182", "0.58690524", "0.58669364", "0.58624524", "0.5857233", "0.58544403", "0.5844314", "0.5840795", "0.58218724", "0.5820644", "0.58186984", "0.57881737", "0.5784958", "0.5766694", "0.57592964", "0.57580686", "0.57577854", "0.5756338", "0.5754249", "0.5747019", "0.5743682", "0.57365865", "0.5734762", "0.57325065", "0.5729672", "0.5727006", "0.57252645", "0.5724957", "0.5724162", "0.5721106", "0.5717577", "0.5716625", "0.5715356", "0.5714581", "0.5714581", "0.5714581", "0.5714581", "0.5714581", "0.5714581", "0.5714581" ]
0.0
-1
There may be multiple widgets active, so update all of them
public static void updateAllWidgets(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds, int playbackState, String episodeTitle, Bitmap poster) { for (int appWidgetId : appWidgetIds) { updateAppWidget(context, appWidgetManager, appWidgetId, playbackState, episodeTitle, poster); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateAllWidgets(){\n AppWidgetManager widgetManager = AppWidgetManager.getInstance(this);\n int[] appWidgetIds = widgetManager.getAppWidgetIds(new ComponentName(this,EasyBakeWidget.class));\n for (int i: appWidgetIds){\n widgetManager.notifyAppWidgetViewDataChanged(i,R.id.widget_ingredients_list);\n EasyBakeWidget.updateAppWidget(this,widgetManager,i);\n }\n }", "public void update()\n {\n for (Container container : containers)\n container.update(false);\n\n Gui.update(BanksGUI.class);\n Gui.update(BankGUI.class);\n Gui.update(ItemsGroupsGUI.class);\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager,\n int[] appWidgetIds)\n {\n // There may be multiple widgets active, so update all of them.\n for (int appWidgetId : appWidgetIds)\n {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n }", "protected void _updateWidgets()\n\t{\n\t\t// Show the title\n\t\tString title = _spItem.getTitleAttr() ;\n\t\tif( title != null )\n\t\t\t_obsTitle.setText( title ) ;\n\t\telse\n\t\t\t_obsTitle.setText( \"\" ) ;\n\n\t\tString state = _avTab.get( \"state\" ) ;\n\t\tif( state == null )\n\t\t\t_obsState.setText( \"Not in Active Database\" ) ;\n\t\telse\n\t\t\t_obsState.setText( state ) ;\n\n\t\tignoreActions = true ; // MFO\n\n\t\tSpObs obs = ( SpObs )_spItem ;\n\t\t\n\t\t// Set the priority\n\t\tint pri = obs.getPriority() ;\n\t\t_w.jComboBox1.setSelectedIndex( pri - 1 ) ;\n\n\t\t// Set whether or not this is a standard\n\t\t_w.standard.setSelected( obs.getIsStandard() ) ;\n\n\t\t// Added for OMP (MFO, 7 August 2001)\n\t\t_w.optional.setValue( obs.isOptional() ) ;\n\n\t\tint numberRemaining = obs.getNumberRemaining();\n\t\t_w.setRemainingCount(numberRemaining);\n\n\t\t_w.unSuspendCB.addActionListener( this ) ;\n\n\t\tignoreActions = false ;\n\n\t\t_w.estimatedTime.setText( OracUtilities.secsToHHMMSS( obs.getElapsedTime() , 1 ) ) ;\n\n\t\t_updateMsbDisplay() ;\n\t}", "void updateControls();", "public void updateAllButtons(){\n updateStartButton();\n updateResetButton();\n }", "protected void updateWidgets() {\n if (!isVisible()) {\n return;\n }\n if (myTopPanel != null) {\n // if we have a top panel, then we have a grid display there\n boolean gridOn = viewer.getGridVisible();\n GLGridPlane grid = viewer.getGrid();\n if ((myGridDisplay != null) != gridOn) {\n if (gridOn) {\n myGridDisplay =\n GridDisplay.createAndAdd (\n grid, myTopPanel, myGridDisplayIndex);\n }\n else {\n GridDisplay.removeAndDispose (\n myGridDisplay, myTopPanel, myGridDisplayIndex);\n myGridDisplay = null;\n }\n }\n if (myGridDisplay != null) {\n myGridDisplay.updateWidgets();\n }\n }\n }", "@Override\r\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\r\n// updateAppWidget(context, appWidgetManager, appWidgetId);\r\n }\r\n }", "private void update()\n {\n\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n //System.out.println(\"UPDATE\");\n updateHumanPlayerMoney();\n updateListViewDoctorItems();\n updateListViewHospitalItems();\n updateListViewLogWindow();\n updateListViewComputerPlayer();\n load_figure();\n updateComputerPlayerMoney();\n }\n });\n }", "protected void updatePanelContent() {\n updating = true;\n jTextFieldName.setText(bulb.getName());\n jTextFieldName.setToolTipText(bulb.getType());\n jSlider1.setValue(bulb.getIntensity());\n jToggleButton1.setSelected(bulb.isOn());\n if (bulb.getColor() != null) {\n jRadioCold.setEnabled(true);\n jRadioNormal.setEnabled(true);\n jRadioWarm.setEnabled(true);\n switch(bulb.getColor()) {\n case TradfriConstants.COLOR_NORMAL: jRadioNormal.setSelected(true); break;\n case TradfriConstants.COLOR_WARM: jRadioWarm.setSelected(true); break;\n case TradfriConstants.COLOR_COLD: jRadioCold.setSelected(true); break;\n }\n }\n else {\n jRadioCold.setEnabled(false);\n jRadioNormal.setEnabled(false);\n jRadioWarm.setEnabled(false);\n }\n \n \n if (bulb.isOnline()) {\n jToggleButton1.setEnabled(true);\n jRadioCold.setEnabled(true);\n jRadioNormal.setEnabled(true);\n jRadioWarm.setEnabled(true);\n jSlider1.setEnabled(true);\n jLabelDates.setText(\"Installed: \"+bulb.getDateInstalled()+\" - Last seen: \"+bulb.getDateLastSeen()+\" - Firmware: \" + bulb.getFirmware() + \" [online]\");\n }\n else {\n jToggleButton1.setEnabled(false);\n jRadioCold.setEnabled(false);\n jRadioNormal.setEnabled(false);\n jRadioWarm.setEnabled(false);\n jSlider1.setEnabled(false);\n jLabelDates.setText(\"Installed: \"+bulb.getDateInstalled()+\" - Last seen: \"+bulb.getDateLastSeen()+\" - Firmware: \" + bulb.getFirmware() + \" [offline]\");\n }\n \n updating = false;\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n ComponentName watchWidget = new ComponentName(context, AbsenMainWidget.class);\n updateAppWidget(context, appWidgetManager, watchWidget);\n }", "@Override\r\n public void updateUI() {\r\n }", "private void updateGUIStatus() {\r\n\r\n }", "public void updateUI(){}", "public void updateWidgets() {\n int i;\n if (this.mTransitionHelper.isTransitioning()) {\n this.mTransitionHelper.pendingUpdateWidgets();\n return;\n }\n int i2 = 0;\n int selectedZen = getSelectedZen(0);\n boolean z = true;\n boolean z2 = selectedZen == 1;\n boolean z3 = selectedZen == 2;\n boolean z4 = selectedZen == 3;\n if ((!z2 || this.mPrefs.mConfirmedPriorityIntroduction) && ((!z3 || this.mPrefs.mConfirmedSilenceIntroduction) && (!z4 || this.mPrefs.mConfirmedAlarmIntroduction))) {\n z = false;\n }\n this.mZenButtons.setVisibility(this.mHidden ? 8 : 0);\n this.mZenIntroduction.setVisibility(z ? 0 : 8);\n if (z) {\n if (z2) {\n i = R$string.zen_priority_introduction;\n } else if (z4) {\n i = R$string.zen_alarms_introduction;\n } else if (this.mVoiceCapable) {\n i = R$string.zen_silence_introduction_voice;\n } else {\n i = R$string.zen_silence_introduction;\n }\n this.mConfigurableTexts.add(this.mZenIntroductionMessage, i);\n this.mConfigurableTexts.update();\n this.mZenIntroductionCustomize.setVisibility(z2 ? 0 : 8);\n }\n String computeAlarmWarningText = computeAlarmWarningText(z3);\n TextView textView = this.mZenAlarmWarning;\n if (computeAlarmWarningText == null) {\n i2 = 8;\n }\n textView.setVisibility(i2);\n this.mZenAlarmWarning.setText(computeAlarmWarningText);\n }", "@Override\n public void updateUi() {\n\n }", "@Override\n public void updateUi() {\n\n }", "@Override\n public void updateUi() {\n\n }", "@Override\r\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\r\n\r\n\r\n for (int appWidgetId : appWidgetIds) {\r\n updateAppWidget(context, appWidgetManager, appWidgetId, appWidgetIds);\r\n }\r\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n\n\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n final int N = appWidgetIds.length;\n for (int i = 0; i < N; i++) {\n updateAppWidget(context, appWidgetManager, appWidgetIds[i], Color.MAGENTA);\n }\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n final int N = appWidgetIds.length;\n for (int i = 0; i < N; i++)\n {\n updateAppWidget(context, appWidgetManager, appWidgetIds[i]);\n }\n }", "public void updateComponents(){\n adapter.updateItems();\n }", "private void updateButtonsState() {\r\n ISelection sel = mTableViewerPackages.getSelection();\r\n boolean hasSelection = sel != null && !sel.isEmpty();\r\n\r\n mUpdateButton.setEnabled(mTablePackages.getItemCount() > 0);\r\n mDeleteButton.setEnabled(hasSelection);\r\n mRefreshButton.setEnabled(true);\r\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n final int N = appWidgetIds.length;\n for (int i=0; i<N; i++) {\n updateAppWidget(context, appWidgetManager, appWidgetIds[i]);\n }\n }", "protected void updateEnabled() {\n\t\tFieldGroup control = getUIControl();\n\t\tif (control != null) {\n\t\t\tCollection<? extends IRidget> ridgets = getRidgets();\n\t\t\tfor (IRidget ridget : ridgets) {\n\t\t\t\tridget.setEnabled(isEnabled());\n\t\t\t}\n\t\t\tcontrol.setEnabled(isEnabled());\n\t\t}\n\t}", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n\n for (int appWidgetId : appWidgetIds) {\n views = new RemoteViews(context.getPackageName(), R.layout.mywidget);\n //views.setProgressBar(R.id.progress_bar2, 100,0,true);\n updateAppWidget(context, appWidgetManager, appWidgetId);\n appWidgetManager2=appWidgetManager;\n contextt=context;\n appWidgetId2=appWidgetId;\n SetAlarm(context,1,mywidget.class);\n appWidgetManager.updateAppWidget(appWidgetId, views);\n\n }\n }", "public void UpdateCommandsUI(){\n Button B;\n try{\n for (int i = 0; i < f.getNumComp(); i++) {\n B = (Button) findViewById(300000 + i); //Buy Button\n if(dayOpen & (p.getMoney()>0)) {\n B.setEnabled(true);\n B.setTextColor(0xffffffff);\n } else if(dayOpen & (p.getLevel()>= 4)){\n B.setEnabled(true);\n B.setTextColor(0xffff0000);\n } else {\n B.setEnabled(false);\n B.setTextColor(0xff000000);\n }\n\n B = (Button) findViewById(400000 + i); //Sell Button\n if (dayOpen & (f.getSharesOwned(i) > 0)) {\n B.setEnabled(true);\n B.setTextColor(0xffffffff);\n } else if(p.getLevel()>=4 & !f.isShorted(i) & dayOpen){\n B.setEnabled(true);\n B.setTextColor(0xffff0000); //Red Color for short positions\n } else {\n B.setEnabled(false);\n B.setTextColor(0xff000000);\n }\n }\n } catch (Exception e){\n e.printStackTrace();\n }\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager,\n int[] appWidgetIds) {\n LogHelper.log(String.format(\"Widget ID Count:%d\", appWidgetIds.length));\n\n // loop through existing widgets\n for (int index = 0; index < appWidgetIds.length; index++) {\n int appWidgetId = appWidgetIds[index];\n LogHelper.log(String.format(\"Widget ID:%d\", appWidgetId));\n\n RemoteViews appWidgetViews = getWidgetRemoteViews(context, appWidgetId);\n appWidgetManager.updateAppWidget(appWidgetId, appWidgetViews);\n }\n\n }", "public void updateAnalogWindowChilds() {\r\n\t\tif (this.analogTabItem != null && !this.analogTabItem.isDisposed()) {\r\n\t\t\tif (Thread.currentThread().getId() == DataExplorer.application.getThreadId()) {\r\n\t\t\t\tthis.analogTabItem.updateChilds();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tGDE.display.asyncExec(new Runnable() {\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\tDataExplorer.this.analogTabItem.updateChilds();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void handleActionUpdateDriverWidget() {\n\n AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(this);\n int[] appWidgetIds = appWidgetManager\n .getAppWidgetIds(new ComponentName(this, WidgetProvider_Driver.class));\n\n //Trigger data update to handle the ListView widgets and force a data refresh\n appWidgetManager.notifyAppWidgetViewDataChanged(appWidgetIds, R.id.widget_list_view_orders);\n\n //Now update all widgets\n WidgetProvider_Driver.updateDriverWidgets(this, appWidgetManager, appWidgetIds);\n\n\n }", "private void updateButtons() {\n\t\t SwingUtilities.invokeLater(new Runnable() {\n\t\t public void run() { \n\t\t botones[rowId1][columnId1].toggleOnOff();\n\t\t\t botones[rowId1][columnId1].setEnabled(true);\n\t\t\t \n\t\t\t botones[rowId2][columnId2].toggleOnOff();\n\t\t\t botones[rowId2][columnId2].setEnabled(true);\n\t\t\t \n\t\t\t setEnabled(true);\n\t\t\t \n\t\t timerPush.stop();\n\t\t }\n\t\t });\n\t }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget_layout);\n for (int appWidgetId : appWidgetIds) {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n views.setEmptyView(R.id.list , R.id.empty_view);\n\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n super.onUpdate(context, appWidgetManager, appWidgetIds);\n// Log.d(\"로그\", \"위젯 onUpdate\");\n for (int appWidgetId : appWidgetIds) {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n }", "@Override\n public void update() {\n if ((mLikesDialog != null) && (mLikesDialog.isVisible())) {\n return;\n }\n\n if ((mCommentariesDialog != null) && (mCommentariesDialog.isVisible())) {\n return;\n }\n\n if (!getUserVisibleHint()) {\n return;\n }\n\n updateUI();\n }", "private void refreshControls() {\n\t// Scrollbars are upside-down from real sliders.\n\tint scrollValue = caeliScroll.getMaximum() - caeliScroll.getValue();\n\tcaeliValueLabel.setText( \"\"+(scrollValue / 100.0 ) );\n\tparent.setCaeliDensity( scrollValue / 100.0 );\n\n\t// Scrollbars are upside-down from real sliders.\n\tscrollValue = planetScroll.getMaximum() - planetScroll.getValue();\n\tplanetValueLabel.setText( \"\"+scrollValue );\n\tparent.setPlanetCount( scrollValue );\n\n\t// Scrollbars are upside-down from real sliders.\n\tscrollValue = triSizeScroll.getMaximum() - triSizeScroll.getValue()\n\t + triFineSizeScroll.getMaximum() - triFineSizeScroll.getValue();\n\t \n\ttriSizeValueLabel.setText( \"\"+(triSizeScroll.getMaximum() - triSizeScroll.getValue()) );\n\ttriFineSizeValueLabel.setText( \"\"+(triFineSizeScroll.getMaximum() - triFineSizeScroll.getValue()) );\n\tparent.setDustTrianglesThreshold( scrollValue );\n\n\t// Scrollbars are upside-down from real sliders.\n\tint strnScrollValue = attStrengthScroll.getMaximum() - attStrengthScroll.getValue();\n\tint distScrollValue = attDistanceScroll.getMaximum() - attDistanceScroll.getValue();\n\n\tattStrnValueLabel.setText( \"\"+strnScrollValue );\n\tattDistValueLabel.setText( \"\"+distScrollValue );\n\n\tparent.setAttraction( distScrollValue, strnScrollValue );\n\n\n\t// Refresh iPad display values\n\tosc.send( new OscMessage( \"/faders\", new Object[] { sliderFloatValue( caeliScroll ),\n\t\t\t\t\t\t\t sliderFloatValue( planetScroll ),\n\t\t\t\t\t\t\t sliderFloatValue( triSizeScroll ),\n\t\t\t\t\t\t\t sliderFloatValue( triFineSizeScroll ),\n\t\t\t\t\t\t\t sliderFloatValue( attDistanceScroll ),\n\t\t\t\t\t\t\t sliderFloatValue( attStrengthScroll ) } ),\n\t new NetAddress( ipadAddress, OSC_PORT_SEND ) );\n }", "public void update(){\n label = tag.getSelectedItemPosition() == 0 ? \"all\" : mLabel[tag.getSelectedItemPosition()];\n Refresh();\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n // Construct the RemoteViews object\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.app_widget_top3);\n\n //klikken op widget titel TextView opent de app\n Intent intent = new Intent(context, MainActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);\n views.setOnClickPendingIntent(R.id.titelTextView, pendingIntent);\n\n //update de UI\n String[] taaknamen = new TakenlijstDB(context).getWidgetTaken(3);\n views.setTextViewText(R.id.taak1TextView,\n taaknamen[0] == null ? \"\" : taaknamen[0]);\n views.setTextViewText(R.id.taak2TextView,\n taaknamen[1] == null ? \"\" : taaknamen[1]);\n views.setTextViewText(R.id.taak3TextView,\n taaknamen[2] == null ? \"\" : taaknamen[2]);\n\n // Instruct the widget manager to update the widget\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n super.onUpdate(context, appWidgetManager, appWidgetIds);\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n super.onUpdate(context, appWidgetManager, appWidgetIds);\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n Log.e(TAG, \"onUpdate action\");\n }", "private void updateWidgets(ShoppingList list) {\n AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(this);\n int[] appWidgetIds = appWidgetManager.getAppWidgetIds(new ComponentName(this,\n ShoppingListWidgetProvider.class));\n ShoppingListWidgetProvider.updateAppWidgets(this, appWidgetManager, list, appWidgetIds);\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n IDList = appWidgetIds;\n for (int appWidgetId : appWidgetIds) {\n\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n }", "public void updateView()\n {\n int selectionCount = selection.getElementSelectionCount();\n\n // If only one item selected, enable & update the\n // text boxes and pull downs with values.\n if (selectionCount == 1) {\n // preserve selected state if a whole text field is selected\n Text text = WindowUtil.getFocusedText();\n boolean restoreSel = false;\n if ((text != null) &&\n (text.getSelectionCount() == text.getCharCount()))\n {\n restoreSel = true;\n }\n\n // get the selected item\n Iterator<FrameElement> iter =\n selection.getSelectedElementsIterator();\n\n // For each selected object, which there is only one.\n FrameElement elt = iter.next();\n\n if (elt instanceof IWidget) {\n IWidget widget = (IWidget) elt;\n\n view.useParameters(FrameEditorView.USE_SINGLE_SELECT);\n view.updateWidgetProperties(widget);\n }\n else if (elt instanceof FrameElementGroup) {\n FrameElementGroup eltGroup = (FrameElementGroup) elt;\n\n view.useParameters(FrameEditorView.USE_GROUP_SELECT);\n view.updateEltGroupProperties(eltGroup);\n }\n\n // Restore the selection state\n if (restoreSel) {\n text.selectAll();\n }\n }\n else if (selectionCount > 1) {\n // TODO: on multi selection, some values are left enabled\n // We need to set these to something or disable them.\n view.useParameters(FrameEditorView.USE_MULTI_SELECT);\n }\n else {\n view.useParameters(FrameEditorView.USE_NONE);\n view.updateFrameProperties(frame, false);\n }\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n // There may be multiple widgets active, so update all of them\n // Play around with the passed parameters to see how it affects the widget\n Log.d(\"TEMPLETE_Widget\", \"Widget onUpdate Received\");\n update(context,isLightMode(context));\n }", "private void updateUI() {\n mUser.weight.sortListByDate();\n mUser.bloodPressure.sortListsByDate();\n updateText();\n updateChart();\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n super.onUpdate(context, appWidgetManager, appWidgetIds);\n for (int appWidgetId : appWidgetIds) {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n }", "private void handleActionUpdateBakingWidgets(){\n AppDatabase myDatabase = RecipeRoomSingleton.getInstance(this);\n //If it's empty, forget it.\n if(myDatabase.daoAccess().getAll().isEmpty())return;\n //Get the items\n ArrayList<Ingredient> ingredients = (myDatabase.daoAccess().getAll()).get(0).getIngredients();\n //Get the WidgetManager\n AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(this);\n //Get the widget IDs\n int[] appWidgetIds = appWidgetManager.getAppWidgetIds(new ComponentName(this, BakingWidget.class));\n //Notify the manager that the data has changed for the listview\n appWidgetManager.notifyAppWidgetViewDataChanged(appWidgetIds, R.id.appwidget_listview);\n\n //Update the appwidget\n BakingWidget.updateAppWidget(this, appWidgetIds, appWidgetManager, ingredients);\n }", "private void UpdateChecboxes()\r\n\t{\n\t\tfor (Iterator<CheckBox> iterator = this.CBlist.iterator(); iterator.hasNext();) \r\n\t\t{\r\n\t\t\t// for the next CheckBox\r\n\t\t\tCheckBox currChBox = iterator.next();\r\n\t\t\t\r\n\t\t\t// if the matching tag is true - \r\n\t\t\tif (this.hmTags.get(currChBox.getText()) == true)\r\n\t\t\t{\r\n\t\t\t\t// Check it\r\n\t\t\t\tcurrChBox.setChecked(true);\r\n\t\t\t}\t\r\n\t\t}\r\n\t}", "private void updateSubModeSpinnerTexts() {\n\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n\n startServiceToDisplayList(appWidgetId, context);\n\n handleRemoteViewClick(context);\n\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n\n //setup the intent such that it calls the service to populate the widget views\n Intent intent = new Intent(context, BucketListWidgetService.class);\n\n //add the app widget ID to the intent extras.\n intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);\n intent.setData(Uri.parse(intent.toUri(Intent.URI_INTENT_SCHEME)));\n\n //instantiate the RemoteViews object for the app widget layout\n RemoteViews rv = new RemoteViews(context.getPackageName(), R.layout.bucketlist_widget);\n //setup the adapter such that it populates the data\n rv.setRemoteAdapter(R.id.widget_listview, intent);\n //if there are no items in the bucket list, display this empty view\n rv.setEmptyView(R.id.widget_listview, R.id.empty_view);\n\n //setup onclick actions for the listview and empty view\n final Intent onClickIntent = new Intent(context, BucketListWidgetProvider.class);\n onClickIntent.setAction(BucketListWidgetProvider.CLICK_ACTION);\n onClickIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);\n onClickIntent.setData(Uri.parse(onClickIntent.toUri(Intent.URI_INTENT_SCHEME)));\n final PendingIntent onClickPendingIntent = PendingIntent.getBroadcast(context, 0, onClickIntent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE);\n rv.setOnClickPendingIntent(R.id.empty_view, onClickPendingIntent);\n rv.setPendingIntentTemplate(R.id.widget_listview, onClickPendingIntent);\n\n appWidgetManager.updateAppWidget(appWidgetId, rv);\n }\n\n super.onUpdate(context, appWidgetManager, appWidgetIds);\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n PlaybackService.startServiceToUpdateWidgets(context);\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n Intent intent = new Intent(context, AppWidgetService.class);\n intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);\n intent.setData(Uri.parse(intent.toUri(Intent.URI_INTENT_SCHEME)));\n\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.app_widget);\n views.setTextViewText(R.id.appwidget_text, Util.getAppWidgetRecipeNamePreference(context));\n views.setEmptyView(R.id.appwidget_ingredient_list, R.id.empty_view);\n views.setRemoteAdapter(appWidgetId, R.id.appwidget_ingredient_list, intent);\n\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }\n\n super.onUpdate(context, appWidgetManager, appWidgetIds);\n }", "public void refresh() {\r\n\t\tneeds.setText(needs());\r\n\t\tproduction.setText(production());\r\n\t\tjobs.setText(jobs());\r\n\t\tmarketPrices.setText(marketPrices());\r\n\t\tmarketSellAmounts.setText(marketSellAmounts());\r\n\t\tmarketBuyAmounts.setText(marketBuyAmounts());\r\n\t\tcompanies.setText(companies());\r\n\t\tmoney.setText(money());\r\n\t\ttileProduction.setText(tileProduction());\r\n\t\tcapital.setText(capital());\r\n\t\thappiness.setText(happiness());\r\n\t\tland.setText(land());\r\n\t\t//ArrayList of Agents sorted from lowest to highest in money is retrieved from Tile\r\n\t\tagents=tile.getAgentsByMoney();\r\n\t\tgui3.refresh();\r\n\t\tsliderPerson.setText(\"\"+agents.get(slider.getValue()).getMoney());\r\n\t\ttick.setText(tick());\r\n\t\tthis.pack();\r\n\t}", "private void updatePanels() // updatePanels method start\n\t{\n\t\tbalanceOutput.setText(log.balanceReport());\n\t\tlogOutput.setText(log.logReport());\n\t\tATBOutput.setText(log.adjustedTrialBalance());\n\t\tISOutput.setText(log.incomeStatement());\n\t\tRESOutput.setText(log.retainedEarningsStatement());\n\t\tBSOutput.setText(log.balanceSheet());\n\t}", "public void updateWidgetFor(String name) {\n }", "private void onUpdate(Context context) {\n AppWidgetManager appWidgetManager = AppWidgetManager.getInstance\n (context);\n\n // Uses getClass().getName() rather than MyWidget.class.getName() for\n // portability into any App Widget Provider Class\n ComponentName thisAppWidgetComponentName =\n new ComponentName(context.getPackageName(), getClass().getName()\n );\n int[] appWidgetIds = appWidgetManager.getAppWidgetIds(thisAppWidgetComponentName);\n onUpdate(context, appWidgetManager, appWidgetIds);\n }", "@Override\n\tpublic void onUpdate(Context ctxt, AppWidgetManager appWidgetManager,\n\t\t\tint[] appWidgetIds) {\n\t\t Log.w(LOG_TAG, \"onUpdate method called\");\n\t\t/* // Get all ids\n\t\t ComponentName thisWidget = new ComponentName(context,\n\t\t TaskWidget.class);\n\t\t int[] allWidgetIds = appWidgetManager.getAppWidgetIds(thisWidget);\n\n\t\t // Build the intent to call the service\n\t\t Intent intent = new Intent(context.getApplicationContext(),\n\t\t UpdateWidgetService.class);\n\t\t intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, allWidgetIds);\n\n\t\t // Update the widgets via the service\n\t\t context.startService(intent);*/\n for (int i=0; i<appWidgetIds.length; i++) {\n Intent svcIntent=new Intent(ctxt, WidgetService.class);\n\n svcIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetIds[i]);\n svcIntent.setData(Uri.parse(svcIntent.toUri(Intent.URI_INTENT_SCHEME)));\n\n RemoteViews widget=new RemoteViews(ctxt.getPackageName(),\n R.layout.main);\n\n widget.setRemoteAdapter(appWidgetIds[i], R.id.widgetLV,\n svcIntent);\n\n Intent clickIntent=new Intent(ctxt, EditActivity.class);\n PendingIntent clickPI=PendingIntent\n .getActivity(ctxt, 0,\n clickIntent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n\n// widget.setPendingIntentTemplate(R.id.widgetLV, clickPI);\n widget.setOnClickPendingIntent(R.id.button, clickPI);\n appWidgetManager.updateAppWidget(appWidgetIds[i], widget);\n }\n\t}", "public void update(){\n\t\tthis.setVisible(true);\n\t}", "@Override\r\n\tpublic void update() {\r\n\t\t// get the first element and set the values according to its\r\n\t\t// information\r\n\t\tIqmDataBox iqmDataBox = (IqmDataBox) this.workPackage.getSources().get(0);\r\n\t\tPlanarImage pi = iqmDataBox.getImage();\r\n\r\n\t\tjFormattedTextFieldOldWidth.setValue(pi.getWidth());\r\n\t\tjFormattedTextFieldOldHeight.setValue(pi.getHeight());\r\n\r\n\t\tint left = ((Number) jSpinnerLeft.getValue()).intValue();\r\n\t\tint right = ((Number) jSpinnerRight.getValue()).intValue();\r\n\t\tint top = ((Number) jSpinnerTop.getValue()).intValue();\r\n\t\tint bottom = ((Number) jSpinnerBottom.getValue()).intValue();\r\n\r\n\t\t// Set image dependent initial values;\r\n\t\tjSpinnerNewWidth.removeChangeListener(this);\r\n\t\tjSpinnerNewWidth.setValue(pi.getWidth() + left + right);\r\n\t\tjSpinnerNewWidth.addChangeListener(this);\r\n\t\tjSpinnerNewHeight.removeChangeListener(this);\r\n\t\tjSpinnerNewHeight.setValue(pi.getHeight() + top + bottom);\r\n\t\tjSpinnerNewHeight.addChangeListener(this);\r\n\t\t\r\n\t\tif (buttConst.isSelected()){\r\n\t\t\ttbConst.setTitleColor(Color.BLACK);\r\n\t\t\tjLabelConst.setEnabled(true);\r\n\t\t\tjSpinnerConst.setEnabled(true);\r\n\t\t} else {\r\n\t\t\ttbConst.setTitleColor(Color.GRAY);\r\n\t\t\tjLabelConst.setEnabled(false);\r\n\t\t\tjSpinnerConst.setEnabled(false);\r\n\t\t}\r\n\t\tthis.repaint(); //because of tb TitledBorder cahnge of color\r\n\t\t\r\n\r\n\t\tthis.updateParameterBlock();\r\n\t\tthis.setParameterValuesToGUI();\r\n\t}", "public void updateWindowsForAnimator() {\n forAllWindows(this.mUpdateWindowsForAnimator, true);\n }", "public void update() {\n\tfireContentsChanged(this, 0, getSize());\n }", "@Override\r\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n final int N = appWidgetIds.length;\r\n for (int i=0; i<N; i++) {\r\n updateAppWidget(context, appWidgetManager, appWidgetIds[i]);\r\n /*\r\n * Press the widget, send an broadcast to the broadcast receiver;\r\n * call onReceive() of the receiver.\r\n */\r\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.rotation_switcher);// get RemoteViews from xml file.\r\n Intent intent = new Intent(context, AutoSwitcherBroadcastReceiver.class); // MyReceiver.class is the receiver.\r\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context,0,intent,0);\r\n views.setOnClickPendingIntent(R.id.myImageView, pendingIntent); // similar to setOnClickListener()\r\n appWidgetManager.updateAppWidget(appWidgetIds, views);\r\n }\r\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n mContext = context;\n for (int appWidgetId : appWidgetIds) {\n\n\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.my_stocks);\n Intent widgetIntent = new Intent(context, MyStocksActivity.class);\n PendingIntent pi = PendingIntent.getActivity(context, 0, widgetIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n views.setPendingIntentTemplate(R.id.listView, pi);\n\n\n Intent i = new Intent(context, WidgetService.class);\n i.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);\n i.setData(Uri.parse(i.toUri(Intent.URI_INTENT_SCHEME)));\n views.setRemoteAdapter(R.id.listView, i);\n\n\n views.setEmptyView(R.id.listView, R.id.emptyList);\n\n\n // Instruct the widget manager to update the widget\n appWidgetManager.updateAppWidget(appWidgetId, views);\n\n }\n super.onUpdate(context, appWidgetManager, appWidgetIds);\n }", "public void updateUi() {\n\t\t// // update the car color to reflect premium status or lack thereof\n\t\t// ((ImageView)findViewById(R.id.free_or_premium)).setImageResource(mIsPremium\n\t\t// ? R.drawable.premium : R.drawable.free);\n\t\t//\n\t\t// // \"Upgrade\" button is only visible if the user is not premium\n\t\t// findViewById(R.id.upgrade_button).setVisibility(mIsPremium ?\n\t\t// View.GONE : View.VISIBLE);\n\t\t//\n\t\t// // \"Get infinite gas\" button is only visible if the user is not\n\t\t// subscribed yet\n\t\t// findViewById(R.id.infinite_gas_button).setVisibility(mSubscribedToInfiniteGas\n\t\t// ?\n\t\t// View.GONE : View.VISIBLE);\n\t\t//\n\t\t// // update gas gauge to reflect tank status\n\t\t// if (mSubscribedToInfiniteGas) {\n\t\t// ((ImageView)findViewById(R.id.gas_gauge)).setImageResource(R.drawable.gas_inf);\n\t\t// }\n\t\t// else {\n\t\t// int index = mTank >= TANK_RES_IDS.length ? TANK_RES_IDS.length - 1 :\n\t\t// mTank;\n\t\t// ((ImageView)findViewById(R.id.gas_gauge)).setImageResource(TANK_RES_IDS[index]);\n\t\t// }\n\t}", "@Override\n public void update() {\n this.blnDoUpdate.set(true);\n }", "private void refresh(int width, int height) {\n Integer numUnexposed = mainField.numUnexposed();\n nonminesLabel.setText(numUnexposed.toString());\n Integer numMarked = mainField.numMarked();\n if (numMarked < 0) {\n cellsUnmarked.setText(\"Too Many Marked!\");\n }\n else {\n cellsUnmarked.setText(numMarked.toString());\n }\n // iterate through all the buttons and update the text if it's an exposed cell\n for (int i = 0;i < width;i++) {\n for (int j = 0;j < height;j++) {\n int cellState = mainField.getCellState(i,j);\n if (cellState == mainField.EXPOSED) {\n Integer numValue = mainField.getValue(i,j);\n if (numValue == -1) {\n btArray[i][j].setText(\"B\");\n btArray[i][j].setStyle(\"-fx-background-color: #FF0000;\");\n }\n else if (numValue == 0) {\n btArray[i][j].setStyle(\"-fx-background-color: #CCCCCC;\");\n }\n else {\n btArray[i][j].setText(numValue.toString());\n btArray[i][j].setStyle(\"-fx-background-color: #CCCCCC;\");\n }\n }\n }\n }\n }", "protected void notifyDirty() {\n Event evt = new Event();\n evt.item = this;\n evt.widget = this;\n SelectionEvent event = new SelectionEvent(evt);\n for (SelectionListener listener : dirtyListener) {\n listener.widgetSelected(event);\n }\n }", "@Override\n\tpublic void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n\t\tfor (int appWidgetId : appWidgetIds) {\n\t\t\tupdateAppWidget(context, appWidgetManager, appWidgetId);\n\t\t}\n\t\tsuper.onUpdate(context, appWidgetManager, appWidgetIds);\n\t}", "public void updateAnalogWindow() {\r\n\t\tif (this.analogTabItem != null && !this.analogTabItem.isDisposed()) {\r\n\t\t\tif (Thread.currentThread().getId() == DataExplorer.application.getThreadId()) {\r\n\t\t\t\tthis.analogTabItem.update(true);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tGDE.display.asyncExec(new Runnable() {\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\tDataExplorer.this.analogTabItem.update(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void updateUI() {\n updateTrackDetails();\n //Disable Prev or Next or both button based on the current Index and number of tracks available\n if (mPlayingIndex == 0) {\n mPlayPrevBtn.setClickable(false);\n }\n if (mPlayingIndex == mTracks.size() - 1) {\n mPlayNextBtn.setClickable(false);\n }\n if (mPlayingIndex > 0 && mPlayingIndex < mTracks.size() - 1) {\n mPlayNextBtn.setClickable(true);\n mPlayPrevBtn.setClickable(true);\n }\n }", "private void updateControls() {\n updateBadge();\n etExtUsrId.setEnabled(isPushRegistrationAvailable() && !isUserPersonalizedWithExternalUserId());\n btnPersonalize.setEnabled(!isUserPersonalizedWithExternalUserId());\n btnDepersonalize.setEnabled(isUserPersonalizedWithExternalUserId());\n btnToInbox.setEnabled(isUserPersonalizedWithExternalUserId());\n }", "public void update(){\r\n\t\tupdateTurnLabel();\r\n\t\tupdateCanvas();\r\n\t}", "@Override\r\n\tpublic void updateUpdateableElements(double deltaTime) {\n\t\tfor (int i = 0; i < buttons.length; i++) {\r\n\t\t\tbuttons[i].updateUpdateableElements(deltaTime);\r\n\t\t}\r\n\t\t\r\n\t\t// Update screen\r\n\t\tfor (int i = 0; i < screens.length; i++) {\r\n\t\t\tscreens[i].updateUpdateableElements(deltaTime);\r\n\t\t}\r\n\t\t\r\n\t}", "public void refreshPanelComponents() {\r\n }", "public void update() {\r\n\r\n // update attributes\r\n finishIcon.setColored(isDirty());\r\n cancelIcon.setColored(isDirty());\r\n finishButton.repaint();\r\n cancelButton.repaint();\r\n\r\n }", "private void updateUI() {\n mLatestFeedsAdapter.notifyDataSetChanged();\n }", "public void update()\n\t{\n\t\tJPanel panel = getPanel();\n\n\t\tif (panel instanceof StylePanel)\n\t\t\t((StylePanel) panel).updatePanel();\n\t}", "public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n // Create an Intent to refresh\n Intent refreshIntent = new Intent(context, WidgetProvider.class);\n refreshIntent.setAction(AppWidgetManager.ACTION_APPWIDGET_UPDATE);\n refreshIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, new int[]{appWidgetId});\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0, refreshIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // Get the layout for the App Widget\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget);\n views.setOnClickPendingIntent(R.id.rootView, pendingIntent);\n\n randomNumber = (int) (Math.random() * 100);\n Intent serviceIntent = new Intent(context, WidgetRemoteViewsService.class);\n serviceIntent.setData(Uri.fromParts(\"content\", String.valueOf(appWidgetId + randomNumber), null));\n views.setRemoteAdapter(R.id.listView, serviceIntent);\n\n // Tell the AppWidgetManager to perform an update on the current app widget\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }\n }", "private void updateButtons() {\n\t\tif(buttonCount>1){\n\t\t\tremoveTableButton.setEnabled(true);\n\t\t}\n\t\telse{\n\t\t\tremoveTableButton.setEnabled(false);\n\t\t}\n\t\tif(buttonCount<tablesX.length){\n\t\t\taddTableButton.setEnabled(true);\n\t\t}\n\t\telse{\n\t\t\taddTableButton.setEnabled(false);\n\t\t}\n\t}", "private void updateGUI() {\n\t\tsfrDlg.readSFRTableFromCPU();\n\t\tsourceCodeDlg.updateRowSelection(cpu.PC);\n\t\tsourceCodeDlg.getCyclesLabel().setText(\"Cycles count : \" + cpu.getCyclesCount());\n\t\tdataMemDlg.fillDataMemory();\n\t\t//ioPortsDlg.fillIOPorts();\t\t\n\t\tIterator iter = seg7DlgList.iterator();\n\t\twhile(iter.hasNext())\n\t\t\t((GUI_7SegDisplay)iter.next()).drawSeg();\n\t}", "@Override\r\n\tpublic void drawUpdateableElements(Graphics g, ImageObserver observer) {\n\t\tfor (int i = 0; i < buttons.length; i++) {\r\n\t\t\tbuttons[i].drawUpdateableElements(g, observer);\r\n\t\t}\r\n\t\t\r\n\t\t// draw selected screen updateable\r\n\t\tthis.screens[this.selectedIndex].drawUpdateableElements(g, observer);\r\n\t}", "private void updateDialog() {\n for (int i = 0; i < NUMBER_OF_CARD_BACKGROUNDS; i++) {\n linearLayoutsBackgrounds[i].setBackgroundResource(i == selectedBackground ? R.drawable.settings_highlight : typedValue.resourceId);\n }\n\n for (int i = 0; i < NUMBER_OF_CARD_BACKGROUNDS; i++) {\n imageViews[i].setImageBitmap(bitmaps.getCardBack(i, selectedBackgroundColor));\n }\n\n for (int i = 0; i < 4; i++) {\n linearLayoutsColors[i].setBackgroundResource(i == selectedBackgroundColor ? R.drawable.settings_highlight : typedValue.resourceId);\n }\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n Recipe recipe = RecipeAppWidgetConfigure.loadRecipe(context, appWidgetId);\n if (recipe != null) {\n updateAppWidget(context, appWidgetManager, recipe, appWidgetId);\n }\n }\n }", "private void notifyWidget() {\n if (getActivity() != null) {\n ComponentName widget = new ComponentName(getActivity().getApplication(),\n RecipeWidgetProvider.class);\n AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(getActivity());\n int[] ids = appWidgetManager.getAppWidgetIds(widget);\n appWidgetManager.notifyAppWidgetViewDataChanged(ids, R.id.widget_list);\n RecipeWidgetProvider widgetProvider = new RecipeWidgetProvider();\n widgetProvider.updateWidget(getActivity().getApplication(), ids);\n }\n }", "public void updateDisplay()\r\n {\r\n boardpanel.removeAll();\r\n for(int i = 0; i < 3; i++)\r\n {\r\n for(int j = 0; j < 3; j++)\r\n {\r\n if(buttons[i][j].getText().charAt(0) == ' ') {\r\n buttons[i][j].setEnabled(true);\r\n }\r\n else\r\n {\r\n buttons[i][j].setEnabled(false);\r\n }\r\n boardpanel.add(buttons[i][j]);\r\n }\r\n }\r\n }", "private void updateAll() {\n updateAction();\n updateQueryViews();\n }", "private void updateUI() {\n Log.i(DEBUG.TAG, \"BTDevicesActivity - updateUI - start\");\n\n btnBTScan.setEnabled(btAdapter.isEnabled() && !btAdapter.isDiscovering());\n\n if (btAdapter.isDiscovering())\n btnBTScan.setText(R.string.btn_bt_devices_scan_running_text);\n else\n btnBTScan.setText(R.string.btn_bt_devices_scan_text);\n tglBTToggle.setChecked(btAdapter.isEnabled());\n\n // remove all found (if any) devices when BT is disabled\n if (!btAdapter.isEnabled())\n lvAdapter.clear();\n\n if (lvAdapter.getCount() > 0)\n tvHeader.setText(R.string.tv_bt_devices_header_text_devices_found);\n else\n tvHeader.setText(R.string.tv_bt_devices_header_text_no_devices);\n\n Log.i(DEBUG.TAG, \"BTDevicesActivity - updateUI - finish\");\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n Intent buttonIntent = new Intent(context, PassiveJammerService.class);\n buttonIntent.setAction(ACTION_WIDGET_PASSIVE);\n PendingIntent pendingButtonIntent = PendingIntent.getService(context, 0, buttonIntent, 0);\n\n // wrap the whole widget layout in a view to capture button and text touch\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.passive_control_widget);\n views.setOnClickPendingIntent(R.id.passive_control_button, pendingButtonIntent);\n\n appWidgetManager.updateAppWidget(appWidgetId, views);\n\n //TODO check and start the Passive service to account for Android 11\n // can't create widget on screen if service already running...\n Log.d(\"PS_WIDGET\", \"press the button and update!\");\n\n /*\n Intent mainIntent = new Intent(context, MainActivity.class);\n mainIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(mainIntent);\n */\n\n\n ActivityManager manager = (ActivityManager) context.getSystemService(ACTIVITY_SERVICE);\n assert manager != null;\n for (ActivityManager.RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) {\n if (PassiveJammerService.class.getName().equals(service.service.getClassName())) {\n Toast.makeText(context, \"service already running\", Toast.LENGTH_SHORT).show();\n Log.d(\"PS_WIDGET\", \"service running\");\n }\n else {\n // Sam4 said service NOT started when it was, still worked though\n Toast.makeText(context, \"service NOT started\", Toast.LENGTH_SHORT).show();\n Log.d(\"PS_WIDGET\", \"service NOT running\");\n }\n }\n }\n }", "private void updateUI() {\n Bite bite = BiteLab.get(getActivity()).getBite(mBiteId);\n\n mPlacementTextView.setText(bite.getPlacement());\n\n Calendar c = bite.getCalendar();\n int year = c.get(Calendar.YEAR);\n int month = c.get(Calendar.MONTH)+1;\n int day = c.get(Calendar.DAY_OF_MONTH);\n mDateTextView.setText(getString(R.string.show_date, day, month, year));\n\n mDaysSinceBiteTextView.setText(getString(R.string.days_since_bite\n , bite.getDaysSinceBite()));\n\n mStageTextView.setText(getString(R.string.show_stage, bite.getStage()));\n }", "private void updatePanel() {\n\t\tProbeUtilities.updateModelProbePanel();\n\t}", "public void updateDigitalWindowChilds() {\r\n\t\tif (this.digitalTabItem != null && !this.digitalTabItem.isDisposed()) {\r\n\t\t\tif (Thread.currentThread().getId() == DataExplorer.application.getThreadId()) {\r\n\t\t\t\tthis.digitalTabItem.updateChilds();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tGDE.display.asyncExec(new Runnable() {\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\tDataExplorer.this.digitalTabItem.updateChilds();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}" ]
[ "0.7656385", "0.7297112", "0.7140604", "0.7135215", "0.6749194", "0.67150867", "0.6672848", "0.6544008", "0.65306485", "0.65153754", "0.6509865", "0.6494512", "0.6486728", "0.6481882", "0.64573413", "0.64471185", "0.64471185", "0.64471185", "0.64434254", "0.6425265", "0.6411021", "0.64063627", "0.63875675", "0.63793033", "0.6376167", "0.6349386", "0.6342061", "0.63313735", "0.6325923", "0.6319057", "0.6313127", "0.6291776", "0.62871706", "0.6275218", "0.625461", "0.625461", "0.625461", "0.625461", "0.625461", "0.625461", "0.625461", "0.625461", "0.62506604", "0.62385017", "0.622956", "0.62275136", "0.62244326", "0.62244326", "0.62226963", "0.62184036", "0.6206306", "0.62044233", "0.6200338", "0.6195383", "0.61944824", "0.6181242", "0.6170188", "0.61574084", "0.61493385", "0.6139568", "0.61135685", "0.6108117", "0.6105474", "0.6103677", "0.60886204", "0.60766816", "0.607667", "0.60658556", "0.6061297", "0.6061246", "0.6052796", "0.6047798", "0.60470057", "0.6039671", "0.60357517", "0.6022411", "0.6018369", "0.60047203", "0.6004135", "0.598824", "0.59818834", "0.59685886", "0.5966223", "0.59648985", "0.59577256", "0.5953286", "0.5945929", "0.59389687", "0.59366745", "0.59303343", "0.58977586", "0.58946127", "0.58934134", "0.5893223", "0.5892041", "0.58783937", "0.5878196", "0.586286", "0.5851582", "0.5850997", "0.58469003" ]
0.0
-1
Enter relevant functionality for when the first widget is created
@Override public void onEnabled(Context context) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onEnabled(Context context) {\n // Enter relevant functionality for when the first widget is created\n }", "public abstract Widget onInitialize();", "public abstract void initUiAndListener();", "private void initUI() {\n }", "private void initUI() {\n tvQuote = (TextView) findViewById(R.id.tvQuote);\n tvBeginButton = (TextView) findViewById(R.id.tvBeginButton);\n\n tvBeginButton.setOnClickListener(this);\n\n loadBackground();\n }", "@Override\n protected void windowInit ()\n {\n }", "public void onNew() {\t\t\n\t\tdesignWidget.addNewForm();\n\t}", "@Override\r\n\tprotected void initUI() {\n\r\n\t}", "private void dynInit()\r\n\t{\t\t\r\n\t\t//\tInfo\r\n\t\tstatusBar.setStatusLine(Msg.getMsg(Env.getCtx(), \"InOutGenerateSel\"));//@@\r\n\t\tstatusBar.setStatusDB(\" \");\r\n\t\t//\tTabbed Pane Listener\r\n\t\ttabbedPane.addChangeListener(this);\r\n\t}", "private void init() {\n setText(\"Case Name\");\n createFieldsComp();\n GuiUtil.addSeparator(shell, SWT.HORIZONTAL);\n createBottomActionButtons();\n }", "private void setUpWidgets(){\n\n }", "public void init()\n {\n buildUI(getContentPane());\n }", "@Override\n\tprotected void initAddButton() {\n addBtn = addButton(\"newBtn\", TwlLocalisationKeys.ADD_BEAT_TYPE_TOOLTIP, new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tnew AddEditBeatTypePanel(true, null, BeatTypesList.this).run(); // adding\n\t\t\t\t}\n\t }); \t\t\n\t}", "private void initiateInternal() {\n\n //define adaptation listener\n this.addComponentListener(new ComponentAdapter() {\n @Override\n public void componentResized(ComponentEvent e) {\n adapt(e);\n }\n });\n\n //solve problem with unloading of internal components\n setExtendedState(ICONIFIED | MAXIMIZED_BOTH);\n //the set visible must be the last thing called \n pack();\n setExtendedState(MAXIMIZED_BOTH);\n setVisible(true);\n }", "@Override\n public void Create() {\n\n initView();\n }", "public void onStart() {\r\n\t\tthis.setVisible(true);\r\n\t}", "private void initUI()\r\n\t{\r\n\t\tthis.label = new Label();\r\n\t\t\r\n\t\tthis.label.setText(\"This view is also saveable\");\r\n\t\t\r\n\t\tthis.label.setSizeUndefined();\r\n\t\tthis.add(this.label);\r\n\t\tthis.setSizeFull();\r\n\t}", "protected void onPostInitUI() {\n if (hasPositiveButton()) {\n getPositiveButton().addClickHandler(new ClickHandler() {\n\n @Override\n public void onClick(ClickEvent event) {\n onPositiveButtonClicked();\n }\n });\n }\n if (hasNegativeButton()) {\n getNegativeButton().addClickHandler(new ClickHandler() {\n\n @Override\n public void onClick(ClickEvent event) {\n onNegativeButtonClicked();\n }\n });\n }\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "private GUIReminder() {\n\n initComponents();\n initOthers();\n\n }", "@Override\n\t\tpublic void postInit(){\n\t\tsuper.postInit();\n\t\tthis.buttonList.add(this.readDescription = new GuiButton(6, this.width - 110, 2, 100, 20, \"World Description\"));\n\t\tthis.readDescription.enabled = false;\n\t}", "private void init() {\n initView();\n setListener();\n }", "protected void initUI() {\n\r\n\t\t((Button) findViewById(R.id.project_site_start_wifiscan_button)).setOnClickListener(this);\r\n\r\n\t\t// ((Button) findViewById(R.id.project_site_calculate_ap_positions_button)).setOnClickListener(this);\r\n\r\n\t\t// ((Button) findViewById(R.id.project_site_add_known_ap)).setOnClickListener(this);\r\n\r\n\t\t((Button) findViewById(R.id.project_site_step_detect)).setOnClickListener(this);\r\n\t\t\r\n\t\t((ToggleButton) findViewById(R.id.project_site_toggle_autorotate)).setOnClickListener(this);\r\n\r\n\t\tmultiTouchView = ((MultiTouchView) findViewById(R.id.project_site_resultview));\r\n\t\tmultiTouchView.setRearrangable(false);\r\n\r\n\t\tmultiTouchView.addDrawable(map);\r\n\r\n\t\tif (site.getTitle().equals(ProjectSite.UNTITLED)) {\r\n\t\t\tshowDialog(DIALOG_TITLE);\r\n\t\t} else {\r\n\t\t\tif (freshSite) {\r\n\t\t\t\t// start configuration dialog\r\n\t\t\t\tshowDialog(DIALOG_FRESH_SITE);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "private void init() {\n LayoutInflater inflater = getActivity().getLayoutInflater();\n layout = inflater.inflate(R.layout.approvalaction_popup, null);\n showButton();\n bindButtonClick();\n }", "private void initGui() {\n initSeekBar();\n initDateFormatSpinner();\n GuiHelper.defineButtonOnClickListener(view, R.id.settings_buttonSave, this);\n\n }", "@Override\n\tpublic void initUi() {\n\t\tlayoutShowContact = currentView.findViewById(R.id.contact_layout_show);\n\t\tlayoutShowContact.setOnClickListener(clickListener);\n\t\tsetTitle(R.string.contact);\n\t}", "private void initFormCreateMode() {\n initSpinnerSelectionChamps();\n //TODO\n }", "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 initComponent() {\n\t\taddGrid();\n\t\taddToolBars();\n\t}", "private void initView() {\n TIMManager.getInstance().addMessageListener(this);\n initAdapter();\n initRefresh();\n }", "@Override\n public void initGUI() {\n\n }", "private void initial() {\n\t\tsetTitleTxt(getString(R.string.choose_game));\n\t\tLinearLayout contentView = (LinearLayout) findViewById(R.id.contentView);\n\t\tLinearLayout.LayoutParams params = new LinearLayout.LayoutParams(\n\t\t\t\tLayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);\n\t\tview = View.inflate(this, R.layout.user_choose_game, null);\n\t\tcontentView.addView(view, params);\n\t\tgameGrid = (GridView) view.findViewById(R.id.game_list);\n\t\tgameContent = (LinearLayout) view.findViewById(R.id.game_list_info);\n\t\tview.setVisibility(View.GONE);\n\t}", "protected void initControl() {\n\t\t\r\n\t}", "void initUI();", "public void onModuleLoad() { \n\t\tsingleton = this;\n\t\t\n\t\tdockPanel.setWidth(\"100%\");\n\t\tdockPanel.setSpacing(8);\n\t\t\n\t\tmenuBar.setVisible(false);\n\t\tmenuBar.setStyleName(\"menu\");\n\t\t\n\t\tflowPanel.setWidth(\"100%\");\n\t\tflowPanel.add(menuBar);\n\t\t\n\t\tstatusBar.setVisible(false);\n\t\tstatusBar.setStyleName(\"status\");\n\t\t\n\t\tflowPanel.add(statusBar);\n\t\t\n\t\tdockPanel.add(flowPanel,DockPanel.NORTH);\n\t\t\n\t\tloginPanel.setVisible(false);\n\t\tdockPanel.add(loginPanel,DockPanel.WEST);\n\t\t\n\t\tpublisherListPanel.setVisible(false);\n\t\tpublisherListPanel.setWidth(\"100%\");\n\t\tdockPanel.add(publisherListPanel,DockPanel.CENTER);\n\t\t\n\t\tRootPanel.get(\"publisher\").add(dockPanel);\n\t}", "@FXML\r\n private void initialize() {\r\n addButton.setOnAction(new EventHandler<ActionEvent>() {\r\n @Override\r\n public void handle(ActionEvent event) {\r\n handleOk();\r\n }\r\n });\r\n\r\n cancelButton.setOnAction(new EventHandler<ActionEvent>() {\r\n @Override\r\n public void handle(ActionEvent event) {\r\n handleCancel();\r\n }\r\n });\r\n }", "private void initUI() {\n // deal with toolbar\n setSupportActionBar(activityToolbar);\n if(getSupportActionBar() != null) {\n getSupportActionBar().setTitle(\"\");\n } else {\n Timber.w(\"Action bar is null? Strange behavior might occur\");\n }\n\n // deal with nav drawer\n drawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);\n drawerLayout.addDrawerListener(drawerListener);\n\n }", "public MainView() {\n initComponents();\n addWindowListener(new AreYouSure());\n }", "private void initComponent()\n {\n groupName = findViewById(R.id.groupName);\n groupId = findViewById(R.id.gId);\n groupAddress = findViewById(R.id.gAddress);\n groupDescription = findViewById(R.id.gDescription);\n bCreate = findViewById(R.id.bCreate);\n rPublic = findViewById(R.id.rSecret);\n fTime = findViewById(R.id.fTime);\n toolbar = findViewById(R.id.toolbar);\n setSupportActionBar(toolbar);\n calendar = Calendar.getInstance();\n progressBar = findViewById(R.id.progress);\n\n //set scrollview in description editText\n groupDescription.setOnTouchListener(new View.OnTouchListener() {\n @Override\n public boolean onTouch(View v, MotionEvent event) {\n if(v.getId() == R.id.txtNotice){\n v.getParent().requestDisallowInterceptTouchEvent(true);\n switch (event.getAction() & MotionEvent.ACTION_MASK){\n case MotionEvent.ACTION_UP:\n v.getParent().requestDisallowInterceptTouchEvent(false);\n break;\n }\n }\n return false;\n }\n });\n\n\n sharedPreferenceData = new SharedPreferenceData(this);\n currentUserName = sharedPreferenceData.getCurrentUserName();\n someMethod = new NeedSomeMethod(this);\n internetIsOn = new CheckInternetIsOn(this);\n dialogClass = new AlertDialogClass(this);\n }", "private void viewInit() {\n }", "private void initView(){\n\t\tinitSize();\n\t\tinitText();\n\t\tinitBackground();\n\t\tthis.setOnClickListener(this);\n\t\tthis.setOnLongClickListener(this);\n\t}", "@Override\n public void Create() {\n initView();\n initData();\n }", "@Override\n public void initView() {\n }", "private void initialize() {\r\n\r\n // add default buttons\r\n addButton(getToggleButton(),\"toggle\");\r\n addButton(getFinishButton(),\"finish\");\r\n addButton(getCancelButton(),\"cancel\");\r\n addActionListener(new ActionListener() {\r\n\r\n public void actionPerformed(ActionEvent e) {\r\n String cmd = e.getActionCommand();\r\n if(\"toggle\".equalsIgnoreCase(cmd)) change();\r\n else if(\"finish\".equalsIgnoreCase(cmd)) finish();\r\n else if(\"cancel\".equalsIgnoreCase(cmd)) cancel();\r\n }\r\n\r\n });\r\n\r\n }", "private void afterInitComponents() {\n \t\t\n \t}", "private void initProcess(){\n this.getScPanelFriends().getViewport().setOpaque(false);\n this.getScPanelTopics().getViewport().setOpaque(false);\n this.getCenterPanel().setSize(0,0);\n this.getEastPanel().setSize(1700,800);\n //Administrador inhabilitado por defecto hasta implementación\n this.getBtnAdmin().setEnabled(false);\n this.getMenuOption().setLocationRelativeTo(this);\n }", "public FirstNewFrame() {\n\t\tjbInit();\n\t}", "@Override\r\n\tpublic void initView() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void initView() {\n\t\t\r\n\t}", "@Override\n\tpublic void InitView() {\n\t\t\n\t}", "@Override \n protected void startup() {\n GretellaView view = new GretellaView(this);\n show( view );\n view.initView(); \n }", "public void installFirstDrawTrigger() {\n mFrameAdapter.getFrameContainer().getViewTreeObserver().addOnGlobalLayoutListener(\n mFirstDrawTrigger);\n }", "@Override\r\n protected void onFinishInflate() {\r\n initComponents();\r\n }", "public void onCreateClick(){\r\n\t\tmyView.advanceToCreate();\r\n\t}", "@Override\n\tprotected void initContentView() {\n\t\t\n\t}", "void init() {\n setVisible(true);\n\n }", "@Override\n\tpublic void initView() {\n\t\t\n\t}", "@Override\n\tprotected void initUIandEvent()\n\t{\n\t\tnew Handler(Looper.getMainLooper()).postDelayed(new Runnable() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tIntent i = new Intent(MainActivity.this, LiveRoomActivity.class);\n\t\t\t\t\ti.putExtra(ConstantApp.ACTION_KEY_CROLE, Constants.CLIENT_ROLE_AUDIENCE);\n\t\t\t\t\ti.putExtra(ConstantApp.ACTION_KEY_ROOM_NAME, \"channel_00_01\");\n\t\t\t\t\tstartActivity(i);\n\t\t\t\t\tMainActivity.this.finish();\n\t\t\t\t}\n\t\t}, 1000);\n\t\t//finish();\n\t}", "private static void initAndShowGUI() {\n }", "@Override\r\n\tprotected void initEvents() {\n\t\t\r\n\t}", "@Override\r\n \tpublic void start(AcceptsOneWidget panel, EventBus eventBus) {\n \t\tpanel.setWidget(view);\t\t\r\n \t}", "@Override\n protected void initView() {\n }", "@Override\n protected void initView() {\n }", "public void initGui()\n {\n StringTranslate var1 = StringTranslate.getInstance();\n int var2 = this.func_73907_g();\n\n for (int var3 = 0; var3 < this.options.keyBindings.length; ++var3)\n {\n this.controlList.add(new GuiSmallButton(var3, var2 + var3 % 2 * 160, this.height / 6 + 24 * (var3 >> 1), 70, 20, this.options.getOptionDisplayString(var3)));\n }\n\n this.controlList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168, var1.translateKey(\"gui.done\")));\n this.screenTitle = var1.translateKey(\"controls.minimap.title\");\n }", "protected void setupUI() {\n\n }", "@Override\r\n\tpublic void initEvent() {\n\r\n\t}", "@Override\r\n\tprotected void initView() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initView() {\n\t\t\r\n\t}", "private void initializeUI() {\n MedUtils.displayMedInfo(coverArt, playBinding.thumbIv, playBinding.titleTv,\n playBinding.subtitleTv, selectedMed);\n\n playBinding.playPauseBt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n switch (MediaPlayerService.getState()) {\n case Constants.STATE_PLAY:\n mediaPlayerService.pauseAction();\n break;\n case Constants.STATE_PAUSE:\n mediaPlayerService.playAction();\n break;\n case Constants.STATE_NOT_INIT:\n startMediaPlayerService();\n break;\n }\n }\n });\n\n playBinding.stopBt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n mediaPlayerService.stopAction();\n }\n });\n }", "private void initView() {\n\n }", "private void initDialog() {\n }", "private void inicialize() {\n\t\t\n\t\t/**\n\t\t * Labels e textField of the page:\n\t\t * Nome\n\t\t * Descrição\n\t\t */\n\n\t\tJLabel lblNome = new JLabel(\"Nome\");\n\t\tlblNome.setBounds(5, 48, 86, 28);\n\t\tlblNome.setFont(new Font(\"Dubai Light\", Font.PLAIN, 13));\n\t\tcontentPanel.add(lblNome);\n\t\t\n\t\tJLabel lblDescricao = new JLabel(\"Descrição\");\n\t\tlblDescricao.setBounds(5, 117, 86, 51);\n\t\tlblDescricao.setFont(new Font(\"Dubai Light\", Font.PLAIN, 13));\n\t\tcontentPanel.add(lblDescricao);\n\t\t\n\t\ttextFieldNome = new JTextField();\n\t\ttextFieldNome.setBounds(103, 45, 290, 35);\n\t\ttextFieldNome.setFont(new Font(\"Dubai Light\", Font.PLAIN, 13));\n\t\ttextFieldNome.setColumns(10);\n\t\tcontentPanel.add(textFieldNome);\n\t\t\n\t\ttextFieldDescricao = new JTextArea();\n\t\ttextFieldDescricao.setBackground(Color.WHITE);\n\t\ttextFieldDescricao.setLineWrap(true);\n\t\ttextFieldDescricao.setBounds(101, 118, 290, 193);\n\t\ttextFieldDescricao.setFont(new Font(\"Dubai Light\", Font.PLAIN, 13));\n\t\ttextFieldDescricao.setColumns(10);\n\t\tcontentPanel.add(textFieldDescricao);\n\n\t\t/**\n\t\t * Confirmation panel\n\t\t * Confirmation button\n\t\t * Cancellation button\n\t\t */\n\n\t\tpainelConfirmacaoSetup();\n\t}", "@Override\n public void setWidget(Object arg0)\n {\n \n }", "private void initialize() {\n this.setLayout(new CardLayout());\n this.setName(this.extension.getMessages().getString(\"spiderajax.options.title\"));\n \t if (Model.getSingleton().getOptionsParam().getViewParam().getWmUiHandlingOption() == 0) {\n \t \tthis.setSize(391, 320);\n \t }\n this.add(getPanelProxy(), getPanelProxy().getName()); \n \t}", "private void initialize() {\r\n //this.setVisible(true);\r\n \r\n\t // added pre-set popup menu here\r\n// this.add(getPopupFindMenu());\r\n this.add(getPopupDeleteMenu());\r\n this.add(getPopupPurgeMenu());\r\n\t}", "@Override\n public void initView() {\n\n }", "private void initializeWidgets() {\n resultTextView = findViewById(R.id.resultTextView);\n\n goBackButton = findViewById(R.id.goBackButton);\n goBackButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n finish();\n }\n });\n }", "@Override\r\n public void initControl() {\n \r\n }", "@Override\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t\tdisplayEvent();\n\t}", "public void setup() {\n self.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n // make dialog background unselectable\n self.setCanceledOnTouchOutside(false);\n }", "@Override protected void startup() {\n show(new FrontView());\n //show(new RestaurantManagementView(this));\n }", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t\tinitView();\n\t\tinitData();\n\t\tsetOnClick();\n\t\tdelete();\n\t}", "public void init() {\r\n this.getChildren().clear();\r\n \r\n setAlignment(Pos.TOP_CENTER);\r\n setVgap(10);\r\n setHgap(10);\r\n setPadding(new Insets(25, 25, 25, 25));\r\n \r\n descriptionField.setMaxWidth(250);\r\n \r\n add(titleLabel, 0, 0);\r\n add(titleField, 1, 0);\r\n \r\n add(descLabel, 0, 1);\r\n add(descriptionField, 1, 1);\r\n \r\n add(urlLabel, 0, 2);\r\n add(urlField, 1, 2);\r\n \r\n add(addLabel, 0, 3);\r\n add(addIntensityBox, 1, 3);\r\n \r\n add(moviesLabel, 0, 4);\r\n add(includesMoviesBox, 1, 4);\r\n \r\n add(showsLabel, 0, 5);\r\n add(includesShowsBox, 1, 5);\r\n \r\n add(loginLabel, 0, 6);\r\n add(requiresLoginBox, 1, 6);\r\n \r\n \r\n add(addMovieSiteButton, 1, 7);\r\n \r\n addMovieSiteButton.setOnAction(e -> {\r\n String name = titleField.getText();\r\n String desc = descriptionField.getText();\r\n String url = urlField.getText();\r\n \r\n String addText = addIntensityBox.getText();\r\n \r\n int addIntensity = Integer.parseInt(addText.isEmpty() ? \"0\" : addText );\r\n boolean movies = includesMoviesBox.isSelected();\r\n boolean shows = includesShowsBox.isSelected();\r\n boolean login = requiresLoginBox.isSelected();\r\n \r\n if (name.matches(\"(\\\\p{L}){4,}\") && url.matches(\"www\\\\.[a-z0-9A-Z]{2,}\\\\.[a-z]+\")) {\r\n new MovieSite(name, desc, url, addIntensity, movies, shows, login);\r\n \r\n controller.getMainAppView().onMovieSitesClick(new ActionEvent());\r\n } else {\r\n \r\n controller.alert(\"Chyba\", \"\", \"Vyplňte alespoň název (alespoň 4 znaky a bez mezer) a url stránky (ve tvaru www.[jméno].[doména]!\");\r\n }\r\n \r\n \r\n \r\n \r\n });\r\n }", "private void init()\n {\n btnUser.setOnAction(buttonHandler);\n btnHome.setOnAction(event -> changeScene(\"store/fxml/home/home.fxml\"));\n btnCategories.setOnAction(event -> changeScene(\"store/fxml/category/categories.fxml\"));\n btnTopApps.setOnAction(buttonHandler);\n btnPurchased.setOnAction(buttonHandler);\n btnMenu.setOnAction(buttonHandler);\n btnSearch.setOnAction(buttonHandler);\n btnFeatured.setOnAction(buttonHandler);\n\n itmLogout = new MenuItem(\"Logout\");\n itmAddApp = new MenuItem(\"Add app\");\n itmUsers = new MenuItem(\"Manage users\");\n itmCategories = new MenuItem(\"Manage categories\");\n\n itmAddApp.setOnAction(itemHandler);\n itmLogout.setOnAction(itemHandler);\n itmUsers.setOnAction(itemHandler);\n itmCategories.setOnAction(itemHandler);\n\n if (user.getId() != null)\n {\n btnMenu.setVisible(true);\n if (user.getAdmin())\n btnMenu.getItems().addAll(itmAddApp, itmCategories, itmUsers, itmLogout);\n else\n btnMenu.getItems().add(itmLogout);\n\n ImageView imageView = new ImageView(user.getPicture());\n imageView.setFitHeight(25);\n imageView.setFitWidth(25);\n\n btnUser.setText(user.getUsername());\n }\n else\n btnMenu.setVisible(false);\n }", "@Override\n\tprotected void initView() {\n\t\t\n\t}", "@Override\n\tprotected void initView() {\n\t\t\n\t}", "@Override\r\n\tpublic void widgetDefaultSelected(SelectionEvent e) {\n\t\t\r\n\t}", "@Override\n public void initGui()\n {\n super.initGui();\n }", "@Override\n public void onStart() {\n super.onStart();\n updateUI();\n }", "public startingMenu() {\r\n initComponents();\r\n }", "public abstract void onInit();", "@Override\n\tprotected void InitButtonListener() {\n\t\tLayoutTop.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tClickOption();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t}", "private void initialize() {\n\tif (setup == false) {\n\t elementList.add(new GUISlider());\n\t elementList.add(new GUIChart());\n\t elementList.add(new GUIStatsDisplay());\n\t elementList.add(new GUIPID());\n\t elementList.add(new GUITimer());\n\t elementList.add(new GUINumericUpDown());\n\t setup = true;\n\t}\n }", "public TodoGUI() {\r\n todoChooserGui();\r\n }", "public void initWidgets(){\n\n g = (Globals)getApplication();\n\n //Application\n context = this;\n res = context.getResources();\n\n //Objekt\n mannschaft = g.getMannschaft();\n statistik = new Statistik();\n statistikwerte = new Statistikwerte();\n isUpdate = getIntent().getExtras().getBoolean(\"Update\");\n\n //Input-Widgets\n heim = (RadioGroup) findViewById(R.id.radioHeimAuswärts);\n gegner = (EditText) findViewById(R.id.gegnerbezeichnung);\n spielerListView = new SwipeMenuEditDelete(this, mannschaft, (SwipeMenuListView)findViewById(R.id.spielerList), new Spieler(), R.layout.swipemenu_item, false, false, false, true);\n anlegen = (Button) findViewById(R.id.stati_Anlegen);\n\n //Variablen\n spieler = new ArrayList<Spieler>();\n kategorien = new ArrayList<Kategorie>();\n datum = new Date();\n\n }" ]
[ "0.715538", "0.7002158", "0.6855211", "0.66847444", "0.6628957", "0.6619105", "0.66157687", "0.6520471", "0.6480197", "0.6431846", "0.641436", "0.63807935", "0.63721234", "0.6347073", "0.63405263", "0.63396084", "0.6333276", "0.63222086", "0.63017315", "0.6289287", "0.62836015", "0.6283359", "0.62593704", "0.62120783", "0.6206465", "0.6203842", "0.6187872", "0.61733097", "0.6160458", "0.6155827", "0.6144275", "0.61442196", "0.61358833", "0.6135225", "0.6133366", "0.6133062", "0.6127421", "0.6126418", "0.61236787", "0.6116742", "0.61128294", "0.6110151", "0.60938793", "0.608378", "0.6077107", "0.60764706", "0.6075842", "0.6075371", "0.6075371", "0.60721546", "0.6069784", "0.6064686", "0.6062066", "0.6056229", "0.6054631", "0.6049548", "0.60493255", "0.6043036", "0.60396475", "0.60376173", "0.6028715", "0.60280144", "0.60280144", "0.60192245", "0.6014575", "0.6011432", "0.6011384", "0.6011384", "0.60079473", "0.60041994", "0.5997207", "0.59911823", "0.5986873", "0.5984791", "0.5982719", "0.59817773", "0.5980645", "0.5975888", "0.59741944", "0.59741944", "0.59741944", "0.59741944", "0.59741944", "0.59741944", "0.59685993", "0.59616184", "0.5961411", "0.59523654", "0.5946995", "0.59457797", "0.5945508", "0.5945508", "0.5943934", "0.5939491", "0.5933506", "0.5931528", "0.5929658", "0.5929432", "0.59248674", "0.59218025", "0.5919066" ]
0.0
-1
Enter relevant functionality for when the last widget is disabled
@Override public void onDisabled(Context context) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onDisabled(Context context) {\n // Enter relevant functionality for when the last widget is disabled\n }", "@Override\n public void onEnabled(Context context) {\n // Enter relevant functionality for when the first widget is created\n }", "@Override\n public void onDisabled() {\n }", "private void disableButtons()\r\n {\r\n }", "void outOfTime() {\r\n\r\n disableOptionButtons();\r\n }", "protected void onDisabled() {\n // Do nothing.\n }", "public void onDisable() {\r\n }", "public void updateDisabledButtons() {\n\t\t//at least 3 credits should be there for perform add max action\n\t\tif (obj.getCredit() < 3)\n\t\t\taddMax.setEnabled(false);\n\t\t//at least a credit should be there for perform add max action\n\t\tif (obj.getCredit() == 0)\n\t\t\taddOne.setEnabled(false);\n\t\tif (obj.getCredit() >= 3)\n\t\t\taddMax.setEnabled(true);\n\t\tif (obj.getCredit() > 0)\n\t\t\taddOne.setEnabled(true);\n\t}", "public void onDisable() {\n }", "public void onDisable() {\n }", "public void onDisable()\n {\n }", "public void onDisable() {\n }", "@Override\n public void onDisable() {\n }", "public abstract void onDisable();", "default void onDisable() {}", "@Override\n public void onDisable() {\n super.onDisable();\n running = false;\n }", "@Override\n\tpublic void onDisable() {\n\t\t\n\t}", "@Override\n\tpublic void onDisable() {\n\n\t}", "public void disableEndOfProductionButton(){\n this.endOfproductionButton.setEnabled(false);\n }", "@Override\r\n\tpublic void onDisable() {\n\t}", "public abstract void wgb_onDisable();", "@Override\n public void onDisabled(Context context) {\n SetAlarm(context,1,mywidget.class);\n\n }", "protected void updateEnabled() {\n\t\tFieldGroup control = getUIControl();\n\t\tif (control != null) {\n\t\t\tCollection<? extends IRidget> ridgets = getRidgets();\n\t\t\tfor (IRidget ridget : ridgets) {\n\t\t\t\tridget.setEnabled(isEnabled());\n\t\t\t}\n\t\t\tcontrol.setEnabled(isEnabled());\n\t\t}\n\t}", "private void unlockButton() {\n\t\tconversionPdf_Txt.setEnabled(true);\n\t\tavisJury.setEnabled(true);\n\t\tstatistique.setEnabled(true);\n bData.setEnabled(true);\n\t}", "private void disableComponents() {\r\n maintainSponsorHierarchyBaseWindow.btnChangeGroupName.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.btnCreateNewGroup.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.btnDelete.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.btnMoveDown.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.btnMoveUp.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.btnSave.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.btnPanel.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.btnPanel.setSelected(false);\r\n maintainSponsorHierarchyBaseWindow.mnuItmChangeGroupName.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.mnuItmCreateNewGroup.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.mnuItmDelete.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.mnuItmMoveDown.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.mnuItmMoveUp.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.mnuItmSave.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.mnuItmPanel.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.mnuItmPanel.setSelected(false);\r\n }", "@Override\n public void onEnabled(Context context) {\n Log.d(\"PS_WIDGET\", \"onEnabled reached\");\n }", "@Override\n\tpublic void onDisabled(Context context) \n\t{\n\t\tPackageManager pm = context.getPackageManager();\n\t\tpm.setComponentEnabledSetting(\n\t\t\t\tnew ComponentName(\"de.fhe\", \"MyAppWidgetProvider\"),\n\t\t\t\tPackageManager.COMPONENT_ENABLED_STATE_DISABLED, \n\t\t\t\tPackageManager.DONT_KILL_APP );\n\t}", "private void lockButton(){\n\t\tconversionPdf_Txt.setEnabled(false);\n\t\tavisJury.setEnabled(false);\n\t\tstatistique.setEnabled(false);\n\t\tbData.setEnabled(false);\n\t\tbDataTraining.setEnabled(false);\n\t\tbCompare.setEnabled(false);\n\t}", "@Override\n public void disableEndTurnButton() {\n gameboardPanel.disableEndTurnButton();\n }", "@Override\n \t\t\tpublic void widgetSelected(SelectionEvent e) {\n \t\t\t\tList<Pair<Text, Button>> texts = inputFields.get(fp);\n \t\t\t\ttexts.remove(pair);\n \t\t\t\tupdateState();\n \t\t\t\tremoveButton.dispose();\n \t\t\t\ttext.dispose();\n\t\t\t\taddButtons.get(fp).setEnabled(true);\n \t\t\t\tif (texts.size() == fp.getMinOccurrence())\n \t\t\t\t\tfor (Pair<Text, Button> otherPair : texts)\n \t\t\t\t\t\totherPair.getSecond().setEnabled(false);\n \n \t\t\t\t// do layout\n \t\t\t\t((Composite) getControl()).layout();\n \t\t\t\t// pack to make wizard smaller if possible\n \t\t\t\tgetWizard().getShell().pack();\n \t\t\t}", "public abstract void Disabled();", "private void setButtonDisabled() {\n final boolean areProjects = mainController.selectedOrganisationProperty().getValue().getProjects().size() > 0;\n final boolean areTeams = mainController.selectedOrganisationProperty().getValue().getTeams().size() > 0;\n //allocateTeamButton.setDisable(!(areProjects && areTeams));\n }", "public void handleApiDisabled() {\r\n\t\thandler.post(new Runnable(){\r\n\t\t\tpublic void run(){\r\n\t\t \tUtils.showMessageAndExit(SessionsList.this, getString(R.string.label_api_disabled));\r\n\t\t\t}\r\n\t\t});\t\t\t\t\r\n }", "String disabledButton();", "public void disablePanelInput() {\n\t\tif (!clickThem) {\r\n\t\t\ttxt_mssv.setText(\"\");\r\n\t\t\ttxt_mssv.setEnabled(false);\r\n\t\t\ttxt_hoten.setEnabled(false);\r\n\t\t\ttxt_hoten.setText(\"\");\r\n\t\t\tcomboSex.setEnabled(false);\r\n\t\t\ttxt_ntns.setText(\"\");\r\n\t\t\ttxt_ntns.setEnabled(false);\r\n\t\t\tbtn_nhap.setEnabled(false);\r\n\t\t} else {\r\n\t\t\ttxt_mssv.setEnabled(true);\r\n\t\t\ttxt_hoten.setEnabled(true);\r\n\t\t\tcomboSex.setEnabled(true);\r\n\t\t\ttxt_ntns.setEnabled(true);\r\n\t\t\tbtn_nhap.setEnabled(true);\r\n\t\t}\r\n\t}", "public void disableProductionButtons(){\n for(int i = 0; i < 3; i++){\n Gui.removeAllListeners(productionButtons[i]);\n productionButtons[i].addActionListener(new ActivateProductionListener(gui,productionButtons[i],i));\n productionButtons[i].setEnabled(false);\n }\n\n baseProductionPanel.disableButton();\n }", "@Override\n\tpublic void onDisable() {\n\t\tgetLogger().info(\"SimplyWrapper successfully disabled !\");\n\t}", "public void disable(){\r\n\t\tthis.activ = false;\r\n\t}", "private void disableButtons() {\n for (DeployCommand cmd : DeployCommand.values()){\n setButtonEnabled(cmd, false);\n }\n butDone.setEnabled(false);\n setLoadEnabled(false);\n setUnloadEnabled(false);\n setAssaultDropEnabled(false);\n }", "public void disableEndTurnButton(){\n\n this.endTurnButton.setEnabled(false);\n }", "public void onEnabled() {\r\n }", "public void onNotEnabled() {\n Timber.d(\"onNotEnabled\");\n // keep the callback in case they turn it on manually\n setTorPref(Status.DISABLED);\n createClearnetClient();\n status = Status.NOT_ENABLED;\n if (onStatusChangedListener != null) {\n new Thread(() -> onStatusChangedListener.notEnabled()).start();\n }\n }", "@Override\n public void valueChanged(ListSelectionEvent e) {\n if (!strategyList.isSelectionEmpty())\n playButton.setEnabled(true);\n }", "public void inhabilitaPanel() {\n\n\t\t//comboNombreCarta.setEnabled(false);\n\t\tjScrollPane1.setEnabled(false);\n\t\tjScrollPane1.getVerticalScrollBar().setEnabled(false);\n\t\tjScrollPane1.getHorizontalScrollBar().setEnabled(false);\n\t\tjScrollPane2.setEnabled(false);\n\t\tjScrollPane2.getVerticalScrollBar().setEnabled(false);\n\t\tjScrollPane2.getHorizontalScrollBar().setEnabled(false);\n\t\tlistaSeleccionadas.setEnabled(false);\n\t\tlistaDisponibles.setEnabled(false);\n\t\tlabelFondo.setEnabled(false);\n\t\ttextoNumeroCartas.setEnabled(false);\n\t\ttextoRaza.setEnabled(false);\n\t\tbotCargar.setEnabled(false);\n\t\tbotGuardar.setEnabled(false);\n\t\tbotGuardarComo.setEnabled(false);\n\t\tbotSalir.setEnabled(false);\n\t\tbotAyuda.setEnabled(false);\n\t\tbotNuevaBaraja.setEnabled(false);\n\t\ttextoBarajaCargada.setEnabled(false);\n\t\tthis.panelFondo.setEnabled(false);\n\t\tlabelImagen.setEnabled(false);\n this.NumeroPuntos.setEnabled(false);\n\n\t}", "public boolean isEnabled () {\r\n\tcheckWidget();\r\n\treturn getEnabled () && parent.isEnabled ();\r\n}", "private void updateEnabledState() {\n updateEnabledState(spinner, spinner.isEnabled()); }", "private void checkEnableDisable() {\n\t\tif (_trainingSet.getCount() > 0) {\n\t\t\t_saveSetMenuItem.setEnabled(true);\n\t\t\t_saveSetAsMenuItem.setEnabled(true);\n\t\t\t_trainMenuItem.setEnabled(true);\n\t\t} else {\n\t\t\t_saveSetMenuItem.setEnabled(false);\n\t\t\t_saveSetAsMenuItem.setEnabled(false);\n\t\t\t_trainMenuItem.setEnabled(false);\n\t\t}\n\n\t\tif (_currentTrainGrid == null) {\n\t\t\t_deleteGridMenuItem.setEnabled(true);\n\t\t} else {\n\t\t\t_deleteGridMenuItem.setEnabled(true);\n\t\t}\n\n\t\tif (_index > 0) {\n\t\t\t_leftGridMenuItem.setEnabled(true);\n\t\t\t_leftBtn.setEnabled(true);\n\t\t\t_firstGridMenuItem.setEnabled(true);\n\t\t\t_firstBtn.setEnabled(true);\n\t\t} else {\n\t\t\t_leftGridMenuItem.setEnabled(false);\n\t\t\t_leftBtn.setEnabled(false);\n\t\t\t_firstGridMenuItem.setEnabled(false);\n\t\t\t_firstBtn.setEnabled(false);\n\t\t}\n\n\t\tif (_index < _trainingSet.getCount() - 1) {\n\t\t\t_rightGridMenuItem.setEnabled(true);\n\t\t\t_rightBtn.setEnabled(true);\n\t\t\t_lastGridMenuItem.setEnabled(true);\n\t\t\t_lastBtn.setEnabled(true);\n\t\t} else {\n\t\t\t_rightGridMenuItem.setEnabled(false);\n\t\t\t_rightBtn.setEnabled(false);\n\t\t\t_lastGridMenuItem.setEnabled(false);\n\t\t\t_lastBtn.setEnabled(false);\n\t\t}\n\n\t\tif (_index >= _trainingSet.getCount()) {\n\t\t\t_indexLabel.setText(String.format(NEW_INDEX_LABEL, _trainingSet.getCount()));\n\t\t} else {\n\t\t\t_indexLabel.setText(String.format(INDEX_LABEL, _index + 1, _trainingSet.getCount()));\n\t\t}\n\n\t\t_resultLabel.setText(EMPTY_RESULT_LABEL);\n\t}", "private void disableInputs() {\n bulbPressTime.setEnabled(false);\n intervalTime.setEnabled(false);\n numTicks.setEnabled(false);\n startBtn.setEnabled(false);\n connStatus.setText(getString(R.string.StatusRunning));\n connStatus.setTextColor(getColor(R.color.green));\n }", "@Override\n public void disableEndOfProductionButton() {\n gameboardPanel.disableEndOfProductionButton();\n }", "protected void disableButtons() {\n if (mFalseButton.isPressed() || mTrueButton.isPressed())\n mFalseButton.setEnabled(false);\n mTrueButton.setEnabled(false);\n }", "public void inhabilitaPanel() {\n\t\t// contentPane.setEnabled(false);\n\t\tpanelPrincipal.setEnabled(false);\n\t\tpanelBotones.setEnabled(false);\n\t\tboton1Jugador.setEnabled(false);\n\t\tbotonJuegoRed.setEnabled(false);\n\t\tbotonEditar.setEnabled(false);\n\t\tbotonDemo.setEnabled(false);\n\t\tbotonReglas.setEnabled(false);\n\t\tbotonAyuda.setEnabled(false);\n\t\tbotonRecibir.setEnabled(false);\n\t\tbotonEnviar.setEnabled(false);\n\t\tbotonDescargaSobre.setEnabled(false);\n\t\tbotonSalir.setEnabled(false);\n\t\tlabelFondo.setEnabled(false);\n\t\tlabelDibujo.setEnabled(false);\n\n\t}", "@Override\n public void enableEndTurnButton() {\n gameboardPanel.enableEndTurnButton();\n }", "protected abstract void disable();", "private void deActivateButtons(){\n limiteBoton.setEnabled(false);\n derivadaBoton.setEnabled(false);\n integralBoton.setEnabled(false);\n}", "protected void whileDisable()\n\t{\n\n\t}", "public void enableEndOfProductionButton(){\n this.endOfproductionButton.setEnabled(true);\n }", "@FXML\n void disableHourly() {\n annualAddText.setDisable(false);\n managerRadio.setDisable(false);\n dHeadRadio.setDisable(false);\n directorRadio.setDisable(false);\n hourlyAddText.setDisable(true);\n }", "public void setDisabled() {\n\t\tdisabled = true;\n\t}", "public void disableButtons() {\n\t\t\r\n\t\tcapture.setEnabled(false);\r\n\t\tstop.setEnabled(false);\r\n\t\tfilter.setEnabled(false);\r\n\t\tsave.setEnabled(false);\r\n\t\t//load.setEnabled(false);\r\n\t}", "public void dama_DamaCloseButtonListener() {\n this.buttonDisabled = false;\n }", "@Override\n\t\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\t\t\tebar.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t\t\t\t\t\t\t\tesend.setVisibility(View.GONE);\n\t\t\t\t\t\t\t\t\t\t\t\t\tetopic.setEnabled(false);\n\t\t\t\t\t\t\t\t\t\t\t\t\tetext.setEnabled(false);\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\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}", "public Widget() {\n\t\tenabled = true;\n\t}" ]
[ "0.8324667", "0.66936314", "0.6632969", "0.6590516", "0.65348405", "0.6503779", "0.6500005", "0.6481272", "0.64199775", "0.64199775", "0.63905513", "0.63777363", "0.6373405", "0.6338429", "0.630844", "0.62827057", "0.62471", "0.62242955", "0.62146366", "0.62080747", "0.6201108", "0.61709094", "0.6104599", "0.6058021", "0.60551906", "0.6045964", "0.6041686", "0.6030131", "0.60231024", "0.60197717", "0.60184926", "0.6015299", "0.5999035", "0.5998961", "0.5990952", "0.59826654", "0.597735", "0.5977323", "0.5955284", "0.59354264", "0.5910098", "0.5909336", "0.59004164", "0.58990175", "0.5883039", "0.58812", "0.5877268", "0.5871307", "0.5848898", "0.5848581", "0.5841035", "0.5836575", "0.58363795", "0.5834862", "0.58303124", "0.58262", "0.5803186", "0.5788713", "0.57822496", "0.5775713", "0.5774406", "0.57701635" ]
0.57928157
91
Creates new form Project_Create_1
public Project_Create_Process() { initComponents(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@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}", "@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 Project_Create() {\n initComponents();\n }", "private void newProject()\n\t{\n\t\tnew FenetreCreationProjet();\n\t}", "@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 CreateProject() {\n\t\tsuper();\n\t}", "private void actionNewProject ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tDataController.scenarioNewProject();\r\n\r\n\t\t\thelperDisplayProjectFiles();\r\n\r\n\t\t\t//---- Change button icon\r\n\t\t\tImageIcon iconButton = FormUtils.getIconResource(FormStyle.RESOURCE_PATH_ICO_VIEW_SAMPLES);\r\n\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setIcon(iconButton);\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setActionCommand(FormMainHandlerCommands.AC_VIEW_SAMPLES_ON);\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setToolTipText(\"View detected samples\");\r\n\r\n\t\t\tmainFormLink.reset();\r\n\t\t}\r\n\t\tcatch (ExceptionMessage e)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(e);\r\n\t\t}\r\n\t}", "@PostMapping\n public ResponseEntity<Project> createNewProject(@Valid @RequestBody Project project) {\n\n Project project1 = projectService.saveOrUpdateProject(project);\n return new ResponseEntity<Project>(project1, HttpStatus.CREATED);\n }", "public NewProjectForm(String id, PageParameters param) {\r\n super(id);\r\n\r\n setModel(new CompoundPropertyModel(this));\r\n add(new TextField(\"projectName\"));\r\n add(new TextField(\"ownerName\"));\r\n add(new PasswordTextField(\"password\"));\r\n add(new TextField(\"svnUrl\"));\r\n add(new FeedbackPanel(\"errors\"));\r\n \r\n if (param.getBoolean(\"NoProject\")) {\r\n error(\"No project exists, please create one first.\");\r\n }\r\n }", "@ApiMethod(\n \t\tname = \"createProject\", \n \t\tpath = \"createProject\", \n \t\thttpMethod = HttpMethod.POST)\n public Project createProject(final ProjectForm projectForm) {\n\n final Key<Project> projectKey = factory().allocateId(Project.class);\n final long projectId = projectKey.getId();\n final Queue queue = QueueFactory.getDefaultQueue();\n \n // Start transactions\n Project project = ofy().transact(new Work<Project>(){\n \t@Override\n \tpublic Project run(){\n \t\tProject project = new Project(projectId, projectForm);\n ofy().save().entities(project).now();\n \n return project;\n \t}\n }); \n return project;\n }", "public void createProject(Project newProject);", "@RequestMapping(value = \"/create/project/{projectId}\", method = RequestMethod.GET)\r\n public ModelAndView create(@PathVariable(\"projectId\") String projectId) {\r\n ModelAndView mav = new ModelAndView(\"creates2\");\r\n int pid = -1;\r\n try {\r\n pid = Integer.parseInt(projectId);\r\n } catch (Exception e) {\r\n LOG.error(e);\r\n }\r\n User loggedIn = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\r\n User user = hibernateTemplate.get(User.class, loggedIn.getUsername());\r\n Project project = hibernateTemplate.get(Project.class, pid);\r\n if (!dataAccessService.isProjectAvailableToUser(project, user)) {\r\n return accessdenied();\r\n }\r\n List<SubProject> subProjects = dataAccessService.getResearcherSubProjectsForUserInProject(user, project);\r\n mav.addObject(\"projectId\", projectId);\r\n mav.addObject(\"methods\", project.getMethods());\r\n mav.addObject(\"subProjects\", subProjects);\r\n return mav;\r\n }", "@Override\n public void onClick(View view) {\n String projectName = etProjectName.getText().toString();\n String projectOwner = etProjectOwner.getText().toString();\n String projectDescription = etProjectDescription.getText().toString();\n long projectId = 0; // This is just to give some value. Not used when saving new project because auto-increment in DB for this value.\n\n\n // USerid and projectname are mandatory parameters\n if( userId != 0 && projectName != null) {\n newProject = new Project(projectId, userId, projectName, projectOwner, projectDescription);\n dbHelper.saveProject(newProject);\n// showToast(\"NewprojectId:\" + newProject.projectId+ \"-->UserId: \"+ userId + \"--> ProjectName\" + newProject.projectName +\"->Owner\"+newProject.projectOwner);\n dbHelper.close();\n\n // SIIRRYTÄÄN PROJEKTILISTAUKSEEN\n Intent newProjectList = new Intent( NewProject.this, ProjectListActivity.class);\n newProjectList.putExtra(\"userId\", userId);\n startActivity(newProjectList);\n }\n\n }", "private void newProject(ActionEvent x) {\n\t\tthis.controller.newProject();\n\t}", "@When(\"I click on the Create new Project\")\n public void i_click_on_the_create_new_project(){\n\n i_click_on_create_a_new_project();\n }", "public void newProjectAction() throws IOException {\n\t\tfinal FXMLSpringLoader loader = new FXMLSpringLoader(appContext);\n\t\tfinal Dialog<Project> dialog = loader.load(\"classpath:view/Home_NewProjectDialog.fxml\");\n\t\tdialog.initOwner(newProject.getScene().getWindow());\n\t\tfinal Optional<Project> result = dialog.showAndWait();\n\t\tif (result.isPresent()) {\n\t\t\tlogger.trace(\"dialog 'new project' result: {}\", result::get);\n\t\t\tprojectsObservable.add(result.get());\n\t\t}\n\t}", "Project createProject();", "Project createProject();", "Project createProject();", "@Override\n\tpublic void createProject(ProjectCreate project) {\n\t\tprojectDao.createProject(project);\n\t}", "public void saveNewProject(){\n String pn = tGUI.ProjectTextField2.getText();\n String pd = tGUI.ProjectTextArea1.getText();\n String statusID = tGUI.StatusComboBox.getSelectedItem().toString();\n String customerID = tGUI.CustomerComboBox.getSelectedItem().toString();\n\n int sstatusID = getStatusID(statusID);\n int ccustomerID = getCustomerID(customerID);\n\n try {\n pstat = cn.prepareStatement (\"insert into projects (project_name, project_description, project_status_id, customer_id) VALUES (?,?,?,?)\");\n pstat.setString(1, pn);\n pstat.setString(2,pd);\n pstat.setInt(3, sstatusID);\n pstat.setInt(4, ccustomerID);\n pstat.executeUpdate();\n\n }catch (SQLException ex) {\n Logger.getLogger(ProjectMethods.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Test (groups = {\"Functional\"})\n public void testAddProject() {\n //When\n CreateProject createProject = dashboard.clickCreateProjectButton();\n String projectName = \"TestProject\";\n String testAccount = \"Account1\";\n createProject.setProjectName(projectName);\n createProject.clickPublicProjectPrivacy();\n createProject.setAccountDropDown(testAccount);\n project = createProject.clickCreateProject();\n\n //Then\n assertEquals(PROJECT_NAME, project.getTitle());\n }", "private static boolean addNewProject() {\n\t\tString[] options = new String[] {\"Ongoing\",\"Finished\",\"Cancel\"};\n\t\tint choice = JOptionPane.showOptionDialog(frame, \"Select new project type\" , \"Add new Project\", \n\t\t\t\tJOptionPane.DEFAULT_OPTION, JOptionPane.PLAIN_MESSAGE, null, options, options[2]);\n\t\t\n\t\tNewProjectDialog dialog;\n\t\t\n\t\tswitch(choice) {\n\t\tcase 0:\n\t\t\tdialog = new NewProjectDialog(\"o\");\n\t\t\tdialog.setVisible(true);\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tdialog = new NewProjectDialog(\"f\");\n\t\t\tdialog.setVisible(true);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "@PostMapping(value = \"/project\", consumes = \"application/json\", produces = \"application/json\")\n public ResponseEntity<?> addNewProject(@Valid @RequestBody Project newProject) throws URISyntaxException\n {\n newProject.setProjectid(0);\n newProject = projectService.save(newProject);\n\n // set the location header for the newly created resource\n HttpHeaders responseHeaders = new HttpHeaders();\n URI newProjectURI = ServletUriComponentsBuilder.fromCurrentRequest()\n .path(\"/{projectid}\")\n .buildAndExpand(newProject.getProjectid())\n .toUri();\n responseHeaders.setLocation(newProjectURI);\n\n return new ResponseEntity<>(null, responseHeaders, HttpStatus.CREATED);\n }", "@SuppressWarnings(\"serial\")\n\tpublic ProjectPage() {\n\t\tagregarForm();\n\t}", "public void createProject(String nameProject, String nameDiscipline) throws \n InvalidDisciplineException,InvalidProjectException{\n int id = _person.getId();\n Professor _professor = getProfessors().get(id);\n _professor.createProject(nameProject, nameDiscipline);\n }", "public void addProj() {\n\t\tbtnAdd.click();\n\t}", "private IProject createNewProject() {\r\n\t\tif (newProject != null) {\r\n\t\t\treturn newProject;\r\n\t\t}\r\n\r\n\t\t// get a project handle\r\n\t\tfinal IProject newProjectHandle = mainPage.getProjectHandle();\r\n\r\n\t\t// get a project descriptor\r\n\t\tURI location = mainPage.getLocationURI();\r\n\r\n\t\tIWorkspace workspace = ResourcesPlugin.getWorkspace();\r\n\t\tfinal IProjectDescription description = workspace.newProjectDescription(newProjectHandle.getName());\r\n\t\tdescription.setLocationURI(location);\r\n\r\n\t\tlog.info(\"Project name: \" + newProjectHandle.getName());\r\n\t\t//log.info(\"Location: \" + location.toString());\r\n\t\t\r\n\t\t// create the new project operation\r\n\t\tIRunnableWithProgress op = new IRunnableWithProgress() {\r\n\t\t\tpublic void run(IProgressMonitor monitor)\r\n\t\t\t\t\tthrows InvocationTargetException {\r\n\t\t\t\tCreateProjectOperation op = new CreateProjectOperation(description, ResourceMessages.NewProject_windowTitle);\r\n\t\t\t\ttry {\r\n\t\t\t\t\top.execute(monitor, WorkspaceUndoUtil.getUIInfoAdapter(getShell()));\r\n\t\t\t\t} catch (ExecutionException e) {\r\n\t\t\t\t\tthrow new InvocationTargetException(e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// run the new project creation operation\r\n\t\ttry {\r\n\t\t\tgetContainer().run(true, true, op);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\tlog.error(\"Project creation failed.\");\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t} catch (InvocationTargetException e) {\r\n\t\t\tlog.error(\"Project creation failed.\");\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tnewProject = newProjectHandle;\r\n\r\n\t\treturn newProject;\r\n\t}", "@Test(alwaysRun=true)\n public void addProject() {\n driver.findElement(By.xpath(\"//ul[contains(@class, 'nav-tabs')]//li[3]\")).click();\n assertThat(driver.getTitle(), equalTo(\"Manage Projects - MantisBT\"));\n //Click \"Create New Projects\" button\n driver.findElement(By.xpath(\"//form//button[contains(@class, 'btn-primary')]\")).click();\n //Check fields on the \"Add Project\" view\t\"Project Name Status Inherit Global Categories View Status Description\"\n List<String> expCategory = Arrays.asList(new String[]{\"* Project Name\", \"Status\", \"Inherit Global Categories\",\n \"View Status\", \"Description\"});\n List<WebElement> category = driver.findElements(By.className(\"category\"));\n List<String> actCategory = new ArrayList<>();\n for (WebElement categories : category) {\n actCategory.add(categories.getText());\n }\n assertThat(actCategory, equalTo(expCategory));\n //Fill Project inforamtion\n driver.findElement(By.id(\"project-name\")).sendKeys(\"SB\");\n driver.findElement(By.id(\"project-description\")).sendKeys(\"new one\");\n //Add project\n driver.findElement(By.xpath(\"//input[@value='Add Project']\")).click();\n //delete Created class\n driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n driver.findElement(By.xpath(\"//tr//a[contains(text(),'SB')]\")).click();\n driver.findElement(By.xpath(\"//input[@value ='Delete Project']\")).click();\n driver.findElement(By.xpath(\"//input[@value ='Delete Project']\")).click();\n }", "public void clickCreate() {\n\t\tbtnCreate.click();\n\t}", "public String handleAdd() \n throws HttpPresentationException, webschedulePresentationException\n { \n\t try {\n\t Project project = new Project();\n saveProject(project);\n throw new ClientPageRedirectException(PROJECT_ADMIN_PAGE);\n\t } catch(Exception ex) {\n return showAddPage(\"You must fill out all fields to add this project\");\n }\n }", "public static Project createProject() throws ParseException {\n System.out.println(\"Please enter the project number: \");\n int projNum = input.nextInt();\n input.nextLine();\n\n System.out.println(\"Please enter the project name: \");\n String projName = input.nextLine();\n\n System.out.println(\"Please enter the type of building: \");\n String buildingType = input.nextLine();\n\n System.out.println(\"Please enter the physical address for the project: \");\n String address = input.nextLine();\n\n System.out.println(\"Please enter the ERF number: \");\n String erfNum = input.nextLine();\n\n System.out.println(\"Please enter the total fee for the project: \");\n int totalFee = input.nextInt();\n input.nextLine();\n\n System.out.println(\"Please enter the total amount paid to date: \");\n int amountPaid = input.nextInt();\n input.nextLine();\n\n System.out.println(\"Please enter the deadline for the project (dd/MM/yyyy): \");\n String sdeadline = input.nextLine();\n Date deadline = dateformat.parse(sdeadline);\n\n Person architect = createPerson(\"architect\", input);\n Person contractor = createPerson(\"contractor\", input);\n Person client = createPerson(\"client\", input);\n\n // If the user did not enter a name for the project, then the program will\n // concatenate the building type and the client's surname as the new project\n // name.\n\n if (projName == \"\") {\n String[] clientname = client.name.split(\" \");\n String lastname = clientname[clientname.length - 1];\n projName = buildingType + \" \" + lastname;\n }\n\n return new Project(projNum, projName, buildingType, address, erfNum, totalFee, amountPaid, deadline, contractor,\n architect, client);\n\n }", "public Project()\n {\n\n }", "public NewProjectDialog(String pt) {\n\t\t\t\n\t\t\tsuper(frame, \"Add new project\");\n\t\t\tresetFields();\n\t\t\tpType = pt;\n\t\t\t\n\t\t\tfinal JDialog npd = this;\n\t\t\t\n\t\t\tpSDate.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tpDeadline.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tpEndDate.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tpBudget.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tpTotalCost.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tpCompletion.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\t\n\t\t\tint x = frame.getLocation().x;\n\t\t\tint y = frame.getLocation().y;\n\t\t\t\n\t\t\tint pWidth = frame.getSize().width;\n\t\t\tint pHeight = frame.getSize().height;\n\t\t\t\n\t\t\tgetContentPane().setLayout(new BorderLayout());\n\t\t\t\n\t\t\tfinal JPanel fieldPanel = new JPanel();\n\t\t\t\n\t\t\tpCode.setText(portfolio.getNewCode());\n\t\t\tpCode.setEditable(false);\n\t\t\t\n\t\t\tif(pType.equals(\"o\")) {\n\t\t\t\tfieldPanel.setLayout(new GridLayout(7,3));\n\t\t\t\tSystem.out.println(\"ongoing\");\n\t\t\t\tthis.setPreferredSize(new Dimension(600,230));\n\t\t\t} else if(pType.equals(\"f\")) {\n\t\t\t\tfieldPanel.setLayout(new GridLayout(6,3));\n\t\t\t\tSystem.out.println(\"finished\");\n\t\t\t\tthis.setPreferredSize(new Dimension(600,200));\n\t\t\t}\n\t\t\tfieldPanel.add(new JLabel(\"Project Code :\"));\n\t\t\tfieldPanel.add(pCode);\n\t\t\tfieldPanel.add(msgCode);\t\t\n\t\t\tfieldPanel.add(new JLabel(\"Project Name :\"));\n\t\t\tfieldPanel.add(pName);\n\t\t\tfieldPanel.add(msgName);\n\t\t\tfieldPanel.add(new JLabel(\"Client :\"));\n\t\t\tfieldPanel.add(pClient);\n\t\t\tfieldPanel.add(msgClient);\n\t\t\tfieldPanel.add(new JLabel(\"Start date: \"));\n\t\t\tfieldPanel.add(pSDate);\n\t\t\tfieldPanel.add(msgSDate);\n\t\t\tmsgSDate.setText(DATE_FORMAT);\n\t\t\t\n\t\t\tif(pType.equals(\"o\")) {\n\t\t\t\tfieldPanel.add(new JLabel(\"Deadline :\"));\n\t\t\t\tfieldPanel.add(pDeadline);\n\t\t\t\tfieldPanel.add(msgDeadline);\n\t\t\t\tmsgDeadline.setText(DATE_FORMAT);\n\t\t\t\tfieldPanel.add(new JLabel(\"Budget :\"));\n\t\t\t\tfieldPanel.add(pBudget);\n\t\t\t\tfieldPanel.add(msgBudget);\n\t\t\t\tfieldPanel.add(new JLabel(\"Completion :\"));\n\t\t\t\tfieldPanel.add(pCompletion);\t\t\t\n\t\t\t\tfieldPanel.add(msgCompletion);\n\t\t\t\t\n\t\t\t} else if(pType.equals(\"f\")) {\n\t\t\t\tfieldPanel.add(new JLabel(\"End Date :\"));\n\t\t\t\tfieldPanel.add(pEndDate);\n\t\t\t\tfieldPanel.add(msgEndDate);\n\t\t\t\tmsgEndDate.setText(DATE_FORMAT);\n\t\t\t\tfieldPanel.add(new JLabel(\"Total Cost :\"));\n\t\t\t\tfieldPanel.add(pTotalCost);\n\t\t\t\tfieldPanel.add(msgTotalCost);\n\t\t\t}\n\t\t\t\n\t\t\tJPanel optionButtons = new JPanel();\n\t\t\toptionButtons.setLayout(new FlowLayout());\n\t\t\t\n\t\t\tJButton btnAdd = new JButton(\"Add\");\n\t\t\tbtnAdd.addActionListener(new ActionListener() {\n\n\t\t\t\t/**\n\t\t\t\t * Validates the information entered by the user and adds the project to the\n\t\t\t\t * Portfolio object if data is valid.\n\t\t\t\t */\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\n\t\t\t\t\tif(validateForm()) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tProject prj = compileProject();\n\t\t\t\t\t\tportfolio.add(prj,config.isUpdateDB());\n\t\t\t\t\t\tif(prj instanceof OngoingProject) {\n\t\t\t\t\t\t\tProjectTableModel tm = (ProjectTableModel) opTable.getModel();\n\t\t\t\t\t\t\ttm.addRow(prj.toTable());\n\t\t\t\t\t\t\topTable.setModel(tm);\n\t\t\t\t\t\t\tupdateCounters();\n\t\t\t\t\t\t\ttoggleSaved(false);\n\t\t\t\t\t\t\tsel.add(pCode.getText());\n\t\t\t\t\t\t} else if (prj instanceof FinishedProject) {\n\t\t\t\t\t\t\tProjectTableModel tm = (ProjectTableModel) fpTable.getModel();\n\t\t\t\t\t\t\ttm.addRow(prj.toTable());\n\t\t\t\t\t\t\tfpTable.setModel(tm);\n\t\t\t\t\t\t\tupdateCounters();\n\t\t\t\t\t\t\ttoggleSaved(false);\n\t\t\t\t\t\t\tsel.add(pCode.getText());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnpd.dispose();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t});\n\t\t\toptionButtons.add(btnAdd);\n\t\t\t\n\t\t\tJButton btnClose = new JButton(\"Close\");\n\t\t\tbtnClose.addActionListener(new ActionListener() {\n\n\t\t\t\t/* Closes the NewProjectDialog window. */\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tnpd.dispose();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t});\n\t\t\t\n\t\t\toptionButtons.add(btnClose);\n\t\t\tgetContentPane().add(new JLabel(\"Enter the data for your new \" + getPType(pType) + \" project:\"), BorderLayout.PAGE_START);\n\t\t\tthis.add(fieldPanel, BorderLayout.CENTER);\n\t\t\tthis.add(optionButtons, BorderLayout.PAGE_END);\n\n\t\t\tthis.pack();\n\t\t\t\t\t\n\t\t\tint width = this.getSize().width;\n\t\t\tint height = this.getSize().height;\n\t\t\t\n\t\t\tthis.setLocation(new Point((x+pWidth/2-width/2),(y+pHeight/2-height/2)));\n\t\t\tthis.setVisible(true);\n\t\t}", "public Long createProject(ProjectTo projectTo) {\n\t\tprojectTo = new ProjectTo();\n\t\tprojectTo.setOrg_id(1L);\n\t\tprojectTo.setOrg_name(\"AP\");\n\t\tprojectTo.setName(\"Menlo\");\n\t\tprojectTo.setShort_name(\"Pioneer Towers\");\n\t\tprojectTo.setOwner_username(\"Madhapur\");\n\n\t\ttry {\n\t\t\tWebResource webResource = getJerseyClient(userOptixURL + \"CreateProject\");\n\t\t\tprojectTo = webResource.type(MediaType.APPLICATION_JSON).post(ProjectTo.class, projectTo);\n\t\t\tif(projectTo != null && projectTo.getProject_id() != null) {\n\t\t\t\treturn projectTo.getProject_id() ;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error in getting the response from REST call CreateProject : \"+e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public Project() { }", "public Project() {\n\n }", "public CreateProjectPanel() {\n isFinished = true;\n }", "public void newProject(View V){\n Intent i = new Intent(this, NewProject.class);\n i.putExtra(\"course title\",courseTitle);\n startActivity(i);\n }", "@RequestMapping(\"/newProjectAppMajor\")\n\tpublic ModelAndView newProjectAppMajor() {\n\t\tModelAndView mav = new ModelAndView();\n\n\t\tmav.addObject(\"projectappmajor\", new ProjectAppMajor());\n\t\tmav.addObject(\"newFlag\", true);\n\t\tmav.setViewName(\"projectappmajor/editProjectAppMajor.jsp\");\n\n\t\treturn mav;\n\t}", "@PostMapping(\"/projects\")\n @Timed\n public ResponseEntity<ProjectDTO> createProject(@Valid @RequestBody ProjectDTO projectDto)\n throws URISyntaxException, NotAuthorizedException {\n log.debug(\"REST request to save Project : {}\", projectDto);\n var org = projectDto.getOrganization();\n if (org == null || org.getName() == null) {\n throw new BadRequestException(\"Organization must be provided\",\n ENTITY_NAME, ERR_VALIDATION);\n }\n checkPermissionOnOrganization(token, PROJECT_CREATE, org.getName());\n\n if (projectDto.getId() != null) {\n return ResponseEntity.badRequest()\n .headers(HeaderUtil.createFailureAlert(\n ENTITY_NAME, \"idexists\", \"A new project cannot already have an ID\"))\n .body(null);\n }\n if (projectRepository.findOneWithEagerRelationshipsByName(projectDto.getProjectName())\n .isPresent()) {\n return ResponseEntity.badRequest()\n .headers(HeaderUtil.createFailureAlert(\n ENTITY_NAME, \"nameexists\", \"A project with this name already exists\"))\n .body(null);\n }\n ProjectDTO result = projectService.save(projectDto);\n return ResponseEntity.created(ResourceUriService.getUri(result))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getProjectName()))\n .body(result);\n }", "@Test\n @org.junit.Ignore\n public void testProject_1()\n throws Exception {\n\n Project result = new Project();\n\n assertNotNull(result);\n assertEquals(null, result.getName());\n assertEquals(null, result.getWorkloadNames());\n assertEquals(null, result.getProductName());\n assertEquals(null, result.getComments());\n assertEquals(null, result.getCreator());\n assertEquals(0, result.getId());\n assertEquals(null, result.getModified());\n assertEquals(null, result.getCreated());\n }", "private boolean createProject() {\r\n ProjectOverviewerApplication app = (ProjectOverviewerApplication)getApplication();\r\n Projects projects = app.getProjects();\r\n String userHome = System.getProperty(\"user.home\");\r\n // master file for projects management\r\n File projectsFile = new File(userHome + \"/.hackystat/projectoverviewer/projects.xml\");\r\n \r\n // create new project and add it to the projects\r\n Project project = new Project();\r\n project.setProjectName(this.projectName);\r\n project.setOwner(this.ownerName);\r\n project.setPassword(this.password);\r\n project.setSvnUrl(this.svnUrl);\r\n for (Project existingProject : projects.getProject()) {\r\n if (existingProject.getProjectName().equalsIgnoreCase(this.projectName)) {\r\n return false;\r\n }\r\n }\r\n projects.getProject().add(project);\r\n \r\n try {\r\n // create the specific tm3 file and xml file for the new project\r\n File tm3File = new File(userHome + \r\n \"/.hackystat/projectoverviewer/\" + this.projectName + \".tm3\");\r\n File xmlFile = new File(userHome + \r\n \"/.hackystat/projectoverviewer/\" + this.projectName + \".xml\");\r\n tm3File.createNewFile();\r\n \r\n // initialize the data for the file\r\n SensorDataCollector collector = new SensorDataCollector(app.getSensorBaseHost(), \r\n this.ownerName, \r\n this.password);\r\n collector.getRepository(this.svnUrl, this.projectName);\r\n collector.write(tm3File, xmlFile);\r\n } \r\n catch (IOException e) {\r\n e.printStackTrace();\r\n return false;\r\n }\r\n // write the projects.xml file with the new project added\r\n String packageName = \"org.hackystat.iw.projectoverviewer.jaxb.projects\";\r\n return XmlConverter.objectToXml(projects, projectsFile, packageName);\r\n }", "private void createProjectGroup(Composite parent) {\n int col = 0;\n\n // project name\n String tooltip = \"The Android Project where the new resource file will be created.\";\n Label label = new Label(parent, SWT.NONE);\n label.setText(\"Project\");\n label.setToolTipText(tooltip);\n ++col;\n\n mProjectTextField = new Text(parent, SWT.BORDER);\n mProjectTextField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n mProjectTextField.setToolTipText(tooltip);\n mProjectTextField.addModifyListener(new ModifyListener() {\n public void modifyText(ModifyEvent e) {\n onProjectFieldUpdated();\n }\n });\n ++col;\n\n mProjectBrowseButton = new Button(parent, SWT.NONE);\n mProjectBrowseButton.setText(\"Browse...\");\n mProjectBrowseButton.setToolTipText(\"Allows you to select the Android project to modify.\");\n mProjectBrowseButton.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n onProjectBrowse();\n }\n });\n mProjectChooserHelper = new ProjectChooserHelper(parent.getShell(), null /*filter*/);\n ++col;\n\n col = padWithEmptyCells(parent, col);\n\n // file name\n tooltip = \"The name of the resource file to create.\";\n label = new Label(parent, SWT.NONE);\n label.setText(\"File\");\n label.setToolTipText(tooltip);\n ++col;\n\n mFileNameTextField = new Text(parent, SWT.BORDER);\n mFileNameTextField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n mFileNameTextField.setToolTipText(tooltip);\n mFileNameTextField.addModifyListener(new ModifyListener() {\n public void modifyText(ModifyEvent e) {\n validatePage();\n }\n });\n ++col;\n\n padWithEmptyCells(parent, col);\n }", "public void handleCreateProject(SelectEvent event) {\n\t}", "public Project() {\n\t\t\n\t}", "public void createProject(String name) {\n Project project = new Project(name);\n Leader leader = new Leader(this, project);\n project.addLeader(leader);\n }", "public static AddProject newInstance() {\n AddProject fragment = new AddProject();\n return fragment;\n }", "public Project() {\n\t}", "public Project() {\n\t}", "public PanelNewProject getNewProject(){\n return nuevoProyecto;\n }", "@Override\n\tpublic void createProjects(Projects proj) {\n\t\tString sql = \"INSERT INTO projects VALUES (?,?,?,?,?,?,now(),now(),?)\";\n\t\t\n\t\tthis.getJdbcTemplate().update(sql, new Object[] { \n\t\t\t\tproj.getProj_id(),\n\t\t\t\tproj.getProj_name(),\n\t\t\t\tproj.getProj_desc(),\n\t\t\t\tproj.getFile_id(),\n\t\t\t\tproj.getCus_id(),\n\t\t\t\tproj.getCretd_usr(),\n\t\t\t\tproj.getProj_currency()\n\t\t});\n\t\t\n\t\tUserDetailsApp user = UserLoginDetail.getUser();\n\t\t\n\t\tCustomer cus = new Customer();\n\t\tcus = getJdbcTemplate().queryForObject(\"select * from customer where cus_id=\"+proj.getCus_id(), new BeanPropertyRowMapper<Customer>(Customer.class));\n\t\tString file_name = \"\";\n\t\tif(proj.getFile_id() != 0){\n\t\t\tFileModel myFile = new FileModel();\n\t\t\tmyFile = getJdbcTemplate().queryForObject(\"select * from file where file_id=\"+proj.getFile_id(), new BeanPropertyRowMapper<FileModel>(FileModel.class));\n\t\t\tfile_name = myFile.getFile_name();\n\t\t}\n\t\t\n\t\tString audit = \"INSERT INTO audit_logging (aud_id,parent_id,parent_object,commit_by,commit_date,commit_desc,parent_ref) VALUES (default,?,?,?,now(),?,?)\";\n\t\tthis.getJdbcTemplate().update(audit, new Object[]{\n\t\t\t\t\n\t\t\t\tproj.getProj_id(),\n\t\t\t\t\"Projects\",\n\t\t\t\tuser.getUserModel().getUsr_name(),\n\t\t\t\t\"Created row on Projects name=\"+proj.getProj_name()+\", desc=\"+proj.getProj_desc()+\", file_name=\"+file_name\n\t\t\t\t+\", customer=\"+cus.getCus_code()+\", proj_currency=\"+proj.getProj_currency(),\n\t\t\t\tproj.getProj_name()\n\t\t});\n\t}", "private void setProject()\n\t{\n\t\tproject.setName(tf0.getValue().toString());\n \t\tproject.setDescription(tf8.getValue().toString());\n \t\tproject.setEndDate(df4.getValue());\n \t\tif (sf6.getValue().toString().equals(\"yes\"))project.setActive(true);\n \t\telse project.setActive(false);\n \t\tif (!tf7.getValue().toString().equals(\"\"))project.setBudget(Float.parseFloat(tf7.getValue().toString()));\n \t\telse project.setBudget(-1);\n \t\tproject.setNextDeadline(df5.getValue());\n \t\tproject.setStartDate(df3.getValue());\n \t\ttry \n \t\t{\n \t\t\t\tif (sf1.getValue()!=null)\n\t\t\t\tproject.setCustomerID(db.selectCustomerforName( sf1.getValue().toString()));\n\t\t}\n \t\tcatch (SQLException|java.lang.NullPointerException e) \n \t\t{\n \t\t\tErrorWindow wind = new ErrorWindow(e); \n \t UI.getCurrent().addWindow(wind);\t\t\n \t e.printStackTrace();\n\t\t\t}\n \t\tproject.setInserted_by(\"Grigoris\");\n \t\tproject.setModified_by(\"Grigoris\");\n \t\tproject.setRowversion(1);\n \t\tif (sf2.getValue()!=null)project.setProjectType(sf2.getValue().toString());\n \t\telse project.setProjectType(null);\n\t }", "public CreateProjectFrame(Model model, ButtonListener bL) {\r\n\r\n\t\tthis.setSize(450, 250);\r\n\t\tthis.setLocationRelativeTo(null);\r\n\t\tthis.setTitle(\"Create Project\");\r\n\r\n\t\tcPP = new CreateProjectPanel(model, bL);\r\n\r\n\r\n\t\tthis.add(cPP,BorderLayout.CENTER);\r\n\t\tshowIt();\r\n\t}", "private void addProjectTask(ActionEvent e) {\n Calendar dueDate = dueDateModel.getValue();\n String title = titleEntry.getText();\n String description = descriptionEntry.getText();\n Project parent = (Project) parentEntry.getSelectedItem();\n addProjectTask(title, description, parent, dueDate);\n }", "@Override\r\n\tpublic int insertProject(Project p) throws MyException {\n\t\tlogger.debug(\"프로젝트 생성전no:\"+p.getProjectNo());\r\n\t\tint result=dao.insertProject(session, p);\r\n\t\tif(result==0) {\r\n\t\t\tthrow new MyException(\"프로젝트 삽입에러\");\r\n\t\t}\r\n\t\tlogger.debug(\"프로젝트 생성후no:\"+p.getProjectNo());\r\n\t\t\r\n\t\tp.setProjectNo(p.getProjectNo());\r\n\t\tresult=dao.insertProjectMember(session,p);\r\n\t\t\r\n\t\tif(result==0){\r\n\t\t\tthrow new MyException(\"프로젝트멤버 삽입에러\");\r\n\t\t}\r\n\t\t\r\n\t\treturn result;\r\n\t}", "public Project(String name) {\n this.name = name;\n }", "public void moveToProjectFormActivity(Project project) {\n if (PropertyReader.getProperty(\"SUPER_APP_ID\")\n .equalsIgnoreCase(\"4ca24624-3841-3d1f-b499-44903cbe829c\") || PropertyReader.getProperty(\"SUPER_APP_ID\")\n .equalsIgnoreCase(\"9e49254b-d85e-11e9-beb7-b5d18d261495\") || PropertyReader.getProperty(\"SUPER_APP_ID\")\n .equalsIgnoreCase(\"6b31aba3-eb49-4fa4-8f3c-3f764b8d17e5\")) {\n // APAIMS\n Intent intent = new Intent(this, TabularFormActivity.class);\n intent.putExtra(Constants.PROJECT_FORM_INTENT_APP_ID, mAppId);\n intent.putExtra(Constants.PROJECT_FORM_INTENT_PROJECT_ID, project.mProjectId);\n intent.putExtra(Constants.PROJECT_FORM_INTENT_PROJECT_NAME, project.mProjectName);\n startActivity(intent);\n } else {\n Intent intent = new Intent(this, ProjectFormActivity.class);\n intent.putExtra(Constants.PROJECT_FORM_INTENT_APP_ID, mAppId);\n intent.putExtra(Constants.PROJECT_FORM_INTENT_PROJECT_ID, project.mProjectId);\n intent.putExtra(Constants.PROJECT_FORM_INTENT_PROJECT_NAME, project.mProjectName);\n if (project.mState.equalsIgnoreCase(\"New\")) {\n intent.putExtra(Constants.FORM_ACTION_TYPE, Constants.INSERT_FORM_KEY);\n } else {\n intent.putExtra(Constants.FORM_ACTION_TYPE, Constants.UPDATE_FORM_KEY);\n }\n intent.putExtra(Constants.PROJECT_LIST_GROUPING_ATTRIBUTE, mGroupingAttribute);\n intent.putExtra(Constants.PROJECT_LIST_GROUPING_ATTRIBUTE_VALUE, mGroupingAttributeValue);\n\n startActivity(intent);\n }\n }", "@RequestMapping(\"/newProjectAppMajorLabConstructApp\")\n\tpublic ModelAndView newProjectAppMajorLabConstructApp(@RequestParam Integer projectappmajor_id) {\n\t\tModelAndView mav = new ModelAndView();\n\t\tmav.addObject(\"projectappmajor_id\", projectappmajor_id);\n\t\tmav.addObject(\"labconstructapp\", new LabConstructApp());\n\t\tmav.addObject(\"newFlag\", true);\n\t\tmav.setViewName(\"projectappmajor/labconstructapp/editLabConstructApp.jsp\");\n\n\t\treturn mav;\n\t}", "@PostMapping(\"/project\")\n public Object doPost(@RequestBody ProjectLongId[] projectsLongId) throws PrimaryKeyViolationException, NoSuchFieldException, RequiredFieldMissingException {\n service.createAllProjects(projectsLongId);\n return new ResponseTemplate(true, null);\n }", "public void save(Project project) {\n\t\tcreate(project);\n\t}", "public ProjectsPage() {\n\t\tthis.driver = DriverManager.getDriver();\n\t\tElementFactory.initElements(driver, this);\n\t\t// sets the name of the project to add, with a random integer ending for slight\n\t\t// ease on multiple test runs\n\t\tnameOfProject = \"testz2018\" + (int) Math.random() * 500;\n\t}", "public boolean insertProject(Project project) throws EmployeeManagementException;", "private Project(){}", "public static Result add(Long project) {\n if(Secured.isMemberOf(project)) {\n Form<Task> taskForm = form(Task.class).bindFromRequest();\n if(taskForm.hasErrors()) {\n return badRequest();\n } else {\n return ok(\n \t\t\n //item.render(Note.create(taskForm.get(), project, folder), true)\n );\n }\n } else {\n return forbidden();\n }\n }", "public UploadProjectAction() {\n\t\tsuper();\n\t}", "public Project(String name){\n\t\tthis.pName = name;\n\t}", "@Override\n\tpublic Integer addProject(ProjectInfo project) {\n\t\treturn sqlSession.insert(\"cn.sep.samp2.project.addProject\", project);\n\t}", "private static void add_project() {\r\n\r\n\t\ttry (// Creates a connection and statement object\r\n\t\t\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/PoisedPMS\",\"poisedpms\",\"poisedpms\");\r\n\t\t\t\t\r\n\t\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\t\t\r\n\t\t\t){\r\n\t\t\t\r\n\t\t\t//List of building types\r\n\t\t\tString[] building_types = new String[] {\"House\", \"Apartment Block\", \"Commercial Property\", \"Industrial Property\", \"Agricultural Building\"};\r\n\t\t\t\r\n\t\t\t// Variables that are needed\r\n\t\t\tint project_id = 0;\r\n\t\t\tString project_name = \"\";\r\n\t\t\tString building_type = \"\";\r\n\t\t\tString physical_address = \"\";\r\n\t\t\tint erf_num = 0;\r\n\t\t\tString cust_surname = \"\";\r\n\t\t\tDate deadline_date = null;\r\n\t\t\tint charged = 0;\r\n\t\t\t\r\n\t\t\t// Allows for user input\r\n\t\t\tScanner input = new Scanner(System.in);\r\n\t\t\t\r\n\t\t\t//So first we need to select the correct customer\r\n\t\t\tString strSelect = \"SELECT * FROM people WHERE type = 'Customer'\";\r\n\t\t\tResultSet rset = stmt . executeQuery ( strSelect );\r\n\t\t\t\r\n\t\t\t// Loops through available customers from the people table so that the user can select one\r\n\t\t\tSystem.out.println(\"\\nSelect a customer for the project by typing the customers number.\");\r\n\t\t\t// This creates a list of customer ids to check that the user only selects an available one\r\n\t\t\tArrayList<Integer> cust_id_list = new ArrayList<Integer>(); \r\n\t\t\twhile (rset.next()) {\r\n\t\t\t\tSystem.out.println ( \r\n\t\t\t\t\t\t\"Customer Num: \" + rset.getInt(\"person_id\") + \", Fullname: \" + rset.getString(\"name\") + \" \" + rset.getString(\"surname\"));\r\n\t\t\t\tcust_id_list.add(rset.getInt(\"person_id\"));\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// This allows the user to select a customer\r\n\t\t\tBoolean select_cust = true;\r\n\t\t\tint customer_id = 0;\r\n\t\t\twhile (select_cust == true) {\r\n\t\t\t\tSystem.out.println(\"Customer No: \");\r\n\t\t\t\tString customer_id_str = input.nextLine();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tcustomer_id = Integer.parseInt(customer_id_str);\r\n\t\t\t\t\tfor (int i = 0; i < cust_id_list.size(); i ++) {\r\n\t\t\t\t\t\tif (customer_id == cust_id_list.get(i)) { \r\n\t\t\t\t\t\t\tselect_cust = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (select_cust == true) {\r\n\t\t\t\t\t\tSystem.out.println(\"Please only select an available customer id.\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t/**\r\n\t\t\t\t * @exception Throws exception if the users input for customer id is not a number\r\n\t\t\t\t */\r\n\t\t\t\tcatch(Exception e) {\r\n\t\t\t\t\t System.out.println(\"The customer number cannot contain letters or symbols. Please try again\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Prints out all available building types form the building type list\r\n\t\t\tSystem.out.print(\"Select a building type by typing the number: \\n\");\r\n\t\t\tfor (int i=0; i < 5; i ++) {\r\n\t\t\t\tSystem.out.println((i + 1) + \": \" + building_types[i]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// This allows the user to select a building type\r\n\t\t\tBoolean select_building = true;\r\n\t\t\tint building_index = 0;\r\n\t\t\twhile (select_building == true) {\r\n\t\t\t\tSystem.out.println(\"Building type no: \");\r\n\t\t\t\tString building_type_select_str = input.nextLine();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tbuilding_index = Integer.parseInt(building_type_select_str) - 1;\r\n\t\t\t\t\tbuilding_type = building_types[building_index];\r\n\t\t\t\t\tselect_building = false;\r\n\t\t\t\t}\r\n\t\t\t\t/**\r\n\t\t\t\t * @exception Throws exception if the users input for building type is not a number\r\n\t\t\t\t */\r\n\t\t\t\tcatch(Exception e) {\r\n\t\t\t\t\t System.out.println(\"The building type number cannot contain letters or symbols. Please try again\");\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// User gets to decide whether they want an automatically generated name.\r\n\t\t\tBoolean select_project_name = true;\r\n\t\t\twhile (select_project_name == true) {\r\n\t\t\t\tSystem.out.println(\"Would you like to have the project automatically named (y or n)?\");\r\n\t\t\t\tString customer_project_name_choice = input.nextLine();\r\n\t\t\t\tif (customer_project_name_choice.equals(\"y\")){\r\n\t\t\t\t\t// Gets the customers surname for the project name\r\n\t\t\t\t\tString strSelectCustSurname = String.format(\"SELECT surname FROM people WHERE person_id = '%s'\", customer_id);\r\n\t\t\t\t\tResultSet cust_surname_rset = stmt . executeQuery ( strSelectCustSurname );\r\n\t\t\t\t\twhile (cust_surname_rset.next()) {\r\n\t\t\t\t\t\tcust_surname = cust_surname_rset.getString(\"surname\");\r\n\t\t\t\t\t\tproject_name = building_type + \" \" + cust_surname;\r\n\t\t\t\t\t\tSystem.out.println(\"Project name: \" + project_name);\r\n\t\t\t\t\t\tselect_project_name = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (customer_project_name_choice.equals(\"n\")) {\r\n\t\t\t\t\tSystem.out.println(\"Provide project name: \");\r\n\t\t\t\t\tproject_name = input.nextLine();\r\n\t\t\t\t\tselect_project_name = false;\r\n\t\t\t\t}\r\n\t\t\t\tif (!customer_project_name_choice.equals(\"y\") && !customer_project_name_choice.equals(\"n\")){\r\n\t\t\t\t\tSystem.out.println(\"You can only select either y or n. Please try again\");\r\n\t\t\t\t\tselect_project_name = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// This allows the user to enter an erf number\r\n\t\t\tBoolean select_erf_num = true;\r\n\t\t\twhile (select_erf_num == true) {\r\n\t\t\t\tSystem.out.print(\"ERF number: \");\r\n\t\t\t\tString erf_num_str = input.nextLine();\r\n\t\t\t\ttry {\r\n\t\t\t\t\terf_num = Integer.parseInt(erf_num_str);\r\n\t\t\t\t\tselect_erf_num = false;\r\n\t\t\t\t}\r\n\t\t\t\t/**\r\n\t\t\t\t * @exception Throws exception if the users input for erf number is not a number\r\n\t\t\t\t */\r\n\t\t\t\tcatch(Exception e) {\r\n\t\t\t\t\t System.out.println(\"The erf number cannot contain letters or symbols. Please try again\");\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Allows the user to enter a physical address\r\n\t\t\tSystem.out.print(\"Physical Address: \");\r\n\t\t\tphysical_address = input.nextLine();\r\n\t\t\t\r\n\t\t\t// Allows the user to enter a date\r\n\t\t\tBoolean select_deadline_date = true;\r\n\t\t\twhile (select_deadline_date == true) {\r\n\t\t\t\tSystem.out.print(\"Deadline Date (YYYY-MM-DD): \");\r\n\t\t\t\tString deadline_date_str = input.nextLine();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tdeadline_date= Date.valueOf(deadline_date_str);\r\n\t\t\t\t\tselect_deadline_date = false;\r\n\t\t\t\t}\r\n\t\t\t\t/**\r\n\t\t\t\t * @exception Throws exception if the users input for deadline date is not in the correct format\r\n\t\t\t\t */\r\n\t\t\t\tcatch(Exception e) {\r\n\t\t\t\t\t System.out.println(\"The date must be in the format YYYY-MM-DD (eg. 2013-01-13). Please try again\");\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// This allows the user to enter a charged amount \r\n\t\t\tBoolean select_charged = true;\r\n\t\t\twhile (select_charged == true) {\r\n\t\t\t\tSystem.out.print(\"Total Cost: R \");\r\n\t\t\t\tString charged_str = input.nextLine();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tcharged = Integer.parseInt(charged_str);\r\n\t\t\t\t\tselect_charged = false;\r\n\t\t\t\t}\r\n\t\t\t\t/**\r\n\t\t\t\t * @exception Throws exception if the users input for the charged amount is not a number\r\n\t\t\t\t */\r\n\t\t\t\tcatch(Exception e) {\r\n\t\t\t\t\t System.out.println(\"The charged amount cannot contain letters or symbols. Please try again\");\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t\r\n\t\t\t// This adds all the values to a prepared statement to update the projects table\r\n PreparedStatement ps = conn.prepareStatement(\"INSERT INTO projects (project_name , building_type, physical_address, erf_num) VALUES(?,?,?,?)\");\r\n ps.setString(1, project_name);\r\n ps.setString(2, building_type);\r\n ps.setString(3, physical_address);\r\n ps.setInt(4, erf_num);\r\n \r\n // Executes the statement\r\n ps.executeUpdate();\r\n \r\n // This gets the created project's table id to use to update the people and project_statuses tables \r\n\t\t\tString strSelectProject = String.format(\"SELECT * FROM projects WHERE project_name = '%s'\", project_name);\r\n\t\t\tResultSet project_rset = stmt.executeQuery(strSelectProject);\r\n\t\t\twhile (project_rset.next()) {\r\n\t\t\t\tproject_id = project_rset.getInt(\"project_id\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// This adds all the values to a prepared statement to update the people table\r\n\t\t\tPreparedStatement ps_customer = conn.prepareStatement(\r\n\t\t\t\t\t\"UPDATE people SET projects = ? WHERE person_id = ?;\");\r\n\t\t\tps_customer.setInt(1, project_id);\r\n\t\t\tps_customer.setInt(2, customer_id);\r\n\t\t\tps_customer.executeUpdate();\r\n \r\n\t\t\t// This adds all the values to a prepared statement to update the project_statuses table\r\n PreparedStatement ps_status = conn.prepareStatement(\"INSERT INTO project_statuses (charged , deadline_date, project_id) VALUES(?,?,?)\");\r\n ps_status.setInt(1, charged);\r\n ps_status.setDate(2, deadline_date);\r\n ps_status.setInt(3, project_id);\r\n ps_status.executeUpdate();\r\n\r\n // Once everything has been added to the tables the project that has been added gets printed out\r\n\t\t\tResultSet project_added_rset = stmt.executeQuery(strSelectProject);\r\n\t\t\twhile (project_added_rset.next()){\r\n\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\t\"\\nProjects Added: \\n\" +\r\n\t\t\t\t\t\t\"Project Sys ID: \" + project_added_rset.getInt(\"project_id\") + \"\\n\"\r\n\t\t\t\t\t\t+ \"Project Name: \" + project_added_rset.getString(\"project_name\") + \"\\n\"\r\n\t\t\t\t\t\t+ \"Building Type: \" + project_added_rset.getString(\"building_type\") + \"\\n\"\r\n\t\t\t\t\t\t+ \"Physical Address: \" + project_added_rset.getString(\"physical_address\") + \"\\n\"\r\n\t\t\t\t\t\t+ \"Erf Number: \" + project_added_rset.getInt(\"erf_num\") + \"\\n\");\r\n\t\t\t}\r\n\t\t/**\r\n\t\t * @exception If any of the table entries cannot be created due to database constrains then the SQLException is thrown\r\n\t\t */\r\n\t\t} catch ( SQLException ex ) {\r\n\t\t\tex . printStackTrace ();\r\n\t\t}\r\n\t}", "public boolean addProject(Project p) {\n try {\n String insert = \"INSERT INTO PROJECTS\"\n + \"(CLIENT,DESCRIPTION,HOURS,STARTDATE,DUEDATE,INVOICESENT,CLIENT_ID,PROJECT_ID) \"\n + \"VALUES(?,?,?,?,?,?,?,PROJECTS_SEQ.NEXTVAL)\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(insert);\n ps.setString(1, p.getClientId());\n ps.setString(2, p.getDescription());\n ps.setString(3, p.getHours());\n ps.setString(4, p.getStartdate());\n ps.setString(5, p.getDuedate());\n ps.setString(6, p.getInvoicesent());\n ps.setString(7, p.getClientId());\n\n ps.executeUpdate();\n ps.close();\n return true;\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return false;\n }\n }", "public Project(String name, String description){\n this.name = name;\n this.description = description; \n }", "@Override\r\n\tpublic void addPages() {\n\t\tprojectPage = new NewProjectWizardPage();\r\n\t\taddPage(projectPage);\r\n\t}", "public String formCreated()\r\n {\r\n return formError(\"201 Created\",\"Object was created\");\r\n }", "@Test\n\tpublic void testCreate() throws Exception {\n\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\n\t\tDate startDate = new Date();\n\t\tCalendar calendar = new GregorianCalendar();\n\t\tcalendar.setTime(startDate);\n\t\tcalendar.add(Calendar.MONTH, 2);\n\t\t//\"name\":\"mizehau\",\"introduction\":\"dkelwfjw\",\"validityStartTime\":\"2015-12-08 15:06:21\",\"validityEndTime\":\"2015-12-10 \n\n\t\t//15:06:24\",\"cycle\":\"12\",\"industry\":\"1202\",\"area\":\"2897\",\"remuneration\":\"1200\",\"taskId\":\"TVRRME9UVTFPRE0zT0RBeU1EQXdNRFkyTVRnMU9EQTU=\"\n\t\tProject a = new Project();\n\t\tDate endDate = calendar.getTime();\n\t\tString name = \"mizehau\";\n\t\tString introduction = \"dkelwfjw\";\n\t\tString industry = \"1202\";\n\t\tString area = \"test闫伟旗创建项目\";\n\t\t//String document = \"test闫伟旗创建项目\";\n\t\tint cycle = 12;\n\t\tString taskId = \"TVRRME9UVTFPRE0zT0RBeU1EQXdNRFkyTVRnMU9EQTU=\";\n\t\tdouble remuneration = 1200;\n\t\tTimestamp validityStartTime = Timestamp.valueOf(sdf.format(startDate));\n\t\tTimestamp validityEndTime = Timestamp.valueOf(sdf.format(endDate));\n\t\ta.setArea(area);\n\t\ta.setName(name);\n\t\ta.setIntroduction(introduction);\n\t\ta.setValidityStartTime(validityStartTime);\n\t\ta.setValidityEndTime(validityEndTime);\n\t\ta.setCycle(cycle);\n\t\ta.setIndustry(industry);\n\t\ta.setRemuneration(remuneration);\n\t\ta.setDocument(taskId);\n\t\tProject p = projectService.create(a);\n\t\tSystem.out.println(p);\n\t}", "public static Project creer(String name){\n\t\treturn new Project(name);\n\t}", "public String actionCreateNew() {\r\n \t\tsetBook(new Book());\r\n \t\treturn \"new\";\r\n \t}", "public void saveAndCreateNew() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"saveAndCreateNewButton\").click();\n\t}", "public Project procreate(Project pud) throws IOException {\n\t\tString ur = url + \"/procreate\";\n\t\tProject us = restTemplate().postForObject(ur, pud, Project.class);\n\t\tSystem.out.println(us.toString());\n\t\t//UserDetails user = om.readValue(us,UserDetails.class);\n\t\treturn us;\n\t}", "@Test\n\tpublic void saveProjects() throws ParseException {\n\t\tproject.setEstimates(5);\n\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyyMMdd\");\n\t\tDate parsed = format.parse(\"20110210\");\n\t\tjava.sql.Date sql = new java.sql.Date(parsed.getTime());\n\t\tproject.setdRequested(sql);\n\t\tproject.setdRequired(sql);\n\t\tproject.setCritical(true);\n\t\tproject.setType(\"DOCSMANAGE\");\n\t\tProjectKeyContacts contacts = new ProjectKeyContacts();\n\t\tcontacts.setEmail(\"assdasd.gmail.com\");\n\t\tcontacts.setFname(\"sdsd\");\n\t\tcontacts.setLname(\"asdasd\");\n\t\tcontacts.setPhone(\"asd\");\n\t\tcontacts.setRole(\"asda\");\n\t\tcontacts.setTeam(\"saad\");\n\t\tproject.setContacts(contacts);\n\t\tProjectDetails det = new ProjectDetails();\n\t\tdet.setDescription(\"asdsd\");\n\t\tdet.setName(\"asd\");\n\t\tdet.setName(\"asdad\");\n\t\tdet.setSummary(\"asdd\");\n\t\tproject.setProjectDetails(det);\n\t\tproject.setType(\"DOCSMANAGE\");\n\t\tassertEquals(controller.saveProject(project).getStatusCode(), HttpStatus.CREATED);\n\t}", "public Project() {\n this.name = \"Paper plane\";\n this.description = \" It's made of paper.\";\n }", "@UiThreadTest\r\n public void testAddValidProject() {\n View addProjectValidateRequired = solo.getView(R.id.projectname_required);\r\n View addProjectValidateUnique = solo.getView(R.id.projectname_unique);\r\n assertEquals(\"The validation error message 'required' should be gone\", View.GONE, addProjectValidateRequired.getVisibility());\r\n assertEquals(\"The validation error message 'unique' should be gone\", View.GONE, addProjectValidateUnique.getVisibility());\r\n\r\n // Enter a project name and save\r\n EditText addProjectName = (EditText) solo.getView(R.id.projectname);\r\n solo.enterText(addProjectName, \"A custom project name\");\r\n ActionBar.clickMenuItem(R.id.menu_add_project_activity_save, solo.getCurrentActivity());\r\n solo.waitForDialogToClose(TestUtil.Time.FIVE_SECONDS);\r\n assertEquals(\"As the activity should be ended no views are expected to be found!\", 0, solo.getCurrentViews().size());\r\n }", "public project() {\n\n initComponents();\n }", "public boolean createProject(String name, String key) {\n List<NameValuePair> param = new ArrayList<>();\n param.add(new BasicNameValuePair(\"name\", name));\n param.add(new BasicNameValuePair(\"key\", key));\n Map<String, String> props = new HashMap<>();\n props.put(\"Authorization\", Authentication.getBasicAuth(\"sonar\"));\n String url = Host.getSonar() + \"api/projects/create\";\n try {\n Object[] response = HttpUtils.sendPost(url, param, props);\n if (Integer.parseInt(response[0].toString()) == 200) return true;\n } catch (Exception e) {\n logger.error(\"Create sonar project: POST request error.\", e);\n }\n return false;\n }", "FORM createFORM();", "public void add(View project){\n projects.add(project);\n }", "public void testNewJavaProject() {\n NewProjectWizardOperator.invoke().cancel();\n NewProjectWizardOperator npwo = NewProjectWizardOperator.invoke();\n // \"Standard\"\n String standardLabel = Bundle.getStringTrimmed(\"org.netbeans.modules.java.j2seproject.ui.wizards.Bundle\", \"Templates/Project/Standard\");\n npwo.selectCategory(standardLabel);\n // \"Java Application\"\n String javaApplicationLabel = Bundle.getStringTrimmed(\"org.netbeans.modules.java.j2seproject.ui.wizards.Bundle\", \"template_app\");\n npwo.selectProject(javaApplicationLabel);\n npwo.next();\n NewJavaProjectNameLocationStepOperator npnlso = new NewJavaProjectNameLocationStepOperator();\n npnlso.txtProjectName().setText(SAMPLE_PROJECT_NAME);\n npnlso.txtProjectLocation().setText(System.getProperty(\"netbeans.user\")); // NOI18N\n npnlso.btFinish().pushNoBlock();\n npnlso.getTimeouts().setTimeout(\"ComponentOperator.WaitStateTimeout\", 120000);\n npnlso.waitClosed();\n // wait project appear in projects view\n new ProjectsTabOperator().getProjectRootNode(SAMPLE_PROJECT_NAME);\n\n //disable the compile on save:\n ProjectsTabOperator.invoke().getProjectRootNode(SAMPLE_PROJECT_NAME).properties();\n // \"Project Properties\"\n String projectPropertiesTitle = Bundle.getStringTrimmed(\"org.netbeans.modules.java.j2seproject.ui.customizer.Bundle\", \"LBL_Customizer_Title\");\n NbDialogOperator propertiesDialogOper = new NbDialogOperator(projectPropertiesTitle);\n // select \"Compile\" category\n String buildCategoryTitle = Bundle.getStringTrimmed(\"org.netbeans.modules.java.j2seproject.ui.customizer.Bundle\", \"LBL_Config_BuildCategory\");\n String compileCategoryTitle = Bundle.getStringTrimmed(\"org.netbeans.modules.java.j2seproject.ui.customizer.Bundle\", \"LBL_Config_Build\");\n new Node(new Node(new JTreeOperator(propertiesDialogOper), buildCategoryTitle), compileCategoryTitle).select();\n // actually disable the quick run:\n String compileOnSaveLabel = Bundle.getStringTrimmed(\"org.netbeans.modules.java.j2seproject.ui.customizer.Bundle\", \"CustomizerCompile.CompileOnSave\");\n JCheckBox cb = JCheckBoxOperator.waitJCheckBox((Container) propertiesDialogOper.getSource(), compileOnSaveLabel, true, true);\n if (cb.isSelected()) {\n cb.doClick();\n }\n // confirm properties dialog\n propertiesDialogOper.ok();\n\n // wait classpath scanning finished\n PerfWatchProjects.waitScanFinished();\n }", "public void addProjectAction() throws IOException {\n\t\tfinal FXMLSpringLoader loader = new FXMLSpringLoader(appContext);\n\t\tfinal Dialog<Project> dialog = loader.load(\"classpath:view/Home_AddProjectDialog.fxml\");\n\t\tdialog.initOwner(addProject.getScene().getWindow());\n\t\tfinal Optional<Project> result = dialog.showAndWait();\n\t\tif (result.isPresent()) {\n\t\t\tlogger.trace(\"dialog 'add project' result: {}\", result::get);\n\t\t\tprojectsObservable.add(result.get());\n\t\t}\n\t}", "protected ProjectCreationDescriptor() {\n\t}", "public static void newProject() {\n\n //create the arena representation\n //populateBlocks();\n //populateSensors();\n }", "public int DSAddProject(String ProjectName, String ProjectLocation);", "public void newTask() {\r\n\r\n todoTaskGui(\"Create\", null);\r\n }", "public void createTask(){\n final String name = newTaskNameField.getText().toString();\n final String description = newTaskDescriptionField.getText().toString();\n\n if (name.isEmpty()){\n newTaskNameField.setText(\"Please Enter a name\");\n newTaskNameField.requestFocus();\n newTaskNameField.selectAll();\n return;\n }\n\n if (description.isEmpty()){\n newTaskDescriptionField.setText(\"Please Enter a Description\");\n newTaskDescriptionField.requestFocus();\n newTaskDescriptionField.selectAll();\n return;\n }\n\n if(!getValidDate(newtaskDateField.getText().toString())) {\n handleInvalidDate();\n return;\n }\n\n if(newTaskAssignee == null) {\n newTaskAssigneeField.setText(\"Please assign a user\");\n newTaskAssigneeField.selectAll();\n return;\n }\n\n TaskManager.sharedInstance().CreateTask(name, description, newTaskAssignee, DueDate, false);\n newTaskDialog.dismiss();\n }", "@Override\r\n protected void doCreate(boolean update) throws IOException, ServletException, Descriptor.FormException, InvalidProjectFileException {\r\n // Read the manage project file\r\n FileItem fileItem = getRequest().getFileItem(\"manageProject\");\r\n if (fileItem == null) {\r\n return;\r\n }\r\n\r\n manageFile = fileItem.getString();\r\n manageProject = new ManageProject(manageFile);\r\n manageProject.parse();\r\n\r\n getTopProject().setDescription(\"Top-level multi job to run the manage project: \" + getManageProjectName());\r\n String tmpLabel = getNodeLabel();\r\n if (tmpLabel == null || tmpLabel.isEmpty()) {\r\n tmpLabel = \"master\";\r\n }\r\n Label label = new LabelAtom(tmpLabel);\r\n getTopProject().setAssignedLabel(label);\r\n \r\n // Build actions...\r\n addSetup(getTopProject());\r\n // Add multi-job phases\r\n // Building...\r\n List<PhaseJobsConfig> phaseJobs = new ArrayList<>();\r\n \r\n projectsAdded = new ArrayList<>();\r\n projectsNeeded = new ArrayList<>();\r\n projectsExisting = new ArrayList<>();\r\n \r\n projectsAdded.add(getTopProject().getFullName());\n \r\n String baseName = getBaseName();\r\n if (getJobName() != null && !getJobName().isEmpty()) {\r\n baseName = getJobName();\r\n }\r\n\n String folderName = getTopProject().getParent().getFullName();\n if (folderName != null && !folderName.isEmpty()) {\n folderName = folderName + \"/\";\n }\n\n for (MultiJobDetail detail : manageProject.getJobs()) {\r\n String name = folderName + baseName + \"_\" + detail.getProjectName();\n projectsNeeded.add(name);\r\n PhaseJobsConfig phase = new PhaseJobsConfig(name, \r\n /*jobproperties*/\"\", \r\n /*currParams*/true, \r\n /*configs*/null, \r\n PhaseJobsConfig.KillPhaseOnJobResultCondition.NEVER, \r\n /*disablejob*/false, \r\n /*enableretrystrategy*/false, \r\n /*parsingrulespath*/null, \r\n /*retries*/0, \r\n /*enablecondition*/false, \r\n /*abort*/false, \r\n /*condition*/\"\", \r\n /*buildonly if scm changes*/false,\r\n /*applycond if no scm changes*/false);\r\n phaseJobs.add(phase);\r\n }\r\n MultiJobBuilder multiJobBuilder = new MultiJobBuilder(\"Build, Execute and Report\", phaseJobs, MultiJobBuilder.ContinuationCondition.COMPLETED);\r\n getTopProject().getBuildersList().add(multiJobBuilder);\r\n\r\n // Copy artifacts per building project\r\n for (MultiJobDetail detail : manageProject.getJobs()) {\r\n String name = folderName + baseName + \"_\" + detail.getProjectName();\n String tarFile = \"\";\r\n if (isUsingSCM()) {\r\n tarFile = \", \" + getBaseName() + \"_\" + detail.getProjectName() + \"_build.tar\";\r\n }\r\n CopyArtifact copyArtifact = new CopyArtifact(name);\r\n copyArtifact.setOptional(true);\r\n copyArtifact.setFilter(\"**/*_rebuild*,\" +\r\n \"execution/*.html, \" +\r\n \"management/*.html, \" +\r\n \"xml_data/**\" +\r\n tarFile);\r\n copyArtifact.setFingerprintArtifacts(false);\r\n BuildSelector bs = new WorkspaceSelector();\r\n copyArtifact.setSelector(bs);\r\n getTopProject().getBuildersList().add(copyArtifact);\r\n }\r\n addMultiJobBuildCommand();\r\n \r\n // Post-build actions if doing reporting\r\n if (getOptionUseReporting()) {\r\n addArchiveArtifacts(getTopProject());\r\n addXunit(getTopProject());\r\n addVCCoverage(getTopProject());\r\n addGroovyScriptMultiJob();\r\n }\r\n \r\n getTopProject().save();\r\n \r\n for (MultiJobDetail detail : manageProject.getJobs()) {\r\n String name = baseName + \"_\" + detail.getProjectName();\n createProjectPair(name, detail, update);\r\n }\r\n }", "protected void saveProject(Project theProject)\n throws HttpPresentationException, webschedulePresentationException\n { \n\n String proj_name = this.getComms().request.getParameter(PROJ_NAME);\n String personID = this.getComms().request.getParameter(PERSONID);\n String password = this.getComms().request.getParameter(PASSWORD);\n String discrib = this.getComms().request.getParameter(DISCRIB);\n String indexnum = this.getComms().request.getParameter(INDEXNUM);\n String thours = this.getComms().request.getParameter(THOURS);\n String dhours = this.getComms().request.getParameter(DHOURS);\n String codeofpay = this.getComms().request.getParameter(CODEOFPAY);\n\nString contactname = this.getComms().request.getParameter(CONTACTNAME);\n\tString contactphone = this.getComms().request.getParameter(CONTACTPHONE);\n\tString contactemail = this.getComms().request.getParameter(CONTACTEMAIL);\n\tString billaddr1 = this.getComms().request.getParameter(BILLADDR1);\n\tString billaddr2 = this.getComms().request.getParameter(BILLADDR2);\n\tString billaddr3 = this.getComms().request.getParameter(BILLADDR3);\n\tString city = this.getComms().request.getParameter(CITY);\n\tString state = this.getComms().request.getParameter(STATE);\n\tString zip = this.getComms().request.getParameter(ZIP);\n\t//String accountid = this.getComms().request.getParameter(ACCOUNTID);\n\t//String isoutside = this.getComms().request.getParameter(OUTSIDE);\n\t//String exp = this.getComms().request.getParameter(EXP);\n\tString expday = this.getComms().request.getParameter(EXPDAY);\n\tString expmonth = this.getComms().request.getParameter(EXPMONTH);\n\tString expyear = this.getComms().request.getParameter(EXPYEAR);\n\t\n\tString iexpday = this.getComms().request.getParameter(IEXPDAY);\n\tString iexpmonth = this.getComms().request.getParameter(IEXPMONTH);\n\tString iexpyear = this.getComms().request.getParameter(IEXPYEAR);\n\t\n\tString notes = this.getComms().request.getParameter(NOTES);\n\n String irbnum = this.getComms().request.getParameter(IRBNUM);\n\n System.out.println(\" Notes off save module \"+ notes);\n\nString notifycontact = this.getComms().request.getParameter(NOTIFYCONTACT);\n\n\njava.sql.Date moddatesql;\n //calculation for the time right now\n \tCalendar cancelinfo = Calendar.getInstance();\n \tint todaydate = cancelinfo.get(cancelinfo.DAY_OF_MONTH);\n \tint todaymonth = cancelinfo.get(cancelinfo.MONTH);\n\ttodaymonth= todaymonth+1;\n \tint todayyear = cancelinfo.get(cancelinfo.YEAR);\n\tString tempmod = todayyear+\"-\"+todaymonth+\"-\"+todaydate;\nmoddatesql=java.sql.Date.valueOf(tempmod);\n\njava.sql.Date iacucsql,didate;\n\nString tempiacuc = iexpyear+\"-\"+iexpmonth+\"-\"+iexpday;\niacucsql=java.sql.Date.valueOf(tempiacuc);\n//get old project information\n// Write to the modification file, format Date, Scanner, Who\n//Which project Header, Proj_name,Description, \n// Old project record\n//New project record\n\ndouble dthours;\n\n String dproj_name,dindex,dcname, dcphone, dfemail, dbilladdr1, dbilladdr3,dcity,dstate, dzip,dnemail;\nint dcode, dexpday, dexpmonth,dexpyear;\n\n\n//f.close(); \n try {\n dproj_name=theProject.getProj_name();\n \t dindex=theProject.getIndexnum();\n\t dthours=theProject.getTotalhours();\n\t dcode=theProject.getCodeofpay();\n\t dcname=theProject.getContactname();\n\t dcphone=theProject.getContactphone();\n\t dfemail=theProject.getFpemail();\n\t dbilladdr1=theProject.getBilladdr1();\n // theProject.setBilladdr2(theProject.getBilladdr2());\n dbilladdr3=theProject.getBilladdr3();\n \n dcity=theProject.getCity();\n dstate=theProject.getState();\n dzip=theProject.getZip();\n //theProject.setAccountid(theProject.getAccountid());\n dnemail=theProject.getNotifycontact();\n\t dexpday=theProject.getExpday();\n\t dexpmonth=\ttheProject.getExpmonth();\t\t\t \n\tdexpyear = theProject.getExpyear();\t\t\t\t \n\n\n\t \ndidate= theProject.getIACUCDate();\n\n } catch(Exception ex) {\n throw new webschedulePresentationException(\"Error adding project\", ex);\n } \n\n\n\nString s = \"\\n proj_name,TotalHours,SchEmail,Code,FCName,FCPhone,FCEmail,BillingAddress,Index,ExpDate,IRBDate\";\n\ntry {\nFileOutputStream f = new FileOutputStream (\"/home/emang/webschlog/projmodlog.txt\",true);\nfor (int i = 0; i < s.length(); ++i)\nf.write(s.charAt(i));\nString s2=\"\\n\"+dproj_name+\",\"+Double.toString(dthours)+\",\"+dnemail+\",\"+Integer.toString(dcode)+\",\"+dcname+\",\"+dcphone+\",\"+dfemail+\",\"+dbilladdr1+\" \"+dbilladdr3+\" \"+dcity+\" \"+dstate+\" \"+dzip+\",\"+dindex+\",\"+\",\";\nfor (int j = 0; j < s2.length(); ++j)\nf.write(s2.charAt(j));\nf.close();\n} catch (IOException ioe) {\n\tSystem.out.println(\"IO Exception\");\n\t}\n\t\n try {\n\tSystem.out.println(\" trying to saving a project one \"+ proj_name);\n theProject.setProj_name(proj_name);\n System.out.println(\" trying to saving a project one \"+ proj_name);\n theProject.setPassword( theProject.getPassword());\n\t theProject.setDescription(discrib);\n\t theProject.setIndexnum(indexnum);\n\t theProject.setTotalhours(Double.parseDouble(thours));\n\t theProject.setDonehours( theProject.getDonehours());\n theProject.setCodeofpay(Integer.parseInt(codeofpay));\n\t\n\t theProject.setContactname(contactname);\n\t theProject.setContactphone(contactphone);\n\t theProject.setFpemail(contactemail);\n\t theProject.setBilladdr1(billaddr1);\n theProject.setBilladdr2(theProject.getBilladdr2());\n\n theProject.setBilladdr3(billaddr3);\n theProject.setCity(city);\n theProject.setState(state);\n theProject.setZip(zip);\n theProject.setAccountid(theProject.getAccountid());\n theProject.setNotifycontact(notifycontact);\n\t theProject.setOutside(false);\n\t theProject.setExp(false);\n\t theProject.setInstitute(\"UCSD\");\n\t theProject.setNotes(notes);\ntheProject.setIRBnum(irbnum);\n\n//theProject.setCancredit(theProject.getCancredit());\n/*\t if(null != this.getComms().request.getParameter(OUTSIDE)) {\n \ttheProject.setOutside(true);\n \t } else {\n \ttheProject.setOutside(false);\n \t }\n if(null != this.getComms().request.getParameter(EXP)) {\n \ttheProject.setExp(true);\n \t } else {\n \ttheProject.setExp(false);\n\t\t\t \t }*/\n\t\t\t\t\t \n\t\t\t\t\t \ntheProject.setExpday(Integer.parseInt(expday));\ntheProject.setExpmonth(Integer.parseInt(expmonth));\ntheProject.setExpyear(Integer.parseInt(expyear));\n\n\t personID = theProject.getOwner().getHandle(); \n\t\ttheProject.setOwner(PersonFactory.findPersonByID(personID));\n\t\t\n//theProject.setOwner(theProject.getOwner());\n\n\ntheProject.setModDate(moddatesql);\n\ntheProject.setIACUCDate(iacucsql);\ntheProject.setModifiedby(this.getUser().getLastname());\n\n\n\nSystem.out.println(\" trying to saving a project two \"+ proj_name);\n\t theProject.save();\t\nSystem.out.println(\" trying to saving a project three \"+ proj_name);\n\t } catch(Exception ex) {\n throw new webschedulePresentationException(\"Error adding project\", ex);\n } \n }", "public IProject getNewProject() {\r\n\t\treturn newProject;\r\n\t}", "public SelectProjectWizardPage build() {\r\n return new SelectProjectWizardPage(this);\r\n }", "@When(\"5- the user creates a project with a valid name {string} identical to an existing project\")\n\tpublic void theUserCreatesAProjectWithNameIdenticalToAnExistisngProject(String projectName) throws ProjectNotFoundException, ProjectAlreadyExistsException, NotAuthorizedException, OutOfBoundsException {\n\t\tadmin.createProject(projectName);\n\t\ttry {\n\t\t\tadmin.createProject(projectName);\n\t\t}\n\t\tcatch(ProjectAlreadyExistsException e) {\n\t\t\terrorMessageHolder.setErrorMessage(e.getMessage());\n\t\t}\n\t}", "public AddProject() {\n try\n {\n infDB = new InfDB(\"\\\\Users\\\\Oliver\\\\Documents\\\\Skola\\\\Mini_sup\\\\Realisering\\\\MICEDB.FDB\");\n System.out.println(\"Uppkopplingen lyckades\");\n }\n catch(InfException e)\n {\n System.out.println(e.getMessage());\n }\n \n try\n {\n infDB = new InfDB(\"C:\\\\Users\\\\TP300LA-C4034\\\\Desktop\\\\Delkurs 4, Lill-supen\\\\InformatikDB\\\\MICEDB.FDB\");\n System.out.println(\"Uppkopplingen lyckades\");\n }\n catch(InfException e)\n {\n System.out.println(e.getMessage());\n }\n getPlatforms();\n initComponents();\n setLocationRelativeTo(null);\n \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}", "void createProject(IProjectDescription description, IProject proj,\n\t\t\tIProgressMonitor monitor) throws CoreException,\n\t\t\tOperationCanceledException {\n\t\ttry {\n\n\t\t\tmonitor.beginTask(\"\", 2000);\n\n\t\t\tproj.create(description, new SubProgressMonitor(monitor, 1000));\n\n\t\t\tif (monitor.isCanceled()) {\n\t\t\t\tthrow new OperationCanceledException();\n\t\t\t}\n\n\t\t\tproj.open(IResource.BACKGROUND_REFRESH, new SubProgressMonitor(\n\t\t\t\t\tmonitor, 1000));\n\n\t\t\t/*\n\t\t\t * Okay, now we have the project and we can do more things with it\n\t\t\t * before updating the perspective.\n\t\t\t */\n\t\t\tIContainer container = (IContainer) proj;\n\n\t\t\t/* Add an XHTML file */\n\t\t\t/*addFileToProject(container, new Path(\"index.html\"),\n\t\t\t\t\tJ15NewModel.openContentStream(\"Welcome to \"\n\t\t\t\t\t\t\t+ proj.getName(),\"5\"),monitor);*/\n\n\t\t\t/* Create the admin folder */\n\t\t\tfinal IFolder adminFolder = container.getFolder(new Path(\"admin\"));\n\t\t\tadminFolder.create(true, true, monitor);\n\t\t\t\n\t\t\tfinal IFolder adminModels = adminFolder.getFolder(new Path(\"models\"));\n\t\t\tadminModels.create(true, true, monitor);\n\t\t\t\n\t\t\tfinal IFolder adminControllers = adminFolder.getFolder(new Path(\"controllers\"));\n\t\t\tadminControllers.create(true, true, monitor);\n\t\t\t\n\t\t\tfinal IFolder adminViews = adminFolder.getFolder(new Path(\"views\"));\n\t\t\tadminViews.create(true, true, monitor);\n\t\t\t\n\t\t\tfinal IFolder adminTables = adminFolder.getFolder(new Path(\"tables\"));\n\t\t\tadminTables.create(true, true, monitor);\n\t\t\t\n\t\t\t/* Create the site folder */\n\t\t\tfinal IFolder siteFolder = container.getFolder(new Path(\"site\"));\n\t\t\tsiteFolder.create(true, true, monitor);\n\t\t\t\n\t\t\tfinal IFolder siteModels = siteFolder.getFolder(new Path(\"models\"));\n\t\t\tsiteModels.create(true, true, monitor);\n\t\t\t\n\t\t\tfinal IFolder siteViews = siteFolder.getFolder(new Path(\"views\"));\n\t\t\tsiteViews.create(true, true, monitor);\n\n\t\t\tInputStream resourceStream = this.getClass().getResourceAsStream(\n\t\t\t\t\t\"templates/blank-html.template\");\n\n\t\t\t/* Add blank HTML Files */\n\t\t\t\n\t\t\t/* Admin Folders first */\n\t\t\taddFileToProject(container, new Path(adminFolder.getName()\n\t\t\t\t\t+ Path.SEPARATOR + \"index.html\"),\n\t\t\t\t\tresourceStream, monitor);\n\t\t\t\n\t\t\tresourceStream.close();\n\t\t\tresourceStream = this.getClass().getResourceAsStream(\n\t\t\t\t\"templates/blank-html.template\");\n\t\t\t\n\t\t\taddFileToProject(container, new Path(adminFolder.getName()\n\t\t\t\t\t+ Path.SEPARATOR + adminModels.getName()\n\t\t\t\t\t+ Path.SEPARATOR + \"index.html\"),\n\t\t\t\t\tresourceStream, monitor);\n\t\t\t\n\t\t\tresourceStream.close();\n\t\t\tresourceStream = this.getClass().getResourceAsStream(\n\t\t\t\t\"templates/blank-html.template\");\n\t\t\t\n\t\t\taddFileToProject(container, new Path(adminFolder.getName()\n\t\t\t\t\t+ Path.SEPARATOR + adminControllers.getName()\n\t\t\t\t\t+ Path.SEPARATOR + \"index.html\"),\n\t\t\t\t\tresourceStream, monitor);\n\t\t\t\n\t\t\tresourceStream.close();\n\t\t\tresourceStream = this.getClass().getResourceAsStream(\n\t\t\t\t\"templates/blank-html.template\");\n\t\t\t\n\t\t\taddFileToProject(container, new Path(adminFolder.getName()\n\t\t\t\t\t+ Path.SEPARATOR + adminViews.getName()\n\t\t\t\t\t+ Path.SEPARATOR + \"index.html\"),\n\t\t\t\t\tresourceStream, monitor);\n\t\t\t\n\t\t\tresourceStream.close();\n\t\t\tresourceStream = this.getClass().getResourceAsStream(\n\t\t\t\t\"templates/blank-html.template\");\n\t\t\t\n\t\t\taddFileToProject(container, new Path(adminFolder.getName()\n\t\t\t\t\t+ Path.SEPARATOR + adminTables.getName()\n\t\t\t\t\t+ Path.SEPARATOR + \"index.html\"),\n\t\t\t\t\tresourceStream, monitor);\n\t\t\t\n\t\t\tresourceStream.close();\n\t\t\tresourceStream = this.getClass().getResourceAsStream(\n\t\t\t\t\"templates/blank-html.template\");\n\t\t\t\n\t\t\t/* Now the site folders */\n\t\t\taddFileToProject(container, new Path(siteFolder.getName()\n\t\t\t\t\t+ Path.SEPARATOR + \"index.html\"),\n\t\t\t\t\tresourceStream, monitor);\n\t\t\t\n\t\t\tresourceStream.close();\n\t\t\tresourceStream = this.getClass().getResourceAsStream(\n\t\t\t\t\"templates/blank-html.template\");\n\t\t\t\n\t\t\taddFileToProject(container, new Path(siteFolder.getName()\n\t\t\t\t\t+ Path.SEPARATOR + siteModels.getName()\n\t\t\t\t\t+ Path.SEPARATOR + \"index.html\"),\n\t\t\t\t\tresourceStream, monitor);\n\t\t\t\n\t\t\tresourceStream.close();\n\t\t\tresourceStream = this.getClass().getResourceAsStream(\n\t\t\t\t\"templates/blank-html.template\");\n\n\t\t\taddFileToProject(container, new Path(siteFolder.getName()\n\t\t\t\t\t+ Path.SEPARATOR + siteViews.getName()\n\t\t\t\t\t+ Path.SEPARATOR + \"index.html\"),\n\t\t\t\t\tresourceStream, monitor);\n\t\t\t\n\t\t\tresourceStream.close();\n\n\t\t\t/* All over! */\n\t\t} catch (IOException ioe) {\n\t\t\tIStatus status = new Status(IStatus.ERROR, \"J15Wizard\", IStatus.OK,\n\t\t\t\t\tioe.getLocalizedMessage(), null);\n\t\t\tthrow new CoreException(status);\n\t\t} finally {\n\t\t\tmonitor.done();\n\t\t}\n\t}" ]
[ "0.7674357", "0.7658407", "0.76272255", "0.7466209", "0.74608916", "0.72589517", "0.72484267", "0.7244838", "0.71651125", "0.7118057", "0.71134365", "0.70907766", "0.7014623", "0.69807017", "0.6910072", "0.68978965", "0.6823756", "0.6823756", "0.6823756", "0.68148625", "0.68104124", "0.67375237", "0.667523", "0.66179556", "0.6585705", "0.65753645", "0.6518109", "0.65145504", "0.64937305", "0.6487261", "0.6485886", "0.6452599", "0.6425906", "0.64063704", "0.63750696", "0.6362465", "0.6357018", "0.633831", "0.6332562", "0.63270897", "0.6320512", "0.6300248", "0.62679195", "0.6264906", "0.62352", "0.61646473", "0.6143734", "0.61196303", "0.61170715", "0.61170715", "0.6113198", "0.6095882", "0.6095375", "0.60822475", "0.6081829", "0.60554963", "0.6033366", "0.60075384", "0.6005879", "0.60054994", "0.60012585", "0.60007435", "0.5997009", "0.5993413", "0.5983865", "0.5967509", "0.59620553", "0.596122", "0.5958986", "0.5957999", "0.59564", "0.59436035", "0.59379774", "0.59339595", "0.5932141", "0.58983815", "0.58962667", "0.5888018", "0.5873911", "0.587146", "0.5868659", "0.5852832", "0.5852281", "0.5851537", "0.58482236", "0.58445776", "0.5828964", "0.5823153", "0.5822525", "0.5807576", "0.57914233", "0.57734084", "0.5772758", "0.57669395", "0.57648516", "0.5754406", "0.57436454", "0.5733342", "0.5729967", "0.57285243" ]
0.6688432
22
Test of getDefault method, of class LayersViewController.
@Test public void testGetDefault() { System.out.println("getDefault"); final LayersViewController instance1 = LayersViewController.getDefault(); final LayersViewController instance2 = LayersViewController.getDefault(); assertEquals(instance1, instance2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void defaultNetworkIsTestNetworkByDefault() {\n\t\t// Assert:\n\t\tAssert.assertThat(\n\t\t\t\tNetworkInfos.getDefault(),\n\t\t\t\tIsSame.sameInstance(NetworkInfos.getTestNetworkInfo()));\n\t}", "boolean isDefault();", "boolean isDefault();", "public boolean isDefault();", "@Override\n\tpublic ISpecies getDefault() {\n\t\treturn null;\n\t}", "public String getDefault();", "@Override\n\tpublic boolean isDefault() {\n\t\tComponent parentCmp = getParentComponent();\n\n\t\tif (parentCmp == null)\n\t\t\treturn false;\n\n\t\treturn equals(parentCmp.getDefaultRemoteCandidate());\n\t}", "String getDefaultValue();", "String getDefaultValue();", "public static ULocale getDefault() {\n/* 160 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test\n public void getDefaultValueForSetting_noPlatformPropertyForKeyDefined_propertyHasDefault()\n throws Throwable {\n clearAllPlatformSettings();\n\n runTX(new Callable<Void>() {\n @Override\n public Void call() throws Exception {\n String value = ldapSettingsMgmtSvc\n .getDefaultValueForSetting(SettingType.LDAP_CONTEXT_FACTORY);\n assertEquals(\"Returned value must correspond to default value\",\n SettingType.LDAP_CONTEXT_FACTORY.getDefaultValue(),\n value);\n return null;\n }\n });\n }", "public InterpolationMethod getDefault() {\n if (_default == null) {\n return InterpolationMethod.NEAREST_NEIGHBOR;\n } else {\n return _default;\n }\n }", "@Test\n public void testDefaults()\n {\n NearScheme scheme = new NearScheme();\n\n scheme.setBackScheme(new LocalScheme());\n\n assertNotNull(scheme.getServiceBuilder());\n assertEquals(\"auto\", scheme.getInvalidationStrategy(new NullParameterResolver()));\n }", "public boolean isDefault()\r\n\t{\treturn this.plugin.getClassManager().getDefaultClass().equals(this);\t}", "public void returnDefault();", "public static ULocale getDefault(Category category) {\n/* 169 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public Object getDefaultValue();", "public Object getDefaultValue();", "ParameterableElement getDefault();", "Object getDefaultLabel() {\n return null;\n }", "public boolean isDefault() {\r\n\treturn bgclip == border;\r\n }", "@Test\n\t public void testDefaultFatherMethodNum(){\n\t\t// fatherMethodNum default value should be 0\n\t\t assertEquals(1, check.getFatherMethodNum());\n\t }", "public boolean isIsDefault() {\n return isDefault;\n }", "protected void SetDefault() {\r\n\t\tBrickFinder.getDefault().setDefault();\t\t\r\n\t}", "public boolean isUsingDefaultConstructor() {\n return this.getMethodName() == null;\n }", "public ClassificationMethod getDefaultMethod() {\n\n return defaultMethod;\n\n }", "public ActivitedefaultController() {\n this.coastingDefaults = new ArrayList<>();\n }", "@Test\n public void test_getDefaultTab() {\n ActionTab value = ActionTab.ADMIN;\n instance.setDefaultTab(value);\n\n assertEquals(\"'getDefaultTab' should be correct.\",\n value, instance.getDefaultTab());\n }", "private boolean isDefault(int id) {\n return id == -1;\n }", "String getDefaultType();", "public String getDefault(){\n return _default;\n }", "@Test\n public void testGetDefaultValues()\n { \n assertThat(m_SUT.getDefaultValues(), is(m_DefaultValues));\n }", "protected void performDefaults() {\r\n\t}", "public Boolean get_is_default()\r\n\t{\r\n\t\treturn this.is_default;\r\n\t}", "private boolean isPageToolDefault(HttpServletRequest request)\n\t{\n\t\tif ( request.getPathInfo() != null && request.getPathInfo().startsWith(\"/helper/\") ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tString action = request.getParameter(RequestHelper.ACTION);\n\t\tif (action != null && action.length() > 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\tString pageName = request.getParameter(ViewBean.PAGE_NAME_PARAM);\n\t\tif (pageName == null || pageName.trim().length() == 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "@Override\n\tpublic boolean hasDefault()\n\t{\n\t\treturn (m_default != null);\n\t}", "@Override\r\n\tpublic ArrayList<PopUp> getPopUpDefault(String personId, Boolean Default) {\n\t\treturn null;\r\n\t}", "public boolean isDefault() {\n return m_Default;\n }", "@Test\n\t public void testDefaultFatherClassName(){\n\t\t String fatherClassNameReceived=check.getFatherClassName();\n\t\t // fatherClassName default value should be empty string\n\t\t assertEquals(\"\", fatherClassNameReceived);\n\t }", "private IBaseLabelProvider getRunningChainViewDefaultLP() {\n\t\tChainContentProvider cp = PlatformRepoService.getInstance().getContentProvider();\n\t\treturn new GraphLabelProvider(cp);\n\t}", "public boolean GetIsByDefault()\n {\n return this._defaultSpace;\n }", "@Override\n\tpublic String getInitialViewKml() {\n\t\treturn null;\n\t}", "public void testDefaultValue() {\n if(referenceDefault == null) {\n System.out.println(\"Default value of any reference variable is null!\");\n }\n }", "@Test\n public void test6() throws Throwable {\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem((Object) null);\n defaultMenuItem0.getRenderer();\n }", "private Default()\n {}", "@Test\n\tpublic void testDefaultKernel() {\n\t\t// The profile collector must not be null and the level must be \"min\"\n\t\tassertNotNull(profileCollector);\n\t\tassertSame(ProfileLevel.MIN, profileCollector.getDefaultProfileLevel());\n\t}", "public void initDefaultValues() {\n }", "@Test\n public void testDefaultDowngradesNoWildfly() throws Throwable {\n assumeThat(hasWildfly).isFalse();\n expectBound(Default, Default_JSSE);\n }", "public boolean isDefault() {\n return _default;\n }", "public void initDefaultValues(PathologyReportReviewParameter t)\r\n\t{\n\r\n\t}", "@Override public String getParamDefault(final String param) {\n final String common = getDrbdInfo().getParamSaved(param);\n if (common != null) {\n return common;\n }\n return getBrowser().getDrbdXML().getParamDefault(param);\n }", "@Test\n @DisplayName(\"Ensure default locale is null.\")\n public void testGetDefaultLocale() {\n assertNull(this.settings.getDefaultLocale());\n }", "public abstract String getDefaultRenderKitId();", "public Player getDefaultPlayer(){\n return jugPorDef;\n }", "public Integer getIsDefault() {\n return isDefault;\n }", "public Integer getIsDefault() {\n return isDefault;\n }", "public String getDefaultName()\r\n {\r\n System.out.println(\"returning default name: \" + m_default );\r\n return m_default;\r\n }", "@Test\n public void test9() throws Throwable {\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem((Object) null);\n defaultMenuItem0.setIndex(0);\n assertEquals(0, defaultMenuItem0.getIndex());\n assertEquals(true, defaultMenuItem0.isLeaf());\n }", "public void testDefaultFormat() {\n ThemeLayer tl = new ThemeLayer();\n assertTrue(tl.getFormat().equals(\"image/png\"));\n }", "boolean hasDefaultValue();", "public Image getDefault(int player, boolean ep) {if (player==1) return defaultImg1; else return defaultImg2;}", "public T getDefault() {\r\n return dflt;\r\n }", "public static OperatorChecker getDefault() {\n synchronized (MccMncConfig.class) {\n if (sChecker != null) {\n OperatorChecker operatorChecker = sChecker;\n return operatorChecker;\n }\n }\n }", "default boolean isConfigured(ConnectPoint connectPoint) {\n throw new NotImplementedException(\"isConfigured is not implemented\");\n }", "private void navigateToDefaultView() {\n\t\tif (navigator!=null && \"\".equals(navigator.getState())) {\n\t\t\t// TODO: switch the view to the \"dashboard\" view\n\t\t}\n\t}", "Object getDefaultValue(String key);", "public String getDefaultRuleSetName()\n/* */ {\n/* 1364 */ if ((this.defaultRuleSet != null) && (this.defaultRuleSet.isPublic())) {\n/* 1365 */ return this.defaultRuleSet.getName();\n/* */ }\n/* 1367 */ return \"\";\n/* */ }", "@Test\n public void getDefaultValueForSetting_platformPropertyForKeyDefined_propertyHasNoDefault()\n throws Throwable {\n runTX(new Callable<Void>() {\n @Override\n public Void call() throws Exception {\n createAndStorePlatformSetting(SettingType.LDAP_ATTR_LAST_NAME,\n \"Smith\");\n return null;\n }\n });\n\n runTX(new Callable<Void>() {\n @Override\n public Void call() throws Exception {\n String value = ldapSettingsMgmtSvc\n .getDefaultValueForSetting(SettingType.LDAP_ATTR_LAST_NAME);\n assertEquals(\n \"Returned value must be empty String so that property is linked to platform setting\",\n \"\", value);\n return null;\n }\n });\n }", "@Override\n\tpublic int getGameLayer() {\n\t\treturn 0;\n\t}", "String getDefaultFractionName();", "private MapOptions initDefaultMapOptions()\n\t{\n\t\tMapOptions options = new MapOptions();\n\t\toptions.removeDefaultControls();\n\t\toptions.setNumZoomLevels(16);\n\t\toptions.setDisplayProjection(new Projection(\"EPSG:4326\"));\n\t\treturn options;\n\t}", "@Test\n public void test11() throws Throwable {\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem((Object) null);\n int int0 = defaultMenuItem0.getDepth();\n assertEquals(0, int0);\n assertEquals(true, defaultMenuItem0.isLeaf());\n }", "public abstract String getDefaultGroup();", "protected void setToDefault(){\n\n\t}", "public void addDefaultLayers()\n\t{\n\t\t/**\n\t\t\t// Default OSM layers\n\t\t\tOSM mapnikOSM = OSM.Mapnik(\"Mapnik\");\n\t\t\tOSM cycleOSM = OSM.CycleMap(\"CycleMap\");\n\t\t\tmapnikOSM.setIsBaseLayer(true);\n\t\t\tcycleOSM.setIsBaseLayer(true);\n\t\t\tthis.openLayersMap.getMap().addLayer(mapnikOSM);\n\t\t this.openLayersMap.getMap().addLayer(cycleOSM);\n\t\t*/\n\t\t\n\t\t/**\n\t\t // Google Maps Tiles\n\t\t\t// Also in Blipnip.html insert: <script src=\"http://maps.google.com/maps/api/js?v=3&sensor=false\"></script>\n\t\t\t// or <script src=\"http://maps.google.com/maps/api/js?&sensor=false\"></script>\n\t\t\t// Keep in mind: http://gis.stackexchange.com/questions/51992/how-to-obtain-to-max-zoom-levels-for-google-layer-using-open-layers\n\t\t\t// and http://gis.stackexchange.com/questions/5964/how-to-apply-custom-google-map-style-in-openlayers\n\t\t\tGoogleV3Options gNormalOptions = new GoogleV3Options();\n\t\t\tgNormalOptions.setIsBaseLayer(true);\n\t\t\tgNormalOptions.setSmoothDragPan(false);\n\t\t\tgNormalOptions.setNumZoomLevels(17);\n\t\t\tgNormalOptions.setType(GoogleV3MapType.G_NORMAL_MAP);\n\t\t\tGoogleV3 gNormal = new GoogleV3(\"Google Normal\", gNormalOptions);\n\t this.openLayersMap.getMap().addLayer(gNormal);\n */\n\t\t\n\t\t/** \n\t\t // MapQuest - MapQuest-OSM Tiles - These are also free - Very good free alternative\n\t XYZOptions mapQuestOption = new XYZOptions();\n\t mapQuestOption.setIsBaseLayer(true);\n\t mapQuestOption.setNumZoomLevels(17);\n\t mapQuestOption.setSphericalMercator(true);\n\t String[] tiles = new String[4];\n\t tiles[0] = \"http://otile1.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.png\";\n\t tiles[1] = \"http://otile2.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.png\";\n\t tiles[2] = \"http://otile3.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.png\";\n\t tiles[3] = \"http://otile4.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.png\";\n\t XYZ mapQuest = new XYZ(\"mapQuest\",tiles, mapQuestOption);\n\t this.openLayersMap.getMap().addLayer(mapQuest);\n */\n\t\t\n\t\t/**\n // Openlayers, OpenStreetMaps blank and white - Free but do not zoom close enough\n\t XYZOptions bwOSMOption = new XYZOptions();\n\t bwOSMOption.setIsBaseLayer(true);\n\t bwOSMOption.setSphericalMercator(true);\n\t bwOSMOption.setNumZoomLevels(15);\n\t String[] bwOSMtiles = new String[2];\n\t bwOSMtiles[0] = \"http://a.www.toolserver.org/tiles/bw-mapnik/${z}/${x}/${y}.png\"; \n\t bwOSMtiles[1] = \"http://b.www.toolserver.org/tiles/bw-mapnik/${z}/${x}/${y}.png\";\n\t XYZ bwOSM = new XYZ(\"bwOSM\",bwOSMtiles, bwOSMOption);\n\t this.openLayersMap.getMap().addLayer(bwOSM); \n */\n\t\t\n\t\t/**\n\t\t\t// Unfortunately their policy has changed and will start charging from May 1st\n // CloudMade Tiles - Very good paid alternative, free 500,000 tile loads\n\t\t\t//String osmAtrribution = \"&copy; 2014 <a href=\\\"http://openstreetmap.org\\\">OpenStreetMap</a> contributors\";\n\t\t\t//String cloudMadeAttribution = \"Map data \" + osmAtrribution + \", &copy; 2014 <a href=\\\"http://cloudmade.com\\\">CloudMade</a>\";\n\t XYZOptions cloudMadeOption = new XYZOptions();\n\t cloudMadeOption.setIsBaseLayer(true);\n\t cloudMadeOption.setSphericalMercator(true);\n\t cloudMadeOption.setNumZoomLevels(19);\n\t cloudMadeOption.setTransitionEffect(TransitionEffect.RESIZE);\n\t //cloudMadeOption.setAttribution(cloudMadeAttribution);\n\t String[] cloudMadetiles = new String[3];\n\t cloudMadetiles[0] = \"http://a.tile.cloudmade.com/3295ec94195346989f8d67502c88e0ab/120472/256/${z}/${x}/${y}.png\"; //TODO - 256 for desktops, 64 for mobiles\n\t cloudMadetiles[1] = \"http://b.tile.cloudmade.com/3295ec94195346989f8d67502c88e0ab/120472/256/${z}/${x}/${y}.png\"; \n\t cloudMadetiles[2] = \"http://c.tile.cloudmade.com/3295ec94195346989f8d67502c88e0ab/120472/256/${z}/${x}/${y}.png\"; \n\t XYZ cloudMade = new XYZ(\"cloudMade\",cloudMadetiles, cloudMadeOption);\n\t this.openLayersMap.getMap().addLayer(cloudMade); \n\t */\n\t\t\n\t // MapBox is free for 3000 map loads - paid for more. Switching to this due to CloudMade's upcoming change of policy.\n\t\t\t// Nice and fairly cheap alternative. TileMill seems to be an awesome tool for complete map re-styling which\n\t\t\t// is a huge +. \n\t XYZOptions mapBoxOption = new XYZOptions();\n\t mapBoxOption.setIsBaseLayer(true);\n\t mapBoxOption.setSphericalMercator(true);\n\t mapBoxOption.setNumZoomLevels(19);\n\t mapBoxOption.setTransitionEffect(TransitionEffect.RESIZE);\n\t //mapBoxOption.setAttribution(cloudMadeAttribution);\n\t String[] mapBoxtiles = new String[3];\n\t mapBoxtiles[0] = \"http://a.tiles.mapbox.com/v3/thanos.hh91dmii/${z}/${x}/${y}.png\"; \n\t mapBoxtiles[1] = \"http://b.tiles.mapbox.com/v3/thanos.hh91dmii/${z}/${x}/${y}.png\"; \n\t mapBoxtiles[2] = \"http://c.tiles.mapbox.com/v3/thanos.hh91dmii/${z}/${x}/${y}.png\"; \n\t XYZ mapBox = new XYZ(\"mapBox\",mapBoxtiles, mapBoxOption);\n\t this.openLayersMap.getMap().addLayer(mapBox); \n\t \n\t \n\t}", "public void SetDefaultParams() {\n OCCwrapJavaJNI.BRepAlgo_NormalProjection_SetDefaultParams(swigCPtr, this);\n }", "public abstract String getDefaultFilter ();", "public static boolean getDefaultFilterState()\n {\n return defaults.filter_state;\n }", "public int getDefault(){\n return number;\n }", "boolean isDefaultFor(String javaFieldName);", "T getDefaultValue();", "AdPartner getAdDefaultPartner();", "private JButton defaultMap() {\n JButton defaultMap = new JButton(\"Default maps\");\n defaultMap.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n builder.defaultMap();\n window.setVisible(false);\n }\n });\n return defaultMap;\n }", "public Layer getActiveLayer() {\n\t\treturn null;\n\t}", "public Result testGetDefaultPropertyIndex() {\n try {\n if (beanInfo.getDefaultPropertyIndex() != -1) {\n throw new LocationException(\"mistake DefaultPropertyIndex\");\n }\n Bean1BeanInfo.verifyException();\n return passed();\n } catch (Exception e) {\n e.printStackTrace();\n return failed(e.getMessage());\n }\n }", "public void loadDefaultValues() {\r\n\t}", "public static void init() {\r\n try {\r\n defaultImplementation = new LinkLayer_Impl_PC();\r\n } catch (IOException e) {\r\n Log.e(TAG, e, \"Failed in creating defaultImplementation!\");\r\n }\r\n }", "public static DesignViewCreatorForExternal getDefault() {\n\t\tif(creator == null){\n\t\t\tcreator = new DesignViewCreatorForExternal();\n\t\t\tversions = new Hashtable();\n\t\t}\n\t\treturn creator;\n\t}", "@Test\n public void testGetOrDefault() {\n System.out.println(\"getOrDefault\");\n \n // GIVEN\n SimpleStyleableMap instance = new SimpleStyleableMap();\n \n // WHEN getOrDefault and no value has been put\n Object key = \"dummyKey\";\n Object defaultValue = \"defaultValue\";\n Object result = instance.getOrDefault(key, defaultValue);\n \n // THEN must return default value\n assertEquals(defaultValue, result);\n \n // WHEN getOrDefault and a value has been put\n Object putValue=\"putValue\";\n instance.put(key, putValue );\n result = instance.getOrDefault(key, defaultValue);\n \n // THEN must return put value\n assertEquals(putValue, result);\n \n // WHEN key is removed\n instance.remove(key);\n result = instance.getOrDefault(key, defaultValue);\n // THEN must return default value\n assertEquals(defaultValue, result);\n }", "public String getDefaultTarget() {\n return defaultTarget;\n }", "public int getDefaultPage()\n\t{\n\t\treturn defaultPage;\n\t}", "public abstract void initLayers();", "public boolean isDefaultChoice()\r\n\t{\r\n\t\treturn defaultChoice;\r\n\t}", "@Override\n\tpublic ActionResult defaultMethod(PortalForm form, HttpServletRequest request, HttpServletResponse response) {\n\t\treturn null;\n\t}", "String getDefaultPreference(String preferenceName) throws OntimizeJEERuntimeException;", "public static InfoPlugin getDefault() {\n return plugin;\n }", "@Test\n public void test5() throws Throwable {\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem((Object) null);\n defaultMenuItem0.getContained();\n assertEquals(true, defaultMenuItem0.isLeaf());\n }", "String getDefaultNull();", "public static NatpPlugin getDefault() {\r\n\t\treturn plugin;\r\n\t}", "@Test\n public void testGetDefaultUnit() {\n System.out.println(\"getDefaultUnit\");\n Temperature.Unit expResult = Temperature.Unit.CELSIUS;\n Temperature.Unit result = Temperature.getDefaultUnit();\n assertEquals(expResult, result);\n }" ]
[ "0.6521928", "0.6367873", "0.6367873", "0.6306391", "0.6063626", "0.60366744", "0.5813419", "0.58046323", "0.58046323", "0.57871664", "0.5697589", "0.5678384", "0.56731826", "0.56636053", "0.56552655", "0.565461", "0.5621173", "0.5621173", "0.56173426", "0.5610809", "0.55673975", "0.5521194", "0.55050415", "0.54961926", "0.5495668", "0.5473364", "0.5472131", "0.54556644", "0.5450613", "0.54328567", "0.54317373", "0.541323", "0.5405813", "0.53994393", "0.5396477", "0.53866744", "0.5363734", "0.5359008", "0.5352692", "0.53523076", "0.53420734", "0.5329752", "0.53208566", "0.5320541", "0.5313393", "0.53124416", "0.52948976", "0.52937084", "0.5292679", "0.52845925", "0.52812105", "0.5268123", "0.5257863", "0.5250729", "0.52333945", "0.52333945", "0.52306724", "0.5228406", "0.522479", "0.52139246", "0.52109045", "0.52049625", "0.5203315", "0.52033067", "0.51961577", "0.5188577", "0.51879376", "0.518644", "0.5183644", "0.5182972", "0.51787037", "0.5167773", "0.5165748", "0.5162719", "0.51620346", "0.5153729", "0.51512563", "0.51469594", "0.5146004", "0.5144958", "0.5140052", "0.51158774", "0.5107513", "0.510308", "0.50899917", "0.50856775", "0.5084355", "0.5082559", "0.50773853", "0.5075793", "0.50712854", "0.50699335", "0.5069837", "0.50652903", "0.5062823", "0.5061246", "0.50565654", "0.50563127", "0.5056282", "0.50498605" ]
0.780339
0
Verify that no elements are added to the graph when an empty graph is used
@Test public void testRemoveBitmaskFromElementsEmptyGraph() { System.out.println("removeBitmaskFromElements_EmptyGraph"); setupEmptyGraph(); final GraphManager gm = Mockito.mock(GraphManager.class); when(gm.getActiveGraph()).thenReturn(graph); // Create mock of DataAccessPane to return the query phase pane mock try (MockedStatic<GraphManager> mockedStatic = Mockito.mockStatic(GraphManager.class)) { mockedStatic.when(() -> GraphManager.getDefault()).thenReturn(gm); ReadableGraph rg = graph.getReadableGraph(); assertEquals(rg.getVertexCount(), 0); rg.close(); // remove bitmask from elements - nothing should be on layer 5 int currentIndex = 5; LayersViewController instance = LayersViewController.getDefault().init(null); instance.removeBitmaskFromElements(currentIndex); ReadableGraph rg2 = graph.getReadableGraph(); assertEquals(rg2.getVertexCount(), 0); rg2.close(); currentIndex = 1; instance.removeBitmaskFromElements(currentIndex); ReadableGraph rg3 = graph.getReadableGraph(); assertEquals(rg3.getVertexCount(), 0); rg3.close(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isEmpty()\n {\n return graph.isEmpty();\n }", "@Test\r\n void test_insert_null_vertex() {\r\n graph.addVertex(null);\r\n vertices = graph.getAllVertices();\r\n \r\n if(vertices.contains(null))\r\n fail();\r\n if(vertices.size() != 0 ||graph.order() != 0) {\r\n fail();\r\n }\r\n\r\n }", "@Override\n\tpublic boolean isEmpty()\n\t{\n\t\treturn nodeList.isEmpty() && edgeList.isEmpty();\n\t}", "@Override\r\n\tpublic boolean isEmpty() {\r\n\t\treturn vertices.isEmpty();\r\n\t}", "@Test\n public void getGraphNull() throws Exception {\n try (final Graph defaultGraph = dataset.getGraph(null).get()) {\n // TODO: Can we assume the default graph was empty before our new triples?\n assertEquals(2, defaultGraph.size());\n assertTrue(defaultGraph.contains(alice, isPrimaryTopicOf, graph1));\n // NOTE: wildcard as graph2 is a (potentially mapped) BlankNode\n assertTrue(defaultGraph.contains(bob, isPrimaryTopicOf, null));\n }\n }", "@Test\n void test00_checkInitialization() {\n if (graph.size() != 0 || graph.order() != 0) {\n fail(\"graph isn't initialized with correct variables\");\n }\n }", "@Override\n public boolean isEmpty() {\n return this.numNodes == 0;\n }", "public boolean isEmpty()\n\t{\n\t\treturn vertices.isEmpty();\n\t}", "@Override\r\n\tpublic boolean isEmpty() {\r\n\t\treturn getNumberOfNodes() == 0;\r\n\t}", "@Test\r\n void remove_nonexistent_vertex() {\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"B\", \"C\");\r\n graph.removeVertex(\"D\");\r\n List<String> adjacent;\r\n vertices = graph.getAllVertices(); \r\n // Check that graph has all added vertexes\r\n if(!vertices.contains(\"A\")| !vertices.contains(\"B\")|\r\n !vertices.contains(\"C\")) {\r\n fail();\r\n }\r\n adjacent = graph.getAdjacentVerticesOf(\"A\");\r\n if (!adjacent.contains(\"B\"))\r\n fail();\r\n adjacent = graph.getAdjacentVerticesOf(\"B\");\r\n if (!adjacent.contains(\"C\"))\r\n fail();\r\n \r\n }", "@Override\n\tpublic boolean isEmpty() {\n\t\tif(nodeCount == 0) return true;\n\t\telse return false;\n\t}", "public boolean isEmpty() {\n return vertexLayer.isEmpty();\n }", "@Test\n\tvoid testEdgesNotNull() {\n\t\tmap.put(\"Boston\", new LinkedHashSet<String>());\n\t\tAssertions.assertNotNull(map.get(\"Boston\"));\n\n\t}", "public boolean isEmpty()\n {\n return(nodes.isEmpty());\n }", "public boolean nothing() {\n return nodesNumber() == 0 && edgesNumber() == 0 && nonDirectionalEdgesNumber() == 0;\n }", "public void testRemoveAllVertices() {\n System.out.println(\"removeAllVertices\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n Assert.assertTrue(graph.removeAllVertices());\n Assert.assertEquals(graph.verticesSet().size(), 0);\n }", "@Test\r\n void remove_null() {\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"B\", \"C\");\r\n graph.removeVertex(null);\r\n List<String> adjacent;\r\n vertices = graph.getAllVertices(); \r\n // Check that graph has all added vertexes\r\n if(!vertices.contains(\"A\")| !vertices.contains(\"B\")|\r\n !vertices.contains(\"C\")) {\r\n fail();\r\n }\r\n adjacent = graph.getAdjacentVerticesOf(\"A\");\r\n if (!adjacent.contains(\"B\"))\r\n fail();\r\n adjacent = graph.getAdjacentVerticesOf(\"B\");\r\n if (!adjacent.contains(\"C\"))\r\n fail();\r\n \r\n }", "@Test\n void test03_addEdgeBetweenVerticesWhichDontExist() {\n graph.addEdge(\"a\", \"b\");\n Set<String> vertices = new LinkedHashSet<>();\n vertices.add(\"a\");\n vertices.add(\"b\"); // creates mock up vertex list\n if (!graph.getAllVertices().equals(vertices)) { // compares vertices list\n fail(\"Graph didn't add the vertices correctly\");\n }\n List<String> adjOfA = new ArrayList<>();\n adjOfA.add(\"b\"); // creates mock up adjacent list\n if (!graph.getAdjacentVerticesOf(\"a\").equals(adjOfA)) { // compares adjacent lists\n fail(\"Graph didn't correctly place adjacent vertices\");\n }\n }", "public boolean isEmpty()\n {\n return (numNodes == 0);\n }", "public void testRemoveAllEdges() {\n System.out.println(\"removeAllEdges\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n Assert.assertTrue(graph.removeAllEdges());\n Assert.assertEquals(graph.edgesSet().size(), 0);\n }", "@Test\n void test05_checkSize() {\n graph.addVertex(\"a\");\n graph.addVertex(\"b\");\n graph.addVertex(\"c\"); // adds three vertices\n graph.addEdge(\"a\", \"b\");\n graph.addEdge(\"b\", \"c\");\n graph.addEdge(\"c\", \"b\"); // add three edges\n if (graph.size() != 3) {\n fail(\"graph has counted incorrect number of edges\");\n }\n }", "public boolean isEmpty() {\n return neurons.isEmpty();\n }", "@Test(expected = OntoGraphException.class)\n public void testEmptyOntology() throws OntoGraphException {\n GraphRequestModel requestModel = createCustomGraphRequestModelWithDiffOntologyErrors(\"test.rdf\", \" \");\n controller.graph(requestModel);\n }", "@Test\r\n void create_edge_between_null_vertexes() {\r\n graph.addEdge(null, \"B\");\r\n graph.addEdge(\"A\", null);\r\n graph.addEdge(null, null);\r\n vertices = graph.getAllVertices();\r\n List<String> adjacentA = graph.getAdjacentVerticesOf(\"A\");\r\n List<String> adjacentB = graph.getAdjacentVerticesOf(\"B\");\r\n if(!vertices.isEmpty() | !adjacentA.isEmpty() | !adjacentB.isEmpty()) {\r\n fail();\r\n } \r\n }", "public boolean isPracticallyEmpty() {\n\treturn getDimension()==0 ||\n\t getDimension()==1 && id2label.elementAt(0).equals(DUMMY_LABEL);\n }", "@Test\r\n void test_insert_edges_remove_edges_check_size() {\r\n // Add two vertices with one edge\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"A\", \"C\");\r\n graph.addEdge(\"A\", \"D\");\r\n graph.addEdge(\"A\", \"E\");\r\n\r\n // There are no more edges in the graph\r\n if(graph.size() != 4) {\r\n fail();\r\n }\r\n graph.removeEdge(\"A\", \"B\");\r\n graph.removeEdge(\"A\", \"C\");\r\n graph.removeEdge(\"A\", \"D\");\r\n graph.removeEdge(\"A\", \"E\");\r\n if(graph.size() != 0) {\r\n fail();\r\n }\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"A\", \"C\");\r\n graph.addEdge(\"A\", \"D\");\r\n graph.addEdge(\"A\", \"E\");\r\n if(graph.size() != 4) {\r\n fail();\r\n }\r\n }", "@Test\n public void tae1()\n {\n Graph graph = new Graph(0);\n graph.addEdge(0,0);\n System.out.println(graph);\n assertEquals(\"Cannot add edges to a graph of size < 1\",\"Cannot add edges to a graph of size < 1\");\n }", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn bnetMap.size() == 0;\n\t}", "@Test\n\tvoid testVerticesAndEdgesIntanceVariableNotNull() {\n\t\tAssertions.assertNotNull(map);\n\n\t}", "public void testIsEmpty() {\n assertTrue(this.empty.isEmpty());\n assertFalse(this.stack.isEmpty());\n }", "@Test\n void test06_removeEdge_checkSize() {\n graph.addVertex(\"c\");\n graph.addEdge(\"a\", \"b\");\n graph.addEdge(\"b\", \"c\"); // adds two edges\n graph.removeEdge(\"a\", \"b\"); // removes one of the edges\n if (graph.size() != 1) {\n fail(\"graph has counted incorrect number of edges\");\n }\n }", "@Test\r\n public void testIsEmpty()\r\n {\r\n \tDoublyLinkedList<Integer> testDLL = new DoublyLinkedList<Integer>();\r\n \tassertTrue(testDLL.isEmpty());\r\n \ttestDLL.push(5);\r\n \tassertFalse(testDLL.isEmpty());\r\n }", "@Override\n public boolean isEmpty() {\n return root == null;\n }", "private boolean isEmpty()\n {\n return dimensions.isEmpty();\n }", "private void testBuildGraph() {\n\t\t// All test graphs have a node 8 with children [9, 10]\n\t\tSet<Node> expectedChildren = new HashSet<>();\n\t\texpectedChildren.add(new Node(9));\n\t\texpectedChildren.add(new Node(10));\n\n\t\tStudySetGraph disconnectedGraphWithoutCycle = new StudySetGraph(Edges.disconnectedGraphWithoutCycle);\n\t\tNode node = disconnectedGraphWithoutCycle.getNode(8);\n\t\tassert node != null;\n\t\tassert node.getChildren().equals(expectedChildren);\n\t\t\n\t\tStudySetGraph disconnectedGraphWithCycle = new StudySetGraph(Edges.disconnectedGraphWithCycle);\n\t\tnode = disconnectedGraphWithoutCycle.getNode(8);\n\t\tassert node != null;\n\t\tassert node.getChildren().equals(expectedChildren);\n\t\t\n\t\tStudySetGraph connectedGraphWithCycle = new StudySetGraph(Edges.connectedGraphWithCycle);\n\t\tnode = disconnectedGraphWithoutCycle.getNode(8);\n\t\tassert node != null;\n\t\tassert node.getChildren().equals(expectedChildren);\n\n\t\tStudySetGraph connectedGraphWithoutCycle = new StudySetGraph(Edges.connectedGraphWithoutCycle);\n\t\tnode = disconnectedGraphWithoutCycle.getNode(8);\n\t\tassert node != null;\n\t\tassert node.getChildren().equals(expectedChildren);\n\t}", "@Test\n public void testWithUnknownLabel() throws Exception {\n LogicalGraph socialGraph = getSocialNetworkLoader().getLogicalGraph();\n LogicalGraph result = socialGraph\n .callForGraph(new VertexDeduplication<>(\"NotInTheGraph\", Arrays.asList(\"a\", \"b\")));\n collectAndAssertTrue(socialGraph.equalsByData(result));\n }", "@Override\n public boolean isEmpty(){\n return points.isEmpty();\n }", "boolean isEmpty() {\n\t\treturn m_list_nodes.size() == 0;\n\t}", "@Test \r\n void create_edge_between_to_nonexisted_vertexes() {\r\n graph.addEdge(\"A\", \"B\");\r\n List<String> adjacentA = graph.getAdjacentVerticesOf(\"A\");\r\n List<String> adjacentB = graph.getAdjacentVerticesOf(\"B\");\r\n if(!adjacentA.contains(\"B\")) { \r\n fail();\r\n }\r\n if(adjacentB.contains(\"A\")) { \r\n fail();\r\n }\r\n }", "@Test(expected = IllegalArgumentException.class)\n public void testEmptyGraphRequest() throws IllegalArgumentException {\n GraphRequestModel requestModel = new GraphRequestModel(\"\", \"reasoningFalse\", \"\", \"\", \"\", \"\", false);\n GraphRequestValidator.validateRequest(requestModel);\n }", "@Test\n public void tr0()\n {\n Graph g = new Graph(1);\n Set<Integer> nodes = new TreeSet<Integer>();\n nodes.add(0);\n assertTrue(g.reachable(nodes, nodes));\n }", "@Test\n void testAddVertexGraph() {\n Assertions.assertTrue(graph.addVertex(v1));\n Assertions.assertTrue(graph.containsVertex(v1));\n Assertions.assertTrue(checkInv());\n }", "@Test\r\n void add_20_remove_20_add_20() {\r\n //Add 20\r\n for(int i = 0; i < 20; i++) {\r\n graph.addVertex(\"\" +i);\r\n }\r\n vertices = graph.getAllVertices();\r\n //Check all 20 are in graph\r\n for(int i = 0; i < 20; i++) {\r\n if(!vertices.contains(\"\" + i)) {\r\n fail();\r\n }\r\n }\r\n //Remove 20 \r\n for(int i = 0; i < 20; i++) {\r\n graph.removeVertex(\"\" +i);\r\n }\r\n //Check all 20 are not in graph anymore \r\n \r\n for(int i = 0; i < 20; i++) {\r\n if(vertices.contains(\"\" + i)) {\r\n fail();\r\n }\r\n }\r\n //Add 20 again\r\n for(int i = 0; i < 20; i++) {\r\n graph.addVertex(\"\" +i);\r\n }\r\n //Check all 20 are in graph\r\n for(int i = 0; i < 20; i++) {\r\n if(!vertices.contains(\"\" + i)) {\r\n fail();\r\n }\r\n }\r\n }", "public Boolean isEmpty() {\n\t\tBoolean empty=true;\n\t\tif(nodes.isEmpty()==false) {\n\t\t\tempty=false;\n\t\t}\n\t\treturn empty;\n\t}", "@Test\n void test07_tryToRemoveNonExistentEdge() {\n graph.addVertex(\"a\");\n graph.addVertex(\"b\");\n graph.addVertex(\"c\");\n graph.addEdge(\"a\", \"b\");\n graph.addEdge(\"b\", \"c\"); // adds two edges\n try {\n graph.removeEdge(\"e\", \"f\"); // remove non existent edge\n } catch (Exception e) {\n fail(\"Shouldn't have thrown exception\");\n }\n\n Set<String> vertices = new LinkedHashSet<>();\n vertices.add(\"a\");\n vertices.add(\"b\");\n vertices.add(\"c\"); // creates mock up vertex list\n\n if (!graph.getAllVertices().equals(vertices)) { // checks if vertices weren't added or removed\n fail(\"wrong vertices are inserted into the graph\");\n }\n if (graph.size() != 2) {\n fail(\"wrong number of edges in the graph\");\n }\n\n }", "@Test\r\n void test_insert_two_vertice_with_one_edge_remove_non_existent_edge() {\r\n // Add three vertices with two edges\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"B\", \"C\");\r\n vertices = graph.getAllVertices();\r\n // B should be an adjacent vertex of A\r\n if(!graph.getAdjacentVerticesOf(\"A\").contains(\"B\")){\r\n fail();\r\n }\r\n // C should be an adjacent vertex of B\r\n if(!graph.getAdjacentVerticesOf(\"B\").contains(\"C\")){\r\n fail();\r\n }\r\n //Check that A,B and C are in the graph\r\n if(!vertices.contains(\"A\") |!vertices.contains(\"B\")\r\n | !vertices.contains(\"C\")) {\r\n fail();\r\n }\r\n // There are two edges in the graph\r\n if(graph.size() != 2) {\r\n fail();\r\n }\r\n // Try are remove edge from A to C\r\n graph.removeEdge(\"A\", \"C\");\r\n graph.removeEdge(\"A\", \"D\");\r\n graph.removeEdge(\"E\", \"F\");\r\n graph.removeEdge(null, \"A\");\r\n graph.removeEdge(\"A\", null);\r\n //Graph should maintain its original shape\r\n if(!graph.getAdjacentVerticesOf(\"A\").contains(\"B\")){\r\n fail();\r\n }\r\n // C should be an adjacent vertex of B\r\n if(!graph.getAdjacentVerticesOf(\"B\").contains(\"C\")){\r\n fail();\r\n }\r\n //Check that A,B and C are in the graph\r\n if(!vertices.contains(\"A\") |!vertices.contains(\"B\")\r\n | !vertices.contains(\"C\")) {\r\n fail();\r\n }\r\n // There are two edges in the graph\r\n if(graph.size() != 2) {\r\n fail();\r\n }\r\n }", "@Test(expected = IllegalArgumentException.class)\n public void shouldNotConstructWithNullElement() {\n DetachedVertex.detach(null);\n }", "public void testIsEmpty() {\r\n assertTrue(tree.isEmpty());\r\n tree.insert(\"apple\");\r\n assertFalse(tree.isEmpty());\r\n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "public boolean empty() {\n\t\treturn (this.root == null); // to be replaced by student code\n\t}", "@Override\n public boolean isEmpty() {\n return (that.rootNode == null);\n }", "@Test\n public void testWithUnknownProperty() throws Exception {\n LogicalGraph socialGraph = getSocialNetworkLoader().getLogicalGraph();\n List<EPGMVertex> vertices = socialGraph\n .callForGraph(new VertexDeduplication<>(\"Person\", Collections.singletonList(\"notSet\")))\n .getVerticesByLabel(\"Person\").collect();\n assertEquals(1, vertices.size());\n }", "@Override\r\n\tpublic boolean isEmpty() {\r\n\t\treturn size() == 0;\r\n\t}", "@Override\r\n public boolean isEmpty() {\n return size == 0;\r\n }", "@Override\n\tpublic boolean isEmpty() {\n\t\tmodCount = root.numChildren();\n\t\treturn (modCount == 0);\n\t}", "@Override\n public boolean isEmpty() {\n return size()==0;\n }", "@Test\n void test01_addVertex() {\n graph.addVertex(\"a\");\n graph.addVertex(\"b\"); // adds two vertices\n\n Set<String> vertices = new LinkedHashSet<>();\n vertices.add(\"a\");\n vertices.add(\"b\"); // creates a check list to compare with\n\n if (!graph.getAllVertices().equals(vertices)) {\n fail(\"Graph didn't add the vertices correctly\");\n }\n }", "@Override\r\n\tpublic boolean isEmpty() {\r\n\t\treturn topIndex < 0;\r\n\t}", "@Test\r\n void test_insert_1_vertex_check() {\r\n graph.addVertex(\"1\");\r\n vertices = graph.getAllVertices();\r\n if (!vertices.contains(\"1\"))\r\n fail(\"Insert not working!!\");\r\n }", "@Test\n\tpublic void addVertexTest() {\n\t\tgraph.addVertex(A);\n\t\tgraph.addVertex(B);\n\t\tgraph.addVertex(C);\n\t\tgraph.addVertex(D);\n\t\tassertEquals(4, graph.vertices().size());\n\t\tassertTrue(graph.vertices().contains(A));\n\t\tassertTrue(graph.vertices().contains(B));\n\t\tassertTrue(graph.vertices().contains(D));\n\t\tassertFalse(graph.addVertex(B)); // the graph has already have the vertex B, so assert false here.\n\t}", "@Override\r\n public boolean isEmpty() {\r\n return size == 0;\r\n }", "@Override\r\n\tpublic boolean isEmpty() {\r\n\t\treturn count == 0;\r\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn top < 0;\n\t}", "@Override\n\tpublic Graph<String> emptyInstance() {\n\t\treturn new ConcreteEdgesGraph();\n\t}", "public boolean empty() {\n if(root==EXT_NODE) {\r\n \treturn true;\r\n }\r\n return false;\r\n }", "private boolean isEmpty() {\n\t\treturn size() == 0;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn size == 0;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn size == 0;\n\t}", "@DisplayName(\"Has neighbours?\")\n @Test\n public void testGetNeighbours() {\n Assertions.assertTrue(graph.getNeighbours(0).size() > 1);\n }", "@Override\n public boolean isMissingNode() { return false; }", "@Override\n public boolean isEmpty()\n {\n return size == 0;\n }", "@Override\r\n\tpublic boolean isempty() {\n\t\treturn count<=0;\r\n\t\t\r\n\t}", "@Override\n public boolean isEmpty() {\n return size == 0;\n }", "@Override\n public boolean isEmpty() {\n return size == 0;\n }", "@Override\n public boolean isEmpty() {\n return size == 0;\n }", "@Override\n public boolean isEmpty() {\n return size == 0;\n }", "@Override\n public boolean isEmpty() {\n return size == 0;\n }", "public static void validateGraph(final EnactmentGraph graph) {\n checkForDisconnectedDataNodes(graph);\n }", "@Override\n public boolean isEmpty() { return true; }", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn(size() == 0);\n\t}", "@Test\n void test02_removeVertex() {\n graph.addVertex(\"a\");\n graph.addVertex(\"b\"); // adds two\n graph.removeVertex(\"a\"); // remove\n\n Set<String> vertices = new LinkedHashSet<>();\n vertices.add(\"a\");\n vertices.add(\"b\");\n vertices.remove(\"a\"); // creates a mock up vertex list\n\n if (!graph.getAllVertices().equals(vertices)) {\n fail(\"Graph didn't remove the vertices correctly\");\n }\n }", "boolean isEmpty() {\n return (bottom < top.getReference());\n }", "public boolean isEmpty()\r\n {\r\n return root == null;\r\n }", "public void clearGraph(){\n\t\tthis.tools.clearGraph(graph);\n\t}", "public boolean isEmpty() { return count == 0; }", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn firstNode.equals(null);\n\t}", "public void testIsEmpty() {\n assertTrue(test1.isEmpty());\n test1.append(new Buffer(3, rec));\n assertFalse(test1.isEmpty());\n }", "public boolean isEmpty() {\r\n\t\t\r\n\t\treturn topNode == null; // Checks if topNode is null;\r\n\t\t\r\n\t}", "@Test\n void test04_checkOrder() {\n graph.addVertex(\"a\");\n graph.addVertex(\"b\");\n graph.addVertex(\"c\");\n graph.addVertex(\"d\");\n graph.addVertex(\"e\");\n graph.addVertex(\"f\"); // added 6 items\n if (graph.order() != 6) {\n fail(\"graph has counted incorrect number of vertices\");\n }\n }", "public boolean empty() {\r\n\t\t return(this.root == null);\r\n\t }", "@Override\r\n\tpublic boolean isEmpty() {\n\t\treturn top==null;\r\n\t}", "public boolean isEmpty()\r\n {\r\n return root == null;\r\n }", "public boolean isEmpty() { return size == 0; }", "public boolean isEmpty() { return size == 0; }", "public boolean isEmpty() { return size == 0; }", "public void clear() {\n\t\t\tsuper.clear();\n\t\t\tjgraph.getGraphLayoutCache().remove(nullnodes.toArray());\n\t\t\tnullnodes = new LinkedList<DefaultGraphCell>();\n\t\t}", "private boolean isEmpty(){\n return (numInstances() == 0);\n }" ]
[ "0.7649194", "0.72884643", "0.7175884", "0.7173411", "0.71201354", "0.71166354", "0.69519246", "0.694341", "0.69420135", "0.68317366", "0.680984", "0.6785424", "0.6783134", "0.6706756", "0.6601379", "0.6571602", "0.6564214", "0.6519715", "0.6439588", "0.6429422", "0.6424993", "0.64132", "0.63959247", "0.6395091", "0.6365483", "0.63355005", "0.62878805", "0.62833214", "0.6274755", "0.62685025", "0.626063", "0.6257453", "0.6247557", "0.6244855", "0.6238764", "0.6225325", "0.62236273", "0.6222343", "0.62211037", "0.6219287", "0.62150025", "0.62138224", "0.621011", "0.62077594", "0.62053514", "0.6195935", "0.61851394", "0.6161964", "0.6158417", "0.6158417", "0.6158417", "0.6158417", "0.6158417", "0.61552835", "0.6154341", "0.6152066", "0.6139192", "0.6131522", "0.61302483", "0.61221325", "0.6119863", "0.61096543", "0.60958105", "0.609138", "0.60895663", "0.6088951", "0.60882646", "0.60806924", "0.6071661", "0.60631764", "0.6052397", "0.6052397", "0.6051466", "0.60483646", "0.6043554", "0.6043248", "0.60430145", "0.60430145", "0.60430145", "0.60430145", "0.60430145", "0.6032736", "0.601581", "0.6015619", "0.6012448", "0.6011541", "0.60105616", "0.6006977", "0.5998485", "0.59963626", "0.5991024", "0.59890944", "0.5985448", "0.597797", "0.5974301", "0.5974081", "0.59704185", "0.59704185", "0.59704185", "0.5965629", "0.59605765" ]
0.0
-1
Test of removeBitmaskFromElements method, of class LayersViewController.
@Test public void testRemoveBitmaskFromElements() { System.out.println("removeBitmaskFromElements"); // Setup a graph with elements setupGraph(); final GraphManager gm = Mockito.mock(GraphManager.class); when(gm.getActiveGraph()).thenReturn(graph); // Create mock of DataAccessPane to return the query phase pane mock try (MockedStatic<GraphManager> mockedStatic = Mockito.mockStatic(GraphManager.class)) { mockedStatic.when(() -> GraphManager.getDefault()).thenReturn(gm); WritableGraph wg; try { wg = graph.getWritableGraph("", true); // Check Vertex set correctly assertEquals(wg.getIntValue(layerMaskV, vxId1), 1); assertEquals(wg.getFloatValue(layerVisibilityV, vxId1), 1.0f); assertFalse(wg.getBooleanValue(selectedV, vxId1)); assertEquals(wg.getIntValue(layerMaskV, vxId2), 1); assertEquals(wg.getFloatValue(layerVisibilityV, vxId2), 1.0f); assertFalse(wg.getBooleanValue(selectedV, vxId2)); // Check Transaction set correctly assertEquals(wg.getIntValue(layerMaskT, vxId1), 1); assertEquals(wg.getFloatValue(layerVisibilityT, vxId1), 1.0f); assertFalse(wg.getBooleanValue(selectedT, vxId1)); assertEquals(wg.getIntValue(layerMaskT, vxId2), 1); assertEquals(wg.getFloatValue(layerVisibilityT, vxId2), 1.0f); assertFalse(wg.getBooleanValue(selectedT, vxId2)); wg.commit(); } catch (final InterruptedException ex) { Exceptions.printStackTrace(ex); Thread.currentThread().interrupt(); } // remove bitmask from elements - nothing should be on layer 5 int currentIndex = 5; LayersViewController instance = LayersViewController.getDefault().init(null); instance.removeBitmaskFromElements(currentIndex); try { wg = graph.getWritableGraph("", true); // Check Vertex unchanged assertEquals(wg.getIntValue(layerMaskV, vxId1), 1); assertEquals(wg.getFloatValue(layerVisibilityV, vxId1), 1.0f); assertFalse(wg.getBooleanValue(selectedV, vxId1)); assertEquals(wg.getIntValue(layerMaskV, vxId2), 1); assertEquals(wg.getFloatValue(layerVisibilityV, vxId2), 1.0f); assertFalse(wg.getBooleanValue(selectedV, vxId2)); // Check Transaction set correctly assertEquals(wg.getIntValue(layerMaskT, vxId1), 1); assertEquals(wg.getFloatValue(layerVisibilityT, vxId1), 1.0f); assertFalse(wg.getBooleanValue(selectedT, vxId1)); assertEquals(wg.getIntValue(layerMaskT, vxId2), 1); assertEquals(wg.getFloatValue(layerVisibilityT, vxId2), 1.0f); assertFalse(wg.getBooleanValue(selectedT, vxId2)); // Set vx2 and tx2 into layer 2. Both are visibility 0 because current layer is 1. wg.setIntValue(layerMaskV, vxId2, 0b11); wg.setFloatValue(layerVisibilityV, vxId2, 0.0f); wg.setIntValue(layerMaskT, txId2, 0b11); wg.setFloatValue(layerVisibilityT, txId2, 0.0f); wg.commit(); } catch (final InterruptedException ex) { Exceptions.printStackTrace(ex); Thread.currentThread().interrupt(); } // remove bitmask from elements - should only remove the elements vx2 and tx2 currentIndex = 1; instance.removeBitmaskFromElements(currentIndex); try { wg = graph.getWritableGraph("", true); // Check Vertex 1 unchanged assertEquals(wg.getIntValue(layerMaskV, vxId1), 1); assertEquals(wg.getFloatValue(layerVisibilityV, vxId1), 1.0f); assertFalse(wg.getBooleanValue(selectedV, vxId1)); // Check Vertex 2 changed - visibility 0.0 because no visibility update assertEquals(wg.getIntValue(layerMaskV, vxId2), 1); assertEquals(wg.getFloatValue(layerVisibilityV, vxId2), 0.0f); assertFalse(wg.getBooleanValue(selectedV, vxId2)); // Check Transaction 1 unchanged assertEquals(wg.getIntValue(layerMaskT, vxId1), 1); assertEquals(wg.getFloatValue(layerVisibilityT, vxId1), 1.0f); assertFalse(wg.getBooleanValue(selectedT, vxId1)); assertEquals(wg.getIntValue(layerMaskT, vxId2), 1); assertEquals(wg.getFloatValue(layerVisibilityT, vxId2), 0.0f); assertFalse(wg.getBooleanValue(selectedT, vxId2)); wg.commit(); } catch (final InterruptedException ex) { Exceptions.printStackTrace(ex); Thread.currentThread().interrupt(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testRemoveBitmaskFromElementsEmptyGraph() {\n System.out.println(\"removeBitmaskFromElements_EmptyGraph\");\n setupEmptyGraph();\n\n final GraphManager gm = Mockito.mock(GraphManager.class);\n when(gm.getActiveGraph()).thenReturn(graph);\n\n // Create mock of DataAccessPane to return the query phase pane mock\n try (MockedStatic<GraphManager> mockedStatic = Mockito.mockStatic(GraphManager.class)) {\n mockedStatic.when(() -> GraphManager.getDefault()).thenReturn(gm);\n\n ReadableGraph rg = graph.getReadableGraph();\n assertEquals(rg.getVertexCount(), 0);\n rg.close();\n\n // remove bitmask from elements - nothing should be on layer 5\n int currentIndex = 5;\n LayersViewController instance = LayersViewController.getDefault().init(null);\n instance.removeBitmaskFromElements(currentIndex);\n\n ReadableGraph rg2 = graph.getReadableGraph();\n assertEquals(rg2.getVertexCount(), 0);\n rg2.close();\n\n currentIndex = 1;\n instance.removeBitmaskFromElements(currentIndex);\n\n ReadableGraph rg3 = graph.getReadableGraph();\n assertEquals(rg3.getVertexCount(), 0);\n rg3.close();\n\n }\n }", "void removeComponents()\n {\n JPanel panel = Simulator.getInstance().getPanel(1);\n JLayeredPane jl = (JLayeredPane)panel.getComponent(0);\n Component[] comps = jl.getComponentsInLayer(JLayeredPane.PALETTE_LAYER.intValue());\n int size = comps.length;\n int i=0;\n while(i<size)\n {\n jl.remove(comps[i]);\n i++;\n } \n }", "@objid (\"617db21c-55b6-11e2-877f-002564c97630\")\n @Override\n public boolean canUnmask(MObject el) {\n return false;\n }", "@Test\n\tpublic void testEliminationByMediumBox(){\n\t\tsetBoardUp();\n\t\tMediumBox mBox = new MediumBox(board, 1, 1);\n\t\talgorithm.applyEliminationInMediumBox(mBox);\n\t\tint[] toBeRemoved = {1, 2, 8, 9};\n\t\tint[] fromCells = {0, 1, 4, 7, 8};\n\t\tboolean condition = true;\n\t\tfor(int i = 0; i < toBeRemoved.length; i++)\n\t\t\tfor(int j = 0; j < fromCells.length; j++)\n\t\t\t\tcondition &= !mBox.cell[fromCells[j]].possibilities.contains(toBeRemoved[i]);\t\t\n\t\t\n\t\tassertTrue(condition);\n\t}", "public void testRemove() {\r\n System.out.println(\"remove\");\r\n \r\n PartialCombinationIterator instance = null;\r\n Iterator<int[]> iterator = null;\r\n try {\r\n iterator = new PartialCombinationIterator(TestConstants.verySimpleReactionScheme, new int[] {1}, 1, 1);\r\n } catch (ReactionSchemeException ex) {\r\n ex.printStackTrace();\r\n fail(\"Unexpected exception was thrown.\");\r\n } catch (SmiLibIOException ex) {\r\n ex.printStackTrace();\r\n fail(\"Unexpected exception was thrown.\");\r\n } catch (SmiLibException ex) {\r\n ex.printStackTrace();\r\n fail(\"Unexpected exception was thrown.\");\r\n }\r\n \r\n try {\r\n iterator.remove();\r\n fail(\"No UnsupportedOperationException was thrown when executing remove().\");\r\n } catch (UnsupportedOperationException e) {\r\n }\r\n }", "@Test\n public void testDeselectAll() {\n LayersViewController instance = LayersViewController.getDefault().init(null);\n instance.createLayer();\n instance.createLayer();\n instance.getVxQueryCollection().setVisibilityOnAll(true);\n instance.getTxQueryCollection().setVisibilityOnAll(true);\n\n instance.deselectAll();\n assertEquals(instance.getVxQueryCollection().isVisibilityOnAll(), false);\n }", "public void removeAllOverlayObj(String layer)\n/* 185: */ {\n/* 186:261 */ this.mapPanel.removeAllOverlayObj(layer);\n/* 187: */ }", "@Test\n public void testRemoveAll() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n boolean expectedResult = true;\n boolean result = instance.removeAll(c);\n\n assertEquals(expectedResult, result);\n\n }", "public boolean remove(int paramInt)\n/* */ {\n/* 231 */ int i = internalFind(paramInt);\n/* 232 */ if (i >= 0) {\n/* 233 */ this.m_flagTable[i] = false;\n/* 234 */ this.m_entryCount -= 1;\n/* 235 */ while (this.m_flagTable[(i = stepSlot(i))] != false) {\n/* 236 */ reinsert(i);\n/* */ }\n/* 238 */ return true;\n/* */ }\n/* 240 */ return false;\n/* */ }", "void setNetworkMask(byte[] networkMask);", "@Test\n public void testRemove_int() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 1, 1, 1, 1);\n instance.addAll(c);\n\n Integer expResult = 7;\n Integer result = instance.remove(2);\n\n assertEquals(expResult, result);\n\n }", "@Test\n public void removePermission() {\n Collection<BPermission> auxP = new HashSet<>();\n auxP.add(sampleP);\n\n cleanEntity0();\n ReflectionTestUtils.setField(entity0, \"permissions\", auxP);\n Collection<?> permissions = (HashSet<?>) ReflectionTestUtils.getField(entity0, \"permissions\");\n assertTrue(permissions != null && permissions.contains(sampleP));\n\n entity0.removePermission(sampleP);\n permissions = (HashSet<?>) ReflectionTestUtils.getField(entity0, \"permissions\");\n assertTrue(permissions != null && !permissions.contains(sampleP));\n }", "@Test\n public void remove1() {\n RBTree<Integer> tree = new RBTree<>();\n List<Integer> add = new ArrayList<>(List.of(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10));\n List<Integer> rem = new ArrayList<>(List.of(4, 7, 9, 5));\n for (int i : add) {\n tree.add(i);\n }\n int err = 0;\n Set<Integer> remSet = new HashSet<>();\n for (int i : rem) {\n remSet.add(i);\n boolean removed = tree.remove(i);\n if (!removed && add.contains(i)) {\n System.err.println(\"Could not remove element \" + i + \"!\");\n err++;\n }\n if (removed && !add.contains(i)) {\n System.err.println(\"Removed the non-existing element \" + i + \"!\");\n err++;\n }\n for (int a : add) {\n if (!tree.contains(a) && !remSet.contains(a)) {\n System.err.println(\"Removed element \" + a + \" after removing \" + i + \"!\");\n err++;\n }\n }\n }\n for (int i : rem) {\n if (tree.remove(i)) {\n System.err.println(\"Removed a already remove element \" + i + \"!\");\n err++;\n }\n }\n for (int i : rem) {\n if (tree.contains(i)) {\n System.out.println(\"The element \" + i + \" was not removed!\");\n err++;\n }\n }\n \n assertEquals(\"There were \" + err + \" errors!\", 0, err);\n rem.retainAll(add);\n assertEquals(\"Incorrect tree size!\", add.size() - rem.size(), tree.size());\n }", "@Test\n public void testRemove_Contains() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(1);\n\n Integer item = 1;\n boolean expResult = true;\n boolean result = instance.remove(item);\n assertEquals(expResult, result);\n }", "public static int computeViewMaskFromConfig(OwXMLUtil configNode_p, String strNodeName_p, int iMaskBit_p)\r\n {\r\n // delegate to same method with default value 'false'\r\n return computeViewMaskFromConfig(configNode_p, strNodeName_p, iMaskBit_p, false);\r\n }", "@Test\n public void testRemove_Not_Contains() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(1);\n\n Integer item = 2;\n boolean expResult = false;\n boolean result = instance.remove(item);\n assertEquals(expResult, result);\n }", "@Test\n public void testRemoveAll_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n boolean expectedResult = true;\n boolean result = instance.removeAll(c);\n\n assertEquals(expectedResult, result);\n\n }", "public void removeAllOverlayObj()\n/* 91: */ {\n/* 92:146 */ this.mapPanel.removeAllOverlayObj();\n/* 93: */ }", "@Test\r\n public void removeAndContains() throws Exception {\r\n TreeSet<Integer> s = new TreeSet<>();\r\n s.addAll(sInt);\r\n s.remove(2);\r\n assertFalse(s.contains(2));\r\n }", "public List<Mask> getDontCareMasks() {\n return Collections.unmodifiableList(dontCareMasks);\n }", "public static void clearLayers(){\n\t\tfor(int i=0;i<ChangeLayer.Layers.length;i++){\n\t\t\tChangeLayer.Layers[i].clear();\n\t\t\t}\n\t}", "public void removeAllAgents(String layer)\n/* 180: */ {\n/* 181:254 */ this.mapPanel.removeAllAgents(layer);\n/* 182: */ }", "@Test\n public void testRemove_int_Order() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 1, 1, 1, 1);\n instance.addAll(c);\n\n instance.remove(2);\n\n List<Integer> expResult = Arrays.asList(1, 1, 1, 1, 1, 1);\n\n assertTrue(isEqual(expResult, instance));\n\n }", "void removeLayer(int whichLayer);", "@Test\n\tpublic void testRemove() {\n\t\tboolean expResult = true;\n\t\tboolean result = false;\n\n\t\tIntArrayIterator instance = createIterator();\n\t\ttry {\n\t\t\tinstance.remove();\n\t\t}\n\t\tcatch (UnsupportedOperationException e) {\n\t\t\tresult = true;\n\t\t}\n\t\tassertEquals(expResult, result);\n\t}", "public void remove(int type) {\n\t\tint n = check(type);\n\t\tif (n >= 64) {\n\t\t\tn1 &= ~mask(n - 64);\n\t\t} else {\n\t\t\tn0 &= ~mask(n);\n\t\t}\n\t}", "@Test\n public void testRemove_Contains_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(1);\n instance.add(1);\n instance.add(1);\n instance.add(1);\n instance.add(1);\n instance.add(1);\n\n Integer item = 1;\n boolean expResult = true;\n boolean result = instance.remove(item);\n assertEquals(expResult, result);\n }", "@Test\r\n\tpublic void fieldToDeleteTest() {\n\t\tArrayList<Point> fieldToDelete = boardService.getGameRules().fieldToDelete(board.field[11][10]); //we invoke this on the one of the black stones\r\n\t\t//should return arraylist of a size that is same as whites amount\r\n\t\tint counter = 0;\r\n\t\t\r\n\t\tfor(Point point : fieldToDelete)\r\n\t\t\tfor(int i = 11; i <= 15; i++)\r\n\t\t\t\tfor(int j = 11; j <= 15; j++) {\r\n\t\t\t\t\tif(point.getX() == i && point.getY() == j)\r\n\t\t\t\t\t\tcounter++; \r\n//we increase counter, only when we meet point with the same coordiantes, then when counter == size of returned array, then test is passed\r\n\t\t\t\t}\r\n\t\tassertEquals(counter, fieldToDelete.size());\r\n\t}", "@Test\n public void testRemoveAll_Size() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n instance.removeAll(c);\n\n int expectedResult = 0;\n assertEquals(expectedResult, instance.size());\n\n }", "public void clearBits()\r\n {\r\n clear();\r\n }", "public void cleanDirtyFlags() {\n RetractedChanged=false;\n AddressIDChanged=false;\n EntityIDChanged=false;\n AddressTypeIDChanged=false;\n}", "@Test\r\n public void testCheckCollisionTankBlocks() {\r\n System.out.println(\"checkCollisionTankBlocks\");\r\n Rectangle r3 = new Rectangle(10, 10, 10, 10);\r\n boolean result = CollisionUtility.checkCollisionTankBlocks(r3);\r\n assertEquals(true, result);\r\n inblocks.remove(0);\r\n result = CollisionUtility.checkCollisionTankBlocks(r3);\r\n assertEquals(false, result);\r\n }", "void clearFeatures();", "public void clear() {\r\n\t\tbitset.clear();\r\n\t\tnumberOfAddedElements = 0;\r\n\t}", "@Test(timeout=1000)\n\tpublic void TestComplexRemove(){\n\t\thashmap.add(s1);\n\t\thashmap.add(s2);\n\t\thashmap.add(s3);\n\t\thashmap.add(s4);\n\t\thashmap.add(s5);\n\t\thashmap.add(s6);\n\t\thashmap.add(s7);\n\t\t\n\t\thashmap.remove(s2);\n\t\thashmap.remove(s5);\n\n\t\tassertEquals(\"An error ocurred in remove in array[0]\", s6, hashmap.getArray()[0]);\n\t\tassertEquals(\"An error ocurred in remove in array[1]\", null, hashmap.getArray()[1]);\n\t\tassertEquals(\"An error ocurred in remove in array[2]\", null, hashmap.getArray()[2]);\n\t\tassertEquals(\"An error ocurred in remove in array[3]\", s1, hashmap.getArray()[3]);\n\t\tassertEquals(\"An error ocurred in remove in array[4]\", s3, hashmap.getArray()[4]);\n\t\tassertEquals(\"An error ocurred in remove in array[5]\", s4, hashmap.getArray()[5]);\n\t\tassertEquals(\"An error ocurred in remove in array[6]\", s7, hashmap.getArray()[6]);\n\t\t\n\t\thashmap.remove(s7);\n\t\thashmap.remove(s1);\n\t\thashmap.remove(s4);\n\t\thashmap.remove(s3);\n\t\thashmap.remove(s6);\n\t\t\n\t\tfor(int i = 0; i < hashmap.getArray().length; i++){\n\t\t\tif(hashmap.getArray()[i] != null){\n\t\t\t\tfail(\"Student at position\" + i + \"was not removed\");\n\t\t\t}\n\t\t}\n\t}", "static int clearBit(int num, int pos) {\n\t\t\tint mask = ~(1<<pos);\n\t\t\treturn num & mask;\n\t\t}", "public void removeCvpack(Cvpack cvpack);", "void removeEntityFromSystems(Entity e, RECSBits systemBits) {\n \t\tfor (int i = systemBits.nextSetBit(0); i >= 0; i = systemBits.nextSetBit(i + 1)) {\n \t\t\tsystemMap.get(i).removeEntity(e.id);\n \t\t}\n \t}", "@Test\n public void testRemove_Not_Contains_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(1);\n instance.add(1);\n instance.add(1);\n instance.add(1);\n instance.add(1);\n instance.add(1);\n\n Integer item = 2;\n boolean expResult = false;\n boolean result = instance.remove(item);\n assertEquals(expResult, result);\n }", "public static native boolean RemoveIt(long lpjFbxArrayVector2, long pElement);", "@Test\n public void testDiagnosisCodeBitFlags() {\n new DiagnosisCodeFieldTester(false)\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissDiagnosisCode.Builder::setBitFlags,\n RdaFissDiagnosisCode::getBitFlags,\n RdaFissDiagnosisCode.Fields.bitFlags,\n 4);\n }", "void unsetListOfServiceElements();", "protected abstract void checkRemoved();", "@Test\n public void testRemoveSetting() {\n System.out.println(\"removeSetting\");\n Setting s = Setting.factory();\n Setting s1 = Setting.factory();\n Setting s2 = Setting.factory();\n Setting s3 = Setting.getSetting(\"test1\");\n Setting[] settings = {s, s1, s2, s3};\n for (Setting ss : settings) {\n assertFalse(Setting.isNotUsed(ss.getName()));\n }\n Setting.removeSetting(s3);\n for (int i = 0; i < 3; i++) {\n assertFalse(Setting.isNotUsed(settings[i].getName()));\n }\n assertTrue(Setting.isNotUsed(s3.getName()));\n for (Setting ss : settings) {\n Setting.removeSetting(ss);\n }\n for (Setting ss : settings) {\n assertTrue(Setting.isNotUsed(ss.getName()));\n }\n }", "@Test\r\n public void testRemoveElement() {\r\n System.out.println(\"removeElement\");\r\n ModeloListaOrganizadores instance = new ModeloListaOrganizadores(e.getListaOrganizadores());\r\n Organizador o =new Organizador(new Utilizador(\"teste\", \"teste@isep.ipp.pt\", \"teste\", \"teste\", true, 5));\r\n instance.addElement(o);\r\n boolean expResult = false;\r\n boolean result = instance.removeElement(o);\r\n\r\n }", "private void removeElement(PathwayElement affectedData)\n \t{\n \n \t}", "@Override\n protected void unregisterVisuals() {\n Map visualPartMap = this.getViewer().getVisualPartMap();\n visualPartMap.remove(getFigure().getLabel());\n visualPartMap.remove(getFigure().getCheckBox());\n super.unregisterVisuals();\n }", "private boolean canRemoveTiles() {\n return this.mCurrentSpecs.size() > 8;\n }", "public INodeFilter[] removeAllFilters ();", "void removeFeature(int i);", "void removeFeature(int i);", "@Test\n public void testRemove_int_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n Collection c = Arrays.asList(1, 1, 7, 1, 1, 1, 1);\n instance.addAll(c);\n\n Integer expResult = 7;\n Integer result = instance.remove(2);\n\n assertEquals(expResult, result);\n\n }", "public void removeContainerAndProtocolFilters()\n {\n clearConditions(CONTAINER_FIELD_KEY);\n clearConditions(PROTOCOL_FIELD_KEY);\n _dontNeedFilterContainer = true;\n }", "byte[] networkMask();", "public void deleteBitesFromallBitesFromFile(int bitsQuantity) {\r\n for (int i = 0; i < bitsQuantity; i++)\r\n this.allBitesFromFile.remove(0);\r\n }", "private void resetMask() {\n maskArray = new int [][]{\n {0,0,0,0},\n {0,0,0,0},\n {0,0,0,0},\n {0,0,0,0}\n };\n }", "public void testNormalRemoveItem()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkRemove(pmf,\r\n HashMap1.class,\r\n ContainerItem.class);\r\n }\r\n finally\r\n {\r\n clean(HashMap1.class);\r\n clean(ContainerItem.class);\r\n }\r\n }", "@Test\n public void testRemoveAll_Size_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n instance.removeAll(c);\n\n int expectedResult = 0;\n assertEquals(expectedResult, instance.size());\n\n }", "public void removeAllElements();", "public void clearBits(int[][] bits, int start, int len) {\n\t\tint left = start; \n\t\tint right = start + len - 1; \n\t\tfor (int i = 0; i < bits.length; i++) {\n\t\t\tfor (int j = left; j <= right; j++) {\n\t\t\t\tbits[i][j] = 0;\n\t\t\t}\n\t\t\tleft = left / 2;\n\t\t\tright = right / 2;\n\t\t}\n\t}", "@Test\n public void testRemove_int_Size() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 1, 1, 1, 1);\n instance.addAll(c);\n\n instance.remove(2);\n\n Integer expResult = 6;\n Integer result = instance.size();\n\n assertEquals(expResult, result);\n\n }", "protected void clearAll() {\n for (int i=0; i <= (Numbers.INTEGER_WIDTH*8-2); i++) {\n \tthis.clearBitAt(i);\n } \t\n }", "@SuppressWarnings(\"unchecked\")\r\n private Void receiveObjectsAnswerImageryRemoves()\r\n {\r\n List<Geometry> adds = (List<Geometry>)EasyMock.getCurrentArguments()[1];\r\n List<Geometry> removes = (List<Geometry>)EasyMock.getCurrentArguments()[2];\r\n\r\n assertEquals(1, removes.size());\r\n assertEquals(1, adds.size());\r\n assertTrue(adds.get(0) instanceof TileGeometry);\r\n\r\n return null;\r\n }", "private void resetPolygonsFlags() {\n for ( Polygon p : polygons ) {\n p.setOverlap(false);\n }\n }", "public boolean remove(T element, Point2D pos);", "@Override\n public void remove(Shape[] shapes) {\n\n }", "@Test\n public void testRemove_int_Order_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n Collection c = Arrays.asList(1, 1, 7, 1, 1, 1, 1);\n instance.addAll(c);\n\n instance.remove(2);\n\n List<Integer> expResult = Arrays.asList(1, 1, 1, 1, 1, 1);\n\n assertTrue(isEqual(expResult, instance));\n\n }", "@Override public byte isBitShape(Type t) { throw AA.unimpl(); }", "public boolean remove(IntSet remove){\n\t\tint index = contains(remove);\n\t\tif(index==-1){\n\t\t\treturn false;\n\t\t}\n\t\telse{\n\t\t\tcontents.remove(index);\n\t\t\treturn true;\n\t\t}\n\t}", "private void removeMappings() {\n\t\tfor (final VisualMappingFunction<?, ?> vm : validMappings)\n\t\t\tstyle.removeVisualMappingFunction(vm.getVisualProperty());\n\t}", "@Test\n public void testCityConnectionsRemoval(){\n boolean removed = cityDataHandler.removeCityMapperConnection(new CityMapper(\"Trenton\", \"Albany\"));\n assertThat(true, Matchers.equalTo(removed));\n int dataMapSize = cityDataHandler.countMap();\n assertThat(4, Matchers.equalTo(dataMapSize));\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jTabbedPane1 = new javax.swing.JTabbedPane();\n managerPanel = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n infoTextArea = new javax.swing.JTextArea();\n jScrollPane2 = new javax.swing.JScrollPane();\n projectTree = new javax.swing.JTree();\n filterField = new javax.swing.JTextField();\n runAllButton = new javax.swing.JButton();\n jLabel3 = new javax.swing.JLabel();\n prevButton = new javax.swing.JButton();\n nextButton = new javax.swing.JButton();\n posButton = new javax.swing.JButton();\n sameCheckBox = new javax.swing.JCheckBox();\n showAllButton = new javax.swing.JButton();\n showDiffButton = new javax.swing.JButton();\n showSameButton = new javax.swing.JButton();\n pSameCheckBox = new javax.swing.JCheckBox();\n diffCheckBox = new javax.swing.JCheckBox();\n notCheckBox = new javax.swing.JCheckBox();\n errorCheckBox = new javax.swing.JCheckBox();\n jSeparator4 = new javax.swing.JSeparator();\n showNotButton = new javax.swing.JButton();\n jProgressBar1 = new javax.swing.JProgressBar();\n jSeparator5 = new javax.swing.JSeparator();\n posButton1 = new javax.swing.JButton();\n prevButton1 = new javax.swing.JButton();\n nextButton1 = new javax.swing.JButton();\n masksPanel = new javax.swing.JPanel();\n jScrollPane3 = new javax.swing.JScrollPane();\n maskTree = new javax.swing.JTree();\n addMaskButton = new javax.swing.JButton();\n removeMaskButton = new javax.swing.JButton();\n saveMaskButton = new javax.swing.JButton();\n jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n jSeparator3 = new javax.swing.JSeparator();\n jScrollPane4 = new javax.swing.JScrollPane();\n masksList = new javax.swing.JList();\n removeSuiteMaskButton = new javax.swing.JButton();\n allowDrawButton = new javax.swing.JButton();\n addSuiteMaskButton = new javax.swing.JButton();\n configPanel = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n patternsPathField = new javax.swing.JTextField();\n samplesPathField = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n masksPathField = new javax.swing.JTextField();\n patternsButton = new javax.swing.JButton();\n samplesButton = new javax.swing.JButton();\n masksButton = new javax.swing.JButton();\n jLabel5 = new javax.swing.JLabel();\n pixelTresField = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n diffTresField = new javax.swing.JTextField();\n jLabel7 = new javax.swing.JLabel();\n diffAmountField = new javax.swing.JTextField();\n jLabel8 = new javax.swing.JLabel();\n jSeparator1 = new javax.swing.JSeparator();\n\n setTitle(\"ProjectManager\");\n\n infoTextArea.setEditable(false);\n infoTextArea.setColumns(20);\n infoTextArea.setLineWrap(true);\n infoTextArea.setRows(5);\n jScrollPane1.setViewportView(infoTextArea);\n\n jScrollPane2.setMaximumSize(null);\n\n javax.swing.tree.DefaultMutableTreeNode treeNode1 = new javax.swing.tree.DefaultMutableTreeNode(\"Test Cases\");\n projectTree.setModel(new javax.swing.tree.DefaultTreeModel(treeNode1));\n jScrollPane2.setViewportView(projectTree);\n\n filterField.setFont(new java.awt.Font(\"Ubuntu\", 2, 15)); // NOI18N\n\n runAllButton.setText(\"Run all\");\n runAllButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n runAllButtonActionPerformed(evt);\n }\n });\n\n jLabel3.setText(\"Filter :\");\n\n prevButton.setText(\"<\");\n prevButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n prevButtonActionPerformed(evt);\n }\n });\n\n nextButton.setText(\">\");\n nextButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n nextButtonActionPerformed(evt);\n }\n });\n\n posButton.setText(\"Accept\");\n posButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n posButtonActionPerformed(evt);\n }\n });\n\n sameCheckBox.setSelected(true);\n sameCheckBox.setText(\"Same\");\n sameCheckBox.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n sameCheckBoxActionPerformed(evt);\n }\n });\n\n showAllButton.setText(\"Show all\");\n showAllButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n showAllButtonActionPerformed(evt);\n }\n });\n\n showDiffButton.setText(\"Show differ\");\n showDiffButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n showDiffButtonActionPerformed(evt);\n }\n });\n\n showSameButton.setText(\"Show same\");\n showSameButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n showSameButtonActionPerformed(evt);\n }\n });\n\n pSameCheckBox.setSelected(true);\n pSameCheckBox.setText(\"Perceptually same\");\n pSameCheckBox.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n pSameCheckBoxActionPerformed(evt);\n }\n });\n\n diffCheckBox.setSelected(true);\n diffCheckBox.setText(\"Differ\");\n diffCheckBox.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n diffCheckBoxActionPerformed(evt);\n }\n });\n\n notCheckBox.setSelected(true);\n notCheckBox.setText(\"Not tested\");\n notCheckBox.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n notCheckBoxActionPerformed(evt);\n }\n });\n\n errorCheckBox.setSelected(true);\n errorCheckBox.setText(\"Error\");\n errorCheckBox.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n errorCheckBoxActionPerformed(evt);\n }\n });\n\n showNotButton.setText(\"Show not tested\");\n showNotButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n showNotButtonActionPerformed(evt);\n }\n });\n\n posButton1.setText(\"Uncheck\");\n posButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n posButton1ActionPerformed(evt);\n }\n });\n\n prevButton1.setText(\"<<\");\n prevButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n prevButton1ActionPerformed(evt);\n }\n });\n\n nextButton1.setText(\">>\");\n nextButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n nextButton1ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout managerPanelLayout = new javax.swing.GroupLayout(managerPanel);\n managerPanel.setLayout(managerPanelLayout);\n managerPanelLayout.setHorizontalGroup(\n managerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(managerPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(managerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 364, Short.MAX_VALUE)\n .addGroup(managerPanelLayout.createSequentialGroup()\n .addComponent(jLabel3)\n .addGap(51, 51, 51)\n .addComponent(filterField))\n .addComponent(jSeparator4)\n .addComponent(jSeparator5)\n .addGroup(managerPanelLayout.createSequentialGroup()\n .addGroup(managerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(managerPanelLayout.createSequentialGroup()\n .addGroup(managerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(showSameButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(showDiffButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(showAllButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(showNotButton, javax.swing.GroupLayout.DEFAULT_SIZE, 142, Short.MAX_VALUE))\n .addGap(18, 18, 18)\n .addGroup(managerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(notCheckBox)\n .addComponent(pSameCheckBox)\n .addComponent(diffCheckBox)\n .addComponent(errorCheckBox)\n .addComponent(sameCheckBox)))\n .addGroup(managerPanelLayout.createSequentialGroup()\n .addGroup(managerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(prevButton, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(prevButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(managerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(managerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jProgressBar1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(runAllButton, javax.swing.GroupLayout.PREFERRED_SIZE, 224, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(managerPanelLayout.createSequentialGroup()\n .addGroup(managerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(nextButton, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(nextButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(managerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(posButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(posButton, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE))))))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n managerPanelLayout.setVerticalGroup(\n managerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, managerPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(managerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(filterField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3))\n .addGroup(managerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(managerPanelLayout.createSequentialGroup()\n .addGap(14, 14, 14)\n .addComponent(sameCheckBox)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(pSameCheckBox)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(diffCheckBox)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(notCheckBox)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(errorCheckBox))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, managerPanelLayout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(showAllButton)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(showDiffButton)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(showSameButton)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(showNotButton)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 277, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator5, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(managerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(nextButton)\n .addComponent(prevButton)\n .addComponent(posButton))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(managerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(posButton1)\n .addComponent(nextButton1)\n .addComponent(prevButton1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(runAllButton)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jProgressBar1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(7, 7, 7))\n );\n\n jTabbedPane1.addTab(\"Manager\", managerPanel);\n\n treeNode1 = new javax.swing.tree.DefaultMutableTreeNode(\"root\");\n maskTree.setModel(new javax.swing.tree.DefaultTreeModel(treeNode1));\n jScrollPane3.setViewportView(maskTree);\n\n addMaskButton.setText(\"Add\");\n addMaskButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addMaskButtonActionPerformed(evt);\n }\n });\n\n removeMaskButton.setText(\"Remove\");\n removeMaskButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n removeMaskButtonActionPerformed(evt);\n }\n });\n\n saveMaskButton.setText(\"Save image\");\n saveMaskButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n saveMaskButtonActionPerformed(evt);\n }\n });\n\n jLabel9.setText(\"Masks in manager :\");\n\n jLabel10.setText(\"Masks in suite :\");\n\n masksList.setModel(new javax.swing.AbstractListModel() {\n String[] strings = { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\", \"Item 5\" };\n public int getSize() { return strings.length; }\n public Object getElementAt(int i) { return strings[i]; }\n });\n jScrollPane4.setViewportView(masksList);\n\n removeSuiteMaskButton.setText(\"Remove\");\n removeSuiteMaskButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n removeSuiteMaskButtonActionPerformed(evt);\n }\n });\n\n allowDrawButton.setText(\"Allow draw\");\n allowDrawButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n allowDrawButtonActionPerformed(evt);\n }\n });\n\n addSuiteMaskButton.setText(\"Add\");\n addSuiteMaskButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addSuiteMaskButtonActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout masksPanelLayout = new javax.swing.GroupLayout(masksPanel);\n masksPanel.setLayout(masksPanelLayout);\n masksPanelLayout.setHorizontalGroup(\n masksPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(masksPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(masksPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jSeparator3)\n .addGroup(masksPanelLayout.createSequentialGroup()\n .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 224, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 12, Short.MAX_VALUE)\n .addGroup(masksPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(addSuiteMaskButton, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(removeSuiteMaskButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(masksPanelLayout.createSequentialGroup()\n .addGroup(masksPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(masksPanelLayout.createSequentialGroup()\n .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 224, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(masksPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(addMaskButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(removeMaskButton, javax.swing.GroupLayout.DEFAULT_SIZE, 128, Short.MAX_VALUE)\n .addComponent(saveMaskButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(allowDrawButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addComponent(jLabel9)\n .addComponent(jLabel10))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n masksPanelLayout.setVerticalGroup(\n masksPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(masksPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel9)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(masksPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 196, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(masksPanelLayout.createSequentialGroup()\n .addComponent(addMaskButton)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(removeMaskButton)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(saveMaskButton)\n .addGap(18, 18, 18)\n .addComponent(allowDrawButton)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel10)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(masksPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(masksPanelLayout.createSequentialGroup()\n .addComponent(addSuiteMaskButton)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(removeSuiteMaskButton)))\n .addContainerGap(250, Short.MAX_VALUE))\n );\n\n jTabbedPane1.addTab(\"Masks\", masksPanel);\n\n jLabel1.setText(\"Patterns :\");\n\n patternsPathField.setText(\"path...\");\n patternsPathField.setDisabledTextColor(new java.awt.Color(0, 0, 0));\n patternsPathField.setEnabled(false);\n\n samplesPathField.setBackground(new java.awt.Color(255, 255, 255));\n samplesPathField.setText(\"path...\");\n samplesPathField.setDisabledTextColor(new java.awt.Color(0, 0, 0));\n samplesPathField.setEnabled(false);\n\n jLabel2.setText(\"Samples :\");\n\n jLabel4.setText(\"Masks :\");\n\n masksPathField.setBackground(new java.awt.Color(255, 255, 255));\n masksPathField.setText(\"path...\");\n masksPathField.setDisabledTextColor(new java.awt.Color(0, 0, 0));\n masksPathField.setEnabled(false);\n\n patternsButton.setText(\"Set\");\n patternsButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n patternsButtonActionPerformed(evt);\n }\n });\n\n samplesButton.setText(\"Set\");\n samplesButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n samplesButtonActionPerformed(evt);\n }\n });\n\n masksButton.setText(\"Set\");\n masksButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n masksButtonActionPerformed(evt);\n }\n });\n\n jLabel5.setText(\"One pixel treshold :\");\n\n jLabel6.setText(\"Global difference treshold :\");\n\n jLabel7.setText(\"Global difference amount :\");\n\n jLabel8.setText(\"%\");\n\n javax.swing.GroupLayout configPanelLayout = new javax.swing.GroupLayout(configPanel);\n configPanel.setLayout(configPanelLayout);\n configPanelLayout.setHorizontalGroup(\n configPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(configPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(configPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jSeparator1)\n .addGroup(configPanelLayout.createSequentialGroup()\n .addGroup(configPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(patternsPathField)\n .addComponent(samplesPathField)\n .addComponent(masksPathField, javax.swing.GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 23, Short.MAX_VALUE)\n .addGroup(configPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(masksButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(samplesButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(patternsButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(configPanelLayout.createSequentialGroup()\n .addGroup(configPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jLabel2)\n .addComponent(jLabel4)\n .addComponent(jLabel5)\n .addComponent(jLabel6)\n .addComponent(pixelTresField, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(diffTresField, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7)\n .addGroup(configPanelLayout.createSequentialGroup()\n .addComponent(diffAmountField, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel8)))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n configPanelLayout.setVerticalGroup(\n configPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(configPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(configPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(patternsPathField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(patternsButton))\n .addGap(18, 18, 18)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(configPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(samplesPathField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(samplesButton))\n .addGap(18, 18, 18)\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(configPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(masksPathField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(masksButton))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(pixelTresField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel6)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(diffTresField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel7)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(configPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(diffAmountField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel8))\n .addContainerGap(302, Short.MAX_VALUE))\n );\n\n jTabbedPane1.addTab(\"Configuration\", configPanel);\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(jTabbedPane1)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 758, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n\n pack();\n }", "public int getPartsMask()\r\n/* 62: */ {\r\n/* 63: 52 */ return this.CoverSides | 0x20000000;\r\n/* 64: */ }", "@Override\npublic void removeAll(Collection<Integer> collection) {\n\t\n}", "void clearShapeMap();", "void removeControlPersonsExt(int i);", "public List<Mask> getMasks() {\n return Collections.unmodifiableList(masks);\n }", "public void removeOverlayObj(IOverlay a)\n/* 96: */ {\n/* 97:153 */ this.mapPanel.removeOverlayObj(a);\n/* 98: */ }", "void removeLanes(int i);", "void setCollideBits (long bits);", "@Test\n public void testRemove() {\n System.out.println(\"remove\");\n\n Piece piece = new Piece(PlayerColor.WHITE, 3);\n Player instance = new Player(PlayerColor.WHITE, \"\");\n\n instance.remove(piece);\n\n assertFalse(instance.getBagContent().contains(piece));\n\n }", "public boolean remove(int val) {\n if (!realSet.contains(val)) return false;\n if (realSet.size() > 10 && realSet.size() == allSet.length / 4) {\n Integer[] tmpSet = new Integer[size * 2];\n int not = 0;\n for (int i = 0; i < size; i ++) {\n if (allSet[i] == null) {\n not ++;\n continue;\n }\n tmpSet[i - not] = allSet[i];\n }\n size -= not;\n allSet = tmpSet;\n }\n realSet.remove(val);\n return true;\n }", "void tryRemoveNodes(Collection<Node> nodesToRemove) throws Exception;", "public boolean removeElement(Object obj);", "void clearModifiedFlag();", "@SuppressWarnings(\"unchecked\")\r\n private Void removeGeometriesAnswer()\r\n {\r\n List<Geometry> adds = (List<Geometry>)EasyMock.getCurrentArguments()[1];\r\n List<Geometry> removes = (List<Geometry>)EasyMock.getCurrentArguments()[2];\r\n\r\n assertTrue(adds.isEmpty());\r\n\n // 121\r\n assertEquals(140, removes.size());\r\n boolean hasLines = false;\r\n boolean hasMeshes = false;\r\n boolean hasFootprint = false;\r\n boolean hasImage = false;\r\n\r\n for (Geometry geom : removes)\r\n {\r\n if (geom instanceof PolygonGeometry)\r\n {\r\n hasFootprint = true;\r\n }\r\n else if (geom instanceof PolylineGeometry)\r\n {\r\n hasLines = true;\r\n }\r\n else if (geom instanceof PolygonMeshGeometry)\r\n {\r\n hasMeshes = true;\r\n }\r\n else if (geom instanceof TileGeometry)\r\n {\r\n hasImage = true;\r\n }\r\n }\r\n\r\n assertTrue(hasLines);\r\n assertTrue(hasMeshes);\r\n assertTrue(hasFootprint);\r\n assertTrue(hasImage);\r\n\r\n return null;\r\n }", "@Test\r\n\t\tpublic void testDeleteElement() {\n\t\t\ttestingSet= new IntegerSet(list1);\r\n\t\t\tInteger array[] = testingSet.toArray(); \r\n\t\t\ttestingSet.deleteElement(0);\r\n\t\t\t// check to see if the first element in the set still exists\r\n\t\t\t// should result to false \r\n\t\t\tassertEquals(testingSet.exists(array[0]), false); \r\n\t\t}", "@Test\r\n public void removeAndSize() throws Exception {\r\n TreeSet<Integer> s = new TreeSet<>();\r\n s.addAll(sInt);\r\n assertTrue(s.remove(2));\r\n assertEquals(4, s.size());\r\n assertFalse(s.remove(2));\r\n assertEquals(4, s.size());\r\n }", "boolean remove(String elementId);", "public void testInverseRemoveItem()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkRemove(pmf,\r\n HashMap2.class,\r\n HashMap2Item.class);\r\n }\r\n finally\r\n {\r\n clean(HashMap2.class);\r\n clean(HashMap2Item.class);\r\n }\r\n }", "@Test\n public void testIsValidonNotConnectedMap() {\n mapModel.removeLink(\"TerritoryD\", \"TerritoryC\");\n\n boolean expResult = false;\n boolean result = mapModel.isValid();\n assertEquals(expResult, result);\n }", "@Test\n public void mapRemove() {\n check(MAPREM);\n query(MAPSIZE.args(MAPREM.args(MAPENTRY.args(1, 2), 1)), 0);\n }", "@Test\n\tpublic void testRemoveAll() {\n\t\tSet<Integer> setA = new HashSet<>(Arrays.asList(1, 2, 3, 4, 5));\n\t\tSet<Integer> setB = new HashSet<>(Arrays.asList(9, 8, 7, 6, 5, 4, 3));\n\t\tsetA.removeAll(setB);\n\t\tSet<Integer> union = new HashSet<>(Arrays.asList(1, 2));\n\t\tassertEquals(setA, union);\n\t}", "@Test\n public void testRemove_Contains_Size() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(1);\n instance.add(1);\n instance.add(2);\n instance.add(1);\n\n instance.remove(new Integer(1));\n\n int expResult = 3;\n int result = instance.size();\n assertEquals(expResult, result);\n }", "@Test\n public void testRemoveAll_Not_Empty() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(1);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n instance.removeAll(c);\n\n int expectedResult = 1;\n assertEquals(expectedResult, instance.size());\n\n }", "@objid (\"3497729a-1481-4a27-95dc-ad28d935364c\")\n protected abstract MObject transmuteElement(MObject elementToBeTransmuted, IMModelServices modelServices);", "public void setContactFilter(short categoryBits, short groupIndex, short maskBits);", "@Test(priority = 15)\n public void unselectCheckboxesTest() {\n driver.findElement(By.xpath(\"//label[@class='label-checkbox'][1]/input\")).click();\n driver.findElement(By.xpath(\"//label[@class='label-checkbox'][3]/input\")).click();\n assertFalse(driver.findElement(By.xpath(\"//label[@class='label-checkbox'][1]/input\"))\n .isSelected());\n assertFalse(driver.findElement(By.xpath(\"//label[@class='label-checkbox'][3]/input\"))\n .isSelected());\n }", "public void removeEffectFromSpecialBrick(){\r\n\t\t\t// return everything to the original\r\n\t\t\tColor origColor = (specialBrickId.equals(\"Rect0\"))? discsColors[0]:(specialBrickId.equals(\"Rect1\"))? discsColors[1]:\r\n\t\t\t\t\t\t (specialBrickId.equals(\"Rect2\"))? discsColors[2]:(specialBrickId.equals(\"Rect3\"))? discsColors[3]:\r\n\t\t\t\t\t\t (specialBrickId.equals(\"Rect4\"))? discsColors[4]:(specialBrickId.equals(\"Rect5\"))? discsColors[5]:\r\n\t\t\t\t\t\t (specialBrickId.equals(\"Rect6\"))? discsColors[6]:(specialBrickId.equals(\"Rect7\"))? discsColors[7]:null; \r\n\t\t\tint origWidth = (specialBrickId.equals(\"Rect0\"))? 30:(specialBrickId.equals(\"Rect1\"))? 60:\r\n\t\t\t\t\t\t\t(specialBrickId.equals(\"Rect2\"))? 90:(specialBrickId.equals(\"Rect3\"))? 120:\r\n\t\t\t\t\t\t\t(specialBrickId.equals(\"Rect4\"))? 150:(specialBrickId.equals(\"Rect5\"))? 180:\r\n\t\t\t\t\t\t\t(specialBrickId.equals(\"Rect6\"))? 210:(specialBrickId.equals(\"Rect7\"))? 240:null;\r\n\t\t\tRectangle rect = new Rectangle(origWidth,20, origColor);\r\n\t\t\trect.setId(specialBrickId);\r\n\t\t\trect.setStroke(Color.BLACK);\r\n\t\t\trect.setStrokeWidth(3);\r\n\t\t\t\t\t\t\r\n\t\t\tswitch(specialBrickTower){\r\n\t\t\t\tcase \"firstTower\":\r\n\t\t\t\t\tfor(int i=0; i<firstTower.getChildren().size(); i++){ // cycle through the tower to check which one is the special brick\r\n\t\t\t\t\t\tif (firstTower.getChildren().get(i).getId().equals(specialBrickId)){\r\n\t\t\t\t\t\t\tfirstTower.getChildren().set(i, rect); // then reset it\r\n\t\t\t\t\t}}\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"secondTower\":\r\n\t\t\t\t\tfor(int i=0; i<secondTower.getChildren().size(); i++){\r\n\t\t\t\t\t\tif (secondTower.getChildren().get(i).getId().equals(specialBrickId)){\r\n\t\t\t\t\t\t\tsecondTower.getChildren().set(i, rect);\r\n\t\t\t\t\t}}\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"thirdTower\":\r\n\t\t\t\t\tfor(int i=0; i<thirdTower.getChildren().size(); i++){\r\n\t\t\t\t\t\tif (thirdTower.getChildren().get(i).getId().equals(specialBrickId)){\r\n\t\t\t\t\t\t\tthirdTower.getChildren().set(i, rect);\r\n\t\t\t\t\t}}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\trect.widthProperty().bind(scene.widthProperty().divide(3).subtract(250-origWidth));\r\n\t\t\trect.heightProperty().bind(scene.heightProperty().divide(19));\r\n\t\t\r\n\t\tif(countDownRunning){towersRegion.getChildren().remove(2);countDownRunning=false;} // remove the count down watch from the screen\t\t\r\n\t\tspecialBrickId=null; // reset the special brick id\r\n\t}", "public void clearMapLayers() {\n if(internalNative != null) {\n internalNative.removeAllMarkers();\n markers.clear();\n } else {\n if(internalLightweightCmp != null) {\n internalLightweightCmp.removeAllLayers();\n points = null;\n } else {\n // TODO: Browser component \n }\n }\n }" ]
[ "0.73096293", "0.55831945", "0.55326957", "0.5252909", "0.5178419", "0.5164393", "0.5144593", "0.51260036", "0.50794804", "0.50671875", "0.50338423", "0.49995467", "0.49973473", "0.4976424", "0.49717358", "0.4970811", "0.49672726", "0.49627584", "0.4962534", "0.49602014", "0.49503273", "0.4930332", "0.48952425", "0.4887552", "0.48874095", "0.48856494", "0.4865569", "0.48532203", "0.48491454", "0.48427197", "0.4820262", "0.48167378", "0.4805016", "0.4804289", "0.47999573", "0.47919795", "0.47906828", "0.4780229", "0.47758216", "0.47736433", "0.4772883", "0.4770464", "0.47658882", "0.4759926", "0.47593665", "0.4758417", "0.47569236", "0.475353", "0.47415143", "0.4733581", "0.4733581", "0.4731974", "0.47287464", "0.4724045", "0.4718788", "0.47186443", "0.47177613", "0.47093418", "0.47051877", "0.47035876", "0.4699455", "0.46926206", "0.46905985", "0.4684941", "0.46785396", "0.46761695", "0.46740553", "0.46590722", "0.46565014", "0.46468332", "0.46463367", "0.46374327", "0.4636123", "0.4632883", "0.46314263", "0.46298718", "0.46290055", "0.4623735", "0.46221897", "0.46171337", "0.4612013", "0.46100238", "0.46008274", "0.45964777", "0.45935455", "0.45912087", "0.4583125", "0.45774862", "0.45736054", "0.45730343", "0.457248", "0.45637769", "0.4552762", "0.45481992", "0.45466015", "0.4544954", "0.45436653", "0.45431635", "0.45372233", "0.45354322" ]
0.72964936
1
Set up a graph with two vertices and two transactions on layer 1.
private void setupGraph() { graph = new DualGraph(SchemaFactoryUtilities.getSchemaFactory(VisualSchemaFactory.VISUAL_SCHEMA_ID).createSchema()); try { WritableGraph wg = graph.getWritableGraph("", true); // Create LayerMask attributes layerMaskV = LayersConcept.VertexAttribute.LAYER_MASK.ensure(wg); layerMaskT = LayersConcept.TransactionAttribute.LAYER_MASK.ensure(wg); // Create LayerVisilibity Attributes layerVisibilityV = LayersConcept.VertexAttribute.LAYER_VISIBILITY.ensure(wg); layerVisibilityT = LayersConcept.TransactionAttribute.LAYER_VISIBILITY.ensure(wg); // Create Selected Attributes selectedV = VisualConcept.VertexAttribute.SELECTED.ensure(wg); selectedT = VisualConcept.TransactionAttribute.SELECTED.ensure(wg); // Adding 2 Vertices - not selected, layer 1, visible vxId1 = wg.addVertex(); wg.setIntValue(layerMaskV, vxId1, 1); wg.setFloatValue(layerVisibilityV, vxId1, 1.0f); wg.setBooleanValue(selectedV, vxId1, false); vxId2 = wg.addVertex(); wg.setIntValue(layerMaskV, vxId2, 1); wg.setFloatValue(layerVisibilityV, vxId2, 1.0f); wg.setBooleanValue(selectedV, vxId2, false); // Adding 2 Transactions - not selected, layer 1, visible txId1 = wg.addTransaction(vxId1, vxId2, true); wg.setIntValue(layerMaskT, txId1, 1); wg.setFloatValue(layerVisibilityT, txId1, 1.0f); wg.setBooleanValue(selectedT, txId1, false); txId2 = wg.addTransaction(vxId1, vxId2, false); wg.setIntValue(layerMaskT, txId2, 1); wg.setFloatValue(layerVisibilityT, vxId2, 1.0f); wg.setBooleanValue(selectedT, vxId2, false); wg.commit(); } catch (final InterruptedException ex) { Exceptions.printStackTrace(ex); Thread.currentThread().interrupt(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void graph3() {\n\t\tconnect(\"0\", \"0\");\n\t\tconnect(\"2\", \"2\");\n\t\tconnect(\"2\", \"3\");\n\t\tconnect(\"3\", \"0\");\n\t}", "void graph2() {\n\t\tconnect(\"1\", \"7\");\n\t\tconnect(\"1\", \"8\");\n\t\tconnect(\"1\", \"9\");\n\t\tconnect(\"9\", \"1\");\n\t\tconnect(\"9\", \"0\");\n\t\tconnect(\"9\", \"4\");\n\t\tconnect(\"4\", \"8\");\n\t\tconnect(\"4\", \"3\");\n\t\tconnect(\"3\", \"4\");\n\t}", "TripleGraph createTripleGraph();", "private void fourNodesTopo() {\n ReadWriteTransaction tx = dataBroker.newReadWriteTransaction();\n n(tx, true, \"n1\", Stream.of(pB(\"n1:1\"), pB(\"n1:2\"), pI(\"n1:3\"), pO(\"n1:4\"), pO(\"n1:5\")));\n n(tx, true, \"n2\", Stream.of(pB(\"n2:1\"), pB(\"n2:2\"), pO(\"n2:3\"), pI(\"n2:4\"), pI(\"n2:5\")));\n n(tx, true, \"n3\", Stream.of(pB(\"n3:1\"), pB(\"n3:2\"), pO(\"n3:3\"), pO(\"n3:4\"), pI(\"n3:5\")));\n n(tx, true, \"n4\", Stream.of(pB(\"n4:1\"), pB(\"n4:2\"), pI(\"n4:3\"), pI(\"n4:4\"), pO(\"n4:5\")));\n l(tx, \"n1\", \"n1:5\", \"n2\", \"n2:5\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n l(tx, \"n1\", \"n1:4\", \"n4\", \"n4:4\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n l(tx, \"n2\", \"n2:3\", \"n4\", \"n4:3\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n l(tx, \"n3\", \"n3:4\", \"n2\", \"n2:4\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n l(tx, \"n4\", \"n4:5\", \"n3\", \"n3:5\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n try {\n tx.submit().checkedGet();\n } catch (TransactionCommitFailedException e) {\n e.printStackTrace();\n }\n }", "public Graph() {\n\t\ttowns = new HashSet<Town>();\n\t\troads = new HashSet<Road>();\n\t\tprevVertex = new HashMap<String, Town>();\n\t}", "@Test\n void testAddVertexGraph() {\n Assertions.assertTrue(graph.addVertex(v1));\n Assertions.assertTrue(graph.containsVertex(v1));\n Assertions.assertTrue(checkInv());\n }", "private void initGraph() {\n nodeMap = Maps.newIdentityHashMap();\n stream.forEach(t -> {\n Object sourceKey = sourceId.extractValue(t.get(sourceId.getTableId()));\n Object targetKey = targetId.extractValue(t.get(targetId.getTableId()));\n ClosureNode sourceNode = nodeMap.get(sourceKey);\n ClosureNode targetNode = nodeMap.get(targetKey);\n if (sourceNode == null) {\n sourceNode = new ClosureNode(sourceKey);\n nodeMap.put(sourceKey, sourceNode);\n }\n if (targetNode == null) {\n targetNode = new ClosureNode(targetKey);\n nodeMap.put(targetKey, targetNode);\n }\n sourceNode.next.add(targetNode);\n });\n\n }", "private void buildGraph()\n\t{\n\t\taddVerticesToGraph();\n\t\taddLinkesToGraph();\n\t}", "public OrientGraph getGraphTx();", "void createGraphForDistributedSingleLoad();", "private void populateConnections()\n {\n IndoorVertex elevatorFloor1 = new IndoorVertex(building, new XYPos(1050, 40), 1);\n IndoorVertex stairsFloor1 = new IndoorVertex(building, new XYPos(1056.25, 28.13), 1);\n\n firstFloorStairsElevator.add(stairsFloor1);\n firstFloorStairsElevator.add(elevatorFloor1);\n\n IndoorVertex stairsFloor2 = new IndoorVertex(building, new XYPos(1049.43, 160.49), 2);\n IndoorVertex elevatorFloor2 = new IndoorVertex(building, new XYPos(1044.19, 151.19), 2);\n\n secondFloorStairsElevator.add(stairsFloor2);\n secondFloorStairsElevator.add(elevatorFloor2);\n\n IndoorVertex stairsFloor3 = new IndoorVertex(building, new XYPos(1033.75, 28.13), 3);\n IndoorVertex elevatorFloor3 = new IndoorVertex(building, new XYPos(1028.75, 37.5), 3);\n\n thirdFloorStairsElevator.add(stairsFloor3);\n thirdFloorStairsElevator.add(elevatorFloor3);\n\n IndoorVertex stairsFloor4 = new IndoorVertex(building, new XYPos(1033.75, 28.13), 4);\n IndoorVertex elevatorFloor4 = new IndoorVertex(building, new XYPos(1028.75, 37.5), 4);\n\n fourthFloorStairsElevator.add(stairsFloor4);\n fourthFloorStairsElevator.add(elevatorFloor4);\n\n IndoorVertex stairsFloor5 = new IndoorVertex(building, new XYPos(1033.75, 28.13), 5);\n IndoorVertex elevatorFloor5 = new IndoorVertex(building, new XYPos(1028.75, 37.5), 5);\n\n firstFloorStairsElevator.add(stairsFloor5);\n fifthFloorStairsElevator.add(elevatorFloor5);\n\n //Stair connections to one another\n connectVertex(stairsFloor1, stairsFloor2);\n connectVertex(stairsFloor1, stairsFloor3);\n connectVertex(stairsFloor1, stairsFloor4);\n connectVertex(stairsFloor1, stairsFloor5);\n connectVertex(stairsFloor2, stairsFloor3);\n connectVertex(stairsFloor2, stairsFloor4);\n connectVertex(stairsFloor2, stairsFloor5);\n connectVertex(stairsFloor3, stairsFloor4);\n connectVertex(stairsFloor3, stairsFloor5);\n connectVertex(stairsFloor4, stairsFloor5);\n\n //Elevator connections to one another\n connectVertex(elevatorFloor1, elevatorFloor2);\n connectVertex(elevatorFloor1, elevatorFloor3);\n connectVertex(elevatorFloor1, elevatorFloor4);\n connectVertex(elevatorFloor1, elevatorFloor5);\n connectVertex(elevatorFloor2, elevatorFloor3);\n connectVertex(elevatorFloor2, elevatorFloor4);\n connectVertex(elevatorFloor2, elevatorFloor5);\n connectVertex(elevatorFloor3, elevatorFloor4);\n connectVertex(elevatorFloor3, elevatorFloor5);\n connectVertex(elevatorFloor4, elevatorFloor5);\n\n //Creation of each floors connections\n createFloor1Connections(stairsFloor1, elevatorFloor1);\n createFloor2Connections(stairsFloor2, elevatorFloor2);\n createFloor3Connections(stairsFloor3, elevatorFloor3);\n createFloor4Connections(stairsFloor4, elevatorFloor4);\n createFloor5Connections(stairsFloor5, elevatorFloor5);\n }", "Vertex createVertex();", "public void edgeMake(int vertex1, int vertex2) {\n addVertex(vertex1); // both vertices added to the set\n addVertex(vertex2);\n adjacencyMap.get(vertex1).add(vertex2); // both vertices receive the edge\n adjacencyMap.get(vertex2).add(vertex1);\n }", "public void testAddVertex() {\n System.out.println(\"addVertex\");\n\n Graph<Integer, Edge<Integer>> graph = newGraph();\n\n for (int i = 0; i < 25; i++) {\n Assert.assertTrue(graph.addVertex(new Integer(i)));\n }\n\n for (int i = 0; i < 25; i++) {\n Assert.assertFalse(graph.addVertex(new Integer(i)));\n }\n }", "void createGraphForSingleLoad();", "public void setGraph(Graph<V,E> graph);", "public void addTwoWayVertex(String node1, String node2) {\r\n addEdge(node1, node2);\r\n addEdge(node2, node1);\r\n }", "private void connectVertex(IndoorVertex indoorV1, IndoorVertex indoorV2)\n {\n XYPos firstPos = indoorV1.getPosition();\n XYPos secondPos = indoorV2.getPosition();\n\n //Change in only X position means that the vertex's are East/West of eachother\n //Change in only Y position means that the vertex's are North/South of eachother\n if(firstPos.getX() > secondPos.getX() && Math.floor(firstPos.getY() - secondPos.getY()) == 0.0)\n {\n indoorV1.addWestConnection(indoorV2);\n indoorV2.addEastConnection(indoorV1);\n }\n else if(firstPos.getX() < secondPos.getX() && Math.floor(firstPos.getY() - secondPos.getY()) == 0.0)\n {\n indoorV1.addEastConnection(indoorV2);\n indoorV2.addWestConnection(indoorV1);\n }\n else if(firstPos.getY() > secondPos.getY() && Math.floor(firstPos.getX() - secondPos.getX()) == 0.0)\n {\n indoorV1.addSouthConnection(indoorV2);\n indoorV2.addNorthConnection(indoorV1);\n }\n else if(firstPos.getY() < secondPos.getY() && Math.floor(firstPos.getX() - secondPos.getX()) == 0.0)\n {\n indoorV1.addNorthConnection(indoorV2);\n indoorV2.addSouthConnection(indoorV1);\n }\n\n\n indoorV1.addConnection(indoorV2);\n indoorV2.addConnection(indoorV1);\n }", "Graph(){\n\t\taddNode();\n\t\tcurrNode=myNodes.get(0);\n\t}", "public Graph1 (Constraints C, Interface source, Interface target, int controlIn, int controlOut) {\n this.C = C;\n this.source = source;\n this.target = target;\n this.controlIn = controlIn;\n this.controlOut = controlOut;\n left = C.newHVar ();\n right = C.newHVar ();\n bot = C.newVVar ();\n top = C.newVVar ();\n C.gap2 (left,right);\n C.gap1 (controlIn,top);\n C.gap2 (source.topOr(bot),controlIn);\n C.gap1 (bot,source.botOr(controlIn));\n C.gap1 (controlOut,top);\n C.gap2 (target.topOr(bot),controlOut);\n C.gap1 (bot,target.botOr(controlOut));\n }", "public void addAndConnectSignal(Signal x, int op1_index, int op2_index) throws Exception\r\n\t{\r\n\t\tvertices.add(x);\r\n\t\tint newIndex = vertices.size() - 1;\r\n\t\tx.id = newIndex;\r\n\t\tleaves.add(newIndex);\r\n\t\tedges.add(new Pair(op1_index, newIndex));\r\n\t\tleaves.set(op1_index, 0);\r\n\t\tedges.add(new Pair(op2_index, newIndex));\r\n\t\tleaves.set(op2_index, 0);\r\n\t}", "private void fiveNodesTopo() {\n ReadWriteTransaction tx = dataBroker.newReadWriteTransaction();\n n(tx, true, \"n1\", Stream.of(pI(\"n1:1\"), pB(\"n1:2\"), pI(\"n1:3\"), pO(\"n1:4\")));\n n(tx, true, \"n2\", Stream.of(pI(\"n2:1\"), pB(\"n2:2\"), pO(\"n2:3\"), pI(\"n2:4\")));\n n(tx, true, \"n3\", Stream.of(pO(\"n3:1\"), pB(\"n3:2\"), pO(\"n3:3\"), pI(\"n3:4\")));\n n(tx, true, \"n4\", Stream.of(pO(\"n4:1\"), pI(\"n4:2\"), pB(\"n4:3\"), pB(\"n4:4\")));\n n(tx, true, \"n5\", Stream.of(pI(\"n5:1\"), pB(\"n5:2\"), pB(\"n5:3\"), pO(\"n5:4\")));\n l(tx, \"n2\", \"n2:3\", \"n3\", \"n3:4\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n l(tx, \"n3\", \"n3:1\", \"n1\", \"n1:1\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n l(tx, \"n3\", \"n3:3\", \"n5\", \"n5:1\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n l(tx, \"n4\", \"n4:1\", \"n1\", \"n1:3\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n l(tx, \"n1\", \"n1:4\", \"n2\", \"n2:4\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n l(tx, \"n5\", \"n5:4\", \"n4\", \"n4:2\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n try {\n tx.submit().checkedGet();\n } catch (TransactionCommitFailedException e) {\n e.printStackTrace();\n }\n }", "protected void addVertices(IWeightedGraph<GraphNode, WeightedEdge> graph, List<GoapState> goalState) {\r\n\t\t// The effects from the world state as well as the precondition of each\r\n\t\t// goal have to be set at the beginning, since these are the effects the\r\n\t\t// unit tries to archive with its actions. Also the startNode has to\r\n\t\t// overwrite the existing GraphNode as an initialization of a new Object\r\n\t\t// would not be reflected to the function caller.\r\n\t\tGraphNode start = new GraphNode(null, this.goapUnit.getWorldState());\r\n\t\tthis.startNode.overwriteOwnProperties(start);\r\n\t\tgraph.addVertex(this.startNode);\r\n\r\n\t\tfor (GoapState state : goalState) {\r\n\t\t\tHashSet<GoapState> goalStateHash = new HashSet<GoapState>();\r\n\t\t\tgoalStateHash.add(state);\r\n\r\n\t\t\tGraphNode end = new GraphNode(goalStateHash, null);\r\n\t\t\tgraph.addVertex(end);\r\n\t\t\tthis.endNodes.add(end);\r\n\t\t}\r\n\r\n\t\tHashSet<GoapAction> possibleActions = extractPossibleActions();\r\n\r\n\t\t// Afterward all other possible actions have to be added as well.\r\n\t\tif (possibleActions != null) {\r\n\t\t\tfor (GoapAction goapAction : possibleActions) {\r\n\t\t\t\tgraph.addVertex(new GraphNode(goapAction));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void addVertex();", "public void buildGraph(){\n\t}", "public Graph() {\r\n\t\tthis.matrix = new Matrix();\r\n\t\tthis.listVertex = new ArrayList<Vertex>();\r\n\t}", "void makeSampleGraph() {\n\t\tg.addVertex(\"a\");\n\t\tg.addVertex(\"b\");\n\t\tg.addVertex(\"c\");\n\t\tg.addVertex(\"d\");\n\t\tg.addVertex(\"e\");\n\t\tg.addVertex(\"f\");\n\t\tg.addVertex(\"g\");\n\t\tg.addEdge(\"a\", \"b\");\n\t\tg.addEdge(\"b\", \"c\");\n\t\tg.addEdge(\"b\", \"f\");\n\t\tg.addEdge(\"c\", \"d\");\n\t\tg.addEdge(\"d\", \"e\");\n\t\tg.addEdge(\"e\", \"f\");\n\t\tg.addEdge(\"e\", \"g\");\n\t}", "public Graph(int numberOfVertices){\r\n this.numberOfVertices = numberOfVertices;\r\n this.adjacencyList = new TreeMap<>();\r\n }", "Vertex(){}", "AdjacencyGraph(){\r\n vertices = new HashMap<>();\r\n }", "public static Graph makeMeAGraph(Set<Operation> operations, State init){\n Graph graph = new implementGraph(operations , init) ;\n return graph;\n\n\t //\t throw new NotImplementedException();\n }", "@Test \r\n void insert_two_vertexs_then_create_edge(){\r\n graph.addVertex(\"A\");\r\n graph.addVertex(\"B\");\r\n graph.addEdge(\"A\", \"B\");\r\n List<String> adjacentA = graph.getAdjacentVerticesOf(\"A\");\r\n List<String> adjacentB = graph.getAdjacentVerticesOf(\"B\");\r\n if(!adjacentA.contains(\"B\")) { \r\n fail();\r\n }\r\n if(adjacentB.contains(\"A\")) { \r\n fail();\r\n }\r\n }", "private void addVerticesToGraph()\n\t{\n\t\tString vertexName;\n\n\t\tMap<Long, IOFSwitch> switches = this.floodlightProvider.getSwitches();\n\t\tfor(IOFSwitch s :switches.values())\n\t\t{\n\t\t\tvertexName =Long.toString(s.getId());\n\t\t\tm_graph.addVertex(vertexName);\t\t\t \t\t\t \n\t\t}\n\t\tSystem.out.println(m_graph);\n\t}", "public void joinGraph(IGraph graph);", "@Test\n public void tr2()\n {\n Graph graph = new Graph(2);\n Set<Integer> sources = new TreeSet<Integer>();\n Set<Integer> targets = new TreeSet<Integer>();\n sources.add(0);\n targets.add(1);\n graph.addEdge(0,1);\n assertTrue(graph.reachable(sources, targets));\n\n\n }", "public static void main(String[] args) {\n\t\tVertex v1, v2, v3, v4, v5, v6, v7;\n\t\tv1 = new Vertex(\"v1\");\n\t\tv2 = new Vertex(\"v2\");\n\t\tv3 = new Vertex(\"v3\");\n\t\tv4 = new Vertex(\"v4\");\n\t\tv5 = new Vertex(\"v5\");\n\t\tv6 = new Vertex(\"v6\");\n\t\tv7 = new Vertex(\"v7\");\n\n\t\tv1.addAdjacency(v2, 2);\n\t\tv1.addAdjacency(v3, 4);\n\t\tv1.addAdjacency(v4, 1);\n\n\t\tv2.addAdjacency(v1, 2);\n\t\tv2.addAdjacency(v4, 3);\n\t\tv2.addAdjacency(v5, 10);\n\n\t\tv3.addAdjacency(v1, 4);\n\t\tv3.addAdjacency(v4, 2);\n\t\tv3.addAdjacency(v6, 5);\n\n\t\tv4.addAdjacency(v1, 1);\n\t\tv4.addAdjacency(v2, 3);\n\t\tv4.addAdjacency(v3, 2);\n\t\tv4.addAdjacency(v5, 2);\n\t\tv4.addAdjacency(v6, 8);\n\t\tv4.addAdjacency(v7, 4);\n\n\t\tv5.addAdjacency(v2, 10);\n\t\tv5.addAdjacency(v4, 2);\n\t\tv5.addAdjacency(v7, 6);\n\n\t\tv6.addAdjacency(v3, 5);\n\t\tv6.addAdjacency(v4, 8);\n\t\tv6.addAdjacency(v7, 1);\n\n\t\tv7.addAdjacency(v4, 4);\n\t\tv7.addAdjacency(v5, 6);\n\t\tv7.addAdjacency(v6, 1);\n\n\t\tArrayList<Vertex> weightedGraph = new ArrayList<Vertex>();\n\t\tweightedGraph.add(v1);\n\t\tweightedGraph.add(v2);\n\t\tweightedGraph.add(v3);\n\t\tweightedGraph.add(v4);\n\t\tweightedGraph.add(v5);\n\t\tweightedGraph.add(v6);\n\t\tweightedGraph.add(v7);\n\t\t\n\t\tdijkstra( weightedGraph, v7 );\n\t\tprintPath( v1 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v2 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v3 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v4 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v5 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v6 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v7 );\n\t\tSystem.out.println(\"\");\n\t}", "public void connect(int first, int second) {\n\t\tvertex.get(first).add(second);\n\t}", "Graph(List<Edge> edges) {\n\n //one pass to find all vertices\n // this step avoid add isolated coordinates to the graph\n for (Edge e : edges) {\n if (!graph.containsKey(e.startNode)) {\n graph.put(e.startNode, new Node(e.startNode));\n }\n if (!graph.containsKey(e.endNode)) {\n graph.put(e.endNode, new Node(e.endNode));\n }\n }\n\n //another pass to set neighbouring vertices\n for (Edge e : edges) {\n graph.get(e.startNode).neighbours.put(graph.get(e.endNode), e.weight);\n //graph.get(e.v2).neighbours.put(graph.get(e.v1), e.dist); // also do this for an undirected graph\n }\n }", "public TransactionBuilder checkInternalVertexExistence();", "private void createGraphs() {\n initialGraphCreation.accept(caller, listener);\n graphCustomization.accept(caller, listener);\n caller.generateAndAdd(params.getNumCallerEvents(), callerAddToGraphTest);\n listener.generateAndAdd(params.getNumListenerEvents(), listenerAddToGraphTest);\n generationDefinitions.accept(caller, listener);\n }", "@Test\n public void cyclicalGraphs2Test() throws Exception {\n // Test history tracking -- the \"last a\" in g1 and g2 below and\n // different kinds of nodes topologically. At k=4 this becomes apparent\n // with kTails, if we start at the first 'a'.\n\n ChainsTraceGraph g1 = new ChainsTraceGraph();\n List<EventNode> g1Nodes = addNodesToGraph(g1, new String[] { \"a\", \"b\",\n \"c\", \"d\" });\n // Create a loop in g1, with 4 nodes\n g1Nodes.get(0).addTransition(g1Nodes.get(1), Event.defTimeRelationStr);\n g1Nodes.get(1).addTransition(g1Nodes.get(2), Event.defTimeRelationStr);\n g1Nodes.get(2).addTransition(g1Nodes.get(3), Event.defTimeRelationStr);\n g1Nodes.get(3).addTransition(g1Nodes.get(0), Event.defTimeRelationStr);\n exportTestGraph(g1, 0);\n\n // g1.a is k-equivalent to g1.a for all k\n for (int k = 1; k < 6; k++) {\n testKEqual(g1Nodes.get(0), g1Nodes.get(0), k);\n }\n\n ChainsTraceGraph g2 = new ChainsTraceGraph();\n List<EventNode> g2Nodes = addNodesToGraph(g2, new String[] { \"a\", \"b\",\n \"c\", \"d\", \"a\" });\n // Create a chain from a to a'.\n g2Nodes.get(0).addTransition(g2Nodes.get(1), Event.defTimeRelationStr);\n g2Nodes.get(1).addTransition(g2Nodes.get(2), Event.defTimeRelationStr);\n g2Nodes.get(2).addTransition(g2Nodes.get(3), Event.defTimeRelationStr);\n g2Nodes.get(3).addTransition(g2Nodes.get(4), Event.defTimeRelationStr);\n exportTestGraph(g2, 1);\n\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 1);\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 2);\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 3);\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 4);\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 5);\n\n testNotKEqual(g1Nodes.get(0), g2Nodes.get(0), 6);\n testNotKEqual(g1Nodes.get(0), g2Nodes.get(0), 7);\n }", "public void addVertex (){\t\t \n\t\tthis.graph.insert( new MyList<Integer>() );\n\t}", "@Test\r\n void test_insert_same_vertex_twice() {\r\n graph.addVertex(\"1\");\r\n graph.addVertex(\"1\"); \r\n graph.addVertex(\"1\"); \r\n vertices = graph.getAllVertices();\r\n if(vertices.size() != 1 ||graph.order() != 1) {\r\n fail();\r\n }\r\n }", "public Graph() {\r\n\t\tinit();\r\n\t}", "private void transPose(graph g) {\n\t\tIterator it = g.getV().iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tnode_data temp = (node_data) it.next();\n\t\t\tif(g.getE(temp.getKey())!=null) {\n\t\t\t\tIterator it1 = g.getE(temp.getKey()).iterator();\n\t\t\t\twhile (it1.hasNext()) {\n\t\t\t\t\tedge_data temp1 = (edge_data) it1.next();\n\t\t\t\t\tif (temp1 != null && temp1.getTag() == 0) {\n\t\t\t\t\t\tif (g.getEdge(temp1.getDest(), temp1.getSrc()) != null) {\n\t\t\t\t\t\t\tEdge temps = new Edge((Edge)g.getEdge(temp1.getSrc(),temp1.getDest()));\n\t\t\t\t\t\t\tdouble weight1 = g.getEdge(temp1.getSrc(),temp1.getDest()).getWeight();\n\t\t\t\t\t\t\tdouble weight2 = g.getEdge(temp1.getDest(),temp1.getSrc()).getWeight();\n\t\t\t\t\t\t\tg.connect(temp1.getSrc(),temp1.getDest(),weight2);\n\t\t\t\t\t\t\tg.connect(temps.getDest(),temps.getSrc(),weight1);\n\t\t\t\t\t\t\tg.getEdge(temps.getDest(), temps.getSrc()).setTag(1);\n\t\t\t\t\t\t\tg.getEdge(temps.getSrc(),temps.getDest()).setTag(1);\n\t\t\t\t\t\t\tit1 = g.getE(temp.getKey()).iterator();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tg.connect(temp1.getDest(), temp1.getSrc(), temp1.getWeight());\n\t\t\t\t\t\t\tg.getEdge(temp1.getDest(), temp1.getSrc()).setTag(1);\n\t\t\t\t\t\t\tg.removeEdge(temp1.getSrc(), temp1.getDest());\n\t\t\t\t\t\t\tit1 = g.getE(temp.getKey()).iterator();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void testCreateAndSetOnSameVertexShouldCreateOnlyVertexOnly() {\n }", "Graph(int vertices) {\r\n this.numVertices = vertices;\r\n adjacencylist = new LinkedList[vertices];\r\n //initialize adjacency lists for all the vertices\r\n for (int i = 0; i <vertices ; i++) {\r\n adjacencylist[i] = new LinkedList<>();\r\n }\r\n }", "@Test\n public void tr3()\n {\n Graph graph = new Graph(2);\n Set<Integer> sources = new TreeSet<Integer>();\n Set<Integer> targets = new TreeSet<Integer>();\n sources.add(0);\n targets.add(1);\n graph.addEdge(1,0);\n assertFalse(graph.reachable(sources, targets));\n }", "@Test\n void test01_addVertex() {\n graph.addVertex(\"a\");\n graph.addVertex(\"b\"); // adds two vertices\n\n Set<String> vertices = new LinkedHashSet<>();\n vertices.add(\"a\");\n vertices.add(\"b\"); // creates a check list to compare with\n\n if (!graph.getAllVertices().equals(vertices)) {\n fail(\"Graph didn't add the vertices correctly\");\n }\n }", "@Test\n void test03_addEdgeBetweenVerticesWhichDontExist() {\n graph.addEdge(\"a\", \"b\");\n Set<String> vertices = new LinkedHashSet<>();\n vertices.add(\"a\");\n vertices.add(\"b\"); // creates mock up vertex list\n if (!graph.getAllVertices().equals(vertices)) { // compares vertices list\n fail(\"Graph didn't add the vertices correctly\");\n }\n List<String> adjOfA = new ArrayList<>();\n adjOfA.add(\"b\"); // creates mock up adjacent list\n if (!graph.getAdjacentVerticesOf(\"a\").equals(adjOfA)) { // compares adjacent lists\n fail(\"Graph didn't correctly place adjacent vertices\");\n }\n }", "public Graph()\r\n {\r\n this( \"x\", \"y\" );\r\n }", "public static void main(String args[])\n\t{\n\t\tList<Vertex> v = new LinkedList<Vertex>();\n\t\tVertex v1 = new Vertex(1);\n\t\tVertex v2 = new Vertex(2);\n\t\tVertex v3 = new Vertex(3);\n \t\tVertex v4 = new Vertex(4);\n\t\t\n \t\t//Setting adjList for each vertex\n \t\tList<Vertex> adjList = new LinkedList<Vertex>();\n\t\tadjList.add(v2);\n\t\tadjList.add(v3);\n\t\tv1.setAdjList(adjList);\n\t\t\n\t\tadjList = new LinkedList<Vertex>();\n\t\tadjList.add(v4);\n\t\tv2.setAdjList(adjList);\n\t\t\n\t\tadjList = new LinkedList<Vertex>();\n\t\tadjList.add(v2);\n\t\tv3.setAdjList(adjList);\n\t\t\n\t\tadjList = new LinkedList<Vertex>();\n\t\tadjList.add(v3);\n\t\tv4.setAdjList(adjList);\n\t\t\n\t\tv.add(v1);\n\t\tv.add(v2);\n \t\tv.add(v3);\n\t\tv.add(v4);\n\n\t\tEdge e1 = new Edge(1, 2);\n\t\tList<Edge> e = new LinkedList<Edge>();\n\t\te.add(e1);\n\t\te1 = new Edge(1, 3);\n\t\te.add(e1);\n\t\te1 = new Edge(2, 4);\n\t\te.add(e1);\n\t\te1 = new Edge(4, 3);\n\t\te.add(e1);\n\t\te1 = new Edge(3, 2);\n\t\te.add(e1);\n\t\t\n\t\t\n\t\tGraph g = new Graph(v, e);\n\t\tg.bfs(v4);\n\t\t\n\t\t//v has all vertices\n\t\tg.unconnected(v2, v);\n\t}", "@Test\n\tpublic void addVertexTest() {\n\t\tgraph.addVertex(A);\n\t\tgraph.addVertex(B);\n\t\tgraph.addVertex(C);\n\t\tgraph.addVertex(D);\n\t\tassertEquals(4, graph.vertices().size());\n\t\tassertTrue(graph.vertices().contains(A));\n\t\tassertTrue(graph.vertices().contains(B));\n\t\tassertTrue(graph.vertices().contains(D));\n\t\tassertFalse(graph.addVertex(B)); // the graph has already have the vertex B, so assert false here.\n\t}", "private static void addTripToGraph(Trip newTrip, Graph<Node, WeightEdge> graph, List<Node> depots, List<Node> trips, Problem problem){\n Node tripStart = new Node(newTrip, 0, false);\n Node tripEnd = new Node(newTrip, 0, true);\n\n graph.addVertex(tripStart);\n graph.addVertex(tripEnd);\n\n // Add weightEdgeWithBounders from trip startPoint to trip endPoint\n // lowerBound and upperBound for this edges is 1, because we are looking for solution that saturates all trips\n WeightEdge tripInternalWeightEdge = new BoundedWeightEdge(1,1);\n graph.addEdge(tripStart, tripEnd, tripInternalWeightEdge);\n graph.setEdgeWeight(tripInternalWeightEdge, 0);\n\n for(Node depot : depots){\n if(depot.isExitNode()){ // is source\n // add weightEdgeWithBounders from depot source to trip startPoint\n WeightEdge depotToTripWeightEdge = new BoundedWeightEdge(0, 1);\n graph.addEdge(depot, tripStart, depotToTripWeightEdge);\n graph.setEdgeWeight(depotToTripWeightEdge, problem.getCost(depot.getLocation(), tripStart.getLocation()).toMinutes());\n }else{ // is depot sink\n // add weightEdgeWithBounders from trip endPoint to depot sink\n WeightEdge tripToDepotWeightEdge = new BoundedWeightEdge(0, 1);\n graph.addEdge(tripEnd, depot, tripToDepotWeightEdge);\n graph.setEdgeWeight(tripToDepotWeightEdge, problem.getCost(tripEnd.getLocation(), depot.getLocation()).toMinutes());\n }\n }\n\n for(Node otherTrip : trips){\n if(otherTrip.isExitNode()){\n // add feasible edges from all trips endPoints to this trip startPoint\n if(isFeasibleEdge(otherTrip, tripStart, problem)){\n WeightEdge otherTripToThisTrip = new BoundedWeightEdge(0, 1);\n graph.addEdge(otherTrip, tripStart, otherTripToThisTrip);\n graph.setEdgeWeight(otherTripToThisTrip, problem.getCost(otherTrip.getLocation(), tripStart.getLocation()).toMinutes());\n }\n }else{\n // add feasible edges from this trip endPoint to all trips startPoints\n if(isFeasibleEdge(tripEnd, otherTrip, problem)){\n WeightEdge thisTripToOtherTrip = new BoundedWeightEdge(0, 1);\n graph.addEdge(tripEnd, otherTrip, thisTripToOtherTrip);\n graph.setEdgeWeight(thisTripToOtherTrip, problem.getCost(tripEnd.getLocation(), otherTrip.getLocation()).toMinutes());\n }\n }\n }\n\n // add this nodes in our trips list;\n trips.add(tripStart);\n trips.add(tripEnd);\n }", "public void setVertex(Object vertex2){\r\n this.vertex = vertex2;\r\n }", "public ArangoDBVertex() {\n\t\tsuper();\n\t}", "public SubGraph(){\r\n\t\tsuper();\r\n\t}", "public Graph(ArrayList<Town> verticesList){\n\t\tthis.vertices = new HashMap<String, Vertex>();\n\t\tthis.edges = new HashMap<Integer, Edge>();\n\t\t\n\t\tfor(Town v : verticesList){\n\t\t\tthis.vertices.put(v.getName(), v);\n\t\t}\n\t}", "void addEdge(Vertex v1, Vertex v2, Double w) throws VertexNotInGraphException;", "Graph(){\n\t\tadjlist = new HashMap<String, Vertex>();\n\t\tvertices = 0;\n\t\tedges = 0;\n\t\tkeys = new ArrayList<String>();\n\t}", "protected void createTopologyGraph() {\n graph = new TopologyGraph(roots, boundaries);\n\n // check and resolve conflicts about input priorities\n AbstractExecNodeExactlyOnceVisitor inputPriorityVisitor =\n new AbstractExecNodeExactlyOnceVisitor() {\n @Override\n protected void visitNode(ExecNode<?> node) {\n if (!boundaries.contains(node)) {\n visitInputs(node);\n }\n updateTopologyGraph(node);\n }\n };\n roots.forEach(n -> n.accept(inputPriorityVisitor));\n }", "@Override\n public void storeToGraph(Set<GraphContext> graphContext) {\n\n graphContext.forEach(entry -> {\n try {\n LineageEntity fromEntity = entry.getFromVertex();\n LineageEntity toEntity = entry.getToVertex();\n\n upsertToGraph(fromEntity, toEntity, entry.getRelationshipType(), entry.getRelationshipGuid());\n } catch (Exception e) {\n log.error(VERTICES_AND_RELATIONSHIP_CREATION_EXCEPTION, e);\n }\n });\n }", "public static void runTest() {\n Graph mnfld = new Graph();\n float destTank = 7f;\n\n // Adding Tanks\n mnfld.addPipe( new Node( 0f, 5.0f ) );\n mnfld.addPipe( new Node( 1f, 5.0f ) );\n mnfld.addPipe( new Node( 7f, 5.0f ) );\n\n // Adding Pipes\n mnfld.addPipe( new Node( 2f, 22f, 100f ) );\n mnfld.addPipe( new Node( 3f, 33f, 150f ) );\n mnfld.addPipe( new Node( 4f, 44f, 200f ) );\n mnfld.addPipe( new Node( 5f, 55f, 250f ) );\n mnfld.addPipe( new Node( 6f, 66f, 300f ) );\n mnfld.addPipe( new Node( 8f, 88f, 200f ) );\n mnfld.addPipe( new Node( 9f, 99f, 150f ) );\n mnfld.addPipe( new Node( 10f, 1010f, 150f ) );\n mnfld.addPipe( new Node( 20f, 2020f, 150f ) );\n\n // Inserting Edges to the graph\n mnfld.insertConnection( new Edge( mnfld.getPipe( 0f ), mnfld.getPipe( 2f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 0f ), mnfld.getPipe( 3f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 1f ), mnfld.getPipe( 2f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 22f ), mnfld.getPipe( 4f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 33f ), mnfld.getPipe( 5f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 44f ), mnfld.getPipe( 5f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 44f ), mnfld.getPipe( 7f ), 500f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 55f ), mnfld.getPipe( 6f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 66f ), mnfld.getPipe( 7f ), 100f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 66f ), mnfld.getPipe( 8f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 88f ), mnfld.getPipe( 7f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 33f ), mnfld.getPipe( 9f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 99f ), mnfld.getPipe( 5f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 33f ), mnfld.getPipe( 1010f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 1010f ), mnfld.getPipe( 7f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 1f ), mnfld.getPipe( 20f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 2020f ), mnfld.getPipe( 3f ), 1f ) );\n\n // -- Running Dijkstra & Finding shortest Paths -- //\n// Dijkstra.findPaths( mnfld, 10, \"0.0\", destTank );\n//\n// mnfld.restoreDroppedConnections();\n//\n// System.out.println( \"\\n\\n\" );\n Dijkstra.findMinPaths( mnfld, mnfld.getPipe( 0f ) );\n Dijkstra.mergePaths( mnfld, 1f, mnfld.getPipe( destTank ).getPath(), mnfld.getPipe( destTank ) );\n\n }", "private void createFloor2Connections(IndoorVertex stairs, IndoorVertex elevator)\n {\n armesConnectionNorth = new IndoorVertex(building, new XYPos(1000, 151.19), 2);\n armesConnectionSouth = new IndoorVertex(building, new XYPos(1000, 158.75), 2);\n IndoorVertex rm239_fac_science = new IndoorVertex(building, new XYPos(1030.24, 97.11), 2);\n IndoorVertex _30_151 = new IndoorVertex(building, new XYPos(1030.24, 151.19), 2);\n IndoorVertex _30_179 = new IndoorVertex(building, new XYPos(1030.24, 179.65), 2);\n exit = new IndoorVertex(building, new XYPos(1030.24, 188.41), 2);\n IndoorVertex rm211_library = new IndoorVertex(building, new XYPos(1080.25, 173.29), 2);\n IndoorVertex _44_160 = new IndoorVertex(building, new XYPos(1044.19, 160.49), 2);\n IndoorVertex _44_173 = new IndoorVertex(building, new XYPos(1044.19, 173.29), 2);\n IndoorVertex _30_173 = new IndoorVertex(building, new XYPos(1030.24, 173.29), 2);\n IndoorVertex _30_158 = new IndoorVertex(building, new XYPos(1030.24, 158.75), 2);\n IndoorVertex _44_154 = new IndoorVertex(building, new XYPos(1044.19, 154.1), 2);\n IndoorVertex _30_154 = new IndoorVertex(building, new XYPos(1030.24, 154.1), 2);\n\n //Rooms\n ArrayList<IndoorVertex> rm211 = new ArrayList<>();\n rm211.add(rm211_library);\n\n rooms.put(\"211\", rm211);\n\n ArrayList<IndoorVertex> rm239 = new ArrayList<>();\n rm239.add(rm239_fac_science);\n\n rooms.put(\"239\", rm239);\n\n //Connections to other points\n connectVertex(armesConnectionSouth, _30_158);\n connectVertex(armesConnectionNorth, _30_151);\n connectVertex(_30_151, rm239_fac_science);\n connectVertex(_30_151, _30_154);\n connectVertex(_30_154, _44_154);\n connectVertex(_30_154, _30_158);\n connectVertex(_30_158, _44_154);\n connectVertex(_30_158, _44_160);\n connectVertex(_30_158, _30_173);\n connectVertex(_30_173, _44_173);\n connectVertex(_30_173, _30_179);\n connectVertex(_30_179, exit);\n connectVertex(_44_154, elevator);\n connectVertex(_44_154, _44_160);\n connectVertex(_44_160, stairs);\n connectVertex(_44_160, _44_173);\n connectVertex(_44_173, rm211_library);\n\n }", "@Test\n public void cyclicalGraphs3Test() throws Exception {\n // Test graphs with multiple loops. g1 has two different loops, which\n // have to be correctly matched to g2 -- which is build in a different\n // order but is topologically identical to g1.\n\n ChainsTraceGraph g1 = new ChainsTraceGraph();\n List<EventNode> g1Nodes = addNodesToGraph(g1, new String[] { \"a\", \"b\",\n \"c\", \"d\", \"b\", \"c\" });\n\n // Create loop1 in g1, with the first 4 nodes.\n g1Nodes.get(0).addTransition(g1Nodes.get(1), Event.defTimeRelationStr);\n g1Nodes.get(1).addTransition(g1Nodes.get(2), Event.defTimeRelationStr);\n g1Nodes.get(2).addTransition(g1Nodes.get(3), Event.defTimeRelationStr);\n g1Nodes.get(3).addTransition(g1Nodes.get(0), Event.defTimeRelationStr);\n\n // Create loop2 in g1, with the last 2 nodes, plus the initial node.\n g1Nodes.get(0).addTransition(g1Nodes.get(4), Event.defTimeRelationStr);\n g1Nodes.get(4).addTransition(g1Nodes.get(5), Event.defTimeRelationStr);\n g1Nodes.get(5).addTransition(g1Nodes.get(0), Event.defTimeRelationStr);\n\n exportTestGraph(g1, 0);\n\n // //////////////////\n // Now create g2, by generating the two identical loops in the reverse\n // order.\n\n ChainsTraceGraph g2 = new ChainsTraceGraph();\n List<EventNode> g2Nodes = addNodesToGraph(g2, new String[] { \"a\", \"b\",\n \"c\", \"d\", \"b\", \"c\" });\n\n // Create loop2 in g2, with the last 2 nodes, plus the initial node.\n g2Nodes.get(0).addTransition(g2Nodes.get(4), Event.defTimeRelationStr);\n g2Nodes.get(4).addTransition(g2Nodes.get(5), Event.defTimeRelationStr);\n g2Nodes.get(5).addTransition(g2Nodes.get(0), Event.defTimeRelationStr);\n\n // Create loop1 in g2, with the first 4 nodes.\n g2Nodes.get(0).addTransition(g2Nodes.get(1), Event.defTimeRelationStr);\n g2Nodes.get(1).addTransition(g2Nodes.get(2), Event.defTimeRelationStr);\n g2Nodes.get(2).addTransition(g2Nodes.get(3), Event.defTimeRelationStr);\n g2Nodes.get(3).addTransition(g2Nodes.get(0), Event.defTimeRelationStr);\n\n exportTestGraph(g2, 1);\n\n // //////////////////\n // Now test that the two graphs are identical for all k starting at the\n // initial node.\n\n for (int k = 1; k < 7; k++) {\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), k);\n }\n }", "public static void generateAndSaveExampleGraph() {\n EuclidDirectedGraph graph1 = new EuclidDirectedGraph();\n //vertexes added and created edge\n BoundsGraphVertex ver1 = new BoundsGraphVertex(10, 10, \"source\");\n BoundsGraphVertex ver2 = new BoundsGraphVertex(10, 30, \"secondNode\");\n BoundsGraphVertex ver3 = new BoundsGraphVertex(10, 40, \"thirdNode\");\n BoundsGraphVertex ver4 = new BoundsGraphVertex(10, 50, \"sink\");\n BoundsGraphVertex ver5 = new BoundsGraphVertex(10, 60, \"fiveNode - loop from second\");\n BoundsGraphVertex ver6 = new BoundsGraphVertex(10, 70, \"sixNode - loop from five\");\n BoundsGraphVertex ver7 = new BoundsGraphVertex(10, 80, \"sevenNode - loop from six to third\");\n\n graph1.addNode(ver1);\n graph1.addNode(ver2);\n graph1.addNode(ver3);\n graph1.addNode(ver4);\n graph1.addNode(ver5);\n graph1.addNode(ver6);\n graph1.addNode(ver7);\n //use .addEuclidEdge to compute edge's length automatically\n graph1.addEuclidEdge(ver1, ver2);\n graph1.addEuclidEdge(ver2, ver3);\n graph1.addEuclidEdge(ver3, ver4);\n graph1.addEuclidEdge(ver2, ver5);\n graph1.addEuclidEdge(ver5, ver6);\n graph1.addEuclidEdge(ver6, ver7);\n graph1.addEuclidEdge(ver7, ver3);\n //created graph #2\n EuclidDirectedGraph graph2 = new EuclidDirectedGraph();\n try {\n //save into file from graph #1\n XMLSerializer.write(graph1, \"input.xml\", false);\n //read from file into graph #2\n graph2 = (EuclidDirectedGraph) XMLSerializer.read(\"input.xml\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public static ArrayList<Vertex> initializeGraph() {\n\t\tVertex uVertex = new Vertex('u');\n\t\tVertex vVertex = new Vertex('v');\n\t\tVertex wVertex = new Vertex('w');\n\t\tVertex xVertex = new Vertex('x');\n\t\tVertex yVertex = new Vertex('y');\n\t\tVertex zVertex = new Vertex('z');\n\t\t\n\t\tVertex[] uAdjacencyList = {xVertex, vVertex};\n\t\tuVertex.setAdjacencyList(createArrayList( uAdjacencyList ));\n\t\t\n\t\tVertex[] vAdjacencyList = {yVertex};\n\t\tvVertex.setAdjacencyList(createArrayList( vAdjacencyList ));\n\t\t\n\t\tVertex[] wAdjacencyList = {zVertex, yVertex};\n\t\twVertex.setAdjacencyList(createArrayList( wAdjacencyList ));\n\t\t\n\t\tVertex[] xAdjacencyList = {vVertex};\n\t\txVertex.setAdjacencyList(createArrayList( xAdjacencyList ));\n\t\t\n\t\tVertex[] yAdjacencyList = {xVertex};\n\t\tyVertex.setAdjacencyList(createArrayList( yAdjacencyList ));\n\t\t\n\t\tVertex[] zAdjacencyList = {zVertex};\n\t\tzVertex.setAdjacencyList(createArrayList( zAdjacencyList ));\n\n\t\tVertex[] graph = { uVertex, vVertex, wVertex, xVertex, yVertex, zVertex};\n\t\treturn createArrayList( graph );\n\n\t}", "protected void fillDataset(Dataset dataset) {\n dataset.getDefaultModel().getGraph().add(SSE.parseTriple(\"(<x> <p> 'Default graph')\")) ;\n \n Model m1 = dataset.getNamedModel(graph1) ;\n m1.getGraph().add(SSE.parseTriple(\"(<x> <p> 'Graph 1')\")) ;\n m1.getGraph().add(SSE.parseTriple(\"(<x> <p> 'ZZZ')\")) ;\n \n Model m2 = dataset.getNamedModel(graph2) ;\n m2.getGraph().add(SSE.parseTriple(\"(<x> <p> 'Graph 2')\")) ;\n m2.getGraph().add(SSE.parseTriple(\"(<x> <p> 'ZZZ')\")) ;\n calcUnion.add(m1) ;\n calcUnion.add(m2) ;\n }", "@Test\n public void cyclicalGraphs1Test() throws Exception {\n // NOTE: we can't use the parser to create a circular graph because\n // vector clocks are partially ordered and do not admit cycles. So we\n // have to create circular graphs manually.\n ChainsTraceGraph g1 = new ChainsTraceGraph();\n List<EventNode> g1Nodes = addNodesToGraph(g1, new String[] { \"a\", \"a\",\n \"a\" });\n // Create a loop in g1, with 3 nodes\n g1Nodes.get(0).addTransition(g1Nodes.get(1), Event.defTimeRelationStr);\n g1Nodes.get(1).addTransition(g1Nodes.get(2), Event.defTimeRelationStr);\n g1Nodes.get(2).addTransition(g1Nodes.get(0), Event.defTimeRelationStr);\n exportTestGraph(g1, 0);\n\n ChainsTraceGraph g2 = new ChainsTraceGraph();\n List<EventNode> g2Nodes = addNodesToGraph(g2, new String[] { \"a\", \"a\" });\n // Create a loop in g2, with 2 nodes\n g2Nodes.get(0).addTransition(g2Nodes.get(1), Event.defTimeRelationStr);\n g2Nodes.get(1).addTransition(g2Nodes.get(0), Event.defTimeRelationStr);\n exportTestGraph(g2, 1);\n\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 1);\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 2);\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 3);\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 4);\n\n ChainsTraceGraph g3 = new ChainsTraceGraph();\n List<EventNode> g3Nodes = addNodesToGraph(g2, new String[] { \"a\" });\n // Create a loop in g3, from a to itself\n g3Nodes.get(0).addTransition(g3Nodes.get(0), Event.defTimeRelationStr);\n exportTestGraph(g3, 2);\n\n testKEqual(g3Nodes.get(0), g2Nodes.get(0), 1);\n testKEqual(g3Nodes.get(0), g2Nodes.get(0), 2);\n testKEqual(g3Nodes.get(0), g2Nodes.get(0), 3);\n\n ChainsTraceGraph g4 = new ChainsTraceGraph();\n List<EventNode> g4Nodes = addNodesToGraph(g2, new String[] { \"a\" });\n exportTestGraph(g4, 2);\n\n testKEqual(g4Nodes.get(0), g2Nodes.get(0), 1);\n testNotKEqual(g4Nodes.get(0), g2Nodes.get(0), 2);\n testNotKEqual(g4Nodes.get(0), g2Nodes.get(0), 3);\n testNotKEqual(g4Nodes.get(0), g2Nodes.get(0), 4);\n }", "private void commitTransaction(GraphTraversalSource g) {\n if (graphFactory.isSupportingTransactions()) {\n g.tx().commit();\n }\n }", "public Graph()\r\n\t{\r\n\t\tthis.adjacencyMap = new HashMap<String, HashMap<String,Integer>>();\r\n\t\tthis.dataMap = new HashMap<String,E>();\r\n\t}", "@Test\n public void testAddVertices() throws Exception {\n\n final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();\n\n Graph<Long, Long, Long> graph =\n Graph.fromDataSet(\n TestGraphUtils.getLongLongVertexData(env),\n TestGraphUtils.getLongLongEdgeData(env),\n env);\n\n List<Vertex<Long, Long>> vertices = new ArrayList<>();\n // the first vertex has a duplicate ID from a vertex in the graph and\n // should not be added to the new graph\n vertices.add(new Vertex<>(5L, 0L));\n vertices.add(new Vertex<>(6L, 6L));\n vertices.add(new Vertex<>(7L, 7L));\n\n graph = graph.addVertices(vertices);\n\n DataSet<Vertex<Long, Long>> data = graph.getVertices();\n List<Vertex<Long, Long>> result = data.collect();\n\n expectedResult = \"1,1\\n\" + \"2,2\\n\" + \"3,3\\n\" + \"4,4\\n\" + \"5,5\\n\" + \"6,6\\n\" + \"7,7\\n\";\n\n compareResultAsTuples(result, expectedResult);\n }", "private void addConnection(Vertex v, Vertex v1, boolean twoway_road) {\n\t\tif(v == null || v1 == null) return;\r\n\t\tv1.addEdge(new Edge(v1, v));\r\n\t\tif (twoway_road)\r\n\t\t\tv1.addEdge(new Edge(v, v1));\r\n\t}", "private Graph<Node, DefaultEdge> addNodes(Graph<Node, DefaultEdge> g) {\n List<Node> nodes = nodeRepository.findAll();\n nodes.forEach(g::addVertex);\n return g;\n }", "private void transferLocal(Graph graph) {\n Set<NodePair> nonadjacencies = nonadjacencies(graph);\n for (Graph pag : input) {\n for (Edge edge : pag.getEdges()) {\n NodePair graphNodePair = new NodePair(graph.getNode(edge.getNode1().getName()), graph.getNode(edge.getNode2().getName()));\n if (nonadjacencies.contains(graphNodePair)) {\n continue;\n }\n if (!graph.isAdjacentTo(graphNodePair.getFirst(), graphNodePair.getSecond())) {\n graph.addEdge(new Edge(graphNodePair.getFirst(), graphNodePair.getSecond(), edge.getEndpoint1(), edge.getEndpoint2()));\n continue;\n }\n Endpoint first = edge.getEndpoint1();\n Endpoint firstCurrent = graph.getEndpoint(graphNodePair.getSecond(), graphNodePair.getFirst());\n if (!first.equals(Endpoint.CIRCLE)) {\n if ((first.equals(Endpoint.ARROW) && firstCurrent.equals(Endpoint.TAIL)) ||\n (first.equals(Endpoint.TAIL) && firstCurrent.equals(Endpoint.ARROW))) {\n graph.setEndpoint(graphNodePair.getSecond(), graphNodePair.getFirst(), Endpoint.CIRCLE);\n } else {\n graph.setEndpoint(graphNodePair.getSecond(), graphNodePair.getFirst(), edge.getEndpoint1());\n }\n }\n Endpoint second = edge.getEndpoint2();\n Endpoint secondCurrent = graph.getEndpoint(graphNodePair.getFirst(), graphNodePair.getSecond());\n if (!second.equals(Endpoint.CIRCLE)) {\n if ((second.equals(Endpoint.ARROW) && secondCurrent.equals(Endpoint.TAIL)) ||\n (second.equals(Endpoint.TAIL) && secondCurrent.equals(Endpoint.ARROW))) {\n graph.setEndpoint(graphNodePair.getFirst(), graphNodePair.getSecond(), Endpoint.CIRCLE);\n } else {\n graph.setEndpoint(graphNodePair.getFirst(), graphNodePair.getSecond(), edge.getEndpoint2());\n }\n }\n }\n for (Triple triple : pag.getUnderLines()) {\n Triple graphTriple = new Triple(graph.getNode(triple.getX().getName()), graph.getNode(triple.getY().getName()), graph.getNode(triple.getZ().getName()));\n if (graphTriple.alongPathIn(graph)) {\n graph.addUnderlineTriple(graphTriple.getX(), graphTriple.getY(), graphTriple.getZ());\n definiteNoncolliders.add(graphTriple);\n }\n }\n }\n }", "private static void addDepotToGraph(Depot newDepot, Graph<Node, WeightEdge> graph, List<Node> depots, List<Node> trips, Problem problem){\n Node depotSource = new Node(newDepot, newDepot.getNumberOfVehicles(), true);\n graph.addVertex(depotSource);\n depots.add(depotSource);\n\n // add the depot sink vertex\n Node depotSink = new Node(newDepot, -newDepot.getNumberOfVehicles(), false);\n graph.addVertex(depotSink);\n depots.add(depotSink);\n\n // add edges from this depot source to all existing trips entry\n // add edges from all existing trips exit to this depot sink\n for(Node trip : trips){\n if(!trip.isExitNode()){\n // from depot source to trip startPoint\n WeightEdge depotToTripWeightEdge = new BoundedWeightEdge(0, 1);\n graph.addEdge(depotSource, trip, depotToTripWeightEdge);\n graph.setEdgeWeight(depotToTripWeightEdge, problem.getCost(depotSource.getLocation(), trip.getLocation()).toMinutes());\n }else{ //ending point\n // from trip endPoint to depot sink\n WeightEdge tripToDepotWeightEdge = new BoundedWeightEdge(0, 1);\n graph.addEdge(trip, depotSink, tripToDepotWeightEdge);\n graph.setEdgeWeight(tripToDepotWeightEdge, problem.getCost(trip.getLocation(), depotSink.getLocation()).toMinutes());\n }\n }\n\n // add arc from depot source to depot sink with lowerBound: 0 end upperBound: depot.numberOfAvailableVehicles\n // this arc is necessary when some vehicles in the depot are nod used\n Integer numberOfAvailableVehicles = ((Depot) depotSource.getLocation()).getNumberOfVehicles();\n WeightEdge sourceToSinkWeightEdge = new BoundedWeightEdge(0, numberOfAvailableVehicles);\n graph.addEdge(depotSource, depotSink, sourceToSinkWeightEdge);\n graph.setEdgeWeight(sourceToSinkWeightEdge, 0);\n\n }", "@Test\r\n void create_edge_between_null_vertexes() {\r\n graph.addEdge(null, \"B\");\r\n graph.addEdge(\"A\", null);\r\n graph.addEdge(null, null);\r\n vertices = graph.getAllVertices();\r\n List<String> adjacentA = graph.getAdjacentVerticesOf(\"A\");\r\n List<String> adjacentB = graph.getAdjacentVerticesOf(\"B\");\r\n if(!vertices.isEmpty() | !adjacentA.isEmpty() | !adjacentB.isEmpty()) {\r\n fail();\r\n } \r\n }", "Graph(int n){\r\n numberOfVertices = n;\r\n adjacentVertices = new LinkedList[numberOfVertices];\r\n for (int i = 0; i < numberOfVertices; i++){\r\n adjacentVertices[i] = new LinkedList<>();\r\n }\r\n }", "void buildSettlement(VertexLocation vert, boolean free);", "protected AbstractGraph(List<Edges> edges,List<V> vertices){\n\t\t\n\t\tfor(int i=0;i<vertices.size();i++)\n\t\t\tthis.vertices.add(vertices.get(i));\n\t\t\n\t\tcreateAdjacencyLists(edges,vertices.size());\t\t\n\t}", "private Graph<Node, DefaultEdge> initialiseSpaceGraph() {\n Graph<Node, DefaultEdge> g = new SimpleGraph<>(DefaultEdge.class);\n g = addNodes(g);\n g = addEdges(g);\n return g;\n }", "public void logicalToBoltGraph() {\n\t\tDefaultDirectedGraph<FStream, IndexedEdge<FStream>> G = (DefaultDirectedGraph<FStream, IndexedEdge<FStream>>) _graph.clone();\n\t\tint bolt_counter = 0;\n\n\t\tremoveMerges(G);\n\t\t\n\t\tArrayDeque<FStream> stack = new ArrayDeque<FStream>();\n\t\t\t\t\n\t\t// Look for the actual spouts in the graph.\n\t\tfor (FStream n : G.vertexSet()) {\n\t\t\tif (n.getType() == FStream.NodeType.SPOUT) {\n\t\t\t\tstack.add(n);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// State for building the topology.\n\t\tboltMap = new HashMap<FStream, FlexyBolt>();\n\t\t// The edges link specific internal nodes between the bolts -- yes, it hurts my head too.\n\t\tboltG =\tnew DefaultDirectedGraph<FlexyBolt, IndexedEdge<FStream>>(new ErrorEdgeFactory());\n\t\tint edge_counter = 0;\n\n\t\t// Track through the stack and build up subgraphs.\n\t\twhile (stack.size() > 0) {\n\t\t\tFStream n = stack.pollFirst();\n\t\t\t\n\t\t\tFlexyBolt b = null;\n\t\t\tswitch (n.getType()) {\n\t\t\tcase SPOUT:\n\t\t\t\t// Create a bolt and link it into the map.\n\t\t\t\tb = new FlexyBolt(bolt_counter++, n);\n\t\t\t\tboltG.addVertex(b);\n\t\t\t\tbreak;\n\t\t\tcase FUNCTION: \n\t\t\tcase PROJECTION:\n\t\t\t\t// Pull the previous node.\n\t\t\t\tFStream prev_n = \n\t\t\t\t\t\t(new ArrayList<IndexedEdge<FStream>>(G.incomingEdgesOf(n)))\n\t\t\t\t\t\t\t\t.get(0).source; // Yuck.\n\t\t\t\t\n\t\t\t\t// Pull the bolt.\n\t\t\t\tb = boltMap.get(prev_n);\n\t\t\t\t// Link this node into the bolt.\n\t\t\t\tb.link(prev_n, n);\n\t\t\t\tbreak;\n\t\t\tcase SHUFFLE:\n\t\t\t\t// Create a bolt and link it into the map.\n\t\t\t\tb = new FlexyBolt(bolt_counter++, n);\n\t\t\t\tboltG.addVertex(b);\n\t\t\t\t\n\t\t\t\t// Add edges for all previous nodes\n\t\t\t\tfor (IndexedEdge<FStream> edge : G.incomingEdgesOf(n)) {\n\t\t\t\t\tFlexyBolt prev_b = boltMap.get(edge.source);\n\t\t\t\t\tprev_b.expose(edge.source);\n\t\t\t\t\t\n\t\t\t\t\tedge_counter += 1;\n\t\t\t\t\tIndexedEdge<FStream> e = new IndexedEdge<FStream>(edge.source, n, edge_counter);\n\t\t\t\t\t\n\t\t\t\t\tboltG.addEdge(prev_b, b, e);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase GROUPBY:\n\t\t\t\t// Create a new bolt for the Stage1/Store portion.\n\t\t\t\tb = new FlexyBolt(bolt_counter++, n);\n\t\t\t\tboltG.addVertex(b);\n\t\t\t\t\n\t\t\t\t// Link it to the preceding bolts.\n\t\t\t\tfor (IndexedEdge<FStream> edge : G.incomingEdgesOf(n)) {\n\t\t\t\t\tFlexyBolt prev_b = boltMap.get(edge.source);\n\n\t\t\t\t\t// Link this node into the bolt for Stage0 Aggregation.\n\t\t\t\t\tFStream s0_agg = n.copy();\n\t\t\t\t\ts0_agg.setStage0Agg(true);\n\t\t\t\t\tprev_b.link(edge.source, s0_agg);\n\t\t\t\t\tprev_b.expose(s0_agg);\n\t\t\t\t\tboltMap.put(s0_agg, prev_b);\n\t\t\t\t\t\n\t\t\t\t\tedge_counter += 1;\n\t\t\t\t\tIndexedEdge<FStream> e = new IndexedEdge<FStream>(s0_agg, n, edge_counter);\n\t\t\t\t\t\n\t\t\t\t\tboltG.addEdge(prev_b, b, e);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new RuntimeException(\"Unexpected node type: \" + n + \" \" + n.getType());\n\t\t\t}\n\t\t\t\n\t\t\t// Map the bolt.\n\t\t\tboltMap.put(n, b);\n\t\t\t\n\t\t\t// For all the adjacent nodes, add them to the stack.\n\t\t\tfor (IndexedEdge<FStream> edge : G.outgoingEdgesOf(n)) {\n\t\t\t\tif (!boltMap.containsKey(edge.target)) {\n\t\t\t\t\tstack.addLast(edge.target);\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\t}", "private void initFromGraph() {\n CHPreparationGraph prepareGraph;\n if (chConfig.getTraversalMode().isEdgeBased()) {\n TurnCostStorage turnCostStorage = graph.getTurnCostStorage();\n if (turnCostStorage == null) {\n throw new IllegalArgumentException(\"For edge-based CH you need a turn cost storage\");\n }\n logger.info(\"Creating CH prepare graph, {}\", getMemInfo());\n CHPreparationGraph.TurnCostFunction turnCostFunction = CHPreparationGraph.buildTurnCostFunctionFromTurnCostStorage(graph, chConfig.getWeighting());\n prepareGraph = CHPreparationGraph.edgeBased(graph.getNodes(), graph.getEdges(), turnCostFunction);\n nodeContractor = new EdgeBasedNodeContractor(prepareGraph, chBuilder, pMap);\n } else {\n logger.info(\"Creating CH prepare graph, {}\", getMemInfo());\n prepareGraph = CHPreparationGraph.nodeBased(graph.getNodes(), graph.getEdges());\n nodeContractor = new NodeBasedNodeContractor(prepareGraph, chBuilder, pMap);\n }\n maxLevel = nodes;\n // we need a memory-efficient priority queue with an efficient update method\n // TreeMap is not memory-efficient and PriorityQueue does not support an efficient update method\n // (and is not memory efficient either)\n sortedNodes = new MinHeapWithUpdate(prepareGraph.getNodes());\n logger.info(\"Building CH prepare graph, {}\", getMemInfo());\n StopWatch sw = new StopWatch().start();\n CHPreparationGraph.buildFromGraph(prepareGraph, graph, chConfig.getWeighting());\n logger.info(\"Finished building CH prepare graph, took: {}s, {}\", sw.stop().getSeconds(), getMemInfo());\n nodeContractor.initFromGraph();\n }", "public Graph(){//constructor\n //edgemap\n srcs=new LinkedList<>();\n maps=new LinkedList<>();\n chkIntegrity(\"edgemap\");\n \n nodes=new LinkedList<>();\n //m=new EdgeMap();\n }", "void graph4() {\n\t\tconnect(\"8\", \"9\");\n\t\tconnect(\"3\", \"1\");\n\t\tconnect(\"3\", \"2\");\n\t\tconnect(\"3\", \"9\");\n\t\tconnect(\"4\", \"3\");\n\t\t//connect(\"4\", \"5\");\n\t\t//connect(\"4\", \"7\");\n\t\t//connect(\"5\", \"7\");\t\t\n\t}", "@Before\n public void setUp() {\n for (int i = 0; i < 6; i++) {\n\n Vertex tempV1 = new Vertex(i + \"\", \"Location number \" + i);\n\n testVertices.add(tempV1);\n\n }\n\n //Build Edges that connect each vertex and put edges into ArrayList\n for (int i = 0; i < 5; i++) {\n\n Edge tempE = new Edge(i + \"\",testVertices.get(i),testVertices.get(i+1) ,(i*10));\n\n testEdges.add(tempE);\n }\n\n //Graph created with complete ArrayLists of all Edges and Vertices\n testGraph = new Graph(testVertices, testEdges);\n }", "@Test\n public void testAddVerticesBothExisting() throws Exception {\n\n final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();\n\n Graph<Long, Long, Long> graph =\n Graph.fromDataSet(\n TestGraphUtils.getLongLongVertexData(env),\n TestGraphUtils.getLongLongEdgeData(env),\n env);\n\n List<Vertex<Long, Long>> vertices = new ArrayList<>();\n vertices.add(new Vertex<>(1L, 1L));\n vertices.add(new Vertex<>(3L, 3L));\n\n graph = graph.addVertices(vertices);\n\n DataSet<Vertex<Long, Long>> data = graph.getVertices();\n List<Vertex<Long, Long>> result = data.collect();\n\n expectedResult = \"1,1\\n\" + \"2,2\\n\" + \"3,3\\n\" + \"4,4\\n\" + \"5,5\\n\";\n\n compareResultAsTuples(result, expectedResult);\n }", "public WeightedAdjacencyGraph() {\n this.vertices = new HashMap<>();\n }", "public Graph(Collection<LabeledEdge> edges, Collection<Vertex> vertices) {\n\t\tthis.edges = new HashSet<>(edges);\n\t\tthis.vertices = new HashSet<>(vertices);\n\t\tthis.edgesByStart = new HashMap<>();\n\t\tthis.edgesByEnd = new HashMap<>();\n\t\tthis.edgesByAction = new HashMap<>();\n\t\tthis.searcher = null;\n\t\tfor(Vertex vertex : vertices){\n\t\t\tthis.edgesByStart.put(vertex, new HashSet<LabeledEdge>());\n\t\t\tthis.edgesByEnd.put(vertex, new HashSet<LabeledEdge>());\n\t\t}\n\t\tfor(LabeledEdge trans : edges){\n\t\t\tassert(edgesByStart.keySet().contains(trans.getStart()));\n\t\t\tassert(edgesByEnd.keySet().contains(trans.getEnd()));\n\t\t\tthis.edgesByStart.get(trans.getStart()).add(trans);\n\t\t\tthis.edgesByEnd.get(trans.getEnd()).add(trans);\n\t\t\tif(edgesByAction.get(trans.getLabel()) == null)\n\t\t\t\tedgesByAction.put(trans.getLabel(), new HashSet<LabeledEdge>());\n\t\t\tthis.edgesByAction.get(trans.getLabel()).add(trans);\n\t\t}\n\t}", "public AtomGraph(IAtomContainer container, IAtomContainer skipVertices, boolean weighted) {\n this();\n adjacencyMatrix = new AdjacencyAtomMatrix(container.getAtomCount());\n for (IAtom atom : skipVertices.atoms()) {\n this.skipVertices.add(atom);\n }\n setAtomContainer(container, weighted);\n }", "public AtomGraph(IAtomContainer container, IAtomContainerSet skipVertices, boolean weighted) {\n this();\n adjacencyMatrix = new AdjacencyAtomMatrix(container.getAtomCount());\n for (IAtomContainer ac : skipVertices.atomContainers()) {\n for (IAtom atom : ac.atoms()) {\n this.skipVertices.add(atom);\n }\n }\n setAtomContainer(container, weighted);\n }", "public void testAddEdge() {\n System.out.println(\"addEdge\");\n\n Graph<Integer, Edge<Integer>> graph = newGraph();\n\n for (int i = 0; i < 25; i++) {\n graph.addVertex(new Integer(i));\n }\n\n for (int i = 0; i < 25; i++) {\n for (int j = 0; j < 25; j++) {\n Assert\n .assertTrue(graph.addEdge(new UnweightedEdge(new Integer(i), new Integer(j))));\n }\n }\n\n for (int i = 0; i < 25; i++) {\n for (int j = 0; j < 25; j++) {\n Assert\n .assertFalse(graph.addEdge(new UnweightedEdge(new Integer(i), new Integer(j))));\n }\n }\n }", "public Graph createGraph() {\n String fileName;\n// fileName =\"./428333.edges\";\n String line;\n Graph g = new Graph();\n// List<String> vertexNames = new ArrayList<>();\n// try\n// {\n// BufferedReader in=new BufferedReader(new FileReader(fileName));\n// line=in.readLine();\n// while (line!=null) {\n////\t\t\t\tSystem.out.println(line);\n// String src = line.split(\" \")[0];\n// String dst = line.split(\" \")[1];\n//// vertexNames.add(src);\n//// vertexNames.add(dst);\n//// System.out.println(src+\" \"+dst);\n// g.addEdge(src, dst, 1);\n// line=in.readLine();\n// }\n// in.close();\n// } catch (Exception e) {\n//\t\t\te.printStackTrace();\n// }\n\n fileName=\"./788813.edges\";\n// List<String> vertexNames = new ArrayList<>();\n try\n {\n BufferedReader in=new BufferedReader(new FileReader(fileName));\n line=in.readLine();\n while (line!=null) {\n//\t\t\t\tSystem.out.println(line);\n String src = line.split(\" \")[0];\n String dst = line.split(\" \")[1];\n g.addEdge(src, dst, 1);\n line=in.readLine();\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n// Graph g = new Graph(new String[]{\"v0\", \"v1\", \"v2\", \"v3\", \"v4\", \"v5\", \"v6\", \"v7\", \"v8\"});\n// // Add the required edges.\n// g.addEdge(\"v0\", \"v1\", 4); g.addEdge(\"v0\", \"v7\", 8);\n// g.addEdge(\"v1\", \"v2\", 8); g.addEdge(\"v1\", \"v7\", 11); g.addEdge(\"v2\", \"v1\", 8);\n// g.addEdge(\"v2\", \"v8\", 2); g.addEdge(\"v2\", \"v5\", 4); g.addEdge(\"v2\", \"v3\", 7);\n// g.addEdge(\"v3\", \"v2\", 7); g.addEdge(\"v3\", \"v5\", 14); g.addEdge(\"v3\", \"v4\", 9);\n// g.addEdge(\"v4\", \"v3\", 9); g.addEdge(\"v4\", \"v5\", 10);\n// g.addEdge(\"v5\", \"v4\", 10); g.addEdge(\"v5\", \"v3\", 9); g.addEdge(\"v5\", \"v2\", 4);\n// g.addEdge(\"v5\", \"v6\", 2);\n// g.addEdge(\"v6\", \"v7\", 1); g.addEdge(\"v6\", \"v8\", 6); g.addEdge(\"v6\", \"v5\", 2);\n// g.addEdge(\"v7\", \"v0\", 8); g.addEdge(\"v7\", \"v8\", 7); g.addEdge(\"v7\", \"v1\", 11);\n// g.addEdge(\"v7\", \"v6\", 1);\n// g.addEdge(\"v8\", \"v2\", 2); g.addEdge(\"v8\", \"v7\", 7); g.addEdge(\"v8\", \"v6\", 6);\n\n//\n return g;\n }", "public Graph(Map<Vertex<? extends Position>, List<Vertex<? extends Position>>> graph){\n\t\tthis.mapGraph = graph;\n\t}", "public Vertex[] createGraph(){\n\t\t /* constructing a graph using matrices\n\t\t * If there is a connection between two adjacent LETTERS, the \n\t * cell will contain a num > 1, otherwise a 0. A value of -1 in the\n\t * cell denotes that the cities are not neighbors.\n\t * \n\t * GRAPH (with weights b/w nodes):\n\t * E+---12-------+B--------18-----+F----2---+C\n\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\t 10\n\t * 24\t\t\t\t8\t\t\t 8\t |\n\t * |\t\t\t\t|\t\t\t |\t\t +\n\t * |\t\t\t\t|\t\t\t | H <+---11---I\n\t * |\t\t\t\t|\t\t\t /\n\t * +\t\t\t\t+\t\t\t +\n\t * G+---12----+A(start)+---10--+D\n\t * \n\t * NOTE: I is the only unidirectional node\n\t */\n\t\t\n\t\tint cols = 9;\n\t\tint rows = 9;\n\t\t//adjacency matrix\n\t\t\t\t //A B C D E F G H I\n\t int graph[][] = { {0,8,0,10,0,0,12,0,0}, //A\n\t {8,0,0,0,12,18,0,0,0}, //B\n\t {0,0,0,0,0,2,0,10,0}, //C\n\t {10,0,0,0,0,8,0,0,0}, //D\n\t {0,12,0,0,0,0,24,0,0}, //E\n\t {0,18,2,8,0,0,0,0,0}, //F\n\t {12,0,0,0,0,0,24,0,0}, //G\n\t {0,0,10,0,0,0,0,0,11}, //H\n\t {0,0,0,0,0,0,0,11,0}}; //I\n\t \n\t //initialize stores vertices\n\t Vertex[] vertices = new Vertex[rows]; \n\n\t //Go through each row and collect all [i,col] >= 1 (neighbors)\n\t int weight = 0; //weight of the neighbor\n\t for (int i = 0; i < rows; i++) {\n\t \tVector<Integer> vec = new Vector<Integer>(rows);\n\t\t\tfor (int j = 0; j < cols; j++) {\n\t\t\t\tif (graph[i][j] >= 1) {\n\t\t\t\t\tvec.add(j);\n\t\t\t\t\tweight = j;\n\t\t\t\t}//is a neighbor\n\t\t\t}\n\t\t\tvertices[i] = new Vertex(Vertex.getVertexName(i), vec);\n\t\t\tvertices[i].state = weight;\n\t\t\tvec = null; // Allow garbage collection\n\t\t}\n\t return vertices;\n\t}", "private static void criaListaDeVertices(Graph graph) {\r\n\t\tfor (int i = 0; i < graph.getArestas().size(); i++) {\r\n\t\t\tif (!graph.getArestas().get(i).getV1().statusVertice()) {\r\n\t\t\t\tgraph.getVerticesGraph().add( graph.getArestas().get(i).getV1() );\r\n\t\t\t\tgraph.getArestas().get(i).getV1().alteraStatusVertice(true);\r\n\t\t\t}\r\n\r\n\t\t\tif (!graph.getArestas().get(i).getV2().statusVertice()) {\r\n\t\t\t\tgraph.getVerticesGraph().add( graph.getArestas().get(i).getV2() );\r\n\t\t\t\tgraph.getArestas().get(i).getV2().alteraStatusVertice(true);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Edge(Object vertex1, Object vertex2, int w){\n v1 = vertex1;\n v2 = vertex2;\n weight = w;\n }", "public void createTransaction(Transaction trans);", "public void graphCommiting(Graph _graph, Request _request) throws Exception {\n\t}", "Edge(Vertex first, Vertex second, Integer cost) {\n this.first = first;\n this.second = second;\n this.cost = cost;\n }" ]
[ "0.62461424", "0.6147367", "0.6140887", "0.60311127", "0.5895444", "0.5855554", "0.5838265", "0.5827245", "0.5768829", "0.57537454", "0.5733777", "0.56682175", "0.5643597", "0.5639455", "0.5634991", "0.56309956", "0.5620427", "0.5605662", "0.56055427", "0.55986875", "0.5596757", "0.55844253", "0.5537051", "0.5530564", "0.55185884", "0.5502612", "0.5488389", "0.5480974", "0.54694986", "0.5467813", "0.54538095", "0.5447302", "0.543868", "0.54324335", "0.5424308", "0.54133815", "0.54133314", "0.5410252", "0.54031396", "0.53927875", "0.5391718", "0.53753954", "0.5365415", "0.53642243", "0.5360439", "0.5354735", "0.5351355", "0.53496194", "0.53477174", "0.53441894", "0.53339964", "0.53257436", "0.53217375", "0.5320801", "0.5312411", "0.5276734", "0.5266987", "0.52588946", "0.5251081", "0.5246987", "0.5244553", "0.5243818", "0.52427137", "0.5234642", "0.5230665", "0.523046", "0.5225762", "0.5218686", "0.52148134", "0.52129275", "0.5209857", "0.52082056", "0.5199788", "0.5199714", "0.51987565", "0.5196669", "0.5194869", "0.51908463", "0.51907074", "0.5187146", "0.51855034", "0.5182856", "0.51793146", "0.51788956", "0.5162334", "0.5157718", "0.51536435", "0.51530886", "0.51527077", "0.51500773", "0.5148785", "0.5148348", "0.51470906", "0.51459074", "0.5139921", "0.5138582", "0.5137571", "0.51260734", "0.512187", "0.5119136" ]
0.73075044
0
Test of deleteLayer, in LayersViewController
@Test public void testDeleteLayer() { LayersViewController instance = LayersViewController.getDefault().init(null); instance.createLayer(); instance.deleteLayer(2); assertEquals(instance.getVxQueryCollection().getHighestQueryIndex(), 3); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void removeLayer(int whichLayer);", "@Override\n public void onRemoveLayer(GPLayerBean layerBean) {\n this.removeLayer(layerBean);\n }", "@Test\r\n\tpublic void checkDeleteTest() {\n\t\tassertFalse(boardService.getGameRules().checkDelete(board.field[13][13])); \r\n\t}", "@Test\n public void testDeselectAll() {\n LayersViewController instance = LayersViewController.getDefault().init(null);\n instance.createLayer();\n instance.createLayer();\n instance.getVxQueryCollection().setVisibilityOnAll(true);\n instance.getTxQueryCollection().setVisibilityOnAll(true);\n\n instance.deselectAll();\n assertEquals(instance.getVxQueryCollection().isVisibilityOnAll(), false);\n }", "public void deleteRequest() {\n assertTrue(true);\n }", "protected void layerWasSelected (int layer)\n {\n _removeLayerAction.setEnabled(layer != 0);\n fireStateChanged();\n }", "@Test\n void deleteSuccess() {\n dao.delete(dao.getById(3));\n assertNull(dao.getById(3));\n }", "@Test\n\tpublic void withInvalidCategory() {\n\t\tboolean delete = false;\n\t\ttry {\n\t\t\tdelete = FlowerManager.deleteFlower(\"christina\", \"rose\");\n\t\t} catch (ServiceException e) {\n\n\t\t\te.printStackTrace();\n\t\t\tassertFalse(delete);\n\t\t}\n\t}", "void deleteFeature(Integer id);", "@Test\r\n public void testDelete() throws Exception {\r\n bank.removePerson(p2);\r\n assertEquals(bank.viewAllPersons().size(), 1);\r\n assertEquals(bank.viewAllAccounts().size(), 1);\r\n }", "@Test\r\n\tpublic void deleteGame() {\r\n\t\t// DO: JUnit - Populate test inputs for operation: deleteGame \r\n\t\tGame game_1 = new tsw.domain.Game();\r\n\t\tservice.deleteGame(game_1);\r\n\t}", "@Test\n void deleteSuccess() {\n dao.delete(dao.getById(2));\n assertNull(dao.getById(2));\n }", "@Test\r\n\tpublic void deleteTeamTeamplayerses() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: deleteTeamTeamplayerses \r\n\t\tInteger team_teamId_5 = 0;\r\n\t\tInteger related_teamplayerses_teamPlayersId = 0;\r\n\t\tTeam response = null;\r\n\t\tresponse = service.deleteTeamTeamplayerses(team_teamId_5, related_teamplayerses_teamPlayersId);\r\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: deleteTeamTeamplayerses\r\n\t}", "@Test\n void deleteSuccess() {\n genericDAO.delete(genericDAO.getByID(2));\n assertNull(genericDAO.getByID(2));\n }", "public void removeAllOverlayObj(String layer)\n/* 185: */ {\n/* 186:261 */ this.mapPanel.removeAllOverlayObj(layer);\n/* 187: */ }", "private void deleteLayers(Set<String> layerIds) throws IOException {\n for (String layerId : layerIds) {\n assertLayerIsNotPublished(layerId);\n\n LOG.info(\"Layer ID: \" + layerId + \", finding maps.\");\n ParentsListResponse layerParents = engine.layers().parents().list(layerId).execute();\n // Delete each layer. Note that these operations are not transactional,\n // so if a later operation fails, the earlier assets will still be deleted.\n for (Parent layerParent : layerParents.getParents()) {\n String mapId = layerParent.getId();\n deleteMap(layerIds, mapId);\n }\n\n LOG.info(\"Deleting layer.\");\n engine.layers().delete(layerId).execute();\n LOG.info(\"Layer deleted.\");\n }\n }", "public void testDelete() {\r\n\r\n\t\ttry {\r\n\t\t\tlong count, newCount, diff = 0;\r\n\t\t\tcount = levelOfCourtService.getCount();\r\n\t\t\tLevelOfCourt levelOfCourt = (LevelOfCourt) levelOfCourtTestDataFactory\r\n\t\t\t\t\t.loadOneRecord();\r\n\t\t\tlevelOfCourtService.delete(levelOfCourt);\r\n\t\t\tnewCount = levelOfCourtService.getCount();\r\n\t\t\tdiff = newCount - count;\r\n\t\t\tassertEquals(diff, 1);\r\n\t\t} catch (Exception e) {\r\n\t\t\tfail(e.getMessage());\r\n\t\t}\r\n\t}", "@Test\n void deleteSuccess() {\n genericDao.delete(genericDao.getById(3));\n assertNull(genericDao.getById(3));\n }", "@Test\n void testDeleteCity() {\n CityList cityList = mockCityList();\n cityList.delete(mockCity());\n\n assertFalse(cityList.hasCity(mockCity()));\n assertTrue(cityList.countCities() == 0);\n\n }", "private void deleteMap(Set<String> layerIdsPendingDeletion, String mapId) throws IOException {\n assertMapIsNotPublished(mapId);\n\n LOG.info(\"Checking for other layers on this map (ID: \" + mapId + \")\");\n Set<String> mapLayerIds = getLayerIdsFromMap(mapId);\n\n // Determine if this map will still have layers once we perform our delete.\n mapLayerIds.removeAll(layerIdsPendingDeletion);\n if (mapLayerIds.size() == 0) {\n // Map will not contain any more Layers when done, so delete it.\n LOG.info(\"Deleting map.\");\n engine.maps().delete(mapId).execute();\n LOG.info(\"Map deleted.\");\n } else {\n // Map will contain Layers not scheduled for deletion, so we can't continue.\n throw new IllegalStateException(\"Map \" + mapId + \" contains layers not scheduled for \"\n + \"deletion. You will need to remove them before we can delete this map.\");\n }\n }", "public void removeOverlayObj(String layer, IOverlay a)\n/* 190: */ {\n/* 191:268 */ this.mapPanel.removeOverlayObj(layer, a);\n/* 192: */ }", "@Test\r\n\tpublic void deleteTeam() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: deleteTeam \r\n\t\tTeam team_1 = new wsdm.domain.Team();\r\n\t\tservice.deleteTeam(team_1);\r\n\t}", "@Test\r\n public void testDelete() {\r\n assertTrue(false);\r\n }", "@Test\r\n\tpublic void deleteTeamLevel() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: deleteTeamLevel \r\n\t\tInteger team_teamId_7 = 0;\r\n\t\tInteger related_level_levelId = 0;\r\n\t\tTeam response = null;\r\n\t\tresponse = service.deleteTeamLevel(team_teamId_7, related_level_levelId);\r\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: deleteTeamLevel\r\n\t}", "@Override\n\tpublic void delete(FxzfLane entity) {\n\t\t\n\t}", "protected void doDeleteBuilding() {\r\n\t\tif (renderer.surface != null) {\r\n\t\t\tUndoableMapEdit undo = new UndoableMapEdit(renderer.surface);\r\n\t\t\tdeleteEntitiesOf(renderer.surface.buildingmap, renderer.selectedRectangle, true);\r\n\t\t\tundo.setAfter();\r\n\t\t\taddUndo(undo);\r\n\t\t\trepaint();\r\n\t\t}\r\n\t}", "@Test(dependsOnMethods = \"update\")\n public void delete()throws Exception{\n repository.delete(id);\n OwnerRegion delete = repository.findOne(id);\n Assert.assertNull(delete);\n }", "@Test\n\tpublic void IsCaseNameDeleted(){\n\t\tString caseName = \"led\";\n\t\tboolean isNameValid = CaseManagerService.deleteCaseType(caseName);\n\t\tassertTrue(isNameValid);\n\t}", "@Test\n\tvoid testDeletePlant() {\n\t\tList<Plant> plant = service.deletePlant(50);\n\t\tassertFalse(plant.isEmpty());\n\t}", "@Test\n\tpublic void testWithInvalidType2() {\n\t\tboolean delete = false;\n\t\ttry {\n\t\t\tdelete = FlowerManager.deleteFlower(\"Artificial\", \"rose\");\n\t\t} catch (ServiceException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tassertFalse(delete);\n\t}", "private void assertRemoved()\n\t{\n\t\ttry\n\t\t{\n\t\t\ttestController.getContentTypeDefinitionVOWithId(testDefinition.getId());\n\t\t\tfail(\"The ContentTypeDefinition was not deleted\");\n\t\t}\n\t\tcatch(Exception e)\n\t\t{ /* expected */ }\n\t}", "@Test\r\n\tpublic void deleteGameGamestatses() {\r\n\t\t// DO: JUnit - Populate test inputs for operation: deleteGameGamestatses \r\n\t\tInteger game_gameId_2 = 0;\r\n\t\tInteger related_gamestatses_gameStatsId = 0;\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tGame response = null;\r\n\t\tresponse = service.deleteGameGamestatses(game_gameId_2, related_gamestatses_gameStatsId);\r\n\t\t// DO: JUnit - Add assertions to test outputs of operation: deleteGameGamestatses\r\n\t}", "public void deletePlane(ActionEvent actionEvent) {\n if (plane != null) {\n plane.stopWorking();\n ((Node)(actionEvent.getSource())).getScene().getWindow().hide();\n }\n }", "@Test\n\tpublic void testDelete(){\n\t}", "@Override\n\tpublic void delete(Zone t) {\n\t\t\n\t}", "public void testDelete() {\n\t\ttry {\n\t\t\tServerParameterTDG.create();\n\n\t\t\t// insert\n\t\t\tServerParameterTDG.insert(\"paramName\", \"A description\", \"A value\");\n\t\t\t// delete\n\t\t\tassertEquals(1, ServerParameterTDG.delete(\"paramName\"));\n\t\t\t\t\n\t\t\tServerParameterTDG.drop();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail();\t\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tServerParameterTDG.drop();\n\t\t\t} catch (SQLException e) {\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void deleteFlightTest() throws Exception {\n mockMvc.perform(delete(\"/v1/flight/deleteFlight?flightId=1\")\n .contentType(MediaType.APPLICATION_JSON))\n .andExpect(status().is(200));\n\n }", "@Test\n public void deleteCategory_Deletes(){\n int returned = testDatabase.addCategory(category);\n testDatabase.deleteCategory(returned);\n assertEquals(\"deleteCategory - Deletes From Database\", null, testDatabase.getCategory(returned));\n }", "@Test\r\n public void testDeleteById() {\r\n System.out.println(\"deleteById\");\r\n int id = 0;\r\n AbonentDAL instance = new AbonentDAL();\r\n Abonent expResult = null;\r\n Abonent result = instance.deleteById(id);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void testDelete() throws Exception {\n // pretend the entity was deleted\n doNothing().when(Service).deleteCitation(any(String.class));\n\n // call delete\n ModelAndView mav = Controller.delete(\"\");\n\n // test to see that the correct view is returned\n Assert.assertEquals(\"result\", mav.getViewName());\n\n // test to see that Json is formated properly\n Map<String, Object> map = mav.getModel();\n String result = (String) map.get(\"message\");\n\n Assert.assertEquals(\"{\\\"result\\\":\\\"deleted\\\"}\", result);\n }", "public void removeAgent(String layer, Agent a)\n/* 175: */ {\n/* 176:247 */ this.mapPanel.removeAgent(layer, a);\n/* 177: */ }", "@Test\n public void deleteTest() throws SQLException {\n manager = new TableServizioManager(mockDb);\n manager.delete(1);\n Servizio servizio= manager.retriveById(1);\n assertNull(servizio,\"Should return true if delete Servizio\");\n }", "@Test\n public void deleteRecipeDirections_Deletes(){\n int returnedRecipe = testDatabase.addRecipe(testRecipe);\n int returnedDirection1 = testDatabase.addRecipeDirection(recipeDirection1);\n int returnedDirection2 = testDatabase.addRecipeDirection(recipeDirection2);\n testDatabase.deleteRecipeDirections(returnedRecipe);\n ArrayList<RecipeDirection> allDirections = testDatabase.getAllRecipeDirections(returnedRecipe);\n boolean deleted1 = true;\n boolean deleted2 = true;\n if(allDirections != null){\n for(int i = 0; i < allDirections.size(); i++){\n if(allDirections.get(i).getKeyID() == returnedDirection1){\n deleted1 = false;\n }\n if(allDirections.get(i).getKeyID() == returnedDirection2){\n deleted2 = false;\n }\n }\n }\n assertEquals(\"deleteRecipeDirections - Deleted Direction1\", true, deleted1);\n assertEquals(\"deleteRecipeDirections - Deleted Direction2\", true, deleted2);\n }", "@Test\n public void deleteCategory_ReturnsTrue(){\n int returned = testDatabase.addCategory(category);\n assertEquals(\"deleteCategory - Returns True\", true, testDatabase.deleteCategory(returned));\n }", "@Test\n public void deleteRecipeCategory_ReturnsTrue(){\n int returned = testDatabase.addRecipe(testRecipe);\n assertEquals(\"deleteRecipeCategory - Returns True\",true, testDatabase.deleteRecipeCategory(returned));\n }", "public void operationDelete() {\n\r\n\t\tstatusFeldDelete();\r\n\t}", "protected void doDeleteBoth() {\r\n\t\tif (renderer.surface != null) {\r\n\t\t\tUndoableMapEdit undo = new UndoableMapEdit(renderer.surface);\r\n\t\t\tdeleteEntitiesOf(renderer.surface.basemap, renderer.selectedRectangle, false);\r\n\t\t\tdeleteEntitiesOf(renderer.surface.buildingmap, renderer.selectedRectangle, true);\r\n\t\t\tundo.setAfter();\r\n\t\t\taddUndo(undo);\r\n\t\t\trepaint();\r\n\t\t}\r\n\t}", "@Test\n public void testChangeLayerVisibility() {\n LayersViewController instance = LayersViewController.getDefault().init(null);\n instance.createLayer();\n int index1 = 2;\n Query query1 = new Query(GraphElementType.VERTEX, \"Type == 'Event'\");\n instance.getVxQueryCollection().getQuery(index1).setQuery(query1);\n instance.getTxQueryCollection().getQuery(index1).setQuery(null);\n\n instance.changeLayerVisibility(index1, true);\n assertTrue(instance.getVxQueryCollection().getQuery(index1).isVisible());\n\n instance.createLayer();\n int index2 = 3;\n Query query2 = new Query(GraphElementType.TRANSACTION, \"Type == 'Network'\");\n instance.getTxQueryCollection().getQuery(index2).setQuery(query2);\n instance.getVxQueryCollection().getQuery(index2).setQuery(null);\n\n instance.changeLayerVisibility(index2, true);\n assertTrue(instance.getTxQueryCollection().getQuery(index2).isVisible());\n }", "@Test\n\tpublic void withInvalidType() {\n\t\t\n\t\tboolean delete = false;\n\t\ttry {\n\t\t\tdelete = FlowerManager.deleteFlower(\"natural\", \"rose\");\n\t\t} catch (ServiceException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tassertFalse(delete);\n\t}", "@Test\n public void deleteRecipeCategory_Deletes(){\n int returnedRecipe = testDatabase.addRecipe(testRecipe);\n int returnedCategory = testDatabase.addRecipeCategory(recipeCategory);\n testDatabase.deleteRecipeCategory(returnedCategory);\n ArrayList<RecipeCategory> allCategories = testDatabase.getAllRecipeCategories(returnedRecipe);\n boolean deleted = true;\n if(allCategories != null){\n for(int i = 0; i < allCategories.size(); i++){\n if(allCategories.get(i).getCategoryID() == returnedCategory){\n deleted = false;\n }\n }\n }\n assertEquals(\"deleteRecipeCategory - Deletes From Database\", true, deleted);\n }", "@Test\n\tpublic void testDeleteSymbolFromCatalog() throws Exception {\n\n\t\t// Delete the selected symbol\n\t\tString selectedSymbol = mathEditSymbolsDlgSymbol.getText();\n\t\tmathEditSymbolsDlgDelete.click();\n\t\tmathEditSymbolsDlg.ok();\n\t\t// Verify if the selected symbol is deleted successfully\n\t\tmathSymbolsDlgEditButton.click();\n\t\tboolean isDeleted = true;\n\t\tfor (int i = 0; i < mathEditSymbolsDlgSymbol.getItemCount(); i++) {\n\t\t\tif (selectedSymbol.equals(mathEditSymbolsDlgSymbol.getItemText(i))) {\n\t\t\t\tisDeleted = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tassertTrue(\"Symbol is not deleted successfully\", isDeleted);\n\t}", "public void removeAllAgents(String layer)\n/* 180: */ {\n/* 181:254 */ this.mapPanel.removeAllAgents(layer);\n/* 182: */ }", "private boolean actionDelete()\n {\n Debug.enter();\n onDeleteListener.onDelete();\n dismiss();\n Debug.leave();\n return true;\n }", "int delete(Subdivision subdivision);", "public void doDeleteAlbum(AlbumDTO dto)\n/* */ {\n/* 64 */ this.galleryManager.deleteAlbum(dto);\n/* 65 */ this.albumList.remove(dto);\n/* */ }", "@Test\n public void deleteRecipeDirections_ReturnsTrue(){\n int returned = testDatabase.addRecipe(testRecipe);\n assertEquals(\"deleteRecipeDirections - Returns True\",true, testDatabase.deleteRecipeDirections(returned));\n }", "@Test\n\tpublic void testWithInvalidInput() {\n\t\t\n\t\tboolean delete=false;\n\t\ttry {\n\t\t\tdelete = FlowerManager.deleteFlower(\" \", \"rose\");\n\t\t} catch (ServiceException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tassertFalse(delete);\n\t}", "@Test\n\tpublic void withExistingFlower() {\n\t\tboolean delete;\n\t\ttry {\n\t\t\tdelete = FlowerManager.deleteFlower(\"Natural\", \"Normal Flowers\");\n\t\t\tassertTrue(delete);\n\t\t} catch (ServiceException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Test\n public void testDelete() {\n int resultInt = disciplineDao.insert(disciplineTest);\n \n boolean result = false;\n \n if(resultInt > 0){\n disciplineTest = disciplineDao.selectById(resultInt);\n \n result = disciplineDao.delete(disciplineTest);\n }\n \n assertTrue(result);\n }", "@Test\r\n public void dontAllowCenterDeleteWithEntityReferences() throws Exception {\r\n \t// Create new center\r\n \tString testCenter = \"test\";\r\n \tint numberOfCenters = cp.getNumberOfItems();\r\n \tnewCenter(testCenter, null, null);\r\n \tAssert.assertEquals(numberOfCenters + 1, cp.getNumberOfItems());\r\n \t\r\n \t// Create entity with center that was just created\r\n \tEntitiesPage entitiesPage = new EntitiesPage(driver);\r\n \tentitiesPage.goToPage();\r\n \tString entityName = \"test-entity\";\r\n \tint numberOfEntities = entitiesPage.getNumberOfItems();\r\n \t\r\n \tentitiesPage.clickNewButton();\r\n \tentitiesPage.setName(entityName);\r\n \tentitiesPage.setCenter(testCenter);\r\n \tentitiesPage.setClass(\"entity\");\r\n \tentitiesPage.clickApplyButton();\r\n \tAssert.assertEquals(numberOfEntities + 1, entitiesPage.getNumberOfItems());\r\n \t\r\n \t// Navigate back to centers and try to delete the center\r\n \tcp.goToPage();\r\n \tcp.clickItem(testCenter);\r\n \tcp.clickReferencesTab();\r\n \tAssert.assertEquals(cp.getNumberOfReferencedEntities(), 1);\r\n \t\r\n \tcp.clickDeleteButton();\r\n \tString errorMessage = \"This center can't be deleted because it is in use by 1 or more CDR Collectors.\";\r\n \tThread.sleep(500);\r\n\t\t\r\n \tString alertMessage = cp.getAlertText();\r\n \tAssert.assertEquals(alertMessage, errorMessage);\r\n \tcp.acceptAlert();\r\n \t\r\n \t// Go back to entities and delete entity\r\n \tentitiesPage.goToPage();\r\n \tnumberOfEntities = entitiesPage.getNumberOfItems();\r\n \tentitiesPage.clickItem(entityName);\r\n \tentitiesPage.clickDeleteButton();\r\n \tAssert.assertEquals(numberOfEntities - 1, entitiesPage.getNumberOfItems());\r\n \t\r\n \t// Now delete the center\r\n \tcp.goToPage();\r\n \tnumberOfCenters = cp.getNumberOfItems();\r\n \tcp.clickItem(testCenter);\r\n \tcp.clickDeleteButton();\r\n \tAssert.assertEquals(numberOfCenters - 1, cp.getNumberOfItems());\r\n }", "@Test\n public void myNeighboursList_deleteAction_shouldRemoveItem() {\n // Given : We remove the element at position 2\n onView(allOf(ViewMatchers.withId(R.id.list_neighbours),isDisplayed()))\n .check(withItemCount(ITEMS_COUNT));\n // When perform a click on a delete icon\n onView(allOf(ViewMatchers.withId(R.id.list_neighbours),isDisplayed()))\n .perform(RecyclerViewActions.actionOnItemAtPosition(1, new DeleteViewAction()));\n // Then : the number of element is 11\n onView(allOf(ViewMatchers.withId(R.id.list_neighbours),isDisplayed())).check(withItemCount(ITEMS_COUNT-1));\n }", "@Test\r\n public void testDeleteRecipe() {\r\n coffeeMaker.addRecipe(recipe1);\r\n assertEquals(recipe1.getName(), coffeeMaker.deleteRecipe(0));\r\n assertNull(coffeeMaker.deleteRecipe(0)); // Test already delete recipe\r\n }", "@Test\n public void myNeighboursList_deleteAction_shouldRemoveItem() {\n // Given : We remove the element at position 2\n onView(ViewMatchers.withId(R.id.list_neighbours)).check(withItemCount(ITEMS_COUNT));\n // When perform a click on a delete icon\n onView(ViewMatchers.withId(R.id.list_neighbours))\n .perform(RecyclerViewActions.actionOnItemAtPosition(1, new DeleteViewAction()));\n // Then : the number of element is 11\n onView(ViewMatchers.withId(R.id.list_neighbours)).check(withItemCount(ITEMS_COUNT-1));\n\n }", "private boolean performDelete (WFSDelete delete) throws Exception {\r\n Debug.debugMethodBegin( this, \"performDelete (WFSDelete)\" );\r\n\r\n boolean success = true;\r\n \r\n DBAccess osa = null;\r\n java.sql.Connection con = null;\r\n org.deegree.services.wfs.configuration.Connection connect =\r\n config.getConnection();\r\n \r\n try {\r\n // get jdbc connection and access object for oracle spatial\r\n con = pool.acuireConnection (connect.getDriver (),\r\n connect.getLogon (),\r\n connect.getUser (),\r\n connect.getPassword ());\r\n osa = new DBAccess (con);\r\n osa.setAutoCommit (false);\r\n\r\n FeatureType ft = config.getFeatureType (delete.getTypeName()); \r\n Set fIDs = getFeatureIDs (ft, delete.getFilter(), osa);\r\n if (!fIDs.isEmpty ()) {\r\n\r\n TableDescription masterTable = ft.getMasterTable ();\r\n PointRowSelector selector = new PointRowSelector (\r\n masterTable, masterTable.getIdField(), fIDs, osa, ft);\r\n\r\n HashMap tables = new HashMap ();\r\n tables.put (masterTable.getName (), selector);\r\n performDelete (ft, tables);\r\n osa.commit ();\r\n }\r\n } catch (Exception e) { \r\n success = false;\r\n if (osa != null) osa.rollback ();\r\n Debug.debugException (e, \"\");\r\n }\r\n if (con != null) {\r\n pool.releaseConnection (con, connect.getDriver (),\r\n connect.getLogon (),\r\n connect.getUser (),\r\n connect.getPassword ());\r\n } \r\n Debug.debugMethodEnd(); \r\n return success;\r\n }", "@Override\n\tprotected final void removedLayerActions(ILayer layer) {\n\n\t\tsuper.removedLayerActions(layer);\n\n\t\tchangedLayerListActions();\n\t}", "@Override\n\tpublic void delete(Game game) {\n\t\t\n\t}", "boolean hasDeleteLineage();", "public void removeLayer(Editor layerEditor) {\n\n layers.remove(layerEditor);\n\n for (Map.Entry<Editor, HashMap<Editor, LayerPanel>> entry : layers.entrySet()) {\n\n LayerPanel layer = entry.getValue().get(layerEditor);\n entry.getKey().remove(layer);\n }\n }", "@SmallTest\n public void testDelete() {\n int result = -1;\n if (this.entity != null) {\n result = (int) this.adapter.remove(this.entity.getId());\n Assert.assertTrue(result >= 0);\n }\n }", "@Test\n void deleteSuccess() {\n carDao.delete(carDao.getById(1));\n assertNull(carDao.getById(1));\n\n //Delete repairs\n GenericDao<Repair> repairDao = new GenericDao(Repair.class);\n Repair repair = repairDao.getById(2);\n assertNull(carDao.getById(2));\n\n //Delete part\n GenericDao<Part> partDao = new GenericDao(Part.class);\n Role part = partDao.getById(2);\n assertNull(partDao.getById(2));\n }", "@Test\n @Order(18)\n void delete_client() {\n boolean isDeleted = service.deleteClientById(client2.getId());\n Assertions.assertTrue(isDeleted);\n\n Client c = service.getClient(client2.getId());\n Assertions.assertNull(c);\n\n service.deleteClientById(client.getId());\n }", "@Test\n public void testIsValidonNotConnectedMap() {\n mapModel.removeLink(\"TerritoryD\", \"TerritoryC\");\n\n boolean expResult = false;\n boolean result = mapModel.isValid();\n assertEquals(expResult, result);\n }", "@Test\r\n public void testDelete() {\r\n System.out.println(\"delete\");\r\n String doc = \"\";\r\n IwRepoDAOMarkLogicImplStud instance = new IwRepoDAOMarkLogicImplStud();\r\n boolean expResult = false;\r\n boolean result = instance.delete(doc);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n void deleteNoteSuccess() {\n noteDao.delete(noteDao.getById(2));\n assertNull(noteDao.getById(2));\n }", "@Test(enabled = true)\n @UsingDataSet({\"datasets/base_data.xls\", \"datasets/data.xls\"})\n public void testDeleteAddressCase2() throws Exception {\n final AddressDto currentAddress = new AddressDto();\n final ServiceResult<Address> result = this.addressService.deleteAddress(currentAddress);\n Assert.assertFalse(result.isSuccess());\n }", "@Test\r\n\tpublic void testDelete() {\n\t\tint todos = modelo.getAll().size();\r\n\r\n\t\tassertTrue(modelo.delete(1));\r\n\r\n\t\t// comprobar que este borrado\r\n\t\tassertNull(modelo.getById(1));\r\n\r\n\t\t// borrar un registro que no existe\r\n\t\tassertFalse(modelo.delete(13));\r\n\t\tassertNull(modelo.getById(13));\r\n\r\n\t\tassertEquals(\"debemos tener un registro menos\", (todos - 1), modelo\r\n\t\t\t\t.getAll().size());\r\n\r\n\t}", "@Test\n public void testDeleteForum() {\n try {\n ForumDTO forumDTO = forumService.deleteForum(FORUM_ID);\n assertEquals(FORUM_ID, forumDTO.getId());\n } catch (Exception e) {\n fail(e.getMessage());\n }\n }", "boolean hasDelete();", "boolean hasDelete();", "@FXML\n private void deleteCategory()\n {\n CategoryFxModel selectedCategory = categoryTable.getSelectionModel().getSelectedItem();\n if(selectedCategory == null)\n {\n DialogsUtils.categoryNotSelectedDialog();\n }\n else\n {\n Optional<ButtonType> result = DialogsUtils.deleteCategoryConfirmationDialog();\n deleteCategoryWhenOkPressed(selectedCategory, result);\n }\n }", "private void deleteRequest() {\n\t\tboolean res = false;\n\t\tMessage messageToServer = new Message();\n\t\tmessageToServer.setMsg(req.getEcode());\n\t\tmessageToServer.setOperation(\"DeleteRequest\");\n\t\tmessageToServer.setControllerName(\"PrincipalController\");\n\t\tres = (boolean) ClientUI.client.handleMessageFromClientUI(messageToServer);\n\t\tif (res) {\n\t\t\t// success pop up\n\t\t\tTheRequestWasHandledSuccessfullyWindowController popUp = new TheRequestWasHandledSuccessfullyWindowController();\n\t\t\ttry {\n\t\t\t\tpopUp.start(new Stage());\n\t\t\t} catch (Exception e) {\n\t\t\t\tUsefulMethods.instance().printException(e);\n\t\t\t}\n\t\t} else {\n\t\t\tUsefulMethods.instance().display(\"error in deleting request!\");\n\t\t}\n\t}", "@Test\n public void testDelete() {\n System.out.println(\"delete\");\n String guestIDnumber = \"test\";\n BookingController instance = new BookingController();\n boolean expResult = true;\n boolean result = instance.delete(guestIDnumber);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n }", "private void delete() {\n\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic void onDeleteFeatures(ControllerEvent event) {\n\n\t\tList<String> ids = (List<String>) event.getParams().get(\"featureIds\");\n\t\tif (ids.size() > 0) {\n\t\t\t((AnderProbleem) object.getProbleem()).setGeom(null);\n\t\t}\n\t}", "@Test\n public void deleteFeatureFlagTest() throws ApiException {\n String projectKey = null;\n String featureFlagKey = null;\n api.deleteFeatureFlag(projectKey, featureFlagKey);\n\n // TODO: test validations\n }", "@Test\n\t@Override\n\tpublic void testDeleteObjectOKJson() throws Exception {\n\t}", "public void removeLayer(@NotNull final SceneLayer layer) {\n layers.slowRemove(layer);\n }", "boolean hasDeleteMountPoint();", "private void gdsClickLayer()\n \t{\n \t\tchangingGDS = true;\n \t\tString str = (String)gdsLayersList.getSelectedValue();\n \t\tGDSLayers numbers = gdsGetNumbers(str);\n \t\tif (numbers == null) numbers = GDSLayers.EMPTY;\n \t\tif (numbers.getNumLayers() == 0)\n \t\t{\n \t\t\tgdsLayerNumber.setText(\"\");\n \t\t\tgdsLayerType.setText(\"\");\n \t\t} else\n \t\t{\n \t\t\tInteger gdsValue = numbers.getFirstLayer();\n \t\t\tint layerNum = gdsValue.intValue() & 0xFFFF;\n \t\t\tint layerType = (gdsValue.intValue() >> 16) & 0xFFFF;\n \t\t\tgdsLayerNumber.setText(Integer.toString(layerNum));\n \t\t\tgdsLayerType.setText(Integer.toString(layerType));\n \t\t}\n \t\tif (numbers.getPinLayer() == -1)\n \t\t{\n \t\t\tgdsPinLayer.setText(\"\");\n \t\t\tgdsPinType.setText(\"\");\n \t\t} else\n \t\t{\n \t\t\tgdsPinLayer.setText(Integer.toString(numbers.getPinLayer() & 0xFFFF));\n \t\t\tgdsPinType.setText(Integer.toString((numbers.getPinLayer() >> 16) & 0xFFFF));\n \t\t}\n \t\tif (numbers.getTextLayer() == -1)\n \t\t{\n \t\t\tgdsTextLayer.setText(\"\");\n \t\t\tgdsTextType.setText(\"\");\n \t\t} else\n \t\t{\n \t\t\tgdsTextLayer.setText(Integer.toString(numbers.getTextLayer() & 0xFFFF));\n \t\t\tgdsTextType.setText(Integer.toString((numbers.getTextLayer() >> 16) & 0xFFFF));\n \t\t}\n \t\tchangingGDS = false;\n \t}", "@Test\n void delete() {\n }", "@Test\n void delete() {\n }", "public boolean hasLayers() {\n\t\treturn false;\n\t}", "@Test\n public void delete01() {\n Response responseGet = given().\n spec(spec03).\n when().\n get(\"/3\");\n responseGet.prettyPrint();\n\n Response responseDel = given().\n spec(spec03).\n when().\n delete(\"/3\");\n responseDel.prettyPrint();\n\n\n // responseDel yazdirildiginda not found cevabi gelirse status code 404 ile test edilir.\n // Eger bos bir satir donerse status code 200 ile test edilir.\n\n responseDel.\n then().\n statusCode(200);\n\n\n // hard assert\n\n assertTrue(responseDel.getBody().asString().contains(\" \"));\n\n // soft assertion\n\n SoftAssert softAssert = new SoftAssert();\n softAssert.assertTrue(responseDel.getBody().asString().contains(\" \"));\n softAssert.assertAll();\n }", "@Test\n public void deleteIngredient_Deletes(){\n int returned = testDatabase.addIngredient(ingredient);\n testDatabase.deleteIngredient(returned);\n assertEquals(\"deleteIngredient - Deletes From Database\",null, testDatabase.getIngredient(returned));\n }", "@Test\r\n public void testDelete() throws PAException {\r\n Ii spIi = IiConverter.convertToStudyProtocolIi(TestSchema.studyProtocolIds.get(0));\r\n List<StudyDiseaseDTO> dtoList = bean.getByStudyProtocol(spIi);\r\n int oldSize = dtoList.size();\r\n Ii ii = dtoList.get(0).getIdentifier();\r\n bean.delete(ii);\r\n dtoList = bean.getByStudyProtocol(spIi);\r\n assertEquals(oldSize - 1, dtoList.size());\r\n }", "private static void deleteTest(int no) {\n\t\tboolean result=new CartDao().delete(no);\r\n\t\tif(!result) System.out.println(\"deleteTest fail\");\r\n\t}", "void deletePortal(Portal portal);", "public void deleteTeam(ActionEvent actionEvent) {}", "public static void clearLayers(){\n\t\tfor(int i=0;i<ChangeLayer.Layers.length;i++){\n\t\t\tChangeLayer.Layers[i].clear();\n\t\t\t}\n\t}", "@Override\n\t\tpublic boolean delete(int id) {\n\t\t\t\treturn false;\n\t\t}" ]
[ "0.67165035", "0.6115411", "0.6112374", "0.6093454", "0.6011206", "0.5976596", "0.5943831", "0.5937471", "0.5931047", "0.59129137", "0.59110093", "0.5875123", "0.5830918", "0.58204323", "0.5802167", "0.5794877", "0.57886064", "0.57833344", "0.57648563", "0.5759462", "0.5744032", "0.5706972", "0.5701068", "0.5700057", "0.5699605", "0.5667243", "0.5658381", "0.56319636", "0.5611489", "0.5603422", "0.5592784", "0.5583089", "0.555719", "0.5547145", "0.5537304", "0.55249864", "0.55136275", "0.55101144", "0.55091405", "0.5497823", "0.5495605", "0.54937154", "0.5490459", "0.5466687", "0.5465092", "0.5462416", "0.54604334", "0.5457183", "0.5446345", "0.5445658", "0.5438735", "0.5421072", "0.54200727", "0.5413331", "0.54044825", "0.5394276", "0.5384561", "0.537873", "0.5378218", "0.53772753", "0.5364585", "0.5357691", "0.535612", "0.5355104", "0.53506386", "0.53301764", "0.5327502", "0.5325218", "0.5319374", "0.5315272", "0.53066826", "0.5302259", "0.5300783", "0.52935594", "0.5291341", "0.52911496", "0.52891064", "0.528832", "0.528832", "0.52858853", "0.52858776", "0.52843225", "0.52839357", "0.52792567", "0.5278509", "0.52779865", "0.5277308", "0.5276749", "0.52731764", "0.5272401", "0.5272401", "0.5271078", "0.52700084", "0.5264696", "0.5256969", "0.5256908", "0.5250939", "0.52472025", "0.52456754", "0.5242934" ]
0.85791725
0
Test of deselectAll, in LayersViewController
@Test public void testDeselectAll() { LayersViewController instance = LayersViewController.getDefault().init(null); instance.createLayer(); instance.createLayer(); instance.getVxQueryCollection().setVisibilityOnAll(true); instance.getTxQueryCollection().setVisibilityOnAll(true); instance.deselectAll(); assertEquals(instance.getVxQueryCollection().isVisibilityOnAll(), false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void deselectAll()\n {\n }", "public void deselectAll()\n {\n map.deselectAll();\n mapComponent.repaint();\n mapper.resetMenus();\n }", "public void deselectAll() {\n\t\tselected.clear();\n\t}", "public native void deselectAll() /*-{\r\n var self = this.@com.smartgwt.client.widgets.BaseWidget::getOrCreateJsObj()();\r\n self.deselectAll();\r\n }-*/;", "@Test\n public void testDeleteLayer() {\n LayersViewController instance = LayersViewController.getDefault().init(null);\n instance.createLayer();\n instance.deleteLayer(2);\n assertEquals(instance.getVxQueryCollection().getHighestQueryIndex(), 3);\n\n }", "public void cabDeselectAll() {\n ListView lv = getListView();\n int vCnt = lv.getCount();\n \n for (int i = 0; i < vCnt; i++) {\n \tlv.setItemChecked(i, false);\n }\n \n selectedListItems.clear();\n redrawListView();\n }", "public void removeAllAgents(String layer)\n/* 180: */ {\n/* 181:254 */ this.mapPanel.removeAllAgents(layer);\n/* 182: */ }", "@Test\r\n public void testSelectAll() {\r\n System.out.println(\"AbonentDAL selectAll\");\r\n AbonentDAL instance = new AbonentDAL();\r\n List<Abonent> result = instance.selectAll();\r\n assertTrue(result!=null && result.size()>0);\r\n }", "private void filterResultLayers() {\n\n\t\tif (this.modifyNewLayerName) {\n\t\t\treturn;\n\t\t}\n\n\t\tloadComboWithLayerList(comboTargetLayer, ParameterName.TARGET_GEOMETRY_CLASS);\n\t\tloadResultLayersGeometry();\n\t\trestoreSelectedTargetLayer();\n\t}", "public static void doUnexpandall ( RunData data)\n\t{\n\t\t// get the state object\n\t\tSessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ());\n\n\t\t//get the ParameterParser from RunData\n\t\tParameterParser params = data.getParameters ();\n\n\t\t// save the current selections\n\t\tSet selectedSet = new TreeSet();\n\t\tString[] selectedItems = params.getStrings (\"selectedMembers\");\n\t\tif(selectedItems != null)\n\t\t{\n\t\t\tselectedSet.addAll(Arrays.asList(selectedItems));\n\t\t}\n\t\tstate.setAttribute(STATE_LIST_SELECTIONS, selectedSet);\n\n\t\tstate.setAttribute(STATE_EXPANDED_COLLECTIONS, new TreeSet());\n\t\tstate.setAttribute(STATE_EXPANDED_FOLDER_SORT_MAP, new Hashtable());\n\t\tstate.setAttribute(STATE_EXPAND_ALL_FLAG, Boolean.FALSE.toString());\n\n\t}", "public void testMarkAllItemsSelected()\n\t{\n\t\t// Arrange\n\t\taddListWith6Items(\"testlist\");\n\n\t\t// Act\n\t\tservice.markAllItemsSelected(2l, true);\n\t\tActivitiesDataSource allLists = service.getActivitiesWithChildren(new Long[]\n\t\t{}, true);\n\t\tActivityBean newList = allLists.getActivity(\"testlist\");\n\n\t\t// Assert\n\t\tCategoryBean newCategory1 = newList.getCategory(\"cat1\");\n\t\tCategoryBean newCategory2 = newList.getCategory(\"cat2\");\n\t\tassertTrue(newCategory1.getEntry(\"item1\").getIsSelected());\n\t\tassertTrue(newCategory1.getEntry(\"item2\").getIsSelected());\n\t\tassertTrue(newCategory1.getEntry(\"item3\").getIsSelected());\n\t\tassertTrue(newCategory2.getEntry(\"item4\").getIsSelected());\n\t\tassertTrue(newCategory2.getEntry(\"item5\").getIsSelected());\n\t\tassertTrue(newCategory2.getEntry(\"item6\").getIsSelected());\t\t\n\t\t\n\t\t// Act\n\t\tservice.markAllItemsSelected(2l, false);\n\t\tallLists = service.getActivitiesWithChildren(new Long[]\n\t\t{}, true);\n\t\tnewList = allLists.getActivity(\"testlist\");\n\n\t\t// Assert\n\t\tnewCategory1 = newList.getCategory(\"cat1\");\n\t\tnewCategory2 = newList.getCategory(\"cat2\");\n\t\tassertFalse(newCategory1.getEntry(\"item1\").getIsSelected());\n\t\tassertFalse(newCategory1.getEntry(\"item2\").getIsSelected());\n\t\tassertFalse(newCategory1.getEntry(\"item3\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item4\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item5\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item6\").getIsSelected());\t\n\t}", "public void switchSelectAll() {\n\t\tif (mDeList.size() == mStationList.getSize()) {\n\t\t\tunSelectAll();\n\t\t} else {\n\t\t\tselectAll();\n\t\t}\n\t\tif (mOnChannelLitener != null) { \n\t\t\tmOnChannelLitener.onSelectChange(mDeList.size(), mStationList.getSize());\n\t\t}\n\t}", "@Test\n public void testSelectAll() {\n List<Discipline> listDisciplines = new ArrayList();\n listDisciplines = disciplineDao.selectAll();\n boolean result = listDisciplines.size() > 0;\n assertTrue(result);\n }", "public abstract void deselectAllIndexes();", "public static void clearLayers(){\n\t\tfor(int i=0;i<ChangeLayer.Layers.length;i++){\n\t\t\tChangeLayer.Layers[i].clear();\n\t\t\t}\n\t}", "public void clearAllSelected() {\n getSelectHelper().clearAllSelected();\n }", "public abstract void clearAllSelections();", "@Test\n public void testChangeLayerVisibility() {\n LayersViewController instance = LayersViewController.getDefault().init(null);\n instance.createLayer();\n int index1 = 2;\n Query query1 = new Query(GraphElementType.VERTEX, \"Type == 'Event'\");\n instance.getVxQueryCollection().getQuery(index1).setQuery(query1);\n instance.getTxQueryCollection().getQuery(index1).setQuery(null);\n\n instance.changeLayerVisibility(index1, true);\n assertTrue(instance.getVxQueryCollection().getQuery(index1).isVisible());\n\n instance.createLayer();\n int index2 = 3;\n Query query2 = new Query(GraphElementType.TRANSACTION, \"Type == 'Network'\");\n instance.getTxQueryCollection().getQuery(index2).setQuery(query2);\n instance.getVxQueryCollection().getQuery(index2).setQuery(null);\n\n instance.changeLayerVisibility(index2, true);\n assertTrue(instance.getTxQueryCollection().getQuery(index2).isVisible());\n }", "@Test\n public void testDeleteGetAll() {\n lib.addDVD(dvd1);\n lib.addDVD(dvd2);\n \n lib.deleteDVD(0);\n \n Assert.assertEquals(1, lib.getDVDLibrary().size());\n }", "public void deselect();", "@Test\n\t@TestProperties(name = \"Clear element ${by}:${locator} selection\", paramsInclude = { \"by\", \"locator\" })\n\tpublic void clearSelections() {\n\t\tthrow new IllegalStateException(\"Unimplemenetd\");\n\t}", "public void removeAllOverlayObj(String layer)\n/* 185: */ {\n/* 186:261 */ this.mapPanel.removeAllOverlayObj(layer);\n/* 187: */ }", "public void testMarkAllItemsSelectedInCategory()\n\t{\n\t\t// Arrange\n\t\taddListWith6Items(\"testlist\");\n\n\t\t// Act\n\t\tservice.markAllItemsSelectedInCategory(17l, true);\n\t\tActivitiesDataSource allLists = service.getActivitiesWithChildren(new Long[]\n\t\t{}, true);\n\t\tActivityBean newList = allLists.getActivity(\"testlist\");\n\n\t\t// Assert\n\t\tCategoryBean newCategory1 = newList.getCategory(\"cat1\");\n\t\tCategoryBean newCategory2 = newList.getCategory(\"cat2\");\n\t\tassertTrue(newCategory1.getEntry(\"item1\").getIsSelected());\n\t\tassertTrue(newCategory1.getEntry(\"item2\").getIsSelected());\n\t\tassertTrue(newCategory1.getEntry(\"item3\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item4\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item5\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item6\").getIsSelected());\n\t\t\n\t\t// Act\n\t\tservice.markAllItemsSelectedInCategory(17l, false);\n\t\tallLists = service.getActivitiesWithChildren(new Long[]\n\t\t{}, true);\n\t\tnewList = allLists.getActivity(\"testlist\");\n\n\t\t// Assert\n\t\tnewCategory1 = newList.getCategory(\"cat1\");\n\t\tnewCategory2 = newList.getCategory(\"cat2\");\n\t\tassertFalse(newCategory1.getEntry(\"item1\").getIsSelected());\n\t\tassertFalse(newCategory1.getEntry(\"item2\").getIsSelected());\n\t\tassertFalse(newCategory1.getEntry(\"item3\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item4\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item5\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item6\").getIsSelected());\n\t}", "void clearFeatures();", "public synchronized void removeAllTeamMembers() {\n teamSelection = new HashSet<>();\n }", "public void clearAll() {\n\n\t\t// Removing the graphics from the layer\n\t\trouteLayer.removeAll();\n\t\t// hiddenSegmentsLayer.removeAll();\n\t\tmMapViewHelper.removeAllGraphics();\n\t\tmResults = null;\n\n\t}", "protected void deselectAllCurves() {\n\t\tfor (int i = 0; i < selectedCurves.size(); ++i) {\n\t\t\tcurves.add(selectedCurves.get(i));\n\t\t}\n\n\t\tselectedCurves.clear();\n\t}", "public void removeAllAgents()\n/* 76: */ {\n/* 77:125 */ this.mapPanel.removeAllAgents();\n/* 78: */ }", "public void onSelectedFromReset() {\n\t\tfilterName = null;\n\t\tfilterState = null;\n\t\tfilterVariant = null;\n\t\tfilterAcquisition = null;\n\t\tfilterLiquidation = null;\n\t\tfilterLocation = null;\n\t\tfilterComment = null;\n\t\tledger.reset();\n\t\t// ... then just fall through to the success action.\n\t}", "public void selectAll (){\r\n\t\tboolean noNeedNotification = (modeSelectAll && unselectedDataIds.isEmpty());\r\n\t\t\r\n\t\tunselectedDataIds.clear(); \r\n\t\tselectedDataIds.clear();\r\n\t\tmodeSelectAll = true ;\r\n\t\tif (! noNeedNotification)\r\n\t\t\tfireSelectionChangeNotification();\r\n\t}", "@Test\n public void testRemoveAll() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n boolean expectedResult = true;\n boolean result = instance.removeAll(c);\n\n assertEquals(expectedResult, result);\n\n }", "@Test\n void testDeleteCity() {\n CityList cityList = mockCityList();\n cityList.delete(mockCity());\n\n assertFalse(cityList.hasCity(mockCity()));\n assertTrue(cityList.countCities() == 0);\n\n }", "protected void mergeVisible ()\n {\n List<Integer> visible = getVisibleLayers();\n // remove the first layer and call that the \"mergeTo\" layer\n int mergeTo = visible.remove(0); // remove first value, not value 0!\n\n for (TudeySceneModel.Entry entry : _scene.getEntries()) {\n Object key = entry.getKey();\n if (visible.contains(_scene.getLayer(key))) {\n _scene.setLayer(key, mergeTo);\n }\n }\n\n // kill the layers, highest to lowest\n for (Integer layer : Lists.reverse(visible)) {\n _tableModel.removeLayer(layer);\n }\n fireStateChanged();\n }", "@Override\n public void deselectGolem() {\n }", "@Test\r\n\tpublic void testDeleteAll() throws Exception {\n\t\tArrayList<Calificacion> calificaciones = modelo.getAll();\r\n\t\tfor (Calificacion calificacion : calificaciones) {\r\n\t\t\tassertTrue(modelo.delete(calificacion.getId()));\r\n\t\t}\r\n\t\tassertNull(modelo.getAll());\r\n\t}", "void onDiscardChangesSelected();", "public void markDualVectorTypeDelete() throws JNCException {\n markLeafDelete(\"dualVectorType\");\n }", "@Test\n public void testCityConnectionsRemoval(){\n boolean removed = cityDataHandler.removeCityMapperConnection(new CityMapper(\"Trenton\", \"Albany\"));\n assertThat(true, Matchers.equalTo(removed));\n int dataMapSize = cityDataHandler.countMap();\n assertThat(4, Matchers.equalTo(dataMapSize));\n }", "public native void deselectAllFacetValues() /*-{\r\n var self = this.@com.smartgwt.client.widgets.BaseWidget::getOrCreateJsObj()();\r\n self.deselectAllFacetValues();\r\n }-*/;", "private List<MutateOperation> removeAll() {\n return removeDescendantsAndFilter(rootResourceName);\n }", "public void filterOutSelection() {\n RenderContext myrc = (RenderContext) rc; if (myrc == null) return;\n Set<String> sel = myrc.filterEntities(getRTParent().getSelectedEntities());\n if (sel == null || sel.size() == 0) { getRTParent().pop(); repaint(); return; }\n Set<Bundle> new_bundles = new HashSet<Bundle>();\n if (sel != null && sel.size() > 0) {\n new_bundles.addAll(myrc.bs.bundleSet());\n Iterator<String> it = sel.iterator();\n\twhile (it.hasNext()) new_bundles.removeAll(myrc.entity_counter_context.getBundles(it.next()));\n getRTParent().setSelectedEntities(new HashSet<String>());\n\tgetRTParent().push(myrc.bs.subset(new_bundles));\n repaint();\n }\n }", "public void updateLayerList ()\n\t{\n\t\n\t\tString selectedLayer = null;\n\t\tif (mLayerMenu != null)\n\t\t{\n\t\t\tselectedLayer = (String)mLayerMenu.getSelectedItem();\n\t\t}\n\t\n\t\tmLayerMenu.removeAllItems();\n\t\t\n\t\t// Add all polygon layers to the list.\n\t\tint nlayers = AppContext.layerManager.size();\n\t\t\n\t\t// Check for each layer whether it is a polygon layer or not.\n\t\tfor (int lyrcnt = 0; lyrcnt < nlayers; lyrcnt++)\n\t\t{\n\t\t\tLayer lyr = AppContext.layerManager.getLayer(lyrcnt);\n\t\t\tFeatureCollectionWrapper fcw = lyr.getFeatureCollectionWrapper();\n\t\t\tint nfeat = fcw.size();\n\t\t\tif (nfeat > 0)\n\t\t\t{\n\t\t\t\tFeature feat = (Feature)fcw.getFeatures().get(0);\n\t\t\t\tGeometry geom = feat.getGeometry();\n\t\t\t\tif (geom.getArea() != 0.0)\n\t\t\t\t{\n\t\t\t\t\tString layerName = lyr.getName();\n\t\t\t\t\tmLayerMenu.addItem(layerName);\n\t\t\t\t\tif (layerName == selectedLayer)\n\t\t\t\t\t\tmLayerMenu.setSelectedItem(layerName);\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t}", "@Test\n public void testClear() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 1, 1, 1, 1, 1);\n instance.addAll(c);\n instance.clear();\n\n assertTrue(instance.isEmpty());\n\n }", "void removeAllParameterViews();", "public void updateDeletions() {\r\n for (Lane l : lanes) {\r\n Vehicle[] vehArray = l.getVehicles().toArray(new Vehicle[0]);\r\n for (Vehicle v : vehArray) {\r\n if (v.getHeadSegment().equals(l.getLastSegment())) {\r\n l.getVehicles().remove(v);\r\n numberOfVehicles--;\r\n if (v instanceof Car) {\r\n SimulationStats.incrementCars();\r\n SimulationStats.addEvent(SimulationStats.createVehicleLeavingEvent(v));\r\n } else if (v instanceof Truck) {\r\n SimulationStats.incrementTrucks();\r\n SimulationStats.addEvent(SimulationStats.createVehicleLeavingEvent(v));\r\n }\r\n }\r\n }\r\n }\r\n }", "public void allLayers()\n\t{\n\t\tint totalLayers = this.psd.getLayersCount();\n\t\t\n\t\tLayer layer;\n\t\t\n\t\tfor (int i = totalLayers - 1; i >= 0; i--) {\n\t\t\tlayer = this.psd.getLayer(i);\n\t\t\t\n\t\t\tif (!layer.isVisible() || (layer.getType() == LayerType.NORMAL && layer.getWidth() == 0)) {\n\t\t\t\tthis.layersToRemove.add(layer);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tlayer.adjustPositionAndSizeInformation();\n\t\t\tthis.layerId++;\n\t\t\t\n\t\t\tif (LayerType.NORMAL == layer.getType()) {\n\t\t\t\t\n\t\t\t\tlayer.setUniqueLayerId(this.layerId);\n\t\t\t\tlayer.setGroupLayerId(0);\n\t\t\t\tlayer.setDepth(0);\n\t\t\t\t\n\t\t\t\tthis.layers.add(layer);\n\t\t\t\t\n\t\t\t} else if (LayerType.OPEN_FOLDER == layer.getType() || LayerType.CLOSED_FOLDER == layer.getType()) {\n\t\t\t\t\n\t\t\t\tlayer.setUniqueLayerId(this.layerId);\n\t\t\t\tlayer.setGroupLayerId(0);\n\t\t\t\tlayer.setDepth(0);\n\t\t\t\t\n\t\t\t\tthis.layers.add(layer);\n\t\t\t\t\n\t\t\t\tif (layer.getLayersCount() > 0) {\n\t\t\t\t\tthis.subLayers(layer, this.layerId, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void clearIsChanged();", "@Test\n public void testContainsAll_Not_Contain() {\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(1);\n instance.add(4);\n\n Collection c = Arrays.asList(1, 2, 5);\n\n boolean expResult = false;\n boolean result = instance.containsAll(c);\n assertEquals(expResult, result);\n }", "@Test\n public void deleteAllUsesStationDaoToRemoveAllStations()\n {\n StationDao mockStationDao = mock(StationDao.class);\n LundergroundFacade facade = new LundergroundFacade();\n facade.setStationDao(mockStationDao);\n\n facade.deleteAllStations();\n\n verify(mockStationDao).deleteAll();\n }", "public void invertSelection () {\r\n\t\tif ( modeSelectAll){\r\n\t\t\tselectedDataIds.clear();\r\n\t\t\tif (! unselectedDataIds.isEmpty()){\r\n\t\t\t\tselectedDataIds.addAll(unselectedDataIds);\r\n\t\t\t\tunselectedDataIds.clear();\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tunselectedDataIds.clear();\r\n\t\t\tif (!selectedDataIds.isEmpty()){\r\n\t\t\t\tunselectedDataIds.addAll(selectedDataIds);\r\n\t\t\t\tselectedDataIds.clear();\r\n\t\t\t}\r\n\t\t}\r\n\t\tmodeSelectAll=!modeSelectAll;\r\n\t\tfireSelectionChangeNotification();\r\n\t\t\r\n\t}", "public void removeAllFightsystems()\r\n {\n\r\n }", "private void testLeerObservacionesDelArea() throws SQLException \n\t{\n\t\t// Recuperar la observacion\n\t\tObservacionesDAO obvDAO = PersistenceFactory.createObservacionesDAO();\n\t\tList<Observation> leidas = obvDAO.leerObservacionesDeUnArea(this.observacion.getArea());\n\n\t\tassertEquals(leidas.size(), 1);\n\t\tassertEquals(leidas.get(0).getArea().getIdArea(), this.observacion.getArea().getIdArea());\n\t\tassertEquals(leidas.get(0).getArea(), this.observacion.getArea());\n\t\tassertEquals(leidas.get(0).getIndicator(), this.observacion.getIndicator());\n\t\tassertEquals(leidas.get(0).getProvider(), this.observacion.getProvider());\n\t\tassertEquals(leidas.get(0).getMeasure(), this.observacion.getMeasure());\n\t\tassertEquals(leidas.get(0).getTime(),this.observacion.getTime());\n\t\tassertEquals(leidas.get(0).getSubmission(), this.observacion.getSubmission());\n\t}", "public void removeAllInterpretedBy() {\r\n\t\tBase.removeAll(this.model, this.getResource(), INTERPRETEDBY);\r\n\t}", "public void clearTableSelectedSet(){\n\t\tselectionModel.clear();\n\t}", "private void deleteSelectedWaypoints() {\r\n\t ArrayList<String> waypointsToRemove = new ArrayList<String>();\r\n\t int size = _selectedList.size();\r\n\t for (int i = _selectedList.size() - 1; i >= 0; --i) {\r\n boolean selected = _selectedList.get(i);\r\n if (selected) {\r\n waypointsToRemove.add(UltraTeleportWaypoint.getWaypoints().get(i).getWaypointName());\r\n }\r\n }\r\n\t UltraTeleportWaypoint.removeWaypoints(waypointsToRemove);\r\n\t UltraTeleportWaypoint.notufyHasChanges();\r\n\t}", "@Test\n public void testRetainAll() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n boolean expectedResult = true;\n boolean result = instance.retainAll(c);\n\n assertEquals(expectedResult, result);\n }", "@Test\n @WithMockUhUser(username = \"iamtst06\")\n public void optOutTest() throws Exception {\n assertTrue(isInCompositeGrouping(GROUPING, tst[0], tst[5]));\n assertTrue(isInBasisGroup(GROUPING, tst[0], tst[5]));\n\n //tst[5] opts out of Grouping\n mapGSRs(API_BASE + GROUPING + \"/optOut\");\n }", "void removeAll();", "void removeAll();", "public void validateSelection()\r\n {\r\n for (int i = 0; i<getSelectedElements().size(); ++i)\r\n {\r\n ReportElement re = (ReportElement)getSelectedElements().elementAt(i);\r\n if (!getCrosstabElement().getElements().contains( re ))\r\n {\r\n getSelectedElements().remove(re);\r\n --i;\r\n }\r\n }\r\n // UPDATE SELECTION NOW!!!\r\n }", "private void resetDoctorsList() {\n if (!nearbyDoctorsData.isEmpty()) {\n nearbyDoctorsData.clear();\n doctorsAdapter.notifyDataSetChanged();\n mListViewDoctors.setVisibility(View.GONE);\n }\n }", "public void test4() {\n //$NON-NLS-1$\n deployBundles(\"test4\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void testRetainAll_Empty() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n\n instance.add(1);\n instance.add(1);\n instance.add(1);\n instance.add(1);\n\n Collection c = Arrays.asList(2, 3);\n instance.retainAll(c);\n\n int expectedResult = 0;\n assertEquals(expectedResult, instance.size());\n\n }", "private void clearAllFilter() {\n }", "@Test\n public void testGetAllDelOrgs() {\n Organization org = new Organization();\n org.setOrgId(1);\n org.setOrgName(\"Avenger\");\n org.setDescription(\"blah blah\");\n org.setAddress(ad);\n dao.addOrg(org);\n List<Organization> orgs = dao.getAllOrgs();\n assertEquals(1, orgs.size());\n dao.delOrg(org.getOrgId());\n orgs = dao.getAllOrgs();\n assertEquals(0, orgs.size());\n }", "public void emptySelectionLists() {\n\t\tArrayList selectionsCopy = new ArrayList();\n\t\tselectionsCopy.addAll(selections);\n\t\tIterator it = selectionsCopy.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tXsdNode node = (XsdNode) it.next();\n\t\t\tunselectNode(node);\n\t\t}\n\t\tlineNode = null;\n\t\telementFilters = new HashMap();\n\t}", "@Override\n public void resetFilteredLists() {\n\n }", "public void removeAllOverlayObj()\n/* 91: */ {\n/* 92:146 */ this.mapPanel.removeAllOverlayObj();\n/* 93: */ }", "private void assertUnchanged(SyncInfoTree set) throws TeamException {\n //TODO: Need to refresh the subscriber since flush of remote state is deep\n CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber().refresh(set.getResources(), IResource.DEPTH_ZERO, DEFAULT_MONITOR);\n SyncInfo[] infos = set.getSyncInfos();\n for (int i = 0; i < infos.length; i++) {\n SyncInfo info = infos[i];\n assertUnchanged(info);\n }\n }", "private void leaveRenderGroups() {\r\n if (onePageDataModel.page != null) {\r\n for (CustomerBean uiCustomerBean : uiCustomerBeans) {\r\n renderManager.getOnDemandRenderer(uiCustomerBean.getCustomer().getCustomernumber().toString()).remove(this);\r\n }\r\n }\r\n }", "@Test\n public void testRemoveBitmaskFromElements() {\n System.out.println(\"removeBitmaskFromElements\");\n\n // Setup a graph with elements\n setupGraph();\n\n final GraphManager gm = Mockito.mock(GraphManager.class);\n when(gm.getActiveGraph()).thenReturn(graph);\n\n // Create mock of DataAccessPane to return the query phase pane mock\n try (MockedStatic<GraphManager> mockedStatic = Mockito.mockStatic(GraphManager.class)) {\n mockedStatic.when(() -> GraphManager.getDefault()).thenReturn(gm);\n\n WritableGraph wg;\n try {\n wg = graph.getWritableGraph(\"\", true);\n\n // Check Vertex set correctly\n assertEquals(wg.getIntValue(layerMaskV, vxId1), 1);\n assertEquals(wg.getFloatValue(layerVisibilityV, vxId1), 1.0f);\n assertFalse(wg.getBooleanValue(selectedV, vxId1));\n\n assertEquals(wg.getIntValue(layerMaskV, vxId2), 1);\n assertEquals(wg.getFloatValue(layerVisibilityV, vxId2), 1.0f);\n assertFalse(wg.getBooleanValue(selectedV, vxId2));\n\n // Check Transaction set correctly\n assertEquals(wg.getIntValue(layerMaskT, vxId1), 1);\n assertEquals(wg.getFloatValue(layerVisibilityT, vxId1), 1.0f);\n assertFalse(wg.getBooleanValue(selectedT, vxId1));\n\n assertEquals(wg.getIntValue(layerMaskT, vxId2), 1);\n assertEquals(wg.getFloatValue(layerVisibilityT, vxId2), 1.0f);\n assertFalse(wg.getBooleanValue(selectedT, vxId2));\n\n wg.commit();\n\n } catch (final InterruptedException ex) {\n Exceptions.printStackTrace(ex);\n Thread.currentThread().interrupt();\n }\n\n // remove bitmask from elements - nothing should be on layer 5\n int currentIndex = 5;\n LayersViewController instance = LayersViewController.getDefault().init(null);\n instance.removeBitmaskFromElements(currentIndex);\n\n try {\n wg = graph.getWritableGraph(\"\", true);\n\n // Check Vertex unchanged\n assertEquals(wg.getIntValue(layerMaskV, vxId1), 1);\n assertEquals(wg.getFloatValue(layerVisibilityV, vxId1), 1.0f);\n assertFalse(wg.getBooleanValue(selectedV, vxId1));\n\n assertEquals(wg.getIntValue(layerMaskV, vxId2), 1);\n assertEquals(wg.getFloatValue(layerVisibilityV, vxId2), 1.0f);\n assertFalse(wg.getBooleanValue(selectedV, vxId2));\n\n // Check Transaction set correctly\n assertEquals(wg.getIntValue(layerMaskT, vxId1), 1);\n assertEquals(wg.getFloatValue(layerVisibilityT, vxId1), 1.0f);\n assertFalse(wg.getBooleanValue(selectedT, vxId1));\n\n assertEquals(wg.getIntValue(layerMaskT, vxId2), 1);\n assertEquals(wg.getFloatValue(layerVisibilityT, vxId2), 1.0f);\n assertFalse(wg.getBooleanValue(selectedT, vxId2));\n\n // Set vx2 and tx2 into layer 2. Both are visibility 0 because current layer is 1.\n wg.setIntValue(layerMaskV, vxId2, 0b11);\n wg.setFloatValue(layerVisibilityV, vxId2, 0.0f);\n wg.setIntValue(layerMaskT, txId2, 0b11);\n wg.setFloatValue(layerVisibilityT, txId2, 0.0f);\n\n wg.commit();\n\n } catch (final InterruptedException ex) {\n Exceptions.printStackTrace(ex);\n Thread.currentThread().interrupt();\n }\n\n // remove bitmask from elements - should only remove the elements vx2 and tx2\n currentIndex = 1;\n instance.removeBitmaskFromElements(currentIndex);\n\n try {\n wg = graph.getWritableGraph(\"\", true);\n // Check Vertex 1 unchanged\n assertEquals(wg.getIntValue(layerMaskV, vxId1), 1);\n assertEquals(wg.getFloatValue(layerVisibilityV, vxId1), 1.0f);\n assertFalse(wg.getBooleanValue(selectedV, vxId1));\n\n // Check Vertex 2 changed - visibility 0.0 because no visibility update\n assertEquals(wg.getIntValue(layerMaskV, vxId2), 1);\n assertEquals(wg.getFloatValue(layerVisibilityV, vxId2), 0.0f);\n assertFalse(wg.getBooleanValue(selectedV, vxId2));\n\n // Check Transaction 1 unchanged\n assertEquals(wg.getIntValue(layerMaskT, vxId1), 1);\n assertEquals(wg.getFloatValue(layerVisibilityT, vxId1), 1.0f);\n assertFalse(wg.getBooleanValue(selectedT, vxId1));\n\n assertEquals(wg.getIntValue(layerMaskT, vxId2), 1);\n assertEquals(wg.getFloatValue(layerVisibilityT, vxId2), 0.0f);\n assertFalse(wg.getBooleanValue(selectedT, vxId2));\n\n wg.commit();\n\n } catch (final InterruptedException ex) {\n Exceptions.printStackTrace(ex);\n Thread.currentThread().interrupt();\n }\n }\n }", "public void limparFiltroOfertas() {\n dataModel = null;\n }", "public void canelDataUpdate() {\n dataModel.cancelDataLoading();\n }", "public native void deselectAllCells() /*-{\r\n var self = this.@com.smartgwt.client.widgets.BaseWidget::getOrCreateJsObj()();\r\n self.deselectAllCells();\r\n }-*/;", "public void hide_completed()\r\n {\n if(!this.filter)\r\n {\r\n if(tableView.getItems().size()>0) {\r\n for (int i = 0; i < tableView.getItems().size(); i++) {\r\n ucf.assignments.list selectedList = tableView.getItems().get(i);\r\n this.all_items.add(selectedList);\r\n }\r\n }\r\n }\r\n else\r\n {\r\n resettable();\r\n }\r\n this.filter = true;\r\n ArrayList<ucf.assignments.list> tmplist = new ArrayList<ucf.assignments.list>();\r\n\r\n for(int i = 0; i<tableView.getItems().size();i++)\r\n {\r\n ucf.assignments.list selectedList = tableView.getItems().get(i);\r\n if(!selectedList.getstatus())\r\n tmplist.add(selectedList);\r\n }\r\n tableView.getItems().removeAll(tmplist);\r\n }", "@Test\n public void testRemoveAll_Size() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n instance.removeAll(c);\n\n int expectedResult = 0;\n assertEquals(expectedResult, instance.size());\n\n }", "public void deleteSelection() {\n deleteFurniture(Home.getFurnitureSubList(this.home.getSelectedItems())); \n }", "@Test\n @IfProfileValue(name=\"dept-test-group\", values={\"all\",\"dept-del\"})\n public void _2_3_1_delExistDept() throws Exception {\n this.mockMvc.perform(delete(\"/api/v1.0/companies/\"+\n d_1.getCompany()+\n \"/departments/\"+\n d_1.getId())\n .header(AUTHORIZATION,ACCESS_TOKEN))\n .andDo(print())\n .andExpect(status().isOk());\n thrown.expect(NameNotFoundException.class);\n repository.findDepartment(d_1.getId());\n }", "@Test\n public void selectAll() {\n List<ProductCategory>productCategories=categoryService.selectAll();\n for (ProductCategory productCategory:productCategories\n ) {\n System.out.println(productCategory);\n }\n }", "@Test\n public void testRemoveBitmaskFromElementsEmptyGraph() {\n System.out.println(\"removeBitmaskFromElements_EmptyGraph\");\n setupEmptyGraph();\n\n final GraphManager gm = Mockito.mock(GraphManager.class);\n when(gm.getActiveGraph()).thenReturn(graph);\n\n // Create mock of DataAccessPane to return the query phase pane mock\n try (MockedStatic<GraphManager> mockedStatic = Mockito.mockStatic(GraphManager.class)) {\n mockedStatic.when(() -> GraphManager.getDefault()).thenReturn(gm);\n\n ReadableGraph rg = graph.getReadableGraph();\n assertEquals(rg.getVertexCount(), 0);\n rg.close();\n\n // remove bitmask from elements - nothing should be on layer 5\n int currentIndex = 5;\n LayersViewController instance = LayersViewController.getDefault().init(null);\n instance.removeBitmaskFromElements(currentIndex);\n\n ReadableGraph rg2 = graph.getReadableGraph();\n assertEquals(rg2.getVertexCount(), 0);\n rg2.close();\n\n currentIndex = 1;\n instance.removeBitmaskFromElements(currentIndex);\n\n ReadableGraph rg3 = graph.getReadableGraph();\n assertEquals(rg3.getVertexCount(), 0);\n rg3.close();\n\n }\n }", "public void clearListSelection() {\n/* 494 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@FXML\n public void allSelected() {\n this.populateListInterview(this.interviewer.getPendingInterviews());\n }", "@Test\n public void testSelectAllByEducationId() {\n List<Discipline> listDisciplines = new ArrayList();\n listDisciplines = disciplineDao.selectAllByEducationId(1);\n boolean result = listDisciplines.size() > 0;\n assertTrue(result);\n }", "void reset() {\n colorSelectedList = new HashSet<>();\n }", "public void clearFetchGroups() {\n\t\tquery.getFetchPlan().clearFetchGroups();\n\t}", "void unsetSpecimen();", "public void cleanDirtyFlags() {\n RetractedChanged=false;\n AddressIDChanged=false;\n EntityIDChanged=false;\n AddressTypeIDChanged=false;\n}", "static public void deselect(DrawingPad drawingPad, SelectPanel selectPanel, Rectangle2D.Float fBounds) {\n // Current layer.\n boolean bCurrentLayer = selectPanel.isCurrentLayer();\n \n // Get the selected design.\n if (selectPanel.isSelectAllItems())\n drawingPad.getDesign().setLinesAndVerticesSelected(false);\n else if (selectPanel.isSelectGraph())\n drawingPad.getDesign().deselectGraphs(fBounds, bCurrentLayer);\n else if (selectPanel.isSelectLine())\n drawingPad.getDesign().deselectLines(fBounds, bCurrentLayer);\n else if (selectPanel.isSelectPoint())\n drawingPad.getDesign().deselectVertices(fBounds, bCurrentLayer);\n else\n throw new IllegalArgumentException(\"ToolSimpleMover::deselect() Unknown select type.\");\n }", "public void clearResults()\n\t{\n\t\tremoveAll();\n\t\tm_PrinterList.setPrinterList(ToolBox.generatePrinterList().getPrinterList());\n\t\tm_PrinterList.clearMatches(m_PrinterList.getPrinterList());\n\t\tdesignComponents();\n\t\taddComponents();\n\t}", "private CommandResult clearAllLessons() {\n timetable.clearTimetable();\n logger.log(Level.INFO, \"User has cleared timetable\");\n return new CommandResult(\"Timetable has been cleared completely\");\n }", "public void deselectObjects() {\n if (contextMenu != null) {\n contextMenu.hide();\n contextMenu = null;\n }\n\n // Deselect all objects\n objectsProperty.stream().forEach(ov -> ov.setSelected(false));\n hintsProperty.stream().forEach(hv -> hv.setSelected(false));\n }", "public void clearMapLayers() {\n if(internalNative != null) {\n internalNative.removeAllMarkers();\n markers.clear();\n } else {\n if(internalLightweightCmp != null) {\n internalLightweightCmp.removeAllLayers();\n points = null;\n } else {\n // TODO: Browser component \n }\n }\n }", "public void removeAll();", "public void removeAll();", "public void removeAll();", "public void removeAll();", "public void removeAll();", "public void removeAll();", "public void removeAll();", "public void removeAll();" ]
[ "0.78453934", "0.7003293", "0.66450346", "0.6372743", "0.60918206", "0.5842726", "0.580842", "0.57712865", "0.56635356", "0.5634775", "0.563332", "0.5598322", "0.5529569", "0.5389522", "0.53552073", "0.53420657", "0.5341682", "0.5340773", "0.5321239", "0.53125316", "0.5310336", "0.52382785", "0.5207431", "0.5200053", "0.5197723", "0.5194467", "0.518956", "0.5188904", "0.51810193", "0.51766837", "0.5172186", "0.51720494", "0.5148474", "0.5145148", "0.51402634", "0.51203215", "0.51130915", "0.510597", "0.51046425", "0.50719947", "0.5071667", "0.5071143", "0.50648", "0.5064794", "0.5036078", "0.5023919", "0.5018963", "0.5014497", "0.49866953", "0.49626923", "0.4961419", "0.49606824", "0.4955975", "0.49557352", "0.49554524", "0.49494836", "0.49475366", "0.4942316", "0.4942316", "0.49410704", "0.49352428", "0.49342018", "0.4934084", "0.49294007", "0.4924785", "0.49212795", "0.491849", "0.4915577", "0.49121112", "0.49026322", "0.4899094", "0.4893888", "0.48935878", "0.48889324", "0.48852813", "0.48850536", "0.4878728", "0.48764822", "0.48718965", "0.487009", "0.48672554", "0.4856656", "0.4854763", "0.48537198", "0.48523724", "0.48451287", "0.48353654", "0.4832118", "0.48241597", "0.48231006", "0.48222235", "0.4819186", "0.48175162", "0.48175162", "0.48175162", "0.48175162", "0.48175162", "0.48175162", "0.48175162", "0.48175162" ]
0.8704577
0
Test of changeLayerVisibility, in LayersViewController
@Test public void testChangeLayerVisibility() { LayersViewController instance = LayersViewController.getDefault().init(null); instance.createLayer(); int index1 = 2; Query query1 = new Query(GraphElementType.VERTEX, "Type == 'Event'"); instance.getVxQueryCollection().getQuery(index1).setQuery(query1); instance.getTxQueryCollection().getQuery(index1).setQuery(null); instance.changeLayerVisibility(index1, true); assertTrue(instance.getVxQueryCollection().getQuery(index1).isVisible()); instance.createLayer(); int index2 = 3; Query query2 = new Query(GraphElementType.TRANSACTION, "Type == 'Network'"); instance.getTxQueryCollection().getQuery(index2).setQuery(query2); instance.getVxQueryCollection().getQuery(index2).setQuery(null); instance.changeLayerVisibility(index2, true); assertTrue(instance.getTxQueryCollection().getQuery(index2).isVisible()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setVisibility(Layer layer, boolean visibility);", "public List<Boolean> getLayerVisibility ()\n {\n return Collections.unmodifiableList(_vis);\n }", "public boolean isActiveLayerVisible() {\n\t\treturn false;\n\t}", "protected void updateVisibility (int layer, boolean visible)\n {\n for (TudeySceneModel.Entry entry : _scene.getEntries()) {\n Object key = entry.getKey();\n if (layer == _scene.getLayer(key)) {\n setVisibility(key, visible);\n }\n }\n }", "public void entryLayerWasSet (Object key, int layer)\n {\n setVisibility(key, layer);\n }", "public void changeHasInvisibility()\r\n\t{\r\n\t\thasInvisibility = !hasInvisibility;\r\n\t}", "public void setVisibilities (Collection<Integer> visibleLayers)\n {\n for (int ii = 0, nn = _vis.size(); ii < nn; ii++) {\n _vis.set(ii, visibleLayers.contains(ii));\n }\n fireTableDataChanged();\n // update every damn entry\n for (TudeySceneModel.Entry entry : _scene.getEntries()) {\n setVisibility(entry);\n }\n }", "public List<Boolean> getLayerVisibility ()\n {\n return _tableModel.getLayerVisibility();\n }", "void onControlVisibilityChange(Object object, boolean visible);", "boolean updateVisibility() {\n boolean honorsVisibility;\n if (this.honorsVisibility == null) {\n honorsVisibility = GroupLayout.this.getHonorsVisibility();\n } else {\n honorsVisibility = this.honorsVisibility;\n }\n boolean newVisible = (honorsVisibility) ?\n component.isVisible() : true;\n if (visible != newVisible) {\n visible = newVisible;\n return true;\n }\n return false;\n }", "public boolean isVisible(Visibility v);", "public interface C27129e {\n void onVisibilityChanged(boolean z);\n }", "public void mo84055a() {\n if (getVisibility() == 0) {\n animate().cancel();\n setLayerType(2, null);\n animate().alpha(0.0f).setListener(new Animator.AnimatorListener() {\n /* class com.zhihu.android.article.widget.ArticleFloatingTipsView.C172711 */\n\n public void onAnimationCancel(Animator animator) {\n }\n\n public void onAnimationRepeat(Animator animator) {\n }\n\n public void onAnimationStart(Animator animator) {\n }\n\n public void onAnimationEnd(Animator animator) {\n ArticleFloatingTipsView.this.setVisibility(4);\n ArticleFloatingTipsView.this.setLayerType(0, null);\n }\n }).start();\n }\n }", "boolean isVisible();", "boolean isVisible();", "public void setVisibleLayers (Collection<Integer> layersToMakeVisible)\n {\n int selected = getSelectedLayer();\n _tableModel.setVisibilities(layersToMakeVisible);\n setSelectedLayer(selected);\n }", "public boolean isVisible(){ return visible; }", "private void videoVisible() {\n }", "void setVisibleGlassPanel(Visibility visible);", "public final void updateViewVisibility() {\n boolean z;\n MediaHostStateHolder mediaHostStateHolder = this.state;\n if (getShowsOnlyActiveMedia()) {\n z = this.mediaDataManager.hasActiveMedia();\n } else {\n z = this.mediaDataManager.hasAnyMedia();\n }\n mediaHostStateHolder.setVisible(z);\n int i = getVisible() ? 0 : 8;\n if (i != getHostView().getVisibility()) {\n getHostView().setVisibility(i);\n Iterator<T> it = this.visibleChangedListeners.iterator();\n while (it.hasNext()) {\n ((Function1) it.next()).invoke(Boolean.valueOf(getVisible()));\n }\n }\n }", "private final void m46528g(boolean z) {\n HashMap hashMap = new HashMap();\n hashMap.put(\"isVisible\", z ? \"1\" : \"0\");\n mo39809a(\"onAdVisibilityChanged\", (Map<String, ?>) hashMap);\n }", "public void setStaticOverlayVisible(boolean vis)\n/* 106: */ {\n/* 107:167 */ this.mapPanel.showStaticOverlay = vis;\n/* 108: */ }", "public void setVisible(Boolean isVisible);", "public void updateVisibility(Camera cam) {\n int i = 0;\n \n for(WE_Face face : listaDeFaces){\n WE_Aresta arestaFace = face.getArestaDaFace();\n \n Vertice third = null;\n searchForAnyArestaParaEsquerda:\n for (WE_Aresta aresta : listaDeArestas){\n if (!aresta.equals(arestaFace)){\n if (face.ID == aresta.getFaceEsquerda().ID){\n third = aresta.getvFinal();\n break searchForAnyArestaParaEsquerda;\n } else if (face.ID == aresta.getFaceDireita().ID){\n third = aresta.getvInicial();\n break searchForAnyArestaParaEsquerda;\n }\n }\n }\n \n Vertice normal = VMath.obterNormal(arestaFace.getvFinal(), arestaFace.getvInicial(), third);\n VMath.normalizar(normal);\n double mult = VMath.produtoEscalar(cam.getVetorN(), normal);\n System.out.println(\"Normal: \" + normal + \" Mult: \" + mult);\n visibilidade_faces[i] = mult > 0; //Se mult>0, face[i] é visível\n i++;\n }\n throw new UnsupportedOperationException(\"This doesn't work and programmer should feel bad. :(\");\n //<editor-fold defaultstate=\"collapsed\" desc=\"Testes que não funcionaram\">\n /*System.out.println(\"Lista vertices: \" + listaDeVertices);\n System.out.println(\"Lista arestas: \" + listaDeArestas);\n System.out.println(\"Lista faces: \" + listaDeFaces);\n\n for (WE_Face face : listaDeFaces){\n WE_Aresta arestaFace = face.getArestaDaFace();\n System.out.println(\"ARESTA FACE: \" + arestaFace);\n WE_Aresta next;\n Vertice third;\n if (arestaFace.getFaceEsquerda().ID == face.ID){\n next = arestaFace.getEsquerdaPredecessora();\n } else {\n next = arestaFace.getDireitaSucessora();\n }\n\n if (next.getvInicial().equals(arestaFace.getvInicial())\n ||next.getvInicial().equals(arestaFace.getvFinal ()))\n third = next.getvFinal();\n else\n third = next.getvInicial();\n\n System.out.println(\"POINTS (\" + face.ID + \"): \");\n System.out.println(\"One: \" + arestaFace.getvFinal());\n System.out.println(\"Two: \" + arestaFace.getvInicial());\n System.out.println(\"Thr: \" + third);\n\n Vertice normal = VMath.obterNormal(arestaFace.getvFinal(), arestaFace.getvInicial(), third);\n VMath.normalizar(normal);\n double mult = VMath.produtoEscalar(cam.getVetorN(), normal);\n System.out.println(\"Normal: \" + normal + \" Mult: \" + mult);\n visibilidade_faces[i] = mult > 0; //Se mult>0, face[i] é visível\n\n i++;\n }*/\n\n /*for (WE_Face face : listaDeFaces){\n WE_Aresta arestaFace = null;\n\n searchForAnyArestaParaEsquerda:\n for (WE_Aresta aresta : listaDeArestas){\n if (face.ID == aresta.getFaceEsquerda().ID){\n arestaFace = aresta;\n break searchForAnyArestaParaEsquerda;\n }\n }\n\n Vertice one = arestaFace.getvInicial();\n Vertice two = arestaFace.getvFinal();\n Vertice three;\n\n arestaFace = arestaFace.getEsquerdaSucessora();\n if (arestaFace.getvInicial().equals(two)){\n three = arestaFace.getvFinal();\n } else {\n three = arestaFace.getvInicial();\n }\n\n Vertice normal = VMath.obterNormal(two, one, three);\n VMath.normalizar(normal);\n double mult = VMath.produtoEscalar(cam.getVetorN(), normal);\n System.out.println(\"Normal: \" + normal + \" Mult: \" + mult);\n visibilidade_faces[i] = mult > 0; //Se mult>0, face[i] é visível\n }*/\n //</editor-fold>\n }", "private boolean visible() {\r\n return NOT(GO() && CATS(Cc,Cn,Co,Cs,Zl,Zp)) && POINT();\r\n }", "public boolean isVisible();", "public boolean isVisible();", "public boolean isVisible();", "public abstract boolean isVisible();", "public abstract boolean isVisible();", "public void setVisible(boolean val);", "public boolean isVisible() { return _visible; }", "@Test\n public void testDeselectAll() {\n LayersViewController instance = LayersViewController.getDefault().init(null);\n instance.createLayer();\n instance.createLayer();\n instance.getVxQueryCollection().setVisibilityOnAll(true);\n instance.getTxQueryCollection().setVisibilityOnAll(true);\n\n instance.deselectAll();\n assertEquals(instance.getVxQueryCollection().isVisibilityOnAll(), false);\n }", "public Boolean isVisible();", "public Boolean isVisible();", "void onFadingViewVisibilityChanged(boolean visible);", "@Test\n\tpublic void testIsVisible() {\n\t\tip = new ImagePlus();\n\t\tassertFalse(ip.isVisible());\n\t}", "public void setIsVisible(boolean isVisible);", "@Override\n public void setVisible(boolean arg0)\n {\n \n }", "private void handleSideBoxLayerAndVisibility(SurfaceControl.Transaction transaction, WindowToken aboveAppWin, int layer) {\n WindowState win;\n ScreenSideSurfaceBox screenSideSurfaceBox = this.mSideSurfaceBox;\n if (screenSideSurfaceBox != null && screenSideSurfaceBox.isShowing()) {\n if (aboveAppWin.windowType == 2020) {\n WindowState win2 = (WindowState) aboveAppWin.getTopChild();\n if (win2 != null && \"VolumeIndex\".equals(win2.getAttrs().getTitle().toString()) && win2.isVisible()) {\n this.mSideSurfaceBox.setLayer(transaction, this.mAboveAppWindowsContainers.getSurfaceControl(), layer - 1);\n }\n } else if (aboveAppWin.windowType == 2024 && (win = (WindowState) aboveAppWin.getTopChild()) != null && \"com.huawei.android.extdisplay\".equals(win.getOwningPackage()) && win.getAttrs().getTitle().toString().contains(\"SideView\") && win.mWinAnimator != null && win.mWinAnimator.getShown()) {\n this.mSideSurfaceBox.hideSideBox();\n }\n }\n }", "public boolean hasLayers() {\n\t\treturn false;\n\t}", "private void setVisibilityToViewList(boolean z) {\n CopyOnWriteArrayList<NetworkSpeedView> copyOnWriteArrayList = this.mViewList;\n if (copyOnWriteArrayList != null) {\n Iterator<NetworkSpeedView> it = copyOnWriteArrayList.iterator();\n while (it.hasNext()) {\n it.next().setVisibilityByController(z);\n }\n }\n }", "public void onVisible() {\r\n System.out.println(\"toolkit.AbstractDemo.onVisible()\");\r\n }", "public void setVisible(boolean value)\n\t{\n\t\tisVisible = value;\n\t\tif(!isVisible)\n\t\t{\n\t\t\tsetWorldRegion(null);\n\t\t}\n\t}", "public void setDynamicOverlayVisible(boolean vis)\n/* 111: */ {\n/* 112:174 */ this.mapPanel.showDynamicOverlay = vis;\n/* 113: */ }", "public abstract void setVisible(boolean visible);", "private static final void m5628a(View view, boolean z) {\n boolean z2;\n int i = 0;\n if (view.getVisibility() != 0) {\n z2 = false;\n } else {\n z2 = true;\n }\n if (z2 != z) {\n if (!z) {\n i = 8;\n }\n view.setVisibility(i);\n }\n }", "@Override\n public void setVisible (boolean f)\n { \n }", "public boolean isVisible()\n {\n return visible;\n }", "@Test\n public void testIsVisible_2()\n throws Exception {\n ColumnPreferences fixture = new ColumnPreferences(\"\", \"\", 1, ColumnPreferences.Visibility.HIDDEN, ColumnPreferences.Hidability.HIDABLE);\n fixture.setVisible(false);\n\n boolean result = fixture.isVisible();\n\n assertEquals(false, result);\n }", "private void applyVisibilityFlags() {\n if (rangeRings == null) {\n return;\n }\n try {\n boolean visibility = getDisplayVisibility();\n rangeRings.setRangeRingsVisible(rrVisible && visibility);\n rangeRings.setAzimuthLinesVisible(radVisible && visibility);\n rangeRings.setLabelsVisible(lblVisible && visibility);\n } catch (Exception exc) {}\n }", "void setVisibility(ASTAccessSpecNode accessSpec)\n {\n if (accessSpec.isPublic())\n this.visibility = Visibility.PUBLIC;\n else if (accessSpec.isPrivate())\n this.visibility = Visibility.PRIVATE;\n }", "public void setVisible(OUTPUT_TYPE outputType) {\r\n\t\r\n\t\tif (outputType.equals(OUTPUT_TYPE.DIFF)) {\r\n\t\t\tdiffButton.setVisible(true);\r\n\t\t\tJPanel diffLocatorPanel = new JPanel(new BorderLayout());\r\n\t\t\tdiffLocatorPanel.setBackground(ENTRY_POINT_COLOR);\r\n\t\t\tdiffLocatorPanel.add(diffButton, BorderLayout.WEST);\r\n\t\t\tadd(diffLocatorPanel, BorderLayout.SOUTH);\r\n\t\t}\r\n\t\t\r\n\t\tif (!parameterLocation[outputType.ordinal()].isVisible()) {\t//If output is not visible it means it wasn't added before \r\n\t\t\tswitch (outputType) {\r\n\t\t\tcase DATABASE_EXCEPTION:\r\n\t\t\t\tdatabaseExceptionButton.setVisible(true);\r\n\t\t\t\tbreak;\r\n\t\t\tcase DATABASE_REFLECTION:\r\n\t\t\t\tdatabaseReflectionButton.setVisible(true);\r\n\t\t\t\tbreak;\r\n\t\t\tcase DIFF:\r\n\t\t\t\tbreak;\r\n\t\t\tcase OUTPUT_EXCEPTION:\r\n\t\t\t\toutputExceptionButton.setVisible(true);\r\n\t\t\t\tbreak;\r\n\t\t\tcase OUTPUT_REFLECTION:\r\n\t\t\t\toutputReflectionButton.setVisible(true);\r\n\t\t\t\tbreak;\r\n\t\t\tcase SESSION_EXCEPTION:\r\n\t\t\t\tsessionExceptionButton.setVisible(true);\r\n\t\t\t\tbreak;\r\n\t\t\tcase SESSION_REFLECTION:\r\n\t\t\t\tsessionReflectionButton.setVisible(true);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic void setVisible(boolean visibility) {\n\t\t//do nothing\n\t}", "public boolean getIsVisible();", "@Override\n\tpublic void setVisibility(int visibility) {\n\t\tsuper.setVisibility(visibility);\n\t\tif(visibility==View.VISIBLE){\n\t\t\ttoggleOnAreaChange();\n\t\t}\n\t}", "public void setVisible(Boolean visible);", "@Test\n public void testIsVisible_1()\n throws Exception {\n ColumnPreferences fixture = new ColumnPreferences(\"\", \"\", 1, ColumnPreferences.Visibility.HIDDEN, ColumnPreferences.Hidability.HIDABLE);\n fixture.setVisible(true);\n\n boolean result = fixture.isVisible();\n\n assertEquals(true, result);\n }", "public void setVisibility(int value) {\n this.visibility = value;\n }", "@Test\n public void dynamicLayerChangeTest() throws InterruptedException, PluginException {\n ReadableGraph readableGraph = graph.getReadableGraph();\n try {\n assertEquals(readableGraph.getIntValue(layerMaskV, vxId1), 1);\n assertEquals(readableGraph.getFloatValue(layerVisibilityV, vxId1), 1.0f);\n\n assertEquals(readableGraph.getIntValue(layerMaskV, vxId2), 1);\n assertEquals(readableGraph.getFloatValue(layerVisibilityV, vxId2), 1.0f);\n\n assertEquals(readableGraph.getIntValue(layerMaskV, vxId3), 1);\n assertEquals(readableGraph.getFloatValue(layerVisibilityV, vxId3), 1.0f);\n } finally {\n readableGraph.release();\n }\n\n WritableGraph writableGraph = graph.getWritableGraph(\"\", true);\n\n try {\n writableGraph.setLongValue(bitmaskAttributeId, 0, 0b10);\n writableGraph.setLongValue(layerMaskV, vxId1, 3);\n writableGraph.setFloatValue(layerVisibilityV, vxId1, 1.0f);\n writableGraph.setLongValue(layerMaskV, vxId2, 1);\n writableGraph.setFloatValue(layerVisibilityV, vxId2, 0.0f);\n writableGraph.setLongValue(layerMaskV, vxId3, 1);\n writableGraph.setFloatValue(layerVisibilityV, vxId3, 0.0f);\n } finally {\n writableGraph.commit();\n }\n\n readableGraph = graph.getReadableGraph();\n try {\n assertEquals(readableGraph.getLongValue(bitmaskAttributeId, 0), 0b10);\n assertEquals((long) readableGraph.getObjectValue(layerMaskV, vxId1), 3);\n assertEquals(readableGraph.getObjectValue(layerVisibilityV, vxId1), 1.0f);\n\n assertEquals((long) readableGraph.getObjectValue(layerMaskV, vxId2), 1);\n assertEquals(readableGraph.getObjectValue(layerVisibilityV, vxId2), 0.0f);\n\n assertEquals((long) readableGraph.getObjectValue(layerMaskV, vxId3), 1);\n assertEquals(readableGraph.getObjectValue(layerVisibilityV, vxId3), 0.0f);\n } finally {\n readableGraph.release();\n }\n\n // change an attribute to trigger switching of graph object within dual graph\n PluginExecution.withPlugin(new SimpleEditPlugin(\"Test: change attribute value\") {\n @Override\n public void edit(final GraphWriteMethods graph, final PluginInteraction interaction, final PluginParameters parameters) throws InterruptedException {\n final int maxTransactionsId = VisualConcept.GraphAttribute.MAX_TRANSACTIONS.ensure(graph);\n graph.setLongValue(maxTransactionsId, 0, 9);\n }\n }).executeNow(graph);\n\n // Check Vertex set correctly on second graph of dualgraph\n readableGraph = graph.getReadableGraph();\n try {\n assertEquals((long) readableGraph.getObjectValue(layerMaskV, vxId1), 3);\n assertEquals(readableGraph.getObjectValue(layerVisibilityV, vxId1), 1.0f);\n\n assertEquals((long) readableGraph.getObjectValue(layerMaskV, vxId2), 1);\n assertEquals(readableGraph.getObjectValue(layerVisibilityV, vxId2), 0.0f);\n\n assertEquals((long) readableGraph.getObjectValue(layerMaskV, vxId3), 1);\n assertEquals(readableGraph.getObjectValue(layerVisibilityV, vxId3), 0.0f);\n } finally {\n readableGraph.release();\n }\n\n writableGraph = graph.getWritableGraph(\"\", true);\n\n try {\n writableGraph.setLongValue(layerMaskV, vxId1, 3);\n writableGraph.setFloatValue(layerVisibilityV, vxId1, 1.0f);\n writableGraph.setLongValue(layerMaskV, vxId2, 1);\n writableGraph.setFloatValue(layerVisibilityV, vxId2, 1.0f);\n writableGraph.setLongValue(layerMaskV, vxId3, 1);\n writableGraph.setFloatValue(layerVisibilityV, vxId3, 1.0f);\n } finally {\n writableGraph.commit();\n }\n\n //PluginExecution.withPlugin(new UpdateLayerSelectionPlugin(queries, 1)).executeNow(graph);\n readableGraph = graph.getReadableGraph();\n try {\n assertEquals(readableGraph.getLongValue(layerMaskV, vxId1), 3);\n assertEquals(readableGraph.getFloatValue(layerVisibilityV, vxId1), 1.0f);\n\n assertEquals(readableGraph.getLongValue(layerMaskV, vxId2), 1);\n assertEquals(readableGraph.getFloatValue(layerVisibilityV, vxId2), 1.0f);\n\n assertEquals(readableGraph.getLongValue(layerMaskV, vxId3), 1);\n assertEquals(readableGraph.getFloatValue(layerVisibilityV, vxId3), 1.0f);\n } finally {\n readableGraph.release();\n }\n\n writableGraph = graph.getWritableGraph(\"\", true);\n\n try {\n writableGraph.setLongValue(layerMaskV, vxId1, 3);\n writableGraph.setFloatValue(layerVisibilityV, vxId1, 0.0f);\n writableGraph.setLongValue(layerMaskV, vxId2, 0b101);\n writableGraph.setFloatValue(layerVisibilityV, vxId2, 1.0f);\n writableGraph.setLongValue(layerMaskV, vxId3, 1);\n writableGraph.setFloatValue(layerVisibilityV, vxId3, 0.0f);\n } finally {\n writableGraph.commit();\n }\n\n readableGraph = graph.getReadableGraph();\n try {\n assertEquals(readableGraph.getLongValue(layerMaskV, vxId1), 3);\n assertEquals(readableGraph.getFloatValue(layerVisibilityV, vxId1), 0.0f);\n\n assertEquals(readableGraph.getLongValue(layerMaskV, vxId2), 0b101);\n assertEquals(readableGraph.getFloatValue(layerVisibilityV, vxId2), 1.0f);\n\n assertEquals(readableGraph.getLongValue(layerMaskV, vxId3), 1);\n assertEquals(readableGraph.getFloatValue(layerVisibilityV, vxId3), 0.0f);\n } finally {\n readableGraph.release();\n }\n\n writableGraph = graph.getWritableGraph(\"\", true);\n try {\n writableGraph.setLongValue(layerMaskV, vxId1, 3);\n writableGraph.setFloatValue(layerVisibilityV, vxId1, 1.0f);\n writableGraph.setLongValue(layerMaskV, vxId2, 0b101);\n writableGraph.setFloatValue(layerVisibilityV, vxId2, 1.0f);\n writableGraph.setLongValue(layerMaskV, vxId3, 1);\n writableGraph.setFloatValue(layerVisibilityV, vxId3, 1.0f);\n } finally {\n writableGraph.commit();\n }\n\n readableGraph = graph.getReadableGraph();\n try {\n assertEquals(readableGraph.getLongValue(layerMaskV, vxId1), 3);\n assertEquals(readableGraph.getFloatValue(layerVisibilityV, vxId1), 1.0f);\n\n assertEquals(readableGraph.getLongValue(layerMaskV, vxId2), 0b101);\n assertEquals(readableGraph.getFloatValue(layerVisibilityV, vxId2), 1.0f);\n\n assertEquals(readableGraph.getLongValue(layerMaskV, vxId3), 1);\n assertEquals(readableGraph.getFloatValue(layerVisibilityV, vxId3), 1.0f);\n } finally {\n readableGraph.release();\n }\n\n writableGraph = graph.getWritableGraph(\"\", true);\n try {\n writableGraph.setLongValue(layerMaskV, vxId1, 1);\n writableGraph.setFloatValue(layerVisibilityV, vxId1, 0.0f);\n writableGraph.setLongValue(layerMaskV, vxId2, 0b111);\n writableGraph.setFloatValue(layerVisibilityV, vxId2, 1.0f);\n writableGraph.setLongValue(layerMaskV, vxId3, 1);\n writableGraph.setFloatValue(layerVisibilityV, vxId3, 0.0f);\n } finally {\n writableGraph.commit();\n }\n\n readableGraph = graph.getReadableGraph();\n try {\n assertEquals(readableGraph.getLongValue(layerMaskV, vxId1), 1);\n assertEquals(readableGraph.getFloatValue(layerVisibilityV, vxId1), 0.0f);\n\n assertEquals(readableGraph.getLongValue(layerMaskV, vxId2), 0b111);\n assertEquals(readableGraph.getFloatValue(layerVisibilityV, vxId2), 1.0f);\n\n assertEquals(readableGraph.getLongValue(layerMaskV, vxId3), 1);\n assertEquals(readableGraph.getFloatValue(layerVisibilityV, vxId3), 0.0f);\n } finally {\n readableGraph.release();\n }\n\n PluginExecution.withPlugin(new SimpleEditPlugin(\"Test: change attribute value\") {\n @Override\n public void edit(final GraphWriteMethods graph, final PluginInteraction interaction, final PluginParameters parameters) throws InterruptedException {\n final int maxTransactionsId = VisualConcept.GraphAttribute.MAX_TRANSACTIONS.ensure(graph);\n graph.setIntValue(maxTransactionsId, 0, 9);\n }\n }).executeNow(graph);\n\n readableGraph = graph.getReadableGraph();\n try {\n assertEquals(readableGraph.getLongValue(layerMaskV, vxId1), 1);\n assertEquals(readableGraph.getFloatValue(layerVisibilityV, vxId1), 0.0f);\n\n assertEquals(readableGraph.getLongValue(layerMaskV, vxId2), 0b111);\n assertEquals(readableGraph.getFloatValue(layerVisibilityV, vxId2), 1.0f);\n\n assertEquals(readableGraph.getLongValue(layerMaskV, vxId3), 1);\n assertEquals(readableGraph.getFloatValue(layerVisibilityV, vxId3), 0.0f);\n } finally {\n readableGraph.release();\n }\n }", "@Override\n\tpublic void setVisible (boolean visible)\n\t{\n\t\tif (visible)\n\t\t{\n\t\t\t//this.updateLayerList();\n\t\t\t//this.updateConstrainedLayerList();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Update the amount of deformation.\n\t\t\tmCartogramWizard.setAmountOfDeformation(\n\t\t\t\tmDeformationSlider.getValue());\n\t\t\t\t\n\t\t}\n\t\t\n\t\tsuper.setVisible(visible);\n\t}", "@Override\n int getStateToVisible() {\n return 2;\n }", "public interface VisibilityListener {\n void onVisibilityChanged(int i);\n}", "void setVisible(boolean visible);", "void setVisible(boolean visible);", "@Override\n\tpublic void setVisible(boolean vis) {\n\t\t\n\t}", "private void setVisualState() {\n\n // STATE: station loading\n if (isAdded() && mThisStation != null && mPlaybackState == PLAYBACK_STATE_LOADING_STATION) {\n // change playback button image to stop\n mPlaybackButton.setImageResource(R.drawable.smbl_stop);\n // change playback indicator and metadata views\n mPlaybackIndicator.setBackgroundResource(R.drawable.ic_playback_indicator_loading_24dp);\n mStationMetadataView.setText(R.string.descr_station_stream_loading);\n mStationDataSheetMetadata.setText(R.string.descr_station_stream_loading);\n // show metadata views\n mStationMetadataView.setVisibility(View.VISIBLE);\n mStationMetadataView.setSelected(true);\n mStationDataSheetMetadataLayout.setVisibility(View.VISIBLE);\n displayExtendedMetaData(mThisStation);\n }\n // STATE: playback started\n else if (isAdded() && mThisStation != null && mPlaybackState == PLAYBACK_STATE_STARTED) {\n // change playback button image to stop\n mPlaybackButton.setImageResource(R.drawable.smbl_stop);\n // change playback indicator and metadata views\n mPlaybackIndicator.setBackgroundResource(R.drawable.ic_playback_indicator_started_24dp);\n mStationMetadataView.setText(mThisStation.getMetadata());\n mStationDataSheetMetadata.setText(mThisStation.getMetadata());\n // show metadata views\n mStationMetadataView.setVisibility(View.VISIBLE);\n mStationMetadataView.setSelected(true);\n mStationDataSheetMetadataLayout.setVisibility(View.VISIBLE);\n displayExtendedMetaData(mThisStation);\n }\n // STATE: playback stopped\n else if (isAdded()) {\n // change playback button image to play\n mPlaybackButton.setImageResource(R.drawable.smbl_play);\n // change playback indicator\n mPlaybackIndicator.setBackgroundResource(R.drawable.ic_playback_indicator_stopped_24dp);\n // hide metadata views\n mStationMetadataView.setVisibility(View.GONE);\n mStationDataSheetMetadataLayout.setVisibility(View.GONE);\n mStationDataSheetMimeTypeLayout.setVisibility(View.GONE);\n mStationDataSheetChannelCountLayout.setVisibility(View.GONE);\n mStationDataSheetSampleRateLayout.setVisibility(View.GONE);\n mStationDataSheetBitRateLayout.setVisibility(View.GONE);\n }\n }", "public void setVisible(boolean newVisible)\n {\n this.visible = newVisible;\n conditionallyRepaint();\n }", "@Override\n public void onHideLayer(GPLayerBean layerBean) {\n this.hideLayer(layerBean);\n }", "public void setVisible(boolean aValue)\n{\n if(isVisible()==aValue) return; // If value already set, just return\n firePropertyChange(\"Visible\", _visible, _visible = aValue, -1); // Set value and fire PropertyChange\n}", "public void setVisible(boolean val)\r\n\t{\r\n\t\t_isOn = val;\r\n\t}", "public boolean isVisible(){\n \t\treturn visible;\n \t}", "public void cliniciansTabAreInViewMode() {\n\n\tString icon=addIconClinicians.getAttribute(\"data-ng-click\");\n\tif(icon.contains(\"isDisabled\")) {\n\t\tAssert.assertTrue(true);\n\t}\n\t\t\n\t}", "public void setVisible(boolean visible);", "@Override\n public void makeVisible(Player viewer) {\n \n }", "@Override\n public void b(dz dz2, Map<String, String> map) {\n if (!map.containsKey(\"isVisible\")) {\n return;\n }\n boolean bl2 = \"1\".equals(map.get(\"isVisible\")) || \"true\".equals(map.get(\"isVisible\"));\n ab.this.c(bl2);\n }", "@OnClick(R.id.toggle_view_action)\n public void onToggleView() {\n logD(\"Be kind and implement map view of landmarks\");\n }", "public void updateVisible(){\n if (serviceManager.isCustomerQueMode() == true && serviceManager.isManagerMode() == false) {\n this.setVisible(true);\n } else {\n this.setVisible(false);\n }\n// System.out.println(serviceManager.isCustomerQueMode());\n }", "@Override\r\n\tprotected void onVisibilityChanged(View changedView, int visibility) {\n\t\tsuper.onVisibilityChanged(changedView, visibility);\r\n\t\tif (mode == ANIM) {\r\n\t\t\ttoggle_anim_visibility(visibility);\r\n\t\t} else {\r\n\t\t\tif (visibility == VISIBLE) {\r\n\t\t\t\tstartAnimation(rotation);\r\n\t\t\t} else {\r\n\t\t\t\tclearAnimation();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public boolean checkVisible(int i) {\n\t\tvobject[i].calculateRelativePosition(camera.x_pos,camera.y_pos,camera.z_pos,camera.x_rot,camera.y_rot,camera.z_rot);\n\t\tif (vobject[i].rel_z_pos+vobject[i].radius>0) {vobject[i].visible=true;}\n\t\tif (vobject[i].rel_z_pos+vobject[i].radius<0) {vobject[i].visible=false;}\n\t\treturn vobject[i].visible;\n\t}", "public boolean checkVisibility() {\n LocalDateTime now = LocalDateTime.now();\n return (this.viewer != 0 && !now.isAfter(this.destructTime));\n }", "@Override\n\tpublic void setVisible (boolean visible)\n\t{\n\t\n\t\tif (visible)\n\t\t{\n\t\t\tthis.updateLayerList();\n\t\t\t\n\t\t\t// If there is no layer for the cartogram deformation,\n\t\t\t// add a menu item \"<none>\" and disable the \"Next\" button.\n\t\t\tif (mLayerMenu.getItemCount() == 0)\n\t\t\t{\n\t\t\t\tmLayerMenu.addItem(\"<none>\");\n\t\t\t\tmNextButton.setEnabled(false);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmNextButton.setEnabled(true);\n\t\t\t}\n\t\t}\n\t\t\n\t\n\t\tif (!visible)\n\t\t\tmCartogramWizard.setCartogramLayerName(\n\t\t\t\t(String)mLayerMenu.getSelectedItem());\n\t\t\n\t\tsuper.setVisible(visible);\n\t\t\n\t}", "@SuppressWarnings(\"unused\")\n void setVisible(boolean visible);", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setAllLevelsVisible(true);\n boolean boolean0 = homeEnvironment0.isAllLevelsVisible();\n assertTrue(boolean0);\n }", "private void Visibility(Boolean vis) {\n jSP1.setVisible(vis);\r\n jSP2.setVisible(vis);\r\n loadFile.setVisible(!vis);\r\n saveFile.setVisible(!vis);\r\n sourceFileLabel.setVisible(!vis);\r\n sourceFileName.setVisible(!vis);\r\n resultFileLabel.setVisible(!vis);\r\n resultFileName.setVisible(!vis);\r\n }", "public boolean onLevelChange(int i) {\n int i2 = 0;\n boolean z = false;\n while (true) {\n Drawable[] drawableArr = this.mLayers;\n if (i2 >= drawableArr.length) {\n return z;\n }\n Drawable drawable = drawableArr[i2];\n if (drawable != null && drawable.setLevel(i)) {\n z = true;\n }\n i2++;\n }\n }", "@Override\n\tprotected void onVisibilityChanged(View changedView, int visibility) {\n\t\tsuper.onVisibilityChanged(changedView, visibility);\n\t\tif (mode == ANIM) {\n\t\t\ttoggle_anim_visibility(visibility);\n\t\t} else {\n\t\t\tif (visibility == VISIBLE) {\n\t\t\t\tstartAnimation(rotation);\n\t\t\t} else {\n\t\t\t\tclearAnimation();\n\t\t\t}\n\t\t}\n\t}", "public void overlayChanged() {\r\n\t\toverlayItem.setSelection(overlay.isVisible());\r\n\t}", "private synchronized void setVisible(boolean b)\n {\n Platform.runLater(() ->\n {\n this.temperatureView.setVisible(b);\n StackPane parentPane = (StackPane) this.temperatureView.getParent();\n GridPane parentGrid = (GridPane) parentPane.getParent();\n\n monitorWidgetVisibility(parentGrid, parentPane);\n });\n if (b && this.townName != null)\n {\n updateWeather(this.townName);\n }\n }", "boolean isLayerPublished(Class<? extends LayerInterface> layerClass, String implName);", "public void visualChange();", "protected void layerWasSelected (int layer)\n {\n _removeLayerAction.setEnabled(layer != 0);\n fireStateChanged();\n }", "@Override\n\tpublic void setVisible(boolean b) {\n\t\t\n\t}", "@Override\n public boolean isVisible()\n {\n return true;\n }", "public void setVisible(boolean a){\n \t\tvisible = a;\n \t}", "@Action (selectedProperty = \"codeViewerVisible\")\n public void toggleCodeViewerVisible() {\n }", "public java.lang.Boolean getIsVisible();", "public void setVisible(boolean b) {\n\t\t\n\t}", "@Test\n public void testSetVisible_1()\n throws Exception {\n ColumnPreferences fixture = new ColumnPreferences(\"\", \"\", 1, ColumnPreferences.Visibility.HIDDEN, ColumnPreferences.Hidability.HIDABLE);\n fixture.setVisible(true);\n boolean visible = true;\n\n fixture.setVisible(visible);\n\n }", "public void resetIsVisible();" ]
[ "0.734775", "0.66186976", "0.6369006", "0.63549954", "0.61814195", "0.61270773", "0.606063", "0.6058811", "0.6047735", "0.5968384", "0.5879055", "0.5833104", "0.57976645", "0.5792877", "0.5792877", "0.576929", "0.57263315", "0.56906253", "0.56788164", "0.56683886", "0.5636691", "0.56114626", "0.5585201", "0.5583096", "0.55795324", "0.5576825", "0.5576825", "0.5576825", "0.55515105", "0.55515105", "0.5550636", "0.5543819", "0.55356055", "0.55328256", "0.55328256", "0.5510028", "0.5505115", "0.5500004", "0.54988724", "0.5496167", "0.54931307", "0.5488645", "0.547526", "0.5465309", "0.5452348", "0.54403543", "0.54387033", "0.54262733", "0.54254717", "0.54244727", "0.5414544", "0.54107714", "0.540712", "0.5387446", "0.5387169", "0.53713804", "0.5367056", "0.53555727", "0.53551066", "0.5337978", "0.53378737", "0.532531", "0.5314419", "0.5312329", "0.5312329", "0.53059417", "0.53031605", "0.53027123", "0.528989", "0.52878773", "0.52847", "0.5281075", "0.5278302", "0.5260848", "0.52605206", "0.52594477", "0.5253107", "0.5251016", "0.52466005", "0.5244493", "0.52340543", "0.52194643", "0.52155066", "0.52119666", "0.5209756", "0.52015793", "0.5201546", "0.51951736", "0.518972", "0.51863074", "0.5185416", "0.5183369", "0.5182393", "0.5181102", "0.5180763", "0.51793265", "0.517342", "0.5165109", "0.51625824", "0.51620704" ]
0.8218135
0
Test of updateDescription, in LayersViewController
@Test public void testUpdateDescription() { LayersViewController instance = LayersViewController.getDefault().init(null); String description1 = "Vertex Description"; int index1 = 2; Query query1 = new Query(GraphElementType.VERTEX, "Type == 'Event'"); instance.getVxQueryCollection().getQuery(index1).setQuery(query1); instance.getTxQueryCollection().getQuery(index1).setQuery(null); instance.updateDescription(description1, index1); assertEquals(instance.getVxQueryCollection().getQuery(index1).getDescription(), description1); String description2 = "Transaction Description"; int index2 = 3; Query query2 = new Query(GraphElementType.TRANSACTION, "Type == 'Network'"); instance.getTxQueryCollection().getQuery(index2).setQuery(query2); instance.getVxQueryCollection().getQuery(index2).setQuery(null); instance.updateDescription(description2, index2); assertEquals(instance.getTxQueryCollection().getQuery(index2).getDescription(), description2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void update(String desc) {\n }", "@Test\n public void testDescriptionChange() throws Exception {\n EventData deltaEvent = prepareDeltaEvent(createdEvent);\n deltaEvent.setDescription(\"New description\");\n\n updateEventAsOrganizer(deltaEvent);\n\n /*\n * Check that end date has been updated\n */\n AnalyzeResponse analyzeResponse = receiveUpdateAsAttendee(PartStat.ACCEPTED, CustomConsumers.ALL);\n AnalysisChange change = assertSingleChange(analyzeResponse);\n assertSingleDescription(change, \"The appointment description has changed.\");\n }", "@Test\n\tpublic void testUpdateDescription() {\n\t\tMyProfileController controller=new MyProfileController();\n\t\tString text=\"a\".repeat(151);\n\t\tassertThrows(DBException.class, ()->controller.updateDescr(1, text));\n\t}", "@Test\n\tpublic void testExternalDescriptionUpdate() throws Exception {\n\t\tEnum enummDt = createRedGreenBlueEnum();\n\t\tedit(enummDt);\n\n\t\tEnumEditorPanel panel = findEditorPanel(tool.getToolFrame());\n\t\tJTable table = panel.getTable();\n\t\tEnumTableModel model = (EnumTableModel) table.getModel();\n\n\t\tint transactionID = program.startTransaction(\"Test\");\n\t\tString newDescription = \"My new description\";\n\t\tenummDt.setDescription(newDescription);\n\t\tprogram.endTransaction(transactionID, true);\n\t\tprogram.flushEvents();\n\t\twaitForSwing();\n\n\t\tEnum en = getEnum(model);\n\t\tassertEquals(newDescription, en.getDescription());\n\t}", "public void setDescription(String description) {\n this.description = description;\r\n // changeSupport.firePropertyChange(\"description\", oldDescription, description);\r\n }", "public void setDescription(String newVal) {\n if ((newVal != null && this.description != null && (newVal.compareTo(this.description) == 0)) || \n (newVal == null && this.description == null && description_is_initialized)) {\n return; \n } \n this.description = newVal; \n\n description_is_modified = true; \n description_is_initialized = true; \n }", "@Test\n public void setDescription() {\n cleanEntity0();\n\n entity0.setDescription(descriptionS);\n assertEquals(descriptionS, ReflectionTestUtils.getField(entity0, \"description\"));\n }", "@Test\n \n public void testD_MenuDescriptionChanged() {\n\n\n Menu menu = (Menu) menuTable.getSelectionModel().getSelectedItem();\n String descriptionBefore = menu.getDescription();\n\n // Click on cell 4 and change Status\n Node cell = lookup(\"#clmnDescription\").nth(1).query();\n doubleClickOn(cell).write(\"Cambio\").type(KeyCode.ENTER);\n\n // Select row and get user.\n cell = lookup(\".table-row-cell\").nth(0).query();\n clickOn(cell);\n Menu menu2 = (Menu) menuTable.getSelectionModel().getSelectedItem();\n assertNotEquals(descriptionBefore, menu2.getDescription());\n\n }", "@Test\r\n public void testSetDescription() {\r\n System.out.println(\"setDescription\");\r\n String description = \"\";\r\n \r\n instance.setDescription(description);\r\n assertEquals(description, instance.getDescription());\r\n \r\n }", "@Test\n public void testSetDescription() {\n System.out.println(\"setDescription\");\n \n String description = \"Description\";\n \n instance.setDescription(description);\n \n assertEquals(\"Description unchanged\", description, instance.getDescription());\n // TODO review the generated test code and remove the default call to fail.\n // fail(\"The test case is a prototype.\");\n }", "@Test\n void getAndSetDescription() {\n }", "@Test\n public void editGoalDescValid() throws DataValidationException, SQLException {\n String oldGoalDesc = testGoal.getGoalDescription();\n String validDescription = \"ValidDescription\";\n if(!Objects.equals(oldGoalDesc, validDescription))\n UserInterface.editGoalDescription(testGoal, validDescription);\n else {\n validDescription = validDescription.replace(validDescription.charAt(1), validDescription.charAt(validDescription.length()-1));\n UserInterface.editGoalDescription(testGoal, validDescription);\n }\n\n reloadTestGoal();\n Assert.assertEquals(testGoal.getGoalDescription(), validDescription,\n \"Edit Goal Description error: can not edit with valid data\");\n\n }", "public void setDescription(String newdescription) {\n description=newdescription;\n }", "@Override\n public void updateDescription() {\n description = DESCRIPTIONS[0]+ ReceiveBlockAmount + DESCRIPTIONS[1];\n }", "@Override\n public void setTestDescription()\n {\n setTestDescription(\"Invoke perform ProductSpecOperation api by passing\"\n + \" null mor\");\n }", "public void setDescription(String description){this.description=description;}", "public void editDescription(String description) {\n this.description = description;\n }", "public abstract void setDescription(String description);", "public abstract void setDescription(String description);", "public void willbeUpdated() {\n\t\t\n\t}", "public void setDescription(String description)\n/* */ {\n/* 67 */ this.description = description;\n/* */ }", "@Test\n public void update() {\n }", "public void setNewValues_description(java.lang.String param){\n localNewValues_descriptionTracker = true;\n \n this.localNewValues_description=param;\n \n\n }", "public void handleLabTestUpdate() {\r\n SwingUtilities.invokeLater(new Runnable() {\r\n public void run() {\r\n tableModel.fireTableDataChanged();\r\n }\r\n });\r\n }", "public void updateObjectDescriptionWindow() {\r\n\t\tif (this.objectDescriptionTabItem != null && !this.objectDescriptionTabItem.isDisposed()) {\r\n\t\t\tif (Thread.currentThread().getId() == DataExplorer.application.getThreadId()) {\r\n\t\t\t\tthis.objectDescriptionTabItem.update();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tGDE.display.asyncExec(new Runnable() {\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\tDataExplorer.this.objectDescriptionTabItem.update();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void updateInformation();", "@Test\n void updateSuccess() {\n String newDescription = \"December X-Large T-Shirt\";\n Order orderToUpdate = dao.getById(3);\n orderToUpdate.setDescription(newDescription);\n dao.saveOrUpdate(orderToUpdate);\n Order retrievedOrder = dao.getById(3);\n assertEquals(newDescription, retrievedOrder.getDescription());\n\n String resetDescription = \"February Small Long-Sleeve\";\n Order orderToReset = dao.getById(3);\n orderToUpdate.setDescription(resetDescription);\n dao.saveOrUpdate(orderToReset);\n }", "public void setDescription (String Description);", "public void setDescription (String Description);", "public void setDescription (String Description);", "public void setDescription (String Description);", "public void setDescription (String Description);", "public void setDescription (String Description);", "@Test\n public void updateAlbumDescriptionTest() throws InvalidResourceRequestException {\n loginAndSetupNewUser(username);\n\n // Update album's description\n String newDescription = \"new \" + description;\n Response response = apiClient.updateAlbumDescription(albumId, newDescription);\n assertEquals(Response.Status.NO_CONTENT.getStatusCode(), response.getStatus());\n\n // Check server has record of album's new description\n Album album = resolver.getAlbum(albumId);\n assertEquals(albumName, album.getAlbumName());\n assertEquals(newDescription, album.getDescription());\n }", "public void setNewProperty_description(java.lang.String param){\n localNewProperty_descriptionTracker = true;\n \n this.localNewProperty_description=param;\n \n\n }", "public void setDescription(String descr);", "public void setDescription(String newDesc){\n\n //assigns the value of newDesc to the description field\n this.description = newDesc;\n }", "@Test\r\n public void testUpdate() {\r\n }", "void willDisplayUpdate(String change) throws RemoteException;", "public void setOldValues_description(java.lang.String param){\n localOldValues_descriptionTracker = true;\n \n this.localOldValues_description=param;\n \n\n }", "public boolean isDescriptionModified() {\n return description_is_modified; \n }", "public void setOldProperty_description(java.lang.String param){\n localOldProperty_descriptionTracker = true;\n \n this.localOldProperty_description=param;\n \n\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "interface WithDescription {\n /**\n * Specifies the description property: The description of the lab..\n *\n * @param description The description of the lab.\n * @return the next definition stage.\n */\n Update withDescription(String description);\n }", "public void setDescription (String description);", "@Test\n\tpublic void testUpdateTicketOk() {\n\t}", "public void setDescription(String description) { this.description = description; }", "public void setDescription(String newValue);", "public void setDescription(String newValue);", "void descriptionComplete();", "public void setDescription(String description) {\n mDescription = description;\n }", "public void doChangeItemDescription(ActionEvent actionEvent) {\n // find the item that the user is clicking\n // do setDescription()\n }", "public void setDescription(String description) {\n this.description = description;\n this.updated = new Date();\n }", "protected abstract void updateInfos();", "void setDescription(String description);", "public void setDescription(String desc);", "public void updateInfo() {\n\t}", "@Test\n public void testEdit() {\n lib.addDVD(dvd1);\n lib.addDVD(dvd2);\n \n dvd1.setTitle(\"Ghostbusters II\");\n lib.edit(dvd1);\n \n Assert.assertEquals(\"Ghostbusters II\", lib.getById(0).getTitle());\n }", "public void setDescription(String description) {\n\n }", "protected void updateDetailInfo(RunOverview f) {\n\n\t}", "@Override\n public void updateDescription() {\n if(this.amount == 1) {\n this.description = DESCRIPTIONS[0] + DESCRIPTIONS[1];\n }\n else {\n this.description = DESCRIPTIONS[0] + DiminishingStacks + DESCRIPTIONS[2];\n }\n\n }", "public void setDescription(String sDescription);", "@Test\n public void testUpdateCar() {\n\n }", "public void setDescription(String description) {\n this.description = description;\n UnitOfWork.getCurrent().registerDirty(this);\n }", "@Test\n void setDescription() {\n }", "public void setDescription(String description);", "public void setDescription(String description);", "public void setDescription(String description);", "public void setDescription(String description);", "public void setDescription(String description);", "@Test\n public void testUpdate() {\n\n }", "public void setDescription(String description){\n this.description = description;\n }", "public void testSetGetDescriptionElement()\n\t{\n\t\tfInclude.setDescriptionElement(fDescriptionElement);\n\t\tassertEquals(\"The retrieved Description Element object is not that which was set\", \n fDescriptionElement, fInclude.getDescriptionElement());\n\t}", "void onRemoteDescriptionSet();", "@Test @Ignore\n\tpublic void testUpdate() {\n\t\tlog.info(\"*** testUpdate ***\");\n\t}", "public void updateDescriptionText() {\n \n String toolTipText = new String(\"<html>\");\n \n if (!m_OptionsWereValid) {\n \n toolTipText += \"<font COLOR=\\\"#FF0000\\\">\"\n\t+ \"<b>Invalid Model:</b><br>\" + m_ErrorText + \"<br></font>\";\n }\n \n toolTipText += \"<TABLE>\";\n \n PropertyDescriptor properties[] = null;\n MethodDescriptor methods[] = null;\n \n try {\n BeanInfo bi = Introspector.getBeanInfo(m_Classifier.getClass());\n properties = bi.getPropertyDescriptors();\n methods = bi.getMethodDescriptors();\n } catch (IntrospectionException ex) {\n System.err.println(\"LibraryModel: Couldn't introspect\");\n return;\n }\n \n for (int i = 0; i < properties.length; i++) {\n \n if (properties[i].isHidden() || properties[i].isExpert()) {\n\tcontinue;\n }\n \n String name = properties[i].getDisplayName();\n Class type = properties[i].getPropertyType();\n Method getter = properties[i].getReadMethod();\n Method setter = properties[i].getWriteMethod();\n \n // Only display read/write properties.\n if (getter == null || setter == null) {\n\tcontinue;\n }\n \n try {\n\tObject args[] = {};\n\tObject value = getter.invoke(m_Classifier, args);\n\t\n\tPropertyEditor editor = null;\n\tClass pec = properties[i].getPropertyEditorClass();\n\tif (pec != null) {\n\t try {\n\t editor = (PropertyEditor) pec.newInstance();\n\t } catch (Exception ex) {\n\t // Drop through.\n\t }\n\t}\n\tif (editor == null) {\n\t editor = PropertyEditorManager.findEditor(type);\n\t}\n\t//editors[i] = editor;\n\t\n\t// If we can't edit this component, skip it.\n\tif (editor == null) {\n\t continue;\n\t}\n\tif (editor instanceof GenericObjectEditor) {\n\t ((GenericObjectEditor) editor).setClassType(type);\n\t}\n\t\n\t// Don't try to set null values:\n\tif (value == null) {\n\t continue;\n\t}\n\t\n\ttoolTipText += \"<TR><TD>\" + name + \"</TD><TD>\"\n\t+ value.toString() + \"</TD></TR>\";\n\t\n } catch (InvocationTargetException ex) {\n\tSystem.err.println(\"Skipping property \" + name\n\t + \" ; exception on target: \" + ex.getTargetException());\n\tex.getTargetException().printStackTrace();\n\tcontinue;\n } catch (Exception ex) {\n\tSystem.err.println(\"Skipping property \" + name\n\t + \" ; exception: \" + ex);\n\tex.printStackTrace();\n\tcontinue;\n }\n }\n \n toolTipText += \"</TABLE>\";\n toolTipText += \"</html>\";\n m_DescriptionText = toolTipText;\n }", "public void testCmdUpdate() {\n\t\ttestCmdUpdate_taskID_field();\n\t\ttestCmdUpdate_taskName_field();\n\t\ttestCmdUpdate_time_field();\n\t\ttestCmdUpdate_priority_field();\n\t}", "@Test\n public void getDescription() {\n cleanEntity0();\n\n ReflectionTestUtils.setField(entity0, \"description\", descriptionS);\n assertEquals(entity0.getDescription(), descriptionS);\n }", "@Override\r\n public void update(int index, Movie object, String value) {\n \tobject.setDescription(value);\r\n \tmovieTable.redraw();\r\n }", "public void setDescription(String description) {\n this.description = description;\n }", "@Test\r\n public void testUpdate() {\r\n assertTrue(false);\r\n }", "public void setDescription(String text)\n\t{\n\t\tthis.description = text;\n\t\tthis.repaint();\n\t}", "Update withDescription(String description);", "Update withDescription(String description);", "@Test\n public void testSetEditable() {\n writeBanner(getMethodName());\n }", "@Test\n\tpublic void testUpdateCombo() {\n\t}", "public void testGetSetDesc() {\n exp = new Experiment(\"10\");\n exp.setDesc(\"test\");\n assertEquals(\"get/setDesc does not work\", \"test\", exp.getDesc());\n }", "@Test\n public void updateContact() {\n }", "@Test \n\tpublic void edit() \n\t{\n\t\tassertTrue(true);\n\t}", "void setDescription(java.lang.String description);", "@Test\n public void testGetDescription()\n {\n assertThat(m_SUT.getDescription(), is(\"test description\"));\n }", "public void editOperation() {\n\t\t\r\n\t}", "@Then(\"detailed description is displaying\")\n public void detailed_description_is_displaying() {\n }", "public abstract void setContentDescription(String description);", "@FXML\n public void editDescription(ActionEvent actionEvent) {\n\n }", "@Override\n public void updateDescription() {\n if(this.amount == 1) {\n this.description = DESCRIPTIONS[0];\n }\n else\n {\n this.description = DESCRIPTIONS[1] + this.amount + DESCRIPTIONS[2] + this.amount + DESCRIPTIONS[3];\n }\n\n }", "void setDescription(final String description);", "@Test\r\n public void testEditRecipe() {\r\n coffeeMaker.addRecipe(recipe1);\r\n assertEquals(recipe1.getName(), coffeeMaker.editRecipe(0, recipe2));\r\n }", "void setdescription(String description) {\n\t\tthis.description = description;\n\t}" ]
[ "0.6785162", "0.6438622", "0.63912445", "0.6315598", "0.6263054", "0.62614036", "0.62302047", "0.6157362", "0.6142314", "0.6087986", "0.60824794", "0.6070755", "0.6069412", "0.60658324", "0.6058253", "0.6041869", "0.6039373", "0.6036283", "0.6036283", "0.6025178", "0.59896356", "0.59795827", "0.5966819", "0.5962596", "0.59468216", "0.5937515", "0.59292525", "0.5924382", "0.5924382", "0.5924382", "0.5924382", "0.5924382", "0.5924382", "0.592083", "0.5909787", "0.5886299", "0.58860105", "0.5861267", "0.58590156", "0.5854581", "0.5846554", "0.58447134", "0.5839962", "0.5839962", "0.5839948", "0.5838304", "0.58353764", "0.5834147", "0.58286816", "0.58286816", "0.5827977", "0.58045936", "0.5802753", "0.5788421", "0.57839006", "0.57827467", "0.5782212", "0.5780329", "0.5772432", "0.57689", "0.57603085", "0.57348686", "0.5734384", "0.57333386", "0.5725576", "0.57221055", "0.5715206", "0.5715206", "0.5715206", "0.5715206", "0.5715206", "0.5715046", "0.5713252", "0.5712104", "0.5711446", "0.57100827", "0.5708876", "0.5703352", "0.5696562", "0.5679828", "0.5674663", "0.5668267", "0.56500834", "0.5647643", "0.5647643", "0.5647503", "0.5643766", "0.56430364", "0.56414413", "0.5636587", "0.5620537", "0.56197083", "0.5606987", "0.5590788", "0.55871964", "0.5586649", "0.55845064", "0.55837065", "0.5572963", "0.55710894" ]
0.8111528
0
Test of updateQuery, in LayersViewController
@Test public void testUpdateQuery() { LayersViewController instance = LayersViewController.getDefault().init(null); String queryString1 = "Type == 'Word'"; int index1 = 2; Query query1 = new Query(GraphElementType.VERTEX, "Type == 'Event'"); instance.getVxQueryCollection().getQuery(index1).setQuery(query1); instance.getTxQueryCollection().getQuery(index1).setQuery(null); assertEquals(instance.getVxQueryCollection().getQuery(index1).getQueryString(), "Type == 'Event'"); instance.updateQuery(queryString1, index1, "Vertex Query: "); assertEquals(instance.getVxQueryCollection().getQuery(index1).getQueryString(), queryString1); String queryString2 = "Type == 'Unknown'"; int index2 = 3; Query query2 = new Query(GraphElementType.TRANSACTION, "Type == 'Network'"); instance.getTxQueryCollection().getQuery(index2).setQuery(query2); instance.getVxQueryCollection().getQuery(index2).setQuery(null); assertEquals(instance.getTxQueryCollection().getQuery(index2).getQueryString(), "Type == 'Network'"); instance.updateQuery(queryString2, index2, "Transaction Query: "); assertEquals(instance.getTxQueryCollection().getQuery(index2).getQueryString(), queryString2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void queryUpdate() {\n\t\tneedToUpdate = true;\n\t}", "public void setQuery(com.microsoft.schemas.sharepoint.soap.UpdateViewQuery query) {\r\n this.query = query;\r\n }", "public abstract int execUpdate(String query) ;", "abstract Integer processUpdateQuery(String collectionName, ArrayList<HashMap<String,Object>> data, boolean isNew);", "@Test\n public void testActualizarVisualiciones() {\n System.out.println(\"actualizarVisualiciones\");\n query = mock(Query.class);\n boolean expected = true;\n when(this.em.createNamedQuery(\"UPDATE componente SET visualizaciones = visualizaciones +1 WHERE idComponente=\" + anyInt())).thenReturn(query);\n when(cDao.actualizarVisualiciones((Componente) any())).thenReturn(expected);\n boolean result = cDao.actualizarVisualiciones((Componente) any());\n assertThat(result, is(expected));\n }", "private void updateQueryViews() {\n for (QueryView view : queryViews) {\n updateQueryView(view);\n }\n }", "public void Query() {\n }", "public void updateQuery(String query) {\n\t\tUpdateAction.parseExecute(query, model);\n\t}", "public void testQuery() {\n mActivity.runOnUiThread(\n new Runnable() {\n public void run() {\n //TODO: Should compare this against the db results directly.\n assertEquals(sendQuery(\"SFO\"), 7);\n assertEquals(sendQuery(\"RHV\"), 1);\n assertEquals(sendQuery(\"xyzzy\"), 0);\n }\n }\n );\n }", "@Test\n public void updateTest10() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setBar(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isBar() ,\"Should return true if update Servizio\");\n }", "@Test\n public void testUpdateDescription() {\n LayersViewController instance = LayersViewController.getDefault().init(null);\n String description1 = \"Vertex Description\";\n int index1 = 2;\n Query query1 = new Query(GraphElementType.VERTEX, \"Type == 'Event'\");\n instance.getVxQueryCollection().getQuery(index1).setQuery(query1);\n instance.getTxQueryCollection().getQuery(index1).setQuery(null);\n\n instance.updateDescription(description1, index1);\n assertEquals(instance.getVxQueryCollection().getQuery(index1).getDescription(), description1);\n\n String description2 = \"Transaction Description\";\n int index2 = 3;\n Query query2 = new Query(GraphElementType.TRANSACTION, \"Type == 'Network'\");\n instance.getTxQueryCollection().getQuery(index2).setQuery(query2);\n instance.getVxQueryCollection().getQuery(index2).setQuery(null);\n\n instance.updateDescription(description2, index2);\n assertEquals(instance.getTxQueryCollection().getQuery(index2).getDescription(), description2);\n }", "public void customUpdate(String query) {\n sendUpdate(query);\n }", "private void updateQueryView(QueryView view) {\n\n switch (searchTool.getState()) {\n case SEARCH_IN_PROGRESS:\n case AWAITING_SEARCH_RESULTS: {\n // search running so query view should not be usable\n view.setUsable(UsabilityState.UNUSABLE);\n break;\n }\n case INIT:\n case SEARCH_FINISHED: {\n // search not even started or finished so usable depends on\n // error\n view.setUsable(view.isErroneous() ? UsabilityState.UNUSABLE_BECAUSE_OF_QUERY : UsabilityState.USABLE);\n break;\n }\n default: {\n // don't change anything.\n }\n }\n }", "<T extends BaseDto> void executeUpdate(String reqQuery, T req, Connection conn);", "@Test\n\tpublic void testValidateUpdateTargetWithValidQuery1() {\n\t\tupdates.add(mockAssetView(\"target\", DefaultRuleAssetValidator.SEARCH_PAGES));\n\t\tupdates.add(mockAssetView(\"query\", \"validQuery\"));\t\t\n\t\tdefaultRuleAssetValidator.validateUpdateAsset(editorInfo, updates, null);\n\t\tverify(assetService, never()).addError(anyString(), anyString());\t\t\n\t}", "public void testUsingQueriesFromQueryManger(){\n\t\tSet<String> names = testDataMap.keySet();\n\t\tUtils.prtObMess(this.getClass(), \"atm query\");\n\t\tDseInputQuery<BigDecimal> atmq = \n\t\t\t\tqm.getQuery(new AtmDiot());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> bdResult = \n\t\t\t\tatmq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(bdResult);\n\n\t\tUtils.prtObMess(this.getClass(), \"vol query\");\n\t\tDseInputQuery<BigDecimal> volq = \n\t\t\t\tqm.getQuery(new VolDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> dbResult = \n\t\t\t\tvolq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(dbResult);\n\t\n\t\tUtils.prtObMess(this.getClass(), \"integer query\");\n\t\tDseInputQuery<BigDecimal> strikeq = \n\t\t\t\tqm.getQuery(new StrikeDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> strikeResult = \n\t\t\t\tstrikeq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(strikeResult);\n\t\n\t}", "@Test\n\tpublic void testValidateUpdateTargetWithNullQuery1() {\n\t\tupdates.add(mockAssetView(\"target\", DefaultRuleAssetValidator.SEARCH_PAGES));\n\t\tupdates.add(mockAssetView(\"query\", null));\t\t\n\t\tdefaultRuleAssetValidator.validateUpdateAsset(editorInfo, updates, null);\n\t\tverify(assetService).addError(eq(RuleProperty.QUERY), anyString());\t\t\n\t}", "public void testCmdUpdate() {\n\t\ttestCmdUpdate_taskID_field();\n\t\ttestCmdUpdate_taskName_field();\n\t\ttestCmdUpdate_time_field();\n\t\ttestCmdUpdate_priority_field();\n\t}", "void setQueryRequest(com.exacttarget.wsdl.partnerapi.QueryRequest queryRequest);", "@Test\n\tpublic void testValidateUpdateTargetWithValidQuery2() {\n\t\tupdates.add(mockAssetView(\"target\", DefaultRuleAssetValidator.SEARCH_PAGES));\n\t\twhen(repoItem.getPropertyValue(RuleProperty.QUERY)).thenReturn(\"validQuery\");\n\t\tdefaultRuleAssetValidator.validateUpdateAsset(editorInfo, updates, null);\n\t\tverify(assetService, never()).addError(anyString(), anyString());\t\t\n\t}", "@Test\n public void updateTest2() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setBar(false);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(false, servizio.isBar() ,\"Should return true if update Servizio\");\n }", "@Test\n public void queryTest() {\n // TODO: test query\n }", "@Override\n\tpublic void queryData() {\n\t\t\n\t}", "@Test\n public void updateTest6() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setBeach_volley(false);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(false, servizio.isBeach_volley() ,\"Should return true if update Servizio\");\n }", "@Test\n public void testUpdate() {\n System.out.println(\"update\");\n Address obj = null;\n AddressDAO instance = null;\n boolean expResult = false;\n boolean result = instance.update(obj);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void updateTest14() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setBeach_volley(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isBeach_volley() ,\"Should return true if update Servizio\");\n }", "@Test\n\tpublic void testQuery1() {\n\t}", "@Test\n public void update() {\n }", "@Test\r\n\tpublic void testUpdate() {\r\n\t\tList<E> entities = dao.findAll();\r\n\t\tE updated = supplyUpdated(entities.get(0));\r\n\t\tdao.update(entities.get(0));\r\n\t\tentities = dao.findAll();\r\n\t\tassertEquals(updated, entities.get(0));\r\n\t}", "@Override\n public int updateByQuery( BorrowDO record, BorrowQuery query){\n\n return borrowExtMapper.updateByQuery(record, query);\n }", "@Test\n @Ignore\n public void testUpdate() {\n System.out.println(\"update\");\n Index entity = null;\n IndexDaoImpl instance = null;\n Index expResult = null;\n Index result = instance.update(entity);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "void runQueries();", "private void updateAll() {\n updateAction();\n updateQueryViews();\n }", "public void requestUpdate(){\n shouldUpdate = true;\n }", "@Test\r\n public void testUpdate() {\r\n System.out.println(\"update\");\r\n Festivity object = new Festivity();\r\n object.setStart(Calendar.getInstance().getTime());\r\n object.setEnd(Calendar.getInstance().getTime());\r\n object.setName(\"Test Fest 2\");\r\n object.setPlace(\"Howards\");\r\n boolean expResult = true;\r\n boolean result = Database.update(object);\r\n assertEquals(expResult, result);\r\n \r\n }", "public void tellChanged(QueryView view) {\n updateQueryView(view);\n }", "@Test\n\tpublic void testValidateUpdateQueryWithValidValue1() {\n\t\twhen(repoItem.getPropertyValue(RuleProperty.TARGET)).thenReturn(DefaultRuleAssetValidator.SEARCH_PAGES);\n\t\tupdates.add(mockAssetView(\"query\", \"validValue\"));\t\t\n\t\tdefaultRuleAssetValidator.validateUpdateAsset(editorInfo, updates, null);\n\t\tverify(assetService, never()).addError(anyString(), anyString());\n\t}", "@Test\n\tpublic void testValidateUpdateQueryWithNullValue1() {\n\t\twhen(repoItem.getPropertyValue(RuleProperty.TARGET)).thenReturn(DefaultRuleAssetValidator.SEARCH_PAGES);\n\t\tupdates.add(mockAssetView(\"query\", null));\t\t\n\t\tdefaultRuleAssetValidator.validateUpdateAsset(editorInfo, updates, null);\n\t\tverify(assetService).addError(eq(RuleProperty.QUERY), anyString());\t\n\t}", "void queryDone(String queryId);", "@Test\n\tpublic void testValidateUpdateQueryWithValidValue2() {\n\t\twhen(repoItem.getPropertyValue(RuleProperty.TARGET)).thenReturn(DefaultRuleAssetValidator.CATEGORY_PAGES);\n\t\tupdates.add(mockAssetView(\"query\", \"validValue\"));\t\t\n\t\tdefaultRuleAssetValidator.validateUpdateAsset(editorInfo, updates, null);\n\t\tverify(assetService, never()).addError(anyString(), anyString());\n\t}", "@Test\n public void updateTest12() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setAnimazione(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isAnimazione() ,\"Should return true if update Servizio\");\n }", "@Test\n public void updateTest3() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setRistorante(false);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(false, servizio.isRistorante() ,\"Should return true if update Servizio\");\n }", "@Test\n public void updateTest4() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setAnimazione(false);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(false, servizio.isAnimazione() ,\"Should return true if update Servizio\");\n }", "void executeUpdate(String noParamQuery, Connection conn);", "@Override\r\n\tpublic List<?> update(JsonRequestParams params, Query query) {\n\t\treturn null;\r\n\t}", "public void newQuery(String query){\n for(RecyclerViewWrapper wrapper : mRecyclerViews){\n wrapper.data.clear();\n wrapper.adapter.notifyDataSetChanged();\n Log.d(TAG, \"Test: \" + wrapper.data.size());\n }\n\n mQueryManager.searchAll(query);\n }", "@Test\n\tpublic void testValidateUpdateTargetWithNullQuery2() {\n\t\tupdates.add(mockAssetView(\"target\", DefaultRuleAssetValidator.SEARCH_PAGES));\n\t\twhen(repoItem.getPropertyValue(RuleProperty.QUERY)).thenReturn(null);\n\t\tdefaultRuleAssetValidator.validateUpdateAsset(editorInfo, updates, null);\n\t\tverify(assetService).addError(eq(RuleProperty.QUERY), anyString());\t\t\n\t}", "@Test\n public void updateTest11() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setRistorante(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isRistorante() ,\"Should return true if update Servizio\");\n }", "@Test\n public void updateTest1() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setCabina(false);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(false, servizio.isCabina() ,\"Should return true if update Servizio\");\n }", "@Test\r\n public void testUpdate() {\r\n assertTrue(false);\r\n }", "public void executeUpdate();", "@Test\r\n public void testUpdate() {\r\n }", "default void update(String catalogAlias, QuerySession querySession)\r\n {\r\n }", "public void dbUpdate(String query) {\n try {\n tryDbUpdate(query);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public static Boolean updateData(String query){\n int affectedRow = 0;\n connect();\n try{\n Statement stm = conn.createStatement();\n affectedRow = stm.executeUpdate(query);\n }catch(Exception e) {\n System.out.println(e.getMessage());\n }\n disconnect();\n if(affectedRow == 0)\n return false;\n else\n return true;\n }", "@Test\n public void updateTest9() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setCabina(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isCabina() ,\"Should return true if update Servizio\");\n }", "@Override\n public int updateByQuerySelective( BorrowDO record, BorrowQuery query){\n return borrowExtMapper.updateByQuerySelective(record, query);\n }", "public void update( Query q, UpdateOperations ops) {\n \tds.update(q, ops);\n }", "@Test\n public void noUpdateWhenNotValidParams() {\n }", "boolean hasQuery();", "abstract public void onQueryRequestArrived(ClientQueryRequest request);", "void executeUpdate();", "@Test(expected = NoResultException.class)\r\n public void updatePosts(){\r\n\r\n Post post = entityManager.createNamedQuery(\"Post.fetchAllRecordsByUserId\", Post.class)\r\n .setParameter(\"value1\", 3000l)\r\n .getSingleResult();\r\n \r\n post.setDescription(\"TRASHED ELECTRONICS ARE PILING UP ACROSS ASIA\");\r\n post.setLikes(500);\r\n \r\n \r\n entityTransaction.begin();\r\n entityManager.createNamedQuery(\"Post.updateDescriptionAndLikesByPostId\", Post.class)\r\n .setParameter(\"value1\", post.getDescription())\r\n .setParameter(\"value2\", post.getLikes())\r\n .setParameter(\"value3\", post.getPostId())\r\n .executeUpdate();\r\n entityManager.refresh(post);\r\n entityTransaction.commit();\r\n\r\n post = entityManager.createNamedQuery(\"Post.fetchAllRecordsByUserId\", Post.class)\r\n .setParameter(\"value1\", 300l)\r\n .getSingleResult(); \r\n assertNotNull(post); \r\n }", "private void performNewQuery(){\n\n // update the label of the Activity\n setLabelForActivity();\n // reset the page number that is being used in queries\n pageNumberBeingQueried = 1;\n // clear the ArrayList of Movie objects\n cachedMovieData.clear();\n // notify our MovieAdapter about this\n movieAdapter.notifyDataSetChanged();\n // reset endless scroll listener when performing a new search\n recyclerViewScrollListener.resetState();\n\n /*\n * Loader call - case 3 of 3\n * We call loader methods as we have just performed reset of the data set\n * */\n // initiate a new query\n manageLoaders();\n\n }", "@Test\n public void testUpdate() {\n\n }", "@Override\n\tpublic void executeUpdateDinamicQuery(String s) throws Exception {\n\t\t\n\t}", "@Test @Ignore\n\tpublic void testSQLUpdate() {\n\t\tlog.info(\"*** testSQLUpdate ***\");\n\t}", "public void queryListener(QueryEvent queryEvent) {\n //#{bindings.ImplicitViewCriteriaQuery.processQuery}\n // Add event code here...\n \n FacesContext fctx = FacesContext.getCurrentInstance();\n ELContext elctx = fctx.getELContext();\n ExpressionFactory exprFactory = fctx.getApplication().getExpressionFactory();\n MethodExpression me = exprFactory.createMethodExpression(elctx, \"#{bindings.ImplicitViewCriteriaQuery.processQuery}\",\n Object.class, new Class[]{QueryEvent.class});\n me.invoke(elctx, new Object[] {queryEvent});\n \n BindingContext bctx = BindingContext.getCurrent();\n BindingContainer bindings = bctx.getCurrentBindingsEntry();\n DCIteratorBinding allEmployeesIter = (DCIteratorBinding) bindings.get(\"allEmployeesIterator\");\n \n boolean skipEditForm = allEmployeesIter.getEstimatedRowCount() > 0 ? false : true;\n \n ADFContext adfCtx = ADFContext.getCurrent();\n \n adfCtx.getPageFlowScope().put(\"skipEditEmployees\", skipEditForm);\n\n AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance();\n adfFacesContext.addPartialTarget(trainComponent);\n }", "boolean isIsQuery();", "public com.microsoft.schemas.sharepoint.soap.UpdateViewQuery getQuery() {\r\n return query;\r\n }", "@Test\n\tpublic void testValidateUpdateSetDefaultQuery() throws RepositoryException {\n\t\tupdates.add(mockAssetView(\"target\", DefaultRuleAssetValidator.ALL_PAGES));\t\n\t\tdefaultRuleAssetValidator.validateUpdateAsset(editorInfo, updates, null);\n\t\tverify(assetService, never()).addError(anyString(), anyString());\n\t\tverify(mutableRepository).updateItem(mutableRepositoryItem);\n\t\tverify(mutableRepositoryItem).setPropertyValue(RuleProperty.QUERY, \"*\");\n\t}", "@Test\n public void updateTest8() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setCanoa(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isCanoa() ,\"Should return true if update Servizio\");\n }", "@Override\n public int updateByQuery(Ares2ClusterDO record, Ares2ClusterQuery query) {\n\n return ares2ClusterExtMapper.updateByQuery(record, query);\n }", "public void customerQuery(){\n }", "boolean update();", "public void executeUpdate(String query) {\n \ttry {\n\t\t\tst.executeUpdate(query);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n }", "@Test\n public void updateTest5() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setWifi(false);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(false, servizio.isWifi() ,\"Should return true if update Servizio\");\n }", "Test update(TestData testData, Test test);", "@Action(value=\"update\",results={@Result(name=\"queryAll\",location=\"/zjwqueryMange.jsp\")})\n\tpublic String update()\n\t{\n\t\tkehuDAO.update(kehu);\n\t\t//查询 id kehu\n\t\tkehuList = (ArrayList) kehuDAO.findAll();\n\t\treturn \"queryAll\";\n\t}", "@Override\r\n public boolean onQueryTextSubmit(String query) {\r\n mPresenter.getDataBySearch(query);\r\n return false;\r\n }", "@Test\n public void updateTest7() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setCanoa(false);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(false, servizio.isCanoa() ,\"Should return true if update Servizio\");\n }", "@Test\n\tpublic void queryTest(){\n\t\tQueryableRequestSpecification queryableRequestSpecification = SpecificationQuerier.query(requestSpecification);\n\t\tSystem.out.println(\"Printing specification parameters: \" +queryableRequestSpecification.getBaseUri());\n\t}", "@Test\n public void updateTest13() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setWifi(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true , servizio.isWifi() ,\"Should return true if update Servizio\");\n }", "public interface Update extends SpatialQuery {\n\n\t/**\n\t * Add a restriction to filter the update operation.\n\t * \n\t * @param type\n\t * The {@link RestrictionType}.\n\t * @param value\n\t * The property value for the restriction type.\n\t */\n\tpublic abstract void addRestriction(RestrictionType type, String value);\n\t\n\t/**\n\t * Returns a list with restrictions of this update query.\n\t * \n\t * @return Returns a list with {@link RestrictionImpl}.\n\t */\n\tpublic abstract RestrictionMap getRestrictions();\n}", "@Test\n\t public void testUpdateCollection(){\n\t\t try{\n\t\t\t List<Users> users = new ArrayList<Users>();\n\t\t\t users.add( BaseData.getUsers());\n\t\t\t\tusers.add(BaseData.getDBUsers());\n\t\t\t\tdoAnswer(new Answer() {\n\t\t\t \t public Object answer(InvocationOnMock invocation) {\n\t\t\t \t Object[] args = invocation.getArguments();\n\t\t\t \t EntityManager mock = (EntityManager) invocation.getMock();\n\t\t\t \t\t return null;\n\t\t\t \t }\n\t\t\t \t }).when(entityManager).persist(users);\n\t\t\t\tuserDao.update(users);\n\t\t }catch(DataAcessException se){\n\t\t\t logger.error(\"error at service layer while testing update:.\",se);\n\t\t }\n\t }", "public void handleLabTestUpdate() {\r\n SwingUtilities.invokeLater(new Runnable() {\r\n public void run() {\r\n tableModel.fireTableDataChanged();\r\n }\r\n });\r\n }", "boolean needUpdate();", "private void executeQuery() {\n }", "@Test\n void testUpdateGoalie() {\n\n }", "@Test\n public void testQuery(){\n }", "boolean stageAfterQueryParsing(Object input) throws ValidationFailedException;", "@Override\n\tpublic void queryPoints() {\n\n\t}", "@Test\n\tpublic void testUpdateCombo() {\n\t}", "@Test\n\tpublic void testUpdateTicketOk() {\n\t}", "@LogMethod\r\n private void editResults()\r\n {\n navigateToFolder(getProjectName(), TEST_ASSAY_FLDR_LAB1);\r\n clickAndWait(Locator.linkWithText(TEST_ASSAY));\r\n waitAndClickAndWait(Locator.linkWithText(\"view results\"));\r\n DataRegionTable table = new DataRegionTable(\"Data\", getDriver());\r\n assertEquals(\"No rows should be editable\", 0, DataRegionTable.updateLinkLocator().findElements(table.getComponentElement()).size());\r\n assertElementNotPresent(Locator.button(\"Delete\"));\r\n\r\n // Edit the design to make them editable\r\n ReactAssayDesignerPage assayDesignerPage = _assayHelper.clickEditAssayDesign(true);\r\n assayDesignerPage.setEditableResults(true);\r\n assayDesignerPage.clickFinish();\r\n\r\n // Try an edit\r\n navigateToFolder(getProjectName(), TEST_ASSAY_FLDR_LAB1);\r\n clickAndWait(Locator.linkWithText(TEST_ASSAY));\r\n clickAndWait(Locator.linkWithText(\"view results\"));\r\n DataRegionTable dataTable = new DataRegionTable(\"Data\", getDriver());\r\n assertEquals(\"Incorrect number of results shown.\", 10, table.getDataRowCount());\r\n doAndWaitForPageToLoad(() -> dataTable.updateLink(dataTable.getRowIndex(\"Specimen ID\", \"AAA07XK5-05\")).click());\r\n setFormElement(Locator.name(\"quf_SpecimenID\"), \"EditedSpecimenID\");\r\n setFormElement(Locator.name(\"quf_VisitID\"), \"601.5\");\r\n setFormElement(Locator.name(\"quf_testAssayDataProp5\"), \"notAnumber\");\r\n clickButton(\"Submit\");\r\n assertTextPresent(\"Could not convert value: \" + \"notAnumber\");\r\n setFormElement(Locator.name(\"quf_testAssayDataProp5\"), \"514801\");\r\n setFormElement(Locator.name(\"quf_Flags\"), \"This Flag Has Been Edited\");\r\n clickButton(\"Submit\");\r\n assertTextPresent(\"EditedSpecimenID\", \"601.5\", \"514801\");\r\n assertElementPresent(Locator.xpath(\"//img[@src='/labkey/Experiment/flagDefault.gif'][@title='This Flag Has Been Edited']\"), 1);\r\n assertElementPresent(Locator.xpath(\"//img[@src='/labkey/Experiment/unflagDefault.gif'][@title='Flag for review']\"), 9);\r\n\r\n // Try a delete\r\n dataTable.checkCheckbox(table.getRowIndex(\"Specimen ID\", \"EditedSpecimenID\"));\r\n doAndWaitForPageToLoad(() ->\r\n {\r\n dataTable.clickHeaderButton(\"Delete\");\r\n assertAlert(\"Are you sure you want to delete the selected row?\");\r\n });\r\n\r\n // Verify that the edit was audited\r\n goToSchemaBrowser();\r\n viewQueryData(\"auditLog\", \"ExperimentAuditEvent\");\r\n assertTextPresent(\r\n \"Data row, id \",\r\n \", edited in \" + TEST_ASSAY + \".\",\r\n \"Specimen ID changed from 'AAA07XK5-05' to 'EditedSpecimenID'\",\r\n \"Visit ID changed from '601.0' to '601.5\",\r\n \"testAssayDataProp5 changed from blank to '514801'\",\r\n \"Deleted data row.\");\r\n }", "@Nonnull\n private Observable<Long> doUpdate(@Nonnull String collection, @Nonnull JsonObject query,\n @Nonnull JsonObject update) {\n Objects.requireNonNull(collection, \"missing collection name\");\n Objects.requireNonNull(query, \"missing query\");\n Objects.requireNonNull(update, \"missing document\");\n\n ObservableFuture<UpdateResult> future = RxHelper.observableFuture();\n mongo.update(collection, query, update, future.toHandler());\n return future.map(result -> result.wasAcknowledged() ? result.getModifiedCount() : 0L);\n }", "public void setQuery(String query) {\n this.query = query;\n }", "public boolean updateDB(String qryExp, RequestBox rBox) throws Exception {\n\t\treturn false;\n\t}", "@Test\n\tpublic void testValidateUpdateQueryWithNullValue2() {\n\t\twhen(repoItem.getPropertyValue(RuleProperty.TARGET)).thenReturn(DefaultRuleAssetValidator.ALL_PAGES);\n\t\tupdates.add(mockAssetView(\"query\", null));\t\t\n\t\tdefaultRuleAssetValidator.validateUpdateAsset(editorInfo, updates, null);\n\t\tverify(assetService, never()).addError(anyString(), anyString());\n\t}", "@Test\n public void test() throws Exception{\n update(\"update user set username=? where id=?\",\"wangjian\",\"4\");\n }" ]
[ "0.6516989", "0.64454114", "0.63629663", "0.6198456", "0.6186316", "0.61697793", "0.6089712", "0.6013007", "0.5965697", "0.5954557", "0.5939669", "0.5905781", "0.5902722", "0.58928794", "0.5886584", "0.58778423", "0.5868213", "0.58635986", "0.58627295", "0.585683", "0.58490705", "0.5841165", "0.5834746", "0.5808922", "0.5804695", "0.58035314", "0.5799718", "0.5797881", "0.5787128", "0.5786932", "0.5782974", "0.5780157", "0.57710826", "0.57539773", "0.57435894", "0.57319546", "0.5728826", "0.57053065", "0.5704877", "0.57047623", "0.5697974", "0.5697183", "0.5687037", "0.56854093", "0.5674781", "0.567283", "0.56602716", "0.5654018", "0.5648422", "0.5639987", "0.5626834", "0.5624793", "0.56207114", "0.56154877", "0.56115675", "0.55976975", "0.5594882", "0.55864626", "0.5570828", "0.5550728", "0.5546069", "0.5544915", "0.55426764", "0.5535137", "0.55341", "0.55245405", "0.55212736", "0.55204904", "0.5507675", "0.55025405", "0.5495722", "0.54814917", "0.5464979", "0.5457642", "0.545202", "0.5450911", "0.5450716", "0.5447637", "0.544586", "0.54427403", "0.54343945", "0.5432994", "0.54257", "0.54242355", "0.5420036", "0.5414742", "0.5410856", "0.5395955", "0.53914964", "0.5389066", "0.53772473", "0.53645444", "0.5363447", "0.5360156", "0.53560513", "0.535186", "0.5349631", "0.53475523", "0.53452516", "0.53281814" ]
0.8035189
0
Created by dzhafar on 16.04.18.
public interface Repository { Observable<Bitmap> getImage(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\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\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "private void init() {\n\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public void mo4359a() {\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "@Override\n public void init() {\n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n void init() {\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "private void strin() {\n\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n public void init() {}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {}", "private Rekenhulp()\n\t{\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void mo6081a() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "static void feladat4() {\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "protected boolean func_70814_o() { return true; }", "private void init() {\n\n\n\n }", "@Override\n protected void initialize() \n {\n \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 }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "Petunia() {\r\n\t\t}", "private void m50366E() {\n }", "@Override\n protected void getExras() {\n }", "static void feladat9() {\n\t}", "public Pitonyak_09_02() {\r\n }", "protected void mo6255a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "static void feladat7() {\n\t}" ]
[ "0.5784477", "0.5766902", "0.5709277", "0.57025826", "0.5604706", "0.55503005", "0.5534936", "0.5534936", "0.5528281", "0.5519911", "0.55152786", "0.547301", "0.54586506", "0.5454245", "0.5454245", "0.5452834", "0.5444731", "0.5441377", "0.54399276", "0.54361916", "0.5434686", "0.54320896", "0.54320896", "0.54320896", "0.54320896", "0.54320896", "0.54202014", "0.5415345", "0.5395126", "0.5394115", "0.5393975", "0.539116", "0.5359857", "0.53597504", "0.5354875", "0.53499323", "0.53485125", "0.53297776", "0.53287315", "0.53287315", "0.5317463", "0.53069746", "0.5297875", "0.5297875", "0.5297875", "0.52952546", "0.5285667", "0.5281168", "0.5271897", "0.5271897", "0.5271897", "0.527164", "0.5271271", "0.52682734", "0.52682734", "0.52682734", "0.52607656", "0.5259725", "0.5259344", "0.5259344", "0.52559876", "0.52559876", "0.52559876", "0.52559876", "0.52559876", "0.52559876", "0.5250219", "0.52500814", "0.524375", "0.5241688", "0.52328926", "0.52328426", "0.5232492", "0.52219576", "0.5211123", "0.5211047", "0.5211047", "0.5211047", "0.5211047", "0.5211047", "0.5211047", "0.5211047", "0.5201401", "0.5200064", "0.5197807", "0.51958686", "0.5187006", "0.5186169", "0.5182272", "0.5172384", "0.5169001", "0.5166209", "0.51622015", "0.5142423", "0.5139147", "0.5134489", "0.5130527", "0.51243615", "0.51243615", "0.51223785", "0.5119936" ]
0.0
-1
Finds the closest crossroad ahead of the pacman
IntPair findPacmansCrossRoad(IntPair pacPosition, Direction.directionType pacDirection) { IntPair delta = Direction.directionToIntPair(pacDirection); if (isCorner(pacPosition.item1, pacPosition.item2)) { Direction.directionType newDirection = turnDirection(pacPosition.item1, pacPosition.item2, delta.item1, delta.item2); IntPair nd = Direction.directionToIntPair(newDirection); return findPacmansCrossRoad( new IntPair(pacPosition.item1 + nd.item1, pacPosition.item2 + nd.item2), newDirection); } if (delta.item1 == 0) { for (int y = pacPosition.item2; y >= 0 && y < LoadMap.MAPHEIGHTINTILES; y += delta.item2) { if (isCrossroad(pacPosition.item1, y)) { return new IntPair(pacPosition.item1, y); } else if (isCorner(pacPosition.item1, y)) { Direction.directionType newDirection = turnDirection(pacPosition.item1, y, delta.item1, delta.item2); IntPair nd = Direction.directionToIntPair(newDirection); return findPacmansCrossRoad(new IntPair(pacPosition.item1 + nd.item1, y + nd.item2), newDirection); } } } else { for (int x = pacPosition.item1; x >= 0 && x < LoadMap.MAPWIDTHINTILES; x += delta.item1) { if (isCrossroad(x, pacPosition.item2)) { return new IntPair(x, pacPosition.item2); } else if (isCorner(x, pacPosition.item2)) { Direction.directionType newDirection = turnDirection(x, pacPosition.item2, delta.item1, delta.item2); IntPair nd = Direction.directionToIntPair(newDirection); return findPacmansCrossRoad(new IntPair(x + nd.item1, pacPosition.item2 + nd.item2), newDirection); } } } return pacPosition; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Execution getClosestDistance();", "public static Direction shouldBackOff () {\n RobotInfo[] nearby = rc.senseNearbyRobots();\n boolean nearbyEc = false;\n for (RobotInfo ri: nearby) {\n if (ri.team != mTeam && ri.type == RobotType.ENLIGHTENMENT_CENTER) {\n nearbyEc = true;\n break;\n }\n }\n if (!nearbyEc) {\n return null;\n }\n MapLocation sum = rc.getLocation(), curr = sum;\n for (RobotInfo ri: nearby) {\n if (ri.type == RobotType.POLITICIAN && ri.getConviction() > rc.getConviction()) {\n sum = sum.translate(ri.getLocation().x - curr.x, ri.getLocation().y - curr.y);\n }\n }\n if (sum.equals(curr)) {\n return null;\n }\n return sum.directionTo(curr);\n }", "private Point backtrack(Point p){\n\t\t// coordinates of the point\n\t\tint x = (int)p.getX();\n\t\tint y = (int)p.getY();\n\t\t// neigh hold the return value\n\t\tPoint neigh= p;\n\t\t// the lowest score\n\t\tint score=10000;\n\t\t// look at all the neighbor and compare them\n\t\tif(x>0\t && topology[x-1][y]>=0){\n\t\t\tscore = topology[x-1][y];\n\t\t\tneigh = new Point(x-1,y);\n\t\t}\n\t\tif(x<row-1 && topology[x+1][y]>=0 && score > topology[x+1][y]) {\n\t\t\tscore = topology[x+1][y];\n\t\t\tneigh = new Point(x+1,y);\n\t\t}\n\t\tif(y<col-1 && topology[x][y+1]>=0 && score > topology[x][y+1]) {\n\t\t\tscore = topology[x][y+1];\n\t\t\tneigh = new Point(x,y+1);\n\t\t}\n\t\tif(y>0 && topology[x][y-1]>=0 && score > topology[x][y-1]) {\n\t\t\tscore = topology[x][y-1];\n\t\t\tneigh = new Point(x,y-1);\n\t\t}\n\t\treturn neigh;\n\t}", "private double[] getGoalPointAtLookaheadDistance(\n double[] initialPointOfLine, double[] finalPointOfLine, double[] nearestPoint) {\n\n // TODO: use lookahead distance proportional to robot max speed -> 0.5 * getRobotMaxSpeed()\n return Geometry.getPointAtDistance(\n initialPointOfLine, finalPointOfLine, nearestPoint, lookaheadDistance);\n }", "public Move leastRoadMove(Building request, Land land) {\n\t\tArrayList<Move> moves = new ArrayList<Move>();\n\t\tif (request.type == Building.Type.FACTORY) {\n\t\t\t// searching top-down, left-right\n\t\t\tfor (int j = 0; j < land.side; j++) {\n\t\t\t\tfor (int i = 0; i < land.side; i++) {\n\t\t\t\t\tCell p = new Cell(i, j);\n\t\t\t\t\tBuilding[] rotations = request.rotations();\n\t\t\t\t\tfor (int ri = 0; ri < rotations.length; ri++) {\n\t\t\t\t\t\tBuilding b = rotations[ri];\n\t\t\t\t\t\tif (land.buildable(b, p))\n\t\t\t\t\t\t\tmoves.add(new Move(true, request, p, ri, new HashSet<Cell>(), new HashSet<Cell>(),\n\t\t\t\t\t\t\t\t\tnew HashSet<Cell>()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (request.type == Building.Type.RESIDENCE) {\n\t\t\t// Searching top-down, right-left\n\t\t\tfor (int j = land.side; j >= 0; --j) {\n\t\t\t\tfor (int i = 0; i < land.side; ++i) {\n\t\t\t\t\tCell p = new Cell(i, j);\n\t\t\t\t\tBuilding[] rotations = request.rotations();\n\t\t\t\t\tfor (int ri = 0; ri < rotations.length; ri++) {\n\t\t\t\t\t\tBuilding b = rotations[ri];\n\t\t\t\t\t\tif (land.buildable(b, p))\n\t\t\t\t\t\t\tmoves.add(new Move(true, request, p, ri, new HashSet<Cell>(), new HashSet<Cell>(),\n\t\t\t\t\t\t\t\t\tnew HashSet<Cell>()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Reject is no valid placements exist\n\t\tif (moves.isEmpty())\n\t\t\treturn new Move(false);\n\n\t\tArrayList<Move> moves2 = new ArrayList<Move>();\n\t\tboolean checkEmptyNeighborRoadAdj = true;\n\t\t\n\t\twhile(true){\n\t\t\t// Iterate through the moves and find their shortest roads for each\n\t\t\tfor (Move mc : moves) {\n\t\t\t\t// get coordinates of building placement \n\t\t\t\t// (position plus local building cell coordinates)\n\t\t\t\tSet<Cell> shiftedCells = new HashSet<Cell>();\n\t\t\t\tfor (Cell x : mc.request.rotations()[mc.rotation])\n\t\t\t\t\tshiftedCells.add(new Cell(x.i + mc.location.i, x.j + mc.location.j));\n\t\t\t\t// build a road to connect this building to perimeter\n\t\t\t\tSet<Cell> roadCells = findShortestRoad(shiftedCells, land);\n//\t\t\t\tif (roadCells.size()==0) {\n//\t\t\t\t\tif (!isNextToRoad(mc.location.i, mc.location.j, mc.request, land)) {\n//\t\t\t\t\t\tcontinue;\n//\t\t\t\t\t}\n//\t\t\t\t}\n\t\t\t\tif(roadCells == null){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\telse if(checkEmptyNeighborRoadAdj && !areNeighborsNextToRoad(mc.location.i, mc.location.j, mc.request.rotations()[mc.rotation], land, roadCells)){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmc.road = roadCells;\n\t\t\t\t\tmoves2.add(mc);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(checkEmptyNeighborRoadAdj && moves2.isEmpty()){\n\t\t\t\tcheckEmptyNeighborRoadAdj=false;\n\t\t\t\t//System.out.println(\"Failed using neighborsRoadChecking\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tmoves = moves2;\n\n\t\t// Reject if no valid placements exist\n\t\tif (moves.isEmpty())\n\t\t\treturn new Move(false);\n\n\t\t// Find minimum road length move\n\t\tint minimumIndex = 0;\n\t\tfor (int i = 0; i < moves.size(); i++) {\n\t\t\tif (moves.get(i).road.size() < moves.get(minimumIndex).road.size())\n\t\t\t\tminimumIndex = i;\n\t\t}\n\n\t\tMove chosenMove = moves.get(minimumIndex);\n\t\troad_cells.addAll(chosenMove.road); // Adding this road to the set of\n\t\t\t\t\t\t\t\t\t\t\t// roads\n\t\treturn chosenMove;\n\t}", "public String getNearestStreet() {\n String nearestStreet = \"null\";\n CollisionResults results = new CollisionResults();\n float closestDistance = 101f;\n for(float xDir = -1; xDir <= 1; xDir += .1f) {\n for(float yDir = -1; yDir <= 1; yDir += .1f) {\n for(float zDir = -1; zDir <= 1; zDir += .1f) { \n Ray ray = new Ray(loc, new Vector3f(xDir, yDir, zDir));\n world.collideWith(ray, results);\n for (int i = 0; i < results.size(); i++) {\n float dist = results.getCollision(i).getDistance();\n String name = results.getCollision(i).getGeometry().getParent().getName();\n if (name.startsWith(\"R_\") && dist <= 100 && dist < closestDistance) {\n nearestStreet = name;\n closestDistance = dist;\n }\n }\n }\n }\n }\n\n return nearestStreet;\n \n }", "protected int bestDirection(int _y, int _x)\n {\n int sX = -1, sY = -1;\n for (int i = 0; i < m; i++) {\n boolean breakable = false;\n for (int j = 0; j < n; j++) {\n if (map[i][j] == 'p' || map[i][j] == '5') {\n sX = i;\n sY = j;\n breakable = true;\n break;\n }\n }\n if(breakable) break;\n sX =0; sY = 0;\n }\n Pair s = new Pair(sX, sY);\n Queue<Pair> queue = new Queue<Pair>();\n int[][] distance = new int[m][n];\n for (int i = 0; i < m; i++)\n for (int j = 0; j < n; j++)\n distance[i][j] = -1;\n distance[sX][sY] = 0;\n queue.add(s);\n /*\n System.out.println(\"DEBUG TIME!!!!\");\n for(int i = 0; i < m; i++)\n {\n for(int j = 0; j < n; j++)\n System.out.print(map[i][j]);\n System.out.println();\n }\n System.out.println();\n */\n while (!queue.isEmpty())\n {\n Pair u = queue.remove();\n for (int i = 0; i < 4; i++)\n {\n int x = u.getX() + hX[i];\n int y = u.getY() + hY[i];\n if (!validate(x, y)) continue;\n if (distance[x][y] != -1) continue;\n if (!canGo.get(map[x][y])) continue;\n distance[x][y] = distance[u.getX()][u.getY()] + 1;\n queue.add(new Pair(x, y));\n }\n }\n\n //slove if this enemy in danger\n //System.out.println(_x + \" \" + _y);\n if (inDanger[_x][_y])\n {\n int direction = -1;\n boolean canAlive = false;\n int curDistance = dangerDistance[_x][_y];\n int distanceToBomber = m * n;\n if (curDistance == -1) return 0;\n for (int i = 0; i < 4; i++)\n {\n int x = _x + hX[i];\n int y = _y + hY[i];\n if (!validate(x, y)) continue;\n if (dangerDistance[x][y] == -1) continue;\n if (dangerDistance[x][y] < curDistance)\n {\n curDistance = dangerDistance[x][y];\n direction = i;\n distanceToBomber = distance[x][y];\n } else if (dangerDistance[x][y] == curDistance)\n {\n if (distanceToBomber == -1 || distanceToBomber > distance[x][y])\n {\n direction = i;\n distanceToBomber = distance[x][y];\n }\n }\n }\n if (direction == -1) direction = random.nextInt(4);\n allowSpeedUp = true;\n return direction;\n }\n // or not, it will try to catch bomber\n else\n {\n /*\n System.out.println(\"x = \" + _x + \"y = \" + _y);\n for(int i = 0; i < n; i++) System.out.printf(\"%2d \",i);\n System.out.println();\n for(int i = 0; i < m; i++)\n {\n for(int j = 0; j < n; j++)\n System.out.printf(\"%2d \",distance[i][j]);\n System.out.println();\n }\n System.out.println();\n System.out.println();\n */\n int direction = -1;\n int[] die = new int[4];\n for (int i = 0; i < 4; i++)\n die[i] = 0;\n int curDistance = distance[_x][_y];\n for (int i = 0; i < 4; i++)\n {\n int x = _x + hX[i];\n int y = _y + hY[i];\n if (!validate(x, y))\n {\n die[i] = 1;\n continue;\n }\n ;\n if (inDanger[x][y])\n {\n die[i] = 2;\n continue;\n }\n if (distance[x][y] == -1) continue;\n if (distance[x][y] < curDistance)\n {\n curDistance = distance[x][y];\n direction = i;\n }\n }\n if(curDistance < 4) allowSpeedUp = true;\n else allowSpeedUp = false; //TODO: TEST :))\n if (direction == -1)\n {\n for (int i = 0; i < 4; i++)\n if (die[i] == 0) return i;\n for (int i = 0; i < 4; i++)\n if (die[i] == 1) return i;\n return 0;\n } else return direction;\n }\n }", "private Constants.MOVE findPacman(Game game) {\n //patrols from junction to junction\n //we have reached the junction we wanted to move towards -> move towards next junction\n if (this.getOwnNodeIndex(game) == game.getJunctionIndices()[currentJunctionIndex]) {\n currentJunctionIndex = (currentJunctionIndex + 1) % game.getJunctionIndices().length;\n }\n int nextJunctionPosition = game.getJunctionIndices()[currentJunctionIndex];\n return game.getApproximateNextMoveTowardsTarget(this.getOwnNodeIndex(game), nextJunctionPosition,\n game.getGhostLastMoveMade(ghost), Constants.DM.PATH);\n }", "private Queue<Position> pathToClosest(MyAgentState state, Position start, int goal) {\n\t\tQueue<Position> frontier = new LinkedList<Position>();\n\t\tSet<String> enqueued = new HashSet<String>();\n\t\tMap<Position, Position> preceedes = new HashMap<Position, Position>();\n\t\tfrontier.add(start);\n\t\tenqueued.add(start.toString());\n\n\t\twhile (!frontier.isEmpty()) {\n\t\t\tPosition pos = frontier.remove();\n\t\t\tif (state.getTileData(pos) == goal) {\n\t\t\t\treturn toQueue(preceedes, pos, start);\n\t\t\t}\n\t\t\t\n\t\t\tfor (Position neighbour : pos.neighbours()) {\n\t\t\t\tif (!enqueued.contains(neighbour.toString()) && state.getTileData(neighbour) != state.WALL) {\n\t\t\t\t\tpreceedes.put(neighbour, pos);\n\t\t\t\t\tfrontier.add(neighbour);\n\t\t\t\t\tenqueued.add(neighbour.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public MapLocation findNearestAction() {\n MapLocation origin = rc.getLocation();\n MapLocation nearestHelp = findNearestHelp();\n MapLocation nearestArchon = findNearestArchon();\n\n if (nearestArchon == null && nearestHelp == null) {\n return rc.getInitialArchonLocations(rc.getTeam().opponent())[0]; // when no target is known, go to enemy archon initial position\n } else if (nearestArchon == null) { // when some of the targets is not present, just return the other one\n return nearestHelp; // is not null\n } else if (nearestHelp == null) {\n return nearestArchon; // is not null\n }\n\n if (origin.distanceSquaredTo(nearestHelp) < origin.distanceSquaredTo(nearestArchon)) {\n return nearestHelp;\n } else {\n return nearestArchon;\n }\n }", "public MapLocation findNearestArchon() {\n MapLocation origin = rc.getLocation();\n MapLocation nearestAction = null;\n float nearestDistance = 9999f;\n\n for (int i = 0; i < enemyArchonCount; ++i) {\n ArchonLocation loc = archonLocations[i];\n if (loc.isDead()) continue;\n float distance = loc.location.distanceSquaredTo(origin);\n if (nearestAction == null || distance < nearestDistance) {\n nearestAction = loc.location;\n nearestDistance = distance;\n }\n }\n\n return nearestAction;\n }", "public Position findWeed() {\n int xVec =0;\n int yVec=0;\n int sum = 0;\n Position move = new Position(0, 0);\n for (int i = 0; i < this.WORLD.getMapSize().getX(); i++) {\n for (int j = 0; j < this.WORLD.getMapSize().getY(); j++) {\n\n //hogweed\n Organism organism = this.WORLD.getOrganism(i, j);\n if(organism!=null){\n Class c = organism.getClass();\n if (c.getSimpleName().equals(\"Parnsip\")) {\n int tmpX = Math.abs(this.position.getX() - i);\n int tmpY = Math.abs(this.position.getY() - j);\n if (!(xVec == 0 && yVec == 0)) {\n int tmpSum = tmpX + tmpY;\n if (sum > tmpSum) {\n xVec=tmpX;\n yVec=tmpY;\n sum = tmpSum;\n this.setMove(move, j, i);\n }\n }\n else {\n xVec=tmpX;\n yVec=tmpY;\n sum = tmpX + tmpY;\n this.setMove(move, j, i);\n }\n }\n }\n\n }\n }\n return move;\n }", "public GPSNode getClosestNodeOnRoad(double lat, double lon) {\n\tGPSNode closest = null;\n\tdouble min = Double.MAX_VALUE;\n\t\n\tSet<String> wayList = ways.keySet();\n\tfor(String str : wayList) {\n\t Way way = ways.get(str);\n\t if(way != null && way.canDrive()) {\n\t\tArrayList<String> refs = way.getRefs();\n\t\tif(refs != null && refs.size() > 0) {\n\t\t for(String ref: refs) {\n\t\t\tGPSNode node = (GPSNode) getNode(ref);\n\t\t\t\n\t\t\tif(node == null)\n\t\t\t continue;\n\t\t\t\n\t\t\tdouble nodeLat = node.getLatitude();\n\t\t\tdouble nodeLon = node.getLongitude();\n\t\t\t \n\t\t\tdouble dist = calcDistance(lat, lon, nodeLat, nodeLon);\n\t\t\t \n\t\t\tif(dist < min) {\n\t\t\t min = dist;\n\t\t\t closest = node;\n\t\t\t}\n\t\t }\n\t\t}\n\t }\n\t}\n\t\n\treturn closest;\n }", "private Point getClosestPoint(Point[] mapPoints, Point newPoint) {\n for (int i = 0; i < mapPoints.length; i++) {\n if (ShortestPath.distance(newPoint, mapPoints[i]) < 30) {\n newPoint.x = mapPoints[i].x + 10;\n newPoint.y = mapPoints[i].y + 10;\n return newPoint;\n }\n }\n return null;\n }", "public int shortestBridge(int[][] A) {\n for(int i = 0; i < A.length; i++) {\n if(found) {\n break;\n }\n for(int j = 0; j < A[0].length; j++) {\n if(A[i][j] == 1) {\n helper(A, i, j);\n found = true;\n break;\n }\n }\n }\n // Put all '2' into queue as candidate initial start points\n Queue<int[]> q = new LinkedList<int[]>();\n for(int i = 0; i < A.length; i++) {\n for(int j = 0; j < A[0].length; j++) {\n if(A[i][j] == 2) {\n q.offer(new int[] {i, j});\n }\n }\n }\n int distance = 0;\n while(!q.isEmpty()) {\n int size = q.size();\n for(int i = 0; i < size; i++) {\n int[] cur = q.poll();\n for(int j = 0; j < 4; j++) {\n int new_x = cur[0] + dx[j];\n int new_y = cur[1] + dy[j];\n if(new_x >= 0 && new_x < A.length && new_y >= 0 && new_y < A[0].length) {\n if(A[new_x][new_y] == 1) {\n return distance;\n } else if(A[new_x][new_y] == 0) {\n // Update from 0 to 2 which means expand first island boundary\n // which also avoid using visited to check\n A[new_x][new_y] = 2;\n q.offer(new int[] {new_x, new_y});\n }\n }\n }\n }\n distance++;\n }\n return distance;\n }", "Execution getFarthestDistance();", "public int shortestBridge(int[][] A) {\n for(int i = 0; i < A.length && !found; i++) {\n for(int j = 0; j < A[0].length && !found; j++) {\n if(A[i][j] == 1) {\n helper(A, i, j);\n found = true;\n }\n }\n }\n // Put all '2' into queue as candidate initial start points\n Queue<int[]> q = new LinkedList<int[]>();\n for(int i = 0; i < A.length; i++) {\n for(int j = 0; j < A[0].length; j++) {\n if(A[i][j] == 2) {\n q.offer(new int[] {i, j});\n }\n }\n }\n int distance = 0;\n while(!q.isEmpty()) {\n int size = q.size();\n for(int i = 0; i < size; i++) {\n int[] cur = q.poll();\n for(int j = 0; j < 4; j++) {\n int new_x = cur[0] + dx[j];\n int new_y = cur[1] + dy[j];\n if(new_x >= 0 && new_x < A.length && new_y >= 0 && new_y < A[0].length) {\n if(A[new_x][new_y] == 1) {\n return distance;\n } else if(A[new_x][new_y] == 0) {\n // Update from 0 to 2 which means expand first island boundary\n // which also avoid using visited to check\n A[new_x][new_y] = 2;\n q.offer(new int[] {new_x, new_y});\n }\n }\n }\n }\n distance++;\n }\n return distance;\n }", "int[][] Naive(int m, Pointd[] points){\n int[][] tours = new int[m][];\n for(int i=0; i<m; i++){\n if(i<points.length%m) tours[i] = new int[points.length/m+1];\n else tours[i] = new int[points.length/m];\n }\n\n //Select the first point, find the next closest point, find the next closest point to that etc\n boolean[] alreadyInTour = new boolean[points.length];\n double minDistance;\n double distance;\n Pointd pointA;\n Pointd pointB;\n int index = 0;\n int n;\n\n for(int k=0; k<m; k++){\n //Each row of tours, first find a node that isn't in a tour\n n = 0;\n while(alreadyInTour[n]) n++;\n pointA = points[n];\n tours[k][0] = n;\n alreadyInTour[n] = true;\n\n int iterate = 0;\n int j=1;\n while(j<tours[k].length){\n if(!alreadyInTour[iterate]){\n minDistance = Double.MAX_VALUE;\n //Find next closest point to pointA\n for(int i=0; i<points.length; i++){\n pointB = points[i];\n if(!alreadyInTour[i]){\n distance = Math.sqrt( Math.pow(pointA.x - pointB.x, 2) + Math.pow(pointA.y - pointB.y, 2) );\n if(distance < minDistance){\n minDistance = distance;\n index = i;\n }\n }\n }\n //System.out.println(index);\n tours[k][j] = index;\n alreadyInTour[index] = true;\n j++;\n }\n iterate++;\n if(iterate >= points.length) iterate = 0;\n }\n }\n for(int i=0; i<tours.length; i++){\n //System.out.println(Arrays.toString(tours[i]));\n }\n return tours;\n }", "public Wall nextNear( Point startingPoint, Point destinationPoint, Wall destinationWall ) {\n//System.out.print(\"nextNear. start: \" + startingPoint.toString() + \", end: \" + destinationPoint.toString());\n\n if ( this == destinationWall ) {\n return this;\n }\n\n if ( nextCornerPoint.equals( startingPoint ) ) {\n return previous;\n }\n\n if ( previousCornerPoint.equals( startingPoint ) ) {\n return next;\n }\n\n// Double destination = startingPoint.distance( destinationPoint );\n Double nextCorner = destinationPoint.distance( nextCornerPoint );\n Double previousCorner = destinationPoint.distance( previousCornerPoint );\n\n// System.out.print(\"... Distances - destination: \" + destination.toString()\n// + \", nextCorner: \" + nextCorner.toString()\n// + \", previousCorner: \" + previousCorner.toString());\n//\n// if ( destination <= nextCorner || destination <= previousCorner ) {\n// System.out.println( \". Returning current wall \" + this.toString() );\n// return this;\n// }\n// else\n// if ( nextCorner < previousCorner && ! nextCornerPoint.equals( startingPoint ) ) {\n if ( nextCorner < previousCorner ) {\n// System.out.println( \". Returning next \" + next.toString() );\n return next;\n }\n else\n// if ( ! previousCornerPoint.equals( startingPoint ) )\n {\n// System.out.println( \". Returning previous \" + previous.toString() );\n return previous;\n }\n// else {\n// System.out.println( \". Returning next \" + next.toString() + \" by default.\");\n// return next;\n// }\n }", "public int headFor(Coordinate place) {\n\n\t\tif (place == null) {\n\t\t\tSystem.out.println(\"ERROR: can't move toward nonexistant location\");\n\t\t\treturn -1;\n\t\t}\n\n\t\t// first, record from where the agent is starting\n\t\tstartPoint = this.geometry.getCoordinate();\n\t\tgoalPoint = null;\n\n\t\tif (!(edge.getTo().equals(node) || edge.getFrom().equals(node))) {\n\t\t\tSystem.out.println((int) world.schedule.getTime() + \"\\tMOVE_ERROR_mismatch_between_current_edge_and_node\");\n\t\t\treturn -2;\n\t\t}\n\n\t\t///////////////////// FINDING THE GOAL ////////////////////\n\t\t// set up goal information\n\t\ttargetDestination = world.snapPointToRoadNetwork(place);\n\n\t\tGeoNode destinationNode = world.snapPointToNode(targetDestination);\n\t\tif (destinationNode == null) {\n\t\t\tSystem.out.println((int) world.schedule.getTime() + \"\\tMOVE_ERROR_invalid_destination_node\");\n\t\t\treturn -2;\n\t\t}\n\n\t\t// be sure that if the target location is not a node but rather a point along an\n\t\t// edge, that point is recorded\n\t\tif (destinationNode.geometry.getCoordinate().distance(targetDestination) > world.resolution)\n\t\t\tgoalPoint = targetDestination;\n\t\telse\n\t\t\tgoalPoint = null;\n\n\t\t///////////////// FINDING A PATH /////////////////////\n\n\t\tpath = pathfinder.astarPath(node, destinationNode, world.roads);\n\n\t\t// if it fails, give up\n\t\tif (path == null) {\n\t\t\treturn -1;\n\t\t}\n\n\t\t//////////////////// CHECK FOR BEGINNING OF PATH ///////////////////\n\t\t// we want to be sure that we're situated on the path *right now*, and that if\n\t\t// the path doesn't include the link we're on at this moment that we're both\n\t\t// a) on a link that connects to the startNode\n\t\t// b) pointed toward that startNode\n\t\t// Then, we want to clean up by getting rid of the edge on which we're already\n\t\t// located\n\n\t\t// Make sure we're in the right place, and face the right direction\n\t\tif (edge.getTo().equals(node))\n\t\t\tdirection = 1;\n\t\telse if (edge.getFrom().equals(node))\n\t\t\tdirection = -1;\n\t\telse {\n\t\t\tSystem.out.println((int) world.schedule.getTime() + \"MOVE_ERROR_mismatch_between_current_edge_and_node_2\");\n\t\t\treturn -2;\n\t\t}\n\n\t\t// reset stuff\n\t\tif (path.size() == 0 && targetDestination.distance(geometry.getCoordinate()) > world.resolution) {\n\t\t\tpath.add(edge);\n\t\t\tnode = (GeoNode) edge.getOtherNode(node);\n\t\t}\n\n\t\t//////////////////// CHECK FOR END OF PATH //////////////\n\n\t\tif (goalPoint != null) {\n\n\t\t\tListEdge myLastEdge = world.getClosestEdge(goalPoint, world.resolution, world.networkEdgeLayer, world.fa);\n\n\t\t\tif (myLastEdge == null) {\n\t\t\t\tSystem.out.println((int) world.schedule.getTime() + \"\\tMOVE_ERROR_goal_point_is_too_far_from_any_edge\");\n\t\t\t\treturn -2;\n\t\t\t}\n\n\t\t\t// make sure the point is on the last edge\n\t\t\tEdge lastEdge;\n\t\t\tif (path.size() > 0)\n\t\t\t\tlastEdge = path.get(0);\n\t\t\telse\n\t\t\t\tlastEdge = edge;\n\n\t\t\tPoint goalPointGeometry = world.fa.createPoint(goalPoint);\n\t\t\tif (!lastEdge.equals(myLastEdge)\n\t\t\t\t\t&& ((MasonGeometry) lastEdge.info).geometry.distance(goalPointGeometry) > world.resolution) {\n\t\t\t\tif (lastEdge.getFrom().equals(myLastEdge.getFrom()) || lastEdge.getFrom().equals(myLastEdge.getTo())\n\t\t\t\t\t\t|| lastEdge.getTo().equals(myLastEdge.getFrom()) || lastEdge.getTo().equals(myLastEdge.getTo()))\n\t\t\t\t\tpath.add(0, myLastEdge);\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println((int) world.schedule.getTime()\n\t\t\t\t\t\t\t+ \"\\tMOVE_ERROR_goal_point_edge_is_not_included_in_the_path\");\n\t\t\t\t\treturn -2;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\t// set up the coordinates\n\t\tthis.startIndex = segment.getStartIndex();\n\t\tthis.endIndex = segment.getEndIndex();\n\n\t\treturn 1;\n\t}", "private double getHeuristic(MapLocation current, MapLocation goal) {\n\t\treturn Math.max(Math.abs(current.x - goal.x), Math.abs(current.y - goal.y));\n\t}", "Point findNearestActualPoint(Point a, Point b) {\n\t\tPoint left = new Point(a.x-this.delta/3,a.y);\n\t\tPoint right = new Point(a.x+this.delta/3,a.y);\n\t\tPoint down = new Point(a.x,a.y-this.delta/3);\n\t\tPoint up = new Point(a.x,a.y+this.delta/3);\n\t\tPoint a_neighbor = left;\n\t\tif (distance(right,b) < distance(a_neighbor,b)) a_neighbor = right;\n\t\tif (distance(down,b) < distance(a_neighbor,b)) a_neighbor = down;\n\t\tif (distance(up,b) < distance(a_neighbor,b)) a_neighbor = up;\n\n\t\treturn a_neighbor;\n\t}", "public void findShortestPath() {\r\n\t\t\r\n\t\t//Create a circular array that will store the possible next tiles in the different paths.\r\n\t\tOrderedCircularArray<MapCell> path = new OrderedCircularArray<MapCell>();\r\n\t\t\r\n\t\t//Acquire the starting cell.\r\n\t\tMapCell starting = cityMap.getStart();\r\n\t\t\r\n\t\t//This variable is to be updated continuously with the cell with the shortest distance value in the circular array.\r\n\t\tMapCell current=null;\r\n\t\t\r\n\t\t//This variable is to check if the destination has been reached, which is initially false.\r\n\t\tboolean destination = false;\r\n\t\t\r\n\t\t//Add the starting cell into the circular array, and mark it in the list.\r\n\t\tpath.insert(starting, 0);\r\n\t\t\r\n\t\tstarting.markInList(); \r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t//As long as the circular array isn't empty, and the destination hasn't been reached, run this loop.\r\n\t\t\twhile(!path.isEmpty()&&!destination) {\r\n\t\t\t\t\r\n\t\t\t\t//Take the cell with the shortest distance out of the circular array, and mark it accordingly.\r\n\t\t\t\tcurrent = path.getSmallest();\r\n\t\t\t\tcurrent.markOutList();\r\n\t\t\t\t\r\n\t\t\t\tMapCell next;\r\n\t\t\t\tint distance;\r\n\t\t\t\t\r\n\t\t\t\tif(current.isDestination()) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tdestination = true; //If the current cell is the destination, end the loop.\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\t\r\n\t\t\t\t\tnext = nextCell(current); //Acquire the next possible neighbour of the current cell.\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Don't run if next is null, meaning there is no other possible neighbour in the path for the current cell.\r\n\t\t\t\t\twhile(next!=null) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tdistance = current.getDistanceToStart() + 1;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//If the distance of the selected neighbouring cell is currently more than 1 more than the current cell's \r\n\t\t\t\t\t\t//distance, update the distance of the neighbouring cell. Then, set the current cell as its predecessor.\r\n\t\t\t\t\t\tif(next.getDistanceToStart()>distance) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tnext.setDistanceToStart(distance);\r\n\t\t\t\t\t\t\tnext.setPredecessor(current);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tdistance = next.getDistanceToStart(); \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(next.isMarkedInList() && distance<path.getValue(next)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tpath.changeValue(next, distance); //If the neighbouring cell is in the circular array, but with a \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t //larger distance value than the new updated distance, change its value.\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} else if(!next.isMarkedInList()){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tpath.insert(next, distance); //If the neighbouring cell isn't in the circular array, add it in.\r\n\t\t\t\t\t\t\tnext.markInList();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tnext = nextCell(current); //Look for the next possible neighbour, if any.\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Catch all the possible exceptions that might be thrown by the method calls. Print the appropriate messages.\r\n\t\t} catch (EmptyListException e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\tSystem.out.println(\"Path finding execution stopped.\");\r\n\t\t\t\r\n\t\t} catch (InvalidNeighbourIndexException e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"The program tried to access an invalid neighbour of a tile.\");\r\n\t\t\tSystem.out.println(\"Path finding execution stopped.\");\r\n\t\t\t\r\n\t\t} catch (InvalidDataItemException e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\tSystem.out.println(\"Path finding execution stopped.\");\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getMessage()+\" Path finding execution has stopped.\");\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//If a path was found, print the number of tiles in the path.\r\n\t\tif(destination) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Number of tiles in path: \" + (current.getDistanceToStart()+1));\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"No path found.\"); //Otherwise, indicate that a path wasn't found.\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n public PointInPath getLastRoutePointBeforeCoordinate(Street street, Coordinate coord) {\n for(int r_index = currRouteIndex; r_index<=routes.size()-1; r_index++) {\n Route r = routes.get(r_index);\n\n // iterate through the route\n for(int i=0; i<r.getRoute().size()-1; i++) {\n PointInPath p1 = r.getRoute().get(i);\n PointInPath p2 = r.getRoute().get(i+1);\n\n if(p1.getStreet().getId().equals(street.getId())) {\n if(Math2D.isLocatedBetweenPoints(coord, p1.getCoordinate(), p2.getCoordinate())) {\n if(r_index != currRouteIndex) {\n // return last route point that is already a part of the street\n return new PointInPath(r, p1.getStreet(), p1.getCoordinate());\n } else {\n // returned route point is the vehicle's position\n Coordinate vehiclePos = getPosition(progressTowardsNextStop);\n if(Math2D.isLocatedBetweenPoints(vehiclePos, p1.getCoordinate(), coord)) {\n PointInPath currVehiclePoint = new PointInPath(r, p1.getStreet(), vehiclePos);\n r.getRoute().add(i+1, currVehiclePoint);\n\n return currVehiclePoint;\n }\n }\n }\n }\n }\n }\n return null;\n }", "private SolarSystem findClosestSolarSystem(Point p) {\n SolarSystem forreturn = solarSystemLocations.get(p);\n if (forreturn == null) {\n Point[] points = new Point[solarSystemLocations.keySet().size()];\n solarSystemLocations.keySet().toArray(points);\n Point closest = points[0];\n for (Point test : points) {\n if (closest.distance(p.x, p.y) > test.distance(p.x, p.y)) {\n closest = test;\n }\n }\n if (closest.distance(p.x, p.y) < 10) {\n forreturn = solarSystemLocations.get(closest);\n }\n }\n return forreturn;\n }", "private static Point findFarthestState(Cells[][] wallBoard, int column, int row)\n\t{\n\t\tint tries = 100;\n\t\tint farthest = 0;\n\t\tint farthestX = 0;\n\t\tint farthestY = 0;\n\t\tPoint farthestPos = new Point();\n\n\t\t_DF = new DeadlocksFinder(wallBoard);\n\n\t\tint[][] staticDLMap = _DF.getStaticDLMap();\n\n\t\tdo\n\t\t{\n\t\t\tint i = rn.nextInt(rows);\n\t\t\tint j = rn.nextInt(columns);\n\n\t\t\tif(board[i][j]==Cells.FLOOR && staticDLMap[i][j]!=1 && canStillReachEveryCrates(wallBoard, j, i))\n\t\t\t{\n\t\t\t\tArrayList<Point> path = _PF.findAReversedWay(column, row, j, i);\n\t\t\t\tint distance = path.size();\n\n\t\t\t\tif(distance==0)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tPoint ppos = new Point((int)path.get(path.size()-1).getX(), (int)path.get(path.size()-1).getY());\n\n\t\t\t\tif(distance > farthest)\n\t\t\t\t{\n\t\t\t\t\tfarthestX=j;\n\t\t\t\t\tfarthestY=i;\n\t\t\t\t\tfarthest=distance;\n\t\t\t\t\tfarthestPos=ppos;\n\t\t\t\t}\n\t\t\t}\n\t\t} while(tries-->0);\n\t\t\t\t\n\n\n\t\t/*for(int i=0; i<rows; i++)\n\t\t{\n\t\t\tfor(int j=0; j<columns; j++)\n\t\t\t{\n\t\t\t\tif(board[i][j]==Cells.FLOOR && staticDLMap[i][j]!=1)// && canStillReachEveryCrates(wallBoard, j, i))\n\t\t\t\t{\n\t\t\t\t\tArrayList<Point> path = _PF.findAReversedWay(column, row, j, i);\n\t\t\t\t\tint distance = path.size();\n\n\t\t\t\t\tif(distance==0)\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\tPoint ppos = new Point((int)path.get(path.size()-1).getX(), (int)path.get(path.size()-1).getY());\n\n\t\t\t\t\tif(distance > farthest)\n\t\t\t\t\t{\n\t\t\t\t\t\tfarthestX=j;\n\t\t\t\t\t\tfarthestY=i;\n\t\t\t\t\t\tfarthest=distance;\n\t\t\t\t\t\tfarthestPos=ppos;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}*/\n\n\t\tplayerPos.add(farthestPos);\n\t\treturn new Point(farthestX, farthestY);\n\t}", "private static void findBestRelocationMove(RelocationMove rm, Solution s, double [][] distanceMatrix, int numberOfVehicles) \n\t{\n\t\t//This is a variable that will hold the cost of the best relocation move\n\t\tdouble bestMoveCost = Double.MAX_VALUE;\n\n\t\t//We will iterate through all available vehicles\n\t\t\n\t\t//Vehicles to relocate FROM\n\t\tfor (int from = 0; from<numberOfVehicles; from++)\n\t\t{\n\t\t\t// Vehicles to relocate TO\n\t\t\tfor (int to = 0; to<numberOfVehicles; to++)\n\t\t\t{\n\n\t\t\t\tfor (int fromIndex = 1; fromIndex < s.routes.get(from).customers.size() - 1; fromIndex++)\n\t\t\t\t{\n\t\t\t\t\t//Node A is the predecessor of B\n\t\t\t\t\tCustomer A = s.routes.get(from).customers.get(fromIndex - 1);\n\n\t\t\t\t\t//Node B is the relocated node\n\t\t\t\t\tCustomer B = s.routes.get(from).customers.get(fromIndex);\n\n\t\t\t\t\t//Node C is the successor of B\n\t\t\t\t\tCustomer C = s.routes.get(from).customers.get(fromIndex + 1);\n\n\t\t\t\t\t//We will iterate through all possible re-insertion positions for B\n\t\t\t\t\tfor (int afterIndex = 0; afterIndex < s.routes.get(to).customers.size() -1; afterIndex ++)\n\t\t\t\t\t{\n\n\t\t\t\t\t\tif ((afterIndex != fromIndex && afterIndex != fromIndex - 1)||from != to)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//Node F the node after which B is going to be reinserted\n\t\t\t\t\t\t\tCustomer F = s.routes.get(to).customers.get(afterIndex);\n\n\t\t\t\t\t\t\t//Node G the successor of F\n\t\t\t\t\t\t\tCustomer G = s.routes.get(to).customers.get(afterIndex + 1);\n\n\t\t\t\t\t\t\t//The arcs A-B, B-C, and F-G break\n\t\t\t\t\t\t\tdouble costRemovedFrom = distanceMatrix[A.ID][B.ID] + distanceMatrix[B.ID][C.ID];\n\t\t\t\t\t\t\tdouble costRemovedTo = distanceMatrix[F.ID][G.ID];\n\n\t\t\t\t\t\t\t//The arcs A-C, F-B and B-G are created\n\t\t\t\t\t\t\tdouble costAddedFrom = distanceMatrix[A.ID][C.ID];\n\t\t\t\t\t\t\tdouble costAddedTo = distanceMatrix[F.ID][B.ID] + distanceMatrix[B.ID][G.ID];\n\n\t\t\t\t\t\t\t//This is the cost of the move, or in other words\n\t\t\t\t\t\t\t//the change that this move will cause if applied to the current solution\n\t\t\t\t\t\t\tdouble fromMoveCost = costAddedFrom - costRemovedFrom;\n\t\t\t\t\t\t\tdouble toMoveCost = costAddedTo - costRemovedTo;\n\n\t\t\t\t\t\t\t//If this move is the best found so far\n\t\t\t\t\t\t\tdouble moveCost = fromMoveCost+toMoveCost;\n\t\t\t\t\t\t\tif ((moveCost < bestMoveCost)&&(from == to || (s.routes.get(to).load + s.routes.get(from).customers.get(fromIndex).demand<=s.routes.get(to).capacity)))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//set the best cost equal to the cost of this solution\n\t\t\t\t\t\t\t\tbestMoveCost = moveCost;\n\n\t\t\t\t\t\t\t\t//store its characteristics\n\t\t\t\t\t\t\t\trm.positionOfRelocated = fromIndex;\n\t\t\t\t\t\t\t\trm.positionToBeInserted = afterIndex;\n\t\t\t\t\t\t\t\trm.toMoveCost = toMoveCost;\n\t\t\t\t\t\t\t\trm.fromMoveCost = fromMoveCost;\n\t\t\t\t\t\t\t\trm.fromRoute = from;\n\t\t\t\t\t\t\t\trm.toRoute = to;\n\t\t\t\t\t\t\t\trm.moveCost = moveCost;\n\t\t\t\t\t\t\t\tif (from != to) {\n\t\t\t\t\t\t\t\t\trm.fromUpdLoad = s.routes.get(from).load - s.routes.get(from).customers.get(fromIndex).demand;\n\t\t\t\t\t\t\t\t\trm.toUpdLoad = s.routes.get(to).load + s.routes.get(from).customers.get(fromIndex).demand;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\trm.fromUpdLoad = s.routes.get(from).load;\n\t\t\t\t\t\t\t\t\trm.toUpdLoad = s.routes.get(to).load;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "Place getNextPlace(Place next)\n{\n if (!visited.contains(next.goNorth()) && !(next.goNorth()).isWall()){\n soln.append(\"N\");\n visited.add(next.goNorth());\n //nearby.clear();\n return next.goNorth();\n }\n else if (!visited.contains(next.goEast()) && !next.goEast().isWall()){\n soln.append(\"E\");\n visited.add(next.goEast());\n //nearby.clear();\n return next.goEast();\n }\n else if (!visited.contains(next.goNorth()) && !next.goNorth().isWall()){\n soln.append(\"N\");\n visited.add(next.goNorth());\n //nearby.clear();\n return next.goNorth();\n }\n else if (!visited.contains(next.goNorth()) && !next.goNorth().isWall()){\n soln.append(\"N\");\n visited.add(next.goNorth());\n //nearby.clear();\n return next.goNorth();\n \n //nearby.clear();\n return null;\n} \n}", "public Passenger getNearestPassenger(Elevator lift)\n\t{\t\n\t\t// find all nearby passengers\n\t\tPassenger[] nearby = new Passenger[4];\n\t\t\n\t\t// find nearest passengers above\n\t\tfor (int i = lift.getCurrentFloor(); i < this.getFloorCount(); i++)\n\t\t{\n\t\t\tif (nearby[0] == null && this.upQueues[i].size() > 0)\n\t\t\t\tnearby[0] = (Passenger) this.upQueues[i].peek();\n\t\t\tif (nearby[1] == null && this.downQueues[i].size() > 0)\n\t\t\t\tnearby[1] = (Passenger) this.downQueues[i].peek();\n\t\t}\n\t\t\n\t\t// find nearest passengers below\n\t\tfor (int i = lift.getCurrentFloor(); i >= 0; i--)\n\t\t{\n\t\t\tif (nearby[2] == null && this.upQueues[i].size() > 0)\n\t\t\t\tnearby[2] = (Passenger) this.upQueues[i].peek();\n\t\t\tif (nearby[3] == null && this.downQueues[i].size() > 0)\n\t\t\t\tnearby[3] = (Passenger) this.downQueues[i].peek();\n\t\t}\n\t\t\n\t\t// if we're already moving, we only need to consider one passenger\n\t\tif (lift.getDirection() == Elevator.Direction.UP)\n\t\t\treturn nearby[0];\n\t\t\n\t\tif (lift.getDirection() == Elevator.Direction.DOWN)\n\t\t\treturn nearby[3];\n\t\t\n\t\t// Direction is IDLE...find any nearest passenger.\n\t\tPassenger best = null;\n\t\tint bestDist = 0;\n\t\tfor (int i = 0; i < nearby.length; i++)\n\t\t{\n\t\t\tif (nearby[i] != null && best == null)\n\t\t\t{\n\t\t\t\t// found first nearby passenger\n\t\t\t\tbest = nearby[i];\n\t\t\t\tbestDist = Math.abs(lift.getCurrentFloor() - best.getStartFloor());\n\t\t\t}\n\t\t\telse if (nearby[i] != null)\n\t\t\t{\n\t\t\t\t// found another nearby passenger; are they closer?\n\t\t\t\tint dist = Math.abs(lift.getCurrentFloor() - nearby[i].getStartFloor());\n\t\t\t\tif (dist < bestDist)\n\t\t\t\t{\n\t\t\t\t\tbest = nearby[i];\n\t\t\t\t\tbestDist = dist;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn best;\n\t}", "public org.landxml.schema.landXML11.Station xgetIntersectRoadwayPI()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.Station target = null;\r\n target = (org.landxml.schema.landXML11.Station)get_store().find_attribute_user(INTERSECTROADWAYPI$22);\r\n return target;\r\n }\r\n }", "private GeoPoint getClosestPoint(List<GeoPoint> intersectionPoints) {\n Point3D p0 = scene.getCamera().getSpo();//the point location of the camera.\n double minDist = Double.MAX_VALUE;//(meatchelim ldistance hamaximily)\n double currentDistance = 0;\n GeoPoint pt = null;\n for (GeoPoint geoPoint : intersectionPoints) {\n currentDistance = p0.distance(geoPoint.getPoint());//checks the distance from camera to point\n if (currentDistance < minDist) {\n minDist = currentDistance;\n pt = geoPoint;\n }\n }\n return pt;\n }", "public void findNearestToMouse(Point2D position) throws NoninvertibleTransformException{\n //Take insets into account when using mouseCoordinates.\n Insets x = getInsets();\n position.setLocation(position.getX(), position.getY()-x.top + x.bottom);\n Point2D coordinates = transformPoint(position);\n Rectangle2D mouseBox = new Rectangle2D.Double(coordinates.getX()-0.005,\n coordinates.getY() -0.005,\n 0.01 , 0.01);\n Collection<MapData> streets = model.getVisibleStreets(mouseBox, false);\n streets.addAll(model.getVisibleBigRoads(mouseBox, false));\n filterRoads(streets); //remove all highways without names.\n\n\n nearestNeighbor = RouteFinder.findNearestHighway(coordinates, streets);\n repaint();\n }", "private void navToPoint(Unit unit){\n\t\tMapLocation currentLocation = unit.location().mapLocation();\n\t\tMapLocation locationToTest;\n\t\tMapLocation targetLocation = orderStack.peek().getLocation();\n\t\tlong smallestDist=1000000000; //arbitrary large number\n\t\tlong temp;\n\t\tDirection closestDirection=null;\n\t\tint i=1;\n\t\t\n\t\tif(gc.isMoveReady(unitID)){\n\t\t\t//first find the direction that moves us closer to the target\n\t\t\tfor(Direction dir : Direction.values()){\n\t\t\t\tif (debug) System.out.println(\"this (\"+dir.name()+\") is the \"+i+\"th direction to check, should get to 9\");\n\t\t\t\tlocationToTest=currentLocation.add(dir);\n\t\t\t\t//make sure it is on the map and is passable\n\t\t\t\tif (debug){\n\t\t\t\t\tSystem.out.println(\"testing this location: \"+locationToTest);\n\t\t\t\t\tSystem.out.println(\"valid move? \"+gc.canMove(unitID, dir));\n\t\t\t\t}\n\t\t\t\tif(gc.canMove(unitID, dir)){\n\t\t\t\t\tif (debug)System.out.println(\"we can indeed move there...\");\n\t\t\t\t\t//make sure the location hasn't already been visited\n\t\t\t\t\tif(!pastLocations.contains(locationToTest)){\n\t\t\t\t\t\tif (debug)System.out.println(\"not been there recently...\");\n\t\t\t\t\t\t//at this point its a valid location to test, check its distance\n\t\t\t\t\t\ttemp = locationToTest.distanceSquaredTo(targetLocation);\n\t\t\t\t\t\tif (debug)System.out.println(\"distance :\"+temp);\n\t\t\t\t\t\tif (temp<smallestDist){\n\t\t\t\t\t\t\tif (debug)System.out.println(\"new closest!\");\n\t\t\t\t\t\t\t//new closest point, update accordingly\n\t\t\t\t\t\t\tsmallestDist=temp;\n\t\t\t\t\t\t\tclosestDirection=dir;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}//end of for-each loop\n\t\t}//end move ready if.\n\t\t\n\t\t//actual movement and maintenance of places recently visited\n\t\tif(closestDirection!=null){\n\t\t\tif (debug){\n\t\t\t\tSystem.out.println(\"found a closest direction, calling navInDirection()\");\n\t\t\t\tSystem.out.println(\"heading \"+closestDirection.name());\n\t\t\t}\n\t\t\tmoveInDirection(closestDirection, unit);\n\t\t\tcleanUpAfterMove(unit);\n\t\t}else{\n\t\t\t//can't get any closer\n\t\t\tif (debug) System.out.println(\"can't get closer, erasing past locations\");\n\t\t\tpastLocations.clear();\n\t\t}\n\t\t\n\t\t//have we arrived close enough?\n\t\tif(unit.location().mapLocation().distanceSquaredTo(targetLocation)<=howCloseToDestination){\n\t\t\t//atTargetLocation=true;\n\t\t\t\n\t\t\t//if order was a MOVE order, it is complete, go ahead and pop it off the stack\n\t\t\tif(orderStack.peek().getType().equals(OrderType.MOVE)){\n\t\t\t\torderStack.pop();\n\t\t\t}\n\t\t\tif (debug) System.out.println(\"Unit \"+unit.id()+\" arrived at destination.\");\n\t\t}\n\t\t\n\t\t;\n\t}", "private static List<Point> possibleNextPos(Point currPos, Point coord1, Point coord2, double buildingSideGrad, Point buildingCentre){\r\n\t\tvar coord1Lat = coord1.latitude();\r\n\t\tvar coord1Lon = coord1.longitude();\r\n\t\tvar coord2Lat = coord2.latitude();\r\n\t\tvar coord2Lon = coord2.longitude();\r\n\t\t\r\n\t\tvar currPosLon = currPos.longitude();\r\n\t\tvar currPosLat = currPos.latitude();\r\n\t\t\r\n\t\tvar buildingLon = buildingCentre.longitude();\r\n\t\tvar buildingLat = buildingCentre.latitude();\r\n\t\t\r\n\t\tvar dir1 = computeDir(coord1, coord2); //in the case that the drone is moving in the direction coord1 to coord2\r\n\t\tvar nextPosTemp1 = nextPos(dir1, currPos); //the temporary next position if the drone moves in dir1\r\n\t\t\r\n\t\tvar dir2 = computeDir(coord2, coord1); //in the case that the drone is moving in the direction coord2 to coord1\r\n\t\tvar nextPosTemp2 = nextPos(dir2, currPos); //the temporary next position if the drone moves in dir2 \r\n\t\t\r\n\t\tvar possibleNextPos = new ArrayList<Point>();\r\n\t\t\r\n\t\tif(Math.abs(buildingSideGrad)>=1) { //in this case, longitudes of building centre and drone current position are compared\r\n\t\t\t//coord1 to coord2 scenario\r\n\t\t\tif((coord1Lat>coord2Lat && buildingLon<currPosLon) || (coord1Lat<coord2Lat && buildingLon>currPosLon)) {\r\n\t\t\t\tdir1 = (dir1+10)%360; //angle increased such that drone doesn't fly over side of building\r\n\t\t\t\tnextPosTemp1 = nextPos(dir1, currPos);\r\n\t\t\t}\r\n\t\t\t//coord2 to coord1 scenario\r\n\t\t\tif((coord1Lat<coord2Lat && buildingLon<currPosLon) || (coord1Lat>coord2Lat && buildingLon>currPosLon)) {\r\n\t\t\t\tdir2 = (dir2+10)%360;\r\n\t\t\t\tnextPosTemp2 = nextPos(dir2, currPos);\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\telse { //in this case, latitudes of building centre and drone current position are compared\r\n\t\t\tif((coord1Lon>coord2Lon && buildingLat>currPosLat) || (coord1Lon<coord2Lon && buildingLat<currPosLat)) {\r\n\t\t\t\tdir1 = (dir1+10)%360; \r\n\t\t\t\tnextPosTemp1 = nextPos(dir1, currPos);\r\n\t\t\t}\r\n\r\n\t\t\tif((coord1Lon<coord2Lon && buildingLat>currPosLat) || (coord1Lon>coord2Lon && buildingLat<currPosLat)) {\r\n\t\t\t\tdir2 = (dir2+10)%360;\r\n\t\t\t\tnextPosTemp2 = nextPos(dir2, currPos);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tpossibleNextPos.add(nextPosTemp1);\r\n\t\tpossibleNextPos.add(nextPosTemp2);\r\n\t\t\r\n\t\treturn possibleNextPos;\r\n\t}", "public Point getFurthermost(){\n\t\t\tdouble distance;\n\t\t\tdouble distanceMin = Double.MAX_VALUE;\n\t\t\tPoint centroid = centroid();\n\t\t\tPoint closest = new Point();\n\t\t\tfor(Point p : clusterPointsList){\n\t\t\t\tdistance = p.dist(centroid);\t\t\t\n\t\t\t\tif(distance < distanceMin){\n\t\t\t\t\tdistanceMin = distance;\n\t\t\t\t\tclosest = p;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn closest;\n\t\t}", "IntPair findSafety(IntPair position, IntPair pacman)\n {\n // TODO: Implement function\n return null;\n }", "private GeoPoint getClosestPoint(List<GeoPoint> points, Ray ray) {\r\n\t\tGeoPoint close = points.get(0);\r\n\t\tdouble dist;\r\n\t\tfor (GeoPoint p : points) {\r\n\t\t\tdist = ray.get_p0().distance(p.point);\r\n\t\t\tif (dist < ray.get_p0().distance(close.point))\r\n\t\t\t\tclose = p;\r\n\t\t}\r\n\t\treturn close;\r\n\t}", "private Set<Cell> findShortestRoad(Set<Cell> b, Land land) {\n\t\tfor (Cell cell : b) {\n\t\t\tif (isNextToRoad(cell.i, cell.j, land))\n\t\t\t\treturn new HashSet<Cell>();\n\t\t}\n\t\t\n\t\tSet<Cell> output = new HashSet<Cell>();\n\t\tboolean[][] checked = new boolean[land.side][land.side];\n\t\tQueue<Cell> queue = new LinkedList<Cell>();\n\t\t// add border cells that don't have a road currently\n\t\t// dummy cell to serve as road connector to perimeter cells\n\t\tCell source = new Cell(Integer.MAX_VALUE, Integer.MAX_VALUE);\n\t\tfor (int z = 0; z < land.side; z++) {\n\t\t\tif (b.contains(new Cell(0, z)) || b.contains(new Cell(z, 0)) || b.contains(new Cell(land.side - 1, z))\n\t\t\t\t\t|| b.contains(new Cell(z, land.side - 1)))\n\t\t\t\treturn output;\n\t\t\tif (land.unoccupied(0, z))\n\t\t\t\tqueue.add(new Cell(0, z, source));\n\t\t\tif (land.unoccupied(z, 0))\n\t\t\t\tqueue.add(new Cell(z, 0, source));\n\t\t\tif (land.unoccupied(z, land.side - 1))\n\t\t\t\tqueue.add(new Cell(z, land.side - 1, source));\n\t\t\tif (land.unoccupied(land.side - 1, z))\n\t\t\t\tqueue.add(new Cell(land.side - 1, z, source));\n\t\t}\n\t\t// add cells adjacent to current road cells\n\t\tfor (Cell p : road_cells) {\n\t\t\tfor (Cell q : p.neighbors()) {\n\t\t\t\tif (!road_cells.contains(q) && land.unoccupied(q) && !b.contains(q))\n\t\t\t\t\tqueue.add(new Cell(q.i, q.j, p)); // use tail field of cell\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to keep track of\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// previous road cell\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// during the search\n\t\t\t}\n\t\t}\n\t\twhile (!queue.isEmpty()) {\n\t\t\tCell p = queue.remove();\n\t\t\tchecked[p.i][p.j] = true;\n\t\t\tfor (Cell x : p.neighbors()) {\n\t\t\t\tif (b.contains(x)) { // trace back through search tree to find\n\t\t\t\t\t\t\t\t\t\t// path\n\t\t\t\t\tCell tail = p;\n\t\t\t\t\twhile (!b.contains(tail) && !road_cells.contains(tail) && !tail.equals(source)) {\n\t\t\t\t\t\toutput.add(new Cell(tail.i, tail.j));\n\t\t\t\t\t\ttail = tail.previous;\n\t\t\t\t\t}\n\t\t\t\t\tif (!output.isEmpty())\n\t\t\t\t\t\treturn output;\n\t\t\t\t} else if (!checked[x.i][x.j] && land.unoccupied(x.i, x.j)) {\n\t\t\t\t\tx.previous = p;\n\t\t\t\t\tqueue.add(x);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tif (output.isEmpty() && queue.isEmpty())\n\t\t\treturn null;\n\t\telse\n\t\t\treturn output;\n\t}", "private Point findTrailingPt() {\n\t\tPoint farthestPt = new Point(getDisplayXs()[0], getDisplayYs()[0]);\n\t\tfor (int i = 0; i < getDisplayXs().length; i++) {\n\t\t\tPoint nextPt = new Point(getDisplayXs()[i], getDisplayYs()[i]);\n\t\t\tPoint centerOfMass = Controller.flowArrow.findCenterOfMass();\n\t\t\tif (farthestPt.distance(centerOfMass) < nextPt.distance(centerOfMass)) {\n\t\t\t\tfarthestPt = nextPt; // update fartestPt\n\t\t\t}\n\t\t}\n\t\treturn farthestPt;\n\t}", "public MilitaryAirport getClosestMilitaryAirport(Localizable localizable) {\n Collection<Localizable> collection = new ArrayList<Localizable>();\n collection.addAll(mMilitaryAirports);\n return (MilitaryAirport) localizable.getLocation().closest(collection);\n }", "private Point findLeadingPt() {\n\t\tPoint2D.Double pt1 = new Point2D.Double(xs[0], ys[0]);\n\t\tPoint2D.Double pt2 = new Point2D.Double(xs[1], ys[1]);\n\t\tPoint2D.Double pt3 = new Point2D.Double(xs[2], ys[2]);\n\n\t\tPoint leadingPt = new Point((int) pt2.getX(), (int) pt2.getY());\n\t\tdouble smallestRadius = this.findRadiusFromChordAndPt(pt1, pt3, pt2);\n\n\t\tfor (int i = 2; i < xs.length - 1; i++) {\n\t\t\tPoint2D.Double ptA = new Point2D.Double(xs[i - 1], ys[i - 1]);\n\t\t\tPoint2D.Double ptC = new Point2D.Double(xs[i], ys[i]);\n\t\t\tPoint2D.Double ptB = new Point2D.Double(xs[i + 1], ys[i + 1]);\n\t\t\tif (smallestRadius > this.findRadiusFromChordAndPt(ptA, ptB, ptC)) {\n\t\t\t\tsmallestRadius = this.findRadiusFromChordAndPt(ptA, ptB, ptC);\n\t\t\t\tleadingPt = new Point((int) ptC.getX(), (int) ptC.getY());\n\t\t\t}\n\t\t}\n\t\t/*\n\t\t * double yArrow = Controller.flowArrow.findCenterOfMass().getY(); for (int i =\n\t\t * 0; i < xs.length; i++) { if (ys[i] == yArrow) { leadingPt = new Point((int)\n\t\t * xs[i], (int) ys[i]); } }\n\t\t */\n\t\treturn leadingPt;\n\t}", "private Constants.MOVE runAway(Game game) {\n if (pacmanInfo.getLastIndex() >= 0) {\n return game.getApproximateNextMoveAwayFromTarget(this.getOwnNodeIndex(game), pacmanInfo.getLastIndex(),\n game.getGhostLastMoveMade(ghost), Constants.DM.PATH);\n }\n //move towards the lair if not already there\n if (game.getDistance(this.getOwnNodeIndex(game), game.getCurrentMaze().lairNodeIndex, Constants.DM.PATH) > 10) {\n return game.getApproximateNextMoveAwayFromTarget(this.getOwnNodeIndex(game), game.getCurrentMaze().lairNodeIndex,\n game.getGhostLastMoveMade(ghost), Constants.DM.PATH);\n }\n return Constants.MOVE.NEUTRAL;\n }", "public void findNearestDriver() {\n\t\tint currentDistance, driverX, driverY, pickupX, pickupY;\n\t\tpickupX = (int)this.currentRide.getPickup().getX();\n\t\tpickupY = (int)this.currentRide.getPickup().getY();\n\t\tfor(int i = 0; i < drivers.size(); i++) {\n\t\t\tdriverX = (int)this.drivers.get(i).getLocation().getX();\n\t\t\tdriverY = (int)this.drivers.get(i).getLocation().getY();\n\t\t\tcurrentDistance = (int) Math.sqrt(Math.pow((driverX - pickupX), 2) + Math.pow((driverY - pickupY),2));\n\t\t\tthis.drivers.get(i).setDistanceFromPassenger(currentDistance);\n\t\t}\n\t\tCollections.sort(this.drivers);\n\t\tif(this.drivers.get(0).getDistanceFromPassenger() == this.drivers.get(1).getDistanceFromPassenger()){\n\t\t\tif(drivers.get(0).getRating() < drivers.get(1).getRating()) {\n\t\t\t\tdrivers.set(0, drivers.get(1));\n\t\t\t}\n\t\t}\t\t\n\t}", "private GeoPoint getClosestPoint(List<GeoPoint> points) {\r\n\t\tGeoPoint closestPoint = null;\r\n\t\tdouble distance = Double.MAX_VALUE;\r\n\r\n\t\tPoint3D P0 = _scene.get_camera().get_p0();\r\n\r\n\t\tfor (GeoPoint i : points) {\r\n\t\t\tdouble tempDistance = i.point.distance(P0);\r\n\t\t\tif (tempDistance < distance) {\r\n\t\t\t\tclosestPoint = i;\r\n\t\t\t\tdistance = tempDistance;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn closestPoint;\r\n\r\n\t}", "public static Path findShortestPath(Unit unit, int x, int y, GameMap map, boolean theoretical)\n {\n if( null == unit || null == map || !map.isLocationValid(unit.x, unit.y) )\n {\n return null;\n }\n\n Path aPath = new Path(100);\n if( !map.isLocationValid(x, y) )\n {\n // Unit is not in a valid place. No path can be found.\n System.out.println(\"WARNING! Cannot find path for a unit that is not on the map.\");\n aPath.clear();\n return aPath;\n }\n\n int[][] costGrid = new int[map.mapWidth][map.mapHeight];\n for( int i = 0; i < map.mapWidth; i++ )\n {\n for( int j = 0; j < map.mapHeight; j++ )\n {\n costGrid[i][j] = Integer.MAX_VALUE;\n }\n }\n\n // Set up search parameters.\n SearchNode root = new SearchNode(unit.x, unit.y);\n costGrid[unit.x][unit.y] = 0;\n Queue<SearchNode> searchQueue = new java.util.PriorityQueue<SearchNode>(13, new SearchNodeComparator(costGrid, x, y));\n searchQueue.add(root);\n\n ArrayList<SearchNode> waypointList = new ArrayList<SearchNode>();\n\n // Find optimal route.\n while (!searchQueue.isEmpty())\n {\n // Retrieve the next search node.\n SearchNode currentNode = searchQueue.poll();\n\n // If this node is our destination, we are done.\n if( currentNode.x == x && currentNode.y == y )\n {\n // Add all of the points on the route to our waypoint list.\n while (currentNode.parent != null)\n {\n waypointList.add(currentNode);\n currentNode = currentNode.parent;\n }\n // Don't forget the starting node (no parent).\n waypointList.add(currentNode);\n break;\n }\n\n expandSearchNode(unit, map, currentNode, searchQueue, costGrid, theoretical);\n\n currentNode = null;\n }\n\n // Clear and Populate the Path object.\n aPath.clear();\n // We added the waypoints to the list from end to beginning, so populate the Path in reverse order.\n if( !waypointList.isEmpty() )\n {\n for( int j = waypointList.size() - 1; j >= 0; --j )\n {\n //System.out.println(\"Waypoint \" + waypointList.get(j).x + \", \" + waypointList.get(j).y + \" over \" + map.getEnvironment(waypointList.get(j).x, waypointList.get(j).y).terrainType);\n aPath.addWaypoint(waypointList.get(j).x, waypointList.get(j).y);\n }\n }\n\n return aPath;\n }", "private void findBestPath(int start){\n\t\tint n = this.getDimension(); // for readability\n\t\tint lastCity, minDist = 0, moment = 0;\n\t\t\n\t\tthis.path = new int[this.getDimension() + 1];\n\t\tthis.visited = 0; \n\t\t\n\t\tsetAllUnvisited();\n\t\t\n\t\tvisitCity(moment, start); // visits the first city in time 0\n\t\tlastCity = start;\n//\t\tSystem.out.println(Arrays.toString(this.path) + \" > \" + this.visited);\n\t\t// Repeats until all cities were visited\n\t\twhile(visited < n){\n//\t\t\tSystem.out.println(\"LC:\" + lastCity + \" MD:\" + minDist + \" M:\" + moment);\n\t\t\tmoment++;\n\t\t\t\n\t\t\t// Finds the closest city\n\t\t\tint closest = -1, closestDist = -1;\n\t\t\tfor(int i = 0; i < n; i++){\n\t\t\t\tif(!wasVisited(i)){\n\t\t\t\t\tif(dist(lastCity, i) < closestDist || closestDist == -1){ // If it's the first iteration or found a closer city\n\t\t\t\t\t\tclosest = i;\n\t\t\t\t\t\tclosestDist = dist(lastCity, closest);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Updates distance\n\t\t\tminDist += dist(lastCity, closest);\n\t\t\t\n\t\t\t// Visits the closest city\n\t\t\tvisitCity(moment, closest);\n\t\t\tlastCity = closest;\n//\t\t\tSystem.out.println(Arrays.toString(this.path) + \" > \" + minDist);\n\t\t\t\n\t\t}\n\t\t\n\t\t// Returns to the first city\n\t\tvisitCity(moment + 1, start);\n\t\tminDist += dist(lastCity, start);\n\t\t\n\t\tif(minDist < this.totalDistance || this.totalDistance == -1){\n\t\t\tthis.totalDistance = minDist;\n\t\t\tthis.bestPath = this.path.clone();\n\t\t}\n//\t\tSystem.out.println(Arrays.toString(this.path) + \" -----> \" + minDist);\n\t}", "public DiscreteCoordinates coordinatesDependingOnStatus(boolean scared, boolean foundPacman, DiscreteCoordinates cible)\n {\n DiscreteCoordinates coor;\n int compteur = 0;\n boolean isSup;\n boolean isWall;\n boolean pathNull;\n\n do {\n pathNull = false;\n isSup = false;\n coor = this.randomDiscretCoordinates();\n\n //1)\n if(scared && foundPacman && compteur<MAX_RANDOM_ATTEMPT)\n {\n isSup = MIN_AFRAID_DISTANCE > DiscreteCoordinates.distanceBetween(coor, cible);\n compteur++;\n }\n\n //2)\n isWall = ((SuperPacmanArea) getOwnerArea()).isWall(coor);\n\n setNewValueForTargetPos(coor);\n\n //3)\n if(((SuperPacmanArea) getOwnerArea()).getPath(getCurrentMainCellCoordinates(),getTargetPos())==null)\n {\n pathNull=true;\n }\n\n }while( isSup || isWall || pathNull );\n\n return coor;\n }", "public Position findWeedPosition() {\n int x = 0;\n int y = 0;\n int sum = 0;\n for (int i = 0; i < this.WORLD.getMapSize().getX(); i++) {\n for (int j = 0; j < this.WORLD.getMapSize().getY(); j++) {\n\n //hogweed\n Organism organism = this.WORLD.getOrganism(i, j);\n if(organism!=null){\n Class c = organism.getClass();\n if (c.getSimpleName().equals(\"Parnsip\")) {\n int tmpX = Math.abs(this.position.getX() - i);\n int tmpY = Math.abs(this.position.getY() - j);\n if (!(sum==0)) {\n int tmpSum = tmpX + tmpY;\n if (sum > tmpSum) {\n x = i;\n y = j;\n sum = tmpSum;\n }\n }\n else {\n x = i;\n y = j;\n sum = tmpX + tmpY;\n\n }\n }\n }\n\n }\n }\n return new Position(x,y);\n }", "void connect() {\n\t\tint[] supposed_pit_num = new int[d];\n\t\tthis.stay = 0;\n\t\tint target_pit_id = 0;\n\t\tthis.connected = true;\n\t\tboolean[] moved = new boolean[d];\n\t\twhile(target_pit_id < this.d - this.couples_found){\n\t\t\t//find the closest dancer along the line to target pit id;\n\t\t\tint dancer_id = -1;\n\t\t\tint min_pit = d;\n\t\t\tfor(int j = 0; j < d; j++){\n\t\t\t\tif(dancers[j].soulmate != -1 || moved[j]) continue;\n\t\t\t\tif(dancers[j].pit_id < min_pit){\n\t\t\t\t\tmin_pit = dancers[j].pit_id;\n\t\t\t\t\tdancer_id = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmoved[dancer_id] = true;\n\t\t\t\n\t\t\tPit curr_pit = pits[dancers[dancer_id].pit_id];\n\t\t\tPit pointer = curr_pit;\n\t\t\tPit prev = null;\n\t\t\tPoint curr_pos = this.last_positions[dancer_id];\n\t\t\tboolean stop = false;\n\t\t\twhile(!stop){\n\t\t\t\tprev = pointer;\n\t\t\t\tif(pointer.pit_id < target_pit_id){\n\t\t\t\t\tpointer = getNext(pointer);\n\t\t\t\t}\n\t\t\t\telse if(pointer.pit_id > target_pit_id){\n\t\t\t\t\tpointer = getPrev(pointer);\n\t\t\t\t}\n\t\t\t\tstop = distance(pointer.pos,curr_pos) > 2 || pointer.pit_id == target_pit_id || findDancer(pointer.pit_id) != -1;\n\t\t\t}\n\t\t\tif(distance(pointer.pos,curr_pos) > 2 || findDancer(pointer.pit_id) != -1){\n\t\t\t\tpointer = prev;\n\t\t\t}\n\t\t\tdancers[dancer_id].pit_id = pointer.pit_id;\n\t\t\tdancers[dancer_id].next_pos = pointer.pos;\n\t\t\tthis.connected = this.connected && pointer.pit_id == target_pit_id;\n\t\t\tsupposed_pit_num[dancer_id] = pointer.pit_id;\n\t\t\ttarget_pit_id++;\n\t\t}\n\n\t\tboolean swap_and_dance = true;\n\t\t\n\t\t//after arranged pits, see if it is possible to swap all the dancers in this round\n\t\tif(this.connected){\n\t\t\tPoint[] next_pos = new Point[d];\n\t\t\tint[] next_pit_id = new int[d];\n\t\t\tfor (int i = 0; i < d; i++) {\n\t\t\t\tif(dancers[i].soulmate != -1) continue;\n\t\t\t\tint curr_pit = dancers[i].pit_id;\n\t\t\t\tint next_pit = getNextPit(curr_pit);\n\t\t\t\tif(next_pit != -1){\n\t\t\t\t\tnext_pos[i] = findNearestActualPoint(pits[next_pit].pos, pits[curr_pit].pos);\n\t\t\t\t\tnext_pit_id[i] = next_pit;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tnext_pos[i] = dancers[i].next_pos;\n\t\t\t\t\tnext_pit_id[i] = dancers[i].pit_id;\n\t\t\t\t}\n\t\t\t\tswap_and_dance = swap_and_dance && distance(next_pos[i],this.last_positions[i]) < 2;\n\t\t\t}\n\t\t\tif(swap_and_dance){\n\t\t\t\tfor(int i = 0; i < d; i++){\n\t\t\t\t\tif(dancers[i].soulmate != -1) continue;\n\t\t\t\t\tdancers[i].next_pos = next_pos[i];\n\t\t\t\t\tdancers[i].pit_id = next_pit_id[i];\n\t\t\t\t}\n\t\t\t\tthis.state = 3 - this.state;\n\t\t\t\tthis.stay = 0;\n\t\t\t}\n\t\t}\n\t}", "public TargetPointReport getTargetPoint(Translation robot) {\n TargetPointReport rv = new TargetPointReport();\n PathSegment currentSegment = segments.get(0);\n rv.closest_point = currentSegment.getClosestPoint(robot);\n rv.closest_point_distance = new Translation(robot, rv.closest_point).norm();\n rv.remaining_segment_distance = currentSegment.getRemainingDistance(rv.closest_point);\n rv.remaining_path_distance = rv.remaining_segment_distance;\n for (int i = 1; i < segments.size(); ++i) {\n rv.remaining_path_distance += segments.get(i).getLength();\n }\n rv.closest_point_speed = currentSegment\n .getSpeedByDistance(currentSegment.getLength() - rv.remaining_segment_distance);\n double lookahead_distance = getLookaheadForSpeed(rv.closest_point_speed) + rv.closest_point_distance;\n if (rv.remaining_segment_distance < lookahead_distance && segments.size() > 1) {\n lookahead_distance -= rv.remaining_segment_distance;\n for (int i = 1; i < segments.size(); ++i) {\n currentSegment = segments.get(i);\n final double length = currentSegment.getLength();\n if (length < lookahead_distance && i < segments.size() - 1) {\n lookahead_distance -= length;\n } else {\n break;\n }\n }\n } else {\n lookahead_distance += (currentSegment.getLength() - rv.remaining_segment_distance);\n }\n rv.max_speed = currentSegment.getMaxSpeed();\n rv.lookahead_point = currentSegment.getPointByDistance(lookahead_distance);\n rv.lookahead_point_speed = currentSegment.getSpeedByDistance(lookahead_distance);\n checkSegmentDone(rv.closest_point);\n return rv;\n }", "public Vector end(double sweepline)\n\t{\n\t\tVector[] intersections = Utils.parabolaIntersection(siteA, siteB, sweepline);\n\n\t\tif (intersections.length == 0)\n\t\t\treturn ray.origin;\n\n\t\tif (intersections.length == 1)\n\t\t\treturn intersections[0];\n\n\t\tdouble do0 = Vector.distance(ray.origin, intersections[0]);\n\t\tdouble do1 = Vector.distance(ray.origin, intersections[1]);\n\n\t\tVector closest = do0 < do1 ? intersections[0] : intersections[1];\n\n\t\t// Determine which intersection the boundary ray intersects\n\t\tdouble dd0 = Vector.distance(ray.direction, intersections[0].sub(ray.origin).normalize());\n\t\tdouble dd1 = Vector.distance(ray.direction, intersections[1].sub(ray.origin).normalize());\n\n\t\tif (dd0 < dd1)\n\t\t{\n\t\t\tif (dd0 < Math.min(do0, do1))\n\t\t\t\tclosest = intersections[0];\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (dd1 < Math.min(do0, do1))\n\t\t\t\tclosest = intersections[1];\n\t\t}\n\n\t\treturn closest;\n\t}", "private int heuristic(int x, int y, MapLocation goal) {\n return Math.max(Math.abs(x - goal.x), Math.abs(y - goal.y));\n }", "public Trip nearestNeighbor(int start){\n int nnPosition = 0;\n int prevLocationIndex = start;\n Trip trip = new Trip(locations.size() + 1);\n\n trip.addLoc(locations.get(start));\n locations.get(start).setVisited(true);\n\n for(int i = 0; i < locations.size() -1; ++i){\n nnPosition = findNN(prevLocationIndex);\n trip.addLoc(locations.get(nnPosition));\n locations.get(nnPosition).setVisited(true);\n\n prevLocationIndex = nnPosition;\n }\n\n trip.addLoc(locations.get(start));\n\n for(int i = 0; i < locations.size(); ++i){\n locations.get(i).setVisited(false);\n }\n\n return trip;\n }", "private Location[] overrunsTop () {\n Location nextLocation;\n Location nextCenter;\n \n // exact calculation for exact 90 degree heading directions (don't want trig functions\n // handling this)\n if (getHeading() == THREE_QUARTER_TURN_DEGREES) {\n nextLocation = new Location(getX(), 0);\n nextCenter = new Location(getX(), myCanvasBounds.getHeight());\n return new Location[] { nextLocation, nextCenter };\n }\n \n double angle = FULL_TURN_DEGREES - getHeading();\n if (getHeading() < THREE_QUARTER_TURN_DEGREES) {\n angle = -(getHeading() - HALF_TURN_DEGREES);\n }\n angle = Math.toRadians(angle);\n nextLocation = new Location(getX() + getY() / Math.tan(angle), 0);\n nextCenter = new Location(getX() + getY() / Math.tan(angle),\n myCanvasBounds.getHeight());\n \n // eliminates race condition - if next location overruns left/right AND top/bottom it checks\n // to see which is overrun first and corrects\n if (nextLocation.getX() > myCanvasBounds.getWidth())\n // right\n return overrunRight();\n else if (nextLocation.getX() < 0) // left\n return overrunLeft();\n \n return new Location[] { nextLocation, nextCenter };\n }", "protected Lane chooseLane() {\r\n ArrayList<Lane> potentialLanes = new ArrayList<>(lanes.size());\r\n for (Lane l : lanes) {\r\n if (l.getVehicles().isEmpty()) {\r\n potentialLanes.add(l);\r\n continue;\r\n }\r\n Vehicle firstVehicle = l.getVehicles().get(0);\r\n Segment vehicleSegment = firstVehicle.getHeadSegment();\r\n Segment firstSegment = l.getFirstSegment();\r\n \r\n // written by Jonathan Pike (mats@staite.net)\r\n int allVehicleMaxDeceleration = Math.min(Car.MAX_DECELERATION_RATE, Truck.MAX_DECELERATION_RATE);\r\n int stoppingTimeDistance = (int) (((double) firstVehicle.getSpeed()) / allVehicleMaxDeceleration);\r\n int distance = vehicleSegment.id() - firstVehicle.getLength() - firstSegment.id() - 1;\r\n int crashTimeDistance = (int) ((distance * 100.0) / firstVehicle.getSpeed());\r\n if (crashTimeDistance > stoppingTimeDistance) {\r\n potentialLanes.add(l);\r\n }\r\n \r\n /* Daniel's version. does not depend on initial speed of vehicle in lane, so is buggy in certain cases\r\n if (firstSegment.id() < vehicleSegment.id() - firstVehicle.getLength() - 5) {\r\n potentialLanes.add(l);\r\n }*/\r\n }\r\n\r\n if (potentialLanes.isEmpty()) { // if no lanes could be found, return null, as there are no lanes suitable\r\n return null;\r\n } else { // else pick one at random.\r\n return potentialLanes.get(random.nextInt(potentialLanes.size()));\r\n }\r\n }", "private GeoPoint findClosestIntersection(Ray ray)\r\n\t{\r\n\r\n\t\tif (ray == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tList<GeoPoint> intersections = scene.geometries.findGeoIntersections(ray);\r\n\t\treturn ray.findClosestGeoPoint(intersections);\r\n\t}", "private static MapLocation getBestPastrLocNearMeBasedOnCowGrowthRate() {\n\t\tif (Clock.getRoundNum() < 1) {\n\t\t\tallCowGrowths = rc.senseCowGrowth();\t\t\t\n\t\t}\n\t\tMapLocation bestLocation = new MapLocation(curLoc.x, curLoc.y);\n\t\tdouble cowGrowthAmount = 0;\n\t\tMapLocation enemyHQLocation = rc.senseEnemyHQLocation();\n\t\tdouble distanceToEnemyHQ = curLoc.distanceSquaredTo(enemyHQLocation);\n\t\tfor (int i = 15; i-- > 0;) {\n\t\t\tfor (int j = 15; j-- > 0;) {\n\t\t\t\t// Check that it's in bounds\n\t\t\t\tif (curLoc.x - i + 8 >= 0 && curLoc.x - i + 8 < rc.getMapWidth() &&\n\t\t\t\t\tcurLoc.y - j + 8 >= 0 && curLoc.y - j + 8 < rc.getMapHeight()) {\n\t\t\t\t\tMapLocation mapLoc = new MapLocation(curLoc.x - i + 8, curLoc.y - j + 8);\n\t\t\t\t\tdouble currentLocGrowth = allCowGrowths[curLoc.x - i + 8][curLoc.y - j + 8];\n\n\t\t\t\t\t// Check that it's behind a perpendicular line and not void\n\t\t\t\t\t// and choose the best point.\n\t\t\t\t\tif (mapLoc.distanceSquaredTo(enemyHQLocation) < distanceToEnemyHQ &&\n\t\t\t\t\t\tcurrentLocGrowth > cowGrowthAmount && rc.senseTerrainTile(mapLoc) != TerrainTile.VOID) {\n\t\t\t\t\t\tcowGrowthAmount = currentLocGrowth;\n\t\t\t\t\t\tbestLocation = mapLoc;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn bestLocation;\n\t}", "public static IDirectPosition getClosestPointsInDirection(\n IDirectPosition point, IDirectPosition previousPoint,\n IDirectPosition nextPoint, IGeometry geom, boolean left) {\n\n double minDistance = Double.MAX_VALUE;\n IDirectPosition c0;\n IDirectPosition c2;\n\n if (previousPoint != null) {\n c0 = previousPoint;\n c2 = point;\n } else {\n c0 = point;\n c2 = nextPoint;\n }\n IDirectPosition toReturn = null;\n for (IDirectPosition p : geom.coord()) {\n double distance = point.distance2D(p);\n if (distance < minDistance) {\n // Calculation of the angle (c0, p, c2) in a radian value between -pi\n // and pi.\n\n // Calculation of the coordinate of c1-c0 vector\n double x10 = c0.getX() - p.getX();\n double y10 = c0.getY() - p.getY();\n\n // Calculation of the coordinate of c1-c0 vector\n double x12 = c2.getX() - p.getX();\n double y12 = c2.getY() - p.getY();\n\n double angle = Math.atan2(x10 * y12 - y10 * x12, x10 * x12 + y10 * y12);\n\n // angle = angle % (2 * Math.PI);\n if ((left && (angle >= 0)) || (!left && (angle <= 0))) {\n minDistance = distance;\n toReturn = p;\n }\n\n }\n }\n\n return toReturn;\n\n }", "synchronized public Route getRouteLaPlusProcheDuPoint(final int x,final int y){\n\t\t//int i=0;\n\t\tfloat min=9999999.0f, calc = 999999.0f;\n\t\tRoute tmp = null;\n\t\tfor(Route v : routes){\n\t\t\tif(v != null){\n\t\t\t\tcalc = v.distance(x, y);\n\t\t\t\tif(calc < min && calc < 30.0f){\n\t\t\t\t\tmin = calc;\n\t\t\t\t\t//i+=1;\n\t\t\t\t\ttmp=v;\n\t\t\t\t\t//System.out.println(\"Routes cliquer: \"+v.getNomVille1()+\" \"+v.getNomVille2()+\" i\"+i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn tmp;\n\t\t//return routes.get(i);\n\t\t/*\n\t\tif(i<0)\n\t\t\treturn null;\n\t\t\n\t\tif(routes.get(i) instanceof RouteDouble)\n\t\t\treturn new RouteDouble((RouteDouble)(routes.get(i)));\n\t\treturn new Route(routes.get(i));\n\t\t//*/\n\t}", "@Nullable\n private static RoutePoint findClosestRoutePoint(BingItineraryItem currentItem, List<RoutePoint> routePoints) {\n\n double pointLat = currentItem.getManeuverPoint().getCoordinates()[0];\n double pointLng = currentItem.getManeuverPoint().getCoordinates()[1];\n\n GeoPoint point = new GeoPoint(pointLat, pointLng);\n\n RoutePoint closestPoint = null;\n double closestDist = Double.MAX_VALUE;\n\n for (RoutePoint rp : routePoints) {\n double currentDist = point.sphericalDistance(rp.getGeoPoint());\n\n if (currentDist < closestDist) {\n if (rp.getStreetName().isEmpty() && rp.getInstruction().isEmpty()) {\n closestDist = currentDist;\n closestPoint = rp;\n }\n }\n }\n return closestPoint;\n }", "private myPoint getNextRoute(){\n\t\ttry {\n\t\t\treturn this.Route.take();\n\t\t} catch (InterruptedException e) {\n\t\t\treturn null;\n\t\t}\n\t}", "protected Direction selectMove() {\n Map<Integer, Direction> positive, negative;\n // Add the directions that contains negative stations in a negative set\n // And every other direction in a positive set\n positive = new HashMap<Integer,Direction>(16);\n negative = new HashMap<Integer,Direction>(16);\n for (Direction d : Direction.directions) {\n int result = checkMove(d);\n if (result == 1) {\n positive.put(positive.size(), d);\n } else if (result == 0) {\n negative.put(negative.size(), d);\n } else {\n continue;\n }\n }\n // If there is no positive move, choose a RANDOM negative move\n if (positive.isEmpty()) {\n return negative.get(rand.nextInt(negative.size()));\n } else { // Otherwise choose a RANDOM positive move\n return positive.get(rand.nextInt(positive.size()));\n }\n }", "private Point getMoveDestination(Building b)\n\t{\n\t\tObjectType buildType = b.getObjectType();\n\t\tPoint workPoint = b.getPosition();\n\t\tfor (int i = workPoint.getX(); i < workPoint.getX()\n\t\t\t\t+ getMyPlayer().getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(buildType) - 1; i++)\n\t\t{\n\t\t\tPoint p1 = new Point(i, workPoint.getY() - 1);\n\t\t\tif (p1.getY() < getMyPlayer().getMyMap().getMapBlocks()[0].length\n\t\t\t\t\t&& (getMyPlayer().getMyMap().getMapBlocks()[i][p1.getY()]\n\t\t\t\t\t\t\t.isWalkableByWorker() || (!getMyPlayer()\n\t\t\t\t\t\t\t.getMapVisiblity()[i][p1.getY()])))\n\t\t\t\treturn p1;\n\t\t\tPoint p2 = new Point(i, workPoint.getY()\n\t\t\t\t\t+ getMyPlayer().getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t\t.get(buildType));\n\t\t\tif ((p2.getY() < getMyPlayer().getMyMap().getMapBlocks()[0].length)\n\t\t\t\t\t&& (getMyPlayer().getMyMap().getMapBlocks()[i][p2.getY()]\n\t\t\t\t\t\t\t.isWalkableByWorker() || (!getMyPlayer()\n\t\t\t\t\t\t\t.getMapVisiblity()[i][p2.getY()])))\n\t\t\t\treturn p2;\n\n\t\t}\n\t\tfor (int j = workPoint.getY(); j < workPoint.getY()\n\t\t\t\t+ getMyPlayer().getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(buildType); j++)\n\t\t{\n\t\t\tPoint p1 = new Point(workPoint.getX() - 1, j);\n\t\t\tif (p1.getX() < getMyPlayer().getMyMap().getMapBlocks().length\n\t\t\t\t\t&& (getMyPlayer().getMyMap().getMapBlocks()[p1.getX()][j]\n\t\t\t\t\t\t\t.isWalkableByWorker() || (!getMyPlayer()\n\t\t\t\t\t\t\t.getMapVisiblity()[p1.getX()][j])))\n\t\t\t\treturn p1;\n\t\t\tPoint p2 = new Point(workPoint.getX()\n\t\t\t\t\t+ getMyPlayer().getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t\t.get(buildType), j);\n\t\t\tif (p2.getX() < getMyPlayer().getMyMap().getMapBlocks().length\n\t\t\t\t\t&& (getMyPlayer().getMyMap().getMapBlocks()[p2.getX()][j]\n\t\t\t\t\t\t\t.isWalkableByWorker() || (!getMyPlayer()\n\t\t\t\t\t\t\t.getMapVisiblity()[p2.getX()][j])))\n\t\t\t\treturn p2;\n\n\t\t}\n\t\treturn null;\n\t}", "int gas_station() {\n int sol = 0; // numar minim de opriri\n int fuel = m; // fuel este cantitatea curenta de combustibil din rezervor (a.k.a cat a ramas)\n\n for (int i = 1; i <= n; ++i) {\n fuel -= (dist[i] - dist[i - 1]); // ma deplasez de la locatia anterioara la cea curenta\n // intotdeauna cand ajung intr-o benzinarie ma asigur am suficient\n // combustibil sa ajung la urmatoarea - initial pot sa ajung de la A la dist[1]\n\n // daca nu am ajuns in ultima benziarie\n // verifica daca trebuie sa reincarc (rezervor gol sau cantitate insuficienta pentru a ajunge la benzinaria urmatoare)\n if (i < n && (fuel == 0 || dist[i+1] - dist[i] > fuel)) {\n ++sol;\n fuel = m;\n }\n }\n\n return sol;\n }", "public Direction getAIDirection (Tile[][] map) {\n\n // Determine valid directions\n ArrayList<Direction> validDirections = new ArrayList<>();\n for (Direction direction : Direction.cardinals) {\n Coordinates targetCoordinates = Utility.locateDirection(this.getPosition(), direction);\n Tile targetTile = map[targetCoordinates.getY()][targetCoordinates.getX()];\n if (targetTile.getTerrain().equals(Terrain.EMPTY)) validDirections.add(direction);\n }\n\n // Seek random direction if backtrack is not the only viable option\n if (validDirections.size() > 1) {\n while (true) {\n Direction direction = validDirections.get(new Random().nextInt(validDirections.size()));\n Coordinates targetCoordinates = Utility.locateDirection(this.getPosition(), direction);\n Tile targetTile = map[targetCoordinates.getY()][targetCoordinates.getX()];\n\n boolean isBackTrack = false;\n if (\n targetTile.getPosition().getX() == previousLocation.getX()\n && targetTile.getPosition().getY() == previousLocation.getY()\n ) isBackTrack = true;\n\n if (targetTile.getTerrain().equals(Terrain.EMPTY) && !isBackTrack) return direction;\n }\n }\n else return validDirections.get(0);\n }", "private double closestDistanceFromPointToEndlessLine(Vector point, Vector startSegment, Vector endSegment) {\n\t\t// Generate a line out of two points.\n\t\tRay3D gerade = geradeAusPunkten(startSegment, endSegment);\n\t\tVector direction = gerade.getDirection();\n\t\tdouble directionNorm = direction.getNorm();\n\t\t// d(PunktA, (line[B, directionU]) = (B-A) cross directionU durch norm u\n\t\tVector b = gerade.getPoint();\n\t\tVector ba = b.subtract(point);\n\t\tdouble factor = 1.0 / directionNorm; // Geteilt durch geraden länge\n\t\tVector distance = ba.cross(direction).multiply(factor);\n\t\tdouble distanceToGerade = distance.getNorm();\n\t\treturn distanceToGerade;\n\t}", "public boolean getNearestTownforTheFirstTime() {\n\t\tint eigenePositionX = stadtposition.x;\r\n\t\tint eigenePositionY = stadtposition.y;\r\n\t\tint anderePositionX, anderePositionY;\r\n\t\tint deltaX, deltaY;\r\n\t\tint distance;\r\n\t\tint distancesum;\r\n\t\tint mindistance = 1200;\r\n\t\tint minIndex = 0;\r\n\r\n\t\tfor (int i = 0; i < otherTowns.size(); i++) {\r\n\t\t\tanderePositionX = otherTowns.get(i).stadtposition.x;\r\n\t\t\tanderePositionY = otherTowns.get(i).stadtposition.y;\r\n\t\t\tdeltaX = eigenePositionX - anderePositionX;\r\n\t\t\tdeltaY = eigenePositionY - anderePositionY;\r\n\t\t\tdistancesum = deltaX * deltaX + deltaY * deltaY;\r\n\t\t\tdistance = (int) Math.sqrt(distancesum);\r\n\r\n\t\t\tif (distance == 0) {\r\n\t\t\t\tdistance = 1500;\r\n\t\t\t}\r\n\r\n\t\t\tif (distance < mindistance) {\r\n\t\t\t\t// System.out.println(distance+\" von minindex i \"+i+\"ist kleiner\");\r\n\t\t\t\tminIndex = i;\r\n\t\t\t\tmindistance = distance;\r\n\t\t\t\tif (mindistance < 33) {\r\n\t\t\t\t\tmindistance = 1200;\r\n\t\t\t\t\ti = 0;\r\n\t\t\t\t\tstadtposition.x = (int) (Math.random() * 1000);\r\n\t\t\t\t\tstadtposition.y = (int) ((Math.random() * 680) + 100);\r\n\r\n//\t\t\t\t\tSystem.out.println(\"stadt ist zu nahe, ändere stadtposition\");\r\n\t\t\t\t\treturn false;\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n//\t\tSystem.out.println(\"minIndex: \" + minIndex + \" ist mit mindistance \" + mindistance + \" am nahsten\");\r\n\t\tnahsteStadt = otherTowns.get(minIndex);\r\n\t\treturn true;\r\n\r\n\t}", "Point2D getNextMove(Point2D target, boolean pursuit, Set<Point2D> map);", "private GeoPoint findClosestIntersection(Ray ray) {\r\n\t\tList<GeoPoint> temp = _scene.get_geometries().findIntersections(ray);\r\n\t\tif (temp == null)\r\n\t\t\treturn null;\r\n\t\treturn getClosestPoint(temp, ray);\r\n\t}", "public Vector2 returnToNearestStockpile(Resource resource){\n\t\tif(myTownHall == null)\n\t\t\treturn new Vector2(0,0);\n\t\treturn myTownHall.getCenter();\n\t}", "public Rectangle getNextWaypoint(Vector2 start, Vector2 destinatin, Vector2 offset) {\r\n if(this.grid.contains(start, offset)) {\r\n if(this.grid.contains(destinatin, offset)) {\r\n // Get Start Rectangle with scene offset\r\n Rectangle current = this.grid.getRectAtPosition(start,offset);\r\n Rectangle destination = grid.getRectAtPosition(destinatin, offset);\r\n Rectangle nextRect = null;\r\n int nextDist = 0;\r\n for(Rectangle refRect : this.grid.getRectangles()) {\r\n if(!refRect.isSame(current)) {\r\n int startX = current.getX();\r\n int startY = current.getY();\r\n int refX = refRect.getX() + offset.getX();\r\n int refY = refRect.getY() + offset.getY();\r\n int xA = (refX - startX) / 48;\r\n int yA = (refY - startY) / 48;\r\n\r\n if(xA <= 1 && xA >= -1 && yA <= 1 && yA >= -1) {\r\n int x = Math.abs((destination.getX() - refX) / 48);\r\n int y = Math.abs((destination.getY() - refY) / 48);\r\n int dist = x + y;\r\n\r\n if(nextRect == null) {\r\n nextDist = dist;\r\n nextRect = new Rectangle(refX, refY, refRect.getWidth(), refRect.getHeight());\r\n }\r\n else {\r\n if(dist < nextDist) {\r\n nextDist = nextDist;\r\n nextRect = new Rectangle(refX, refY, refRect.getWidth(), refRect.getHeight());\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if(nextRect!= null) {\r\n return nextRect;\r\n }\r\n }\r\n }\r\n return null;\r\n }", "public OtherAgent nearestAgent(RedAgent agent, Function<OtherAgent, Boolean> test)\n\t{\n\t\t// get a list of OtherAgents satisfying the test\n\t\tList<OtherAgent> ags = new ArrayList<OtherAgent>();\n\t\tfor (OtherAgent ag : agent.agents.values())\n\t\t{\n\t\t\tif (ag.position != null && test.apply(ag))\n\t\t\t{\n\t\t\t\tags.add(ag);\n\t\t\t}\n\t\t}\n\n\t\tif (ags.isEmpty()) return null;\n\n\t\t// get the shortest path to one of those agents\n\t\tLinkedList<String> path = shortestPath(agent.position, (id) -> {\n\t\t\tfor (OtherAgent ag : ags) if (ag.position.equals(id)) return true;\n\t\t\treturn false;\n\t\t});\n\n\t\tif (path == null) return null;\n\n\t\t// (arbitrarily) pick one agent that that path leads to\n\t\tfor (OtherAgent ag : ags)\n\t\t{\n\t\t\tif (path.isEmpty())\n\t\t\t{\n\t\t\t\tif (ag.position.equals(agent.position)) return ag;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (ag.position.equals(path.get(path.size() - 1))) return ag;\n\t\t\t}\n\t\t}\n\n\t\t// XXX shouldn't get here\n\t\tthrow new RuntimeException(\"failed to find nearest agent\");\n\t}", "public int shortestPath(Village startVillage, Village targetVillage) {\n// setting the initial point 's minimum distance to zera\n startVillage.setMinDistance(0);\n// accourting to bellman ford if there are n number of dots then n-1 iterations to be done to find the minimum distances of every dot from one initial dot\n int length = this.villageList.size();\n// looping n-1 times\n for (int i = 0; i < length - 1; i++) {\n// looping through all the roads and mark the minimum distances of all the possible points\n for (Road road : roadList) {\n\n\n// if the road is a main road then skip the path\n if (road.getWeight() == 900)\n continue; //why 900 ? : just a random hightest number as a minimum distance and same 900 is used as a mix number\n Village v = road.getStartVertex();\n Village u = road.getTargetVertex();\n// if the newly went path is less than the path it used to be the update the min distance of the reached vertex\n int newLengtha = v.getMinDistance() + road.getWeight();\n if (newLengtha < u.getMinDistance()) {\n u.setMinDistance(newLengtha);\n u.setPreviousVertex(v);\n }\n int newLengthb = u.getMinDistance() + road.getWeight();\n if (newLengthb < v.getMinDistance()) {\n v.setMinDistance(newLengthb);\n v.setPreviousVertex(v);\n }\n }\n }\n// finally return the minimum distance\n return targetVillage.getMinDistance();\n }", "private Point findFront(Point[] points) {\n\t\t// Loop through the passed points.\n\t\tdouble[] dists = new double[3];\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\t// Get outer-loop point.\n\t\t\tPoint a = points[i];\n\t\t\t\n\t\t\t// Loop through rest of points.\n\t\t\tfor (int k = 0; k < 3; k++) {\n\t\t\t\t// Continue if current outer.\n\t\t\t\tif (i == k) continue;\n\t\t\t\t\n\t\t\t\t// Get inner-loop point.\n\t\t\t\tPoint b = points[k];\n\t\t\t\t\n\t\t\t\t// Add distance between out and inner.\n\t\t\t\tdists[i] += Math.sqrt(\n\t\t\t\t\tMath.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Prepare index and largest holder.\n\t\tint index = 0;\n\t\tdouble largest = 0;\n\t\t\n\t\t// Loop through the found distances.\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\t// Skip if dist is lower than largest.\n\t\t\tif (dists[i] < largest) continue;\n\t\t\t\n\t\t\t// Save the index and largest value.\n\t\t\tindex = i;\n\t\t\tlargest = dists[i];\n\t\t}\n\t\t\n\t\t// Return the largest point index.\n\t\treturn points[index];\n\t}", "public Location computerMove()\n\t{\n\t\tArrayList<Location> possibleLocs = new ArrayList<Location>();\n\t\tfor (int row = 0; row < grid.length; row++)\n\t\t{\n\t\t\tfor (int col = 0; col < grid[0].length; col++)\n\t\t\t{\n\t\t\t\tLocation temp = new Location(row, col);\n\t\t\t\tif (!isOccupied(temp))\n\t\t\t\t\tpossibleLocs.add(temp);\n\t\t\t}\n\t\t}\n\t\tfor (int count = 0; count < possibleLocs.size(); count++)\n\t\t{\n\t\t\tif (checkWin(1, possibleLocs.get(count)))\n\t\t\t\treturn possibleLocs.get(count);\n\t\t\telse if (checkWin(0, possibleLocs.get(count)))\n\t\t\t\treturn possibleLocs.get(count);\n\t\t}\n\t\treturn possibleLocs.get((int) (Math.random() * possibleLocs.size()));\n\t}", "private void findBestPath(){\n\t\t// The method will try to find the best path for every starting point and will use the minimum\n\t\tfor(int start = 0; start < this.getDimension(); start++){\n\t\t\tfindBestPath(start);\t\n\t\t}\t\n\t}", "private static Pair closest_pair(ArrayList<Point> pointset){\n\t\treturn null;\n\t}", "Point2D getClosePt(Game game, Creature creat, int n){\n Point2D closePoint;\n double x = leader.getLocation().getX() + fRandom.nextDouble() * 8 * (creat.getSize() + leader.getSize());\n double y = leader.getLocation().getY() + fRandom.nextDouble() * 8 * (creat.getSize() + leader.getSize());\n closePoint = new Point2D.Double(x,y);\n // if x,y is not an acceptable point then try again\n if (n > 0){\n if ( ! (CollisionDetection.canOccupy(game, creat, closePoint)\n &&\n LineOfSight.exists(creat.getLocation(), closePoint, game.getMap())\n &&\n Reachable.dirtyReachable(game, creat.getShape(), closePoint, creat.getSize(), 0.5)\n ))\n {\n closePoint = getClosePt(game, creat, n-1);\n }\n }\n else { closePoint = null;}\n\n return closePoint;\n }", "@Override\n\tpublic Direction nextMove(State state)\n\t{\n\t\t\n\t\tthis.direction = Direction.STAY;\n\t\tthis.hero = state.hero();\n\t\tthis.position = new Point( this.hero.position.right, this.hero.position.left ); //x and y are reversed, really\n\t\t\n\t\tthis.pathMap = new PathMap( state, this.position.x, this.position.y );\n\n\t\t//find the richest hero\n\t\tHero richestHero = state.game.heroes.get(0);\n\t\tif( richestHero == this.hero ) { richestHero = state.game.heroes.get(1); } //just grab another hero if we are #0\n\t\t\n\t\tfor( Hero hero : state.game.heroes )\n\t\t{\n\t\t\tif( hero != this.hero && hero.gold > richestHero.gold )\n\t\t\t{\n\t\t\t\trichestHero = hero;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//get all interesting sites\n\t\tList<TileInfo> minesInRange = this.pathMap.getSitesInRange( TileType.FREE_MINE, 20 );\t//mines in vicinity\n\t\tList<TileInfo> takenMinesInRange = this.pathMap.getSitesInRange( TileType.TAKEN_MINE, (100-richestHero.life)/2 );\t//mines in vicinity\n\t\tList<TileInfo> pubsInRange = this.pathMap.getSitesInRange( TileType.TAVERN, (int)(Math.pow(100-this.hero.life,2)*state.game.board.size/5000) );\t\t//pubs in vicinity\n\t\t\n\t\t//first visit pubs (apparently we need it)\n\t\tif( pubsInRange.size() != 0 )\n\t\t{\n\t\t\tthis.direction = this.pathMap.getDirectionTo( pubsInRange.get(0) );\n\t\t}\n\t\t\n\t\t//then visit the mines\n\t\telse if( minesInRange.size() != 0 )\n\t\t{\n\t\t\tthis.direction = this.pathMap.getDirectionTo( minesInRange.get(0) );\n\t\t}\n\t\t\n\t\t//then visit taken mines\n\t\telse if( takenMinesInRange.size() != 0 )\n\t\t{\n\t\t\tthis.direction = this.pathMap.getDirectionTo( takenMinesInRange.get(0) );\n\t\t}\n\t\t\n\t\t//then hunt for players\n\t\telse\n\t\t{\n\t\t\t//kill the richest hero! (but first full health)\n\t\t\tif( this.hero.life > 85 )\n\t\t\t{\n\t\t\t\tthis.direction = this.pathMap.getDirectionTo( richestHero.position.right, richestHero.position.left );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//run away!!!\n\t\t\t\tthis.direction = intToDir( (int)(Math.random()*4) );\n\t\t\t}\n\t\t}\n\t\t\n\t\t//VisualPathMap.getInstance( pathMap );\n\t\t\n\t\treturn this.direction;\n\t}", "private void findPath()\n\t{\n\t\tpathfinding = true;\n\n\t\tmoves = Pathfinder.calcOneWayMove(city.getDrivingMap(), x, y, destX, destY);\n\t\tpathfinding = false;\n\t}", "public static Point searchNearestEgde(Rectangle bounds, Point first, Point next) {\n\n // One offset needed to avoid intersection with the wrong line.\n if (bounds.x + bounds.width <= first.x)\n first.x = bounds.x + bounds.width - 1;\n else if (bounds.x >= first.x) first.x = bounds.x + 1;\n\n if (bounds.y + bounds.height <= first.y)\n first.y = bounds.height + bounds.y - 1;\n else if (bounds.y >= first.y) first.y = bounds.y + 1;\n\n Line2D relationLine = new Line2D.Float(first.x, first.y, next.x, next.y);\n Line2D lineTop = new Line2D.Float(bounds.x, bounds.y, bounds.x\n + bounds.width, bounds.y);\n Line2D lineRight = new Line2D.Float(bounds.x + bounds.width, bounds.y,\n bounds.x + bounds.width, bounds.y + bounds.height);\n Line2D lineBottom = new Line2D.Float(bounds.x + bounds.width, bounds.y\n + bounds.height, bounds.x, bounds.y + bounds.height);\n Line2D lineLeft = new Line2D.Float(bounds.x, bounds.y + bounds.height,\n bounds.x, bounds.y);\n\n Point2D ptIntersectTop = ptIntersectsLines(relationLine, lineTop);\n Point2D ptIntersectRight = ptIntersectsLines(relationLine, lineRight);\n Point2D ptIntersectBottom = ptIntersectsLines(relationLine, lineBottom);\n Point2D ptIntersectLeft = ptIntersectsLines(relationLine, lineLeft);\n\n // line is to infinite, we must verify that the point find interst the\n // correct edge and the relation.\n int distTop = (int) lineTop.ptSegDist(ptIntersectTop)\n + (int) relationLine.ptSegDist(ptIntersectTop);\n int distRight = (int) lineRight.ptSegDist(ptIntersectRight)\n + (int) relationLine.ptSegDist(ptIntersectRight);\n int distBottom = (int) lineBottom.ptSegDist(ptIntersectBottom)\n + (int) relationLine.ptSegDist(ptIntersectBottom);\n int distLeft = (int) lineLeft.ptSegDist(ptIntersectLeft)\n + (int) relationLine.ptSegDist(ptIntersectLeft);\n\n if (ptIntersectTop != null && distTop == 0) {\n return new Point(RelationGrip.adjust((int) ptIntersectTop.getX()),\n (int) ptIntersectTop.getY());\n\n } else if (ptIntersectRight != null && distRight == 0) {\n return new Point((int) ptIntersectRight.getX(),\n RelationGrip.adjust((int) ptIntersectRight.getY()));\n\n } else if (ptIntersectBottom != null && distBottom == 0) {\n return new Point(RelationGrip.adjust((int) ptIntersectBottom.getX()),\n (int) ptIntersectBottom.getY());\n\n } else if (ptIntersectLeft != null && distLeft == 0) {\n return new Point((int) ptIntersectLeft.getX(),\n RelationGrip.adjust((int) ptIntersectLeft.getY()));\n\n } else {\n return null; // no point found!\n }\n }", "public CivilAirport getClosestCivilAirport(Localizable localizable) {\n Collection<Localizable> collection = new ArrayList<Localizable>();\n collection.addAll(mCivilAirports);\n return (CivilAirport) localizable.getLocation().closest(collection);\n }", "public Stack<Point> shortestPath() {\n\t\tresetVisited();\n\t\tStack <Point> shortestPath = new Stack<Point>();\n\t\tprev = new HashMap<Point,Point>();\n\t\tCompass[] direction = Compass.values();\n\t\tQueue <Point> path = new LinkedList<Point>();\n\t\tpath.add(playerStart);\n\t\twhile(!path.isEmpty()) {\n\t\t\tPoint current = path.poll();\n\t\t\tfor (Compass pointing: direction) {\n\t\t\t\tif (current.equals(goal)) {\n\t\t\t\t\tshortestPath.push(current);\n\t\t\t\t\twhile (prev.containsKey(shortestPath.peek()) && !shortestPath.peek().equals(playerStart)){\n\t\t\t\t\t\tshortestPath.push(prev.get(shortestPath.peek()));\n\t\t\t\t\t}\n\t\t\t\t\treturn shortestPath;\n\t\t\t\t}\n\t\t\t\tint nextW = (int)current.getX() + pointing.mapX;\n\t\t\t\tint nextH = (int)current.getY() + pointing.mapY;\n\t\t\t\tPoint nextPoint = new Point(nextW, nextH);\n\t\t\t\tif (arrayBounds(nextW, width) && arrayBounds (nextH, height) && maze[nextW][nextH] == 0 && !visited.contains(nextPoint)) {\n\t\t\t\t\tpath.add(nextPoint);\n\t\t\t\t\tvisited.add(nextPoint);\n\t\t\t\t\tprev.put(nextPoint, current);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn shortestPath;\t\t\n\t}", "private void dist2Pos3Beacons()\n {\n //Betrachtung bei 3 Empfaengern\n double dist12 = Math.sqrt(Math.pow(posReceiver[0][0] - posReceiver[1][0], 2) + Math.pow(posReceiver[0][1] - posReceiver[1][1], 2));\n double dist13 = Math.sqrt(Math.pow(posReceiver[0][0] - posReceiver[2][0], 2) + Math.pow(posReceiver[0][1] - posReceiver[2][1], 2));\n double dist23 = Math.sqrt(Math.pow(posReceiver[1][0] - posReceiver[2][0], 2) + Math.pow(posReceiver[1][1] - posReceiver[2][1], 2));\n\n boolean temp12 = Math.abs(radius[0] - radius[1]) > dist12;\n boolean temp23 = Math.abs(radius[1] - radius[2]) > dist23;\n boolean temp13 = Math.abs(radius[0] - radius[2]) > dist13;\n\n //Zwei Kreise innerhalb eines anderen Kreises\n if ((temp12 && temp23) || (temp12 && temp13) || (temp23 && temp13))\n {\n double f0 = (dist12 / radius[0] + dist13 / radius[0]) / 2;\n double f1 = (dist12 / radius[1] + dist23 / radius[1]) / 2;\n double f2 = (dist12 / radius[2] + dist13 / radius[2]) / 2;\n\n radius[0] = radius[0] * f0;\n radius[1] = radius[1] * f1;\n radius[2] = radius[2] * f2;\n }\n //Kreis 2 in Kreis 1\n if ((Math.abs(radius[0] - radius[1]) > dist12) && (radius[0] > radius[1]))\n {\n double[][] posRec = new double[][]{{posReceiver[0][0],posReceiver[0][1]},{posReceiver[1][0],posReceiver[1][1]},{posReceiver[2][0],posReceiver[2][1]}};\n double[] rad =new double[]{radius[0],radius[1],radius[2]};\n calcCircleInCircle(posRec, rad, dist13);\n }\n //Kreis 1 in Kreis 2\n else if ((Math.abs(radius[0] - radius[1]) > dist12) && (radius[1] > radius[0]))\n {\n double[][] posRec = new double[][]{{posReceiver[1][0],posReceiver[1][1]},{posReceiver[0][0],posReceiver[0][1]},{posReceiver[2][0],posReceiver[2][1]}};\n double[] rad =new double[]{radius[1],radius[0],radius[2]};\n calcCircleInCircle(posRec, rad, dist23);\n }\n //Kreis 3 in Kreis 1\n else if ((Math.abs(radius[0] - radius[2]) > dist13) && (radius[0] > radius[2]))//Kreis 3 in 1\n {\n double[][] posRec = new double[][]{{posReceiver[2][0],posReceiver[2][1]},{posReceiver[0][0],posReceiver[0][1]},{posReceiver[1][0],posReceiver[1][1]}};\n double[] rad =new double[]{radius[2],radius[0],radius[1]};\n calcCircleInCircle(posRec, rad, dist12);\n }\n //Kreis 1 in Kreis 3\n else if ((Math.abs(radius[0] - radius[2]) > dist13) && (radius[2] > radius[0]))//Kreis 1 in 3\n {\n double[][] posRec = new double[][]{{posReceiver[0][0],posReceiver[0][1]},{posReceiver[2][0],posReceiver[2][1]},{posReceiver[1][0],posReceiver[1][1]}};\n double[] rad =new double[]{radius[0],radius[2],radius[1]};\n calcCircleInCircle(posRec, rad, dist23);\n }\n //Kreis 3 in Kreis 2\n else if ((Math.abs(radius[1] - radius[2]) > dist23) && (radius[1] > radius[2]))//Kreis 3 in 2\n {\n double[][] posRec = new double[][]{{posReceiver[2][0],posReceiver[2][1]},{posReceiver[1][0],posReceiver[1][1]},{posReceiver[0][0],posReceiver[0][1]}};\n double[] rad =new double[]{radius[2],radius[1],radius[0]};\n calcCircleInCircle(posRec, rad, dist12);\n }\n //Kreis 2 in Kreis 3\n else if ((Math.abs(radius[1] - radius[2]) > dist23) && (radius[2] > radius[1]))//Kreis 2 ind 3\n {\n double[][] posRec = new double[][]{{posReceiver[1][0],posReceiver[1][1]},{posReceiver[2][0],posReceiver[2][1]},{posReceiver[0][0],posReceiver[0][1]}};\n double[] rad =new double[]{radius[1],radius[2],radius[0]};\n calcCircleInCircle(posRec, rad, dist13);\n }\n //Kein Kreis liegt innerhalb eines Anderen\n else\n {\n\n if ((dist12 > (radius[0] + radius[1])) && (dist13 > (radius[0] + radius[2])) && (dist23 > (radius[1] + radius[2])))\n {\n double p1[] = new double[2];\t//x\n double p2[] = new double[2];\t//y\n\n double norm12 = norm(posReceiver[0][0], posReceiver[0][1], posReceiver[1][0], posReceiver[1][1]);\n // Verbindungspunkte Kreis 1 und 2\n p1[0] = posReceiver[0][0] + (radius[0]/ norm12) * (posReceiver[1][0] - posReceiver[0][0]); //x-P1\n p1[1] = posReceiver[0][1] + (radius[0]/ norm12) * (posReceiver[1][1] - posReceiver[0][1]); //y-P1\n p2[0] = posReceiver[1][0] + (radius[1]/ norm12) * (posReceiver[0][0] - posReceiver[1][0]); //x-P2\n p2[1] = posReceiver[1][1] + (radius[1]/ norm12) * (posReceiver[0][1] - posReceiver[1][1]); //y-P2\n double m12[] = new double[2];\n m12[0] = p1[0] + 0.5 * (p2[0] - p1[0]);\t//x\n m12[1] = p1[1] + 0.5 * (p2[1] - p1[1]);\t//y\n\n\n double norm23 = norm(posReceiver[1][0], posReceiver[1][1], posReceiver[2][0], posReceiver[2][1]);\n // Verbindungspunkte Kreis 2 und 3\n p1[0] = posReceiver[1][0] + (radius[1]/ norm23) * (posReceiver[2][0] - posReceiver[1][0]); //x-P1\n p1[1] = posReceiver[1][1] + (radius[1]/ norm23) * (posReceiver[2][1] - posReceiver[1][1]); //y-P1\n p2[0] = posReceiver[2][0] + (radius[2]/ norm23) * (posReceiver[1][0] - posReceiver[2][0]); //x-P2\n p2[1] = posReceiver[2][1] + (radius[2]/ norm23) * (posReceiver[1][1] - posReceiver[2][1]); //y-P2\n double m23[] = new double[2];\n m23[0] = p1[0] + 0.5 * (p2[0] - p1[0]);\t//x\n m23[1] = p1[1] + 0.5 * (p2[1] - p1[1]);\t//y\n\n\n double norm31 = norm(posReceiver[2][0], posReceiver[2][1], posReceiver[0][0], posReceiver[0][1]);\n // Verbindungspunkte Kreis 3 und 1\n p1[0] = posReceiver[2][0] + (radius[2]/ norm31) * (posReceiver[0][0] - posReceiver[2][0]); //x-P1\n p1[1] = posReceiver[2][1] + (radius[2]/ norm31) * (posReceiver[0][1] - posReceiver[2][1]); //y-P1\n p2[0] = posReceiver[0][0] + (radius[0]/ norm31) * (posReceiver[2][0] - posReceiver[0][0]); //x-P2\n p2[1] = posReceiver[0][1] + (radius[0]/ norm31) * (posReceiver[2][1] - posReceiver[0][1]); //y-P2\n double m31[] = new double[2];\n m31[0] = p1[0] + 0.5 * (p2[0] - p1[0]);\t//x\n m31[1] = p1[1] + 0.5 * (p2[1] - p1[1]);\t//y\n\n\n // Norm der drei Punkte berechnen\n double a_p = Math.sqrt((m12[0] * m12[0]) + (m12[1] * m12[1]));\n double b_p = Math.sqrt((m23[0] * m23[0]) + (m23[1] * m23[1]));\n double c_p = Math.sqrt((m31[0] * m31[0]) + (m31[1] * m31[1]));\n\n double denominator = 2 * (((m12[0] * m23[1]) - (m12[1] * m23[0])) + (m23[0] * m31[1] - m23[1] * m31[0]) + (m31[0] * m12[1] - m31[1] * m12[0]));\n xPos_func = (1/ denominator)*(((b_p * b_p - c_p * c_p)*(-m12[1]) + (c_p * c_p - a_p * a_p)* (-m23[1]) + (a_p * a_p - b_p * b_p)*(-m31[1])));\n yPos_func = (1/ denominator)*(((b_p * b_p - c_p * c_p)*m12[0] + (c_p * c_p - a_p * a_p)* m23[0] + (a_p * a_p - b_p * b_p)*m31[0]));\n errRad_func = norm(xPos_func, yPos_func, m12[0], m12[1]);\n\n }\n // Kreis 1 und 3 schneiden sich\n else if ((dist12 > (radius[0] + radius[1])) && (dist23 > (radius[1] + radius[2])))\n {\n double[][] posRec = new double[][]{{posReceiver[0][0],posReceiver[0][1]},{posReceiver[2][0],posReceiver[2][1]},{posReceiver[1][0],posReceiver[1][1]}};\n double[] rad = new double[]{radius[0],radius[2],radius[1]};\n calc2Circle(posRec,rad);\n }\n //Kreis 2 und 3 schneide sich\n else if ((dist12 > (radius[0] + radius[1])) && (dist13 > (radius[0] + radius[2])))\n {\n double[][] posRec = new double[][]{{posReceiver[1][0],posReceiver[1][1]},{posReceiver[2][0],posReceiver[2][1]},{posReceiver[0][0],posReceiver[0][1]}};\n double[] rad = new double[]{radius[1],radius[2],radius[0]};\n calc2Circle(posRec,rad);\n }\n //Kreis 1 und 2 schneiden sich\n else if ((dist13 > (radius[0] + radius[2])) && (dist23 > (radius[1] + radius[2])))\n {\n double[][] posRec = new double[][]{{posReceiver[0][0],posReceiver[0][1]},{posReceiver[1][0],posReceiver[1][1]},{posReceiver[2][0],posReceiver[2][1]}};\n double[] rad = new double[]{radius[0],radius[1],radius[2]};\n calc2Circle(posRec,rad);\n }\n else if ((dist12 > (radius[0] + radius[1])))\n {\n double[][] posRec = new double[][]{\n {posReceiver[0][0],posReceiver[0][1]},\n {posReceiver[1][0],posReceiver[1][1]},\n {posReceiver[2][0],posReceiver[2][1]}};\n double[] rad = new double[]{radius[0],radius[1],radius[2]};\n calc1Circle(posRec,rad);\n }\n else if ((dist23 > (radius[1] + radius[2])))\n {\n double[][] posRec = new double[][]{\n {posReceiver[1][0],posReceiver[1][1]},\n {posReceiver[2][0],posReceiver[2][1]},\n {posReceiver[0][0],posReceiver[0][1]}};\n double[] rad = new double[]{radius[1],radius[2],radius[0]};\n calc1Circle(posRec,rad);\n }\n else if ((dist13 > (radius[0] + radius[2])))\n {\n double[][] posRec = new double[][]{\n {posReceiver[0][0],posReceiver[0][1]},\n {posReceiver[2][0],posReceiver[2][1]},\n {posReceiver[1][0],posReceiver[1][1]}};\n double[] rad = new double[]{radius[0],radius[2],radius[1]};\n calc1Circle(posRec,rad);\n }\n else\n {\n double x1 = 0, y1 = 0, x2 = 0, y2 = 0, x3 = 0, y3 = 0;\n //Kreisschnittpunkte\n //Kreisschnittpunkte\n //Kreisschnittpunkte\n double pos12[][] = circlepoints2(posReceiver[0][0], posReceiver[0][1], posReceiver[1][0], posReceiver[1][1], radius[0], radius[1]);\n double pos23[][] = circlepoints2(posReceiver[1][0], posReceiver[1][1], posReceiver[2][0], posReceiver[2][1], radius[1], radius[2]);\n double pos13[][] = circlepoints2(posReceiver[0][0], posReceiver[0][1], posReceiver[2][0], posReceiver[2][1], radius[0], radius[2]);\n\n if(radius[0] >= norm(pos23[0][0],pos23[0][1], posReceiver[0][0],posReceiver[0][1]))\n {\n x1 = pos23[0][0];\n y1 = pos23[0][1];\n }\n else if(radius[0] >= norm(pos23[1][0], pos23[1][1], posReceiver[0][0],posReceiver[0][1]))\n {\n x1 = pos23[1][0];\n y1 = pos23[1][1];\n }\n\n if(radius[1] >= norm(pos13[0][0], pos13[0][1], posReceiver[1][0],posReceiver[1][1]))\n {\n x2 = pos13[0][0];\n y2 = pos13[0][1];\n }\n else if(radius[1] >= norm(pos13[1][0], pos13[1][1], posReceiver[1][0],posReceiver[1][1]))\n {\n x2 = pos13[1][0];\n y2 = pos13[1][1];\n }\n\n if(radius[2] >= norm(pos12[0][0], pos12[0][1], posReceiver[2][0],posReceiver[2][1]))\n {\n x3 = pos12[0][0];\n y3 = pos12[0][1];\n }\n else if(radius[2] >= norm(pos12[1][0], pos12[1][1], posReceiver[2][0],posReceiver[2][1]))\n {\n x3 = pos12[1][0];\n y3 = pos12[1][1];\n }\n\n double tempD = x1 * y2 + x2 * y3 + x3 * y1 - x1 * y3 - x2 * y1 - x3 * y2;\n\n xPos_func = (0.5*(\n -y1*(y2*y2)\n +y1*(y3*y3)\n -y1*(x2*x2)\n +y1*(x3*x3)\n\n +y2*(y1*y1)\n -y2*(y3*y3)\n +y2*(x1*x1)\n -y2*(x3*x3)\n\n -y3*(y1*y1)\n +y3*(y2*y2)\n -y3*(x1*x1)\n +y3*(x2*x2)\n ))/ tempD;\n\n yPos_func = (0.5*(\n +x1*(x2*x2)\n -x1*(x3*x3)\n +x1*(y2*y2)\n -x1*(y3*y3)\n\n -x2*(x1*x1)\n +x2*(x3*x3)\n -x2*(y1*y1)\n +x2*(y3*y3)\n\n +x3*(x1*x1)\n -x3*(x2*x2)\n +x3*(y1*y1)\n -x3*(y2*y2)\n ))/ tempD;\n\n errRad_func = norm(x1, y1, xPos_func, yPos_func);\n }\n }\n }", "public String[] getNearestPlayer(Player p, PlayerData pd)\r\n/* 60: */ {\r\n/* 61:58 */ Game g = pd.getGame();\r\n/* 62: */ \r\n/* 63:60 */ int x = p.getLocation().getBlockX();\r\n/* 64:61 */ int y = p.getLocation().getBlockY();\r\n/* 65:62 */ int z = p.getLocation().getBlockZ();\r\n/* 66: */ \r\n/* 67:64 */ int i = 200000;\r\n/* 68: */ \r\n/* 69:66 */ Player player = null;\r\n/* 70:68 */ for (String s : g.getPlayers())\r\n/* 71: */ {\r\n/* 72:70 */ Player p2 = Bukkit.getPlayer(s);\r\n/* 73:72 */ if ((p2 != null) && (!p2.equals(p)) && (!pd.isOnTeam(s)))\r\n/* 74: */ {\r\n/* 75:74 */ Location l = p2.getLocation();\r\n/* 76: */ \r\n/* 77:76 */ int c = cal((int)(x - l.getX())) + cal((int)(y - l.getY())) + cal((int)(z - l.getZ()));\r\n/* 78:78 */ if (i > c)\r\n/* 79: */ {\r\n/* 80:79 */ player = p2;\r\n/* 81:80 */ i = c;\r\n/* 82: */ }\r\n/* 83: */ }\r\n/* 84: */ }\r\n/* 85:84 */ if (player != null) {\r\n/* 86:84 */ p.setCompassTarget(player.getLocation());\r\n/* 87: */ }\r\n/* 88:86 */ return new String[] { player == null ? \"none\" : player.getName(), String.valueOf(i) };\r\n/* 89: */ }", "void getPosRelPoint(double px, double py, double pz, DVector3 result);", "public Area findBestNext(boolean type) {\n\t\tArea next = null;\n\t\tif (type) { // then current\n\t\t\tfor (Edge e : this.getPoly().getEdges()) {\n\t\t\t\tif (intersects(this.currents, e)) {\n\t\t\t\t\tif (this.getPoly() == e.getLeftSite().getPoly()) {\n\t\t\t\t\t\tnext = e.getRightSite().getPoly().getArea();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnext = e.getLeftSite().getPoly().getArea();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor (Edge e : this.getPoly().getEdges()) {\n\t\t\t\tif (intersects(this.winds, e)) {\n\t\t\t\t\tif (this.getPoly() == e.getLeftSite().getPoly()) {\n\t\t\t\t\t\treturn e.getRightSite().getPoly().getArea();\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn e.getLeftSite().getPoly().getArea();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (next == null) {\n\t\t\treturn null;\n\t\t}\n\t\tif (next.isOcean()) {\n\t\t\treturn next;\n\t\t}\n\t\tfor (Area a : this.getAdjacencies()) {\n\t\t\tif (a.isOcean()) {\n\t\t\t\treturn a;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\n\t}", "public LinkedList<Pair<DirType, Location>> getMove(int curX, int curY) {\n // find the shortest path to each coin from this current position (we don't actually care about\n // coins that we don't have a path to)\n // then, find the shortest path from each of those coins to each other coin\n\n // then, we want all Hamiltonian paths (and all subpaths?) Traveling Salesman Problem\n // i.e. we care about paths for as long as the number of steps it takes to complete\n // is less than or equal to the number of turns we have remaining\n\n // convert the Location[][] we have into David and Austin's LocationsToNode\n LocationsToNode graph = new LocationsToNode(maze);\n // knownCoins are ONLY the coins we have paths to. we will calculate the\n // shortest paths later. there are repeat calculations below.\n LinkedList<Node> coins = bfsFindCoins(graph, curX, curY);\n for (Node coinFrom : coins) {\n Location coinFromLoc = graph.getLocation(coinFrom);\n LinkedList<LinkedList<Location>> pathsToOthers = new LinkedList<LinkedList<Location>>();\n for (Node coinTo : coins) {\n Location coinToLoc = graph.getLocation(coinTo);\n LinkedList<Location> path = getShortestPath(coinFrom, coinTo, graph);\n pathsToOthers.add(path);\n }\n paths.put(coinFromLoc,pathsToOthers);\n }\n\n // calculating all possible Hamiltonian paths....\n // this is A LOT of paths we're talking about\n // i.e. we want every path that visits every single coin\n // so if we know 20 coins, starting at point 1, we have 19 choices\n // for the second point, 18 for the third, and so on (this is on the order of\n // n! total paths without dynamic programming, and might be too much brute force)\n // https://en.wikipedia.org/wiki/Hamiltonian_path#Properties\n // https://en.wikipedia.org/wiki/Travelling_salesman_problem#Heuristic_and_approximation_algorithms\n // https://stackoverflow.com/questions/16555978/example-of-a-factorial-time-algorithm-o-n\n // then, we will decide which Hamiltonian is the best for the number of\n // moves we have available to us\n\n // instead, i am going to try only calculating the paths we can actually make with our current number\n // of turns because we want the most coins in the fewest turns\n\n // WE ONLY CARE ABOUT THE LONGEST (COIN) PATH WITH THE SAME NUMBER OF TURNS\n\n return new LinkedList<Pair<DirType, Location>>();\n }", "long closest(double lon, double lat) {\n double closet = Double.MAX_VALUE;\n long vertex = 0;\n\n for (Long v : vertices()) {\n double nodeLon = getNode(v).Lon;\n double nodeLat = getNode(v).Lat;\n double lonDist = nodeLon - lon;\n double latDist = nodeLat - lat;\n double dist = Math.sqrt(lonDist * lonDist + latDist * latDist);\n if (dist < closet) {\n vertex = v;\n closet = dist;\n }\n }\n return vertex;\n }", "public Point2d getNearestPointOnLine(final Point2d p){\n\n Vector2d orth = MathUtil.getOrthogonalDirection(direction);\n Line other = new Line (p, orth);\n\n Point2d cut = this.cut(other);\n\n if( cut == null){\n System.out.println(\"Line.getNearestPointOnLine failed!!\");\n System.out.println(\"big fail: line is\" + this.point + \"lambda*\" + this.direction + \"; point is: \"+p);\n }\n\n return cut;\n }", "public static void checkPlayerLongestRoad(Player player, Game game1, Road road1) {\n\n\t\t//the unique id for each node visit that takes place\n\t\tid = 0;\n\t\tloop = false;\n\n\t\tBoard board1 = game1.getBoard();\n\t\t\n\t\tint currLongest = player.getLongestRoad(); //old longest road\n\t\tint longest = 0; //longest road found from this point\n\n\t\t//this is one end of the road\n\t\tIntersection intA = (Intersection) game1.getBoard()\n\t\t\t\t.getLocationFromCoordinate(road1.getCoordinateA())\n\t\t\t\t.getContains();\n\t\t\n\t\t//this is the other\n\t\tIntersection intB = (Intersection) game1.getBoard()\n\t\t\t\t.getLocationFromCoordinate(road1.getCoordinateB())\n\t\t\t\t.getContains();\n\n\t\tRoad end1A = null;\n\t\tRoad end1B = null;\n\t\tRoad end2A = null;\n\t\tRoad end2B = null;\n\t\t\n\t\t// this sets end1A to be the first new road coming out of intA that is not the road placed (i.e. that does not go to intB)\n\t\tend1A = getRoadFromInt(game1, intA, player, intB, null);\n\t\t\n\t\t// if there was such a road, this looks for another road, to see if there are two roads coming out of that same end\n\t\tif (end1A != null) {\n\t\t\tend1B = getRoadFromInt(game1, intA, player, intB, getOtherInt(board1, end1A, intA));\n\t\t}\n\t\t\n\t\t//this sets end2a to be the first new road coming out of the other end (intB) that doesnt go to intA\n\t\tend2A = getRoadFromInt(game1, intB, player, intA, null);\n\t\t\n\t\t// if there was such a road, this looks for another road, to see if there are two roads coming out of that same end\n\t\tif (end2A != null) {\n\t\t\tend2B = getRoadFromInt(game1, intB, player, intA, getOtherInt(board1, end2A, intB));\n\t\t}\n\n\t\t// connecting, i.e. if this road links to other roads together\n\t\tif ((end1A != null || end1B != null) && (end2A != null || end2B != null)) {\n\t\t\t\n\t\t\tid = 0;\n\t\t\t\n\t\t\t//this maps a point to a sector for the purpose of finding overlap\n\t\t\tHashMap<Intersection, String> sectorMap = new HashMap<Intersection, String>();\n\t\t\t\t\t\n\t\t\t//END 1\n\t\t\tint longests1 = 0;\n\t\t\t\n\t\t\tHashMap<Intersection, Integer> distancesMaps1 = new HashMap<Intersection, Integer>();\n\t\t\tHashMap<Intersection, ArrayList<Integer>> visitorsMaps1 = new HashMap<Intersection, ArrayList<Integer>>();\n\t\t\tArrayList<Integer> namesLists1 = new ArrayList<Integer>();\n\t\t\t\n\t\t\tnamesLists1.add(new Integer(0));\n\t\t\tnamesLists1.add(new Integer(-1));\n\t\t\t\n\t\t\tArrayList<Integer> idArray1s1 = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> idArray2s1 = new ArrayList<Integer>();\n\t\t\t\n\t\t\tidArray1s1.add(new Integer(id));\n\t\t\tidArray2s1.add(new Integer(id - 1));\n\t\t\tvisitorsMaps1.put(intB, idArray1s1);\n\n\t\t\tlongests1 = Branch(game1, player, intA, intB, road1,\n\t\t\t\t\t(ArrayList<Integer>) namesLists1.clone(), 1,\n\t\t\t\t\tdistancesMaps1, visitorsMaps1, \"s1\", sectorMap);\n\t\t\t\t\t\t\n\t\t\t// END2\n\t\t\tint longests2 = 0;\n\t\t\t\n\t\t\tHashMap<Intersection, Integer> distancesMaps2 = new HashMap<Intersection, Integer>();\n\t\t\tHashMap<Intersection, ArrayList<Integer>> visitorsMaps2 = new HashMap<Intersection, ArrayList<Integer>>();\n\t\t\tArrayList<Integer> namesLists2 = new ArrayList<Integer>();\n\t\t\t\n\t\t\tnamesLists2.add(new Integer(id));\n\t\t\tnamesLists2.add(new Integer(id-1));\n\n\t\t\tArrayList<Integer> idArray1s2 = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> idArray2s2 = new ArrayList<Integer>();\n\t\t\t\n\t\t\tidArray1s2.add(new Integer(id));\n\t\t\tidArray2s2.add(new Integer(id-1 ));\n\t\t\tvisitorsMaps2.put(intA, idArray1s2);\n\t\t\t\n\t\t\tlongests2 = Branch(game1, player, intB, intA, road1,\n\t\t\t\t\t(ArrayList<Integer>) namesLists2.clone(), 1,\n\t\t\t\t\tdistancesMaps2, visitorsMaps2, \"s2\", sectorMap);\n\n\t\t\t//deciding on what to return\n\t\t\tif (loop) {\n\t\t\t\t\n\t\t\t\tif (longests2 > longests1) {\n\t\t\t\t\tlongest = longests2;\n\t\t\t\t} \n\t\t\t\telse {\n\t\t\t\t\tlongest = longests1;\n\t\t\t\t}\n\t\t\t} \n\t\t\telse {\n\t\t\t\tlongest = -1 + longests1 + longests2;\n\t\t\t}\n\n\t\t} \n\t\t\n\t\t//this is what happens if only one end connected to anything, this works!\n\t\telse {\n\t\t\t\n\t\t\t// setup\n\t\t\tid = 0;\n\t\t\t\n\t\t\t//this hashmap will record the distances to various points, using points as keys, longest distances as values, will update with longer distances\n\t\t\tHashMap<Intersection, Integer> distancesMap = new HashMap<Intersection, Integer>();\n\t\t\t\n\t\t\t//this hashmap will map points to an arraylist of ints\n\t\t\tHashMap<Intersection, ArrayList<Integer>> visitorsMap = new HashMap<Intersection, ArrayList<Integer>>();\n\t\t\t\n\t\t\t//this arraylist will be cloned to represent all the things that have been visited by a route, all routes have visited 0 and -1 (the two start intersections)\n\t\t\tArrayList<Integer> namesList = new ArrayList<Integer>();\n\t\t\t\n\t\t\tnamesList.add(new Integer(0));\n\t\t\tnamesList.add(new Integer(-1));\n\t\t\t\n\t\t\t// end 1 is not empty, end 2 is this means we will be branching intA\n\t\t\tif ((end1A != null || end1B != null)) {\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t// this adds the ids of the starting points to the visitorsmap hashmap\n\t\t\t\t//each node gets its own arraylist, which is why we get two, of course \n\t\t\t\t//these array lists should not really be added to\n\t\t\t\tArrayList<Integer> idArray1 = new ArrayList<Integer>();\n\t\t\t\tArrayList<Integer> idArray2 = new ArrayList<Integer>();\n\t\t\t\t\n\t\t\t\tidArray1.add(new Integer(id));\n\t\t\t\tidArray2.add(new Integer(id - 1));\n\t\t\t\tvisitorsMap.put(intB, idArray1);\n\t\t\t\tvisitorsMap.put(intA, idArray2);\n\t\t\t\t\n\t\t\t\t//the starting length of the branch coming out of end1A, this includes the original road\n\t\t\t\tint toplen = 1;\n\t\t\t\t\n\t\t\t\t//the starting length of the branch coming out of end1B\n\t\t\t\tint botLen = 1;\n\t\t\t\t\n\t\t\t\t// looking at the first branch possibility\n\t\t\t\tif (end1A != null) {\n\t\t\t\t\t\n\t\t\t\t\t//branch using the road end1A fro intA to the intersection\n\t\t\t\t\t//that road end1A leads to, and moving the length to two \n\t\t\t\t\ttoplen = Branch(game1, player, getOtherInt(board1, end1A, intA), intA, end1A,\n\t\t\t\t\t\t\t(ArrayList<Integer>) namesList.clone(), toplen + 1,\n\t\t\t\t\t\t\tdistancesMap, visitorsMap, null, null);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// looking at the other branch possibility\n\t\t\t\tif (end1B != null) {\n\t\t\t\t\t\n\t\t\t\t\ttoplen = Branch(game1, player, getOtherInt(board1, end1B, intA), intA, end1B,\n\t\t\t\t\t\t\t(ArrayList<Integer>) namesList.clone(), botLen + 1,\n\t\t\t\t\t\t\tdistancesMap, visitorsMap, null, null);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// getting which one of those is better!\n\t\t\t\tif (toplen > botLen) {\n\t\t\t\t\tlongest = toplen;\n\t\t\t\t} \n\t\t\t\telse {\n\t\t\t\t\tlongest = botLen;\n\t\t\t\t}\n\t\t\t} \n\t\t\t\n\t\t\t//end 2 is empty\n\t\t\telse {\n\t\t\t\t\n\t\t\t\tid = 0;\n\t\t\t\t\n\t\t\t\t// putting the ids in a map, getting them the right way\n\t\t\t\t// around(pointless?)\n\t\t\t\tArrayList<Integer> idArray1 = new ArrayList<Integer>();\n\t\t\t\tArrayList<Integer> idArray2 = new ArrayList<Integer>();\n\t\t\t\t\n\t\t\t\tidArray1.add(new Integer(id));\n\t\t\t\tidArray2.add(new Integer(id - 1));\n\t\t\t\tvisitorsMap.put(intA, idArray1);\n\t\t\t\tvisitorsMap.put(intB, idArray2);\n\t\t\t\t\n\t\t\t\t// length of each branch+initial road\n\t\t\t\tint toplen = 1;\n\t\t\t\tint botLen = 1;\n\t\t\t\t\n\t\t\t\t// looking at the first branch possibility road end2A from intersection intB to a new int\n\t\t\t\tif (end2A != null) {\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"A\");\n\t\t\t\t\ttoplen = Branch(game1, player, getOtherInt(board1, end2A, intB), intB, end2A,\n\t\t\t\t\t\t\t(ArrayList<Integer>) namesList.clone(), toplen + 1,\n\t\t\t\t\t\t\tdistancesMap, visitorsMap, null, null);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// looking at the other branch possibility\n\t\t\t\tif (end2B != null) {\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"B\");\n\t\t\t\t\tbotLen = Branch(game1, player, getOtherInt(board1, end2B, intB), intB, end2B,\n\t\t\t\t\t\t\t(ArrayList<Integer>) namesList.clone(), botLen + 1,\n\t\t\t\t\t\t\tdistancesMap, visitorsMap, null, null);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// getting which one of those is better!\n\t\t\t\tif (toplen > botLen) {\n\t\t\t\t\tlongest = toplen;\n\t\t\t\t} \n\t\t\t\telse {\n\t\t\t\t\tlongest = botLen;\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\tif (longest > currLongest) {\n\t\t\tplayer.setLongestRoad(longest);\n\t\t}\n\t\t\n\t\tloop = false;\n\t}", "public Point2D.Double getExitClosestPoint(Exit e, Point2D.Double p) {\n\t\tPoint2D.Double closestPoint;\n\n\t\tdouble delta_x = e.p2.x - e.p1.x;\n\t\tdouble delta_y = e.p2.y - e.p1.y;\n\n\t\tif ((delta_x == 0) && (delta_y == 0)) {\n\t\t\t// throw sth\n\t\t}\n\n\t\tdouble u = ((p.x - e.p1.x) * delta_x + (p.y - e.p1.y) * delta_y)\n\t\t\t\t/ (delta_x * delta_x + delta_y * delta_y);\n\n\t\tif (u < 0) {\n\t\t\tclosestPoint = new Point2D.Double(e.p1.x, e.p2.y);\n\t\t} else if (u > 1) {\n\t\t\tclosestPoint = new Point2D.Double(e.p2.x, e.p2.y);\n\t\t} else {\n\t\t\tclosestPoint = new Point2D.Double(\n\t\t\t\t\t(int) Math.round(e.p1.x + u * delta_x),\n\t\t\t\t\t(int) Math.round(e.p1.y + u * delta_y));\n\t\t}\n\n\t\treturn closestPoint;\n\t}", "private GeoPoint findClosestIntersection(Ray ray) {\n if (ray == null) {\n return null;\n }\n GeoPoint closestPoint = null;\n double closestDistance = Double.MAX_VALUE;\n Point3D ray_p0 = ray.getPo();\n\n List<GeoPoint> intersections = scene.getGeometries().findGeoIntersections(ray);\n if (intersections == null)\n return null;\n\n for (GeoPoint geoPoint : intersections) {\n double distance = ray_p0.distance(geoPoint.getPoint());\n if (distance < closestDistance) {\n closestPoint = geoPoint;\n closestDistance = distance;\n }\n }\n return closestPoint;\n }", "Pair<Vertex, Double> closestVertexToPath(Loc pos);", "private Stack<MapLocation> findPath(State.StateView state)\n {\n Unit.UnitView townhallUnit = state.getUnit(townhallID);\n Unit.UnitView footmanUnit = state.getUnit(footmanID);\n \n MapLocation startLoc = new MapLocation(footmanUnit.getXPosition(), footmanUnit.getYPosition(), null, 0);\n \n MapLocation goalLoc = new MapLocation(townhallUnit.getXPosition(), townhallUnit.getYPosition(), null, 0);\n \n MapLocation footmanLoc = null;\n if(enemyFootmanID != -1) {\n Unit.UnitView enemyFootmanUnit = state.getUnit(enemyFootmanID);\n footmanLoc = new MapLocation(enemyFootmanUnit.getXPosition(), enemyFootmanUnit.getYPosition(), null, 0);\n }\n \n // get resource locations\n List<Integer> resourceIDs = state.getAllResourceIds();\n Set<MapLocation> resourceLocations = new HashSet<MapLocation>();\n for(Integer resourceID : resourceIDs)\n {\n ResourceNode.ResourceView resource = state.getResourceNode(resourceID);\n \n resourceLocations.add(new MapLocation(resource.getXPosition(), resource.getYPosition(), null, 0));\n }\n \n return AstarSearch(startLoc, goalLoc, state.getXExtent(), state.getYExtent(), footmanLoc, resourceLocations);\n }", "public double calDistance()\n {\n double closest = poly[0].getD();\n\n for(int i = 1; i < sides; i++)\n {\n if(closest > poly[i].getD())\n {\n closest = poly[i].getD();\n }\n }\n this.distance = closest;\n\n return closest;\n }", "public abstract int drive(int journeyDistance);", "public Point2D nearest(Point2D p) {\n if (p == null) throw new IllegalArgumentException(\"p cannot be null\");\n if (isEmpty()) return null;\n Point2D champ = root.p;\n champ = nearest(p, champ, root, inftyBbox);\n return champ;\n }", "public static void main(String[] args) {\n PointNode A = new PointNode(\"A\",0,0);\r\n PointNode B = new PointNode(\"B\",20,10);\r\n PointNode C = new PointNode(\"C\",40,20);\r\n PointNode D = new PointNode(\"D\",30,30);\r\n PointNode E = new PointNode(\"E\",20,50);\r\n PointNode F = new PointNode(\"F\",-10,40);\r\n PointNode G = new PointNode(\"G\",10,20);\r\n PointNode H = new PointNode(\"H\",10,40);\r\n PointNode I = new PointNode(\"I\",30,40);\r\n PointNode K = new PointNode(\"K\",30,20);\r\n PointNode L = new PointNode(\"L\",40,40);\r\n\r\n A.connectWithPoint(B);\r\n A.connectWithPoint(G);\r\n G.connectWithPoint(F);\r\n G.connectWithPoint(H);\r\n G.connectWithPoint(D);\r\n K.connectWithPoint(L);\r\n B.connectWithPoint(C);\r\n D.connectWithPoint(I);\r\n D.connectWithPoint(E);\r\n L.connectWithPoint(E);\r\n F.connectWithPoint(E);\r\n H.connectWithPoint(E);\r\n I.connectWithPoint(E);\r\n A.connectWithPoint(K);\r\n\r\n Route route = searchWay(A, E);\r\n System.out.println(route);\r\n }", "public double getDistanceAway (Point p) {\n double deltaX = getPoint().get(0) - p.getX();\n double deltaY = getPoint().get(1) - p.getY();\n return Math.hypot(deltaX, deltaY);\n }" ]
[ "0.65257865", "0.60537785", "0.6037976", "0.59760904", "0.5874098", "0.5828383", "0.5819208", "0.5783938", "0.57418597", "0.5730601", "0.5728554", "0.57119757", "0.56386155", "0.5612197", "0.55968875", "0.55955684", "0.5576043", "0.55662674", "0.55502725", "0.554506", "0.5536754", "0.54985565", "0.5493727", "0.5470814", "0.5461351", "0.54602987", "0.5433803", "0.5414557", "0.541011", "0.54095024", "0.5399977", "0.53720474", "0.5365718", "0.5353478", "0.53519726", "0.53394455", "0.53339064", "0.5332939", "0.5328016", "0.5324677", "0.53221464", "0.53164643", "0.53142655", "0.5314213", "0.5304262", "0.53019696", "0.5293843", "0.5290678", "0.5282945", "0.5269129", "0.526745", "0.52660596", "0.526177", "0.52554953", "0.5246696", "0.52458334", "0.5243368", "0.52397996", "0.52375877", "0.5236922", "0.5235903", "0.52342606", "0.5233799", "0.5230774", "0.52271235", "0.52241147", "0.52227134", "0.5222164", "0.52137303", "0.5208836", "0.5206801", "0.51911104", "0.51870596", "0.5182693", "0.5177145", "0.516471", "0.51644945", "0.51639706", "0.5163192", "0.5156841", "0.5148756", "0.5146999", "0.5146369", "0.5144434", "0.5137716", "0.5129071", "0.5121713", "0.5117256", "0.5110445", "0.51035684", "0.5102433", "0.51014817", "0.5099807", "0.50905156", "0.50883913", "0.5083801", "0.50762135", "0.50720227", "0.5064113", "0.5061231" ]
0.72062784
0
Locates target tile for CANBEEATEN mode
IntPair findSafety(IntPair position, IntPair pacman) { // TODO: Implement function return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void getTile_B8();", "TrgPlace getTarget();", "private static Image getTarget()\n\t{\n\t\ttry {\n\t\t\treturn ImageIO.read(new File(tileDirectory + target));\n\t\t} catch (IOException ioe) {\n\t\t}\n\t\treturn null;\n\t}", "public Tile getTileAt(Position p);", "public void spawnEnemy(){\n\t\tint initTile = 0;\n\t\n\t\tfor(int i=0; i<screen.maps[screen.currentMap].path.getHeight(); i++){\n\t\t\tif(screen.maps[screen.currentMap].path.getCell(0, i).getTile().getProperties().containsKey(\"ground\") == true){\n\t\t\t\tinitTile = i;\n\t\t\t}\n\t\t}\n\t\t\n\t\txCoor = 2;\n\t\tyCoor = (initTile)*64 + 2;\n\t\tbound = new Circle(xCoor+30, yCoor+30, 30);\n\t\tinGame = true;\n\t}", "public abstract Tile getTileAt(int x, int y);", "public boolean tileReachable(float tx, float ty, AgentModel selectedAgent)\r\n/* 243: */ {\r\n/* 244:271 */ float x = selectedAgent.getX() - 0.5F;\r\n/* 245:272 */ float y = selectedAgent.getY() - 0.5F;\r\n/* 246:274 */ switch ((int)selectedAgent.getAngle())\r\n/* 247: */ {\r\n/* 248: */ case 0: \r\n/* 249:277 */ if ((y - 1.0F == ty) && (tx >= x - 1.0F) && (tx <= x + 1.0F)) {\r\n/* 250:279 */ return true;\r\n/* 251: */ }\r\n/* 252: */ break;\r\n/* 253: */ case 90: \r\n/* 254:283 */ if ((x + 1.0F == tx) && (ty >= y - 1.0F) && (ty <= y + 1.0F)) {\r\n/* 255:285 */ return true;\r\n/* 256: */ }\r\n/* 257: */ break;\r\n/* 258: */ case 180: \r\n/* 259:289 */ if ((y + 1.0F == ty) && (tx >= x - 1.0F) && (tx <= x + 1.0F)) {\r\n/* 260:291 */ return true;\r\n/* 261: */ }\r\n/* 262: */ break;\r\n/* 263: */ case 270: \r\n/* 264:295 */ if ((x - 1.0F == tx) && (ty >= y - 1.0F) && (ty <= y + 1.0F)) {\r\n/* 265:298 */ return true;\r\n/* 266: */ }\r\n/* 267: */ break;\r\n/* 268: */ }\r\n/* 269:303 */ return false;\r\n/* 270: */ }", "@Test\r\n\tpublic void testTargetsIntoRoomShortcut() \r\n\t{\r\n\t\tboard.calcTargets(11, 24, 3);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(6, targets.size());\r\n\t\t//up and then left\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 22)));\r\n\t\t//up left down\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 23)));\r\n\t\t//left up right\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 24)));\r\n\t\t//left only\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 21)));\r\n\t\t// into the rooms\r\n\t\tassertTrue(targets.contains(board.getCellAt(12, 23)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(12, 22)));\t\t\t\r\n\t}", "@Test\n\tpublic void selectTargetLocation() {\n\t\tboard.findAllTargets(playerComputer.getCurrentLocation(), 6);\n\t\tSet<BoardCell> targets = board.getTargets();\n\t\t\n\t\t//Tests to make sure the computers chosen cell is in targets\n\t\tBoardCell cell = ((computerPlayer) playerComputer).pickLocation(targets);\n\t\tassertTrue(targets.contains(cell));\n\t\t\n\t\t//This test ensures that if there is a room that hasn't been visited the computer picks that cell\n\t\tIterator<BoardCell> iterator = targets.iterator();\n\t\twhile(iterator.hasNext()) {\n\t\t\tBoardCell cell2 = iterator.next();\n\t\t\tif(cell2.isRoom()) {\n\t\t\t\tif(cell2.getInitial() != ((computerPlayer) playerComputer).getLastVisited()) {\n\t\t\t\t\tassertEquals(cell2.getInitial(), cell.getInitial());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Test\n\tpublic void testTargetsIntoRoomShortcut() \n\t{\n\t\tboard.calcTargets(9, 18, 2);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\tassertEquals(6, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(9, 19)));\n\t\tassertTrue(targets.contains(board.getCellAt(10, 19)));\n\t\tassertTrue(targets.contains(board.getCellAt(11, 18)));\n\t\tassertTrue(targets.contains(board.getCellAt(10, 17)));\n\t\tassertTrue(targets.contains(board.getCellAt(8, 17)));\n\t\tassertTrue(targets.contains(board.getCellAt(7, 18)));\n\t}", "public MapLocation getEnemySwarmTarget() {\n\t\tdouble a = Math.sqrt(vecEnemyX * vecEnemyX + vecEnemyY * vecEnemyY) + .001;\n\n\t\treturn new MapLocation((int) (vecEnemyX * 7 / a) + br.curLoc.x,\n\t\t\t\t(int) (vecEnemyY * 7 / a) + br.curLoc.y);\n\n\t}", "protected boolean selectTile(String player, int coordinate, String area, MBproduction.buildingType build){\n String culture = null;\n boolean AIflag = false;\n boolean placeFlag = false;\n MBproduction.terrainTypeEnum selected;\n String normalizeSelected;\n /*******************************/\n player=player.toLowerCase();\n switch(player.toLowerCase()){\n case\"human\":\n culture = playBoard.humanCulture();\n break;\n case\"ai1\":\n culture = playBoard.AICulture1();\n break;\n case\"ai2\":\n culture = playBoard.AICulture2();\n break;\n default:\n break;\n }\n selected = playBoard.getIndiTerrain(coordinate);\n normalizeSelected = \n selected.toString().substring(0, selected.toString().length()-1);\n switch(culture.toLowerCase()){\n //norse\n case\"norse\":\n switch(area.toLowerCase()){\n case\"production\":\n for (int i = 0; i < norseProduction.size(); i ++){\n if (norseProduction.get(i).getName().equalsIgnoreCase(normalizeSelected)){\n norseProduction.get(i).setIcon(new javax.swing.ImageIcon(\n getClass().getResource(selected.getPath())));\n norseProduction.remove(i);\n playBoard.updateProductionResourceCube(player, selected);\n playBoard.exileTerrain(selected); \n tileSelection.get(coordinate).setEnabled(false);\n stackAI.remove(stackAI.indexOf(coordinate));\n placeFlag = true;AIflag = true;\n break;\n }\n }\n break;\n //!!!!!!!!WARNNING!!!!!!!! NEED TO MODIFY FOR ITERATION II\n case\"city\":\n for (int i = 0; i < norseCity.size(); i ++){\n if (norseCity.get(i).getIcon() == null){\n norseCity.get(i).setIcon(new javax.swing.ImageIcon(\n getClass().getResource(build.getPath())));\n placeFlag = true;\n break;\n }\n }\n break;\n default:\n break;\n }\n break;\n //greek \n case\"greek\":\n switch(area.toLowerCase()){\n case\"production\":\n for (int i = 0; i < greekProduction.size(); i ++){\n if (greekProduction.get(i).getName().equalsIgnoreCase(normalizeSelected)){\n greekProduction.get(i).setIcon(new javax.swing.ImageIcon(\n getClass().getResource(selected.getPath())));\n greekProduction.remove(i);\n playBoard.updateProductionResourceCube(player, selected);\n playBoard.exileTerrain(selected); \n tileSelection.get(coordinate).setEnabled(false);\n stackAI.remove(stackAI.indexOf(coordinate));\n placeFlag = true;AIflag = true;\n break;\n }\n }\n break;\n //!!!!!!!!WARNNING!!!!!!!! NEED TO MODIFY FOR ITERATION II\n case\"city\":\n for (int i = 0; i < greekCity.size(); i ++){\n if (greekCity.get(i).getIcon() == null){\n greekCity.get(i).setIcon(new javax.swing.ImageIcon(\n getClass().getResource(build.getPath())));\n placeFlag = true;\n break;\n } \n }\n break;\n default:\n break;\n }\n break;\n //egypt\n case\"egypt\":\n switch(area.toLowerCase()){\n case\"production\":\n for (int i = 0; i < egyptProduction.size(); i ++){\n if (egyptProduction.get(i).getName().equalsIgnoreCase(normalizeSelected)){\n egyptProduction.get(i).setIcon(new javax.swing.ImageIcon(\n getClass().getResource(selected.getPath())));\n playBoard.updateProductionResourceCube(player, selected);\n playBoard.exileTerrain(selected);\n egyptProduction.remove(i);\n tileSelection.get(coordinate).setEnabled(false);\n stackAI.remove(stackAI.indexOf(coordinate));\n placeFlag = true;AIflag = true;\n break; \n }\n }\n break;\n //!!!!!!!!WARNNING!!!!!!!! NEED TO MODIFY FOR ITERATION II\n case\"city\":\n for (int i = 0; i < egyptCity.size(); i ++){\n if (egyptCity.get(i).getIcon() == null){\n egyptCity.get(i).setIcon(new javax.swing.ImageIcon(\n getClass().getResource(build.getPath())));\n placeFlag = true;\n break;\n } \n }\n break;\n default:\n break;\n }\n break;\n default:\n break;\n }\n if ((!placeFlag)&&(player.equalsIgnoreCase(\"human\"))){\n JOptionPane.showMessageDialog(\n null, \"No suitable tile for \" + player , \"Information\",\n JOptionPane.WARNING_MESSAGE);\n }\n return AIflag; \n }", "TileItem getCurrentTile();", "@Test\n public void testGetTile() {\n assertEquals(7, board3by3.getTile(0, 0).getId());\n }", "private static void defineInitialAttackTarget() {\n\t\tUnit buildingToAttack = MapExploration.getNearestEnemyBuilding();\n\n\t\t// We know some building of CPU that we can attack.\n\t\tif (buildingToAttack != null) {\n\t\t\tchangeNextTargetTo(buildingToAttack);\n\t\t}\n\n\t\t// No building to attack found, safely decide not to attack.\n\t\telse {\n\t\t\tchangeStateTo(STATE_PEACE);\n\t\t}\n\t}", "protected abstract void setTile( int tile, int x, int y );", "public List<Tile> findTargets() {\n List<Tile> targets = new ArrayList<>(); // our return value\n int fearDistance = 2; // Ideally we're 2 spots away from their head, increases when we can't do that.\n int foodDistance = 3; // We look at a distance 3 for food.\n\n // If fearDistance gets this big, then its just GG i guess\n while (targets.size() == 0 && fearDistance < 15) {\n // Get the tiles around the Enemy's head\n targets = this.gb.nearByTiles(this.enemy_head_x, this.enemy_head_y, fearDistance);\n fearDistance += 1;\n }\n\n // Get the food tiles near us\n for (int i=0; i < foodDistance; i++) {\n List<Tile> nearBy = this.gb.nearByTiles(this.us_head_x, this.us_head_y, i);\n for (Tile t : nearBy) {\n if (t.isFood() && !targets.contains(t)) targets.add(t);\n }\n }\n return targets;\n }", "public static void hint(int[][] map, int x, int y) {\n\t\t// show neighbor of this shot\n\t\tfor (int i = -1; i < 2; i++) {\n\t\t\tfor (int j = -1; j < 2; j++) {\n\n\t\t\t\tif (x + i < 0 || y + j < 0 || x + i > 9 || y + j > 9) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (map[x + i][y + j] == 0) {\n\t\t\t\t\tmap[x + i][y + j] = 3;\n\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\"x axis is \" + (x + i) + \" and y axis is \" + (y + j) + \"\" + \", it is not the target!\");\n\t\t\t\t} else if (map[x + i][y + j] == 1) {\n\t\t\t\t\t// map[x + i][y + j] = MINE_FOUND;\n\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t.println(\"x axis is \" + (x + i) + \" and y axis is \" + (y + j) + \"\" + \", this is a target!\");\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\tSystem.out.println(\"-------------------------------------\");\n\t\t// print all the previous shots.\n\t\tfor (int i = 0; i < map.length; i++) {\n\t\t\tfor (int j = 0; j < map[i].length; j++) {\n\t\t\t\tif (map[i][j] == 3) {\n\t\t\t\t\tSystem.out.println(\"x axis is \" + i + \" and y axis is \" + j + \"\" + \", it is not the target!\");\n\t\t\t\t} else if (map[i][j] == 2) {\n\t\t\t\t\tSystem.out.println(\"x axis is \" + i + \" and y axis is \" + j + \"\" + \", it is a found target!\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void attack(Creature target) {\r\n\t\t//Check if attacker is within 1 tile\r\n\t\tint destx = (int) (target.getXlocation()/Tile.TILEWIDTH);\r\n\t\tint desty = (int) (target.getYlocation()/Tile.TILEHEIGHT);\r\n\t\tVector2i start = new Vector2i((int) (creature.getXlocation() / Tile.TILEWIDTH), (int) (creature.getYlocation()/ Tile.TILEHEIGHT));\r\n\t\t//FIND SHORTEST DISTANCE\r\n\t\tVector2i destination = null; \t\t\r\n\t\tdouble shortest = 100000; \t\t\t\t\t\t\t\t\t\t //Set huge\r\n\t\tbyte Direction = 2;\t\t\t\t\t\t\t\t\t\t\t\t //default Look DOWN\r\n\t\tdouble temp = getDistance(start, new Vector2i(destx+1, desty)); //Check first\r\n\t\tif (shortest > temp && !handler.getWorld().getTile(destx+1, desty).isSolid() && !checkCollision(destx+1, desty)) {\r\n\t\t\tshortest = temp;\r\n\t\t\tdestination = new Vector2i(destx+1, desty);\r\n\t\t\tDirection = 1;\t\t\t\t\t\t\t\t\t\t\t\t //Look LEFT\r\n\t\t}\r\n\t\ttemp = getDistance(start, new Vector2i(destx-1, desty)); \t\t //Check second\r\n\t\tif (shortest > temp && !handler.getWorld().getTile(destx-1, desty).isSolid() && !checkCollision(destx-1, desty)) {\r\n\t\t\tshortest = temp;\r\n\t\t\tdestination = new Vector2i(destx-1, desty);\r\n\t\t\tDirection = 3;\t\t\t\t\t\t\t\t\t\t\t\t //Look RIGHT\r\n\t\t}\r\n\t\ttemp = getDistance(start, new Vector2i(destx, desty+1)); \t\t //Check third\r\n\t\tif (shortest > temp && !handler.getWorld().getTile(destx, desty+1).isSolid() && !checkCollision(destx, desty+1)) {\r\n\t\t\tshortest = temp;\r\n\t\t\tdestination = new Vector2i(destx, desty+1);\r\n\t\t\tDirection = 0;\t\t\t\t\t\t\t\t\t\t\t\t //Look UP\r\n\t\t}\r\n\t\ttemp = getDistance(start, new Vector2i(destx, desty-1)); \t\t //Check fourth\r\n\t\tif (shortest > temp && !handler.getWorld().getTile(destx, desty-1).isSolid() && !checkCollision(destx, desty-1)) {\r\n\t\t\tshortest = temp;\r\n\t\t\tdestination = new Vector2i(destx, desty-1);\r\n\t\t\tDirection = 2;\t\t\t\t\t\t\t\t\t\t\t\t //Look DOWN\r\n\t\t}\r\n\t\t//SET PATH FOR SHORTEST DISTANCE\r\n\t\tList<Node> path = pf.findPath(start, destination);\r\n\t\t//FOLLOW SHORTEST DISTANCE PATH\r\n\t\tfollowPath(path);\r\n\t\t//IF ATTACKER HAS ARRIVED\r\n\t\tif (creature.getxMove() == 0 && creature.getyMove() == 0) {\r\n\t\t\t//face target -> \r\n\t\t\tcreature.setLastDirection(Direction);\r\n\t\t\t//attack\r\n\t\t\tcreature.setAttacking(true);\r\n\t\t} else {\r\n\t\t\tcreature.setAttacking(false);\r\n\t\t}\r\n\t}", "private void cs8() {\n\t\t\t\n\t\n\t\t\tif(new Tile(3088,3092,0).matrix(ctx).reachable()){\n\t\t\t\t\n\t\t\t\tif(new Tile(3079,3084,0).distanceTo(ctx.players.local().tile())<7){\n\t\t\t\t\tMethod.interactO(9709, \"Open\", \"Door\");\n\t\t\t\t}else ctx.movement.step(new Tile(3079,3084,0));\n\t\t\t\t\n\t\t\t}else if(new Tile(3090,3092,0).distanceTo(ctx.players.local().tile())<7){\n\t\t\t\tfinal int[] bounds = {140, 108, -84, 144, -64, 136};\n\t\t\t\tGameObject gate = ctx.objects.select().id(GATEBYFISH).each(Interactive.doSetBounds(bounds)).select(Interactive.areInViewport()).nearest().poll();\n\t\t\t\tgate.interact(\"Open\",\"\");\n\t\t\t}else ctx.movement.step(new Tile(3090,3092,0));\n\t\t\t\n\t\t\t\n\t\t}", "public Tile diveBomb() {\n List<Tile> targets = this.findTargets();\n Tile us_tile = this.gb.get(this.us_head_x, this.us_head_y);\n LinkedList<Tile> shortestPath = null;\n\n // Chose the shortest path\n //System.out.println(\"HeadX: \" + this.us_head_x + \" HeadY: \" + this.us_head_y);\n //System.out.println(\"EnemyX: \" + this.enemy_head_x + \" EnemyY: \" + this.enemy_head_y);\n // System.out.println(\"Targets - \" + targets);\n for (Tile target : targets) {\n LinkedList<Tile> path = this.dk.path(us_tile, target, this.gb);\n\n if (path != null) { // means we couldn't reach the desired target\n // System.out.println(\"Path - \" + path);\n if (shortestPath == null) {\n shortestPath = path;\n } else if (path.size() < shortestPath.size()) {\n shortestPath = path;\n }\n }\n }\n // System.out.println(\"Shortest Path - \" + shortestPath);\n if (shortestPath == null) return us_tile;\n return shortestPath.get(1);\n }", "protected boolean findTarget(){\n\t\t// shoot units\n\t\tfloat tmpDist = -1;\n\t\tUnit tmpUnit = null;\n\t\tfor(Unit u:Game.map.get(tileId).unitMap){ // loop through units on\n\t\t\t\t\t\t\t\t\t\t\t\t\t// maptile\n\t\t\tif(this.id == u.id)\n\t\t\t\tcontinue;\n\t\t\tif(this.ownerId == u.ownerId)\n\t\t\t\tcontinue;\n\t\t\tif(u.dead)\n\t\t\t\tcontinue;\n\t\t\tVector3f tmp = Vector3f.sub(this.modelPos, u.modelPos, null);\n\t\t\tif(tmpDist == -1 || tmp.length() < tmpDist){\n\t\t\t\ttmpUnit = u;\n\t\t\t\ttmpDist = tmp.length();\n\t\t\t}else\n\t\t\t\tcontinue;\n\t\t}\n\t\tif(tmpDist != -1 && tmpDist <= range && tmpUnit != null){\n\t\t\tthis.hostile = tmpUnit;\n\t\t\tthis.target = this.hostile.modelPos;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private Cell getBananaTarget() {\n Cell[][] blocks = gameState.map;\n int mostWormInRange = 0;\n Cell chosenCell = null;\n boolean wormAtCenter;\n\n for (int i = currentWorm.position.x - currentWorm.bananaBomb.range; i <= currentWorm.position.x + currentWorm.bananaBomb.range; i++){\n for (int j = currentWorm.position.y - currentWorm.bananaBomb.range; j <= currentWorm.position.y + currentWorm.bananaBomb.range; j++){\n wormAtCenter = false;\n if (isValidCoordinate(i, j)\n && euclideanDistance(i, j, currentWorm.position.x, currentWorm.position.y) <= 5) {\n List<Cell> affectedCells = getBananaAffectedCell(i, j);\n\n int wormInRange = 0;\n for (Cell cell : affectedCells) {\n for (Worm enemyWorm : opponent.worms) {\n if (enemyWorm.position.x == cell.x && enemyWorm.position.y == cell.y\n && enemyWorm.health > 0)\n wormInRange++;\n if (enemyWorm.position.x == i && enemyWorm.position.y == j)\n wormAtCenter = true;\n }\n for (Worm myWorm : player.worms) {\n if (myWorm.position.x == cell.x && myWorm.position.y == cell.y && myWorm.health > 0)\n wormInRange = -5;\n }\n }\n if (wormInRange > mostWormInRange) {\n mostWormInRange = wormInRange;\n chosenCell = blocks[j][i];\n } else if (wormInRange == mostWormInRange && wormAtCenter) {\n chosenCell = blocks[j][i];\n }\n }\n }\n }\n\n return chosenCell;\n }", "public void setTile(int x, int y) {\n/* 748 */ this.e.setTile(x, y);\n/* 749 */ this.k = getTileIdx();\n/* */ \n/* */ \n/* 752 */ String str = (String)this.f.f(this.k);\n/* 753 */ if (str.equals(\"none\")) {\n/* 754 */ this.h = 0;\n/* */ }\n/* 756 */ else if (str.equals(\"rct\")) {\n/* 757 */ this.h = 1;\n/* 758 */ c();\n/* */ }\n/* 760 */ else if (str.equals(\"ict\")) {\n/* 761 */ this.h = 2;\n/* 762 */ d();\n/* */ } else {\n/* */ \n/* 765 */ throw new IllegalArgumentException(\"Component transformation not recognized\");\n/* */ } \n/* */ }", "@Override\n public ResourceLocation getTextureLocation(DroneEntity entity) {\n return entity.isAttacking() ? mobShootingTexture : mobTexture;\n }", "Tile getPosition();", "public boolean checkAlienPlacementTile(float x, float y)\r\n/* 471: */ {\r\n/* 472:563 */ if (!tileWalkable(x, y)) {\r\n/* 473:565 */ return false;\r\n/* 474: */ }\r\n/* 475:568 */ AgentModel a = getAgentOnTile(x, y);\r\n/* 476:569 */ if ((a != null) || (((a instanceof DoorModel)) && (!((DoorModel)a).isOpen()))) {\r\n/* 477:571 */ return false;\r\n/* 478: */ }\r\n/* 479:574 */ return true;\r\n/* 480: */ }", "public int getTileType() {\r\n\t\treturn 3;\r\n\t}", "@Test\n\t\t\tpublic void testTargetOneStep()\n\t\t\t{\n\t\t\t\t//Test one step and check for the right space\n\t\t\t\tboard.calcTargets(0, 7, 1);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(1, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(1, 7)));\n\n\t\t\t\t// Test one step near a door with the incorrect direction\n\t\t\t\tboard.calcTargets(13, 6, 1);\n\t\t\t\ttargets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(3, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(14, 6)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(13, 5)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(13, 7)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "public MapLocation findNearestAction() {\n MapLocation origin = rc.getLocation();\n MapLocation nearestHelp = findNearestHelp();\n MapLocation nearestArchon = findNearestArchon();\n\n if (nearestArchon == null && nearestHelp == null) {\n return rc.getInitialArchonLocations(rc.getTeam().opponent())[0]; // when no target is known, go to enemy archon initial position\n } else if (nearestArchon == null) { // when some of the targets is not present, just return the other one\n return nearestHelp; // is not null\n } else if (nearestHelp == null) {\n return nearestArchon; // is not null\n }\n\n if (origin.distanceSquaredTo(nearestHelp) < origin.distanceSquaredTo(nearestArchon)) {\n return nearestHelp;\n } else {\n return nearestArchon;\n }\n }", "@Test \r\n\tpublic void testTargetsIntoRoom()\r\n\t{\r\n\t\t// One room is exactly 2 away\r\n\t\tboard.calcTargets(19, 8, 2);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(5, targets.size());\r\n\t\t// directly left (can't go right 2 steps)\r\n\t\tassertTrue(targets.contains(board.getCellAt(19, 6)));\r\n\t\t// directly up and down\r\n\t\tassertTrue(targets.contains(board.getCellAt(17, 8)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(21, 8)));\r\n\t\t// one up/down, one left/right\r\n\t\tassertTrue(targets.contains(board.getCellAt(18, 7)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(20, 7)));\r\n\t}", "public final Tile selectComputerMove() {\r\n Tile tile = null;\r\n int count = 0;\r\n String tileName = null;\r\n boolean continueLoop = true;\r\n \r\n // First try to find a winning move\r\n for (Rail rail : rails) {\r\n for (Tile t : rail.getTiles()) {\r\n if (t.getText().equals(\"0\")) count++;\r\n }\r\n if (count == 2) {\r\n for (Tile t : rail.getTiles()) {\r\n if (t.getText().equals(\"\")) {\r\n tileName = t.getName();\r\n return t;\r\n }\r\n }\r\n }\r\n count = 0; \r\n }\r\n \r\n // If none found, try to block \"X\"\r\n for (Rail rail : rails) {\r\n for (Tile t : rail.getTiles()) {\r\n if (t.getText().equals(\"X\")) count++;\r\n }\r\n if (count == 2) {\r\n for (Tile t : rail.getTiles()) {\r\n if (t.getText().equals(\"\")) {\r\n tileName = t.getName();\r\n return t;\r\n }\r\n }\r\n }\r\n count = 0;\r\n }\r\n \r\n // If no blocking move, try to play the center which gives \"O\"\r\n // a statistical advantage\r\n if (!tiles[R2C2].isSelected()) {\r\n return tiles[R2C2];\r\n }\r\n \r\n \r\n // If center move is not available, try to find an open corner tile, \r\n // which might set up an winning combination\r\n if (!tiles[R1C1].isSelected()) {\r\n return tiles[R1C1];\r\n } else if (!tiles[R3C3].isSelected()) {\r\n return tiles[R3C3];\r\n } else if (!tiles[R3C1].isSelected()) {\r\n return tiles[R3C1];\r\n } else if (!tiles[R1C3].isSelected()) {\r\n return tiles[R1C3];\r\n }\r\n \r\n // If none found just pick an empty tile at random\r\n if(tileName == null) {\r\n int row = rand.nextInt(3) + 1;\r\n int col = rand.nextInt(3) + 1;\r\n tileName = \"r\" + row + \"c\" + col;\r\n for (Tile btn: tiles) {\r\n if (btn.getName().equals(tileName)) {\r\n tile = btn;\r\n break;\r\n }\r\n }\r\n }\r\n \r\n return tile;\r\n }", "String getTileType();", "void use(ATile clickedTile, GodSim g);", "GameState requestActionTile();", "protected void registerTile(int x, int y) {}", "public Location getLocation() {\n return ((Location) tile);\n }", "private void fetchTile() {\n\t\t\tif (tile.getRequest().isCancelled() || tile.isFinal()) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tMapSource source = tile.getRequest().getSource();\n\t\t\tProjObj proj = tile.getRequest().getProjection();\n\t\t\tfinal int ppd = tile.getRequest().getPPD();\n\t\t\t\n\t\t\tfor (int fuzzyPPD = ppd/2 ; fuzzyPPD > 1 ; fuzzyPPD /= 2){\t\t\t\t\n\t\t\t\tint ratio = ppd / fuzzyPPD;\n\t\t\t\t\n\t\t\t\t// A tile has 256 pixels on a side.\n\t\t\t\t// Using this method, we can't upscale data to be fuzzy if it's more than 256 times larger \n\t\t\t\t// than the area we are looking to fill. Upscaling data more than 16 times seems unlikely to provide\n\t\t\t\t// any real benefit to the user, so we will quit our search at this point\n\t\t\t\tif (ratio>16) break;\n\t\t\t\t\n\t\t\t\tString tileName = CacheManager.getTileName(\n\t\t\t\t\tsource.getName(), proj, fuzzyPPD,\n\t\t\t\t\ttile.getXtile()/ratio, tile.getYtile()/ratio,\n\t\t\t\t\tsource.hasNumericKeyword());\n\t\t\t\t\n\t\t\t\tBufferedImage tileImage = CacheManager.getTile(source, tileName);\n\t\t\t\t\n\t\t\t\tif (tileImage==null) {\t\t\t\t\t\t\t\t\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tint xtileindex = tile.getXtile() % ratio;\n\t\t\t\tint ytileindex = ratio - (tile.getYtile() % ratio) - 1;\n\t\t\t\t\n\t\t\t\tdouble fuzzyxstep = MapRetriever.tiler.getPixelWidth() / ratio;\n\t\t\t\tdouble fuzzyystep = MapRetriever.tiler.getPixelHeight() / ratio;\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\ttileImage = tileImage.getSubimage((int)(xtileindex * fuzzyxstep), (int)(ytileindex * fuzzyystep), (int)fuzzyxstep, (int)fuzzyystep);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlog(e);\n\t\t\t\t\tlog(\"xtileindex:\"+xtileindex+\" fuzzyxstep:\"+fuzzyxstep+\" ytileindex:\"+ytileindex+\" fuzzyystep:\"+fuzzyystep);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlong outputImageSize = (tileImage.getWidth()*ratio)*(tileImage.getHeight()*ratio);\n\t\t\t\tif (outputImageSize <= 0 || outputImageSize > Integer.MAX_VALUE){\n\t\t\t\t\tlog(\"Scaling tile from \"+fuzzyPPD+\" to \"+ppd+\" will result in image size overflow.\"+\n\t\t\t\t\t\t\t\" Stopping further search for lower PPDs for this tile.\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttileImage = CacheManager.scaleImage(tileImage, ratio);\n\t\t\t\t\n\t\t\t\tmyRetriever.fuzzyResponse(tile, tileImage);\n\t\t\t}\t\t\t\t\t\t\n\t\t}", "public FloorTile getGoalTile() {\r\n return goalTile;\r\n }", "@Override\n public boolean isTileFriendly(){\n return false;\n }", "public void nextTile() {\n/* 779 */ this.e.nextTile();\n/* 780 */ this.k = getTileIdx();\n/* */ \n/* */ \n/* 783 */ String str = (String)this.f.f(this.k);\n/* 784 */ if (str.equals(\"none\")) {\n/* 785 */ this.h = 0;\n/* */ }\n/* 787 */ else if (str.equals(\"rct\")) {\n/* 788 */ this.h = 1;\n/* 789 */ c();\n/* */ }\n/* 791 */ else if (str.equals(\"ict\")) {\n/* 792 */ this.h = 2;\n/* 793 */ d();\n/* */ } else {\n/* */ \n/* 796 */ throw new IllegalArgumentException(\"Component transformation not recognized\");\n/* */ } \n/* */ }", "private VolaTile getCaveTile() {\n/* */ try {\n/* 2147 */ Zone z = Zones.getZone(this.tilex, this.tiley, false);\n/* 2148 */ return z.getOrCreateTile(this.tilex, this.tiley);\n/* */ }\n/* 2150 */ catch (NoSuchZoneException noSuchZoneException) {\n/* */ \n/* */ \n/* 2153 */ logger.log(Level.WARNING, \"No cave tile for \" + this.tilex + \", \" + this.tiley);\n/* 2154 */ return this;\n/* */ } \n/* */ }", "private void revealAround() {\n if (xTile - 1 >= 0 && !References.GetMainTileActorMap()[xTile - 1][yTile].isRevealed()) {\n References.GetMainTileActorMap()[xTile - 1][yTile].setRevealed(true);\n\n if (References.GetMainTileActorMap()[xTile - 1][yTile].itContainsMonster()) {\n References.GetMonsterActorMap()[xTile - 1][yTile].setRevealed(true);\n }\n }\n if (yTile - 1 >= 0 && !References.GetMainTileActorMap()[xTile][yTile - 1].isRevealed()) {\n References.GetMainTileActorMap()[xTile][yTile - 1].setRevealed(true);\n\n if (References.GetMainTileActorMap()[xTile][yTile - 1].itContainsMonster()) {\n References.GetMonsterActorMap()[xTile][yTile - 1].setRevealed(true);\n }\n }\n if (xTile + 1 < Parameters.NUM_X_TILES && !References.GetMainTileActorMap()[xTile + 1][yTile].isRevealed()) {\n References.GetMainTileActorMap()[xTile + 1][yTile].setRevealed(true);\n\n if (References.GetMainTileActorMap()[xTile + 1][yTile].itContainsMonster()) {\n References.GetMonsterActorMap()[xTile + 1][yTile].setRevealed(true);\n }\n }\n if (yTile + 1 < Parameters.NUM_Y_TILES && !References.GetMainTileActorMap()[xTile][yTile + 1].isRevealed()) {\n References.GetMainTileActorMap()[xTile][yTile + 1].setRevealed(true);\n\n if (References.GetMainTileActorMap()[xTile][yTile + 1].itContainsMonster()) {\n References.GetMonsterActorMap()[xTile][yTile + 1].setRevealed(true);\n }\n }\n }", "public void setTiles() {\n\t\tTileStack names = new TileStack();\n\t\tfor(int x=0; x < theBoard.getCols(); x++) {\n\t\t\tfor(int y=0; y < theBoard.getRows(); y++) {\n\t\t\t\tp = new Point(x,y);\n\t\t\t\tif(p.equals(new Point(0,0)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(1,0)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(4,0)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(5,0)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(0,1)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(5,1)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(0,4)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(5,4)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(0,5)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(1,5)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(4,5)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(5,5)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse \n\t\t\t\t\ttheBoard.setTile(p, names.pop());\n\t\t\t}\n\t\t}\n\t}", "public int getTile(int t) {\n switch (t) {\n case HARDFLOOR: return hardfloors[type];\n case HARDWALL: return hardwalls[type];\n case SOFTFLOOR: return softfloors[type];\n case SOFTWALL: return softwalls[type];\n case STREAM: return streams[type];\n case RIVER: return rivers[type];\n } \n return Tile.WALL;\n }", "public Tile getTile(int x, int y){\n\t\tif(x < 0 || y < 0 || x >= width || y >= height){\r\n\t\t\treturn Tile.grassTile;\r\n\t\t}\r\n\t\t\r\n\t\t//tiles[x][y] give us the id and the tiles[id] is the texture\r\n\t\tTile t = Tile.tiles[tiles[x][y]]; \r\n\t\tif(t == null){\r\n\t\t\t//If you try to access undefined tile index, return dirt tile as default\r\n\t\t\treturn Tile.dirtTile; \r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn t;\r\n\t\t}\r\n\t}", "@Test\n\t\t\tpublic void testTargetsThreeSteps() {\n\t\t\t\t//Using walkway space that will go near a door with the wrong direction\n\t\t\t\tboard.calcTargets(8, 16, 2);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(4, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(10, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(7, 15)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(9, 15)));\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t}", "@Override\n public ITile getClosestTile(int x, int y) {\n return getClosestTile(new Point(x, y), getTileSize());\n }", "@Test\n public void mvtMBTilesTest() {\n try {\n JavaResources.copyFileFromResources(main, LIECHTENSTEIN_MBTILES, null, \"mbtiles\");\n JavaResources.copyFileFromResources(main, \"osm-liberty.json\", null, \"mbtiles\");\n JavaResources.copyFileFromResources(main, \"osm-liberty-sprite.json\", null, \"mbtiles\");\n JavaResources.copyFileFromResources(main, \"osm-liberty-sprite.png\", null, \"mbtiles\");\n } catch (IOException e) {\n fail(e.getMessage());\n }\n Preferences prefs = new Preferences(main);\n LayerUtils.removeImageryLayers(main);\n main.getMap().setPrefs(main, prefs);\n monitor = instrumentation.addMonitor(PrefEditor.class.getName(), null, false);\n assertTrue(TestUtils.clickButton(device, device.getCurrentPackageName() + \":id/menu_config\", true));\n instrumentation.waitForMonitorWithTimeout(monitor, 40000); // wait for main\n assertTrue(TestUtils.clickText(device, false, main.getString(R.string.config_customlayers_title), true, false));\n assertTrue(TestUtils.clickButton(device, device.getCurrentPackageName() + \":id/add\", true));\n assertTrue(TestUtils.clickButton(device, device.getCurrentPackageName() + \":id/file_button\", true));\n TestUtils.selectFile(device, main, \"mbtiles\", LIECHTENSTEIN_MBTILES, true);\n assertTrue(TestUtils.findText(device, false, TILEMAKER));\n assertTrue(TestUtils.findText(device, false, \"47.271280\"));\n assertTrue(TestUtils.clickText(device, false, main.getString(R.string.save_and_set), true, false));\n assertTrue(TestUtils.findText(device, false, TILEMAKER));\n assertTrue(TestUtils.clickText(device, false, main.getString(R.string.done), true, false));\n assertTrue(TestUtils.clickHome(device, true));\n // go to somewhere in Vaduz\n Map map = App.getLogic().getMap();\n UiObject2 extentButton = TestUtils.getLayerButton(device, TILEMAKER, LayerDialogTest.EXTENT_BUTTON);\n extentButton.clickAndWait(Until.newWindow(), 2000);\n TestUtils.unlock(device);\n TestUtils.zoomToLevel(device, main, 20);\n TestUtils.clickAtCoordinates(device, map, 9.5104, 47.1561619);\n assertTrue(TestUtils.clickTextContains(device, false, \"housenumber\", true));\n assertTrue(TestUtils.findText(device, false, main.getString(R.string.vt_feature_information), 1000));\n assertTrue(TestUtils.clickText(device, false, main.getString(R.string.Done), true));\n UiObject2 menuButton = TestUtils.getLayerButton(device, TILEMAKER, LayerDialogTest.MENU_BUTTON);\n menuButton.clickAndWait(Until.newWindow(), 2000);\n assertTrue(TestUtils.clickText(device, false, main.getString(R.string.layer_change_style), true));\n assertTrue(TestUtils.clickText(device, false, main.getString(R.string.okay), true));\n menuButton.clickAndWait(Until.newWindow(), 2000);\n assertTrue(TestUtils.clickText(device, false, main.getString(R.string.layer_load_style), true));\n TestUtils.selectFile(device, main, \"mbtiles\", \"osm-liberty.json\", true);\n assertTrue(TestUtils.clickText(device, false, main.getString(R.string.Done), true));\n // check that we actually loaded something\n de.blau.android.layer.mvt.MapOverlay layer = (MapOverlay) map.getLayer(LayerType.IMAGERY,\n \"TILEMAKERTOOPENMAPTILESSCHEMA\");\n assertNotNull(layer);\n Style style = layer.getStyle();\n assertNotNull(style);\n Layer taxiway = null;\n for (Layer l : style.getLayers()) {\n if (\"aeroway_taxiway\".equals(l.getId())) {\n taxiway = l;\n break;\n }\n }\n assertNotNull(taxiway);\n }", "@Test\n public void test_17() {\n Maze maze = new Maze(smallKey, new Location(1, 2));\n maze.moveChip(Direction.NORTH);\n assertTrue(maze.getChipLocation().equals(new Location(1, 1)));\n assertTrue(maze.getChip().hasKey(keyOne));\n assertTrue(maze.getTile(new Location(1, 1)).getClass() == Free.class);\n }", "private static TETile getRandomTile() {\n Random r = new Random();\n int tileNum = r.nextInt(5);\n switch (tileNum) {\n case 0: return Tileset.FLOWER;\n case 1: return Tileset.MOUNTAIN;\n case 2: return Tileset.TREE;\n case 3: return Tileset.GRASS;\n case 4: return Tileset.SAND;\n default: return Tileset.SAND;\n }\n }", "public int getTile(int x, int y)\n {\n return tilemap[x][y];\n }", "public Tile getNextTile(Unit u);", "@Test \n\tpublic void testTargetsIntoRoom()\n\t{\n\t\t// One room is exactly 2 away\n\t\tboard.calcTargets(5, 24, 2);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\tassertEquals(4, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(3, 24)));\n\t\tassertTrue(targets.contains(board.getCellAt(6, 23)));\n\t\tassertTrue(targets.contains(board.getCellAt(5, 22)));\n\t\tassertTrue(targets.contains(board.getCellAt(4, 23)));\n\t}", "private void fly() {\n\t\tint xTarget = 12 *Board.TILE_D;\r\n\t\tint yTarget = 12 * Board.TILE_D;\r\n\t\tif(centerX - xTarget >0) {\r\n\t\t\tcenterX--;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcenterX++;\r\n\t\t}\r\n\t\tif(centerY - yTarget > 0) {\r\n\t\t\tcenterY --;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcenterY ++;\r\n\t\t}\r\n\t}", "public OthelloTile getTile(Point p) {\n if(p == null) {\n return null;\n }\n int x = (p.x-35)/grid[0][0].getPreferredSize().width;\n int y = (p.y-35)/grid[0][0].getPreferredSize().height;\n if(x<0 || x>=grid.length || y<0 || y>=grid[0].length) {\n return null;\n }\n return grid[y][x];\n }", "private static void updateNeighbourTileDoors(Creature creature, int tilex, int tiley) {\n/* 2989 */ if (Tiles.isSolidCave(Tiles.decodeType(Server.caveMesh.getTile(tilex, tiley - 1)))) {\n/* */ \n/* 2991 */ VolaTile newTile = Zones.getOrCreateTile(tilex, tiley - 1, true);\n/* 2992 */ newTile.getSurfaceTile().doorCreatureMoved(creature, 0, 0);\n/* */ }\n/* */ else {\n/* */ \n/* 2996 */ VolaTile newTile = Zones.getOrCreateTile(tilex, tiley - 1, false);\n/* 2997 */ newTile.getCaveTile().doorCreatureMoved(creature, 0, 0);\n/* */ } \n/* */ \n/* */ \n/* 3001 */ if (Tiles.isSolidCave(Tiles.decodeType(Server.caveMesh.getTile(tilex + 1, tiley)))) {\n/* */ \n/* 3003 */ VolaTile newTile = Zones.getOrCreateTile(tilex + 1, tiley, true);\n/* 3004 */ newTile.getSurfaceTile().doorCreatureMoved(creature, 0, 0);\n/* */ }\n/* */ else {\n/* */ \n/* 3008 */ VolaTile newTile = Zones.getOrCreateTile(tilex + 1, tiley, false);\n/* 3009 */ newTile.getCaveTile().doorCreatureMoved(creature, 0, 0);\n/* */ } \n/* */ \n/* */ \n/* 3013 */ if (Tiles.isSolidCave(Tiles.decodeType(Server.caveMesh.getTile(tilex, tiley + 1)))) {\n/* */ \n/* 3015 */ VolaTile newTile = Zones.getOrCreateTile(tilex, tiley + 1, true);\n/* 3016 */ newTile.getSurfaceTile().doorCreatureMoved(creature, 0, 0);\n/* */ }\n/* */ else {\n/* */ \n/* 3020 */ VolaTile newTile = Zones.getOrCreateTile(tilex, tiley + 1, false);\n/* 3021 */ newTile.getCaveTile().doorCreatureMoved(creature, 0, 0);\n/* */ } \n/* */ \n/* */ \n/* 3025 */ if (Tiles.isSolidCave(Tiles.decodeType(Server.caveMesh.getTile(tilex - 1, tiley)))) {\n/* */ \n/* 3027 */ VolaTile newTile = Zones.getOrCreateTile(tilex - 1, tiley, true);\n/* 3028 */ newTile.getSurfaceTile().doorCreatureMoved(creature, 0, 0);\n/* */ }\n/* */ else {\n/* */ \n/* 3032 */ VolaTile newTile = Zones.getOrCreateTile(tilex - 1, tiley, false);\n/* 3033 */ newTile.getCaveTile().doorCreatureMoved(creature, 0, 0);\n/* */ } \n/* */ }", "void buildDome(Tile t);", "@Test\n public void notOnGroundTest(){\n TileMap tileMap = new TileMap(24, 24, new byte[][]{{0,0},{0,0}},new byte[][]{{1,0},{1,1}}, tilepath);\n Rect cBox = new Rect(2,2,2,2);\n assertFalse(tileMap.isOnGround(cBox));\n }", "public Tile getTile() { return tile; }", "void buildBlock(Tile t);", "private boolean isTownHallAt(int x, int y, Node dest) {\n\t\tif (x == dest.getX() && y == dest.getY()) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (currentState.isUnitAt(x, y)) {\n\t\t\tint unitID = currentState.unitAt(x, y);\n \t\n String unitName = currentState.getUnit(unitID).getTemplateView().getName();\n if(unitName.equalsIgnoreCase(\"Townhall\")) {\n \treturn true;\n }\n\t\t}\n\t\n\t\treturn false;\n\t}", "private Tile getTileAt(Position p) {\n return getTileAt(p.getRow(), p.getCol());\n }", "private Array<Tile>[] walk() {\n float targetY = currentTile.y + 1;\n Vector2 previousTile = new Vector2(currentTile.x, currentTile.y);\n\n Array<Vector2> tiles = new Array<Vector2>();\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n\n while(currentTile.y < targetY) {\n float rnd = random.nextFloat();\n\n if(rnd > 0.75f) { // up\n Array<Tile> grassRow = new Array<Tile>();\n Array<Tile> treeRow = new Array<Tile>();\n\n for(int x = 1; x <= 5; x++) {\n Vector2 vector = new Vector2(x, currentTile.y);\n\n GrassNEW grass = grassPool.obtain();\n grass.init(vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n grassRow.add(grass);\n\n if(!tiles.contains(vector, false)) {\n if(random.nextFloat() > 0.3) {\n TreeNEW tree = treePool.obtain();\n tree.init(vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n treeRow.add(tree);\n }\n } else {\n if(random.nextFloat() > 0.99) {\n Collectible power = new PowerUpSpikes(world, spikesTexture, vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n collectibles.add(power);\n } else {\n if(random.nextFloat() > 0.5) {\n Coin coin = new Coin(world, coinTexture, vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n collectibles.add(coin);\n }\n }\n }\n }\n\n currentTile.add(0, 1);\n\n Array<Tile>[] ret = new Array[2];\n ret[0] = grassRow;\n ret[1] = treeRow;\n\n return ret;\n } else if(rnd > 0.375) { // right\n if(currentTile.x < 5 && Math.abs(previousTile.x - currentTile.x) <= 2) {\n currentTile.add(1, 0);\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n }\n } else { // left\n if(currentTile.x > 1 && Math.abs(previousTile.x - currentTile.x) <= 2) {\n currentTile.add(-1, 0);\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n }\n }\n }\n\n return null; // will never happen\n }", "boolean canBuildDome(Tile t);", "@Override\n\tpublic void setChaseTarget(){\n\t\tthis.setTarget(_pacman.getX()+Constants.SQUARE_SIDE,_pacman.getY()-(4*Constants.SQUARE_SIDE));\n\t}", "private Tile getTile(int x, int y) {\n\t\tif (x < 0 || x > width || y < 0 || y > height) return Tile.VOID;\n\t\treturn Tile.tiles[tiles[x + y * width]];\n\t}", "int getTargetPos();", "@Test(timeout=2000)\n public void fullBoardMatch() {\n ThreesBoard board = new ThreesBoard(); \n \n for (int i = 0; i < ThreesBoard.ROWS; i++) {\n for (int j = 0; j < ThreesBoard.COLUMNS; j++) {\n board.set_tile(i, j, 1); \n }\n }\n board.set_tile(0, 0, 2);\n ThreesController threes = new ThreesController(board);\n threes.move_up();\n assertTrue(threes.getBoard().get_tile(0, 0).getValue() == 3);\n assertTrue(threes.getBoard().get_tile(1, 0).getValue() == 1);\n assertTrue(threes.getBoard().get_tile(2, 0).getValue() == 1);\n }", "public abstract TiledMapTileSet getTileSet();", "@Test\r\n\tpublic void testTargets11_2() {\r\n\t\tBoardCell cell = board.getCell(1, 1);\r\n\t\tboard.calcTargets(cell, 2);\r\n\t\tSet<BoardCell> targets = board.getTargets();\r\n\t\tassertTrue(targets != null);\r\n\t\tassertEquals(6, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCell(3, 1)));\r\n\t\tassertTrue(targets.contains(board.getCell(1, 3)));\r\n\t\tassertTrue(targets.contains(board.getCell(2, 2)));\r\n\t\tassertTrue(targets.contains(board.getCell(2, 0)));\r\n\t\tassertTrue(targets.contains(board.getCell(0, 2)));\r\n\t\tassertTrue(targets.contains(board.getCell(0, 0)));\r\n\r\n\t}", "@Test\n \tpublic void testTargetLocationLastVisited(){\n \t\tComputerPlayer player = new ComputerPlayer();\n \t\tplayer.setLastVistedRoom('B');\n \t\tint enteredRoom = 0;\n \t\tint loc_7_5Tot = 0;\n \t\tboard.calcTargets(6, 7, 3);\n \t\t//pick a location with at least one room as a target that already been visited\n \t\tfor(int i = 0; i < 100; i++) {\n \t\t\tBoardCell selected = player.pickLocation(board.getTargets());\n \t\t\tif (selected == board.getRoomCellAt(4, 6))\n \t\t\t\tenteredRoom++;\n \t\t\telse if (selected == board.getRoomCellAt(7, 5));\n \t\t}\n \t\t//ensure room is never taken\n \t\tAssert.assertEquals(enteredRoom, 0);\n \t\tAssert.assertTrue(loc_7_5Tot > 0);\n \t}", "private void getTileNumber() {\r\n int xtile = (int) Math.floor((coordinates.getLon() + 180) / 360 * (1 << zoom));\r\n int ytile = (int) Math.floor((1 - Math.log(Math.tan(Math.toRadians(coordinates.getLat())) + 1 / Math.cos(Math.toRadians(coordinates.getLat()))) / Math.PI) / 2 * (1 << zoom));\r\n\r\n if (xtile < 0) xtile = 0;\r\n\r\n if (xtile >= (1 << zoom)) xtile = ((1 << zoom) - 1);\r\n\r\n if (ytile < 0) ytile = 0;\r\n\r\n if (ytile >= (1 << zoom)) ytile = ((1 << zoom) - 1);\r\n\r\n this.xtile = xtile;\r\n this.ytile = ytile;\r\n }", "public void tiles()\n{\n if(m.getActiveManager() != 0)\n {\n m.hideButtonsOfManager(1);\n m.hideButtonsOfManager(2);\n m.showButtonsOfManager(0);\n m.activateManager(0);\n m.getTileManager().getActiveTile().setShowHover(true);\n }\n}", "void setTile(Tile tile) {\n _tile = tile;\n }", "public DirType getDir(Tile target) {\n // If the target is the same as our current location, that means no targets were reachable\n // We get all open tiles next to our head\n if (target.getX() == this.us_head_x && target.getY() == this.us_head_y) {\n if (print) System.out.println(\" PANIC!!\");\n List<Tile> options = this.gb.panicOpenTiles(target);\n\n // There are no open tiles next to our head\n if (options.size() == 0) { // Accept Death\n if (print) System.out.println(\" WE DIE!\");\n return DirType.South;\n\n // There are open tiles, so we find the one that results in the longest path\n } else {\n int longestPath = -1;\n Tile newTarget = target;\n\n // For every tile next to our head, find the longest path to a tile near us.\n // TODO maybe find a better target to aim for during this panic state?\n for (Tile t : options) {\n this.dk.setPanicMode();\n LinkedList<Tile> path = this.dk.path(target, t, gb);\n this.dk.undoPanicMode();\n\n // If a path exists, see if its longer than what we had before\n // TODO the idea of going for longest might mean it's easier to circle around us and kill us\n if (path == null) continue;\n int pathLength = path.size();\n if (this.print) System.out.println(pathLength);\n if (pathLength > longestPath) {\n newTarget = t;\n longestPath = pathLength;\n }\n }\n if (this.print) System.out.println();\n target = newTarget;\n }\n }\n\n // just use our head and target location to figure out which direction to move\n int dist_x = this.us_head_x - target.getX();\n int dist_y = this.us_head_y - target.getY();\n assert(dist_x != 0 && dist_y != 0);\n\n if (abs(dist_x) > abs(dist_y)) {\n if (dist_x > 0) {\n this.us_head_x -= 1;\n return DirType.West;\n } else {\n this.us_head_x += 1;\n return DirType.East;\n }\n } else if(dist_y > 0) {\n this.us_head_y -= 1;\n return DirType.North;\n } else {\n this.us_head_y += 1;\n return DirType.South;\n }\n\n }", "private void manageTestTarget(){ \n if(labelArray[TEST_TARGET_LOCATION].getIcon()==iconSet.getGrayIcon()){\n labelArray[TEST_TARGET_LOCATION].setIcon(iconSet.getTestTargetIcon());\n System.out.println(\"Test Start\");\n } \n else{\n testTargetDelay++;\n System.out.println(\"DELAY:\" + testTargetDelay);\n }\n }", "@Test\r\n\tpublic void testTargetsSixSteps() {\r\n\t\tboard.calcTargets(24, 17, 6);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(8, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(18, 17)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(20, 17)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(22, 17)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(19, 18)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(21, 18)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(23, 18)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(22, 19)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(22, 17)));\r\n\t\t\r\n\t}", "private void findChest() {\n\t\tchar[][] location = game.getPlayingmap().getLocation();\n//\t\tFighter fighter = (Fighter)game.getPlayingmap().getCellsinthemap()[character.xOfFighter][character.yOfFighter].getContent();\n\n\t\tif(character.xOfFighter-1>=0&&location[character.xOfFighter-1][character.yOfFighter]=='c'){\n\t\t\tChest chest = (Chest)game.getPlayingmap().getCellsinthemap()[character.xOfFighter-1][character.yOfFighter].getContent();\n\t\t\tcharacter.openChest(chest);\n\t\t\tif(chest.isEmpty()){\n\t\t\t\tgame.getPlayingmap().changeLocation(character.xOfFighter-1, character.yOfFighter, 'e');\n\t\t\t}\n\t\t}\n\t\telse if(character.xOfFighter+1<game.getPlayingmap().getRow()&&location[character.xOfFighter+1][character.yOfFighter]=='c'){\n\t\t\tChest chest = (Chest)game.getPlayingmap().getCellsinthemap()[character.xOfFighter+1][character.yOfFighter].getContent();\n\t\t\tcharacter.openChest(chest);\n\t\t\tif(chest.isEmpty()){\n\t\t\t\tgame.getPlayingmap().changeLocation(character.xOfFighter+1, character.yOfFighter, 'e');\n\t\t\t}\n\t\t}\n\t\telse if(character.yOfFighter-1>=0&&location[character.xOfFighter][character.yOfFighter-1]=='c'){\n\t\t\tChest chest = (Chest)game.getPlayingmap().getCellsinthemap()[character.xOfFighter][character.yOfFighter-1].getContent();\n\t\t\tcharacter.openChest(chest);\n\t\t\tif(chest.isEmpty()){\n\t\t\t\tgame.getPlayingmap().changeLocation(character.xOfFighter, character.yOfFighter-1, 'e');\n\t\t\t}\n\t\t}\n\t\telse if(character.yOfFighter+1<game.getPlayingmap().getColumn()&&location[character.xOfFighter][character.yOfFighter+1]=='c'){\n\t\t\tChest chest = (Chest)game.getPlayingmap().getCellsinthemap()[character.xOfFighter][character.yOfFighter+1].getContent();\n\t\t\tcharacter.openChest(chest);\n\t\t\tif(chest.isEmpty()){\n\t\t\t\tgame.getPlayingmap().changeLocation(character.xOfFighter, character.yOfFighter+1, 'e');\n\t\t\t}\n\t\t}\n\t}", "public void draw_Active_Tile(boolean b) {\n if (b) {\n mazeEditor.mazeDrawMode = DRAW_ACTIVE_TILE;\n\n Tog2.setState(false); \n Tog3.setState(false); \n Tog4.setState(false); \n Tog5.setState(false);\n Tog6.setState(false);\n Tog7.setState(false);\n }\n }", "public void getTilePressed(View v){\n numpressed = numpressed + 1;\n if(numpressed>4){\n myTurn = true;\n showToast(\"Override: Your turn!\");\n }\n if(myTurn || is_debug){\n numpressed = 0;\n if(!MultiplayerManager.getInstance().enoughTimeBetweenCommands()){\n showToast(\"Please wait a second before issueing another command\");\n return;\n }\n int id = v.getId();\n String resource = v.getResources().getResourceEntryName(id);\n String resource_str = resource.replace(\"square_\", \"\");\n int tile = Integer.parseInt(resource_str);\n\n if(bombIntent){\n if(tile!=myTile && tile!=opponentTile && !bombs_location.contains(tile) && !powerup_location.contains(tile)){\n canPlaceBomb = false;\n placeBomb(tile, false);\n return;\n }else{\n showToast(\"Cant place there\");\n }\n }\n /**\n * check if tile is valid\n */\n if((tile==myTile+1 || tile==myTile-1 || tile==myTile+10 || tile==myTile+11 || tile == myTile+9 || tile==myTile-10 || tile ==myTile-11 || tile == myTile-9) && tile != opponentTile){\n MoveTileSelf(tile);\n checkPowerups(tile);\n }else{\n showToast(\"Can't move there imbecile\");\n }\n }else{\n showToast(\"Wait for your turn imbecile\");\n }\n }", "public void TileClicked(MouseEvent e) {\n\t\tButton button;\n\t\tif(game.isDone()) {\n\t\t\treturn;\n\t\t}\n\t\tbutton = ((Button)e.getSource());\n\t\t//getting coordinates from button clicked, and tile model from that location\n\t\tString[] coordString = new String[2];\n\t\tcoordString = button.getId().split(\" . \");\n\t\tint x = Integer.parseInt(coordString[0]);\n\t\tint y = Integer.parseInt(coordString[1]);\n\t\tTile currTile = game.getTile(x, y);\n\t\t\n\t\t\n\t\tif(game.getRounds() == 0) {\n\t\t\tgame.placeBombs(x, y);\n\t\t\t// For testing.\n\t\t\t//System.out.println(game);\n\t\t\tstartTimer();\n\t\t}\n\t\t\n\t\tgame.incRounds();\n\t\t\n\t\t//in case the tile is already revealed\n\t\tif(currTile.isShown()) {\n\t\t\tflagSolver(x,y);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint tileMarker = currTile.getMarker();\n\t\t//for changing markers between blank, flag, and question mark\n\t\tif(e.getButton() == MouseButton.SECONDARY) {\n\t\t\tswitch(tileMarker) {\n\t\t\tcase 0:\n\t\t\t\tgame.incFlagCounter(1);\n\t\t\t\tImageView flag = new ImageView(new Image(\"public/images/\"+selectedTheme+\"/flag.png\"));\n\t\t\t\tflag.setFitHeight(30);\n\t\t\t\tflag.setFitWidth(30);\n\t\t\t\tbutton.setGraphic(flag);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tgame.incFlagCounter(-1);\n\t\t\t\tImageView qMark = new ImageView(new Image(\"public/images/\"+selectedTheme+\"/qMark.png\"));\n\t\t\t\tqMark.setFitHeight(20);\n\t\t\t\tqMark.setFitWidth(20);\n\t\t\t\tbutton.setGraphic(qMark);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tbutton.setGraphic(null);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbombLabel.setText(\"Flag: \" + game.getFlagCounter() + \"/\" + game.getNumOfBombs());\n\t\t\tcurrTile.incMarker();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//Calls unmarkedTile if the tile does not have a flag or question mark\n\t\tif (tileMarker == 0) {\n\t\t\tunmarkedTile(x, y, false);\n\t\t}\n\t}", "public void initTiles()\n {\n PropertiesManager props = PropertiesManager.getPropertiesManager(); \n String imgPath = props.getProperty(MahjongSolitairePropertyType.IMG_PATH);\n int spriteTypeID = 0;\n SpriteType sT;\n \n // WE'LL RENDER ALL THE TILES ON TOP OF THE BLANK TILE\n String blankTileFileName = props.getProperty(MahjongSolitairePropertyType.BLANK_TILE_IMAGE_NAME);\n BufferedImage blankTileImage = miniGame.loadImageWithColorKey(imgPath + blankTileFileName, COLOR_KEY);\n ((MahjongSolitairePanel)(miniGame.getCanvas())).setBlankTileImage(blankTileImage);\n \n // THIS IS A HIGHLIGHTED BLANK TILE FOR WHEN THE PLAYER SELECTS ONE\n String blankTileSelectedFileName = props.getProperty(MahjongSolitairePropertyType.BLANK_TILE_SELECTED_IMAGE_NAME);\n BufferedImage blankTileSelectedImage = miniGame.loadImageWithColorKey(imgPath + blankTileSelectedFileName, COLOR_KEY);\n ((MahjongSolitairePanel)(miniGame.getCanvas())).setBlankTileSelectedImage(blankTileSelectedImage);\n \n // FIRST THE TYPE A TILES, OF WHICH THERE IS ONLY ONE OF EACH\n // THIS IS ANALOGOUS TO THE SEASON TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeATiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_A_TILES);\n for (int i = 0; i < typeATiles.size(); i++)\n {\n String imgFile = imgPath + typeATiles.get(i); \n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID);\n initTile(sT, TILE_A_TYPE);\n spriteTypeID++;\n }\n \n // THEN THE TYPE B TILES, WHICH ALSO ONLY HAVE ONE OF EACH\n // THIS IS ANALOGOUS TO THE FLOWER TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeBTiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_B_TILES);\n for (int i = 0; i < typeBTiles.size(); i++)\n {\n String imgFile = imgPath + typeBTiles.get(i); \n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID);\n initTile(sT, TILE_B_TYPE);\n spriteTypeID++;\n }\n \n // AND THEN TYPE C, FOR WHICH THERE ARE 4 OF EACH \n // THIS IS ANALOGOUS TO THE CHARACTER AND NUMBER TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeCTiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_C_TILES);\n for (int i = 0; i < typeCTiles.size(); i++)\n {\n String imgFile = imgPath + typeCTiles.get(i);\n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID); \n for (int j = 0; j < 4; j++)\n {\n initTile(sT, TILE_C_TYPE);\n }\n spriteTypeID++;\n }\n }", "boolean canBuildBlock(Tile t);", "public static boolean terrain_has_flag(int terr, terrain_flag_id flag){\r\n\t\t\t //\t BV_ISSET(get_tile_type(terr)->flags, flag)\r\n\t\t\t return false;\r\n}", "@Test\n public void isONGroundTestTrue(){\n TileMap tileMap = new TileMap(24, 24, new byte[][]{{0,0}},new byte[][]{{1,1},{1,1},{1,1},{1,1}}, tilepath);\n Rect cBox = new Rect(2,2,24,22);\n assertEquals(true, tileMap.isOnGround(cBox));\n }", "public void drawTile() {\n\n }", "public void mediumMode(Boolean hitResult) throws LocationHitException{\r\n\t\tint x = ran.nextInt(9);\r\n\t\tint y = ran.nextInt(11);\r\n\r\n\t\tif (!hitResult && direction.isEmpty()) {\r\n\t\t\tboolean newHit = false;\r\n\t\t\twhile (!newHit) {\r\n\t\t\t\tif (Player.userGrid[x][y] == 2) {\r\n\t\t\t\t\tx = ran.nextInt(9);\r\n\t\t\t\t\ty = ran.nextInt(11);\r\n\t\t\t\t} else\r\n\t\t\t\t\tnewHit = true;\r\n\t\t\t}\r\n\t\t} else if (direction.isEmpty()) {\r\n\t\t\thitFound.add(hitX + \";\" + hitY);\r\n\t\t\tcounter++;\r\n\t\t\tif ((hitX + 1) < 9) {\r\n\t\t\t\tx = hitX + 1;\r\n\t\t\t\ty = hitY;\r\n\t\t\t\tdirection = \"HorizontalFront\";\r\n\t\t\t} else {\r\n\t\t\t\tx = hitX - 1;\r\n\t\t\t\ty = hitY;\r\n\t\t\t\tdirection = \"HorizontalBack\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (direction.equals(\"HorizontalFront\")) {\r\n\t\t\t\tint tempX = Integer.parseInt(hitFound.get(0).split(\";\")[0]);\r\n\t\t\t\tint tempY = Integer.parseInt(hitFound.get(0).split(\";\")[1]);\r\n\t\t\t\tif (hitResult && (hitX + 1 < 9)) {\r\n\t\t\t\t\tcounter++;\r\n\t\t\t\t\tx = hitX + 1;\r\n\t\t\t\t\ty = hitY;\r\n\t\t\t\t} else if (tempX > 0) {\r\n\t\t\t\t\tx = tempX - 1;\r\n\t\t\t\t\ty = tempY;\r\n\t\t\t\t\tdirection = \"HorizontalBack\";\r\n\t\t\t\t} else if ((Integer.parseInt(hitFound.get(0).split(\";\")[1]) + 1 < 11)) {\r\n\t\t\t\t\tx = Integer.parseInt(hitFound.get(0).split(\";\")[0]);\r\n\t\t\t\t\ty = Integer.parseInt(hitFound.get(0).split(\";\")[1]) + 1;\r\n\t\t\t\t\tdirection = \"VerticalFront\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tx = Integer.parseInt(hitFound.get(0).split(\";\")[0]);\r\n\t\t\t\t\ty = Integer.parseInt(hitFound.get(0).split(\";\")[1]) - 1;\r\n\t\t\t\t\tdirection = \"VerticalBack\";\r\n\t\t\t\t}\r\n\t\t\t} else if (direction.equals(\"HorizontalBack\")) {\r\n\t\t\t\tif (hitResult && (hitX > 0)) {\r\n\t\t\t\t\tcounter++;\r\n\t\t\t\t\tx = hitX - 1;\r\n\t\t\t\t\ty = hitY;\r\n\t\t\t\t} else if (Integer.parseInt(hitFound.get(0).split(\";\")[1]) + 1 < 11 && counter < 2) {\r\n\t\t\t\t\tx = Integer.parseInt(hitFound.get(0).split(\";\")[0]);\r\n\t\t\t\t\ty = Integer.parseInt(hitFound.get(0).split(\";\")[1]) + 1;\r\n\t\t\t\t\tdirection = \"VerticalFront\";\r\n\t\t\t\t} else if (counter < 2) {\r\n\t\t\t\t\tx = Integer.parseInt(hitFound.get(0).split(\";\")[0]);\r\n\t\t\t\t\ty = Integer.parseInt(hitFound.get(0).split(\";\")[1]) - 1;\r\n\t\t\t\t\tdirection = \"VerticalBack\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tx = ran.nextInt(9);\r\n\t\t\t\t\ty = ran.nextInt(11);\r\n\t\t\t\t\tdirection = \"\";\r\n\t\t\t\t\thitFound.clear();\r\n\t\t\t\t\tcounter = 0;\r\n\t\t\t\t}\r\n\t\t\t} else if (direction.equals(\"VerticalFront\") && counter < 2) {\r\n\t\t\t\tif (hitResult && (hitY + 1 < 11)) {\r\n\t\t\t\t\tx = hitX;\r\n\t\t\t\t\ty = hitY + 1;\r\n\t\t\t\t} else if (Integer.parseInt(hitFound.get(0).split(\";\")[1]) > 0) {\r\n\t\t\t\t\tx = Integer.parseInt(hitFound.get(0).split(\";\")[0]);\r\n\t\t\t\t\ty = Integer.parseInt(hitFound.get(0).split(\";\")[1]) - 1;\r\n\t\t\t\t\tdirection = \"VerticalBack\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tx = ran.nextInt(9);\r\n\t\t\t\t\ty = ran.nextInt(11);\r\n\t\t\t\t\tdirection = \"\";\r\n\t\t\t\t\thitFound.clear();\r\n\t\t\t\t\tcounter = 0;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (hitResult && (hitY > 0) && counter < 2) {\r\n\t\t\t\t\tx = hitX;\r\n\t\t\t\t\ty = hitY - 1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tx = ran.nextInt(9);\r\n\t\t\t\t\ty = ran.nextInt(11);\r\n\t\t\t\t\tdirection = \"\";\r\n\t\t\t\t\thitFound.clear();\r\n\t\t\t\t\tcounter = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\thitX = x;\r\n\t\thitY = y;\r\n\t\tString coordx = Integer.toString(x);\r\n\t\tString coordy = Integer.toString(y);\r\n\t\tint hitCoord[] = { x, y };\r\n\t\tsetCoords(hitCoord);\r\n\t\tif (Player.userGrid[x][y] == 1) {\r\n\t\t\t// change the grid value from 1 to 2 to signify hit\r\n\t\t\tPlayer.userGrid[x][y] = 2;\r\n\t\t\tif(!time1) {\r\n\t\t\t\ttimea=java.lang.System.currentTimeMillis();\r\n\t\t\t\ttime1=!time1;\r\n\t\t\t}else if(!time2) {\r\n\t\t\t\ttimeb=java.lang.System.currentTimeMillis();\r\n\t\t\t\t\ttime2=!time2;\r\n\t\t\t}else {\r\n\t\t\t\tdouble t=timeb-timea;\r\n\t\t\t\tif(t<3000) {\r\n\t\t\t\t\tsetScore(20);\r\n\t\t\t\t}\r\n\t\t\t\ttime1=false;\r\n\t\t\t\ttime2=false;\r\n\t\t\t\ttimea=0;\r\n\t\t\t\ttimeb=0;\r\n\t\t\t\t\r\n\t\t\t}//if time between consecutive hit is less than 3 seconds ,then bonus score\r\n\t\t\tsetScore(10);\r\n\t\t\tPlayer.coordinatesHit.add(coordx + \",\" + coordy);\r\n\t\t\tsetReply(\"It's a Hit!!!!!\");\r\n\t\t} else if (Player.userGrid[x][y] == 0) {\r\n\t\t\tPlayer.userGrid[x][y] = 3;\r\n\t\t\tsetScore(-1);\r\n\t\t\tsetReply(\"It's a miss!!!!!\");\r\n\t\t} else if (Player.userGrid[x][y] == 2 || Player.userGrid[x][y] == 3) {\r\n\t\t\tsetReply(\"The location has been hit earlier\");\r\n\t\t\t //throw new LocationHitException(\"The location has been hit earlier\");\r\n\t\t}\r\n\t}", "private void intelligentDecideMove() {\n\t\tMonster target=nearestEnemy();\r\n\t\tif(target!=null){\t\t\t\t//FIRST PRIORITY: pursue the target if it can be seen.\r\n\t\t\tswitchStates(PURSUIT);\r\n\t\t\ttargetTile=new Tile(target.currentTile);\r\n\t\t\t//saveMove();\r\n\t\t\tmonster.moveTowards(target);\r\n\t\t}\r\n\t\t\t\r\n\t\telse{\r\n\t\t\ttargetLostResponse();\r\n\t\t\t}\r\n\t}", "void loadCheckerBoard(int tileSize);", "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}", "final int getNextBuildTarget(int difficulty) {\n/* 1970 */ difficulty = Math.min(5, difficulty);\n/* 1971 */ int start = difficulty * 3;\n/* 1972 */ int templateFound = -1;\n/* */ int x;\n/* 1974 */ for (x = start; x < 17; x++) {\n/* */ \n/* 1976 */ if (this.epicTargetItems[x] <= 0L) {\n/* */ \n/* 1978 */ templateFound = x;\n/* */ \n/* */ break;\n/* */ } \n/* */ } \n/* 1983 */ if (templateFound == -1)\n/* */ {\n/* */ \n/* 1986 */ for (x = start; x > 0; x--) {\n/* */ \n/* 1988 */ if (this.epicTargetItems[x] <= 0L) {\n/* */ \n/* 1990 */ templateFound = x;\n/* */ \n/* */ break;\n/* */ } \n/* */ } \n/* */ }\n/* 1996 */ if (templateFound > -1) {\n/* */ \n/* 1998 */ if (templateFound < 3)\n/* 1999 */ return 717; \n/* 2000 */ if (templateFound < 6)\n/* 2001 */ return 714; \n/* 2002 */ if (templateFound < 9)\n/* 2003 */ return 713; \n/* 2004 */ if (templateFound < 12)\n/* 2005 */ return 715; \n/* 2006 */ if (templateFound < 15) {\n/* 2007 */ return 712;\n/* */ }\n/* 2009 */ return 716;\n/* */ } \n/* 2011 */ return -1;\n/* */ }", "@Override\n public SquareTile getTile(Point location) {\n return getTile(location.getX(), location.getY());\n }", "@Test\n \tpublic void testTargetLocationAlwaysSelected() {\n \t\tComputerPlayer player = new ComputerPlayer();\n \t\tplayer.setLastVistedRoom('L');\n \t\tint enteredRoom = 0;\n \t\tboard.calcTargets(6, 7, 4);\n \t\t//pick location with at least one room as a target\n \t\tfor(int i = 0; i < 100; i++) {\n \t\t\tBoardCell selected = player.pickLocation(board.getTargets());\n \t\t\tif (selected == board.getRoomCellAt(4, 6))\n \t\t\t\tenteredRoom++;\n \t\t}\n \t\t//ensure room is taken every time\n \t\tAssert.assertEquals(enteredRoom, 100);\n \t}", "public void buildMap() {\n // CUBES ENGINE INITIALIZATION MOVED TO APPSTATE METHOD\n // Here we init cubes engine\n CubesTestAssets.registerBlocks();\n CubesSettings blockSettings = CubesTestAssets.getSettings(this.app);\n blockSettings.setBlockSize(5);\n //When blockSize = 5, global coords should be multiplied by 3 \n this.blockScale = 3.0f;\n this.halfBlockStep = 0.5f;\n \n testTerrain = new BlockTerrainControl(CubesTestAssets.getSettings(this.app), new Vector3Int(4, 1, 4));\n testNode = new Node();\n int wallHeight = 3;\n //testTerrain.setBlockArea(new Vector3Int(0, 0, 0), new Vector3Int(32, 1, 64), CubesTestAssets.BLOCK_STONE);\n this.testTerrain.setBlockArea( new Vector3Int(3,0,43), new Vector3Int(10,1,10), CubesTestAssets.BLOCK_STONE); // Zone 1 Floor\n this.testTerrain.setBlockArea( new Vector3Int(3,1,43), new Vector3Int(10,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // South Wall\n this.testTerrain.setBlockArea( new Vector3Int(3,1,52), new Vector3Int(10,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // North Wall\n this.testTerrain.setBlockArea( new Vector3Int(3,1,43), new Vector3Int(1,wallHeight,10), CubesTestAssets.BLOCK_WOOD); // West Wall\n this.testTerrain.setBlockArea( new Vector3Int(12,1,43), new Vector3Int(1,wallHeight,10), CubesTestAssets.BLOCK_WOOD); // East Wall\n \n this.testTerrain.removeBlockArea( new Vector3Int(12,1,46), new Vector3Int(1,wallHeight,4)); // Door A\n \n this.testTerrain.setBlockArea( new Vector3Int(12,0,45), new Vector3Int(13,1,6), CubesTestAssets.BLOCK_STONE); // Zone 2 Floor A\n this.testTerrain.setBlockArea( new Vector3Int(12,1,45), new Vector3Int(8,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // South Wall\n this.testTerrain.setBlockArea( new Vector3Int(12,1,50), new Vector3Int(13,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // North Wall\n this.testTerrain.setBlockArea(new Vector3Int(19,0,42), new Vector3Int(6,1,3), CubesTestAssets.BLOCK_STONE); // Zone 2 Floor B\n this.testTerrain.setBlockArea( new Vector3Int(19,1,42), new Vector3Int(1,wallHeight,3), CubesTestAssets.BLOCK_WOOD); //\n this.testTerrain.setBlockArea( new Vector3Int(24,1,42), new Vector3Int(1,wallHeight,9), CubesTestAssets.BLOCK_WOOD); //\n \n this.testTerrain.setBlockArea( new Vector3Int(15,0,26), new Vector3Int(18,1,17), CubesTestAssets.BLOCK_STONE); // Zone 3 Floor\n this.testTerrain.setBlockArea( new Vector3Int(15,1,42), new Vector3Int(18,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // South Wall\n this.testTerrain.setBlockArea( new Vector3Int(15,1,26), new Vector3Int(18,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // North Wall\n this.testTerrain.setBlockArea( new Vector3Int(15,1,26), new Vector3Int(1,wallHeight,17), CubesTestAssets.BLOCK_WOOD); // West Wall\n this.testTerrain.setBlockArea( new Vector3Int(32,1,26), new Vector3Int(1,wallHeight,17), CubesTestAssets.BLOCK_WOOD); // East Wall\n \n this.testTerrain.removeBlockArea( new Vector3Int(20,1,42), new Vector3Int(4,wallHeight,1)); // Door B\n this.testTerrain.removeBlockArea( new Vector3Int(15,1,27), new Vector3Int(1,wallHeight,6)); // Door C\n \n this.testTerrain.setBlockArea( new Vector3Int(10,0,26), new Vector3Int(5,1,8), CubesTestAssets.BLOCK_STONE); // Zone 4 Floor A\n this.testTerrain.setBlockArea( new Vector3Int(10,1,26), new Vector3Int(5,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // South Wall\n this.testTerrain.setBlockArea( new Vector3Int(3,0,18), new Vector3Int(8,1,16), CubesTestAssets.BLOCK_STONE); // Zone 4 Floor B\n this.testTerrain.setBlockArea( new Vector3Int(3,1,18), new Vector3Int(1,wallHeight,16), CubesTestAssets.BLOCK_WOOD); // East Wall\n this.testTerrain.setBlockArea( new Vector3Int(10,1,18), new Vector3Int(1,wallHeight,9), CubesTestAssets.BLOCK_WOOD); // West Wall\n this.testTerrain.setBlockArea( new Vector3Int(3,1,33), new Vector3Int(13,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // North Wall\n \n this.testTerrain.setBlockArea( new Vector3Int(1,0,5), new Vector3Int(26,1,14), CubesTestAssets.BLOCK_STONE); // Zone 5\n this.testTerrain.setBlockArea( new Vector3Int(1,1,18), new Vector3Int(26,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // South Wall\n this.testTerrain.setBlockArea( new Vector3Int(1,1,5), new Vector3Int(26,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // North Wall\n this.testTerrain.setBlockArea( new Vector3Int(1,1,5), new Vector3Int(1,wallHeight,14), CubesTestAssets.BLOCK_WOOD); // West Wall\n this.testTerrain.setBlockArea( new Vector3Int(26,1,5), new Vector3Int(1,wallHeight,14), CubesTestAssets.BLOCK_WOOD); // East Wall\n \n this.testTerrain.removeBlockArea( new Vector3Int(4,1,18), new Vector3Int(6,wallHeight,1)); // Door E\n \n // Populate the world with spawn points\n this.initSpawnPoints();\n \n //Add voxel world/map to collisions\n testTerrain.addChunkListener(new BlockChunkListener(){\n @Override\n public void onSpatialUpdated(BlockChunkControl blockChunk){\n Geometry optimizedGeometry = blockChunk.getOptimizedGeometry_Opaque();\n phyTerrain = optimizedGeometry.getControl(RigidBodyControl.class);\n if(phyTerrain == null){\n phyTerrain = new RigidBodyControl(0);\n optimizedGeometry.addControl(phyTerrain);\n bulletAppState.getPhysicsSpace().add(phyTerrain);\n }\n phyTerrain.setCollisionShape(new MeshCollisionShape(optimizedGeometry.getMesh()));\n }\n });\n \n testNode.addControl(testTerrain);\n rootNode.attachChild(testNode);\n }", "public boolean tileReachObjectives(float xTile, float yTile)\r\n/* 122: */ {\r\n/* 123:136 */ return (!tileInBounds(xTile, yTile)) || \r\n/* 124:137 */ (this.reach[((int)xTile)][((int)yTile)] != 0);\r\n/* 125: */ }", "private boolean isTargetTerritoryOneBlockAway() {\n for(Territory territory:getCurrentPlayerTerritories()) {\n if(Math.abs(territory.getID()-selectedTerritoryByPlayer.getID()) == 1) {\n int minID = Math.min(territory.getID(),selectedTerritoryByPlayer.getID());\n int maxID = Math.max(territory.getID(),selectedTerritoryByPlayer.getID());\n if(maxID % gameDescriptor.getColumns() == 0)\n return true;\n if((minID % gameDescriptor.getColumns() != 0 )\n && (minID / gameDescriptor.getColumns() == maxID / gameDescriptor.getColumns())) {\n return true;\n }\n }\n else if(Math.abs(territory.getID()-selectedTerritoryByPlayer.getID()) == gameDescriptor.getColumns())\n return true;\n }\n return false;\n }", "public void select(int x, int y)\r\n {\r\n _ausgewahlt = new Tile(x * 64, y * 64, 64, 64,\r\n TileType.EditorAusgewahlt);\r\n }", "public void setAdjacent()\r\n {\n \t\r\n adjacentTiles = new Tile[6];\r\n \r\n \r\n //Driver.map[VERT][HOR]\r\n \r\n if(verticalPos < Driver.map.length && horizontalPos > 1) //topleft\r\n {\r\n \ttopLeft = Driver.map[verticalPos + 1][horizontalPos - 1];\r\n }\r\n else\r\n {\r\n \ttopLeft = null;\r\n }\r\n \r\n if(verticalPos < Driver.map.length - 2) //top\r\n {\r\n \ttop = Driver.map[verticalPos + 2][horizontalPos];\r\n }\r\n else\r\n {\r\n \ttop = null;\r\n }\r\n \r\n if(verticalPos < Driver.map.length && horizontalPos < Driver.map[0].length) //topright\r\n {\r\n \ttopRight = Driver.map[verticalPos + 1][horizontalPos + 1];\r\n }\r\n else\r\n {\r\n \ttopRight = null;\r\n }\r\n \r\n if(verticalPos > 1 && horizontalPos < Driver.map[0].length) //bottomright\r\n {\r\n \tbottomRight = Driver.map[verticalPos - 1][horizontalPos + 1];\r\n }\r\n else\r\n {\r\n \tbottomRight = null;\r\n }\r\n \r\n if(verticalPos > 2) //bottom\r\n {\r\n \tbottom = Driver.map[verticalPos - 2][horizontalPos];\r\n }\r\n else\r\n {\r\n \tbottom = null;\r\n }\r\n \r\n if(verticalPos > 1 && horizontalPos > 1) //botttomLeft\r\n {\r\n \tbottomLeft = Driver.map[verticalPos - 1][horizontalPos - 1];\r\n }\r\n else\r\n {\r\n \tbottomLeft = null;\r\n }\r\n \t\r\n \r\n adjacentTiles[0] = topLeft;\r\n adjacentTiles[1] = top;\r\n adjacentTiles[2] = topRight;\r\n adjacentTiles[3] = bottomRight;\r\n adjacentTiles[4] = bottom;\r\n adjacentTiles[5] = bottomLeft;\r\n \r\n \r\n// System.out.print(\"main tile \" + getHor() + \", \" + getVert() + \" \");\r\n// for(int i = 0; i < adjacentTiles.length; i++)\r\n// {\r\n// \tif( adjacentTiles[i] != null)\r\n// \t\tSystem.out.print(adjacentTiles[i].getHor() + \", \" + adjacentTiles[i].getVert() + \" | \");\r\n// \telse\r\n// \t\tSystem.out.print(\"null \");\r\n// }\r\n// System.out.println();\r\n \r\n }", "private void updateCurrentTarget(){\n switch (state){\n case States.DEAD:\n currentTarget = currentLocation;\n break;\n case States.FIGHT:\n if (targetEnemy != null)\n currentTarget = targetEnemy.getCurrentLocation();\n else\n currentTarget = targetBuilding.getLocation();\n break;\n case States.RETREAT:\n currentTarget = new Point(20,20);\n break;\n case States.LOSS:\n currentTarget = new Point(20,20);\n break;\n case States.WIN:\n currentTarget = village.getCenter();\n break;\n case States.IDLE:\n currentTarget = targetBuilding.getLocation();\n }\n }", "private Tile getTileAt(int x, int y)\n {\n int tileAt = y * TILES_PER_ROW + x;\n \n if (tileAt >= tileset.getTileCount())\n {\n return null;\n }\n else \n {\n return tileset.getTile(tileAt);\n }\n }" ]
[ "0.6266805", "0.6107562", "0.60909", "0.60204095", "0.59964275", "0.5940218", "0.5927368", "0.5926041", "0.5922961", "0.5907922", "0.5896205", "0.5846246", "0.58330685", "0.58167034", "0.5814039", "0.5789544", "0.5720865", "0.57173896", "0.5686154", "0.5653526", "0.56527925", "0.56516683", "0.5587843", "0.5571684", "0.55520487", "0.55160946", "0.55085045", "0.55068576", "0.5503566", "0.547477", "0.5468899", "0.5462426", "0.54567367", "0.54559904", "0.5447567", "0.54460394", "0.54314864", "0.5425031", "0.5406348", "0.5405648", "0.5389044", "0.5374177", "0.53725034", "0.53639257", "0.53537714", "0.5351181", "0.53355676", "0.53243226", "0.5315347", "0.53121924", "0.5311807", "0.5310329", "0.5302942", "0.53024286", "0.52999365", "0.529354", "0.52905166", "0.52886844", "0.5286488", "0.52782285", "0.5264505", "0.52610797", "0.5260781", "0.5255941", "0.52555406", "0.5248863", "0.5244496", "0.52392405", "0.5237787", "0.5234568", "0.52307874", "0.52285105", "0.5226056", "0.522601", "0.522518", "0.5222446", "0.52176535", "0.5217354", "0.5215669", "0.5211456", "0.52068186", "0.5205518", "0.5201668", "0.52011013", "0.5200147", "0.51994133", "0.5197662", "0.51974905", "0.51971847", "0.51949525", "0.51889694", "0.5183491", "0.51778334", "0.51774055", "0.5175542", "0.51676774", "0.5160412", "0.51585996", "0.51560605", "0.5153342", "0.51505107" ]
0.0
-1
Changes direction at corner
private Direction.directionType turnDirection (int x, int y, int dx, int dy) { if (connectedTiles[y + dx][x + dy] != null) return Direction.intPairToDirection(new IntPair(dy, dx)); return Direction.intPairToDirection(new IntPair(-dy, -dx)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void changeDirection();", "public void setDirection() {\n\t\tdouble randomDirection = randGen.nextDouble();\n\t\tif (randomDirection < .25) {\n\t\t\tthis.xDirection = 1;\n\t\t\tthis.yDirection = -1;\n\t\t} else if (randomDirection < .5) {\n\t\t\tthis.xDirection = -1;\n\t\t\tthis.yDirection = -1;\n\t\t} else if (randomDirection < .75) {\n\t\t\tthis.xDirection = -1;\n\t\t\tthis.yDirection = 1;\n\t\t} else {\n\t\t\tthis.xDirection = 1;\n\t\t\tthis.yDirection = 1;\n\t\t}\n\t}", "private Coordinate flipCorner(int cornerState) {\n Coordinate coordinate;\n coordinate = centerPointCoordinate;\n if (cornerState == 0) {\n angle = 180 + angle;\n } else if (cornerState == 1) {\n angle = 180 - angle;\n } else if (cornerState == 2) {\n angle = 180 - angle;\n } else if (cornerState == 3) {\n angle = 180 + angle;\n }\n return coordinate;\n }", "abstract void setDirection(double x, double y, double z);", "public void setDirectionMove(double direction);", "public void display()\n {\n if(corner == 1)\n {\n moveTo(new Location(0,0));\n setDirection(135);\n }\n else if(corner == 2)\n {\n moveTo(new Location(0,9));\n setDirection(225);\n }\n else if(corner == 3)\n {\n moveTo(new Location(9,9));\n setDirection(315);\n }\n else if(corner == 4)\n {\n moveTo(new Location(9,0));\n setDirection(45);\n }\n }", "public abstract void setDirection(int dir);", "private void setDirection() {\r\n\t\tif (destinationFloor > initialFloor){\r\n\t\t\tdirection = 1;\r\n\t\t} else {\r\n\t\t\tdirection = -1;\r\n\t\t}\r\n\t}", "public void setCornering(double cornering) {\r\n this.cornering = cornering;\r\n }", "private void setDirection() {\n directionX = corePos.getX() - projectile.getX();\n directionY = corePos.getY() - projectile.getY();\n\n double length = Math.sqrt(directionX*directionX + directionY*directionY);\n\n if (length != 0) {\n directionX = directionX/length;\n directionY = directionY/length;\n }\n }", "public void reverseDirection() {\n\t\tdirection *= -1;\n\t\ty += 10;\n\t}", "private void turnAround() {\r\n this.setCurrentDirection(-getCurrentDirection());\r\n }", "private void turnToDesiredDirection() {\n\n\t\tdouble dir = sens.getDirection();\n\n\t\tif (dir < desiredDirection) {\n\t\t\tif (Math.abs(dir - desiredDirection) < 180) {\n\t\t\t\tdir += TURNSPEED;\n\t\t\t} else {\n\t\t\t\tdir -= TURNSPEED;\n\t\t\t}\n\t\t} else {\n\t\t\tif (Math.abs(dir - desiredDirection) < 180) {\n\t\t\t\tdir -= TURNSPEED;\n\t\t\t} else {\n\t\t\t\tdir += TURNSPEED;\n\t\t\t}\n\t\t}\n\t\t\n\t\tsens.setDirection(dir);\n\t\t\n\t}", "public void updateDirectionView();", "@Override\n protected Utils.Direction getRoverPlaceholderDirection() {\n return (Utils.isCornerLeft(mCurrentCorner) )?\n Utils.Direction.Right : Utils.Direction.Left;\n }", "public void updateDirectionFace();", "public void move(){\n super.move();\n if(getX() >= Main.WIDTH - getWidth() * 1.5) {\n setDirection(-1);\n } else if(getX() <= 50) {\n setDirection(1);\n }\n }", "private void rotate() {\n byte tmp = topEdge;\n topEdge = leftEdge;\n leftEdge = botEdge;\n botEdge = rightEdge;\n rightEdge = tmp;\n tmp = reversedTopEdge;\n reversedTopEdge = reversedLeftEdge;\n reversedLeftEdge = reversedBotEdge;\n reversedBotEdge = reversedRightEdge;\n reversedRightEdge = tmp;\n tmp = ltCorner;\n ltCorner = lbCorner;\n lbCorner = rbCorner;\n rbCorner = rtCorner;\n rtCorner = tmp;\n\n }", "private void turnRight() {\n\n if(currentPosition.getX() == -1 && currentPosition.getY() == -1) {\n System.out.println(\"Robot is not placed, yet.\");\n return;\n }\n\n Position.Direction direction = currentPosition.getDirection();\n switch (direction) {\n case EAST:\n direction = Position.Direction.SOUTH;\n break;\n case WEST:\n direction = Position.Direction.NORTH;\n break;\n case NORTH:\n direction = Position.Direction.EAST;\n break;\n case SOUTH:\n direction = Position.Direction.WEST;\n break;\n }\n\n currentPosition.setDirection(direction);\n }", "public void turnRight() {\r\n setDirection( modulo( myDirection+1, 4 ) );\r\n }", "public void changeDirection()\n {\n if(goLeft){\n goLeft = false;\n }else{\n goLeft = true;\n }\n }", "@Override\r\n\tpublic void rotateRight() {\n\t\tfinal int THETA = 10;\r\n\t\tint dir = this.getDirection();\r\n\t\tthis.setDirection(dir + THETA);\r\n\t\t\r\n\t}", "public void doLocalization(int corner){\r\n\t\t\r\n\t\tusLocalizerDone=false;\r\n\t\tdetermineLocType();\r\n\t\tif (loc == LocalizerType.FALLING_EDGE) {\r\n\t\t\t//go to see the back wall\r\n\t\t\tturnToNoWall(Navigation.Turn.CLOCK_WISE);\r\n\t\t\tturnToWall(Navigation.Turn.CLOCK_WISE);\r\n\t\t\tdouble angle1 = odo.getTheta(); //Record back wall angle\r\n\t\t\t//go to see the left wall\r\n\t\t\tturnToNoWall(Navigation.Turn.COUNTER_CLOCK_WISE);\r\n\t\t\tturnToWall(Navigation.Turn.COUNTER_CLOCK_WISE);\r\n\t\t\tdouble angle2 = odo.getTheta(); //Record left wall angle\r\n\t\t\t//compute the difference\r\n\t\t\tdouble angle = Math.toDegrees(getDiffAngle(Math.toRadians(angle1), Math.toRadians(angle2))) / 2 + angle1;\r\n\t\t\t//set the new calculated theta\r\n\t\t\todo.setTheta(odo.getTheta() +225 - angle); //reset angle\r\n\t\t\t\r\n\t\t} else if (loc == LocalizerType.RISING_EDGE) {\r\n\t\t\t//go to see the back wall\r\n\t\t\tturnToWall(Navigation.Turn.CLOCK_WISE);\r\n\t\t\tturnToNoWall(Navigation.Turn.COUNTER_CLOCK_WISE);\r\n\t\t\tdouble angle1 = odo.getTheta();\t//Back wall angle\r\n\t\t\t//go to see the left wall\r\n\t\t\tturnToWall(Navigation.Turn.CLOCK_WISE);\r\n\t\t\tturnToNoWall(Navigation.Turn.CLOCK_WISE);\r\n\t\t\tdouble angle2 = odo.getTheta(); //Left wall angle\r\n\t\t\t//compute the difference\r\n\t\t\tdouble angle = Math.toDegrees(getDiffAngle(Math.toRadians(angle1), Math.toRadians(angle2))) / 2 + angle1;\r\n\t\t\t//set the new calculated theta\r\n\t\t\todo.setTheta(odo.getTheta() +225 - angle); //reset angle\r\n\t\t}\r\n\t\t//Adjust the theta depending on what the corner is\r\n\t\todo.setTheta(odo.getTheta()-90*corner);\r\n\t\tusLocalizerDone=true;\r\n\t}", "public void setDirection(int dir)\r\n\t{\r\n\t\tdirection = dir;\r\n\t}", "public void setCorner(String paramString, Component paramComponent) {\n/* */ Component component;\n/* 1234 */ boolean bool = getComponentOrientation().isLeftToRight();\n/* 1235 */ if (paramString.equals(\"LOWER_LEADING_CORNER\")) {\n/* 1236 */ paramString = bool ? \"LOWER_LEFT_CORNER\" : \"LOWER_RIGHT_CORNER\";\n/* 1237 */ } else if (paramString.equals(\"LOWER_TRAILING_CORNER\")) {\n/* 1238 */ paramString = bool ? \"LOWER_RIGHT_CORNER\" : \"LOWER_LEFT_CORNER\";\n/* 1239 */ } else if (paramString.equals(\"UPPER_LEADING_CORNER\")) {\n/* 1240 */ paramString = bool ? \"UPPER_LEFT_CORNER\" : \"UPPER_RIGHT_CORNER\";\n/* 1241 */ } else if (paramString.equals(\"UPPER_TRAILING_CORNER\")) {\n/* 1242 */ paramString = bool ? \"UPPER_RIGHT_CORNER\" : \"UPPER_LEFT_CORNER\";\n/* */ } \n/* 1244 */ if (paramString.equals(\"LOWER_LEFT_CORNER\")) {\n/* 1245 */ component = this.lowerLeft;\n/* 1246 */ this.lowerLeft = paramComponent;\n/* */ }\n/* 1248 */ else if (paramString.equals(\"LOWER_RIGHT_CORNER\")) {\n/* 1249 */ component = this.lowerRight;\n/* 1250 */ this.lowerRight = paramComponent;\n/* */ }\n/* 1252 */ else if (paramString.equals(\"UPPER_LEFT_CORNER\")) {\n/* 1253 */ component = this.upperLeft;\n/* 1254 */ this.upperLeft = paramComponent;\n/* */ }\n/* 1256 */ else if (paramString.equals(\"UPPER_RIGHT_CORNER\")) {\n/* 1257 */ component = this.upperRight;\n/* 1258 */ this.upperRight = paramComponent;\n/* */ } else {\n/* */ \n/* 1261 */ throw new IllegalArgumentException(\"invalid corner key\");\n/* */ } \n/* 1263 */ if (component != null) {\n/* 1264 */ remove(component);\n/* */ }\n/* 1266 */ if (paramComponent != null) {\n/* 1267 */ add(paramComponent, paramString);\n/* */ }\n/* 1269 */ firePropertyChange(paramString, component, paramComponent);\n/* 1270 */ revalidate();\n/* 1271 */ repaint();\n/* */ }", "private void rotateRight() {\r\n\t switch(direction){\r\n\t case Constants.DIRECTION_NORTH:\r\n\t direction = Constants.DIRECTION_EAST;\r\n\t break;\r\n\t case Constants.DIRECTION_EAST:\r\n\t direction = Constants.DIRECTION_SOUTH;\r\n\t break;\r\n\t case Constants.DIRECTION_SOUTH:\r\n\t direction = Constants.DIRECTION_WEST;\r\n\t break;\r\n\t case Constants.DIRECTION_WEST:\r\n\t direction = Constants.DIRECTION_NORTH;\r\n\t break;\r\n\t }\r\n\t }", "private void flip()\r\n\t{\r\n\t\tif(heading == Direction.WEST)\r\n\t\t{\r\n\t\t\tsetDirection(Direction.EAST);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tsetDirection(Direction.WEST);\r\n\t\t}\r\n\t}", "private void fixDirections() {\n\t\tdouble sensDir = sens.getDirection();\n\t\tif (sensDir > 360) {\n\t\t\tsensDir -= 360;\n\t\t} // Rotate back around to keep it tidy\n\t\telse if (sensDir < 1) {\n\t\t\tsensDir += 360;\n\t\t}\n\t\tsens.setDirection(sensDir);\n\n\t\tif (desiredDirection > 360) {\n\t\t\tdesiredDirection -= 360;\n\t\t} // Rotate back around to keep it tidy\n\t\telse if (desiredDirection < 1) {\n\t\t\tdesiredDirection += 360;\n\t\t}\n\t}", "public void act() \n {\n move(-2);\n if(isAtEdge())\n {\n turn(180);\n getImage().mirrorVertically();\n }\n }", "public void turnRight()\r\n\t{\r\n\t\theading += 2; //JW\r\n\t\t//Following the camera\r\n\t\t//heading += Math.sin(Math.toRadians(15)); \r\n\t\t//heading += Math.cos(Math.toRadians(15));\r\n\t}", "private void rotate(int direction){\n\t\t//Gdx.app.debug(TAG, \"rotating, this.x: \" + this.x + \", this.y: \" + this.y);\n\t\tif (direction == 1 || direction == -1){\n\t\t\tthis.orientation = (this.orientation + (direction*-1) + 4) % 4;\n\t\t\t//this.orientation = (this.orientation + direction) % 4;\n\t\t} else{\n\t\t\tthrow new RuntimeException(\"Tile invalid direction\");\n\t\t}\n\t}", "public void right(){\n\t\tmoveX=1;\n\t\tmoveY=0;\n\t}", "public void setDirection(float directionDegree);", "public void setDirection() {\n frontLeft.setDirection(DcMotorSimple.Direction.REVERSE);\n backLeft.setDirection(DcMotorSimple.Direction.REVERSE);\n frontRight.setDirection(DcMotorSimple.Direction.FORWARD);\n backRight.setDirection(DcMotorSimple.Direction.FORWARD);\n }", "protected void nextDirection()\n {\n if (this.lastKeyDirection == Canvas.LEFT)\n {\n this.lastKeyDirection = keyDirection = Canvas.RIGHT;\n xTotalDistance = 0;\n //yTotalDistance = 0;\n }\n else if (this.lastKeyDirection == Canvas.RIGHT)\n {\n this.lastKeyDirection = keyDirection = Canvas.LEFT;\n xTotalDistance = 0;\n //yTotalDistance = 0;\n }\n }", "void setDirections(Directions dir){\n this.dir = dir;\n }", "public void direction()\n {\n if(!goLeft){\n horzVelocity = 1;\n }else{\n horzVelocity = -1;\n }\n }", "public void moveUporDown(int direction)\n\t{\n\t\tif (this.direction == direction || this.direction == -direction)\n\t\t\treturn ;\n\t\tthis.direction = direction;\n\t\tdirx = 0;\n\t\tdiry = 0;\n\t\tif (direction == 1 || direction == -1)\n\t\t\tdirx = direction;\n\t\telse\n\t\t\tdiry = direction / 2;\n\t}", "private void makeMove(){\r\n\t\tif(cornerColorIs(GREEN)){\r\n\t\t\tif(noBeepersPresent()){\r\n\t\t\t\tmove();\r\n\t\t\t\tpaintCorner(GREEN);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\tif(noBeepersPresent()){\r\n\t\t\t\tmove();\r\n\t\t\t\tpaintCorner(RED);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n//\t\tif(()) {\r\n//\t\t if(cornerColorIs(GREEN)) {\r\n//\t\t move();\r\n//\t\t paintCorner(GREEN);\r\n//\t\t } else {\r\n//\t\t move();\r\n//\t\t paintCorner(RED);\r\n//\t\t }\r\n//\t\t}noBeepersPresent\r\n\t}", "static void changeDirectionBackwards() {\n\n if(--direction == -1)\n direction = 3;\n }", "private void updateDirection()\n {\n if (Math.abs(InputSystem.LT_Button_Control_Stick) > 0.1)\n {\n // if lt button is pressed, reverse direction of elevator\n setReverseDirection(true);\n }\n else\n {\n setReverseDirection(false);\n }\n }", "void moveRight() {\n\t\tsetX(x+1);\r\n\t\tdx=1;\r\n\t\tdy=0;\r\n\t}", "@Override\r\n\tpublic void rotateRight() {\n\t\tsetDirection((this.getDirection() + 1) % 4);\r\n\t}", "public void cornersMovedToFocus() {\n int shift = context.getResources().getDisplayMetrics().densityDpi >= 640 ? 400 : 300;\n setMarginLayout(findViewById(R.id.corner_left_top), cornerPositions.getLeftTop().x + shift, cornerPositions.getLeftTop().y + shift);\n setMarginLayout(findViewById(R.id.corner_left_bottom), cornerPositions.getLeftBottom().x + shift, cornerPositions.getLeftBottom().y - shift);\n setMarginLayout(findViewById(R.id.corner_right_top), cornerPositions.getRightTop().x - shift, cornerPositions.getRightTop().y + shift);\n setMarginLayout(findViewById(R.id.corner_right_bottom), cornerPositions.getRightBottom().x - shift, cornerPositions.getRightBottom().y - shift);\n }", "public void stepForwad() {\n\t\t\t\n\t\t\tswitch(this.direction) {\n\t\t\t\tcase 0:\n\t\t\t\t\tthis.y += 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tthis.x += 1;\n\t\t\t\t\tthis.y += 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tthis.x += 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tthis.x += 1;\n\t\t\t\t\tthis.y -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tthis.y -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tthis.x -= 1;\n\t\t\t\t\tthis.y -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tthis.x -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7: \n\t\t\t\t\tthis.x -= 1;\n\t\t\t\t\tthis.y += 1;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tthis.x = (this.worldWidth + this.x)%this.worldWidth;\n\t\t\tthis.y = (this.worldHeight + this.y)%this.worldHeight;\n\t\t}", "private void turnClockwise(){\n\t\tswitch(this.facingDirection){\n\t\tcase NORTH:\n\t\t\tfacingDirection = Direction.EAST;\n\t\t\tbreak;\n\t\tcase SOUTH:\n\t\t\tfacingDirection = Direction.WEST;\n\t\t\tbreak;\n\t\tcase WEST:\n\t\t\tfacingDirection = Direction.NORTH;\n\t\t\tbreak;\n\t\tcase EAST:\n\t\t\tfacingDirection = Direction.SOUTH;\n\t\t}\n\t}", "public void turnRight() {\n\t\tthis.setSteeringDirection(getSteeringDirection()+5);\n\t}", "public void move(){\n x+=xDirection;\n y+=yDirection;\n }", "public Direction reverse()\n {\n return new Direction(dirInDegrees + (FULL_CIRCLE / 2));\n }", "public void changeDirection() {\n\t\t// Define the direction we want to change from as our current direction.\n\t\tfinal float oldDirection = this.requiredSwipeDirection;\n\t\t// While our swipe direction is the direction we want to change from,\n\t\twhile (this.requiredSwipeDirection == oldDirection)\n\t\t\t// Set our SwipeTile's direction to a random direction.\n\t\t\tsetDirection(SwipeTile.randomDirection());\n\t}", "void reverseDirection();", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\tif (angle < rightAngle) {\n\t\t\t\t\t\tangle++;\n\t\t\t\t\t\trightAngle = 110;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tangle--;\n\t\t\t\t\t\trightAngle = leftAngle;\n\t\t\t\t\t}\n\t\t\t\t\trepaint();\n\t\t\t\t}", "private void turnOverItself() {\n byte tmp = leftEdge;\n leftEdge = reversedRightEdge;\n reversedRightEdge = tmp;\n\n tmp = rightEdge;\n rightEdge = reversedLeftEdge;\n reversedLeftEdge = tmp;\n\n tmp = topEdge;\n topEdge = reversedTopEdge;\n reversedTopEdge = tmp;\n\n tmp = botEdge;\n botEdge = reversedBotEdge;\n reversedBotEdge = tmp;\n\n tmp = ltCorner;\n ltCorner = rtCorner;\n rtCorner = tmp;\n\n tmp = lbCorner;\n lbCorner = rbCorner;\n rbCorner = tmp;\n }", "protected void up() {\n move(positionX, positionY - 1);\n orientation = BattleGrid.RIGHT_ANGLE * 3;\n }", "public void setDirection(int value) {\n this.direction = value;\n }", "public void turnLeft() {\r\n setDirection( modulo( myDirection-1, 4 ) );\r\n }", "public void setDirection(){\n\n if (gameStatus != demoPlay)\n client_sb.i_Button = direct;\n\n TankMoveDelay++;\n StarGun_GSR loc=(StarGun_GSR)client_sb.getGameStateRecord();\n\n if (TankMoveDelay >= 1 &&\n loc.getPlayerX() < StarGun_SB.PLAYER_RIGHT_BORDER &&\n\t loc.getPlayerX() > 0) {\n TankMoveDelay = 0;\n switch (direct) {\n\tcase StarGun_SB.DIRECT_LEFT:\n\t if (TankPos==0)TankPos=iTankAmount-1;\n\t else TankPos--;\n\t\t\t\t break;\n case StarGun_SB.DIRECT_RIGHT:\n\t if (TankPos==iTankAmount-1)TankPos=0;\n\t else TankPos++;\n\t\t\t\t break;\n }\n }\n }", "public Direction toRight()\n {\n return new Direction(dirInDegrees + (FULL_CIRCLE / 4));\n }", "private float reverseDirection(float dir) {\n if (dir < Math.PI) return (float) (dir+Math.PI);\n else return (float) (dir-Math.PI);\n }", "public void\nshiftToOrigin()\n{\n\tthis.setLine(0.0, 0.0,\n\t\tthis.getP2().getX() - this.getP1().getX(),\n\t\tthis.getP2().getY() - this.getP1().getY());\n}", "public double getDirectionMove();", "public Door(Direction direction){\n this.direction=direction;\n location=new PointF();\n setLocation(direction);\n rect = new RectF(location.x - size, location.y - size, location.x + size, location.y + size);\n }", "public void setDirection(Vector direction){\n\t\t_direction = direction;\n\t}", "public static void changePosition() {\n int direction;\n int speed;\n int newTopX;\n int newTopY;\n\n for (int i = 0; i < numShapes; ++i) {\n direction = moveDirection[i];\n speed = moveSpeed[i];\n newTopX = xTopLeft[i];\n newTopY = yTopLeft[i];\n\n //the switch uses the direction the speed should be applied to in order to find the new positions\n switch (direction) {\n case 0 -> {\n newTopX = newTopX - (speed);\n xTopLeft[i] = newTopX;\n }\n //upper left 135 degrees\n case 1 -> {\n newTopX = newTopX - (speed);\n xTopLeft[i] = newTopX;\n newTopY = newTopY - (speed);\n yTopLeft[i] = newTopY;\n }\n case 2 -> {\n newTopY = newTopY - (speed);\n yTopLeft[i] = newTopY;\n }\n //upper right 45 degrees\n case 3 -> {\n newTopX = newTopX + (speed);\n xTopLeft[i] = newTopX;\n newTopY = newTopY - (speed);\n yTopLeft[i] = newTopY;\n }\n case 4 -> {\n newTopX = newTopX + (speed);\n xTopLeft[i] = newTopX;\n }\n //bottom right 315 degrees\n case 5 -> {\n newTopX = newTopX + (speed);\n xTopLeft[i] = newTopX;\n newTopY = newTopY + (speed);\n yTopLeft[i] = newTopY;\n }\n case 6 -> {\n newTopY = newTopY + (speed);\n yTopLeft[i] = newTopY;\n }\n //bottom left 225 degrees\n case 7 -> {\n newTopX = newTopX - (speed);\n xTopLeft[i] = newTopX;\n newTopY = newTopY + (speed);\n yTopLeft[i] = newTopY;\n }\n }\n }\n }", "public void changeDirection(){\n\t\tthis.toRight ^= true;\n\t\t\n\t\tif(this.toRight)\n\t\t\tthis.nextElem = (this.currElem + 1) % players.size();\n\t\telse\n\t\t\tthis.nextElem = (this.currElem - 1 + players.size()) % players.size();\n\t}", "private void goAcrossWall() {\n\t\t// TODO Auto-generated method stub\n\t\tthis.move();\n\t\tthis.turnRight();\n\t}", "public static void odometerTransformation(Odometer odometer, int corner) {\r\n\t\tif (corner == 1) {\r\n\t\t\treturn;\r\n\t\t} else if (corner == 2) {\r\n\t\t\todometer.setX(10 * TILE_WIDTH);\r\n\t\t\todometer.setY(0);\r\n\t\t\todometer.setTheta(Math.PI/2);\r\n\t\t} else if (corner == 3) {\r\n\t\t\todometer.setX(10 * TILE_WIDTH);\r\n\t\t\todometer.setY(10 * TILE_WIDTH);\r\n\t\t\todometer.setTheta(Math.PI);\r\n\t\t} else if (corner == 4) {\r\n\t\t\todometer.setX(0);\r\n\t\t\todometer.setY(10 * TILE_WIDTH);\r\n\t\t\todometer.setTheta(3*Math.PI/2);\r\n\t\t}\r\n\t}", "public double getDirectionView();", "public void chooseDirection(){\n Player player=board.getPlayer();\n if(player==null) return;\n if (getXCentrer()>board.getPlayer().getXCentrer()){\n setDirection(3);\n }\n else{\n setDirection(1);\n }\n }", "public float getDirection();", "public void setDirection(int value) {\n this.direction = value;\n }", "@Override\n public void setRectangle() {\n switch (direction){\n case 0:\n rectangle.setLocation((int)x+5,(int)y+8);\n break;\n case 2:\n rectangle.setLocation((int)x+5,(int)y+8);\n break;\n case 1:\n rectangle.setLocation((int)x+13,(int)y+8);\n break;\n case 3:\n rectangle.setLocation((int)x+2,(int)y+8);\n break;\n }\n\n }", "public void moveAsteroidLeftToRight() {\t\r\n\t\tsetY(this.getY()+1);\r\n\t}", "public void move(String direction) {\n \n }", "public void direction(int dirX, int dirY) {\r\n if (dirX == 1 && dirY == 0) {\r\n this.direction = \"HORI\";\r\n }\r\n else if (dirX == 1 && dirY == -1) {\r\n this.direction = \"RISE\";\r\n }\r\n else if (dirX == 0 && dirY == 1) {\r\n this.direction = \"VERTI\";\r\n }\r\n else {\r\n this.direction = \"FALL\";\r\n }\r\n }", "private void rotateRight() {\n robot.leftBack.setPower(TURN_POWER);\n robot.leftFront.setPower(TURN_POWER);\n robot.rightBack.setPower(-TURN_POWER);\n robot.rightFront.setPower(-TURN_POWER);\n }", "public void rotateRight() {\n\t\tthis.direction = this.direction.rotateRight();\n\t}", "public double direction(){\n return Math.atan2(this.y, this.x);\n }", "public void setDirection(int direction) {\r\n\t\tsuper.setDirection(direction);\r\n\t\trobotImage.setImage(Constant.ROBOTIMAGEPATHS[direction]);\r\n\t}", "public void changeDirection (int dir) {\n if ((dir == UPKEY || dir == DOWNKEY || dir == RIGHTKEY || dir == LEFTKEY) && validMove(dir))\n {\n direction = dir;\n }\n }", "void moveTo(int dx, int dy);", "@Override\r\n\tpublic String moveRight() {\n\t\tif((0<=x && x<50) && (0<=y && y<=10) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\tx++;\r\n\t\t}\r\n\t\telse if((0<=x && x<50) && (40<=y && y<=50) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\tx++;\r\n\t\t}\r\n\t\telse if((0<=x && x<50) && (0<=y && y<=50) && (0<=z && z<=10))\r\n\t\t{\r\n\t\t\tx++;\r\n\t\t}\r\n\t\telse if((0<=x && x<10) && (0<=y && y<=50) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\tx++;\r\n\t\t}\r\n\t\telse if((0<=x && x<50) && (0<=y && y<=50) && (40<=z && z<=50))\r\n\t\t{\r\n\t\t\tx++;\r\n\t\t}\r\n\t\telse if((40<=x && x<50) && (0<=y && y<=50) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\tx++;\r\n\t\t}\r\n\t\treturn getFormatedCoordinates();\r\n\t}", "public void moveRight() {\n if (!this.state.equals(\"onRightWall\")) {\n this.dir = 1;\n this.xTargetSpeed = this.X_MAX_SPEED;\n }\n }", "public Direction getCorrectRobotDirection();", "public double getCornering() {\r\n return cornering;\r\n }", "int getDirection();", "@Override\n public void setDirection(Direction direction) {\n\n }", "public void updateDirection(float dir)\n {\n firstDraw = false;\n direction = dir;\n invalidate();\n }", "public void setDirection(float direction)\r\n {\r\n this.direction = direction;\r\n }", "public Point getCorner() {\n\t\treturn corner;\n\t}", "void move(int row, int col) {\n\n int rowdiff = row - this._row; int coldiff = col - this.column;\n if (((Math.abs(rowdiff)) > 1) || (Math.abs(coldiff)) > 1);\n || (row >= _side) || (col >= _side) || (row < 0) || (col < 0);\n || ((Math.abs(coldiff)) == 1) && ((Math.abs(rowdiff)) == 1))); {\n throw new java.lang.IllegalArgumentException();\n } \n else if (rowdiff == 1) && (coldiff == 0)//up method\n { \n if (((isPaintedSquare(row, col) && isPaintedFace(2)) || \n (!isPaintedSquare(row, col) && !isPaintedFace(2))) {\n up_method(cube)\n } else if (isPaintedFace(2) == true) {\n _facePainted[2] == false\n grid[row][col] == true\n up_method(cube)\n }\n else {\n _facePainted[2] == true\n grid[row][col] == false \n up_method(cube)\n }\n }\n else if ((rowdiff == -1) && (coldiff == 0)) //down method\n\n { \n if (((isPaintedSquare(row, col) && isPaintedFace(4)) || \n (!isPaintedSquare(row, col) && !isPaintedFace(4))) {\n up_method(cube)\n } else if (isPaintedFace(4) == true) {\n _facePainted[4] == false\n grid[row][col] == true\n up_method(cube)\n } else {\n _facePainted[4] == true\n grid[row][col] == false \n up_method(cube)\n }\n }\n else if (rowdiff == 0) && (coldiff == -1) { //left method\n if (((isPaintedSquare(row, col) && isPaintedFace(5)) || \n (!isPaintedSquare(row, col) && !isPaintedFace(5))) {\n up_method(cube)\n } else if (isPaintedFace(5) == true) {\n _facePainted[5] == false\n grid[row][col] == true\n up_method(cube)}\n else {\n _facePainted[5] == true\n grid[row][col] == false \n up_method(cube)}\n }\n else if ((rowdiff == 0) && (coldiff == 1)) { //right method\n if (((isPaintedSquare(row, col) && isPaintedFace(6)) || \n (!isPaintedSquare(row, col) && !isPaintedFace(6))) {\n up_method(cube)\n } else if (isPaintedFace(6) == true) {\n _facePainted[6] == false\n grid[row][col] == true\n up_method(cube)}\n else {\n _facePainted[6] == true\n grid[row][col] == false \n up_method(cube)\n \n }\n }\n\n\n }", "public void directionRestriction(){\n \t\n }", "protected int mirrorDirection(int direction) {\n\t\tif (direction < 4) {\n\t\t\treturn (direction + 2)%4;\n\t\t} else {\n\t\t\treturn (direction + 2)%4 + 4;\n\t\t}\n\t}", "public void setMoveRight(boolean TorF) {\n moveRight = TorF;\n }", "public Builder setDirection(int value) {\n bitField0_ |= 0x00000020;\n direction_ = value;\n onChanged();\n return this;\n }", "@Override\n public void move(){\n if (flatbed.getCurrentAngle() == flatbed.getMinAngle()){\n super.move();\n }\n }", "private void move() {\n\n for (int z = snakeLength; z > 0; z--) {\n xLength[z] = xLength[(z - 1)];\n yLength[z] = yLength[(z - 1)];\n }\n\n if (left) {\n xLength[0] -= elementSize;\n }\n\n if (right) {\n xLength[0] += elementSize;\n }\n\n if (up) {\n yLength[0] -= elementSize;\n }\n\n if (down) {\n yLength[0] += elementSize;\n }\n }", "public static void waltz() {\n //test code written by bokun: self rotation\n leftMotor.setSpeed(ROTATE_SPEED);\n rightMotor.setSpeed(ROTATE_SPEED);\n leftMotor.forward();\n rightMotor.backward();\n }", "void turnToDir(float angle) { \n float radian = radians(angle);\n _rotVector.set(cos(radian), sin(radian));\n _rotVector.setMag(1);\n }", "private boolean corner(int e) {\r\n if (endx[e] + 200 >= width - radius[e] && directionend[e] == 0) {\r\n return true;\r\n } else if (endy[e] + 200 >= height - radius[e] && directionend[e] == 1) {\r\n return true;\r\n } else if (endx[e] - 200 <= radius[e] && directionend[e] == 2) {\r\n return true;\r\n } else if (endy[e] - 200 <= radius[e] && directionend[e] == 3) {\r\n return true;\r\n }\r\n return false;\r\n }", "public void setDirection(double direction) {\n\t\tif (direction <= MAX_DIRECTION && direction >= MIN_DIRECTION) {\n\t\t\tthis.direction = direction;\n\t\t} else if (direction > MAX_DIRECTION) { \n\t\t\t//this.direction = MIN_DIRECTION + (MAX_DIRECTION - direction);\n\t\t\tthis.direction %= MIN_DIRECTION ;\n\t\t\tif (Double.isNaN(this.direction)) {\n\t\t\t\tthis.direction = MIN_DIRECTION;\n\t\t\t}\n\t\t} else if (direction < MIN_DIRECTION) {\n\t\t\t//this.direction = MAX_DIRECTION - (MIN_DIRECTION + direction);\n\t\t\tthis.direction %= MAX_DIRECTION;\n\t\t\tif (Double.isNaN(this.direction)) {\n\t\t\t\tthis.direction = MAX_DIRECTION;\n\t\t\t}\n\t\t} //else if (direction)\n\t\t\n\t}" ]
[ "0.68253416", "0.65634865", "0.65502906", "0.6525225", "0.64869404", "0.6482973", "0.64695334", "0.6433521", "0.6373633", "0.6319892", "0.63103575", "0.6284047", "0.6278869", "0.62461555", "0.6243234", "0.61968714", "0.6189548", "0.61883575", "0.61663526", "0.6164959", "0.612695", "0.6009002", "0.5991436", "0.59718436", "0.59698254", "0.5962141", "0.5950976", "0.5939095", "0.59241194", "0.5870159", "0.587001", "0.5857987", "0.5857201", "0.5846661", "0.58345145", "0.58211654", "0.58206004", "0.5818005", "0.5810033", "0.58066696", "0.5794677", "0.5791702", "0.57867134", "0.57835525", "0.57830936", "0.5768204", "0.57647973", "0.5763971", "0.5761085", "0.5752106", "0.5747291", "0.57469827", "0.57382303", "0.5734845", "0.571875", "0.57124686", "0.57094735", "0.57001764", "0.5698605", "0.5685977", "0.5682628", "0.5675466", "0.56652826", "0.5663364", "0.5660818", "0.56556976", "0.56526554", "0.565043", "0.56488174", "0.5646669", "0.5634708", "0.5632467", "0.5628931", "0.56264764", "0.56247324", "0.56228256", "0.56192607", "0.5613414", "0.5612068", "0.56085", "0.5598653", "0.55774814", "0.55723184", "0.5569109", "0.5568259", "0.55679053", "0.5560131", "0.5560116", "0.5552621", "0.5552214", "0.5551875", "0.55448526", "0.55414474", "0.552191", "0.550671", "0.5505318", "0.550359", "0.55016506", "0.5495079", "0.54918915", "0.5490797" ]
0.0
-1
Denotes whether the given tile is a corner
private boolean isCorner(int x, int y) { return x-1 >= 0 && x+1 < LoadMap.MAPWIDTHINTILES && y-1 >= 0 && y+1 < LoadMap.MAPHEIGHTINTILES && ( (connectedTiles[y][x+1] != null && (connectedTiles[y+1][x] != null || connectedTiles[y-1][x] != null)) || (connectedTiles[y][x-1] != null && (connectedTiles[y+1][x] != null || connectedTiles[y-1][x] != null))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static boolean isCornerTile(Tile tile, Map<Border, List<Tile>> borderMap) {\n int n = 0;\n for (Border border : tile.getBorders()) {\n if (borderMap.get(border).size() == 1) {\n n++;\n }\n }\n return n == 2;\n }", "private boolean corner(int e) {\r\n if (endx[e] + 200 >= width - radius[e] && directionend[e] == 0) {\r\n return true;\r\n } else if (endy[e] + 200 >= height - radius[e] && directionend[e] == 1) {\r\n return true;\r\n } else if (endx[e] - 200 <= radius[e] && directionend[e] == 2) {\r\n return true;\r\n } else if (endy[e] - 200 <= radius[e] && directionend[e] == 3) {\r\n return true;\r\n }\r\n return false;\r\n }", "private static boolean isCornerTile(Tile t, List<Integer> uniqueHashes) {\n\t\tint unique = 0;\n\t\tif(uniqueHashes.contains(t.getTHash())){\n\t\t\tunique++;\n\t\t}if(uniqueHashes.contains(t.getRHash())){\n\t\t\tunique++;\n\t\t}if(uniqueHashes.contains(t.getBHash())){\n\t\t\tunique++;\n\t\t}if(uniqueHashes.contains(t.getLHash())){\n\t\t\tunique++;\n\t\t}\n\t\treturn unique == 2;\n\t}", "boolean canMove(Tile t);", "public boolean isNeighbour(Tile tile){\n int x1 = this.getX();\n int y1 = this.getY();\n\n int x2 = tile.getX();\n int y2 = tile.getY();\n return (x1 == x2 && (Math.abs(y1-y2) == 1)) || (y1 == y2 && (Math.abs(x1-x2) == 1));\n }", "public boolean canChow(int tile) {\n\t\treturn TileAnalyser.inchow(tile, getTileNumbers())>0;\n\t}", "public static boolean insideBounds(GameTile tile) {\n\n if (tile == null) {\n return false;\n } else {\n\n int x = tile.getXCoord();\n int y = tile.getYCoord();\n\n return !(x < 0 || y < 0) && !(x > TILE_COLS || y > TILE_ROWS);\n\n }\n\n }", "private static boolean isCorner(int[][] area, int x, int y, boolean countEdges) {\r\n\t\t// Find the coordinates of the spaces adjacent to this one\r\n\t\tint[][] around = { { x - 1, y },// Left 1\r\n\t\t\t\t{ x + 1, y },// Right 1\r\n\t\t\t\t{ x, y - 1 },// Down 1\r\n\t\t\t\t{ x, y + 1 } };// Up 1\r\n\t\tint walls = 0; // Create a variable to store how many walls are next to\r\n\t\t\t\t\t // the current space\r\n\t\tfor (int[] coords : around) {// test each adjacent space\r\n\t\t\tif ((coords[1] < 0) || (coords[0] >= area.length)\r\n\t\t\t\t\t|| (coords[0] < 0) || (coords[1] >= area[x].length)) {\r\n\t\t\t\t// If this square is out of the map then it counts as a wall\r\n\t\t\t\tif (countEdges) {\r\n\t\t\t\t\twalls++;\r\n\t\t\t\t}\r\n\t\t\t} else if (area[coords[0]][coords[1]] >= 1) {\r\n\t\t\t\t// The space has a wall next to it\r\n\t\t\t\twalls++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (walls == 2 || walls == 3) { // if the block is surrounded by 2 or 3\r\n\t\t\t\t\t\t\t\t\t\t// walls, it's a corner \r\n\t\t\t\r\n\t\t\t//Check to see if this wall is just a corridor\r\n\t\t\tif( (isCorridor(area, around[0][0],around[0][1], around[1][0], around[1][1])) && \r\n\t\t\t\t\t(!isCorridor(area, around[2][0],around[2][1], around[3][0], around[3][1]))) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tif( (!isCorridor(area, around[0][0],around[0][1], around[1][0], around[1][1])) && \r\n\t\t\t\t\t(isCorridor(area, around[2][0],around[2][1], around[3][0], around[3][1]))) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "boolean checkWin(Tile initialTile);", "public boolean isCornerField(Field field) {\n\n if (field == this.fields[0][0] ||\n field == this.fields[0][fields.length - 1] ||\n field == this.fields[fields.length - 1][0] ||\n field == this.fields[fields.length - 1][fields.length - 1]) {\n return true;\n } else {\n return false;\n }\n }", "public boolean tileInBounds(float xTile, float yTile)\r\n/* 111: */ {\r\n/* 112:124 */ return (xTile >= 0.0F) && (xTile < getWidthInTiles()) && (yTile >= 0.0F) && (\r\n/* 113:125 */ yTile < getHeightInTiles());\r\n/* 114: */ }", "@Test\n public void isONGroundTestTrue(){\n TileMap tileMap = new TileMap(24, 24, new byte[][]{{0,0}},new byte[][]{{1,1},{1,1},{1,1},{1,1}}, tilepath);\n Rect cBox = new Rect(2,2,24,22);\n assertEquals(true, tileMap.isOnGround(cBox));\n }", "public void checkTileMapCollision() {\t\t\t// Works for both x and y directions. Only going to use the x-component for now but leaves room for future expansion.\n\n\t\tcurrCol = (int)x / tileSize;\n\t\tcurrRow = (int)y / tileSize;\n\n\t\txdest = x + dx;\n\t\tydest = y + dy;\n\n\t\txtemp = x;\n\t\tytemp = y;\n\n\t\tcalculateCorners(x, ydest);\n\t\tif (dy < 0) { \t\t\t// upwards\n\t\t\tif (topLeft || topRight) {\n\t\t\t\tdy = 0;\n\t\t\t\tytemp = currRow * tileSize + height / 2;\t\t\t// Set just below where we bumped our head.\n\t\t\t} else {\n\t\t\t\tytemp += dy;\t\t// Otherwise keep going.\n\t\t\t}\n\t\t}\n\t\tif (dy > 0) { \t\t\t// downwards\n\t\t\tif (bottomLeft || bottomRight) {\n\t\t\t\tdy = 0;\n\t\t\t\tfalling = false;\n\t\t\t\tytemp = (currRow + 1) * tileSize - height / 2;\n\t\t\t} else {\n\t\t\t\tytemp += dy;\n\t\t\t}\n\t\t}\n\n\t\tcalculateCorners(xdest, y);\n\t\tif (dx < 0) { \t\t\t// left\n\t\t\tif (topLeft || bottomLeft) {\n\t\t\t\tdx = 0;\n\t\t\t\txtemp = currCol * tileSize + width / 2;\n\t\t\t} else {\n\t\t\t\txtemp += dx;\n\t\t\t}\n\t\t}\n\t\tif (dx > 0) { \t\t\t// right\n\t\t\tif (topRight || bottomRight) {\n\t\t\t\tdx = 0;\n\t\t\t\txtemp = (currCol + 1) * tileSize - width / 2;\n\t\t\t} else {\n\t\t\t\txtemp += dx;\n\t\t\t}\n\t\t}\n\n\t\tif(!falling) {\n\t\t\tcalculateCorners(x, ydest + 1);\t\t\t// Have to check the ground 1 pixel below us and make sure we haven't fallen off a cliff\n\t\t\tif(!bottomLeft && !bottomRight) {\n\t\t\t\tfalling = true;\n\t\t\t}\n\t\t}\n\n\t}", "private static boolean isDeepCorner(int[][] area, Corner corner) {\r\n\t\tVector2 o = getCornerOrientation(area, new Corner(new Vector2((int)corner.getLocation().x, (int)corner.getLocation().y), new Vector2()));\r\n\t\tint x1 = (int)corner.getLocation().x + ((int)o.x*2) , x2 = (int)corner.getLocation().x, y1 = (int)corner.getLocation().y, y2 = (int)corner.getLocation().y + ((int)o.y*2);\r\n\t\tif(isWallFacingInDirection(area, x1, y1, o)) {\r\n\t\t\tif(isWallFacingInDirection(area, x2, y2, o)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public abstract boolean isInterior();", "public boolean hasNeighbor(Tile tile) {\n if (tile == null) {\n return false;\n }\n\n return (this.tileNorth == tile || this.tileEast == tile || this.tileSouth == tile || this.tileEast == tile);\n }", "private Boolean pointNotCorner(Position3D cell,int d, int r, int c) {\n\n return d == cell.getDepthIndex() && (r == cell.getRowIndex() || c == cell.getColumnIndex());\n }", "public boolean isInsideTile(int x, int y){\n\t\treturn (x >= tileX && x <= tileX+tileImage.getWidth() && y >= tileY && y <= tileY+tileImage.getHeight());\n\t}", "boolean hasRect();", "public boolean tileOfComputer (int row, int col){\n return this.gameBoard[row][col] == 'o';\n }", "public boolean borderAhead () {\r\n if ( myDirection == NORTH ) {\r\n return getY() == 0;\r\n } else if ( myDirection == EAST ) {\r\n return getX() == getWorld().getWidth() - 1;\r\n } else if ( myDirection == SOUTH ) {\r\n return getY() == getWorld().getHeight() - 1;\r\n } else { // if ( myDirection == WEST ) {\r\n return getX() == 0;\r\n }\r\n }", "public abstract boolean canMove(Rect rect, int xClearance, int yClearance);", "public boolean canCastle(int direction){\n\t\tPiece rook;\n\t\t\n\t\tif(!((getColor().equals(\"White\") && getSquare().getCol() == 4 && getSquare().getRow() == 7 ) ||\n\t\t\t\t(getColor().equals(\"Black\") && getSquare().getCol() == 4 && getSquare().getRow() == 0 )))\n\t\t\treturn false;\n\t\t\n\t\t\n\t\tif(direction == 1){\n\t\t\trook = getSquare().getEast().getEast().getEast().getOccupant();\n\t\t\tif(rook == null || !rook.getColor().equals(this.getColor()) || !rook.getType().equals(\"Rook\") || rook.hasMoved() || this.hasMoved())\n\t\t\t\treturn false;\n\t\t\tif(getSquare().getEast().getEast().getOccupant() != null)\n\t\t\t\treturn false;\n\t\t\tif(getSquare().getEast().getOccupant() != null)\n\t\t\t\treturn false;\n\t\t\t\n\t\t\tif(getColor().equals(\"White\")){\n\t\t\t\tfor(int i = 0; i < ChessBoard.getPieces().size(); i++){\n\t\t\t\t\tif(ChessBoard.getPieces().get(i).getColor().equals(\"Black\"))\n\t\t\t\t\t\tfor(int location: ChessBoard.getPieces().get(i).getMoves()){\n\t\t\t\t\t\t\tif(location == 75 || location == 76){\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int i = 0; i < ChessBoard.getPieces().size(); i++){\n\t\t\t\t\tif(ChessBoard.getPieces().get(i).getColor().equals(\"White\"))\n\t\t\t\t\t\tfor(int location: ChessBoard.getPieces().get(i).getMoves()){\n\t\t\t\t\t\t\tif(location == 5 || location == 6){\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t\telse if (direction == -1){//East\n\t\t\trook = getSquare().getWest().getWest().getWest().getWest().getOccupant();\n\t\t\tif(rook == null || !rook.getColor().equals(this.getColor()) || !rook.getType().equals(\"Rook\") || rook.hasMoved() || this.hasMoved())\n\t\t\t\treturn false;\n\t\t\tif(getSquare().getWest().getWest().getWest().getOccupant() != null)\n\t\t\t\treturn false;\n\t\t\tif(getSquare().getWest().getWest().getOccupant() != null)\n\t\t\t\treturn false;\n\t\t\tif(getSquare().getWest().getOccupant() != null)\n\t\t\t\treturn false;\n\t\t\t\n\t\t\tif(getColor().equals(\"White\")){\n\t\t\t\tfor(int i = 0; i < ChessBoard.getPieces().size(); i++){\n\t\t\t\t\tif(ChessBoard.getPieces().get(i).getColor().equals(\"Black\"))\n\t\t\t\t\t\tfor(int location: ChessBoard.getPieces().get(i).getMoves()){\n\t\t\t\t\t\t\tif(location == 73 || location == 72 || location == 71){\n\t\t\t\t\t\t\t\treturn false;\n\t\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}\n\t\t\telse{\n\t\t\t\tfor(int i = 0; i < ChessBoard.getPieces().size(); i++){\n\t\t\t\t\tif(ChessBoard.getPieces().get(i).getColor().equals(\"White\"))\n\t\t\t\t\t\tfor(int location: ChessBoard.getPieces().get(i).getMoves()){\n\t\t\t\t\t\t\tif(location == 3 || location == 2 || location == 1){\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public static boolean isCornerPointingInDirectionOf(int[][] area, Corner corner, Vector2 direction) {\r\n\t\tVector2 orientation = getCornerOrientation(area, corner);\r\n\t\t/*boolean toReturn = ((direction.x==orientation.x) && (direction.y==orientation.y));\r\n\t\treturn (toReturn);*/\r\n\t\tboolean x = false;\r\n\t\tboolean y = false;\r\n\t\tif (orientation.x > 0) {\r\n\t\t\tif (corner.getLocation().x < direction.x) {\r\n\t\t\t\tx = true;\r\n\t\t\t} else {\r\n\t\t\t\tx = false;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (corner.getLocation().x > direction.x) {\r\n\t\t\t\tx = true;\r\n\t\t\t} else {\r\n\t\t\t\tx = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (orientation.y > 0) {\r\n\t\t\tif (corner.getLocation().y < direction.y) {\r\n\t\t\t\ty = true;\r\n\t\t\t} else {\r\n\t\t\t\ty = false;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (corner.getLocation().y > direction.y) {\r\n\t\t\t\ty = true;\r\n\t\t\t} else {\r\n\t\t\t\ty = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (x && y);\r\n\t}", "boolean isTile(int x, int y, int rotation) {\n return tiles[rotation][dimensions * y + x] == 1;\n }", "private boolean canMoveRight()\n {\n // runs through row first, column second\n for ( int row = 0; row < grid.length ; row++ ) {\n for ( int column = grid[row].length-2; column >=0 ; column-- ) {\n\n // looks at tile directly to the right of the current tile\n int compare = column + 1;\n if ( grid[row][column] != 0 ) {\n if ( grid[row][compare] == 0 || grid[row][column] ==\n grid[row][compare] ) {\n return true; \n }\n }\n }\n } \n return false;\n }", "public boolean moveTile(int row, int col) {\n //first make sure the parameters are reasonable values\n if (row < 0 || row > 2 || col < 0 || col > 2) {\n return false;\n }\n int tile = getTiles()[row][col];\n if (tile == 0) {\n return false;\n }\n boolean inBounds;\n //check from one row to the left, to one row to the right\n for (int i = row - 1; i <= row + 1; i++) {\n //check from one column above, to one column below\n for (int j = col - 1; j <= col + 1; j++) {\n //use this to make sure our indices are reasonable\n inBounds = ((i >= 0 && i < 3) && (j >= 0 && j < 3));\n if (inBounds) {\n int otherTile = getTiles()[i][j];\n //can't move a cell to itself\n if (otherTile != tile) {\n //we want to ignore diagonals\n if (!(i != row && j != col)) {\n //if otherTile is blank, swap tile and otherTile\n if (otherTile == 0) {\n setTile(i, j, tile);\n setTile(row, col, otherTile);\n return true;\n }\n }\n }\n }\n }\n }\n //if we didn't return true yet, there was no adjacent blank tile\n return false;\n }", "protected boolean isBorder(int x, int y){\n if(super.getLocationX() == x)\n return true;\n //top border\n if (super.getLocationY() == y)\n return true;\n\n //right border\n if((super.getLocationX() + super.getWidth() - 1) == x)\n return true;\n\n //bottom border\n if ((super.getLocationY() + super.getHeight() - 1) == y)\n return true;\n\n //return false if not\n return false;\n }", "default boolean isAllCorners() {\n return false;\n }", "private boolean tileIsInbounds(int row, int col){\n\t\treturn row >= 0 && col >= 0\n\t\t\t\t&& row < board.length && col < board[0].length;\n\t}", "public boolean checkSwitch(int row, int col){\n boolean output = false;\n Tile[] updownleftright = new Tile[4]; //Array which holds the four adjacent tiles\n if (row - 1 >= 0) updownleftright[0] = tiles[row - 1][col];\n else updownleftright[0] = nulltile;\n \n if (row + 1 < sidelength) updownleftright[1] = tiles[row + 1][col];\n else updownleftright[1] = nulltile;\n \n if (col - 1 >= 0) updownleftright[2] = tiles[row][col - 1];\n else updownleftright[2] = nulltile;\n \n if (col + 1 < sidelength) updownleftright[3] = tiles[row][col + 1];\n else updownleftright[3] = nulltile;\n \n for (int i = 0; i < 4; i ++) //Goes through the array and checks to see if any adjacent tile is the blank tile\n {\n if (updownleftright[i].getCurPic() == blankindex){\n tiles[row][col].swap(updownleftright[i]);\n return true;\n }\n }\n return false;\n }", "private boolean hitSides() {\n if (b.numY + 60 >= BOX_HEIGHT || (b.numY - 60 <= 0)) {\n return true;\n } else {\n return false;\n }\n }", "@Test\n public void notOnGroundTest(){\n TileMap tileMap = new TileMap(24, 24, new byte[][]{{0,0},{0,0}},new byte[][]{{1,0},{1,1}}, tilepath);\n Rect cBox = new Rect(2,2,2,2);\n assertFalse(tileMap.isOnGround(cBox));\n }", "public boolean tileReachable(float tx, float ty, AgentModel selectedAgent)\r\n/* 243: */ {\r\n/* 244:271 */ float x = selectedAgent.getX() - 0.5F;\r\n/* 245:272 */ float y = selectedAgent.getY() - 0.5F;\r\n/* 246:274 */ switch ((int)selectedAgent.getAngle())\r\n/* 247: */ {\r\n/* 248: */ case 0: \r\n/* 249:277 */ if ((y - 1.0F == ty) && (tx >= x - 1.0F) && (tx <= x + 1.0F)) {\r\n/* 250:279 */ return true;\r\n/* 251: */ }\r\n/* 252: */ break;\r\n/* 253: */ case 90: \r\n/* 254:283 */ if ((x + 1.0F == tx) && (ty >= y - 1.0F) && (ty <= y + 1.0F)) {\r\n/* 255:285 */ return true;\r\n/* 256: */ }\r\n/* 257: */ break;\r\n/* 258: */ case 180: \r\n/* 259:289 */ if ((y + 1.0F == ty) && (tx >= x - 1.0F) && (tx <= x + 1.0F)) {\r\n/* 260:291 */ return true;\r\n/* 261: */ }\r\n/* 262: */ break;\r\n/* 263: */ case 270: \r\n/* 264:295 */ if ((x - 1.0F == tx) && (ty >= y - 1.0F) && (ty <= y + 1.0F)) {\r\n/* 265:298 */ return true;\r\n/* 266: */ }\r\n/* 267: */ break;\r\n/* 268: */ }\r\n/* 269:303 */ return false;\r\n/* 270: */ }", "private boolean checkM(){\n if(currentLocation.x == previousLocation.x && currentLocation.y == previousLocation.y) {\n return false;\n }\n // Is outside the border\n if(currentLocation.x < size || currentLocation.y < size || currentLocation.x > map.numRows - size || currentLocation.y > map.numCols - size) {\n return false;\n }\n // Is on the land\n double angle2 = 0;\n while (angle2 < 6.3) {\n if (map.getTerrainGrid()[currentLocation.x + (int) (size/2 * cos(angle2))][currentLocation.y + (int) (size/2 * sin(angle2))] == Colors.OCEAN) {\n return false;\n }\n angle2 += 0.3;\n }\n return true;\n }", "private boolean shouldHideInCorner(GameInfo intel) {\n return intel.getNumPlayers() > 2;\n }", "public boolean isTotallyOnGrid() {\n\t\t\tfor(int i=0; i<4; i++) {\n\t\t\t\tif(position.y + i >= 0)\n\t\t\t\t\treturn true; //everything from here down is on grid\n\t\t\t\t// this row is above grid so look for non-empty squares\n\t\t\t\tfor(int j=0; j<4; j++)\n\t\t\t\t\tif(squares[i][j])\n\t\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\tSystem.err.println(\"TetrisPiece.isTotallyOnGrid internal error\");\n\t\t\treturn false;\n\t\t}", "private boolean canMoveUp()\n {\n // runs through column first, row second\n for ( int column = 0; column < grid[0].length ; column++ ) {\n for ( int row = 1; row < grid.length; row++ ) {\n // looks at tile directly above the current tile\n int compare = row-1;\n if ( grid[row][column] != 0 ) {\n if ( grid[compare][column] == 0 || grid[row][column] ==\n grid[compare][column] ) {\n return true;\n }\n }\n }\n } \n return false;\n }", "public boolean checkRep() {\n return location.x() >= 0 && location.x() < board.getWidth() && \n location.y() >= 0 && location.y() < board.getHeight(); \n }", "private boolean checkTopLeftDownDiag(char playerSymbol) {\n //checking the top left-bottom right diagonal\n for (int i = 0; i < N; i++) {\n if (grid[i][i].getSymbol() != playerSymbol) {\n return false;\n }\n }\n return true;\n }", "private boolean canMoveDown()\n {\n // runs through column first, row second\n for ( int column = 0; column < grid[0].length ; column++ ) {\n for ( int row = grid.length-2; row >=0; row-- ) {\n // looks at tile directly below the current tile\n int compare = row + 1;\n if ( grid[row][column] != 0 ) {\n if ( grid[compare][column] == 0 || grid[row][column] ==\n grid[compare][column] ) {\n return true;\n }\n }\n }\n } \n return false;\n }", "public static boolean cornersInBounds(Location loc, int size, double xlimit, double zlimit) {\n return inBounds(loc, xlimit, zlimit) &&\n inBounds(loc.clone().add(size - 1, 0, 0), xlimit, zlimit) &&\n inBounds(loc.clone().add(size - 1, 0, size - 1), xlimit, zlimit) &&\n inBounds(loc.clone().add(0, 0, size - 1), xlimit, zlimit);\n }", "boolean canBuildDome(Tile t);", "boolean hasCoordinates();", "boolean hasCoordinates();", "boolean hasCoordinates();", "@Test\n public void testIsActionable_SecondCornerCase() {\n board.getCell(3, 3).setDome(true);\n board.getCell(4, 3).setDome(true);\n assertFalse(godPower.isActionable(board, player.getWorker1()));\n }", "@Test\n public void testIsActionable_FirstCornerCase() {\n board.getCell(3, 4).addLevel();\n board.getCell(3, 3).addLevel();\n board.getCell(4, 3).addLevel();\n assertFalse(godPower.isActionable(board, player.getWorker1()));\n }", "public boolean isRevealed(int tile) {\r\n return (tiles[tile] & 2) != 0;\r\n }", "@Override\n public boolean isValidMove(Tile target, Board board) {\n if (target == null || board == null) {\n throw new NullPointerException(\"Arguments for the isValidMove method can not be null.\");\n }\n // current and target tiles have to be on a diagonal (delta between row and col index have to be identical)\n int currentCol = this.getTile().getCol();\n int currentRow = this.getTile().getRow();\n int targetCol = target.getCol();\n int targetRow = target.getRow();\n\n int deltaRow = Math.abs(currentRow - targetRow);\n int deltaCol = Math.abs(currentCol - targetCol);\n int minDelta = Math.min(deltaCol, deltaRow);\n\n boolean sameDiagonal = deltaCol == deltaRow;\n\n // check if there are pieces between the tiles\n boolean noPiecesBetween = true;\n // Directions -- (Up and to the left) , -+ (Up and to the right), ++, +-\n if (targetRow < currentRow && targetCol < currentCol) { // --\n for (int delta = 1; delta < minDelta; delta++) {\n Tile tileInBetween = board.getTile(currentRow - delta, currentCol - delta);\n if (tileInBetween.hasChessPiece()) {\n noPiecesBetween = false;\n }\n }\n\n } else if (targetRow > currentRow && targetCol < currentCol) { // +-\n for (int delta = 1; delta < minDelta; delta++) {\n Tile tileInBetween = board.getTile(currentRow + delta, currentCol - delta);\n if (tileInBetween.hasChessPiece()) {\n noPiecesBetween = false;\n }\n }\n } else if (targetRow > currentRow && targetCol > currentCol) { // ++\n for (int delta = 1; delta < minDelta; delta++) {\n Tile tileInBetween = board.getTile(currentRow + delta, currentCol + delta);\n if (tileInBetween.hasChessPiece()) {\n noPiecesBetween = false;\n }\n }\n } else if (targetRow < currentRow && targetCol > currentCol) { // -+\n for (int delta = 1; delta < minDelta; delta++) {\n Tile tileInBetween = board.getTile(currentRow - delta, currentCol + delta);\n if (tileInBetween.hasChessPiece()) {\n noPiecesBetween = false;\n }\n }\n }\n\n return sameDiagonal && noPiecesBetween;\n }", "private boolean isWin() {\n int continueCount = 1; // number of continue ticTacToees\n \t// west direction\n for (int x = xIndex - 1; x >= 0; x--) {\n Color c = isBlack ? Color.black : Color.white;\n if (getTicTacToe(x, yIndex, c) != null) {\n continueCount++;\n } \n else\n break;\n }\n \t// east direction\n for (int x = xIndex + 1; x <= ROWS; x++) {\n Color c = isBlack ? Color.black : Color.white;\n if (getTicTacToe(x, yIndex, c) != null) {\n continueCount++;\n } \n else\n break;\n }\n if (continueCount >= 3) {\n return true;\n } \n else\n continueCount = 1;\n \n \t\n \t// north direction\n for (int y = yIndex - 1; y >= 0; y--) {\n Color c = isBlack ? Color.black : Color.white;\n if (getTicTacToe(xIndex, y, c) != null) {\n continueCount++;\n } \n else\n break;\n }\n \t// south direction\n for (int y = yIndex + 1; y <= ROWS; y++) {\n Color c = isBlack ? Color.black : Color.white;\n if (getTicTacToe(xIndex, y, c) != null) {\n continueCount++;\n } \n else\n break;\n }\n if (continueCount >= 3) {\n return true;\n } \n else\n continueCount = 1;\n \n \t// northeast direction\n for (int x = xIndex + 1, y = yIndex - 1; y >= 0 && x <= COLS; x++, y--) {\n Color c = isBlack ? Color.black : Color.white;\n if (getTicTacToe(x, y, c) != null) {\n continueCount++;\n } \n else\n break;\n }\n \t// southeast direction\n for (int x = xIndex - 1, y = yIndex + 1; y <= ROWS && x >= 0; x--, y++) {\n Color c = isBlack ? Color.black : Color.white;\n if (getTicTacToe(x, y, c) != null) {\n continueCount++;\n } \n else\n break;\n }\n if (continueCount >= 3) {\n return true;\n } \n else\n continueCount = 1;\n \n \t// northwest direction\n for (int x = xIndex - 1, y = yIndex - 1; y >= 0 && x >= 0; x--, y--) {\n Color c = isBlack ? Color.black : Color.white;\n if (getTicTacToe(x, y, c) != null) {\n continueCount++;\n } \n else\n break;\n }\n \t// southwest direction\n for (int x = xIndex + 1, y = yIndex + 1; y <= ROWS && x <= COLS; x++, y++) {\n Color c = isBlack ? Color.black : Color.white;\n if (getTicTacToe(x, y, c) != null) {\n continueCount++;\n } \n else\n break;\n }\n if (continueCount >= 3) {\n return true;\n } \n else\n continueCount = 1;\n \n return false;\n }", "boolean hasGrid();", "@Override\n public boolean hasPossibleCapture(final Coordinate destination) {\n\n Coordinate coordinate = this.getCoordinate();\n int row = coordinate.getRow();\n int col = coordinate.getCol();\n\n //\n //\n ////\n int tempRow1 = row - 2;\n int tempCol1 = col - 1;\n Coordinate tempCoordinate1 = new Coordinate(tempRow1, tempCol1);\n if (destination.equals(tempCoordinate1)) {\n return true;\n }\n\n ////\n //\n //\n int tempRow2 = row + 2;\n int tempCol2 = col - 1;\n Coordinate tempCoordinate2 = new Coordinate(tempRow2, tempCol2);\n if (destination.equals(tempCoordinate2)) {\n return true;\n }\n\n //////\n //\n int tempRow3 = row - 1;\n int tempCol3 = col - 2;\n Coordinate tempCoordinate3 = new Coordinate(tempRow3, tempCol3);\n if (destination.equals(tempCoordinate3)) {\n return true;\n }\n\n ///////\n //\n int tempRow4 = row - 1;\n int tempCol4 = col + 2;\n Coordinate tempCoordinate4 = new Coordinate(tempRow4, tempCol4);\n if (destination.equals(tempCoordinate4)) {\n return true;\n }\n\n ////\n //\n //\n int tempRow5 = row + 2;\n int tempCol5 = col + 1;\n Coordinate tempCoordinate5 = new Coordinate(tempRow5, tempCol5);\n if (destination.equals(tempCoordinate5)) {\n return true;\n }\n\n //\n //\n ////\n int tempRow6 = row - 2;\n int tempCol6 = col + 1;\n Coordinate tempCoordinate6 = new Coordinate(tempRow6, tempCol6);\n if (destination.equals(tempCoordinate6)) {\n return true;\n }\n\n //\n //////\n int tempRow7 = row + 1;\n int tempCol7 = col - 2;\n Coordinate tempCoordinate7 = new Coordinate(tempRow7, tempCol7);\n if (destination.equals(tempCoordinate7)) {\n return true;\n }\n\n //\n //////\n int tempRow8 = row + 1;\n int tempCol8 = col + 2;\n Coordinate tempCoordinate8 = new Coordinate(tempRow8, tempCol8);\n return destination.equals(tempCoordinate8);\n }", "public boolean checkNorth(HashMap<Coordinate,MapTile> currentView){\n\t\tCoordinate currentPosition = new Coordinate(getPosition());\n\t\tfor(int i = 0; i <= wallSensitivity; i++){\n\t\t\tMapTile tile = currentView.get(new Coordinate(currentPosition.x, currentPosition.y+i));\n\t\t\tif(tile.isType(MapTile.Type.WALL)){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private boolean isInsideBoard(int x, int y){\n if(x < 0 || x > getWidth() - 1 || y < 0 || y > getHeight() - 1)\n return false;\n\n return true;\n }", "public boolean tileOfHuman (int row, int col){\n return this.gameBoard[row][col] == 'o';\n }", "public boolean tileHighlighted(float xTile, float yTile)\r\n/* 222: */ {\r\n/* 223:246 */ return (tileInBounds(xTile, yTile)) && \r\n/* 224:247 */ (this.highlight[((int)xTile)][((int)yTile)] != 0);\r\n/* 225: */ }", "private boolean tryBorder(int x, int y){\n\n\t\treturn y == this.dimension - 1 || x == this.dimension - 1;\n\t}", "public boolean checkNorth(HashMap<Coordinate,MapTile> currentView){\n\t\t\tCoordinate currentPosition = new Coordinate(getPosition());\n\t\t\tfor(int i = 0; i <= wallSensitivity; i++){\n\t\t\t\tMapTile tile = currentView.get(new Coordinate(currentPosition.x, currentPosition.y+i));\n\t\t\t\tif(tile.isType(MapTile.Type.WALL)){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "public boolean hasFenceOnCorner(int floorLevel) {\n/* 665 */ if (this.fences != null)\n/* */ {\n/* 667 */ if ((getFencesForLevel(floorLevel)).length > 0)\n/* 668 */ return true; \n/* */ }\n/* 670 */ VolaTile westTile = this.zone.getTileOrNull(this.tilex - 1, this.tiley);\n/* 671 */ if (westTile != null) {\n/* */ \n/* 673 */ Fence[] westFences = westTile.getFencesForDirAndLevel(Tiles.TileBorderDirection.DIR_HORIZ, floorLevel);\n/* 674 */ if (westFences.length > 0)\n/* 675 */ return true; \n/* */ } \n/* 677 */ VolaTile northTile = this.zone.getTileOrNull(this.tilex, this.tiley - 1);\n/* 678 */ if (northTile != null) {\n/* */ \n/* 680 */ Fence[] northFences = northTile.getFencesForDirAndLevel(Tiles.TileBorderDirection.DIR_DOWN, floorLevel);\n/* 681 */ if (northFences.length > 0)\n/* 682 */ return true; \n/* */ } \n/* 684 */ return false;\n/* */ }", "public boolean tileFence(float xTile, float yTile)\r\n/* 202: */ {\r\n/* 203:226 */ return (tileInBounds(xTile, yTile)) && (this.door[((int)xTile)][((int)yTile)] != 0);\r\n/* 204: */ }", "public boolean isAdjacentFloor(int x, int y) {\n Position pUp = new Position(x, y + 1);\n Position pDown = new Position(x, y - 1);\n Position pLeft = new Position(x - 1, y);\n Position pRight = new Position(x + 1, y);\n Position pUpLeft = new Position(x - 1, y + 1);\n Position pUpRight = new Position(x + 1, y + 1);\n Position pDownLeft = new Position(x - 1, y - 1);\n Position pDownRight = new Position(x + 1, y - 1);\n if (pUp.y < worldHeight - 1) {\n if (world[pUp.x][pUp.y].equals(Tileset.FLOOR)) {\n return true;\n }\n }\n if (pDown.y > 0) {\n if (world[pDown.x][pDown.y].equals(Tileset.FLOOR)) {\n return true;\n }\n }\n if (pLeft.x > 0) {\n if (world[pLeft.x][pLeft.y].equals(Tileset.FLOOR)) {\n return true;\n }\n }\n if (pRight.x < worldWidth - 1) {\n if (world[pRight.x][pRight.y].equals(Tileset.FLOOR)) {\n return true;\n }\n }\n if (pUpLeft.y < worldHeight - 1 && pUpLeft.x > 0) {\n if (world[pUpLeft.x][pUpLeft.y].equals(Tileset.FLOOR)) {\n return true;\n }\n }\n if (pUpRight.y < worldHeight - 1 && pUpRight.x < worldWidth - 1) {\n if (world[pUpRight.x][pUpRight.y].equals(Tileset.FLOOR)) {\n return true;\n }\n }\n if (pDownLeft.y > 0 && pDownLeft.x > 0) {\n if (world[pDownLeft.x][pDownLeft.y].equals(Tileset.FLOOR)) {\n return true;\n }\n }\n if (pDownRight.y > 0 && pDownRight.x < worldWidth - 1) {\n if (world[pDownRight.x][pDownRight.y].equals(Tileset.FLOOR)) {\n return true;\n }\n }\n return false;\n }", "@Test\n public void testIsActionable_FourthCornerCase() {\n board.getCell(3, 3).setDome(true);\n board.getCell(4, 3).setDome(true);\n board.getCell(4, 4).addLevel();\n assertTrue(godPower.isActionable(board, player.getWorker1()));\n }", "boolean isImageTileType();", "private boolean checkTileExists(int x, int y, int zoom) {\n \t int minZoom = 12;\n \t int maxZoom = 16;\n\n \t if ((zoom < minZoom || zoom > maxZoom)) {\n \t return false;\n \t }\n\n \t return true;\n \t }", "public static boolean isEveryTileFilled() {\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n if (tiles.get(new Coordinates(i, j)).getTextFromTile().getText().equals(\"\")) {\n return false;\n }\n }\n }\n return true;\n }", "public boolean hasShip(int tile) {\r\n return (tiles[tile] & 1) != 0;\r\n }", "public boolean validRook (int startRow, int startColumn, int endRow, int endColumn, Tile[][] board) {\n\t\t\n\t\tint distanceMovedUpDown =endRow-startRow; \n\t\tint distanceMovedLeftRight = endColumn-startColumn;\n\n\t\tif (distanceMovedUpDown !=0 && distanceMovedLeftRight != 0) { //have to stay in the same column or row to be valid\n\t\t\treturn false;\n\t\t}\n\n\n\t\tif (startRow == endRow) { //moving left or right \n\t\t\tif (Math.abs(distanceMovedLeftRight) > 1) { //checking if there's pieces btwn start and end if moving more than 1\n\t\t\t\tif (distanceMovedLeftRight > 0) {//moving to the right \n\t\t\t\t\tint x=startColumn + 1;\n\t\t\t\t\twhile (x < endColumn) {\n\t\t\t\t\t\tif (board[startRow][x].getOccupyingPiece() != null) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tx++;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\tif (distanceMovedLeftRight < 0) {//moving to the left\n\t\t\t\t\tint x = startColumn -1;\n\t\t\t\t\twhile (x > endColumn) {\n\t\t\t\t\t\tif (board[startRow][x].getOccupyingPiece() != null) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tx--;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\treturn true;\n\n\t\t}\n\t\tif (startColumn == endColumn) { //moving up or down\n\t\t\tif (Math.abs(distanceMovedUpDown) > 1) { //checking if there's pieces btwn start and end if moving more than 1\n\t\t\t\tif (distanceMovedUpDown > 0) {//moving up the array\n\t\t\t\t\tint x=startRow + 1;\n\t\t\t\t\twhile (x < endRow) {\n\t\t\t\t\t\tif (board[x][startColumn].getOccupyingPiece() != null) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tx++;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\tif (distanceMovedUpDown < 0) {//moving down the array\n\t\t\t\t\tint x = startRow -1;\n\t\t\t\t\twhile (x > endRow) {\n\t\t\t\t\t\tif (board[x][startColumn].getOccupyingPiece() != null) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tx--;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\n\t}", "boolean isCellRightNeighbor() {\r\n return this.neighbors.contains(new Cell(this.x + 1, this.y));\r\n }", "private boolean isTownHallAt(int x, int y, Node dest) {\n\t\tif (x == dest.getX() && y == dest.getY()) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (currentState.isUnitAt(x, y)) {\n\t\t\tint unitID = currentState.unitAt(x, y);\n \t\n String unitName = currentState.getUnit(unitID).getTemplateView().getName();\n if(unitName.equalsIgnoreCase(\"Townhall\")) {\n \treturn true;\n }\n\t\t}\n\t\n\t\treturn false;\n\t}", "private boolean inBounds(int row, int col){\n if (row > -1 && row < 120 && col > -1 && col < 160)\n return true;\n return false;\n }", "protected boolean tileCollision(double xa, double ya) { // returns true if there is a collision\n\t\tboolean solid = false;\n\n\t\tfor (int c = 0; c < 4; c++) { // this checks all 4 corners for collision\n\t\t\tdouble xt = ((x - 6 + xa) - c % 2 * 4) / 16; // i honestly don't know hoW this works. It just does. Episode 65.\n\t\t\tdouble yt = ((y - 4 + ya) - c / 2 * 7) / 16;\n\n\t\t\tint ix = (int) Math.ceil(xt); // returns the smallest integer greater than or equal to a number\n\t\t\tint iy = (int) Math.ceil(yt);\n\n\t\t\tif (level.getTile(ix, iy).solid()) solid = true; // this is the important statement for collision detection. It works by looking at the tile you want to go to and seeing if it is solid.\n\t\t}\n\n\t\treturn solid;\n\t}", "boolean canBuildBlock(Tile t);", "public boolean isTileSelected() {\n return selectedTile != null;\n }", "private boolean isCorrect() {\n\t\t// if a single tile is incorrect, return false\n\t\tfor (Tile tile : tiles) {\n\t\t\tif (!tile.isCorrect()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "boolean canRise(Coordinates coord, double horizon, long time) throws AstrometryException;", "boolean hasHasZCoordinate();", "public boolean isAdjecentWithCorners(Cell otherCell)\n\t{\n\t\treturn Math.abs(gridX - otherCell.getGridX()) <= 1 && Math.abs(gridY - otherCell.getGridY()) <= 1;\n\t}", "public abstract boolean actualPlace(int row, int col);", "public boolean isTileOnMap(int x, int y) {\n\t\treturn getTileAt(x, y) != null;\n\t}", "public boolean reachBorder() {\n // check up\n if (direction == 12) {\n if (this.getY() < speed) {\n return true;\n }\n }\n //check down\n if (direction == 6) {\n if (this.getY() + this.getHeight() + speed > GameUtility.GameUtility.MAP_HEIGHT) {\n return true;\n }\n\n }\n //check left\n if (direction == 9) {\n if (this.getX() < speed) {\n return true;\n }\n }\n //check right\n if (direction == 3) {\n if (this.getX()\n + this.getWidth() + speed > GameUtility.GameUtility.MAP_WIDTH) {\n return true;\n }\n }\n return false;\n\n }", "@Override\r\n\tpublic boolean canMove(int x, int y, Tile[][] tiles) {\r\n\t\treturn false;\r\n\t}", "private boolean playerFoundTreasure(int playerRow, int playerCol){\n return (playerRow == 7 && playerCol == 9);\n }", "boolean testCoords(Tester t) {\n return t.checkExpect(this.p3.xCoord(), 50) && t.checkExpect(this.p4.yCoord(), 600);\n }", "public abstract boolean isHit(int x, int y);", "boolean hasRadius();", "boolean hasRadius();", "public boolean hasTile(Tile a_tile){\n for(int i = 0; i < playerHand.size(); i++){\n if(playerHand.get(i).getLeft() == a_tile.getLeft() && playerHand.get(i).getRight() == a_tile.getRight()){\n return true;\n }\n }\n return false;\n }", "protected boolean checkRep() {\n if ( this.getX() < 0 || this.getY() < 0 || this.getX() >= 20 || this.getY() >= 20 ) {\n return false;\n }\n return true;\n }", "public boolean isSquare()\n {\n return width == height;\n }", "boolean hasRect2Value();", "public boolean isWin() {\n\t\t\n\t\tboolean win = true;\n\t\t\n\t\tfor(int i = 0; i < numTiles - 2; i++) {\n\t\t\twin = win && (boardConfig[i] < boardConfig[i+1]);\n\t\t}\n\t\t\n\t\twin = win && (boardConfig[numTiles - 1] == 0);\n\t\t\n\t\treturn win;\n\t}", "public boolean isAt(Point punto) {\r\n Point inner = toInnerPoint(punto);\r\n for (Point block : innerPiece.getPoints())\r\n \tif (block.X() == inner.X() && block.Y() == inner.Y())\r\n \t\treturn true;\r\n return false;\r\n }", "boolean isCrouching();", "private boolean isInside(int i, int j) {\n\t\tif (i < 0 || j < 0 || i > side || j > side)\n\t\t\treturn false;\n\t\treturn true;\n\t}", "public boolean hasTile(GroundTile tile) {\n return this.editedTiles.contains(tile);\n }", "public boolean tileRock(float xTile, float yTile)\r\n/* 207: */ {\r\n/* 208:231 */ return (tileInBounds(xTile, yTile)) && (this.rock[((int)xTile)][((int)yTile)] != 0);\r\n/* 209: */ }", "boolean checkBorders();", "private boolean checkCorners(final int posLine, final int posColumn, final int boardIcon, final int incLine, final int incColumn) {\n\t\tif (posColumn < boardPositions.length && posLine < boardPositions.length && posColumn >= 0 && posLine >= 0) {\n\t\t\tif (boardPositions[posLine][posColumn] == boardIcon) {\n\t\t\t\treturn checkCorners(posLine + incLine, posColumn + incColumn, boardIcon, incLine, incColumn);\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "private static boolean isFullHex(Position p, int side) {\n int x = p.getX();\n int y = p.getY();\n // ensure the left bottom corner is in range\n if (x >= 0 && x <= WIDTH && y >= 0 && y <= HEIGHT) {\n // ensure the right bottom corner is in range\n return ((x + 3 * side - 2) <= WIDTH) && (y + side * 2 <= HEIGHT);\n }\n return false;\n }" ]
[ "0.7878966", "0.7122706", "0.6829241", "0.6642566", "0.6569847", "0.6507383", "0.6503912", "0.6457556", "0.64197075", "0.6419248", "0.64043176", "0.6288286", "0.62610656", "0.6211847", "0.6192435", "0.61865735", "0.6153546", "0.6133566", "0.60522085", "0.6048163", "0.60480744", "0.6045255", "0.6042089", "0.60192937", "0.6017102", "0.60086536", "0.5998443", "0.5939043", "0.59389144", "0.59288734", "0.59206915", "0.59138525", "0.59113175", "0.59108096", "0.5902027", "0.58928823", "0.5889059", "0.58803254", "0.58535385", "0.5848014", "0.58421284", "0.58352476", "0.58290243", "0.582282", "0.582282", "0.582282", "0.5806484", "0.5795455", "0.5791496", "0.5790542", "0.57892776", "0.57887006", "0.5776428", "0.5773582", "0.57729274", "0.5772478", "0.57619655", "0.57519454", "0.57470596", "0.57445526", "0.57269114", "0.5726833", "0.571539", "0.57142663", "0.57016", "0.5693826", "0.56865156", "0.5680988", "0.5676839", "0.56661034", "0.56591856", "0.56516564", "0.56506157", "0.56485623", "0.56468403", "0.5612503", "0.56121564", "0.5611113", "0.56092346", "0.56087923", "0.5602273", "0.55968183", "0.55957246", "0.5594137", "0.5592354", "0.5589578", "0.5589578", "0.5587803", "0.55856395", "0.558561", "0.5585429", "0.558542", "0.55804616", "0.5577136", "0.55717033", "0.5559499", "0.5553117", "0.5552226", "0.55408084", "0.5535675" ]
0.711216
2
Denotes whether tile x,y is a crossroad
private boolean isCrossroad(int x, int y) { byte count = 0; count += x + 1 < LoadMap.MAPWIDTHINTILES ? (connectedTiles[y][x + 1] != null ? 1 : 0) : 0; count += x - 1 >= 0 ? (connectedTiles[y][x - 1] != null ? 1 : 0) : 0; count += y + 1 < LoadMap.MAPHEIGHTINTILES ? (connectedTiles[y + 1][x] != null ? 1 : 0) : 0; count += y - 1 >= 0 ? (connectedTiles[y - 1][x] != null ? 1 : 0) : 0; return count > 2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isCrossable(int x, int y) {\n\t\treturn g[x][y].isCrossable();\n\t}", "private boolean isCorner(int x, int y)\n {\n return x-1 >= 0 && x+1 < LoadMap.MAPWIDTHINTILES && y-1 >= 0 && y+1 < LoadMap.MAPHEIGHTINTILES && (\n (connectedTiles[y][x+1] != null && (connectedTiles[y+1][x] != null || connectedTiles[y-1][x] != null))\n || (connectedTiles[y][x-1] != null && (connectedTiles[y+1][x] != null || connectedTiles[y-1][x] != null)));\n }", "public boolean isNeighbour(Tile tile){\n int x1 = this.getX();\n int y1 = this.getY();\n\n int x2 = tile.getX();\n int y2 = tile.getY();\n return (x1 == x2 && (Math.abs(y1-y2) == 1)) || (y1 == y2 && (Math.abs(x1-x2) == 1));\n }", "public boolean isInsideTile(int x, int y){\n\t\treturn (x >= tileX && x <= tileX+tileImage.getWidth() && y >= tileY && y <= tileY+tileImage.getHeight());\n\t}", "public void checkTileMapCollision() {\t\t\t// Works for both x and y directions. Only going to use the x-component for now but leaves room for future expansion.\n\n\t\tcurrCol = (int)x / tileSize;\n\t\tcurrRow = (int)y / tileSize;\n\n\t\txdest = x + dx;\n\t\tydest = y + dy;\n\n\t\txtemp = x;\n\t\tytemp = y;\n\n\t\tcalculateCorners(x, ydest);\n\t\tif (dy < 0) { \t\t\t// upwards\n\t\t\tif (topLeft || topRight) {\n\t\t\t\tdy = 0;\n\t\t\t\tytemp = currRow * tileSize + height / 2;\t\t\t// Set just below where we bumped our head.\n\t\t\t} else {\n\t\t\t\tytemp += dy;\t\t// Otherwise keep going.\n\t\t\t}\n\t\t}\n\t\tif (dy > 0) { \t\t\t// downwards\n\t\t\tif (bottomLeft || bottomRight) {\n\t\t\t\tdy = 0;\n\t\t\t\tfalling = false;\n\t\t\t\tytemp = (currRow + 1) * tileSize - height / 2;\n\t\t\t} else {\n\t\t\t\tytemp += dy;\n\t\t\t}\n\t\t}\n\n\t\tcalculateCorners(xdest, y);\n\t\tif (dx < 0) { \t\t\t// left\n\t\t\tif (topLeft || bottomLeft) {\n\t\t\t\tdx = 0;\n\t\t\t\txtemp = currCol * tileSize + width / 2;\n\t\t\t} else {\n\t\t\t\txtemp += dx;\n\t\t\t}\n\t\t}\n\t\tif (dx > 0) { \t\t\t// right\n\t\t\tif (topRight || bottomRight) {\n\t\t\t\tdx = 0;\n\t\t\t\txtemp = (currCol + 1) * tileSize - width / 2;\n\t\t\t} else {\n\t\t\t\txtemp += dx;\n\t\t\t}\n\t\t}\n\n\t\tif(!falling) {\n\t\t\tcalculateCorners(x, ydest + 1);\t\t\t// Have to check the ground 1 pixel below us and make sure we haven't fallen off a cliff\n\t\t\tif(!bottomLeft && !bottomRight) {\n\t\t\t\tfalling = true;\n\t\t\t}\n\t\t}\n\n\t}", "private boolean checkCollision(int x, int y) {\r\n\t\tRectangle r = new Rectangle(); // Location Rectangle\r\n\t\tr.width = Tile.TILEWIDTH;\r\n\t\tr.height = Tile.TILEHEIGHT;\r\n\t\tr.x = x * Tile.TILEWIDTH;\r\n\t\tr.y = y * Tile.TILEHEIGHT;\r\n\t\tfor(Nonmoving n : handler.getWorld().getEntityManager().getNonmoving()) {\r\n\t\t\tif(n.getCollisionBounds(0, 0).intersects(r)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(Objects o : handler.getWorld().getEntityManager().getObjects()) {\r\n\t\t\tif(o.getCollisionBounds(0, 0).intersects(r)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private boolean makeMapTileTakeTurn(int x, int y) {\n MapTile tile_at_x_y = this.getTile(x, y);\n if (tile_at_x_y == null) {\n return false;\n }\n tile_at_x_y.takeTurn();\n return true;\n }", "public boolean isValidTile_XY(MapTile[][] scanMapTiles, int x, int y)\n\n{\n\tif (scanMapTiles[x][y].getTerrain() == Terrain.SAND || scanMapTiles[x][y].getTerrain() == Terrain.NONE\n\t\t\t|| scanMapTiles[x][y].getHasRover() == true)\n\t\treturn false;\n\n\treturn true;\n}", "public boolean tileInBounds(float xTile, float yTile)\r\n/* 111: */ {\r\n/* 112:124 */ return (xTile >= 0.0F) && (xTile < getWidthInTiles()) && (yTile >= 0.0F) && (\r\n/* 113:125 */ yTile < getHeightInTiles());\r\n/* 114: */ }", "private boolean onBoard(int x, int y){\n if((x<WIDTH&&y<HEIGHT)){\n if(0<=x&&0<=y){\n return true;\n }\n return false;\n }else{\n return false;\n }\n\t}", "boolean canMove(Tile t);", "public boolean tileFence(float xTile, float yTile)\r\n/* 202: */ {\r\n/* 203:226 */ return (tileInBounds(xTile, yTile)) && (this.door[((int)xTile)][((int)yTile)] != 0);\r\n/* 204: */ }", "public boolean isTileOnMap(int x, int y) {\n\t\treturn getTileAt(x, y) != null;\n\t}", "public boolean tileReachObjectives(float xTile, float yTile)\r\n/* 122: */ {\r\n/* 123:136 */ return (!tileInBounds(xTile, yTile)) || \r\n/* 124:137 */ (this.reach[((int)xTile)][((int)yTile)] != 0);\r\n/* 125: */ }", "private static boolean isCornerTile(Tile tile, Map<Border, List<Tile>> borderMap) {\n int n = 0;\n for (Border border : tile.getBorders()) {\n if (borderMap.get(border).size() == 1) {\n n++;\n }\n }\n return n == 2;\n }", "public boolean isWalkAbleTile(int x, int y) {\n\t\tfor (Entity e : entities) {\n\t\t\tif (e.getX() >> 4 == x && e.getY() >> 4 == y)\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean canMoveTo(int x, int y) {\n for (Cell c : this.board) {\n if (c.x == x && c.y == y) {\n return !c.isFlooded;\n }\n }\n return false;\n }", "public void checkClickedArea(int xMouse,int yMouse)\n {\n\n isSelected=false;\n if(targetable==true&&(xMouse>=xBeginMap+15&&xMouse<=xEndMap-15\n &&yMouse>=yBeginMap+15&&yMouse<=yEndMap-15))\n {\n\n isSelected=true;\n }\n\n }", "private boolean isInsideBoard(int x, int y){\n if(x < 0 || x > getWidth() - 1 || y < 0 || y > getHeight() - 1)\n return false;\n\n return true;\n }", "public static boolean insideBounds(GameTile tile) {\n\n if (tile == null) {\n return false;\n } else {\n\n int x = tile.getXCoord();\n int y = tile.getYCoord();\n\n return !(x < 0 || y < 0) && !(x > TILE_COLS || y > TILE_ROWS);\n\n }\n\n }", "public boolean tileWalkable(float xTile, float yTile)\r\n/* 160: */ {\r\n/* 161:183 */ return (!tileInBounds(xTile, yTile)) || \r\n/* 162:184 */ (this.walkable[((int)xTile)][((int)yTile)] != 0);\r\n/* 163: */ }", "@Override\n public boolean canMove(double x, double y) {\n double xr = this.x, yr = this.y - 32; //subtract y to get more accurate results\n //the thing is, subract to 32 (sprite size), so if we add 1 tile we get the next pixel tile with this\n //we avoid the shaking inside tiles with the help of steps\n if (direction == 0) {\n yr += sprite.getSize() - 1;\n xr += sprite.getSize() / 2;\n }\n if (direction == 1) {\n yr += sprite.getSize() / 2;\n xr += 1;\n }\n if (direction == 2) {\n xr += sprite.getSize() / 2;\n yr += 1;\n }\n if (direction == 3) {\n xr += sprite.getSize() - 1;\n yr += sprite.getSize() / 2;\n }\n int xx = Coordinates.pixelToTile(xr) + (int) x;\n int yy = Coordinates.pixelToTile(yr) + (int) y;\n Entity a = Board.getInstance().getEntity(xx, yy, this); //entity of the position we want to go\n return !a.collide(this);\n }", "public boolean isAdjacentFloor(int x, int y) {\n Position pUp = new Position(x, y + 1);\n Position pDown = new Position(x, y - 1);\n Position pLeft = new Position(x - 1, y);\n Position pRight = new Position(x + 1, y);\n Position pUpLeft = new Position(x - 1, y + 1);\n Position pUpRight = new Position(x + 1, y + 1);\n Position pDownLeft = new Position(x - 1, y - 1);\n Position pDownRight = new Position(x + 1, y - 1);\n if (pUp.y < worldHeight - 1) {\n if (world[pUp.x][pUp.y].equals(Tileset.FLOOR)) {\n return true;\n }\n }\n if (pDown.y > 0) {\n if (world[pDown.x][pDown.y].equals(Tileset.FLOOR)) {\n return true;\n }\n }\n if (pLeft.x > 0) {\n if (world[pLeft.x][pLeft.y].equals(Tileset.FLOOR)) {\n return true;\n }\n }\n if (pRight.x < worldWidth - 1) {\n if (world[pRight.x][pRight.y].equals(Tileset.FLOOR)) {\n return true;\n }\n }\n if (pUpLeft.y < worldHeight - 1 && pUpLeft.x > 0) {\n if (world[pUpLeft.x][pUpLeft.y].equals(Tileset.FLOOR)) {\n return true;\n }\n }\n if (pUpRight.y < worldHeight - 1 && pUpRight.x < worldWidth - 1) {\n if (world[pUpRight.x][pUpRight.y].equals(Tileset.FLOOR)) {\n return true;\n }\n }\n if (pDownLeft.y > 0 && pDownLeft.x > 0) {\n if (world[pDownLeft.x][pDownLeft.y].equals(Tileset.FLOOR)) {\n return true;\n }\n }\n if (pDownRight.y > 0 && pDownRight.x < worldWidth - 1) {\n if (world[pDownRight.x][pDownRight.y].equals(Tileset.FLOOR)) {\n return true;\n }\n }\n return false;\n }", "public boolean hasCollided(float _x, float _y, float _width, float _height) \r\n {\n\t \t \tfloat leftA = _x;\r\n\t \t \tfloat rightA = _x + _width;\r\n\t \t \tfloat topA = _y;\r\n\t \t \tfloat bottomA = _y + _height;\r\n\t \t \r\n\t \t //Calculate the sides of leaf\r\n\t \t \tfloat leftB = x;\r\n\t \t \tfloat rightB = x + width;\r\n\t \t \tfloat topB = y;\r\n\t \t \tfloat bottomB = y + height;\r\n\t \t \r\n\t\r\n\t \t //If any of the sides from A are outside of B\r\n\t \t if( bottomA <= topB || topA >= bottomB || rightA <= leftB || leftA >= rightB)\r\n\t \t {\r\n\t \t return false;\r\n\t \t }\r\n\t \t else\r\n\t \t {\r\n\t \t \t//If none of the sides from A are outside B\r\n\t \t \treturn true;\r\n\t \t }\r\n\t\r\n\t \t \r\n\t \r\n \t \t\r\n }", "@Override\n public boolean canMove(double x, double y) {\n double xRec=rectangle.getX();\n double yRec=rectangle.getY();\n rectangle.setLocation((int)(xRec+x*1),(int)(yRec+y*1));\n\n List<Rectangle> staticRectangles= board.getStaticRectangles();\n List<Creature> creatures=board.getCreatures();\n Iterator<Rectangle> itr1=staticRectangles.iterator();\n\n while(itr1.hasNext()){\n Rectangle tmpRectangle =itr1.next();\n if(rectangle.intersects(tmpRectangle)) {\n return false;\n }\n }\n Iterator<Creature> itr2=creatures.iterator();\n while(itr2.hasNext()){\n Creature creature=itr2.next();\n if(creature==this){\n continue;\n }\n else{\n if(rectangle.intersects(creature.getRectangle()))\n return false;\n }\n\n }\n\n return true;\n }", "public boolean hasNeighbor(Tile tile) {\n if (tile == null) {\n return false;\n }\n\n return (this.tileNorth == tile || this.tileEast == tile || this.tileSouth == tile || this.tileEast == tile);\n }", "private boolean collision(double xa, double ya) {\n\t\t\n\t\tint xMin = 2;\n int xMax = 15;\n int yMin = 15;\n int yMax = 19;\n if(Player.isSwimming){\n \tyMax = 1;\n \txMax = 18;\n }\n if (level.getTile((int)this.x / 32, (int)this.y / 32).getId() == 30) {\n \txMax = 18;\n \txMin = 20;\n }\n if (level.getTile((int)this.x / 32, (int)this.y / 32).getId() == 25) {\n \txMax = 32;\n \txMin = 32;\n \tyMax = 7;\n }\n \n \n int yMinWater = 0;\n for (int x = xMin; x < xMax; x++) {\n if (isSolidTile((int)xa, (int)ya, x, yMin)) {\n return true;\n }\n }\n for (int x = xMin; x < xMax; x++) {\n if (isSolidTile((int)xa,(int) ya, x, yMax)) {\n return true;\n }\n }\n for (int y = yMin; y < yMax; y++) {\n if (isSolidTile((int)xa, (int)ya, xMin, y)) {\n return true;\n }\n }\n for (int y = yMin; y < yMax; y++) {\n if (isSolidTile((int)xa, (int)ya, xMax, y)) {\n return true;\n }\n }\n if(Player.isSwimming || Player.isClimbing){\n \t for (int y = yMinWater; y < yMax; y++) {\n if (isSolidTile((int)xa, (int)ya, yMinWater, y)) {\n return true;\n }\n }\n }\n \n return false;\n\t}", "private static boolean isCorridor(int[][] area, int x, int y, int x2, int y2) {\r\n\t\tboolean one = false;\r\n\t\tboolean two = false;\r\n\t\tif ((y < 0) || (x >= area.length) || (x < 0) || (y >= area[x].length)) {\r\n\t\t\tone = true;\r\n\t\t} else {\r\n\t\t\tone = (area[x][y] >= 1);\r\n\t\t}\r\n\t\tif ((y2 < 0) || (x2 >= area.length) || (x2 < 0) || (y2 >= area[x2].length)) {\r\n\t\t\ttwo = true;\r\n\t\t} else {\r\n\t\t\ttwo = (area[x2][y2] >= 1);\r\n\t\t}\r\n\t\tif(!one && !two) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t}", "private boolean stop() {\n\t\tboolean collide = false;\n\n\t\tdist = (int) MathMachine.distance((xOrigin - this.x), (yOrigin - this.y)); // distance traveled\n\t\tif (dist >= move_range) collide = true;\n\n\t\tif (Math.abs(x - xD) <= 2 && Math.abs(y - yD) <= 2) { // adding 8 shifts the collision box from the top left corner to the bottom right.\n\t\t\tcollide = true; // this is the important statement for collision detection. It works by looking at the tile you want to go to and seeing if it is solid.\n\t\t}\n\n\t\treturn collide;\n\t}", "private boolean findTicTacToe(int x, int y) {\n for (Point c : ticTacToeList) {\n if (c != null && c.getX() == x && c.getY() == y)\n return true;\n }\n return false;\n }", "public boolean isSelfCrossing(int[] x) {\n for(int i = 0; i <= x.length - 1; i ++){\n // Case 1 where arrow i goes across arrow i - 3\n if(i >= 3 && x[i] >= x[i - 2] && x[i - 1] <= x[i - 3]) return true;\n // Case 2 where arrow i goes across arrow i - 4\n if(i >= 4 && x[i] + x[i - 4] >= x[i - 2] && x[i - 1] == x[i - 3]) return true;\n // Case 3 where arrow goes across arrow i - 5\n if(i >= 5 && x[i - 1] + x[i - 5] >= x[i - 3] && x[i] + x[i - 4] >= x[i - 2]\n && x[i - 2] >= x[i - 4] && x[i - 1] <= x[i - 3]) return true;\n }\n return false;\n }", "public boolean situatedInside(double x, double y) {\n if(y>this.bottomleft.x && y<this.topright.x && x <this.topright.y && x > this.bottomleft.y)\n return true;\n else\n return false;\n }", "@Override\n public boolean hasPossibleCapture(final Coordinate destination) {\n\n Coordinate coordinate = this.getCoordinate();\n int row = coordinate.getRow();\n int col = coordinate.getCol();\n\n //\n //\n ////\n int tempRow1 = row - 2;\n int tempCol1 = col - 1;\n Coordinate tempCoordinate1 = new Coordinate(tempRow1, tempCol1);\n if (destination.equals(tempCoordinate1)) {\n return true;\n }\n\n ////\n //\n //\n int tempRow2 = row + 2;\n int tempCol2 = col - 1;\n Coordinate tempCoordinate2 = new Coordinate(tempRow2, tempCol2);\n if (destination.equals(tempCoordinate2)) {\n return true;\n }\n\n //////\n //\n int tempRow3 = row - 1;\n int tempCol3 = col - 2;\n Coordinate tempCoordinate3 = new Coordinate(tempRow3, tempCol3);\n if (destination.equals(tempCoordinate3)) {\n return true;\n }\n\n ///////\n //\n int tempRow4 = row - 1;\n int tempCol4 = col + 2;\n Coordinate tempCoordinate4 = new Coordinate(tempRow4, tempCol4);\n if (destination.equals(tempCoordinate4)) {\n return true;\n }\n\n ////\n //\n //\n int tempRow5 = row + 2;\n int tempCol5 = col + 1;\n Coordinate tempCoordinate5 = new Coordinate(tempRow5, tempCol5);\n if (destination.equals(tempCoordinate5)) {\n return true;\n }\n\n //\n //\n ////\n int tempRow6 = row - 2;\n int tempCol6 = col + 1;\n Coordinate tempCoordinate6 = new Coordinate(tempRow6, tempCol6);\n if (destination.equals(tempCoordinate6)) {\n return true;\n }\n\n //\n //////\n int tempRow7 = row + 1;\n int tempCol7 = col - 2;\n Coordinate tempCoordinate7 = new Coordinate(tempRow7, tempCol7);\n if (destination.equals(tempCoordinate7)) {\n return true;\n }\n\n //\n //////\n int tempRow8 = row + 1;\n int tempCol8 = col + 2;\n Coordinate tempCoordinate8 = new Coordinate(tempRow8, tempCol8);\n return destination.equals(tempCoordinate8);\n }", "public boolean isWithinObject(int x, int y)\n {\n if( x > coX-Xsize/2 &&\n x < coX+Xsize/2 &&\n y > coY-Ysize/2 &&\n y < coY+Ysize/2 )\n return true;\n else\n return false;\n }", "@Test\n public void notOnGroundTest(){\n TileMap tileMap = new TileMap(24, 24, new byte[][]{{0,0},{0,0}},new byte[][]{{1,0},{1,1}}, tilepath);\n Rect cBox = new Rect(2,2,2,2);\n assertFalse(tileMap.isOnGround(cBox));\n }", "public void checkIfAtEdge() {\n\t\tif(x<=0){\n\t\t\tx=1;\n\t\t\tatEdge=true;\n\t\t\tmoving=false;\n\t\t}\n\t\tif(y<=0){\n\t\t\ty=1;\n\t\t\tatEdge=true;\n\t\t\tmoving=false;\n\t\t}\n\t\tif(x>=GameSystem.GAME_WIDTH-collisionWidth){\n\t\t\tx=GameSystem.GAME_WIDTH-collisionHeight-1;\n\t\t\tatEdge=true;\n\t\t\tmoving=false;\n\t\t}\n\t\tif(y>=GameSystem.GAME_HEIGHT-collisionWidth){\n\t\t\ty=GameSystem.GAME_HEIGHT-collisionHeight-1;\n\t\t\tatEdge=true;\n\t\t\tmoving=false;\n\t\t}\n\t\telse{\n\t\t\tatEdge=false;\n\t\t}\n\t\t\n\t}", "@Override\n public boolean detectedCollision(int xCoordinate, int yCoordinate) {\n return xCoordinate >= x && xCoordinate <= x + width\n && yCoordinate >= y && yCoordinate <= y + height;\n }", "public boolean collides(int x, int y) {\n //Check For Collision\n // bottom left corner\n Tile tile = game.map.getTilePixel(x, y);\n // top right corner\n Tile tile2 = game.map.getTilePixel((int) (x + width), (int) (y + width));\n // top left corner\n Tile tile3 = game.map.getTilePixel(x, (int) (y + width));\n // bottom right corner\n Tile tile4 = game.map.getTilePixel((int) (x + width), y);\n try {\n boolean collisionWithMap = (tile == null) || (!tile.isPassable() || !tile3.isPassable() || !tile2.isPassable() || !tile4.isPassable());\n //React to Collision\n if (collisionWithMap) {\n if (speedX != 0 && speedY != 0) {\n if ((!tile.isPassable() && !tile3.isPassable()) || (!tile2.isPassable() && !tile4.isPassable()))\n speedX = 0;\n if ((!tile.isPassable() && !tile4.isPassable()) || (!tile2.isPassable() && !tile3.isPassable()))\n speedY = 0;\n }\n }\n return collisionWithMap;\n } catch (NullPointerException e) {\n //in case any of the tiles is outside of the map\n return true;\n }\n }", "protected boolean tileCollision(double xa, double ya) { // returns true if there is a collision\n\t\tboolean solid = false;\n\n\t\tfor (int c = 0; c < 4; c++) { // this checks all 4 corners for collision\n\t\t\tdouble xt = ((x - 6 + xa) - c % 2 * 4) / 16; // i honestly don't know hoW this works. It just does. Episode 65.\n\t\t\tdouble yt = ((y - 4 + ya) - c / 2 * 7) / 16;\n\n\t\t\tint ix = (int) Math.ceil(xt); // returns the smallest integer greater than or equal to a number\n\t\t\tint iy = (int) Math.ceil(yt);\n\n\t\t\tif (level.getTile(ix, iy).solid()) solid = true; // this is the important statement for collision detection. It works by looking at the tile you want to go to and seeing if it is solid.\n\t\t}\n\n\t\treturn solid;\n\t}", "public boolean onScreen(double x, double y) {\n // get the in game coordinates and real coordinates on screen\n int scaledWidth = (int) (TileDataRegister.TILE_WIDTH * scale);\n int scaledHeight = (int) (TileDataRegister.TILE_HEIGHT * scale);\n double basex = (map.getWidth() * scaledWidth) / 2.0\n + scaledWidth / 4.0;\n double basey = scaledHeight / 4.0;\n\n //reverse the math logic from the GameRenderer\n double realX = ((y - x) / 2.0) * scaledWidth + currentXOffset + xOffset + basex;\n double realY = ((y + x) / 2.0) * scaledHeight + currentYOffset + yOffset + basey;\n\n return !(realX < -0.1 * viewPortWidth - basex || realX > 1.1 * viewPortWidth + basex ||\n realY < -0.1 * viewPortHeight - basex || realY > 1.1 * viewPortHeight + basey);\n }", "boolean canPickup(int x, int y) {\n return ((posX == x) && (posY == y));\n }", "public final boolean checkIfInZone(int x, int y) { return (getSiege(x, y) != null); }", "public static boolean isBarrier(float x, float y) {\n\t\tint rgb = imageLandscape.getRGB((int) x, (int) y);\n\t\tColor c = new Color(rgb);\n\t\t\n\t\t//If the pixel that the sprite is attempting to move to is black (barrier), the move is rejected.\n\t\tif (c.getRed() <= 10 && c.getGreen() <= 10 && c.getBlue() <= 10) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean hitSide(int xLow, int xHigh, int yLow, int yHigh)\n\t{\n\t\tif ((x + frogSize >= xHigh) || (x <= xLow))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\t\n\t\tif ((y <= yLow) || (y + frogSize >= yHigh))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean checkM(){\n if(currentLocation.x == previousLocation.x && currentLocation.y == previousLocation.y) {\n return false;\n }\n // Is outside the border\n if(currentLocation.x < size || currentLocation.y < size || currentLocation.x > map.numRows - size || currentLocation.y > map.numCols - size) {\n return false;\n }\n // Is on the land\n double angle2 = 0;\n while (angle2 < 6.3) {\n if (map.getTerrainGrid()[currentLocation.x + (int) (size/2 * cos(angle2))][currentLocation.y + (int) (size/2 * sin(angle2))] == Colors.OCEAN) {\n return false;\n }\n angle2 += 0.3;\n }\n return true;\n }", "public static boolean tile_in_cluster(int x, int y){\n int cx = (int)Math.floor((float)x / WorldChunk.CHUNK_SIZE);\n int cy = (int)Math.floor((float)y / WorldChunk.CHUNK_SIZE);\n\n return chunk_in_cluster(cx,cy);\n }", "public boolean isOnPlateau(int x, int y) {\n return x >= 0 && x <= xTopRight && y >= 0 && y <= yTopRight;\n }", "@Override\n public boolean canMoveTo(int x, int y, Board board) {\n \n if (x > this.x && y > this.y){ //move up to the right\n if(lowCh(\"uright\",xt+1,yt+1,x,y,board) == true)\n {\n return canTake(x,y,board) == true;\n }else{\n return false;\n }\n } else if (x > this.x && y < this.y){ //move down to the right\n if(lowCh(\"dright\",xt+1,yt-1,x,y,board) == true)\n {\n return canTake(x,y,board) == true;\n }else{\n return false;\n }\n } else if (x < this.x && y > this.y){ //move up to the left\n if (lowCh(\"uleft\",xt-1,yt+1,x,y,board) == true)\n {\n return canTake(x,y,board) == true;\n }else{\n return false;\n }\n } else if (x < this.x && y < this.y){ //move down to the left\n if (lowCh(\"dleft\",xt-1,yt-1,x,y,board) == true)\n {\n return canTake(x,y,board) == true;\n }else{\n return false;\n }\n } else {\n return false;\n }\n }", "public boolean canMove2() {\n\t\tGrid<Actor> gr = getGrid(); \n\t\tif (gr == null) {\n\t\t\treturn false; \n\t\t}\n\t\t\n\t\tLocation loc = getLocation(); \n\t\tLocation next = loc.getAdjacentLocation(getDirection());\n\t\tLocation next2 = next.getAdjacentLocation(getDirection());\n\t\tif (!gr.isValid(next)) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!gr.isValid(next2)) {\n\t\t\treturn false;\n\t\t}\n\t\tActor neighbor = gr.get(next2); \n\t\treturn (neighbor == null) || (neighbor instanceof Flower); \n\t}", "public static boolean isCardinal(Tile tile1, Tile tile2) {\n\t\tif (tile1.getX() == tile2.getX() || tile1.getY() == tile2.getY())\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public boolean canCoordinateBeSpawn(int par1, int par2)\n {\n return false;\n }", "public boolean hasCollided(int xa, int ya) {\n int xMin = 0;//This is based on the character sprite... soo like near the legs is the collision box\n int xMax = 7;\n int yMin = 3;\n int yMax = 7;\n for (int x = xMin; x < xMax; x++) {\n if (isSolidTile(xa, ya, x, yMin)) {\n return true;\n }\n }\n for (int x = xMin; x < xMax; x++) {\n if (isSolidTile(xa, ya, x, yMax)) {\n return true;\n }\n }\n for (int y = yMin; y < yMax; y++) {\n if (isSolidTile(xa, ya, xMin, y)) {\n return true;\n }\n }\n for (int y = yMin; y < yMax; y++) {\n if (isSolidTile(xa, ya, xMax, y)) {\n return true;\n }\n }\n return false;\n }", "boolean hasHasXCoordinate();", "public abstract boolean isHit(int x, int y);", "private boolean isValidCoordinate(int x, int y) {\n return x >= 0 && x < gameState.mapSize\n && y >= 0 && y < gameState.mapSize;\n }", "@Override\r\n\tpublic boolean canMove(int x, int y, Tile[][] tiles) {\r\n\t\treturn false;\r\n\t}", "public boolean isMine(int x, int y);", "public boolean isInside(int x, int y) {\r\n if (this.state == 0) {\r\n if ((x >= this.x && x <= (this.x +width)) &&\r\n y >= this.y && y <= (this.y +height)) {\r\n return true;\r\n }\r\n } else if (this.state == 1) {\r\n if ((x <= this.x && x >= (this.x - height)) &&\r\n y >= this.y && y <= (this.y + width)) {\r\n return true;\r\n }\r\n } else if (this.state == 2) {\r\n if ((x <= this.x && x >= (this.x - width)) &&\r\n y <= this.y && y >= (this.y - height)) {\r\n return true;\r\n }\r\n } else if (this.state == 3) {\r\n if ((x >= this.x && x <= (this.x + height)) &&\r\n y <= this.y && y >= (this.y - width)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "private boolean canCaptureSomewhere(int x, int y){\n\t\tfor (int i = -2; i <= 2; i=i+4){\n\t\t\tfor (int j = -2; j <= 2; j=j+4){\n\t\t\t\tif (!(x+i < 0 || x+i > N\t\t\n\t\t\t\t|| y+j < 0 || y+j > N)){\t\t//don't give validMove impossible final coordinates\n\t\t\t\t\tif (validMove(x, y, x+i, y+j)) return true;\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private boolean checkCross(final int posLine, final int posColumn, final int boardIcon, final int incLine, final int incColumn) {\n\t\tboolean validHigh = false;\n\t\tboolean validLow = false;\n\t\tvalidHigh = checkCrossAux(posLine, posColumn, boardIcon, incLine, incColumn);\n\t\tvalidLow = checkCrossAux(posLine, posColumn, boardIcon, incLine * -1, incColumn * -1);\n\t\treturn validHigh && validLow;\n\t}", "public boolean isWithinMap(int x, int y) {\n return ((x >= 0 && x < this.width_) && (y >= 0 && y < this.height_));\n }", "public void sideCheck() {\n /*Be careful when creating tiles, especially ones that allow Sonic's bottom and middle sensors to intersect \n the same tile*/\n mLCollide = false;\n mRCollide = false;\n if(grounded) {\n if(groundSpeed > 0) {\n sideCollision(middleRight);\n }\n else if(groundSpeed < 0) {\n sideCollision(middleLeft);\n } \n }\n else if(!grounded) {\n if(xSpeed < 0) {\n sideCollision(middleLeft);\n }\n else if(xSpeed > 0) {\n sideCollision(middleRight);\n }\n }\n }", "public boolean tileBlocked(float xTile, float yTile)\r\n/* 117: */ {\r\n/* 118:131 */ return (!tileInBounds(xTile, yTile)) || (this.blocked[((int)xTile)][((int)yTile)] != 0);\r\n/* 119: */ }", "@Test\n public void isCollidingTestNoCollision(){\n TileMap tileMap = new TileMap(24, 24, new byte[][]{{1,1},{1,1},{1,1},{1,1}},new byte[][]{{1,1},{1,1},{1,1},{1,1}}, tilepath);\n Rect cBox = new Rect(0, 0, 0, 0);\n assertFalse(tileMap.isColliding(cBox));\n assertEquals(false, tileMap.isColliding(cBox));\n }", "public boolean detectCollision(int x, int y) {\n\t\tif(this.x <= x && this.y <= y && this.x + width >= x && this.y + height >= y) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private boolean roadCheck(Road road) {\n\t\t\n\t\treturn false;\n\t}", "boolean isTile(int x, int y, int rotation) {\n return tiles[rotation][dimensions * y + x] == 1;\n }", "private boolean wrongPositioning(int x, int y, LoadedMap map) {\n boolean ans = false;\n if(hasAbove(x, y, map)&&(hasLeft(x, y, map)||hasRight(x, y, map))){\n ans = true;\n }else if (hasBelow(x, y, map)&&(hasLeft(x, y, map)||hasRight(x, y, map))) {\n ans = true;\n }\n return ans;\n }", "private boolean checkTileExists(int x, int y, int zoom) {\n \t int minZoom = 12;\n \t int maxZoom = 16;\n\n \t if ((zoom < minZoom || zoom > maxZoom)) {\n \t return false;\n \t }\n\n \t return true;\n \t }", "@Override\r\n\tpublic boolean possibleMove(int x, int y) {\n\t\tif (this.sameColor(Board.getPiece(x, y)) == true) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (Math.abs(this.getY() - y) == 2 && Math.abs(this.getX() - x) == 1\r\n\t\t\t\t|| Math.abs(this.getY() - y) == 1 && Math.abs(this.getX() - x) == 2) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "public void checkCollisionTile(Entity entity) {\n\t\t\tint entityLeftX = entity.worldX + entity.collisionArea.x;\n\t\t\tint entityRightX = entity.worldX + entity.collisionArea.x + entity.collisionArea.width;\n\t\t\tint entityUpY = entity.worldY + entity.collisionArea.y;\n\t\t\tint entityDownY = entity.worldY + entity.collisionArea.y + entity.collisionArea.height;\n\t\t\t\n\t\t\tint entityLeftCol = entityLeftX/gamePanel.unitSize;\n\t\t\tint entityRightCol = entityRightX/gamePanel.unitSize;\n\t\t\tint entityUpRow = entityUpY/gamePanel.unitSize;\n\t\t\tint entityDownRow = entityDownY/gamePanel.unitSize;\n\t\t\t\n\t\t\tint point1;\n\t\t\tint point2;\n\t\t\t//This point is used for diagonal movement\n\t\t\tint point3;\n\t\t\t\n\t\t\tswitch(entity.direction) {\n\t\t\t\t//Lateral and longitudinal movements\n\t\t\t\tcase \"up\":\n\t\t\t\t\tentityUpRow = (entityUpY - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\t//Sets the top left and top right point to draw a line which will check for collision\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityUpRow];\n\t\t\t\t\t//If either points are touched, turn on collision stopping movement\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"down\":\n\t\t\t\t\tentityDownRow = (entityDownY + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityDownRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityDownRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"left\":\n\t\t\t\t\tentityLeftCol = (entityLeftX - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityDownRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"right\":\n\t\t\t\t\tentityRightCol = (entityRightX + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityRightCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityDownRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t//Diagonal Movements\n\t\t\t\tcase \"upleft\":\n\t\t\t\t\tentityUpRow = (entityUpY - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tentityLeftCol = (entityLeftX - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\t//Sets the top left and top right point to draw a line which will check for collision\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityUpRow];\n\t\t\t\t\tpoint3 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityDownRow];\n\t\t\t\t\t//If either points are touched, turn on collision stopping movement\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true || gamePanel.tileSet.tile[point3].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"upright\":\n\t\t\t\t\tentityRightCol = (entityRightX + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tentityUpRow = (entityUpY - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityRightCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityDownRow];\n\t\t\t\t\tpoint3 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityUpRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true || gamePanel.tileSet.tile[point3].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\t\n\t\t\t\tcase \"downleft\":\n\t\t\t\t\tentityLeftCol = (entityLeftX - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tentityDownRow = (entityDownY + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityDownRow];\n\t\t\t\t\tpoint3 = gamePanel.tileSet.mapTileNum[entityRightCol][entityDownRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true || gamePanel.tileSet.tile[point3].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"downright\":\n\t\t\t\t\tentityDownRow = (entityDownY + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tentityRightCol = (entityRightX + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityDownRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityDownRow];\n\t\t\t\t\tpoint3 = gamePanel.tileSet.mapTileNum[entityRightCol][entityUpRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true || gamePanel.tileSet.tile[point3].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "private static Boolean checkForContinuousConnectivity()\n\t{\n\t\tint row=0;\n\t\tint column=0;\n\t\tBoolean floorFound=false;\n\n\t\tfor(int i=0; i<board.length; i++)\n\t\t{\n\t\t\tfor(int j=0; j<board[i].length; j++)\n\t\t\t{\n\t\t\t\tif(board[i][j]==Cells.FLOOR)\n\t\t\t\t{\n\t\t\t\t\trow=i;\n\t\t\t\t\tcolumn=j;\n\t\t\t\t\tfloorFound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (floorFound)\n\t\t\t\tbreak;\n\t\t}\n\n\t\tfor(int i=0; i<board.length; i++)\n\t\t{\n\t\t\tfor(int j=0; j<board[i].length; j++)\n\t\t\t{\n\t\t\t\tif(board[i][j]==Cells.FLOOR && !(_PF.canFindAWay(column, row, j, i)))\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public boolean validMove(int x, int y){\n if(!super.validMove(x, y)){\n return false;\n }\n if(((Math.abs(x - this.x()) == 2) && (Math.abs(y - this.y()) == 1))\n || ((Math.abs(x - this.x()) == 1) && (Math.abs(y - this.y()) == 2))){\n return true;\n }else{\n return false;\n }\n }", "public boolean isLegal(int x_pos, int y_pos){\n //TODO\n //if the color is black,\n if(color==\"black\" || color.equals(\"black\")){\n for(int i=1; i<8; i++){\n if(this.x_pos-i==x_pos && y_pos==this.y_pos) return true;\n if(this.x_pos==x_pos && this.y_pos-i==y_pos) return true;\n }\n }\n //if the color is white, then its going up the board (you add the position)\n else{\n for(int i=1; i<8; i++){\n if(this.x_pos+i==x_pos && y_pos==this.y_pos) return true;\n if(this.x_pos==x_pos && this.y_pos+i==y_pos) return true;\n }\n }\n return false;\n }", "public boolean isCollision(double x, double y) {\n return false;\n }", "public boolean tileReachable(float tx, float ty, AgentModel selectedAgent)\r\n/* 243: */ {\r\n/* 244:271 */ float x = selectedAgent.getX() - 0.5F;\r\n/* 245:272 */ float y = selectedAgent.getY() - 0.5F;\r\n/* 246:274 */ switch ((int)selectedAgent.getAngle())\r\n/* 247: */ {\r\n/* 248: */ case 0: \r\n/* 249:277 */ if ((y - 1.0F == ty) && (tx >= x - 1.0F) && (tx <= x + 1.0F)) {\r\n/* 250:279 */ return true;\r\n/* 251: */ }\r\n/* 252: */ break;\r\n/* 253: */ case 90: \r\n/* 254:283 */ if ((x + 1.0F == tx) && (ty >= y - 1.0F) && (ty <= y + 1.0F)) {\r\n/* 255:285 */ return true;\r\n/* 256: */ }\r\n/* 257: */ break;\r\n/* 258: */ case 180: \r\n/* 259:289 */ if ((y + 1.0F == ty) && (tx >= x - 1.0F) && (tx <= x + 1.0F)) {\r\n/* 260:291 */ return true;\r\n/* 261: */ }\r\n/* 262: */ break;\r\n/* 263: */ case 270: \r\n/* 264:295 */ if ((x - 1.0F == tx) && (ty >= y - 1.0F) && (ty <= y + 1.0F)) {\r\n/* 265:298 */ return true;\r\n/* 266: */ }\r\n/* 267: */ break;\r\n/* 268: */ }\r\n/* 269:303 */ return false;\r\n/* 270: */ }", "public boolean tileOfComputer (int row, int col){\n return this.gameBoard[row][col] == 'o';\n }", "@Override\n public boolean hitTest(double x, double y) {\n return rect.hitTest(x, y) || marker.hitTest(x, y);\n }", "boolean canBuildDome(Tile t);", "boolean hasCoordinates();", "boolean hasCoordinates();", "boolean hasCoordinates();", "public boolean inGrid(int y, int x) {\n\n if (y > 0 && x > 0 && y < height - 1 && x < width - 1) {\n return true;\n }\n\n return false;\n }", "public boolean checkHit(int x, int y) {\n\t\t\n\t\t//Check if the guard caught the hero\n\t\tint[][] adjacent = new int[][] {\n\t\t\t{ getY() + 1, getX()},\n\t\t\t{ getY() - 1, getX()},\n\t\t\t{ getY(), getX() + 1},\n\t\t\t{ getY(), getX() - 1}\n\t\t\t};\n\n\t\tfor (int[] spot : adjacent) {\n\t\t\tif (spot[1] == x && spot[0] == y) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\t\t\n\t}", "public boolean contains(double x, double y){\t\t\n\t\t\n\t\treturn x > xCoord - getWidth()/2 &&\n\t\t\t x < xCoord + getWidth()/2 &&\n\t\t\t y > yCoord - getHeight()/2 &&\n\t\t\t y < yCoord + getHeight()/2;\n\t}", "private boolean isNeighborAt(int x, int y, Assignment assignment){\n\t\tif(x >= 0 && x < this.dimension && y >= 0 && y < this.dimension)\n\t\t\tif(assignment.holds(this.board[x][y]))\n\t\t\t\treturn true;\n\n\t\treturn false;\n\t}", "public boolean canCoordinateBeSpawn(int par1, int par2) {\n\t\tint var3 = this.worldObj.getFirstUncoveredBlock(par1, par2);\n\t\treturn var3 == 0 ? false : Block.blocksList[var3].blockMaterial.blocksMovement();\n\t}", "public boolean canMoveTo (Coordinate c)\n\t{\n\t\tif (c.x < 0 || c.x >= GRID_SIZE){\n\t\t\treturn false;\n\t\t}\n\t\tif (c.y < 0 || c.y >= GRID_SIZE) {\n\t\t\treturn false;\n\t\t}\n\t\tif (grid[c.x][c.y] == GridChar.AVAILABLE || grid[c.x][c.y] == GridChar.END){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean isTileCollidable(int x, int y) {\n MapCell cell = getCellAt(x, y);\n return cell != null && (collidables.contains(cell.getTile().getId()) || (cell.hasObject() && cell.getObject().isCollidable()));\n }", "@Test\n public void isONGroundTestTrue(){\n TileMap tileMap = new TileMap(24, 24, new byte[][]{{0,0}},new byte[][]{{1,1},{1,1},{1,1},{1,1}}, tilepath);\n Rect cBox = new Rect(2,2,24,22);\n assertEquals(true, tileMap.isOnGround(cBox));\n }", "private boolean alreadyHit(int x, int y) {\n for (int i = 0; i < hitCount; i++){\n if (x == hitList[i].x && y == hitList[i].y){\n return true;\n }\n }\n for (int i = 0; i < missCount; i++) {\n if (x == missList[i].x && y == missList[i].y) {\n return true;\n }\n }\n return false;\n }", "private void clink(int x1, int y1, int x2, int y2) {\n\t\tint cx = x1;\n\t\tint cy = y1;\n\n\t\twhile (cx != x2) {\n\t\t\tif (x1 > x2) {\n\t\t\t\tcx--;\n\t\t\t} else {\n\t\t\t\tcx++;\n\t\t\t}\n\t\t\tif (inRange(cx, cy) == 1)\n\t\t\t\tmap[cx][cy] = 0;\n\t\t}\n\t\twhile (cy != y2) {\n\t\t\tif (y1 > y2) {\n\t\t\t\tcy--;\n\t\t\t} else {\n\t\t\t\tcy++;\n\t\t\t}\n\t\t\tif (inRange(cx, cy) == 1)\n\t\t\t\tmap[cx][cy] = 0;\n\t\t}\n\t}", "public boolean checkAlienPlacementTile(float x, float y)\r\n/* 471: */ {\r\n/* 472:563 */ if (!tileWalkable(x, y)) {\r\n/* 473:565 */ return false;\r\n/* 474: */ }\r\n/* 475:568 */ AgentModel a = getAgentOnTile(x, y);\r\n/* 476:569 */ if ((a != null) || (((a instanceof DoorModel)) && (!((DoorModel)a).isOpen()))) {\r\n/* 477:571 */ return false;\r\n/* 478: */ }\r\n/* 479:574 */ return true;\r\n/* 480: */ }", "public Boolean isValidMovement(int x, int y){\n\t\tif ( x < 0 || x > 7 || y < 0 || y > 7 \n\t\t\t\t|| this.board.getPiece(x, y).getColor().equalsIgnoreCase(this.color))\n\t\t\treturn false;\n\t\t\n\t\tint distX = Math.abs(this.posX - x);\n\t\tint distY = Math.abs(this.posY - y);\n\t\t\n\t\tif (distX != distY)\n\t\t\treturn false;\n\t\t\n\t\tif (this.posX > x && this.posY > y){\n\t\t\tfor (int i = 1; i < distX ; i ++){\n\t\t\t\tif (!this.board.getPiece(this.posX - i, this.posY - i).isEmpty())\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (this.posX < x && this.posY > y){\n\t\t\tfor (int i = 1; i < distX ; i ++){\n\t\t\t\tif (!this.board.getPiece(this.posX + i, this.posY - i).isEmpty())\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (this.posX > x && this.posY < y){\n\t\t\tfor (int i = 1; i < distX ; i ++){\n\t\t\t\tif (!this.board.getPiece(this.posX - i, this.posY + i).isEmpty())\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (this.posX < x && this.posY < y){\n\t\t\tfor (int i = 1; i < distX ; i ++){\n\t\t\t\tif (!this.board.getPiece(this.posX + i, this.posY + i).isEmpty())\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "@Test\n public void isCollidingTestCollision(){\n TileMap tileMap = new TileMap(24, 24, new byte[][]{{1,1},{1,1},{1,1},{1,1}},new byte[][]{{1,1},{1,1},{1,1},{1,1}}, tilepath);\n Rect cBox = new Rect(24,24,24,24);\n assertTrue(tileMap.isColliding(cBox));\n assertEquals(true, tileMap.isColliding(cBox));\n }", "private boolean collisionWithHorizontalWall() {\n return (xPos + dx > RIGHT_BORDER || xPos + dx < 0);\n }", "public boolean isConnectedPort() {\n for (Tile t : getTile().getSurroundingTiles(1)) {\n if (!t.isLand() && t.isHighSeasConnected()) return true;\n }\n return false;\n }", "public boolean isInside(){\n\t\tinside = true;\n\t\tif(map.contains(new Rectangle(x,y,(int)spriteSize.getHeight(), (int)spriteSize.getWidth()))==false){\n\t\t\tinside = false;\n\t\t}\n\t\treturn(inside);\n\t}", "public boolean isInBounds(int x, int y) {\r\n boolean check = false;\r\n if (x>=0 && x<this.width && y>=0 && y<this.tiles.length/this.width) {\r\n check = true;\r\n }\r\n return check;\r\n }", "private boolean checkSurroundedByWalls(int x, int y) {\n \n int neighborsCount = 0;\n \n if (x > 0) {\n \n if (!gameboard.checkIfSquareIsEmpty(x - 1, y) &&\n gameboard.getObjectAtSquare(x - 1, y, 0).isType(\"wall\")){\n \n neighborsCount++;\n \n }\n \n }\n \n if (x < gameboard.getSize()) {\n \n if (!gameboard.checkIfSquareIsEmpty(x + 1, y) &&\n gameboard.getObjectAtSquare(x + 1, y, 0).isType(\"wall\")){\n \n neighborsCount++;\n \n }\n \n }\n \n if (y > 0) {\n \n if (!gameboard.checkIfSquareIsEmpty(x, y - 1) &&\n gameboard.getObjectAtSquare(x, y - 1, 0).isType(\"wall\")){\n \n neighborsCount++;\n \n }\n \n }\n \n if (y < gameboard.getSize()) {\n \n if (!gameboard.checkIfSquareIsEmpty(x, y + 1) &&\n gameboard.getObjectAtSquare(x, y + 1, 0).isType(\"wall\")){\n \n neighborsCount++;\n \n }\n \n }\n \n return neighborsCount == 4;\n \n }" ]
[ "0.7019831", "0.67898905", "0.65733963", "0.63329667", "0.63104177", "0.6256373", "0.62093407", "0.61967796", "0.6190331", "0.6129929", "0.6105543", "0.61005837", "0.6100162", "0.60921407", "0.6088396", "0.6066545", "0.60338414", "0.6020498", "0.5986195", "0.5979733", "0.5974578", "0.5959725", "0.5943277", "0.5926419", "0.59258646", "0.5923322", "0.5907654", "0.5901899", "0.5887553", "0.5887437", "0.5886601", "0.58849066", "0.58832145", "0.58675945", "0.5866087", "0.5862242", "0.58562005", "0.5850692", "0.5844699", "0.58366895", "0.5834712", "0.58335483", "0.5830748", "0.5828883", "0.5826093", "0.5816886", "0.58163804", "0.58098376", "0.580758", "0.58070624", "0.5806356", "0.5804905", "0.57904005", "0.5786956", "0.5786721", "0.57848877", "0.57765627", "0.57749486", "0.5768737", "0.57671857", "0.5766274", "0.5764014", "0.5745483", "0.57443136", "0.574244", "0.5740012", "0.5739784", "0.572909", "0.57285655", "0.5726539", "0.57231057", "0.5722921", "0.572132", "0.5713718", "0.5712509", "0.5707958", "0.5705104", "0.57044333", "0.56933767", "0.56862235", "0.56862235", "0.56862235", "0.56858516", "0.56707406", "0.5662521", "0.56579405", "0.5654212", "0.56539524", "0.5648784", "0.5647688", "0.56422406", "0.56401926", "0.5636193", "0.5635372", "0.5629167", "0.56215304", "0.56208", "0.5614912", "0.56145954", "0.5612876" ]
0.81414783
0
/ renamed from: com.zhihu.android.api.service2.aq / compiled from: MobileSearchService
public interface MobileSearchService { @GET(mo135023a = "/search/tabs") /* renamed from: a */ Observable<Response<SearchTabList>> mo63035a(@AbstractC33320t(mo135039a = "enable_recent") int i); @AbstractC33318k(mo135029a = {"x-api-version:3.0.65"}) @GET(mo135023a = "/search_v3") /* renamed from: a */ Observable<Response<SearchResultNewAPIWithWarning>> mo63036a(@AbstractC33320t(mo135039a = "correction") int i, @AbstractC33320t(mo135039a = "t") String str, @AbstractC33320t(mo135039a = "q") String str2); @AbstractC33318k(mo135029a = {"x-api-version:3.0.65"}) @GET(mo135023a = "/search_v3") /* renamed from: a */ Observable<Response<SearchResultNewAPIWithWarning>> mo63037a(@AbstractC33320t(mo135039a = "correction") int i, @AbstractC33320t(mo135039a = "t") String str, @AbstractC33320t(mo135039a = "q") String str2, @AbstractC33320t(mo135039a = "restricted_scene") String str3, @AbstractC33320t(mo135039a = "restricted_field") String str4, @AbstractC33320t(mo135039a = "restricted_value") String str5); @AbstractC33318k(mo135029a = {"x-api-version:3.0.65"}) @GET /* renamed from: a */ Observable<Response<SearchResultNewAPIWithWarning>> mo63038a(@AbstractC33321x String str); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Service {\n\n\n @GET(\"/3/search/movie\")\n Call<Lista> getSearch(@Query(\"api_key\") String apiKey, @Query(\"query\") String queryString);\n\n}", "public interface RecipeService {\n\n @GET(\"/search\")\n Observable<SearchResult> search(@Query(\"q\") String q,\n @Query(\"app_id\") String appid,\n @Query(\"app_key\") String appkey,\n @Query(\"from\") String from,\n @Query(\"to\") String to);\n\n}", "public interface Service {\n\n @GET(\"/search/users?q=language:android+location:india\")\n Call<ItemResponse> getItem();\n\n\n\n}", "public interface GoogleCustomSearchApi {\n\n @GET(\"/customsearch/v1\")\n Observable<CustomSearchResponse> search(@Query(\"key\") String apiKey, @Query(\"cx\") String cx,\n @Query(\"q\") String query, @Query(\"start\") int start);\n\n}", "public interface SearchService extends Service {\n Observable<SearchPlacesResponse> doSearchPlacesService(String authorizationKey, int page, int size, SearchPlacesRequest searchPlacesRequest);\n Observable<SearchPlacesResponse> doSearchBreweriesService(String authorizationKey, int page, int size, SearchPlacesRequest searchPlacesRequest);\n Observable<SearchProductResponse> doSearchProductsService(String authorizationKey, int page, int size, SearchProductsRequest searchProductsRequest);\n Observable<List<String>> getSuggestPlacesService(String authorizationKey, String text, int count);\n Observable<List<String>> getSuggestBreweriesService(String authorizationKey, String text, int count);\n Observable<List<String>> getSuggestProductsService(String authorizationKey, String text, int count);\n}", "public interface GrabTicketQueryService {\n\n\n /**\n * 抢票查询\n * @param method\n * @param train_date\n * @param from_station\n * @param to_station\n * @return\n */\n JSONObject grabTicketQuery(String uid, String partnerid, String method, String from_station, String to_station, String from_station_name, String to_station_name, String train_date, String purpose_codes);\n// JSONObject grabTicketQuery(String partnerid, String method, String from_station, String to_station, String train_date, String purpose_codes);\n}", "public interface ServiceProducto {\n\n// @GET(\"/sites/MLA/search?q=tennis\")\n// Call<ContenedorDeProductos>getProductos();\n\n @GET(\"/sites/MLA/search\")\n Call<ContenedorDeProductos>getProductos(@Query(\"q\") String terminoABuscar);\n\n}", "public interface ApiService {\n @POST(\"/AutoComplete/autocomplete/json\")\n void placeAuto(@Query(\"input\") String input, @Query(\"key\") String key, Callback<AutoComplete> callback);\n\n @POST(\"/geocode/json\")\n void getLatLng(@Query(\"address\") String address, @Query(\"key\") String key, Callback<GeocodingMain> callback);\n\n @POST(\"/directions/json\")\n void getroute(@Query(\"origin\") String origin, @Query(\"destination\") String destination, @Query(\"key\") String key, Callback<Directions> callback);\n\n @POST(\"/geocode/json\")\n void reverseGeoCoding(@Query(\"latlng\") String latLng, @Query(\"key\") String key, Callback<RevGeocodingMain> callback);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n}", "private void m26dj(com.google.android.apps.nexuslauncher.search.SearchResult r8) {\n /*\n r7 = this;\n android.net.Uri$Builder r0 = new android.net.Uri$Builder\n r0.<init>()\n java.lang.String r1 = \"content\"\n android.net.Uri$Builder r0 = r0.scheme(r1)\n java.lang.String r1 = com.google.android.apps.nexuslauncher.search.AppSearchProvider.AUTHORITY\n android.net.Uri$Builder r0 = r0.authority(r1)\n java.lang.String r1 = r8.mQuery\n android.net.Uri$Builder r0 = r0.appendPath(r1)\n android.net.Uri r2 = r0.build()\n r0 = 0\n android.content.Context r1 = r7.mContext // Catch:{ all -> 0x005f }\n android.content.ContentResolver r1 = r1.getContentResolver() // Catch:{ all -> 0x005f }\n r3 = 0\n r4 = 0\n r5 = 0\n r6 = 0\n android.database.Cursor r1 = r1.query(r2, r3, r4, r5, r6) // Catch:{ all -> 0x005f }\n if (r1 == 0) goto L_0x004e\n java.lang.String r0 = \"suggest_intent_data\"\n int r0 = r1.getColumnIndex(r0) // Catch:{ all -> 0x004c }\n L_0x0032:\n boolean r2 = r1.moveToNext() // Catch:{ all -> 0x004c }\n if (r2 == 0) goto L_0x004e\n java.util.ArrayList<com.android.launcher3.util.ComponentKey> r2 = r8.mApps // Catch:{ all -> 0x004c }\n java.lang.String r3 = r1.getString(r0) // Catch:{ all -> 0x004c }\n android.net.Uri r3 = android.net.Uri.parse(r3) // Catch:{ all -> 0x004c }\n android.content.Context r4 = r7.mContext // Catch:{ all -> 0x004c }\n com.android.launcher3.util.ComponentKey r3 = com.google.android.apps.nexuslauncher.search.AppSearchProvider.uriToComponent(r3, r4) // Catch:{ all -> 0x004c }\n r2.add(r3) // Catch:{ all -> 0x004c }\n goto L_0x0032\n L_0x004c:\n r8 = move-exception\n goto L_0x0061\n L_0x004e:\n if (r1 == 0) goto L_0x0053\n r1.close()\n L_0x0053:\n android.os.Handler r0 = r7.mUiHandler\n r1 = 200(0xc8, float:2.8E-43)\n android.os.Message r8 = android.os.Message.obtain(r0, r1, r8)\n r8.sendToTarget()\n return\n L_0x005f:\n r8 = move-exception\n r1 = r0\n L_0x0061:\n if (r1 == 0) goto L_0x0066\n r1.close()\n L_0x0066:\n throw r8\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.apps.nexuslauncher.search.SearchThread.m26dj(com.google.android.apps.nexuslauncher.search.SearchResult):void\");\n }", "public interface ArticleAPI {\n\n @GET(\"svc/search/v2/articlesearch.json\")\n Call<SearchAPIResponse> getSearchAPIResponse(@Query(\"q\") String searchTerm);\n\n}", "private void searchQuery(String query) {\n mSearchAheadServiceV3 = new SearchAheadService(this, API_KEY);\n\n String queryString = query;\n\n LatLng surreyBC = new LatLng(49.104599F, -122.823509F);\n\n List searchCollections = Arrays.asList(SearchCollection.AIRPORT, SearchCollection.ADMINAREA,\n SearchCollection.ADDRESS, SearchCollection.FRANCHISE, SearchCollection.POI);\n try {\n SearchAheadQuery searchAheadQuery = new SearchAheadQuery\n .Builder(queryString, searchCollections)\n .location(surreyBC)\n .limit(5)\n .build();\n\n mSearchAheadServiceV3.predictResultsFromQuery(searchAheadQuery,\n new SearchAheadService.SearchAheadResponseCallback() {\n\n @Override\n public void onSuccess(@NonNull SearchAheadResponse searchAheadResponse) {\n\n //Get search results from the request response\n List<SearchAheadResult> searchAheadResults = searchAheadResponse.getResults();\n\n //if we have requests\n if (searchAheadResults.size() > 0) {\n\n //clear the current data to display\n searchResultsData.clear();\n\n try {\n\n int size = (searchAheadResults.size() < 5) ? searchAheadResults.size() : 5;\n\n for (int i = size - 1; i >= 0; i--) {\n // create a hashmap\n HashMap<String, String> hashMap = new HashMap<>();\n\n AddressProperties addressProperties = searchAheadResults.get(i).getPlace().getAddressProperties();\n\n // convert image int to a string and place it into the hashmap with an images key\n hashMap.put(\"address\", searchAheadResults.get(i).getName());\n hashMap.put(\"city\", addressProperties.getCity() + \", \" + addressProperties.getStateCode());\n hashMap.put(\"lat\", String.valueOf(searchAheadResults.get(i).getPlace().getLatLng().getLatitude()));\n hashMap.put(\"long\", String.valueOf(searchAheadResults.get(i).getPlace().getLatLng().getLongitude()));\n\n\n // add this hashmap to the list\n searchResultsData.add(hashMap);\n }\n\n //handle null pointer exception on address properties\n } catch (NullPointerException e) {\n e.printStackTrace();\n }\n\n //adapter inputs\n String[] from = {\n \"address\",\n \"city\",\n \"lat\",\n \"long\"\n };\n\n int[] to = {R.id.text_result_address, R.id.text_result_city, R.id.hidden_location_lat, R.id.hidden_location_long};\n\n searchAdapter = new SimpleAdapter(getApplicationContext(), searchResultsData, R.layout.item_search_result, from, to);\n mListViewSearch.setAdapter(searchAdapter);\n mListViewSearch.setVisibility(View.VISIBLE);\n } else {\n resetSearchAheadList();\n }\n }\n\n @Override\n public void onError(Exception e) {\n Log.e(\"MAPQUEST\", \"Search Ahead V3 Failure\", e);\n }\n });\n } catch (IllegalQueryParameterException e) {\n Log.e(\"Error performing search\", e.getMessage());\n }\n }", "@GET(\"search.php\")\n Call<MealData> getMealsBySearchQuery(@Query(\"s\") String searchKeyword);", "private void searchAddress() {\n CommomUtils.hideKeyboard(MainActivity.this, etAddress);\n\n //Check if the address was informed\n if (etAddress.getText().toString().equals(\"\")) {\n Toast.makeText(MainActivity.this, R.string.activity_main_search_address_validation, Toast.LENGTH_SHORT).show();\n return;\n }\n\n lvResult.setVisibility(View.GONE);\n showProgress();\n\n //Call the api for searching the address\n GoogleMapsService service = ServiceGenerator.createService(GoogleMapsService.class, getString(R.string.google_maps_api_base_url));\n service.getGeocoding(etAddress.getText().toString(), true, new Callback<GeocodingResult>() {\n @Override\n public void success(GeocodingResult googleGeocodingResult, Response response) {\n hideProgress();\n geocodingResult = googleGeocodingResult;\n\n if (geocodingResult.getResults().size() > 0) {\n loadResult();\n } else {\n Toast.makeText(MainActivity.this, R.string.activity_main_search_no_results_found, Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void failure(RetrofitError error) {\n hideProgress();\n Toast.makeText(MainActivity.this, error.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n }", "public interface ApiService {\n\n @GET(\"datacatalog?format=json\")\n Call<Catalog> getTopCatalog();\n\n\n/* @GET(\"item/{storyid}.json\")\n Call<StoryResponse> getStoryDetails(@Path(\"storyid\") String storyid);\n\n @GET(\"autocomplete/json\")\n Call<AutoCompleteGooglePlaces> getAutoCompleteResults(@Query(\"key\") String API_KEY,\n @Query(\"input\") String encode);\n\n @GET(\"nearbysearch/json\")\n Call<GetPlacesResponse> getPlaceDetails(@Query(\"location\") String location,\n @Query(\"radius\") int radius,\n @Query(\"key\") String key);*/\n}", "public interface SearchService {\n\n /**\n * Parameter that is appended to the generated links that contains the positive search terms and phrases of the\n * search expression. For several terms it occurs several times.\n */\n String PARAMETER_SEARCHTERM = \"search.term\";\n\n /**\n * Represents a result of the search consisting of a target page and one or more matching subresources. For use by\n * the search result renderer.\n */\n interface Result {\n\n /** The page which contains matches. */\n @NotNull\n Resource getTarget();\n\n /** The content child of the page which contains matches. */\n @NotNull\n Resource getTargetContent();\n\n /** A link that shows the target, including search terms with {@link #PARAMETER_SEARCHTERM} */\n @NotNull\n String getTargetUrl();\n\n /** The title of the search result. */\n @NotNull\n String getTitle();\n\n /** The score of the search result. */\n Float getScore();\n\n /**\n * One or more descendants of {@link #getTarget()} that potentially match the search expression. Mostly useful\n * for generating excerpts; can contain false positives in some search algorithms.\n */\n @NotNull\n List<Resource> getMatches();\n\n /** The fulltext search expression for which this result was found. */\n @NotNull\n String getSearchExpression();\n\n /**\n * A basic excerpt from the matches that demonstrates the occurrences of the terms from {@link\n * #getSearchExpression()} in this result. Might be empty if not applicable (e.g. if the search terms were found\n * in meta information). If there are several matches, we just give one excerpt. You might want to provide your\n * own implementation for that to accommodate for specific requirements.\n *\n * @return a text with the occurrences of the words marked with HTML tag em .\n */\n @NotNull\n String getExcerpt() throws SearchTermParseException;\n }\n\n /**\n * Fulltext search for resources. The resources are grouped if they are subresources of one target page, as\n * determined by the parameter targetResourceFilter.\n * <p>\n * Limitations: if the searchExpression consists of several search terms (implicitly combined with AND) this finds\n * only resources where a single property matches the whole search condition, i.e., all those terms. If several\n * resources of a page contain different subsets of those terms, the page is not found.\n *\n * @param context The context we use for the search.\n * @param selectors a selector string to determine the right search strategy, e.g. 'page'\n * @param root Optional parameter for the node below which we search.\n * @param searchExpression Mandatory parameter for the fulltext search expression to search for. For the syntax\n * see\n * {@link QueryConditionDsl.QueryConditionBuilder#contains(String)}\n * . It is advisable to avoid using AND and OR.\n * @param searchFilter an optional filter to drop resources to ignore.\n * @return possibly empty list of results\n * @see com.composum.sling.core.mapping.jcr.ResourceFilterMapping\n */\n @NotNull\n List<Result> search(@NotNull BeanContext context, @NotNull String selectors,\n @NotNull String root, @NotNull String searchExpression, @Nullable ResourceFilter searchFilter,\n int offset, @Nullable Integer limit)\n throws RepositoryException, SearchTermParseException;\n\n\n interface LimitedQuery {\n\n /**\n * Executes the query with the given limit; returns a pair of a boolean that is true when we are sure that all\n * results have been found in spite of the limit, and the results themselves.\n */\n Pair<Boolean, List<Result>> execQuery(int matchLimit);\n }\n\n /**\n * Execute the query with raising limit until the required number of results is met. We don't know in advance how\n * large we have to set the limit in the query to get all neccesary results, since each page can have an a priori\n * unknown number of matches. Thus, the query is executed with an estimated limit, and is reexecuted with tripled\n * limit if the number of results is not sufficient and there are more limits.\n *\n * @return up to limit elements of the result list with the offset first elements skipped.\n */\n @NotNull\n List<Result> executeQueryWithRaisingLimits(LimitedQuery limitedQuery, int offset, Integer limit);\n}", "List<SearchResult> search(SearchQuery searchQuery);", "public interface SetlistService {\n String BASE_API_URL = \"http://api.setlist.fm/rest/0.1/\";\n String NOT_FOUND_MESSAGE = \"Not Found\";\n\n @GET(\"search/setlists\")\n Call<Setlists> searchSetlists(@Query(\"artistName\") String artist,\n @Query(\"cityName\") String city,\n @Query(\"venueName\") String venue,\n @Query(\"date\") String date,\n @Query(\"year\") String year,\n @Query(\"tour\") String tour,\n @Query(\"p\") int pageNo);\n\n @GET(\"search/artists\")\n Call<Artists> searchArtist(@Query(\"artistName\") String artist, @Query(\"p\") int pageNo);\n\n @GET\n Call<Setlists> getSetlistsByArtist(@Url String url, @Query(\"p\") int pageNo);\n}", "@GET(\"w/api.php?action=opensearch&format=json&suggest&redirects=resolve\")\n Call<JsonElement> getSuggestionsFromSearch(@Query(\"search\") String search);", "public interface AuthorService {\n\n @GET(\"/search/filter_authors\")\n Observable<List<Author>> getAuthors(@Query(\"author\") String authorName, @Query(\"year\") String date);\n\n// @FormUrlEncoded\n// @POST(\"/hquery/read\")\n// Observable<Author> getGeneral( @Field(\"limit\") String limit,@Field(\"Author\") String body);\n\n\n @POST(\"/hquery/read\")\n Observable<Author> getGeneral( @Body RequestBody body);\n\n\n}", "public interface Service {\n\n //String BASE_URL=\"https://newsapi.org/\";\n\n @GET(\"v2/everything?sortBy=popularity&apiKey=39dccf90039941938d17156338e5b9f8\")\n Call<Result> getNews(@Query(\"q\")String query, @Query(\"from\")String from, @Query(\"page\")int page,@Query(\"sources\")String orderBy);\n\n}", "public interface RestaurantService {\n\n @GET(\"nearbysearch/json?&radius=1000\")\n Call<Restaurant> getPlaces(@QueryMap Map<String, String> params);\n\n @GET(\"nearbysearch/json?\")\n Call<Restaurant> getPlacesByPageToken(@QueryMap Map<String, String> params);\n}", "public interface RetrofitService {\n @GET(\"book/search\")\n Observable<Book>getSearchBooks(@Query(\"q\")String name,@Query(\"tag\")String tag,@Query(\"start\")int start,@Query(\"count\")int count);\n}", "public interface GoogleBooksService {\n @GET(\"/books/v1/volumes\")\n void search(@Query(\"q\") String query, Callback<SearchResult> callback);\n}", "public interface Service {\n\n @GET(\"movie/{sub_type}\")\n Call<MovieResponse> getMovie(@Path(\"sub_type\")String sub_type, @Query(\"api_key\")String api_key, @Query(\"language\")String language, @Query(\"page\")int page);\n\n @GET(\"tv/{sub_type}\")\n Call<TvShowResponse> getTvShow(@Path(\"sub_type\")String sub_type, @Query(\"api_key\")String api_key, @Query(\"language\")String language, @Query(\"page\")int page);\n\n @GET(\"movie/{movie_id}/recommendations\")\n Call<MovieResponse> getMovieRecommendations(@Path(\"movie_id\")int movie_id,@Query(\"api_key\")String api_key, @Query(\"language\")String language,@Query(\"page\")int page);\n\n @GET(\"tv/{tv_id}/recommendations\")\n Call<TvShowResponse> getTvShowRecommendations(@Path(\"tv_id\")int tv_id, @Query(\"api_key\")String api_key, @Query(\"language\")String language, @Query(\"page\")int page);\n\n @GET(\"search/movie\")\n Call<MovieResponse> getMovieSearch(@Query(\"query\")String query,@Query(\"api_key\")String api_key, @Query(\"language\")String language,@Query(\"page\")int page);\n\n @GET(\"search/tv\")\n Call<TvShowResponse> getTvShowSearch(@Query(\"query\")String query, @Query(\"api_key\")String api_key, @Query(\"language\")String language, @Query(\"page\")int page);\n\n}", "public interface SearchMangas {\n\n public interface Callback {\n void onSearchMangasResult(List<Manga> resultMangas);\n void onSearchFailed(String error);\n }\n\n void executeFromApi(Callback callback, String query);\n\n}", "public interface ApiService {\n\n /**\n * 问题列表\n * @param city\n * @return\n */\n @GET(URLs.QUESTIONS)\n Call<Result<ArrayList<Question>>> questions(@Query(\"city\") String city);\n\n /**\n * 用户登录\n * @param mobile\n * @param password\n * @return\n */\n @FormUrlEncoded\n @POST(URLs.LOGIN)\n Call<Result<User>> login(@Field(\"mobile\") String mobile,\n @Field(\"password\") String password);\n\n}", "public interface SoundcloudService {\n\n static final String CLIENT_ID=\"87012262b10d7bbb14bc0f1251523f82\";\n\n @GET(\"/tracks?client_id=\"+CLIENT_ID)\n public void searchSongs(@Query(\"q\") String query, Callback<List<Track>> cb);\n\n @GET(\"/tracks?client_id=\"+CLIENT_ID)\n public void mostRecentSongs(@Query(\"created_at[from]\") String dateFrom, Callback<List<Track>> cb);\n}", "public interface APIInterface {\r\n @GET(\"api.php/action=query&format=json&prop=pageimages%7Cpageterms&generator=prefixsearch&redirects=1&formatversion=2&piprop=thumbnail&pithumbsize=50&pilimit=10&wbptterms=description\")\r\n Call<SearchResponseModel> getDataList(@Query(\"gpssearch\") String name , @Query(\"gpslimit\") String gpsLimit);\r\n}", "public interface IPokeapiService {\n\n\n\n// @GET(\"lp_iem/result.json\")\n// Call<PokemonWs> listPokemon();\n\n @GET(\"?action=cardlist&\")\n Call<List<Pokemon>> listPokemon(@Query(\"user\")int user);\n //@Query(\"user\")int user\n\n @GET(\"?action=details&\")\n Call<Pokemon> getPokemon(@Query(\"card\")int id_card);\n\n @GET(\"?action=pokedex\")\n Call<List<Pokemon>> getPokedex();\n\n}", "public interface QueryService {\n @GET(API.URL_CLOCK)\n Call<String> query(@Path(\"page\") int page);\n\n @GET(API.URL_LEAVE)\n Call<String> getLeaveData();\n\n @GET(API.URL_BROADCAST_DETAIL)\n Call<String> getBroadcastData(@Query(\"mid\") String mid);\n}", "@Override\n\tpublic List<ServiceInfo> search(String keywords) {\n\t\treturn null;\n\t}", "public SearchResponse search(SearchRequest request) throws SearchServiceException;", "public interface RetroiftService {\n @GET(\"catalog\")\n Call<CgBaseEntity> getCategories(@Query(\"key\") String key);\n\n @FormUrlEncoded\n @POST(\"query\")\n Call<BookBaseEntity> getBookList(@Field(\"catalog_id\") String id, @Field(\"pn\") String\n pn, @Field(\"rn\") String rn, @Field(\"key\") String key);\n\n}", "public interface ISearchService {\n public static final String cacheName = \"searchService\";\n\n String splitGoodsName(String goodsName);\n\n public List<Goods> sortByPrice(List<Goods> goodsList, boolean flag);\n\n public List<Goods> sortByTime(List<Goods> goodsList, boolean flag);\n\n public List<Goods> sortBySales(List<Goods> goodsList, boolean flag);\n\n List<Goods> getGoodsByWord(String goodsName);\n\n List<Goods> ascByPrice(String goodsName);\n\n List<Goods> ascBySales(String goodsName);\n\n List<Goods> ascByCreateTime(String goodsName);\n\n List<Goods> descByPrice(String goodsName);\n\n List<Goods> descBySales(String goodsName);\n\n List<Goods> descByCreateTime(String goodsName);\n}", "public interface SearchClientService {\r\n\t/**\r\n\t * Get Search engine client\r\n\t * \r\n\t * @return\r\n\t */\r\n\tClient getClient();\r\n\r\n\tvoid setup();\r\n\r\n\tvoid shutdown();\r\n}", "public interface SuggestApi {\n\n String API_TYPES = \"geocode\";\n String API_KEY = \"AIzaSyB93d9Y2I-UWEFEQGLdWUfHCjF7cFmlUm8\";\n\n @GET(\"autocomplete/json\")\n Single<SuggestionResponseModel> obtainSuggestedCities(@Query(\"input\") String input,\n @Query(\"types\") String types,\n @Query(\"key\") String apiKey);\n\n @GET(\"details/json\")\n Single<CityResponseModel> obtainCity(@Query(\"placeid\") String placeId,\n @Query(\"key\") String apiKey);\n}", "public interface RokyInfoService {\n\n @FormUrlEncoded\n @POST(\"SpiritServiceApp/v1/send/singleEbike\")\n Call<ResponseBody> singleEbike(@Field(\"ueSn\") String ueSn, @Field(\"data\") String data);\n\n @GET(\"SpiritServiceApp/v1/devices\")\n Call<DevicesMsg> devices(@Query(\"ue_sn_array\") String ueSnArray);\n\n\n @GET(\"SpiritServiceApp/stock/ccus\")\n Call<DevicesMsg> ccus(@Query(\"maxId\") String maxId);\n\n}", "@GET(\"list_movies.json\")\n Call<MoviesResponse> searchMovie(@Query(\"query_term\") String queryTerm);", "List<ShipmentInfoPODDTO> search(String query);", "public interface LastFMInterface {\n\n @GET(\"2.0/\")\n Call<LastFMArtistSearch> searchArtist(@Query(\"method\") String method, //artist.search!!!!\n @Query(\"artist\") String searchString, //search\n @Query(\"limit\") int limit,//5\n @Query(\"api_key\") String key,\n @Query(\"format\") String format);//json\n\n @GET(\"2.0/\")\n Call<LastFMSimilarArtist> similarArtist(@Query(\"method\") String method, //artist.getSimilar!!!!\n @Query(\"artist\") String searchString, //search\n @Query(\"limit\") int limit,\n @Query(\"api_key\") String key,\n @Query(\"format\") String format);//json\n\n @GET(\"2.0/\")\n Call<LastFMAlbumsSearch> topAlbums(@Query(\"method\") String method, //artist.getTopAlbums!!!!\n @Query(\"artist\") String searchString, //search\n @Query(\"limit\") int limit,\n @Query(\"api_key\") String key,\n @Query(\"format\") String format);//json\n\n// @GET(\"2.0/\")\n// Call<LastFMAlbumInfoSearch> albumsInfo(@Query(\"method\") String method, //album.getInfo!!!!\n// @Query(\"mbid\") String mbid, //search\n// @Query(\"api_key\") String key,\n// @Query(\"format\") String format);//json\n}", "public void searchProd(){\n\t\t\n\t\t// STEP 4:-\n\t\t// Enter 'mobile' in search bar.\n\t\tWebElement search = driver.findElement(By.name(\"q\"));\n\t\tsearch.sendKeys(\"mobiles\");\n\t\tsearch.sendKeys(Keys.ENTER);\n\t\tSystem.out.println(\"Enter name successfully\");\n\t\t\t\t\t\n\t\t// Click on search icon.\n\t\t//WebElement searchClick = driver.findElement(By.className(\"L0Z3Pu\"));\n\t\t//searchClick.click();\n\t\t//System.out.println(\"clicked search button successfully\");\n\t}", "public interface UdonShopApi {\n @GET(\"/RestSearchAPI/20150630/\")\n public Observable<UdonShopEntity> getUdonShops(@Query(\"keyid\") final String keyid,\n @Query(\"format\") final String format,\n @Query(\"category_l\") final String category_l,\n @Query(\"category_s\") final String category_s,\n @Query(\"input_coordinates_mode\") final String input_coordinates_mode,\n @Query(\"latitude\") final String latitude,\n @Query(\"longitude\") final String longitude,\n @Query(\"range\") final String range,\n @Query(\"hit_per_page\") final String hit_per_page);\n\n}", "public SearchService(String name) {\n super(\"\");\n }", "SearchResult<TimelineMeta> search(SearchQuery searchQuery);", "public interface WeatherService {\n\n @GET(\"weather?q=Givatayim,il&appid=15cf9b712a8454b5fcd0670649018163&units=metric\")\n Call<WeatherResponse> getWeather();\n\n /**\n * http://square.github.io/retrofit/2.x/retrofit/retrofit2/http/Query.html\n *\n * The @Query(\"q\") annotation appends \"&q=..the_city..\" to the end of the GET command\n *\n * @param city\n * @return\n */\n @GET(\"weather\")\n Call<WeatherResponse> getWeather(\n @Query(\"q\") String city,\n @Query(\"appid\") String key,\n @Query(\"units\") String units\n );\n\n}", "public interface RequestService {\n //http://gank.io/api/data/Android/10/1\n /*@GET(\"api/data/Android/10/1\")\n Call<ResponseBody> getAndroidInfo();*/\n @GET(\"api/data/Android/10/1\")\n Call<GankBean> getAndroidInfo();\n @GET(\"api/data/Android/10/{page}\")\n Call<GankBean> getAndroidInfo(@Path(\"page\") int page);\n @GET(\"api/data/query?cityname=深圳\")\n Call<ResponseBody> getWeather(@Query(\"key\") String key,@Query(\"area\") String area);\n @GET(\"group/{id}/users\")\n Call<List<User2>> groupList(@Field(\"id\") int groupId, @QueryMap Map<String,String> options);\n @GET\n Call<GankBean> getAndroid2Info(@Url String url);\n\n}", "public interface SearchApi {\n\n @GET(\"v3/queries/hot\")\n Observable<List<String>> getHotTags();\n\n @GET(\"v1/search\")\n Observable<GetDataBean> searchTagData(@Query(\"query\") String tag);\n\n @GET\n Observable<GetDataBean> loadMoreData(@Url String url);\n\n}", "public interface RetrofitInterface {\r\n @GET(\"maps/api/place/nearbysearch/json\")\r\n Call<PlacesModel> placeslist(@QueryMap Map<String,String> options);\r\n\r\n}", "public abstract void performSearch(SearchCaller caller, SearchManager manager, Connection connection, MediaSearch mediaSearch);", "public interface GitBookService {\n\n @GET(\"search\")\n Observable<SearchResult> search(@Query(\"q\") String keyword, @Query(\"page\") int page);\n\n /**\n *\n * @param lang 语言\n * all: 全部\n * en: 英文\n * zh: 中文\n * fr: french\n * ar: arabic\n * es: spanish\n * @return\n */\n @GET(\"explore\")\n Observable<ExploreResult> explore(@Query(\"lang\") String lang, @Query(\"page\") int page);\n\n}", "public interface JuHeService {\n @FormUrlEncoded\n @POST(\"toutiao/index\")\n public Observable<HttpResult> getSearchNews(@FieldMap Map<String, String> params);\n\n @FormUrlEncoded\n @POST(\"weixin/query\")\n public Observable<Response<WeiXinEntity>> loadWeiXin(@FieldMap Map<String, String> params);\n}", "public interface SearchService {\n\n List<GoodEntity> analyse(List<String> keywords);\n}", "public interface PlatformAdvertisingService{\r\n\r\n /**\r\n * 查询广告位\r\n * @param query\r\n * @return\r\n */\r\n public List<AdvertisingPosition> getAdList (PlatformAdvertisingServiceQuery query) throws Exception;\r\n\r\n /**\r\n * 启用、禁用 广告位\r\n * @param query\r\n */\r\n public void enabledAd (PlatformAdvertisingServiceQuery query) throws Exception;\r\n\r\n /**\r\n * 获取广告位\r\n * @param query\r\n * @return\r\n */\r\n public AdvertisingPosition getAdInfo (PlatformAdvertisingServiceQuery query) throws Exception;\r\n\r\n /**\r\n * 保存广告位\r\n * @param query\r\n */\r\n public void saveAdInfo (PlatformAdvertisingServiceQuery query) throws Exception;\r\n\r\n /**\r\n * 编辑广告位\r\n * @param query\r\n */\r\n public void editAdInfo (PlatformAdvertisingServiceQuery query) throws Exception;\r\n\r\n /**\r\n * 排序广告位\r\n */\r\n public void sortAd (PlatformAdvertisingServiceQuery query) throws Exception;\r\n}", "private void volleySearchRequest(String to_search) {\n RequestQueue requestQueue = VolleySingleton.getInstance().getRequestQueue();\n\n Log.e(TAG, \"SEARCH WORD LENGTH :: \" + to_search.length());\n Log.e(TAG, \"SEARCH URL :: \" + WebServices.SEARCH_URL(to_search, 2));\n\n Log.e(TAG, \"TO_SEARCH :: \" + to_search);\n Log.e(TAG, \"MENU ID TO SEARCH :: \" + menu_id_to_search);\n\n JsonArrayRequest jsonArrayRequest = new JsonArrayRequest(\n WebServices.SEARCH_URL(to_search, menu_id_to_search),\n new Response.Listener<JSONArray>() {\n @Override\n public void onResponse(JSONArray response) {\n Log.e(TAG, \"SEARCH RESPONSE :: \" + response);\n\n if (searchIntellisenseList.isEmpty()) {\n Log.e(TAG, \"List is empty\");\n } else {\n Log.e(TAG, \"List is containing items\");\n searchIntellisenseList.clear();\n adapter.notifyDataSetChanged();\n }\n\n SearchIntellisense searchIntellisense;\n try {\n JSONArray jsonArray = response.getJSONArray(0);\n for (int i = 0; i < jsonArray.length(); i++) {\n\n searchIntellisense = new SearchIntellisense();\n JSONObject jsonobject = jsonArray.getJSONObject(i);\n\n searchIntellisense.setId(jsonobject.getInt(\"id\"));\n searchIntellisense.setMenu(jsonobject.getString(\"menu\"));\n searchIntellisense.setName(jsonobject.getString(\"name\"));\n\n searchIntellisenseList.add(searchIntellisense);\n }\n\n //this is for removing duplicate items from arraylist starts\n// firstly confirm from misha, and them implement this code\n// Set<String> hs = new HashSet<>();\n// hs.addAll(search_results_list);\n// search_results_list.clear();\n// search_results_list.addAll(hs);\n //this is for removing duplicate items from arraylist ends\n\n\n } catch (JSONException e) {\n Log.e(TAG, \"JSONException while parsing categories :: \" + e);\n }\n\n try {\n JSONArray jsonArray = response.getJSONArray(1);\n Log.e(TAG, \"jsonObject of searches :: \" + jsonArray);\n for (int i = 0; i < jsonArray.length(); i++) {\n\n searchIntellisense = new SearchIntellisense();\n JSONObject jsonobject = jsonArray.getJSONObject(i);\n\n searchIntellisense.setId(jsonobject.getInt(\"id\"));\n searchIntellisense.setType(jsonobject.getInt(\"type\"));\n searchIntellisense.setName(jsonobject.getString(\"name\"));\n searchIntellisense.setRate(jsonobject.getDouble(\"rate\"));\n searchIntellisense.setRate_curid(jsonobject.getInt(\"rate_curid\"));\n searchIntellisense.setPrice_from(jsonobject.getString(\"price_from\"));\n searchIntellisense.setUnit_label(jsonobject.getString(\"unit_label\"));\n searchIntellisense.setMark(jsonobject.getString(\"mark\"));\n searchIntellisense.setFilename(jsonobject.getString(\"filename\"));\n\n searchIntellisenseList.add(searchIntellisense);\n }\n } catch (JSONException e) {\n Log.e(TAG, \"JSONException :: \" + e);\n }\n\n adapter = new SearchResultAdapter(searchIntellisenseList, SearchActivity.this, SearchActivity.this);//last param is for clicklistener\n rv_search_results.setAdapter(adapter);\n\n if (rv_search_results.getVisibility() == View.GONE) {\n rv_search_results.setVisibility(View.VISIBLE);\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(TAG, \"ERROR :: \" + error);\n if (error.toString().equals(\"com.android.volley.TimeoutError\")) {\n Log.e(TAG, \"Due to timeout, making call again.\");\n volleySearchRequest(et_search.getText().toString());\n }\n }\n }) {\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map headers = new HashMap();\n headers.put(\"X-ESM-LID\", AppController.APP_LANGUAGE);\n headers.put(\"X-ESM-KEY\", Constants.API_KEY);\n return headers;\n }\n };\n requestQueue.add(jsonArrayRequest);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n getMenuInflater().inflate(R.menu.menu_main, menu);\n\n // Associate searchable configuration with the SearchView\n SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);\n SearchView searchView = (SearchView) menu.findItem(R.id.menuSearch).getActionView();\n searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName()));\n\n searchView.setIconifiedByDefault(false);\n searchView.setFocusable(true);\n searchView.setIconified(false);\n\n\n\n if( Intent.ACTION_VIEW.equals(getIntent().getAction())){\n Intent i = new Intent(SearchActivity.this, SearchActivity.class);\n query = getIntent().getStringExtra(SearchManager.QUERY);\n i.setAction(Intent.ACTION_SEARCH);\n i.putExtra(\"query\", query);\n startActivity(i);\n\n Toast.makeText(SearchActivity.this, query, Toast.LENGTH_SHORT).show();\n }\n\n searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {\n @Override\n public boolean onQueryTextSubmit(String query) {\n // INPUT CODE HERE\n Toast.makeText(SearchActivity.this, query, Toast.LENGTH_SHORT).show();\n return false;\n }\n\n @Override\n public boolean onQueryTextChange(String newText) {\n // INPUT CODE HERE\n// String[] q = {\"promotion_name\"};\n// String[] t = {newText};\n// MySuggestionProvider suggestion = new MySuggestionProvider();\n// suggestion.query(Uri.parse(\"database.it.kmitl.ac.th/it_35\"), q, \"promotion_name LIKE %?%\", t, null);\n return false;\n }\n });\n return true;\n }", "public interface WeatherService {\n\n @GET(\"/v1/public/yql\")\n Call<YahooQueryResult> yahooQuery(@Query(\"q\") String query);\n}", "public interface FilmService {\n @Headers(\"Cache-Control:public ,max-age=3600\")\n @GET(\"v2/movie/search\")\n Call<FilmRoot> getFilm(@Query(\"tag\") String tag, @Query(\"start\") String start,@Query(\"count\") String count);\n\n\n @GET(\"v2/movie/subject/{id}\")\n Call<MainFilmRoot> getFilmItem(@Path(\"id\") String id);\n}", "public interface ApiService {\n\n\n //--------------------------------------------Movies------------------------------------------------------------------------------\n\n @GET(\"discover/movie?\" + ApiConstants.ApiKey)\n Call<MovieModel> getMoviesByGenre(@Query(\"with_genres\") String genre,@Query(\"page\") int page);\n\n @GET(\"discover/movie?\" + ApiConstants.ApiKey)\n Call<MovieModel> getMoviesByYear(@Query(\"primary_release_year\") int year,@Query(\"page\") int page);\n\n @GET(\"movie/{popular}?\" + ApiConstants.ApiKey)\n Call<MovieModel> getMovies(@Path(\"popular\")String popular,@Query(\"page\") int page);\n\n @GET(\"movie/{movie_id}?\" + ApiConstants.ApiKey)\n Call<Movie> getMovie(@Path(\"movie_id\") int link,@Query(\"append_to_response\")String credits);\n\n @GET(\"movie/{movie_id}/credits?\" + ApiConstants.ApiKey)\n Call<CreditsModel> getMovieCredits(@Path(\"movie_id\") int link);\n\n @GET(\"genre/movie/list?\" + ApiConstants.ApiKey)\n Call<GenresModel> getGenres();\n\n @GET(\"movie/{movie_id}/\" + \"similar?\" + ApiConstants.ApiKey)\n Call<MovieModel> getSimilar(@Path(\"movie_id\") int link);\n\n @GET(\"movie/{movie_id}/\" + \"videos?\" + ApiConstants.ApiKey)\n Call<VideoModel> getVideo(@Path(\"movie_id\") int link);\n\n @GET(\"search/movie?\" + ApiConstants.ApiKey)\n Call<MovieModel> getSearchMovie(@Query(\"query\") String query);\n\n @GET(\"movie/{movie_id}/images?\" + ApiConstants.ApiKey)\n Call<ImageModel> getMovieImages(@Path(\"movie_id\") int link);\n\n @GET(\"movie/{movie_id}/reviews?\" + ApiConstants.ApiKey)\n Call<ReviewsModel> getMovieReviews(@Path(\"movie_id\") int link);\n\n //--------------------------------------------Shows------------------------------------------------------------------------------\n @GET(\"genre/tv/list?\" + ApiConstants.ApiKey)\n Call<GenresModel> getTVGenres();\n\n @GET(\"discover/tv?\" + ApiConstants.ApiKey)\n Call<ShowsModel> getTVByGenre(@Query(\"with_genres\") String genre,@Query(\"page\") int page);\n\n @GET(\"discover/tv?\" + ApiConstants.ApiKey)\n Call<ShowsModel> getTVByNetwork(@Query(\"with_networks\") int id,@Query(\"page\") int page);\n\n @GET(\"discover/tv?\" + ApiConstants.ApiKey)\n Call<ShowsModel> getTVByYear(@Query(\"primary_release_year\") int year,@Query(\"page\") int page);\n\n @GET(\"tv/{tv_id}?\" + ApiConstants.ApiKey)\n Call<Shows> getShows(@Path(\"tv_id\") int link ,@Query(\"append_to_response\")String credits);\n\n @GET(\"tv/{shows}?\" + ApiConstants.ApiKey)\n Call<ShowsModel> getShows(@Path(\"shows\")String shows,@Query(\"page\") int page);\n\n @GET(\"search/tv?\" + ApiConstants.ApiKey)\n Call<ShowsModel> getSearchShows(@Query(\"query\") String query);\n\n @GET(\"tv/{tv_id}/\" + \"videos?\" + ApiConstants.ApiKey)\n Call<VideoModel> getShowVideo(@Path(\"tv_id\") int link);\n\n @GET(\"tv/{tv_id}/\" + \"similar?\" + ApiConstants.ApiKey)\n Call<ShowsModel> getSimilarShows(@Path(\"tv_id\") int link);\n\n @GET(\"tv/{tv_id}/credits?\" + ApiConstants.ApiKey)\n Call<CreditsModel> getShowCredits(@Path(\"tv_id\") int link);\n\n @GET(\"tv/{tv_id}/images?\" + ApiConstants.ApiKey)\n Call<ImageModel> getShowsImages(@Path(\"tv_id\") int link);\n\n\n //--------------------------------------------Person------------------------------------------------------------------------------\n\n @GET(\"person/popular?\" + ApiConstants.ApiKey)\n Call<PersonModel> getPopularPeople(@Query(\"page\") int page);\n\n @GET(\"person/{person_id}/\" + \"movie_credits?\" + ApiConstants.ApiKey)\n Call<CreditsModel> getPersonCredits(@Path(\"person_id\") int link);\n\n @GET(\"person/{person_id}?\" + ApiConstants.ApiKey)\n Call<Person> getPerson(@Path(\"person_id\") int link);\n\n @GET(\"search/person?\" + ApiConstants.ApiKey)\n Call<PersonModel> getSearchPerson(@Query(\"query\") String query);\n\n //--------------------------------------------Login------------------------------------------------------------------------------\n\n @GET(\"authentication/{guest_session}/new?\" + ApiConstants.ApiKey)\n Call<User> getGuestUser(@Path(\"guest_session\")String guest);\n\n @GET(\"authentication/token/validate_with_login?\" + ApiConstants.ApiKey)\n Call<User> getValidateUser(@Query(\"username\") String username,@Query(\"password\") String password,@Query(\"request_token\")String request_token);\n\n @GET(\"authentication/session/new?\" + ApiConstants.ApiKey)\n Call<User> getUserSession(@Query(\"request_token\") String reques_token);\n\n @GET(\"account?\" + ApiConstants.ApiKey)\n Call<User> getUserDetails(@Query(\"session_id\") String session_id);\n\n //--------------------------------------------Favorites------------------------------------------------------------------------------\n\n @GET(\"account/{account_id}/favorite/movies?\" + ApiConstants.ApiKey)\n Call<MovieModel> getUserFavorites(@Path(\"account_id\") String account_id,@Query(\"session_id\") String session_id);\n\n @GET(\"movie/{movie_id}/\" + \"account_states?\" + ApiConstants.ApiKey)\n Call<Movie> getFavorites(@Path(\"movie_id\") int link,@Query(\"session_id\")String session_id);\n\n @POST(\"account/{account_id}/favorite?\" + ApiConstants.ApiKey)\n Call<Movie> postUserFavorites(@Path(\"account_id\") String account_id, @Query(\"session_id\") String session_id, @Body FavoriteMoviePost body);\n\n @POST(\"account/{account_id}/favorite?\" + ApiConstants.ApiKey)\n Call<Shows> postUserShowFavorites(@Path(\"account_id\") String account_id, @Query(\"session_id\") String session_id, @Body FavoriteMoviePost body);\n\n @GET(\"account/{account_id}/favorite/tv?\" + ApiConstants.ApiKey)\n Call<ShowsModel> getUserShowsFavorites(@Path(\"account_id\") String account_id,@Query(\"session_id\") String session_id);\n\n @GET(\"tv/{tv_id}/\" + \"account_states?\" + ApiConstants.ApiKey)\n Call<Shows> getShowFavorite(@Path(\"tv_id\") int link,@Query(\"session_id\")String session_id);\n\n //--------------------------------------------Watchlist------------------------------------------------------------------------------\n\n @GET(\"account/{account_id}/watchlist/movies?\" + ApiConstants.ApiKey)\n Call<MovieModel> getUserWatchlist(@Path(\"account_id\") String account_id,@Query(\"session_id\") String session_id);\n\n @GET(\"movie/{movie_id}/\" + \"account_states?\" + ApiConstants.ApiKey)\n Call<Movie> getWatchlist(@Path(\"movie_id\") int link,@Query(\"session_id\")String session_id);\n\n @POST(\"account/{account_id}/watchlist?\" + ApiConstants.ApiKey)\n Call<Movie> postUserWatchlist(@Path(\"account_id\") String account_id, @Query(\"session_id\") String session_id, @Body WatchlistMoviePost body);\n\n @POST(\"account/{account_id}/watchlist?\" + ApiConstants.ApiKey)\n Call<Shows> postUserShowWatchlist(@Path(\"account_id\") String account_id, @Query(\"session_id\") String session_id, @Body WatchlistMoviePost body);\n\n @GET(\"account/{account_id}/watchlist/tv?\" + ApiConstants.ApiKey)\n Call<ShowsModel> getUserShowsWatchlist(@Path(\"account_id\") String account_id,@Query(\"session_id\") String session_id);\n\n //--------------------------------------------Rated------------------------------------------------------------------------------\n\n @POST(\"movie/{movie_id}/rating?\" + ApiConstants.ApiKey)\n Call<Movie> postUserRating(@Path(\"movie_id\") int account_id, @Query(\"session_id\") String session_id,@Body Rated body);\n\n @POST(\"tv/{tv_id}/rating?\" + ApiConstants.ApiKey)\n Call<Shows> postUserShowRating(@Path(\"tv_id\") int account_id, @Query(\"session_id\") String session_id,@Body Rated body);\n\n @GET(\"account/{account_id}/rated/movies?\" + ApiConstants.ApiKey)\n Call<MovieModel> getUserRated(@Path(\"account_id\") String account_id,@Query(\"session_id\") String session_id);\n\n @GET(\"account/{account_id}/rated/tv?\" + ApiConstants.ApiKey)\n Call<ShowsModel> getUserRatedShows(@Path(\"account_id\") String account_id,@Query(\"session_id\") String session_id);\n}", "public interface IntentSearchLister {\n\n void sendSearchValue(String value);\n}", "public interface MetaInformationService extends BasicEcomService{\n\n public String listMetaInformationTypesForPage(String page);\n public Integer getTotalPagesForMetaInformationTypes();\n public Integer getTotalPagesForSearchedMetaInformationTypes(String metaType);\n public String listSearchedMetaInformationTypesForPage(String metaType,String page);\n\n\n}", "public interface GithubUserSearchService {\n\n @GET(\"users\")\n Observable<GitHubUsersResponse> getGithubUsersList(@Query(\"q\") String searchName);\n\n}", "public interface WeatherService {\n @GET(\"weather\")\n Single<WeatherResult> getWeather(@Query(\"q\") String location, @Query(\"APPID\") String appId);\n\n}", "public interface WeatherService {\n\n @GET(\"weather\")\n Call<ClaseCiudad> getCity(@Query(\"q\") String city, @Query(\"appid\") String key);\n\n @GET(\"weather\")\n Call<ClaseCiudad> getCity(@Query(\"id\") int idCity, @Query(\"appid\") String key);\n\n @GET(\"weather\")\n Call<ClaseCiudad> getCity(@Query(\"id\") int idCity, @Query(\"appid\") String key, @Query(\"units\") String value);\n\n @GET(\"weather\")\n Call<ClaseCiudad> getCity(@Query(\"id\") int idCity, @Query(\"appid\") String key, @Query(\"units\") String value, @Query(\"lang\") String lang);\n\n }", "public interface JokeService {\n @GET(\"255-1\")\n Observable<JokeResponse> getJoke(@Query(\"page\") int page,\n @Query(\"showapi_sign\") String sign,\n @Query(\"type\") String type,\n @Query(\"showapi_appid\") String appId);\n}", "SearchResponse search(SearchRequest searchRequest) throws IOException;", "public interface ApiSource {\n\n Observable<TagSearchResponse> searchTag(String query, String token);\n\n Observable<MediaListResponse> searchMedia(String tag, String token);\n\n Observable<Places> searchPlace(User body);\n}", "public interface AnomalySearchService extends RemoteService {\r\n /**\r\n * Returns a list of available disease, or tumor, types\r\n *\r\n * @return list of disease types\r\n * @throws SearchServiceException\r\n */\r\n List<Disease> getDiseases() throws SearchServiceException;\r\n\r\n /**\r\n * Returns a list of ColumnType objects. These is used to build the anomaly filter UI.\r\n * The same objects are then sent through processFilter to execute the filter.\r\n *\r\n * @param disease Disease abbreviation\r\n * @return the list of ColumnType objects for this disease\r\n * @throws SearchServiceException\r\n */\r\n List<ColumnType> getColumnTypes(String disease) throws SearchServiceException;\r\n\r\n /**\r\n * Executes an anomaly filter. Returns the first page of anomaly results.\r\n *\r\n * @param filter Filter specifier\r\n * @return page of results\r\n * @throws SearchServiceException\r\n */\r\n Results processFilter(FilterSpecifier filter) throws SearchServiceException;\r\n\r\n /**\r\n * Fetches any page of anomaly results.\r\n *\r\n * @param page Page number to fetch. One-based\r\n * @return page of results\r\n * @throws SearchServiceException\r\n */\r\n Results getResultsPage(FilterSpecifier.ListBy listBy, int page) throws SearchServiceException;\r\n\r\n /**\r\n * Changes number of rows per page. Returns the first page again, with the new count.\r\n *\r\n * @param listBy\r\n * @param rowsPerPage\r\n * @return\r\n * @throws SearchServiceException\r\n */\r\n Results setRowsPerPage(FilterSpecifier.ListBy listBy, int rowsPerPage) throws SearchServiceException;\r\n\r\n /**\r\n * Sorts results by any column; returns the first page.\r\n *\r\n * @param sortspec the specifier\r\n * @return first resultspage\r\n * @throws SearchServiceException\r\n */\r\n Results sortResults(FilterSpecifier.ListBy listBy, SortSpecifier sortspec) throws SearchServiceException;\r\n\r\n /**\r\n * Returns information about a pathway, including a link to pathway graphic.\r\n *\r\n * @param sps\r\n * @return\r\n * @throws SearchServiceException\r\n */\r\n SinglePathwayResults getSinglePathway(SinglePathwaySpecifier sps) throws SearchServiceException;\r\n\r\n Results getPivotPage(FilterSpecifier.ListBy sourceListby, String rowName, FilterSpecifier filter) throws SearchServiceException;\r\n\r\n /**\r\n * Returns URL to the user guide.\r\n *\r\n * @return\r\n * @throws SearchServiceException\r\n */\r\n String getUserGuideLocation() throws SearchServiceException;\r\n\r\n /**\r\n * Returns URL to the HTML version of the user guide.\r\n *\r\n * @return\r\n */\r\n String getOnlineHelpLocation();\r\n\r\n /**\r\n * Returns tooltip text to be displayed in popups in the data browser.\r\n *\r\n * @return\r\n * @throws SearchServiceException\r\n */\r\n TooltipTextMap getTooltipText() throws SearchServiceException;\r\n\r\n /**\r\n * Client regularly sends keepalive message to server, so server will keep session open.\r\n * Allows servlet to dump session within a few minutes after user navigates away.\r\n */\r\n void keepAlive();\r\n\r\n /**\r\n * Method used by export functionality in main results tables. Since the result set is held by the server,\r\n * it's not necessary to serialize and send the results through the interface.\r\n *\r\n * @return the export file name\r\n * @throws SearchServiceException if needed\r\n */\r\n String exportResultsData(FilterSpecifier.ListBy listBy, String filename) throws SearchServiceException;\r\n\r\n /**\r\n * Method used by export functionality in pivot tables. Since the result set is held by the client,\r\n * it IS necessary to serialize and send the results through the interface.\r\n *\r\n * @return the export file name\r\n * @throws SearchServiceException if needed\r\n */\r\n String exportPivotResultsData(FilterSpecifier.ListBy listBy, String filename, Results results) throws SearchServiceException;\r\n\r\n\r\n /**\r\n * Serializable exception class which is thrown for any error that occurs on the server\r\n * which needs to be reported to the client.\r\n */\r\n public class SearchServiceException extends Exception implements IsSerializable {\r\n public SearchServiceException() {\r\n }\r\n\r\n public SearchServiceException(String message) {\r\n super(message);\r\n }\r\n\r\n public SearchServiceException(Throwable t) {\r\n super(t);\r\n }\r\n }\r\n\r\n}", "public void onSearchStarted();", "@Override\n public void search(Uri uri) {\n }", "public interface RestService {\n void findNearbyPlaces(double latitude, double longitude, String category);\n}", "@GET(\"search.ashx?num_of_results=3\")\n Observable<AutoCompleteApiResponse> getCity(@Query(\"q\") String query);", "public interface ServiceApi {\n @GET(\"/user/login\")\n Observable<DlBean> dL(@Query(\"mobile\") String mobile,@Query(\"password\") String password );\n @GET(\"/user/reg\")\n Observable<ZcBean> zC(@Query(\"mobile\") String mobile,@Query(\"password\") String password );\n @GET(\"/ad/getAd\")\n Observable<LbBean> lieb(@Query(\"source\") String source );\n // http://120.27.23.105/product/getProductDetail?pid=1&source=android\n @GET(\"/product/getProductDetail\")\n Observable<XqBean> xQ(@Query(\"source\") String source, @Query(\"pid\") int pid);\n @GET(\"product/getCarts\")\n Observable<MsgBean<List<DataBean>>> getDatas(@Query(\"uid\") String uid, @Query(\"source\") String source);\n @GET(\"product/deleteCart\")\n Observable<MsgBean> deleteData(@Query(\"uid\") String uid, @Query(\"pid\") String pid, @Query(\"source\") String source);\n\n}", "public interface LibraryService {\n\n /*\n\n 1.Search--Keyword\n 2.Get List\n A.Order by created time\n B.Refresh and load next page\n 3.Get specific one\n\n */\n\n @GET(\"classes/Library\")\n Observable<BaseResponse<Library>> getLibrary(@QueryMap Map<String, String> parametersMap);\n\n /*\n curl -X PUT \\\n -H \"X-LC-Id: OOhkF87ffBYBHmvph465ApmV-gzGzoHsz\" \\\n -H \"X-LC-Key: OkaU2qxpo1fbHPtc9o7yQVgM\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"upvotes\":{\"__op\":\"Increment\",\"amount\":1}}' \\\n https://api.leancloud.cn/1.1/classes/Post/558e20cbe4b060308e3eb36c\n */\n @PUT(\"classes/Library/{objId}\")\n Observable<ResponseBody> increaseCount(@Path(\"objId\") String objId, @Body CountIncrement countIncrement);\n\n \n}", "private void search(String query) {\n final List<Artist> foundartists = new ArrayList<Artist>();\n final String usrquery = query;\n\n spotifysvc.searchArtists(query, new Callback<ArtistsPager>() {\n @Override\n public void success(ArtistsPager artists, Response response) {\n List<Artist> artistlist = artists.artists.items;\n Log.d(LOG_TAG_API, \"found artists [\" + artistlist.size() + \"]: \" + artistlist.toString());\n datalist.clear();\n\n if (artistlist.size() > 0) {\n setListdata(artistlist);\n } else {\n Toast.makeText(getActivity(), \"no artists found by the name: \" + usrquery, Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void failure(RetrofitError error) {\n Log.e(LOG_TAG_API, \"failed to retrieve artists:\\n\" + error.toString());\n Toast.makeText(getActivity(), \"failed to retrieve artists. Possible network issues?: \", Toast.LENGTH_SHORT).show();\n }\n });\n }", "public interface StoreSearchService {\n /**\n * Returns the books for the given search.\n *\n * @param title the title of the book. To ignore this, leave it empty or use \"*\".\n * @param authors the authors of the book. To ignore this, leave it empty or use \"*\".\n * @param isbn the authors of the book. To ignore this, leave it empty or use \"*\".\n * @param publisher the publisher of the book. To ignore this, leave it empty or use \"*\".\n * @return the filtered books.\n */\n public Books getBooks(String title,String authors,String isbn,String publisher);\n}", "public interface GeocodingService {\n\n @GET(\"maps/api/geocode/json\")\n Observable<GoogleMapAddress> getTrends(@Query(\"address\") String address, @Query(\"key\") String key);\n\n}", "public interface Service {\n\n @GET(\"search?show-fields=thumbnail\")\n Call<SearchResponseObject> getContent(@Query(\"page\") long page);\n\n @GET(\"search?show-fields=thumbnail\")\n Call<SearchResponseObject> getContent(@Query(\"section\") String filter, @Query(\"page\") long page);\n\n @GET(\"sections\")\n Call<SectionResponseObject> getSections();\n}", "public interface SparePartApiService {\n\n @GET(\"/hibbiz-api/api/spareparts/search\")\n void searchSpareParts(@Query(\"page\")Integer page,\n @Query(\"size\")Integer size,\n @Query(\"sort\")String sort,\n @EncodedQueryMap Map<String, String> sdesc,\n Callback<Page<SparePart>> callback);\n\n @GET(\"/hibbiz-api/api/spareparts\")\n void getSpareParts(@Query(\"page\") Integer page,\n @Query(\"size\") Integer size,\n @Query(\"sort\")String sort,\n Callback<Page<SparePart>> callback);\n}", "public interface IGetHomeSearchResultView extends IBaseVIew {\n\n\n// sort 排列方式: 0=智能排序,1=距离优先,2=人均\n// cid\n// floor_id\n// pn\n\n\n// \"search_word\":\"澳门\",\n// \"lng\":\"110.31803\",\n// \"lat\":\"20.02833\",\n// \"sort\":\"0\",\n// \"cate_id\":\"\",\n// \"mall_id\":\"\",\n// \"pn\":\"1\"\n\n\n\n String getWord();\n String getJd();\n String getWd();\n String getSortMethod();\n String getMailId();\n String getPage();\n\n String getCId();\n\n\n\n\n void onGetHomeSearchResultBean(HomeSearchResult bean);\n\n}", "public interface ICookService {\n\n\n @GET(MyContants.Cook_Service_CategoryQuery)\n Observable<CategorySubscriberResultInfo> getCategoryQuery(@Query(MyContants.Cook_Parameter_Key) String key);\n\n @GET(MyContants.Cook_Service_MenuSearch)\n Observable<SearchCookMenuSubscriberResultInfo> searchCookMenuByID(\n @Query(MyContants.Cook_Parameter_Key) String key\n , @Query(MyContants.Cook_Parameter_Cid) String cid\n , @Query(MyContants.Cook_Parameter_Page) int page\n , @Query(MyContants.Cook_Parameter_Size) int size);\n\n @GET(MyContants.Cook_Service_MenuSearch)\n Observable<SearchCookMenuSubscriberResultInfo> searchCookMenuByName(\n @Query(MyContants.Cook_Parameter_Key) String key\n , @Query(MyContants.Cook_Parameter_Name) String name\n , @Query(MyContants.Cook_Parameter_Page) int page\n , @Query(MyContants.Cook_Parameter_Size) int size);\n\n}", "public interface ApiService {\n @GET(\"AppServices/AppWebService.asmx/Catagory\")\n Call<Example> getAllCategory();\n\n @FormUrlEncoded\n @POST(\"AppServices/AppWebService.asmx/PhotoGallary\")\n Call<Example> getAllPhoto(@Field(\"CatagoryId\") String image_id);\n\n\n @GET(\"AppServices/AppWebService.asmx/Notice\")\n Call<Example> GetNotice();\n\n\n @GET(\"AppServices/AppWebService.asmx/GetStandard\")\n Call<Example> GetStandard();\n\n @GET(\"AppServices/AppWebService.asmx/GetSection\")\n Call<Example> GetSection();\n\n @GET(\"AppServices/AppWebService.asmx/News\")\n Call<Example> GetNews();\n\n @GET(\"AppServices/AppWebService.asmx/Assignment\")\n Call<Example> GetAssignment();\n\n @GET(\"AppServices/AppWebService.asmx/Event\")\n Call<Example> GetEvent();\n\n @GET(\"AppServices/AppWebService.asmx/Slider\")\n Call<Example> GetSlider();\n\n @GET(\"AppServices/AppWebService.asmx/Staff\")\n Call<Example> GetStaff();\n\n\n @GET(\"AppServices/AppWebService.asmx/Calander\")\n Call<Example> GetCalander();\n\n @GET(\"AppServices/AppWebService.asmx/Video\")\n Call<Example> GetVideo();\n\n @GET(\"AppServices/AppWebService.asmx/ToDayEvent\")\n Call<Example> GetTodayEvent();\n\n\n @GET(\"AppServices/AppWebService.asmx/ToDayNews\")\n Call<Example> Getodaynews();\n\n @GET(\"AppServices/AppWebService.asmx/RankerStudent\")\n Call<Example> GetSchoolRanker();\n\n\n @GET(\"AppServices/AppWebService.asmx/Medium\")\n Call<Example> GetMedium();\n\n @FormUrlEncoded\n @POST(\"AppServices/AppWebService.asmx/Standard_Div\")\n Call<Example> GetStandard(@Field(\"MediumId\") String stdid);\n\n @FormUrlEncoded\n @POST(\"AppServices/AppWebService.asmx/HomeWork\")\n Call<Example> GetHWork(@Field(\"StdId\") String Stdname);\n\n\n @GET(\"AppServices/AppWebService.asmx/Calander\")\n Call<Example> getcalnder();\n\n @FormUrlEncoded\n @POST(\"AppServices/AppWebService.asmx/TimeTable\")\n Call<Example> GetTimeTable(@Field(\"StdId\")String stdid);\n}", "public MagicSearch createMagicSearch();", "public interface NearByInfoApi {\n @GET(\"home/get_single\")\n public Call<NearByInfo> getNearbyInfo(@QueryMap ArrayMap<String,String> params);\n}", "private void searchForDesignateService(java.lang.String r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.searchForDesignateService(java.lang.String):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.searchForDesignateService(java.lang.String):void\");\n }", "public interface ISearchPresenter extends IBasePresenter<ISearchCallBack>{\n\n\n void doSearch(String keyword);\n\n /**\n * 重新搜索\n */\n void reSearch();\n\n /**\n * 加载更多的搜索结果\n */\n void loadMore();\n\n /**\n * 获取热词\n */\n void getHotWord();\n\n /**\n * 获取推荐的关键字(相关的关键字)\n *\n * @param keyword\n */\n void getRecommendWord(String keyword);\n\n\n\n\n\n}", "public interface AppAPI {\n\n @GET(\"weather\")\n Call<WeatherInfo> getCurrentWeather(@Query(\"id\") long cityId,\n @Query(\"units\") String units,\n @Query(\"appid\") String appId);\n\n @GET(\"forecast\")\n Call<Forecast> getForecast3hrs(@Query(\"id\") long cityId,\n @Query(\"units\") String units,\n @Query(\"appid\") String appId);\n\n @GET(\"find\")\n Call<CityResult> findCity(@Query(\"q\") String cityName,\n @Query(\"type\") String type,\n @Query(\"sort\") String sort,\n @Query(\"cnt\") int cnt,\n @Query(\"appid\") String appId);\n}", "public interface IScapSyncSearch {\n\n /**\n * Get the Relative Search URL of this search.\n * @return page the Relative Search URL of this search\n */\n public String getSearchUrl();\n\n /**\n * Get the number of rows per page in this search.\n * @return int the number of rows in this search\n */\n public int getRowsPerPage();\n\n /**\n * Get the Starting Row of this search.\n * @return int the number of the Starting Row of this search\n */\n public int getStartRow();\n\n /**\n * Get the Ending Row of this search.\n * @return int the number of the Ending Row of this search\n */\n public int getEndRow();\n \n /**\n * Get the Total Rows of this search.\n * @return int the number of Total Rows of this search\n */\n public int getTotalRows(); \n\n /**\n * Get the number of the Current Page of this search.\n * @return int the Current Page of this search\n */\n public int getCurrentPage(); \n\n /**\n * Get the Sort Fields of this search.\n * @return sortFields[] and array containing the available Sort Fields\n */\n public IScapSyncSearchSortField[] getSortFields();\n \n /**\n * Get the Facets of this search.\n * @return IScapSyncSearchFacet[] an array containing the available Facets\n */\n public IScapSyncSearchFacet[] getFacets();\n \n /**\n * Get the Results of this search.\n * @return IScapSyncSearchResult[] an array containing the available Results\n */\n public IScapSyncSearchResult[] getResults();\n\n /**\n * Get the Pages of this search.\n * @return IScapSyncSearchPage[] an array containing the available Pages\n */\n public IScapSyncSearchPage[] getPages();\n\n}", "public void search(String query) {\n Log.i(TAG, \"search: \" + query);\n artistInteractor.searchInItunes(query, this);\n }", "public interface SaavnApi\n{\n @GET(\"/api.php\")\n Call<List<Song>> makeSongRequest(\n @QueryMap(encoded=true) Map<String, String> options\n );\n\n @GET(\"/api.php\")\n Call<SongList> makePlaylistRequest(\n @QueryMap(encoded=true) Map<String, String> options\n );\n\n @GET(\"/api.php\")\n Call<Show> makeShowRequest(\n @QueryMap(encoded=true) Map<String, String> options\n );\n\n @GET(\"/api.php\")\n Call<Song> makeEpisodeRequest(\n @QueryMap(encoded=true) Map<String, String> options\n );\n}", "private SearchServiceFactory() {}", "public void onSearch(View view){\n List<Address> addressList = null;\n EditText location_tf = (EditText) findViewById(R.id.TFaddress);\n String location = location_tf.getText().toString();\n if(location!=null || location.equals(\"\")){\n Geocoder geocoder = new Geocoder(this);\n try {\n addressList = geocoder.getFromLocationName(location, 1);\n } catch (IOException e) {\n e.printStackTrace();\n }\n Address address = addressList.get(0);\n LatLng latLng = new LatLng(address.getLatitude(), address.getLongitude());\n marker = mMap.addMarker(new MarkerOptions().position(latLng).title(\"Marker\"));\n mMap.addMarker(new MarkerOptions().position(latLng).title(\"Marker\"));\n mMap.animateCamera(CameraUpdateFactory.newLatLng(latLng));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng,17));\n\n }\n\n }", "public interface AppService {\n /**\n * 搜索特定含关键词的app\n * @param keyword 关键词\n * @return 相关的app\n */\n List<App> search(String keyword);\n\n /**\n * 获取app的标签\n * @param appId app的id\n * @return app的标签列表\n */\n List<Tag> GetAppTags(String appId);\n\n void save(App app);\n}", "public interface APIService {\n\n String baseUrl = \"http://api.zhuishushenqi.com\";\n\n /**\n */\n// @FormUrlEncoded\n// @POST(\"/cats/lv2/statistics/\")\n// Flowable<GetListRsp> login(@Field(\"username\") String username,\n// @Field(\"password\") String password);\n\n /**\n * GetListRsp\n */\n @GET(\"/cats/lv2/statistics/\")\n Observable<GetListRsp> login(@QueryMap Map<String, String> params);\n}", "public interface MerchantService {\n\n @GET(\"api/v1/merchants\")\n Observable<MerchantList> getMerchantByKeyword(@Query(\"keywords\") String keyword);\n\n @GET(\"api/v1/merchants\")\n Observable<MerchantList> getMerchantByKeywordAndPage(@Query(\"keywords\") String keyword,\n @Query(\"page\") int page);\n\n @GET(\"api/v1/merchant/n?\")\n Observable<Merchant> getMerchantProfile(@Query(\"merchant_id\") String merchantId);\n}", "public interface GooglePlacesApi {\n\n @GET(\"maps/api/place/autocomplete/json?type=(cities)&language=es\")\n Call<PredictionResult> autoComplete(@Query(\"input\") String text);\n\n @GET(\"maps/api/place/details/json\")\n Call<DetailsResult> getPlaceDetails(@Query(\"place_id\") String text);\n\n\n}", "public interface WeatherApi {\n String API_KEY = \"1b0c10e2a4612bc6595754792eb47224\";\n\n @GET(\"forecast?appid=\" + API_KEY)\n Call<WeatherResponse> getWeatherData(@Query(\"q\") String q);\n}", "private Search() {}", "public interface BaiDuApis {\n\n /**\n * http://tingapi.ting.baidu.com/v1/restserver/ting?method=baidu.ting.search.common&query=%E7%88%B1%E6%88%91%E8%BF%98%E6%98%AF%E4%BB%96&page_size=30&page_no=1&format=xml\n */\n\n\n String Host = \"http://tingapi.ting.baidu.com/v1/restserver/\";\n String Method_search = \"baidu.ting.search.catalogSug\";\n //String Method_search = \"baidu.ting.search.common\";\n String Method_lrc=\"\";\n String Method_play = \"baidu.ting.song.play\";\n\n @GET(\"ting\")\n Flowable<BaiDuMusicSearchBean> fetchMusicListInfo(@Query(\"method\") String method, @Query(\"query\") String query);\n\n @GET(\"ting\")\n Flowable<BaiDuPlayBean> playMusicLink(@Query(\"method\") String method, @Query(\"songid\") String songId);\n}", "public interface ApplicationService extends GenericService<Application, Long> {\n\n Page<Application> getPagedMerchantApplications(Long merchantId, int pagination, int capacity, String keyword, String... fetchs);\n\n boolean isAppIDExisted(String appID);\n\n boolean isOriginalIDExisted(String originalID);\n\n Application getApplicationByAppID(String appID, String... fetchs);\n\n boolean startPulling(String appID);\n\n boolean endPulling(String appID);\n\n boolean startRefreshing(String appID);\n\n boolean endRefreshing(String appID);\n\n int updateToVerified(String appID);\n\n}", "private SearchAutoCompleteAPI(Context context,String nameOrCode){\n this.context=context;\n this.nameOrCode=nameOrCode;\n }" ]
[ "0.68034345", "0.6667435", "0.66341084", "0.6540956", "0.6412806", "0.62658215", "0.6256614", "0.62531656", "0.6215449", "0.61706764", "0.6138387", "0.60941", "0.60928816", "0.60906243", "0.60893816", "0.6088761", "0.6064552", "0.60526437", "0.60416925", "0.6038304", "0.602751", "0.60219246", "0.5996256", "0.59945893", "0.59934086", "0.5963472", "0.59539753", "0.5944488", "0.5939609", "0.59366083", "0.59362215", "0.59318453", "0.58801144", "0.5878522", "0.5865937", "0.5865002", "0.5855018", "0.5835998", "0.58198106", "0.58193225", "0.57979804", "0.5797688", "0.57915676", "0.5771034", "0.57687587", "0.57675296", "0.5760076", "0.575481", "0.57511497", "0.57510835", "0.57505286", "0.5744428", "0.57352716", "0.5730544", "0.57296485", "0.572899", "0.5723635", "0.57188195", "0.5715141", "0.5702422", "0.57011765", "0.56885976", "0.56829536", "0.5681399", "0.56761956", "0.5672465", "0.5665772", "0.5665117", "0.56595707", "0.56504047", "0.5650292", "0.5649501", "0.5648864", "0.5648515", "0.5642213", "0.56349534", "0.563343", "0.5632814", "0.56307244", "0.5630253", "0.56255656", "0.5625353", "0.56248903", "0.5617057", "0.5615011", "0.5605413", "0.559338", "0.55928004", "0.5590205", "0.5586365", "0.5578985", "0.55716443", "0.5568211", "0.5567139", "0.55661964", "0.55661017", "0.5565794", "0.5562467", "0.5559946", "0.5555308" ]
0.6774656
1
Time Complexity O(M+N) where M and N are row length and column length Space Complexity O(1)
public int leftMostColumnWithOne(BinaryMatrix binaryMatrix) { int rows = binaryMatrix.dimensions().get(0); int cols = binaryMatrix.dimensions().get(1); // Set pointers to the top-right corner. int currentRow = 0; int currentCol = cols - 1; // Repeat the search until it goes off the grid. while (currentRow < rows && currentCol >= 0) { if (binaryMatrix.get(currentRow, currentCol) == 0) { currentRow++; } else { currentCol--; } } // If we never left the last column, this is because it was all 0's. return (currentCol == cols - 1) ? -1 : currentCol + 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int columnPairsSize();", "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}", "private int size() {\n\treturn matrix.length; //# of rows\n }", "int removeObstacle(int numRows, int numColumns, List<List<Integer>> lot)\r\n {\r\n \tint m = 0;\r\n \tint n = 0;\r\n \tfor(List<Integer> rowList: lot) {\r\n \t\tfor(Integer num: rowList) {\r\n \t\t\tif(num == 9 ) {\r\n \t\t\t\tbreak;\r\n \t\t\t}\r\n \t\t\tn++;\r\n \t\t}\r\n \t\tm++;\r\n \t}\r\n \t// to store min cells required to be \r\n // covered to reach a particular cell \r\n int dp[][] = new int[numRows][numColumns]; \r\n \r\n // initially no cells can be reached \r\n for (int i = 0; i < numRows; i++) \r\n for (int j = 0; j < numColumns; j++) \r\n dp[i][j] = Integer.MAX_VALUE; \r\n \r\n // base case \r\n dp[0][0] = 1; \r\n \r\n for (int i = 0; i < lot.size(); i++) {\r\n \tList<Integer> columnList = lot.get(i);\r\n for (int j = 0; j < columnList.size(); j++) { \r\n \r\n // dp[i][j] != INT_MAX denotes that cell \r\n // (i, j) can be reached from cell (0, 0) \r\n // and the other half of the condition \r\n // finds the cell on the right that can \r\n // be reached from (i, j) \r\n if (dp[i][j] != Integer.MAX_VALUE && \r\n (j + columnList.get(j)) < numColumns && (dp[i][j] + 1) \r\n < dp[i][j + columnList.get(j)]\r\n \t\t && columnList.get(j) != 0) \r\n dp[i][j + columnList.get(j)] = dp[i][j] + 1; \r\n \r\n if (dp[i][j] != Integer.MAX_VALUE && \r\n (i + columnList.get(j)) < numRows && (dp[i][j] + 1) \r\n < dp[i + columnList.get(j)][j] && columnList.get(j) != 0) \r\n dp[i + columnList.get(j)][j] = dp[i][j] + 1; \r\n } \r\n } \r\n \r\n if (dp[m - 1][n - 1] != Integer.MAX_VALUE) \r\n return dp[m - 1][n - 1]; \r\n \r\n return -1; \r\n }", "public abstract int numColumns();", "public abstract int getNumColumns();", "static Matrix vectorize(Matrix input) {\n int m = input.getRowDimension();\n int n = input.getColumnDimension();\n\n Matrix result = new Matrix(m * n, 1);\n for (int p = 0; p < n; p++) {\n for (int q = 0; q < m; q++) {\n result.set(p * m + q, 0, input.get(q, p));\n }\n }\n return result;\n }", "static void TwoDimTrav(int[][] arr, int row, int col){\n\n int[] dr = new int[]{ -1, 1, 0, 0};\n int[] dc = new int[]{ 0, 0, 1, -1};\n\n for(int i = 0; i < 4; i++){\n int newRow = row + dr[i];\n int newCol = col + dc[i];\n\n if(newRow < 0 || newCol < 0 || newRow >= arr.length || newCol >= arr[0].length)\n continue;\n\n // do your code here\n\n }\n\n // All Directions\n // North, South, East, West, NW NE SW SE\n // dr = [ -1, 1, 0, 0 -1, -1, 1, 1 ]\n // dc = [ 0, 0, 1, -1 -1, 1, 1, -1 ]\n\n// int[] dr = new int[]{ -1, 1, 0, 0, -1, -1, 1, 1};\n// int[] dc = new int[]{ 0, 0, 1, -1, -1, 1, -1, 1};\n//\n// for(int i = 0; i < 8; i++){\n// int newRow = row + dr[i];\n// int newCol = col + dc[i];\n//\n// if(newRow < 0 || newCol < 0 || newRow >= arr.length || newCol >= arr[0].length)\n// continue;\n//\n// // do your code here\n//\n// }\n }", "private static void demoMultiDArrays() {\r\n\t\tint[][] nums = new int[3][5];\r\n\t\tnums[0][2] = 10;\r\n//\t\tcompact, hard to read version: **note: slower. its worse in every way.**\r\n//\t\tnums[nums.length-1][nums[nums.length-1].length-1] = 14;\r\n\t\tint lastRow = nums.length-1;\r\n\t\tint lastCol = nums[lastRow].length-1;\r\n\t\tnums[lastRow][lastCol] = 14;\r\n//\t\tcompact, hard to read version: **note: slower. its worse in every way.**\r\n//\t\tnums[0][0] = nums[0][2] + nums[nums.length-1][nums[nums.length-1].length-1];\r\n\t\tnums[0][0] = nums[0][2]+nums[lastRow][lastCol];\r\n\t\t\r\n\t\t//return length of the cols in nums\r\n\t\t//return the length of the rows in nums\r\n\t\tfor (int[] rowData : nums) {\r\n\t\t\tSystem.out.print(\"[\");\r\n\t\t\tfor (int colData : rowData) {\r\n\t\t\t\tSystem.out.print(colData);\r\n\t\t\t\tSystem.out.print(\",\\t\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"], \");\r\n\t\t}\r\n\t\t\r\n\t}", "public int fillingOfMatrix(){\n int count=0;\n for (int i=0;i<m;i++)\n count+=matrix[i].size();\n return count;\n }", "void incrementColumnIndex(int size);", "void incrementColumnIndex(int size);", "public List<List<GenPolynomial<C>>> \n normalizeMatrix(int flen, List<List<GenPolynomial<C>>> M) { \n if ( M == null ) {\n return M;\n }\n if ( M.size() == 0 ) {\n return M;\n }\n List<List<GenPolynomial<C>>> N = new ArrayList<List<GenPolynomial<C>>>();\n List<List<GenPolynomial<C>>> K = new ArrayList<List<GenPolynomial<C>>>();\n int len = M.get( M.size()-1 ).size(); // longest row\n // pad / extend rows\n for ( List<GenPolynomial<C>> row : M ) {\n List<GenPolynomial<C>> nrow = new ArrayList<GenPolynomial<C>>( row );\n for ( int i = row.size(); i < len; i++ ) {\n nrow.add( null );\n }\n N.add( nrow );\n }\n // System.out.println(\"norm N fill = \" + N);\n // make zero columns\n int k = flen;\n for ( int i = 0; i < N.size(); i++ ) { // 0\n List<GenPolynomial<C>> row = N.get( i );\n if ( debug ) {\n logger.info(\"row = \" + row);\n }\n K.add( row );\n if ( i < flen ) { // skip identity part\n continue;\n }\n List<GenPolynomial<C>> xrow;\n GenPolynomial<C> a;\n //System.out.println(\"norm i = \" + i);\n for ( int j = i+1; j < N.size(); j++ ) {\n List<GenPolynomial<C>> nrow = N.get( j );\n //System.out.println(\"nrow j = \" +j + \", \" + nrow);\n if ( k < nrow.size() ) { // always true\n a = nrow.get( k );\n //System.out.println(\"k, a = \" + k + \", \" + a);\n if ( a != null && !a.isZERO() ) {\n xrow = blas.scalarProduct( a, row);\n xrow = blas.vectorAdd(xrow,nrow);\n //System.out.println(\"xrow = \" + xrow);\n N.set( j, xrow );\n }\n }\n }\n k++;\n }\n //System.out.println(\"norm K reduc = \" + K);\n // truncate \n N.clear();\n for ( List<GenPolynomial<C>> row: K ) {\n List<GenPolynomial<C>> tr = new ArrayList<GenPolynomial<C>>();\n for ( int i = 0; i < flen; i++ ) {\n tr.add( row.get(i) );\n }\n N.add( tr );\n }\n K = N;\n //System.out.println(\"norm K trunc = \" + K);\n return K;\n }", "Boolean isValid(ArrayList<Integer> colQ){\n \n int curcol = colQ.size() - 1;\n int row = colQ.get(colQ.size() - 1);\n\n int i = 0;\n int j = 0;\n for(i = curcol-1, j = 1; i >= 0; i--, j++)\n {\n // check if we have two of the same row || check diags\n if(row == colQ.get(i) || row+j == colQ.get(i) || row-j == colQ.get(i)) return false;\n }\n return true;\n \n }", "public abstract int getNumberOfColumnsInCurrentRow();", "public static boolean isValid(char[][] matrix, int[][] rows, int[][] columns) {\n int N = matrix.length;\n int M = matrix[0].length;\n\n for (int i = 0; i < N; i++) {\n List<Integer> counts = new ArrayList<>();\n int currCount = 0;\n for (int j = 0; j < M; j++) {\n char c = matrix[i][j];\n if (c == 'B') {\n currCount++;\n } else {\n if (currCount > 0) {\n counts.add(currCount);\n currCount = 0;\n }\n }\n }\n if (currCount > 0) {\n counts.add(currCount);\n }\n if (counts.size() != rows[i].length) {\n return false;\n }\n for (int pos = 0; pos < counts.size(); pos++) {\n if (counts.get(pos) != rows[i][pos]) {\n return false;\n }\n }\n }\n\n for (int j = 0; j < M; j++) {\n List<Integer> counts = new ArrayList<>();\n int currCount = 0;\n for (int i = 0; i < N; i++) {\n char c = matrix[i][j];\n if (c == 'B') {\n currCount++;\n } else {\n if (currCount > 0) {\n counts.add(currCount);\n currCount = 0;\n }\n }\n }\n if (currCount > 0) {\n counts.add(currCount);\n }\n if (counts.size() != columns[j].length) {\n return false;\n }\n for (int pos = 0; pos < counts.size(); pos++) {\n if (counts.get(pos) != columns[j][pos]) {\n return false;\n }\n }\n }\n\n return true;\n }", "Matrix add(Matrix M) {\n if(getSize() != M.getSize()) {\n throw new RuntimeException(\"Matrix Error: Matrices not same size\");\n }\n if (M.equals(this)) return M.scalarMult(2);\n int c = 0, e2 = 0;\n double v1 = 0, v2 = 0;\n List temp1, temp2;\n Matrix addM = new Matrix(getSize());\n for(int i = 1; i <= rows.length; i++) {\n temp1 = M.rows[i-1];\n temp2 = this.rows[i-1];\n if(temp1.isEmpty() && !temp2.isEmpty()) {\n temp2.moveFront();\n while(temp2.index() != -1) {\n addM.changeEntry(i, ((Entry)temp2.get()).column, ((Entry)temp2.get()).value);\n temp2.moveNext();\n }\n }else if(!temp1.isEmpty() && temp2.isEmpty()) {\n temp1.moveFront();\n while(temp1.index() != -1) {\n addM.changeEntry(i, ((Entry)temp1.get()).column, ((Entry)temp1.get()).value);\n temp1.moveNext();\n }\n }else if(!temp1.isEmpty() && !temp2.isEmpty()) {\n temp2.moveFront();\n temp1.moveFront();\n while(temp1.index() != -1 && temp2.index() != -1) {\n if(((Entry)temp1.get()).column == ((Entry)temp2.get()).column) {\n v1 = ((Entry)temp1.get()).value;\n v2 = ((Entry)temp2.get()).value;\n c = ((Entry)temp2.get()).column;\n addM.changeEntry(i, c, (v1+v2));\n temp1.moveNext();\n if(!this.equals(M))\n temp2.moveNext();\n ///if temp1 < temp2\n //this < M\n }else if(((Entry)temp1.get()).column < ((Entry)temp2.get()).column) {\n v1 = ((Entry)temp1.get()).value;\n c = ((Entry)temp1.get()).column;\n addM.changeEntry(i, c, v1);\n temp1.moveNext();\n //if temp1>temp2\n }else if(((Entry)temp1.get()).column > ((Entry)temp2.get()).column) {\n v2 = ((Entry)temp2.get()).value;\n c = ((Entry)temp2.get()).column;\n addM.changeEntry(i, c, v2);\n temp2.moveNext();\n }\n }\n while(temp1.index() != -1) {\n addM.changeEntry( i, ((Entry)temp1.get()).column, ((Entry)temp1.get()).value);\n temp1.moveNext();\n }\n while(temp2.index() != -1) {\n addM.changeEntry(i, ((Entry)temp2.get()).column, ((Entry)temp2.get()).value);\n temp2.moveNext();\n }\n }\n }\n return addM;\n }", "private int computeKey(int row, int column) {\n return row * columnDimension + column;\n }", "int getColumns();", "int getColumns();", "boolean UsedInCol(int grid[][], int col, int num)\n{\n for (int row = 0; row < N; row++)\n if (grid[row][col] == num)\n return true;\n return false;\n}", "public int getCols();", "static void nextIteration(int matrix[][], int NUMBER_OF_ROWS, int NUMBER_OF_COLUMNS) {\n\t\t// variable to hold the matrix of original size of the matrix\n\t\tint[][] nextMatrixCycle = new int[NUMBER_OF_ROWS][NUMBER_OF_COLUMNS];\n\n\t\t/**\n\t\t * Looping through each row cell of the matrix Starting from 1 as matrix[1][1]\n\t\t * is first cell with neighbours (in first row) Going only till rows-1 as last\n\t\t * cell with neighbours is matrix[#row-1][#col-1]\n\t\t */\n\t\tfor (int rowCellCounter = 1; rowCellCounter < NUMBER_OF_ROWS - 1; rowCellCounter++) {\n\t\t\t/**\n\t\t\t * Loop to iterate through each column till all columns have been visited\n\t\t\t * Starting from 1 as matrix[1][1] is first cell with neighbours (in first\n\t\t\t * column) Going only till rows-1 as last cell with neighbours is\n\t\t\t * matrix[#row-1][#col-1]\n\t\t\t */\n\t\t\tfor (int colVisitCounter = 1; colVisitCounter < NUMBER_OF_COLUMNS - 1; colVisitCounter++) {\n\t\t\t\t// Variable to store the number of live Neighbouring cells\n\t\t\t\tint liveNeighbourCells = 0;\n\t\t\t\t/**\n\t\t\t\t * Loop to get column neighbour cell values\n\t\t\t\t * Going only from -1 to 1 (0 to 2) as neighbours exists between 0 and 2 only\n\t\t\t\t */\n\t\t\t\tfor (int row = -1; row <= 1; row++)\n\t\t\t\t\t/**\n\t\t\t\t\t * Loop to get row neighbour cell values\n\t\t\t\t\t * Going only from -1 to 1 (0 to 2) as neighbours exists between 0 and 2 only\n\t\t\t\t\t */\n\t\t\t\t\tfor (int col = -1; col <= 1; col++)\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Add the matrix[x][y] cell value to live neighbour cell count\n\t\t\t\t\t\t * where x = rowCellCounter + i, and y = colVisitCounter + j\n\t\t\t\t\t\t * [x][y] ranges from [0][0] to [2][2], that is all neighbours\n\t\t\t\t\t\t * Including the current cell as well\n\t\t\t\t\t\t */\n\t\t\t\t\t\tliveNeighbourCells = liveNeighbourCells + matrix[rowCellCounter + row][colVisitCounter + col];\n\n\t\t\t\t// The current cell needs to be subtracted as it has been counted before already\n\t\t\t\tliveNeighbourCells = liveNeighbourCells - matrix[rowCellCounter][colVisitCounter];\n\n\t\t\t\t/**\n\t\t\t\t * The live cell dies if either The number of neighbouring cells is less than 2\n\t\t\t\t * for a live cell The number of neighbouring cells is more than 3 for a live\n\t\t\t\t * cell\n\t\t\t\t */\n\t\t\t\tif ((matrix[rowCellCounter][colVisitCounter] == 1)\n\t\t\t\t\t\t&& ((liveNeighbourCells < 2) || (liveNeighbourCells > 3))) {\n\t\t\t\t\tnextMatrixCycle[rowCellCounter][colVisitCounter] = 0;\n\t\t\t\t}\n\t\t\t\t// Dead cell becomes a live cell iff there are exactly 3 neighbouring cells\n\t\t\t\t// around it\n\t\t\t\telse if ((matrix[rowCellCounter][colVisitCounter] == 0) && (liveNeighbourCells == 3)) {\n\t\t\t\t\tnextMatrixCycle[rowCellCounter][colVisitCounter] = 1;\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t * For any other condition, state of the cell does not change at all, and Just\n\t\t\t\t * take the value from the original matrix and copy it as is\n\t\t\t\t */\n\t\t\t\telse {\n\t\t\t\t\tnextMatrixCycle[rowCellCounter][colVisitCounter] = matrix[rowCellCounter][colVisitCounter];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Print the matrix\n\t\tprintMatrix(nextMatrixCycle, NUMBER_OF_ROWS, NUMBER_OF_COLUMNS);\n\t}", "void ompleBloc(int row, int col) {\r\n int num;\r\n for (int i = 0; i < SRN; i++) {\r\n for (int j = 0; j < SRN; j++) {\r\n do {\r\n num = generadorAleatoris(N);\r\n } while (!comprovaNumerosQuadrant(row, col, num));\r\n\r\n mat[row + i][col + j] = num;\r\n }\r\n }\r\n }", "private static boolean isItSafe(boolean matrix[][] , int row , int col) {\t\n\t\tfor(int i = row ; i >= 0 ; i-- )\n\t\t{\n\t\t\tif(matrix[i][col] == true)\n\t\t\t\treturn false;\n\t\t}\n\t/*for loop to check LD*/\n\t\tfor(int i = row,j = col ; i>=0 && j>=0 ; i-- , j-- ) {\n\t\t\tif(matrix[i][j] == true)\n\t\t\t\treturn false;\n\t\t}\n\t/*for loop to check RD*/\n\t\tfor(int i= row , j = col ; i>=0 && j< matrix[0].length ; i--,j++) {\n\t\t\tif(matrix[i][j] == true)\n\t\t\t\treturn false;\n\t\t}\n\treturn true;\n\t}", "private int matrixRowToGridCol(int i) \n {\n return (i % dimSquared) / gDim + 1;\n }", "public static void main(String[] args)\n throws IOException {\n\n\n\n for (int[] row : getMatrix(getLines(FILENAME), \"\\\\s+\")) {\n\n\n\n String grid = Arrays.toString(row);\n\n System.out.println(grid);\n\n int product = 0;\n int largest = 0;\n\n // check right\n for (int i = 0; i < 20; i++) {\n for (int j = 0; j < 17; j++) {\n// product = grid[i][j] * grid[i][j + 1] * grid[i][j + 2] * grid[i][j + 3];\n if (product > largest) {\n largest = product;\n }\n }\n }\n\n // check down\n for (int i = 0; i < 17; i++) {\n for (int j = 0; j < 20; j++) {\n// product = grid[i][j] * grid[i + 1][j] * grid[i + 2][j] * grid[i + 3][j];\n if (product > largest) {\n largest = product;\n }\n }\n }\n\n // check diagonal right down\n for (int i = 0; i < 17; i++) {\n for (int j = 0; j < 17; j++) {\n// product = grid[i][j] * grid[i + 1][j + 1] * grid[i + 2][j + 2] * grid[i + 3][j + 3];\n if (product > largest) {\n largest = product;\n }\n }\n }\n\n // check diagonal right up\n for (int i = 0; i < 20; i++) {\n for (int j = 0; j < 17; j++) {\n// product = grid[i][j] * grid[i + 1][j - 1] * grid[i+ 2][j - 1] * grid[i + 3][j -3];\n if (product > largest) {\n largest = product;\n }\n }\n }\n\n System.out.println(product);\n\n }\n }", "private static void rotateMatrix(int[][] matrix) {\n\n\t\t// Assume: the elements are integer, and are unique values so that the result\n\t\t// can be tested for correctness.\n\t\t// Question: are the dimensions square? i.e. row and column count are the same?\n\t\t// Assume Yes.\n\t\t// Question: Which direction should the array be rotated - Assume clockwise\n\n\t\t// Iterate from counter min to max - 1\n\t\t// Copy top row first cell into a temp variable.\n\t\t// Copy each corner into the next corner. Use temp variable to fill the last\n\t\t// corner\n\t\t// Decrement counter and perform for next set of cells\n\t\t// Repeat for inner layers.\n\n\t\t// Bounding Co-ordinates: matrix[min][min], matrix[min, max], matrix[max, max],\n\t\t// matrix[max, min]\n\t\t// Initially: min = 0, max = N-1 (i.e. 0 based array positions)\n\t\t// pos = min\n\t\t// While pos < max\n\t\t// temp = matrix[min][pos]\n\t\t// matrix[min][pos] = matrix[max - pos + min][min]\n\t\t// matrix[max - pos + min][min] = matrix[max][max - pos + min]\n\t\t// matrix[max][max - pos + min] = matrix[pos][max]\n\t\t// matrix[pos][max] = temp\n\t\t// Increment pos\n\t\t// Increment min and decrement max\n\t\t// Break when min >= max\n\t\t// For even N, the last grid will be a 2 X 2 matrix, for odd N, the last grid\n\t\t// will be a single cell\n\n\t\t// T.C. N/2 iterations of the while loop (for even N)\n\t\t// T.C. = (N - 1) + (N-3) + .. 1\n\t\t// [first calls executes 5 for loops, each N-1 times. last call executes 2*2\n\t\t// matrix. i.e. N-1 = 1]\n\t\t// = (N-1 + N-3 + .. + 1) = (N-1 + N-3 + ... + N-(N-1))\n\t\t// = (N*N/2 - (1 + 3 + .. + N-1))\n\t\t// Sum of n even no.s = n(n+1)\n\t\t// Sum of n odd no.s = N(N+1)/2 - n(n+1). Where N = Max of odd no. + 1\n\t\t// T.C. = (N*N/2 - (N(N+1)/2 - N/2 * (N/2 + 1)))\n\t\t// = ( N*N/2 - (N*N/2 + N/2 - N*N/4 - N/2)) = (N*N/4)\n\t\t// T.C = O(N*N), this is the best possible T.C as each element needs to be\n\t\t// visited once.\n\t\t// S.C. O(1)\n\n\t\tif (matrix == null || matrix.length == 0)\n\t\t\treturn;\n\n\t\tif (matrix.length != matrix[0].length)\n\t\t\tthrow new NotASquareMatrixException(\"Not a square matrix. Cannot be rotated in place.\");\n\n\t\tint min = 0;\n\t\tint max = matrix.length - 1;\n\t\tprint(matrix);\n\n\t\twhile (min < max) {\n\t\t\trotateCellsInALayer(matrix, min, max);\n\t\t\tprint(matrix);\n\t\t\tmin++;\n\t\t\tmax--;\n\t\t}\n\t}", "private static int findLargestRegion(String[] grid, int row, int col, int m , int n) {\n StringBuilder string = new StringBuilder(grid[row]);\n string.setCharAt(col, '*');\n grid[row] = string.toString(); // we alter the original matrix here\n\n if (row < 0 || row >= m || col < 0 || col >= n) {\n return 0;\n } else if (grid[row].charAt(col) == '*') {\n return 0;\n }\n\n\n int size = 1; // 1 accounts for our size\n\n /* Accounts recursively for neighbors sizes */\n for (int r = row - 1; r <= row + 1; r++) {\n for (int c = col - 1; c <= col + 1; c++) {\n size += findLargestRegion(grid, r, c, m, n);\n }\n }\n\n return size;\n }", "public static void main(String[] args) throws IOException {\n\t\tsb = new StringBuilder();\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st = new StringTokenizer(br.readLine());\n\t\tN = Integer.parseInt(st.nextToken());\n\t\tM = Integer.parseInt(st.nextToken());\n\n\t\tmapRow = new char[N + 1][M + 1];\n\t\tmapCol = new char[N + 1][M + 1];\n\t\tcount = 0;\n\t\t\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tchar[] c = br.readLine().toCharArray();\n\t\t\tfor (int j = 1; j <= M; j++) {\n\t\t\t\tmapRow[i][j] = c[j - 1];\n\t\t\t\tmapCol[i][j] = c[j - 1];\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (int i = 0; i <= N; i++) mapRow[i][0] = '#';\n\t\tfor (int i = 0; i <= M; i++) mapRow[0][i] = '#';\n\t\tfor (int i = 0; i <= N; i++) mapCol[i][0] = '#';\n\t\tfor (int i = 0; i <= M; i++) mapCol[0][i] = '#';\n\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tfor (int j = 1; j <= M; j++) {\n\t\t\t\t//Row검색에서 선택됬다면 Col검색할 필요 없음.\n\t\t\t\tif(!searchRow(i, j)) searchCol(i, j);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t\tSystem.out.println(sb.toString());\n\t}", "public static int[] findDiagonalOrder(int[][] matrix){\n if( matrix == null || matrix.length == 0)\n return new int[0];\n int i = 0;\n int j =0;\n int k = 0;\n int size = matrix.length * matrix[0].length;\n int[] result = new int[size];\n boolean moveUp =true;\n while(k< size){\n\n if(moveUp){\n for(;i >=0 && j<= matrix[0].length-1;i--, j++){\n result[k] = matrix[i][j];\n k++;\n }\n // while moving up there are two conditions\n// 1. only row moves beyod 0 th row and column is in range (check for both row and column)\n //2. both row and column moves out ( check for column only)\n //case 1\n if(i<0 && j <= matrix[0].length-1){\n i = 0; // reset row to 0 and move down\n moveUp = !moveUp;\n }\n //case 2\n if(j == matrix[0].length){\n i = i+2; // reset row\n j--; // reduce column and move down\n moveUp = !moveUp;\n }\n\n }\n else\n {\n // moving down increment row and decrement column\n for(;j>=0 && i <= matrix.length - 1; i++, j-- ){\n result[k] = matrix[i][j];\n k++;\n }\n // while moving down there are two cases\n // 1. column goes out but rows in order (we need to check both)\n // 2. both column and row goes out (we can only have row check)\n if(j < 0 && i<= matrix.length-1){\n j = 0;\n moveUp = !moveUp;\n }\n if( i == matrix.length){\n j = j+2;\n i--;\n moveUp = !moveUp;\n }\n\n }\n\n\n }\n return result;\n }", "boolean comprovaColumna(int j, int num) {\r\n //System.out.println(\"comprovacolumna\"+j+\"Numero:\"+num);\r\n for (int i = 0; i < N; i++) {\r\n if (mat[i][j] == num) {\r\n \r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }", "int maxRowSize();", "public int getRowStride() {\n return numCols*2;\n }", "private static long[] sums(Mat m,boolean byRow) {\r\n\t\tint rows = m.rows();\r\n\t\tint cols = m.cols();\r\n\t\tbyte[] data = new byte[rows*cols];\r\n\t\tlong[] retSums = null;\r\n\t\t\r\n\t\tint status = m.get(0, 0,data);\r\n\t\t\r\n\t\tlong total = 0;\r\n\t\tfor (int k=0;k<data.length;k++) {\r\n\t\t\ttotal += Byte.toUnsignedInt(data[k]);\r\n\t\t}\r\n\t\tif (byRow) {\r\n\t\t\tretSums = new long[cols];\r\n\t\t\tfor (int col=0;col<cols;col++) {\r\n\t\t\t\tretSums[col] = 0;\r\n\t\t\t\tfor (int row=0;row<rows;row++) {\r\n\t\t\t\t\tint k = row*cols+col;\r\n\t\t\t\t\tretSums[col] += Byte.toUnsignedInt(data[k]);\r\n\t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\telse {\r\n \t\t\tretSums = new long[rows];\r\n \t\t\tfor (int row=0;row<rows;row++) {\r\n \t\t\t\tretSums[row] = 0;\r\n \t\t\t\tfor (int col=0;col<cols;col++) {\r\n \t\t\t\t\tint k = row*cols+col;\r\n \t\t\t\t\tretSums[row] += Byte.toUnsignedInt(data[k]);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n\t\t\r\n\t\tint total1 = 0;\r\n\t\tfor (int k=0; k < retSums.length; k++) {\r\n\t\t\ttotal1 += retSums[k];\r\n\t\t}\r\n\t\r\n\t\treturn retSums;\r\n\t}", "boolean UsedInRow(int grid[][], int row, int num)\n{\n for (int col = 0; col < N; col++)\n if (grid[row][col] == num)\n return true;\n return false;\n}", "private int getIndex(int row,int column,int maxColumn)\n {\n \tint rownumber = row*maxColumn+column;\n \treturn rownumber;\n }", "private boolean checkRange(int rowIndex, int columnIndex) {\n return rowIndex >= 0 && rowIndex < matrix.length\n && columnIndex >= 0 && columnIndex < matrix[rowIndex].length;\n\n }", "private boolean columnCheck() {\n\t\tfor(int col = 0; col < puzzle[0].length; col++) {\n\t\t\tfor(int i = 0; i < puzzle[0].length; i++) {\n\t\t\t\tif(puzzle[i][col] != 0) {\n\t\t\t\t\tfor(int j = i + 1; j < puzzle[0].length; j++) {\n\t\t\t\t\t\tif(puzzle[i][col] == puzzle[j][col])\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public static int calculateOpjectiveFunction(char[][] matrix ) {\n\n\n\n return (int)countNumberOfEmptyPosition(matrix)+countNmberOfCameras( matrix); \n\n}", "@Override\n public int getNumCols(){ return WIDTH; }", "public int getClumns() {\n return this.matrix[0].length;\n }", "protected int _columnRank(int rank) {\n\treturn columnZero + rank*columnStride;\n}", "public static void main(String[] args) {\n int[][] inp = new int[][] {\n {1,2,3},\n {5,6,7},\n {9,10,11}};\n \n int temp;\n \n\t for(int i = inp.length-1,j=0; i>=0 ; i--,j=0)\n {\n System.out.print(inp[i][j] + \" \");\n\t\t \n temp = i; // store old row where we started \n \n\t\t while(i+1 < inp.length && j+1 < inp[0].length)\n {\n System.out.print(inp[i+1][j+1] + \" \"); // keep print right diagonal\n i++;j++;\n }\n \n\t\t i = temp; // restore old row\n \n\t\t System.out.println();\n\t\t \n\t\t // special case - when we switch from processing row to processing column\n if(i == 0)\n {\n\t\t\t // now, column will go from 1 to inp[0].length-1\n\t\t\t \n for (int k = 1; k < inp[0].length; k++) {\n\n\t\t\t\t temp = k; // save old column\n \n\t\t\t\t System.out.print(inp[i][k] + \" \");\n\t\t\t\t \n\t\t\t\t // keep getting right diagonal\n while (i + 1 < inp.length && k + 1 < inp[0].length) {\n System.out.print(inp[i + 1][k + 1] + \" \");\n i++;\n k++;\n }\n \n\t\t\t\t k = temp;\n \n\t\t\t\t i = 0;\n \n\t\t\t\t System.out.println();\n\n }\n }\n }\n \n }", "private int colPos(int pos) {\r\n return pos % squareDimension;\r\n }", "public abstract int rows();", "private boolean isSafe(int row, int column) \r\n\t{\r\n\t\tfor(int i=0;i<row;i++)\r\n\t\t{\r\n\t\t\tif(x[i] == column) // Same Column\r\n\t\t\t\treturn false;\r\n\t\t\t\r\n\t\t\tif(i-row == x[i] -column || i-row == column-x[i]) // Same Diagonal\r\n\t\t\t\treturn false;\r\n\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\treturn true;\r\n\t}", "private static int findCollision(int[][] matrix, int n) {\n int count = 0;\n for (int i = 0; i <= n - 1; i++) {\n for (int j = 0; j <= n - 1; j++) {\n if (matrix[i][j] == 1) {\n // left row\n for (int k = j - 1; k >= 0; k--) {\n if (matrix[i][k] == 2) {\n break;\n }\n if (matrix[i][k] == 1) {\n count++;\n }\n }\n // right row\n for (int k = j + 1; k <= n - 1; k++) {\n if (matrix[i][k] == 2) {\n break;\n }\n if (matrix[i][k] == 1) {\n count++;\n }\n }\n // up col\n for (int k = i - 1; k >= 0; k--) {\n if (matrix[k][j] == 2) {\n break;\n }\n if (matrix[k][j] == 1) {\n count++;\n }\n }\n // down col\n for (int k = i + 1; k <= n - 1; k++) {\n if (matrix[k][j] == 2) {\n break;\n }\n if (matrix[k][j] == 1) {\n count++;\n }\n }\n // up left\n for (int k = i - 1, l = j - 1; k >= 0 && l >= 0; k--, l--) {\n if (matrix[k][l] == 2) {\n break;\n }\n if (matrix[k][l] == 1) {\n count++;\n }\n }\n // down left\n for (int k = i + 1, l = j - 1; k <= n - 1 && l >= 0; k++, l--) {\n if (matrix[k][l] == 2) {\n break;\n }\n if (matrix[k][l] == 1) {\n count++;\n }\n }\n // up right\n for (int k = i - 1, l = j + 1; k >= 0 && l <= n - 1; k--, l++) {\n if (matrix[k][l] == 2) {\n break;\n }\n if (matrix[k][l] == 1) {\n count++;\n }\n }\n // down right\n for (int k = i + 1, l = j + 1; k <= n - 1 && l <= n - 1; k++, l++) {\n if (matrix[k][l] == 2) {\n break;\n }\n if (matrix[k][l] == 1) {\n count++;\n }\n }\n }\n }\n }\n return count / 2;\n }", "private static int[][] removeCollinear(int[][] pointSet)\n {\n int numCollinear = 0;\n for (int i = 1; i<= pointSet[0].length-2; i++)\n {\n if (((pointSet[0][i]-pointSet[0][0])*(pointSet[1][i+1]-pointSet[1][0]))-\n ((pointSet[0][i+1]-pointSet[0][0])*(pointSet[1][i]-pointSet[1][0])) == 0)\n numCollinear++;\n }\n if (numCollinear == 0)\n return pointSet;\n\n int[][] pointSetTemp = new int[2][pointSet[0].length-numCollinear];\n pointSetTemp[0][0] = pointSet[0][0]; pointSetTemp[1][0] = pointSet[1][0];\n int j=1;\n for (int i = 1; i<= pointSet[0].length-2; i++)\n {\n if (((pointSet[0][i]-pointSet[0][0])*(pointSet[1][i+1]-pointSet[1][0]))-\n ((pointSet[0][i+1]-pointSet[0][0])*(pointSet[1][i]-pointSet[1][0])) == 0)\n {\n int d1 = Math.abs((pointSet[0][i]-pointSet[0][0])^2 + (pointSet[1][i]-pointSet[1][0])^2);\n int d2 = Math.abs((pointSet[0][i+1]-pointSet[0][0])^2 + (pointSet[1][i+1]-pointSet[1][0])^2);\n if (d1 > d2)\n {\n pointSetTemp[0][j] = pointSet[0][i]; pointSetTemp[1][j] = pointSet[1][i];\n i++; j++;\n }\n else\n {\n pointSetTemp[0][j] = pointSet[0][i+1]; pointSetTemp[1][j] = pointSet[1][i+1];\n i++; j++;\n }\n }\n else\n {\n pointSetTemp[0][j] = pointSet[0][i]; pointSetTemp[1][j] = pointSet[1][i];\n j++;\n }\n }\n if (j < pointSetTemp[0].length)\n {\n pointSetTemp[0][j] = pointSet[0][pointSet[0].length-1];\n pointSetTemp[1][j] = pointSet[1][pointSet[0].length-1];\n }\n return pointSetTemp;\n }", "public List<int[][]> evaluate(IBoard board){\n\n int area = board.getHeight() * board.getWidth();\n\n int[][] newArray = new int[area][2];\n\n int k = 0;\n\n while (k < newArray.length) {\n for (int i = 0; i < board.getHeight(); i++) {\n for (int j = 0; j < board.getWidth(); j++) {\n newArray[k][0] = i;\n newArray[k][1] = j;\n k++;\n }\n }\n }\n\n List<int[][]> Allmoves = new ArrayList<>();\n\n int res = newArray.length / board.getHeight();\n\n /*For rows*/\n int q = 0;\n int w = res;\n\n for (int i = 0; i < res; i++) {\n int[][] arr = new int[res][2];\n\n int e = 0;\n\n for (int j = q; j < w; j++) {\n arr[e][0] = newArray[j][0];\n arr[e][1] = newArray[j][1];\n e++;\n }\n\n w += res;\n q += res;\n\n Allmoves.add(arr);\n\n }\n\n /*For columns*/\n int r = 0;\n for (int i = 0; i < res; i++) {\n\n int[][] arr = new int[res][2];\n int e = 0;\n\n for (int j = 0; j < res; j++) {\n arr[e][0] = newArray[r][0];\n arr[e][1] = newArray[r][1];\n\n r += res;\n e++;\n }\n r = 0;\n r += i + 1;\n\n Allmoves.add(arr);\n }\n\n /*For diagonal - 1*/\n int[][] arr = new int[res][2];\n int d1 = res + 1;\n int d = 0;\n int e = 0;\n for (int i = 0; i < res; i++) {\n arr[e][0] = newArray[d][0];\n arr[e][1] = newArray[d][1];\n d += d1;\n e++;\n }\n\n Allmoves.add(arr);\n\n int[][] arr1 = new int[res][2];\n int d2 = res - 1;\n int D = res - 1;\n int p = 0;\n for (int i = 0; i < res; i++) {\n arr1[p][0] = newArray[D][0];\n arr1[p][1] = newArray[D][1];\n D += d2;\n p++;\n }\n\n Allmoves.add(arr1);\n\n return Allmoves;\n\n }", "private int adequateDimensions(int cols, int rows) {\r\n\r\n if ((cols >= MINALG) && (cols <= MAXALG)) {\r\n if ((rows >= MINDATA) && (rows <= MAXDATA)) {\r\n return 0;\r\n } else {\r\n return 1;\r\n }\r\n } else {\r\n return 2;\r\n }\r\n\r\n }", "public boolean isFull(int row, int col) {\n if (0 > row && row > size && 0 > col && col > size) {\n throw new IndexOutOfBoundsException();\n }\n int index = returnIndex(row, col);\n return weightedQuickUnionUF.connected(top, index);\n }", "boolean unUsedInCol(int j,int num)\n {\n for (int i = 0; i < N; i++)\n if (mat[i][j] == num)\n return false;\n return true;\n }", "private void findLargestCells(int r22) {\n /*\n r21 = this;\n r7 = 1;\n r5 = r21.getChildCount();\n r8 = 0;\n L_0x0006:\n if (r8 >= r5) goto L_0x00d5;\n L_0x0008:\n r0 = r21;\n r4 = r0.getChildAt(r8);\n r17 = r4.getVisibility();\n r18 = 8;\n r0 = r17;\n r1 = r18;\n if (r0 != r1) goto L_0x001d;\n L_0x001a:\n r8 = r8 + 1;\n goto L_0x0006;\n L_0x001d:\n r0 = r4 instanceof android.widget.TableRow;\n r17 = r0;\n if (r17 == 0) goto L_0x001a;\n L_0x0023:\n r15 = r4;\n r15 = (android.widget.TableRow) r15;\n r10 = r15.getLayoutParams();\n r17 = -2;\n r0 = r17;\n r10.height = r0;\n r0 = r22;\n r16 = r15.getColumnsWidths(r0);\n r0 = r16;\n r13 = r0.length;\n if (r7 == 0) goto L_0x0073;\n L_0x003b:\n r0 = r21;\n r0 = r0.mMaxWidths;\n r17 = r0;\n if (r17 == 0) goto L_0x0052;\n L_0x0043:\n r0 = r21;\n r0 = r0.mMaxWidths;\n r17 = r0;\n r0 = r17;\n r0 = r0.length;\n r17 = r0;\n r0 = r17;\n if (r0 == r13) goto L_0x005c;\n L_0x0052:\n r0 = new int[r13];\n r17 = r0;\n r0 = r17;\n r1 = r21;\n r1.mMaxWidths = r0;\n L_0x005c:\n r17 = 0;\n r0 = r21;\n r0 = r0.mMaxWidths;\n r18 = r0;\n r19 = 0;\n r0 = r16;\n r1 = r17;\n r2 = r18;\n r3 = r19;\n java.lang.System.arraycopy(r0, r1, r2, r3, r13);\n r7 = 0;\n goto L_0x001a;\n L_0x0073:\n r0 = r21;\n r0 = r0.mMaxWidths;\n r17 = r0;\n r0 = r17;\n r11 = r0.length;\n r6 = r13 - r11;\n if (r6 <= 0) goto L_0x00bd;\n L_0x0080:\n r0 = r21;\n r14 = r0.mMaxWidths;\n r0 = new int[r13];\n r17 = r0;\n r0 = r17;\n r1 = r21;\n r1.mMaxWidths = r0;\n r17 = 0;\n r0 = r21;\n r0 = r0.mMaxWidths;\n r18 = r0;\n r19 = 0;\n r0 = r14.length;\n r20 = r0;\n r0 = r17;\n r1 = r18;\n r2 = r19;\n r3 = r20;\n java.lang.System.arraycopy(r14, r0, r1, r2, r3);\n r0 = r14.length;\n r17 = r0;\n r0 = r21;\n r0 = r0.mMaxWidths;\n r18 = r0;\n r0 = r14.length;\n r19 = r0;\n r0 = r16;\n r1 = r17;\n r2 = r18;\n r3 = r19;\n java.lang.System.arraycopy(r0, r1, r2, r3, r6);\n L_0x00bd:\n r0 = r21;\n r12 = r0.mMaxWidths;\n r11 = java.lang.Math.min(r11, r13);\n r9 = 0;\n L_0x00c6:\n if (r9 >= r11) goto L_0x001a;\n L_0x00c8:\n r17 = r12[r9];\n r18 = r16[r9];\n r17 = java.lang.Math.max(r17, r18);\n r12[r9] = r17;\n r9 = r9 + 1;\n goto L_0x00c6;\n L_0x00d5:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.widget.TableLayout.findLargestCells(int):void\");\n }", "void colFull(int col);", "public void update() {\n // If no previous columns, use new columns and return\n if(this.columns == null || this.columns.size() == 0) {\n if(this.newColumns.size() > 0){\n finish(newColumns);\n }\n return;\n }\n \n // If no new columns, retain previous columns and return\n if(this.newColumns.size() == 0) {\n this.index = 0;\n this.column = this.columns.get(index);\n return;\n }\n \n // Merge previous columns with new columns\n // There will be no overlapping\n List<ColumnCount> mergeColumns = new ArrayList<ColumnCount>(\n columns.size() + newColumns.size());\n index = 0;\n newIndex = 0;\n column = columns.get(0);\n newColumn = newColumns.get(0);\n while(true) {\n int ret = Bytes.compareTo(\n column.getBuffer(), column.getOffset(),column.getLength(), \n newColumn.getBuffer(), newColumn.getOffset(), newColumn.getLength());\n \n // Existing is smaller than new, add existing and iterate it\n if(ret <= -1) {\n mergeColumns.add(column);\n if(++index == columns.size()) {\n // No more existing left, merge down rest of new and return \n mergeDown(mergeColumns, newColumns, newIndex);\n finish(mergeColumns);\n return;\n }\n column = columns.get(index);\n continue;\n }\n \n // New is smaller than existing, add new and iterate it\n mergeColumns.add(newColumn);\n if(++newIndex == newColumns.size()) {\n // No more new left, merge down rest of existing and return\n mergeDown(mergeColumns, columns, index);\n finish(mergeColumns);\n return;\n }\n newColumn = newColumns.get(newIndex);\n continue;\n }\n }", "int getColumnCount();", "int getColumnCount();", "protected int sumAll() {\n\t\tint total = 0;\n\t\t//iterate all rows\n\t\tfor(int i = 0;i<size();i++){\n\t\t\t//itreate all columns\n\t\t\tfor(int j = 0;j<size();j++){\n\t\t\t\tInteger cell = matrix.get(i).get(j);\n\t\t\t\ttotal+=cell;\n\t\t\t}\n\t\t}\n\t\treturn total;\n\t}", "public static void SumRowsColumns(int[][] array) {\n\n }", "@Override\n public Matrix idct(final MatrixView in) {\n check(in);\n double[][] out = new double[in.getRows()][in.getColumns()];\n double tmp1, tmp2, tmp3, tmp4;\n double tmpm0 = 0, tmpm1 = 0, tmpm2 = 0, tmpm3 = 0, tmpm4 = 0, tmpm5 = 0, tmpm6 = 0, tmpm7 = 0;\n double tmpm20, tmpm21, tmpm22, tmpm23, tmpm24, tmpm25, tmpm26, tmpm27 = 0;\n double[] outtmpmyi = null;\n\n for (int my = 0; my < in.getRows(); my += SIZE) {\n for (int mx = 0; mx < in.getColumns(); mx += SIZE) {\n for (int i = 0; i < 8; i++) {\n outtmpmyi = out[my + i];\n\n tmpm0 = in.getDouble(my + i, mx + 0);\n tmpm1 = in.getDouble(my + i, mx + 1);\n tmpm2 = in.getDouble(my + i, mx + 2);\n tmpm3 = in.getDouble(my + i, mx + 3);\n tmpm4 = in.getDouble(my + i, mx + 4);\n tmpm5 = in.getDouble(my + i, mx + 5);\n tmpm6 = in.getDouble(my + i, mx + 6);\n tmpm7 = in.getDouble(my + i, mx + 7);\n\n tmp1 = (tmpm1 * Z7) - (tmpm7 * Z1);\n tmp4 = (tmpm7 * Z7) + (tmpm1 * Z1);\n tmp2 = (tmpm5 * Z3) - (tmpm3 * Z5);\n tmp3 = (tmpm3 * Z3) + (tmpm5 * Z5);\n\n tmpm20 = (tmpm0 + tmpm4) * Z4;\n tmpm21 = (tmpm0 - tmpm4) * Z4;\n tmpm22 = (tmpm2 * Z6) - (tmpm6 * Z2);\n tmpm23 = (tmpm6 * Z6) + (tmpm2 * Z2);\n tmpm4 = tmp1 + tmp2;\n tmpm25 = tmp1 - tmp2;\n tmpm26 = tmp4 - tmp3;\n tmpm7 = tmp4 + tmp3;\n\n tmpm5 = (tmpm26 - tmpm25) * Z0;\n tmpm6 = (tmpm26 + tmpm25) * Z0;\n tmpm0 = tmpm20 + tmpm23;\n tmpm1 = tmpm21 + tmpm22;\n tmpm2 = tmpm21 - tmpm22;\n tmpm3 = tmpm20 - tmpm23;\n\n outtmpmyi[mx + 0] = tmpm0 + tmpm7;\n outtmpmyi[mx + 7] = tmpm0 - tmpm7;\n outtmpmyi[mx + 1] = tmpm1 + tmpm6;\n outtmpmyi[mx + 6] = tmpm1 - tmpm6;\n outtmpmyi[mx + 2] = tmpm2 + tmpm5;\n outtmpmyi[mx + 5] = tmpm2 - tmpm5;\n outtmpmyi[mx + 3] = tmpm3 + tmpm4;\n outtmpmyi[mx + 4] = tmpm3 - tmpm4;\n\n }\n\n for (int i = 0; i < 8; i++) {\n\n tmpm0 = out[my + 0][mx + i];\n tmpm1 = out[my + 1][mx + i];\n tmpm2 = out[my + 2][mx + i];\n tmpm3 = out[my + 3][mx + i];\n tmpm4 = out[my + 4][mx + i];\n tmpm5 = out[my + 5][mx + i];\n tmpm6 = out[my + 6][mx + i];\n tmpm7 = out[my + 7][mx + i];\n\n tmp1 = (tmpm1 * Z7) - (tmpm7 * Z1);\n tmp4 = (tmpm7 * Z7) + (tmpm1 * Z1);\n tmp2 = (tmpm5 * Z3) - (tmpm3 * Z5);\n tmp3 = (tmpm3 * Z3) + (tmpm5 * Z5);\n\n tmpm20 = (tmpm0 + tmpm4) * Z4;\n tmpm21 = (tmpm0 - tmpm4) * Z4;\n tmpm22 = (tmpm2 * Z6) - (tmpm6 * Z2);\n tmpm23 = (tmpm6 * Z6) + (tmpm2 * Z2);\n tmpm4 = tmp1 + tmp2;\n tmpm25 = tmp1 - tmp2;\n tmpm26 = tmp4 - tmp3;\n tmpm7 = tmp4 + tmp3;\n\n tmpm5 = (tmpm26 - tmpm25) * Z0;\n tmpm6 = (tmpm26 + tmpm25) * Z0;\n tmpm0 = tmpm20 + tmpm23;\n tmpm1 = tmpm21 + tmpm22;\n tmpm2 = tmpm21 - tmpm22;\n tmpm3 = tmpm20 - tmpm23;\n\n out[my + 0][mx + i] = tmpm0 + tmpm7;\n out[my + 7][mx + i] = tmpm0 - tmpm7;\n out[my + 1][mx + i] = tmpm1 + tmpm6;\n out[my + 6][mx + i] = tmpm1 - tmpm6;\n out[my + 2][mx + i] = tmpm2 + tmpm5;\n out[my + 5][mx + i] = tmpm2 - tmpm5;\n out[my + 3][mx + i] = tmpm3 + tmpm4;\n out[my + 4][mx + i] = tmpm3 - tmpm4;\n }\n }\n }\n\n return new DoubleMatrix(in.getRows(), in.getColumns(), out);\n }", "static int countCollinearFast(int[] a1, int[] a2, int[] a3)\n {\n //TODO: implement this method\n \tsort(a3);\n \tint count = 0;\n \tint search;\n \t\n \tfor (int i=0; i<a1.length; i++)\n \t\tfor (int j=0; j<a2.length; j++)\n \t\t{\n \t\t\tsearch = 2*a2[j] - a1[i];\n \t\t\tif (binarySearch(a3, search))\n \t\t\t\tcount++;\n \t\t}\n \t\n \treturn count;\n }", "private void fastXY(int x, int y){\n ccells.row5bitHash(x,y-2);\n ccells.row5bitHash(x,y-1);\n ccells.row5bitHash(x,y);\n ccells.row5bitHash(x,y+1);\n ccells.row5bitHash(x,y+2);\n // then use some binary math to manipulate this data into hashes for each cell\n // flatten the loop and copy paste yay :)\n // or I could also leave the loop alone and make it loop over array which would be a little more readable\n }", "@Override\n\tpublic List<Cell> calcNeighbors(int row, int col) {\n\t\tList<Cell> neighborLocs = new ArrayList<>();\n\t\tint shift_constant = 1 - 2*((row+col) % 2);\n\t\tif(!includesDiagonals) {\n\t\t\tfor(int a = col - 1; a <= col + 1; a++) {\n\t\t\t\tif(a == col)\n\t\t\t\t\taddLocation(row + shift_constant,a,neighborLocs);\n\t\t\t\telse \n\t\t\t\t\taddLocation(row,a,neighborLocs);\n\t\t\t}\n\t\t\treturn neighborLocs;\n\t\t}\n\t\tfor(int b = col - 2; b <= col + 2; b++) {\n\t\t\tfor(int a = row; a != row + 2*shift_constant; a += shift_constant) {\n\t\t\t\tif(a == row && b == col)\n\t\t\t\t\tcontinue;\n\t\t\t\taddLocation(a,b,neighborLocs);\n\t\t\t}\n\t\t}\n\t\tfor(int b = col -1; b <= col + 1; b++) {\n\t\t\taddLocation(row - shift_constant,b,neighborLocs);\n\t\t}\n\t\treturn neighborLocs;\n\t}", "private Boolean isValidColumnMatrix(SimpleMatrix matrix) {\n\t\tInteger nrows = matrix.numRows();\n\t\tInteger ncols = matrix.numCols();\n\n\t\treturn (ncols == 1) && (nrows == 3);\n\t}", "private int getNIdx() {\n return this.colStartOffset + 7;\n }", "public boolean searchMatrixMyOwn(int[][] matrix, int target) {\n int rows = matrix.length;\n if(rows == 0){\n return false;\n }\n int cols = matrix[0].length;\n if(cols == 0){\n return false;\n }\n\n int minRow=0, maxRow=rows-1;\n for(int i=0; i<rows; i++){\n if(matrix[i][cols-1] < target){\n minRow = i+1;\n }\n if(matrix[i][0] > target && i<maxRow){\n maxRow = i-1;\n }\n }\n\n int minCol = 0, maxCol = cols-1;\n for(int i=0; i<cols; i++){\n if(matrix[rows-1][i] < target){\n minCol = i+1;\n }\n if(matrix[0][i] > target && i<maxCol){\n maxCol = i-1;\n }\n }\n\n// System.out.println(\"minRow=\" + minRow + \", maxRow=\" + maxRow + \", minCol=\" + minCol + \", maxCol=\" + maxCol);\n\n if(maxCol - minCol > maxRow - minRow) {\n for (int i = minRow; i <= maxRow; i++) {\n int minC = minCol, maxC = maxCol;\n while (minC <= maxC) {\n if (minC == maxC) {\n if(matrix[i][minC] == target){\n return true;\n } else {\n break;\n }\n } else if (minC + 1 == maxC) {\n if (matrix[i][minC] == target || matrix[i][maxC] == target) {\n return true;\n } else {\n break;\n }\n }\n int midC = (minC + maxC) / 2;\n if (matrix[i][midC] > target) {\n maxC = midC;\n } else if (matrix[i][midC] < target) {\n minC = midC;\n } else if (matrix[i][midC] == target) {\n return true;\n }\n }\n }\n } else {\n for(int j = minCol; j<=maxCol; j++) {\n int minR = minRow, maxR = maxRow;\n while(minR <= maxR){\n if(minR == maxR){\n if(matrix[minR][j] == target){\n return true;\n }else {\n break;\n }\n } else if(minR +1 == maxR){\n if(matrix[minR][j] == target || matrix[maxR][j] == target){\n return true;\n }else {\n break;\n }\n }\n int midR = (minR + maxR) / 2;\n if(matrix[midR][j] > target){\n maxR = midR;\n } else if(matrix[midR][j] < target){\n minR = midR;\n } else if(matrix[midR][j] == target){\n return true;\n }\n }\n }\n }\n return false;\n }", "static int[][] getColumns(int[] array){\n int[][] rezultArray = new int[n][n];\n int index = 0;\n for (int i = 0; i < n; i++){\n for (int j = i; j < n * n; j += n){\n rezultArray[i][index++] = array[j];\n }\n index = 0;\n }\n return rezultArray;\n }", "public boolean isFull(int row, int col) {\n validate(row, col);\n int k = mapping(row, col);\n return uf.find(count * count) == uf.find(k);\n }", "private int[] columnSum(int[][] matrix) {\n int[] result = new int[matrix.length];\n for(int i = 0; i < matrix.length; i++) {\n result[i] = 0;\n for(int j = 0; j < matrix[i].length; j++) {\n result[i] += matrix[i][j];\n }\n }\n return result;\n }", "int colCount();", "public boolean verificaLinhaEColuna(int x, int y){\n for(int i = 0; i < 9; i++){\n if(matriz[x][y] == matriz[x][i] && y!=i){\n return false;\n }\n }\n\n for (int j = 0; j < 9; j++){\n if(matriz[x][y] == matriz[j][y] && x!=j){\n return false;\n }\n }\n\n return true;\n }", "public abstract boolean currentSizeVSCageSize(int row, int col);", "public int hamming() {\n int count = 0;\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N && i+j < 2*N-2; j++) {\n if (blocks[i][j] != i*N + j + 1) {\n count++;\n }\n }\n }\n return count;\n }", "private boolean columnOkay(int row, int column) throws Exception {\n ArrayList<Integer> clue = puzzle.getColumnClue(column);\n var filledGroups = searchBoard.getFilledGroups(column, TraversalType.COLUMN);\n if(filledGroups.size() > clue.size()) {\n return false;\n }\n int availableSquares = puzzle.getRows()-row-1;\n int tilesRequired;\n if(filledGroups.size() == 0) {\n tilesRequired = clue.size()-1;\n for(int s : clue) {\n tilesRequired += s;\n }\n } else {\n int index = filledGroups.size()-1;\n if(filledGroups.get(index) > clue.get(index)) {\n return false;\n }\n if(searchBoard.getState(row, column) == CellState.EMPTY && !filledGroups.get(index).equals(clue.get(index))) {\n return false;\n }\n tilesRequired = clue.get(index)-filledGroups.get(index);\n tilesRequired += clue.size()-filledGroups.size();\n if(searchBoard.getState(row, column) == CellState.EMPTY) {\n --tilesRequired;\n }\n for(int i = index+1; i < clue.size(); ++i) {\n tilesRequired += clue.get(i);\n }\n }\n return availableSquares >= tilesRequired;\n }", "private void updateCell(byte i, byte j) throws Exception {\n\t\tCell cell = cells[i][j];\n\t\tif (cell.isEmpty()) {\n\t\t\t// check row\n\t\t\tboolean[] inRow = new boolean[10];\n\t\t\tfor (byte n = 0; n < 9; n++) {\n\t\t\t\tif (n != j) {\n\t\t\t\t\tCell c = cells[i][n];\n\t\t\t\t\tif (!c.isEmpty()) {\n\t\t\t\t\t\tbyte v = c.getValue();\n\t\t\t\t\t\tif (inRow[v]) {\n\t\t\t\t\t\t\tthrow new Exception(\"Duplicates at row \" + (i + 1));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tinRow[v] = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// check column\n\t\t\tboolean[] inCol = new boolean[10];\n\t\t\tfor (byte m = 0; m < 9; m++) {\n\t\t\t\tif (m != i) {\n\t\t\t\t\tCell c = cells[m][j];\n\t\t\t\t\tif (!c.isEmpty()) {\n\t\t\t\t\t\tbyte v = c.getValue();\n\t\t\t\t\t\tif (inCol[v]) {\n\t\t\t\t\t\t\tthrow new Exception(\"Duplicates at column \"\n\t\t\t\t\t\t\t\t\t+ (j + 1));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tinCol[v] = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// check box\n\t\t\tboolean[] inBox = new boolean[10];\n\t\t\tint qRow = i / 3;\n\t\t\tint qCol = j / 3;\n\n\t\t\tfor (int m = 3 * qRow; m < 3 * qRow + 3; m++) {\n\t\t\t\tfor (int n = 3 * qCol; n < 3 * qCol + 3; n++) {\n\t\t\t\t\tif (m != i || n != j) {\n\t\t\t\t\t\tCell c = cells[m][n];\n\t\t\t\t\t\tif (!c.isEmpty()) {\n\t\t\t\t\t\t\tbyte v = c.getValue();\n\t\t\t\t\t\t\tif (inBox[v]) {\n\t\t\t\t\t\t\t\tthrow new Exception(\n\t\t\t\t\t\t\t\t\t\t\"Duplicates in box having row \"\n\t\t\t\t\t\t\t\t\t\t\t\t+ (i + 1) + \" and column \"\n\t\t\t\t\t\t\t\t\t\t\t\t+ (j + 1));\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tinBox[v] = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tbyte rank = 0;\n\t\t\tfor (byte v = 1; v <= 9; v++) {\n\t\t\t\tif (inRow[v] || inCol[v] || inBox[v]) {\n\t\t\t\t\tcell.setAvailable(v, false);\n\t\t\t\t} else {\n\t\t\t\t\tcell.setAvailable(v, true);\n\t\t\t\t\trank++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (rank > 0) {\n\t\t\t\tcell.setRank(rank);\n\t\t\t} else {\n\t\t\t\tthrow new Exception(\"No value can be set at row \" + (i + 1)\n\t\t\t\t\t\t+ \" and column \" + (j + 1));\n\t\t\t}\n\t\t}\n\t}", "public RowColStore (int memory_size_in_bytes,String layoutFile)\n\t{\n\t\t/* later -- pass it from paramters */\n\t\tmax_buf_size = memory_size_in_bytes; /* allocated first */\n\n /* create colum Buffer hash table */ \n hybridBufs = new Hashtable<String, String>();\n searchBufs = new Hashtable<String, ByteBuffer>();\n tempBufLong = new Hashtable<String, Long>();\n types = new Hashtable<String, String>();\n\n UndefByte[0] = -1;\n\n /* create buffer first */\n /* read layout file, create each buffer for each line */\n /* key is field_name:type, value is the buf */\n\n try {\n BufferedReader bufferedReader = new BufferedReader(new FileReader(layoutFile));\n String line = bufferedReader.readLine();\n int i = 0;\n while(line !=null){\n String[] keys = line.split(\"\\\\s+\"); //separted by any white space \n if(keys.length == 0) \n continue; // empty line\n ByteBuffer buf = ByteBuffer.allocateDirect(max_buf_size);\n //System.out.println(\"allocate buf \"+max_buf_size +\" for \" + keys);\n for (String k : keys){\n hybridBufs.put(k,line);\n }\n searchBufs.put(line,buf);\n i++;\n line = bufferedReader.readLine();\n }\n } catch (FileNotFoundException e){\n\t\t\tSystem.err.println(\"FileNotFoundException:\"+e.getMessage());\n\t\t\treturn ;\n } catch (IOException e){\n\t\t\tSystem.err.println(\"IOException:\"+e.getMessage());\n\t\t\treturn;\n }\n\t}", "public static void main(String[] args) {\n\tScanner s = new Scanner(System.in);\n\tSystem.out.println(\"rows?\");\n\tint r = s.nextInt();\n\tSystem.out.println(\"Col?\");\n\tint c = s.nextInt();\n\tint[][] arr = new int[r][c];\n\tfor (int i = 0; i < arr.length; i++) {\n\t\tfor (int j = 0; j < arr[0].length; j++) {\n\t\t\tarr[i][j] = 0x3f3f3f3f;\n\t\t}\n\t}\n\tfor (int i = 0; i < arr.length; i++) {\n\t\tarr[i][i] = 0;\n\t}\n\twhile(true)\n\t{\n\t\t//System.out.println(\"Vertex 1?\");\n\t\tint x = s.nextInt();\n\t\t//System.out.println(\"Vertex 2?\");\n\t\tint y = s.nextInt();\n\t\t//System.out.println(\"Distance?\");\n\t\tint d = s.nextInt();\n\t\t\n\t\tif (x == -1) {\n\t\t\tbreak;\n\t\t}\n\t\tarr[x][y] = d;\n\t\tarr[y][x] = d;\n\t}\n\tfor(int k = 0; k < arr.length;k++)\n\t{\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tfor (int j = 0; j < arr.length; j++) {\n\t\t\t\tif(arr[i][k] + arr[k][j] < arr[i][j])\n\t\t\t\t{\n\t\t\t\t\tarr[i][j] = arr[i][k] + arr[k][j];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tSystem.out.println(arr[0][4]);\n\t\n}", "private boolean isSubsetOf(int firstRow, int secondRow) {\n for (int i = 0; i < universalSetSize; i++) {\n if (input[firstRow][i] && !input[secondRow][i]) {\n return false;\n }\n }\n return true;\n }", "private int matrixRowToGridRow(int i) \n {\n return i / dimSquared + 1;\n }", "public abstract void processCell(int rowIndex, int colIndex);", "public static void main ( String[] args )\n {\n int[][] grid = new int[][] {{9, 0, 2, 5, 0, 9, 0, 5, 8, 5},\n {4, 8, 1, 7, 0, 5, 3, 6, 2, 0},\n {7, 7, 5, 6, 0, 5, 6, 6, 4, 0},\n {5, 1, 6, 2, 2, 2, 0, 9, 1, 9},\n {0, 7, 8, 9, 0, 7, 4, 3, 8, 6},\n {1, 0, 5, 6, 3, 2, 9, 3, 5, 3},\n {5, 3, 1, 4, 9, 9, 1, 3, 4, 8},\n {5, 6, 9, 9, 7, 8, 7, 3, 9, 3},\n {1, 0, 4, 8, 3, 1, 0, 2, 1, 5},\n {1, 7, 3, 6, 3, 7, 8, 3, 3, 6}};\n int[] rowproduct= new int[10]; //{0,0,....,0}\n int[] colproduct= new int[10];\n for( int i = 0; i < 10; i++)\n {\n rowproduct[i] = 1;\n colproduct[i] = 1;\n }\n int rhp=0;\n int chp=0;\n int rp=0;\n int cp=0;\n int intersection = 0;\n for (int row=0; row < grid.length; row++)\n {\n for (int col=0; col < grid[0].length; col++)\n {\n if (grid[row][col]!=0) // find product\n {\n rowproduct[row] *= grid[row][col];\n colproduct[col] *= grid[row][col];\n }//end if \n }\n }\n for(int i = 0 ;i < 10; i ++)\n {\n if(rowproduct[i]>rhp) //[rows] or [col] ?? row cuz we only compare when it has finished multiplying\n {\n rp=i;\n rhp = rowproduct[i];\n }\n if(colproduct[i]>chp)\n {\n cp=i;\n chp =colproduct[i];\n }\n }\n intersection = grid[rp][cp];\n System.out.println(\"--------------\");\n System.out.println(\"Number replaced = \"+ intersection + \"(Row \" + (rp+1)+\", Col \"+(cp+1) +\")\" );\n System.out.println(\"--------------\");\n for (int rows=0; rows < grid.length; rows++)\n {\n for (int col=0; col < grid[0].length; col++)\n {\n if (grid[rows][col]==0) // locate all zeros\n {\n grid[rows][col]=intersection;\n }\n\n if (grid[rows][col]==intersection) // locate all num intersections \n {\n grid[rows][col]=0;\n }\n System.out.print(grid[rows][col] + \" \");\n }\n System.out.print(\"\\n\");\n }\n }", "private static boolean isCellAlive(int[][] coordinates, int row, int column) {\n\t\tboolean cellAlive = coordinates[row][column] == 1;\r\n\t\tint numberOfNeighbours = 0;\r\n\t\t//check one to the right of col\r\n\t\tif (coordinates[row].length > column + 1) {\r\n\t\t\tif (coordinates[row][column + 1] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one to the left of col\r\n\t\tif (coordinates[row].length > column - 1 && column - 1 >= 0) {\r\n\t\t\tif (coordinates[row][column - 1] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one above col\r\n\t\tif (coordinates.length > row - 1 && row - 1 >= 0) {\r\n\t\t\tif (coordinates[row - 1][column] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one below col\r\n\t\tif (coordinates.length > row + 1) {\r\n\t\t\tif (coordinates[row + 1][column] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one top left diagonal to col\r\n\t\tif (coordinates.length > row - 1 && coordinates[row].length > column - 1 && row - 1 >= 0 && column - 1 >= 0) {\r\n\t\t\tif (coordinates[row - 1][column - 1] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one top right diagonal to col\r\n\t\tif (coordinates.length > row - 1 && coordinates[row].length > column + 1 && row - 1 >= 0) {\r\n\t\t\tif (coordinates[row - 1][column + 1] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one bottom left diagonal to col\r\n\t\tif (coordinates.length > row + 1 && coordinates[row].length > column - 1 && column - 1 >= 0) {\r\n\t\t\tif (coordinates[row + 1][column - 1] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check one bottom right diagonal to col\r\n\t\tif (coordinates.length > row + 1 && coordinates[row].length > column + 1) {\r\n\t\t\tif (coordinates[row + 1][column + 1] == 1) {\r\n\t\t\t\tnumberOfNeighbours++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t System.out.println(\"Number of neighbours for \" + row + \", \" + column\r\n\t\t + \" was \" + numberOfNeighbours);\r\n\t\t//if the number of neighbours was 2 or 3, the cell is alive\r\n\t\tif ((numberOfNeighbours == 2) && cellAlive) {\r\n\t\t\treturn true;\r\n\t\t} else if (numberOfNeighbours == 3) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void find_empty_cells(int j) {\n\n int current_col = j % cols;\n int cell;\n\n if (current_col > 0) {\n cell = j - cols - 1;\n if (cell >= 0)\n if (field[cell] > MINE_CELL) {\n field[cell] -= COVER_FOR_CELL;\n if (field[cell] == EMPTY_CELL)\n find_empty_cells(cell);\n }\n\n cell = j - 1;\n if (cell >= 0)\n if (field[cell] > MINE_CELL) {\n field[cell] -= COVER_FOR_CELL;\n if (field[cell] == EMPTY_CELL)\n find_empty_cells(cell);\n }\n\n cell = j + cols - 1;\n if (cell < all_cells)\n if (field[cell] > MINE_CELL) {\n field[cell] -= COVER_FOR_CELL;\n if (field[cell] == EMPTY_CELL)\n find_empty_cells(cell);\n }\n }\n\n cell = j - cols;\n if (cell >= 0)\n if (field[cell] > MINE_CELL) {\n field[cell] -= COVER_FOR_CELL;\n if (field[cell] == EMPTY_CELL)\n find_empty_cells(cell);\n }\n\n cell = j + cols;\n if (cell < all_cells)\n if (field[cell] > MINE_CELL) {\n field[cell] -= COVER_FOR_CELL;\n if (field[cell] == EMPTY_CELL)\n find_empty_cells(cell);\n }\n\n if (current_col < (cols - 1)) {\n cell = j - cols + 1;\n if (cell >= 0)\n if (field[cell] > MINE_CELL) {\n field[cell] -= COVER_FOR_CELL;\n if (field[cell] == EMPTY_CELL)\n find_empty_cells(cell);\n }\n\n cell = j + cols + 1;\n if (cell < all_cells)\n if (field[cell] > MINE_CELL) {\n field[cell] -= COVER_FOR_CELL;\n if (field[cell] == EMPTY_CELL)\n find_empty_cells(cell);\n }\n\n cell = j + 1;\n if (cell < all_cells)\n if (field[cell] > MINE_CELL) {\n field[cell] -= COVER_FOR_CELL;\n if (field[cell] == EMPTY_CELL)\n find_empty_cells(cell);\n }\n }\n\n }", "public abstract int getLastCageCol(int row, int col);", "private boolean checkOverlap(int row, int col, int length){\n \tif(!inBounds(row,col)){\n \t\treturn false;\n \t}\n \tfor(int i = row; i < row + length; i++ ){\n\t\t\tfor(int j = col; j < col + length; j++){\n\t\t\t\tif(grid[i][col] == 1 || row + length >= 10)\n\t\t\t\t\treturn false;\n\t\t\t\tif(grid[row][j] == 1 || col + length >= 10)\n\t\t\t\t\treturn false;\n\t\t\t}\n \t\t\n \t}\n \treturn true;\n }", "public int getNumCols() { return numCols; }", "public int matrixScore(int[][] A) {\n int n = A.length, m = A[0].length, ans = 0;\n for (int i = 0; i < n; ++i) {\n if (A[i][0] == 0) {\n flipRow(A, i);\n }\n }\n for (int j = 1; j < m; ++j) {\n int cnt = 0;\n for (int i = 0; i < n; ++i) {\n cnt += A[i][j];\n }\n if (cnt * 2 < n) {\n flipCol(A, j);\n }\n }\n for (int i = 0; i < n; ++i) {\n int cur = 0;\n for (int j = 0; j < m; ++j) {\n cur = (cur << 1) + A[i][j];\n }\n ans += cur;\n }\n return ans;\n}", "public int numberOfColumns()\n {\n // TODO: get the number of columns\n return matrix[0].length;\n }", "public abstract int getNbMinColumns( );", "private void scanMatrixStructure() {\n dofs = computeDofs();\n nnz = computeNNZ();\n int[] IAaux = new int[nnz];\n JA = new int[nnz];\n HA = new double[nnz];\n\n IAaux[0] = 0;\n int si = 1;\n int sj = 0;\n blocks = new double[elems.length][][][];\n for (int i = 0; i < elems.length; i++) {\n Element elem = elems[i];\n int nBlockRow = 1; // number of blocks in a row\n for (int k = 0; k < elem.TT.length; k++) {\n if (elem.TT[k] > -1) {\n nBlockRow++;\n }\n }\n\n blocks[i] = new double[nBlockRow][][]; // alocation of row matrixes\n int[] indexes = new int[nBlockRow];\n blocks[i][0] = ((Implicit)elem.ti).ADiag;\n indexes[0] = elem.index;\n nBlockRow = 1;\n for (int k = 0; k < elem.TT.length; k++) {\n if (elem.TT[k] > -1) {\n blocks[i][nBlockRow] = ((Implicit)elem.ti).ANeighs[k].A;\n indexes[nBlockRow] = elems[elem.TT[k]].index;\n nBlockRow++;\n }\n }\n\n // sorting of matrix at rows acording to element indexes (bublesort)\n double[][] aux;\n int pom;\n for (int p = 0; p < nBlockRow - 1; p++) {\n for (int q = 0; q < nBlockRow - 1; q++) {\n if (indexes[q] > indexes[q + 1]) {\n aux = blocks[i][q];\n blocks[i][q] = blocks[i][q + 1];\n blocks[i][q + 1] = aux;\n pom = indexes[q];\n indexes[q] = indexes[q + 1];\n indexes[q + 1] = pom;\n }\n }\n }\n\n // create sparse structure\n int n = elem.getNEqs() * elem.nBasis;\n for (int k = 0; k < n; k++) {\n for (int q = 0; q < nBlockRow; q++) {\n int[] glob = elems[indexes[q]].gIndex;\n for (int j = 0; j < glob.length; j++) { // row cycle\n JA[sj] = glob[j];\n sj++;\n }\n }\n IAaux[si] = sj;\n si++;\n }\n }\n\n IA = new int[si];\n System.arraycopy(IAaux, 0, IA, 0, si);\n IAaux = null;\n\n // Find the indices to the diagonal entries for ILU(0)\n diagind = findDiagonalIndices(dofs, JA, IA);\n }", "private void markRowsAndCols(int row){\n if(row < 0)\n return;\n\n markedRows[row] = true;\n for (int j = 0; j < cols; j++)\n if(j != chosenInRow[row] && source[row][j] == 0) {\n markedCols[j] = true;\n markRowsAndCols(chosenInCol[j]);\n }\n }", "private static int[][] distanceGrid(final int[][] board) {\n final int numRows = board.length;\n final int numCols = board[0].length;\n\n final int distance = 0;\n\n final int[][] distanceGrid = new int[numRows][numCols];\n for (final int[] row : distanceGrid) {\n Arrays.fill(row, INACCESSABLE_SPACE_DISTANCE);\n }\n // For each space on the board\n for (int r = 0; r < numRows; r++) {\n nextBoardSpace:\n for (int c = 0; c < numCols; c++) {\n ArrayList<int[]> explored = new ArrayList<>();\n Queue<int[]> toExplore = new LinkedList<>();\n Map<String,Integer> dists = new HashMap<>();\n\n // Add the space to the explore queue\n toExplore.add(new int[] {r, c, 0});\n \n // While there is more to explore\n while (!toExplore.isEmpty()) {\n int[] currExplor = toExplore.remove();\n explored.add(currExplor);\n int explRow = currExplor[0];\n int explCol = currExplor[1];\n int explDist = currExplor[2];\n\n String key = Arrays.toString(new int[] {explRow, explCol});\n dists.put(key, 1);\n \n // If the space contains a player's move, add the distance to the \n //distanceGrid, and continue on the next boardspace\n if (board[explRow][explCol] > 0) {\n distanceGrid[r][c] = explDist;\n continue nextBoardSpace;\n }\n \n // Otherwise, if the space is empty, add it's neighbours to the queue\n if (board[explRow][explCol] == 0) {\n ArrayList<int[]> neighbours = Utils.neighbours(explRow, explCol, numRows, numCols);\n for (int[] neighbour : neighbours) {\n int[] temp = new int[] {neighbour[0], neighbour[1], explDist+1};\n if (dists.containsKey(key)) continue;\n toExplore.add(temp);\n }\n }\n }\n\n // If a path to one of our spaces is not found, space is inaccessable\n if (board[r][c] != 0) {\n distanceGrid[r][c] = -1;\n }\n\n }\n }\n return distanceGrid;\n }", "void addRows(int row1, int row2, int k)\r\n {\n \r\n int tmp[] = new int[cols];\r\n \r\n for(int j=0; j<cols; j++)\r\n tmp[j] = k*(matrix[row2][j]);\r\n \r\n for(int j=0; j<cols; j++)\r\n matrix[row1][j]+=tmp[j];\r\n \r\n \r\n }", "private boolean checkColumn(int i, int j, int n){\n\t\tfor(int k = 0; k < 9; k++){\n\t\t\tif(k == i){\n\t\t\t}else if(sudoku[k][j] == n){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public int clearRows() {\n\t\tint rowsCleared = 0;\n\t\tcommitted = false;\n\t\tint toRow =0;\n\t\tfor(int fromRow = 0;fromRow < height;fromRow++){\n\t\t\tif(widths[fromRow] == width){\n\t\t\t\trowsCleared++;\n\t\t\t\tcontinue;\n\t\t\t}else if(rowsCleared > 0){\n\t\t\t\twidths[toRow] = widths[fromRow];\n\t\t\t\tfor(int i = 0; i < width; i++){\n\t\t\t\t\tgrid[i][toRow] = grid[i][fromRow];\n\t\t\t\t}\n\t\t\t\ttoRow++;\n\t\t\t}else{\n\t\t\t\ttoRow++;\n\t\t\t}\n\t\t}\n\t\twhile(toRow<height){\n\t\t\twidths[toRow]=0;\n\t\t\tfor(int i=0;i<width;i++){\n\t\t\t\tgrid[i][toRow]=false;\n\t\t\t\theights[i]--;\n\t\t\t}\n\t\t\ttoRow++;\n\t\t\tmaxColumnHeight--;\n\t\t}\n\t\tfor(int i=0;i<width;i++){\n\t\t\tboolean exist = false;\n\t\t\tfor(int j=0;j<height;j++){\n\t\t\t\tif(grid[i][j]){\n\t\t\t\t\theights[i]=j+1;\n\t\t\t\t\texist = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!exist) {\n\t\t\t\theights[i] = 0;\n\t\t\t}\n\t\t}\n\t\tsanityCheck();\n\t\treturn rowsCleared;\n\t}", "@Override\n public int hashCode() {\n\treturn (rowIndex * 10) + colIndex; \n }", "public abstract int getColumn();", "public abstract int getNodeColumnCount();", "private boolean checkValid(Integer[] columns, int row1, int col1) {\n\t\tfor(int row2 = 0; row2 < row1; row2++) {\n\t\t\tint col2 = columns[row2];\n\t\t\t\n\t\t\tif (col1 == col2) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t/* Check diagonals: if the distance between the columns equals the distance\n\t\t\t* between the rows, then they're in the same diagonal. */\n\t\t\t\n\t\t\tint colDis = Math.abs(col2 - col1);\n\t\t\tint rowDis = row1 - row2;\n\t\t\tif(colDis == rowDis) {\n\t\t\t\treturn false;\t\n\t\t\t}\n\t\t\t\n\t\t}\t\n\t\treturn true;\n\t}", "private int calculateRowColumns(Element sourceElement, ArrayList<Element> columns) {\r\n \t\tint count = 0;\r\n \t\tint currentLength = 0;\r\n \t\tfor (Element column : columns) {\r\n \t\t\tif (ComponentUtil.isRendered(column)) {\r\n \t\t\t\tString nodeName = column.getNodeName();\r\n \t\t\t\tif (nodeName.endsWith(RichFaces.TAG_COLUMN_GROUP)) {\r\n \t\t\t\t\t// Store max calculated value of previous rows.\r\n \t\t\t\t\tcount = Math.max(currentLength,count);\r\n \t\t\t\t\t// Calculate number of columns in row.\r\n \t\t\t\t\tcurrentLength = calculateRowColumns(sourceElement, getColumns(column));\r\n \t\t\t\t\t// Store max calculated value\r\n \t\t\t\t\tcount = Math.max(currentLength,count);\r\n \t\t\t\t\tcurrentLength = 0;\r\n \t\t\t\t} else if (nodeName.equals(sourceElement.getPrefix() + Constants.COLON + RichFaces.TAG_COLUMN) ||\r\n \t\t\t\t\t\tnodeName.equals(sourceElement.getPrefix() + Constants.COLON + RichFaces.TAG_COLUMNS)) {\r\n \t\t\t\t\t// For new row, save length of previous.\r\n \t\t\t\t\tif (Boolean.getBoolean(column.getAttribute(RichFaces.ATTR_BREAK_BEFORE))) {\r\n \t\t\t\t\t\tcount = Math.max(currentLength,count);\r\n \t\t\t\t\t\tcurrentLength = 0;\r\n \t\t\t\t\t}\r\n \t\t\t\t\tString colspanStr = column.getAttribute(\"colspan\"); //$NON-NLS-1$\r\n \t\t\t\t\tInteger colspan = null;\r\n \t\t\t\t\ttry {\r\n \t\t\t\t\t\tcurrentLength += Integer.parseInt(colspanStr);\r\n \t\t\t\t\t} catch (NumberFormatException e) {\r\n \t\t\t\t\t\tcurrentLength++;\r\n \t\t\t\t\t}\r\n \t\t\t\t} else if (nodeName.endsWith(RichFaces.TAG_COLUMN)) {\r\n \t\t\t\t\t// UIColumn always have colspan == 1.\r\n \t\t\t\t\tcurrentLength++;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn Math.max(currentLength,count);\r\n \t}" ]
[ "0.6016914", "0.5882296", "0.5637422", "0.5614282", "0.55671066", "0.5561772", "0.55294365", "0.5454459", "0.5453142", "0.53159535", "0.5314279", "0.5314279", "0.5307759", "0.530579", "0.5282826", "0.5275429", "0.5275308", "0.5254064", "0.5241828", "0.5241828", "0.5228364", "0.5226309", "0.5222289", "0.5204138", "0.5200342", "0.5197827", "0.5177195", "0.5176738", "0.5172899", "0.5162561", "0.5153408", "0.51415855", "0.5139724", "0.5126589", "0.51264626", "0.51175135", "0.5109318", "0.51052123", "0.5100919", "0.509587", "0.5085664", "0.50854456", "0.5085428", "0.5083926", "0.5081054", "0.5080244", "0.50794744", "0.50792897", "0.5079099", "0.5078291", "0.5072977", "0.50714713", "0.50643283", "0.5061375", "0.5058862", "0.504475", "0.5040054", "0.5040054", "0.50395954", "0.503135", "0.50313246", "0.50231695", "0.5023129", "0.5020426", "0.5017002", "0.50104254", "0.5007878", "0.5007233", "0.5003746", "0.5001", "0.4989113", "0.49849403", "0.4971218", "0.4968608", "0.49679533", "0.4967889", "0.49638462", "0.49623176", "0.49545017", "0.495286", "0.49406987", "0.49396324", "0.49379462", "0.49299112", "0.49287823", "0.49256587", "0.4923286", "0.49222946", "0.49086308", "0.49081275", "0.49027747", "0.49018577", "0.49017936", "0.49009883", "0.48980045", "0.489619", "0.48954174", "0.4891894", "0.48881093", "0.4887603", "0.48850054" ]
0.0
-1
TODO temp for setting up Game
public void handleCollision(Collision c);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void loadGame() {\n\n }", "public void preGame() {\n\n\t}", "public void checkGame() {\n\n\t}", "@Override\n public void beginGame() {\n }", "@Override\n public void newGame() {\n //TODO Implement this method\n }", "public void createGame();", "private Game() {}", "private void getGameState(String version){\n\n }", "public void loadGame() {\n game.loadGame();\n }", "Games game();", "private void gameOver() {\n\t\t\n\t}", "public Game createGame();", "private void startGame() {\n\t\tmain.next_module = new Game(main, inputs, gameSelectionData);\n\t}", "public void newGame();", "public void newGame();", "public void newGame();", "public void InitGame(){\n System.out.format(\"New game initiated ...\");\n Game game = new Game(client_List);\n SetGame(game);\n }", "public GameState(){\n this.gameResults = \"\";\n initVars();\n this.theme = DEFAULT_THEME;\n this.board = new Board(DEFAULT_BOARD);\n createSetOfPlayers(DEFAULT_PLAYERS, DEFAULT_AUTOPLAYER, DEFAULT_AUTOMODE);\n }", "public void defaultGame() {\n //CREATE A BOARD\n Board board = new Board(10, 10, 0);\n ArrayList<Boat> boats = createDefaultBoatArray();\n //CREATE A GAME\n GameData game = new GameData(board, boats, false);\n //POSITION BOATS\n randomPosBoats(game);\n\n //!!tile matrix is empty\n Game.getInstance().setGameData(game);\n Game.getInstance().setEnded(false);\n }", "public void startNewGame();", "public Game startGame(Game game);", "@Override\r\n public int playGameLoop() {\r\n return 0;\r\n }", "private void saveGame(){\n\t\t\n\t}", "public void setGame() {\n }", "public Game() \n {\n gameLoaded = false;\n }", "private void initialGame() {\n Display display = this.getWindowManager().getDefaultDisplay();\n Point size = new Point();\n display.getSize(size);\n GameUtils.mWidth = size.x;\n GameUtils.mHeight = size.y;\n GameUtils.frameWidth = (int)(GameUtils.mWidth / 2.5);\n GameUtils.frameHeight = GameUtils.frameWidth;\n GameUtils.dx = GameUtils.mWidth / 120;\n GameUtils.maxVelX = GameUtils.mHeight / 15;\n GameUtils.maxVelY = GameUtils.mHeight / 8;\n\n // Bitmap\n GameUtils.bitmapPika = BitmapFactory.decodeResource(getResources(),\n R.drawable.pika_sprite_8_384);\n GameUtils.bitmapPika = Bitmap.createScaledBitmap(GameUtils.bitmapPika,\n GameUtils.frameWidth * GameUtils.frameCount, GameUtils.frameHeight, false);\n GameUtils.apple = BitmapFactory.decodeResource(getResources(), R.drawable.apple);\n GameUtils.banana = BitmapFactory.decodeResource(getResources(), R.drawable.banana);\n GameUtils.coke = BitmapFactory.decodeResource(getResources(), R.drawable.coke);\n\n GameUtils.bitmapRestart = BitmapFactory.decodeResource(getResources(), R.drawable.restart);\n GameUtils.bitmapRestart = Bitmap.createScaledBitmap(GameUtils.bitmapRestart,\n GameUtils.mWidth / 12, GameUtils.mWidth / 12, false);\n GameUtils.bitmapPause = BitmapFactory.decodeResource(getResources(), R.drawable.pause);\n GameUtils.bitmapPause = Bitmap.createScaledBitmap(GameUtils.bitmapPause,\n GameUtils.mWidth / 15, GameUtils.mWidth / 15, false);\n\n // Game Data\n GameUtils.WIN = true;\n GameUtils.score = 0;\n GameUtils.apples = 0;\n GameUtils.bananas = 0;\n GameUtils.cokes = 0;\n GameUtils.jumps = 0;\n GameUtils.totalSec = GameUtils.totalTime;\n GameUtils.visibleFruit = 0;\n }", "public void start() {\n ArrayList<String> names = new ArrayList<>();\n game.initialize(names);\n //game.play(this.mainPkmn, this.attack);\n\n }", "void gameStarted();", "void gameStarted();", "public ProjectGame() {\n\n super(\"BulletHell\", 1200, 900);\n die = new Event();\n backgroundMusic = new SoundManagerClass();\n playButton.setPositionX(420);\n playButton.setPositionY(180);\n quitButton.setPositionX(623);\n quitButton.setPositionY(181);\n //x = 0;\n reduceLife = new Event();\n fadeOutEvent = new Event();\n PickedUpEvent = new Event();\n die.setEventType(\"playerDeath\");\n fadeOutEvent.setEventType(\"FadeOut\");\n reduceLife.setEventType(\"Collision\");\n collidedEvent = new Event();\n collidedEvent.setEventType(\"CollidedEvent\");\n throwKnife = new Event();\n throwKnife.setEventType(\"throwKnife\");\n\n\n keyIcon.setPositionX(200);\n keyIcon.setPositionY(40);\n\n knifeIcon.setPositionX(205);\n knifeIcon.setPositionY(95);\n\n currentLevel = 0;//0 = base , 3=brigham's level\n\n\n PickedUpEvent.setEventType(\"CoinPickedUp\");\n\n this.addEventListener(myQuestManager, collidedEvent.getEventType());\n\n\n background.setScaleX(5);\n background.setScaleY(5);\n\n background.setScaleX(5);\n background.setScaleY(5);\n\n\n player = new Player(\"player\", \"resources/player_sheet.png\", \"idle_right\");\n player.setSpriteSheetJson(\"resources/player_sheet.json\");\n player.setDelay(100);\n\n player.getLifeArray().get(0).setPositionX(390);\n player.getLifeArray().get(0).setPositionY(40);\n player.getLifeArray().get(1).setPositionX(420);\n player.getLifeArray().get(1).setPositionY(40);\n player.getLifeArray().get(2).setPositionX(450);\n player.getLifeArray().get(2).setPositionY(40);\n // player.setHasPhysics(true);\n keyCount = 0;\n knifeCount = 4;\n // player.setHasPhysics(true);\n\n // platform.setPositionX(50);\n // platform.setPositionY(550);\n\n\n // platform1.setPositionX(150);\n // platform1.setPositionY(150);\n\n\n player.setPositionX(550);\n player.setPositionY(700);\n\n pressE = new Sprite(\"pressE\", \"pressE.png\");\n player.addChild(pressE);\n pressE.setPositionY(-50);\n\n\n coin.setPositionY(250);\n coin.setPositionX(660);\n\n findKey.setPositionX(500);\n findKey.setPositionY(-20);\n\n getToRoom.setPositionX(500);\n getToRoom.setPositionY(-20);\n\n killTurtle.setPositionX(500);\n killTurtle.setPositionY(-20);\n\n\n //Rectangle2D rect = new Rectangle2D.Float(600,400,700,500);\n //coverList = new ArrayList<Rectangle2D>(); //list of cover sprites\n //coverList.add(rect);\n\n ///////////////////////////////////////LEVEL 0 ////////////////////////////////////////////////////////////////\n\n if (currentLevel == 0) {\n\n tutorial = new TutorialLevel1(\"Tutorial\");\n tutorial.run();\n addChild(tutorial);\n\n myLevel = new Level0(\"Room1\");\n myLevel.run();\n addChild(myLevel);\n\n\n myLevel1 = new Level1(\"Room2\");\n myLevel1.run();\n myLevel1.hide();\n addChild(myLevel1);\n\n myLevel2 = new ahmedslevel(\"Room3\", player);\n myLevel2.run();\n myLevel2.hide();\n addChild(myLevel2);\n\n myLevel3 = new BrighamLevel(\"Room4\");\n myLevel3.run();\n myLevel3.hide();\n addChild(myLevel3);\n\n level4 = new AlternatingSpikesLevel(\"Room6\");\n level4.run();\n level4.hide();\n addChild(level4);\n\n bossLevel = new BossLevel(\"Room5\", player);\n bossLevel.run();\n bossLevel.hide();\n addChild(bossLevel);\n\n\n\n tutorial.mapDoorToRoom(0,myLevel);\n myLevel.mapDoorToRoom(0, myLevel1);\n myLevel1.mapDoorToRoom(0, myLevel2);\n myLevel2.mapDoorToRoom(0, myLevel3);\n myLevel3.mapDoorToRoom(0, level4);\n level4.mapDoorToRoom(0, bossLevel);\n //myLevel3.mapDoorToRoom(0,bossLevel);\n\n\n currentRoom = tutorial;\n\n //myLevel1.mapDoorToRoom(0,myLevel2);\n\n //myLevel2.run();\n //myLevel2.hide();\n\n\n //myLevel2.mapDoorToRoom(0,myLevel3);\n //myLevel3.run();\n //myLevel3.hide();\n currentQuestObjective = 0;\n\n }\n\n if (currentLevel == 4) {\n\n\n bossLevel = new BossLevel(\"Room4\", player);\n bossLevel.run();\n currentRoom = bossLevel;\n\n\n }\n\n enemies = currentRoom.enemies;\n pickpocketEnemy = null;\n\n transitionY = 615;\n transitionYCurrent = 615;\n\n\n backgroundMusic.playSoundEffect(\"resources/oceanOperator.wav\", 100);\n\n }", "@Override\n public void buildAndSetGameLoop() {\n }", "private void createGame(String name){\n\n }", "public void GameStart()\n\t\t{\n\t\t\tplayers_in_game++;\n\t\t}", "public void setUpGame() {\n\t\tGameID = sql.getTheCurrentGameID() + 1;\r\n\t\tSystem.err.println(GameID);\r\n\t\ttheModel.shuffleDeck();\r\n\t\ttheModel.createPlayers();\r\n\t\ttheModel.displayTopCard();\r\n\t\t// theModel.chooseFirstActivePlayer();\r\n\t}", "private void startGame() {\r\n\t\tthis.gameMap.startGame();\r\n\t}", "public GameLogic(){\n\t\tplayerPosition = new HashMap<Integer, int[]>();\n\t\tcollectedGold = new HashMap<Integer, Integer>();\n\t\tmap = new Map();\n\t}", "public PlayableGame() {\r\n\r\n }", "public GameTypeWrapper playGame();", "public void startGame() {\r\n this.setupGame();\r\n }", "void startGame();", "void startGame();", "void startGame();", "public Game() {}", "void newGame() {\n\t\tstate = new model.State () ; \n\t\tif(host != null ) host.show(state) ; \n\t}", "private void playGame() {\n do {\n new Round(this);\n } while (!winner.isPresent());\n }", "public GenGameOver() { \n prepare();\n }", "public void play() {\n List<String> playersData = getGameInput().getPlayersData();\n for (int id = 0; id < playersData.size() / Constants.DATAENTITY; id++) {\n getHeroes().add(getHeroFactory().getHero(\n playersData.get(id * Constants.DATAENTITY),\n Integer.parseInt(\n playersData.get(\n id * Constants.DATAENTITY\n + Constants.INDEXPOSX)),\n Integer.parseInt(\n playersData.get(\n id * Constants.DATAENTITY\n + Constants.INDEXPOSY)),\n id));\n }\n // We create the angels and add them to angels list.\n List<Integer> numOfAngels = getGameInput().getNumOfAngels();\n List<String> angelsData = getGameInput().getAngelsData();\n for (int i = 0; i < angelsData.size() / Constants.DATAENTITY; i++) {\n getAngels().add(getAngelsFactory().getAngel(\n angelsData.get(i * Constants.DATAENTITY),\n Integer.parseInt(\n angelsData.get(\n i * Constants.DATAENTITY\n + Constants.INDEXPOSX)),\n Integer.parseInt(\n angelsData.get(\n i * Constants.DATAENTITY\n + Constants.INDEXPOSY))));\n }\n\n getUtl().prepareAdmins();\n\n int angelCounter = 0; // To iterate through all angels only once.\n // We start the actual game.\n for (int i = 0; i < getMovements().size(); i++) { // For every round.\n\n getUtl().printRound(i + 1); // We start printing from round 1...\n\n for (int j = 0; j < getHeroes().size(); j++) {\n /* Apply overtime ability if the case and then hero chooses\n * strategy and moves if he is not rooted. Lastly we decrease\n * the amount of rounds that a hero must be affected by. */\n if (!getHeroes().get(j).isDead()) {\n if (getHeroes().get(j).isAffectedByAoT()) {\n getUtl().applyAoT(getHeroes().get(j));\n }\n if (!getHeroes().get(j).isRooted()) {\n getHeroes().get(j).chooseStrategy();\n getHeroes().get(j).move(getMovements().get(i).get(j));\n }\n if (getHeroes().get(j).isAffectedByAoT()) {\n getHeroes().get(j).setAffectedByAoTRounds(\n getHeroes().get(j).getAffectedByAoTRounds()\n - 1);\n }\n }\n }\n\n // Check if there are any players on the same terrain.\n for (int j = 0; j < getHeroes().size(); j++) {\n for (int k = 0; k < getHeroes().size(); k++) {\n if (k == j) {\n continue; // So a hero doesn't fight himself.\n }\n if ((getHeroes().get(j).getPosX()\n == getHeroes().get(k).getPosX())\n && (getHeroes().get(j).getPosY()\n == getHeroes().get(k).getPosY())) {\n // If they are both alive, fight.\n if (!getHeroes().get(j).isDead()\n && !getHeroes().get(k).isDead()) {\n getUtl().fight(getHeroes().get(k),\n getHeroes().get(j), getMap());\n }\n }\n }\n }\n\n // Selecting the angels that appear on round i\n for (int j = 0; j < numOfAngels.get(i); j++) {\n getUtl().spawnAngel(getAngels().get(angelCounter));\n for (int k = 0; k < getHeroes().size(); k++) {\n /* Checking if the selected angel and player k are on the\n * same terrain. */\n if (getAngels().get(angelCounter).getPosX()\n == getHeroes().get(k).getPosX()\n && (getAngels().get(angelCounter).getPosY()\n == getHeroes().get(k).getPosY())) {\n getUtl().affectHeroByAngel(\n getAngels().get(angelCounter),\n getHeroes().get(k));\n }\n }\n angelCounter++;\n }\n\n // When round is complete, everyone can fight again\n for (AbstractHero hero : getHeroes()) {\n hero.setFought(false);\n }\n getUtl().getOutput().add(\"\\n\");\n }\n printResults();\n }", "@Override\n\tpublic void update(Game game) {\n\t\t\n\t}", "GameMode mode();", "public void initGame() {\n this.game = new Game();\n }", "public abstract void RunOnGameOpen();", "private void setUpGame() {\n DotCom one = new DotCom();\n one.setName(\"Pets.com\");\n DotCom two = new DotCom();\n two.setName(\"eToys.com\");\n DotCom three = new DotCom();\n three.setName(\"Go2.com\");\n dotComList.add(one);\n dotComList.add(two);\n dotComList.add(three);\n\n //display brief instructions for the user//Выводим краткие инструкции для пользователя\n System.out.println(\"Ваша цель - потопить 3 сайта\");\n System.out.println(\"Pets.com, eToys.com,Go2.com\");\n System.out.println(\"Потытайтесь потопить их за минимальное количество ходов\");\n\n for (DotCom dotComToSet : dotComList) {// Повторяем с каждым объектом DotCom в списке\n ArrayList<String> newLocation = helper.placeDotCom(3);//Запрашиваем у вспомогательного объекта адрес \"сайта\"\n dotComToSet.setLocationCells(newLocation); // Вызываем сеттре из объекта DotCom чтобы передать ему\n // местоположение которое только что получилии от вспомогательного объекта\n }\n }", "public void loadGame(){\n if(gamePaused == false){ return; }\n // animationThread.stop();\n // JOptionPane.showMessageDialog(null, \"Game Loaded\", \"Message\", 1);\n replay.load();\n board = replay.autoReplay();\n level = replay.getLevel();\n if(muteMusic == false){\n music.stopPlayingAudio(\"All\");\n music.playAudio(\"LevelMusic\");\n }\n musicName = \"LevelMusic\";\n setTitle(\"Chip's Challenge: Level \" + level);\n timeRuunableThread.setDrawNumber(true);\n timeRuunableThread.setSecond(replay.getTime());\n gameStarted = true;\n gamePaused = false;\n timeRuunableThread.setPause(gamePaused);\n timeRuunableThread.setGameStart(gameStarted);\n infoCanvas.drawLevelNumber(level);\n keysize = 0;\n infoCanvas.drawChipsLeftNumber(board.getTreasureRemainingAmount());\n infoCanvas.drawSquares((Graphics2D) infoCanvas.getGraphics(), 14 * infoCanvas.getHeight() / 20, infoCanvas.getWidth(), infoCanvas.getHeight());\n try {\n infoCanvas.drawKeysChipsPics();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n renderer = new MazeRenderer(boardCanvas.getGraphics());\n renderer.redraw(board, boardCanvas.getWidth(), boardCanvas.getHeight());\n checkMovedRedraw();\n }", "public GameMain()\n {\n allenBad = new AllenSucks(this);\n }", "protected abstract void drawGame();", "public void runGame() {\r\n\t\ttry {\r\n\t\t\thost.startNewGame(width, height, false);\r\n\t\t\tguest.startNewGame(width, height, true);\r\n\t\t\tnotifyStartGame(width, height);\r\n\t\t} catch(Exception e) {return;}\r\n\t\twhile(!game.isGameOver()) {\r\n\t\t\tcurrentPlayer = game.getCurrentPlayer();\r\n\t\t\tMove move;\r\n\t\t\ttry {\r\n\t\t\t\tmove = currentPlayer.getNextMove();\r\n\t\t\t} catch(Exception e) { return ;}\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tif(game.isValidMove(move)) {\r\n\t\t\t\t\tgame.registerMove(move);\r\n\t\t\t\t\thost.registerMove(move);\r\n\t\t\t\t\tguest.registerMove(move);\r\n\t\t\t\t\tnotifyMove(move);\r\n\t\t\t\t}\r\n\t\t\t} catch (IllegalMove e) { }\r\n\t\t\tcatch (Exception e) { return; }\r\n\t\t}\r\n\n\t\ttry {\r\n\t\t\thost.finishGame(game.getResult(host));\r\n\t\t\tguest.finishGame(game.getResult(guest));\r\n\t\t\tnotifyFinishGame(game.getResult(host));\r\n\t\t} catch( Exception e) { return; }\n\t}", "@Override\n public void resetGame() {\n\n }", "public void gameUpdate() {\n\t\t\n\t\t// Remember our homeTilePosition at the first frame\n\t\tif (bwapi.getFrameCount() == 1) {\n\t\t\tint cc = BuildManager.getInstance().getNearestUnit(UnitTypes.Terran_Command_Center.ordinal(), 0, 0);\n\t\t\tif (cc == -1) cc = BuildManager.getInstance().getNearestUnit(UnitTypes.Zerg_Hatchery.ordinal(), 0, 0);\n\t\t\tif (cc == -1) cc = BuildManager.getInstance().getNearestUnit(UnitTypes.Protoss_Nexus.ordinal(), 0, 0);\n\t\t\thomePositionX = bwapi.getUnit(cc).getX();\n\t\t\thomePositionY = bwapi.getUnit(cc).getY();\n\t\t\n\t\t\tResourceManager.getInstance().gameStart(bwapi.getMyUnits());\n\t\t}\n\t\t\n\t\t/*\n\t\tif(ResourceManager.getInstance().numWorkers() == 10 && ScoutManager.getInstance().numScouts() == 0) {\n\t\t\tbwapi.printText(\"Assigning a scout\");\n\t\t\tneedsScout();\n\t\t}\n\t\t*/\n\t\t\n\t\tfor (Manager manager : managers.values())\n\t\t\tmanager.gameUpdate();\n\t\t\n\t\t// Draw debug information on screen\n\t\tdrawDebugInfo();\n\n\t\t\n\t\t// Call the act() method every 30 frames\n\t\tif (bwapi.getFrameCount() % 30 == 0) {\n\t\t\tact();\n\t\t}\n\t}", "private void startGame() {\r\n setGrid();\r\n setSnake();\r\n newPowerUp();\r\n timer.start();\r\n }", "private void drawGame(){\n drawBackGroundImage();\n drawWalls();\n drawPowerups();\n drawBullet();\n }", "public Game() {\r\n\r\n\t\tmakeFrame();\r\n\t\tisClicked = false;\r\n\t\tisPlaying = false;\r\n\t\tlevelEasy = true;\r\n\t\tlevelIntermediate = false;\r\n\t\tlevelHard = false;\r\n\t\tplayerScore = 0;\r\n\r\n\t}", "public void gameEngineInitializer() {\n\t\t\r\n\t\tthis.sputacchioGameEngine = new SputacchioGameEngine(supportDeck, mainDeck, mainBoard, players, gamestate, playerDoingTurnNumber);// da implementare alla fine\r\n\t\tthis.classicGameEngine = new ClassicGameEngine(supportDeck, mainDeck, mainBoard, players, gamestate, playerDoingTurnNumber, engineUtility, filter);\r\n\t\t\r\n\t\tthis.gamestate.setCurrentGameType(GameType.CLASSICGAME);//si dovrebbe iniziare dal cucù ma facciamo dopo\r\n\t\tthis.gamestate.setCurrentHandNumber(INITIALHANDNUMBER);\r\n\t\tthis.givePersonalJolly();\r\n\t\t\r\n\t\tthis.classicGameEngine.distributeHands();//queste due si fanno all'inizio di ogni mano, non sono da fare solo la prima volta e basta\r\n\t\tthis.classicGameEngine.substituteJolly();\r\n\t\t\r\n\t\tmainEngine();\r\n\t\t//TODO ci vuole un metodo che, a parte la prima chiamata di Server Room, chiama il sotto-engine giusto in base a game type. Se classic game engine fa una return per segnalare\r\n\t\t//che la mano è finita perchè nessuno ha carte in mano, game engine deve ridare le 6 carte o settare l'ultima mano, o la mano della scala obbligatoria, e cambiare chi inizia a cucù.\r\n\t\t//Poi penso che debba chiamare Filter per mostrare a entrambi cosa accade, stampare le nuove carte e dichiarare l'inizio del cucù.\r\n\t}", "private void Management_Player(){\n\t\t\n\t\t// render the Player\n\t\tswitch(ThisGameRound){\n\t\tcase EndRound:\n\t\t\treturn;\t\t\t\n\t\tcase GameOver:\n\t\t\t// do nothing\n\t\t\tbreak;\n\t\tcase Running:\n\t\t\tif (PauseGame==false){\n\t\t\t\tplayerUser.PlayerMovement();\t\t\t\t\t\t\n\t\t\t}\n\t\t\telse if (PauseGame==true){\n\t\t\t\t// do not update gravity\n\t\t\t}\n\t\t\tbreak;\t\t\n\t\t}\n\t\n\t\tbatch.draw(playerUser.getframe(PauseGame), playerUser.getPosition().x , playerUser.getPosition().y,\n\t \t\tplayerUser.getBounds().width, playerUser.getBounds().height);\n\t\t\n\t\t\n\t\t\n\t\tswitch (playerUser.EquipedToolCycle)\n\t\t{\t\n\t\tcase 0:\n\t\t\tstartTimeTool = System.currentTimeMillis(); \n\t\t\tbreak;\n\t\t\t\n\t\tcase 1: \n\t\t\t\n\t\t\tif (PauseGame==true){\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t// tool is grabbed\n\t\t\testimatedTimeEffect = System.currentTimeMillis() - startTimeTool;\t\t\t\t\t\t\t\t\t\t\n\t\t\t\n\t\t\tplayerUser.pe_grab.setPosition(playerUser.getPosition().x + playerUser.getBounds().width/2,\n\t\t\t\t\tplayerUser.getPosition().y + playerUser.getBounds().height/2);\t\n \t\t\n\t\t\t\tplayerUser.pe_grab.update(Gdx.graphics.getDeltaTime());\n\t\t\t\tplayerUser.pe_grab.draw(batch,Gdx.graphics.getDeltaTime()); \t\t\t\t\t\t\t\n\t\t\t\n\t\t\tif (estimatedTimeEffect >= Conf.SYSTIME_MS){\n\t\t\t\testimatedTimeEffect = 0;\n\t\t\t\tplayerUser.ToolEquiped();\n\t\t\t\tstartTimeTool = System.currentTimeMillis(); \n\t\t\t\tplayerUser.EquipedToolCycle++;\n\t\t\t}else{\n\t\t\t\t// do nothing\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\t\t\n\t\tcase 2:\n\t\t\t\n\t\t\tif (PauseGame==true){\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\testimatedTimeEffect = (System.currentTimeMillis() - startTimeTool) / 1000;\t\t\t\t\n\t\t\tplayerUser.pe_equip.setPosition(playerUser.getPosition().x + playerUser.getBounds().width/2,\n\t\t\tplayerUser.getPosition().y + playerUser.getBounds().height/2);\t\n\t\t\tplayerUser.pe_equip.update(Gdx.graphics.getDeltaTime());\n\t\t\tplayerUser.pe_equip.draw(batch,Gdx.graphics.getDeltaTime()); \t\t\t\t\n\t\t\tif (estimatedTimeEffect>=Conf.TOOL_TIME_USAGE_LIMIT){\n\t\t\t\tplayerUser.EquipedToolCycle=0;\t\t\n\t\t\t\tplayerUser.color = Color.NONE;\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif (estimatedTimeEffect>=Conf.TOOL_TIME_USAGE_MUSIC_LIMIT){\n\t\t\t\tPhoneDevice.Settings.setMusicValue(true);\n\t\t\t}\n\t\t}\t\t\t\t\n\t}", "@Override\n\tpublic void onEnter(Game game) {\n\t\t\n\t}", "public void newGame() {\n gameString = playerPlays = computerPlays = \"\";\n pScore = cScore = 0;\n setLabels();\n }", "private void loadGameFiles(){\n\t}", "public void playCvC() {\n isAI[0] = true;\n isAI[1] = true;\n players[0] = new AI();\n players[1] = new AI();\n playerShips[0] = players[0].getShipList();\n playerShips[1] = players[1].getShipList();\n grids[0] = new Grid();\n grids[1] = new Grid();\n currentPlayer = 0;\n playGame();\n }", "private GameStatePresets()\n {\n\n }", "public OrchardGame() {\n\t\t\n\t}", "private Game() {\n\t\tlabyrinth = Labyrinth.getInstance();\n\t\tplayer = Player.getInstance();\n\n\t\tcandies = new HashMap<>();\n\t\tenemies = new HashMap<>();\n\t\tbuttons = new HashMap<>();\n\n\t\tgenerateCandies();\n\t\tgenerateEnemies();\n\t\t//generateButtons();\n\n\t\tscore = Score.getInstance();\n\n\t\t//Put the door randomly.\n int coordX = ThreadLocalRandom.current().nextInt(0, 16);\n int coordY = ThreadLocalRandom.current().nextInt(0, 16);\n\t\tthis.door = Door.getInstance(coordX, coordY);\n\t}", "public void play() \n { \n \n createRooms();\n createCharacters();\n createItem();\n printWelcome();\n player = new Player(\"player\");\n Boolean exam;\n exam = false;\n /* player.addItem(necklace_red);\n player.addItem(halberd);\n player.addItem(set_of_forks_and_knives);\n player.addItem(candelar);\n player.addItem(potion6HP);\n player.addItem(bedroomkey);*/\n \n // Step 1 : start in the poolroom //\n Boolean step1Finish;\n Boolean step2Finish;\n Boolean step3Finish;\n Boolean step4Finish;\n Boolean step5Finish;\n Boolean step6Finish;\n Boolean step7Finish;\n Boolean step8Finish;\n Boolean step9Finish;\n Boolean step10Finish;\n Boolean step11Finish;\n step1Finish = false;\n step2Finish = false;\n step3Finish = false;\n step4Finish = false;\n step5Finish = false;\n step6Finish = false;\n step7Finish = false;\n step8Finish = false;\n step9Finish = false;\n step10Finish = false;\n step11Finish = false;\n \n // All the characters are in the poolroom and the exit opens only after speak with all the characters //\n Boolean canSpeak; // player can speak with PNG\n Boolean speak_with_mr_Taylor, speak_with_ms_Taylor, speak_with_ms_Cunningham, speak_with_chambermaid, speak_with_bob_Taylor, speak_with_mr_Cunningham;\n Boolean speak_with_ms_Wellington, speak_with_valet, speak_with_caretaker, speak_with_mr_Wellington, speak_with_nina_Taylor;\n Boolean find_bob_Taylor;\n Boolean toys_not_front_of_door = null;\n Boolean firstEnter;\n firstEnter = true;\n \n canSpeak = false;\n speak_with_mr_Taylor = false;\n speak_with_ms_Taylor = false;\n speak_with_ms_Cunningham = false;\n speak_with_chambermaid = false;\n speak_with_bob_Taylor = false;\n speak_with_mr_Cunningham = false;\n speak_with_ms_Wellington = false;\n speak_with_valet = false;\n speak_with_caretaker = false;\n speak_with_mr_Wellington = false;\n speak_with_nina_Taylor = false;\n\n Boolean can_exam_canvas;\n can_exam_canvas = false;\n Boolean find_bedroom_key;\n find_bedroom_key = false;\n \n int safe_code, essai_code;\n safe_code = 9515;\n \n if (exam)\n {\n System.out.println(\"You are in the poolroom. \\n\"\n + \"Mr Taylor was founded by the Chambermaid this morning when she came to clean the poolroom. Her scream attracted everyone. \\n\"\n + \"You notice that it is missing a pool cue and you find a strange red necklace nearby the pool. \\n\"\n + \"You examine the dead body and you notice a circular wound with the same diameter of a pool cue and some splinters of wood at the bottom of the neck. \\n\"\n + \"Take advantage that everyone is here to question them.\");\n canSpeak = true;\n exam = false;\n System.out.println(\"There are a lot of people in this room. \\n\" \n +\" Nina Taylor the master daughter has long brown hair. Sha has a beautiful blue dress. \\n\"\n +\" Bob Taylor is the little son of Mr Taylor. He seems to be really nice and kind. But he is really sad. \\n\"\n +\" Emma the Chambermaid is an old woman. She has been working for the family for a very long time. She has a black dress and a white pinny.\\n\" \n +\" Mr Cunningham is a grey-haired man with a beige square suit and a lie. \\n\"\n +\" Mr Taylor had dark blond hair and a mustache. He had nice black tuxedo. \\n\"\n +\" Mr Wellinghton is a brown-haired man with a brown square suit and a lie. \\n\"\n +\" Ms Cunnigham is a grey-blond-haired woman with a pink dress. \\n\"\n +\" Ms Taylor seems to be really sad. Sha has dark-brown hair and a long claret dress. \\n\"\n +\" Ms Wellinghton is a redhead-haired woman with a long light green dress. \\n \"\n +\" Alfred the Valet has curly blond hair. He seems to be bother. \\n\"\n +\" Sam the caretaker is a black-haired black man. \");\n }\n if (speak_with_mr_Taylor && speak_with_ms_Taylor && speak_with_ms_Cunningham && speak_with_chambermaid && speak_with_bob_Taylor && speak_with_mr_Cunningham\n && speak_with_ms_Wellington && speak_with_valet && speak_with_caretaker && speak_with_mr_Wellington && speak_with_nina_Taylor && exam)\n {\n canSpeak = false;\n step1Finish = true;\n poolroom.modifyExit(\"east\");\n speak_with_mr_Taylor = false;\n speak_with_ms_Taylor = false;\n speak_with_ms_Cunningham = false;\n speak_with_chambermaid = false;\n speak_with_bob_Taylor = false;\n speak_with_mr_Cunningham = false;\n speak_with_ms_Wellington = false;\n speak_with_valet = false;\n speak_with_caretaker = false;\n speak_with_mr_Wellington = false;\n speak_with_nina_Taylor = false;\n }\n\n // Step 2 : banqueting hall //\n if (step1Finish)\n {\n bob_Taylor.setRoom(cellar);\n nina_Taylor.setRoom(banquetinghall);\n ms_Cunningham.setRoom(dancingroom);\n if (currentRoom == banquetinghall)\n {\n if (firstEnter)\n { \n toys_not_front_of_door = false; //false = toys front of the door // true = toys not front of the door\n find_bob_Taylor = false;\n System.out.println(\" When you opened the poolroom door, you shut on a toy so you lose one HealthPoint\");\n player.setHP(player.getHP() - 1);\n firstEnter = false;\n }\n if (exam)\n {\n System.out.println(\"You cannot open the dancing room door now because there are a lot of toys. \\n\"\n + \"Nina Taylor is next to the toys and you can speak with her. \");\n canSpeak = true;\n exam = false;\n }\n if (speak_with_nina_Taylor)\n {\n nina_Taylor.setText(\"These are my brother toys. Find him to tidy his toys\");\n speak_with_nina_Taylor = false;\n canSpeak = false;\n }\n }\n else if (currentRoom == hall)\n {\n // Step 2 bis : Hall //\n if (exam)\n {\n System.out.println(\" You are in the hall but there is nobody here. \");\n exam = false;\n }\n }\n else if (currentRoom == poolroom)\n {\n if (exam)\n {\n System.out.println(\"You are in the poolroom. Mr Taylor's body was removed. All the peopple are gone. \\n\"\n + \"You do not want to stay in this room. The atmosphere has become bad. You want to leave.\");\n exam = false;\n }\n }\n else if (currentRoom == kitchen)\n {\n if (exam)\n {\n System.out.println(\"This is the kitchen, Bob Taylor is not here. \\n\"\n + \"A set of forks and knives is in one of the cupboards of the kitchen.\");\n exam = false;\n // Recupère arme\n }\n }\n else if (currentRoom == cellar)\n {\n if (exam)\n {\n System.out.println(\"You found Bob Taylor in the back of the cellar\");\n find_bob_Taylor = true;\n exam = false;\n canSpeak = true;\n }\n if (speak_with_bob_Taylor)\n {\n System.out.println(\"You convince Bob to tidy up his toys.\");\n toys_not_front_of_door = true;\n canSpeak = false;\n speak_with_bob_Taylor = false;\n }\n if (toys_not_front_of_door) \n {\n banquetinghall.modifyExit(\"south\");\n step2Finish = true;\n }\n }\n if (step2Finish)\n {\n if (currentRoom == dancingroom)\n {\n if (firstEnter)\n {\n if (exam)\n {\n System.out.println(\"You are in an extraordinary dancing room. You perceive a gramophone on a commode. You see a beautiful candlestick and a gramophone. \\n\"\n + \"Strangely here is no disk on the gramophone. You see Ms Cunningham beside it. She seems to want to talk with you.\");\n exam = false;\n canSpeak = true;\n }\n if (speak_with_ms_Cunningham)\n {\n ms_Cunningham.setText(\"Oh, good morning ! I am happy to see you. Unlike the dark atmosphere of the mansion it is a beautiful weather outside. \\n\"\n + \"I hope your investigation is progressing well. I am scared that the murderer is still at liberty. I cannot sleep properly since the night of the murder. Ah ! I know, you are going to dance with me. It will make me think of something other than this dark situation. \\n\"\n + \"Sorry I will walk on your feet. Do I hurt you not too much ? I can be very clumsy.Oh, good morning ! I am happy to see you. Unlike the dark atmosphere of the mansion it is a beautiful weather outside. \\n\"\n + \"I hope your investigation is progressing well. I am scared that the murderer is still at liberty. I cannot sleep properly since the night of the murder. Ah ! I know, you are going to dance with me. It will make me think of something other than this dark situation. \\n\"\n + \"Sorry I will walk on your feet. Do I hurt you not too much ? I can be very clumsy.\");\n System.out.println(\"You spoke and danced a lot of time with Ms Cunningham. Then you are very tired so you lose one healthpoint\");\n player.setHP(player.getHP() - 1);\n canSpeak = false;\n speak_with_ms_Cunningham = false;\n }\n firstEnter = false;\n } \n if (exam)\n {\n {\n System.out.println(\"You are in an extraordinary dancing room. You perceive a gramophone on a commode. You see a beautiful candlestick and a gramophone. \\n\"\n + \"Strangely here is no disk on the gramophone. You see Ms Cunningham beside it.\");\n exam = false;\n canSpeak = true; \n }\n if (speak_with_ms_Cunningham)\n {\n ms_Cunningham.setText(\"Thank you. I feel better thanks to you.\");\n canSpeak = false;\n speak_with_ms_Cunningham = false;\n }\n }\n }\n else if (currentRoom == livingroom)\n {\n exam = false;\n System.out.println(\"You ride the last step and arrive in the living room. A little green ghost appears in the room. He seems not to be kind. \");\n if (ghost.getHP() <=0) \n {\n livingroom.modifyExit(\"north\");\n livingroom.modifyExit(\"west\");\n exam = true;\n if (exam)\n {\n System.out.println(\"There is no useful object and there is nobody here. \"); \n step3Finish = true;\n }\n }\n }\n \n if (step3Finish)\n {\n if (currentRoom == library)\n {\n if (exam)\n {\n System.out.println(\" A library with a lot of books is behind the door you just pushed. \\n\"\n + \"You see a big painting which depicts the same library where you are. There is just a difference between them. \\n\"\n + \"On the painting, a gramophone is pictured on a sideboard. The gramophone on the painting curiously looks like the gramophone in the dancing room. \\n\"\n + \"When you inspect the sideboard on the real library you see some wear marks as if an object was previously placed on it. \\n\"\n + \"You meet the chambermaid wanting to leave the library. She seems to want to tell you something but do not dare to approach you.\");\n canSpeak = true;\n exam = false;\n }\n if (speak_with_chambermaid)\n {\n chambermaid.setText(\"I saw Nina Taylor go to the gardener hut some nights. I do not know what she is doing there. \");\n canSpeak = false;\n speak_with_chambermaid = false;\n \n }\n }\n \n else if (currentRoom == corridor)\n {\n System.out.println(\"There is a statut with a weapon in this corridor. You can take it weapon if you want. \");\n // recupere arme\n Boolean fight; // this variable will be initialize with the fight\n if (fight)\n {\n if (exam)\n {\n System.out.println(\" You are in a corridor. You see four doors. Only two are opened.\");\n exam = false;\n step4Finish = true;\n }\n }\n }\n if (step4Finish)\n {\n if (currentRoom == bathroom)\n {\n if (exam)\n {\n System.out.println(\" You enter in the bathroom and you see the chambermaid treating the valet's arm. \\n\"\n + \" The wound looks like a rodent bite but it is much bigger than a rat. It is strange because Mr Taylor was allergic to animals. \\n\"\n + \"You notice that there is a potion on the furniture next to the chambermaid. She notices that you are injured. \\n\"\n + \"She signals to you that you can take it. \"); \n //permet de prendre la potion\n exam = false;\n }\n //ajout potion possible pour le joueur\n\n }\n if (currentRoom == guestbedroom)\n {\n if (exam)\n {\n System.out.println(\" You are in the guest bedroom. Today this bedroom is Mr&Ms Cunnigham's bedroom. Mr Cunnigham is in his bedrrom.\");\n mr_Cunningham.setRoom(guestbedroom);\n ms_Cunningham.setText(\"It is strange, last time this canvas was not here.\");\n can_exam_canvas = true;\n if (exam && can_exam_canvas)\n {\n System.out.println(\" You find a key behind the canvas and you take it.\");\n find_bedroom_key = true;\n player.addItem(bedroomkey);\n } \n exam = false;\n }\n }\n \n if (step5Finish)\n {\n if (find_bedroom_key)\n {\n corridor.modifyExit(\"south\");\n }\n if (currentRoom == bedroom)\n {\n if (exam)\n {\n System.out.println(\"You are in the host bedroom. You see a big safe with a four number code. Ms Taylor is in her room.\");\n ms_Taylor.setText(\"Oh no ! I am forgetting the number code ! Please, ask to my daughter, my guests and my employees. I gave to several of them a piece of this code. \");\n \n if (speak_with_ms_Taylor)\n {\n nina_Taylor.setRoom(dancingroom);\n nina_Taylor.setText(\"Bob Taylor has fallen into a 10-meter deep well and is trying to pull it up. \\n \" +\n \"Each day it rises 3 meters and slides 2 meters during the night.\\n\" +\n \"How many days will it take to get to the surface?\");\n ms_Wellington.setRoom(library);\n ms_Wellington.setText(\"In a girl group\\n\" +\n \" 70% wear a blue sweater\\n\" +\n \" 75% wear blue pants\\n\" +\n \" 85% wear a blue hat\\n\" +\n \" 85% wear a blue coat\\n\" +\n \"What is the minimum percentage of girls wearing only blue clothes?\");\n \n bob_Taylor.setRoom(library);\n bob_Taylor.setText(\"I saw my sister and my father arguing before his death.\");\n \n mr_Cunningham.setRoom(poolroom);\n mr_Cunningham.setText(\"David is 10 years old and his younger brother is half his age. \\n\" +\n \"When David will be 10 times older, how old will Franck be?\");\n \n \n }\n }\n }\n if (step6Finish)\n {\n if (currentRoom == bedroom)\n {\n System.out.println(\"Did you find the safe code? \");\n // enter the safe code -- creation int essai_code\n if (essai_code == safe_code)\n {\n System.out.println(\"You find the good number code, the safe door is opened. \\n \" +\n \"The safe contains a disk, a lot of money and a biscuits box.\");\n }\n }\n if (currentRoom == dancingroom\n // && il doit avoir le dique dans son inventaire\n )\n {\n ms_Taylor.setRoom(dancingroom);\n ms_Taylor.setText(\"What does this object do here, it should be in the library\");\n // player has to take the gramophone in his inventory\n }\n if (currentRoom == library \n // && il doit avoir le disque et le gramophone dans son inventaire\n )\n {\n System.out.println(\"You put the gramophone at its place and you insert the disk on it. \\n\"+\n \" You are hearing a loud noise and a door is appearing.\"); \n library.modifyExit(\"north\"); \n }\n if (step7Finish)\n {\n if (currentRoom == laboratory)\n {\n System.out.println(\"When you opened the door, a little green ghost appears and attacked you.\");\n if(fight_win)\n {\n System.out.println(\"The skeleton is dead. You see that one of its bone is strange. This bone seems to be carved as a key\");\n // joueur doit ramasser la clef\n \n if (exam)\n {\n System.out.println(\" You look and the desk and you find some construction plans. It seems that Mr Taylor wanted to dig very deeply at east from the garden. It is the same place than the gardener hut. \");\n }\n corridor.modifyExit(\"up\");\n System.out.println(\"You unblock a new room. A trapdoor appears in the corridor\");\n }\n }\n if (currentRoom == attic)\n {\n if (exam)\n {\n System.out.println(\" You finally discover the attic. It is dark because there is only one window lighting the room. \\n\"\n + \" You decide to look out the window and discover a huge garden hidden by the trees when guests arrive by the entrance. \");\n hall.modifyExit(\"north\");\n }\n }\n if (step8Finish)\n {\n if (currentRoom == garden)\n {\n if (exam)\n {\n System.out.println(\" You see a well at the north but there is a steel grid locked by a padlock.\\n\"\n + \"There is an apple tree next to it with only one apple on the tree. You can maybe pick up the apple and eat it now or later.\\n\"\n + \"\");\n }\n }\n }\n \n \n }\n \n \n \n \n /*player.addItem(necklace_red);\n player.addItem(necklace_red);\n player.addItem(necklace_red);*/\n /* \n \n \n // Enter the main command loop. Here we repeatedly read commands and\n // execute them until the game is over.\n \n boolean finished = false;\n while (! finished) {\n Command command = parser.getCommand();\n finished = processCommand(command);\n }\n System.out.println(\"Thank you for playing. Good bye.\");\n */\n }\n }\n }\n }\n }\n }\n \n }", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tGameGrafic game = null;\r\n\t\t\t\tGameState state = new GameState();\r\n\t\t\t\t// if (opt == 2) {\r\n\t\t\t\t// game = SaveGameOptions.load();\r\n\t\t\t\t// } else {\r\n\t\t\t\tgame = new GameGrafic(state);\r\n\t\t\t\t// }\r\n\r\n\t\t\t\tif (game != null) {\r\n\t\t\t\t\tgame.start();\r\n\t\t\t\t}\r\n\r\n\t\t\t}", "void newGame() {\n logger.log(\"New game starting.\");\n logger.log(divider);\n\n\n // Create the deck.\n createDeck();\n logger.log(\"Deck loaded: \" + deck.toString());\n\t logger.log(divider);\n\n\n // Shuffle the deck.\n shuffleDeck();\n logger.log(\"Deck shuffled: \" + deck.toString());\n logger.log(divider);\n\n // Create the players.\n createPlayers();\n setGameState(GameState.PLAYERS_SPAWNED);\n\n // Deal cards to players' decks.\n deal();\n for (Player player : players) {\n logger.log(\"Hand: \" + player);\n }\n \n\n // Randomly select the active player for the first round.\n selectRandomPlayer();\n\n setGameState(GameState.NEW_GAME_INITIALISED);\n }", "@Override\r\n\tpublic void updateGameFinished() {\n\t\t\r\n\t}", "public Game() {\n\n\t}", "public static void startGame()\r\n\t{\r\n\t\tnew ModeFrame();\r\n\t}", "public GameScreen() {\n\n\t\tint midPointY = (int) (Const.GAME_HEIGHT / 2);\n\n\t\tworld = new GameWorld(midPointY);\n\t\trenderer = new GameRenderer(world);\n\n\t\tGdx.input.setInputProcessor(new InputHandler(world.getVentilatorUp(), world.getVentilatorDown()));\n\t\t// Gdx.input.setInputProcessor(new\n\t\t// InputHandler(world.getVentilatorTwo()));\n\t}", "void gameTie();", "public void newGameRPS() {\n newGame();\n myctr.setLabels();\n }", "@Override\n public int loadGame(String foo) {\n RunGame.loadGame(foo);\n return 0;\n }", "public void startDummyGame()\n\t{\n\t\t//game.dummyGame();\n\t}", "void initializeGame() {\n // Initialize players\n // Put the pieces on the board\n }", "public Game() \n {\n parser = new Parser();\n name = new String();\n player = new Player();\n ai = new AI();\n createRooms();\n rand = -1;\n enemyPresent = false;\n wantToQuit = false;\n alive = true;\n createItems();\n createWeapons();\n createEnemy();\n setEnemy();\n setItems();\n setWeapons();\n setExits();\n }", "public void newGame(){\n\t\tsoundMan.BackgroundMusic1();\n\n\t\tstatus.setGameStarting(true);\n\n\t\t// init game variables\n\t\tbullets = new ArrayList<Bullet>();\n\n\t\tstatus.setShipsLeft(8);\n\t\tstatus.setGameOver(false);\n\n\t\tif (!status.getNewLevel()) {\n\t\t\tstatus.setAsteroidsDestroyed(0);\n\t\t}\n\n\t\tstatus.setNewAsteroid(false);\n\n\t\t// init the ship and the asteroid\n\t\tnewShip(gameScreen);\n\t\tnewAsteroid(gameScreen);\n\n\t\t// prepare game screen\n\t\tgameScreen.doNewGame();\n\t\tsoundMan.StopMusic2();\n\t\tsoundMan.StopMusic3();\n\t\tsoundMan.StopMusic4();\n\t\tsoundMan.StopMusic5();\n\t\tsoundMan.StopMusic6();\n\t\t// delay to display \"Get Ready\" message for 1.5 seconds\n\t\tTimer timer = new Timer(1500, new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tstatus.setGameStarting(false);\n\t\t\t\tstatus.setGameStarted(true);\t\n\n\t\t\t\tstatus.setLevel(1);\n\t\t\t\tstatus.setNumLevel(1);\n\t\t\t\tstatus.setScore(0);\n\t\t\t\tstatus.setYouWin(false);\n\t\t\t\tstatus.setBossLife(0);\n\t\t\t}\n\t\t});\n\t\ttimer.setRepeats(false);\n\t\ttimer.start();\n\t}", "public void newGameJBJ() {\n newGame();\n min = 0; max = 1000;\n myctr.setMinMaxLabel();\n myctr.setLabels();\n }", "private void GameInitialize()\r\n { \r\n // set to fullscreen to use the entire \r\n // display or false to only use\r\n // the area inbetween the two bars on the display\r\n setFullScreenMode(true);\r\n\r\n // setup 3D\r\n try\r\n {\r\n Object3D[] buffer = Loader.load(\"/RaptorWalk.m3g\");\r\n\r\n for(int i = 0; i < buffer.length; i++)\r\n {\r\n if(buffer[i] instanceof World)\r\n {\r\n // get our world node\r\n mWorld = (World)buffer[i];\r\n mEnemy = (SkinnedMesh)mWorld.find(56);\r\n mEnemyTimer = 0;\r\n break;\r\n }\r\n }\r\n }\r\n catch(Exception e) \r\n { System.out.println(\"Loading error!\" + e.getMessage()); }\r\n\r\n // create a game font\r\n mGameFont = Font.getFont(Font.FACE_MONOSPACE, \r\n Font.STYLE_PLAIN, Font.SIZE_SMALL);\r\n\r\n // Get the active camera from the world\r\n mCam = mWorld.getActiveCamera();\r\n mCam.translate(0, 1.0f, 0);\r\n\r\n // Create an ambient light and add it to the world node\r\n Light light = new Light();\r\n light.setMode(Light.AMBIENT);\r\n light.setIntensity(3);\r\n mWorld.addChild(light);\r\n }", "public Game() {\n\t\tthis.setMode(this.gameModes[0]);\n\t\tthis.SIZE = this.mode.getSize();\n\t\tint x = Random.nextInt(0, 5);\n\t\tSystem.out.println(x);\n\t\tthis.newCandy();\n\t}", "public GameLogic() {\n this.display = createScreen();\n playerShipHealth = 30;\n enemyShipHealth = 20;\n playerShield = 1;\n enemyShield = 1;\n playerMissile = 10;\n enemyMissile = 5;\n\n isPlayerPilotDamaged = false;\n isPlayerGunLDamaged = false;\n isPlayerGunMDamaged = false;\n isPlayerShieldDamaged = false;\n isPlayerEngineDamaged = false;\n\n isEnemyPilotDamaged = false;\n isEnemyGunLDamaged = false;\n isEnemyGunMDamaged = false;\n isEnemyShieldDamaged = false;\n isEnemyEngineDamaged = false;\n\n playerEvasionPercent = .3;\n enemyEvasionPercent = .3;\n\n }", "@Override\r\n\t\t\tpublic void playGame() {\n\t\t\t\tSystem.out.println(\"隐式调用接口\");\r\n\t\t\t}", "public HowToPlay()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(763, 578, 1); \n //HowToPlay play = new HowToPlay();\n }", "public void newGame()\n\t{\n\t\tmap = new World(3, viewSize, playerFactions);\n\t\tview = new WorldView(map, viewSize, this);\n\t\tbar = new Sidebar(map, barSize);\n\t}", "public PigLocalGame() {\n pgs = new PigGameState();\n }", "public void initGame() {\n // clear the board contents\n board.init();\n // CROSS speelt eerst\n currentPlayer = Mark.CROSS;\n currentState = GameState.PLAYING;\n // ready for start\n }", "@Override\r\n\t\t\tpublic void playGame() {\n\t\t\t\tSystem.out.println(\"调用打游戏的功能\");\r\n\t\t\t}", "public void newGame() {\n\n\n inGame = true;\n mines_left = mines+ePirate+mPirate+hPirate;\n\n all_cells = rows * cols;\n field = new int[all_cells];\n\n for (int i = 0; i < all_cells; i++)\n field[i] = COVER_FOR_CELL;\n\n statusbar.setText(Integer.toString(mines_left));\n\n // draw the board -- pass to the undo array\n drawBoard(mines) ; // now rocks\n drawBoard(ePirate) ;\n drawBoard(mPirate) ;\n drawBoard(hPirate) ;\n\n }", "public void newGame() {\n // this.dungeonGenerator = new TowerDungeonGenerator();\n this.dungeonGenerator = cfg.getGenerator();\n\n Dungeon d = dungeonGenerator.generateDungeon(cfg.getDepth());\n Room[] rooms = d.getRooms();\n\n String playername = JOptionPane.showInputDialog(null, \"What's your name ?\");\n if (playername == null) playername = \"anon\";\n System.out.println(playername);\n\n this.player = new Player(playername, rooms[0], 0, 0);\n player.getCurrentCell().setVisible(true);\n rooms[0].getCell(0, 0).setEntity(player);\n\n frame.showGame();\n frame.refresh(player.getCurrentRoom().toString());\n frame.setHUD(player.getGold(), player.getStrength(), player.getCurrentRoom().getLevel());\n }", "void askStartGame();", "public void startGame() {\n status = Status.COMPLETE;\n }", "@Override\r\n public void playGame() {\r\n printInvalidCommandMessage();\r\n }", "public void displayGameMode (Graphics g1)\n {\n if (state == 1)\n {\n if (sprite == 2)\n g1.drawImage (new ImageIcon (\"Images/1P2P/1/2player2.png\").getImage(), 0, 0, null);\n else if (sprite == 1)\n g1.drawImage (new ImageIcon (\"Images/1P2P/1/1player2.png\").getImage(), 0, 0, null);\n else \n g1.drawImage (new ImageIcon (\"Images/1P2P/1/plain2.png\").getImage(), 0, 0, null);\n }\n \n else if (state == 2)\n {\n if (sprite == 2)\n g1.drawImage (new ImageIcon (\"Images/1P2P/2/2player2.png\").getImage(), 0, 0, null);\n else if (sprite == 1)\n g1.drawImage (new ImageIcon (\"Images/1P2P/2/1player2.png\").getImage(), 0, 0, null);\n else \n g1.drawImage (new ImageIcon (\"Images/1P2P/2/plain2.png\").getImage(), 0, 0, null);\n }\n \n else if (state == 3)\n {\n if (sprite == 2)\n g1.drawImage (new ImageIcon (\"Images/1P2P/3/2player.png\").getImage(), 0, 0, null);\n else if (sprite == 1)\n g1.drawImage (new ImageIcon (\"Images/1P2P/3/1player.png\").getImage(), 0, 0, null);\n else \n g1.drawImage (new ImageIcon (\"Images/1P2P/3/plain.png\").getImage(), 0, 0, null);\n }\n \n else if (state == 4)\n {\n if (sprite == 2)\n g1.drawImage (new ImageIcon (\"Images/1P2P/4/2player.png\").getImage(), 0, 0, null);\n else if (sprite == 1)\n g1.drawImage (new ImageIcon (\"Images/1P2P/4/1player.png\").getImage(), 0, 0, null);\n else \n g1.drawImage (new ImageIcon (\"Images/1P2P/4/plain.png\").getImage(), 0, 0, null);\n }\n \n bird1.displayDisplayCharacter (g1);\n bird2.displayDisplayCharacter (g1);\n bird3.displayDisplayCharacter (g1);\n }", "private GUIGameInfo() {\n this.board = new GUIBoard();\n this.logic = new regLogic();\n this.players = new Player[2];\n this.players[0] = new Player(Symbol.BLACK);\n this.players[1] = new Player(Symbol.WHITE);\n this.guiPlayers = new GUIPlayer[2];\n this.guiPlayers[0] = new GUIPlayer(this.players[0]);\n this.guiPlayers[1] = new GUIPlayer(this.players[1]);\n\n }" ]
[ "0.7013253", "0.6990264", "0.67906994", "0.67369795", "0.6662803", "0.6640217", "0.64941686", "0.6475184", "0.6471658", "0.6459604", "0.64520985", "0.64507294", "0.64439577", "0.64424723", "0.64424723", "0.64424723", "0.6428613", "0.6418317", "0.64143705", "0.63932425", "0.639143", "0.6391052", "0.6389131", "0.6379919", "0.6366544", "0.6364987", "0.6364186", "0.6346809", "0.6346809", "0.63425857", "0.6338059", "0.6335114", "0.6330143", "0.6311281", "0.63021725", "0.6287289", "0.62737435", "0.6272828", "0.62638164", "0.6262268", "0.6262268", "0.6262268", "0.626054", "0.6246142", "0.6241404", "0.6241072", "0.62295115", "0.62293357", "0.62232596", "0.62174714", "0.6216055", "0.62015224", "0.6199367", "0.6182897", "0.61771303", "0.61672795", "0.615504", "0.6154143", "0.6153051", "0.6151703", "0.61502576", "0.6150034", "0.614923", "0.6145117", "0.6144746", "0.61254066", "0.6124576", "0.6114181", "0.6103617", "0.60963374", "0.608437", "0.60838413", "0.607807", "0.60737324", "0.60697925", "0.6065605", "0.6057262", "0.60532165", "0.6051805", "0.60513145", "0.6050344", "0.6048285", "0.60473746", "0.60470873", "0.6046986", "0.6046326", "0.603681", "0.60354364", "0.60284084", "0.6027878", "0.60242", "0.60237545", "0.60215163", "0.6019344", "0.60172284", "0.6017063", "0.6016211", "0.60132164", "0.60099447", "0.60098046", "0.6008224" ]
0.0
-1
Constructor for Parcel. Its private so that only the CREATOR field can access.
private Movie(Parcel in) { id = in.readString(); title = in.readString(); overview = in.readString(); posterUrl = in.readString(); userRating = in.readString(); releaseDate = in.readString(); runtime = in.readInt(); isFavorite = in.readByte() != 0; castList = in.createTypedArrayList(Cast.CREATOR); reviews = in.createTypedArrayList(Review.CREATOR); trailers = in.createTypedArrayList(Trailer.CREATOR); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Person(final Parcel in) {\n super();\n readFromParcel(in);\n }", "Parcelle createParcelle();", "private Driver(Parcel in) {\n super(in);\n }", "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 PjxParser()\r\n {\r\n LOG.info(this + \" instantiated\");\r\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 }", "public IntPar() { }", "public PARiverDataGenerator() {\n }", "amx(Parcel parcel) {\n int n = 1;\n this.a = parcel.readInt();\n this.b = parcel.readInt();\n if (parcel.readInt() != n) {\n n = 0;\n }\n this.c = n;\n }", "private Task(Parcel in) {\n\t\tid = in.readInt();\n\t\tuser_id = in.readInt();\n\t\ttitle = in.readString();\n\t\tdescription = in.readString();\n\t\tdate = (Calendar) in.readSerializable();\n\t\tcreated_at = (Calendar) in.readSerializable();\n\t\tupdated_at = (Calendar) in.readSerializable();\n\t}", "private void __sep__Constructors__() {}", "public Poi() {\n }", "@Override // android.os.Parcelable.Creator\n public final /* synthetic */ lw createFromParcel(Parcel parcel) {\n return new lw(parcel, (byte) 0);\n }", "public \n PipedObjectReader() \n {}", "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 }", "@Override\n public NoteInfo createFromParcel(Parcel parcel) {\n\n return new NoteInfo(parcel);\n }", "private Row() {\n }", "public Pojo1110110(){\r\n\t}", "@Override\n\t\tpublic Info createFromParcel(Parcel source) {\n\t\t\treturn new Info(source);\n\t\t}", "@DISPID(-2147417603)\n @PropGet\n com4j.Com4jObject constructor();", "public Contact(Parcel in){\n\n readFromParcel(in);\n\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 ProcessDataMapper() {\t}", "public ActiveRowMapper() {\n\t}", "public Cell()\n\t{\n\t}", "protected PlatonCapture(final Parcel in) {\n super(in);\n }", "private Sequence() {\n this(\"<Sequence>\", null, null);\n }", "protected Token(Parcel in) {\n this.mAccessToken = in.readString();\n this.mRefreshToken = in.readString();\n this.mExpiresIn = (Long) in.readValue(Long.class.getClassLoader());\n this.mTokenType = in.readString();\n long tmpMTokenReceivedDate = in.readLong();\n this.mTokenReceivedDate = new Date(tmpMTokenReceivedDate);\n }", "public Pair() {\r\n\t}", "private Message(Parcel in) {\n text = in.readString();\n sender = in.readString();\n target = in.readString();\n sendersLatitude = in.readDouble();\n sendersLongitude = in.readDouble();\n numHops = in.readInt();\n expirationTime = in.readLong();\n createdByUser = in.readInt();\n }", "public mapper3c() { super(); }", "public ParseException() {\n super();\n specialConstructor = false;\n }", "protected Product(Parcel in) {\r\n quantity = in.readInt();\r\n name = in.readString();\r\n checked = in.readByte() != 0;\r\n }", "public PipelineImpl() {\n }", "public final BusPath createFromParcel(Parcel parcel) {\n return new BusPath(parcel);\n }", "public ParcelableGeneralCellInfo(Parcel parcel) {\n super(parcel.readString(), parcel.readString(), parcel.readString(), parcel.readString(), parcel.readByte() != 0, parcel.readString(), parcel.readString(), parcel.readString(), parcel.readString(), parcel.readByte() != 0, (ParcelableCdmaCellInfo) parcel.readParcelable(ParcelableCdmaCellInfo.class.getClassLoader()));\n }", "public PIInfo() {\n }", "public MapperBase() {\r\n }", "private Note(Parcel in) {\n content = in.readString();\n color = (Color) in.readSerializable();\n }", "public Reparto(){\n\t\t\n\t}", "public StubPrivateConstructorPair() {\r\n this(null, null);\r\n }", "public Job() {\n\t\t\t\n\t\t}", "protected User(Parcel in) {\n this.names = in.readString();\n this.lastnames = in.readString();\n this.age = in.readInt();\n }", "protected SheetCollate(int paramInt) {\n/* 182 */ super(paramInt);\n/* */ }", "public EmoticonBO( Parcel source )\n {\n readFromParcel( source );\n }", "@Override\n public Movie createFromParcel(Parcel in) {\n return new Movie(in);\n }", "public j(@org.jetbrains.annotations.NotNull android.os.Parcel r14) {\n /*\n r13 = this;\n java.lang.String r0 = \"parcel\"\n kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull(r14, r0)\n int r2 = r14.readInt()\n int r3 = r14.readInt()\n int r4 = r14.readInt()\n int r5 = r14.readInt()\n int r6 = r14.readInt()\n float r7 = r14.readFloat()\n int r8 = r14.readInt()\n java.lang.String r9 = r14.readString()\n java.lang.String r0 = \"parcel.readString()\"\n kotlin.jvm.internal.Intrinsics.checkExpressionValueIsNotNull(r9, r0)\n java.lang.String r10 = r14.readString()\n java.lang.String r11 = r14.readString()\n java.lang.String r12 = r14.readString()\n r1 = r13\n r1.<init>(r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12)\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.ss.android.ugc.aweme.draft.a.j.<init>(android.os.Parcel):void\");\n }", "protected IPCGCallDetailCreator()\r\n {\r\n // empty\r\n }", "public PapelBean() {\n }", "@Override\n\t\tpublic photo createFromParcel(Parcel in) {\n\t\t\t return new photo(in);\n\t\t}", "@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 }", "protected Stock(Parcel in) {\n sid = in.readInt();\n companyName = in.readString();\n symbol = in.readString();\n primaryExchange = in.readDouble();\n latestValue = in.readDouble();\n stockPrice = in.readDouble();\n numberOfStocks = in.readInt();\n stockSector = in.readString();\n long tmpTimeStamp = in.readLong();\n timeStamp = tmpTimeStamp != -1 ? new Date(tmpTimeStamp) : null;\n }", "public Pair() {\n // nothing to do here\n }", "public Parrot(String name) {\r\n\t\tsuper(name);\r\n\t}", "private CSVParser() {\n this.headerMap = new HashMap<>();\n this.header = null;\n this.toDoList = new ToDoList();\n }", "private MappingReader() {\n\t}", "public Cell(){}", "Constructor() {\r\n\t\t \r\n\t }", "public Column createFromParcel(Parcel parcel) {\n return new Column(parcel);\n }", "public Job() {\n }", "public Job() {\n }", "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 }", "public Chunk() {\n }", "@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 MsxReader ( ) {\r\n\t\tsuper();\r\n\t}", "private PassedData(Parcel p) {\n this.a = p.readInt();\n this.b = p.readLong();\n this.c = p.readString();\n }", "private Mapper() {\n\n }", "private Tuples() {\n // prevent instantiation.\n }", "@Override // android.os.Parcelable.Creator\n public /* synthetic */ CounterConfiguration createFromParcel(Parcel parcel) {\n return new CounterConfiguration(parcel);\n }", "public CSVList()\n\t{\n\t\tsuper(sepReg, sep);\n\t}", "public PSRelation()\n {\n }", "protected abstract void construct();", "public PoisonPillXMLChunk() {\n\t\t}", "public ColumnInfo() {\n\n\t}", "private User(Parcel in) {\n mData = in.readInt();\n }", "public Parametros() {\r\n semilla = SEMILLA_DEFECTO;\r\n numeroPistas = NUMERO_PISTAS_DEFECTO;\r\n duracionSlot = DURACION_SLOT_DEFECTO;\r\n frecuencia = FRECUENCIA_DEFECTO;\r\n duracionMedia = DURACION_MEDIA_DEFECTO;\r\n duracionDesviacion = DURACION_DESVIACION_DEFECTO;\r\n duracionMinima = DURACION_MINIMA_DEFECTO;\r\n demoraMedia = DEMORA_MEDIA_DEFECTO;\r\n demoraDesviacion = DEMORA_DESVIACION_DEFECTO;\r\n }", "public Reader(){\n\n\t}", "private Instantiation(){}", "public XL() {\n Reporter.log(\"New XL ctor\", true);\n }", "public Person(Park park, ArrayList<Integer> path) {\n this.park = park;\n this.intendedPath = path;\n Cell tryStart = park.graph.getCell(intendedPath.get(0));\n if (tryStart.getPerson() != null) {\n System.out.println(\"PERSON ERROR: UNABLE TO CREATE PERSON, CELL IS OCCUPIED\");\n } else {\n tryStart.setPerson(this);\n }\n }", "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 void construct() throws IOException {\n \n }", "private Tuples() {}", "protected NewLocation(Parcel in) {\n locationID = in.readInt();\n longitude = in.readDouble();\n altitude = in.readDouble();\n latitude = in.readDouble();\n speed = in.readFloat();\n time = in.readLong();\n }", "protected Alarm(Parcel in) {\n mUid = in.readInt();\n long tmpMDate = in.readLong();\n mDate = Objects.requireNonNull(tmpMDate != -1 ? new DateTime(tmpMDate) : null);\n mLabel = in.readString();\n mEnabled = in.readByte() != 0;\n }", "public Partage() {\n }", "public Job() {\r\n\t\tSystem.out.println(\"Constructor\");\r\n\t}", "@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 }", "private Constructor getConstructor() throws Exception {\r\n return type.getConstructor(Contact.class, label, Format.class);\r\n }", "@Override\n\t\tpublic NewDoc createFromParcel(Parcel source) {\n\t\t\treturn new NewDoc(source);\n\t\t}", "public Trip(Parcel p) \n\t{\n\t\tp.readTypedList(friends, Person.CREATOR);\n\t\ttripId = p.readLong();\n\t\tserverRefId = p.readLong();\n\t\ttripName = p.readString();\n\t\tdestinationName = p.readString();\n\t\tcreator = p.readString();\n\t\tdate = new Date(p.readLong());\n\t}", "@Override\n public ImageData createFromParcel(Parcel source) {\n return new ImageData(source); // using parcelable constructor\n }", "public XpeDccContractLineImpl() {\n }", "public Constructor(){\n\t\t\n\t}", "private InvoiceCSVHelper() {\n }", "public CommAreaRecord() {\n\t}", "@Override\n public JobResumeCountInfoBean createFromParcel(Parcel source) {\n JobResumeCountInfoBean jobResumeCountInfoBean = new JobResumeCountInfoBean();\n jobResumeCountInfoBean.job_resume = source.readString();\n jobResumeCountInfoBean.job_id = source.readString();\n jobResumeCountInfoBean.job_name = source.readString();\n jobResumeCountInfoBean.issue_date = source.readString();\n jobResumeCountInfoBean.quyu = source.readString();\n return jobResumeCountInfoBean;\n }", "public Person() {\n\t\t\n\t}", "private UniqueChromosomeReconstructor() { }", "@Override\n public SpesaObject createFromParcel(Parcel in) {\n return new SpesaObject(in);\n }", "public Position()\n\t{\n\t\t// do not remove bean constructor.\n\t}" ]
[ "0.7166764", "0.67395186", "0.65962833", "0.63625336", "0.63286424", "0.6326321", "0.62879246", "0.6268316", "0.6174771", "0.6139264", "0.6135016", "0.61182135", "0.6106655", "0.6096365", "0.6093339", "0.60904956", "0.60801643", "0.6078839", "0.6058142", "0.5995397", "0.59855604", "0.595831", "0.5924857", "0.5908663", "0.5878242", "0.5876311", "0.58444494", "0.57979274", "0.5791564", "0.5789076", "0.57844347", "0.57746625", "0.57726073", "0.5769877", "0.57643455", "0.5756958", "0.57565147", "0.5755155", "0.57517266", "0.57452524", "0.57415026", "0.5728436", "0.57199824", "0.5715393", "0.5706447", "0.5705782", "0.56944263", "0.5694257", "0.5684432", "0.5680904", "0.5677971", "0.56759536", "0.5671227", "0.5659073", "0.5657314", "0.5657134", "0.565294", "0.564948", "0.56446105", "0.56387633", "0.56387633", "0.5637586", "0.5622771", "0.562262", "0.5615166", "0.5612912", "0.56106776", "0.5606732", "0.56042767", "0.55867434", "0.5584521", "0.55840194", "0.5574172", "0.556717", "0.55625015", "0.55604416", "0.5557144", "0.5555158", "0.55549586", "0.555492", "0.5548102", "0.5540164", "0.55361015", "0.5520021", "0.55181044", "0.5510482", "0.5510396", "0.55051106", "0.5504755", "0.5503997", "0.55032504", "0.55025595", "0.54985684", "0.5494995", "0.5494398", "0.5490252", "0.54833627", "0.5482569", "0.5482448", "0.54817325", "0.5478918" ]
0.0
-1
Gets the ID of the movie.
public String getId() { return id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getMovieId() {\n Long res = getLongOrNull(VideoColumns.MOVIE_ID);\n if (res == null)\n throw new NullPointerException(\"The value of 'movie_id' in the database was null, which is not allowed according to the model definition\");\n return res;\n }", "public int getMovieId() {\n\t\treturn movieId;\n\t}", "public String getMovieId() {\n return movieID;\n }", "public Number movieID() {\n\n\t\tif (rawMovie == null) {\n\n\t\t\tif (movie != null) {\n\t\t\t\tObject result = Application.myApplication().primaryKeyForObject(movie);\n\t\t\t\tString title = (String) movie.valueForKey(MovieTitleKey);\n\t\t\t\trawMovie = new NSDictionary<String, Object>(new Object[] { result, title }, new String[] { MovieIDKey, MovieTitleKey });\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\treturn (Number) rawMovie.valueForKey(MovieIDKey);\n\t}", "public int getMovieID() {\n return this.movieID;\n }", "public int getMovieID() {\n return movieID;\n }", "private int getMovieId() {\n\t\treturn 0;\n\t}", "int getMovieId() {\n return this.movieID;\n }", "@Override\n\tpublic int getMovieID(String movieName) {\n\t\treturn movieID;\n\t}", "public String getFilmId() {\n return filmId;\n }", "public int getFilmId()\r\n {\r\n return this.filmId;\r\n }", "public int getMovieTmdbId() {\n Integer res = getIntegerOrNull(MovieColumns.TMDB_ID);\n if (res == null)\n throw new NullPointerException(\"The value of 'tmdb_id' in the database was null, which is not allowed according to the model definition\");\n return res;\n }", "Movie getMovieById(final int movieId);", "public String getId()\n\t\t{\n\t\t\treturn mediaElement.getAttribute(ID_ATTR_NAME);\n\t\t}", "java.lang.String getID();", "public String getId() {\n\t\treturn this.token.get(\"id\").toString();\n\t}", "public int getId(){\n if (ID != null) {\n int i = Integer.parseInt(ID);\n return i;\n }\n return 0;\n }", "@Override\n public Movie getFromId (Integer id) {return this.movies.get(id);}", "public String getId()\r\n {\r\n return getAttribute(\"id\");\r\n }", "String getID();", "String getID();", "String getID();", "String getID();", "public int getId() {\n//\t\tif (!this.isCard())\n//\t\t\treturn 0;\n\t\treturn id;\n\t}", "public static String id()\n {\n return _id;\n }", "Integer getID();", "Integer getID();", "public String getID() {\n return (id);\n }", "String getVideoId() {\n return videoId;\n }", "public Movie findOne(long ID){\n\t\treturn theMoviewRepository.getOne(ID);\n\t}", "public int getId() {\n\t\treturn Integer.parseInt(Id);\n\t}", "public String getId() {\n\t\treturn this.playerid;\n\t}", "String getVideoId() {\r\n return videoId;\r\n }", "public int getId() {\n\t\t\treturn id_;\n\t\t}", "public int getId() {\n\t\t\treturn id_;\n\t\t}", "public String getId() {\n return getObjectId();\n }", "public String getId()\r\n\t{\n\t\treturn id.substring(2, 5);\r\n\t}", "public int getId() {\n\t\t\t\treturn id_;\n\t\t\t}", "public int getId() {\n\t\t\t\treturn id_;\n\t\t\t}", "public Film getFilmById(Integer id);", "public Long getId() {\r\n\t\treturn objectId;\r\n\t}", "public int getID() {\n return(this.id);\n }", "public final int getId() {\n\t\treturn JsUtils.getNativePropertyInt(this, \"id\");\n\t}", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "public long getID() {\n\t\treturn id;\n\t}", "void setMovieId(int movieID) {\n this.movieID = movieID;\n }", "public static long getMovieIdFromUri(Uri uri)\n {\n return ContentUris.parseId(uri);\n }", "public static long getMovieIdFromUri(Uri uri)\n {\n return ContentUris.parseId(uri);\n }", "Movie findOne(@Param(\"id\") Long id);", "public long getId() {\n\t\treturn(id);\n\t}", "public int get_id() {\n return _id;\n }", "public int getID() {\n\t\treturn _id;\n\t}", "public int getID() {\n return this._id;\n }", "public String getId()\n\t{\n\t\treturn m_sID;\t\n\t}", "public int getID() {\n\t\t\treturn id;\n\t\t}", "java.lang.String getPlayerId();", "public long getId() {\n\t\treturn Long.parseLong(_id);\n\t}", "public String getID() {\r\n \t\treturn _id;\r\n \t}", "public Movie getMovie() {\r\n\t\treturn movie;\r\n\t}", "public int getID() {\n\n\t\treturn id;\n\t}", "long getCaptureFestivalId();", "@RequestMapping(\n value = \"/getMovieId/{movieId}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE\n\n )\n public ResponseEntity<Object> getMovieId(@PathVariable(\"movieId\") Long id) {\n Optional<MoviesEntity> moviesOptional = moviesService.findById(id);\n return new ResponseEntity<Object>(moviesOptional, HttpStatus.OK);\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public java.lang.String getId() {\n return id;\n }", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}" ]
[ "0.79442185", "0.7900971", "0.78221905", "0.7784207", "0.7689706", "0.7611737", "0.7595263", "0.7414453", "0.72705406", "0.7029269", "0.6935318", "0.6822972", "0.6806294", "0.67163646", "0.63527757", "0.61856544", "0.6185484", "0.6184781", "0.61718315", "0.6156419", "0.6156419", "0.6156419", "0.6156419", "0.61523277", "0.614869", "0.61478585", "0.61478585", "0.6118502", "0.61129105", "0.60979", "0.60828376", "0.6076541", "0.606839", "0.6061091", "0.6061091", "0.6054297", "0.60539705", "0.603878", "0.603878", "0.60343665", "0.60191536", "0.6015071", "0.6006374", "0.6002182", "0.6002182", "0.6002182", "0.6002182", "0.6002182", "0.6002182", "0.6002182", "0.6002182", "0.6002182", "0.6002182", "0.6002182", "0.59984195", "0.5997407", "0.59971803", "0.59971803", "0.59963036", "0.5992678", "0.5990818", "0.59893215", "0.59858495", "0.59804904", "0.5974115", "0.5967236", "0.5965088", "0.59650534", "0.5965028", "0.5964512", "0.59624803", "0.5959313", "0.5958207", "0.5958207", "0.5958207", "0.5958207", "0.5958207", "0.5958207", "0.5958207", "0.5958207", "0.5958207", "0.5958207", "0.5958207", "0.5958207", "0.5958207", "0.5958207", "0.5958207", "0.5958207", "0.5958207", "0.5958207", "0.5958207", "0.5958207", "0.5958207", "0.5958207", "0.5958207", "0.5957557", "0.5957557", "0.59553653", "0.5951736", "0.5951736", "0.5951736" ]
0.0
-1
Sets the ID of the movie.
public void setId(String id) { this.id = id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setMovieId(int movieID) {\n this.movieID = movieID;\n }", "public void setId(ID id){\r\n\t\tthis.id = id;\r\n\t}", "public void setId(Object id) {\n this.id = id;\n }", "public void setId(Object id) {\n this.id = id;\n }", "public void setId(ID id)\n {\n this.id = id;\n }", "public void setId(int id)\r\n {\r\n this.mId = id;\r\n }", "public void setId (int id) {\r\n\t\tthis.id=id;\r\n\t}", "public void setId(int id_)\n\t{\n\t\tthis.id=id_;\n\t}", "public void setId(int id) {\n \t\tthis.id = id;\n \t}", "public void setId(int id){\n\t\tthis.id = id;\n\t}", "public void setId(String id)\n {\n data().put(_ID, id);\n }", "public void setId(int id) {\n\t\tthis._id = id;\n\t}", "public void setId(int id) {\n\t\tthis._id = id;\n\t}", "public void setId(String id)\n\t\t{\n\t\t\tif (id == null || id.equals(\"\"))\n\t\t\t\tmediaElement.removeAttribute(ID_ATTR_NAME);\n\t\t\telse\n\t\t\t\tmediaElement.setAttribute(ID_ATTR_NAME, id);\n\t\t}", "public void setId(String id) {\n mId = id;\n }", "public void setId(final int id) {\n mId = id;\n }", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(final int id);", "public void setId(int id)\n {\n this.id = id;\n }", "public void setId(int id)\n {\n this.id = id;\n }", "public void setId(int id) {\r\n this.id = id;\r\n }", "public void setId(int id) {\r\n this.id = id;\r\n }", "public void setId(int id) {\r\n this.id = id;\r\n }", "public void setId(int id) {\r\n this.id = id;\r\n }", "public void setId(int id) {\n this.id = id;\n }", "public void setId(int id) {\n this.id = id;\n }", "public void setId(int id) {\n this.id = id;\n }", "void setId(int id) {\n this.id = id;\n }", "public void setId(int id) {\n this.id = id;\n }", "public void setId(int id) {\n this.id = id;\n }", "public void setId(int id) {\n this.id = id;\n }", "public void setId(int id) {\n this.id = id;\n }", "public void setId(int id) {\n this.id = id;\n }", "public void setId(int id) {\n this.id = id;\n }", "public void setId(int id) {\n this.id = id;\n }", "public void setId(int id) {\n this.id = id;\n }", "public void setId(int id) {\n this.id = id;\n }", "public void setId(int id) {\n this.id = id;\n }", "public void setId(int id) {\n this.id = id;\n }", "public void setId(int id) {\n this.id = id;\n }", "public void setId(int id) {\n this.id = id;\n }", "public void setId(int id) {\n this.id = id;\n }", "public void setId(int id) {\n this.id = id;\n }", "public void setId(int id) {\n this.id = id;\n }", "public void setId(int id) {\n this.id = id;\n }", "public void setId(int id) {\n this.id = id;\n }", "public void setId(int id) {\n this.id = id;\n }", "public void setId(int id) {\n this.id = id;\n }", "public void setId(int id) {\n this.id = id;\n }", "public void setId(int id) {\n this.id = id;\n }", "public void setId(int id) {\n this.id = id;\n }", "public void setId(int id) {\n this.id = id;\n }", "public void setId(int id) {\n this.id = id;\n }", "public void setId(int id) {\r\n\t\t_id = id;\r\n\t}", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "@Override\n\tpublic void setId(int id) {\n\t\tthis.ID = id;\n\t}", "public void setId(int id){\r\n this.id = id;\r\n }", "public void setId(int id)\n {\n\tthis.id = id;\n }", "public void setId(String id){\r\n\t\tthis.id = id;\r\n\t}", "private void setId(int value) {\n \n id_ = value;\n }", "public void setId(int id) {\n\t\tif(id > 0)\n\t\t\tthis.id = id;\n\t}", "public void setMovieId(int movieId) {\n\t\tthis.movieId = movieId;\n\t}", "public void setId(final int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId (String id) {\n this.id = id;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "public void setId (String id)\n {\n _id = id;\n }", "void setID(java.lang.String id);", "public void setId( final String id )\r\n {\r\n this.id = id;\r\n }", "public void setId(int id) {\n this.id = id;\n\t}", "public void setId(String id) {\n this.id = id;\n }" ]
[ "0.76226526", "0.71122587", "0.7072455", "0.7072455", "0.7021731", "0.7019421", "0.696197", "0.69569993", "0.6954523", "0.69521433", "0.6945173", "0.69434583", "0.69434583", "0.6936827", "0.6932667", "0.691525", "0.6914033", "0.6914033", "0.6914033", "0.6914033", "0.6914033", "0.6914033", "0.6914033", "0.6914033", "0.6914033", "0.6914033", "0.6914033", "0.6900307", "0.689179", "0.689179", "0.6891499", "0.6891499", "0.6891499", "0.6891499", "0.6887865", "0.6887865", "0.6887865", "0.68736345", "0.6872055", "0.6872055", "0.6872055", "0.6872055", "0.6872055", "0.6872055", "0.6872055", "0.6872055", "0.6872055", "0.6872055", "0.6872055", "0.6872055", "0.6872055", "0.6872055", "0.6872055", "0.6872055", "0.6872055", "0.6872055", "0.6872055", "0.6872055", "0.6872055", "0.6872055", "0.6872055", "0.6872055", "0.6872055", "0.68685913", "0.6865249", "0.6861565", "0.6861565", "0.6861565", "0.6861565", "0.6861565", "0.6861565", "0.6861565", "0.6861565", "0.6861565", "0.6861565", "0.6861565", "0.6861565", "0.6861565", "0.6861565", "0.6861565", "0.6861565", "0.6861565", "0.6861565", "0.6861565", "0.6861565", "0.6861565", "0.68601036", "0.68552995", "0.6851566", "0.68471736", "0.6847083", "0.68440247", "0.6832998", "0.6831617", "0.68288785", "0.682661", "0.68234265", "0.68176323", "0.6814929", "0.6813008", "0.67992234" ]
0.0
-1
Gets the title of the movie.
public String getTitle() { return title; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getMovieTitle() {\n return movieTitle;\n }", "java.lang.String getTitle();", "java.lang.String getTitle();", "java.lang.String getTitle();", "java.lang.String getTitle();", "java.lang.String getTitle();", "public java.lang.String getTitle();", "public java.lang.String getTitle() {\n return title;\n }", "public java.lang.String getTitle() {\n return title;\n }", "public java.lang.String getTitle() {\n return title;\n }", "public java.lang.String getTitle() {\n return title;\n }", "public java.lang.String getTitle() {\n return title;\n }", "public String getTitle()\n\t{\n\t\treturn title;\n\t}", "public String getTitle()\n\t{\n\t\treturn title;\n\t}", "public String getTitle()\n {\n return (this.title);\n }", "public String getTitle() \r\n\t{\r\n\t\treturn this.title;\r\n\t}", "public String getTitle()\n {\n return m_title;\n }", "@NonNull\r\n public String getTitle() {\r\n return f_title;\r\n }", "public String getTitle() {\n \t\treturn title;\n \t}", "public String getTitle() {\n return titleName;\n }", "public java.lang.String getTitle() {\n java.lang.Object ref = title_;\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 title_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getTitle() {\n java.lang.Object ref = title_;\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 title_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getTitle()\r\n {\r\n return title;\r\n }", "public String getTitle()\r\n {\r\n return title;\r\n }", "public java.lang.String getTitle()\n {\n return this.title;\n }", "public String getTitle()\r\n {\r\n return getSemanticObject().getProperty(swb_title);\r\n }", "public String getTitle(){\n\n\t\treturn title;\n\t}", "public String getTitle() {\r\n return title;\r\n }", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public java.lang.String getTitle()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(TITLE$2);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public java.lang.Object getTitle() {\n return title;\n }", "public java.lang.String getTitle() {\n java.lang.Object ref = title_;\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 title_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getTitle() {\r\n return _title;\r\n }", "public String getTitle() {\r\n return title;\r\n }", "public String getTitle() {\r\n return title;\r\n }", "public String getTitle() {\r\n return title;\r\n }", "public String getTitle() {\r\n return title;\r\n }", "public String getTitle() {\r\n return title;\r\n }", "public String getTitle() {\r\n return title;\r\n }", "public String getTitle() {\r\n return title;\r\n }", "public java.lang.String getTitle() {\n java.lang.Object ref = title_;\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 title_ = s;\n return s;\n }\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "@ObjectSupport public final String title() {\n return title==null\n ? title = createTitle()\n : title;\n }", "public java.lang.String getTitle() {\n java.lang.Object ref = title_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n title_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getTitle() {\n\t\treturn this.title;\n\t}", "public String getTitle() {\n\t\treturn this.title;\n\t}", "public String getTitle() {\n\t\treturn this.title;\n\t}", "public String getTitle()\n {\n return title;\n }", "public String getTitle() {\n Object ref = title_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n title_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public String title()\n\t{\n\t\treturn title;\n\t}", "public String getTitle()\r\n {\r\n return this.title;\r\n }", "public String getTitle() {\n\t\treturn fTitle;\n\t}", "public java.lang.String getTitle() {\n java.lang.Object ref = title_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n title_ = s;\n }\n return s;\n }\n }", "public java.lang.String getTitle() {\n java.lang.Object ref = title_;\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 title_ = s;\n return s;\n }\n }", "public java.lang.String getTitle() {\n java.lang.Object ref = title_;\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 title_ = s;\n return s;\n }\n }", "@Nullable\n final public String getTitle() {\n return mTitle;\n }" ]
[ "0.80843055", "0.7681298", "0.7681298", "0.7681298", "0.7681298", "0.7681298", "0.7595023", "0.75930345", "0.75861126", "0.75735617", "0.75735617", "0.75735617", "0.75253826", "0.75253826", "0.7516487", "0.7484205", "0.7468598", "0.74615765", "0.7456739", "0.74496245", "0.74428356", "0.74428356", "0.7441742", "0.7441742", "0.74384606", "0.74320865", "0.74181885", "0.74175555", "0.74170357", "0.74170357", "0.74170357", "0.74170357", "0.74170357", "0.74170357", "0.74170357", "0.7413504", "0.74086916", "0.7408358", "0.74067384", "0.7400703", "0.7400703", "0.7400703", "0.7400703", "0.7400703", "0.7400703", "0.7400703", "0.7399191", "0.739679", "0.739679", "0.73962414", "0.73962414", "0.73962414", "0.73962414", "0.73962414", "0.73962414", "0.73962414", "0.73962414", "0.73962414", "0.73962414", "0.73962414", "0.73962414", "0.73962414", "0.73951083", "0.7391693", "0.7388637", "0.7388637", "0.7388637", "0.7387617", "0.73875207", "0.73873204", "0.7378979", "0.73736656", "0.73723394", "0.7367034", "0.7367034", "0.73630345" ]
0.0
-1
Sets the title of the movie.
public void setTitle(String title) { this.title = title; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setTitle(String title)\n {\n mTitle = title;\n }", "public void setTitle( String title ) {\n\t\t_title = title;\n\t}", "public void setTitle_(String title_) {\n this.title_ = title_;\n }", "public void setTitle(String title){\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\r\n _title = title;\r\n }", "public void setTitle( String title )\n {\n _strTitle = title;\n }", "public void setTitle(String title)\n\t{\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n mTitle = title;\n }", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title; \n\t}", "public void setTitle(String title)\n {\n this.title = title;\n }", "public void setTitle(String title)\n {\n this.title = title;\n }", "public void setTitle(String title)\n {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\r\n this.title = title;\r\n }", "public void setTitle(String title) {\r\n this.title = title;\r\n }", "public void setTitle(String title) {\r\n this.title = title;\r\n }", "public void setTitle(String title) {\r\n this.title = title;\r\n }", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(final String title)\n {\n this.title = title;\n }", "public void setTitle(String title){\n \tthis.title = title;\n }", "public void setTitle(String title) {\r\n\tthis.title = title;\r\n }", "public void setTitle(String title) {\n mTitle = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title){\n this.title = title;\n }", "public void setTitle(final String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(final String title) {\n this.title = title;\n }", "public void setTitle(java.lang.String title)\n {\n this.title = title;\n }", "public void setTitle(Title title) {\r\n this.title = title;\r\n }", "public void setTitle(java.lang.String title) {\n this.title = title;\n }", "public void setTitle(java.lang.String title) {\n this.title = title;\n }", "public void setTitle(java.lang.String title) {\n this.title = title;\n }", "@Override\r\n\tpublic void setTitle(String title) {\n\t\tthis.title = title;\r\n\t}", "public void setTitle(java.lang.String title);", "public void setTitle(String title) {\n\tthis.title = title;\n}", "public void setTitle(String title) { this.title = title; }", "public void setTitle(String title) {\r\n if (title != null) {\r\n this.title = title;\r\n }\r\n else{\r\n System.out.println(\"Not a valid title\");\r\n }\r\n }", "@Override\n public void setTitle(String title) {\n this.title = title;\n }", "void setTitle(java.lang.String title);", "@Override\n\tpublic void setTitle(java.lang.String title) {\n\t\t_esfTournament.setTitle(title);\n\t}", "public void setTitle(String title);", "public void setTitle(String title);", "public void setTitle(String title);", "private void setTitle(java.lang.String title) {\n System.out.println(\"setting title \"+title);\n this.title = title;\n }", "protected void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n m_title.setText(title);\n }", "public void setTitle(java.lang.Object title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n etvTitle.setText(title);\n }", "public void setTitle(String title) {\r\n\t\tthis.pictureFrame.setTitle(title);\r\n\t}", "public final void setTitle(final String title)\n\t{\n\t\tio.getFrame().setTitle(title);\n\t}", "public void setTitle(String title){\n lblTitle.setText(title);\n }", "@Override\n\tpublic void setTitle(java.lang.String title) {\n\t\t_scienceApp.setTitle(title);\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t\tthis.dirtyAttributes.add(Constants.TITLE);\n\t}", "@Override\r\n\t\tpublic void setTitle(String title)\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}", "public void setTitle(String newTitle)\r\n {\r\n title = newTitle;\r\n }", "public void setTitle(String strTitle) { m_strTitle = strTitle; }", "void setTitle(String title);", "void setTitle(String title);", "void setTitle(String title);", "void setTitle(String title);", "void setTitle(String title);", "public void setTitle(String title) {\r\n this.title = title == null ? null : title.trim();\r\n }", "public void setTitle(String title) {\r\n this.title = title == null ? null : title.trim();\r\n }", "public void setTitle(String title) {\r\n this.title = title == null ? null : title.trim();\r\n }", "public void setTitle(String title) {\r\n this.title = title == null ? null : title.trim();\r\n }", "public void setTitle(String title) {\n this.title = title == null ? null : title.trim();\n }", "public void setTitle(String title) {\n this.title = title == null ? null : title.trim();\n }", "public void setTitle(String title) {\n this.title = title == null ? null : title.trim();\n }" ]
[ "0.82177633", "0.82127005", "0.8202573", "0.81957704", "0.81936675", "0.81904554", "0.81718004", "0.8170355", "0.81606054", "0.81606054", "0.81606054", "0.81606054", "0.81606054", "0.81573343", "0.81429726", "0.81429726", "0.81429726", "0.81355983", "0.8134268", "0.8134268", "0.8130747", "0.8130747", "0.8129888", "0.8129888", "0.8129888", "0.8129888", "0.8129888", "0.8129888", "0.8129888", "0.8129888", "0.8129888", "0.8128036", "0.812339", "0.8118847", "0.81188077", "0.80859566", "0.80859566", "0.80859566", "0.80859566", "0.8081", "0.8078105", "0.8072031", "0.8061429", "0.8058191", "0.80285263", "0.80285263", "0.80285263", "0.8013001", "0.8005231", "0.7999342", "0.79989856", "0.79939646", "0.79434353", "0.79206705", "0.79182404", "0.7915525", "0.7915525", "0.7915525", "0.79031366", "0.7892841", "0.78859216", "0.78852284", "0.7855614", "0.7831179", "0.7813172", "0.78129363", "0.779945", "0.77719855", "0.7768209", "0.77661645", "0.7763354", "0.7737413", "0.7737413", "0.7737413", "0.7737413", "0.7737413", "0.7737401", "0.7737401", "0.7737401", "0.7737401", "0.77360994", "0.77360994", "0.77360994" ]
0.8108901
49
Gets the plot synopsis of the movie.
public String getOverview() { return overview; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getPlot_acronym() {\n return plot_acronym;\n }", "public String getPlot() {\n return plot;\n }", "@Override\r\n\tpublic String getShowTitle() {\n\t\treturn getQymc();\r\n\t}", "public String getSubtitle();", "public String getPlot_info() {\n return plot_info;\n }", "public String getAtitle() {\n return atitle;\n }", "public String showHelp() {\r\n return ctrlDomain.getHidatoDescription();\r\n }", "public java.lang.String getTitle();", "public String toString(){\n\t\treturn this.title+\" av \"+this.painter+\", \"+this.year;\n\t\t\n\t}", "public String getSubtitle() {\n return subtitle;\n }", "public String getSubtitle() {\r\n return subtitle;\r\n }", "String title();", "String title();", "@Override\n\tpublic CharSequence getSubtitle() {\n\t\treturn null;\n\t}", "public IFigure getTooltip() {\n return this.tooltip;\n }", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public TooltipDisplay getTooltipDisplay();", "public String getTooltip() {\n\t\treturn tooltip;\n\t}", "public String getMovieTitle() {\n return movieTitle;\n }", "@Override\n\tpublic java.lang.String getTitle() {\n\t\treturn _scienceApp.getTitle();\n\t}", "void showTooltip();", "@Override\n public String getSubtitle() {\n return null;\n }", "public abstract String getShortTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getPlotterName();", "@Override\n\tpublic String getMovieDescription() {\n\t\treturn movieDescription;\n\t}", "String getDisplay_description();", "public String getYAxisTitle() {\n return yAxisTitle;\n }", "@Exported(visibility = 999)\n public String getTooltip() {\n return tooltip;\n }", "protected String subtitle () { return null; }", "public String getMlStitle() {\n return mlStitle;\n }", "private PlotDefinition getPlotDefinition() {\n if (plotDefId != null) {\n return ocm.getPlotDefinition(plotDefId);\n }\n return null;\n }", "IDisplayString getTitle();", "String getHelpText();", "public String getStationTitle() {\r\n return stationTitle;\r\n }", "public String getTitle()\r\n {\r\n return getSemanticObject().getProperty(swb_title);\r\n }", "public String getShortTitle() {\n\t\tString t = doc.get(\"shorttitle\");\n\n\t\tif (t == null) {\n\t\t\treturn \"\";\n\t\t} else {\n\t\t\treturn t;\n\t\t}\n\t}", "public String getPrideExperimentTitle() {\n\n \n return prideExperimentTitle;\n\n }", "public String GetMediaTitle() {\n\t\treturn mediatitle;\n\t}", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "String getHelpString();", "public String title()\n\t{\n\t\treturn title;\n\t}", "public String toString(){\n\t\tString s1 = \"\\n======= \" + title + \" =========\";\n\t\tString s3 = \"\\n========================================\\n\";\n\t\treturn s1 + \"\\nTitle: \" + title + \"\\nArtist Name: \" + artistName + \"\\nGenre: \" + genre + \n\t\t\t\t\"\\nRating: \" + rating + \"\\nLength: \" + time + s3;\n\t}", "public String getSocialLinksSubtitle() {\n\t\treturn socialLinksSubtitle;\n\t}", "public abstract String getToolTip();", "java.lang.String getTitle();", "java.lang.String getTitle();" ]
[ "0.6197724", "0.6095959", "0.59058803", "0.5888348", "0.585233", "0.5569924", "0.5497259", "0.54287153", "0.54139405", "0.54109764", "0.5410607", "0.5398703", "0.5398703", "0.53964496", "0.53959864", "0.5389164", "0.5389164", "0.5389164", "0.5389164", "0.5389164", "0.5389164", "0.5389164", "0.5389164", "0.5389164", "0.5389164", "0.5389164", "0.5389164", "0.5389164", "0.5389164", "0.5389164", "0.5389164", "0.5389164", "0.5389164", "0.53698456", "0.5369704", "0.5365753", "0.53616387", "0.53438956", "0.5330783", "0.5309425", "0.527744", "0.527744", "0.527744", "0.527744", "0.527744", "0.527744", "0.527744", "0.527744", "0.527744", "0.527744", "0.527744", "0.527744", "0.527744", "0.527744", "0.527744", "0.52689314", "0.52677846", "0.5266344", "0.52609146", "0.5242208", "0.5241548", "0.52251655", "0.5218522", "0.52137107", "0.5212326", "0.5188373", "0.5183388", "0.5178751", "0.5174448", "0.5170967", "0.51536494", "0.51536494", "0.51536494", "0.51536494", "0.51536494", "0.51536494", "0.51536494", "0.51536494", "0.51536494", "0.51536494", "0.51536494", "0.51536494", "0.51536494", "0.51536494", "0.51536494", "0.51536494", "0.51536494", "0.51536494", "0.51536494", "0.51536494", "0.51536494", "0.51536494", "0.51536494", "0.51536494", "0.5153255", "0.5152142", "0.5150392", "0.5144157", "0.51355815", "0.5132376", "0.5132376" ]
0.0
-1
Sets the plot synopsis of the movie.
public void setOverview(String overview) { this.overview = overview; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean setMovieSynopsis(Movie movie, String synopsis){\n if(movie == null) return false;\n movie.movie_synopsis = synopsis;\n return true;\n }", "public void setTitle(String title){\n\t\tplot.setTitle(title);\n\t}", "public void setPlot_acronym(String plot_acronym) {\n this.plot_acronym = plot_acronym;\n }", "@Override\n public void setTooltip(String arg0)\n {\n \n }", "private void setTooltip() {\n\t\tif (buttonAddScannable != null && !buttonAddScannable.isDisposed()) {\n\t\t\tgetParentShell().getDisplay().asyncExec(() -> buttonAddScannable.setToolTipText(\"Select scannable to add to list...\"));\n\t\t}\n\t}", "public Synopsis(String text)\n\t{\n\t\tthis.text = text;\n\t}", "public void setTitle(String title);", "public void setTitle(String title);", "public void setTitle(String title);", "public void setTooltipText() { tooltip.setText(name); }", "public String getPlot_acronym() {\n return plot_acronym;\n }", "public void setTitle(java.lang.String title);", "void setTitle(String title);", "void setTitle(String title);", "void setTitle(String title);", "void setTitle(String title);", "void setTitle(String title);", "private void setWindowTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) { this.title = title; }", "public void setDescription(String s) {\n if (s == null && shortDescription == null) {\n return;\n }\n\n if (s == null || !s.equals(shortDescription)) {\n String oldDescrption = shortDescription;\n shortDescription = s;\n listeners.firePropertyChange(PROPERTY_DESCRIPTION, oldDescrption,\n shortDescription);\n }\n }", "void showTooltip();", "public void setMetaTitle(final LocalizedString metaTitle);", "void setTitle(java.lang.String title);", "public void setTitle(String t)\n {\n title = t;\n }", "public void setSubtitle( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), SUBTITLE, value);\r\n\t}", "public void setTooltipDisplay(TooltipDisplay tooltipDisplay);", "@Override\n\tpublic void setSubtitle(int resId) {\n\t\t\n\t}", "@Override\n\tpublic void setToolTip(String tooltip) {\n\t\t\n\t}", "@Override\n\tpublic void setSubtitle(CharSequence subtitle) {\n\t\t\n\t}", "public void setDescription(String text)\n\t{\n\t\tthis.description = text;\n\t\tthis.repaint();\n\t}", "public void setSubtitle(java.lang.String value) {\r\n\t\tBase.set(this.model, this.getResource(), SUBTITLE, value);\r\n\t}", "public void setTitle(String title){\n \tthis.title = title;\n }", "public void setTitle( String title )\n {\n _strTitle = title;\n }", "public void setFrameTitle(String title) {\r\n\t\tif (frame == null) {\r\n\t\t\tSystem.out.println(\"You must set the title after calling show\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tframe.setTitle(title);\r\n\t}", "protected void setToolTip(String toolTip) {\n\tthis.toolTip = toolTip;\n }", "public void setTitle(String title){\n this.title = title;\n }", "public Synopsis()\n\t{\n\n\t}", "public void setTitle(String title){\n lblTitle.setText(title);\n }", "public void setHelp (String Help);", "public void setTitle(String text) {\n title.setText(text);\n }", "@Override\n\tpublic void setTitle(java.lang.String title) {\n\t\t_scienceApp.setTitle(title);\n\t}", "public void setTitle(String title) {\r\n\t\tthis.pictureFrame.setTitle(title);\r\n\t}", "public Series setDescription( String theString) {\n\t\tmyDescription = new StringDt(theString); \n\t\treturn this; \n\t}", "public void setTitle(String title) {\r\n this.title = title;\r\n }", "public void setTitle(String title) {\r\n this.title = title;\r\n }", "public void startVideoNotityHelpTip() {\n }", "public void setTitle(String title)\n {\n this.title = title;\n }", "public void setTitle(String title)\n {\n this.title = title;\n }", "public void setTitle(String title)\n {\n this.title = title;\n }", "public void setSubtitle(String subtitle) {\n m_subTitle.setText(subtitle);\n }", "public void setTitle(String title) {\n\tthis.title = title;\n}", "public void setTitle(String title){\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\r\n this.title = title;\r\n impl.setTitle(getElement(),legend, title);\r\n }", "void showTitle(String title);", "public void setTitle(String title) {\r\n\tthis.title = title;\r\n }", "public void setTooltip(TooltipOptions tooltip) {\n this.tooltip = tooltip;\n }", "@Override\r\n\tvoid setTitle(String s) {\n\t\tsuper.title=s;\r\n\t}", "public void setTitle(String title) {\r\n this.title = title;\r\n }", "public void setTitle(String title) {\r\n this.title = title;\r\n }", "public void setTitle(String title) {\r\n if (title != null) {\r\n this.title = title;\r\n }\r\n else{\r\n System.out.println(\"Not a valid title\");\r\n }\r\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setDescription(String sDescription);", "public void setTitle(String s){\n\t\ts = s.substring(s.lastIndexOf(\"\\\\\")+1,s.lastIndexOf(\".\"));//absolute path + .txt out of string\n\t\tframe.setTitle(s);\n\t}", "public void setTitle(java.lang.String value) {\n this.title = value;\n }", "public void setTitle(Title title) {\r\n this.title = title;\r\n }", "public void setToolTipText (String string) {\r\n\tcheckWidget();\r\n\ttoolTipText = string;\r\n}", "private void setTitle(java.lang.String title) {\n System.out.println(\"setting title \"+title);\n this.title = title;\n }", "public void setDescription(java.lang.String value);", "public void setDescription(java.lang.String value);", "public void setDescription(java.lang.String value);", "public void setDescription(java.lang.String value);", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title)\n\t{\n\t\tthis.title = title;\n\t}", "public void setTitle(String s){\n\t\tJLabel title = new JLabel(s);\r\n\t\tsetLayout(new BorderLayout());\r\n\t\tadd(title, BorderLayout.PAGE_START);\r\n\t}", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n\t\tthis.title = title; \n\t}", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}" ]
[ "0.652868", "0.61899215", "0.58241415", "0.565765", "0.5549989", "0.5526228", "0.54754615", "0.54754615", "0.54754615", "0.5453949", "0.5423663", "0.5393524", "0.5392529", "0.5392529", "0.5392529", "0.5392529", "0.5392529", "0.53358", "0.53228503", "0.5303767", "0.53028655", "0.5290208", "0.5266084", "0.5258528", "0.5250823", "0.52359754", "0.5228601", "0.5227423", "0.52244043", "0.5222381", "0.5221833", "0.5218492", "0.5216819", "0.52135944", "0.520321", "0.51922953", "0.51913136", "0.517172", "0.5159675", "0.51577514", "0.51576567", "0.51559186", "0.51543343", "0.5152158", "0.5152158", "0.5151858", "0.51499313", "0.51499313", "0.51499313", "0.5144012", "0.5143708", "0.5136998", "0.51369953", "0.5136869", "0.51322913", "0.51310056", "0.512248", "0.51200545", "0.51200545", "0.51182127", "0.51176643", "0.51176643", "0.51176643", "0.51176643", "0.5112308", "0.5112176", "0.5105431", "0.5096698", "0.5090389", "0.50878793", "0.50863826", "0.50863826", "0.50863826", "0.50863826", "0.5082969", "0.5082969", "0.5082969", "0.5082969", "0.5082969", "0.5082969", "0.5082969", "0.5082969", "0.5082969", "0.5082969", "0.5082969", "0.5082969", "0.5082969", "0.5082969", "0.5082969", "0.5082969", "0.5082969", "0.5082969", "0.5082966", "0.5078501", "0.5075928", "0.5071641", "0.5066468", "0.5066468", "0.5066468", "0.5066468", "0.5066468" ]
0.0
-1
Gets the poster URL address of the movie.
public String getPosterUrl() { return posterUrl; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getPosterPath() {\n return String.format(\"https://image.tmdb.org/t/p/w342/%s\",posterPath);\n }", "public static URL buildMoviePosterUrl(String poster_image_name) {\n //remove \"/\" from image name\n poster_image_name = poster_image_name.startsWith(\"/\") ? poster_image_name.substring(1) : poster_image_name;\n\n Uri builtUri = Uri.parse(MOVIE_POSTER_BASE_URL).buildUpon()\n .appendPath(IMAGE_SIZE)\n .appendPath(poster_image_name)\n .build();\n\n URL url = null;\n try {\n url = new URL(builtUri.toString());\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n\n return url;\n }", "private String buildLink(String posterPath) {\n return \"http://image.tmdb.org/t/p/w92\" + posterPath;\n }", "public static String buildPosterUrl(String imageExtension) {\n return MOVIE_IMAGE_BASE_URL + \"/\" + imageExtension;\n }", "public void setPosterUrl(String posterUrl) {\n this.posterUrl = posterUrl;\n }", "public String getVideoUrl() {\n return videoUrl;\n }", "@NonNull\n public String getVideoUrl() {\n return videoUrl;\n }", "public String getBaseMediaUrl() {\n return (String) get(\"base_media_url\");\n }", "public String getPhotoUrl() {\n try {\n ParseFile pic = fetchIfNeeded().getParseFile(\"pic\");\n return pic.getUrl();\n }\n catch (ParseException e) {\n Log.d(TAG, \"Error in getting photo from Parse: \" + e);\n return null;\n }\n }", "public String getThumbnailUrl();", "public static URL buildTopRatedMoviesUrl()\n {\n return buildMovieDbUrl(\"movie/top_rated\");\n }", "@NonNull\n public String getThumbnailUrl() {\n return thumbnailUrl;\n }", "String getAvatarUrl();", "String peekUrl() {\n Entry e = participantsQueue.peek();\n if (e == null) {\n return null;\n }\n return e.getUrl();\n }", "public String getPhotoUrl() {\n return fullPhoto.getPhotoUrl();\n }", "public static String getUrlMovie(Context context) {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);\n return CommonConstants.MOVIE_URL_PREFIX.replace(\"#size#\",\n sharedPreferences.getString(context.getString(R.string.key_pref_size),\n CommonConstants.THEMOVIEDB_SIZE_W185)\n );\n }", "String getThumbnailUrl() {\n\t\treturn this.mThumbnailUrl;\n\t}", "public String getMediaUrl() {\n return this.MediaUrl;\n }", "public NameValue<String, String> getDestURL() {\n return getDestURL(false);\n }", "Uri getAvatarUrl();", "public String getUrlForSharing() {\n PostData pd = getAdapter().getPost(mPager.getCurrentItem());\n return pd.getUrl();\n }", "public String getReviewImageurl() {\n return this.rev_img_url;\n }", "public String getURL() {\n\t\treturn RequestConstants.BASE_IMAGE_URL+_url;\n\t}", "public Optional<URL> avatarUrl() {\n this.use();\n\n try {\n if(avatar != null)\n return Optional.of(new URL(avatar));\n else\n return Optional.empty();\n\n } catch (MalformedURLException e) {\n throw new RuntimeException(\"Since URLs are sent by the server, they shouldn't be malformed...\", e);\n }\n }", "public String getThumbnailUrl() {\n return this.thumbnailUrl;\n }", "public String getURL() {\r\n\t\treturn dURL.toString();\r\n\t}", "public void setPoster (String s) {\n poster = s;\n }", "public String getURL(){\r\n\t\t \r\n\t\t\r\n\t\treturn rb.getProperty(\"url\");\r\n\t}", "public String getAvatarUrl() {\n return avatarUrl;\n }", "private String get_url() {\n File file = new File(url);\n return file.getAbsolutePath();\n }", "public String getThumbUrl() {\r\n return thumbUrl;\r\n }", "public String getTargetUrl() {\n return targetUrl;\n }", "public final String getUrl() {\n return properties.get(URL_PROPERTY);\n }", "public final VideoUrl mo96789a() {\n return this.f75940a;\n }", "public static String getUrl() {\n return annotation != null ? annotation.url() : \"Unknown\";\n }", "public String getImageURL() \r\n\t{\r\n\t\t\r\n\t\treturn imageURL;\r\n\t\t\r\n\t}", "public String getPoster() {\n return getElement().getPoster();\n }", "public static URL buildPopularMoviesUrl()\n {\n return buildMovieDbUrl(\"movie/popular\");\n }", "public static String getRandomVideoUrl() {\n int index = RandomNumberGenerator.getRandomInt(0, videos.length - 1);\n return videos[index];\n }", "public String mo13278q() {\n return ((PlaybackUrl) C13199w.m40589f((List) this.f9142e0)).getUrl();\n }", "public String getThumbPhotoLink() {\n return fullPhoto.getThumbPhotoLink();\n }", "public String getSrc() {\n return (String) attributes.get(\"src\");\n }", "public String getPictureUrl()\n\t{\n\t\treturn \"http://cdn-0.nflximg.com/us/headshots/\" + id + \".jpg\";\n\t}", "public String getImageURL()\n\t{\n\t\treturn imageURL;\n\t}", "public String getURL() {\n\t\treturn prop.getProperty(\"URL\");\n\t}", "@Nullable\n public String getNewAvatarUrl() {\n return next == null ? null : String.format(Member.AVATAR_URL, getMember().getGuild().getId(), getMember().getId(), next, next.startsWith(\"a_\") ? \"gif\" : \"png\");\n }", "public URI getMediaLink() {\n return this.mediaLink;\n }", "public URI getMediaLink() {\n return this.mediaLink;\n }", "public String getVideo() {\n return video;\n }", "public String getReviewProcessUrl() {\n\t\tString t = doc.get(\"reviewprocessurl\");\n\n\t\tif (t == null) {\n\t\t\treturn \"\";\n\t\t} else {\n\t\t\treturn t;\n\t\t}\n\t}", "public String getServerUrl() {\n return props.getProperty(\"url\");\n }", "public String getScreenshotUrl() {\n return screenshotUrl;\n }", "public String getScreenshotUrl() {\n return screenshotUrl;\n }", "public String getSourceDownloadUrl();", "URI getMediaURI();", "public NameValue<String, String> getDestURL(boolean random) {\n return getURL(mDestMap, random);\n }", "public String getUrl() {\n\t\tif (prop.getProperty(\"url\") == null)\n\t\t\treturn \"\";\n\t\treturn prop.getProperty(\"url\");\n\t}", "public String getLastViewedURL() {\n return mPreference.getString(\"LastViewedURL\", NULL_STRING);\n }", "public String getUrl() { /* (readonly) */\n return mUrl;\n }", "@Nullable\n public String getOldAvatarUrl() {\n return previous == null ? null : String.format(Member.AVATAR_URL, getMember().getGuild().getId(), getMember().getId(), previous, previous.startsWith(\"a_\") ? \"gif\" : \"png\");\n }", "public String getRatingImageLargeUrl() {\n\t\treturn ratingImageLargeUrl;\n\t}", "public java.lang.String getURL() {\n return URL;\n }", "@java.lang.Override\n public java.lang.String getUrl() {\n return instance.getUrl();\n }", "@java.lang.Override\n public java.lang.String getUrl() {\n return instance.getUrl();\n }", "public String getBackdropUrl() {\n return backdropUrl;\n }", "public String getPicUrl() {\n return picUrl;\n }", "public final VideoUrl mo96791c() {\n return this.f75940a;\n }", "public java.lang.CharSequence getURL() {\n return URL;\n }", "public String getSourceUrl() {\n return sourceUrl;\n }", "public String getAvatar() {\n return getString(AVKey.KEY_AVATAR);\n }", "public java.lang.CharSequence getURL() {\n return URL;\n }", "public String getPostUrl() {\r\n\t\treturn postUrl;\r\n\t}", "public static String getVideoSource(){\r\n\r\n return pref.getString(\"VideoMode\", \"MP4\");\r\n }", "public String getRemoteURL(){\r\n\t\treturn this.remoteURL;\r\n\t}", "@Override\n public void onBindViewHolder(MovieViewHolder movieViewHolder, int position) {\n String posterPath = mMovieData.get(position).getPosterPath();\n StringBuilder moviePoster = new StringBuilder(tmdbApi.getConfiguration().getSecureBaseUrl());\n moviePoster.append(\"w342\");\n moviePoster.append(posterPath);\n\n //movieViewHolder.mMovieNameTextView.setText(movieName + \" (\" + movieYear + \")\");\n\n Picasso.with(context).load(moviePoster.toString())\n .placeholder(R.drawable.placeholder)\n .error(R.drawable.error)\n .into(movieViewHolder.mMoviePosterImageView);\n }", "public final String getSrcAttribute() {\n return getAttributeValue(\"src\");\n }", "public String getVmUrl() {\n Object ref = vmUrl_;\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 vmUrl_ = s;\n }\n return s;\n }\n }", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "private static Uri buildMovieImageURI(String imagePath, boolean backdrop){\n // Select size based on the image <- POSTER by default as it's much more frequent\n String size = POSTER_SIZE;\n if(backdrop)\n size = BACKDROP_SIZE;\n\n return Uri.parse(BASE_IMAGE_URL).buildUpon()\n .appendPath(size)\n .appendPath(imagePath.substring(1))\n .build();\n }", "public String getGamePicUrl() {\n return gamePicUrl;\n }", "java.lang.String getManifestUrl();", "public String getUserPhotoUrl() {\n return mSharedPreferences.getString(USER_PHOTO_URL, null);\n }", "public String getReplacedMovie() {\n return replacedMovie;\n }", "public String getUrl()\n {\n return this.url;\n }", "public java.lang.String getUrl () {\r\n\t\treturn url;\r\n\t}", "public static String getDongtuServerUrl() {\n return BaseAppServerUrl.videoUrl + \"?service=\";\n }", "@Override\n\tpublic String getImagesUrl() {\n\t\treturn SERVER;\n\t}", "public String getVmUrl() {\n Object ref = vmUrl_;\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 vmUrl_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }", "public String getUrl() {\n\t\treturn this.url;\n\t}", "public String getEmbeddedUrlRE() {\n return getPropertyAsString(EMBEDDED_URL_RE,\"\");\n }", "public static String buildYouTubeUrl(String movieKey){\n return YOUTUBE_BASE_URL + YOUTUBE_PARAM_QUERY + movieKey;\n }", "public String getURL(Version version) {\n return getUrl() + version.getDocument().getDocumentURL();\n }", "public String getURL() {\n\t\treturn getName();\n\t}", "public void movieDetailes (Movie movie) throws IOException, JSONException{\n\t\t\n\t MovieImages poster= movie.getImages(movie.getID());\n\t System.out.println(poster.posters);\n\t \n\t Set<MoviePoster> temp = new HashSet<MoviePoster>();\n\t for(MoviePoster a: poster.posters) {\n\t \t \n\t \t posterurl = \"\";\n\t \t largerposterurl = \"\";\n\t \t if(a.getSmallestImage() != null){\n\t \t\t posterurl = a.getSmallestImage().toString();\n\t \t }\n\t \t if(a.getImage(Size.MID) != null){\n\t \t\t largerposterurl = a.getImage(Size.MID).toString();\n\t \t }\n\t \t //System.out.println(a.getSmallestImage());\n\t \t break;\n\t }\n\n\t System.out.println(\"Cast:\");\n\t // Get the full decsription of the movie.\n\t Movie moviedetail = Movie.getInfo(movie.getID());\n\t if(moviedetail != null){\n\t \tmovieName = moviedetail.getOriginalName();\n\t\t overview = moviedetail.getOverview();\n\t\t if(moviedetail.getTrailer() != null){\n\t\t \ttrailerURL = moviedetail.getTrailer().toString();\n\t\t }\n\t\t if(moviedetail.getReleasedDate() != null){\n\t\t \treleaseDate = moviedetail.getReleasedDate().toString();\n\t\t }\n\t\t rating = moviedetail.getRating();\n\t\t cast = \"\\n\\nCast: \\n\";\n\t\t for (CastInfo moviecast : moviedetail.getCast()) {\n\t\t\t System.out.println(\" \" + moviecast.getName() + \" as \"\n\t\t\t + moviecast.getCharacterName()\t);\n\t\t\t cast = cast + \" \" + moviecast.getName() + \"\\n\";\n\t\t\t }\n\t\t \n\t\t ID = moviedetail.getID();\n\t }\n\t \n\t}", "public String url() {\n return server.baseUri().toString();\n }" ]
[ "0.7230606", "0.6773513", "0.62053573", "0.61099243", "0.60585594", "0.58532405", "0.5836853", "0.5836403", "0.5809374", "0.569311", "0.5636533", "0.5632433", "0.5615826", "0.55985826", "0.558617", "0.55651474", "0.55574155", "0.55445945", "0.55302596", "0.5510951", "0.5489088", "0.54720676", "0.54462945", "0.5431447", "0.5396299", "0.538479", "0.5381833", "0.53649455", "0.53607947", "0.5358943", "0.535221", "0.5345289", "0.5330177", "0.5326737", "0.5322831", "0.53150415", "0.53138405", "0.5301512", "0.52996504", "0.5294313", "0.5290443", "0.52613354", "0.52543056", "0.52385", "0.5235738", "0.5228213", "0.52184", "0.52184", "0.5212021", "0.52076733", "0.5199963", "0.51928985", "0.51928985", "0.5187736", "0.51760453", "0.5173743", "0.5170537", "0.516582", "0.51586944", "0.5127473", "0.5117103", "0.5086648", "0.50781924", "0.50781924", "0.50759226", "0.50738126", "0.5068612", "0.5063957", "0.5054547", "0.5051178", "0.5047494", "0.5046016", "0.5045043", "0.5038743", "0.5034848", "0.50333613", "0.50277317", "0.50199753", "0.50199753", "0.50199753", "0.50199753", "0.50199753", "0.50199753", "0.5019649", "0.5004679", "0.50037", "0.5001282", "0.49992266", "0.49923623", "0.49907947", "0.49766022", "0.49743295", "0.49719173", "0.4971056", "0.49706882", "0.49700922", "0.49638382", "0.4959349", "0.49564332", "0.4954575" ]
0.75451404
0
Sets URL address of the poster for the movie.
public void setPosterUrl(String posterUrl) { this.posterUrl = posterUrl; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setPoster (String s) {\n poster = s;\n }", "public String getPosterUrl() {\n return posterUrl;\n }", "public void SetUrl(String url)\n\t{\n\t if (video_view.isPlaying())\n\t {\n\t video_view.stopPlayback();\n\t }\n\t \n Uri uri = Uri.parse(url);\n video_view.setVideoURI(uri);\n\t}", "private void setMovie() {\n Movie movie = getIntent().getExtras().getParcelable(MOVIE);\n Glide.with(mMoviePoster).setDefaultRequestOptions(new RequestOptions().diskCacheStrategy(DiskCacheStrategy.ALL)).load(BuildConfig.IMG_DIR + movie.getPosterPath())\n .into(mMoviePoster);\n setTitle(movie.getTitle());\n mMovieTitle.setText(movie.getTitle());\n mMovieRating.setText(String.valueOf(movie.getVoteAverage()));\n mMovieDate.setText(movie.getReleaseDate());\n mMovieGenre.setText(movie.isAdult() ? getString(R.string.genre_type_adults) : getString(R.string.genre_type_all));\n mMovieDesc.setText(movie.getOverview());\n }", "void setAvatarUrl(String avatarUrl);", "void setImageFromURL(String imageURL);", "public static URL buildMoviePosterUrl(String poster_image_name) {\n //remove \"/\" from image name\n poster_image_name = poster_image_name.startsWith(\"/\") ? poster_image_name.substring(1) : poster_image_name;\n\n Uri builtUri = Uri.parse(MOVIE_POSTER_BASE_URL).buildUpon()\n .appendPath(IMAGE_SIZE)\n .appendPath(poster_image_name)\n .build();\n\n URL url = null;\n try {\n url = new URL(builtUri.toString());\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n\n return url;\n }", "public void setURL(String url);", "T setUrlTarget(String urlTarget);", "public void setUrl(String url);", "public void setUrl(String url);", "public void setURL(String URL) {\n mURL = URL;\n }", "public void setUrl(URL url)\n {\n this.url = url;\n }", "public void setURL(String _url) { url = _url; }", "public Builder setUrl(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n url_ = value;\n onChanged();\n return this;\n }", "public sparqles.avro.discovery.DGETInfo.Builder setURL(java.lang.CharSequence value) {\n validate(fields()[2], value);\n this.URL = value;\n fieldSetFlags()[2] = true;\n return this; \n }", "private String buildLink(String posterPath) {\n return \"http://image.tmdb.org/t/p/w92\" + posterPath;\n }", "public void setServer(URL url) {\n\n\t}", "public void setURL(java.lang.CharSequence value) {\n this.URL = value;\n }", "public void setURL(java.lang.String URL) {\n this.URL = URL;\n }", "public void setServerUrl(String newUrl) {\n if(newUrl == null){\n return;\n }\n props.setProperty(\"url\", newUrl);\n saveProps();\n }", "public void setAddress(final URL value) {\n this.address = value;\n }", "public void setURL(String key, URL value) {\n\t\tif (value != null && !value.equals(getDefault(key)))\n\t\t\tinternal.setProperty(key, value.toString());\n\t\telse\n\t\t\tinternal.remove(key);\n\t}", "public Builder setUrl(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n url_ = value;\n onChanged();\n return this;\n }", "public Builder setUrl(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n url_ = value;\n onChanged();\n return this;\n }", "public Builder setUrl(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n url_ = value;\n onChanged();\n return this;\n }", "void setUrl(String url) {\n this.url = Uri.parse(url);\n }", "public String getPosterPath() {\n return String.format(\"https://image.tmdb.org/t/p/w342/%s\",posterPath);\n }", "public Builder setUrl(\n java.lang.String value) {\n copyOnWrite();\n instance.setUrl(value);\n return this;\n }", "public Builder setUrl(\n java.lang.String value) {\n copyOnWrite();\n instance.setUrl(value);\n return this;\n }", "public Builder setUrl(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n url_ = value;\n onChanged();\n return this;\n }", "public Builder setUrl(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n url_ = value;\n onChanged();\n return this;\n }", "Builder addThumbnailUrl(URL value);", "public Builder setUrl(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n url_ = value;\n onChanged();\n return this;\n }", "public void setServerURL(String serverURL) {\n this.serverURL = serverURL;\n saveProperties();\n }", "public native final void setUrl(String url)/*-{\n this.url = url;\n }-*/;", "public void loadPoster(String url) {\n if (url == null) {\n Message message = obtainMessage(LOAD_DEFAULT_POSTER);\n sendMessage(message);\n return;\n }\n // Cancel any active poster download.\n if (mPosterDownloader != null) {\n mPosterDownloader.cancelAndReleaseQueue();\n }\n // Load the poster asynchronously\n mPosterDownloader = new PosterDownloader(url, this);\n mPosterDownloader.start();\n }", "private void setUrl(\n java.lang.String value) {\n value.getClass();\n bitField0_ |= 0x00000002;\n url_ = value;\n }", "public void setUrl(Uri url) {\n this.urlString = url.toString();\n }", "public void setVideoUrl(String newVideoUrl) {\n this.videoUrl = newVideoUrl;\n }", "Builder addThumbnailUrl(String value);", "private void setUrl(\n java.lang.String value) {\n value.getClass();\n bitField0_ |= 0x00000001;\n url_ = value;\n }", "public void setImageURL(String imageURL) \r\n\t{\r\n\t\t\r\n\t\tthis.imageURL = imageURL;\r\n\t\t\r\n\t}", "public final native void setUrl(String url) /*-{\n this.setUrl(url);\n }-*/;", "void bind(Movies movies){\n String url_poster =\"https://image.tmdb.org/t/p/w185/\" + movies.getPoster();\n\n tvMovieJudul.setText(movies.getTitle());\n tvMovieDescription.setText(movies.getOverview());\n Glide.with(itemView.getContext())\n .load(url_poster)\n .into(imgPoster);\n }", "public Builder setVmUrl(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n vmUrl_ = value;\n onChanged();\n return this;\n }", "public void setSrc(String src) {\n attributes.put(\"src\", src);\n }", "@Test\n void setUrl() {\n g.setUrl(url);\n assertEquals(url, g.getUrl(), \"URL mismatch\");\n }", "void setImageLocation(URL imageLocation) throws IOException;", "public void setUploadUrl( String url_ ) {\n\t\tif (url_ != null) {\n\t\t\tphotoUrl = url_;\n\t\t} else {\n\t\t\tphotoUrl = \"http://199.58.116.35:8081/fotaflo-test/pictures/upload\";\n\t\t}\n\t\tlog( \"photoUrl \" + photoUrl, Log.Level.Information );\n\t}", "private void setURL(String url) {\n try {\n URL setURL = new URL(url);\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "public ImagingStudy setUrl(UriDt theValue) {\n\t\tmyUrl = theValue;\n\t\treturn this;\n\t}", "@Override\n public void onBindViewHolder(MovieViewHolder movieViewHolder, int position) {\n String posterPath = mMovieData.get(position).getPosterPath();\n StringBuilder moviePoster = new StringBuilder(tmdbApi.getConfiguration().getSecureBaseUrl());\n moviePoster.append(\"w342\");\n moviePoster.append(posterPath);\n\n //movieViewHolder.mMovieNameTextView.setText(movieName + \" (\" + movieYear + \")\");\n\n Picasso.with(context).load(moviePoster.toString())\n .placeholder(R.drawable.placeholder)\n .error(R.drawable.error)\n .into(movieViewHolder.mMoviePosterImageView);\n }", "private void downloadPoster() {\n\n try {\n // Downloading the image from URL\n URL url = new URL(Constants.MOVIE_MEDIA_URL + cbPosterQuality.getSelectionModel().getSelectedItem().getKey() + movie.getPosterURL());\n Image image = new Image(url.toExternalForm(), true);\n\n // Adding the image to the ImageView\n imgPoster.setImage(image);\n\n // Adding the ImageView to the custom made ImageViewPane\n imageViewPane.setImageView(imgPoster);\n\n // Binding the image download progress to the progress indicator\n imageProgressIndicator.visibleProperty().bind(image.progressProperty().lessThan(1));\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n }", "public static String buildPosterUrl(String imageExtension) {\n return MOVIE_IMAGE_BASE_URL + \"/\" + imageExtension;\n }", "public void setUrl(String url) {\n\t\tthis.url = url;\n\t\tthis.handleConfig(\"url\", url);\n\t}", "@IcalProperty(pindex = PropertyInfoIndex.PUBLISH_URL,\n eventProperty = true,\n todoProperty = true,\n journalProperty = true,\n freeBusyProperty = true)\n @NoProxy\n public void setPublishUrl(final String val) {\n replaceXproperty(BwXproperty.bedeworkPublishUrl, val);\n }", "public void setUrl(String tmp) {\n this.url = tmp;\n }", "public void setUrl(String url) {\n this.url = url;\n }", "public void setFileUrl(String fileUrl);", "public void setUrl( String url )\n {\n this.url = url;\n }", "public void setUrl( String url )\n {\n this.url = url;\n }", "public void setUrl(String url) {\n\t\tthis.url = utf8URLencode(url);\n\t}", "public URL setURL(URL url) {\r\n if (url == null)\r\n throw new IllegalArgumentException(\r\n \"A null url is not an acceptable value for a PackageSite\");\r\n URL oldURL = url;\r\n myURL = url;\r\n return oldURL;\r\n }", "public void setHTTP_URL(String url) {\r\n\t\ttry {\r\n\t\t\tURL u = new URL(url);\r\n\t\t\tu.toURI();\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t} catch (URISyntaxException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t\tthis.settings.setProperty(\"HTTP_URL\", url);\r\n\t\tthis.saveChanges();\r\n\t}", "public void setRemoteURL(String remoteURL) {\r\n\t\tthis.remoteURL=remoteURL;\r\n\t}", "public final void setUrl(final String url) {\n if (StringUtils.isNotBlank(url)) {\n this.url = url.replaceAll(\" \", \"%20\");\n }\n }", "public void setURLObject(URL url) {\n\t\tthis.url = url;\n\t}", "private void setKlarosUrl(final String value) {\n\n klarosUrl = value;\n }", "public SeriesInstance setUrl(UriDt theValue) {\n\t\tmyUrl = theValue;\n\t\treturn this;\n\t}", "public void setUrl(String url){\n\t\t_url=url;\n\t}", "public void setUrl(String url) {\n if(url != null && !url.endsWith(\"/\")){\n url += \"/\";\n }\n this.url = url;\n }", "public void setVideo(String video) {\n this.video = video;\n }", "public String getVideoUrl() {\n return videoUrl;\n }", "public void setUrl(String url){\n this.URL3 = url;\n }", "public void setUrl (java.lang.String url) {\r\n\t\tthis.url = url;\r\n\t}", "public void setPostURL(String postURL) throws IllegalArgumentException {\n\t\tif (postURL == null) {\n\t\t\tthrow new IllegalArgumentException(\"The postURL must not be null.\");\n\t\t}\n\n\t\tthis.postURL = postURL;\n\t}", "public void setMovie(Movie movie) {\n this.movie = movie;\n }", "public void setPreviewBitmap(String previewPath)\n {\n if (previewPath != null) {\n // Set the preview image via Glide Library\n Glide.with(ITFImageView.this)\n .load(new File(previewPath)) // Uri of the picture\n .into(ITFImageView.this);\n }\n }", "public void setUrl(String Url) {\n this.Url = Url;\n }", "private void setImage(String downloaderUri, String thubo) {\n blogImageView = mView.findViewById(R.id.postView_image_post);\n\n //request optional to assign temporary image appear before while loading the image from db.\n RequestOptions requestOptions = new RequestOptions();\n requestOptions.placeholder(R.drawable.postlist);\n\n //Glide.with(context).applyDefaultRequestOptions(requestOptions).load(thubo).into(blogImageView);\n Glide.with(context).applyDefaultRequestOptions(requestOptions).load(downloaderUri).thumbnail(\n Glide.with(context).load(thubo)\n ).into(blogImageView);\n\n }", "public ImagingStudy setUrl( String theUri) {\n\t\tmyUrl = new UriDt(theUri); \n\t\treturn this; \n\t}", "public void setSource(String path){\n videoTimeline.setTrim(path);\n getVideoInfo(path);\n }", "public void setUrl(String url) {\r\n this.url = url;\r\n }", "public void setUrl(String url) {\r\n this.url = url;\r\n }", "public void setUrl(String url) {\r\n this.url = url;\r\n }", "public void setPlayUri(java.lang.String param) {\n localPlayUriTracker = true;\n\n this.localPlayUri = param;\n }", "public void setOrigURL(String v) {\n if (MetadataUGWD_Type.featOkTst && ((MetadataUGWD_Type)jcasType).casFeat_origURL == null)\n jcasType.jcas.throwFeatMissing(\"origURL\", \"de.aitools.ie.uima.type.argumentation.MetadataUGWD\");\n jcasType.ll_cas.ll_setStringValue(addr, ((MetadataUGWD_Type)jcasType).casFeatCode_origURL, v);}", "public static void setVideoSource(String source){\r\n\r\n editor.putString(\"VideoMode\", source);\r\n editor.commit();\r\n }", "public static void setPublishersWebpage(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(model, instanceResource, PUBLISHERSWEBPAGE, value);\r\n\t}", "@NonNull\n public String getVideoUrl() {\n return videoUrl;\n }", "public static void setPublishersWebpage( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, PUBLISHERSWEBPAGE, value);\r\n\t}", "public void setURL(String url) {\n\t\tboolean changed = url==null ? this.url!=null : !url.equals(this.url);\n\t\tif (changed) {\n\t\t\tstop();\n\t\t\tthis.url = url;\n\t\t\tstart();\n\t\t}\n\t}", "public void setUrl(String url)\n {\n this.url = url;\n }", "public Series setUrl(UriDt theValue) {\n\t\tmyUrl = theValue;\n\t\treturn this;\n\t}", "public void setUrl(String url) {\r\n\t\tthis.url = url;\r\n\t}", "public void setUrl(String url) {\r\n\t\tthis.url = url;\r\n\t}", "public void setUrl(String url) {\n\t\tthis.url = url == null ? null : url.trim();\n\t}", "public static void setOfficialArtistWebpage(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(model, instanceResource, OFFICIALARTISTWEBPAGE, value);\r\n\t}", "public void setUrl(String url) {\n\t\turl = url == null ? null : url.trim();\n\n\t\tsetField(\"url\", url);\n\t}" ]
[ "0.6369654", "0.6324107", "0.628994", "0.6202593", "0.60504997", "0.60483944", "0.602875", "0.5997986", "0.58896357", "0.5859275", "0.5859275", "0.5783474", "0.5698513", "0.55634475", "0.5559995", "0.5557169", "0.55567634", "0.5553124", "0.55457306", "0.554344", "0.55363786", "0.55293137", "0.5507751", "0.54810977", "0.54713106", "0.54713106", "0.5461153", "0.54432815", "0.54329795", "0.54329795", "0.5428189", "0.5417421", "0.54114455", "0.540468", "0.53839946", "0.5376217", "0.5333584", "0.53334886", "0.53073657", "0.5298781", "0.5289676", "0.527653", "0.5257451", "0.5254457", "0.52514887", "0.5251175", "0.5247397", "0.5241787", "0.52373517", "0.52300984", "0.52282506", "0.52046937", "0.5199803", "0.5199458", "0.51907617", "0.516405", "0.5156708", "0.5147053", "0.51368237", "0.5126156", "0.51242685", "0.51242685", "0.51131886", "0.5109387", "0.5080242", "0.50756335", "0.507523", "0.5059366", "0.50546795", "0.5050153", "0.5047439", "0.5042441", "0.5042149", "0.5041665", "0.5038262", "0.50378907", "0.50250953", "0.5021684", "0.50111324", "0.5003737", "0.49984798", "0.49865985", "0.4985816", "0.49804157", "0.49804157", "0.49804157", "0.49766546", "0.49735278", "0.49653482", "0.4962338", "0.49613467", "0.49587736", "0.49587375", "0.4954188", "0.4953226", "0.49522382", "0.49522382", "0.49474013", "0.49444076", "0.49442974" ]
0.70793897
0
Gets the backdrop URL address of the movie.
public String getBackdropUrl() { return backdropUrl; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String buildBackdropUrl(String imageExtension) {\n return MOVIE_IMAGE_BASE_BACKDROP_URL + \"/\" + imageExtension;\n }", "public void setBackdropUrl(String backdropUrl) {\n this.backdropUrl = backdropUrl;\n }", "private static Uri buildMovieImageURI(String imagePath, boolean backdrop){\n // Select size based on the image <- POSTER by default as it's much more frequent\n String size = POSTER_SIZE;\n if(backdrop)\n size = BACKDROP_SIZE;\n\n return Uri.parse(BASE_IMAGE_URL).buildUpon()\n .appendPath(size)\n .appendPath(imagePath.substring(1))\n .build();\n }", "public static String getRandomVideoUrl() {\n int index = RandomNumberGenerator.getRandomInt(0, videos.length - 1);\n return videos[index];\n }", "String getBackdropColorAsString();", "private URL getAssetsUrl() {\n\t\treturn url(ASSETS_URL);\n\t}", "public String getPosterPath() {\n return String.format(\"https://image.tmdb.org/t/p/w342/%s\",posterPath);\n }", "java.lang.String getManifestUrl();", "@Override\n public void addBackdropToActivity(String uri) {\n uri = MovieImagePathHelper.createURLForBackdrop(uri);\n Glide.with(this)\n .load(uri)\n .into(backdropImage);\n }", "public NameValue<String, String> getDestURL() {\n return getDestURL(false);\n }", "public String getSourceDownloadUrl();", "String getRandomSWFURL();", "public CharSequence getCallbackUrl()\n\t{\n\t\treturn getCallbackUrl(true);\n\t}", "public String getPosterUrl() {\n return posterUrl;\n }", "@NonNull\n public String getVideoUrl() {\n return videoUrl;\n }", "public String getVideoUrl() {\n return videoUrl;\n }", "public String getThisApplicationUrl() {\n\t\tString tempFileDest = getProperties().getProperty(\"temp.file.dest\").trim();\n\t\tString thisApplicationUrl = null;\n\t\tif(tempFileDest != null && tempFileDest.contains(\"mysunflower\")){\n\t\t\tthisApplicationUrl = getPortalApplicationUrl();\n\t\t}else{\n\t\t\tthisApplicationUrl = getApplicationUrl();\n\t\t}\n\t\treturn thisApplicationUrl;\n\t}", "public NameValue<String, String> getDestURL(boolean random) {\n return getURL(mDestMap, random);\n }", "private String get_url() {\n File file = new File(url);\n return file.getAbsolutePath();\n }", "java.lang.String getBookingURL();", "public java.lang.String getBookingURL() {\n java.lang.Object ref = bookingURL_;\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 bookingURL_ = s;\n return s;\n }\n }", "public String getAbsoluteUrl() throws MalformedURLException {\r\n URL webUrl = new URL(webAbsluteUrl);\r\n URL urlRequest = new URL(webUrl.toString() + url);\r\n return urlRequest.toString();\r\n }", "public java.lang.String getBookingURL() {\n java.lang.Object ref = bookingURL_;\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 bookingURL_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getDst() {\r\n\t\treturn dst;\r\n\t}", "public final String getUrl() {\n return properties.get(URL_PROPERTY);\n }", "private URL getManifestUrl() {\n\n\t\treturn new URL(VERSION_MANIFEST_URL.replace(\"%s\", \"1.7.2\"));\n\t}", "public String getURL(){\r\n\t\t \r\n\t\t\r\n\t\treturn rb.getProperty(\"url\");\r\n\t}", "RaptureURI getBaseURI();", "public String getScreenshotUrl() {\n return screenshotUrl;\n }", "public String getScreenshotUrl() {\n return screenshotUrl;\n }", "public String getURL() {\r\n\t\treturn dURL.toString();\r\n\t}", "public String getUrl(Slave slave) {\n try {\n return slave.getComputer().getTimeline().getLastBuild().getUrl();\n } catch (NullPointerException e) {\n return \"NoLastBuild\";\n }\n }", "public static String getUrlMovie(Context context) {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);\n return CommonConstants.MOVIE_URL_PREFIX.replace(\"#size#\",\n sharedPreferences.getString(context.getString(R.string.key_pref_size),\n CommonConstants.THEMOVIEDB_SIZE_W185)\n );\n }", "Uri getUrl();", "public static String getUrl() {\n return annotation != null ? annotation.url() : \"Unknown\";\n }", "public String getTargetUrl() {\n return targetUrl;\n }", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "public String getApplicationURL()\n\t{\n\t\tString url=pro.getProperty(\"baseURL\");\n\t\treturn url;\n\t}", "public java.lang.String getEatUri() {\n return localEatUri;\n }", "public String getHostURL() {\n return getHostURL(PAActiveObject.getActiveObjectNodeUrl(PAActiveObject.getStubOnThis()));\n }", "String peekUrl() {\n Entry e = participantsQueue.peek();\n if (e == null) {\n return null;\n }\n return e.getUrl();\n }", "java.lang.String getClickURL();", "com.google.protobuf.ByteString\n getManifestUrlBytes();", "public String getBaseMediaUrl() {\n return (String) get(\"base_media_url\");\n }", "java.lang.String getArtifactUrl();", "public String getUrl() {\n Deque<String> urlDeque = (Deque<String>) httpSession.getAttribute( SessionVariable.SESSION_URL_SCOPE );\n return urlDeque.pollFirst();\n }", "public String getNetShowUrl() throws ServiceLocalException {\n\t\treturn (String) this.getPropertyBag().getObjectFromPropertyDefinition(\n\t\t\t\tAppointmentSchema.NetShowUrl);\n\t}", "@JsonIgnore\n\tpublic String getAbsoluteURI() {\n\t\treturn path.toUri().toString();\n\t}", "String getUrl();", "String getUrl();", "String getUrl();", "String getUrl();", "String getUrl();", "public URL getAddress() {\n return address;\n }", "public String getCreativeDestinationUrl() {\r\n return creativeDestinationUrl;\r\n }", "URL getTarget();", "public String getLastViewedURL() {\n return mPreference.getString(\"LastViewedURL\", NULL_STRING);\n }", "public Optional<URL> avatarUrl() {\n this.use();\n\n try {\n if(avatar != null)\n return Optional.of(new URL(avatar));\n else\n return Optional.empty();\n\n } catch (MalformedURLException e) {\n throw new RuntimeException(\"Since URLs are sent by the server, they shouldn't be malformed...\", e);\n }\n }", "public boolean isSetBackdrop_path() {\n return this.backdrop_path != null;\n }", "public String getDownloadLink() {\r\n\t\tString site = MySoup.getSite();\r\n\t\tString authKey = MySoup.getAuthKey();\r\n\t\tString passKey = MySoup.getPassKey();\r\n\t\tString downloadLink = site + \"torrents.php?action=download&id=\" + id + \"&authkey=\" + authKey + \"&torrent_pass=\" + passKey;\r\n\t\treturn downloadLink;\r\n\t}", "java.lang.String getDidUri();", "public static String getDongtuServerUrl() {\n return BaseAppServerUrl.videoUrl + \"?service=\";\n }", "public String getPreViewUrl();", "@Override\n public String getUrl() {\n return getOriginUrl();\n }", "public String getPhotoUrl() {\n return fullPhoto.getPhotoUrl();\n }", "public final VideoUrl mo96789a() {\n return this.f75940a;\n }", "public URL getAlbumArtUrl(final ZonePlayer zp) throws MalformedURLException {\n String uri = getAlbumArtUri();\n if (uri.startsWith(\"/getAA\")) {\n // need to use mpath. what does this mean??\n LOGGER.info(\"uri = \" + uri);\n }\n\n return uri.length() == 0 ? null : new URL(\"http\", zp.getIP().getHostAddress(), zp.getPort(), uri);\n }", "public static String getMp3Href(Document document) {\n Elements mp3Href = document.select(\".download.bbcle-download-extension-mp3\");\n return mp3Href.attr(\"href\");\n }", "public static URL buildMoviePosterUrl(String poster_image_name) {\n //remove \"/\" from image name\n poster_image_name = poster_image_name.startsWith(\"/\") ? poster_image_name.substring(1) : poster_image_name;\n\n Uri builtUri = Uri.parse(MOVIE_POSTER_BASE_URL).buildUpon()\n .appendPath(IMAGE_SIZE)\n .appendPath(poster_image_name)\n .build();\n\n URL url = null;\n try {\n url = new URL(builtUri.toString());\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n\n return url;\n }", "public String getUrl() {\n Object ref = url_;\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 url_ = s;\n }\n return s;\n }\n }", "public final OMSVGAnimatedString getHref() {\n return ((SVGFilterElement)ot).getHref();\n }", "URL getUrl();", "public java.lang.String getBoletoUrl() {\n return boletoUrl;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getUrlBytes() {\n return instance.getUrlBytes();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getUrlBytes() {\n return instance.getUrlBytes();\n }", "public String getURL() {\n\t\treturn RequestConstants.BASE_IMAGE_URL+_url;\n\t}", "@java.lang.Override\n public java.lang.String getUrl() {\n return instance.getUrl();\n }", "@java.lang.Override\n public java.lang.String getUrl() {\n return instance.getUrl();\n }", "public String getUrlForSharing() {\n PostData pd = getAdapter().getPost(mPager.getCurrentItem());\n return pd.getUrl();\n }", "public String getUrl() { /* (readonly) */\n return mUrl;\n }", "public String getCompanyDocumentUrl() {\n\t\tString address = getProperties().getProperty(\"company.document.url\").trim();\n\t\treturn address;\n\t}", "public String getUrl() {\n Object ref = url_;\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 url_ = s;\n return s;\n }\n }", "public String getUrl();", "public String getUrl();", "public String getUrl();", "public String getUrl();", "public String getUrl() {\n Object ref = url_;\n if (!(ref instanceof String)) {\n String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n url_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "private String makeServerUrl(){\n\t\tURL url = null;\n\t\t\n\t\t//Make sure we have a valid url\n\t\tString complete = this.preferences.getString(\"server\", \"\");\n\t\ttry {\n\t\t\turl = new URL( complete );\n\t\t} catch( Exception e ) {\n\t\t\tonCreateDialog(DIALOG_INVALID_URL).show();\n\t\t\treturn null;\n\t\t}\n\t\treturn url.toExternalForm();\n\t}", "public String getUrl() {\n\t\tif (prop.getProperty(\"url\") == null)\n\t\t\treturn \"\";\n\t\treturn prop.getProperty(\"url\");\n\t}", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n url_ = s;\n }\n return s;\n }\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n url_ = s;\n }\n return s;\n }\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n url_ = s;\n }\n return s;\n }\n }", "private String getURL() {\n\t\t// TODO : Generate URL\n\t\treturn null;\n\t}", "String getUri( );", "public String getURL();" ]
[ "0.6800313", "0.6663785", "0.5434977", "0.51348525", "0.5131242", "0.51222503", "0.51031655", "0.50504005", "0.5042861", "0.5039715", "0.50007784", "0.49656975", "0.49249777", "0.49071655", "0.49046904", "0.48956943", "0.48876458", "0.48622844", "0.48571247", "0.4848188", "0.48481435", "0.48321024", "0.48064446", "0.4784973", "0.47671193", "0.4766681", "0.47663555", "0.47646397", "0.47458488", "0.47458488", "0.47447798", "0.4743567", "0.47377124", "0.4737111", "0.47342557", "0.47333214", "0.473166", "0.473166", "0.473166", "0.473166", "0.473166", "0.473166", "0.47261706", "0.47190955", "0.4714354", "0.4685989", "0.46851248", "0.46786544", "0.46738", "0.46372026", "0.46356025", "0.46320856", "0.46301582", "0.46291852", "0.46291852", "0.46291852", "0.46291852", "0.46291852", "0.4625932", "0.46093854", "0.46036884", "0.46027923", "0.4602103", "0.45997626", "0.459973", "0.45856613", "0.45748445", "0.45687336", "0.45658857", "0.4559589", "0.45592722", "0.45580345", "0.45575103", "0.45566684", "0.45431018", "0.45344856", "0.45287636", "0.45223024", "0.4521855", "0.4521855", "0.45122874", "0.451014", "0.451014", "0.45069292", "0.45058787", "0.44928694", "0.44912145", "0.44910115", "0.44910115", "0.44910115", "0.44910115", "0.4479907", "0.4478281", "0.44744465", "0.44743454", "0.44631305", "0.44631305", "0.44594485", "0.44569415", "0.44563815" ]
0.8014233
0
Sets URL address of the backdrop image for the movie.
public void setBackdropUrl(String backdropUrl) { this.backdropUrl = backdropUrl; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getBackdropUrl() {\n return backdropUrl;\n }", "public static String buildBackdropUrl(String imageExtension) {\n return MOVIE_IMAGE_BASE_BACKDROP_URL + \"/\" + imageExtension;\n }", "@Override\n public void addBackdropToActivity(String uri) {\n uri = MovieImagePathHelper.createURLForBackdrop(uri);\n Glide.with(this)\n .load(uri)\n .into(backdropImage);\n }", "private static Uri buildMovieImageURI(String imagePath, boolean backdrop){\n // Select size based on the image <- POSTER by default as it's much more frequent\n String size = POSTER_SIZE;\n if(backdrop)\n size = BACKDROP_SIZE;\n\n return Uri.parse(BASE_IMAGE_URL).buildUpon()\n .appendPath(size)\n .appendPath(imagePath.substring(1))\n .build();\n }", "void setImageFromURL(String imageURL);", "void setImageLocation(URL imageLocation) throws IOException;", "public void setBackgroundImage(String url) {\n\t\t this.backgroundImage=url;\n\t}", "private void setBackgrond(){\t\n this.background = new JLabel();\n this.background.setIcon(backgrondP);\n this.background.setVisible(true);\n this.background.setLocation(0, 0);\n this.background.setSize(backgrondP.getIconWidth(),backgrondP.getIconHeight());\n this.add(background);\n\t}", "public void SetUrl(String url)\n\t{\n\t if (video_view.isPlaying())\n\t {\n\t video_view.stopPlayback();\n\t }\n\t \n Uri uri = Uri.parse(url);\n video_view.setVideoURI(uri);\n\t}", "void setAvatarUrl(String avatarUrl);", "public void setImageView() {\n \timage = new Image(\"/Model/boss3.png\", true);\n \tboss = new ImageView(image); \n }", "@Override\n public void loadImage(@Nullable String url) {\n if (view != null) {\n if (url == null) {\n view.exit();\n return;\n }\n view.showImage(url);\n }\n }", "public void setURL(String url) {\n \t\tblueURL = url;\n\t}", "private void setImageOnGUI() {\n\n // Capture position and set to the ImageView\n if (AppConstants.fullScreenBitmap != null) {\n fullScreenSnap.setImageBitmap(AppConstants.fullScreenBitmap);\n }\n\n }", "private void downloadPoster() {\n\n try {\n // Downloading the image from URL\n URL url = new URL(Constants.MOVIE_MEDIA_URL + cbPosterQuality.getSelectionModel().getSelectedItem().getKey() + movie.getPosterURL());\n Image image = new Image(url.toExternalForm(), true);\n\n // Adding the image to the ImageView\n imgPoster.setImage(image);\n\n // Adding the ImageView to the custom made ImageViewPane\n imageViewPane.setImageView(imgPoster);\n\n // Binding the image download progress to the progress indicator\n imageProgressIndicator.visibleProperty().bind(image.progressProperty().lessThan(1));\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n }", "public void setSource(URL url) throws IOException {\n\t\tFile f = new File(url.getFile());\n\t\tif (f.isAbsolute()) {\n\t\t\tsourceFile = url;\n\t\t\timg = ImageIO.read(f);\n\t\t\tthis.isRelativePath = false;\n\t\t} else {\n\t\t\tsourceFile = new URL(SymbologyFactory.SymbolLibraryPath\n\t\t\t\t\t+ File.separator + f.getPath());\n\t\t\timg = ImageIO.read(f);\n\t\t\tthis.isRelativePath = true;\n\t\t}\n\t}", "public void setSoundClip(String strURL) {\n socSound = new SoundClip(strURL);\n }", "@Override\n protected void onPreExecute() {\n imgPlaceDetail.setImageBitmap(getBitmapFromAssets(\"no_image_backdrop.png\"));\n //imgPlaceDetail.setImageResource(R.drawable.no_image_backdrop);\n //imgPlaceDetail.invalidate();\n\n }", "@ZAttr(id=649)\n public void setSkinLogoURL(String zimbraSkinLogoURL) throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraSkinLogoURL, zimbraSkinLogoURL);\n getProvisioning().modifyAttrs(this, attrs);\n }", "@Override\r\n\tpublic void setFlavor() {\n\t\thasFlavor = false;\r\n\t\tsetChanged();\r\n\t\tnotifyObservers(OBSERVABLE_EVENT_SET_FLAVOR);\r\n\t}", "public static void setBackgroundArtist( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, BACKGROUNDARTIST, value);\r\n\t}", "public static void setAttachedPicture( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, ATTACHEDPICTURE, value);\r\n\t}", "public void Back(){\n setImage(\"button-blue.png\");\n }", "public void setImageURL(String imageURL) \r\n\t{\r\n\t\t\r\n\t\tthis.imageURL = imageURL;\r\n\t\t\r\n\t}", "public static void setAttachedPicture(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, DataObject value) {\r\n\t\tBase.set(model, instanceResource, ATTACHEDPICTURE, value);\r\n\t}", "@ZAttr(id=649)\n public Map<String,Object> setSkinLogoURL(String zimbraSkinLogoURL, Map<String,Object> attrs) {\n if (attrs == null) attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraSkinLogoURL, zimbraSkinLogoURL);\n return attrs;\n }", "protected void setPic() {\n }", "public void setStaticPicture(String path);", "private void setFramePath()\n\t{\n\t\tcurrFramePath = location + \"/\" + currentSet + \"/\" + \"frame\"\n\t\t\t\t+ Integer.toString(currFrame) + \".png\";\n\t}", "public static void setBackgroundArtist(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, Contact value) {\r\n\t\tBase.set(model, instanceResource, BACKGROUNDARTIST, value);\r\n\t}", "private URL getAssetsUrl() {\n\t\treturn url(ASSETS_URL);\n\t}", "public void setImgurl(String imgurl) {\n this.imgurl = imgurl;\n }", "T setUrlTarget(String urlTarget);", "public void setImageUrl(String url){\n\n Glide.with(getContext()).load(url)\n .diskCacheStrategy(DiskCacheStrategy.ALL)\n .into(ivImg);\n }", "@Override\n\tpublic void initialize(URL arg0, ResourceBundle arg1) {\n\t\tshowRequestDetails();\n\t\t// set images\n\t\tImage img = new Image(this.getClass().getResource(\"principalFrame.PNG\").toString());\n\t\timgBack.setImage(img);\n\t}", "public void setBrandLogoImageUrl(CharSequence value) {\n this.brand_logo_image_url = value;\n }", "public void setPlace(org.sagebionetworks.web.client.place.Layer place) {\r\n \t\tthis.place = place;\r\n \t\tthis.layerId = place.getLayerId();\t\t\r\n \t\tthis.showDownload = place.getDownload();\r\n \t\tview.setPresenter(this);\r\n \t\trefresh();\r\n \t}", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n super.initialize();\n this.__intialiseMode(Gamemode.PRACTICE);\n this.__intialiseMode(Gamemode.RANKED);\n\n setAvatarImage(rankedAvatar);\n\n this.backButton.addEventHandler(MouseEvent.MOUSE_CLICKED, _event -> MainApp.setRoot(Views.MENU));\n }", "public void setImage(String path) {\n\t\tthis.path = path;\n\t\tgetImage().set(new Image(path));\n\t}", "private void setImage(String downloaderUri, String thubo) {\n blogImageView = mView.findViewById(R.id.postView_image_post);\n\n //request optional to assign temporary image appear before while loading the image from db.\n RequestOptions requestOptions = new RequestOptions();\n requestOptions.placeholder(R.drawable.postlist);\n\n //Glide.with(context).applyDefaultRequestOptions(requestOptions).load(thubo).into(blogImageView);\n Glide.with(context).applyDefaultRequestOptions(requestOptions).load(downloaderUri).thumbnail(\n Glide.with(context).load(thubo)\n ).into(blogImageView);\n\n }", "private void saveImageInstantly() {\n\n if (movie != null) {\n\n // Get movie's title and set an initial file name\n String movieTitle = movie.getMovieTitle();\n\n // Replace any invalid characters\n movieTitle = movieTitle.replaceAll(\"[\\\"/?\\\"*><|]\", \"\").replace(\":\", \"-\");\n\n // If preferences file is empty\n if (userDirectoryString.equals(\"empty\")) {\n\n userDirectoryString = System.getProperty(\"user.home\");\n }\n\n File userDirectory = new File(userDirectoryString + \"/\" + movieTitle + \".jpg\");\n\n // If it can't access User Home, default to C drive\n if (!userDirectory.getParentFile().canRead()) {\n userDirectory = new File(\"D:\\\\\" + movieTitle + \".jpg\");\n }\n\n // Check file isn't null, so it the image view\n if (imgPoster.getImage() != null) {\n\n try {\n\n ImageIO.write(SwingFXUtils.fromFXImage(imgPoster.getImage(), null), \"jpg\", userDirectory);\n setLblStatus(\"Poster saved successfully.\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }", "public void setResourcePack ( String url ) {\n\t\ttry {\n\t\t\tinvoke ( \"setResourcePack\" , new Class[] { String.class } , url );\n\t\t} catch ( NoSuchMethodException e ) { // legacy\n\t\t\tsetTexturePack ( url );\n\t\t}\n\t}", "public void setTurtleImage(Image turtleImage) {\n this.turtleImage = turtleImage;\n }", "private void setStage() {\n\t\tstage = new Stage();\n\t\tstage.setScene(myScene);\n\t\tstage.setTitle(title);\n\t\tstage.show();\n\t\tstage.setResizable(false);\n//\t\tstage.setOnCloseRequest(e -> {\n//\t\t\te.consume();\n//\t\t});\n\t}", "public void setURL(String url);", "public void setPreviewBitmap(String previewPath)\n {\n if (previewPath != null) {\n // Set the preview image via Glide Library\n Glide.with(ITFImageView.this)\n .load(new File(previewPath)) // Uri of the picture\n .into(ITFImageView.this);\n }\n }", "public void setAddress(final URL value) {\n this.address = value;\n }", "public Builder setPackageImageURL(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n packageImageURL_ = value;\n onChanged();\n return this;\n }", "public void setUrl(URL url)\n {\n this.url = url;\n }", "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}", "public boolean isSetBackdrop_path() {\n return this.backdrop_path != null;\n }", "public void setPosterUrl(String posterUrl) {\n this.posterUrl = posterUrl;\n }", "public void populateUI(Movies movies) {\n // Set title to the current Movie\n collapsingToolbarLayout.setTitle(movies.getMovieTitle());\n\n String backdropIdString = movies.getMovieBackdrop();\n String backdropUrlString = NetworkUtils.buildPosterBackdropUrl(backdropIdString);\n\n // Display the second poster image background\n Picasso.with(mMovieBackdropImage.getContext())\n .load(backdropUrlString)\n .placeholder(R.drawable.movie_placeholder_02)\n .error(R.drawable.movie_placeholder_02)\n .into(mMovieBackdropImage);\n }", "public maestro.payloads.FlyerFeaturedItem.Builder setBrandLogoImageUrl(CharSequence value) {\n validate(fields()[7], value);\n this.brand_logo_image_url = value;\n fieldSetFlags()[7] = true;\n return this;\n }", "public void setImgUrl(String imgUrl) {\r\n this.imgUrl = imgUrl;\r\n }", "private void setBackground() throws IOException{\n\t\tBufferedImage backgroundBufferedImage = ImageLoader.getBufferedImage(backgroundImagePath);\n\t\tmainWindow.setBackgroundImage(backgroundBufferedImage);\n\t}", "public void setTempImage()\n {\n URL url = this.getClass().getResource(lastselection.getImage());\n\t\tImage image = Toolkit.getDefaultToolkit().getImage(url);\n\t\ttempImage = new PImage(image);\n\t\ttempImage.setBounds(0,0,65,170);\n\t\ttempImage.setTransparency(0);\n\t\tlayer.addChild(tempImage);\n\t}", "public void setImagebase(final Address address) throws CouldntSaveDataException {\n try {\n m_module.getConfiguration().setImageBase(new CAddress(address.toLong()));\n } catch (final com.google.security.zynamics.binnavi.Database.Exceptions.CouldntSaveDataException e) {\n throw new CouldntSaveDataException(e);\n }\n }", "public void setUrl(String url);", "public void setUrl(String url);", "private void setUrlBytes(\n com.google.protobuf.ByteString value) {\n url_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }", "public void setBackgroundImage(BackgroundImage image) {\n this.backgroundImage = image;\n }", "public void setImageView(double x, double y) {\n \timage = new Image(\"/Model/boss3.png\", true);\n \tboss = new ImageView(image);\n \tboss.setTranslateX(x);\n \tboss.setTranslateY(y);\n }", "public void setBackgroundArtist( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), BACKGROUNDARTIST, value);\r\n\t}", "public void setImageAsset(String filename)\r\n {\r\n new LoadAssetTask().execute(filename);\r\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n \n photo.setImage(new Image(\"/Image/photobtn.png\"));\n KING.setImage(new Image(\"/Image/king-8.png\"));\n validerbtn.setImage(new Image(\"/Image/validerbtn.png\"));\n retourbtn.setImage(new Image(\"/Image/retour-8.png\"));\n bgimg.setImage(new Image(\"/Image/bgmain.png\"));\n }", "private void setPhotoAttcher() {\n\n }", "public void setUrl(String url){\n this.URL3 = url;\n }", "public void setFrame(BufferedImage frame) {\r\n\t\tplayer = frame;\r\n\t}", "public static void setVolatileUrlDrawable(ImageView icon,\n\t\t\tAccountClient starvingTheFoxPlayer) {\n\t\t\n\t}", "private void changecoverimage() {\n\n Category c = categoryFactory.getCategory(category);\n int drawableId = getResources().getIdentifier(\"cover_\"+c.getCategory_name().toLowerCase().replace(\" \",\"\"), \"drawable\", getPackageName());\n if(drawableId == 0){\n drawableId = getResources().getIdentifier(\"cover_default\", \"drawable\", getPackageName());\n }\n Glide.with(this).load(drawableId).into((ImageView) findViewById(R.id.backdrop));\n\n\n }", "Builder addImage(URL value);", "private void setUrlBytes(\n com.google.protobuf.ByteString value) {\n url_ = value.toStringUtf8();\n bitField0_ |= 0x00000001;\n }", "public static URL buildMoviePosterUrl(String poster_image_name) {\n //remove \"/\" from image name\n poster_image_name = poster_image_name.startsWith(\"/\") ? poster_image_name.substring(1) : poster_image_name;\n\n Uri builtUri = Uri.parse(MOVIE_POSTER_BASE_URL).buildUpon()\n .appendPath(IMAGE_SIZE)\n .appendPath(poster_image_name)\n .build();\n\n URL url = null;\n try {\n url = new URL(builtUri.toString());\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n\n return url;\n }", "void setImagePath(String path);", "public void setSelectedImgURI(Uri select){\n this.selectedImageUri = select;\n }", "Builder addThumbnailUrl(URL value);", "private void setImageDynamic(){\n questionsClass.setQuestions(currentQuestionIndex);\n String movieName = questionsClass.getPhotoName();\n ImageView ReferenceToMovieImage = findViewById(R.id.Movie);\n int imageResource = getResources().getIdentifier(movieName, null, getPackageName());\n Drawable img = getResources().getDrawable(imageResource);\n ReferenceToMovieImage.setImageDrawable(img);\n }", "public void init() throws MalformedURLException {\n Parent root = loadHierarchy(\"src/main/java/com/mycompany/propertytycoon/gui/mainmenu/homepage.fxml\");\n Scene scene = new Scene(root);\n\n currStage.setTitle(\"Property Tycoon\");\n currStage.setScene(scene);\n URL url = new File(\"src/main/java/resources/img/PTBarLogo.png\").toURI().toURL();\n Image i = new Image(url.toString());\n currStage.getIcons().add(i);\n currStage.show();\n }", "public Builder setPackageImageURLBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n packageImageURL_ = value;\n onChanged();\n return this;\n }", "public void setBackgroundArtist(Contact value) {\r\n\t\tBase.set(this.model, this.getResource(), BACKGROUNDARTIST, value);\r\n\t}", "private void setMovie() {\n Movie movie = getIntent().getExtras().getParcelable(MOVIE);\n Glide.with(mMoviePoster).setDefaultRequestOptions(new RequestOptions().diskCacheStrategy(DiskCacheStrategy.ALL)).load(BuildConfig.IMG_DIR + movie.getPosterPath())\n .into(mMoviePoster);\n setTitle(movie.getTitle());\n mMovieTitle.setText(movie.getTitle());\n mMovieRating.setText(String.valueOf(movie.getVoteAverage()));\n mMovieDate.setText(movie.getReleaseDate());\n mMovieGenre.setText(movie.isAdult() ? getString(R.string.genre_type_adults) : getString(R.string.genre_type_all));\n mMovieDesc.setText(movie.getOverview());\n }", "public void setStage(Stage currentStage)\n\t{\n\t\tthis.thisStage = currentStage;\n\t\tthisStage.setOnCloseRequest(new EventHandler<WindowEvent>() {\n\t\t\tpublic void handle(WindowEvent t) {\n\t\t\t\t//Platform.exit();\n\t\t\t}\n\t\t});\n\t}", "public void setServer(URL url) {\n\n\t}", "public void setEatImage(java.lang.String param) {\n localEatImageTracker = true;\n\n this.localEatImage = param;\n }", "private void setURL(String url) {\n try {\n URL setURL = new URL(url);\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "private void setLeadPlayerImage() {\n Player leadPlayer = game.getLeadingPlayer();\n if (leadPlayer == null) {\n // no lead so set images to default\n playerLeadImage.setImage(null);\n computerLeadImage.setImage(null);\n return;\n }\n if (leadPlayer.getName().equals(\"Computer\")) {\n computerLeadImage.setImage(new Image(\"Images/trophy.png\"));\n playerLeadImage.setImage(null);\n return;\n }\n playerLeadImage.setImage(new Image(\"Images/trophy.png\"));\n computerLeadImage.setImage(null);\n }", "public void setBackground(String imagePath) {\n\t\ttry {\n\t\t\timagePath = imagePath.replace(\"\\\\\", \"/\");\n\t\t\tString pathString = new File(imagePath).toURI().toURL().toString();\n\t\t\tbackgroundImagePane.setStyle(\"-fx-background-image:url(\\\"\" + pathString + \"\\\");\");\n\t\t} catch (MalformedURLException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "@FXML\r\n public void imageButtonClicked() {\r\n File file = fileChooser.showOpenDialog(viewHandler.getPrimaryStage());\r\n if (file != null) {\r\n try {\r\n viewModel.setImageurl(ImageConverter.ImageToByte(file));\r\n Image img = new Image(new ByteArrayInputStream(viewModel.getImageurl()));\r\n dogPicture.setFill(new ImagePattern(img));\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "public void setImage(String path) {\n\t\timageIcon = new ImageIcon(Helper.getFileURL(path));\n\t}", "public static void setOriginalArtist( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, ORIGINALARTIST, value);\r\n\t}", "private void setAssetPath(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n assetPath_ = value;\n }", "public void setURL(String key, URL value) {\n\t\tif (value != null && !value.equals(getDefault(key)))\n\t\t\tinternal.setProperty(key, value.toString());\n\t\telse\n\t\t\tinternal.remove(key);\n\t}", "public void setBackgroundImage(String imagePath) \n\t{\n\t try\n\t {\n\t\t Context context = this.getContext();\n\t\t if (context != null)\n\t\t {\n\t\t\t FileInputStream wFile = new FileInputStream(imagePath);\n\t\t\t BufferedInputStream wBuffer = new BufferedInputStream(wFile);\n\t\t\t mBackImage = BitmapFactory.decodeStream(wBuffer);\n\t if (wFile != null) \n\t {\n\t \t wFile.close();\n\t }\n\t if (wBuffer != null) \n\t {\n\t \t wBuffer.close();\n\t }\n\t\t }\n\t\t if (mBackImage != null)\n\t\t {\n\t\t\t drawThumbnail();\n\t\t }\n\t }\n\t catch(FileNotFoundException e)\n\t { \n\t\t Log.e(LOG_TAG, \"The file '\" + imagePath + \"' does not exists.\");\n\t }\n\t catch(Exception e)\n\t {\n\t\t Log.e(LOG_TAG, e.toString());\n\t }\n\t}", "public void setImage(String ref){\n\t ImageIcon ii = new ImageIcon(this.getClass().getResource(ref));\n\t image = ii.getImage();\n\t}", "private void showBack() {\n Drawable buttonDrawableBack = new TextureRegionDrawable(new TextureRegion((Texture)game.getAssetManager().get(\"buttonBack.png\")));\n BackButton = new ImageButton(buttonDrawableBack);\n BackButton.setSize(MENU_WIDTH/7,MENU_HEIGHT/7);\n BackButton.setPosition(7*MENU_WIDTH/8 - BackButton.getWidth()/2, MENU_HEIGHT/7 -DELTA_Y_MENU);\n stage.addActor(BackButton);\n }", "public void setSrc(String src) {\n attributes.put(\"src\", src);\n }", "@Override\r\n\t\t\t\tpublic void onAnimationEnd(Animation animation) {\n\t\t\t\t\tartwork_front.setImageBitmap(behind);\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void onAnimationEnd(Animation animation) {\n\t\t\t\t\tartwork_front.setImageBitmap(behind);\r\n\t\t\t\t}", "public static void setOfficialArtistWebpage(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(model, instanceResource, OFFICIALARTISTWEBPAGE, value);\r\n\t}" ]
[ "0.6997317", "0.6305979", "0.62903047", "0.587746", "0.55584824", "0.5312496", "0.53049445", "0.5168705", "0.5061", "0.5047594", "0.5002224", "0.4972782", "0.49317607", "0.49171895", "0.48680058", "0.4840593", "0.4819902", "0.4814559", "0.4784303", "0.477817", "0.47707707", "0.47629517", "0.47613", "0.47223544", "0.47090885", "0.468315", "0.46825024", "0.46597707", "0.46112725", "0.45924717", "0.45898905", "0.45680392", "0.45657524", "0.45560136", "0.45545214", "0.4546863", "0.4543925", "0.45370263", "0.45336586", "0.45314693", "0.45153803", "0.45131832", "0.45091602", "0.4503549", "0.44998944", "0.44957054", "0.44920415", "0.44889146", "0.44879857", "0.44877163", "0.4481428", "0.4479617", "0.44727293", "0.4467139", "0.4466011", "0.44654498", "0.4465181", "0.4457111", "0.44477174", "0.44477174", "0.44424284", "0.44305637", "0.44242412", "0.44219783", "0.44174767", "0.44093296", "0.4408015", "0.44059736", "0.44042715", "0.4400904", "0.440014", "0.43983907", "0.4393197", "0.43920976", "0.4390965", "0.43896905", "0.43831903", "0.43740413", "0.43693167", "0.43587065", "0.43534833", "0.4347317", "0.43469882", "0.43401822", "0.43384877", "0.43370566", "0.4336043", "0.43352458", "0.4335116", "0.43310922", "0.43272674", "0.4323652", "0.4322039", "0.4319013", "0.4308413", "0.43025127", "0.4301514", "0.42970607", "0.42970607", "0.42969042" ]
0.75204766
0
Gets the user rating for the movie.
public String getUserRating() { return userRating; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getRating(){\n\t\treturn this.user_rating;\n\t}", "public double getRating(int userID, int movieID) {\n\t\tUser x = null;\n\t\tint ind = Collections.binarySearch(users, new User(userID));\n\t\tif(ind >= 0)\n\t\t\tx = users.get(ind);\n\t\telse\n\t\t\treturn -1;\n\n\t\tint ind2 = Collections.binarySearch(x.getRatings(), new Rating(userID, movieID));\n\t\tif(ind2 >=0)\n\t\t\treturn x.getRatings().get(ind2).getRating();\n\n\t\treturn -1;\n\t}", "double getRating();", "public double guessRating(int userID, int movieID) {\n\t\tMovie movie = null;\n\t\tUser user = null;\n\t\tdouble avgRating = 0;\n\t\tfor(Rating r : ratings) {\n\t\t\tavgRating += r.getRating();\n\t\t}\n\t\tavgRating /= ratings.size();\n\t\tfor(Movie m : movies) {\n\t\t\tif(m.getId() == movieID) {\n\t\t\t\tmovie = m;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tfor(User m : users) {\n\t\t\tif(m.getId() == userID) {\n\t\t\t\tuser = m;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tdouble movieAvg = movie.getAverageRating();\n\t\tdouble userAvg = user.getAverageRating();\n\t\tdouble userStdDeviationFromAvg = user.standardDeviationFromAvg();\n\n\t\tdouble userGenreAvg = 0;\n\t\tint count = 0;\n\t\tfor(Genre g : movie.getGenres()) {\n\t\t\tdouble x = user.genreAvgRating(g);\n\t\t\tif(x != 0) {\n\t\t\t\tuserGenreAvg += x;\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tif(count != 0)\n\t\t\tuserGenreAvg /= count;\n\t\telse\n\t\t\tuserGenreAvg = userAvg;\n\n\n\t\tArrayList<User> similar = findSimilarUsers(user);\n\t\tif(similar.size() > 20) {\n\t\t\tdouble similarAvg = 0;\n\t\t\tint divisor = 0;\n\t\t\tfor(User u : similar) {\n\t\t\t\tArrayList<Rating> rates = u.getRatings();\n\t\t\t\tint ind = Collections.binarySearch(rates, new Rating(u.getId(), movie.getId()));\n\t\t\t\tif(ind >= 0) {\n\t\t\t\t\tsimilarAvg += rates.get(ind).getRating();\n\t\t\t\t\tdivisor++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(divisor > 20) {\n\t\t\t\t//\t\t\t\t0.7101228845726688\n\t\t\t\tsimilarAvg /= divisor;\n\t\t\t\treturn similarAvg;\n\t\t\t}\n\t\t}\n\n\t\tdouble rating1 = userStdDeviationFromAvg + movieAvg;\n\t\tdouble rating2 = userGenreAvg;\n\n\t\tif(rating1 < 1)\n\t\t\trating1 = 1;\n\t\telse if(rating1 > 5)\n\t\t\trating1 = 5;\n\n\t\tdouble finalRating = 0.3 * rating1 + 0.7 * rating2;\n\t\t//\t\tSystem.out.println(finalRating);\n\n\n\t\treturn finalRating;\n\t}", "public double getRatingAt(int pos) {\n return this.usersRatings.get(pos).getRating();\n }", "public MediaRating getRating() {\n MediaRating mediaRating = ratings.get(MediaRating.USER);\n\n // then the default one (either NFO or DEFAULT)\n if (mediaRating == null) {\n mediaRating = ratings.get(MediaRating.NFO);\n }\n if (mediaRating == null) {\n mediaRating = ratings.get(MediaRating.DEFAULT);\n }\n\n // is there any rating?\n if (mediaRating == null && !ratings.isEmpty()) {\n mediaRating = ratings.values().iterator().next();\n }\n\n // last but not least a non null value\n if (mediaRating == null) {\n mediaRating = new MediaRating();\n }\n\n return mediaRating;\n }", "public Integer getRating() {\r\n if (recipe != null && ui.isIsUserAuthenticated()) {\r\n RecipeRating temp = ratingEJB.findByUserAndRecipe(ui.getUser(), recipe);\r\n if (temp != null) {\r\n rating = temp.getRatingValue().getValue();\r\n }\r\n }\r\n return rating;\r\n }", "public double getRating() {\n return rating_;\n }", "public double getRating() {\n return rating_;\n }", "public Short getUserRating() {\r\n return userRating;\r\n }", "public double getRating(){\n\t\treturn this.rating;\n\t}", "public float getUserRatingScore() {\n float scorePercent = Float.valueOf(userRating) * 10;\n\n return ((5 * scorePercent) / 100);\n }", "public double getRating() {\n\t\treturn rating;\n\t}", "public Integer getRating() {\n return this.rating;\n }", "public int getRating();", "public float getRating() {\n return this.rating;\n }", "public float getRating() {\n\t\treturn rating;\n\t}", "public float getRating() {\n return rating;\n }", "public float getRating() {\n return rating;\n }", "public Integer getGivenRating() {\n\t\treturn givenRating;\n\t}", "public int getRating()\n {\n return this.rating;\n }", "public int getRating() {\n\t\treturn this.rating;\n\t}", "public double rating() {\r\n double value = BASE_RATING * specialization * (1 / (1 + era)) \r\n * ((wins - losses + saves) / 30.0);\r\n return value;\r\n }", "public java.lang.String getRating() {\n return rating;\n }", "public double movieRatingAverage() {\n return movies.stream()\n .collect(Collectors.averagingDouble(Movie::getRating));\n }", "public int getNumberOfRatings() {\n return this.usersRatings.size();\n }", "List<MovieRating> findAllByUserId(Long userId);", "public double getParseRating() {\n return getDouble(KEY_RATING);\n }", "void getGivenUserRating(String uidRater, final RatingListResult result);", "@Nullable\n public Float getRating() {\n return rating;\n }", "public double getTotalRating() {\n return totalRating;\n }", "public static Rating getRating(long id, User user)\n throws EnvoyServletException\n {\n try\n {\n return ServerProxy.getVendorManagement().getRatingById(user, id);\n }\n catch (Exception e)\n {\n throw new EnvoyServletException(e);\n }\n }", "public int getStarRating(){\n return starRating;\n }", "@Min(0)\n @Max(5)\n public int getRating() {\n return rating;\n }", "public int getRatings() {\n return ratings;\n }", "@GetMapping(\"/users/{userId}\")\r\n public UserRating getUserRating(@PathVariable(\"userId\") String userId) {\r\n List<Rating> ratings = Arrays.asList(\r\n new Rating(\"120\", 4),\r\n new Rating(\"35\", 3)\r\n );\r\n return new UserRating(ratings);\r\n }", "public Integer getRating()\n\t{\n\t\treturn null;\n\t}", "String getReviewrate();", "public String getRatingValue() {\n return ratingValue;\n }", "public List<Rating> findRatingByMovie(String movieID);", "public int getSeekerRating() {\n return getIntegerProperty(\"Rating\");\n }", "public float uGetAvgRating(ArrayList<Integer> movies) {\n\t\tfloat sum = 0;\n\t\tint n = 0;\n\t\t\n\t\tfor (int m : movies) {\n\t\t\t// lookup in ratings\n\t\t\tsum += ((float)ratings.get(m) / 10f);\n\t\t\tn++;\n\t\t}\n\t\t\n\t\treturn sum / n;\n\t}", "public String getRating() {\r\n\t\tswitch (rating) {\r\n\t\tcase \"high\":\r\n\t\t\treturn \"high\";\r\n\t\tcase \"medium\":\r\n\t\t\treturn \"medium\";\r\n\t\tcase \"low\":\r\n\t\t\treturn \"low\";\r\n\t\tdefault: return \"none\";\r\n\t\t}\r\n\t}", "public double getAverageRating() {\n return averageRating;\n }", "public double getAverageRating() {\n return averageRating;\n }", "@Nullable\n final public Double getStarRating() {\n return mStarRating;\n }", "void getRating(String rid, final RatingResult result);", "public double getOgRating() {\n return ogRating;\n }", "public void setUserRating(String userRating) {\n this.userRating = userRating;\n }", "void getUserRatings(String uidRated, final RatingListResult result);", "public int getNoOfratings() {\n\treturn noofratings;\n}", "public int getRatingID() {\n return ratingID;\n }", "public double getActorRating(String n)\n\t{\n\t\tIterator<Movie> itr = list_of_movies.iterator();\n\t\tdouble actor_rating = 0;\n\t\tint num = 0;\n\t\twhile(itr.hasNext())\n\t\t{\n\t\t\tMovie temp_movie = itr.next();\n\t\t\tif(temp_movie.getCast().contains(n))\n\t\t\t//if yes accumulate the movie rating \n\t\t\t{\n\t\t\t\tactor_rating += temp_movie.getRating();\n\t\t\t\tnum++;\n\t\t\t}\t\t\n\t\t}\t\n\t\t//if yes accumulate the movie rating\n\t\t//divie by the number of of accumulated values\n\t\tactor_rating = actor_rating/num;\n\t\treturn actor_rating;\n\t}", "Integer rateSong(User user, Song toRate, Integer rating)\n\t\tthrows IllegalArgumentException, IndexOutOfBoundsException, NullPointerException;", "public int getSumratings() {\n\treturn sumratings;\n}", "public double getRatingAverage() {\n return average;\n }", "public int get () { return rating; }", "public Float getAverageRating() {\n\t return this.averageRating;\n\t}", "public int predictRating(User theUser, Video theVideo) throws NullPointerException;", "public int recommendMovie(int userID) {\n\t\tint ind = Collections.binarySearch(users, new User(userID));\n\t\tif(ind >= 0) {\n\t\t\tUser user = users.get(ind);\n\t\t\tif(ind >= 0) {\n\t\t\t\tArrayList<User> similar = findSimilarGenreUsers(user);\n\t\t\t\tif(similar.size() != 0)\n\t\t\t\t\treturn similar.get((int)(Math.random() * (similar.size()-1))).getTopMovie().getId();\n\t\t\t}\n\n\t\t\tArrayList<Genre> genres = user.getTopGenres();\n\t\t\tMovie x = findMovieOverlap(3, genres);\n\t\t\tif(x!= null)\n\t\t\t\treturn x.getId();\t\t\n\t\t\tx = findMovieOverlap(2.5, genres);\n\t\t\tif(x!= null)\n\t\t\t\treturn x.getId();\n\t\t}\n\t\treturn movies.get((int)(Math.random()*(movies.size()-1))).getId();\n\t}", "public com.commercetools.api.models.review.ReviewRatingStatistics getReviewRatingStatistics() {\n return this.reviewRatingStatistics;\n }", "@Override\n\tpublic List<Rating> getAllRating() {\n\t\treturn rr.getAllRating();\n\t}", "public java.lang.String[] getRating() {\n return rating;\n }", "public abstract double calcAvRating();", "@Override\n\tpublic List<Movie> getMovieByRate(Ratings rating) {\n\t\treturn movieRepository.getMovieByRating(rating);\n\t}", "private long calculateAvaregeRating(long curentUserRating) {\n long totalStars = 0;\n for (int x = 1; x < 6; x++) {\n totalStars = totalStars + ((long) documentSnapshot.get(x + \"_star\")) * x;\n }\n totalStars = totalStars + curentUserRating;\n return totalStars / ((long) documentSnapshot.get(\"total_rating\") + 1);\n }", "public int getMovieFlexRatings(String uuid);", "public static double getRandomRating() {\n return (double) (RandomNumberGenerator.getRandomInt(0, 10) / 2d);\n }", "public void getSimilarity(){\r\n\t\tfor(Integer i : read.rateMap.keySet()){\r\n\t\t\tif(i != this.userID){\r\n\t\t\t\t//Calculate the average rate.\r\n\t\t\t\tdouble iAverage = average.get(i);\r\n\t\t\t\tdouble a = 0.0;\r\n\t\t\t\tdouble b = 0.0;\r\n\t\t\t\tdouble c = 0.0;\r\n\t\t\t\t//Set a flag by default meaning the user does not have common rate with this user.\r\n\t\t\t\tboolean intersection = false;\r\n\t\t\t\tArrayList<Map.Entry<String, Double>> list = read.rateMap.get(i);\r\n\t\t\t\tfor(int j = 0; j < list.size(); j++){\r\n\t\t\t\t\tdouble userRate = 0;\r\n\t\t\t\t\tif(ratedID.contains(list.get(j).getKey())){\r\n\t\t\t\t\t\t//The user has common rated movies with this user\r\n\t\t\t\t\t\tintersection = true;\r\n\t\t\t\t\t\tfor(int k = 0; k < read.rateMap.get(userID).size(); k++){\r\n\t\t\t\t\t\t\tif(read.rateMap.get(userID).get(k).getKey().equals(list.get(j).getKey())){\r\n\t\t\t\t\t\t\t\tuserRate = read.rateMap.get(userID).get(k).getValue();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ta += (list.get(j).getValue() - iAverage) * (userRate- this.userAverageRate);\r\n\t\t\t\t\t\tb += (list.get(j).getValue() - iAverage) * (list.get(j).getValue() - iAverage);\r\n\t\t\t\t\t\tc += (userRate - this.userAverageRate) * (userRate - this.userAverageRate);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//Check if this user rated all the movies with the same rate.\r\n\t\t\t\tif(intersection && c == 0){\r\n\t\t\t\t\tfuckUser = true;//really bad user.\r\n\t\t\t\t\treturn;\r\n\t\t\t\t} \r\n\t\t\t\t//Check if current user rated all the movies with the same rate. If so, just set similarity as 0.\r\n\t\t\t\tif(intersection && b != 0){\r\n\t\t\t\t\tdouble s = a / (Math.sqrt(b) * Math.sqrt(c));\r\n\t\t\t\t\tsimilarity.put(i, s);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdouble s = 0;\r\n\t\t\t\t\tsimilarity.put(i, s);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Create a heap storing the similarity pairs in a descending order.\r\n\t\tthis.heap = new ArrayList<Map.Entry<Integer, Double>>();\r\n\t\tIterator<Map.Entry<Integer, Double>> it = similarity.entrySet().iterator();\r\n\t\twhile(it.hasNext()){\r\n\t\t\tMap.Entry<Integer, Double> newest = it.next();\r\n\t\t\theap.add(newest);\r\n\t\t}\r\n\t\tCollections.sort(this.heap, new Comparator<Map.Entry<Integer, Double>>() {\r\n\t\t\t@Override\r\n\t\t\tpublic int compare(Map.Entry<Integer, Double> a, Map.Entry<Integer, Double> b){\r\n\t\t\t\treturn -1 * (a.getValue().compareTo(b.getValue()));\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public Map<String, Rating> getUserRatings(String username) {\n Map<String, Rating> result = new HashMap<String, Rating>();\n Session session = sessionFactory.openSession();\n Transaction tx = null;\n\n try {\n tx = session.beginTransaction();\n\n DaoFactory daoFactory = new HibernateDaoFactory(session);\n UserDao userDao = daoFactory.getUserDao();\n RatingDao ratingDao = daoFactory.getRatingDao();\n\n User user = userDao.findByUsername(username);\n\n if(user == null) {\n throw new RuntimeException(\"No user found for id \" + username); //$NON-NLS-1$\n } else {\n List<Rating> ratings = ratingDao.findByUser(user);\n\n for (Rating rating : ratings) {\n result.put(rating.getTransformationActivity().getId(), rating);\n }\n }\n\n tx.commit();\n } catch (Exception e) {\n if (tx != null) {\n tx.rollback();\n }\n throw new RuntimeException(e);\n } finally {\n session.close();\n }\n\n return result;\n }", "public void getAverageRatingOneMovie() {\n String shortMovieCsv = \"C:/Users/greg/IdeaProjects/capstone-coursera/data/ratedmovies_short.csv\";\n //String shortRatingsCsv = \"/home/greg/IdeaProjects/capstone-coursera/data/ratings_short.csv\";\n String shortRatingsCsv = \"C:/Users/greg/IdeaProjects/capstone-coursera/data/ratings_short.csv\";\n //String bigMovieCsv = \"/home/greg/IdeaProjects/capstone-coursera/data/ratedmoviesfull.csv\";\n //String bigRatingsCsv = \"/home/greg/IdeaProjects/capstone-coursera/data/ratings.csv\";\n //String bigRatingsCsv = \"/home/greg/IdeaProjects/capstone-coursera/data/ratings_file_test.csv\";\n\n SecondRatings secondRatings = new SecondRatings(shortMovieCsv, shortRatingsCsv);\n //SecondRatings secondRatings = new SecondRatings(bigMovieCsv, bigRatingsCsv);\n\n String movieId = secondRatings.getID(\"Vacation\");\n ArrayList<Rating> ratingArrayList = secondRatings.getAverageRatings(1);\n for (Rating rating : ratingArrayList) {\n if (rating.getItem().contains(movieId)) {\n System.out.println(secondRatings.getTitle(movieId) + \" has average rating: \" + rating.getValue());\n }\n }\n }", "public int findUser(int userIndex) {\n return this.usersRatings.find(userIndex);\n }", "public String getRatingText() {\n return ratingText;\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 Rating findById(String ratingId);", "public void setRating(int rating) {\r\n this.rating = rating;\r\n }", "private double getAverageByID(String id, int minimalRaters){\n \n String moviefile = \"data/ratedmovies_short.csv\";\n String ratingsfile = \"data/ratings_short.csv\";\n \n RaterDatabase database = new RaterDatabase();\n database.initialize(ratingsfile);\n \n double avg_rating = 0.0;\n double running_total = 0.0;\n int count = 0;\n \n for (Rater rater : database.getRaters()){ \n \n if(rater.getItemsRated().contains(id)){\n \n double movie_rating = rater.getRating(id);\n \n running_total += movie_rating;\n \n count += 1;\n \n //System.out.println(movie_rating);\n\n }\n }\n\n if(count >= minimalRaters){\n avg_rating = running_total / count;\n }\n\n \n return avg_rating; \n \n }", "public void setRating(int rating) {\n this.rating = rating;\n }", "public int getMinRating() {\n return minRating;\n }", "public float getRating(String productid) {\n\t\treturn 0;\r\n\t}", "public void setRating(int rating)\n {\n this.rating = rating;\n }", "public double getAverageRating() {\n int[] ratings = new int[reviews.length];\n for(int i = 0; i < reviews.length; i++) {\n ratings[i] = reviews[i].getRating();\n }\n double average = (double) sumIntegerArray(ratings) / reviews.length;\n return Double.parseDouble(new DecimalFormat(\"#.#\").format(average));\n }", "public double predict (\tint user, \n\t\t\t\t\t\t\tint item )\t\n\t{\n\t\treturn dao.getUserMeanRating(user);\n\t}", "public void setRating(Integer rating) {\r\n this.rating = rating;\r\n }", "public int getUserAt(int pos) {\n return this.usersRatings.get(pos).getIndex();\n }", "Integer predictRating(User theUser, Song theSong)\n\t\tthrows IllegalArgumentException, NullPointerException;", "public void setRating(float rating) {\n this.rating = rating;\n }", "private void getRatingOfContent(HttpServletRequest req, HttpServletResponse res) throws ServletException,\n\t\t\tIOException {\n\t\ttry {\n\t\t\tPrintWriter out = res.getWriter();\n\t\t\tLong userId = Long.parseLong(req.getParameter(Constants.USER_IDENTIFIER));\n\t\t\tLong contentId = Long.parseLong(req.getParameter(Constants.CONTENT));\n\t\t\tif (userId != null) {\n\t\t\t\tif (PreferenceDB.userHaveContent(userId, contentId)) {\n\t\t\t\t\tout.print(\"[\");\n\t\t\t\t\tfloat rating = myRecommender.getPreferenceValue(userId, contentId);\n\t\t\t\t\tLOGGER.info(\"La valoraci??n al contenido \" + ContentDB.getTitleOfContent(contentId)\n\t\t\t\t\t\t\t+ \" por el usuario \" + UserDB.getnameOfUser(userId) + \" es:\" + rating);\n\t\t\t\t\tout.print(rating);\n\t\t\t\t\tout.print(\"]\");\n\t\t\t\t} else {\n\t\t\t\t\tLOGGER.warning(\"El usuario no ha valorado el contenido\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tLOGGER.warning(\"Usuario no encontrado\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tres.setStatus(HttpServletResponse.SC_SERVICE_UNAVAILABLE);\n\t\t}\n\t}", "public void setMyRating(double myRating) {\n this.myRating = myRating;\n }", "public void setRating(double rating){\n\t\tthis.rating = rating;\n\t}", "private Map<Profile, Integer> rating(){\n\t\treturn allRatings;\n\t}", "public double getAverageByID(String movieID,int minimalRaters){\n double runsum=0.0;\n int numOfRaters=0;\n ArrayList<Rater> list=RaterDatabase.getRaters();\n for(int k=0;k<list.size();k++)\n {\n double currating=list.get(k).getRating(movieID);\n if(currating!=-1)\n {\n runsum+=currating;\n numOfRaters++;\n }\n }\n\n if(numOfRaters>=minimalRaters)\n {\n return runsum/numOfRaters;\n }\n else{\n return 0.0;\n }\n }", "public sust.bookshelves.entity.Rating getRating(java.lang.Integer id) throws GenericBusinessException {\n sust.bookshelves.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.bookshelves.hibernatehelper.HibernateQueryHelper();\n try {\n Rating bean = (Rating) hibernateTemplate.get(Rating.class, id);\n return bean;\n } finally {\n log.debug(\"finished getRating(java.lang.Integer id)\");\n }\n }", "public int getOpponentMinRating() {\n return getIntegerProperty(\"MinRating\");\n }", "public void setRating(double rating) {\n\t\tthis.rating = rating;\n\t}", "public int getHotOrNotRating() {\r\n if (ratingCount == 0) return 0;\r\n return (rating/ratingCount);\r\n }", "float getSteamSupplyRating2();", "@RequestMapping(\"/{userId}\")\n\tpublic ListRating getMovies(@PathVariable(\"userId\") String userId){\n\t\tSystem.out.println(\"Enter in getMovies, userId: \"+userId);\n\t\tList<Rating> movieRatings=new ArrayList<Rating>();\n\t\tmovieRatings.add(new Rating(\"1\", 3));\n\t\tmovieRatings.add(new Rating(\"2\", 5));\n\t\tmovieRatings.add(new Rating(\"3\", 2));\n\t\tmovieRatings.add(new Rating(\"4\", 1));\t\n\t\tListRating lR=new ListRating();\n\t\tlR.setListRating(movieRatings);\n\t\treturn lR;\n\t}", "public void setRating(int rating) {\n\t\tthis.rating = rating;\n\t}", "private double getAverageByID(String movieId, int minimalRaters) {\r\n\t\tdouble average = 0, total = 0;\r\n\t\tint totalRaters = 0;\r\n\r\n\t\tArrayList<Rater> myRaters = RaterDatabase.getRaters();\r\n\r\n\t\tfor (Rater rater : myRaters) {\r\n\t\t\tif (rater.hasRating(movieId)) {\r\n\t\t\t\ttotalRaters++;\r\n\t\t\t\ttotal = total + rater.getRating(movieId);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (totalRaters >= minimalRaters) {\r\n\t\t\taverage = total / totalRaters;\r\n\t\t} else {\r\n\t\t\taverage = 0.0;\r\n\t\t}\r\n\t\treturn average;\r\n\t}" ]
[ "0.7937632", "0.7365888", "0.7325378", "0.7309311", "0.73039377", "0.7286781", "0.7169755", "0.7097894", "0.7072095", "0.7067982", "0.70148057", "0.6942328", "0.69219285", "0.68703616", "0.6843164", "0.68380535", "0.6795051", "0.67614657", "0.67614657", "0.6757096", "0.66998607", "0.6691877", "0.659935", "0.6591273", "0.6525904", "0.6427202", "0.6387855", "0.63862884", "0.6376206", "0.6371671", "0.6357468", "0.6306759", "0.63000274", "0.6242326", "0.62336785", "0.62106943", "0.6168979", "0.6143699", "0.6131098", "0.61245984", "0.6123017", "0.61218137", "0.61048526", "0.60965514", "0.60965514", "0.60315084", "0.6017925", "0.6017265", "0.59710646", "0.5966122", "0.59349245", "0.59331006", "0.59192204", "0.59070015", "0.5877391", "0.5873128", "0.5864335", "0.585901", "0.58475214", "0.58400255", "0.5839724", "0.5831026", "0.58019125", "0.5794341", "0.5793822", "0.5793334", "0.5792916", "0.5784111", "0.57807714", "0.5778059", "0.5773806", "0.57697487", "0.5756588", "0.5733484", "0.57262594", "0.5721208", "0.5693619", "0.5693451", "0.5676158", "0.5673202", "0.56709874", "0.5670228", "0.56588805", "0.5656756", "0.5656345", "0.5654592", "0.5654394", "0.5654045", "0.56510574", "0.5632654", "0.5629345", "0.56252724", "0.56215864", "0.56109726", "0.5584981", "0.5577701", "0.5569224", "0.5566309", "0.5564689", "0.5564654" ]
0.75383466
1
Gets the user rating for the movie as a numeric value. This value is needed for the StarRating widget.
public float getUserRatingScore() { float scorePercent = Float.valueOf(userRating) * 10; return ((5 * scorePercent) / 100); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getRating(){\n\t\treturn this.user_rating;\n\t}", "public double getParseRating() {\n return getDouble(KEY_RATING);\n }", "public String getUserRating() {\n return userRating;\n }", "public Integer getRating() {\r\n if (recipe != null && ui.isIsUserAuthenticated()) {\r\n RecipeRating temp = ratingEJB.findByUserAndRecipe(ui.getUser(), recipe);\r\n if (temp != null) {\r\n rating = temp.getRatingValue().getValue();\r\n }\r\n }\r\n return rating;\r\n }", "public double getRating() {\n return rating_;\n }", "public double getRating() {\n return rating_;\n }", "double getRating();", "public Short getUserRating() {\r\n return userRating;\r\n }", "public Integer getRating() {\n return this.rating;\n }", "public double getRating(){\n\t\treturn this.rating;\n\t}", "public double getRating() {\n\t\treturn rating;\n\t}", "public double rating() {\r\n double value = BASE_RATING * specialization * (1 / (1 + era)) \r\n * ((wins - losses + saves) / 30.0);\r\n return value;\r\n }", "public Integer getGivenRating() {\n\t\treturn givenRating;\n\t}", "public float getRating() {\n return this.rating;\n }", "public int getRating() {\n\t\treturn this.rating;\n\t}", "public String getRatingValue() {\n return ratingValue;\n }", "public float getRating() {\n\t\treturn rating;\n\t}", "public double getRatingAt(int pos) {\n return this.usersRatings.get(pos).getRating();\n }", "public double getTotalRating() {\n return totalRating;\n }", "public float getRating() {\n return rating;\n }", "public float getRating() {\n return rating;\n }", "public int getRating()\n {\n return this.rating;\n }", "public int getRating();", "public MediaRating getRating() {\n MediaRating mediaRating = ratings.get(MediaRating.USER);\n\n // then the default one (either NFO or DEFAULT)\n if (mediaRating == null) {\n mediaRating = ratings.get(MediaRating.NFO);\n }\n if (mediaRating == null) {\n mediaRating = ratings.get(MediaRating.DEFAULT);\n }\n\n // is there any rating?\n if (mediaRating == null && !ratings.isEmpty()) {\n mediaRating = ratings.values().iterator().next();\n }\n\n // last but not least a non null value\n if (mediaRating == null) {\n mediaRating = new MediaRating();\n }\n\n return mediaRating;\n }", "public int getStarRating(){\n return starRating;\n }", "public double getRating(int userID, int movieID) {\n\t\tUser x = null;\n\t\tint ind = Collections.binarySearch(users, new User(userID));\n\t\tif(ind >= 0)\n\t\t\tx = users.get(ind);\n\t\telse\n\t\t\treturn -1;\n\n\t\tint ind2 = Collections.binarySearch(x.getRatings(), new Rating(userID, movieID));\n\t\tif(ind2 >=0)\n\t\t\treturn x.getRatings().get(ind2).getRating();\n\n\t\treturn -1;\n\t}", "public java.lang.String getRating() {\n return rating;\n }", "public int getSeekerRating() {\n return getIntegerProperty(\"Rating\");\n }", "public double getAverageRating() {\n return averageRating;\n }", "public double getAverageRating() {\n return averageRating;\n }", "@Min(0)\n @Max(5)\n public int getRating() {\n return rating;\n }", "@Nullable\n public Float getRating() {\n return rating;\n }", "public double guessRating(int userID, int movieID) {\n\t\tMovie movie = null;\n\t\tUser user = null;\n\t\tdouble avgRating = 0;\n\t\tfor(Rating r : ratings) {\n\t\t\tavgRating += r.getRating();\n\t\t}\n\t\tavgRating /= ratings.size();\n\t\tfor(Movie m : movies) {\n\t\t\tif(m.getId() == movieID) {\n\t\t\t\tmovie = m;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tfor(User m : users) {\n\t\t\tif(m.getId() == userID) {\n\t\t\t\tuser = m;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tdouble movieAvg = movie.getAverageRating();\n\t\tdouble userAvg = user.getAverageRating();\n\t\tdouble userStdDeviationFromAvg = user.standardDeviationFromAvg();\n\n\t\tdouble userGenreAvg = 0;\n\t\tint count = 0;\n\t\tfor(Genre g : movie.getGenres()) {\n\t\t\tdouble x = user.genreAvgRating(g);\n\t\t\tif(x != 0) {\n\t\t\t\tuserGenreAvg += x;\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tif(count != 0)\n\t\t\tuserGenreAvg /= count;\n\t\telse\n\t\t\tuserGenreAvg = userAvg;\n\n\n\t\tArrayList<User> similar = findSimilarUsers(user);\n\t\tif(similar.size() > 20) {\n\t\t\tdouble similarAvg = 0;\n\t\t\tint divisor = 0;\n\t\t\tfor(User u : similar) {\n\t\t\t\tArrayList<Rating> rates = u.getRatings();\n\t\t\t\tint ind = Collections.binarySearch(rates, new Rating(u.getId(), movie.getId()));\n\t\t\t\tif(ind >= 0) {\n\t\t\t\t\tsimilarAvg += rates.get(ind).getRating();\n\t\t\t\t\tdivisor++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(divisor > 20) {\n\t\t\t\t//\t\t\t\t0.7101228845726688\n\t\t\t\tsimilarAvg /= divisor;\n\t\t\t\treturn similarAvg;\n\t\t\t}\n\t\t}\n\n\t\tdouble rating1 = userStdDeviationFromAvg + movieAvg;\n\t\tdouble rating2 = userGenreAvg;\n\n\t\tif(rating1 < 1)\n\t\t\trating1 = 1;\n\t\telse if(rating1 > 5)\n\t\t\trating1 = 5;\n\n\t\tdouble finalRating = 0.3 * rating1 + 0.7 * rating2;\n\t\t//\t\tSystem.out.println(finalRating);\n\n\n\t\treturn finalRating;\n\t}", "public double getAverageRating() {\n int[] ratings = new int[reviews.length];\n for(int i = 0; i < reviews.length; i++) {\n ratings[i] = reviews[i].getRating();\n }\n double average = (double) sumIntegerArray(ratings) / reviews.length;\n return Double.parseDouble(new DecimalFormat(\"#.#\").format(average));\n }", "public double movieRatingAverage() {\n return movies.stream()\n .collect(Collectors.averagingDouble(Movie::getRating));\n }", "public int getHotOrNotRating() {\r\n if (ratingCount == 0) return 0;\r\n return (rating/ratingCount);\r\n }", "public Integer getRating()\n\t{\n\t\treturn null;\n\t}", "@Nullable\n final public Double getStarRating() {\n return mStarRating;\n }", "public String getRating() {\r\n\t\tswitch (rating) {\r\n\t\tcase \"high\":\r\n\t\t\treturn \"high\";\r\n\t\tcase \"medium\":\r\n\t\t\treturn \"medium\";\r\n\t\tcase \"low\":\r\n\t\t\treturn \"low\";\r\n\t\tdefault: return \"none\";\r\n\t\t}\r\n\t}", "public Float getAverageRating() {\n\t return this.averageRating;\n\t}", "public int getSumratings() {\n\treturn sumratings;\n}", "public int getMinRating() {\n return minRating;\n }", "public double getOgRating() {\n return ogRating;\n }", "public int getNumberOfRatings() {\n return this.usersRatings.size();\n }", "String getReviewrate();", "public int getRatings() {\n return ratings;\n }", "public int getMaxRating() {\n return maxRating;\n }", "public float getRating(String productid) {\n\t\treturn 0;\r\n\t}", "public double getRatingAverage() {\n return average;\n }", "public float getAverageVote()\n {\n if (averageRating == null) {\n return 0;\n } else {\n return averageRating.getAverageVote();\n }\n }", "public int getNoOfratings() {\n\treturn noofratings;\n}", "public int getOpponentMinRating() {\n return getIntegerProperty(\"MinRating\");\n }", "public int get () { return rating; }", "private long calculateAvaregeRating(long curentUserRating) {\n long totalStars = 0;\n for (int x = 1; x < 6; x++) {\n totalStars = totalStars + ((long) documentSnapshot.get(x + \"_star\")) * x;\n }\n totalStars = totalStars + curentUserRating;\n return totalStars / ((long) documentSnapshot.get(\"total_rating\") + 1);\n }", "private double formatRating(String rating){\n double ratingDouble = Double.parseDouble(rating);\n return ratingDouble;\n\n }", "public double getMinRating() {\n return min;\n }", "public float uGetAvgRating(ArrayList<Integer> movies) {\n\t\tfloat sum = 0;\n\t\tint n = 0;\n\t\t\n\t\tfor (int m : movies) {\n\t\t\t// lookup in ratings\n\t\t\tsum += ((float)ratings.get(m) / 10f);\n\t\t\tn++;\n\t\t}\n\t\t\n\t\treturn sum / n;\n\t}", "public double calculateOverallRating() {\n Rating[] ratingArray = this.ratings;\n double sum = 0.0;\n for(int i = 0; i < ratingArray.length; i++) {\n if (ratingArray[i] != null) { // Making sure it has a rating\n sum = sum + ratingArray[i].getScore();\n } else {\n sum = sum + 0.0;\n }\n }\n return sum;\n }", "public int getSpeedRating(){\n\t\treturn speedRating;\n\t}", "public String getRatingText() {\n return ratingText;\n }", "public double getMaxRating() {\n return max;\n }", "public int getReputation() {\n\t\treturn Integer.parseInt(Reputation);\n\t}", "public int getRatingID() {\n return ratingID;\n }", "public static double getRandomRating() {\n return (double) (RandomNumberGenerator.getRandomInt(0, 10) / 2d);\n }", "public Integer getRate() {\r\n return rate;\r\n }", "public int getStarvationRate ( ) {\n\t\treturn extract ( handle -> handle.getStarvationRate ( ) );\n\t}", "public int getOpponentMaxRating() {\n return getIntegerProperty(\"MaxRating\");\n }", "float getSteamSupplyRating2();", "public abstract double calcAvRating();", "public double getReview() {\r\n return review;\r\n }", "public static double difficultyRating()\r\n {\r\n double howhard = 4.0;\r\n return howhard;\r\n }", "public int minimum_rating() {\n\t\tint minimumRating = 0;\n\t\tfor(int i = 0; i<identifiedArray.length;i++) {\n\t\t\tif(identifiedArray[i] != null) {\n\t\t\t\tminimumRating = identifiedArray[i].rating;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tfor(int i = 0; i<identifiedArray.length;i++) {\n\t\t\tif(identifiedArray[i] != null) {\n\t\t\t\tif (minimumRating>identifiedArray[i].rating) {\n\t\t\t\t\tminimumRating = identifiedArray[i].rating;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn minimumRating;\n\t}", "public int getRatingFirst() {\n return this.ratingFirst ? 1 : 0;\n }", "public com.commercetools.api.models.review.ReviewRatingStatistics getReviewRatingStatistics() {\n return this.reviewRatingStatistics;\n }", "public int getReviewValue()\n {\n \treturn m_nReviewValue;\n }", "public double averageNewspaperPerUser() {\n\t\tcheckAuthority();\n\t\ttry {\n\t\t\treturn this.administratorRepository.averageNewspaperPerUser();\n\t\t} catch (Exception e) {\n\t\t\treturn 0.;\n\t\t}\n\n\t}", "public double getActorRating(String n)\n\t{\n\t\tIterator<Movie> itr = list_of_movies.iterator();\n\t\tdouble actor_rating = 0;\n\t\tint num = 0;\n\t\twhile(itr.hasNext())\n\t\t{\n\t\t\tMovie temp_movie = itr.next();\n\t\t\tif(temp_movie.getCast().contains(n))\n\t\t\t//if yes accumulate the movie rating \n\t\t\t{\n\t\t\t\tactor_rating += temp_movie.getRating();\n\t\t\t\tnum++;\n\t\t\t}\t\t\n\t\t}\t\n\t\t//if yes accumulate the movie rating\n\t\t//divie by the number of of accumulated values\n\t\tactor_rating = actor_rating/num;\n\t\treturn actor_rating;\n\t}", "public double getAverageByID(String movieID,int minimalRaters){\n double runsum=0.0;\n int numOfRaters=0;\n ArrayList<Rater> list=RaterDatabase.getRaters();\n for(int k=0;k<list.size();k++)\n {\n double currating=list.get(k).getRating(movieID);\n if(currating!=-1)\n {\n runsum+=currating;\n numOfRaters++;\n }\n }\n\n if(numOfRaters>=minimalRaters)\n {\n return runsum/numOfRaters;\n }\n else{\n return 0.0;\n }\n }", "public int getRate() {\n return rate_;\n }", "public void setRating(Integer rating) {\r\n this.rating = rating;\r\n }", "public int getRate() {\n return rate_;\n }", "public java.math.BigDecimal getFiveStarRating() {\n return fiveStarRating;\n }", "public void setRating(Integer value)\n\t{\n\t}", "public static double difficultyRating()\n\t{\n\t\treturn 2.5;\n\t}", "public int getRate() {\r\n return Integer.parseInt(RATES[Rate]);\r\n }", "public float getStars() {\n return this.stars;\n }", "public double predict (\tint user, \n\t\t\t\t\t\t\tint item )\t\n\t{\n\t\treturn dao.getUserMeanRating(user);\n\t}", "public void setMyRating(double myRating) {\n this.myRating = myRating;\n }", "public Integer getCommentingUserScore() {\n\t return this.commentingUserScore;\n\t}", "public double averageChirpsPerUser() {\n\t\tcheckAuthority();\n\t\ttry {\n\t\t\treturn this.administratorRepository.averageChirpsPerUser();\n\t\t} catch (Exception e) {\n\t\t\treturn 0.;\n\t\t}\n\t}", "@Override\n\t\t\tpublic void onRatingChanged(RatingBar ratingBar, float rating,\n\t\t\t\t\tboolean fromUser) {\n\t\t\t\tstrValueRating = String.valueOf(rating);\n\n\t\t\t}", "public void setRating(double rating){\n\t\tthis.rating = rating;\n\t}", "public void setRating(int rating) {\r\n this.rating = rating;\r\n }", "private double getAverageByID(String movieId, int minimalRaters) {\r\n\t\tdouble average = 0, total = 0;\r\n\t\tint totalRaters = 0;\r\n\r\n\t\tArrayList<Rater> myRaters = RaterDatabase.getRaters();\r\n\r\n\t\tfor (Rater rater : myRaters) {\r\n\t\t\tif (rater.hasRating(movieId)) {\r\n\t\t\t\ttotalRaters++;\r\n\t\t\t\ttotal = total + rater.getRating(movieId);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (totalRaters >= minimalRaters) {\r\n\t\t\taverage = total / totalRaters;\r\n\t\t} else {\r\n\t\t\taverage = 0.0;\r\n\t\t}\r\n\t\treturn average;\r\n\t}", "public Integer getRewardStar() {\n return rewardStar;\n }", "public void setRating(float rating) {\n this.rating = rating;\n }", "public int getStars() {\n\t\treturn this.stars;\n\t}", "public double getReputation() {\n return reputation;\n }", "public void setUserRating(String userRating) {\n this.userRating = userRating;\n }", "public void setRating(int rating) {\n this.rating = rating;\n }" ]
[ "0.7821526", "0.7540486", "0.7475292", "0.7426057", "0.73476344", "0.73087144", "0.72912526", "0.7277551", "0.7268476", "0.7191333", "0.71654207", "0.71448904", "0.71174717", "0.7039182", "0.7033978", "0.70335114", "0.7032646", "0.6991744", "0.6976718", "0.6959355", "0.6959355", "0.69564974", "0.6883096", "0.68760085", "0.6825028", "0.6817383", "0.6697744", "0.6665605", "0.6657931", "0.6657931", "0.6649618", "0.6632821", "0.66200835", "0.66199315", "0.66169477", "0.65779895", "0.65641856", "0.6548927", "0.65420836", "0.6473596", "0.64476585", "0.64363074", "0.64336354", "0.6422111", "0.6409906", "0.6405722", "0.6361939", "0.6350574", "0.63416123", "0.631862", "0.6255643", "0.6248023", "0.6242555", "0.6221469", "0.6206415", "0.61693525", "0.61652523", "0.6116944", "0.61087286", "0.6101978", "0.6079256", "0.60476255", "0.6028682", "0.6028462", "0.60277003", "0.6023775", "0.5996815", "0.59784013", "0.5956042", "0.59476584", "0.5924067", "0.5909735", "0.58977306", "0.5894693", "0.58848876", "0.58732903", "0.5870246", "0.5854634", "0.5840072", "0.5826997", "0.5797681", "0.57974255", "0.5792625", "0.5786514", "0.5785579", "0.57773316", "0.5743425", "0.5729042", "0.5719993", "0.5694676", "0.5693896", "0.5691174", "0.56849414", "0.56669515", "0.56532663", "0.5634915", "0.5623272", "0.5616116", "0.5605913", "0.56028676" ]
0.749759
2
Sets the user rating for the movie.
public void setUserRating(String userRating) { this.userRating = userRating; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setRating(int rating);", "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 setRating(int rating)\n {\n this.rating = rating;\n }", "public void setRating(int rating) {\r\n this.rating = rating;\r\n }", "public void setRating(Rating rating) {\n double boundedRating = this.boundedRating(rating);\n this.normalisedRating = this.normaliseRating(boundedRating);\n this.ratingCount++;\n }", "public void setRating(double rating){\n\t\tthis.rating = rating;\n\t}", "public void setRating(float rating) {\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(int rating) {\n this.rating = rating;\n if (this.rating < 0) {\n this.rating = 0;\n }\n }", "public void setRating(double rating) {\n\t\tthis.rating = rating;\n\t}", "public void setMyRating(double myRating) {\n this.myRating = myRating;\n }", "public void setRating(int rating) {\n\t\tthis.rating = rating;\n\t}", "public void setRating(Integer value)\n\t{\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 setRating(float r) {\n\t\trating = r;\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(java.lang.String rating) {\n this.rating = rating;\n }", "@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 static void setRatings (double irating){\n\t\t\t//ratings = irating;\n\t\t\tr = irating;\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 Builder setRating(double value) {\n \n rating_ = value;\n onChanged();\n return this;\n }", "public void setRatings(Map<String, MediaRating> newRatings) {\n MediaRating userMediaRating = ratings.get(MediaRating.USER);\n\n ratings.clear();\n for (Entry<String, MediaRating> entry : newRatings.entrySet()) {\n setRating(entry.getValue());\n }\n\n if (userMediaRating != null && !newRatings.containsKey(MediaRating.USER)) {\n setRating(userMediaRating);\n }\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 setHotOrNotRating(int rating) {\r\n this.rating += rating;\r\n ratingCount++;\r\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 }", "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 void addRating(int userIndex, double rating) {\n if (!this.usersRatings.add(userIndex, rating))\n throw new IllegalArgumentException(\"Provided rating already exist in item: \" + id);\n\n min = Math.min(rating, min);\n max = Math.max(rating, max);\n average =\n (this.usersRatings.size() <= 1)\n ? rating\n : ((average * (this.usersRatings.size() - 1)) + rating) / this.usersRatings.size();\n }", "@Override\n\t\t\tpublic void onRatingChanged(RatingBar ratingBar, float rating,\n\t\t\t\t\tboolean fromUser) {\n\t\t\t\tstrAtmosRating = String.valueOf(rating);\n\n\t\t\t}", "public void onRatingChanged(RatingBar ratingBar, float rating,\r\n\t\t\t\t\tboolean fromUser) {\r\n\t\t \r\n\t\t\t\t\tif(rating != 0 && fromUser) {\r\n\t\t\t\t\t\tString drink = ratingBarsMap.get(ratingBar);\r\n\t\t\t\t\t\tDrinkModel.addRating(DrinkModel.getDrink(drink), (int)rating);\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "public void setRatings(Rating[] ratings) {\n this.ratings = ratings;\n }", "public double getRating(){\n\t\treturn this.user_rating;\n\t}", "Integer rateSong(User user, Song toRate, Integer rating)\n\t\tthrows IllegalArgumentException, IndexOutOfBoundsException, NullPointerException;", "public void setComment(String comment, int rating);", "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 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 setRatingValue(String ratingValue) {\n this.ratingValue = ratingValue;\n }", "void updateRating(String name, String park, double rating);", "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}", "private void UpdateRating(final String userId, long rating, long amtOfRatings, int ratingAsInt, final String rideType){\n final long amtOfRatingsIncludingThis = amtOfRatings + 1;\n final long ratingToAddToDB;\n final float ratingBeforeRounding;\n final long accumulatedRating;\n\n //if the rating is -1 then the driver has never been rated\n //need to check for this as calc is different\n if(rating == -1){\n ratingToAddToDB = ratingAsInt / 1;\n }else{\n accumulatedRating = amtOfRatings * rating;\n ratingBeforeRounding = ((float)ratingAsInt + (float)accumulatedRating) / (float)amtOfRatingsIncludingThis;\n ratingToAddToDB = Math.round(ratingBeforeRounding);\n }\n\n //submit the rating to the db and remove it from the passenger using firebase db methods\n DocumentReference userRef = dataStore.collection(\"users\").document(userId);\n userRef.get().addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\n @Override\n public void onComplete(@NonNull Task<DocumentSnapshot> returnedTask) {\n if (returnedTask.isSuccessful()) {\n DocumentSnapshot userDoc = returnedTask.getResult();\n if (userDoc.exists()) {\n Map<String, Object> userMap = new HashMap<>();\n userMap.put(\"rating\", ratingToAddToDB);\n userMap.put(\"amountOfRatings\", amtOfRatingsIncludingThis);\n\n dataStore.collection(\"users\").document(userId)\n .update(userMap)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void v) {\n Log.d(TAG, \"USER RATINGS UPDATED\");\n DeleteRideFromUser(rideType);\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.w(TAG, \"Failed to update in UpdateRating();\", e);\n }\n });\n } else {\n Log.d(TAG, \"Couldnt find the user\");\n }\n } else {\n Log.d(TAG, \"Exception: \", returnedTask.getException());\n }\n }\n });\n }", "@Override\n\t\t\tpublic void onRatingChanged(RatingBar ratingBar, float rating,\n\t\t\t\t\tboolean fromUser) {\n\t\t\t\tstrValueRating = String.valueOf(rating);\n\n\t\t\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 }", "@Override\n\t\t\tpublic void onRatingChanged(RatingBar ratingBar, float rating,\n\t\t\t\t\tboolean fromUser) {\n\t\t\t\tstrFoodRating = String.valueOf(rating);\n\n\t\t\t}", "@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 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 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 void addRating(String name, double rating) {\n\t\tfor(Movie movie: this.movieList) {\n\t\t\tif(movie.getName().equals(name)) {\n\t\t\t\tmovie.setRating(rating);\n\t\t\t}\n\t\t}\n\t}", "public static void updateRating(Vendor vendor, Rating rating, User user)\n throws EnvoyServletException\n {\n try\n {\n ServerProxy.getVendorManagement()\n .updateRating(user, vendor, rating);\n }\n catch (Exception e)\n {\n throw new EnvoyServletException(e);\n }\n }", "public void setReviewRatingStatistics(final ReviewRatingStatistics reviewRatingStatistics);", "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 setReview(double review) {\r\n this.review = review;\r\n }", "public void vote(int rating) {\n\t\tnew WebTraceTask(this, String.valueOf(rating)).execute(WebTraceTask.VOTE);\n\t}", "public void rateDoctor(Doctor doctor, String rating)\n {\n ArrayList<String> temp = doctor.getDoctorRating();\n temp.add(rating);\n doctor.setDoctorRating(temp);\n }", "public void setRatingID(int ratingID) {\n this.ratingID = ratingID;\n }", "void editRating(String rid, Rating2 rating2);", "public void setRatingDate(Date ratingDate) {\n this.ratingDate = ratingDate;\n }", "public void setReview(final Review review);", "public void setRating(java.lang.String[] rating) {\n this.rating = rating;\n }", "public void setSumratings(int sumratings) {\n\tthis.sumratings = sumratings;\n}", "public Rating(int movieID, String email, float rating){\n this.movieID = movieID;\n this.rating = rating;\n this.email = email;\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}", "private RatingModel(int rating, BeerModel beerModel, UserModel userModel) {\n \t\tthis.domainObject = new Rating(new Date(System.currentTimeMillis()), beerModel.getDomainObject(), userModel.getDomainObject(), rating);\n \t\tthis.node = DBUtil.createNode(NodeType.RATING);\n \t\tDBUtil.createRelationship(this.node, RelType.CONTAINS, beerModel.getNode());\n \t\tDBUtil.createRelationship(userModel.getNode(), RelType.DOES, this.node);\n \t\tthis.setRating(rating);\n \t\tthis.setDate(this.domainObject.getDate());\n \t}", "public void setReviewedBy(java.lang.String value);", "public String getUserRating() {\n return userRating;\n }", "public void setRatingText(String ratingText) {\n this.ratingText = ratingText;\n }", "public double guessRating(int userID, int movieID) {\n\t\tMovie movie = null;\n\t\tUser user = null;\n\t\tdouble avgRating = 0;\n\t\tfor(Rating r : ratings) {\n\t\t\tavgRating += r.getRating();\n\t\t}\n\t\tavgRating /= ratings.size();\n\t\tfor(Movie m : movies) {\n\t\t\tif(m.getId() == movieID) {\n\t\t\t\tmovie = m;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tfor(User m : users) {\n\t\t\tif(m.getId() == userID) {\n\t\t\t\tuser = m;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tdouble movieAvg = movie.getAverageRating();\n\t\tdouble userAvg = user.getAverageRating();\n\t\tdouble userStdDeviationFromAvg = user.standardDeviationFromAvg();\n\n\t\tdouble userGenreAvg = 0;\n\t\tint count = 0;\n\t\tfor(Genre g : movie.getGenres()) {\n\t\t\tdouble x = user.genreAvgRating(g);\n\t\t\tif(x != 0) {\n\t\t\t\tuserGenreAvg += x;\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tif(count != 0)\n\t\t\tuserGenreAvg /= count;\n\t\telse\n\t\t\tuserGenreAvg = userAvg;\n\n\n\t\tArrayList<User> similar = findSimilarUsers(user);\n\t\tif(similar.size() > 20) {\n\t\t\tdouble similarAvg = 0;\n\t\t\tint divisor = 0;\n\t\t\tfor(User u : similar) {\n\t\t\t\tArrayList<Rating> rates = u.getRatings();\n\t\t\t\tint ind = Collections.binarySearch(rates, new Rating(u.getId(), movie.getId()));\n\t\t\t\tif(ind >= 0) {\n\t\t\t\t\tsimilarAvg += rates.get(ind).getRating();\n\t\t\t\t\tdivisor++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(divisor > 20) {\n\t\t\t\t//\t\t\t\t0.7101228845726688\n\t\t\t\tsimilarAvg /= divisor;\n\t\t\t\treturn similarAvg;\n\t\t\t}\n\t\t}\n\n\t\tdouble rating1 = userStdDeviationFromAvg + movieAvg;\n\t\tdouble rating2 = userGenreAvg;\n\n\t\tif(rating1 < 1)\n\t\t\trating1 = 1;\n\t\telse if(rating1 > 5)\n\t\t\trating1 = 5;\n\n\t\tdouble finalRating = 0.3 * rating1 + 0.7 * rating2;\n\t\t//\t\tSystem.out.println(finalRating);\n\n\n\t\treturn finalRating;\n\t}", "public void setAverageRating(double averageRating) {\n this.averageRating = averageRating;\n }", "public void setAverageRating(double averageRating) {\n this.averageRating = averageRating;\n }", "@Override\n\t\t\tpublic void onRatingChanged(RatingBar ratingBar, float rating,\n\t\t\t\t\tboolean fromUser) {\n\t\t\t\tstrOverAllRating = String.valueOf(rating);\n\n\t\t\t}", "public void set(User user) {\n\n if(user.getIsRestr() == 0 ) { // user comment\n HungryClient.userImage(mContext, this.image, user.getImgPath());\n this.textName.setText(user.getName());\n } else if (user.getIsRestr() == 1 ) { // restr comment\n Restr restr = user.getRestr();\n HungryClient.userImage(mContext, this.image, restr.getImg());\n this.textName.setText(restr.getName());\n }\n\n }", "@Override\n public void onRatingChanged(RatingBar ratingBar, float rating, boolean fromUser) {\n sendMessage.sendRatingInfo(String.valueOf(rating));\n }", "public void updateRatingForTavernAndSaveReview(Tavern tavern, Review review){\n Tavern currentTavern = mapper.load(Tavern.class, tavern.getName());\n\n //2. update rating number\n SharedPreferences sharedPreferences = context.getSharedPreferences(\"InstallSettings\", MODE_PRIVATE);\n float oldRating = sharedPreferences.getFloat(tavern.getName(), 0);\n // new rating of user will be saved for the first time in DynamoDB\n if (oldRating == 0){\n float sum = currentTavern.getRatingSum();\n float count = currentTavern.getRatingCount();\n sum += review.getRating();\n count = count + 1;\n float newRating = sum / count;\n\n currentTavern.setRating(newRating);\n currentTavern.setRatingSum(sum);\n currentTavern.setRatingCount(count);\n }\n // rating of user will be adapted to the new value\n else {\n float sum = currentTavern.getRatingSum() - oldRating;\n sum += review.getRating();\n float newRating = sum / currentTavern.getRatingCount();\n\n currentTavern.setRating(newRating);\n currentTavern.setRatingSum(sum);\n }\n\n //3. save\n mapper.save(currentTavern);\n mapper.save(review);\n }", "public float getUserRatingScore() {\n float scorePercent = Float.valueOf(userRating) * 10;\n\n return ((5 * scorePercent) / 100);\n }", "void getUserRatings(String uidRated, final RatingListResult result);", "public void setAverageRating(Float averageRating) {\n\t this.averageRating = averageRating;\n\t}", "public Movie(int movieId, float rating){\n\t \tthis.movieId = movieId;\n\t \tthis.rating = rating;\n\t }", "public void setStars(float stars) {\n this.stars = stars;\n }", "public void onRatingChanged(RatingBar ratingbar, float rating, boolean fromtouch) {\n\t\tfinal int numStar = ratingbar.getNumStars();\n\t\ttxt4.setText(\" \"+rating+\"/\"+numStar+\" \");\n\t\t}", "void setReviewStats()\n {\n if (hasInfo)\n {\n curReviewPageNum = 1;\n WalmartRequestHelper walmartRequestHelper = new WalmartRequestHelper(itemID, curReviewPageNum);\n\n curReviewURL = walmartRequestHelper.getRequestURL();\n\n Integer numStars[] = new Integer[5];\n\n for (int i = 0; i < 5; i++)\n {\n numStars[i] = 0;\n }\n\n try\n {\n Document reviewResultPage = Jsoup.connect(curReviewURL).userAgent(\"Mozilla\")\n .ignoreHttpErrors(true).ignoreContentType(true).get();\n\n // Handles the rare case where the API gives an error.\n if (reviewResultPage.getElementsByTag(\"title\").text().equals(\"Error\"))\n {\n return;\n }\n\n Elements unparsedRatings = reviewResultPage.getElementsByTag(\"ratingCounts\");\n\n // Review statistics are only generated if ratings can be found.\n if (unparsedRatings.size() != 0)\n {\n for (int i = 0; i < unparsedRatings.size(); i++)\n {\n String unparsedRatingCount = unparsedRatings.get(i).getElementsByTag(\"count\").text();\n\n if (!unparsedRatingCount.equals(\"\"))\n {\n numStars[i] = Integer.parseInt(unparsedRatings.get(i).text());\n }\n else\n {\n // No ratings could be found\n numStars[i] = 0;\n }\n }\n\n reviewStats = new ReviewStats(numStars);\n }\n else\n {\n reviewStats = new ReviewStats(numStars);\n }\n }\n catch (IOException ioe)\n {\n ioe.printStackTrace();\n }\n }\n }", "public void setISOSpeedRatings(Integer value)\n\t{\n\t}", "public void onRatingChanged(RatingBar ratingBar, float rating,\n boolean fromUser) {\n\n AlertDialog ad = adb.create();\n ad.setMessage(\"\"+ String.valueOf(rating));\n ad.show();\n \n /*\n if( rating == 5 )\n { ad.setMessage(\"5. ดีมาก\"); }\n else if( rating == 4 )\n { ad.setMessage(\"4. ดี\"); }\n else if( rating == 3 )\n { ad.setMessage(\"3. ดี\"); }\n else if( rating == 2 )\n { ad.setMessage(\"2. พอใช้\"); }\n else if( rating == 1 )\n { ad.setMessage(\"1. แย่\"); }\n ad.show();\n */\n\n }", "public void addRatingAndCalculate(double newRating) {\n totalRating += newRating;\n averageRating = totalRating/reviews.size();\n }", "public static void addRating(Vendor vendor, Rating rating, User user)\n throws EnvoyServletException\n {\n try\n {\n ServerProxy.getVendorManagement().addRating(user, vendor, rating);\n }\n catch (Exception e)\n {\n throw new EnvoyServletException(e);\n }\n }", "public double getRating() {\n return rating_;\n }", "public float getRating() {\n return rating;\n }", "public float getRating() {\n return rating;\n }", "public double getRating() {\n return rating_;\n }", "void setRank(KingdomUser user, KingdomRank rank);", "public float getRating() {\n\t\treturn rating;\n\t}", "public void rateMovie()\n {\n movieRate = UI.askString(\"Movie Title: \");\n movieRate = movieRate.toLowerCase();\n // Loop to check if the entered movie exists\n while (again) \n {\n // Checks if the movie exists\n if (r.movieExists(movieRate) == false)\n {\n UI.println(\"That movie does not exist\");\n movieRate = UI.askString(\"Movie Title: \");\n } \n else \n {\n again = false;\n }\n }\n again = true;\n // Loop to check if the rating is 0-10\n while (again) \n {\n double rating = UI.askDouble(\"Rating: \");\n try\n {\n if (rating < 0 || rating > 10) \n {\n throw new ArithmeticException();\n } \n else \n {\n r.rateMovie(movieRate, rating);\n again = false;\n }\n }\n \n catch (ArithmeticException ae) \n {\n UI.println(\"Please enter a number 0-10\");\n }\n \n catch (Exception e) \n {\n UI.println(\"Please enter a number 0-10\");\n }\n }\n again = true;\n }", "public void setFiveStarRating(java.math.BigDecimal fiveStarRating) {\n this.fiveStarRating = fiveStarRating;\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}", "public void changeRating(String name, short newRating) {\n\t\tVisitor visitor = getVisitorByName(name);\n\t\tboolean recalculate = true;\n\t\tif(visitor != null) {\n\t\t\tif(visitor.getRating() == newRating) {\n\t\t\t\trecalculate = false;\n\t\t\t} else {\n\t\t\t\tvisitor.setRating(newRating);\n\t\t\t}\n\t\t} else {\n\t\t\taddVisitor(name, newRating);\n\t\t}\n\t\tif(recalculate) {\n\t\t\tcalculateRating();\n\t\t}\n\t}", "public void setCurrentUser(AVUser aVUser) {\n this.currentUser = aVUser;\n }", "public UserRating() {\n }", "public Short getUserRating() {\r\n return userRating;\r\n }", "private void Rating(int minAge)\r\n {\r\n this.minAge = minAge;\r\n }", "@Min(0)\n @Max(5)\n public int getRating() {\n return rating;\n }", "private void setupRatingBar() {\n if (event.getHost() != null\n && event.getHost().getObjectId().equals(User.getLoggedInUser().getObjectId())) {\n hideReviewButton();\n hideRatingBar();\n return;\n }\n\n // Check Date\n Date today = new Date();\n if (today.compareTo(event.getDate()) <= 0) {\n hideReviewButton(); // Btn\n hideRatingBar();\n return;\n }\n\n // Check User Already reviewed or not\n ParseQuery<Review> query = ParseQuery.getQuery(Review.class);\n query.whereEqualTo(\"reviewedBy\", User.getLoggedInUser());\n query.whereEqualTo(\"event\", event);\n query.countInBackground(new CountCallback() {\n @Override\n public void done(int count, ParseException e) {\n if (e != null) {\n // TODO: network fail\n e.printStackTrace();\n return;\n }\n\n if (count == 0) {\n // I haven't reviewed yet & show dialog\n showReviewButton();\n llReview.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Log.d(\"DEBUG\", \"User clicked on me..\");\n // 1. Open Dialog\n ReviewDialogFragment reviewDialogFragment = new ReviewDialogFragment();\n reviewDialogFragment.setTargetFragment(EventDetailFragment.this, FragmentCode.EVENT_DETAIL_REVIEW_FRAGMENT_RESULT_CODE);\n reviewDialogFragment.show(getFragmentManager(), FragmentCode.TAG_REVIEW);\n }\n });\n } else {\n setRating();\n }\n }\n });\n\n\n }", "public RateMovieResponse rateMovie(int movieId, RateMovieRequest requestBody) {\n return rateMovie(movieId, requestBody, null, null);\n }" ]
[ "0.73199016", "0.71533734", "0.7088436", "0.70782995", "0.70661825", "0.70478797", "0.7030294", "0.702809", "0.69555193", "0.6932", "0.6927804", "0.6888523", "0.6866018", "0.67061543", "0.66766626", "0.663776", "0.6635525", "0.65964234", "0.6517833", "0.64855367", "0.6358827", "0.631955", "0.6285118", "0.6284332", "0.62733704", "0.6266349", "0.62395024", "0.6106268", "0.6092637", "0.6056439", "0.6041887", "0.60220164", "0.6011136", "0.59996885", "0.5958111", "0.59381056", "0.59303635", "0.5913793", "0.59134316", "0.59100956", "0.589702", "0.5895297", "0.58765775", "0.5856485", "0.5854688", "0.5822753", "0.5789687", "0.57651466", "0.57534826", "0.573423", "0.5711495", "0.56948864", "0.5684982", "0.56590974", "0.5639111", "0.5621149", "0.56125975", "0.5602648", "0.56002516", "0.55993575", "0.5595203", "0.5545165", "0.55304164", "0.5521646", "0.5506982", "0.550556", "0.5498837", "0.5498837", "0.5497206", "0.54857665", "0.54779094", "0.54762805", "0.54590994", "0.5426556", "0.5407895", "0.53982735", "0.53741664", "0.5332019", "0.52971005", "0.52950674", "0.5291794", "0.52865344", "0.52793896", "0.52770036", "0.52767104", "0.52767104", "0.52700156", "0.52650595", "0.5263577", "0.5260647", "0.525115", "0.5248575", "0.52433425", "0.5240886", "0.5222189", "0.52196765", "0.52152896", "0.5206482", "0.52024883", "0.51998246" ]
0.77715623
0
Sets the release date for the movie.
public void setReleaseDate(String releaseDate) { this.releaseDate = releaseDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setReleaseDate(Date date) {\r\n this.releaseDate = date;\r\n // set the fact we have called this method to set the date value\r\n this.hasSetReleaseDate=true;\r\n }", "public void setReleaseDate(Date releaseDate){\n this.releaseDate = releaseDate;\n }", "public void setReleaseDate(Date releaseDate) {\n this.releaseDate = releaseDate;\n }", "public void setReleaseDate(Date releaseDate) {\n\t\tthis.releaseDate = releaseDate;\n\t}", "public void setReleaseDate(String releaseDate) {\r\n this.releaseDate = releaseDate;\r\n }", "@JsonProperty(\"releaseDate\")\r\n public void setReleaseDate(Date releaseDate) {\r\n this.releaseDate = releaseDate;\r\n }", "public Album setRelease_date(Set<String> release_date) {\r\n this.release_date = release_date;\r\n return this;\r\n }", "public void setReleaseTime(Date releaseTime) {\r\n this.releaseTime = releaseTime;\r\n }", "public Date getReleaseDate() {\n\t\treturn releaseDate;\n\t}", "public Date getReleaseDate() {\n return releaseDate;\n }", "public void SetDate(Date date);", "public String getReleaseDate() {\r\n return releaseDate;\r\n }", "public Date getReleaseDate(){\n return releaseDate;\n }", "public void setDate(Date date) {\n\t\n\t\tthis.date = date;\n\t\n\t}", "void setDate(Date data);", "void setDate(java.lang.String date);", "public void setDate(Date date) {\r\n\t\tthis.date = date;\r\n\t}", "public void setDate(Date date) {\r\n\t\tthis.date = date;\r\n\t}", "public void setDate(Date date) {\r\n\t\tthis.date = date;\r\n\t}", "public void setDate(Date date) {\n\t\tthis._date = date;\n\t}", "public static String setReleaseDate(Context c, String date) {\n Date releaseDate;\n String releaseTense = c.getString(R.string.detail_release_date);\n try {\n releaseDate = (new SimpleDateFormat(\"yyyy-MM-dd\")).parse(date);\n if(new Date().before(releaseDate)) {\n releaseTense += \"s on: \";\n } else {\n releaseTense += \"d on: \";\n }\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return releaseTense + convertDateFormat(date);\n }", "public void setDate(Date date) {\n mDate = date;\n }", "public void setDate(Date date) {\r\n this.date = date;\r\n }", "public void setDate(Date date) {\n\t\t\n\t\tdate_ = date;\n\t}", "public void setDate(Date newDate) {\n this.currentDate = newDate;\n }", "public void setDate(Date date) {\n\t\tthis.date = date;\n\t}", "public void setDate(Date date) {\n\t\tthis.date = date;\n\t}", "public void setDate(Date date) {\n\t\tthis.date = date;\n\t}", "@JsonProperty(\"releaseDate\")\r\n public Date getReleaseDate() {\r\n return releaseDate;\r\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\r\n \t\tthis.startDate = date;\r\n \t}", "public Set<String> getRelease_date() {\r\n return this.release_date;\r\n }", "public void setDate(final Date date) {\n this.date = date;\n }", "@Override\n\tprotected void setDate() {\n\n\t}", "void setCreateDate(Date date);", "private void setDate() {\n\t\tthis.date = Integer.parseInt(this.year + String.format(\"%02d\", this.calenderWeek));\n\n\t}", "public void setDate(String d) {\n\t\tdate = d;\n\t\tif (super.getPubDate() != null)\n\t\t\tsuper.setPubDate(d);\n\t\tdate = d;\n\t}", "public void setDate() {\n this.date = new Date();\n }", "public void setDate(String parName, Date parVal) throws HibException;", "public void setPurchaseDate (Date purchaseDate)\t{\n\t\tmPurchaseDate = purchaseDate;\n\t}", "public String getReleaseDate() {\n return dateFormatter.format(release);\n }", "public void setDepartureDate(Date departureDate);", "public String getDateOfRelease() {\n return dateOfRelease;\n }", "public final void setDate(LocalDate date) {\n dateProperty().set(date);\n }", "public void setRelease(String release)\n {\n this.release = release;\n }", "public void setDate(String date){\n this.date = date;\n }", "public void setDate(int m, int d, int y){\n\t\tday = d;\n\t\tyear =y;\n\t\tmonth = m;\n\t}", "public static void setOriginalReleaseYear( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, ORIGINALRELEASEYEAR, value);\r\n\t}", "public void setArrivalDate(Date arrivalDate);", "public void setRunDate(Date runDate) {\n this.runDate = runDate;\n Calendar calendar = new GregorianCalendar();\n calendar.setTime(runDate);\n year = calendar.get(Calendar.YEAR);\n month = calendar.get(Calendar.MONTH);\n }", "public void setDate(String v) {\n if (MetadataUGWD_Type.featOkTst && ((MetadataUGWD_Type)jcasType).casFeat_date == null)\n jcasType.jcas.throwFeatMissing(\"date\", \"de.aitools.ie.uima.type.argumentation.MetadataUGWD\");\n jcasType.ll_cas.ll_setStringValue(addr, ((MetadataUGWD_Type)jcasType).casFeatCode_date, v);}", "public void setCarprodate(Date carprodate) {\n this.carprodate = carprodate;\n }", "public void setLicenseDate(java.sql.Timestamp value) {\n\t\tsetValue(org.jooq.example.jaxrs.db.routines.GenerateKey.LICENSE_DATE, value);\n\t}", "public void setDate(String date) {\r\n this.date = date;\r\n }", "public void setDate(Date date) {\n if (date != null) {\n this.mDate = (Date) date.clone();\n } else {\n Logger.d(TAG, \"The date is null\");\n }\n }", "public void setYearToDate(Date value) {\r\n setAttributeInternal(YEARTODATE, value);\r\n }", "public void setDate(String newDate)\n\t{\n\t\tthis.date = newDate;\n\t}", "public void setDate(String date){\n this.date = date;\n }", "public boolean isSetRelease_date() {\r\n return this.release_date != null;\r\n }", "public void setCurrentDate(String d) {\n currentDate = d;\n }", "public boolean isSetRelease_date() {\n return this.release_date != null;\n }", "public void setDate(Calendar date) {\n\tthis.date = date;\n }", "void setInvoicedDate(Date invoicedDate);", "protected void setTimeStamp(Date date) {\n\t\tsetPurchaseDate(date);\n\t}", "public void updateDate()\n\t{\n\t\t// Translate year, month and day into a Date object.\n\t\tmDate = new GregorianCalendar(mYear, mMonth, mDay, mHour, mMin).getTime();\n\t\t\n\t\t// Update arguments to preserve selected value on rotation.\n\t\tgetArguments().putSerializable(CrimeFragment.EXTRA_DATE, mDate);\n\t}", "public void setDate( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), DATE, value);\r\n\t}", "public void setDate(Date date) {\n setDate(date, null);\n }", "public void setDate(int dt) {\n date = dt;\n }", "public void setOriginalReleaseYear( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), ORIGINALRELEASEYEAR, value);\r\n\t}", "public void setBudgetDate(Date value) {\n setAttributeInternal(BUDGETDATE, value);\n }", "public void setDate(String date) {\n this.date = date;\n }", "public void setDate(String date) {\n this.date = date;\n }", "public void setDate(String date) {\n this.date = date;\n }", "public void setDate(String date) {\n this.date = date;\n }", "public void setDate(String date) {\n this.date = date;\n }", "public void setRecordingDate( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), RECORDINGDATE, value);\r\n\t}", "public void setDate(int year, int month, int dayOfMonth)\n {\n this.date = new GregorianCalendar(year, month-1, dayOfMonth);\n }", "public void setRelease(java.lang.String release)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(RELEASE$4, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(RELEASE$4);\r\n }\r\n target.setStringValue(release);\r\n }\r\n }", "public void setGameDate(LocalDate gameDate) {\n\t\tLocalDate oldDate = this.gameDate;\n\t\tthis.gameDate = gameDate;\n\t\tthis.propertyChangeSupport.firePropertyChange(\"gameDate\", oldDate, gameDate);\n\t}", "public void setDate(Calendar date) {\r\n\t\tthis.date = date;\r\n\t}", "void setFoundingDate(java.lang.String foundingDate);", "public void setParkingCardEXPDATE(Date value) {\n setAttributeInternal(PARKINGCARDEXPDATE, value);\n }", "public void setDate(int date){\n this.date = date;\n }", "public void setDate (String s) {\n date = s;\n }", "public void setDate(Calendar date)\n {\n this.date = date;\n }", "public void setDate(String date) {\n\t\tthis.date = date;\n\t}", "public void setDate(String date) {\n\t\tthis.date = date;\n\t}", "public void setEditDate(Date editDate)\r\n/* */ {\r\n/* 193 */ this.editDate = editDate;\r\n/* */ }", "private void setDate() {\n Date date = new Date();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n datetxt2.setText(sdf.format(date));\n }", "public static void setDate(String dateString) {\n\t\tdate = dateString;\n\t}", "public static void setRecordingDate(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.String value) {\r\n\t\tBase.set(model, instanceResource, RECORDINGDATE, value);\r\n\t}", "void setDateRDV(Date d) {\n this.dateRDV = d;\n }" ]
[ "0.8235653", "0.8184504", "0.7976996", "0.7774277", "0.76542705", "0.72818804", "0.71064246", "0.6985716", "0.65052205", "0.64815736", "0.64783686", "0.63738316", "0.62952393", "0.6276061", "0.6227635", "0.6207236", "0.61829615", "0.61829615", "0.61829615", "0.61396825", "0.61327547", "0.61273116", "0.61236364", "0.6113927", "0.60862976", "0.60662985", "0.60662985", "0.60662985", "0.60624", "0.60620177", "0.60620177", "0.60620177", "0.60620177", "0.60620177", "0.60620177", "0.60620177", "0.60620177", "0.60620177", "0.6046879", "0.5996718", "0.5989187", "0.59821326", "0.59674966", "0.5960625", "0.59471864", "0.5944124", "0.5931171", "0.5916778", "0.5856298", "0.5845598", "0.5845088", "0.5838599", "0.5835736", "0.58355886", "0.58294326", "0.5829304", "0.5825937", "0.58119524", "0.5809733", "0.58065933", "0.57956624", "0.5782619", "0.577922", "0.57705855", "0.5764576", "0.57521534", "0.5748631", "0.5746204", "0.5739098", "0.5731739", "0.5729491", "0.57291657", "0.5728806", "0.5719212", "0.5716249", "0.5710485", "0.5709862", "0.57048845", "0.5702923", "0.5702923", "0.5702923", "0.5702923", "0.5702923", "0.5699442", "0.5696934", "0.5692819", "0.56872225", "0.5669037", "0.56671864", "0.5659582", "0.5657939", "0.565261", "0.56518805", "0.56378776", "0.56378776", "0.5628183", "0.56236887", "0.5620643", "0.5616653", "0.56165564" ]
0.7597566
5
Gets the runtime of the movie.
public int getRuntime() { return runtime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getRuntime() {\n return runtime;\n }", "public String runtime() {\n return this.runtime;\n }", "public static IRuntime getRuntime() {\n return SchedulableProcess.runtime.get();\n }", "public int getRunTime() { \n\t\t\treturn RunTime;\n\t\t}", "public float getRunTime() {\r\n return runTime;\r\n }", "public V8 getRuntime() {\n return v8;\n }", "public String getRuntimeVersion() {\n return this.runtimeVersion;\n }", "public int getPrefRunTime() {\n return prefRunTime;\n }", "public Class getRunTimeType() {\n return lho.getRuntimeType();\n }", "public static String getJavaRuntime() {\n return pi4jSystemInfoConnector.getJavaRuntime();\r\n }", "public int getMaxRunTime() {\n return maxRunTime;\n }", "@DISPID(17)\r\n\t// = 0x11. The runtime will prefer the VTID if present\r\n\t@VTID(23)\r\n\tjava.lang.String lastInstanceElapsedRunTime();", "@DISPID(20)\r\n\t// = 0x14. The runtime will prefer the VTID if present\r\n\t@VTID(22)\r\n\tjava.lang.String actualRunTime();", "public long getLanguageDetectionRuntime() {\n return languageDetectionRuntime;\n }", "public void setRuntime(int runtime) {\n this.runtime = runtime;\n }", "@DISPID(22)\r\n\t// = 0x16. The runtime will prefer the VTID if present\r\n\t@VTID(24)\r\n\tjava.lang.String averageRunTime();", "@DISPID(60)\r\n\t// = 0x3c. The runtime will prefer the VTID if present\r\n\t@VTID(58)\r\n\tint actualRunTime_Seconds();", "public long getNaturalLanguageProcessingRuntime() {\n return naturalLanguageProcessingRuntime;\n }", "String getFPS();", "public long getQuestionGenerationRuntime() {\n return questionGenerationRuntime;\n }", "com.google.dataflow.v1beta3.RuntimeMetadata getRuntimeMetadata();", "public static ILCAPIProxy runtime() {\n\t\tif (runtime == null)\n\t\t\ttry {\n\t\t\t\tClass<?> rtc = Class.forName(\"lc.core.LCRuntime\");\n\t\t\t\truntime = (ILCAPIProxy) rtc.getField(\"runtime\").get(rtc);\n\t\t\t} catch (Throwable e) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\treturn runtime;\n\t}", "public List<String> getRuntime() {\n double totalhit = 0;\n double longesthit = 0;\n double averagehit = 0;\n for (Double i : recHitTimes) {\n totalhit += i;\n averagehit += i / recHitTimes.size();\n if (i > longesthit) {\n longesthit = i;\n }\n }\n List<String> list = new ArrayList<>();\n list.add(Double.toString(runtime));\n list.add(Double.toString(totalhit));\n list.add(Double.toString(longesthit));\n list.add(Double.toString(averagehit));\n return list;\n }", "public String getRuntimeClass();", "public abstract String getRuntimeDescription();", "@DISPID(61)\r\n\t// = 0x3d. The runtime will prefer the VTID if present\r\n\t@VTID(59)\r\n\tint actualRunTime_Milliseconds();", "public Movie getMovie() {\r\n\t\treturn movie;\r\n\t}", "@DISPID(21)\r\n\t// = 0x15. The runtime will prefer the VTID if present\r\n\t@VTID(23)\r\n\tjava.lang.String actualCPUTime();", "public com.google.cloud.tpu.v2alpha1.RuntimeVersion getRuntimeVersion(\n com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getGetRuntimeVersionMethod(), getCallOptions(), request);\n }", "long getExecutionTime();", "public java.lang.Integer getExecutionTime() {\n return execution_time;\n }", "@DISPID(59)\r\n\t// = 0x3b. The runtime will prefer the VTID if present\r\n\t@VTID(57)\r\n\tint actualRunTime_Minutes();", "public BasicNodeRuntime getNodeRuntime() {\n return nodeRuntime;\n }", "@Override\n\tpublic float getFrameRate() {\n\t\treturn fps;\n\t}", "public Movies getMovie () {\r\n\t\treturn movie;\r\n\t}", "public int getAdditionalRunTime() {\n return additionalRunTime;\n }", "@DISPID(65)\r\n\t// = 0x41. The runtime will prefer the VTID if present\r\n\t@VTID(63)\r\n\tint averageRunTime_Seconds();", "public long getRuntimeNano() {\n return runtimeNano;\n }", "public int getTotalRunTime() {\n return totalRunTime;\n }", "public String getRuntimeExpr() {\n switch (provider) {\n case MATH:\n return \"Math.\" + runtimeName;\n case JIFFLE:\n // _FN is the instance of JiffleFunctions in AbstractJiffleRuntime\n return \"_FN.\" + runtimeName;\n case PROXY:\n return runtimeName;\n default:\n throw new IllegalStateException(\"Internal compiler error: getRuntimeExpr\");\n }\n }", "@JsonProperty(\"runtimeVersion\")\n public String getRuntimeVersion() {\n return runtimeVersion;\n }", "@DISPID(55)\r\n\t// = 0x37. The runtime will prefer the VTID if present\r\n\t@VTID(53)\r\n\tint actualCPUTime_Seconds();", "public int getTargetFPS() {\r\n return fps;\r\n }", "public long getEvaluationCycleDuration() {\n return evaluationCycleDuration;\n }", "public double getFPS() {\n return fps;\n }", "public java.lang.Integer getExecutionTime() {\n return execution_time;\n }", "public int getLoadTime(){\n return m_LoadTime;\n }", "java.lang.String getPlayTime();", "public void time(int value) \n{\n runtimes = value;\n}", "@DISPID(66)\r\n\t// = 0x42. The runtime will prefer the VTID if present\r\n\t@VTID(64)\r\n\tint averageRunTime_Milliseconds();", "@DISPID(54)\r\n\t// = 0x36. The runtime will prefer the VTID if present\r\n\t@VTID(52)\r\n\tint actualCPUTime_Minutes();", "public String getPerformanceTime()\r\n {\r\n return performanceTime;\r\n }", "public long getEvaluationCycle() {\n return evaluationCycle;\n }", "public static synchronized HotspotRuntimeMBean getHotspotRuntimeMBean()\n/* */ {\n/* 282 */ if (hsRuntimeMBean == null) {\n/* 283 */ hsRuntimeMBean = new HotspotRuntime(jvm);\n/* */ }\n/* 285 */ return hsRuntimeMBean;\n/* */ }", "public RuntimeContext getRuntimeContext() {\n return runtimeContext;\n }", "public void printRuntimes() {\n\t\tfor(long x: runtimes){\n\t\t\tSystem.out.println(\"run with time \"+x+\" nanoseconds\");\n\t\t}\t\n\t}", "public Movie getMovie() {\n return this.movie;\n }", "Integer getFrameRate() {\n return frameRate;\n }", "@DISPID(56)\r\n\t// = 0x38. The runtime will prefer the VTID if present\r\n\t@VTID(54)\r\n\tint actualCPUTime_Milliseconds();", "public long getCardinalitySentenceDetectionRuntime() {\n return cardinalitySentenceDetectionRuntime;\n }", "public int getRun();", "public static LinkedList<Movie> runtimeSearch(int runtime) {\n //hashes the input\n int hash = runtime % MovieList.runtimeHashlist.length;\n //finds the location of the movie\n LinkedList<Movie> location = MovieList.runtimeHashlist[hash];\n //sets the head of the list to head of hashed location\n LinkedList.DataLink head = location.header;\n\n\n while (head.nextDataLink != null) {\n //runs until next data link is null and gets each movie\n Movie movie = (Movie) head.nextDataLink.data;\n\n //checks the runtime of the movie to inputted runtime\n if (movie.getRunningTime() == runtime) {\n //if it's the same it returns the movie\n return location;\n }\n\n\n //or moves to next link\n head = head.nextDataLink;\n }\n //returns null if the list does not match input\n return null;\n\n\n }", "@HaxeMethodBody(\n\t\t\"{% if extra.fps %}return {{ extra.fps }};{% else %}return 60;{% end %}\"\n\t)\n\tpublic static int getFramesPerSecond() {\n\t\treturn 60;\n\t}", "public double getFrameDuration();", "@Override\n\tpublic long getPlaytime() {\n\t\treturn this.playTime;\n\t}", "public double getElapsedTime()\n\t{\n\t\treturn elapsedTime;\n\t}", "Double currentTime() {\n return execute(\"player.currentTime\");\n }", "public double Time() {\n return OCCwrapJavaJNI.Units_Dimensions_Time(swigCPtr, this);\n }", "public synchronized int getFPS() {\n return fps;\n }", "Double duration() {\n return execute(\"player.duration\");\n }", "public int getVideoJittcomp();", "public long getCurrent() {\n m_Runtime = Runtime.getRuntime();\n m_Total = m_Runtime.totalMemory();\n\n return m_Total;\n }", "@DISPID(64)\r\n\t// = 0x40. The runtime will prefer the VTID if present\r\n\t@VTID(62)\r\n\tint averageRunTime_Minutes();", "int getCPU_time();", "public long startTime();", "public double getFrameTime() {\n\n\t\t// Convert from milliseconds to seconds\n\t\treturn getInteger(ADACDictionary.FRAME_TIME) / 1000;\n\n\t}", "public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.tpu.v2alpha1.RuntimeVersion>\n getRuntimeVersion(com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getGetRuntimeVersionMethod(), getCallOptions()), request);\n }", "public double getPrice(Movie movie, double time);", "private long getCpuTime() {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported() ? bean.getCurrentThreadCpuTime() : 0L;\n }", "public Movie getMovie() {\n return movie;\n }", "private static int getDuration() {\n\t\tStack<Object> stack = b.getCurrentWorkFrame();\n\t\tObject obj = stack.peek();\n\t\tif (Simulator.DEBUG)\n\t\t\tSystem.out.println(b.printStack() + \"...\");\n\t\tif (obj instanceof WorkFrame)\n\t\t\tthrow new RuntimeException(\"***ERROR: the next obj on stack should\"\n\t\t\t\t\t+ \"be an activity! WF_Sim.getDuration\" + obj.toString());\n\t\tActivityInstance ai = (ActivityInstance) stack.peek();\n\t\tif (ai.getActivity() instanceof CompositeActivity) {\n\t\t\tCompositeActivity comp = (CompositeActivity) ai.getActivity();\n\t\t\tif (frameInImpassed(comp))\n\t\t\t\treturn -1;\n\t\t\telse\n\t\t\t\tthrow new RuntimeException(\"***ERROR: push shouldn't have ended \" +\n\t\t\t\t\t\"with a composite on top\");\n\t\t}\n\t\treturn ai.getDuration();\n\t}", "public static Optional<Duration> getJobRuntimePrediction(Job job) {\n return getJobRuntimePrediction(job.getJobDescriptor());\n }", "public void getRuntimeVersion(\n com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.RuntimeVersion>\n responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getGetRuntimeVersionMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "@ApiModelProperty(required = true, value = \"The time it took to run the test in seconds\")\n public Double getRunTime() {\n return runTime;\n }", "public long getJVMCpuTime( ) {\n OperatingSystemMXBean bean =\n ManagementFactory.getOperatingSystemMXBean( );\n if ( ! (bean instanceof\n com.sun.management.OperatingSystemMXBean) )\n return 0L;\n return ((com.sun.management.OperatingSystemMXBean)bean)\n .getProcessCpuTime( );\n}", "public GetLatestMovieResponse getLatestMovie() {\n return getLatestMovie(null);\n }", "public long getEvaluationTime() {\r\n\t\treturn evaluationTime;\r\n\t}", "public float getTime()\r\n\t{\r\n\t\treturn runningTime;\r\n\t}", "public int getFPS() {\n\t\treturn renderer.getFps();\n\t}", "private Movie getMovie() {\n Gson gson = new Gson();\n return gson.fromJson(result, Movie.class);\n }", "public Movie getMovie() {\n return mv;\n }", "public int getRunDuration() {\n return runDuration;\n }", "public double getSpeed() {\r\n\t\tif (this.base.equals(\"zombie\")) {\r\n\t\t\treturn speed;\r\n\t\t}\r\n\t\treturn 0;\r\n\t}", "private long CurrentTime(){\n return (TotalRunTime + System.nanoTime() - StartTime)/1000000;\n }", "public double getBuild() {\r\n return build;\r\n }", "public static String getRuntimeMetadata() {\n StringBuilder s = new StringBuilder();\n String version;\n\n version = kotlinVersion();\n if (version != null) {\n s.append(\",kt=\").append(version);\n }\n\n version = scalaVersion();\n if (version != null) {\n s.append(\",sc=\").append(version);\n }\n\n version = clojureVersion();\n if (version != null) {\n s.append(\",clj=\").append(version);\n }\n\n version = groovyVersion();\n if (version != null) {\n s.append(\",gy=\").append(version);\n }\n\n version = jRubyVersion();\n if (version != null) {\n s.append(\",jrb=\").append(version);\n }\n\n return s.toString();\n }", "public long getElapsedTime()\r\n {\r\n if(isRunning)\r\n {\r\n long endTime = System.currentTimeMillis();\r\n return elapsedTime=endTime-startTime;\r\n }\r\n else\r\n {\r\n return elapsedTime;\r\n }\r\n }", "public double getVideoLength(){\n\t\treturn videoLength;\n\t}", "public long getmovieName() {\n\t\treturn 0;\r\n\t}", "public int getTimer() {\n return getOption(ArenaOption.TIMER);\n }" ]
[ "0.74630344", "0.72056115", "0.6886085", "0.64034754", "0.6401835", "0.621208", "0.6201914", "0.60742134", "0.5996462", "0.5971521", "0.5864593", "0.58295316", "0.5828002", "0.5808793", "0.5750587", "0.5746736", "0.5732144", "0.5723661", "0.57121426", "0.5677857", "0.56652457", "0.56636167", "0.5657417", "0.5639087", "0.5630202", "0.561044", "0.5595147", "0.5583796", "0.55733836", "0.5567864", "0.5536383", "0.5529693", "0.5503092", "0.55017054", "0.5492545", "0.54854566", "0.5484786", "0.5472988", "0.5459553", "0.5458021", "0.54565406", "0.5454279", "0.5451219", "0.54323965", "0.5424931", "0.54170024", "0.53917086", "0.53442633", "0.5339847", "0.5317195", "0.5309361", "0.5308159", "0.5304559", "0.53017133", "0.5300336", "0.5298843", "0.5298568", "0.523623", "0.5231032", "0.5217796", "0.5209729", "0.5208965", "0.5208666", "0.51906776", "0.5168027", "0.51623386", "0.51568997", "0.51520395", "0.514998", "0.51318187", "0.51313585", "0.51275885", "0.5126488", "0.51134694", "0.51065874", "0.51013756", "0.50978804", "0.5097765", "0.50947714", "0.50888", "0.5087173", "0.5086651", "0.5076065", "0.5068207", "0.5063586", "0.50479496", "0.50470626", "0.50430894", "0.50321615", "0.50297916", "0.5029001", "0.5028612", "0.5027937", "0.5019788", "0.5018597", "0.5017819", "0.50145423", "0.5013325", "0.5012479", "0.50122887" ]
0.7608338
0
Sets the runtime of the movie.
public void setRuntime(int runtime) { this.runtime = runtime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setRunTime(int newRuntime) {\n\t\t\tthis.RunTime = newRuntime;\n\t\t}", "public void runtime(Program runtime) {\n\t\tthis.runtime = runtime;\n\t}", "public void setRuntime(double runtime, int accessLevel) {\n\t\tif (accessLevel == 2) {\n\t\t\tthis.runtime = runtime;\n\t\t\tSystem.out.println(\"INFO: Runtime updated\");\n\t\t} else {\n\t\t\tSystem.out.println(\"WARNING: Incorrect Access Level\");\n\t\t}\n\t}", "public void setFilmRunTime(Film film, String newRunTime) {\n filmEdit.setFilmRunTime(film, newRunTime);\n }", "public void setPrefRunTime(int prefRunTime) {\n this.prefRunTime = prefRunTime;\n }", "public void setRuntimeVersion(String runtimeVersion) {\n this.runtimeVersion = runtimeVersion;\n }", "public void setRuntimeVersion(String runtimeVersion) {\n this.runtimeVersion = runtimeVersion;\n }", "public void setNodeRuntime(final BasicNodeRuntime nodeRuntime) {\n //Preconditions\n assert nodeRuntime != null : \"nodeRuntime must not be null\";\n\n this.nodeRuntime = nodeRuntime;\n }", "public void setPreferredFramerate(float fps);", "public abstract void setTotalRunTime();", "public void setQuestionGenerationRuntime(long questionGenerationRuntime) {\n this.questionGenerationRuntime = questionGenerationRuntime;\n }", "public static void setHALRuntimeType(int type) {\n SimulatorJNI.setRuntimeType(type);\n }", "public int getRuntime() {\n return runtime;\n }", "public void setTargetFPS(int fps) {\r\n this.fps = fps;\r\n Display.setSwapInterval(fps);\r\n }", "private void setFPS(int fps) {\n this.fps = fps;\n }", "@Override\n\t\t\tpublic void doMyThings() {\n\t\t\t\tsetVideoScale(SCREEN_DEFAULT);\n\t\t\t}", "public Builder setExecutionTime(long value) {\n bitField0_ |= 0x02000000;\n executionTime_ = value;\n onChanged();\n return this;\n }", "public void setMaxRunTime(int maxRunTime) {\n this.maxRunTime = maxRunTime;\n }", "public void setFrameRate(Integer frameRate) {\n this.frameRate = frameRate;\n }", "public void setFPS(int fps)\r\n\t{\r\n\t\tthis.fps = fps;\r\n\t}", "public void setMovie(Movie movie) {\n this.movie = movie;\n }", "private void setFPS() {\n fpsLabel.setText(Integer.toString((int)speedSlider.getValue()) + \" FPS\");\n timeline.setRate(speedSlider.getValue());\n }", "public void setLanguageDetectionRuntime(long languageDetectionRuntime) {\n this.languageDetectionRuntime = languageDetectionRuntime;\n }", "public void time(int value) \n{\n runtimes = value;\n}", "public void setPreviewFrameRate(int fps) {\n set(\"preview-frame-rate\", fps);\n }", "public ComputeInstanceVersion withRuntime(String runtime) {\n this.runtime = runtime;\n return this;\n }", "private void setMovie() {\n Movie movie = getIntent().getExtras().getParcelable(MOVIE);\n Glide.with(mMoviePoster).setDefaultRequestOptions(new RequestOptions().diskCacheStrategy(DiskCacheStrategy.ALL)).load(BuildConfig.IMG_DIR + movie.getPosterPath())\n .into(mMoviePoster);\n setTitle(movie.getTitle());\n mMovieTitle.setText(movie.getTitle());\n mMovieRating.setText(String.valueOf(movie.getVoteAverage()));\n mMovieDate.setText(movie.getReleaseDate());\n mMovieGenre.setText(movie.isAdult() ? getString(R.string.genre_type_adults) : getString(R.string.genre_type_all));\n mMovieDesc.setText(movie.getOverview());\n }", "public void setRuntimeNano(long runtimeNano) {\n this.runtimeNano = runtimeNano;\n }", "public String getRuntime() {\n return runtime;\n }", "public void setNaturalLanguageProcessingRuntime(long naturalLanguageProcessingRuntime) {\n this.naturalLanguageProcessingRuntime = naturalLanguageProcessingRuntime;\n }", "public void setRunDuration(int value) {\n this.runDuration = value;\n }", "public com.autodesk.ws.avro.Call.Builder setExecutionTime(java.lang.Integer value) {\n validate(fields()[7], value);\n this.execution_time = value;\n fieldSetFlags()[7] = true;\n return this; \n }", "public void setExecutionTime(java.lang.Integer value) {\n this.execution_time = value;\n }", "@Override\n\tpublic void setMoviePlayLength(int moviePlayLength) {\n\t\tthis.moviePlayLength = moviePlayLength;\n\t}", "public void set(double speed) {\n climb_spark_max.set(speed);\n }", "private void changeSpeed() {\n\t\tint t = ((JSlider)components.get(\"speedSlider\")).getValue();\n\t\tsim.setRunSpeed(t);\n\t}", "protected void setFps(double fps) {\n this.fps = fps;\n }", "void setPlaybackSpeed(float speed);", "public void setVideoIterationTime(double videoIterationLength){\n\t\tthis.videoIterationLength = videoIterationLength;\n\t}", "void setTime(final int time);", "public void setTotalRunTime(int totalRunTime) {\n this.totalRunTime = totalRunTime;\n }", "void onLoadMovie(Movie movie);", "public void setSpeed(int newSpeed)\n {\n speed = newSpeed;\n }", "public abstract void setSpeed(int sp);", "public void setSpeed() {\n //assigns the speed based on the shuffleboard with a default value of zero\n double tempSpeed = setpoint.getDouble(0.0);\n\n //runs the proportional control system based on the aquired speed\n controlRotator.proportionalSpeedSetter(tempSpeed);\n }", "public void setTargetFPS(int fps) \n\t{\n\t\ttarget_update = fps;\n\t\tideal_time = NANO / target_update;\n\t}", "public void setEvaluationCycleDuration(long value) {\n this.evaluationCycleDuration = value;\n }", "public void setVideoJittcomp(int milliseconds);", "public void setSpeed(int wpm);", "public Canary withRuntimeVersion(String runtimeVersion) {\n setRuntimeVersion(runtimeVersion);\n return this;\n }", "public void setFPS(int fps) {\n\t\trenderer.setFps(fps);\n\t}", "void setDuration(int duration);", "abstract public void setLoadingTime(long time);", "public void setYSpeed(int speed){\n ySpeed = speed;\n }", "public void setPreferredVideoDefinition(VideoDefinition vdef);", "public void setSpeed(int speed) {\n thread.setSpeed(speed);\n }", "public void setCurrentSpeed (double speed);", "public void setTime(Time time) {\n this.time = time; // assigns the time argument value to the time attribute\n }", "public void setStaticPictureFps(float fps);", "public void setTime(double time) {_time = time;}", "public void setSpeed(double multiplier);", "public com.twc.bigdata.views.avro.viewing_info.Builder setPlaySeconds(java.lang.Integer value) {\n validate(fields()[3], value);\n this.play_seconds = value;\n fieldSetFlags()[3] = true;\n return this; \n }", "public void setFPS(double frequency) {\n\t\tif (frequency > MAX_FREQUENCY) {\n\t\t\tfrequency = MAX_FREQUENCY;\n\t\t}\n\t\tif (frequency < MIN_FREQUENCY) {\n\t\t\tfrequency = MIN_FREQUENCY;\n\t\t}\n\t\tthis.frequency = frequency;\n\t}", "public void setCurrentPlayTime(long playTime) { throw new RuntimeException(\"Stub!\"); }", "@Override\n public void start() {\n runtime.reset();\n }", "@Override\n public void start() {\n runtime.reset();\n }", "@Override\n public void start() {\n runtime.reset();\n }", "@Override\n public void start() {\n runtime.reset();\n }", "@Override\n public void start() {\n runtime.reset();\n }", "public void initFPS() {\n FPS = 60;\n targetTime = 1000 / FPS;\n\n gameClock = new NanoClock();\n }", "@Override\n public void start() {\n runtime.reset();\n arm.setPower(0);\n }", "void setSpeed(RobotSpeedValue newSpeed);", "public void setSpeed( Vector2 sp ) { speed = sp; }", "public void setSpeed() {\r\n\t\tthis.currSpeed = this.maxSpeed * this.myStrategy.setEffort(this.distRun);\r\n\t}", "public void setResolution(int resolution)\r\n\t{\r\n\t\tduration *= resolution;\r\n\t\tduration /= this.resolution;\r\n\t\tthis.resolution = resolution;\r\n\t}", "public void setAdditionalRunTime(int additionalRunTime) {\n this.additionalRunTime = additionalRunTime;\n }", "private void setFrameRate(int newFPS){\n\t if(prevFrameRate != newFPS){\n\t\t prevFrameRate = newFPS;\n\t\t frameRate(newFPS);\n\t }\n }", "public void setAnimationFrameTime(int milis) {\r\n animationFrameTime = milis; \r\n timer = new Timer(animationFrameTime, this);\r\n }", "public void setTime(int time) {\r\n\t\tthis.time = time;\r\n\t\tupdate();\r\n\t}", "public void setVideoPort(int port);", "public void setSpeed(int newSpeed){\n\t\tmyVaisseau=Isep.getListeVaisseau();\n\t\tspeed=newSpeed;\t\t\n\t}", "public void setCurrentTime(double time) {\n if (time < 0) {\n time = 0;\n }\n \n nextStartTime = time;\n \n makeNewMusic();\n }", "public void setCPUTime() {\r\n\t\t\tthis.CPUTime = 0;\r\n\t\t}", "public void setTime(java.lang.String value) {\r\n\t\tBase.set(this.model, this.getResource(), TIME, value);\r\n\t}", "public void setSpeed(double speed) {\n \tthis.speed = speed;\n }", "public void setSpeed(float val) {speed = val;}", "protected void initJvmRuntime(MBeanServer paramMBeanServer) throws Exception {\n/* 342 */ String str = getGroupOid(\"JvmRuntime\", \"1.3.6.1.4.1.42.2.145.3.163.1.1.4\");\n/* 343 */ ObjectName objectName = null;\n/* 344 */ if (paramMBeanServer != null) {\n/* 345 */ objectName = getGroupObjectName(\"JvmRuntime\", str, this.mibName + \":name=sun.management.snmp.jvmmib.JvmRuntime\");\n/* */ }\n/* 347 */ JvmRuntimeMeta jvmRuntimeMeta = createJvmRuntimeMetaNode(\"JvmRuntime\", str, objectName, paramMBeanServer);\n/* 348 */ if (jvmRuntimeMeta != null) {\n/* 349 */ jvmRuntimeMeta.registerTableNodes(this, paramMBeanServer);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 355 */ JvmRuntimeMBean jvmRuntimeMBean = (JvmRuntimeMBean)createJvmRuntimeMBean(\"JvmRuntime\", str, objectName, paramMBeanServer);\n/* 356 */ jvmRuntimeMeta.setInstance(jvmRuntimeMBean);\n/* 357 */ registerGroupNode(\"JvmRuntime\", str, objectName, jvmRuntimeMeta, jvmRuntimeMBean, paramMBeanServer);\n/* */ } \n/* */ }", "public void setFrameTime (float frameTime) {\n\t\tthis.frameTime = frameTime;\n\t}", "public void setSpeed(double speed)\r\n {\r\n this.speed = speed;\r\n }", "public ModelRecorder(ACTRRuntime runtime)\n {\n\t super(runtime);\n }", "public void setWalkSpeed(int n)\n{\n walkSpeed = n;\n}", "public void startEngine(){\n currentSpeed = 0.1;\n }", "void setRecurrenceDuration(int recurrenceDuration);", "public void setLives(int lives){\n liveCount = lives;\n }", "public void setPreviewVideoDefinition(VideoDefinition vdef);", "public void setTimer() {\n\t\t\n\t}", "public void setAudioVideoStartTime(Date value) {\n setAttributeInternal(AUDIOVIDEOSTARTTIME, value);\n }", "public void setVide() {\n\t\tvide = true;\n\t}", "public void setEditSpeedPressed() {\n String value = JOptionPane.showInputDialog(this, this.applicationDelayText, this.setApplicationDelayText, 3);\n if (value != null) {\n int newSpeed = Integer.parseInt(value.toString());\n this.setSpeed(newSpeed);\n }\n }", "public void scaleFrames(int aStartTime, int newMaxTime)\n{\n // Get scale factor\n float factor = newMaxTime/(float)getMaxTime();\n \n // Scale frames for shapes\n for(int i=0, iMax=getOwner().getChildCount(); i<iMax; i++)\n scaleFrames(getOwner().getChild(i), aStartTime, factor);\n \n // Set new max time\n setMaxTime(newMaxTime);\n}" ]
[ "0.70482033", "0.68738365", "0.6410905", "0.6381294", "0.6212908", "0.6109981", "0.6003823", "0.58986765", "0.57430214", "0.5693708", "0.5593138", "0.5571525", "0.555701", "0.5540848", "0.5506041", "0.54822755", "0.54493976", "0.5446313", "0.5442487", "0.54289854", "0.54189664", "0.5403412", "0.5394301", "0.53740185", "0.5363661", "0.53614366", "0.5359354", "0.53565574", "0.5352684", "0.5327499", "0.53205454", "0.53042895", "0.5233723", "0.5232175", "0.52170324", "0.5210412", "0.5208714", "0.52045166", "0.52024364", "0.5192683", "0.5162129", "0.5152694", "0.51371014", "0.5122975", "0.5122098", "0.51160353", "0.51053554", "0.5092154", "0.507448", "0.50730383", "0.5062403", "0.5047511", "0.5032473", "0.5020418", "0.50158256", "0.5014182", "0.5003569", "0.4997127", "0.49962348", "0.49850637", "0.49834213", "0.4982817", "0.49817497", "0.49799967", "0.49734837", "0.49734837", "0.49734837", "0.49734837", "0.49734837", "0.49635896", "0.4960561", "0.49551162", "0.49522364", "0.49510646", "0.49477118", "0.4946105", "0.4945801", "0.49352095", "0.4924199", "0.49165544", "0.49091244", "0.4905953", "0.49010548", "0.48984438", "0.4885597", "0.4869728", "0.48534885", "0.4845798", "0.48450074", "0.48300382", "0.4822002", "0.4819687", "0.4818374", "0.48173597", "0.4815477", "0.48135442", "0.48100662", "0.48080307", "0.4806435", "0.4803414" ]
0.79462194
0
Checks if movie is in favorites.
public boolean isFavorite() { return isFavorite; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isAddedToFavorites() {\n boolean isFavorite = false;\n\n String[] projection = {FavMovieEntry.COLUMN_MOVIE_ID};\n String selection = FavMovieEntry.COLUMN_MOVIE_ID + \"=?\";\n String[] selectionArgs = new String[]{\n String.valueOf(sMovie.getMovieId())};\n\n Cursor cursor = this.getContentResolver().query(\n FavMovieEntry.CONTENT_URI,\n projection,\n selection,\n selectionArgs,\n null\n );\n\n if (cursor != null && cursor.moveToFirst()) {\n if (cursor.getCount() > 0) {\n isFavorite = true;\n long currentIndex = cursor.getLong(cursor.getColumnIndex(FavMovieEntry.COLUMN_MOVIE_ID));\n mCurrentMovieUri = ContentUris.withAppendedId(FavMovieEntry.CONTENT_URI, currentIndex);\n } else {\n isFavorite = false;\n\n mCurrentMovieUri = null;\n }\n cursor.close();\n }\n\n return isFavorite;\n }", "private boolean checkIfFavorite() {\n if (favoriteIds.contains(movie.getId())) {\n movie.setFavorite(true);\n return true;\n }\n movie.setFavorite(false);\n return false;\n }", "public boolean isAlreadyFavorited(){\r\n if(ui.isIsUserAuthenticated()){\r\n Users user = ui.getUser();\r\n if(user.getFavorites() != null){\r\n return user.getFavorites().contains(recipe);\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n else{\r\n return false;\r\n }\r\n }", "private boolean isFavorite() {\n for (int favoriteIndex : favoriteIndexes) {\n if (favoriteIndex == shownTipIndex) {\n return true;\n }\n }\n return false;\n }", "public boolean isFavorite() {\n\t\tsynchronized (this) {\n\t\t\tif (mFavoritesCache != null) {\n\t\t\t\treturn mFavoritesCache.isFavoriteSong(getAudioId(),\n\t\t\t\t\t\tgetTrackHost());\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public static boolean checkForFavorite(Context context,String id){\n Set<String> setSavedFav = getAllFavorites(context);\n if(setSavedFav!=null){\n Log.v(TAG,\"SAVED ID: \"+setSavedFav);\n if(setSavedFav.contains(id))\n return true;\n }\n return false;\n }", "public boolean hasAnyFavorites(IUserLayout layout) {\n Validate.notNull(layout, \"Cannot determine whether a null layout contains favorites.\");\n\n // (premature) performance optimization: short circuit returns true if nonzero favorite\n // portlets\n return (!getFavoritePortletLayoutNodes(layout).isEmpty()\n || !getFavoriteCollections(layout).isEmpty());\n }", "private void retrieveFavoritesCompleted(ArrayList<MovieItem> movies){\n //get number of favorite movies in the list\n int count = movies.size();\n\n //check if there are any movies\n if(count > 0){\n //save movies to buffer\n mMovieStaff.setMovies(movies, PosterHelper.NAME_ID_FAVORITE);\n }\n\n //check if the current poster fragment is displaying the user favorite list\n if(mMovieType == PosterHelper.NAME_ID_FAVORITE){\n //yes, show new movie list\n showMovieList(movies, PosterHelper.NAME_ID_FAVORITE);\n }\n }", "public static boolean isMovieFavorite(Context context, String movieId) {\n String selection = MovieContract.FavoriteEntry.COLUMN_MOVIE_ID + \" = ?\";\n String[] selectionArgs = {movieId};\n\n Cursor cursor = context.getContentResolver().query(MovieContract.FavoriteEntry.CONTENT_URI,\n new String[]{MovieContract.FavoriteEntry._ID},\n selection,\n selectionArgs,\n null);\n\n if (cursor.moveToFirst())\n return true;\n\n return false;\n }", "public boolean isMovieIsFavorite(long movieId) {\n SQLiteDatabase sqLiteDatabase = this.getReadableDatabase();\n String query = \"SELECT * FROM \" + FavoriteMoviesEntry.TABLE_NAME + \" WHERE \" + FavoriteMoviesEntry.COLUMN_MOVIE_ID + \" = \" + movieId;\n Cursor cursor = sqLiteDatabase.rawQuery(query, null);\n\n if (cursor.moveToFirst()) {\n cursor.close();\n return true;\n } else {\n cursor.close();\n return false;\n }\n }", "public void removeFavorite(){\n //check if movie is in the user favorite list\n if(mMovieStaff.alreadyFavorite(mMovie.getTMDBId())){\n //is in the favorite list, mark that list has changed\n mFavoriteChanged = true;\n\n //update movie item favorite status\n mMovie.setFavorite(false);\n\n //delete movie item from favorite database table\n mMovieValet.deleteFavorite(mMovie);\n\n //remove movie item from favorite movie list buffer\n mMovieStaff.removeFavorite(mMovie);\n }\n\n //check if movie list type is display a favorite list and if the device is a tablet\n if(mMovieType == PosterHelper.NAME_ID_FAVORITE && mIsTablet){\n //both yes, get favorite movies to update poster fragment\n getMovieList(PosterHelper.NAME_ID_FAVORITE);\n }\n }", "boolean isFavorite(int id);", "boolean isProjectFavourite(int accountId, int projectId);", "private boolean checkFavorite(User user, Product product) {\n for (Favorite favorite: favorites) {\n if (favorite.getProduct().getProductName().equals(product.getProductName())\n && favorite.getUser().getUserUID().equals(user.getUserUID())) {\n return true;\n }\n }\n\n return false;\n }", "public void saveFavorite(){\n //make sure movie is NOT already a favorite\n if(!mMovieStaff.alreadyFavorite(mMovie.getTMDBId())){\n //is a new favorite, favorite movie list status has changed\n mFavoriteChanged = true;\n\n //set movie item favorite status as true\n mMovie.setFavorite(true);\n\n //save movie to favorite database table\n mMovieValet.saveFavorite(mMovie);\n\n //add movie to favorite movie list buffer\n mMovieStaff.addFavorite(mMovie);\n }\n\n //check if movie list type is display a favorite list and if the device is a tablet\n if(mMovieType == PosterHelper.NAME_ID_FAVORITE && mIsTablet){\n //both yes, get favorite movies to update poster fragment\n getMovieList(PosterHelper.NAME_ID_FAVORITE);\n }\n }", "public boolean businessExistsInFavorites(Business business) {\n for(Business b : favorites) {\n if(b.getTitle().equals(business.getTitle())) {\n return true;\n }\n }\n return false;\n }", "@Override\n\tpublic boolean isFavorite() {\n\t\treturn this.isFavorite;\n\t}", "public boolean isFavoriteProject(ProjectDTO aProjectDTO) {\r\n\t\tboolean result = false;\r\n\t\tif (this.getUserPreferences().containsKey(\"FAVORITE_PROJECT\")) {\r\n\t\t\tString favoriteProjects = ((String) this.getUserPreferences().get(\r\n\t\t\t\t\t\"FAVORITE_PROJECT\"));\r\n\t\t\tresult = favoriteProjects.contains(aProjectDTO.getOid().toString());\r\n\t\t}\r\n\t\treturn result;\r\n\r\n\t}", "public void toggleFavorites()\n {\n this.showFavorites = !this.showFavorites;\n this.setupMorphs(Morphing.get(this.mc.thePlayer));\n }", "public boolean isFavorite(long videoId) {\n try {\n int flag = 0;\n SQLiteDatabase database = this.getReadableDatabase();\n database.enableWriteAheadLogging();\n String getFlagQuery = \"SELECT \" + VideoTable.KEY_VIDEO_IS_FAVORITE + \" FROM \" + VideoTable.VIDEO_TABLE + \" WHERE \" + VideoTable.KEY_VIDEO_ID + \" = \"\n + videoId;\n Cursor cursor = database.rawQuery(getFlagQuery, null);\n if (cursor.moveToFirst()) {\n do {\n flag = cursor.getInt(0);\n } while (cursor.moveToNext());\n\n }\n cursor.close();\n if (flag == 1) {\n return true;\n }\n\n return false;\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n }", "private void removeFromFavorites() {\n favoriteBool = false;\n preferencesConfig.writeRemoveFavoriteTip(shownTipIndex);\n Toast.makeText(getContext(), \"Removed from favorites\", Toast.LENGTH_SHORT).show();\n\n }", "public static boolean isExist(long id) {\n\t\tboolean exist = false;\n\t\tCursor c = null;\n\t\ttry {\n\t\t\tString sql = FavoriteColumns.ID + \"=\" + id;\n\n\t\t\tc = db.query(DBConst.TABLE_COURSE_FAVORITE, null, sql, null, null, null, null);\n\t\t\tif (c.moveToNext()) {\n\t\t\t\texist = true;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (c != null) {\n\t\t\t\tc.close();\n\t\t\t}\n\t\t}\n\t\treturn exist;\n\t}", "public void saveMovieToFavorites() {\n Cursor moviecursor = this.getContentResolver().query(MovieContract.MovieEntry.CONTENT_URI, null, MovieContract.MovieEntry.COLUMN_NAME_MOVIE_ID + \" = \" + mMovie.getID(), null, null, null);\n if(moviecursor.getCount() == 0) { // first time this movie has been favorited insert record\n Uri movieUri = this.getContentResolver().insert(MovieContract.MovieEntry.CONTENT_URI, Constants.createMovieRecord(mMovie));\n long movieid = ContentUris.parseId(movieUri);\n int insertedTrailerCount = this.getContentResolver().bulkInsert(MovieContract.TrailerEntry.CONTENT_URI, Constants.createBulkTrailerValues(Constants.mTrailers, movieid));\n int insertedReviewCount = this.getContentResolver().bulkInsert(MovieContract.ReviewEntry.CONTENT_URI, Constants.createBulkReviewValues(Constants.mReviews, movieid));\n\n if(insertedTrailerCount < 1)\n Log.e(TAG,\"Trailer failed to insert\");\n\n if(insertedReviewCount < 1)\n Log.e(TAG, \" Review failed to insert\");\n }\n }", "public boolean isSetCurrentChannelFavorite() {\n\t\tTVChannel mTVChannel = mTvChannelSelector.getCurrentChannel();\n\t\treturn isSetChannelFavorite(mTVChannel);\n\t}", "public synchronized Set<String> getFavorites() {\r\n return new HashSet<>(settings.getList(FAVORITES_SETTING));\r\n }", "public static void findFavourites() {\n DataManager.currentFavouritesList.clear();\n\n for (int i = 0; i < DataManager.fullFavouritesList.size(); i++) {\n Attraction attraction = DataManager.findAttractionByName(DataManager.fullFavouritesList.get(i));\n\n if (attraction != null) {\n DataManager.currentFavouritesList.add(attraction);\n }\n }\n\n FavouritesListFragment.backgroundLayout.setVisibility(DataManager.currentFavouritesList.size() == 0 ? View.VISIBLE : View.INVISIBLE);\n\n AttractionsListFragment.attractionsAdapter.notifyDataSetChanged();\n }", "private void removeFromFavorites() {\n int rowsDeleted;\n\n if (mCurrentMovieUri != null) {\n rowsDeleted = getContentResolver().delete(\n mCurrentMovieUri,\n null,\n null);\n }\n }", "public boolean containsMenuItem(String favorite) {\n\n\t\tfor (Location location : locations) {\n\t\t\tfor (Menu menu : location.getMenus()) {\n\t\t\t\tfor (MenuItem menuItem : menu.getMenuItems()) {\n\t\t\t\t\tif (menuItem.getTitle().toLowerCase().equals(favorite)) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean checkFavoriteItem(AlarmClass checkProduct) {\n boolean check = false;\n List<AlarmClass> favorites = sharedPreference.getReminders(context);\n if (favorites != null) {\n for (AlarmClass product : favorites) {\n if (product.equals(checkProduct)) {\n check = true;\n break;\n }\n }\n }\n return check;\n }", "public static boolean favoritar(Carro carro) {\n CarroDAO dao = CarrosApplication.getInstance().getCarroDAO();\n boolean favorito = isFavorito(carro);\n if (favorito) {\n // Remove dos favoritos\n dao.delete(carro);\n return false;\n }\n // Adiciona nos favoritos\n dao.insert(carro);\n return true;\n }", "public boolean isFavorite( String UUID ) {\n\t\tCursor cursor = getWritableDatabase().rawQuery(SELECT_1_UUID,\n\t\t\t\tnew String[]{UUID});\n\t\tboolean exists = (cursor.getCount() > 0);\n\t\tcursor.close();\n\t\tLog.d(\"GCA-DB\", \"Abstract is Fav: \" + exists);\n\t\treturn exists;\n\t\t}", "public void addToFavorites() {\n\n // Create new content values object\n ContentValues contentValues = new ContentValues();\n\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_ID, sMovie.getMovieId());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_TITLE, sMovie.getMovieTitle());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_ORIGINAL_TITLE, sMovie.getMovieOriginalTitle());\n contentValues.put(FavMovieEntry.COLUMN_POSTER_PATH, sMovie.getPoster());\n contentValues.put(FavMovieEntry.COLUMN_BACKDROP_PATH, sMovie.getMovieBackdrop());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_RELEASE_DATE, sMovie.getReleaseDate());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_RATING, sMovie.getVoteAverage());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_SYNOPSIS, sMovie.getPlotSynopsis());\n\n try {\n mCurrentMovieUri = getContentResolver().insert(FavMovieEntry.CONTENT_URI,\n contentValues);\n } catch (IllegalArgumentException e) {\n mCurrentMovieUri = null;\n Log.v(LOG_TAG, e.toString());\n }\n\n if (mCurrentMovieUri != null) {\n isAddedToFavorites();\n }\n\n }", "private ArrayList<MovieItem> getFavoriteMovies(){\n //get list of favorite movies from buffer\n ArrayList<MovieItem> movies = mMovieStaff.getMovies(PosterHelper.NAME_ID_FAVORITE);\n\n //check if favorite movie list has changed\n if(mFavoriteChanged){\n //list has changed, show new movie list\n showMovieList(movies, PosterHelper.NAME_ID_FAVORITE);\n }\n\n //return movie list\n return movies;\n }", "private void addToFavorites() {\n\n favoriteBool = true;\n preferencesConfig.writeAddFavoriteTip(shownTipIndex);\n Toast.makeText(getContext(), \"Added to favorites.\", Toast.LENGTH_SHORT).show();\n\n }", "@Then(\"the cocktail is removed from my favorites list\")\n public void the_cocktail_is_removed_from_my_favorites_list() {\n assertEquals(HttpStatus.OK, context.getResponse().getStatusCode());\n assertFalse(userRepository.findByEmail(context.getUser().getEmail()).get().getFavouriteCocktails().toString()\n .contains(context.getSelectedCocktail()));\n }", "public boolean favouriteCurrentAccount()\n {\n if(accountInfo == null)\n {\n System.out.println(\"You need to generate an account before getting the details.\");\n return false;\n }\n return accountInfo.favouriteAccount();\n }", "public void favouriteUser() {\r\n\t\tif(favourited) {\r\n\t\t\tcurrentUser.unfavouriteUser(userToView.getUserID());\r\n\t\t\tfavouriteButton.setText(\"Favourite\");\r\n\t\t\tfavourited = false;\r\n\t\t} else if(currentUser.getUserID() != userToView.getUserID()){\r\n\t\t\tcurrentUser.favouriteUser(userToView.getUserID());\r\n\t\t\tfavouriteButton.setText(\"Unfavourite\");\r\n\t\t\tfavourited = true;\r\n\t\t} else {\r\n\t\t\tCONSTANTS.makeAlertWindow(\"warning\",\"You can not favorite yourself!\");\r\n\t\t}\r\n\t}", "boolean hasFaceUp();", "public boolean isHasAlreadyReviewed() {\r\n boolean result = false;\r\n if (ui.isIsUserAuthenticated() && professionalStatus.isIsProfessional()) {\r\n Users user = ui.getUser();\r\n if (recipe != null) {\r\n for (Review rev : recipe.getReviews()) {\r\n if (rev.getReviewer().getUserName().equals(user.getUserName())) {\r\n result = true;\r\n break;\r\n }\r\n }//end for\r\n }\r\n }// end value != null\r\n return result;\r\n }", "@SuppressWarnings(\"unchecked\")\n\tprotected void updateSessionFavorites(SMTSession session, PageViewVO fav, boolean isDelete) {\n\t\t// get the Favs map off of the session.\n\t\tMap<String,List<PageViewVO>> favMap = (Map<String,List<PageViewVO>>)session.getAttribute(MyFavoritesAction.MY_FAVORITES);\n\t\tList<PageViewVO> favs = favMap.get(fav.getReferenceCode());\n\t\tif (favs == null) favs = new ArrayList<>();\n\t\tif (isDelete) {\n\t\t\t// remove fav\n\t\t\tremoveFromSession(favs, fav.getPageId());\n\t\t} else {\n\t\t\t// add fav\n\t\t\tfavs.add(fav);\n\t\t}\n\t\t// replace the favs map on the session.\n\t\tsession.setAttribute(MyFavoritesAction.MY_FAVORITES, favMap);\n\t}", "public void setIsUserFav(User user) {\n if(user.isUsersFavouritePost(this.mPost))\n this.isFavourite.set(true);\n else\n this.isFavourite.set(false);\n\n //if(this.mPost.getFavourite().contains(user))\n // this.isFavourite.set(true);\n //this.isFavourite.set(false);\n }", "boolean hasFavicon();", "private static boolean isInPrefs( String FileName , Preferences pref ){\n\n int nSavedFiles = SharedData.getintProperty( \"NSavedFiles\",\"\"+NSavedFiles);\n for( int i = 0 ; i< nSavedFiles ; i++ )\n\n if( pref.get( \"File\" + i , NO_SUCH_FILE ).equalsIgnoreCase( FileName ) )\n return true;\n\n return false;\n }", "public boolean favouriteAccount(String apiToken, String accountToken)\n {\n accountUtils = new AccountUtils(apiToken);\n return accountUtils.favouriteAccount(accountToken, apiToken);\n }", "public static boolean testMyFavoriteGetAll() {\r\n MyFavorite inst = new MyFavorite(10);\r\n for (Pokemon item : testList) {\r\n inst.put(item.getName(), item);\r\n }\r\n LinkedList<Pokemon> list = inst.getAll();\r\n if (list.size() != 6)\r\n return false;\r\n for (Pokemon item : testList) {\r\n if (!list.contains(item)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "public void onFavButtonClicked(View view) {\n isFav = !isFav;\n toggleButtonText(isFav);\n \n // Update DB\n new OperateWithDBMovieAsyncTask().execute(isFav ? ADD_MOVIE : REMOVE_MOVIE);\n }", "public boolean containsMovie(String t)\n\t{\n\t\tIterator<Movie> itr = list_of_movies.iterator();\n\t\twhile(itr.hasNext())\n\t\t{\n\t\t\tif(itr.next().getTitle().equals(t))\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public void onClicklistenerForFavorites(View view){\n if(isAlreadyFavorteis() == true){\n Boolean hasDeleted = dBhelper.deleteFavortiesByCategoryId(userAskAbout,inputSpinnerOne.getSelectedItemPosition(),inputSpinnertow.getSelectedItemPosition());\n if(hasDeleted == true) {\n Toast.makeText(getApplicationContext(), \"Your data has deleted in Favorties\", Toast.LENGTH_LONG).show();\n favortiesImageView.setBackgroundResource(R.drawable.ic_favourites);\n isAlreadyFavorties = false;\n }\n\n }else\n {\n favortiesMethed();\n isAlreadyFavorties = true;\n favortiesImageView.setBackgroundResource(R.drawable.ic_favourites_pressed);\n }\n\n }", "boolean hasFeedItemSet();", "private ArrayList<Movie> checkExistence(ArrayList<Movie> movies, String title)\n {\n ArrayList<Movie> result = new ArrayList<Movie>();\n \n for (Movie film : movies)\n {\n String head = film.getTitle().trim().toLowerCase();\n \n if (head.contains(title))\n result.add(film);\n }\n \n return result;\n }", "private void showFavouriteList() {\n setToolbarText(R.string.title_activity_fave_list);\n showFavouriteIcon(false);\n buildList(getFavourites());\n }", "public final void resetFavorites() {\n Favorites favorites = Favorites.INSTANCE;\n favorites.clear();\n favorites.load(this.persistenceWrapper.readFavorites());\n }", "@Override\n public void FavouriteMovieSelected(View view) {\n if(view.getTag().equals(MovieDetailAdapter.FAVOURITE)) {\n StoreFavoriteMovieIntentService.startAction_ADD_FAV_MOVIE(getActivity(),\n mMovieItem,\n movieDeatailAdapter.getmMovieItemDetail());\n } else {\n StoreFavoriteMovieIntentService.removeFavriteMovie(getActivity(),mMovieItem.getId());\n }\n movieDeatailAdapter.notifyDataSetChanged();\n }", "public boolean removeFromFavourites(String name){\n SQLiteDatabase db =this.getReadableDatabase();\n ContentValues contentVal = new ContentValues();\n contentVal.put(FAVOURITES,false);\n db.update(Db_Table,contentVal, \"movie_name = ?\",new String[]{ name });\n return true;\n }", "public void fetchFavoritedMovies() {\n favoritesSelected = true;\n Cursor cursor =\n getActivity().getContentResolver().query(MovieContract.FavoriteMovieEntry.CONTENT_URI,\n null,\n null,\n null,\n null);\n ArrayList<MovieModel> movieModels = new ArrayList<>();\n if (cursor != null) {\n while (cursor.moveToNext()) {\n MovieModel movieModel = new MovieModel(getActivity(), cursor);\n // Get the trailers and reviews\n String movieId = cursor.getString(cursor.getColumnIndex(MovieContract.FavoriteMovieEntry._ID));\n Cursor trailerCursor =\n getActivity().getContentResolver().query(MovieContract.TrailerEntry.CONTENT_URI,\n null,\n MovieContract.TrailerEntry.COLUMN_MOVIE_KEY + \" = ?\",\n new String[]{movieId},\n null);\n Cursor reviewCursor =\n getActivity().getContentResolver().query(MovieContract.ReviewEntry.CONTENT_URI,\n null,\n MovieContract.ReviewEntry.COLUMN_MOVIE_KEY + \" = ?\",\n new String[]{movieId},\n null);\n ArrayList<MovieTrailerModel> movieTrailerModels = new ArrayList<>();\n ArrayList<MovieReviewModel> movieReviewModels = new ArrayList<>();\n if (trailerCursor != null) {\n while (trailerCursor.moveToNext()) {\n movieTrailerModels.add(new MovieTrailerModel(getActivity(), trailerCursor));\n }\n trailerCursor.close();\n }\n if (reviewCursor != null) {\n while (reviewCursor.moveToNext()) {\n movieReviewModels.add(new MovieReviewModel(getActivity(), reviewCursor));\n }\n reviewCursor.close();\n }\n movieModel.setReviews(movieReviewModels);\n movieModel.setTrailers(movieTrailerModels);\n movieModels.add(movieModel);\n }\n cursor.close();\n }\n movieGridAdapter.setMovieModels(movieModels);\n }", "public LiveData<BookTable> checkIfFavoriteBookExistsLocally(String bookID) {\n return bookTableDAO.getFavoriteBookByID(bookID);\n }", "boolean hasFeedItem();", "public boolean hasPlayList(){\n return numPlayList < MAX_PLAYLIST;\n }", "public void backToPosters(){\n //check if favorite list is going to be displayed or if favorite list has changed\n if(mMovieType == PosterHelper.NAME_ID_FAVORITE && mFavoriteChanged){\n //refresh favorite list\n showMovieList(mMovieStaff.getMovies(PosterHelper.NAME_ID_FAVORITE),\n PosterHelper.NAME_ID_FAVORITE);\n }\n }", "private boolean isAtFish(){\n final RSNPC[] fishing_spots = NPCs.findNearest(\"Fishing spot\");\n if (fishing_spots.length < 1){\n return false;\n }\n return fishing_spots[0].isOnScreen();\n }", "private boolean checkMovieRedundancyByTitle(ArrayList<Movie> movies, String title)\n { \n for (Movie film : movies)\n {\n String head = film.getTitle();\n \n if (head.equalsIgnoreCase(title))\n {\n System.out.println(\"\\n\\t\\t >>>>> Sorry, \" + title.toUpperCase() + \" is already EXIST in database <<<<< \");\n displayOneFilm(film);\n return true;\n }\n }\n \n return false;\n }", "public void writeFavorites() {\n ArrayList<String> favorites = new ArrayList<>();\n for(Landmark landmark : landmarks.getFavorites()) {\n favorites.add(landmark.toStringForOutput());\n }\n FileManager.writeLines(favoritesPath, favorites);\n }", "public boolean hasTourists() {\n return tourists_ != null;\n }", "public boolean contains(Flavor flavor) {\n return flavors.contains(flavor);\n }", "public boolean isInMovie(Performer performer){\n\n\t\tif(performers.contains(performer))\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public boolean toggleIsFavorite(ContentValues contentValues) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n String movieId = contentValues.getAsString(FavoriteMovieContract.FavoriteMovie.COLUMN_MOVIE_ID);\n\n if (getIsFavorite(movieId)) {\n db.delete(TABLE_NAME, COLUMN_MOVIE_ID + \" = ?\", new String[] { movieId });\n return false;\n } else {\n ContentValues values = new ContentValues();\n values.put(COLUMN_MOVIE_ID, movieId);\n\n db.insert(TABLE_NAME, null, values);\n return true;\n }\n }", "public int getNumOfFav() {\n return fullPhoto.getNumOfFav();\n }", "protected void updateProfileFavorites(ActionRequest req, PageViewVO fav) throws ActionException {\n\t\tlog.debug(\"updateProfileFavorites...\");\n\n\t\tMyFavoritesAction mfa = new MyFavoritesAction(getActionInit());\n\t\tmfa.setAttributes(getAttributes());\n\t\tmfa.setDBConnection(dbConn);\n\n\t\tboolean isDelete = Convert.formatBoolean(req.getParameter(\"isDelete\"));\n\t\tif (isDelete) {\n\t\t\tmfa.deleteFavorite(req);\n\t\t} else {\n\t\t\t// set additional req params needed for inserts.\n\t\t\treq.setParameter(QuickLinksAction.PARAM_KEY_TYPE_CD, fav.getReferenceCode());\n\t\t\treq.setParameter(QuickLinksAction.PARAM_KEY_REL_ID, fav.getPageId());\n\t\t\tmfa.insertFavorite(req);\n\t\t}\n\n\t\tupdateSessionFavorites(req.getSession(),fav,isDelete);\n\n\t}", "boolean hasPictureGenre();", "public boolean isCollected(News news){\n SQLiteDatabase db = getWritableDatabase();\n return isExist(db, TABLE_FAV_NAME, news, MODE_NO_OP);\n }", "FavoriteQuestions() {\n list = SharedPrefs.getFavList();\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_fav) {\n FavoritesDataSource dataSource = new FavoritesDataSource(getBaseContext());\n dataSource.open();\n if(isFav){\n //remove from favorites\n dataSource.deleteFromFavorites(placeid);\n item.setIcon(R.drawable.ic_heart_outline_white);\n Toast.makeText(getBaseContext(),placeName+\" was removed from favorites\",Toast.LENGTH_SHORT).show();\n isFav = false;\n }else{\n //add to favorites\n Place place = new Place(placeid,placeName,address,true,picURL);\n dataSource.addToFavorites(place);\n item.setIcon(R.drawable.ic_heart_fill_white);\n Toast.makeText(getBaseContext(),placeName+\" was added to favorites\",Toast.LENGTH_SHORT).show();\n isFav = true;\n }\n dataSource.close();\n return true;\n }else if(id == R.id.action_share){\n //open twitter url\n String tweetParams = \"text=\"+ URLEncoder.encode(\"Check out \"+placeName+\" located at \"+address+\". Website \")+\"&url=\"+URLEncoder.encode(tweetURL)+\"&hashtags=TravelAndEntertainmentSearch\";\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"https://twitter.com/intent/tweet?\"+tweetParams));\n startActivity(browserIntent);\n return true;\n }else if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "public void addTermToFavourites(Term term) {\n // Set the favourited status of the term\n term.setFavourited(1);\n // Add the term to the table favourites\n addTermWithId(term, TABLE_FAVOURITES);\n // Update the favourite status of the term in the table terms\n updateTermFavouritedFlag(term, TABLE_TERMS);\n }", "public ArrayList<String> loadFavorites() {\n\n\t\tSAVE_FILE = FAVORITE_FILE;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tlist = loadIds();\n\t\treturn list;\n\t}", "public boolean isSetBrowse()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(BROWSE$2) != 0;\n }\n }", "public void showFavorites() {\n System.out.println(\"Mina favoriter: \" + myFavorites.size());\n for (int i = 0; i < myFavorites.size(); i++) {\n System.out.println(\"\\n\" + (i + 1) + \". \" + myFavorites.get(i).getTitle() +\n \"\\nRegissör: \" + myFavorites.get(i).getDirector() + \" | \" +\n \"Genre: \" + myFavorites.get(i).getGenre() + \" | \" +\n \"År: \" + myFavorites.get(i).getYear() + \" | \" +\n \"Längd: \" + myFavorites.get(i).getDuration() + \" min | \" +\n \"Betyg: \" + myFavorites.get(i).getRating());\n }\n }", "private void addSelectedtoFavorites(){\n\t\t\n\t\tCursor c=getContentResolver().query(Uri.parse(Const.URI_STRING+\"/videolist/\"+mPlayListId), null, null, null, null);\n\t\tif(mCheckData==null || c==null){\n\t\t\tLogging.e(\"Error Data NULL\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(mCheckData.size()!=c.getCount()){\n\t\t\tLogging.e(\"Error Data and Cursor count has different value\");\n\t\t}\n\t\t\n\t\tif(c!=null){\n\t\t\tLogging.d(\"Insert Start\");\n\t\t \tfor(int i=0;i<c.getCount();i++){\n\t \t\tBoolean tagged=mCheckData.get(i);\n\t \t\tif(tagged){\n\t \t\t\tc.moveToPosition(i);\n\t \t\t\tContentValues cv=new ContentValues();\n\t \t\t\tcv.put(MyList.PRJ_TITLE, c.getString(c.getColumnIndex(PlayList.PRJ_TITLE)));\n\t \t\t\tcv.put(MyList.PRJ_PLAYLIST_ID, mTitle);\n\t \t\t\tcv.put(MyList.PRJ_DESCRIPTION, c.getString(c.getColumnIndex(PlayList.PRJ_DESCRIPTION)));\n\t \t\t\tcv.put(MyList.PRJ_DURATION, c.getString(c.getColumnIndex(PlayList.PRJ_DURATION)));\n\t \t\t\tcv.put(MyList.PRJ_THUMNAIL, c.getString(c.getColumnIndex(PlayList.PRJ_THUMNAIL)));\n\t \t\t\tcv.put(MyList.PRJ_VIDEO_ID, c.getString(c.getColumnIndex(PlayList.PRJ_VIDEO_ID)));\n\t \t\t\t\n\t \t\t\tgetContentResolver().insert(Uri.parse(\"content://\"+Const.MYLIST_AUTHORITY+\"/videolist\"), cv);\n\t \t\t\tLogging.d(\"Insert \"+i);\n\t \t\t}\n\t \t}\n\t\t \tc.close();\n\t\t \tLogging.d(\"Insert End\");\n\t\t}\n\t}", "private Cursor loadFavorites() {\n PermissionUtils.checkPermissionsGranted(getContext(), new String[]{READ_CONTACTS}, true);\n String selection = ContactsCursorLoader.COLUMN_STARRED + \" = 1\";\n return getContext().getContentResolver().query(\n buildFavoritesUri(),\n getProjection(),\n selection,\n null,\n getSortOrder());\n }", "boolean hasFeed();", "boolean hasFeed();", "public boolean appears(T target) {\r\n int index = getIndex(target);\r\n return index != -1;\r\n }", "boolean isCollected(User user, String video_id);", "void setProjectFavourite(int accountId, int projectId, boolean favourite);", "boolean hasFairplay();", "void validate()\n throws UnsupportedPreferenceException\n {\n PreferenceImpl pi = (PreferenceImpl)preferences.get(getName().toLowerCase());\n String[] values = getFavourites();\n if (values != null)\n {\n for (int i = 0; i < values.length; i++)\n {\n pi.validate(values[i]);\n }\n }\n }", "public void addMovieToFavorites(Movie movie) {\n movie.setFavorite(true);\n isFavorite = true;\n //change the star from gray to yellow\n star.setImageResource(R.drawable.ic_grade_yellow_36px);\n //save the poster in local storage\n String imageName = saveMoviePoster();\n\n //load the necessary movie fields into the ContentValues object\n ContentValues values = new ContentValues();\n values.put(FavoriteMoviesContract.MovieEntry.MOVIEDB_ID, movie.getId());\n values.put(FavoriteMoviesContract.MovieEntry.AVERAGE_VOTE, movie.getVoteAverage());\n values.put(FavoriteMoviesContract.MovieEntry.ORIGINAL_TITLE, movie.getOriginalTitle());\n values.put(FavoriteMoviesContract.MovieEntry.RELEASE_YEAR, movie.getReleaseYear());\n values.put(FavoriteMoviesContract.MovieEntry.RUNTIME, movie.getRuntime());\n values.put(FavoriteMoviesContract.MovieEntry.SYNOPSIS, movie.getSynopsis());\n values.put(FavoriteMoviesContract.MovieEntry.POSTER_IMAGE_NAME, imageName);\n\n //insert the movie into the Favorites db\n Uri uri = getActivity().getContentResolver().\n insert(FavoriteMoviesContract.MovieEntry.CONTENT_URI, values);\n\n if (uri != null) {\n String successMessage = \"You have successfully added \" + movie.getOriginalTitle() +\n \" to the Favorites collection\";\n Toast.makeText(getActivity(), successMessage, Toast.LENGTH_LONG).show();\n }\n }", "boolean hasRevealDocument();", "public static boolean doesTitleExists ( Context context, String title ){\n\n boolean exists = false;\n MovieSqlHelper movieDB = new MovieSqlHelper(context);\n Log.d(\"-fetchTitle\", title);\n Cursor MC = movieDB.getReadableDatabase().query(DBConstants.MOVIES_T,null,DBConstants.SUBJECT_C+\"=?\",new String[]{title},null,null,null);\n if ( MC.getCount() > 0 ) {\n exists=true;\n }\n else\n {\n exists=false;\n }\n\n MC.close();\n movieDB.close();\n return exists;\n }", "@Override\n\tpublic void onFavorite(User source, User target, Status favoritedStatus) {\n\n\t}", "public void setFavortiestate(String favortiestate) {\n this.favortiestate = favortiestate;\n }", "boolean hasUserList();", "public boolean canFish() {\r\n\t\tif (location == Location.SAFARI || location == Location.CAVE) {\r\n\t\t\treturn items.containsKey(FishingRod.getFishingRodInstance());\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "boolean hasFeedItemTarget();", "@Override\n public boolean search(Movie movieToFind)\n {\n if(movieToFind == null)\n return false;\n else\n return this.search(movieToFind.getTitle()) != null;\n }", "public boolean containsAll(Collection<Flavor> flavors) {\n return this.flavors.containsAll(flavors);\n }", "public boolean addToFavourites(String name){\n SQLiteDatabase db =this.getReadableDatabase();\n ContentValues contentVal = new ContentValues();\n contentVal.put(FAVOURITES,true);\n db.update(Db_Table,contentVal, \"movie_name = ?\",new String[]{ name });\n return true;\n }", "public boolean isSiteExists(SQLiteDatabase db, String title) {\n\t\tCursor cursor = db.rawQuery(\"SELECT 1 FROM \" + TABLE_INDIA_RSS\n\t\t\t\t+ \" INNER JOIN \"+TABLE_FAVOURITES +\" ON \"+ TABLE_INDIA_RSS+\".title=\"+TABLE_FAVOURITES+\".title WHERE \"+TABLE_INDIA_RSS+\".title = '\" + title + \"'\", new String[] {});\n\t\tboolean exists = (cursor.getCount() > 0);\n\t\tcursor.close();\n\t\treturn exists;\n\t}", "private boolean factPresent(Fact req, ArrayList<Fact> facts) {\n boolean conditionMet = false;\n for (Fact fact: facts) {\n if (req.equals(fact)) {\n conditionMet = true;\n break;\n }\n }\n return conditionMet;\n }", "@RequestMapping(value = \"/watchlist/check\", method = RequestMethod.GET, produces = \"application/json\")\n\t@ResponseBody\n\tpublic boolean checkWatchlist(@RequestParam(\"tmdb_id\") String tmdb_id, HttpServletRequest request, HttpServletResponse response)\n\t\t\t\t\tthrows IOException {\n\t\tUser user = new User();\n\t\t\n\t\tString authToken = checkToken(request, response);\n\t\t\n\t\t//Check validation of user token\n\t\ttry{\n\t\t user = validateToken(authToken);\n\t\t\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\t\n\t\t//If token isnt valid send Unauthorized error\n\t\tif (user == null)\n\t\t\treturn false;\n\t\telse{\n\t\t\t\n\t\t\t//Get show ovject from show tmdb id\n\t\t\t\n\t\t\tList<Show> showWithId = service.findByTmdbId(tmdb_id);\n\t\t\t\n\t\t\t//If show is in database get it, else create object and put it in database\n\t\t\tShow show = null;\n\t\t\tif (showWithId.size() > 0){\n\t\t\t\tSystem.out.println(showWithId.get(0).getTitle());\n\t\t\t\tshow = showWithId.get(0);\n\t\t\t}\n\t\t\telse {\n\t\t\t\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t//Check if user has already recommended show\n\t\t\tList<Show> shows = user.getWatchlist();\n\t\t\tif(shows.contains(show)){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse return false;\n\t\t}\t\n\t}" ]
[ "0.78063977", "0.7637389", "0.73081756", "0.69354314", "0.67605996", "0.6688527", "0.66628116", "0.66034704", "0.6478547", "0.63929236", "0.63742465", "0.62491614", "0.62206995", "0.6220413", "0.61960745", "0.61262345", "0.6060372", "0.5935117", "0.5814977", "0.5775265", "0.57750267", "0.5689711", "0.56808156", "0.5673775", "0.5649483", "0.5623877", "0.5620365", "0.56071144", "0.5606356", "0.5585852", "0.5582077", "0.55708903", "0.55609906", "0.55438566", "0.5522573", "0.5472834", "0.5449422", "0.5431949", "0.54109865", "0.5389153", "0.534682", "0.53399295", "0.53326106", "0.5303249", "0.52611774", "0.52607256", "0.5258947", "0.52455837", "0.524348", "0.52300656", "0.5219826", "0.5198629", "0.5197287", "0.51941943", "0.51691806", "0.51519066", "0.513086", "0.5125358", "0.511635", "0.5114923", "0.51064926", "0.5103538", "0.5091447", "0.5085174", "0.50807714", "0.50741905", "0.50678337", "0.504076", "0.5038207", "0.5023878", "0.4995078", "0.49945238", "0.4987079", "0.49865314", "0.49770048", "0.49690247", "0.49686408", "0.49589166", "0.49541375", "0.49541375", "0.49463043", "0.49362183", "0.49224204", "0.4921785", "0.4913557", "0.4911576", "0.491059", "0.4906772", "0.48898122", "0.48803532", "0.48792386", "0.48698255", "0.48610473", "0.485601", "0.48485294", "0.48474985", "0.4846695", "0.48462272", "0.48435107" ]
0.58883446
18
Sets the favorites flag status.
public void setFavorite(boolean favorite) { isFavorite = favorite; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void setFavorite(boolean value) {\n\t\tthis.isFavorite = value;\n\t}", "public void setFavorite(boolean favorite) {\n if (mFavorite != favorite) {\n mFavorite = favorite;\n // Avoid infinite recursions if setChecked() is called from a listener\n if (mBroadcasting) {\n return;\n }\n\n mBroadcasting = true;\n if (mOnFavoriteChangeListener != null) {\n mOnFavoriteChangeListener.onFavoriteChanged(this, mFavorite);\n }\n updateFavoriteButton(favorite);\n mBroadcasting = false;\n }\n }", "public void setToFavorite(boolean favorite) {\n this.isFavorite = favorite;\n }", "private void addToFavorites() {\n\n favoriteBool = true;\n preferencesConfig.writeAddFavoriteTip(shownTipIndex);\n Toast.makeText(getContext(), \"Added to favorites.\", Toast.LENGTH_SHORT).show();\n\n }", "public void setFavorite(boolean favorite) {\n this.favorite = favorite;\n }", "public void toggleFavorite() {\n setFavorite(!mFavorite);\n }", "public void toggleFavorites()\n {\n this.showFavorites = !this.showFavorites;\n this.setupMorphs(Morphing.get(this.mc.thePlayer));\n }", "void setProjectFavourite(int accountId, int projectId, boolean favourite);", "public void changeFavorite(boolean a) {\r\n favorite = a;\r\n }", "public void setFavorite(int favorite) throws Exception {\n if (favorite == 0) {mFavorite = false;}\n else if (favorite == 1) {mFavorite = true;}\n else {throw new Exception(\"Error: Cannot resolve movie 'favorite' \");}\n }", "public void toggleFavorite() {\n\t\tsynchronized (this) {\n\t\t\tif (mFavoritesCache != null) {\n\t\t\t\tmFavoritesCache.toggleSong(getAudioId(), getTrackHost(),\n\t\t\t\t\t\tgetTrackName(), getAlbumName(), getArtistName());\n\t\t\t}\n\t\t}\n\t}", "private boolean checkIfFavorite() {\n if (favoriteIds.contains(movie.getId())) {\n movie.setFavorite(true);\n return true;\n }\n movie.setFavorite(false);\n return false;\n }", "public void saveFavorite(){\n //make sure movie is NOT already a favorite\n if(!mMovieStaff.alreadyFavorite(mMovie.getTMDBId())){\n //is a new favorite, favorite movie list status has changed\n mFavoriteChanged = true;\n\n //set movie item favorite status as true\n mMovie.setFavorite(true);\n\n //save movie to favorite database table\n mMovieValet.saveFavorite(mMovie);\n\n //add movie to favorite movie list buffer\n mMovieStaff.addFavorite(mMovie);\n }\n\n //check if movie list type is display a favorite list and if the device is a tablet\n if(mMovieType == PosterHelper.NAME_ID_FAVORITE && mIsTablet){\n //both yes, get favorite movies to update poster fragment\n getMovieList(PosterHelper.NAME_ID_FAVORITE);\n }\n }", "public void setIsUserFav(User user) {\n if(user.isUsersFavouritePost(this.mPost))\n this.isFavourite.set(true);\n else\n this.isFavourite.set(false);\n\n //if(this.mPost.getFavourite().contains(user))\n // this.isFavourite.set(true);\n //this.isFavourite.set(false);\n }", "private void toggleFavorite(Set<Long> selectedSet) {\n toggleMultiple(selectedSet, new MultiToggleHelper() {\n\n @Override\n public boolean getField(Cursor c) {\n return c.getInt(MessagesAdapter.COLUMN_FAVORITE) != 0;\n }\n\n @Override\n public void setField(long messageId, boolean newValue) {\n mController.setMessageFavoriteSync(messageId, newValue);\n }\n });\n }", "private void removeFromFavorites() {\n favoriteBool = false;\n preferencesConfig.writeRemoveFavoriteTip(shownTipIndex);\n Toast.makeText(getContext(), \"Removed from favorites\", Toast.LENGTH_SHORT).show();\n\n }", "public void favouriteUser() {\r\n\t\tif(favourited) {\r\n\t\t\tcurrentUser.unfavouriteUser(userToView.getUserID());\r\n\t\t\tfavouriteButton.setText(\"Favourite\");\r\n\t\t\tfavourited = false;\r\n\t\t} else if(currentUser.getUserID() != userToView.getUserID()){\r\n\t\t\tcurrentUser.favouriteUser(userToView.getUserID());\r\n\t\t\tfavouriteButton.setText(\"Unfavourite\");\r\n\t\t\tfavourited = true;\r\n\t\t} else {\r\n\t\t\tCONSTANTS.makeAlertWindow(\"warning\",\"You can not favorite yourself!\");\r\n\t\t}\r\n\t}", "@Override\n\tpublic void onFavorite(User source, User target, Status favoritedStatus) {\n\n\t}", "public boolean isFavorite() {\n return isFavorite;\n }", "public boolean isFavorite() {\n return isFavorite;\n }", "@Override\n\tpublic boolean isFavorite() {\n\t\treturn this.isFavorite;\n\t}", "public void onFavoriteChanged(MaterialFavoriteButton buttonView, boolean favorite);", "public void setUpFavouriteIcon() {\n if (isUserOwner()) {\n view.hideFavouriteIcon();\n } else if (currentAdvertIsFavourite()) {\n view.setIsAFavouriteIcon();\n } else {\n view.setIsNotAFavouriteIcon();\n }\n }", "public void m7904a(boolean favorite) {\n this.f6695h = favorite;\n }", "public void setFavoriteFlag(int flag, long videoID) {\n try {\n SQLiteDatabase database = this.getReadableDatabase();\n database.enableWriteAheadLogging();\n ContentValues contents = new ContentValues();\n contents.put(VideoTable.KEY_VIDEO_IS_FAVORITE, flag);\n database.update(VideoTable.VIDEO_TABLE, contents, VideoTable.KEY_VIDEO_ID + \"=?\", new String[]{\"\" + videoID});\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override\n\t\tpublic void onFavorite(User arg0, User arg1, Status arg2) {\n\t\t\t\n\t\t}", "public void setFavorite(boolean favorite, boolean animated) {\n if (favorite) {\n boolean orig = mAnimateFavorite;\n mAnimateFavorite = animated;\n setFavorite(favorite);\n mAnimateFavorite = orig;\n } else {\n boolean orig = mAnimateUnfavorite;\n mAnimateUnfavorite = animated;\n setFavorite(favorite);\n mAnimateUnfavorite = orig;\n }\n }", "boolean isFavorite(int id);", "public final void resetFavorites() {\n Favorites favorites = Favorites.INSTANCE;\n favorites.clear();\n favorites.load(this.persistenceWrapper.readFavorites());\n }", "public void onFavButtonClicked(View view) {\n isFav = !isFav;\n toggleButtonText(isFav);\n \n // Update DB\n new OperateWithDBMovieAsyncTask().execute(isFav ? ADD_MOVIE : REMOVE_MOVIE);\n }", "public void toggleFavorite(boolean animated) {\n if (!mFavorite) {\n boolean orig = mAnimateFavorite;\n mAnimateFavorite = animated;\n setFavorite(!mFavorite);\n mAnimateFavorite = orig;\n } else {\n boolean orig = mAnimateUnfavorite;\n mAnimateUnfavorite = animated;\n setFavorite(!mFavorite);\n mAnimateUnfavorite = orig;\n }\n }", "@SuppressWarnings(\"unchecked\")\n\tprotected void updateSessionFavorites(SMTSession session, PageViewVO fav, boolean isDelete) {\n\t\t// get the Favs map off of the session.\n\t\tMap<String,List<PageViewVO>> favMap = (Map<String,List<PageViewVO>>)session.getAttribute(MyFavoritesAction.MY_FAVORITES);\n\t\tList<PageViewVO> favs = favMap.get(fav.getReferenceCode());\n\t\tif (favs == null) favs = new ArrayList<>();\n\t\tif (isDelete) {\n\t\t\t// remove fav\n\t\t\tremoveFromSession(favs, fav.getPageId());\n\t\t} else {\n\t\t\t// add fav\n\t\t\tfavs.add(fav);\n\t\t}\n\t\t// replace the favs map on the session.\n\t\tsession.setAttribute(MyFavoritesAction.MY_FAVORITES, favMap);\n\t}", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tif (item.isFavorite()) {\n\t\t\t\t\t\tholder.btnFavorite\n\t\t\t\t\t\t\t\t.setBackgroundResource(R.drawable.icon_favorite_off);\n\t\t\t\t\t\titem.setFavorite(false);\n\t\t\t\t\t\tpref.setString(item.getFileName(), false);\n\t\t\t\t\t\tif (!inRingtones) {\n\t\t\t\t\t\t\tIntent broadcast = new Intent();\n\t\t\t\t\t\t\tbroadcast.setAction(\"REMOVE_SONG\");\n\t\t\t\t\t\t\tcontext.sendBroadcast(broadcast);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tholder.btnFavorite\n\t\t\t\t\t\t\t\t.setBackgroundResource(R.drawable.icon_favorite);\n\t\t\t\t\t\titem.setFavorite(true);\n\t\t\t\t\t\tpref.setString(item.getFileName(), true);\n\t\t\t\t\t}\n\t\t\t\t}", "public void onFavouritesIconPressed() {\n if (currentAdvertIsFavourite()) {\n dataModel.removeFromFavourites(advertisement);\n view.setIsNotAFavouriteIcon();\n } else {\n dataModel.addToFavourites(advertisement);\n view.setIsAFavouriteIcon();\n }\n }", "private void updateFavoriteButtons() {\n new AsyncTask<Void, Void, Boolean>() {\n\n @Override\n protected Boolean doInBackground(Void... params) {\n return isFavorite();\n }\n\n @Override\n protected void onPostExecute(Boolean isFavorite) {\n if (isFavorite) {\n mButtonRemoveFavorites.setVisibility(View.VISIBLE);\n mButtonMarkAsFavorite.setVisibility(View.GONE);\n } else {\n mButtonMarkAsFavorite.setVisibility(View.VISIBLE);\n mButtonRemoveFavorites.setVisibility(View.GONE);\n }\n }\n }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n\n mButtonMarkAsFavorite.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n markAsFavorite();\n }\n });\n\n mButtonRemoveFavorites.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n removeFromFavorites();\n }\n });\n }", "public void removeFavorite(){\n //check if movie is in the user favorite list\n if(mMovieStaff.alreadyFavorite(mMovie.getTMDBId())){\n //is in the favorite list, mark that list has changed\n mFavoriteChanged = true;\n\n //update movie item favorite status\n mMovie.setFavorite(false);\n\n //delete movie item from favorite database table\n mMovieValet.deleteFavorite(mMovie);\n\n //remove movie item from favorite movie list buffer\n mMovieStaff.removeFavorite(mMovie);\n }\n\n //check if movie list type is display a favorite list and if the device is a tablet\n if(mMovieType == PosterHelper.NAME_ID_FAVORITE && mIsTablet){\n //both yes, get favorite movies to update poster fragment\n getMovieList(PosterHelper.NAME_ID_FAVORITE);\n }\n }", "private void showFavouriteList() {\n setToolbarText(R.string.title_activity_fave_list);\n showFavouriteIcon(false);\n buildList(getFavourites());\n }", "private boolean isAddedToFavorites() {\n boolean isFavorite = false;\n\n String[] projection = {FavMovieEntry.COLUMN_MOVIE_ID};\n String selection = FavMovieEntry.COLUMN_MOVIE_ID + \"=?\";\n String[] selectionArgs = new String[]{\n String.valueOf(sMovie.getMovieId())};\n\n Cursor cursor = this.getContentResolver().query(\n FavMovieEntry.CONTENT_URI,\n projection,\n selection,\n selectionArgs,\n null\n );\n\n if (cursor != null && cursor.moveToFirst()) {\n if (cursor.getCount() > 0) {\n isFavorite = true;\n long currentIndex = cursor.getLong(cursor.getColumnIndex(FavMovieEntry.COLUMN_MOVIE_ID));\n mCurrentMovieUri = ContentUris.withAppendedId(FavMovieEntry.CONTENT_URI, currentIndex);\n } else {\n isFavorite = false;\n\n mCurrentMovieUri = null;\n }\n cursor.close();\n }\n\n return isFavorite;\n }", "public boolean isFavorite() {\n\t\tsynchronized (this) {\n\t\t\tif (mFavoritesCache != null) {\n\t\t\t\treturn mFavoritesCache.isFavoriteSong(getAudioId(),\n\t\t\t\t\t\tgetTrackHost());\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public void saveFavorites(Context context, List<Recipes> favorites) {\n SharedPreferences settings;\n SharedPreferences.Editor editor;\n\n settings = context.getSharedPreferences(PREFS_NAME,\n Context.MODE_PRIVATE);\n editor = settings.edit();\n\n Gson gson = new Gson();\n String jsonFavorites = gson.toJson(favorites);\n\n editor.putString(FAVORITES, jsonFavorites);\n\n editor.apply();\n }", "public void onClicklistenerForFavorites(View view){\n if(isAlreadyFavorteis() == true){\n Boolean hasDeleted = dBhelper.deleteFavortiesByCategoryId(userAskAbout,inputSpinnerOne.getSelectedItemPosition(),inputSpinnertow.getSelectedItemPosition());\n if(hasDeleted == true) {\n Toast.makeText(getApplicationContext(), \"Your data has deleted in Favorties\", Toast.LENGTH_LONG).show();\n favortiesImageView.setBackgroundResource(R.drawable.ic_favourites);\n isAlreadyFavorties = false;\n }\n\n }else\n {\n favortiesMethed();\n isAlreadyFavorties = true;\n favortiesImageView.setBackgroundResource(R.drawable.ic_favourites_pressed);\n }\n\n }", "@Override\n public void onResume() {\n super.onResume();\n initListFavorite();\n }", "public boolean isAlreadyFavorited(){\r\n if(ui.isIsUserAuthenticated()){\r\n Users user = ui.getUser();\r\n if(user.getFavorites() != null){\r\n return user.getFavorites().contains(recipe);\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n else{\r\n return false;\r\n }\r\n }", "private boolean isFavorite() {\n for (int favoriteIndex : favoriteIndexes) {\n if (favoriteIndex == shownTipIndex) {\n return true;\n }\n }\n return false;\n }", "@Override\n public void onFavoriteDatabaseChanged() {\n //setCategoryCount(FileCategory.Favorite, mFavoriteList.getCount());\n }", "@Override\n public void onClick(View view) {\n isFavorite = !isFavorite;\n\n if (isFavorite) {\n Toast.makeText(ShowTeacherActivity.this,\n getString(R.string.message_teacher_add_to_favorites), Toast.LENGTH_SHORT)\n .show();\n presenter.saveFavorite(ShowTeacherActivity.this, teacher);\n ibFavorite.setImageResource(R.drawable.ic_favorite_full);\n } else {\n Toast.makeText(ShowTeacherActivity.this,\n getString(R.string.message_teacher_delete_from_favorites), Toast.LENGTH_SHORT)\n .show();\n presenter.deleteFavorite(ShowTeacherActivity.this, teacher.getId());\n ibFavorite.setImageResource(R.drawable.ic_favorite_border);\n }\n }", "public void setFavorite(Tweet tweet, AsyncHttpResponseHandler handler) {\n String apiUrl = getApiUrl(\"favorites/create.json\");\n RequestParams params = new RequestParams();\n\n params.put(\"id\", String.valueOf(tweet.getTid()));\n\n // Execute the request\n getClient().post(apiUrl, params, handler);\n }", "public void writeFavorites() {\n ArrayList<String> favorites = new ArrayList<>();\n for(Landmark landmark : landmarks.getFavorites()) {\n favorites.add(landmark.toStringForOutput());\n }\n FileManager.writeLines(favoritesPath, favorites);\n }", "public void saveFavorites(Context context, List<ClassDataGejala> favorites) {\n SharedPreferences settings;\n SharedPreferences.Editor editor;\n\n settings = context.getSharedPreferences(GEJALA,\n Context.MODE_PRIVATE);\n editor = settings.edit();\n\n Gson gson = new Gson();\n String jsonFavorites = gson.toJson(favorites);\n\n editor.putString(GEJALA, jsonFavorites);\n\n editor.commit();\n }", "public void makeFavorite(String title, int favorite)\n {\n SQLiteDatabase db = this.getWritableDatabase();\n\n /* the execSQL Method simply executes this query on the Database, in this Query UPDATE is\n * used to specify the Table Name to Update, SET specifies the Column name to Update in this\n * case COL8 contains favorites and WHERE is the condition in this case it is to make sure\n * that the Movie Title Matches with the given title\n */\n db.execSQL(\n \"UPDATE \" + TABLE_NAME +\n \" SET \" + COL8 + \" = \" + favorite +\n \" WHERE \" + COL2 + \" = '\" + title + \"'\");\n }", "protected void updateProfileFavorites(ActionRequest req, PageViewVO fav) throws ActionException {\n\t\tlog.debug(\"updateProfileFavorites...\");\n\n\t\tMyFavoritesAction mfa = new MyFavoritesAction(getActionInit());\n\t\tmfa.setAttributes(getAttributes());\n\t\tmfa.setDBConnection(dbConn);\n\n\t\tboolean isDelete = Convert.formatBoolean(req.getParameter(\"isDelete\"));\n\t\tif (isDelete) {\n\t\t\tmfa.deleteFavorite(req);\n\t\t} else {\n\t\t\t// set additional req params needed for inserts.\n\t\t\treq.setParameter(QuickLinksAction.PARAM_KEY_TYPE_CD, fav.getReferenceCode());\n\t\t\treq.setParameter(QuickLinksAction.PARAM_KEY_REL_ID, fav.getPageId());\n\t\t\tmfa.insertFavorite(req);\n\t\t}\n\n\t\tupdateSessionFavorites(req.getSession(),fav,isDelete);\n\n\t}", "public static boolean checkForFavorite(Context context,String id){\n Set<String> setSavedFav = getAllFavorites(context);\n if(setSavedFav!=null){\n Log.v(TAG,\"SAVED ID: \"+setSavedFav);\n if(setSavedFav.contains(id))\n return true;\n }\n return false;\n }", "private void initListFavorite() {\n favoritesList = mApiService.getFavorites();\n mRecyclerView.setAdapter(new MyNeighbourRecyclerViewAdapter(favoritesList, this));\n }", "@FXML\n private void toggleFavorite() {\n raise(new ToggleFavoritePersonEvent(id.getText().substring(0, id.getText().indexOf(\".\"))));\n }", "public synchronized Set<String> getFavorites() {\r\n return new HashSet<>(settings.getList(FAVORITES_SETTING));\r\n }", "public void setFavortiestate(String favortiestate) {\n this.favortiestate = favortiestate;\n }", "public void favorite(int index)\n {\n if (latest != null && latest.index == index)\n {\n if (this.showFavorites && !latest.morph.favorite)\n {\n this.toRemove.put(index, new MorphRemove(index, latest.typeIndex));\n this.remove(index);\n }\n\n latest = null;\n }\n }", "FavoriteQuestions() {\n list = SharedPrefs.getFavList();\n }", "public void addToFavorites() {\n\n // Create new content values object\n ContentValues contentValues = new ContentValues();\n\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_ID, sMovie.getMovieId());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_TITLE, sMovie.getMovieTitle());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_ORIGINAL_TITLE, sMovie.getMovieOriginalTitle());\n contentValues.put(FavMovieEntry.COLUMN_POSTER_PATH, sMovie.getPoster());\n contentValues.put(FavMovieEntry.COLUMN_BACKDROP_PATH, sMovie.getMovieBackdrop());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_RELEASE_DATE, sMovie.getReleaseDate());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_RATING, sMovie.getVoteAverage());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_SYNOPSIS, sMovie.getPlotSynopsis());\n\n try {\n mCurrentMovieUri = getContentResolver().insert(FavMovieEntry.CONTENT_URI,\n contentValues);\n } catch (IllegalArgumentException e) {\n mCurrentMovieUri = null;\n Log.v(LOG_TAG, e.toString());\n }\n\n if (mCurrentMovieUri != null) {\n isAddedToFavorites();\n }\n\n }", "private void retrieveFavoritesCompleted(ArrayList<MovieItem> movies){\n //get number of favorite movies in the list\n int count = movies.size();\n\n //check if there are any movies\n if(count > 0){\n //save movies to buffer\n mMovieStaff.setMovies(movies, PosterHelper.NAME_ID_FAVORITE);\n }\n\n //check if the current poster fragment is displaying the user favorite list\n if(mMovieType == PosterHelper.NAME_ID_FAVORITE){\n //yes, show new movie list\n showMovieList(movies, PosterHelper.NAME_ID_FAVORITE);\n }\n }", "public int updateTermFavouritedFlag (Term term, String table) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_FAVOURITED, term.getFavourited());\n\n // updating row\n return db.update(table, values, KEY_ID + \" = ?\", new String[] { String.valueOf(term.getId())});\n }", "boolean isProjectFavourite(int accountId, int projectId);", "public static void findFavourites() {\n DataManager.currentFavouritesList.clear();\n\n for (int i = 0; i < DataManager.fullFavouritesList.size(); i++) {\n Attraction attraction = DataManager.findAttractionByName(DataManager.fullFavouritesList.get(i));\n\n if (attraction != null) {\n DataManager.currentFavouritesList.add(attraction);\n }\n }\n\n FavouritesListFragment.backgroundLayout.setVisibility(DataManager.currentFavouritesList.size() == 0 ? View.VISIBLE : View.INVISIBLE);\n\n AttractionsListFragment.attractionsAdapter.notifyDataSetChanged();\n }", "public void onClicked() {\n mypreference = PreferenceManager.getDefaultSharedPreferences(getContext());\n SharedPreferences.Editor editorpref = mypreference.edit();\n Gson gson = new Gson();\n //retrieve the stored ArrayList of fovorite movies as json format\n String storedJsonList = mypreference.getString(\"storedjsonList\", \"\");\n // get the type of this json format\n Type type = new TypeToken<ArrayList<ItemsClass>>() {\n }.getType();\n ArrayList<ItemsClass> movieArrayList = new ArrayList<ItemsClass>();\n //create array list of the retrieved json\n // store it in my Arraylist\n movieArrayList = gson.fromJson(storedJsonList, type);\n\n// favo.setSelected(va[0]);\n ischecked = va[0];\n if (va[0] == true) {\n\n if (movieArrayList == null) {\n\n favoImageButton.setImageResource(R.drawable.liked);\n\n String loadedPosterString = encodeTobase64(theposterImage);\n\n\n serItems.add(new ItemsClass(loadedPosterString, title, releaseDate, overview, rate, id));\n\n Toast.makeText(getContext(), \"you have favo this movie with id of \" + id + \"and you list size is\" + serItems.size(), Toast.LENGTH_SHORT).show();\n //convert all the arraylist with the old and new Items to Json format\n String jsonList = gson.toJson(serItems);\n //save to sharedPreference\n editorpref.putString(\"storedjsonList\", jsonList);\n editorpref.commit();\n va[0] = !va[0];\n\n } else if (movieArrayList != null) {\n serItems = movieArrayList;\n for (int i = 0; i < serItems.size(); i++) {\n int detectId = serItems.get(i).getId();\n if (serItems.size() > 0 && detectId == id) {\n Toast.makeText(getContext(), \"you already have this movie in favorite list \", Toast.LENGTH_SHORT).show();\n favoImageButton.setImageResource(R.drawable.liked);\n break;\n } else if (serItems.size() > 0 && detectId != id && i < serItems.size() - 1) {\n\n continue;\n\n } else if (detectId != id && i == serItems.size() - 1 && i > serItems.size() - 2) {\n Toast.makeText(getContext(), \"you have favo this movie with id of \" + id, Toast.LENGTH_SHORT).show();\n favoImageButton.setImageResource(R.drawable.like);\n serItems.add(new ItemsClass(storedPoster, title, releaseDate, overview, rate, id));\n serItems.size();\n //convert all the arraylist with the old and new Items to Json format\n String jsonList = gson.toJson(serItems);\n //save to sharedPreference\n editorpref.putString(\"storedjsonList\", jsonList);\n editorpref.commit();\n va[0] = !va[0];\n break;\n }\n\n }\n }\n\n } else {\n if (movieArrayList != null) {\n serItems = movieArrayList;\n for (int i = 0; i < serItems.size(); i++) {\n\n int detectId = serItems.get(i).getId();\n if (i < serItems.size() && serItems.size() > 0 && detectId == id) {\n Toast.makeText(getContext(), \"you have deleted this movie this movie with id of \" + id, Toast.LENGTH_SHORT).show();\n favoImageButton.setImageResource(R.drawable.like);\n mypreference = getContext().getSharedPreferences(\"moviepref\", Context.MODE_PRIVATE);\n editorpref.putString(\"storedPoster\", \"\");\n editorpref.putString(\"storedTitle\", \"\");\n editorpref.putString(\"storedOverview\", \"\");\n editorpref.putString(\"storedDate\", \"\");\n editorpref.putFloat(\"storedrating\", (float) 0.0);\n editorpref.commit();\n va[0] = !va[0];\n//\n break;\n } else if (detectId != id && i < serItems.size() - 1) {\n continue;\n } else if (detectId == id && i == serItems.size() - 1) {\n Toast.makeText(getContext(), \" actually you don't have this movie in your favorite list \", Toast.LENGTH_SHORT).show();\n }\n\n }\n }\n }\n }", "@RequestMapping(value = \"/gifs/{gifId}/favorite\", method = RequestMethod.POST)\n public String toggleFavorite(@PathVariable Long gifId, HttpServletRequest request) {\n Gif gif = gifService.findById(gifId);\n gifService.toggleFavorite(gif);\n return String.format(\"redirect:%s\", request.getHeader(\"referer\"));\n }", "private void setUpFavoriteMovieButton () {\n MovieDetailsViewModelFactory factory = new MovieDetailsViewModelFactory (mDb, movie.getMovieId());\n final MovieDetailsViewModel viewModel = ViewModelProviders.of(this, factory).get(MovieDetailsViewModel.class);\n\n // Observe the LiveData object in the ViewModel. Use it also when removing the observer\n viewModel.getMovie().observe(this, new Observer<Movie>() {\n @Override\n public void onChanged(@Nullable Movie dbMovie) {\n viewModel.getMovie().removeObserver(this);\n\n if (dbMovie == null) {\n favoriteMoviesButton.setChecked (false);\n } else if ((movie.getMovieId() == dbMovie.getMovieId()) && !favoriteMoviesButton.isChecked ()){\n favoriteMoviesButton.setChecked (true);\n } else {\n favoriteMoviesButton.setChecked (false);\n }\n }\n });\n }", "@MediumTest\n\tpublic void testFavMensaPersistedBetweenLaunches() {\n\t\tmFavButton = (ToggleButton) getActivity()\n\t\t\t\t.findViewById(R.id.tgl_favorite);\n\t\tassertEquals(mFavButton.isChecked(), false);\n\n\t\tactivity.runOnUiThread(new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tmFavButton.setChecked(true);\n\t\t\t}\n\t\t});\n\n\t\t// close the activity\n\t\tactivity.finish();\n\t\tsetActivity(null);//force creation of a new Activity\n\t\t// relaunch the activity\n\t\tactivity = this.getActivity();\n\n\t\tmFavButton = (ToggleButton) getActivity()\n\t\t\t\t.findViewById(R.id.tgl_favorite);\n\t\tassertEquals(mFavButton.isChecked(), true);\n\n\t\tactivity.runOnUiThread(new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tmFavButton.setChecked(false);\n\t\t\t}\n\t\t});\n\n\t\tactivity.finish();\n\t\tsetActivity(null);\n\t\tactivity = this.getActivity();\n\n\t\tmFavButton = (ToggleButton) getActivity()\n\t\t\t\t.findViewById(R.id.tgl_favorite);\n\t\tassertEquals(mFavButton.isChecked(), false);\n\t}", "public void updateFavorited(UserProfile up, String itemCode, Boolean madeIt) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n\n String query = \"UPDATE userItems \"\n + \"SET madeIt = ? \"\n + \"WHERE itemCode = ?\";\n try {\n ps = connection.prepareStatement(query);\n ps.setBoolean(1, madeIt);\n ps.setString(2, itemCode);\n\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.updateFav(itemCode, madeIt);\n }", "public void updateFeedItemAsFavorite(FeedItem item) {\n new updateFeedItemFavoriteAsync(itemDao).execute(item);\n }", "public void refreshFavoriteBtn() {\r\n if (recipe.isFavorite(context)) {\r\n favoriteBtn.setIcon(\"faw_star\");\r\n } else {\r\n favoriteBtn.setIcon(\"faw_star_o\");\r\n }\r\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\n\t\t\t\t\tif(item.reward.getReward_favorite()==0)\n\t\t\t\t\t{\n\t\t\t\t\t\titem.reward.setReward_favorite(1);\n\t\t\t\t\t\timgFavorite.setImageResource(R.drawable.orange_star);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\titem.reward.setReward_favorite(0);\n\t\t\t\t\t\timgFavorite.setImageResource(R.drawable.black_star);\n\t\t\t\t\t}\n\t\t\t\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_settings) {\r\n if(item.getTitle().equals(\"Add to Favorites\")) {\r\n SharedPreferences commonpreferences = getSharedPreferences(\"Common\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor1 = commonpreferences.edit();\r\n\r\n String value1 = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor1.putString(id_fav, value1);\r\n editor1.commit();\r\n if (type_fav.equals(\"Users\")) {\r\n SharedPreferences userpreferences = getSharedPreferences(\"Users\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = userpreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Pages\")) {\r\n SharedPreferences pagepreferences = getSharedPreferences(\"Pages\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = pagepreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Events\")) {\r\n SharedPreferences eventpreferences = getSharedPreferences(\"Events\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = eventpreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Places\")) {\r\n SharedPreferences placepreferences = getSharedPreferences(\"Places\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = placepreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Groups\")) {\r\n SharedPreferences grouppreferences = getSharedPreferences(\"Groups\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = grouppreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n }\r\n\r\n Toast.makeText(getApplicationContext(), \"Added to Favorites\", Toast.LENGTH_LONG).show();\r\n }\r\n else\r\n {\r\n SharedPreferences commonpreferences = getSharedPreferences(\"Common\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor1 = commonpreferences.edit();\r\n editor1.remove(id_fav);\r\n editor1.commit();\r\n\r\n if (type_fav.equals(\"Users\")) {\r\n SharedPreferences userpreferences = getSharedPreferences(\"Users\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = userpreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Pages\")) {\r\n SharedPreferences pagepreferences = getSharedPreferences(\"Pages\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = pagepreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Events\")) {\r\n SharedPreferences eventpreferences = getSharedPreferences(\"Events\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = eventpreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Places\")) {\r\n SharedPreferences placepreferences = getSharedPreferences(\"Places\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = placepreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Groups\")) {\r\n SharedPreferences grouppreferences = getSharedPreferences(\"Groups\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = grouppreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n }\r\n\r\n\r\n Toast.makeText(getApplicationContext(), \"Removed from Favorites\", Toast.LENGTH_LONG).show();\r\n }\r\n //SharedPreferences.Editor editor = sharedpreferences.edit();\r\n //editor.putString(\"Name\", \"Rachit\");\r\n //SharedPreferences events=getSharedPreferences(\"Events\", Context.MODE_PRIVATE);\r\n //String l=\"-1\";\r\n //String value=events.getString(id_fav,l);\r\n //editor.commit();\r\n return true;\r\n }\r\n else if (id == R.id.share) {\r\n if (ShareDialog.canShow(ShareLinkContent.class)) {\r\n ShareLinkContent linkContent = new ShareLinkContent.Builder()\r\n .setContentUrl(Uri.parse(\"http://developers.facebook.com/android\"))\r\n .build();\r\n shareDialog.show(linkContent);\r\n }\r\n\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "public static void updateFavorite(String userId, final String foodId, final boolean option, final ImageButton favButton) {\n //get database reference\n final DatabaseReference dbref = FirebaseDatabase.getInstance().getReference(\"users\").child(userId);\n //add eventlistener to reference\n dbref.child(\"favoritesList\").addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n ArrayList<String> updated = new ArrayList<>();\n boolean exists = false;\n for (DataSnapshot favDataSnapshot : dataSnapshot.getChildren()) {\n String fav = favDataSnapshot.getValue(String.class);\n if (!option) {\n if (foodId.equals(fav))\n Log.d(\"favor\", \"this one should be deleted \");\n else\n updated.add(fav);\n } else {\n if (foodId.equals(fav)) {\n exists = true;\n updated.add(fav);\n } else\n updated.add(fav);\n }\n }\n if (!exists && option) {\n favButton.setImageResource(R.drawable.ic_favorite);\n updated.add(foodId);\n }\n else\n favButton.setImageResource(R.drawable.ic_favorite_empty);\n dbref.child(\"favoritesList\").setValue(updated);\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }", "@FXML\n private void chooseFavouritePhotoEvent() {\n if (!PhotoManager.getFavouriteList().isEmpty()) {\n User.setGalleryPhotos(PhotoManager.getFavouriteList());\n fadeOutEvent();\n }\n }", "public void setFavSite(final String favSite){\n\t\tthis.favSite = favSite;\n\t}", "public void setFavortieid(Integer favortieid) {\n this.favortieid = favortieid;\n }", "@Override\n\tpublic int updateFavoriteVO(FavoriteVO vo) {\n\t\treturn 0;\n\t}", "@Override\n\tpublic void addFavorit(FavorisImpl newfavorit) {\n\t\t\n\t}", "public synchronized void addChannelsToFavorites(Set<String> channels) {\r\n for (String channel : channels) {\r\n addChannelToFavorites(channel);\r\n }\r\n settings.setSettingChanged(FAVORITES_SETTING);\r\n }", "public void iSelectFavChanUp() {\n\t\tmTvChannelSelector.favoriteChannelUp();\n\t}", "public boolean isSetCurrentChannelFavorite() {\n\t\tTVChannel mTVChannel = mTvChannelSelector.getCurrentChannel();\n\t\treturn isSetChannelFavorite(mTVChannel);\n\t}", "private void premium_isFavOrLike(Context context, ArticleBean articleBean, final ListingIconView favStartImg, final ListingIconView toggleLikeDisLikeImg) {\n ApiManager.isExistFavNdLike(context, articleBean.getArticleId())\n .subscribe(likeVal -> {\n int like = (int) likeVal;\n if (articleBean != null) {\n articleBean.setIsFavourite(like);\n }\n favStartImg.setVisibility(View.VISIBLE);\n favStartImg.setEnabled(true);\n toggleLikeDisLikeImg.setVisibility(View.VISIBLE);\n toggleLikeDisLikeImg.setEnabled(true);\n\n if(THPConstants.IS_USE_SEVER_THEME) {\n if (like == NetConstants.LIKE_NEUTRAL) {\n // 11 = app:iconType=\"unfavourite\"\n favStartImg.updateIcon(11);\n // 10 = app:iconType=\"dislike\"\n toggleLikeDisLikeImg.updateIcon(10);\n }\n else if (like == NetConstants.LIKE_YES) {\n // 2 = app:iconType=\"favourite\"\n favStartImg.updateIcon(2);\n // 10 = app:iconType=\"dislike\"\n toggleLikeDisLikeImg.updateIcon(10);\n }\n else if (like == NetConstants.LIKE_NO) {\n // 11 = app:iconType=\"unfavourite\"\n favStartImg.updateIcon(11);\n // 6 = app:iconType=\"like\"\n toggleLikeDisLikeImg.updateIcon(6);\n }\n }\n else {\n if (like == NetConstants.LIKE_NEUTRAL) {\n favStartImg.setImageResource(R.drawable.ic_like_unselected);\n toggleLikeDisLikeImg.setImageResource(R.drawable.ic_switch_off_copy);\n } else if (like == NetConstants.LIKE_YES) {\n favStartImg.setImageResource(R.drawable.ic_like_selected);\n toggleLikeDisLikeImg.setImageResource(R.drawable.ic_switch_off_copy);\n } else if (like == NetConstants.LIKE_NO) {\n favStartImg.setImageResource(R.drawable.ic_like_unselected);\n toggleLikeDisLikeImg.setImageResource(R.drawable.ic_switch_on_copy);\n }\n }\n\n }, val -> {\n Log.i(\"\", \"\");\n });\n }", "public interface OnFavoriteChangeListener {\n /**\n * Called when the favorite state is changed.\n *\n * @param buttonView the button view whose state has changed\n * @param favorite the favorite state\n */\n public void onFavoriteChanged(MaterialFavoriteButton buttonView, boolean favorite);\n }", "public void clickFavoritesLink()\n\t{\n \telementUtils.performElementClick(wbFavoritesLink);\n\t}", "@POST(\"/attractions/{attractionId}/favorite\")\n Call<Void> markFavoriteAttraction(\n @Path(\"attractionId\") int attractionId,\n @Header(\"Authorization\") String bearer\n );", "public void addTermToFavourites(Term term) {\n // Set the favourited status of the term\n term.setFavourited(1);\n // Add the term to the table favourites\n addTermWithId(term, TABLE_FAVOURITES);\n // Update the favourite status of the term in the table terms\n updateTermFavouritedFlag(term, TABLE_TERMS);\n }", "public void saveFavoritesID(ArrayList<String> idList) {\n\n\t\tSAVE_FILE = FAVORITE_FILE;\n\t\tsaveIds(idList);\n\t}", "@Override\n public void onClick(View view) {\n\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n\n if (favorited) {\n unFavorite(mangaID, user);\n } else {\n favorite(mangaID, mangaDetails.getTitle(), user);\n }\n\n }", "@Test\n public void getFavoriteNeighboursWithSuccess() {\n service.getNeighbours().forEach(neighbour -> neighbour.setFavorite(false));\n //assertTrue(service.getFavoriteNeighbours().isEmpty());\n Neighbour favoriteNeighbour = service.getNeighbours().get(POSITION_ITEM);\n Neighbour favoriteNeighbour2 = service.getNeighbours().get(POSITION_ITEM+1);\n favoriteNeighbour.setFavorite(true);\n favoriteNeighbour2.setFavorite(true); }", "@Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n if (((MemeLab.get(getActivity())).getMemes()).contains(\n MemeLab.get(getActivity()).getMeme(selectedImagePath)) ||\n ((MemeLab.get(getActivity())).getMyanmarMemes()).contains(\n MemeLab.get(getActivity()).getMeme(selectedImagePath)) ||\n (MemeLab.get(getActivity())\n .getCustomMemes()\n .contains(MemeLab.get(getActivity()).getMeme(selectedImagePath)))) {\n if (isChecked) {\n Toast.makeText(getActivity(), \"added to Favorites\", Toast.LENGTH_SHORT).show();\n sendResult(FAVORITE_RESULT, true);\n }\n if (!isChecked) {\n Toast.makeText(getActivity(), \"removed from Favorites\", Toast.LENGTH_SHORT).show();\n sendResult(FAVORITE_RESULT, false);\n }\n } else {\n Toast.makeText(getActivity(), \"cannot add Custom images to Favorites\", Toast.LENGTH_SHORT)\n .show();\n }\n }", "@RequestMapping(\"/favorites\")\n public String favorites(Model model) {\n // TODO: Get list of all GIFs marked as favorite\n List<Gif> faves = new ArrayList<>();\n\n model.addAttribute(\"gifs\", faves);\n model.addAttribute(\"username\", \"Chris Ramacciotti\"); // Static username\n return \"gif/favorites\";\n }", "private void showFavouriteIcon(boolean show) {\n faveIcon.setVisible(show);\n defaultIcon.setVisible(!show);\n sortIcon.setVisible(show);\n }", "public interface Favorite {\n boolean get(String id);\n boolean toggle(String id);\n}", "public void backToPosters(){\n //check if favorite list is going to be displayed or if favorite list has changed\n if(mMovieType == PosterHelper.NAME_ID_FAVORITE && mFavoriteChanged){\n //refresh favorite list\n showMovieList(mMovieStaff.getMovies(PosterHelper.NAME_ID_FAVORITE),\n PosterHelper.NAME_ID_FAVORITE);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_fav) {\n FavoritesDataSource dataSource = new FavoritesDataSource(getBaseContext());\n dataSource.open();\n if(isFav){\n //remove from favorites\n dataSource.deleteFromFavorites(placeid);\n item.setIcon(R.drawable.ic_heart_outline_white);\n Toast.makeText(getBaseContext(),placeName+\" was removed from favorites\",Toast.LENGTH_SHORT).show();\n isFav = false;\n }else{\n //add to favorites\n Place place = new Place(placeid,placeName,address,true,picURL);\n dataSource.addToFavorites(place);\n item.setIcon(R.drawable.ic_heart_fill_white);\n Toast.makeText(getBaseContext(),placeName+\" was added to favorites\",Toast.LENGTH_SHORT).show();\n isFav = true;\n }\n dataSource.close();\n return true;\n }else if(id == R.id.action_share){\n //open twitter url\n String tweetParams = \"text=\"+ URLEncoder.encode(\"Check out \"+placeName+\" located at \"+address+\". Website \")+\"&url=\"+URLEncoder.encode(tweetURL)+\"&hashtags=TravelAndEntertainmentSearch\";\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"https://twitter.com/intent/tweet?\"+tweetParams));\n startActivity(browserIntent);\n return true;\n }else if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "public static void SetPreferByBoolean(Context context, String key,\n\t\t\tboolean value) {\n\t\tSharedPreferences mPrefer = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(context);\n\t\tEditor editor = mPrefer.edit();\n\t\teditor.putBoolean(key, value);\n\t\teditor.commit();\n\t}", "public void setFavoriteLogList(List<FavoriteLog> favoriteLogList) {\n _favoriteLogList = favoriteLogList;\n }", "public void setFavoriteInRecyclerView(){\n favoriteViewModel = new ViewModelProvider(requireActivity(), AoE2DecencyInjector.getViewModelFactory()).get(FavoriteViewModel.class);\n favoriteViewModel.getFavoritesCivilizations().observe(getViewLifecycleOwner(), new Observer<List<CivilizationFavoriteItemViewModel>>() {\n @Override\n public void onChanged(List<CivilizationFavoriteItemViewModel> civilizationFavoriteItemViewModels) {\n civilizationFavoriteAdapter.setListItemViewModels(civilizationFavoriteItemViewModels);\n }\n });\n\n favoriteViewModel.getCivAdd().observe(getViewLifecycleOwner(), new Observer<Event<String>>() {\n @Override\n public void onChanged(Event<String> stringEvent) {\n //Do nothing\n }\n });\n\n favoriteViewModel.getCivRem().observe(getViewLifecycleOwner(), new Observer<Event<String>>() {\n @Override\n public void onChanged(Event<String> stringEvent) {\n //Do nothing\n }\n });\n }", "private void addChannelToFavorites(String channel) {\r\n channel = prepareChannel(channel);\r\n if (channel != null) {\r\n settings.setAdd(FAVORITES_SETTING, channel);\r\n }\r\n }", "public void setFavorTokens(int flavorTokens){\n\n this.favorTokens=flavorTokens;\n\n }" ]
[ "0.72974086", "0.72373086", "0.7211558", "0.71971625", "0.7165323", "0.7109988", "0.7062111", "0.7020522", "0.6955856", "0.6820921", "0.67762333", "0.6694127", "0.66865104", "0.6615385", "0.66126037", "0.6567272", "0.6536042", "0.64091444", "0.63198096", "0.63198096", "0.630912", "0.6223122", "0.6213822", "0.6199773", "0.6169345", "0.61298364", "0.60566545", "0.60478914", "0.60237753", "0.5915519", "0.59145653", "0.59132993", "0.5912759", "0.59081674", "0.58878267", "0.58790535", "0.5860164", "0.5855063", "0.5849207", "0.58408785", "0.58381236", "0.58136684", "0.58039033", "0.57817864", "0.57674754", "0.5752411", "0.57335246", "0.57323706", "0.5683902", "0.568386", "0.5660005", "0.56213427", "0.5581496", "0.5577368", "0.5563732", "0.556303", "0.55617076", "0.5552177", "0.5545801", "0.55402356", "0.5523711", "0.5523104", "0.5521777", "0.55190355", "0.551871", "0.5499872", "0.5499604", "0.54848534", "0.54755336", "0.54646707", "0.5457812", "0.545205", "0.5426794", "0.5412445", "0.54062265", "0.5401826", "0.54006267", "0.54002255", "0.5381141", "0.5373634", "0.5367265", "0.5362625", "0.5361713", "0.53593767", "0.535055", "0.53471196", "0.53014857", "0.5283129", "0.5269227", "0.5268849", "0.5259051", "0.52561057", "0.52559096", "0.5243392", "0.5240681", "0.5237814", "0.5235174", "0.5227713", "0.5214081", "0.52135795" ]
0.7289947
1
Gets a cast list for the movie.
public ArrayList<Cast> getCastList() { return castList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Cast> getAllCast(long movieId) {\n SQLiteDatabase database = this.getWritableDatabase();\n List<Cast> castList = new ArrayList<>();\n String query = \"SELECT * FROM \" +\n CastEntry.TABLE_NAME + \" WHERE \" + CastEntry.COLUMN_MOVIE_ID + \" = \" + movieId;\n Cursor cursor = database.rawQuery(query, null);\n\n if (cursor.moveToFirst()) {\n do {\n Cast cast = getCastFromCursor(cursor);\n castList.add(cast);\n } while (cursor.moveToNext());\n }\n database.close();\n\n return castList;\n }", "public List<String> getCast(String t)\n\t{\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\treturn temp_movie.getCast();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public List<Cast> getcast() {\n\t\treturn this.cast;\n\t}", "public List<String> getMovies(String n)\n\t{\n\t\tList<String> movies_of_the_actor = new ArrayList<String>();\n\t\t//look through the movie list and check if actor n is present\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.getCast().contains(n))\n\t\t\t//if yes add the movie title to the list\n\t\t\t{\n\t\t\t\tmovies_of_the_actor.add(temp_movie.getTitle());\n\t\t\t}\t\t\n\t\t}\t\t\n\t\t//return the list\n\t\treturn movies_of_the_actor;\n\t}", "@Override\n public Observable<CastResponse> getCast(int movie_id, String clientId) {\n return service.getCastList(movie_id, clientId);\n }", "public ArrayList<String> getCast() {\n\t\treturn cast;\n\t}", "public static ArrayList<Movie> getMoviesList(){\n\t\treturn movieInfo;\n\t}", "public static ArrayList<Movie> getMovieList() {\n\t\treturn movieList;\n\t}", "public List<Movie> getMovies();", "public ArrayList<String> getMovies() {\n ArrayList<String> movies = new ArrayList<String>();\n\n try {\n // Prepare a new SQL Query & Set a timeout\n Statement statement = connection.createStatement();\n statement.setQueryTimeout(30);\n\n // The Query\n String query = \"SELECT *\" + \"\\n\" +\n \"FROM member\";\n\n // Get Result\n ResultSet results = statement.executeQuery(query);\n\n // Process all of the results\n // The \"results\" variable is similar to an array\n // We can iterate through all of the database query results\n while (results.next()) {\n // We can lookup a column of the a single record in the\n // result using the column name\n // BUT, we must be careful of the column type!\n // int id = results.getInt(\"mvnumb\");\n String movieName = results.getString(\"email\");\n // int year = results.getInt(\"yrmde\");\n // String type = results.getString(\"mvtype\");\n\n // For now we will just store the movieName and ignore the id\n movies.add(movieName);\n // members.add();\n }\n\n // Close the statement because we are done with it\n statement.close();\n } catch (SQLException e) {\n // If there is an error, lets just print the error\n System.err.println(e.getMessage());\n }\n\n // Finally we return all of the movies\n return movies;\n }", "public List<String> getMovieList(){\n Set<String> movieList= new HashSet<String>();\n List<MovieListing> showtimes= ListingManager.getShowtimes();\n for(int i=0;i<history.size();i++){\n CustomerTransaction curr= history.get(i);\n for(int j=0;j<showtimes.size(); j++){\n MovieListing show = showtimes.get(j);\n if (show.sameListing(curr.getListingID())){\n movieList.add(show.getTitle());\n\n }\n }\n }\n return new ArrayList<>(movieList);\n }", "List<Movie> getMovie(String movieId);", "public List<Movie> getMovies(){\r\n if(person == null){\r\n return new ArrayList();\r\n }\r\n \r\n return new ArrayList(person.getMovies().values());\r\n }", "public ArrayList<String> getMovies(){\n\t\tArrayList<String> movies = new ArrayList<String>();\n\t\tString sql = \"SELECT * FROM movies\";\n\t\tPreparedStatement ps = null;\n\t\ttry {\n\t\t\tps = conn.prepareStatement(sql);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tmovies.add(rs.getString(\"name\"));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tps.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn movies;\t\n\t}", "public MediaList getMediaList() {\n \n MediaList mediaList = mediaPlayerFactory.newMediaList();\n for (int i = 0; i < this.moviesByGenre.size(); i++) {\n mediaList.addMedia(this.moviesByGenre.get(i).path, \n formatRtspStream(this.genre),\n \":no-sout-rtp-sap\",\n \":no-sout-standard-sap\",\n \":sout-all\",\n \":sout-keep\",\n \":ttl=128\");\n }\n\n return mediaList;\n }", "public List<Movie> getAllMovies() {\n SQLiteDatabase database = this.getWritableDatabase();\n List<Movie> movieList = new ArrayList<>();\n String selectQuery = \" SELECT * FROM \" + MoviesEntry.TABLE_NAME;\n Cursor cursor = database.rawQuery(selectQuery, null);\n\n if (cursor.moveToFirst()) {\n do {\n Movie movie = getMovieFromCursor(cursor);\n movieList.add(movie);\n } while (cursor.moveToNext());\n }\n database.close();\n\n return movieList;\n }", "public static ArrayList<String> getOpeningMovies() throws IOException {\n\t\tString sURL = \"http://api.rottentomatoes.com/api/public/v1.0/lists/movies/opening.json?apikey=\" + API_KEY; //just a string\n\n\t\t// Connect to the URL using java's native library\n\t\tURL url = new URL(sURL);\n\t\tHttpURLConnection request = (HttpURLConnection) url.openConnection();\n\t\trequest.connect();\n\n\t\t// Convert to a JSON object to print data\n\t\tJsonParser jp = new JsonParser(); //from gson\n\t\tJsonElement root = jp.parse(new InputStreamReader((InputStream) request.getContent())); //Convert the input stream to a json element\n\t\tJsonObject rootobj = root.getAsJsonObject(); //May be an array, may be an object. \n\t\tJsonArray arr = rootobj.get(\"movies\").getAsJsonArray();\n\t\tArrayList<String> moviesList = new ArrayList<String>();\n\t\tfor (JsonElement movie : arr) {\n\t\t\tString id = movie.getAsJsonObject().get(\"id\").getAsString();\n\t\t\tString title = movie.getAsJsonObject().get(\"title\").getAsString();\n\t\t\tmoviesList.add(id);\n\t\t\tmovieMap.put(id, title);\n\t\t}\n\n\t\treturn moviesList;\n\t}", "java.util.List<com.rpg.framework.database.Protocol.Monster> \n getMonstersList();", "java.util.List<com.rpg.framework.database.Protocol.Monster> \n getMonstersList();", "public ArrayList<Movie> getMovieList() {\n\t\treturn movieList;\n\t}", "public List<Movie> getMovie(String name){\n return _movieRepo.getMovie(name);\n }", "public ArrayList<Film> getFilms(){\r\n\t\treturn (ArrayList<Film>)this.cinema_film_list.clone();\r\n\t}", "public List<Movie> getMovies() {\n return movies;\n }", "private List<MovieDetails> movieList() {\n List<MovieDetails> movieDetailsList = new ArrayList<>();\n movieDetailsList.add(new MovieDetails(1, \"Movie One\", \"Movie One Description\"));\n movieDetailsList.add(new MovieDetails(2, \"Movie Two\", \"Movie Two Description\"));\n movieDetailsList.add(new MovieDetails(2, \"Movie Two - 1 \", \"Movie Two Description - 1 \"));\n\n return movieDetailsList;\n }", "public List<Movie> theaters() {\n String url = \"http://api.rottentomatoes.com/api/public/v1.0/lists/movies/in_theaters.json?\"\n + \"apikey=yedukp76ffytfuy24zsqk7f5\";\n apicall(url);\n\n Gson gson = new Gson();\n MovieResponse response = gson.fromJson(data, MovieResponse.class);\n List<Movie> movies = response.getMovies();\n movieData = movies;\n System.out.println(url);\n return movieData;\n }", "@Override\n\tpublic List<Object> getMovie(JSONObject param) {\n\t\tString type = StringUtil.ToString(param.getString(\"type\"));\n\t\tString tip = StringUtil.ToString(param.getString(\"tip\"));\n\t\tint number = Integer.parseInt(param.getString(\"number\"));\n\t\t\n\t\tMap<String, Object> message = new HashMap<String, Object>();\n\t\tList<Object> result = new ArrayList<Object>();\n\t\t\n\t\tmessage.put(\"recommand\", type);\n\t\tmessage.put(\"number\", number);\n\t\tif(!tip.equals(\"\")){\n\t\t System.out.println(tip);\n\t\t\tmessage.put(\"tip\", tip);\n\t\t}\n\t\t\n\t\tList<Object> movie = (List<Object>) this.queryForList(\"Movie.selectByCondition\",message);\n\t\t\n\t\treturn movie;\n\t}", "public void setCastList(ArrayList<Cast> castList) {\n this.castList = castList;\n }", "@Override\n\tpublic List<MovieBean> listOfMovies() {\n\n\t\treturn dao.listOfMovies();\n\t}", "public ArrayList<Movie> getMoviesByDirector(String director){\n String query = \"SELECT id, title, year, rtAudienceScore, rtPictureURL, \"\n + \"imdbPictureURL FROM movies, movie_directors \"\n + \"WHERE id=movieID AND directorName LIKE '%\" + director + \"%' \"\n + \"GROUP BY title \"\n + \"ORDER BY year, title\";\n ResultSet rs = null;\n ArrayList<Movie> movieList = new ArrayList<Movie>();\n try{\n con = ConnectionFactory.getConnection();\n stmt = con.createStatement();\n rs = stmt.executeQuery(query);\n while(rs.next()){\n int id = rs.getInt(\"id\");\n String movie_title = rs.getString(\"title\").trim();\n int year = rs.getInt(\"year\");\n int rtAudienceScore = rs.getInt(\"rtAudienceScore\");\n String rtPictureURL = rs.getString(\"rtPictureURL\").trim();\n String imdbPictureURL = rs.getString(\"imdbPictureURL\").trim();\n movieList.add(new Movie(id, movie_title,year,imdbPictureURL,\n rtPictureURL,rtAudienceScore));\n }\n con.close();\n stmt.close();\n rs.close();\n }\n catch(SQLException e){\n e.printStackTrace();\n }\n return movieList;\n }", "@Override\n public PgCast getCast(final String name) {\n return casts.get(name);\n }", "@GetMapping(\"/\")\n\tpublic List<Movie> getListMovie(){\n\t\tList<Movie> list = repo.findAll();\n\t\t\n\t\treturn list;\n\t}", "public ArrayList<Movie> getMovies() {\n return movies;\n }", "public static ArrayList<MovieInfoObject> getMoviesToDisplay() {\n return mMovies;\n }", "private static void listMovies(){\n\n\t\ttry{\n\t\t\tURL url = new URL(\"http://localhost:8080/listMovies\");\n\t\t\tString rawJSONList = getHTTPResponse(url);\n\t\t\tJSONArray JSONList = new JSONArray(rawJSONList);\n\t\t\tStringBuilder list = new StringBuilder();\n\t\t\t\n\t\t\tfor (int i=0 ; i<JSONList.length() ; i++){\n\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\tJSONObject temp = JSONList.getJSONObject(i);\n\t\t\t\tsb.append(temp.getInt(\"id\"));\n\t\t\t\tsb.append(\". \");\n\t\t\t\tsb.append(temp.getString(\"name\"));\n\t\t\t\tsb.append(\"\\n\");\n\t\t\t\t\n\t\t\t\tlist.append(sb.toString());\n\t\t\t}\n\t\t\tSystem.out.println(list.toString());\n\t\t}catch(Exception e){System.out.println(\"Error - wrong input or service down\");}\n\t\t\n\t}", "@Override\n\tpublic List<ShowTime> getShowTimes() {\n\t\treturn moviesListed;\n\t}", "public ArrayList<String> getMoviesByType(String movieType) {\n ArrayList<String> movies = new ArrayList<String>();\n\n // Setup the variable for the JDBC connection\n //Connection connection = null;\n\n try {\n // Prepare a new SQL Query & Set a timeout\n Statement statement = connection.createStatement();\n statement.setQueryTimeout(30);\n\n // The Query\n String query = \"SELECT *\" + \"\\n\" +\n \"FROM movie\" + \"\\n\" +\n \"WHERE LOWER(mvtype) = LOWER('\" + movieType + \"')\";\n System.out.println(query);\n\n // Get Result\n ResultSet results = statement.executeQuery(query);\n\n // Process all of the results\n while (results.next()) {\n String movieName = results.getString(\"mvtitle\");\n movies.add(movieName);\n }\n\n // Close the statement because we are done with it\n statement.close();\n } catch (SQLException e) {\n // If there is an error, lets just pring the error\n System.err.println(e.getMessage());\n }\n\n // Finally we return all of the movies\n return movies;\n }", "public ArrayList<MovieItem> getMovieList(int movieType){\n //save movie type\n mMovieType = movieType;\n\n //check movie type being requested\n if(movieType == PosterHelper.NAME_ID_FAVORITE){\n //mark favorite movie list has changed as true\n mFavoriteChanged = true;\n\n //if favorite, return list of favorite movies\n return getFavoriteMovies();\n }\n else{\n //if any other movie type, request list of movies\n return requestMovieList(movieType);\n }\n }", "public List<Movie> getMovieData() {\n return movieData;\n }", "List<Movie> getAllMovies(String name, String director, String movieId);", "public List<Movie> getMovie_Actor(final int Actor_id) {\n List<Movie> actor_mov = new ArrayList<Movie>();\n if (actors_movies.size()!=NULL) {\n actor_mov = actors_movies.entrySet().stream().filter(x->x.getValue().getId()==Actor_id).map(x -> x.getKey()).collect(Collectors.toList());\n System.out.println( actor_mov);\n System.out.println(\"LENGTH:\" + actor_mov.size());\n\n }else{\n System.out.println(\"Tiene que dar valor al ID para buscar por ID\");\n\n }\n return actor_mov;\n }", "private Movie getMovie() {\n Gson gson = new Gson();\n return gson.fromJson(result, Movie.class);\n }", "public ArrayList<CastMember> getActors() \n\t{\n\t\treturn peopleAct;\n\t}", "public List<Movie> dVD() {\n String url = \"http://api.rottentomatoes.com/api/public/v1.0/lists/dvds/new_releases.json?\"\n + \"apikey=yedukp76ffytfuy24zsqk7f5\";\n apicall(url);\n Gson gson = new Gson();\n MovieResponse response = gson.fromJson(data, MovieResponse.class);\n List<Movie> movies = response.getMovies();\n movieData = movies;\n System.out.println(url);\n return movieData;\n }", "@Override\n\tpublic List<Movie> findAllMovie() {\n\t\treturn repository.findAllMovie();\n\t}", "public ArrayList<Movie> getMoviesByActor(String actor){\n String query = \"SELECT id, title, year, rtAudienceScore, rtPictureURL, \"\n + \"imdbPictureURL FROM movies, movie_actors \"\n + \"WHERE id=movieID AND actorName LIKE '%\" + actor + \"%' \"\n + \"GROUP BY title \"\n + \"ORDER BY year, title\";\n ResultSet rs = null;\n ArrayList<Movie> movieList = new ArrayList<Movie>();\n try{\n con = ConnectionFactory.getConnection();\n stmt = con.createStatement();\n rs = stmt.executeQuery(query);\n while(rs.next()){\n int id = rs.getInt(\"id\");\n String movie_title = rs.getString(\"title\").trim();\n int year = rs.getInt(\"year\");\n int rtAudienceScore = rs.getInt(\"rtAudienceScore\");\n String rtPictureURL = rs.getString(\"rtPictureURL\").trim();\n String imdbPictureURL = rs.getString(\"imdbPictureURL\").trim();\n movieList.add(new Movie(id, movie_title,year,imdbPictureURL,\n rtPictureURL,rtAudienceScore));\n }\n con.close();\n stmt.close();\n rs.close();\n }\n catch(SQLException e){\n e.printStackTrace();\n }\n return movieList;\n }", "@Override\n public MovieListing getMovies() {\n // inventory.whatsAvailable()\n // inventory.whatIsUnavailable();\n return movieRepo.getMovies();\n }", "public void movieDetailes (Movie movie) throws IOException, JSONException{\n\t\t\n\t MovieImages poster= movie.getImages(movie.getID());\n\t System.out.println(poster.posters);\n\t \n\t Set<MoviePoster> temp = new HashSet<MoviePoster>();\n\t for(MoviePoster a: poster.posters) {\n\t \t \n\t \t posterurl = \"\";\n\t \t largerposterurl = \"\";\n\t \t if(a.getSmallestImage() != null){\n\t \t\t posterurl = a.getSmallestImage().toString();\n\t \t }\n\t \t if(a.getImage(Size.MID) != null){\n\t \t\t largerposterurl = a.getImage(Size.MID).toString();\n\t \t }\n\t \t //System.out.println(a.getSmallestImage());\n\t \t break;\n\t }\n\n\t System.out.println(\"Cast:\");\n\t // Get the full decsription of the movie.\n\t Movie moviedetail = Movie.getInfo(movie.getID());\n\t if(moviedetail != null){\n\t \tmovieName = moviedetail.getOriginalName();\n\t\t overview = moviedetail.getOverview();\n\t\t if(moviedetail.getTrailer() != null){\n\t\t \ttrailerURL = moviedetail.getTrailer().toString();\n\t\t }\n\t\t if(moviedetail.getReleasedDate() != null){\n\t\t \treleaseDate = moviedetail.getReleasedDate().toString();\n\t\t }\n\t\t rating = moviedetail.getRating();\n\t\t cast = \"\\n\\nCast: \\n\";\n\t\t for (CastInfo moviecast : moviedetail.getCast()) {\n\t\t\t System.out.println(\" \" + moviecast.getName() + \" as \"\n\t\t\t + moviecast.getCharacterName()\t);\n\t\t\t cast = cast + \" \" + moviecast.getName() + \"\\n\";\n\t\t\t }\n\t\t \n\t\t ID = moviedetail.getID();\n\t }\n\t \n\t}", "@Override\n public Array<Movie> toArray() {return (Array<Movie>)this.movies;}", "void addCastToFilm() throws RemoteException;", "@Override\n\tpublic List<Movie> findByDirector(String name) {\n\t\treturn null;\n\t}", "public Map getCastMap() {\n return castMap;\n }", "public ArrayList<MovieUrl> query(){\n ArrayList<MovieUrl> arrayList = new ArrayList<MovieUrl>();\n Cursor cursor = database.query(DATABASE_TABLE, null, null, null, null, null, null);\n cursor.moveToFirst();\n MovieUrl movieUrl;\n if (cursor.getCount() > 0){\n do {\n movieUrl = new MovieUrl();\n movieUrl.setId(cursor.getInt(cursor.getColumnIndexOrThrow(_ID)));\n movieUrl.setTitleMovie(cursor.getString(cursor.getColumnIndexOrThrow(DbMediaContract.VideoColumns.TITLE_VIDEO)));\n movieUrl.setUrlMovie(cursor.getString(cursor.getColumnIndexOrThrow(DbMediaContract.VideoColumns.URL_VIDEO)));\n\n arrayList.add(movieUrl);\n cursor.moveToNext();\n } while (!cursor.isAfterLast());\n }\n cursor.close();\n return arrayList;\n }", "public static List<String> getFilms(String acteur) {\n\t\tString movie = \"\";\n\t\tList<String> movies_list = new ArrayList<String>();\n\t\tString string_query = \"SELECT $title WHERE {\\n $film rdf:type dbo:Film;\\n\" + \n \" foaf:name $title;\\n dbo:starring $acteur.\\n\" + \n \"$acteur foaf:name \\\"ACTOR_NAME\\\"@en\\n}\".replaceAll(\"ACTOR_NAME\",acteur);\n\t\t\n\n ParameterizedSparqlString qs = new ParameterizedSparqlString(PREFIX +string_query);\n QueryExecution exec = QueryExecutionFactory.sparqlService(SERVICE, qs.asQuery());\n ResultSet results = exec.execSelect();\n \n while (results.hasNext()) {\n \tQuerySolution solution = results.nextSolution();\n \tmovie = solution.getLiteral(\"?title\").toString().replace(\"@en\", \"\");\n \tmovies_list.add(movie);\n }\n\t\t\n\t\treturn movies_list;\n\t}", "public ObservableList<Movie> getFilmData() {\r\n return ser.movieData;\r\n }", "private ArrayList<MovieItem> requestMovieList(int movieType){\n\n //create array list buffer\n ArrayList<MovieItem> movies = new ArrayList<>();\n\n //check if the movie list type needs to be refreshed\n if(mRefreshStaff.needToRefresh(movieType)){\n //need to refresh movie list, make an API call to TheMovieDB API\n mMoviesButler.requestMovies(movieType);\n\n //send toast message to user\n Toast.makeText(mActivityContext, getString(R.string.str_api_call),\n Toast.LENGTH_SHORT).show();\n }\n else{\n //do NOT need to refresh list, check if movie list is in buffer\n movies = mMovieStaff.getMovies(movieType);\n\n //check size of list from buffer\n if (movies.size() == 0) {\n //list is zero, retrieve movie list from database\n mMovieValet.requestMovies(movieType);\n\n //send toast message to user\n Toast.makeText(mActivityContext, getString(R.string.str_retrieve_from_db),\n Toast.LENGTH_SHORT).show();\n }\n }\n\n //return poster items\n return movies;\n\n }", "public void setCast(ArrayList<String> cast) {\n\t\tthis.cast = cast;\n\t}", "public List<Rating> findRatingByMovie(String movieID);", "private static ArrayList<String> getMovies(String filename) throws IOException {\n\t\tBufferedReader filereader = new BufferedReader(new FileReader(filename));\n\t\tArrayList<String> lines = new ArrayList<String>();\n\t\tString line;\n\t\twhile ((line = filereader.readLine()) != null) {\n\t\t\tlines.add(line);\n\t\t}\n\t\t\n\t\tfilereader.close();\n\t\treturn lines;\n\t}", "ArrayList<Actor> getActors();", "public List<CatMovie> getAllCatMovies() throws DalException\n {\n ArrayList<CatMovie> allCatMovies = new ArrayList<>();\n // Attempts to connect to the database.\n try ( Connection con = dbCon.getConnection())\n {\n // SQL code. \n String sql = \"SELECT * FROM CatMovie;\";\n // Create statement.\n Statement statement = con.createStatement();\n // Attempts to execute the statement.\n ResultSet rs = statement.executeQuery(sql);\n while (rs.next())\n {\n // Add all to a list\n CatMovie catMovie = new CatMovie();\n catMovie.setCategoryId(rs.getInt(\"categoryId\"));\n catMovie.setMovieId(rs.getInt(\"movieId\"));\n\n allCatMovies.add(catMovie);\n }\n //Return\n return allCatMovies;\n\n } catch (SQLException ex)\n {\n Logger.getLogger(CatMovieDBDAO.class\n .getName()).log(Level.SEVERE, null, ex);\n throw new DalException(\"Can´t do that\");\n }\n }", "private void loadMovies() {\n try {\n SharedPreferences prefs = getActivity().getSharedPreferences(\n PREFS_NAME, 0);\n if (prefs.contains(SP_FEED)) {\n\n JSONObject jsonObject = new JSONObject(prefs.getString(SP_FEED,\n \"\"));\n\n JSONArray jsonMovieArray;\n jsonMovieArray = (JSONArray) ((JSONObject) jsonObject\n .get(\"feed\")).get(\"entry\");\n\n if (jsonMovieArray != null) {\n int len = jsonMovieArray.length();\n for (int i = 0; i < len; i++) {\n JSONObject jsonMovie = (JSONObject) jsonMovieArray\n .get(i);\n mList.add(new Movie(jsonMovie));\n }\n }\n }\n\n } catch (JSONException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n // Update adapter\n mArrayAdapter.notifyDataSetChanged();\n }", "public List<PodcastEntity> getLegacyPodcasts();", "@Override\n public List<Movie> getAllMovie() {\n return movieRepository.findAll();}", "public Cast getCast(int index) {\n\t\tif(this.cast != null && index < this.cast.size())\n\t\t\treturn this.cast.get(index);\n\t\treturn null;\n\t}", "@GetMapping\n\tpublic ResponseEntity<List<Movie>> fetchAllMovies(){\n\t\treturn new ResponseEntity<List<Movie>>(movieService.listAllMovies(), HttpStatus.OK);\n\t}", "public void setcast(List<Cast> v) {\n\t\tthis.cast = new ArrayList<Cast>(v);\n\t}", "public List<Movie> search() {\n keyword = URLEncoder.encode(keyword);\n String url = \"http://api.rottentomatoes.com/api/public/v1.0/movies.json?apikey=yedukp76ffytfuy24zsqk7f5&q=\"\n + keyword + \"&page_limit=20\";\n apicall(url);\n System.out.println(url);\n System.out.println(data);\n GsonBuilder builder = new GsonBuilder();\n Gson gson = builder.create();\n MovieResponse response = gson.fromJson(data, MovieResponse.class);\n List<Movie> movies = response.getMovies();\n movieData = movies;\n return movieData;\n }", "public static ArrayList<MovieList> getMovieListsBySearch(String accessToken, String term) {\n final ArrayList<BasicNameValuePair> params = new ArrayList<BasicNameValuePair>();\n params.add(new BasicNameValuePair(PARAM_TERM, term));\n try {\n\n Log.i(Constants.TAG, \"MOVIES URI: \" + MOVIES_SEARCH_LISTS_URI);\n JsonObject moviesJson = getWebService(params, MOVIES_SEARCH_LISTS_URI, accessToken).getAsJsonObject();\n Log.i(Constants.TAG, \"MOVIES RESULT: \" + moviesJson.toString());\n if (moviesJson != null) {\n Gson gson = new GsonBuilder()\n .setDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\")\n .create();\n\n ArrayList<MovieList> movieList = gson.fromJson(\n moviesJson.get(\"lists\"),\n new TypeToken<ArrayList<MovieList>>() {\n }.getType());\n return movieList;\n } else {\n return null;\n } // end if-else\n } catch (APICallException e) {\n Log.e(Constants.TAG, \"HTTP ERROR when searching movies - STATUS:\" + e.getMessage(), e);\n return null;\n } catch (IOException e) {\n Log.e(Constants.TAG, \"IOException when searching movies\", e);\n return null;\n } // end try-catch\n }", "@Override\n\tpublic List<Mood> moodList() {\n\t\tMoodDAO moodDAO = new MoodDAOimp();\n\t\treturn moodDAO.showMoods();\n\t}", "public static List<List<String>> getFilmography(String actorID) throws IOException{\n\t\t\n\t\tList<List<String>> filmography = new ArrayList<List<String>>();\n\t\t\n\t\tURL url = new URL(\"https://api.themoviedb.org/3/person/\" + actorID + \"/movie_credits?api_key=cc10b91ab6be4842679242b80c13bb31&language=en-US\");\n\t\tHttpURLConnection con = (HttpURLConnection) url.openConnection();\n con.setDoOutput(true);\n con.setRequestMethod(\"GET\");\n con.setRequestProperty(\"Content-Type\", \"application/json\");\n\n BufferedReader br = new BufferedReader(new InputStreamReader((con.getInputStream())));\n\n String filmResults = br.readLine(); //the raw results of all movies listed for that actor\n \n String beg = \"\\\"title\\\":\";\n String end = \"}\";\n String x = Pattern.quote(beg) + \"(.*?)\" + Pattern.quote(end); //returns just the titles in quotes\n //from the raw results\n String begChar = \",\\\"character\\\":\";\n String endChar = \",\\\"credit_id\";\n String xChar = Pattern.quote(begChar) + \"(.*?)\" + Pattern.quote(endChar);//returns character played\n \n String begJob = \",\\\"job\\\":\";\n String endJob = \",\\\"original_title\";\n String xJob = Pattern.quote(begJob) + \"(.*?)\" + Pattern.quote(endJob);//returns job title on film\n \n String begYR = \"release_date\\\":\";\n String endYR = \",\\\"title\";\n String xYR = Pattern.quote(begYR) + \"(.*?)\" + Pattern.quote(endYR);//returns just the release yrs\n //from the raw results\n String begID = \"\\\"id\\\":\";\n String endID = \",\";//\\\"original_title\\\":\";\n String xID = Pattern.quote(begID) + \"(.*?)\" + Pattern.quote(endID); //returns just the movie ID#s \n //from the raw results\n \n Pattern patternTitle = Pattern.compile(x);\n Pattern patternID = Pattern.compile(xID);\n Pattern patternYR = Pattern.compile(xYR);\n Pattern patternChar = Pattern.compile(xChar);\n Pattern patternJob = Pattern.compile(xJob);\n \n Matcher matcher = patternTitle.matcher(filmResults);\n Matcher matcherID = patternID.matcher(filmResults);\n Matcher matcherYR = patternYR.matcher(filmResults);\n Matcher matcherChar = patternChar.matcher(filmResults);\n Matcher matcherJob = patternJob.matcher(filmResults);\n \n List<String> filmArray = new ArrayList<String>();\n List<String> idArray = new ArrayList<String>(); \n List<String> yrArray = new ArrayList<String>(); \n List<String> charArray = new ArrayList<String>(); \n \n \n while (matcher.find()) { \t \n \tString titlesFound = matcher.group(1);\n \tfilmArray.add(titlesFound);\n }\n while(matcherID.find()){\t\n \tString IDsFound = matcherID.group(1);\n \tidArray.add(IDsFound);\n }\n while(matcherYR.find()){\n \tString yrsFound = matcherYR.group(1);\n \tyrArray.add(yrsFound);\t\n }\n while(matcherChar.find()){ \n \tString charsFound = matcherChar.group(1); //character names and job titles\n \tString chars2 = charsFound.replace(\"\\\\\", \"\"); //both get added to charArray\n \tcharArray.add(chars2);\t //because the raw results always\n } //print out crew credits after all\n while(matcherJob.find()){ // the acting credits\n \tString jobsFound = matcherJob.group(1);\n \tcharArray.add(jobsFound);\t\n }\n \n\t\tfor(int i = 0; i < filmArray.size(); i++){\n\t\t\tif(filmArray.get(i).length() > 40){\n\t\t\t\tString q = filmArray.get(i).substring(0, 30); \n\t\t\t\tfilmArray.set(i, q);\n\t\t\t}\n\t\t\tif(charArray.get(i).length() > 40){\n\t\t\t\tString z = charArray.get(i).substring(0, 30); \n\t\t\t\tcharArray.set(i, z);\n\t\t\t}\n\t\t}\n \n String chars = \"\";\n String yrss = \"\";\n String film = \"\";\n String ids = \"\";\n for(int i = 0; i < filmArray.size(); i++){\n\n \tString yrs = yrArray.get(i).replace(\"\\\"\", \"0\");\n \tString yrs2 = yrs.replace(\"-\", \"0\");\n\n \tif(yrArray.get(i).equals(\"null\") || yrArray.get(i) == null){\n \t\tyrss = yrArray.get(i) + \";000000000000\";\n \t\tfilm = filmArray.get(i) + \";000000000000\";\n \t\tchars = charArray.get(i) + \";000000000000\";\n \t\tids = idArray.get(i) + \";000000000000\";\n \t} else {\n \t\tyrss = yrArray.get(i) + \";\" + yrs2;\n \t\tfilm = filmArray.get(i) + \";\" + yrs2;\n \t\tchars = charArray.get(i) + \";\" + yrs2;\n \t\tids = idArray.get(i) + \";\" + yrs2;\n \t}\n \t\n \tfilmArray.set(i, film);\n \tcharArray.set(i, chars);\n \tyrArray.set(i, yrss);\n \tidArray.set(i, ids);\n }\n \n Collections.sort(filmArray, Comparator.comparing(s -> s.split(\";\")[1]));\n Collections.sort(charArray, Comparator.comparing(s -> s.split(\";\")[1]));\n Collections.sort(yrArray, Comparator.comparing(s -> s.split(\";\")[1]));\n Collections.sort(idArray, Comparator.comparing(s -> s.split(\";\")[1]));\n \n Collections.reverse(filmArray);\n Collections.reverse(charArray);\n Collections.reverse(yrArray);\n Collections.reverse(idArray);\n \n\t\tfor(int j = 0; j < filmArray.size(); j ++){\n\t\t\tString xx = filmArray.get(j);\n\t\t\tfilmArray.set(j, xx.substring( 0, xx.length() - 13));\n\t\t\tString y = yrArray.get(j);\n\t\t\tyrArray.set(j, y.substring( 0, y.length() - 13));\n\t\t\tString z = charArray.get(j);\n\t\t\tcharArray.set(j, z.substring( 0, z.length() - 13));\n\t\t\tString zz = idArray.get(j);\n\t\t\tidArray.set(j, zz.substring( 0, zz.length() - 13));\n\t\t}\t\n \n filmography.add(filmArray);\n filmography.add(idArray);\n filmography.add(yrArray);\n filmography.add(charArray);\n \n return filmography;\n\t\t\n\t}", "private List<String> getMovieNames() {\n List<String> movieNames = new ArrayList<>();\n for (Movie movie: this.movies) {\n movieNames.add(movie.getName());\n }\n return movieNames;\n }", "@Override\n\tpublic List<Movie> findByActor(String name) {\n\t\treturn null;\n\t}", "public List<MovieDetails> getAllFavoriteMovies() {\n SQLiteDatabase database = this.getWritableDatabase();\n List<MovieDetails> movieDetailses = new ArrayList<>();\n List<Integer> favoritesMovieId = new ArrayList<>();\n String selectQuery = \"SELECT * FROM \" + FavoriteMoviesEntry.TABLE_NAME;\n Cursor cursor = database.rawQuery(selectQuery, null);\n if (cursor.moveToFirst()) {\n do {\n int id = getIdFromCursor(cursor);\n String selectFavoriteMovieQuery = \"SELECT * FROM \" + MoviesDetailsEntry.TABLE_NAME + \"WHERE \" + MoviesDetailsEntry._ID + \"= \" + id;\n Cursor movieCursor = database.rawQuery(selectFavoriteMovieQuery, null);\n if (movieCursor.moveToFirst()) {\n do {\n MovieDetails movieDetails = getMovieDetailsFromCursor(movieCursor);\n movieDetailses.add(movieDetails);\n } while (movieCursor.moveToNext());\n }\n } while (cursor.moveToNext());\n }\n database.close();\n\n return movieDetailses;\n }", "java.util.List<com.rpg.framework.database.Protocol.CharacterAction> \n getActionsList();", "java.util.List<com.rpg.framework.database.Protocol.CharacterAction> \n getActionsList();", "public String[] movieDetails(String movie_name) {\r\n\t\tString[] none = {\"No Movies Found\"};\r\n\t\tString cast_list = \"\";\r\n\t\tString producer =\"\";\r\n\t\tString director =\"\";\r\n\t\tString synopsis =\"\";\r\n\t\tString picture =\"\";\r\n\t\tint rating =-1;\r\n\t\tString currently_showing=\"\";\r\n\t\tString trailer=\"\";\r\n\t\tString query = \"select movie_id as id, cast_list as c, producer as p, director as d, synopsis as s, picture as pic, rating as r, currently_showing as cs, trailer as t from cinema.movie WHERE movie_name=\"+movie_name;\r\n\t\tint movie_id=-1;\r\n\t\ttry{\r\n\t\t\tConnection con = MysqlCon.connect();\r\n\t\t\tStatement st = con.createStatement();\r\n\t\t\tResultSet rs;\r\n\t\t\trs=st.executeQuery(query);\r\n\t\t\tif(rs.next()){\r\n\t\t\t\tmovie_id = rs.getInt(\"id\");\r\n\t\t\t\tcast_list = rs.getString(\"c\");\r\n\t\t\t\tproducer = rs.getString(\"p\");\r\n\t\t\t\tdirector = rs.getString(\"d\");\r\n\t\t\t\tsynopsis = rs.getString(\"s\");\r\n\t\t\t\tpicture = rs.getString(\"pic\");\r\n\t\t\t\trating = rs.getInt(\"r\");\r\n\t\t\t\tcurrently_showing = rs.getString(\"cs\");\r\n\t\t\t\ttrailer = rs.getString(\"t\");\r\n\t\t\t}\t\r\n\t\t\tString [] movie_info = {movie_name, cast_list, producer, director, synopsis, picture, currently_showing, trailer};\r\n\t\t\treturn movie_info;\r\n\r\n\t\t} catch(Exception e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t\treturn none;\r\n\t\t}\r\n\t}", "public List<String> getShows() {\n return json.get(\"shows\") == null ? null : getListString(\"shows\");\n }", "public List<Object[]> getMovieByTheaterId(long ID){\n\t\treturn theMoviewRepository.getMovieByTheateID(ID);\n\t}", "@Override\n\tpublic List<MovieDTO> getNaverList(String jsonString) {\n\t\t\n\t\tJSONParser jParser = new JSONParser();\n\t\t\n\t\ttry {\n\t\t\tJSONObject jObject = (JSONObject) jParser.parse(jsonString);\n\t\t\t\n\t\t\tJSONArray items = (JSONArray) jObject.get(\"items\");\n\t\t\t\n\t\t\tint nSize = items.size();\n\t\t\tList<MovieDTO> mvList = new ArrayList<MovieDTO>();\n\t\t\tfor(int i = 0 ; i < nSize; i++) {\n\t\t\t\tJSONObject item = (JSONObject) items.get(i);\n\t\t\t\t\n\t\t\t\tString title = item.get(\"title\").toString();\n\t\t\t\tString link = item.get(\"link\").toString();\n\t\t\t\tString image = item.get(\"image\").toString();\n\t\t\t\tString subtitle = item.get(\"subtitle\").toString();\n\t\t\t\tString pubDate = item.get(\"pubDate\").toString();\n\t\t\t\tString director = item.get(\"director\").toString();\n\t\t\t\tString actor = item.get(\"actor\").toString();\n\t\t\t\tString userRating = item.get(\"userRating\").toString();\n\t\t\t\t\n\t\t\t\tMovieDTO mvDTO = MovieDTO.builder().title(title).link(link)\n\t\t\t\t\t\t.image(image).subtitle(subtitle)\n\t\t\t\t\t\t.pubDate(pubDate).director(director)\n\t\t\t\t\t\t.actor(actor).userRating(userRating).build();\n\t\t\t\t\n\t\t\t\tmvList.add(mvDTO);\n\t\t\t}\n\t\t\treturn mvList;\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public List<Movie> getMoviesFromCats(Category chosenCat) throws DalException\n {\n\n ArrayList<Movie> categoryMovies = new ArrayList<>();\n // Attempts to connect to the database.\n try ( Connection con = dbCon.getConnection())\n {\n Integer idCat = chosenCat.getId();\n // SQL code. \n String sql = \"SELECT * FROM Movie INNER JOIN CatMovie ON Movie.id = CatMovie.movieId WHERE categoryId=\" + idCat + \";\";\n\n Statement statement = con.createStatement();\n ResultSet rs = statement.executeQuery(sql);\n\n while (rs.next())\n {\n // Add all to a list\n Movie movie = new Movie();\n movie.setId(rs.getInt(\"id\"));\n movie.setName(rs.getString(\"name\"));\n movie.setRating(rs.getDouble(\"rating\"));\n movie.setFilelink(rs.getString(\"filelink\"));\n movie.setLastview(rs.getDate(\"lastview\").toLocalDate());\n movie.setImdbRating(rs.getDouble(\"imdbrating\"));\n categoryMovies.add(movie);\n }\n //Return\n return categoryMovies;\n\n } catch (SQLException ex)\n {\n Logger.getLogger(MovieDBDAO.class\n .getName()).log(Level.SEVERE, null, ex);\n throw new DalException(\"Nope can´t do\");\n }\n\n }", "public static ArrayList<Movie> getArrayListFromJSON(JSONArray lstMovies){\n ArrayList<Movie> lista = null;\n try {\n if(lstMovies!=null && lstMovies.length() > 0 ){\n lista = new ArrayList<Movie>();\n }\n for (int i = 0; i < lstMovies.length(); i++) {\n JSONObject json_data = lstMovies.getJSONObject(i);\n Movie movie = new Movie();\n\n movie.setId(json_data.getInt(ID));\n movie.setTitulo(json_data.getString(TITLE));\n movie.setSinopsis(json_data.getString(OVERVIEW));\n movie.setImage(json_data.getString(POSTER_PATH));\n\n lista.add(movie);\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return lista;\n }", "public List<Category> getCatForMovies(Movie chosenMovie) throws DalException\n {\n ArrayList<Category> allCatForMovies = new ArrayList<>();\n // Attempts to connect to the database.\n try ( Connection con = dbCon.getConnection())\n {\n Integer idMov = chosenMovie.getId();\n // SQL code. \n String sql = \"SELECT * FROM Category INNER JOIN CatMovie ON Category.id = CatMovie.categoryId WHERE movieId='\" + idMov + \"';\";\n // Create statement.\n Statement statement = con.createStatement();\n // Attempts to execute the statement.\n ResultSet rs = statement.executeQuery(sql);\n while (rs.next())\n {\n\n // Add all to a list\n Category category = new Category();\n category.setId(rs.getInt(\"id\"));\n category.setName(rs.getString(\"name\"));\n\n allCatForMovies.add(category);\n }\n //Return\n return allCatForMovies;\n\n } catch (SQLException ex)\n {\n Logger.getLogger(CatMovieDBDAO.class\n .getName()).log(Level.SEVERE, null, ex);\n throw new DalException(\"Can´t do that\");\n }\n }", "public Cursor getMoviesInList(int id) {\n String selection = ColumnMoviesList.ID_LIST + \" = ?\";\n String[] selectionArgs = {Integer.toString(id)};\n String columns[] = new String[]{ColumnMoviesList.ID_MOVIE};\n return getAnyRow(MOVIESLIST_TABLE_NAME, columns, selection, selectionArgs, null, null, null);\n }", "Collection<MoviesTitles> getMoviesTitles();", "@Override\n\tpublic List<Movie> getMovieByRate(Ratings rating) {\n\t\treturn movieRepository.getMovieByRating(rating);\n\t}", "@Override\n\tpublic List<Movie> getAllMovies() {\n\t\treturn movieRepository.getAllMovies();\n\t}", "@RequestMapping(value = \"/films\", //\n\t\t\t\t\tmethod = RequestMethod.GET, //\n\t\t\t\t\tproduces = {MediaType.APPLICATION_JSON_VALUE})\n\t@ResponseBody\n\tpublic List<Film> getFilms() {\n\t\tList<Film> list = filmService.recupererTout();\n\t\treturn list;\n\t}", "public static void listByWatched(){\r\n System.out.println('\\n'+\"List by Watched\");\r\n CompareWatched compareWatched = new CompareWatched();\r\n Collections.sort(movies, compareWatched);\r\n for (Movie watch:movies){\r\n System.out.println('\\n'+\"Times Watched \"+ watch.getTimesWatched()+'\\n'+\"Title: \"+ watch.getName()+'\\n'+\"Rating: \"+ watch.getRating()+'\\n');\r\n }\r\n }", "public MainList getDetailForcast(String date) {\n\t\t\t\n\t\t\tMainList mainLists = new MainList();\n\t\t\tList<Forcast> forcasts = new ArrayList<>();\n\t\t\tList<Forcast> forcastLists = this.mainList.getListItem();\n\t\t\t\n\t\t\tSystem.out.println(\"date>> \"+date);\n\t\t\t\n\t\t\tforcasts = forcastLists.stream().filter(p -> (formatData(p.getDt_txt())).equals(formatData(date))).collect(Collectors.toList());\n\t\t\t\n\t\t\tmainLists.setListItem(forcasts);\n\t\t\tmainLists.setCity(this.mainList.getCity());\n\t\t\t\n\t\t\treturn mainLists;\n\t\t}", "public LiveData<List<Movie>> fetchMovies(String option) {\n return Api.fetchMovies(option);\n }", "@Override\n\tpublic List<Movie> findByDirector(long id) {\n\t\treturn null;\n\t}", "public ResultSet getFullMovieList(){\r\n\t\t\r\n\t\ttry{\r\n\t\t\t//Connect();\r\n\t\t\tStatement dbStatement = conn.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE,\r\n\t\t\t\tResultSet.CONCUR_READ_ONLY );\r\n\t\t\t//DatabaseMetaData m = conn.getMetaData();\r\n\t\t\t//m.getColumns();\r\n\r\n\t\t\treturn dbStatement.executeQuery(\"select movieid, title from movie_title\");\r\n\r\n\t\t}catch( Exception x ){\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t}", "@Override\n\tpublic List<Movie> findByActor(long id) {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic ArrayList<String> allMovies()\r\n\t{\r\n\t\tArrayList<String> sortedMovieTitles = new ArrayList<String>();\r\n\t\t\r\n\t\tsortedMovieTitles = movieTitles;\r\n\t\t\r\n\t\tCollections.sort(movieTitles);\r\n\t\t\r\n\t\treturn sortedMovieTitles;\r\n\t}", "ArrayList<Episode> getEpisodes(){\n\n\n Uri builtUri = Uri.parse(episodesURL)\n .buildUpon()\n .build();\n String url = builtUri.toString();\n\n return doCallEpisode(url);\n\n }", "public Cursor getAllMovies() {\n //Seleccionamos todas las filas de la tabla Movie\n return database.rawQuery(\n \"select * from \" + MOVIE_TABLE_NAME, null);\n }", "public String[] getHabilidadesCasta() {\n\t\treturn habilidadesCasta;\n\t}", "public MainList getSummaryForcast() {\n\t\t\n\t\tMainList mainLists = new MainList();\n\t\tList<Forcast> forcasts = new ArrayList<>();\n\t\tList<Forcast> forcastLists = this.mainList.getListItem();\n\t\t\n\t\tforcasts = forcastLists.stream().filter(p -> this.getFilterDuration(p.getDt_txt(), new Date()) == true).collect(Collectors.toList());\n\t\t\n\t\tmainLists.setListItem(forcasts);\n\t\tmainLists.setCity(this.mainList.getCity());\n\t\t\n\t\treturn mainLists;\n\t}", "public List<TVShow> getAllShows(){\n\tList<TVShow> shows = new ArrayList<>();\n\ttvShowRepo.findAll().forEach(show->shows.add(show));\n\treturn shows;\n}", "public static ArrayList<Movie> getMoviesFromCollectionSearch(String accessToken, String term) {\n final ArrayList<BasicNameValuePair> params = new ArrayList<BasicNameValuePair>();\n if (term != null) {\n params.add(new BasicNameValuePair(PARAM_TERM, term));\n } // end if\n try {\n\n Log.i(Constants.TAG, \"MOVIES URI: \" + MOVIES_SEARCH_COLLECTION_URI);\n JsonObject moviesJson = getWebService(params, MOVIES_SEARCH_COLLECTION_URI, accessToken).getAsJsonObject();\n Log.i(Constants.TAG, \"MOVIES RESULT: \" + moviesJson.toString());\n if (moviesJson != null) {\n Gson gson = new GsonBuilder().setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES)\n .setDateFormat(\"yyyy-MM-dd HH:mm\")\n .create();\n\n ArrayList<Movie> movieList = gson.fromJson(\n moviesJson.get(\"movies\"),\n new TypeToken<ArrayList<Movie>>() {\n }.getType());\n return movieList;\n } else {\n return null;\n } // end if-else\n } catch (APICallException e) {\n Log.e(Constants.TAG, \"HTTP ERROR when searching movies - STATUS:\" + e.getMessage(), e);\n return null;\n } catch (IOException e) {\n Log.e(Constants.TAG, \"IOException when searching movies\", e);\n return null;\n } // end try-catch\n }" ]
[ "0.7507226", "0.71840405", "0.672424", "0.66521317", "0.66074824", "0.6430511", "0.6344747", "0.62984896", "0.6222498", "0.621217", "0.61754924", "0.61713195", "0.6103377", "0.60492265", "0.60261273", "0.6024141", "0.5989067", "0.5851084", "0.58508515", "0.5845684", "0.5809517", "0.5799075", "0.5784745", "0.57636917", "0.5726362", "0.5719541", "0.56955844", "0.5694466", "0.5659601", "0.56318474", "0.562674", "0.56173104", "0.5599504", "0.5587203", "0.5585983", "0.5544145", "0.5530437", "0.55263054", "0.5511173", "0.55025715", "0.5475802", "0.5475277", "0.54732394", "0.5463812", "0.54548025", "0.54278445", "0.54051346", "0.53986824", "0.53674245", "0.53542435", "0.53412974", "0.5320607", "0.53113663", "0.5294044", "0.527962", "0.52742547", "0.52436525", "0.5225494", "0.5219402", "0.52156687", "0.521453", "0.5200854", "0.5197695", "0.5195042", "0.5195032", "0.5189915", "0.5178839", "0.5178221", "0.51759636", "0.51750296", "0.51708794", "0.51549375", "0.5154001", "0.5150147", "0.5150147", "0.51210666", "0.5118195", "0.51048595", "0.5096897", "0.5096536", "0.509606", "0.50920004", "0.5088577", "0.5084387", "0.50822026", "0.5079182", "0.50610733", "0.50513184", "0.5042666", "0.5023304", "0.5023031", "0.50180566", "0.50106704", "0.4998936", "0.49952742", "0.49868715", "0.49867868", "0.4981938", "0.49740037", "0.49617183" ]
0.71638
2
Sets a cast list for the movie.
public void setCastList(ArrayList<Cast> castList) { this.castList = castList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCast(ArrayList<String> cast) {\n\t\tthis.cast = cast;\n\t}", "public void setcast(List<Cast> v) {\n\t\tthis.cast = new ArrayList<Cast>(v);\n\t}", "public void setCast(Cast cast) {\n\t\tthis.cast = cast;\n\t}", "void addCastToFilm() throws RemoteException;", "protected static void setAllMonsters(ArrayList<Monster> listMonsters) {\n allMonsters = listMonsters;\n }", "public void setMovieListings(List<MovieListing> listings) {\n movieListings.clear();\n movieListings = listings;\n notifyDataSetChanged();\n fetchMovieDetails();\n if (MoviesApplication.getApp().isLargeLayout()) {\n selectMovie(0);\n }\n }", "public void addCast(Cast cast) {\n\t\tif(this.cast == null)\n\t\t\tthis.cast = new ArrayList<Cast>();\n\t\tthis.cast.add(cast);\n\t}", "public void setMultimediaList(List<Multimedia> multimediaList) {\n Log.d(\"Lista\",multimediaList.size()+\"\");\n this.multimediaList = multimediaList;\n }", "public ArrayList<Cast> getCastList() {\n return castList;\n }", "void setRaceList(java.lang.String raceList);", "void m6863a(List<Venue> list) {\n this.f5238i = list;\n }", "public void setList(ScheduleInterface<Schedule> scheduleList){\n this.scheduleList = scheduleList;\n }", "@ApiOperation(value = \"Update a movie\", notes = \"Updating an existing movie\")\n @ApiResponses({\n @ApiResponse(code = 200, message = \"Success\", response = MovieDto.class),\n @ApiResponse(code = 400, message = \"Bad request\"),\n @ApiResponse(code = 404, message = \"Not found\")\n })\n @CrossOrigin\n @PutMapping(value = \"/update/{id}/add/cast\", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)\n public ResponseEntity updateMovieAddCast(\n @ApiParam(value = \"A movie id\", required = true)\n @PathVariable(\"id\") Integer id,\n @ApiParam(value = \"A movie\", required = true)\n @Valid @RequestBody List<RoleDto> cast) {\n return new ResponseEntity<>(movieService.updateMovieAddCast(id, cast), HttpStatus.OK);\n }", "public void setCurrentAbilityCast(AbstractAbility abilityCast) {\n this.currentAbilityCast = abilityCast;\n }", "public final void mo99820a(List<MyMediaModel> list) {\n if (C40173d.f104443a.mo99939a(this.f104225o)) {\n this.f104232v.setVisibility(8);\n } else if (C23477d.m77081a((Collection<T>) list)) {\n this.f104232v.setVisibility(8);\n } else {\n int size = list.size();\n this.f104232v.setVisibility(0);\n m128153a(size);\n int currentItem = this.f104236z.getCurrentItem();\n int i = this.f104193C;\n if (currentItem == this.f104222l) {\n i = this.f104194D;\n }\n if (size < i) {\n this.f104232v.setTextColor(getResources().getColor(R.color.a7b));\n this.f104232v.setClickable(false);\n } else {\n this.f104232v.setTextColor(getResources().getColor(R.color.a79));\n this.f104232v.setClickable(true);\n }\n this.f104218h.clear();\n this.f104218h.addAll(list);\n if (C40173d.f104443a.mo99939a(this.f104225o)) {\n this.f104232v.setVisibility(8);\n }\n }\n }", "public void setCardList(ArrayList<DestinationCard> list) {\n destinationCards = list;\n }", "public void setMediaCategoryList(List<String> selectedCategoryList) {\n this.selectedCategoryList = selectedCategoryList;\n ArrayList<Media> list = new ArrayList<>();\n List<Media> mediaList = viewModel.getMediaList();\n\n for (Media media : mediaList) {\n List<String> categories = media.getCategories();\n if (categories.containsAll(selectedCategoryList)) {\n list.add(media);\n }\n }\n if (selectedCategoryList.size() == 0) {\n list.clear();\n list.addAll(mediaList);\n }\n mediaCategoryList.clear();\n mediaCategoryList.addAll(list);\n }", "public void setAdapter(ArrayList<MovieModel> moviesList) {\n this.moviesList = moviesList;\n movieAdapter = new MovieAdapter(getActivity(), R.layout.castdetailscredits_row, this.moviesList);\n listView.setAdapter(movieAdapter);\n }", "public void setRoomList (ArrayList<ItcRoom> roomList)\r\n\t {\r\n\t //this.roomList = roomList;\r\n\t }", "public List<Cast> getcast() {\n\t\treturn this.cast;\n\t}", "public ArrayList<String> getCast() {\n\t\treturn cast;\n\t}", "public void modifyGenres(ArrayList<String> genreList)// --> Bytter ut Genre-arrayen med en ny array over de nye sjangerene for lokalet.\n\t{\n\t\tgenres = genreList;\n\t}", "public void setPeopleAct(ArrayList<CastMember> peopleAct) \n\t{\n\t\tthis.peopleAct = peopleAct;\n\t}", "public void setListMusickstuecke( List<Musikstueck> listMusickstuecke ) {\n\t\tthis.listMusickstuecke = listMusickstuecke ;\n\t}", "@Override\n\tpublic void achete(List<Achat> listachat) {\n\t\tthis.achats = listachat;\n\n\t}", "public void setList(DOCKSList param) {\r\n localListTracker = param != null;\r\n\r\n this.localList = param;\r\n }", "void setTypeUnitSound(List<TypeUnitSound> listText);", "public void mo9493a(List<String> list) {\n this.f1513b = list;\n }", "public void setMovies(List<Movies> mvoies)\n {\n for ( Movies movie: mvoies)\n {\n if (!mMovies.contains(movie))\n {\n mMovies.add(movie);\n moviesRViewAdapter.notifyItemInserted(mMovies.indexOf(movie));\n }\n }\n }", "void setListProperty(Object name, List<Object> list) throws JMSException;", "public void setSongInfoList(ArrayList<SongInfo> list)\n {\n songInfos = list;\n }", "public void setList(java.util.List newAktList) {\n\t\tlist = newAktList;\n\t}", "public void setMedia(List<JRMediaObject> media) {\n mMedia = media;\n }", "private void setPlayList() {\n int[] rawValues = {\n R.raw.bensoundbrazilsamba,\n R.raw.bensoundcountryboy,\n R.raw.bensoundindia,\n R.raw.bensoundlittleplanet,\n R.raw.bensoundpsychedelic,\n R.raw.bensoundrelaxing,\n R.raw.bensoundtheelevatorbossanova\n };\n String[] countryList = {\n \"Brazil\",\n \"USA\",\n \"India\",\n \"Iceland\",\n \"South Korea\",\n \"Indonesia\",\n \"Brazil\"\n };\n String [] descriptions = {\n \"Samba is a Brazilian musical genre and dance style, with its roots in Africa via the West African slave trade religious particularly of Angola and African traditions.\",\n \"Country music is a genre of American popular originated Southern States in the 1920s music that in the United\",\n \"The music of India includes multiple varieties of folk music, pop, and Indian classical music. India's classical music tradition, including Hindustani music and Carnatic, has a history spanning millennia and developed over several eras\",\n \"The music of Iceland includes vibrant folk and pop traditions. Well-known artists from Iceland include medieval music group Voces Thules, alternative rock band The Sugarcubes, singers Björk and Emiliana Torrini, post- rock band Sigur Rós and indie folk/indie pop band Of Monsters and Men\",\n \"The Music of South Korea has evolved over the course of the decades since the end of the Korean War, and has its roots in the music of the Korean people, who have inhabited the Korean peninsula for over a millennium. Contemporary South Korean music can be divided into three different categories: Traditional Korean folk music, popular music, or K- pop, and Western- influenced non-popular music\",\n \"The music of Indonesia demonstrates its cultural diversity, the local musical creativity, as well as subsequent foreign musical influences that shaped contemporary music scenes of Indonesia. Nearly thousands Indonesian having its own cultural and artistic history and character Nearly of islands\",\n \"Samba is a Brazilian musical genre and dance style, with its roots in Africa via the West African slave trade religious particularly of Angola\"\n };\n\n for (int i = 0; i < rawValues.length; i++) {\n this.mPlayList.add(rawValues[i]);\n this.mTrackList.add(new Track(this.getResources().getResourceEntryName(rawValues[i]),\n countryList[i],descriptions[i],rawValues[i]));\n }\n }", "public void setList(List<ListItem> list) {\n this.items = list;\n\n Log.d(\"ITEMs\",items+\"\");\n }", "public void setList(DList2 list1){\r\n list = list1;\r\n }", "public abstract void setList(List<T> items);", "private void setActivityRecordList(UUID dog_id) {\n }", "@ApiOperation(value = \"Update a movie\", notes = \"Updating an existing movie\")\n @ApiResponses({\n @ApiResponse(code = 200, message = \"Success\", response = MovieDto.class),\n @ApiResponse(code = 400, message = \"Bad request\"),\n @ApiResponse(code = 404, message = \"Not found\")\n })\n @CrossOrigin\n @PutMapping(value = \"/update/{id}/remove/cast\", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)\n public ResponseEntity updateMovieRemoveCast(\n @ApiParam(value = \"A movie id\", required = true)\n @PathVariable(\"id\") Integer id,\n @ApiParam(value = \"A cast\", required = true)\n @Valid @RequestBody List<RoleDto> cast) {\n return new ResponseEntity<>(movieService.updateMovieRemoveCast(id, cast), HttpStatus.OK);\n }", "public void setRoles(RoleList list) {\n if (list != null) {\n\n roleList = new RoleList();\n\n for (Iterator<?> roleIter = list.iterator();\n roleIter.hasNext();) {\n Role currRole = (Role)(roleIter.next());\n roleList.add((Role)(currRole.clone()));\n }\n } else {\n roleList = null;\n }\n return;\n }", "public void setAttractionsList(ArrayList attractionsList) {\n this.attractionsList = attractionsList;\n }", "public void setMovieArrayList(MovieClass newMovieObject)\n {\n movieArrayList.add(newMovieObject);\n }", "private void setSpectrumIdsTarget(List<String> spectrumIdsTarget)\r\n\t{\r\n\t\tthis.spectrumIdsTarget = spectrumIdsTarget;\r\n\t}", "public void setWeitereVerwendungszwecke(String[] list) throws RemoteException;", "public static void setList(CustomerList list){\n\t\tUserInterface.list = list;\n\t}", "public void setTypeBoundList(List<Access> list) {\n setChild(list, 2);\n }", "public void setFoods(List<Food> list){\n foodList = list;\n notifyDataSetChanged();\n }", "public void m65917a(List<SearchTrack> list) {\n SpotifyTrackSearchTarget spotifyTrackSearchTarget = (SpotifyTrackSearchTarget) this.f56357a.H();\n if (spotifyTrackSearchTarget != null) {\n spotifyTrackSearchTarget.addTracks(list);\n }\n }", "public void setLecturers(ArrayList value);", "public void setCastTime(float castTime) {\n\t\tthis.castTime = castTime;\n\t}", "public void setArrayList(ArrayList<Chalet> arrayList) {\n this.arrayList.addAll(arrayList);\n notifyDataSetChanged();// to update the sutats\n }", "public void assignAll(Collection<Shape> list, Graph graph) {\r\n\t\tfor (Shape shape : list) {\r\n\t\t\tassignMediaType(shape, graph);\r\n\t\t}\r\n\t}", "void setNilRaceList();", "@JsonSetter(\"media\")\r\n public void setMedia(List<String> media) {\r\n this.media = media;\r\n }", "public void setList(List<Integer> list) {\n this.list = list;\n }", "public void m(List<?> list) {\n\t}", "public void setValue(List<T> convertData) {\n this.data = convertData;\n }", "public void setAdvisors(List<Professor> list) {\r\n advisors = list;\r\n }", "public void setStories(List<IStoryWriter> stories);", "private void watched(boolean w){\n for (Movie temp:\n baseMovieList) {\n if(temp.isWatched() == w)\n movieList.add(temp);\n }\n }", "public void setItems(List<T> value) {\n getElement().setItems(SerDes.mirror(value).cast());\n }", "public void mo9497b(List<String> list) {\n this.f1514c = list;\n }", "public void resetCastling() {\n this.castling = false;\n }", "private void setAdapter(List<MovieList> listMovies) {\n adapter = new CardAdapter(listMovies, this);\n //Adding adapter to recyclerview\n AlphaInAnimationAdapter alphaAdapter = new AlphaInAnimationAdapter(adapter);\n alphaAdapter.setFirstOnly(false);\n recyclerView.setAdapter(alphaAdapter);\n// recyclerView.setAdapter(adapter);\n }", "protected void setMoves(List<Move> moves) {\n this.moves = moves;\n }", "public final void setBannersList(final List<HeroBean> aBannersList) {\r\n this.bannersList = (List<HeroBean>) aBannersList;\r\n }", "public void setMemberTypes(java.util.List memberTypes)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(MEMBERTYPES$2);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(MEMBERTYPES$2);\n }\n target.setListValue(memberTypes);\n }\n }", "private void setListClickedEvent() {\n raceCarList.setOnMouseClicked(new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent event) {\n String raceCarName = raceCarList.getSelectionModel().getSelectedItem();\n RaceCar raceCar = Storage.findRaceCar(raceCarName);\n Storage.setSelectedRaceCar(raceCar);\n clearInputFieldStyle();\n setFields(raceCar);\n setAllFieldsAndSliderDisabled(true);\n setButtonsDisabled(true, false, false);\n ViewHelper.updateCarData();\n }\n });\n }", "@Override\n\tpublic void setArray(ArrayList<Button> list) {\n\t\tsuper.setArray(list);\n\t}", "public final void accept(List<l> list) {\n com.iqoption.core.data.b.c a = this.dlr.dlm;\n kotlin.jvm.internal.h.d(list, \"it\");\n a.setValue(list);\n }", "public void m65918a(List<SearchTrack> list) {\n SpotifyTrackSearchTarget spotifyTrackSearchTarget = (SpotifyTrackSearchTarget) this.f56358a.H();\n if (spotifyTrackSearchTarget != null) {\n this.f56358a.f56363e = true;\n spotifyTrackSearchTarget.addTracks(list);\n this.f56358a.f56361c = this.f56358a.f56361c + 1;\n }\n }", "public void setGenre(ArrayList<String> genre) {\n this.genre = genre;\n }", "public void setRoomList(ArrayList<RoomList> RoomList) {\r\n this.RoomList = RoomList;\r\n }", "public void setDirectors(ArrayList<String> directors) {\n\t\tthis.directors = directors;\n\t}", "public void setList(ArrayList<Song> theSongs) {\n songs1 = theSongs;\n songsNumber = songs1.size();\n }", "@Override\r\n\t\tpublic void dmr_playList(List<String> list) throws RemoteException {\n\r\n\t\t\tif (list == null) {\r\n\t\t\t\tUtils.printLog(TAG, \"current dmr playlist is null\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tmList = new ArrayList<MediaBean>();\r\n\t\t\tfor (String u : list) {\r\n\t\t\t\tString path = u;\r\n\t\t\t\tUtils.printLog(TAG, \"dmr playlist ---\" + path);\r\n\t\t\t\tMediaBean bean = new MediaBean();\r\n\t\t\t\tbean.mPath = path;\r\n\t\t\t\tif (path.startsWith(\"http\")) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tpath = URLDecoder.decode(path, \"utf-8\");\r\n\t\t\t\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tUtils.printLog(TAG, \"URLDecoder path =\" + path);\r\n\t\t\t\t\tbean.mName = Utils.getRealName(path);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbean.mName = Utils.getRealName(path);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tmList.add(bean);\r\n\t\t\t}\r\n\t\t\tif (mList != null && mList.size() > 0) {\r\n\t\t\t\tmCurrIndex = 0;\r\n\t\t\t\tif (mVideoContrl != null) {\r\n\t\t\t\t\tmVideoPlayerHander.sendEmptyMessage(PLAYER_URL);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}", "public void setSongList(ArrayList<Song> songList) {\n\t\tthis.songList = songList;\n\t}", "private void setStreamMediaAddressList(){\n\n if (mCallBack != null){\n mCallBack.onGetServerAddressListCompleted(mServerAddressList);\n }\n }", "public void setList_Base (String List_Base);", "public void setCars(List<Car> cars) {\n\t\tthis.cars = new CopyOnWriteArrayList<Car>(cars);\n\t}", "public void setPacchetti(List<Pacchetto> pacchetti);", "public void setReviewList(List<Review> reviewList) {\n this.reviewList = reviewList;\n notifyDataSetChanged();\n }", "public void setShapeList(List theShapes){\n fShapes=theShapes;\r\n\r\n if (fSemantics!=null)\r\n fSemantics.setShapeList(theShapes);\r\n\r\n setSemanticsForInterpretationBoards();\r\n\r\n listenToAll(fShapes);\r\n\r\n if (fSemantics.interpretationChanged()); //NEW ENSURE UPDATE AFTER FILE OPEN\r\n\r\n }", "public List<String> getCast(String t)\n\t{\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\treturn temp_movie.getCast();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public void setPlaylists(ArrayList<Playlist> p)\n\t{\n\t\tplaylists = p;\n\t}", "public void setListItems(List<String> lit) { mItems = lit; }", "protected void sequence_TypeList(ISerializationContext context, TypeList semanticObject) {\r\n\t\tgenericSequencer.createSequence(context, semanticObject);\r\n\t}", "private void m1088a(List<Integer> list) {\n this.f688c = list;\n }", "public void setActors(String actorsStr) {\n String[] buff = actorsStr.split(COMMA);\r\n for (String actor : buff) {\r\n actors.add(actor.trim());\r\n }\r\n }", "public void mo3894a(List<Map<String, String>> list) {\n this.f772d = list;\n }", "public void setAccept(List<MediaType> acceptableMediaTypes)\r\n/* 82: */ {\r\n/* 83:139 */ set(\"Accept\", MediaType.toString(acceptableMediaTypes));\r\n/* 84: */ }", "public void setSpecimenList(Collection<List<NameValueBean>> specimenList)\r\n\t{\r\n\t\tthis.specimenList = specimenList;\r\n\t}", "private void showMovieList(MovieResponse movieResponse) {\n setToolbarText(R.string.title_activity_list);\n showFavouriteIcon(true);\n buildList(movieResponse);\n }", "public void setAcrs(List<ACR> acrList) {\n this.acrs = acrList;\n }", "public static final void setWhitelist(final WhiteList listType, final String list) {\n setWhitelist(p(), listType, list);\n }", "public void set(Reader reader, ReaderList readerlist, BookList booklist) {\n this.booklist = booklist;\n this.readerlist = readerlist;\n this.reader = reader;\n load();\n\n }", "public void setCards(List<T> cards) {\n\t\tthis.cards = cards;\n\t}", "public final void mo99835a(List<MyMediaModel> list) {\n int i;\n if (C23477d.m77081a((Collection<T>) list)) {\n i = 0;\n } else {\n i = list.size();\n }\n if (MvChoosePhotoActivity.this.f104228r < i) {\n MvChoosePhotoActivity.m128156a(\"choose_upload_content\");\n }\n MvChoosePhotoActivity.this.f104228r = i;\n MvChoosePhotoActivity.this.f104226p = list;\n MvChoosePhotoActivity.this.mo99820a(list);\n }", "public void setListOfTimes(ArrayList<Long> list)\r\n {\r\n //Check if the new list times is empty before setting the new list of times\r\n if(list.isEmpty())\r\n {\r\n //Outputs a warning message \r\n System.out.println(\"WARNING: You cannot assign a empty list of times\");\r\n }\r\n else \r\n {\r\n if(this.listOfTimes.isEmpty())\r\n {\r\n this.listOfTimes.addAll(list);\r\n }\r\n else \r\n {\r\n this.listOfTimes.clear();\r\n this.listOfTimes.addAll(0, list);\r\n }//end if \r\n }//end if\r\n }", "void xsetRaceList(com.unitedtote.schema.totelink.totedatatypes._2008._04.CompressedList raceList);" ]
[ "0.76019174", "0.73811865", "0.61521", "0.58309215", "0.5785213", "0.56133056", "0.55633557", "0.5560448", "0.55529773", "0.55338037", "0.54937744", "0.5454373", "0.5439696", "0.54371834", "0.53628474", "0.53590065", "0.53168267", "0.5305428", "0.5302967", "0.5292335", "0.5288855", "0.5287495", "0.52774316", "0.5276945", "0.5268167", "0.526068", "0.52564996", "0.5227951", "0.5221196", "0.5196133", "0.5175946", "0.5171173", "0.5166065", "0.5156291", "0.51517594", "0.5147438", "0.5142235", "0.511779", "0.5099811", "0.5094774", "0.5088107", "0.5082922", "0.5075046", "0.5049067", "0.5044785", "0.50447154", "0.50323844", "0.50267506", "0.50133467", "0.50074893", "0.50009084", "0.49689415", "0.49668866", "0.49657124", "0.49621755", "0.49587506", "0.49502897", "0.4943095", "0.49347574", "0.49250653", "0.4900661", "0.48930538", "0.48901606", "0.48781988", "0.48610672", "0.4858054", "0.48549792", "0.48450005", "0.48447776", "0.48379415", "0.48363137", "0.4833003", "0.48310524", "0.48302478", "0.48300374", "0.4804671", "0.48039454", "0.48037487", "0.4801949", "0.47978133", "0.4797593", "0.47890908", "0.47864842", "0.47670132", "0.47653666", "0.47563154", "0.4751903", "0.4746868", "0.4745845", "0.47444606", "0.4743187", "0.4736149", "0.4735136", "0.4731604", "0.473019", "0.47298333", "0.4724698", "0.47188076", "0.47172257", "0.47171542" ]
0.7959141
0
Gets the reviews list for the movie.
public ArrayList<Review> getReviewsList() { return reviews; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<String> getReviews() {\n return reviews;\n }", "@Transactional\n\tpublic List<UserReview> getReviewByMovie(Movie movie) {\n\t\treturn userReviewRepopsitory.findByMovie(movie);\n\t}", "public ArrayList<Review> getReviews() {\n\t\treturn reviews;\n\t}", "public GetMovieReviewsResponse getMovieReviews(int movieId) {\n return getMovieReviews(movieId, null, null);\n }", "public Set<Review> getReviews() {\n return reviews;\n }", "@GET(\"/attractions/{attractionId}/reviews\")\n Call<List<Review>> getReviews(\n @Path(\"attractionId\") int attractionId\n );", "public List<Review> getReviews() {\r\n\t\tList<Review> returnReviews = new ArrayList<Review>();\r\n\t\tfor(int i = 0; i < myManuscripts.size(); i++){\r\n\t\t\tif(myManuscripts.get(i).getStatus() != STATUS_DECISION_HAS_NOT_BEEN_MADE) {\r\n\t\t\t\treturnReviews.addAll(myManuscripts.get(i).getReviews());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn returnReviews;\r\n\t}", "public List<Review> getAllReview() \n\t{\n\t\tList<Review> reviews = new ArrayList<Review>();\n\t\treviewRepository.findAll().forEach(review -> reviews.add(review));\n\t\treturn reviews;\n\t}", "@RequestMapping(value=\"reviews\", method=RequestMethod.GET,\n\t\t\t\tproduces=MediaType.APPLICATION_JSON_VALUE)\n\t\t@ResponseBody\n\t\tpublic ResponseEntity<List<ReviewBean>> getReviews(){\n\t\t\t//Call on session to get current user's reviews\n\t\t\t//For now it just grabs hardcoded user's reviews\n\t\t\treturn new ResponseEntity<List<ReviewBean>>(this.dao.getAllReviewsByUserId(72), HttpStatus.OK);\n\t\t}", "@Override\r\n\tpublic List<ReviewVO> reviewListAll() {\n\t\treturn sqlSession.selectList(namespace + \".reviewListAll\");\r\n\t}", "public List<Rating> findRatingByMovie(String movieID);", "public GetMovieReviewsResponse getMovieReviews(int movieId, String language, Integer page) {\n // /movie/{movie_id}/reviews\n String path = String.format(\"/movie/%s/reviews\", movieId);\n Map<String, Object> requestParams = new HashMap<>();\n requestParams.put(\"language\", language);\n requestParams.put(\"page\", page);\n return restClient.get(path, requestParams, new TypeReference<>() {\n\n\n }\n );\n }", "public static ArrayList<Movie> getMoviesList(){\n\t\treturn movieInfo;\n\t}", "ImmutableList<SchemaOrgType> getReviewsList();", "public List<Movie> getMovies();", "public void setReviewsList(ArrayList<Review> reviews) {\n this.reviews = reviews;\n }", "public List<Movie> getMovies() {\n return movies;\n }", "public ArrayList<Movie> getMovies() {\n return movies;\n }", "List<Movie> getMovie(String movieId);", "private void populateReviews(Bundle savedInstanceState) {\n LinearLayoutManager layoutManager =\n new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false);\n mBinding.movieReviews.reviewsList.setLayoutManager(layoutManager);\n mBinding.movieReviews.reviewsList.setHasFixedSize(true);\n mBinding.movieReviews.reviewsList.setNestedScrollingEnabled(false);\n\n RecyclerView.ItemDecoration itemDecoration = new HorizontalItemDecoration(this);\n mBinding.movieReviews.reviewsList.addItemDecoration(itemDecoration);\n\n mReviewAdapter = new ReviewAdapter(this);\n mBinding.movieReviews.reviewsList.setAdapter(mReviewAdapter);\n\n if (savedInstanceState != null && savedInstanceState.containsKey(BUNDLE_REVIEWS)) {\n mReviewAdapter.addReviewsList(savedInstanceState.\n <Review>getParcelableArrayList(BUNDLE_REVIEWS));\n if (mReviewAdapter.getItemCount() == 0) {\n mBinding.movieReviews.reviewsLabel.setVisibility(View.GONE);\n }\n } else {\n Call<ApiResponse<Review>> call = mApiClient.getReviews(movie.movieId);\n\n call.enqueue(new Callback<ApiResponse<Review>>() {\n @Override\n public void onResponse(Call<ApiResponse<Review>> call,\n Response<ApiResponse<Review>> response) {\n List<Review> result = response.body().results;\n mReviewAdapter.addReviewsList(result);\n if (result.size() == 0) {\n mBinding.movieReviews.reviewsLabel.setVisibility(View.GONE);\n }\n }\n\n @Override\n public void onFailure(Call<ApiResponse<Review>> call, Throwable t) {\n Toast.makeText(DetailActivity.this,\n getString(R.string.connection_error), Toast.LENGTH_LONG).show();\n }\n });\n }\n }", "public void setReviews(ArrayList<String> reviews) {\n this.reviews = reviews;\n }", "public static List<Review> extractReviewData(String stringUrl, int movieId) {\n String jsonResponse = fetchResponse(stringUrl);\n if (jsonResponse == null) {\n return null;\n }\n List<Review> reviews = new ArrayList<>();\n try {\n JSONObject baseJsonResponse = new JSONObject(jsonResponse);\n JSONArray resultsJSONArray = baseJsonResponse.getJSONArray(RESULTS_KEY);\n for (int i = 0; i < resultsJSONArray.length(); i++) {\n JSONObject currentMovie = resultsJSONArray.getJSONObject(i);\n String author = currentMovie.optString(REVIEW_AUTHOR_KEY);\n String content = currentMovie.optString(REVIEW_CONTENT_KEY);\n String reviewId = currentMovie.optString(REVIEW_ID_KEY);\n String reviewUrl = currentMovie.optString(REVIEW_URL_KEY);\n Review review = new Review(reviewId, movieId, author, content, reviewUrl);\n reviews.add(review);\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return reviews;\n }", "public ArrayList<ReviewDTO> getAll(){\n\t\tArrayList<ReviewDTO> all = new ArrayList<>();\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tResourceSet result = dbManagement.executeXPath(REVIEW_COLLECTION_ID, \"data(//review)\", TARGET_NAMESPACE_PUBLICATION);\r\n\t\t\tif (result == null) {\r\n\t\t\t\tthrow new Exception();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tResourceIterator i = result.getIterator();\r\n\t\t\tResource res = null;\r\n\t\t\tReviewDTO dto = new ReviewDTO();\r\n\t\t\twhile (i.hasMoreResources()) {\r\n\t\t\t\tSystem.out.println(\"******\");\r\n\t\t\t\ttry {\r\n\t\t\t\t\tres = i.nextResource();\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(res.getContent().toString());\r\n\t\t\t\t\t// TODO svaki xml pretvoriti u dto i dodati u listu\r\n\t\t\t\t} finally {\r\n\t\t\t\t\t// don't forget to cleanup resources\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\t((EXistResource) res).freeResources();\r\n\t\t\t\t\t} catch (XMLDBException e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"error\");\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn all;\r\n\t}", "public static ArrayList<Movie> getMovieList() {\n\t\treturn movieList;\n\t}", "@Transactional\n\tpublic List<UserReview> getReviewByUserAndMovie(UserDetail userDetail, Movie movie) {\n\t\treturn userReviewRepopsitory.findByUserDetailAndMovie(userDetail, movie);\n\t}", "ArrayList<Review> getMoreReviews()\n {\n ArrayList<Review> reviews = new ArrayList<>();\n\n if (hasInfo && curReviewURL != null && !curReviewURL.equals(\"\"))\n {\n try\n {\n Document reviewResultPage = Jsoup.connect(curReviewURL)\n .userAgent(\"Mozilla/5.0\").ignoreHttpErrors(true)\n .ignoreContentType(true).get();\n\n // Handles the rare case where the API gives an error.\n if (reviewResultPage.getElementsByTag(\"title\").text().equals(\"Error\"))\n {\n return reviews;\n }\n\n Elements unparsedReviews = reviewResultPage.getElementsByTag(\"review\");\n\n for (Element unparsedReview : unparsedReviews)\n {\n String reviewTitle = unparsedReview.getElementsByTag(\"title\").text();\n String reviewText = unparsedReview.getElementsByTag(\"reviewText\").text();\n StarRating starRating = StarRating.valueOf(Integer.parseInt(unparsedReview\n .getElementsByTag(\"rating\")\n .text()));\n Integer numHelpful = Integer.parseInt(unparsedReview.getElementsByTag(\"upVotes\").text());\n Integer numUnhelpful = Integer.parseInt(unparsedReview.getElementsByTag(\"downVotes\").text());\n\n // Each parsed review datum is added to a new review and added to the product's\n // reviews, the date is always null since Walmart reviews do not have dates.\n reviews.add(new Review(reviewTitle, reviewText, starRating, null\n , numHelpful, numUnhelpful, Retailer.WALMART));\n }\n\n curReviewPageNum++;\n\n // Set the current review URL to the next page.\n WalmartRequestHelper walmartRequestHelper = new WalmartRequestHelper(itemID, curReviewPageNum);\n curReviewURL = walmartRequestHelper.getRequestURL();\n }\n catch (IOException ioe)\n {\n ioe.printStackTrace();\n }\n }\n\n return reviews;\n }", "@GetMapping(\"/movie/{name}\")\r\n public List<ReviewDetails> getReviewByMovieName(@PathVariable(\"name\") String name){\r\n return reviewRepository.getReviewByMovieName(name);\r\n }", "public static void listByRating(){\r\n System.out.println('\\n'+\"List by Rating\");\r\n CompareRatings compareRatings = new CompareRatings();\r\n Collections.sort(movies, compareRatings);\r\n for (Movie movie: movies){\r\n System.out.println('\\n'+\"Rating: \"+ movie.getRating()+'\\n'+\"Title: \"+ movie.getName()+'\\n'+\"Times Watched: \"+ movie.getTimesWatched()+'\\n');\r\n }\r\n }", "public List<Movie> getMovies(){\r\n if(person == null){\r\n return new ArrayList();\r\n }\r\n \r\n return new ArrayList(person.getMovies().values());\r\n }", "public List<String> getMovieList(){\n Set<String> movieList= new HashSet<String>();\n List<MovieListing> showtimes= ListingManager.getShowtimes();\n for(int i=0;i<history.size();i++){\n CustomerTransaction curr= history.get(i);\n for(int j=0;j<showtimes.size(); j++){\n MovieListing show = showtimes.get(j);\n if (show.sameListing(curr.getListingID())){\n movieList.add(show.getTitle());\n\n }\n }\n }\n return new ArrayList<>(movieList);\n }", "private List<MovieDetails> movieList() {\n List<MovieDetails> movieDetailsList = new ArrayList<>();\n movieDetailsList.add(new MovieDetails(1, \"Movie One\", \"Movie One Description\"));\n movieDetailsList.add(new MovieDetails(2, \"Movie Two\", \"Movie Two Description\"));\n movieDetailsList.add(new MovieDetails(2, \"Movie Two - 1 \", \"Movie Two Description - 1 \"));\n\n return movieDetailsList;\n }", "public java.lang.String[] getReview() {\n return review;\n }", "public ArrayList<Movie> getMovieList() {\n\t\treturn movieList;\n\t}", "@Override\n\tpublic List<Movie> getMovieByRate(Ratings rating) {\n\t\treturn movieRepository.getMovieByRating(rating);\n\t}", "private void updateReviews() {\n ArrayList<MovieReview> movieReviewArrayList = new ArrayList<>();\n reviewRecyclerView = findViewById(R.id.reviews_recycler_view);\n reviewRecyclerView.setLayoutManager(new LinearLayoutManager(this));\n movieReviewAdapter = new MovieReviewAdapter(movieReviewArrayList, MovieDetailActivity.this);\n reviewRecyclerView.setAdapter(movieVideoAdapter);\n }", "public void setReviews(ArrayList<Review> reviews) {\n\t\tthis.reviews = reviews;\n\t}", "@GetMapping(\"/films/title/{title}/{reviewId}/comments\")\n public @ResponseBody\n List<Comment> getAllCommentsFromReview(@PathVariable String reviewId){\n Review review = reviewService.getReviewByReviewId(Integer.parseInt(reviewId));\n return commentService.getAllCommentsByReview(review);\n }", "private void showReviews() {\n reviewsList = (LinearLayout) rootView.findViewById(R.id.reviews_list);\n LayoutInflater inflater = getActivity().getLayoutInflater();\n for (Review review : reviews) {\n View reviewView = inflater.inflate(R.layout.list_item_review, container, false);\n\n TextView reviewAuthor = (TextView) reviewView.findViewById(R.id.review_author);\n reviewAuthor.setText(review.getAuthor());\n\n TextView reviewContent = (TextView) reviewView.findViewById(R.id.review_content);\n reviewContent.setText(review.getContent());\n\n reviewsList.addView(reviewView);\n }\n }", "@Override\n public MovieListing getMovies() {\n // inventory.whatsAvailable()\n // inventory.whatIsUnavailable();\n return movieRepo.getMovies();\n }", "public List<ReviewType> getReview() {\n\t return this.review;\n\t}", "@GetMapping(\"/\")\n\tpublic List<Movie> getListMovie(){\n\t\tList<Movie> list = repo.findAll();\n\t\t\n\t\treturn list;\n\t}", "@Override\n\tpublic List<Movie> findAllMovie() {\n\t\treturn repository.findAllMovie();\n\t}", "List<Review> getReviewByProductId(Integer productId);", "@Override\n\tpublic List<MovieBean> listOfMovies() {\n\n\t\treturn dao.listOfMovies();\n\t}", "@Nullable\n MoviePage getMovies();", "public ReviewsAdapter() {\n\t\tmovieReviews = new ArrayList<MovieReview>();\n\t}", "private Map<Profile, String> review(){\n\t\treturn allReviews;\n\t}", "public static ArrayList<MovieInfoObject> getMoviesToDisplay() {\n return mMovies;\n }", "@GetMapping(\"/recommendations\")\n public ResponseEntity<?> getMovies() {\n Movie[] result = restTemplate.getForObject(\"http://movie-service/movies\", Movie[].class);\n System.out.println(result);\n return new ResponseEntity<>(result, HttpStatus.OK);\n }", "public LiveData<List<Movie>> fetchMovies(String option) {\n return Api.fetchMovies(option);\n }", "@Override\n public void getReviews(ArrayList<String> author, ArrayList<String> content) {\n if (author.size() > 0 && content.size() > 0 && author.size() == content.size()) {\n ContentValues[] reviewsArray = new ContentValues[author.size()];\n for (int i = 0; i < author.size(); i++) {\n ContentValues reviewsData = new ContentValues();\n reviewsData.put(MovieContract.ReviewEntry.COLUMN_MOVIE_ID, movieObject.getId());\n reviewsData.put(MovieContract.ReviewEntry.COLUMN_AUTHOR, author.get(i));\n reviewsData.put(MovieContract.ReviewEntry.COLUMN_CONTENT, content.get(i));\n reviewsArray[i] = reviewsData;\n }\n Uri reviewsUri = MovieContract.ReviewEntry.CONTENT_URI.buildUpon().appendPath(Integer.toString(movieObject.getId())).build();\n getContext().getContentResolver().bulkInsert(reviewsUri, reviewsArray);\n }\n currentPage++;\n if (currentPage <= maxPage) {\n GetReviewsFromApi getReviewsFromApi = new GetReviewsFromApi(getContext(), MovieDetailsFragment.this, movieObject.getId());\n getReviewsFromApi.execute();\n }\n }", "public List<Movie> getMovieData() {\n return movieData;\n }", "public List<ReviewStat> getReviewStat() {\n\t\t\treturn reviewRepositorystatR.findReviewStat();\n\t\t}", "public List<MovieDetails> getAllFavoriteMovies() {\n SQLiteDatabase database = this.getWritableDatabase();\n List<MovieDetails> movieDetailses = new ArrayList<>();\n List<Integer> favoritesMovieId = new ArrayList<>();\n String selectQuery = \"SELECT * FROM \" + FavoriteMoviesEntry.TABLE_NAME;\n Cursor cursor = database.rawQuery(selectQuery, null);\n if (cursor.moveToFirst()) {\n do {\n int id = getIdFromCursor(cursor);\n String selectFavoriteMovieQuery = \"SELECT * FROM \" + MoviesDetailsEntry.TABLE_NAME + \"WHERE \" + MoviesDetailsEntry._ID + \"= \" + id;\n Cursor movieCursor = database.rawQuery(selectFavoriteMovieQuery, null);\n if (movieCursor.moveToFirst()) {\n do {\n MovieDetails movieDetails = getMovieDetailsFromCursor(movieCursor);\n movieDetailses.add(movieDetails);\n } while (movieCursor.moveToNext());\n }\n } while (cursor.moveToNext());\n }\n database.close();\n\n return movieDetailses;\n }", "@GET\n\t@Path(\"{id}/reviews\")\n\t@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})\n\tpublic Response getApplicationReviews(\n\t\t\t@HeaderParam(\"ORSKey\") String orsKey,\n\t\t\t@HeaderParam(\"ShortKey\") String shortKey,\n\t\t\t@PathParam(\"id\") String id) {\n\t\tif (!Security.instance.isInternalUser(orsKey, shortKey)) {\n\t\t\tthrow new ForbiddenException(\"User does not have permission\");\n\t\t}\n\t\tList<Review> list = ReviewsDao.instance.getByApplication(id);\n\t\tif (list == null) {\n\t\t\tthrow new NotFoundException(\"Review list not found\");\n\t\t} else {\n\t\t\tGenericEntity<List<Review>> returnList = new GenericEntity<List<Review>>(list) {};\n\t\t\treturn Response.ok(returnList).build();\n\t\t}\n\t}", "public GetMovieRecommendationsResponse getMovieRecommendations(int movieId) {\n return getMovieRecommendations(movieId, null, null);\n }", "private List<Review> getUserReviews(String user_ID) {\n\t\tList<Review> Reviews = new ArrayList<Review>();\n\t\tfor (Review review : reviews) {\n\t\t\tif (user_ID.equals(review.getUserID())) {\n\t\t\t\tReviews.add(review);\n\t\t\t}\n\t\t}\n\n\t\treturn Reviews;\n\t}", "private List<ApartmentReviewBean> getReviewComments(String query, int id) {\n\t\tResultSet rs=null;\n\t\tList<ApartmentReviewBean> apartmentReviews = new ArrayList<ApartmentReviewBean>();\n\t\ttry {\n\t\t\t\n\t\t\t//pstmt = con.prepareStatement(query);\n\t\t\tPreparedStatement pstmt = dataSource.getConnection().prepareStatement(query);\n\t\t\tpstmt.setInt(1, id);\n\t\t\trs = pstmt.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tApartmentReviewBean review = new ApartmentReviewBean();\n\t\t\t\treview.setComments(rs.getString(\"comments\"));\n\t\t\t\treview.setRating(rs.getInt(\"rating\"));\n\t\t\t\tapartmentReviews.add(review);\t\n\t\t\t}\n\t\t\t\n\n\t\t} catch (SQLException e) {\n\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\treturn apartmentReviews;\n\t\n\t}", "@GetMapping(\"/movies\")\n public List<Movie> getAllMovies() {\n movies = new ArrayList<Movie>();\n movies.add(new Movie(1,\"The Godfather\",\"Crime/Thriller\"));\n movies.add(new Movie(2,\"Star Wars\",\"Sci-Fi\"));\n movies.add(new Movie(3,\"The Mask\",\"Comedy\"));\n movies.add(new Movie(4,\"Die Hard\",\"Action\"));\n movies.add(new Movie(5,\"The Exorcist\",\"Horror\"));\n movies.add(new Movie(6,\"The Silence of the Lambs\",\"Drama\"));\n\n return movies;\n }", "ImmutableList<SchemaOrgType> getReviewList();", "public List<Movie> theaters() {\n String url = \"http://api.rottentomatoes.com/api/public/v1.0/lists/movies/in_theaters.json?\"\n + \"apikey=yedukp76ffytfuy24zsqk7f5\";\n apicall(url);\n\n Gson gson = new Gson();\n MovieResponse response = gson.fromJson(data, MovieResponse.class);\n List<Movie> movies = response.getMovies();\n movieData = movies;\n System.out.println(url);\n return movieData;\n }", "public List<Movie> getMovie(String name){\n return _movieRepo.getMovie(name);\n }", "public static ArrayList<Review> getReviewInfo(String placeID) {\r\n\t\tArrayList<Review> reviewList = new ArrayList<Review>();\r\n\t\tString output = \"\";\r\n\t\ttry {\r\n\t\t\tURL url = new URL(\"https://maps.googleapis.com/maps/api/place/details/json?place_id=\"+placeID+\"&fields=review&key=AIzaSyAcM2vc8-2JY9I5P7jgvt61TCYa1vo0b98\");\r\n\t\t\tHttpURLConnection conn = (HttpURLConnection)url.openConnection();\r\n\t\t\tconn.setRequestMethod(\"GET\");\r\n\t\t\tconn.connect();\r\n\t\t\tint responsecode = conn.getResponseCode();\r\n\t\t\tif(responsecode != 200) {\r\n\t\t\t\tthrow new RuntimeException(\"HttpResponseCode: \"+responsecode);\r\n\t\t\t} else {\r\n\t\t\t\tJSONParser parse = new JSONParser();\r\n\t\t\t\tScanner scanner = new Scanner(url.openStream());\r\n\t\t\t\twhile (scanner.hasNext()) {\r\n\t\t\t\t\toutput+=scanner.nextLine();\r\n\t\t\t\t}\r\n\t\t\t\tJSONObject jsonobject = (JSONObject)parse.parse(output);\r\n\t\t\t\tJSONObject jsonobject2 = (JSONObject) jsonobject.get(\"result\");\r\n\t\t\t\tJSONArray reviewArray = (JSONArray)jsonobject2.get(\"reviews\");\r\n\t\t\t\tfor (int count=0; count<reviewArray.size(); count++) {\r\n\t\t\t\t\tJSONObject jsonObject3 = (JSONObject) reviewArray.get(count);\r\n\t\t\t\t\tReview newReview = new Review();\r\n\t\t\t\t\t newReview.setReviewer(jsonObject3.get(\"author_name\").toString());\r\n\t\t\t\t\t newReview.setReview(jsonObject3.get(\"text\").toString());\r\n\t\t\t\t\t newReview.setRating(jsonObject3.get(\"rating\").toString()+\".0\");\r\n\t\t\t\t\t reviewList.add(newReview);\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"Reviews retrieved.\");\r\n\t\t\t\tscanner.close();\r\n\t\t\t}\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (ParseException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn reviewList;\r\n\t}", "private void updateReviews(){\r\n FetchReviewsTask reviewsTask = new FetchReviewsTask();\r\n reviewsTask.execute(MovieId);\r\n }", "public ArrayList<String> getMovies(){\n\t\tArrayList<String> movies = new ArrayList<String>();\n\t\tString sql = \"SELECT * FROM movies\";\n\t\tPreparedStatement ps = null;\n\t\ttry {\n\t\t\tps = conn.prepareStatement(sql);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tmovies.add(rs.getString(\"name\"));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tps.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn movies;\t\n\t}", "@Override\n\tpublic List<Movie> getAllMovies() {\n\t\treturn movieRepository.getAllMovies();\n\t}", "@GetMapping(produces = MediaType.APPLICATION_JSON_VALUE)\n\t\tpublic ResponseEntity<Object> getReviews(HttpServletResponse response) {\n\t\t\t\n\t\t\tresponse.addHeader(\"Date\", new Date().toString());\n\t\t\tresponse.setHeader(\"Cache-Control\",\"no-cache,no-store,must-revalidate\");\n\t\t response.setHeader(\"Pragma\",\"no-cache\");\n\t\t response.setHeader(\"Version\",\"Mechanic API V-2.0\");\n\t\t response.setDateHeader(\"Expires\", 0);\n\t\t \n\t\t\treturn new ResponseEntity<>( reviewService.getReviews(), HttpStatus.OK);\n\t\t}", "public List<Movie> getAllMovies() {\n SQLiteDatabase database = this.getWritableDatabase();\n List<Movie> movieList = new ArrayList<>();\n String selectQuery = \" SELECT * FROM \" + MoviesEntry.TABLE_NAME;\n Cursor cursor = database.rawQuery(selectQuery, null);\n\n if (cursor.moveToFirst()) {\n do {\n Movie movie = getMovieFromCursor(cursor);\n movieList.add(movie);\n } while (cursor.moveToNext());\n }\n database.close();\n\n return movieList;\n }", "public ArrayList<String> getMovies() {\n ArrayList<String> movies = new ArrayList<String>();\n\n try {\n // Prepare a new SQL Query & Set a timeout\n Statement statement = connection.createStatement();\n statement.setQueryTimeout(30);\n\n // The Query\n String query = \"SELECT *\" + \"\\n\" +\n \"FROM member\";\n\n // Get Result\n ResultSet results = statement.executeQuery(query);\n\n // Process all of the results\n // The \"results\" variable is similar to an array\n // We can iterate through all of the database query results\n while (results.next()) {\n // We can lookup a column of the a single record in the\n // result using the column name\n // BUT, we must be careful of the column type!\n // int id = results.getInt(\"mvnumb\");\n String movieName = results.getString(\"email\");\n // int year = results.getInt(\"yrmde\");\n // String type = results.getString(\"mvtype\");\n\n // For now we will just store the movieName and ignore the id\n movies.add(movieName);\n // members.add();\n }\n\n // Close the statement because we are done with it\n statement.close();\n } catch (SQLException e) {\n // If there is an error, lets just print the error\n System.err.println(e.getMessage());\n }\n\n // Finally we return all of the movies\n return movies;\n }", "public void fetchFavoritedMovies() {\n favoritesSelected = true;\n Cursor cursor =\n getActivity().getContentResolver().query(MovieContract.FavoriteMovieEntry.CONTENT_URI,\n null,\n null,\n null,\n null);\n ArrayList<MovieModel> movieModels = new ArrayList<>();\n if (cursor != null) {\n while (cursor.moveToNext()) {\n MovieModel movieModel = new MovieModel(getActivity(), cursor);\n // Get the trailers and reviews\n String movieId = cursor.getString(cursor.getColumnIndex(MovieContract.FavoriteMovieEntry._ID));\n Cursor trailerCursor =\n getActivity().getContentResolver().query(MovieContract.TrailerEntry.CONTENT_URI,\n null,\n MovieContract.TrailerEntry.COLUMN_MOVIE_KEY + \" = ?\",\n new String[]{movieId},\n null);\n Cursor reviewCursor =\n getActivity().getContentResolver().query(MovieContract.ReviewEntry.CONTENT_URI,\n null,\n MovieContract.ReviewEntry.COLUMN_MOVIE_KEY + \" = ?\",\n new String[]{movieId},\n null);\n ArrayList<MovieTrailerModel> movieTrailerModels = new ArrayList<>();\n ArrayList<MovieReviewModel> movieReviewModels = new ArrayList<>();\n if (trailerCursor != null) {\n while (trailerCursor.moveToNext()) {\n movieTrailerModels.add(new MovieTrailerModel(getActivity(), trailerCursor));\n }\n trailerCursor.close();\n }\n if (reviewCursor != null) {\n while (reviewCursor.moveToNext()) {\n movieReviewModels.add(new MovieReviewModel(getActivity(), reviewCursor));\n }\n reviewCursor.close();\n }\n movieModel.setReviews(movieReviewModels);\n movieModel.setTrailers(movieTrailerModels);\n movieModels.add(movieModel);\n }\n cursor.close();\n }\n movieGridAdapter.setMovieModels(movieModels);\n }", "List<Movie> getAllMovies(String name, String director, String movieId);", "private void setupReviewsList() {\n LinearLayoutManager linearLayoutManager = new LinearLayoutManager(DetailActivity.this, RecyclerView.VERTICAL, false);\n reviewsRecyclerView.setLayoutManager(linearLayoutManager);\n reviewsRecyclerView.setHasFixedSize(true);\n\n //setting up adapter\n ReviewAdapter reviewAdapter = new ReviewAdapter(DetailActivity.this, reviewArrayList);\n reviewsRecyclerView.setAdapter(reviewAdapter);\n }", "Collection<MovieEarned> moviesEarned();", "public List<Movie> dVD() {\n String url = \"http://api.rottentomatoes.com/api/public/v1.0/lists/dvds/new_releases.json?\"\n + \"apikey=yedukp76ffytfuy24zsqk7f5\";\n apicall(url);\n Gson gson = new Gson();\n MovieResponse response = gson.fromJson(data, MovieResponse.class);\n List<Movie> movies = response.getMovies();\n movieData = movies;\n System.out.println(url);\n return movieData;\n }", "@GetMapping\n\tpublic ResponseEntity<List<Movie>> fetchAllMovies(){\n\t\treturn new ResponseEntity<List<Movie>>(movieService.listAllMovies(), HttpStatus.OK);\n\t}", "public void setReviews(Set<Review> reviews) {\n this.reviews = reviews;\n }", "public ObservableList<Movie> getFilmData() {\r\n return ser.movieData;\r\n }", "public void listAllReview() throws ServletException, IOException {\r\n\t\tlistAllReview(null);\r\n\t}", "public GetTopRatedMoviesResponse getTopRatedMovies() {\n return getTopRatedMovies(null, null, null);\n }", "public ResponseEntity<List<Movie>> getAllMovies() {\n List<Movie> movies = movieRepository.findAll();\n return new ResponseEntity<>(movies, HttpStatus.OK);\n }", "private ArrayList<MovieItem> getFavoriteMovies(){\n //get list of favorite movies from buffer\n ArrayList<MovieItem> movies = mMovieStaff.getMovies(PosterHelper.NAME_ID_FAVORITE);\n\n //check if favorite movie list has changed\n if(mFavoriteChanged){\n //list has changed, show new movie list\n showMovieList(movies, PosterHelper.NAME_ID_FAVORITE);\n }\n\n //return movie list\n return movies;\n }", "public Map<String, Set<Review>> getReviewMap(){\n\t\treturn reviewMap;\n\t}", "public List<Rating> ratings(Customer c) {\n\t\treturn shopRepository.getRatingsForCustomer(c);\n\t}", "@Override\n public List<Movie> getAllMovie() {\n return movieRepository.findAll();}", "public String getReview(){\n\t\treturn this.review;\n\t}", "public String getReview_id() {\n return this.review_id;\n }", "Collection<MoviesTitles> getMoviesTitles();", "private static void listMovies(){\n\n\t\ttry{\n\t\t\tURL url = new URL(\"http://localhost:8080/listMovies\");\n\t\t\tString rawJSONList = getHTTPResponse(url);\n\t\t\tJSONArray JSONList = new JSONArray(rawJSONList);\n\t\t\tStringBuilder list = new StringBuilder();\n\t\t\t\n\t\t\tfor (int i=0 ; i<JSONList.length() ; i++){\n\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\tJSONObject temp = JSONList.getJSONObject(i);\n\t\t\t\tsb.append(temp.getInt(\"id\"));\n\t\t\t\tsb.append(\". \");\n\t\t\t\tsb.append(temp.getString(\"name\"));\n\t\t\t\tsb.append(\"\\n\");\n\t\t\t\t\n\t\t\t\tlist.append(sb.toString());\n\t\t\t}\n\t\t\tSystem.out.println(list.toString());\n\t\t}catch(Exception e){System.out.println(\"Error - wrong input or service down\");}\n\t\t\n\t}", "private MovieReviews[] getReviewsDataFromJson(String reviewJsonStr)throws JSONException{\n\r\n final String RESULTS = \"results\";\r\n final String REVIEW_ID = \"id\";\r\n final String REVIEW_AUTHOR = \"author\";\r\n final String REVIEW_CONTENT = \"content\";\r\n\r\n JSONObject reviewJson = new JSONObject(reviewJsonStr);\r\n JSONArray reviewArray = reviewJson.getJSONArray(RESULTS);\r\n\r\n MovieReviews[] resultStr = new MovieReviews[reviewArray.length()];\r\n\r\n //Here statement to obtent the id of the movie!!!\r\n //Extract movie review data and build movie objects\r\n for (int i = 0; i<reviewArray.length();i++){\r\n\r\n String review_id;\r\n String review_author;\r\n String review_content;\r\n\r\n JSONObject reviewdata = reviewArray.getJSONObject(i);\r\n\r\n review_id = reviewdata.getString(REVIEW_ID);\r\n review_author = reviewdata.getString(REVIEW_AUTHOR);\r\n review_content = reviewdata.getString(REVIEW_CONTENT);\r\n\r\n MovieReviews element = new MovieReviews(review_id,review_author,review_content);\r\n resultStr[i]= element;\r\n\r\n\r\n }\r\n return resultStr;\r\n\r\n }", "private Movie getMovie() {\n Gson gson = new Gson();\n return gson.fromJson(result, Movie.class);\n }", "@Override\r\n\tpublic List<ReviewDTO> review_list(int start, int end, String code) throws Exception {\n\t\treturn reviewDao.review_list(start, end, code);\r\n\t}", "public ArrayList<MovieItem> getMovieList(int movieType){\n //save movie type\n mMovieType = movieType;\n\n //check movie type being requested\n if(movieType == PosterHelper.NAME_ID_FAVORITE){\n //mark favorite movie list has changed as true\n mFavoriteChanged = true;\n\n //if favorite, return list of favorite movies\n return getFavoriteMovies();\n }\n else{\n //if any other movie type, request list of movies\n return requestMovieList(movieType);\n }\n }", "@Override\r\n\tpublic List<ReviewVO> listCriteria(PageCriteria page) throws Exception {\n\t\treturn ss.selectList(\"listCriteria\", page);\r\n\t}", "private void readReviews(final String filename) \n\t{\n\t\ttry\n\t\t{\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(new File(\"dataset\" + File.separator + filename)));\n\t\t\tString line;\n\t\t\t\n\t\t\twhile ((line = br.readLine()) != null) \n\t\t\t{\n\t\t\t\tString[] tokens = line.split(\";;\");\n\t\t\t\tif(tokens.length != 12)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Error reading from file \\\"\" + filename + \"\\\"\");\n\t\t\t\t\tSystem.exit(1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString reviewId = tokens[0];\n\t\t\t\tString reviewerUrl = tokens[1];\n\t\t\t\t\n\t\t\t\tString productCategory = tokens[2];\n\t\t\t\tString productId = tokens[3];\n\t\t\t\tString productName = tokens[4];\n\t\t\t\t\n\t\t\t\tString reviewTitle = tokens[5];\n\t\t\t\tString reviewText = tokens[6];\n\t\t\t\tdouble reviewRating = Double.parseDouble(tokens[7]);\n\t\t\t\tString reviewDate = tokens[8];\n\t\t\t\t\n\t\t\t\tint posVotes = Integer.parseInt(tokens[9]);\n\t\t\t\tint totalVotes = Integer.parseInt(tokens[10]);\n\t\t\t\tdouble helpfulness = Double.parseDouble(tokens[11]);\n\t\t\t\t\n\t\t\t\treviews.add(new Review(reviewId, reviewerUrl, productCategory, productId, productName, reviewTitle, reviewText, reviewRating, reviewDate, posVotes, totalVotes, helpfulness));\n\t\t\t\t\n\t\t\t\t/** stores the helpfulness of reviews rated from 1 to 5 **/\t\t\t\n\t\t\t\tif (reviewRating == (int)(reviewRating))\n\t\t\t\t{\n\t\t\t\t\tList<Double> list = ratings.containsKey(reviewRating)? ratings.get(reviewRating): new ArrayList<Double>();\n\t\t\t\t\tlist.add(helpfulness);\n\t\t\t\t\tratings.put(reviewRating, list);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// update the information in for the product\n\t\t\t\tupdateProduct(productId, reviewRating);\n\t\t\t\t// create a new ReviewInstance object\n\t\t\t\tReviewInstance ri = new ReviewInstance();\n\t\t\t\t// store rating of this review\n\t\t\t\tri.setRating(reviewRating);\n\t\t\t\t// classify whether this review is helpful or not\n\t\t\t\tri.setReviewHelpfulness(helpfulness>=0.75 ? \"helpful\" : \"unhelpful\");\n\t\t\t\t\n\t\t\t\t// store the ReviewInstance\n\t\t\t\tthis.reInstanceList.add(ri);\n\t\t\t\treInstanceMap.put(reviewId, ri);\n\t\t\t}\n\t\t\tcomputeStdDevRating();\n\t\t\tbr.close();\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public GetPopularMoviesResponse getPopularMovies() {\n return getPopularMovies(null, null, null);\n }", "private void loadReviews(){\n cursor = db.rawQuery(\"SELECT * FROM REVIEW WHERE BookID = \"+bookIDSelected+\";\", null);\n startManagingCursor(cursor);\n List<String[]> reviews = new ArrayList<>();\n double sumRating = 0;\n\n while(cursor.moveToNext()){\n String[] arr ={\n String.valueOf(cursor.getInt(0)),\n String.valueOf(cursor.getDouble(3)),\n cursor.getString(2)\n };\n reviews.add(arr);\n sumRating += cursor.getDouble(3);\n }\n setRatingTotal( sumRating / reviews.size() );\n //Toast.makeText(this, ratingTotal+\" = \"+sumRating+\" / \"+reviews.size(), Toast.LENGTH_SHORT).show();\n ratingBarTotal = findViewById(R.id.rvRatingBarTotal);\n ratingBarTotal.setRating((float) ratingTotal);\n\n txtNumRv = findViewById(R.id.rvTxtNumRv);\n txtNoRv = findViewById(R.id.rvTxtNoReview);\n DecimalFormat df = new DecimalFormat(\"#.##\");\n if(reviews.size() == 0){\n txtNumRv.setText( R.string.noReviewsYet );\n } else {\n txtNumRv.setText(df.format(ratingTotal) + \" / \" + reviews.size() + \" reviews\");\n txtNoRv.setVisibility(View.INVISIBLE);\n }\n\n listView = findViewById(R.id.rvListView);\n listView.setAdapter(adapter = new ReviewAdapter(reviews));\n\n }", "public MutableLiveData<Movie> getMovieDetails(Movie movie) {\n final MutableLiveData<Movie> movieDetails = new MutableLiveData<>();\n Api.ApiInterface api = Api.getApi();\n String movieId = String.valueOf(movie.getId());\n String apiKey = Api.getApiKey();\n\n sAppExecutors.networkIO().execute(() -> {\n try {\n movie.setReviews(api.fetchReviews(movieId, apiKey).execute().body().getReviews());\n movie.setVideos(api.fetchVideos(movieId, apiKey).execute().body().getVideos());\n movieDetails.postValue(movie);\n } catch (IOException e) {\n movieDetails.postValue(null);\n e.printStackTrace();\n }\n });\n return movieDetails;\n }", "private ArrayList<Rating> getSimilarities(String id){\n \n String moviefile = \"data/ratedmovies_short.csv\";\n String ratingsfile = \"data/ratings_short.csv\";\n \n RaterDatabase database = new RaterDatabase();\n database.initialize(ratingsfile);\n \n ArrayList<Rating> dot_list = new ArrayList<Rating>();\n \n Rater me = database.getRater(id);\n \n for (Rater rater : database.getRaters()){\n \n if(rater != me){\n \n double dot_product = dotProduct(me, rater);\n \n if (dot_product >= 0.0){\n \n Rating new_rating = new Rating(rater.getID() , dot_product);\n \n dot_list.add(new_rating);\n }\n \n }\n \n }\n \n Collections.sort(dot_list , Collections.reverseOrder());\n \n return dot_list;\n \n }", "@ApiOperation(value = \"Get reviews of a Product\", response = ReviewDTO.class)\n\t@ApiResponses(value = {\n @ApiResponse(code = 200, message = \"Return a list of reviews\", response = ReviewDTO.class ),\n @ApiResponse(code = 400, message = \"Return a error object\", response = error.class) })\n\t\n\t@GetMapping(path = \"/api/products/{product_id}/reviews\")\n\tpublic ResponseEntity<List<ReviewDTO>> getProductReviews(\n\t\t\t@PathVariable(name = \"product_id\", required = true) Integer productId) {\n\t\treturn ResponseEntity.ok(productService.getProductReviews(productId));\n\t}", "private String getStoredMovieCollectionList(ArrayList<Movie> movies)\n {\n StringBuilder linesOfMovieDetails = new StringBuilder();\n \n for (int line = 0; line < (movies.size() - 1); line++)\n {\n linesOfMovieDetails.append(movies.get(line).getTitle() + \",\" + movies.get(line).getDirector() + \",\" + movies.get(line).getActor1() + \",\" \n + movies.get(line).getActor2() + \",\" + movies.get(line).getActor3() + \",\" + movies.get(line).getRating() + \";\");\n }\n \n return linesOfMovieDetails.toString();\n }" ]
[ "0.73364687", "0.7307165", "0.71874696", "0.7037595", "0.69953305", "0.6862422", "0.6836174", "0.6659503", "0.66386586", "0.65150553", "0.6474144", "0.64618737", "0.6461528", "0.64538", "0.63900495", "0.63781655", "0.6362498", "0.6324434", "0.62662023", "0.62644565", "0.62632465", "0.62483466", "0.62461567", "0.6244259", "0.6243155", "0.62183595", "0.61996955", "0.61746544", "0.6171496", "0.6123944", "0.6104066", "0.60877615", "0.60582983", "0.6040153", "0.6023384", "0.60095656", "0.5960518", "0.59482056", "0.5942528", "0.59292686", "0.5914617", "0.58973426", "0.5862207", "0.5840559", "0.5840292", "0.58316773", "0.5822579", "0.58211774", "0.5810887", "0.57979685", "0.57977057", "0.5778708", "0.57690054", "0.57438797", "0.57438344", "0.5741134", "0.5732627", "0.5721197", "0.570866", "0.57058746", "0.56956875", "0.5695584", "0.56923884", "0.5685997", "0.5683696", "0.56706846", "0.56701404", "0.56617236", "0.5635761", "0.56315416", "0.5629784", "0.55829406", "0.5573816", "0.5573004", "0.55545723", "0.5539459", "0.552752", "0.55013233", "0.5458958", "0.54490685", "0.54423594", "0.543995", "0.54221714", "0.5409635", "0.53854406", "0.53771377", "0.53750706", "0.5371673", "0.5370338", "0.5364653", "0.53601384", "0.5355398", "0.53546816", "0.5335172", "0.5329715", "0.5318344", "0.53125346", "0.53103405", "0.5305671", "0.5279348" ]
0.7469231
0