org.joda.time.Seconds.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(6.7k)|赞(0)|评价(0)|浏览(100)

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

Seconds.<init>介绍

[英]Creates a new instance representing a number of seconds. You should consider using the factory method #seconds(int)instead of the constructor.
[中]创建表示秒数的新实例。您应该考虑使用工厂方法(秒)(int)代替构造函数。

代码示例

代码示例来源:origin: joda-time/joda-time

/**
 * Obtains an instance of <code>Seconds</code> that may be cached.
 * <code>Seconds</code> is immutable, so instances can be cached and shared.
 * This factory method provides access to shared instances.
 *
 * @param seconds  the number of seconds to obtain an instance for
 * @return the instance of Seconds
 */
public static Seconds seconds(int seconds) {
  switch (seconds) {
    case 0:
      return ZERO;
    case 1:
      return ONE;
    case 2:
      return TWO;
    case 3:
      return THREE;
    case Integer.MAX_VALUE:
      return MAX_VALUE;
    case Integer.MIN_VALUE:
      return MIN_VALUE;
    default:
      return new Seconds(seconds);
  }
}

代码示例来源:origin: JodaOrg/joda-time

/**
 * Obtains an instance of <code>Seconds</code> that may be cached.
 * <code>Seconds</code> is immutable, so instances can be cached and shared.
 * This factory method provides access to shared instances.
 *
 * @param seconds  the number of seconds to obtain an instance for
 * @return the instance of Seconds
 */
public static Seconds seconds(int seconds) {
  switch (seconds) {
    case 0:
      return ZERO;
    case 1:
      return ONE;
    case 2:
      return TWO;
    case 3:
      return THREE;
    case Integer.MAX_VALUE:
      return MAX_VALUE;
    case Integer.MIN_VALUE:
      return MIN_VALUE;
    default:
      return new Seconds(seconds);
  }
}

代码示例来源:origin: camunda/camunda-bpm-platform

/**
 * Obtains an instance of <code>Seconds</code> that may be cached.
 * <code>Seconds</code> is immutable, so instances can be cached and shared.
 * This factory method provides access to shared instances.
 *
 * @param seconds  the number of seconds to obtain an instance for
 * @return the instance of Seconds
 */
