List of usage examples for java.lang String contentEquals
public boolean contentEquals(CharSequence cs)
From source file:com.velli.passwordmanager.FragmentLockScreen.java
private void createNewPassword() { String pass = mPasswordField.getText().toString(); final String verify = mVerifyPassField.getText().toString(); if (pass.contentEquals(verify)) { if (DEBUG) { Log.i(Tag, Tag + "createNewPassword() passwords equals"); }//from w w w .ja v a 2s . co m pass = pass.replaceAll("'", "''"); PasswordDatabaseHandler.getInstance().changePassword(pass.toCharArray(), this); mButtonOk.setEnabled(false); mButtonOk.setText(getString(R.string.title_logging_in)); } else { if (DEBUG) { Log.i(Tag, Tag + "createNewPassword() passwords not equal"); } mVerifyPassTitle.setError(getResources().getString(R.string.error_passwords_dont_match)); } }
From source file:com.urbantamil.projmadurai.MaduraiSearch.java
void setSearchOption(String field) { int pos = 3;//from w ww .ja v a 2 s .c om if (field.contentEquals("title")) { pos = 1; } else if (field.contentEquals("author")) { pos = 0; } else if (field.contentEquals("genre")) { pos = 2; } else { pos = 3; } spinner_search_options.setSelection(pos); }
From source file:org.jboss.forge.navigation.MarkTest.java
@Test public void testAddGlobalOverwriteMark() throws Exception { String marktest = "forge" + RandomStringUtils.randomAlphanumeric(8); queueInputLines("y", "y"); getShell().execute("mark add " + marktest + " --global"); String path1 = globalBookmarkCache.getBookmark(marktest); getShell().execute("mark add " + marktest + " --global"); String path2 = globalBookmarkCache.getBookmark(marktest); assert path1.contentEquals(path2); getShell().execute("cd .."); getShell().execute("mark add " + marktest + " --global"); String path3 = globalBookmarkCache.getBookmark(marktest); assert !path1.contentEquals(path3); globalBookmarkCache.delBookmark(marktest); }
From source file:com.esp8266.mkspiffs.ESP8266FS.java
private long getIntPref(String name) { String data = BaseNoGui.getBoardPreferences().get(name); if (data == null || data.contentEquals("")) return 0; if (data.startsWith("0x")) return Long.parseLong(data.substring(2), 16); else/*from www .jav a 2 s . c o m*/ return Integer.parseInt(data); }
From source file:org.alfresco.po.share.user.TrashCanPage.java
/** * Method to find out whether we have items in trashcan page * * @return boolean/*from w w w .ja v a 2s.c om*/ */ public boolean hasTrashCanItems() { try { WebElement info = driver.findElement(TRASHCAN_ITEM_LIST); String value = info.getText(); if (value.contentEquals("No items exist")) { return false; } } catch (NoSuchElementException e) { return false; } return true; }
From source file:org.jtrfp.trcl.flow.GameShell.java
private VOXFile determineVOXFile() { String voxName = tr.config.getVoxFile(); if (voxName == null) return autoDetermineVOXFile(); else if (voxName.contentEquals(TRConfiguration.AUTO_DETECT)) return autoDetermineVOXFile(); else if (voxName.contentEquals("Fury3")) return Fury3.getDefaultMission(); else if (voxName.contentEquals("TV")) return TV.getDefaultMission(); else if (voxName.contentEquals("FurySE")) return FZone.getDefaultMission(); else// w ww . j ava 2 s . c o m return attemptGetVOX(voxName); }
From source file:org.jtrfp.trcl.flow.GameShell.java
private GameVersion determineGameVersion() { String voxName = tr.config.getVoxFile(); if (voxName == null) return tr.config.getGameVersion(); else if (voxName.contentEquals(TRConfiguration.AUTO_DETECT)) { return guessGameVersionFromPods(); } else if (voxName.contentEquals("Fury3")) return GameVersion.F3; else if (voxName.contentEquals("TV")) return GameVersion.TV; else if (voxName.contentEquals("FurySE")) return GameVersion.FURYSE; else//from w w w . j a va2 s. c om return tr.config.getGameVersion(); }
From source file:org.jboss.forge.navigation.MarkTest.java
@Test public void testAddGlobalNonOverwriteMark() throws Exception { String marktest = "forge" + RandomStringUtils.randomAlphanumeric(8); queueInputLines("n"); getShell().execute("mark add " + marktest + " --global"); String path1 = globalBookmarkCache.getBookmark(marktest); getShell().execute("cd .."); getShell().execute("mark add " + marktest + " --global"); String path2 = globalBookmarkCache.getBookmark(marktest); assert path1.contentEquals(path2); globalBookmarkCache.delBookmark(marktest); }
From source file:io.github.protino.codewatch.ui.ProfileActivity.java
private void removeViewIfNoData(TextView view) { String text = view.getText().toString(); if (text.isEmpty() || text.contentEquals("null")) { view.setVisibility(View.GONE); }/*w w w. j a va 2 s.c om*/ }
From source file:com.smash.revolance.ui.server.controller.ComparisonController.java
@RequestMapping(value = "/compare/{contentTagRef}/{contentTagNew}", method = RequestMethod.GET) public ModelAndView renderComparison(@PathVariable String contentTagRef, @PathVariable String contentTagNew, @RequestParam(value = "reviewId", defaultValue = "") String reviewId, @ModelAttribute("model") ModelMap model) throws StorageException, IOException { if (contentTagNew.contentEquals(contentTagRef)) { List<PageBean> pages = new ArrayList<PageBean>(); for (PageBean page : SiteMap.fromJson(applications.retrieve(contentTagRef)).getPages()) { pages.add(page);/*from w w w . j a v a2 s . co m*/ if (page.hasVariants()) { pages.addAll(page.getVariants()); } } model.addAttribute("applicationId", contentTagRef); model.addAttribute("pagesCount", pages.size()); HtmlCanvas canvas = new HtmlCanvas(); new ApplicationDetailsRenderable(reviewId, pages).renderOn(canvas); model.addAttribute("pages", canvas.toHtml()); return new ModelAndView("ApplicationDetail", model); } else { model.addAttribute("refAppTag", contentTagRef); model.addAttribute("newAppTag", contentTagNew); SiteMap refSitemap = SiteMap.fromJson(applications.retrieve(contentTagRef)); SiteMap newSitemap = SiteMap.fromJson(applications.retrieve(contentTagNew)); ApplicationComparison comparison = applicationComparator.compare(refSitemap, newSitemap); model.addAttribute("pageComparisons", renderComparisonsWithRenderables(reviewId, contentTagRef, contentTagNew, comparison.getPageComparisons())); model.addAttribute("pageAdded", comparison.getAddedPages()); model.addAttribute("pageRemoved", comparison.getRemovedPages()); return new ModelAndView("ApplicationComparison", model); } }