Java SQL Time isTime(String val)

Here you can find the source of isTime(String val)

Description

is Time

License

Open Source License

Declaration

private static boolean isTime(String val) 

Method Source Code

//package com.java2s;
/*/*from   www. java 2  s .  com*/
 * @(#)SQLUtil.java $Date: Dec 16, 2011 6:28:55 PM $
 * 
 * Copyright ? 2011 FortMoon Consulting, Inc. All Rights Reserved.
 * 
 * This software is the confidential and proprietary information of FortMoon
 * Consulting, Inc. ("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 FortMoon Consulting.
 * 
 * FORTMOON MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
 * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
 * NON-INFRINGEMENT. FORTMOON SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY
 * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
 * DERIVATIVES.
 * 
 */

public class Main {
    private static boolean isTime(String val) {
        try {
            if (null != java.sql.Time.valueOf(val))
                return true;
        } catch (IllegalArgumentException iae) {

        }
        return false;
    }
}

Related

  1. isCategoryDateOrTime(String sJavaType)
  2. isDateTime(int type)
  3. isDateTime(String val)
  4. isTime(final Class type)
  5. isTime(final PropertyDescriptor pd)
  6. isTimeInRange(java.sql.Time start, java.sql.Time end, java.util.Date d)
  7. merge(java.util.Date date, java.util.Date time)
  8. mergeDateTime(Date date, Time time)
  9. minTime()