Example usage for java.util Date clone

List of usage examples for java.util Date clone

Introduction

In this page you can find the example usage for java.util Date clone.

Prototype

public Object clone() 

Source Link

Document

Return a copy of this object.

Usage

From source file:org.openlmis.core.domain.ProcessingPeriodTest.java

private Date oneMonthPast(Date date) {
    Calendar calendar = Calendar.getInstance();
    calendar.setTime((Date) date.clone());
    calendar.add(Calendar.MONTH, 1);
    return calendar.getTime();
}

From source file:com.parleys.server.domain.AbstractEntity.java

public void setCreatedOn(final Date createdOn) {
    if (createdOn != null) {
        this.createdOn = (Date) createdOn.clone();
    }/*from   www.ja  v a  2s.c  o m*/
}

From source file:com.omertron.tvrageapi.model.Episode.java

public void setAirDate(Date airDate) {
    this.airDate = (Date) airDate.clone();
}

From source file:com.parleys.server.domain.AbstractEntity.java

public void setModifiedOn(final Date modifiedOn) {
    if (modifiedOn != null) {
        this.modifiedOn = (Date) modifiedOn.clone();
    }//from ww  w .  ja  va 2s  .  c  o  m
}

From source file:com.orange.atk.results.logger.log.Action.java

/**
 * set the time when an action ends// w  ww .  j  ava  2s . c  o m
 * 
 * @param endTime
 * @throws NullPointerException
 *             if endTime is Null
 * @throws IllegalArgumentException
 *             when endTime is not valid (empty string, ...)
 */
public void setEndTime(Date endTime) {
    this.endTime = (Date) endTime.clone();
}

From source file:com.springsource.greenhouse.events.sessions.EventSessionsScheduleActivity.java

private void refreshScheduleDays() {
    if (event == null) {
        return;//  w w w  . ja  va  2  s  .  co  m
    }

    conferenceDates = new ArrayList<Date>();
    List<String> conferenceDays = new ArrayList<String>();
    Date day = (Date) event.getStartTime().clone();

    while (day.before(event.getEndTime())) {
        conferenceDates.add((Date) day.clone());
        conferenceDays.add(new SimpleDateFormat("EEEE, MMM d").format(day));
        day.setDate(day.getDate() + 1);
    }

    setListAdapter(new ArrayAdapter<String>(this, R.layout.menu_list_item, conferenceDays));
}

From source file:com.orange.atk.results.logger.log.Action.java

/**
 * Set the time when an action start//from   w ww .j ava 2 s  .  c o  m
 * 
 * @param startTime
 *            the start time of an action
 * @throws NullPointerException
 *             if startTime is Null
 * @throws IllegalArgumentException
 *             when startTime is not valid (empty string, ...)
 */
public void setStartTime(Date startTime) {
    this.startTime = (Date) startTime.clone();
}

From source file:org.softdays.mandy.core.model.Imputation.java

/**
 * Sets the date.//from ww w .  j  a  v a2s  . c  o  m
 * 
 * @param date
 *            the new date
 */
public void setDate(final Date date) {
    this.date = (Date) date.clone();
}

From source file:org.osiam.security.authentication.OsiamClientDetails.java

public void setExpiry(Date expiry) {
    this.expiry = expiry != null ? (Date) expiry.clone() : null;
}

From source file:eu.debooy.natuur.domain.WaarnemingDto.java

public void setDatum(Date datum) {
    if (null == datum) {
        this.datum = null;
    } else {/*from   ww  w .  ja  v  a 2s. co m*/
        this.datum = (Date) datum.clone();
    }
}