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


Java Scala.orNull方法代码示例

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


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

示例1: bindings

import play.libs.Scala; //导入方法依赖的package包/类
@Override
public Seq<Binding<?>> bindings(Environment environment, Configuration configuration) {
    GlobalParams.AWS_ACCESS_KEY = Scala.orNull(configuration.getString("AWS_ACCESS_KEY", scala.Option.empty()));
    GlobalParams.AWS_SECRET_KEY = Scala.orNull(configuration.getString("AWS_SECRET_KEY", scala.Option.empty()));
    GlobalParams.AWS_S3_BUCKET = Scala.orNull(configuration.getString("AWS_S3_BUCKET", scala.Option.empty()));

    String accessKey = GlobalParams.AWS_ACCESS_KEY;
    String secretKey = GlobalParams.AWS_SECRET_KEY;
    s3Bucket = GlobalParams.AWS_S3_BUCKET;

    if ((accessKey != null) && (secretKey != null)) {
        awsCredentials = new BasicAWSCredentials(accessKey, secretKey);
        amazonS3 = new AmazonS3Client(awsCredentials);

        Logger.info("Using S3 Bucket: " + s3Bucket);
    }
    return seq(
            bind(S3Plugin.class).to(S3PluginImpl.class)
    );
}
 
开发者ID:webinerds,项目名称:s3-proxy-chunk-upload,代码行数:21,代码来源:S3Module.java

示例2: plugin

import play.libs.Scala; //导入方法依赖的package包/类
/**
 * Retrieve the plugin instance for the class.
 */
public <T> T plugin(Class<T> pluginClass) {
    return Scala.orNull(application.plugin(pluginClass));
}
 
开发者ID:vangav,项目名称:vos_backend,代码行数:7,代码来源:Application.java

示例3: getString

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

示例4: getNanoseconds

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

示例5: getBytes

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

示例6: getDouble

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

示例7: getInt

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

示例8: getLong

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

示例9: getNumber

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

示例10: getBoolean

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

示例11: getBooleanList

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

示例12: 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)
 * @return a configuration value or <code>null</code>
 */        
public List<Long> getBytesList(String key) {
    return (List<Long>)Scala.orNull(conf.getBytesList(key));
}
 
开发者ID:vangav,项目名称:vos_backend,代码行数:10,代码来源:Configuration.java

示例13: getDoubleList

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

示例14: getIntList

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

示例15: getLongList

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


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