Java中的Arrays
1.源代码:
This class contains various methods for manipulating arrays (such as
sorting and searching). This class also contains a static factory
that allows arrays to be viewed as lists.
<p>The methods in this class all throw a {@code NullPointerException},
if the specified array reference is null, except where noted.
<p>The documentation for the methods contained in this class includes
briefs description of the <i>implementations</i>. Such descriptions should
be regarded as <i>implementation notes</i>, rather than parts of the
<i>specification</i>. Implementors should feel free to substitute other
algorithms, so long as the specification itself is adhered to. (For
example, the algorithm used by {@code sort(Object[])} does not have to be
a MergeSort, but it does have to be <i>stable</i>.)
<p>This class is a member of the
<a href="{@docRoot}/../technotes/guides/collections/index.html">
Java Collections Framework</a>.
@author Josh Bloch
@author Neal Gafter
@author John Rose
@since 1.2
public class Arrays {}
2.中文译注:
这个类包含操作arrays的各种不同的方法,诸如排序,查找等。这个类包含一个静态工厂,所以允许arrays被视作一个lists。
除特殊说明外,如果指定的数组引用为空,Arrays类中的方法全都抛出NullPointerException。
这个类中的方法的文档有对实现的简单描述。这些描述应该被视作实现注意事项,而不是使用说明书的一部分。实现者应该自由的自由的替代其它的算法,只要说明本身被遵守。(例如,被sort(Object[])调用的排序算法不必是一个归并排序[MergeSort],但必须是一个稳定的排序。)
这个类是Java集合框架的一员。