When a dynamic length of an array is needed, think ArrayList.
当需要动态长度的数组时,请考虑ArrayList。
Some Web services engines may not provide support for ArrayList.
有些Web服务引擎可能没有为arraylist提供支持。
I start by creating a list of all the factors as a dynamic list (an ArrayList).
首先把所有因子创建为一张动态列表(ArrayList)。
As you add elements, the capacity of the ArrayList object expands automatically.
在添加元素时,ArrayList对象的容量将自动扩展。
ArrayList: the list of PPListElement objects containing the new project dependencies.
包含新项目依赖关系的PPListElement对象的列表。
ArrayList: the list of PPListElement objects containing the existing project dependencies.
包含现有项目依赖关系的PPListElement对象的列表。
Similarly, it returns an ArrayList because that is the third type parameter of the AsyncTask.
类似地,它返回一个ArrayList,因为这是AsyncTask的第三个类型参数。
It does this by reordering the arrayList in the root bean for whatever column needs to be sorted.
无论哪一列需要排序,都可以通过对根bean中的arrayList进行重新排序来实现。
The tripList element is an ArrayList of Trip objects pulled from the database by the Trip.list() method.
tripList元素是Trip对象的一个 ArrayList,Trip 对象是通过Trip.list()方法从数据库中拉出的。
Listing 5 shows code that receives the incoming data and pushes it into an object of the ArrayList class.
清单5展示的代码将接收传入的数据并将数据推入到arraylist类的对象中。
Because ArrayList isn't a final class, another option would be simply to have FixedList extend ArrayList.
由于ArrayList并不是final类,另一个选择就是让FixedList扩展ArrayList。
The Listing 8 template illustrates the use of the #foreach directive with our $treeList ArrayList variable.
清单8 中的模板通过 $treeListArrayList变量演示了 #foreach指示符的用法。
The sample program creates both a CopyOnWriteArrayList and ArrayList instance from the command line arguments.
这个示例程序用命令行参数创建CopyOnWriteArrayList和ArrayList这两个实例。
In lines 25-28, you convert the result returned by the service into an ArrayList that the type-ahead component understands.
25 - 28行,将由服务器返回的结果变换为预输入组件可以理解的ArrayList类型。
A close reading of the information in Listing 17 uncovers the issue: I need to account for 0 when dealing with an ArrayList.
仔细阅读清单17中的实现可以发现问题:在处理ArrayList时,我需要考虑0。
Accordingly, I can create an ArrayList for the Stack class that holds values passed into the push method, as shown in Listing 9.
相应地,我可以为stack类创建一个ArrayList,用于保持传递给push方法的值,如清单9所示。
To summarize: use the enhanced for loop by default, but consider a hand-written counted loop for performance-critical ArrayList iteration.
结论:优先采用改进for循环,但在性能要求苛刻的ArrayList迭代中,考虑采用手写计数循环。
The letter preceding the greater-than symbol indicates the type of the object stored (t=triplet, p=pair, i=integer, l=ArrayList, and so on).
大于号之前的字母代表存储对象的类型(t=triplet,p=pair,i=integer,l=ArrayList,等)。
ArrayList is a particular type of list, storing its contents in an allocated array, whereas LinkedList USES a linked-list implementation instead.
ArrayList是List的具体类型,在分配好的数组中存储内容,而LinkedList使用的是链表实现。
The first instance of type substitution is in the fourth and fifth lines of the output, where the types of values in the ArrayList instances are specified.
类型替换的第一个实例在输出的第4和第5行,里面指定了ArrayList实例中值的类型。
Keeping the reference to the property change listener means the Person POJO has to keep some kind of collection class (such as ArrayList) to contain all the references.
保持引用属性变更监听器意味着PersonPOJO必须保留某种类型的集合类(例如arraylist)来包含所有引用。
Sometimes, the problem you're dealing with is an object leak, such as an ArrayList (which could hold thousands of objects) that just isn't getting released when it should.
有时,您正在处理的问题是一个对象泄露,如一个ArrayList (可能持有成千上万个对象)该释放时没有释放。
In Listing 9, Spring is configured to create and inject the ArrayList implementation of the bike store into CommandLineView before returning an instance of CommandLineView.
在清单9中,配置Spring是为了在返回一个CommandLineView实例前,创建并将自行车商店的ArrayList实现注入CommandLineView中。
In Listing 9, Spring is configured to create and inject the ArrayList implementation of the bike store into CommandLineView before returning an instance of CommandLineView.
在清单9中,配置Spring是为了在返回一个CommandLineView实例前,创建并将自行车商店的ArrayList实现注入CommandLineView中。
应用推荐