Java in a Nutshell, 5th Edition [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Java in a Nutshell, 5th Edition [Electronic resources] - نسخه متنی

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید


ConcurrentLinkedQueue<E>java.util.concurrent

Java 5.0serializable collection

This
class
is a threadsafe implementation of the
java.util.Queue interface (but not of the
BlockingQueue interface). It provides threadsafety
without using synchronized methods that would lock
the entire data structure. ConcurrentLinkedQueue
is unbounded and orders its elements on a first-in, first-out (FIFO)
basis. null elements are not allowed. This
implementation uses a linked-list data structure internally. Note
that the size( ) method must traverse the internal
data structure and is therefore a relatively expensive operation for
this class.


Figure 16-76. java.util.concurrent.ConcurrentLinkedQueue<E>

public class

ConcurrentLinkedQueue<E> extends java.util.AbstractQueue<E>
implements java.util.Queue<E>, Serializable {
// Public Constructors
public

ConcurrentLinkedQueue ( );
public

ConcurrentLinkedQueue (java.util.Collection<? extends E>

c );
// Methods Implementing Collection
public boolean

add (E

o );
public boolean

contains (Object

o );
public boolean

isEmpty ( ); default:true
public java.util.Iterator<E>

iterator ( );
public boolean

remove (Object

o );
public int

size ( );
public Object[ ]

toArray ( );
public <T> T[ ]

toArray (T[ ]

a );
// Methods Implementing Queue
public boolean

offer (E

o );
public E

peek ( );
public E

poll ( );
}



    / 1191