Skip to content

Commit

Permalink
#726 javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
korneldanko committed Dec 6, 2024
1 parent 59facdf commit ccb30da
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
*/
package hu.icellmobilsoft.coffee.tool.jsonb.adapter;

import java.time.YearMonth;

import jakarta.json.bind.JsonbException;
import jakarta.json.bind.adapter.JsonbAdapter;

Expand All @@ -45,7 +43,13 @@ public String adaptToJson(Class<?> obj) {
return obj.getName();
}

/** {@inheritDoc} */
/**
* Converts a {@link String} into a {@link Class<?>}
*
* @param obj
* string to convert or {@code null}.
* @return the converted object or {@code null}, if the given {@code date} param is null
*/
@Override
public Class<?> adaptFromJson(String obj) {
if (obj == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ public Long adaptToJson(Date date) {
return date.getTime();
}

/** {@inheritDoc} */
/**
* Converts a {@link Long} into a {@link Date} object
*
* @param date
* Long to convert or {@code null}.
* @return the converted object or {@code null}, if the given {@code date} param is null
*/
@Override
public Date adaptFromJson(Long date) {
if (date == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,13 @@ public String adaptToJson(Duration duration) {
return String.valueOf(duration);
}

/** {@inheritDoc} */
/**
* Converts a {@link String} into a {@link Duration} object
*
* @param duration
* string to convert or {@code null}.
* @return the converted object or {@code null}, if the given {@code duration} param is null
*/
@Override
public Duration adaptFromJson(String duration) {
if (duration == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,13 @@ public String adaptToJson(XMLGregorianCalendar calendar) {
return calendar.toXMLFormat();
}

/** {@inheritDoc} */
/**
* Converts a {@link String}r into a {@link XMLGregorianCalendar} object
*
* @param calendar
* string to convert or {@code null}.
* @return the converted object or {@code null}, if the given {@code calendar} param is null
*/
@Override
public XMLGregorianCalendar adaptFromJson(String calendar) {
if (calendar == null) {
Expand Down

0 comments on commit ccb30da

Please sign in to comment.