Current location - Quotes Website - Collection of slogans - List gt, what do you mean?
List gt, what do you mean?
General definition

edit

List; Timetable; Catalogue; Name [price] list

Domain definition

edit

In the programming language, List is a class in the standard class library, which can be simply regarded as a two-way linked list to manage the collection of objects in the form of linear columns. catalogue

The feature of is that it is very fast to add or delete elements anywhere in the collection, but it does not support random access. catalogue

Is one of the many containers provided by the class library, in addition to vector, set, map, … and so on. catalogue

As a template implementation (that is, generics), it can handle any type of variables, including user-defined data types. For example, it can be an integer (int) type.

The list can also be a list with strings (char or string) or user-defined classes.

List.

An ordered set (also called a sequence). Users of this interface can precisely control the insertion position of each element in the list. Users can access elements according to the integer index (position in the list) and search for elements in the list.

Difference from vector

The reference list is a bidirectional circular linked list, and each element knows the previous element and the next element. In STL, lists and vectors

Are two commonly used containers. Unlike vector, list does not support arbitrary access to elements. The member functions provided in the list are similar to vector, except that the list mentions

Used for push_front and pop_front operations on the header element, which is not available in vector. Another point different from vector is that the iterator of list will not fail.

Unlike vector, which reserves backup space and reallocates all memory when it exceeds the capacity limit, the iterator fails. List has no concept of backup space. If you enter or leave an element, you apply for a yuan.

Prime space, so its iterator will not fail.

Extract array

edit

The list () function is similar to array () except that it can extract multiple values from an array in one operation and assign values to multiple variables at the same time. Its form is as follows:

Invalid list (mixed ...)

This structure is particularly useful when extracting information from a database or file. For example, suppose you want to format and output information read from a text file. Each line of the file contains user information, such as name, occupation and favorite color, and each item is separated by a vertical line. A typical line is as follows:

Nino Sanzi | Professional Golfers | Green

You can use list () to read each row through a simple loop, assign each part of the data to variables, format and output the data as needed.

Domain name introduction

edit

Unlike collections, lists usually allow duplicate elements. More specifically, lists usually allow pairs of elements e 1 and e2 that satisfy e 1.equals(e2), and if the list itself allows empty elements, they usually allow multiple empty elements. When users try to insert duplicate elements, it is inevitable that some people want to prohibit duplicate lists by throwing runtime exceptions, but we hope to use them as little as possible.

The List interface adds some other conventions to the conventions of iterator, add, remove, equals and hashCode methods, which are beyond the conventions specified in the collection interface. For convenience, declarations of other inheritance methods are included here.

The List interface provides four access methods for locating (indexing) list elements. Lists (like Java arrays) are based on 0. Note that the execution time of these operations may be proportional to the index value of some implementations, such as the LinkedList class. Therefore, if the caller does not know the implementation, it is usually better to traverse the list elements than the indexed list.

The List interface provides a special iterator called ListIterator, which allows the insertion and replacement of elements and two-way access in addition to the normal operations provided by the iterator interface. It also provides a method to get the list iterator from the specified position in the list.

The list interface provides two ways to search for the specified object. From a performance point of view, these methods should be used carefully. In many implementations, they will perform expensive linear searches.

The List interface provides two effective ways to insert and remove multiple elements from the list.

Matters needing attention

edit

Although lists allow themselves to be included as elements, it is recommended to be especially careful: in such lists, the equals and hashCode methods are no longer well defined.

Some list implementations have restrictions on the elements that a list may contain. For example, some implementations prohibit null.

Element, some implementations have restrictions on the type of element. Attempting to add an unqualified element will throw an unchecked exception, usually NullPointerException or.

ClassCastException. Trying to query whether there is an unqualified element may throw an exception or just return false;; Some implementations adopt the former behavior, while others adopt the latter behavior. In short, when trying to perform an operation on an unqualified element, if the operation does not cause the unqualified element to be inserted into the list after completion, the operation may throw an exception or succeed, depending on the choice of implementation. Such exceptions are marked as "optional" in the specification of the interface.

Public function

edit

booleanadd(Ee)

Alternatively, add the specified element to the end of the list.

void add(in index,Eelement)

Inserts the specified element at the specified position in the list (optional operation).

