com.datastax.driver.core.LocalDate.getDaysSinceEpoch()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(78)

本文整理了Java中com.datastax.driver.core.LocalDate.getDaysSinceEpoch()方法的一些代码示例,展示了LocalDate.getDaysSinceEpoch()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LocalDate.getDaysSinceEpoch()方法的具体详情如下:
包路径:com.datastax.driver.core.LocalDate
类名称:LocalDate
方法名:getDaysSinceEpoch

LocalDate.getDaysSinceEpoch介绍

[英]Returns the number of days since January 1st, 1970 GMT.
[中]返回自1970年1月1日GMT以来的天数。

代码示例

代码示例来源:origin: com.datastax.cassandra/cassandra-driver-core

@Override
 protected Integer serialize(LocalDate value) {
  return value.getDaysSinceEpoch();
 }
}

代码示例来源:origin: com.datastax.cassandra/cassandra-driver-core

public LocalDateAssert hasDaysSinceEpoch(int expected) {
 assertThat(actual.getDaysSinceEpoch()).isEqualTo(expected);
 return this;
}

代码示例来源:origin: com.datastax.cassandra/cassandra-driver-core

@Override
public ByteBuffer serialize(LocalDate value, ProtocolVersion protocolVersion) {
 if (value == null) return null;
 int unsigned = CodecUtils.fromSignedToUnsignedInt(value.getDaysSinceEpoch());
 return IntCodec.instance.serializeNoBoxing(unsigned, protocolVersion);
}

代码示例来源:origin: com.datastax.dse/dse-java-driver-core

@Override
 protected Integer serialize(LocalDate value) {
  return value.getDaysSinceEpoch();
 }
}

代码示例来源:origin: com.yugabyte/cassandra-driver-core

@Override
public ByteBuffer serialize(LocalDate value, ProtocolVersion protocolVersion) {
  if (value == null)
    return null;
  int unsigned = CodecUtils.fromSignedToUnsignedInt(value.getDaysSinceEpoch());
  return IntCodec.instance.serializeNoBoxing(unsigned, protocolVersion);
}

代码示例来源:origin: com.facebook.presto.cassandra/cassandra-driver

@Override
public ByteBuffer serialize(LocalDate value, ProtocolVersion protocolVersion) {
  if (value == null)
    return null;
  int unsigned = CodecUtils.fromSignedToUnsignedInt(value.getDaysSinceEpoch());
  return IntCodec.instance.serializeNoBoxing(unsigned, protocolVersion);
}

代码示例来源:origin: io.prestosql.cassandra/cassandra-driver

@Override
public ByteBuffer serialize(LocalDate value, ProtocolVersion protocolVersion) {
  if (value == null)
    return null;
  int unsigned = CodecUtils.fromSignedToUnsignedInt(value.getDaysSinceEpoch());
  return IntCodec.instance.serializeNoBoxing(unsigned, protocolVersion);
}

代码示例来源:origin: com.datastax.dse/dse-java-driver-core

public LocalDateAssert hasDaysSinceEpoch(int expected) {
 assertThat(actual.getDaysSinceEpoch()).isEqualTo(expected);
 return this;
}

相关文章