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

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

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

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

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

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

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


LinkedHashSet<E>java.util

Java 1.4cloneable serializable collection

This
subclass of HashSet is a Set
implementation based on a hashtable. It defines no new methods and is
used just like a HashSet is used. What is unique
about a LinkedHashSet is that in addition to the
hashtable data structure, it also uses a doubly-linked list to
connect the elements of the set into an internal list in the order in
which they were inserted. This means that the
Iterator returned by the inherited
iterator( ) method always enumerates the elements
of the set in the order which they were inserted. By contrast, the
elements of a HashSet are enumerated in an order
that is essentially random. Note that the iteration order is not
affected by reinsertion of set elements. That is, if you attempt to
add an element that already exists in the set, the iteration order of
the set is not modified. If you delete an element and then reinsert
it, the insertion order, and therefore the iteration order, does
change.


Figure 16-37. java.util.LinkedHashSet<E>

public class

LinkedHashSet<E> extends HashSet<E> implements Set<E>, Cloneable, Serializable {
// Public Constructors
public

LinkedHashSet ( );
public

LinkedHashSet (Collection<? extends E>

c );
public

LinkedHashSet (int

initialCapacity );
public

LinkedHashSet (int

initialCapacity , float

loadFactor );
}



    / 1191