Gets a duplicate of this <CODE>PdfTemplate</CODE>. All
the members are copied by reference but the buffer stays different.
@return a copy of this <CODE>PdfTemplate</CODE>
6479
public PdfContentByte getDuplicate() {
        PdfTemplate tpl = new PdfTemplate();
        tpl.writer = writer;
        tpl.pdf = pdf;
        tpl.thisReference = thisReference;
        tpl.pageResources = pageResources;
        tpl.bBox = new Rectangle(bBox);
        tpl.group = group;
        tpl.layer = layer;
        if (matrix != null) {
            tpl.matrix = new PdfArray(matrix);
        }
        tpl.separator = separator;
        return tpl;
    }
483807
public CmsDetailPageTable copy() {

        List<CmsDetailPageInfo> infos = toList();
        CmsDetailPageTable result = new CmsDetailPageTable();
        for (CmsDetailPageInfo info : infos) {
            result.add(info);
        }
        return result;
    }
986287
public ContentAssistContext.Builder copy() {
		Builder result = builderProvider.get();
		result.copyFrom(this);
		return result;
	}
1173110
public PdfContentByte getDuplicate() {
        PdfPatternPainter tpl = new PdfPatternPainter();
        tpl.writer = writer;
        tpl.pdf = pdf;
        tpl.thisReference = thisReference;
        tpl.pageResources = pageResources;
        tpl.bBox = new Rectangle(bBox);
        tpl.xstep = xstep;
        tpl.ystep = ystep;
        tpl.matrix = matrix;
        tpl.stencil = stencil;
        tpl.defaultColor = defaultColor;
        return tpl;
    }
950611
@Override
	public AbstractMessage copy()
    {
        TextMessageImpl clone = new TextMessageImpl();
        copyCommonFields(clone);
        clone.body = this.body;
        
        return clone;
    }
1186311
public T copy() {
        T copy = Instantiator.of(type).instantiate();
        return copyInto(copy);
    }
231615
@Override
    public Collection duplicate(boolean deepCopy) {
	new ArrayImpl().duplicate(deepCopy);
	return new ListAsArray((List) Duplicator.duplicate(list, deepCopy));
    }
884025
public CmsDetailPageInfo copyAsInherited() {

        CmsDetailPageInfo result = new CmsDetailPageInfo(m_id, m_uri, m_type, m_iconClasses);
        result.m_inherited = true;
        return result;
    }
810654
public synchronized CopyPartRequest getNextCopyPartRequest() {
        final long partSize = Math.min(optimalPartSize, remainingBytes);

        CopyPartRequest req = new CopyPartRequest()
            .withSourceBucketName(origReq.getSourceBucketName())
            .withSourceKey(origReq.getSourceKey())
            .withUploadId(uploadId)
            .withPartNumber(partNumber++)
            .withDestinationBucketName(origReq.getDestinationBucketName())
            .withDestinationKey(origReq.getDestinationKey())
            .withSourceVersionId(origReq.getSourceVersionId())
            .withFirstByte(Long.valueOf(offset))
            .withLastByte(Long.valueOf(offset + partSize - 1))
            .withSourceSSECustomerKey(origReq.getSourceSSECustomerKey())
            .withDestinationSSECustomerKey(origReq.getDestinationSSECustomerKey())
            .withRequesterPays(origReq.isRequesterPays())
            // other meta data
            .withMatchingETagConstraints(origReq.getMatchingETagConstraints())
            .withModifiedSinceConstraint(origReq.getModifiedSinceConstraint())
            .withNonmatchingETagConstraints(origReq.getNonmatchingETagConstraints())
            .withSourceVersionId(origReq.getSourceVersionId())
            .withUnmodifiedSinceConstraint(origReq.getUnmodifiedSinceConstraint())
            // general meta data
            .withGeneralProgressListener(origReq.getGeneralProgressListener())
            .withRequestMetricCollector(origReq.getRequestMetricCollector())
            ;
        offset += partSize;
        remainingBytes -= partSize;
        return req;
    }
