com.infomaximum.database.utils.InstantUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rdao Show documentation
Show all versions of rdao Show documentation
Library for creating a light cluster
The newest version!
package com.infomaximum.database.utils;
import java.time.Instant;
public class InstantUtils {
public static final Instant MAX = Instant.ofEpochMilli(Long.MAX_VALUE);
public static final Instant ZERO = Instant.EPOCH;
public static final Instant MIN = Instant.ofEpochMilli(Long.MIN_VALUE);
public static long toLong(Instant value) {
return value.toEpochMilli();
}
public static Instant fromLong(long value) {
return Instant.ofEpochMilli(value);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy