You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2015/05/21 21:55:25 UTC
[11/11] incubator-tinkerpop git commit: This class is no longer used.
This class is no longer used.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/65de05dd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/65de05dd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/65de05dd
Branch: refs/heads/master
Commit: 65de05dd40dce3402ebb56e9d798e9d752d0c18f
Parents: fe83dc8
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu May 21 15:44:31 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu May 21 15:55:04 2015 -0400
----------------------------------------------------------------------
.../util/function/CloningUnaryOperator.java | 49 --------------------
1 file changed, 49 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/65de05dd/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/function/CloningUnaryOperator.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/function/CloningUnaryOperator.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/function/CloningUnaryOperator.java
deleted file mode 100644
index 85df187..0000000
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/function/CloningUnaryOperator.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tinkerpop.gremlin.util.function;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.function.UnaryOperator;
-
-/**
- * @author Marko A. Rodriguez (http://markorodriguez.com)
- */
-public final class CloningUnaryOperator<A> implements UnaryOperator<A>, Serializable {
-
- private static final CloningUnaryOperator INSTANCE = new CloningUnaryOperator();
-
- private CloningUnaryOperator() {
- }
-
- @Override
- public A apply(final A a) {
- if (a instanceof HashMap)
- return (A) ((HashMap) a).clone();
- else if (a instanceof HashSet)
- return (A) ((HashSet) a).clone();
- else
- throw new IllegalArgumentException("The provided class is not registered for cloning: " + a.getClass());
- }
-
- public static <A> CloningUnaryOperator<A> instance() {
- return INSTANCE;
- }
-}