365863
public CmsEntity cloneEntity() {

        CmsEntity clone = new CmsEntity(getId(), getTypeName());
        for (CmsEntityAttribute attribute : getAttributes()) {
            if (attribute.isSimpleValue()) {
                List<String> values = attribute.getSimpleValues();
                for (String value : values) {
                    clone.addAttributeValue(attribute.getAttributeName(), value);
                }
            } else {
                List<CmsEntity> values = attribute.getComplexValues();
                for (CmsEntity value : values) {
                    clone.addAttributeValue(attribute.getAttributeName(), value.cloneEntity());
                }
            }
        }
        return clone;
    }
462084
@SuppressWarnings("unchecked")
    public final T duplicate() {
        if (backing instanceof ByteBuffer) {
            return (T) ((ByteBuffer) backing).duplicate();
        }
        if (backing instanceof CharBuffer) {
            return (T) ((CharBuffer) backing).duplicate();
        }
        throw new IllegalArgumentException("Backing buffer of unknown type.");
    }
175855
private Iterator<String> getIterator() {
		final Set<String> copy = getPrefixes();
		final Iterator<String> copyIt = copy.iterator();
		return new Iterator<String>() {
			private String lastOne = null;

			@Override
			public boolean hasNext() {
				return copyIt.hasNext();
			}

			@Override
			public String next() {
				if (copyIt.hasNext()) {
					lastOne = copyIt.next();
				} else {
					throw new NoSuchElementException();
				}
				return lastOne;
			}

			@Override
			public void remove() {
				try {
					lock.writeLock().lock();
					prefixes.remove(lastOne);
				} finally {
					lock.writeLock().unlock();
				}
			}

		};
	}
1192847
public PcapPktHdr copy() {
		PcapPktHdr pktHdr = new PcapPktHdr();
		pktHdr.caplen = this.caplen;
		pktHdr.len = this.len;
		pktHdr.tv_sec = this.tv_sec;
		pktHdr.tv_usec = this.tv_usec;
		return pktHdr;
	}
1329530
public EmblReference copyEmblReference(EmblReference emblReference) {
		EmblReference copy = new EmblReference();
		copy.setReferenceAuthor(emblReference.getReferenceAuthor());
		copy.setReferenceComment(emblReference.getReferenceComment());
		copy.setReferenceCrossReference(emblReference.getReferenceCrossReference());
		copy.setReferenceGroup(emblReference.getReferenceGroup());
		copy.setReferenceLocation(emblReference.getReferenceLocation());
		copy.setReferenceNumber(emblReference.getReferenceNumber());
		copy.setReferencePosition(emblReference.getReferencePosition());
		copy.setReferenceTitle(emblReference.getReferenceTitle());
		return copy;
	}
677794
public CmsAliasTableRow copy() {

        CmsAliasTableRow result = new CmsAliasTableRow();
        result.setKey(m_key);
        result.setResourcePath(m_resourcePath);
        result.setStructureId(m_structureId);
        result.setChanged(m_isChanged);
        result.setMode(m_mode);
        result.setPathError(m_pathError);
        result.setAliasError(m_aliasError);
        result.setAliasPath(m_aliasPath);
        result.setEdited(m_isEdited);
        result.setOriginalStructureId(m_originalStructureId);

        return result;
    }
173401
public Table copy() {
        Table copy = new Table(name);
        for (Column<?> column : columnList) {
            copy.addColumns(column.emptyCopy(rowCount()));
        }

        int[] rows = new int[rowCount()];
        for (int i = 0; i < rowCount(); i++) {
            rows[i] = i;
        }
        Rows.copyRowsToTable(rows, this, copy);
        return copy;
    }
611841
public static <T extends Comparable<?>> ComparableTemplate<T> comparableTemplate(Class<? extends T> cl,
                                                                                     Template template, Object... args) {
        return comparableTemplate(cl, template, ImmutableList.copyOf(args));
    }