Creates a deep copy of the current {@link KvStateInfo} by duplicating
all the included serializers.

<p>This method assumes correct implementation of the {@link TypeSerializer#duplicate()}
method of the included serializers.
558189
public KvStateInfo<K, N, V> duplicate() {
		final TypeSerializer<K> dupKeySerializer = keySerializer.duplicate();
		final TypeSerializer<N> dupNamespaceSerializer = namespaceSerializer.duplicate();
		final TypeSerializer<V> dupSVSerializer = stateValueSerializer.duplicate();

		if (
			dupKeySerializer == keySerializer &&
			dupNamespaceSerializer == namespaceSerializer &&
			dupSVSerializer == stateValueSerializer
		) {
			return this;
		}

		return new KvStateInfo<>(dupKeySerializer, dupNamespaceSerializer, dupSVSerializer);

	}
243679
public static <T> HashMultisetJsonDeserializer<T> newInstance( JsonDeserializer<T> deserializer ) {
        return new HashMultisetJsonDeserializer<T>( deserializer );
    }
1370884
public static <S, T> Copy<S, T> to(Position.Readable<T> targetPosition, Position.Readable<S> sourcePosition) {
        return new Copy<>(sourcePosition, targetPosition);
    }
254858
public JMFMessage copy() {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.entry(this, tc, "copy");
    JMFMessage copy;

    synchronized (getMessageLockArtefact()) {
      if (map == null) {
        // If there is no map, then this is already become just a delegator, so
        // the copy does not need to include the compatibility wrapper.
        copy = ((JMFMessage)encoding).copy();
      }
      else {
        // In the usual case, we maintain a compatibility layer
        copy = new JSCompatibleMessageImpl(this);
      }
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.exit(this, tc, "copy", copy);
    return copy;
  }
426342
private static <X extends CopyableValue<X>> CopyableValueSerializer<X> createCopyableValueSerializer(Class<X> clazz) {
		return new CopyableValueSerializer<X>(clazz);
	}
106686
protected T createCopy (Kryo kryo, T original) {
		return (T)kryo.newInstance(original.getClass());
	}
3284
private static ClassInfo cloneDeprecated(ClassInfo classInfo) {
	return new ClassInfo(classInfo.getVersion(), classInfo.getAccess()
		| Opcodes.ACC_DEPRECATED, classInfo.getName(),
		classInfo.getSignature(), classInfo.getSupername(),
		classInfo.getInterfaces(), classInfo.getMethodMap(),
		classInfo.getFieldMap());
    }
494733
public static <M extends Multimap<?, ?>> MultimapJsonSerializer<M, ?, ?> newInstance( KeySerializer<?> keySerializer,
                                                                                          JsonSerializer<?> valueSerializer ) {
        return new MultimapJsonSerializer( keySerializer, valueSerializer );
    }
545153
public static <T> LinkedHashMultisetJsonDeserializer<T> newInstance( JsonDeserializer<T> deserializer ) {
        return new LinkedHashMultisetJsonDeserializer<T>( deserializer );
    }
1265113
public LofPoint deepCopy()
    {
        LofPoint result = new LofPoint();
        result.setDataId(this.dataId);
        result.setkDistance(this.kDistance);

        double[] copiedArray = Arrays.copyOf(this.dataPoint, this.dataPoint.length);
        result.setDataPoint(copiedArray);

        List<String> copiedList = new ArrayList<>();
        if (this.kDistanceNeighbor != null)
        {
            copiedList.addAll(this.kDistanceNeighbor);
        }

        result.setkDistanceNeighbor(copiedList);
        result.setLrd(this.lrd);
        return result;
    }
841026
public static <M extends Map<?, ?>> MapJsonSerializer<M, ?, ?> newInstance( KeySerializer<?> keySerializer, JsonSerializer<?>
            valueSerializer ) {
        return new MapJsonSerializer( keySerializer, valueSerializer );
    }
888941
@Override
    public void copyFrom(final CopyFrom obj) {
        final FeedInformationImpl info = (FeedInformationImpl) obj;
        setAuthor(info.getAuthor());
        setBlock(info.getBlock());

        getCategories().clear();
        if (info.getCategories() != null) {
            getCategories().addAll(info.getCategories());
        }

        setComplete(info.getComplete());
        setNewFeedUrl(info.getNewFeedUrl());
        setExplicit(info.getExplicit());

        try {
            if (info.getImage() != null) {
                setImage(new URL(info.getImage().toExternalForm()));
            }
        } catch (final MalformedURLException e) {
            LOG.debug("Error copying URL:" + info.getImage(), e);
        }

        if (info.getKeywords() != null) {
            setKeywords(info.getKeywords().clone());
        }

        setOwnerEmailAddress(info.getOwnerEmailAddress());
        setOwnerName(info.getOwnerName());
        setSubtitle(info.getSubtitle());
        setSummary(info.getSummary());
    }
576205
private static MethodInfo cloneDeprecated(MethodInfo methodInfo) {
	return new MethodInfo(methodInfo.getAccess() | Opcodes.ACC_DEPRECATED,
		methodInfo.getName(), methodInfo.getDesc(),
		methodInfo.getSignature(), methodInfo.getExceptions());
    }
41070
@SuppressWarnings("unchecked")
    protected static <T> Map<String, T> cloneData(Map<String, T> data) {
        return SerializationUtils.fromByteArray(SerializationUtils.toByteArray(data), Map.class);
    }
199869
public DSLSentence copy() {
        final DSLSentence copy = new DSLSentence();

        copy.drl = getDrl();
        copy.definition = getDefinition();
        copy.values = mapCopy(getValues());

        return copy;
    }
429490
public static <T extends Object> T cloneSerializable(T source) {
        ByteArrayOutputStream baos = null;
        ObjectOutputStream oos = null;
        ByteArrayInputStream bais = null;
        ObjectInputStream ois = null;
        try {
            baos = new ByteArrayOutputStream();
            oos = new ObjectOutputStream(baos);
            oos.writeObject(source);

            bais = new ByteArrayInputStream(baos.toByteArray());
            ois = new ObjectInputStream(bais);
            return (T) ois.readObject();
        } catch (IOException e) {
            return null;
        } catch (ClassNotFoundException e) {
            return null;
        } finally {
            closeQuietly(baos, oos, bais, ois);
        }
    }
1018230
public static <T> StackJsonDeserializer<T> newInstance( JsonDeserializer<T> deserializer ) {
        return new StackJsonDeserializer<T>( deserializer );
    }