当前位置: 首页>>代码示例>>Java>>正文


Java Scala.orElse方法代码示例

本文整理汇总了Java中play.libs.Scala.orElse方法的典型用法代码示例。如果您正苦于以下问题:Java Scala.orElse方法的具体用法?Java Scala.orElse怎么用?Java Scala.orElse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在play.libs.Scala的用法示例。


在下文中一共展示了Scala.orElse方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getString

import play.libs.Scala; //导入方法依赖的package包/类
/**
 * Retrieves a configuration value as a <code>String</code>.
 *
 * @param key configuration key (relative to configuration root key)
 * @param defaultString default value if configuration key doesn't exist
 * @return a configuration value or the defaultString
 */
public String getString(String key, String defaultString) {
    return Scala.orElse(conf.getString(key, scala.Option.<scala.collection.immutable.Set<java.lang.String>>empty()), defaultString);
}
 
开发者ID:vangav,项目名称:vos_backend,代码行数:11,代码来源:Configuration.java

示例2: getMilliseconds

import play.libs.Scala; //导入方法依赖的package包/类
/**
 * Retrieves a configuration value as a <code>Milliseconds</code>.
 *
 * @param key configuration key (relative to configuration root key)
 * @param defaultMilliseconds default value if configuration key doesn't exist
 * @return a configuration value or the defaultMilliseconds
 */
public Long getMilliseconds(String key, Long defaultMilliseconds) {
    return (Long)Scala.orElse(conf.getMilliseconds(key), defaultMilliseconds);
}
 
开发者ID:vangav,项目名称:vos_backend,代码行数:11,代码来源:Configuration.java

示例3: getNanoseconds

import play.libs.Scala; //导入方法依赖的package包/类
/**
 * Retrieves a configuration value as a <code>Nanoseconds</code>.
 *
 * @param key configuration key (relative to configuration root key)
 * @param defaultNanoseconds default value if configuration key doesn't exist
 * @return a configuration value or the defaultMilliseconds
 */
public Long getNanoseconds(String key, Long defaultNanoseconds) {
    return (Long)Scala.orElse(conf.getNanoseconds(key), defaultNanoseconds);
}
 
开发者ID:vangav,项目名称:vos_backend,代码行数:11,代码来源:Configuration.java

示例4: getBytes

import play.libs.Scala; //导入方法依赖的package包/类
/**
 * Retrieves a configuration value as a <code>Bytes</code>.
 *
 * @param key configuration key (relative to configuration root key)
 * @param defaultBytes default value if configuration key doesn't exist
 * @return a configuration value or the defaultBytes
 */
public Long getBytes(String key, Long defaultBytes) {
    return (Long)Scala.orElse(conf.getBytes(key), defaultBytes);
}
 
开发者ID:vangav,项目名称:vos_backend,代码行数:11,代码来源:Configuration.java

示例5: getDouble

import play.libs.Scala; //导入方法依赖的package包/类
/**
 * Retrieves a configuration value as an <code>Double</code>.
 *
 * @param key configuration key (relative to configuration root key)
 * @param defaultDouble default value if configuration key doesn't exist
 * @return a configuration value or the defaultInteger
 */
public Double getDouble(String key, Double defaultDouble) {
    return (Double)Scala.orElse(conf.getDouble(key), defaultDouble);
}
 
开发者ID:vangav,项目名称:vos_backend,代码行数:11,代码来源:Configuration.java

示例6: getInt

import play.libs.Scala; //导入方法依赖的package包/类
/**
 * Retrieves a configuration value as an <code>Int</code>.
 *
 * @param key configuration key (relative to configuration root key)
 * @param defaultInteger default value if configuration key doesn't exist
 * @return a configuration value or the defaultInteger
 */
public Integer getInt(String key, Integer defaultInteger) {
    return (Integer)Scala.orElse(conf.getInt(key), defaultInteger);
}
 
开发者ID:vangav,项目名称:vos_backend,代码行数:11,代码来源:Configuration.java

示例7: getLong

import play.libs.Scala; //导入方法依赖的package包/类
/**
 * Retrieves a configuration value as an <code>Long</code>.
 *
 * @param key configuration key (relative to configuration root key)
 * @param defaultLong default value if configuration key doesn't exist
 * @return a configuration value or the defaultInteger
 */
public Long getLong(String key, Long defaultLong) {
    return (Long)Scala.orElse(conf.getLong(key), defaultLong);
}
 
开发者ID:vangav,项目名称:vos_backend,代码行数:11,代码来源:Configuration.java

示例8: getNumber

