gpt4 book ai didi

io.jenetics.jpx.ZonedDateTimes类的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 10:55:30 25 4
gpt4 key购买 nike

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

ZonedDateTimes介绍

暂无

代码示例

代码示例来源:origin: jenetics/jpx

@Override
public boolean equals(final Object obj) {
  return obj == this ||
    obj instanceof Metadata &&
    Objects.equals(((Metadata)obj)._name, _name) &&
    Objects.equals(((Metadata)obj)._description, _description) &&
    Objects.equals(((Metadata)obj)._author, _author) &&
    Objects.equals(((Metadata)obj)._copyright, _copyright) &&
    Lists.equals(((Metadata)obj)._links, _links) &&
    ZonedDateTimes.equals(((Metadata)obj)._time, _time) &&
    Objects.equals(((Metadata)obj)._keywords, _keywords) &&
    Objects.equals(((Metadata)obj)._bounds, _bounds);
}

代码示例来源:origin: jenetics/jpx

static ZonedDateTime read(final DataInput in) throws IOException {
  final long seconds = IO.readLong(in);
  final ZoneOffset offset = readZoneOffset(in);
  return ZonedDateTime.ofInstant(Instant.ofEpochSecond(seconds), offset);
}

代码示例来源:origin: jenetics/jpx

@Test
public void readWriteZonedDateTime() throws IOException {
  final Random random = new Random();
  for (int i = 0; i < 1000; ++i) {
    final ZonedDateTime zdt = nextZonedDataTime(random);
    final ByteArrayOutputStream bout = new ByteArrayOutputStream();
    final DataOutputStream dout = new DataOutputStream(bout);
    ZonedDateTimes.write(zdt, dout);
    final ByteArrayInputStream bin = new ByteArrayInputStream(bout.toByteArray());
    final DataInputStream din = new DataInputStream(bin);
    final ZonedDateTime read = ZonedDateTimes.read(din);
    Assert.assertEquals(read, zdt);
  }
}

代码示例来源:origin: jenetics/jpx

static WayPoint read(final DataInput in) throws IOException {
  final int existing = in.readInt();
  return new WayPoint(
    Latitude.ofDegrees(in.readDouble()),
    Longitude.ofDegrees(in.readDouble()),
    ((existing & (1 <<  0)) != 0) ? Length.read(in) : null,
    ((existing & (1 <<  1)) != 0) ? Speed.read(in) : null,
    ((existing & (1 <<  2)) != 0) ? ZonedDateTimes.read(in) : null,
    ((existing & (1 <<  3)) != 0) ? Degrees.read(in) : null,
    ((existing & (1 <<  4)) != 0) ? Length.read(in) : null,
    ((existing & (1 <<  5)) != 0) ? IO.readString(in) : null,
    ((existing & (1 <<  6)) != 0) ? IO.readString(in) : null,
    ((existing & (1 <<  7)) != 0) ? IO.readString(in) : null,
    ((existing & (1 <<  8)) != 0) ? IO.readString(in) : null,
    ((existing & (1 <<  9)) != 0) ? IO.reads(Link::read, in) : null,
    ((existing & (1 << 10)) != 0) ? IO.readString(in) : null,
    ((existing & (1 << 11)) != 0) ? IO.readString(in) : null,
    ((existing & (1 << 12)) != 0) ? Fix.valueOf(IO.readString(in)) : null,
    ((existing & (1 << 13)) != 0) ? UInt.read(in) : null,
    ((existing & (1 << 14)) != 0) ? in.readDouble() : null,
    ((existing & (1 << 15)) != 0) ? in.readDouble() : null,
    ((existing & (1 << 16)) != 0) ? in.readDouble() : null,
    ((existing & (1 << 17)) != 0) ? Duration.ofMillis(in.readLong()) : null,
    ((existing & (1 << 18)) != 0) ? DGPSStation.read(in) : null,
    ((existing & (1 << 19)) != 0) ? Degrees.read(in) : null
  );
}

代码示例来源:origin: jenetics/jpx

if ((existing & (1 <<  0)) != 0) _elevation.write(out);
if ((existing & (1 <<  1)) != 0) _speed.write(out);
if ((existing & (1 <<  2)) != 0) ZonedDateTimes.write(_time, out);
if ((existing & (1 <<  3)) != 0) _magneticVariation.write(out);
if ((existing & (1 <<  4)) != 0) _geoidHeight.write(out);

代码示例来源:origin: jenetics/jpx

static void write(final ZonedDateTime time, final DataOutput out)
  throws IOException
{
  IO.writeLong(time.toEpochSecond(), out);
  writeZoneOffset(time.getOffset(), out);
}

代码示例来源:origin: jenetics/jpx

@Override
public boolean equals(final Object obj) {
  return obj == this ||
    obj instanceof WayPoint &&
    Objects.equals(((WayPoint)obj)._latitude, _latitude) &&
    Objects.equals(((WayPoint)obj)._longitude, _longitude) &&
    Objects.equals(((WayPoint)obj)._elevation, _elevation) &&
    Objects.equals(((WayPoint)obj)._speed, _speed) &&
    ZonedDateTimes.equals(((WayPoint)obj)._time, _time) &&
    Objects.equals(((WayPoint)obj)._magneticVariation, _magneticVariation) &&
    Objects.equals(((WayPoint)obj)._geoidHeight, _geoidHeight) &&
    Objects.equals(((WayPoint)obj)._name, _name) &&
    Objects.equals(((WayPoint)obj)._comment, _comment) &&
    Objects.equals(((WayPoint)obj)._description, _description) &&
    Objects.equals(((WayPoint)obj)._source, _source) &&
    Lists.equals(((WayPoint)obj)._links, _links) &&
    Objects.equals(((WayPoint)obj)._symbol, _symbol) &&
    Objects.equals(((WayPoint)obj)._type, _type) &&
    Objects.equals(((WayPoint)obj)._fix, _fix) &&
    Objects.equals(((WayPoint)obj)._sat, _sat) &&
    Objects.equals(((WayPoint)obj)._hdop, _hdop) &&
    Objects.equals(((WayPoint)obj)._vdop, _vdop) &&
    Objects.equals(((WayPoint)obj)._pdop, _pdop) &&
    Objects.equals(((WayPoint)obj)._ageOfGPSData, _ageOfGPSData) &&
    Objects.equals(((WayPoint)obj)._dgpsID, _dgpsID) &&
    Objects.equals(((WayPoint)obj)._course, _course);
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com