All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jn.easyjson.jackson.DateSeries Maven / Gradle / Ivy

There is a newer version: 3.2.26
Show newest version
package com.jn.easyjson.jackson;

import com.jn.langx.util.collection.Collects;
import com.jn.langx.util.reflect.Reflects;

import java.sql.Timestamp;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.List;

public class DateSeries {

    private static List supportedDateTypes = Collects.newArrayList(
            Date.class,
            java.sql.Date.class,
            Timestamp.class,
            Calendar.class,
            GregorianCalendar.class
    );

    public static boolean isSupported(Class type) {
        return Reflects.isSubClassOrEquals(Date.class, type)
                || Reflects.isSubClassOrEquals(Calendar.class, type)
                || supportedDateTypes.contains(type);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy