📄 bufferqueue.java
字号:
/* * @(#)BufferQueue.java 1.8 05/11/17 * * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */package com.sun.corba.se.impl.encoding;import java.util.LinkedList;import java.util.NoSuchElementException;import java.util.LinkedList;/** * Simple unsynchronized queue implementation for ByteBufferWithInfos. */// XREVISIT - Should be in orbutil or package privatepublic class BufferQueue{ private LinkedList list = new LinkedList(); public void enqueue(ByteBufferWithInfo item) { list.addLast(item); } public ByteBufferWithInfo dequeue() throws NoSuchElementException { return (ByteBufferWithInfo)list.removeFirst(); } public int size() { return list.size(); } // Adds the given ByteBufferWithInfo to the front // of the queue. public void push(ByteBufferWithInfo item) { list.addFirst(item); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -