< prev index next >

src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ClassQueue.java

Print this page

        

*** 1,8 **** /* ! * reserved comment block ! * DO NOT REMOVE OR ALTER! */ /* * 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. --- 1,7 ---- /* ! * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. */ /* * 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.
*** 16,48 **** * 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 com.sun.org.apache.bcel.internal.util; import java.util.LinkedList; import com.sun.org.apache.bcel.internal.classfile.JavaClass; /** ! * Utility class implementing a (typesafe) queue of JavaClass ! * objects. * ! * @author <A HREF="mailto:markus.dahm@berlin.de">M. Dahm</A> ! * @see ClassVector ! */ ! public class ClassQueue implements java.io.Serializable { ! protected LinkedList vec = new LinkedList(); ! public void enqueue(JavaClass clazz) { vec.addLast(clazz); } public JavaClass dequeue() { ! return (JavaClass)vec.removeFirst(); } ! public boolean empty() { return vec.isEmpty(); } public String toString() { return vec.toString(); } } --- 15,51 ---- * 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 com.sun.org.apache.bcel.internal.util; import java.util.LinkedList; + import com.sun.org.apache.bcel.internal.classfile.JavaClass; /** ! * Utility class implementing a (typesafe) queue of JavaClass objects. * ! * @version $Id: ClassQueue.java 1747278 2016-06-07 17:28:43Z britter $ ! */ ! public class ClassQueue { ! private final LinkedList<JavaClass> vec = new LinkedList<>(); ! ! public void enqueue(final JavaClass clazz) { ! vec.addLast(clazz); ! } public JavaClass dequeue() { ! return vec.removeFirst(); } ! public boolean empty() { ! return vec.isEmpty(); ! } + @Override public String toString() { return vec.toString(); } }
< prev index next >