Here you can find the source of clone(final Date date)
Parameter | Description |
---|---|
date | a parameter |
public static Date clone(final Date date)
//package com.java2s; /****************************************************************************** * Copyright (c) 2011 GitHub Inc./* ww w. j a v a 2 s .co m*/ * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Kevin Sawicki (GitHub Inc.) - initial API and implementation *****************************************************************************/ import java.util.Date; public class Main { /** * Clone date if non-null * * @param date * @return copied date */ public static Date clone(final Date date) { if (date == null) return null; return new Date(date.getTime()); } }