gpt4 book ai didi

java.time.Year.toString()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-17 22:44:40 26 4
gpt4 key购买 nike

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

Year.toString介绍

[英]Outputs this year as a String.
[中]以字符串形式显示今年的输出。

代码示例

代码示例来源:origin: spring-projects/spring-framework

@Override
public String print(Year object, Locale locale) {
  return object.toString();
}

代码示例来源:origin: org.springframework/spring-context

@Override
public String print(Year object, Locale locale) {
  return object.toString();
}

代码示例来源:origin: com.fasterxml.jackson.datatype/jackson-datatype-jsr310

@Override
public void serialize(Year year, JsonGenerator generator, SerializerProvider provider) throws IOException
{
  if (useTimestamp(provider)) {
    generator.writeNumber(year.getValue());
  } else {
    String str = (_formatter == null) ? year.toString() : year.format(_formatter);
    generator.writeString(str);
  }
}

代码示例来源:origin: prestodb/presto

@Override
public void serialize(Year year, JsonGenerator generator, SerializerProvider provider) throws IOException
{
  if (useTimestamp(provider)) {
    generator.writeNumber(year.getValue());
  } else {
    String str = (_formatter == null) ? year.toString() : year.format(_formatter);
    generator.writeString(str);
  }
}

代码示例来源:origin: ebean-orm/ebean

@Override
public String formatValue(Year v) {
 return v.toString();
}

代码示例来源:origin: javers/javers

@Override
public String serialize(Year sourceValue) {
  return sourceValue.toString();
}

代码示例来源:origin: apache/servicemix-bundles

@Override
public String print(Year object, Locale locale) {
  return object.toString();
}

代码示例来源:origin: org.avaje.ebean/ebean

@Override
public String formatValue(Year v) {
 return v.toString();
}

代码示例来源:origin: io.ebean/ebean

@Override
public String formatValue(Year v) {
 return v.toString();
}

代码示例来源:origin: org.n52.wps/engine

@Override
public String generate(Year value) {
  return value.toString();
}

代码示例来源:origin: org.xbib/catalog-entities

private String formatYear(Year year) {
  Objects.requireNonNull(year);
  return year.toString();
}

代码示例来源:origin: net.dongliu/gson-java8-datatype

@Override
public void write(JsonWriter out, Year year) throws IOException {
  if (year == null) {
    out.nullValue();
    return;
  }
  out.value(year.toString());
}

代码示例来源:origin: Yorubaname/yorubaname-website

public static CharSequence year() {
    return Year.now().toString();
  }
}

代码示例来源:origin: FasterXML/jackson-datatype-jsr310

@Override
public void serialize(Year year, JsonGenerator generator, SerializerProvider provider) throws IOException
{
  if (useTimestamp(provider)) {
    generator.writeNumber(year.getValue());
  } else {
    String str = (_formatter == null) ? year.toString() : year.format(_formatter);
    generator.writeString(str);
  }
}

代码示例来源:origin: at.bestsolution.eclipse/org.eclipse.fx.core

this.mappings.put(OffsetTime.class, new TwoVal<>(OffsetTime::parse, (v) -> v.toString()));
this.mappings.put(Year.class, new TwoVal<>(Year::parse, (v) -> v.toString()));
this.mappings.put(YearMonth.class, new TwoVal<>(YearMonth::parse, (v) -> v.toString()));

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

@Override
public void serialize(Year year, JsonGenerator generator, SerializerProvider provider) throws IOException
{
  if (useTimestamp(provider)) {
    generator.writeNumber(year.getValue());
  } else {
    String str = (_formatter == null) ? year.toString() : year.format(_formatter);
    generator.writeString(str);
  }
}

代码示例来源:origin: io.prestosql/presto-jdbc

@Override
public void serialize(Year year, JsonGenerator generator, SerializerProvider provider) throws IOException
{
  if (useTimestamp(provider)) {
    generator.writeNumber(year.getValue());
  } else {
    String str = (_formatter == null) ? year.toString() : year.format(_formatter);
    generator.writeString(str);
  }
}

代码示例来源:origin: prestosql/presto

@Override
public void serialize(Year year, JsonGenerator generator, SerializerProvider provider) throws IOException
{
  if (useTimestamp(provider)) {
    generator.writeNumber(year.getValue());
  } else {
    String str = (_formatter == null) ? year.toString() : year.format(_formatter);
    generator.writeString(str);
  }
}

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