com.beust.jcommander.internal.Nullable Java Examples
The following examples show how to use
com.beust.jcommander.internal.Nullable.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ExpectSteps.java From NoraUi with GNU Affero General Public License v3.0 | 6 votes |
/** * @deprecated As of release 4.1, replaced by {@link com.github.noraui.selenium.NoraUiExpectedConditions#atLeastOneOfTheseElementsIsPresent(By... locators)} * Expects that at least one of the given elements is present. * @param locators * The list of elements identified by their locators * @return true or false */ @Deprecated public static ExpectedCondition<WebElement> atLeastOneOfTheseElementsIsPresent(final By... locators) { return (@Nullable WebDriver driver) -> { WebElement element = null; if (driver != null && locators.length > 0) { for (final By b : locators) { try { element = driver.findElement(b); break; } catch (final Exception e) { } } } return element; }; }
Example #2
Source File: NoraUiExpectedConditions.java From NoraUi with GNU Affero General Public License v3.0 | 6 votes |
/** * Expects that at least one of the given elements is present. * * @param locators * The list of elements identified by their locators * @return true or false */ public static ExpectedCondition<WebElement> atLeastOneOfTheseElementsIsPresent(final By... locators) { return (@Nullable WebDriver driver) -> { WebElement element = null; if (driver != null && locators.length > 0) { for (final By b : locators) { try { element = driver.findElement(b); break; } catch (final Exception e) { } } } return element; }; }
Example #3
Source File: ExpectSteps.java From NoraUi with GNU Affero General Public License v3.0 | 5 votes |
/** * @deprecated As of release 4.1, replaced by {@link com.github.noraui.selenium.NoraUiExpectedConditions#textToBeEqualsToExpectedValue(By, String)} * Expects that the target element contains the given value as text. * The inner text and 'value' attribute of the element are checked. * @param locator * is the selenium locator * @param value * is the expected value * @return true or false */ @Deprecated public static ExpectedCondition<Boolean> textToBeEqualsToExpectedValue(final By locator, final String value) { return (@Nullable WebDriver driver) -> { try { final WebElement element = driver.findElement(locator); if (element != null && value != null) { return !((element.getAttribute(VALUE) == null || !value.equals(element.getAttribute(VALUE).trim())) && !value.equals(element.getText().replaceAll("\n", ""))); } } catch (final Exception e) { } return false; }; }
Example #4
Source File: NoraUiExpectedConditions.java From NoraUi with GNU Affero General Public License v3.0 | 5 votes |
/** * Expects that the target element equals the given value as text. * The inner text and 'value' attribute of the element are checked. * * @param locator * is the selenium locator * @param value * is the expected value * @return true or false */ public static ExpectedCondition<Boolean> textToBeEqualsToExpectedValue(final By locator, final String value) { return (@Nullable WebDriver driver) -> { try { final WebElement element = driver.findElement(locator); if (element != null && value != null) { return !((element.getAttribute(VALUE) == null || !value.equals(element.getAttribute(VALUE).trim())) && !value.equals(element.getText().replaceAll("\n", ""))); } } catch (final Exception e) { } return false; }; }
Example #5
Source File: NoraUiExpectedConditions.java From NoraUi with GNU Affero General Public License v3.0 | 5 votes |
/** * Expects that the target element contains the given value as text. * The inner text and 'value' attribute of the element are checked. * * @param locator * is the selenium locator * @param value * is the expected value * @return true or false */ public static ExpectedCondition<Boolean> textContainsExpectedValue(final By locator, final String value) { return (@Nullable WebDriver driver) -> { try { final WebElement element = driver.findElement(locator); if (element != null && value != null) { return !((element.getAttribute(VALUE) == null || !element.getAttribute(VALUE).trim().contains(value)) && !element.getText().replaceAll("\n", "").contains(value)); } } catch (final Exception e) { } return false; }; }
Example #6
Source File: NoraUiExpectedConditions.java From NoraUi with GNU Affero General Public License v3.0 | 5 votes |
/** * @param currentHandles * is list of opened windows. * @return a string with new Window Opens (GUID) */ public static ExpectedCondition<String> newWindowOpens(final Set<String> currentHandles) { return (@Nullable WebDriver driver) -> { if (driver != null && !currentHandles.equals(driver.getWindowHandles())) { for (String s : driver.getWindowHandles()) { if (!currentHandles.contains(s)) { return s; } } } return null; }; }
Example #7
Source File: NoraUiExpectedConditions.java From NoraUi with GNU Affero General Public License v3.0 | 5 votes |
/** * text to be presentInElement on element located. * * @param locator * is the selenium locator * @return content string (not empty). */ public static ExpectedCondition<String> textToBePresentInElement(final By locator) { return (@Nullable WebDriver driver) -> { try { final WebElement element = driver.findElement(locator); if (element != null && element.getText() != null && !"".equals(element.getText())) { return element.getText(); } } catch (final Exception e) { } return null; }; }
Example #8
Source File: WindowManager.java From NoraUi with GNU Affero General Public License v3.0 | 5 votes |
/** * @deprecated As of release 4.1, replaced by {@link com.github.noraui.selenium.NoraUiExpectedConditions#newWindowOpens(Set)} * @param currentHandles * is list of opened windows. * @return a string with new Window Opens (GUID) */ @Deprecated public static ExpectedCondition<String> newWindowOpens(final Set<String> currentHandles) { return (@Nullable WebDriver driver) -> { if (driver != null && !currentHandles.equals(driver.getWindowHandles())) { for (String s : driver.getWindowHandles()) { if (!currentHandles.contains(s)) { return s; } } } return null; }; }
Example #9
Source File: XHMMEmissionProbabilityCalculator.java From gatk-protected with BSD 3-Clause "New" or "Revised" License | 5 votes |
public XHMMEmissionProbabilityCalculator(final double deletionMean, final double duplicationMean, final double emissionStdDev, @Nullable final RandomGenerator rng) { this.deletionMean = ParamUtils.isNegativeOrZero(deletionMean, "Deletion coverage shift must be negative."); this.duplicationMean = ParamUtils.isPositiveOrZero(duplicationMean, "Duplication coverage shift must be positive"); emissionStandardDeviation = ParamUtils.isPositive(emissionStdDev, "Emission standard deviation must be positive"); this.rng = rng; }
Example #10
Source File: JCommander.java From muJava with Apache License 2.0 | 4 votes |
/** * @param object The arg object expected to contain {@link Parameter} annotations. * @param bundle The bundle to use for the descriptions. Can be null. */ public JCommander(Object object, @Nullable ResourceBundle bundle) { addObject(object); setDescriptionsBundle(bundle); }