Here you can find the source of beforeTimestamp2Safety(Timestamp ts1, Timestamp ts2)
Parameter | Description |
---|---|
ts1 | first timestamp |
ts2 | second timestamp |
public static boolean beforeTimestamp2Safety(Timestamp ts1, Timestamp ts2)
//package com.java2s; /*/* www . java2 s. c om*/ * File: $RCSfile$ * * Copyright (c) 2005 Wincor Nixdorf International GmbH, * Heinz-Nixdorf-Ring 1, 33106 Paderborn, Germany * All Rights Reserved. * * This software is the confidential and proprietary information * of Wincor Nixdorf ("Confidential Information"). You shall not * disclose such Confidential Information and shall use it only in * accordance with the terms of the license agreement you entered * into with Wincor Nixdorf. */ import java.sql.Timestamp; public class Main { /** * Safety compare two timestamp, skip null value * * @param ts1 first timestamp * @param ts2 second timestamp * @return if @param ts1 before @param ts2, return true, else return false */ public static boolean beforeTimestamp2Safety(Timestamp ts1, Timestamp ts2) { return ts2 != null && ts1.before(ts2); } }