本文整理匯總了Java中com.google.common.primitives.UnsignedInteger.fromIntBits方法的典型用法代碼示例。如果您正苦於以下問題:Java UnsignedInteger.fromIntBits方法的具體用法?Java UnsignedInteger.fromIntBits怎麽用?Java UnsignedInteger.fromIntBits使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.common.primitives.UnsignedInteger
的用法示例。
在下文中一共展示了UnsignedInteger.fromIntBits方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: isExpired
import com.google.common.primitives.UnsignedInteger; //導入方法依賴的package包/類
public static boolean isExpired(int validFrom, int validTo, TimeSupplier timeSupplier) {
UnsignedInteger currentUTime = timeSupplier.getTime();
UnsignedInteger validUFrom = UnsignedInteger.fromIntBits(validFrom);
UnsignedInteger validUTo = UnsignedInteger.fromIntBits(validTo);
return validUFrom.compareTo(currentUTime) > 0 ||
validUTo.compareTo(currentUTime) < 0;
}
示例2: generateUnsignedInteger
import com.google.common.primitives.UnsignedInteger; //導入方法依賴的package包/類
@Generates private UnsignedInteger generateUnsignedInteger() {
return UnsignedInteger.fromIntBits(generateInt());
}
示例3: generateUnsignedInteger
import com.google.common.primitives.UnsignedInteger; //導入方法依賴的package包/類
@Generates
private UnsignedInteger generateUnsignedInteger() {
return UnsignedInteger.fromIntBits(generateInt());
}
示例4: getUnsignedTimestamp
import com.google.common.primitives.UnsignedInteger; //導入方法依賴的package包/類
@Override
public UnsignedInteger getUnsignedTimestamp() {
return UnsignedInteger.fromIntBits(getIntTimestamp());
}
示例5: getUnsignedTimestamp
import com.google.common.primitives.UnsignedInteger; //導入方法依賴的package包/類
@Override
public UnsignedInteger getUnsignedTimestamp() {
return UnsignedInteger.fromIntBits(timestamp);
}
示例6: load
import com.google.common.primitives.UnsignedInteger; //導入方法依賴的package包/類
@Override
public UnsignedInteger load(final String key) {
return UnsignedInteger.fromIntBits(InetAddresses.coerceToInteger(InetAddresses.forString(key)));
}
示例7: toUnsignedInteger
import com.google.common.primitives.UnsignedInteger; //導入方法依賴的package包/類
public UnsignedInteger toUnsignedInteger() {
return UnsignedInteger.fromIntBits(value);
}