![]() See Java ConcurrencyĬollections are so frequently used that various concurrentįriendly interfaces and implementations of collections are included The Java platform includes extensive support forĬoncurrent programming. Which methods must be overridden, given the performance of theīasic operations of a specific implementation.Īpplications that use collections from more than one thread mustīe carefully programmed. Precisely how each method is implemented so the implementer knows The API documentation for these classes describes Invalid concurrent modification, and fail quickly and cleanlyĪbstractMap classes provide basic implementations of theĬore collection interfaces, to minimize the effort required to Implementations have fail-fast iterators, which detect Synchronization to many unsynchronized collections. Unsynchronized, but the Collections class contains staticįactories called synchronization wrappers that can be used to add Restrictions on the elements they may contain. Optional operations in the collection interfaces and have no The general-purpose implementations support all of the Table: General purpose implementations Interface The general purpose implementations are summarized in the following Some restrictedĬlasses that implement the collection interfaces typically have Attempting to remove or testįor the presence of an element that violates an implementation's Restrictions results in a runtime exception, typically aĬlassCastException, an IllegalArgumentException, Restrictions include requiring elements to:Īttempting to add an element that violates an implementation's Some implementations restrict what elements (or in the case of Their behavior to provide good performance when applied to either This enables generic algorithms to change Marker interface enables lists to advertise the fact that they Lists thatĭo not support fast indexed element access are known as
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |