当前位置: 首页>>代码示例>>Java>>正文


Java CompositePrinterParser类代码示例

本文整理汇总了Java中java.time.format.DateTimeFormatterBuilder.CompositePrinterParser的典型用法代码示例。如果您正苦于以下问题:Java CompositePrinterParser类的具体用法?Java CompositePrinterParser怎么用?Java CompositePrinterParser使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CompositePrinterParser类属于java.time.format.DateTimeFormatterBuilder包,在下文中一共展示了CompositePrinterParser类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: DateTimeFormatter

import java.time.format.DateTimeFormatterBuilder.CompositePrinterParser; //导入依赖的package包/类
/**
 * Constructor.
 *
 * @param printerParser  the printer/parser to use, not null
 * @param locale  the locale to use, not null
 * @param decimalStyle  the DecimalStyle to use, not null
 * @param resolverStyle  the resolver style to use, not null
 * @param resolverFields  the fields to use during resolving, null for all fields
 * @param chrono  the chronology to use, null for no override
 * @param zone  the zone to use, null for no override
 */
DateTimeFormatter(CompositePrinterParser printerParser,
        Locale locale, DecimalStyle decimalStyle,
        ResolverStyle resolverStyle, Set<TemporalField> resolverFields,
        Chronology chrono, ZoneId zone) {
    this.printerParser = Objects.requireNonNull(printerParser, "printerParser");
    this.resolverFields = resolverFields;
    this.locale = Objects.requireNonNull(locale, "locale");
    this.decimalStyle = Objects.requireNonNull(decimalStyle, "decimalStyle");
    this.resolverStyle = Objects.requireNonNull(resolverStyle, "resolverStyle");
    this.chrono = chrono;
    this.zone = zone;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:24,代码来源:DateTimeFormatter.java

示例2: DateTimeFormatter

import java.time.format.DateTimeFormatterBuilder.CompositePrinterParser; //导入依赖的package包/类
/**
 * Constructor.
 *
 * @param printerParser  the printer/parser to use, not null
 * @param locale  the locale to use, not null
 * @param decimalStyle  the decimal style to use, not null
 * @param resolverStyle  the resolver style to use, not null
 * @param resolverFields  the fields to use during resolving, null for all fields
 * @param chrono  the chronology to use, null for no override
 * @param zone  the zone to use, null for no override
 */
DateTimeFormatter(CompositePrinterParser printerParser, Locale locale,
                  DecimalStyle decimalStyle, ResolverStyle resolverStyle,
                  Set<TemporalField> resolverFields, Chronology chrono, ZoneId zone) {
    this.printerParser = Jdk8Methods.requireNonNull(printerParser, "printerParser");
    this.locale = Jdk8Methods.requireNonNull(locale, "locale");
    this.decimalStyle = Jdk8Methods.requireNonNull(decimalStyle, "decimalStyle");
    this.resolverStyle = Jdk8Methods.requireNonNull(resolverStyle, "resolverStyle");
    this.resolverFields = resolverFields;
    this.chrono = chrono;
    this.zone = zone;
}
 
开发者ID:seratch,项目名称:java-time-backport,代码行数:23,代码来源:DateTimeFormatter.java

示例3: DateTimeFormatter

import java.time.format.DateTimeFormatterBuilder.CompositePrinterParser; //导入依赖的package包/类
/**
 * Constructor.
 * 
 * @param printerParser the printer/parser to use, not null
 * @param locale the locale to use, not null
 * @param symbols the symbols to use, not null
 */
DateTimeFormatter(CompositePrinterParser printerParser, Locale locale, DateTimeFormatSymbols symbols) {

  this.locale = locale;
  this.symbols = symbols;
  this.printerParser = printerParser;
}
 
开发者ID:m-m-m,项目名称:java8-backports,代码行数:14,代码来源:DateTimeFormatter.java

示例4: toPrinterParser

import java.time.format.DateTimeFormatterBuilder.CompositePrinterParser; //导入依赖的package包/类
/**
 * Returns the formatter as a composite printer parser.
 *
 * @param optional  whether the printer/parser should be optional
 * @return the printer/parser, not null
 */
CompositePrinterParser toPrinterParser(boolean optional) {
    return printerParser.withOptional(optional);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:DateTimeFormatter.java

示例5: toPrinterParser

import java.time.format.DateTimeFormatterBuilder.CompositePrinterParser; //导入依赖的package包/类
/**
 * Returns the formatter as a composite printer parser.
 * 
 * @param optional whether the printer/parser should be optional
 * @return the printer/parser, not null
 */
CompositePrinterParser toPrinterParser(boolean optional) {

  return this.printerParser.withOptional(optional);
}
 
开发者ID:m-m-m,项目名称:java8-backports,代码行数:11,代码来源:DateTimeFormatter.java


注:本文中的java.time.format.DateTimeFormatterBuilder.CompositePrinterParser类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。