import play.libs.Scala; //导入方法依赖的package包/类
/**
 * Retrieves a configuration value as an <code>Number</code>.
 *
 * @param key configuration key (relative to configuration root key)
 * @param defaultNumber default value if configuration key doesn't exist
 * @return a configuration value or the defaultInteger
 */
public Number getNumber(String key, Number defaultNumber) {
    return (Number)Scala.orElse(conf.getNumber(key), defaultNumber);
}
 
开发者ID:vangav,项目名称:vos_backend,代码行数:11,代码来源:Configuration.java

示例9: getBoolean

import play.libs.Scala; //导入方法依赖的package包/类
/**
 * Retrieves a configuration value as a <code>Boolean</code>.
 *
 * @param key configuration key (relative to configuration root key)
 * @param defaultBoolean default value if configuration key doesn't exist
 * @return a configuration value or the defaultBoolean
 */
public Boolean getBoolean(String key, Boolean defaultBoolean) {
    return (Boolean)Scala.orElse(conf.getBoolean(key), defaultBoolean);
}
 
开发者ID:vangav,项目名称:vos_backend,代码行数:11,代码来源:Configuration.java

示例10: getBooleanList

import play.libs.Scala; //导入方法依赖的package包/类
/**
 * Retrieves a configuration value as a {@code List<Boolean>}.
 *
 * @param key configuration key (relative to configuration root key)
 * @param defaultList default value if configuration key doesn't exist
 * @return a configuration value or the defaultList
 */    
public List<Boolean> getBooleanList(String key, List<Boolean> defaultList) {
    return (List<Boolean>)Scala.orElse(conf.getBooleanList(key), defaultList);
}
 
开发者ID:vangav,项目名称:vos_backend,代码行数:11,代码来源:Configuration.java

示例11: getBytesList

import play.libs.Scala; //导入方法依赖的package包/类
/**
 * Retrieves a configuration value as a {@code List<Long>} representing bytes.
 *
 * @param key configuration key (relative to configuration root key)
 * @param defaultList default value if configuration key doesn't exist
 * @return a configuration value or the defaultList
 */        
public List<Long> getBytesList(String key, List<Long> defaultList) {
    return (List<Long>)Scala.orElse(conf.getBytesList(key), defaultList);
}
 
开发者ID:vangav,项目名称:vos_backend,代码行数:11,代码来源:Configuration.java

示例12: getDoubleList

import play.libs.Scala; //导入方法依赖的package包/类
/**
 * Retrieves a configuration value as a {@code List<Double>}.
 *
 * @param key configuration key (relative to configuration root key)
 * @param defaultList default value if configuration key doesn't exist
 * @return a configuration value or the defaultList
 */        
public List<Double> getDoubleList(String key, List<Double> defaultList) {
    return (List<Double>)Scala.orElse(conf.getDoubleList(key), defaultList);
}
 
开发者ID:vangav,项目名称:vos_backend,代码行数:11,代码来源:Configuration.java

示例13: getIntList

import play.libs.Scala; //导入方法依赖的package包/类
/**
 * Retrieves a configuration value as a {@code List<Integer>}.
 *
 * @param key configuration key (relative to configuration root key)
 * @param defaultList default value if configuration key doesn't exist
 * @return a configuration value or the defaultList
 */        
public List<Integer> getIntList(String key, List<Integer> defaultList) {
    return (List<Integer>)Scala.orElse(conf.getIntList(key), defaultList);
}
 
开发者ID:vangav,项目名称:vos_backend,代码行数:11,代码来源:Configuration.java

示例14: getLongList

import play.libs.Scala; //导入方法依赖的package包/类
/**
 * Retrieves a configuration value as a {@code List<Long>}.
 *
 * @param key configuration key (relative to configuration root key)
 * @param defaultList default value if configuration key doesn't exist
 * @return a configuration value or the defaultList
 */        
public List<Long> getLongList(String key, List<Long> defaultList) {
    return (List<Long>)Scala.orElse(conf.getLongList(key), defaultList);
}
 
开发者ID:vangav,项目名称:vos_backend,代码行数:11,代码来源:Configuration.java

示例15: getMillisecondsList

import play.libs.Scala; //导入方法依赖的package包/类
/**
 * Retrieves a configuration value as a {@code List<Long>} representing Milliseconds.
 *
 * @param key configuration key (relative to configuration root key)
 * @param defaultList default value if configuration key doesn't exist
 * @return a configuration value or the defaultList
 */        
public List<Long> getMillisecondsList(String key, List<Long> defaultList) {
    return (List<Long>)Scala.orElse(conf.getMillisecondsList(key), defaultList);
}
 
开发者ID:vangav,项目名称:vos_backend,代码行数:11,代码来源:Configuration.java


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