类 Instants


  • public class Instants
    extends java.lang.Object
    Utils for instant
    • 构造器概要

      构造器 
      构造器 说明
      Instants()  
    • 方法概要

      所有方法 静态方法 具体方法 
      修饰符和类型 方法 说明
      static java.time.Duration subtract​(java.time.Instant minuend, java.time.Instant subtrahend)
      subtract two instant
      static long toEpochNanos​(java.time.Instant instant)
      Nanos since epoch
      static java.time.LocalDateTime toLocalDateTime​(java.time.Instant instant)
      Instant to LocalDateTime with current system zone
      static java.time.LocalDateTime toLocalDateTime​(java.time.Instant instant, java.time.ZoneId zoneId)
      Instant to LocalDateTime with specified zone
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 构造器详细资料

      • Instants

        public Instants()
    • 方法详细资料

      • toEpochNanos

        public static long toEpochNanos​(java.time.Instant instant)
        Nanos since epoch
      • subtract

        public static java.time.Duration subtract​(java.time.Instant minuend,
                                                  java.time.Instant subtrahend)
        subtract two instant
      • toLocalDateTime

        public static java.time.LocalDateTime toLocalDateTime​(java.time.Instant instant,
                                                              java.time.ZoneId zoneId)
        Instant to LocalDateTime with specified zone
      • toLocalDateTime

        public static java.time.LocalDateTime toLocalDateTime​(java.time.Instant instant)
        Instant to LocalDateTime with current system zone