BooleanaddAll (set

Optionally, add all the elements in the specified collection to the end of this list in the order in which the iterator of the specified collection returns them.

booleanaddAll(intindex,Collection & lt? extendsE & gtc)

Inserts all the elements in the specified collection into the specified position in the list (optional operation).

voidclear()

Alternatively, delete all elements from the list.

Boolean inclusion (Objecto)

Returns true if the list contains the specified element.

BooleancontainsAll (set < & gtc)

Returns true if the list contains all the elements of the specified collection.

Boolean value equals (Objecto)

Compares whether the specified object is equal to a list.

Eget(intindex)

Returns the element at the specified position in the list.

inthashCode()

Returns the hash value of the list.

intindexOf(Objecto)

Returns the index of the first occurrence of the specified element in the list; If this list does not contain this element,-1 is returned.

booleanisEmpty()

Returns true if the list does not contain any elements.

Iterator & ltE> Iterator ()

Returns an iterator that iterates through the elements in the list in the correct order.

intlastIndexOf(Objecto)

Returns the index of the last occurrence of the specified element in the list; If the list does not contain this element,-1 is returned.

ListIterator & ltE> List Iterator ()

Returns the list iterator of this list element (in the appropriate order).

ListIterator & ltE> list iterator (intindex)

Returns a list iterator (in the appropriate order) of the elements in the list, starting at the specified position in the list.

Eremove(intindex)

Alternatively, remove the element at the specified position in the list.

booleanremove(Objecto)

Alternatively, remove the first occurrence of the specified element from the list, if any.

BooleanremoveAll (set

Alternatively, remove all elements contained in the specified collection from the list.

BooleanretainAll (set

Only the elements contained in the specified collection are kept in the list (optional operation).

Eset(intindex,Eelement)

Replace the element at the specified position in the list with the specified element (optional operation).

intsize()

Returns the number of elements in the list.

List & ltE> sublist (intfromIndex)

Returns a partial view between fromIndex and toIndex specified in the list.

Object[]toArray()

Returns an array containing all the elements in the list in the correct order (from the first element to the last element).

& ltT> to array (T[]a)

Returns an array containing all the elements in the list in an appropriate order (from the first element to the last element); The runtime type of the returned array is the runtime type of the specified array.

List control

edit

List control has the characteristics of intuitive data display and convenient operation in various programs. So the usage rate is extremely high.

Far point list

Pro contains the most powerful development components of list box and combo box. These extremely powerful controls allow you to display up to 2 billion list items, display a record on multiple lines, and search the specified.

List items, or sort list items with unlimited key values. List Pro has more than 200 properties, which can be used to further customize the appearance of the control. In short, these feature allow lists.

Pro becomes the ultimate data viewer.

Conceptual origin

edit

In the era when there were no cars in Europe, Shanda

Tourism was then interpreted as the carriage of a large carriage for long-distance travel. But now with the constant evolution and change of the times, the carriage has long been eliminated by the car. In the 1960s, cars were very popular.

Time is not enough for long-distance travel, and the mechanical reliability is very low. As a result, a number of high-performance and high-reliability high-horsepower sports cars have emerged, which are called GT, while Grand

Travel means a high-powered car. As long as it can be called GT in the history of human cars, it will not be vulgar. Now GT has been widely known as a high-performance sports car, and there is no distinction between luxury and non-luxury.

Luxurious.

In the racing world, GT is referred to as a super sports car with high horsepower power output and roof design (convertible sports car can't be regarded as GT racing car), so the Chinese name of GT should probably be called the world's top super sports car.

The FIA GT World Championship is one of the top events under the jurisdiction of the FIA, and it is also a battleground for global supercars. In recent years, it has attracted the attention of racing enthusiasts all over the world. Lotus, Sarin, Chrysler, Maserati, Lamborghini, Porsche, Ferrari, nine super sports car manufacturers with excellent pedigree and high-tech resources, and special weapon, who have been carefully built, are all guests of the FIA GT World Championship. In addition, more than 70 racing drivers with top driving skills from all over the world completed the race at the fastest speed on the international track with different challenges in 1 1 countries.

GT racing car is the perfect combination of beauty and power. Many supercar manufacturers have established their reputation in GT racing cars and made their products the best in the world.

Super sports car that China fans dream of. At the FIA

According to the case of GT racing car, GT racing car must be professionally modified by a sports car that can run on ordinary roads, and divided into two groups according to the engine output horsepower, namely the Grand with an average of 600 horsepower.

400-470 horsepower Touring group and Series Grand Touring group (N-GT).

The correct translation of Grand in GT should be interpreted as long distance, not its literal translation, so GT cars are generally called long-distance station wagons or endurance cars.

A rickshaw is a car that can travel at high speed for a long time. There is no GT car called station wagon in the world. They are all sports cars with strong power and similar appearance-two doors and four seats (2+2) hardtop.

Come back. This shape is also an important symbol to judge whether it is a GT sports car. For example, Ferrari 456GT and Porsche 928GTS which were discontinued in earlier years. But with the development of cars, many cars no longer pursue the ultimate.

Sports, rather than combining sports and practicality, such as the BMW 5 Series GT, which has just been listed, has a four-door and four-seat style, but this car is designed for GT and RV cross, and the real super GT sports car is still traditional.

Style, such as Ferrari 6 12.

The word GT is English Grand Touring (or Latin Grand Turismo).

This crown originated in the late 1960s and early 1970s. Although the vehicle manufacturing level at that time could already produce some high-performance sports cars, due to the general lack of mechanical durability in the early days, cars.

Generally speaking, the long-distance high-speed cruising ability of the car is still insufficient, so at that time. It can be said that there are very few high-performance cars that can be used for long-term exercise. Therefore. At that time, some top cars in the field of high-performance sports cars

Factory, on the occasion of a breakthrough in engine engineering. The new high-performance coupe was called Grand when it was launched.

A banner like a tour. With the prominent importance of long-distance travel, it is advertised that this type of vehicle has high durability in addition to high output power.

trait

edit

In order to echo the slogan of Grand Touring, the so-called GT car must have the following characteristics besides long-distance durability:

1. First of all, this is the most important point. You must perform well.

2. In order to express the spirit of pursuing freedom and freedom, the model must be a two-door configuration.

3. In order to meet the needs of travel and maintain the practical functionality of the carriage, the seats must be planned as four seats or 2+2.

In order to make the driver enjoy driving the car, the interior of the car must be luxurious and comfortable.

Of course, from the perspective of long-distance durability, the original intention of GT has no meaning, just the so-called GT title; After more than 30 years of development, it has become the honor and glory of this kind of high-performance sports car with unique shape (two doors, four seats and 2+2 hardtop hatchback).