public static Seconds seconds(int seconds) {
  switch (seconds) {
    case 0:
      return ZERO;
    case 1:
      return ONE;
    case 2:
      return TWO;
    case 3:
      return THREE;
    case Integer.MAX_VALUE:
      return MAX_VALUE;
    case Integer.MIN_VALUE:
      return MIN_VALUE;
    default:
      return new Seconds(seconds);
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.joda-time

/**
 * Obtains an instance of <code>Seconds</code> that may be cached.
 * <code>Seconds</code> is immutable, so instances can be cached and shared.
 * This factory method provides access to shared instances.
 *
 * @param seconds  the number of seconds to obtain an instance for
 * @return the instance of Seconds
 */
public static Seconds seconds(int seconds) {
  switch (seconds) {
    case 0:
      return ZERO;
    case 1:
      return ONE;
    case 2:
      return TWO;
    case 3:
      return THREE;
    case Integer.MAX_VALUE:
      return MAX_VALUE;
    case Integer.MIN_VALUE:
      return MIN_VALUE;
    default:
      return new Seconds(seconds);
  }
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

/**
 * Obtains an instance of <code>Seconds</code> that may be cached.
 * <code>Seconds</code> is immutable, so instances can be cached and shared.
 * This factory method provides access to shared instances.
 *
 * @param seconds  the number of seconds to obtain an instance for
 * @return the instance of Seconds
 */
public static Seconds seconds(int seconds) {
  switch (seconds) {
    case 0:
      return ZERO;
    case 1:
      return ONE;
    case 2:
      return TWO;
    case 3:
      return THREE;
    case Integer.MAX_VALUE:
      return MAX_VALUE;
    case Integer.MIN_VALUE:
      return MIN_VALUE;
    default:
      return new Seconds(seconds);
  }
}

代码示例来源:origin: Nextdoor/bender

/**
 * Obtains an instance of <code>Seconds</code> that may be cached.
 * <code>Seconds</code> is immutable, so instances can be cached and shared.
 * This factory method provides access to shared instances.
 *
 * @param seconds  the number of seconds to obtain an instance for
 * @return the instance of Seconds
 */
public static Seconds seconds(int seconds) {
  switch (seconds) {
    case 0:
      return ZERO;
    case 1:
      return ONE;
    case 2:
      return TWO;
    case 3:
      return THREE;
    case Integer.MAX_VALUE:
      return MAX_VALUE;
    case Integer.MIN_VALUE:
      return MIN_VALUE;
    default:
      return new Seconds(seconds);
  }
}

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

/**
 * Obtains an instance of <code>Seconds</code> that may be cached.
 * <code>Seconds</code> is immutable, so instances can be cached and shared.
 * This factory method provides access to shared instances.
 *
 * @param seconds  the number of seconds to obtain an instance for
 * @return the instance of Seconds
 */
public static Seconds seconds(int seconds) {
  switch (seconds) {
    case 0:
      return ZERO;
    case 1:
      return ONE;
    case 2:
      return TWO;
    case 3:
      return THREE;
    case Integer.MAX_VALUE:
      return MAX_VALUE;
    case Integer.MIN_VALUE:
      return MIN_VALUE;
    default:
      return new Seconds(seconds);
  }
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics

/**
 * Obtains an instance of <code>Seconds</code> that may be cached.
 * <code>Seconds</code> is immutable, so instances can be cached and shared.
 * This factory method provides access to shared instances.
 *
 * @param seconds  the number of seconds to obtain an instance for
 * @return the instance of Seconds
 */
public static Seconds seconds(int seconds) {
  switch (seconds) {
    case 0:
      return ZERO;
    case 1:
      return ONE;
    case 2:
      return TWO;
    case 3:
      return THREE;
    case Integer.MAX_VALUE:
      return MAX_VALUE;
    case Integer.MIN_VALUE:
      return MIN_VALUE;
    default:
      return new Seconds(seconds);
  }
}

代码示例来源:origin: io.virtdata/virtdata-lib-realer

/**
 * Obtains an instance of <code>Seconds</code> that may be cached.
 * <code>Seconds</code> is immutable, so instances can be cached and shared.
 * This factory method provides access to shared instances.
 *
 * @param seconds  the number of seconds to obtain an instance for
 * @return the instance of Seconds
 */
public static Seconds seconds(int seconds) {
  switch (seconds) {
    case 0:
      return ZERO;
    case 1:
      return ONE;
    case 2:
      return TWO;
    case 3:
      return THREE;
    case Integer.MAX_VALUE:
      return MAX_VALUE;
    case Integer.MIN_VALUE:
      return MIN_VALUE;
    default:
      return new Seconds(seconds);
  }
}

代码示例来源:origin: org.joda/com.springsource.org.joda.time

/**
 * Obtains an instance of <code>Seconds</code> that may be cached.
 * <code>Seconds</code> is immutable, so instances can be cached and shared.
 * This factory method provides access to shared instances.
 *
 * @param seconds  the number of seconds to obtain an instance for
 * @return the instance of Seconds
 */
public static Seconds seconds(int seconds) {
  switch (seconds) {
    case 0:
      return ZERO;
    case 1:
      return ONE;
    case 2:
      return TWO;
    case 3:
      return THREE;
    case Integer.MAX_VALUE:
      return MAX_VALUE;
    case Integer.MIN_VALUE:
      return MIN_VALUE;
    default:
      return new Seconds(seconds);
  }
}

代码示例来源:origin: redfish64/TinyTravelTracker

/**
 * Obtains an instance of <code>Seconds</code> that may be cached.
 * <code>Seconds</code> is immutable, so instances can be cached and shared.
 * This factory method provides access to shared instances.
 *
 * @param seconds  the number of seconds to obtain an instance for
 * @return the instance of Seconds
 */
public static Seconds seconds(int seconds) {
  switch (seconds) {
    case 0:
      return ZERO;
    case 1:
      return ONE;
    case 2:
      return TWO;
    case 3:
      return THREE;
    case Integer.MAX_VALUE:
      return MAX_VALUE;
    case Integer.MIN_VALUE:
      return MIN_VALUE;
    default:
      return new Seconds(seconds);
  }
}

相关文章