Java. util Software Package reading...

Source: Internet
Author: User

Software Package java. util

Contains collection frameworks, legacy collection classes, event models, date and time facilities, internationalization and a variety of Utility Classes (string tag generator, random number generator, and Bit Array ).

Comparison:

public interface Map<K,V>
 

Objects that map keys to values. A ing cannot contain duplicate keys. Each key can map only one value at most.

Public interfaceList <E>

Extends collection <E>

Ordered collection (also knownSequence). Users of this interface can precisely control the insert position of each element in the list. You can access the element based on the integer index (position in the list) of the element and search for the element in the list.

Unlike set, the list usually allows repeated elements. More formally, a list usually allowsE1.equals (E2)Element pairE1AndE2And if the List itself allows null elements, they usually allow multiple null elements. It is inevitable that some people want to disable the duplicate list by throwing a running exception when the user tries to insert duplicate elements. But we hope that the less this usage, the better.

ListInterface inIterator,Add,Remove,EqualsAndHashcodeSome other conventions are added to the method agreement, which exceedsCollectionThe Conventions specified in the API. For convenience, the declaration of other inheritance methods is also included here.

public interface Set<E>
Extends collection <E>
 

A collection that does not contain repeated elements. More formally, set does not containe1.equals(e2)Element paire1Ande2And can contain at most one null element. As its name implies, this interface imitates the mathematicalSetAbstract.

In all constructor methods andAdd,EqualsAndHashcodeProtocol,SetOther rules are added to the interface.CollectionThe content inherited by the API. For convenience, it also includes declarations of other inheritance methods (these declaration specifications have been specifically designedSetThe API has been modified, but it does not contain any other rules ).

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.