Remove EmptyQueue 25/59525/2
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 26 Jun 2017 14:17:21 +0000 (16:17 +0200)
committerTom Pantelis <tompantelis@gmail.com>
Tue, 27 Jun 2017 14:41:13 +0000 (14:41 +0000)
This class is not used anywhere, remove it. If this functionality
is needed somewhere, use yangtools.util.EmptyDeque instead.

Change-Id: I12414fd2a2a5b4e7ac8b73fe70e8aa3dc929d025
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/EmptyQueue.java [deleted file]

diff --git a/opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/EmptyQueue.java b/opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/EmptyQueue.java
deleted file mode 100644 (file)
index 125f025..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.cluster.access.client;
-
-import com.google.common.annotations.Beta;
-import java.util.AbstractQueue;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.Queue;
-import org.opendaylight.yangtools.concepts.Immutable;
-
-/**
- * A specialized always-empty implementation of {@link java.util.Queue}. This implementation will always refuse new
- * elements in its {@link #offer(Object)} method.
- * @author Robert Varga
- *
- * @param <E> the type of elements held in this collection
- */
-// TODO: move this class into yangtools.util
-@Beta
-public final class EmptyQueue<E> extends AbstractQueue<E> implements Immutable {
-    private static final EmptyQueue<?> INSTANCE = new EmptyQueue<>();
-
-    private EmptyQueue() {
-        // No instances
-    }
-
-    @SuppressWarnings("unchecked")
-    public static <T> Queue<T> getInstance() {
-        return (Queue<T>) INSTANCE;
-    }
-
-    @Override
-    public boolean offer(final E entry) {
-        return false;
-    }
-
-    @Override
-    public E poll() {
-        return null;
-    }
-
-    @Override
-    public E peek() {
-        return null;
-    }
-
-    @Override
-    public Iterator<E> iterator() {
-        return Collections.emptyIterator();
-    }
-
-    @Override
-    public int size() {
-        return 0;
-    }
-}