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

br.com.tecsinapse.dataio.converter.LocalTimeTableCellConverter Maven / Gradle / Ivy

The newest version!
/*
 * Tecsinapse Data Input and Output
 *
 * License: GNU Lesser General Public License (LGPL), version 3 or later
 * See the LICENSE file in the root directory or .
 */
package br.com.tecsinapse.dataio.converter;

import java.time.LocalTime;
import java.util.Date;

import com.google.common.base.Strings;

public class LocalTimeTableCellConverter implements FromDateConverter {

    @Override
    public LocalTime apply(Date input) {
        return LocalDateTimeTableCellConverter.LOCAL_DATE_TIME_CONVERTER.apply(input).toLocalTime();
    }

    @Override
    public LocalTime apply(String input) {
        return Strings.isNullOrEmpty(input) ? null : LocalTime.parse(input);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy