package cz.senslog.connector.tools.util.number;

import java.util.Optional;

public final class LongUtils {

    private LongUtils() {}

    public static Optional<Long> parseLong(String value) {
        if (value == null || value.length() == 0) {
            return Optional.empty();
        }
        try {
            return Optional.of(Long.parseLong(value));
        } catch (NumberFormatException e) {
            return Optional.empty();
        }
    }
}
