Java Code Examples for java.time.Year#toString()
The following examples show how to use
java.time.Year#toString() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: YearSerializer.java From jackson-modules-java8 with Apache License 2.0 | 5 votes |
@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); } }
Example 2
Source File: YearFormatter.java From spring-analysis-note with MIT License | 4 votes |
@Override public String print(Year object, Locale locale) { return object.toString(); }
Example 3
Source File: YearFormatter.java From java-technology-stack with MIT License | 4 votes |
@Override public String print(Year object, Locale locale) { return object.toString(); }
Example 4
Source File: YearTypeDescriptor.java From hibernate-types with Apache License 2.0 | 4 votes |
@Override public String toString(Year value) { return value.toString(); }
Example 5
Source File: YearTypeAdapter.java From javers with Apache License 2.0 | 4 votes |
@Override public String serialize(Year sourceValue) { return sourceValue.toString(); }