• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Nullable类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.beust.jcommander.internal.Nullable的典型用法代码示例。如果您正苦于以下问题:Java Nullable类的具体用法?Java Nullable怎么用?Java Nullable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Nullable类属于com.beust.jcommander.internal包,在下文中一共展示了Nullable类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: textToBeEqualsToExpectedValue

import com.beust.jcommander.internal.Nullable; //导入依赖的package包/类
/**
 * Expects that the target element contains the given value as text.
 * The inner text and 'value' attribute of the element is 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 new ExpectedCondition<Boolean>() {
        /**
         * {@inheritDoc}
         */
        @Override
        public Boolean apply(@Nullable WebDriver driver) {
            try {
                WebElement element = driver.findElement(locator);
                if (element != null && value != null) {
                    if (element.getAttribute(VALUE) == null || !value.equals(element.getAttribute(VALUE).trim())) {
                        if (!value.equals(element.getText())) {
                            return false;
                        }
                    }
                    return true;
                }
            } catch (Exception e) {
            }
            return false;
        }
    };
}
 
开发者ID:NoraUi,项目名称:NoraUi,代码行数:34,代码来源:ExpectSteps.java


示例2: newWindowOpens

import com.beust.jcommander.internal.Nullable; //导入依赖的package包/类
/**
 * @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 new ExpectedCondition<String>() {

        /**
         * {@inheritDoc}
         */
        @Override
        public String apply(@Nullable WebDriver driver) {
            if (driver != null && !currentHandles.equals(driver.getWindowHandles())) {
                for (String s : driver.getWindowHandles()) {
                    if (!currentHandles.contains(s)) {
                        return s;
                    }
                }
            }
            return null;
        }
    };
}
 
开发者ID:NoraUi,项目名称:NoraUi,代码行数:25,代码来源:WindowManager.java


示例3: Client

import com.beust.jcommander.internal.Nullable; //导入依赖的package包/类
public Client(
    ClientType clientType,
    String networkAddress,
    String project,
    @Nullable String subscription,
    ScheduledExecutorService executorService,
    @Nullable Supplier<LoadtestGrpc.LoadtestStub> stubFactory) {
      this.clientType = clientType;
  this.networkAddress = networkAddress;
  this.clientStatus = ClientStatus.NONE;
  this.project = project;
  this.topic = TOPIC_PREFIX + getTopicSuffix(clientType);
  this.subscription = subscription;
  this.executorService = executorService;
  this.stubFactory = stubFactory;
}
 
开发者ID:GoogleCloudPlatform,项目名称:pubsub,代码行数:17,代码来源:Client.java


示例4: JCommander

import com.beust.jcommander.internal.Nullable; //导入依赖的package包/类
/**
 * @param object The arg object expected to contain {@link Parameter} annotations.
 * @param bundle The bundle to use for the descriptions. Can be null.
 * @param args The arguments to parse (optional).
 */
public JCommander(Object object, @Nullable  ResourceBundle bundle, String... args) {
    this();
    addObject(object);
    if (bundle != null) {
        setDescriptionsBundle(bundle);
    }
    createDescriptions();
    if (args != null) {
        parse(args);
    }
}
 
开发者ID:georghinkel,项目名称:ttc2017smartGrids,代码行数:17,代码来源:JCommander.java


示例5: XHMMEmissionProbabilityCalculator

import com.beust.jcommander.internal.Nullable; //导入依赖的package包/类
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;
}
 
开发者ID:broadinstitute,项目名称:gatk-protected,代码行数:8,代码来源:XHMMEmissionProbabilityCalculator.java


示例6: sarsaRunFourier

