code
stringlengths
73
34.1k
label
stringclasses
1 value
public void alertEquals(double seconds, String expectedAlertText) { try { double timeTook = popup(seconds); timeTook = popupEquals(seconds - timeTook, expectedAlertText); checkAlertEquals(expectedAlertText, seconds, timeTook); } catch (TimeoutException e) { ...
java
public void alertMatches(double seconds, String expectedAlertPattern) { try { double timeTook = popup(seconds); timeTook = popupMatches(seconds - timeTook, expectedAlertPattern); checkAlertMatches(expectedAlertPattern, seconds, timeTook); } catch (TimeoutException e) ...
java
public void confirmationPresent(double seconds) { try { double timeTook = popup(seconds); checkConfirmationPresent(seconds, timeTook); } catch (TimeoutException e) { checkConfirmationPresent(seconds, seconds); } }
java
public void confirmationNotPresent(double seconds) { try { double timeTook = noPopup(seconds); checkConfirmationNotPresent(seconds, timeTook); } catch (TimeoutException e) { checkConfirmationNotPresent(seconds, seconds); } }
java
public void confirmationEquals(double seconds, String expectedConfirmationText) { try { double timeTook = popup(seconds); timeTook = popupEquals(seconds - timeTook, expectedConfirmationText); checkConfirmationEquals(expectedConfirmationText, seconds, timeTook); } catc...
java
public void confirmationMatches(double seconds, String expectedConfirmationPattern) { try { double timeTook = popup(seconds); timeTook = popupMatches(seconds - timeTook, expectedConfirmationPattern); checkConfirmationMatches(expectedConfirmationPattern, seconds, timeTook); ...
java
public void promptPresent(double seconds) { try { double timeTook = popup(seconds); checkPromptPresent(seconds, timeTook); } catch (TimeoutException e) { checkPromptPresent(seconds, seconds); } }
java
public void promptNotPresent(double seconds) { try { double timeTook = noPopup(seconds); checkPromptNotPresent(seconds, timeTook); } catch (TimeoutException e) { checkPromptNotPresent(seconds, seconds); } }
java
public void promptEquals(double seconds, String expectedPromptText) { try { double timeTook = popup(seconds); timeTook = popupEquals(seconds - timeTook, expectedPromptText); checkPromptEquals(expectedPromptText, seconds, timeTook); } catch (TimeoutException e) { ...
java
public void promptMatches(double seconds, String expectedPromptPattern) { try { double timeTook = popup(seconds); timeTook = popupMatches(seconds - timeTook, expectedPromptPattern); checkPromptMatches(expectedPromptPattern, seconds, timeTook); } catch (TimeoutExceptio...
java
public void cookieExists(double seconds, String expectedCookieName) { double end = System.currentTimeMillis() + (seconds * 1000); while (!app.is().cookiePresent(expectedCookieName) && System.currentTimeMillis() < end) ; double timeTook = Math.min((seconds * 1000) - (end - System.currentTimeMilli...
java
public void cookieNotExists(double seconds, String unexpectedCookieName) { double end = System.currentTimeMillis() + (seconds * 1000); while (app.is().cookiePresent(unexpectedCookieName) && System.currentTimeMillis() < end) ; double timeTook = Math.min((seconds * 1000) - (end - System.currentTim...
java
public void cookieEquals(double seconds, String cookieName, String expectedCookieValue) { double end = System.currentTimeMillis() + (seconds * 1000); while (app.is().cookiePresent(cookieName) && System.currentTimeMillis() < end) ; if (app.is().cookiePresent(cookieName)) { while (!app...
java
public void cookieMatches(double seconds, String cookieName, String expectedCookiePattern) { double end = System.currentTimeMillis() + (seconds * 1000); while (app.is().cookiePresent(cookieName) && System.currentTimeMillis() < end) ; if (app.is().cookiePresent(cookieName)) { while (!...
java
public boolean present() { boolean isPresent = false; try { element.getWebElement().getText(); isPresent = true; } catch (NoSuchElementException | StaleElementReferenceException e) { log.info(e); } return isPresent; }
java
public boolean input() { boolean isInput = false; try { WebElement webElement = element.getWebElement(); if ("input".equalsIgnoreCase(webElement.getTagName()) || "textarea".equalsIgnoreCase(webElement.getTagName()) || SELECT.equalsIgnoreCas...
java
public boolean select() { boolean isSelect = false; try { WebElement webElement = element.getWebElement(); if (SELECT.equalsIgnoreCase(webElement.getTagName())) { isSelect = true; } } catch (NoSuchElementException e) { log.info(e); ...
java
public boolean table() { boolean isTable = false; try { WebElement webElement = element.getWebElement(); if ("table".equalsIgnoreCase(webElement.getTagName())) { isTable = true; } } catch (NoSuchElementException e) { log.info(e); ...
java
public boolean enabled() { boolean isEnabled = false; try { // adding additional check for disabled attribute, due to issues with safari isEnabled = (element.getWebElement().isEnabled() && !element.get().allAttributes().containsKey("disabled")); } catch (NullPointerExcept...
java
public boolean checked() { boolean isChecked = false; try { isChecked = element.getWebElement().isSelected(); } catch (Exception e) { log.info(e); } return isChecked; }
java
public boolean displayed() { boolean isDisplayed = false; try { isDisplayed = element.getWebElement().isDisplayed(); } catch (NoSuchElementException e) { log.info(e); } return isDisplayed; }
java
public boolean somethingSelected() { boolean isSelected = false; if (input()) { WebElement webElement = element.getWebElement(); if ("input".equalsIgnoreCase(webElement.getTagName())) { isSelected = webElement.isSelected(); } else if (SELECT.equalsIgno...
java
public void cssValue(String attribute, String expectedValue) { String cssValue = checkCssValue(attribute, expectedValue, 0, 0); String reason = NO_ELEMENT_FOUND; if (cssValue == null && expectedValue != null && getElement().is().present()) { reason = "CSS attribute not found"; ...
java
public void attribute(String attribute, String expectedValue) { String value = checkAttribute(attribute, expectedValue, 0, 0); String reason = NO_ELEMENT_FOUND; if (value == null && getElement().is().present()) { reason = "Attribute doesn't exist"; } assertNotNull(rea...
java
public void text(String expectedText) { String text = checkText(expectedText, 0, 0); assertNotNull(NO_ELEMENT_FOUND, text); assertEquals("Text Mismatch", expectedText, text); }
java
public void text(int row, int col, String expectedText) { String text = checkText(row, col, expectedText, 0, 0); String reason = NO_ELEMENT_FOUND; if (text == null && getElement().is().present()) { reason = "Element not table"; } assertNotNull(reason, text); a...
java
public void value(String expectedValue) { String value = checkValue(expectedValue, 0, 0); String reason = NO_ELEMENT_FOUND; if (value == null && getElement().is().present()) { reason = "Element not input"; } assertNotNull(reason, value); assertEquals("Value Mi...
java
public void selectedOption(String expectedText) { String option = checkSelectedOption(expectedText, 0, 0); String reason = NO_ELEMENT_FOUND; if (option == null && getElement().is().present()) { reason = ELEMENT_NOT_SELECT; } assertNotNull(reason, option); asse...
java
public void selectedValue(String expectedValue) { String value = checkSelectedValue(expectedValue, 0, 0); String reason = NO_ELEMENT_FOUND; if (value == null && getElement().is().present()) { reason = ELEMENT_NOT_SELECT; } assertNotNull(reason, value); assertE...
java
public void selectOptions(String... expectedOptions) { String[] options = checkSelectOptions(expectedOptions, 0, 0); String reason = NO_ELEMENT_FOUND; if (options == null && getElement().is().present()) { reason = ELEMENT_NOT_SELECT; } assertNotNull(reason, options); ...
java
public void selectValues(String... expectedValues) { String[] values = checkSelectValues(expectedValues, 0, 0); String reason = NO_ELEMENT_FOUND; if (values == null && getElement().is().present()) { reason = ELEMENT_NOT_SELECT; } assertNotNull(reason, values); ...
java
public void text(int row, int col, String text) { text(row, col, text, defaultWait); }
java
public void clazz(String expectedClass, double seconds) { double end = System.currentTimeMillis() + (seconds * 1000); try { elementPresent(seconds); while (!(expectedClass == null ? element.get().attribute(CLASS) == null : expectedClass.equals(element.get().attribute(CLASS))) && ...
java
public void attribute(String attribute, String expectedValue, double seconds) { double end = System.currentTimeMillis() + (seconds * 1000); try { elementPresent(seconds); while (!expectedValue.equals(element.get().attribute(attribute)) && System.currentTimeMillis() < end) ; ...
java
public void text(String expectedText, double seconds) { double end = System.currentTimeMillis() + (seconds * 1000); try { double timeTook = elementPresent(seconds); WebDriverWait wait = new WebDriverWait(element.getDriver(), (long) (seconds - timeTook), DEFAULT_POLLING_INTERVAL);...
java
public void text(int row, int col, String expectedText, double seconds) { double end = System.currentTimeMillis() + (seconds * 1000); try { elementPresent(seconds); while (!element.get().tableCell(row, col).get().text().equals(expectedText) && System.currentTimeMillis() < end) ; ...
java
public void value(String expectedValue, double seconds) { double end = System.currentTimeMillis() + (seconds * 1000); try { double timeTook = elementPresent(seconds); WebDriverWait wait = new WebDriverWait(element.getDriver(), (long) (seconds - timeTook), DEFAULT_POLLING_INTERVAL...
java
public void selectedOption(String expectedText, double seconds) { double end = System.currentTimeMillis() + (seconds * 1000); try { elementPresent(seconds); if (!element.is().select()) { throw new TimeoutException(ELEMENT_NOT_SELECT); } whi...
java
public void selectedValue(String expectedValue, double seconds) { double end = System.currentTimeMillis() + (seconds * 1000); try { elementPresent(seconds); if (!element.is().select()) { throw new TimeoutException(ELEMENT_NOT_SELECT); } whi...
java
public void selectOptions(String[] expectedOptions, double seconds) { double end = System.currentTimeMillis() + (seconds * 1000); try { elementPresent(seconds); if (!element.is().select()) { throw new TimeoutException(ELEMENT_NOT_SELECT); } ...
java
public void selectValues(String[] expectedValues, double seconds) { double end = System.currentTimeMillis() + (seconds * 1000); try { elementPresent(seconds); if (!element.is().select()) { throw new TimeoutException(ELEMENT_NOT_SELECT); } w...
java
public static BrowserName lookup(String b) throws InvalidBrowserException { for (BrowserName browser : BrowserName.values()) { if (browser.name().equalsIgnoreCase(b)) { return browser; } } throw new InvalidBrowserException("The selected browser " + b + " i...
java
public void text(String expectedPattern) { String text = checkText(expectedPattern, 0, 0); assertNotNull(NO_ELEMENT_FOUND, text); assertTrue("Text Mismatch: text of '" + text + DOES_NOT_MATCH_PATTERN + expectedPattern + "'", text.matches(expectedPattern)); }
java
public void text(int row, int col, String pattern) { String text = checkText(row, col, pattern, 0, 0); assertNotNull(NO_ELEMENT_FOUND, text); assertTrue("Text Mismatch: text of '" + text + DOES_NOT_MATCH_PATTERN + pattern + "'", text.matches(pattern)); }
java
@SuppressWarnings("squid:S2259") public void value(String expectedPattern) { String value = checkValue(expectedPattern, 0, 0); String reason = NO_ELEMENT_FOUND; if (value == null && getElement().is().present()) { reason = "Element not input"; } assertNotNull(reaso...
java
@SuppressWarnings("squid:S2259") public void selectedOption(String expectedPattern) { String selectedOption = checkSelectedOption(expectedPattern, 0, 0); String reason = NO_ELEMENT_FOUND; if (selectedOption == null && getElement().is().present()) { reason = ELEMENT_NOT_SELECT; ...
java
@SuppressWarnings("squid:S2259") public void selectedValue(String expectedPattern) { String selectedValue = checkSelectedValue(expectedPattern, 0, 0); String reason = NO_ELEMENT_FOUND; if (selectedValue == null && getElement().is().present()) { reason = ELEMENT_NOT_SELECT; ...
java
private boolean isPopupPresent() { boolean isPresent = false; try { driver.switchTo().alert(); isPresent = true; } catch (NoAlertPresentException e) { log.info(e); } return isPresent; }
java
public boolean cookiePresent(String expectedCookieName) { boolean isCookiePresent = false; try { if (driver.manage().getCookieNamed(expectedCookieName) != null) { isCookiePresent = true; } return isCookiePresent; } catch (Exception e) { ...
java
public boolean textPresentInSource(String expectedText) { try { return driver.getPageSource().contains(expectedText); } catch (Exception e) { log.info(e); return false; } }
java
public void clazz(String unexpectedClass) { String clazz = checkClazz(unexpectedClass, 0, 0); assertNotNull(NO_ELEMENT_FOUND, clazz); assertFalse("Class Mismatch: class of '" + clazz + CONTAINS + unexpectedClass + "'", clazz.contains(unexpectedClass)); }
java
public void attribute(String expectedAttribute) { Set<String> attributes = checkAttribute(expectedAttribute, 0, 0); assertNotNull(NO_ELEMENT_FOUND, attributes); assertFalse("Attribute found: element attributes of '" + String.join(",", attributes) + CONTAINS + expectedAttribute + ...
java
public void text(String expectedText) { String text = checkText(expectedText, 0, 0); assertNotNull(NO_ELEMENT_FOUND, text); assertFalse("Text found: element text of '" + text + CONTAINS + expectedText + "'", text.contains(expectedText)); }
java
@SuppressWarnings("squid:S2259") public void value(String expectedValue) { String value = checkValue(expectedValue, 0, 0); String reason = NO_ELEMENT_FOUND; if (value == null && getElement().is().present()) { reason = "Element not input"; } assertNotNull(reason, v...
java
public void selectValue(String expectedValue) { String[] values = checkSelectValue(expectedValue, 0, 0); String reason = NO_ELEMENT_FOUND; if (values == null && getElement().is().present()) { reason = ELEMENT_NOT_SELECT; } assertNotNull(reason, values); assert...
java
@Override public void contains(Map<String, Object> expectedPairs) { assertTrue("Expected to find " + Reporter.formatKeyPair(expectedPairs), checkContains(expectedPairs)); }
java
@Override public void contains(JsonElement expectedJson) { assertTrue("Expected to find " + GSON.toJson(expectedJson), checkContains(expectedJson)); }
java
public Element newElement(Locator type, String locator) { return new Element(driver, reporter, type, locator); }
java
public void wait(double seconds) { String action = "Wait " + seconds + SECONDS; String expected = WAITED + seconds + SECONDS; try { Thread.sleep((long) (seconds * 1000)); } catch (InterruptedException e) { log.warn(e); reporter.fail(action, expected, "...
java
public void goToURL(String url) { String action = "Loading " + url; String expected = "Loaded " + url; double start = System.currentTimeMillis(); try { driver.get(url); } catch (Exception e) { log.warn(e); reporter.fail(action, expected, "Fail ...
java
public void takeScreenshot(String imageName) { if (browser.getName() == BrowserName.HTMLUNIT) { return; } try { // take a screenshot File srcFile; if (Property.isHubSet()) { WebDriver augemented = new Augmenter().augment(driver); ...
java
public void goBack() { String action = "Going back one page"; String expected = "Previous page from browser history is loaded"; try { driver.navigate().back(); } catch (Exception e) { reporter.fail(action, expected, "Browser was unable to go back one page. " + e.g...
java
public void setCookie(Cookie cookie) { String domain = cookie.getDomain(); Date expiry = cookie.getExpiry(); String name = cookie.getName(); String path = cookie.getPath(); String value = cookie.getValue(); String action = "Setting up cookie with attributes:<div><table><...
java
public void deleteCookie(String cookieName) { String action = "Deleting cookie <i>" + cookieName + "</i>"; String expected = "Cookie <i>" + cookieName + "</i> is removed"; try { Cookie cookie = driver.manage().getCookieNamed(cookieName); if (cookie == null) { ...
java
public void deleteAllCookies() { String action = "Deleting all cookies"; String expected = "All cookies are removed"; try { driver.manage().deleteAllCookies(); } catch (Exception e) { reporter.fail(action, expected, "Unable to remove all cookies. " + e.getMessage(...
java
public void resize(int width, int height) { String action = "Resizing browser to " + width + " x " + height; String expected = "Browser is resized to " + width + " x " + height; try { Dimension dimension = new Dimension(width, height); driver.manage().window().setSize(dim...
java
public void scroll(int desiredPosition) { String action = "Scrolling page by " + desiredPosition + " pixels"; String expected = "Page is scrolled down " + desiredPosition + " pixels"; Long newPosition; try { JavascriptExecutor jse = (JavascriptExecutor) driver; Lo...
java
public void openNewWindow(String url) { String action = "Opening new window to url " + url; String expected = "New window is opened to url " + url; try { JavascriptExecutor jse = (JavascriptExecutor) driver; jse.executeScript("window.open('" + url + "','_blank');"); ...
java
public void switchToNewWindow() { String action = "Switching to the new window"; String expected = "New window is available and selected"; try { parentWindow = driver.getWindowHandle(); for (String winHandle : driver.getWindowHandles()) { driver.switchTo()...
java
public void switchToParentWindow() { String action = "Switching back to parent window"; String expected = "Parent window is available and selected"; try { driver.switchTo().window(parentWindow); } catch (Exception e) { reporter.fail(action, expected, "Parent windo...
java
public void closeCurrentWindow() { String action = "Closing currently selected window"; String expected = "Current window is closed"; try { driver.close(); } catch (Exception e) { reporter.fail(action, expected, "Current window was unable to be closed. " + e.getMe...
java
public void selectMainWindow() { String action = "Switching to main window"; String expected = "Main window is selected"; try { driver.switchTo().defaultContent(); } catch (Exception e) { reporter.fail(action, expected, "Main window was not selected. " + e.getMess...
java
public void selectParentFrame() { String action = "Switching to parent frame"; String expected = "Parent frame is selected"; try { driver.switchTo().parentFrame(); } catch (Exception e) { reporter.fail(action, expected, "Parent frame was not selected. " + e.getMes...
java
public void acceptCertificate() { String action = "Clicking override link to accept ssl certificate"; String result = "Override link clicked"; //for IE and Edge if (browser.getName() == BrowserName.INTERNETEXPLORER || browser.getName() == BrowserName.EDGE) { Element overrideL...
java
private boolean isNotConfirmation(String action, String expected) { // wait for element to be present if (!is.confirmationPresent()) { waitFor.confirmationPresent(); } if (!is.confirmationPresent()) { reporter.fail(action, expected, "Unable to click confirmation a...
java
private boolean isNotPrompt(String action, String expected, String perform) { // wait for element to be present if (!is.promptPresent()) { waitFor.promptPresent(); } if (!is.promptPresent()) { reporter.fail(action, expected, "Unable to " + perform + " prompt as it...
java
public void typeIntoPrompt(String text) { String action = "Typing text '" + text + "' into prompt"; String expected = "Prompt is present and enabled to have text " + text + " typed in"; if (isNotPrompt(action, expected, "type into")) { return; } try { Aler...
java
@Override public void titleMatches(String expectedTitlePattern) { String title = checkTitleMatches(expectedTitlePattern, 0, 0); assertTrue("Title Mismatch: title of '" + title + DOES_NOT_MATCH_PATTERN + expectedTitlePattern + "'", title.matches(expectedTitlePattern)); }
java
@Override public void alertMatches(String expectedAlertPattern) { String alert = checkAlertMatches(expectedAlertPattern, 0, 0); assertTrue("Alert Text Mismatch: alert text of '" + alert + DOES_NOT_MATCH_PATTERN + expectedAlertPattern + "'", alert.matches(expectedAlertPattern)); }
java
@Override public void confirmationMatches(String expectedConfirmationPattern) { String confirmation = checkConfirmationMatches(expectedConfirmationPattern, 0, 0); assertTrue("Confirmation Text Mismatch: confirmation text of '" + confirmation + DOES_NOT_MATCH_PATTERN + expectedConfirmationPattern + "...
java
@Override public void promptMatches(String expectedPromptPattern) { String prompt = checkPromptMatches(expectedPromptPattern, 0, 0); assertTrue("Prompt Text Mismatch: prompt text of '" + prompt + DOES_NOT_MATCH_PATTERN + expectedPromptPattern + "'", prompt.matches(expectedPromptPattern)); }
java
@Override public void cookieEquals(String cookieName, String expectedCookieValue) { assertEquals("Cookie Value Mismatch", expectedCookieValue, checkCookieEquals(cookieName, expectedCookieValue, 0, 0)); }
java
@Override public void cookieMatches(String cookieName, String expectedCookiePattern) { String cookie = checkCookieMatches(cookieName, expectedCookiePattern, 0, 0); assertTrue("Cookie Value Mismatch: cookie value of '" + cookie + DOES_NOT_MATCH_PATTERN + expectedCookiePattern + "'", cookie.matches(ex...
java
public void clazz(String expectedClass) { String clazz = checkClazz(expectedClass, 0, 0); assertNotNull(NO_ELEMENT_FOUND, clazz); assertTrue("Class Mismatch: class of '" + clazz + DOES_NOT_CONTAIN + expectedClass + "'", clazz.contains(expectedClass)); }
java
public void attribute(String expectedAttribute) { Set<String> attributes = checkAttribute(expectedAttribute, 0, 0); assertNotNull(NO_ELEMENT_FOUND, attributes); assertTrue("Attribute not found: element attributes of '" + String.join(",", attributes) + DOES_NOT_CONTAIN + expectedA...
java
public void text(String expectedText) { String text = checkText(expectedText, 0, 0); assertNotNull(NO_ELEMENT_FOUND, text); assertTrue("Text not found: element text of '" + text + DOES_NOT_CONTAIN + expectedText + "'", text.contains(expectedText)); }
java
@SuppressWarnings("squid:S2259") public void value(String expectedValue) { String value = checkValue(expectedValue, 0, 0); String reason = NO_ELEMENT_FOUND; if (value == null && getElement().is().present()) { reason = "Element not input"; } assertNotNull(reason, v...
java
public void selectOption(String expectedOption) { String[] options = checkSelectOption(expectedOption, 0, 0); String reason = NO_ELEMENT_FOUND; if (options == null && getElement().is().present()) { reason = ELEMENT_NOT_SELECT; } assertNotNull(reason, options); ...
java
public void selectOptions(int numOfOptions) { int options = checkSelectOptions(numOfOptions, 0, 0); String reason = NO_ELEMENT_FOUND; if (options < 0 && getElement().is().present()) { reason = ELEMENT_NOT_SELECT; } assertTrue(reason, options >= 0); assertEqual...
java
public void columns(int numOfColumns) { int columns = checkColumns(numOfColumns, 0, 0); String reason = NO_ELEMENT_FOUND; if (columns < 0 && getElement().is().present()) { reason = "Element not table"; } assertTrue(reason, columns >= 0); assertEquals("Number o...
java
public void rows(int numOfRows) { int rows = checkRows(numOfRows, 0, 0); String reason = NO_ELEMENT_FOUND; if (rows < 0 && getElement().is().present()) { reason = "Element not table"; } assertTrue(reason, rows >= 0); assertEquals("Number of rows mismatch", num...
java
private void recordResult(ITestResult result) { // finalize our output file Reporter reporter = (Reporter) result.getAttribute(REPORTER); String htmlFilename = ""; String pdfFilename = ""; if (reporter != null) { // subtracting one from the status ordinal to map ITest...
java
@SuppressWarnings("unchecked") protected <T> List<T> getDialogListeners(Class<T> listenerInterface) { final Fragment targetFragment = getTargetFragment(); List<T> listeners = new ArrayList<T>(2); if (targetFragment != null && listenerInterface.isAssignableFrom(targetFragment.getClass())) { ...
java
private void modifyButtonsBasedOnScrollableContent(boolean scrollable) { if (getView() == null) { return; } View vButtonDivider = getView().findViewById(R.id.sdl_button_divider); View vButtonsBottomSpace = getView().findViewById(R.id.sdl_buttons_bottom_space); View vD...
java
@StyleRes private int resolveTheme() { // First check if getTheme() returns some usable theme. int theme = getTheme(); if (theme != 0) { return theme; } // Get the light/dark attribute from the Activity's Theme. boolean useLightTheme = isActivityThemeLigh...
java
private boolean isActivityThemeLight() { try { TypedValue val = new TypedValue(); //Reading attr value from current theme getActivity().getTheme().resolveAttribute(R.attr.isLightTheme, val, true); //Passing the resource ID to TypedArray to get the attribute valu...
java
@Override public Long processIdentifier(Object id) { Objects.requireNonNull(id, "Element identifier cannot be null"); // check for Long if (id instanceof Long) return (Long)id; // check for numeric types if (id instanceof Number) return ((Number)id).lo...
java
@Override public String matchPredicateOperand(String alias) { Objects.requireNonNull(alias, "alias cannot be null"); // alias.identifier return alias + "." + idFieldName; }
java
public void createIndex(String label, String propertyName) { Objects.requireNonNull(label, "label cannot be null"); Objects.requireNonNull(propertyName, "propertyName cannot be null"); // get current session Neo4JSession session = currentSession(); // transaction should be ready ...
java
private int getIndex(int ind) { // Try to find column index int i = Arrays.binarySearchGreater(index, ind, 0, used); // Found if (i < used && index[i] == ind) return i; int[] newIndex = index; double[] newData = data; // Check available memory ...
java