Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed unused class FixedSizeStack

Java collections stacks/queues offer much better implementations and it
wasn't used

Change-Id: I3fa5e48d085248b3ce6d389bdeb098d564d110e0
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
  • Loading branch information...
commit 3f37d8c0448fc8f72798ebb40d1113bc471382de 1 parent d5c9a77
John May johnmay authored egonw committed
Showing with 0 additions and 83 deletions.
  1. +0 −83 src/main/org/openscience/cdk/tools/FixedSizeStack.java
83 src/main/org/openscience/cdk/tools/FixedSizeStack.java
View
@@ -1,83 +0,0 @@
-/*
- * $RCSfile$
- * $Author$
- * $Date$
- * $Revision$
- *
- * Copyright (C) 1997-2007 The Chemistry Development Kit (CDK) project
- *
- * Contact: cdk-devel@lists.sourceforge.net
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1
- * of the License, or (at your option) any later version.
- * All we ask is that proper credit is given for our work, which includes
- * - but is not limited to - adding the above copyright notice to the beginning
- * of your source code files, and to any copyright notice that you may distribute
- * with programs based on this work.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- */
-
-package org.openscience.cdk.tools;
-
-/**
- * A LIFO queue for result structures. The Size is fixed so that one can use
- * this to hold the 10 best structures, e. g.
- *
- *@author steinbeck
- * @cdk.githash
- *@cdk.created 2001-06-05
- */
-public class FixedSizeStack extends java.util.Vector implements java.io.Serializable {
-
- private static final long serialVersionUID = 7820949609007415936L;
-
- private int size;
-
- /**
- * Creates a fixed size stack
- *
- *@param size The size of this stack
- */
- public FixedSizeStack(int size) {
- super();
- this.size = size;
- }
-
-
- /**
- * Pushes an object onto the stack. If the new size then exceeds the
- * standard size of this stack, the oldest elements in the stack are discarded.
- *
- *@param O The object to be pushed onto the stack
- */
- public void push(Object O) {
- insertElementAt(O, 0);
- if (size() > size) {
- setSize(size);
- }
- }
-
-
- /**
- * Returns the last object that was pushed onto the stack
- *
- *@return the last object that was pushed onto the stack
- */
- public Object pop() {
- Object O = elementAt(0);
- removeElementAt(0);
- return O;
- }
-}
-
Please sign in to comment.
Something went wrong with that request. Please try again.