import com.beust.jcommander.internal.Nullable; //导入依赖的package包/类
public static void sarsaRunFourier(
        final double discount, final String name, final int order, final double learningRate, final double lambda,
        NormalizedVariableFeatures inputFeatures, final PrototypeScenario scenario, final Path containerPath,
        final Steppable additionalSteppable, final double initialEpsilon, @Nullable Pair<ShodanStateOil,Action> baseline,
        String... featureNames) throws IOException, NoSuchFieldException, IllegalAccessException {




    //write a YAML for the results
    HashMap<String,Object> resultObject = new HashMap<>();
    resultObject.put("method","sarsa");
    resultObject.put("lambda",lambda);
    resultObject.put("discount",discount);
    resultObject.put("learning_rate",learningRate);
    resultObject.put("factors",featureNames);
    resultObject.put("name",name);
    resultObject.put("base","fourier");
    resultObject.put("order",order);
    resultObject.put("initial_epsilon", initialEpsilon);
    resultObject.put("normalized",true);
    resultObject.put("baseline", baseline != null);
    //run sarsa, return last fitness
    double fitness = runSarsa(new FourierBasis(inputFeatures, order), name, discount, learningRate, lambda,
                              containerPath, scenario,baseline, resultObject, initialEpsilon);

    double bestFitness = fitness;
    if(resultObject.containsKey("fitness"))
        bestFitness = Math.max(bestFitness, (Double) resultObject.get("fitness"));
    resultObject.put("fitness",bestFitness);
    resultObject.put("episodes",NUMBER_OF_EPISODES);

    //to file
    File yamlFile = containerPath.resolve("results").resolve(name + ".yaml").toFile();
    Yaml yaml = new Yaml();
    yaml.dump(resultObject,new FileWriter(yamlFile));
}
 
开发者ID:CarrKnight,项目名称:POSEIDON,代码行数:38,代码来源:BurlapQuotaInfinity.java


示例7: sarsaRunFourier

import com.beust.jcommander.internal.Nullable; //导入依赖的package包/类
public static void sarsaRunFourier(
        final double discount, final String name, final int order, final double learningRate, final double lambda,
        NormalizedVariableFeatures inputFeatures, final PrototypeScenario scenario, final Path containerPath,
        final Steppable additionalSteppable, @Nullable Pair<ShodanStateOil,Action> baseline,
        String... featureNames) throws IOException, NoSuchFieldException, IllegalAccessException {



    ShodanEnvironment environment = new ShodanEnvironment(scenario, additionalSteppable);

    //write a YAML for the results
    HashMap<String,Object> resultObject = new HashMap<>();
    resultObject.put("method","sarsa");
    resultObject.put("lambda",lambda);
    resultObject.put("discount",discount);
    resultObject.put("learning_rate",learningRate);
    resultObject.put("factors",featureNames);
    resultObject.put("name",name);
    resultObject.put("base","fourier");
    resultObject.put("order",order);
    resultObject.put("normalized",true);
    //run sarsa, return last fitness
    double fitness = runSarsa(new FourierBasis(inputFeatures, order), name, discount, learningRate, lambda,
                              containerPath, environment,baseline , resultObject);

    double bestFitness = fitness;
    if(resultObject.containsKey("fitness"))
        bestFitness = Math.max(bestFitness, (Double) resultObject.get("fitness"));
    resultObject.put("fitness",bestFitness);
    resultObject.put("episodes",NUMBER_OF_EPISODES);

    //to file
    File yamlFile = containerPath.resolve("results").resolve(name + ".yaml").toFile();
    Yaml yaml = new Yaml();
    yaml.dump(resultObject,new FileWriter(yamlFile));
}
 
开发者ID:CarrKnight,项目名称:POSEIDON,代码行数:37,代码来源:BurlapShodan.java


示例8: JCommander

import com.beust.jcommander.internal.Nullable; //导入依赖的package包/类
/**
 * @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);
}
 
开发者ID:jeffoffutt,项目名称:muJava,代码行数:9,代码来源:JCommander.java


示例9: JCommander

import com.beust.jcommander.internal.Nullable; //导入依赖的package包/类
/**
 * @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);
}
 
开发者ID:Corporatique-dev,项目名称:Corporatique,代码行数:9,代码来源:JCommander.java



注:本文中的com.beust.jcommander.internal.Nullable类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Bytecode类代码示例发布时间:2022-05-22
下一篇:
Java CellTree类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap