List of usage examples for org.apache.commons.lang3 ObjectUtils clone
public static <T> T clone(final T obj)
Clone an object.
From source file:com.norconex.jef4.status.JobDuration.java
/** * Gets the end time. * @return end time */ public final Date getEndTime() { return ObjectUtils.clone(endTime); }
From source file:com.norconex.jef4.status.JobDuration.java
/** * Sets the end time./*from w w w.j ava 2 s .co m*/ * @param endTime end time */ public final void setEndTime(final Date endTime) { this.endTime = ObjectUtils.clone(endTime); }
From source file:com.norconex.jef4.status.JobDuration.java
/** * Gets the start time. * @return start time */ public final Date getStartTime() { return ObjectUtils.clone(startTime); }
From source file:com.norconex.jef4.status.JobDuration.java
/** * Sets the start time.// w w w. ja va2s.c o m * @param startTime start time */ public final void setStartTime(final Date startTime) { this.startTime = ObjectUtils.clone(startTime); }
From source file:com.norconex.jef4.status.JobDuration.java
public Date getResumedStartTime() { return ObjectUtils.clone(resumedStartTime); }
From source file:com.github.bjoern2.codegen.JavaTypeImpl.java
@Override public JavaTypeImpl clone() { return ObjectUtils.clone(this); }
From source file:com.norconex.jef4.status.JobDuration.java
public void setResumedStartTime(Date resumedStartTime) { this.resumedStartTime = ObjectUtils.clone(resumedStartTime); }
From source file:com.norconex.jef4.status.JobDuration.java
public Date getResumedLastActivity() { return ObjectUtils.clone(resumedLastActivity); }
From source file:com.norconex.jef4.status.JobDuration.java
public void setResumedLastActivity(Date resumedLastActivity) { this.resumedLastActivity = ObjectUtils.clone(resumedLastActivity); }
From source file:jodtemplate.pptx.postprocessor.StylePostprocessor.java
private void processComment(final Comment comment, final Element at, final Slide slide, final Configuration configuration) throws JODTemplateException { String commentText = comment.getText(); if (commentText.startsWith(STYLIZED_KEYWORD)) { commentText = StringUtils.removeStart(commentText, STYLIZED_KEYWORD); final String className = StringUtils.substringBefore(commentText, ":"); commentText = StringUtils.removeStart(commentText, className + ": "); final Stylizer stylizer = configuration.getStylizer(className); if (stylizer == null) { throw new JODTemplateException("Unable to find stylizer"); }//from www .j a va2s . c o m final String text = StringUtils.removeStart(commentText, " stylized: "); final Element ar = at.getParentElement(); final Element ap = ar.getParentElement(); final int arIndex = ap.indexOf(ar); final Element arPr = getArPrElement(ar); final Element apPr = getApPrElement(ap); final Element sourceApPr = ObjectUtils.clone(apPr); cleanApPrElement(apPr); final List<Element> stylizedElements = stylizer.stylize(text, arPr, apPr, slide); ap.removeContent(ar); final List<Element> remains = getRemainingElements(arIndex, ap); for (Element el : remains) { ap.removeContent(el); } final int currentApIndex = injectElementsInDocument(stylizedElements, ap, apPr, arIndex); injectRemainsInDocument(remains, ap, sourceApPr, currentApIndex); } }