本文整理汇总了Java中com.google.common.primitives.UnsignedInteger.intValue方法的典型用法代码示例。如果您正苦于以下问题:Java UnsignedInteger.intValue方法的具体用法?Java UnsignedInteger.intValue怎么用?Java UnsignedInteger.intValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.common.primitives.UnsignedInteger
的用法示例。
在下文中一共展示了UnsignedInteger.intValue方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: build
import com.google.common.primitives.UnsignedInteger; //导入方法依赖的package包/类
public CrtAuthServer build() {
checkNotNull(serverName);
checkNotNull(keyProviders);
checkNotNull(secret);
if (keyProviders.isEmpty()) {
throw new IllegalArgumentException("At least one key provider must be specified.");
}
final UnsignedInteger lifetime = tokenLifetimeSeconds.or(DEFAULT_TOKEN_LIFETIME_SECONDS);
if (lifetime.intValue() > MAX_VALIDITY) {
throw new IllegalArgumentException(String.format(
"Overly long token lifetime. Max lifetime is %d.", MAX_VALIDITY));
}
return new CrtAuthServer(lifetime,
serverName,
keyProviders,
timeSupplier.or(DEFAULT_TIME_SUPPLIER),
random.or(new Random()),
secret
);
}
示例2: setValidFromTimestamp
import com.google.common.primitives.UnsignedInteger; //导入方法依赖的package包/类
public Builder setValidFromTimestamp(UnsignedInteger timestamp) {
this.validFromTimestamp = timestamp.intValue();
return this;
}
示例3: setValidToTimestamp
import com.google.common.primitives.UnsignedInteger; //导入方法依赖的package包/类
public Builder setValidToTimestamp(UnsignedInteger timestamp) {
this.validToTimestamp = timestamp.intValue();
return this;
}
示例4: Key
import com.google.common.primitives.UnsignedInteger; //导入方法依赖的package包/类
public Key(UnsignedInteger num) {
this(num.intValue());
}