Java Doc for Arrays.java in  » Apache-Harmony-Java-SE » java-package » java » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Apache Harmony Java SE » java package » java.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.util.Arrays

Arrays
public class Arrays (Code)
Arrays contains static methods which operate on arrays.
since:
   1.2




Method Summary
public static  List<T>asList(T... array)
     Answers a List on the objects in the specified array.
public static  intbinarySearch(byte[] array, byte value)
     Performs a binary search for the specified element in the specified sorted array.
public static  intbinarySearch(char[] array, char value)
     Performs a binary search for the specified element in the specified sorted array.
public static  intbinarySearch(double[] array, double value)
     Performs a binary search for the specified element in the specified sorted array.
public static  intbinarySearch(float[] array, float value)
     Performs a binary search for the specified element in the specified sorted array.
public static  intbinarySearch(int[] array, int value)
     Performs a binary search for the specified element in the specified sorted array.
public static  intbinarySearch(long[] array, long value)
     Performs a binary search for the specified element in the specified sorted array.
public static  intbinarySearch(Object[] array, Object object)
     Performs a binary search for the specified element in the specified sorted array.
public static  intbinarySearch(T[] array, T object, Comparator<? super T> comparator)
     Performs a binary search for the specified element in the specified sorted array using the Comparator to compare elements.
public static  intbinarySearch(short[] array, short value)
     Performs a binary search for the specified element in the specified sorted array.
public static  booleandeepEquals(Object[] array1, Object[] array2)
     Returns the 'deep' equals for the two given arrays.
public static  intdeepHashCode(Object[] array)
     Returns the 'deep' hash code for the given array.
public static  StringdeepToString(Object[] array)
    

Creates a "deep" String representation of the Object[] passed, such that if the array contains other arrays, the String representation of those arrays is generated as well.

If any of the elements are primitive arrays, the generation is delegated to the other toString methods in this class.

public static  booleanequals(byte[] array1, byte[] array2)
     Compares the two arrays.
public static  booleanequals(short[] array1, short[] array2)
     Compares the two arrays.
public static  booleanequals(char[] array1, char[] array2)
     Compares the two arrays.
public static  booleanequals(int[] array1, int[] array2)
     Compares the two arrays.
public static  booleanequals(long[] array1, long[] array2)
     Compares the two arrays.
public static  booleanequals(float[] array1, float[] array2)
     Compares the two arrays.
public static  booleanequals(double[] array1, double[] array2)
     Compares the two arrays.
public static  booleanequals(boolean[] array1, boolean[] array2)
     Compares the two arrays.
public static  booleanequals(Object[] array1, Object[] array2)
     Compares the two arrays.
public static  voidfill(byte[] array, byte value)
     Fills the array with the given value.
public static  voidfill(byte[] array, int start, int end, byte value)
     Fills the section of the array between the given indices with the given value.
public static  voidfill(short[] array, short value)
     Fills the array with the given value.
public static  voidfill(short[] array, int start, int end, short value)
     Fills the section of the array between the given indices with the given value.
public static  voidfill(char[] array, char value)
     Fills the array with the given value.
public static  voidfill(char[] array, int start, int end, char value)
     Fills the section of the array between the given indices with the given value.
public static  voidfill(int[] array, int value)
     Fills the array with the given value.
public static  voidfill(int[] array, int start, int end, int value)
     Fills the section of the array between the given indices with the given value.
public static  voidfill(long[] array, long value)
     Fills the array with the given value.
public static  voidfill(long[] array, int start, int end, long value)
     Fills the section of the array between the given indices with the given value.
public static  voidfill(float[] array, float value)
     Fills the array with the given value.
public static  voidfill(float[] array, int start, int end, float value)
     Fills the section of the array between the given indices with the given value.
public static  voidfill(double[] array, double value)
     Fills the array with the given value.
public static  voidfill(double[] array, int start, int end, double value)
     Fills the section of the array between the given indices with the given value.
public static  voidfill(boolean[] array, boolean value)
     Fills the array with the given value.
public static  voidfill(boolean[] array, int start, int end, boolean value)
     Fills the section of the array between the given indices with the given value.
public static  voidfill(Object[] array, Object value)
     Fills the array with the given value.
public static  voidfill(Object[] array, int start, int end, Object value)
     Fills the section of the array between the given indices with the given value.
public static  inthashCode(boolean[] array)
     Returns the hash code for the given array. If Arrays.equals(...) returns true for two arrays then their hash codes will also be equal. The value returned by this method is the same value as the List.hashCode } method which is invoked on a List } containing a sequence of Boolean } instances representing the elements of array in the same order.
public static  inthashCode(int[] array)
     Returns the hash code for the given array. If Arrays.equals(...) returns true for two arrays then their hash codes will also be equal. The value returned by this method is the same value as the List.hashCode } method which is invoked on a List } containing a sequence of Integer } instances representing the elements of array in the same order.
public static  inthashCode(short[] array)
     Returns the hash code for the given array. If Arrays.equals(...) returns true for two arrays then their hash codes will also be equal. The value returned by this method is the same value as the List.hashCode } method which is invoked on a List } containing a sequence of Short } instances representing the elements of array in the same order.
public static  inthashCode(char[] array)
     Returns the hash code for the given array. If Arrays.equals(...) returns true for two arrays then their hash codes will also be equal. The value returned by this method is the same value as the List.hashCode } method which is invoked on a List } containing a sequence of Character } instances representing the elements of array in the same order.
public static  inthashCode(byte[] array)
     Returns the hash code for the given array. If Arrays.equals(...) returns true for two arrays then their hash codes will also be equal. The value returned by this method is the same value as the List.hashCode } method which is invoked on a List } containing a sequence of Byte } instances representing the elements of array in the same order.
public static  inthashCode(long[] array)
     Returns the hash code for the given array. If Arrays.equals(...) returns true for two arrays then their hash codes will also be equal. The value returned by this method is the same value as the List.hashCode } method which is invoked on a List } containing a sequence of Long } instances representing the elements of array in the same order.
public static  inthashCode(float[] array)
     Returns the hash code for the given array. If Arrays.equals(...) returns true for two arrays then their hash codes will also be equal. The value returned by this method is the same value as the List.hashCode } method which is invoked on a List } containing a sequence of Float } instances representing the elements of array in the same order.
public static  inthashCode(double[] array)
     Returns the hash code for the given array. If Arrays.equals(...) returns true for two arrays then their hash codes will also be equal. The value returned by this method is the same value as the List.hashCode } method which is invoked on a List } containing a sequence of Double } instances representing the elements of array in the same order.
public static  inthashCode(Object[] array)
     Returns the hash code for the given array.
public static  voidsort(byte[] array)
     Performs a sort on the given array.
public static  voidsort(byte[] array, int start, int end)
     Performs a sort on the section of the array between the given indices.
public static  voidsort(char[] array)
     Performs a sort on the given array.
public static  voidsort(char[] array, int start, int end)
     Performs a sort on the section of the array between the given indices.
public static  voidsort(double[] array)
     Performs a sort on the given array.
public static  voidsort(double[] array, int start, int end)
     Performs a sort on the section of the array between the given indices.
public static  voidsort(float[] array)
     Performs a sort on the given array.
public static  voidsort(float[] array, int start, int end)
     Performs a sort on the section of the array between the given indices.
public static  voidsort(int[] array)
     Performs a sort on the given array.
public static  voidsort(int[] array, int start, int end)
     Performs a sort on the section of the array between the given indices.
public static  voidsort(long[] array)
     Performs a sort on given array.
public static  voidsort(long[] array, int start, int end)
     Performs a sort on the section of the array between the given indices.
public static  voidsort(Object[] array)
     Performs a sort on the given array.
public static  voidsort(Object[] array, int start, int end)
     Performs a sort on the section of the array between the given indices.
public static  voidsort(T[] array, int start, int end, Comparator<? super T> comparator)
     Performs a sort on the section of the array between the given indices.
public static  voidsort(T[] array, Comparator<? super T> comparator)
     Performs a sort on the given array.
public static  voidsort(short[] array)
     Performs a sort on the given array.
public static  voidsort(short[] array, int start, int end)
     Performs a sort on the given array.
public static  StringtoString(boolean[] array)
    

Creates a String representation of the boolean[] passed.

public static  StringtoString(byte[] array)
     Creates a String representation of the byte[] passed. The result is surrounded by brackets ("[]"), each element is converted to a String via the String.valueOf(int) and separated by ", ". If the array is null, then "null" is returned.
Parameters:
  array - The byte array to convert.
public static  StringtoString(char[] array)
    

Creates a String representation of the char[] passed.

public static  StringtoString(double[] array)
    

Creates a String representation of the double[] passed.

public static  StringtoString(float[] array)
    

Creates a String representation of the float[] passed.

public static  StringtoString(int[] array)
    

Creates a String representation of the int[] passed.

public static  StringtoString(long[] array)
    

Creates a String representation of the long[] passed.

public static  StringtoString(short[] array)
     Creates a String representation of the short[] passed. The result is surrounded by brackets ("[]"), each element is converted to a String via the String.valueOf(int) and separated by ", ". If the array is null, then "null" is returned.
Parameters:
  array - The short array to convert.
public static  StringtoString(Object[] array)
    

Creates a String representation of the Object[] passed.




Method Detail
asList
public static List<T> asList(T... array)(Code)
Answers a List on the objects in the specified array. The size of the List cannot be modified, i.e. adding and removing are unsupported, but the elements can be set. Setting an element modifies the underlying array.
Parameters:
  array - the array a List on the specified array



binarySearch
public static int binarySearch(byte[] array, byte value)(Code)
Performs a binary search for the specified element in the specified sorted array.
Parameters:
  array - the sorted byte array to search
Parameters:
  value - the byte element to find the non-negative index of the element, or a negative index whichis the -index - 1 where the element would be inserted



binarySearch
public static int binarySearch(char[] array, char value)(Code)
Performs a binary search for the specified element in the specified sorted array.
Parameters:
  array - the sorted char array to search
Parameters:
  value - the char element to find the non-negative index of the element, or a negative index whichis the -index - 1 where the element would be inserted



binarySearch
public static int binarySearch(double[] array, double value)(Code)
Performs a binary search for the specified element in the specified sorted array.
Parameters:
  array - the sorted double array to search
Parameters:
  value - the double element to find the non-negative index of the element, or a negative index whichis the -index - 1 where the element would be inserted



binarySearch
public static int binarySearch(float[] array, float value)(Code)
Performs a binary search for the specified element in the specified sorted array.
Parameters:
  array - the sorted float array to search
Parameters:
  value - the float element to find the non-negative index of the element, or a negative index whichis the -index - 1 where the element would be inserted



binarySearch
public static int binarySearch(int[] array, int value)(Code)
Performs a binary search for the specified element in the specified sorted array.
Parameters:
  array - the sorted int array to search
Parameters:
  value - the int element to find the non-negative index of the element, or a negative index whichis the -index - 1 where the element would be inserted



binarySearch
public static int binarySearch(long[] array, long value)(Code)
Performs a binary search for the specified element in the specified sorted array.
Parameters:
  array - the sorted long array to search
Parameters:
  value - the long element to find the non-negative index of the element, or a negative index whichis the -index - 1 where the element would be inserted



binarySearch
public static int binarySearch(Object[] array, Object object)(Code)
Performs a binary search for the specified element in the specified sorted array.
Parameters:
  array - the sorted Object array to search
Parameters:
  object - the Object element to find the non-negative index of the element, or a negative index whichis the -index - 1 where the element would be inserted
exception:
  ClassCastException - when an element in the array or the search element doesnot implement Comparable, or cannot be compared to eachother



binarySearch
public static int binarySearch(T[] array, T object, Comparator<? super T> comparator)(Code)
Performs a binary search for the specified element in the specified sorted array using the Comparator to compare elements.
Parameters:
  array - the sorted char array to search
Parameters:
  object - the char element to find
Parameters:
  comparator - the Comparator the non-negative index of the element, or a negative index whichis the -index - 1 where the element would be inserted
exception:
  ClassCastException - when an element in the array and the search element cannotbe compared to each other using the Comparator



binarySearch
public static int binarySearch(short[] array, short value)(Code)
Performs a binary search for the specified element in the specified sorted array.
Parameters:
  array - the sorted short array to search
Parameters:
  value - the short element to find the non-negative index of the element, or a negative index whichis the -index - 1 where the element would be inserted



deepEquals
public static boolean deepEquals(Object[] array1, Object[] array2)(Code)
Returns the 'deep' equals for the two given arrays. This means that if either of the arrays contains other arrays then their contents are also checked for (deep) equality. If two corresponding elements are arrays of a primitive type then the appropriate Arrays.equals method is used to determine their equality. Otherwise for two Object arrays deepEquals is called recursively. This method should not be used if either of the arrays, or any arrays contained within it are likely to contain a reference to itself.
Parameters:
  array1 - the first Object array
Parameters:
  array2 - the second Object array true when the arrays have the same length and the elements ateach index in the two arrays are equal, false otherwise



deepHashCode
public static int deepHashCode(Object[] array)(Code)
Returns the 'deep' hash code for the given array. This means that if this array contains other arrays their contents will also be included in the hash and so on recursively. This method should not be used if the array or any arrays contained within it are likely to contain a reference to itself. If Arrays.deepEquals(...) returns true for two arrays then their deep hash codes will also be equal. If the array is null the return value will be 0.
Parameters:
  array - the array to return the hash code for the hash code for array



deepToString
public static String deepToString(Object[] array)(Code)

Creates a "deep" String representation of the Object[] passed, such that if the array contains other arrays, the String representation of those arrays is generated as well.

If any of the elements are primitive arrays, the generation is delegated to the other toString methods in this class. If any element contains a reference to the original array, then it will be represented as "[...]". If an element is an Object[], then its representation is generated by a recursive call to this method. All other elements are converted via the String.valueOf(Object) method.


Parameters:
  array - The Object array to convert. The String representation of array.
since:
   1.5



equals
public static boolean equals(byte[] array1, byte[] array2)(Code)
Compares the two arrays.
Parameters:
  array1 - the first byte array
Parameters:
  array2 - the second byte array true when the arrays have the same length and the elements ateach index in the two arrays are equal, false otherwise



equals
public static boolean equals(short[] array1, short[] array2)(Code)
Compares the two arrays.
Parameters:
  array1 - the first short array
Parameters:
  array2 - the second short array true when the arrays have the same length and the elements ateach index in the two arrays are equal, false otherwise



equals
public static boolean equals(char[] array1, char[] array2)(Code)
Compares the two arrays.
Parameters:
  array1 - the first char array
Parameters:
  array2 - the second char array true when the arrays have the same length and the elements ateach index in the two arrays are equal, false otherwise



equals
public static boolean equals(int[] array1, int[] array2)(Code)
Compares the two arrays.
Parameters:
  array1 - the first int array
Parameters:
  array2 - the second int array true when the arrays have the same length and the elements ateach index in the two arrays are equal, false otherwise



equals
public static boolean equals(long[] array1, long[] array2)(Code)
Compares the two arrays.
Parameters:
  array1 - the first long array
Parameters:
  array2 - the second long array true when the arrays have the same length and the elements ateach index in the two arrays are equal, false otherwise



equals
public static boolean equals(float[] array1, float[] array2)(Code)
Compares the two arrays. The values are compared in the same manner as Float.equals().
Parameters:
  array1 - the first float array
Parameters:
  array2 - the second float array true when the arrays have the same length and the elements ateach index in the two arrays are equal, false otherwise
See Also:   Float.equals(Object)



equals
public static boolean equals(double[] array1, double[] array2)(Code)
Compares the two arrays. The values are compared in the same manner as Double.equals().
Parameters:
  array1 - the first double array
Parameters:
  array2 - the second double array true when the arrays have the same length and the elements ateach index in the two arrays are equal, false otherwise
See Also:   Double.equals(Object)



equals
public static boolean equals(boolean[] array1, boolean[] array2)(Code)
Compares the two arrays.
Parameters:
  array1 - the first boolean array
Parameters:
  array2 - the second boolean array true when the arrays have the same length and the elements ateach index in the two arrays are equal, false otherwise



equals
public static boolean equals(Object[] array1, Object[] array2)(Code)
Compares the two arrays.
Parameters:
  array1 - the first Object array
Parameters:
  array2 - the second Object array true when the arrays have the same length and the elements ateach index in the two arrays are equal, false otherwise



fill
public static void fill(byte[] array, byte value)(Code)
Fills the array with the given value.
Parameters:
  array - the byte array to fill
Parameters:
  value - the byte element



fill
public static void fill(byte[] array, int start, int end, byte value)(Code)
Fills the section of the array between the given indices with the given value.
Parameters:
  array - the byte array to fill
Parameters:
  start - the start index
Parameters:
  end - the end index + 1
Parameters:
  value - the byte element
exception:
  IllegalArgumentException - when start > end
exception:
  ArrayIndexOutOfBoundsException - when start < 0 orend > array.size()



fill
public static void fill(short[] array, short value)(Code)
Fills the array with the given value.
Parameters:
  array - the short array to fill
Parameters:
  value - the short element



fill
public static void fill(short[] array, int start, int end, short value)(Code)
Fills the section of the array between the given indices with the given value.
Parameters:
  array - the short array to fill
Parameters:
  start - the start index
Parameters:
  end - the end index + 1
Parameters:
  value - the short element
exception:
  IllegalArgumentException - when start > end
exception:
  ArrayIndexOutOfBoundsException - when start < 0 orend > array.size()



fill
public static void fill(char[] array, char value)(Code)
Fills the array with the given value.
Parameters:
  array - the char array to fill
Parameters:
  value - the char element



fill
public static void fill(char[] array, int start, int end, char value)(Code)
Fills the section of the array between the given indices with the given value.
Parameters:
  array - the char array to fill
Parameters:
  start - the start index
Parameters:
  end - the end index + 1
Parameters:
  value - the char element
exception:
  IllegalArgumentException - when start > end
exception:
  ArrayIndexOutOfBoundsException - when start < 0 orend > array.size()



fill
public static void fill(int[] array, int value)(Code)
Fills the array with the given value.
Parameters:
  array - the int array to fill
Parameters:
  value - the int element



fill
public static void fill(int[] array, int start, int end, int value)(Code)
Fills the section of the array between the given indices with the given value.
Parameters:
  array - the int array to fill
Parameters:
  start - the start index
Parameters:
  end - the end index + 1
Parameters:
  value - the int element
exception:
  IllegalArgumentException - when start > end
exception:
  ArrayIndexOutOfBoundsException - when start < 0 orend > array.size()



fill
public static void fill(long[] array, long value)(Code)
Fills the array with the given value.
Parameters:
  array - the long array to fill
Parameters:
  value - the long element



fill
public static void fill(long[] array, int start, int end, long value)(Code)
Fills the section of the array between the given indices with the given value.
Parameters:
  array - the long array to fill
Parameters:
  start - the start index
Parameters:
  end - the end index + 1
Parameters:
  value - the long element
exception:
  IllegalArgumentException - when start > end
exception:
  ArrayIndexOutOfBoundsException - when start < 0 orend > array.size()



fill
public static void fill(float[] array, float value)(Code)
Fills the array with the given value.
Parameters:
  array - the float array to fill
Parameters:
  value - the float element



fill
public static void fill(float[] array, int start, int end, float value)(Code)
Fills the section of the array between the given indices with the given value.
Parameters:
  array - the float array to fill
Parameters:
  start - the start index
Parameters:
  end - the end index + 1
Parameters:
  value - the float element
exception:
  IllegalArgumentException - when start > end
exception:
  ArrayIndexOutOfBoundsException - when start < 0 orend > array.size()



fill
public static void fill(double[] array, double value)(Code)
Fills the array with the given value.
Parameters:
  array - the float array to fill
Parameters:
  value - the float element



fill
public static void fill(double[] array, int start, int end, double value)(Code)
Fills the section of the array between the given indices with the given value.
Parameters:
  array - the double array to fill
Parameters:
  start - the start index
Parameters:
  end - the end index + 1
Parameters:
  value - the double element
exception:
  IllegalArgumentException - when start > end
exception:
  ArrayIndexOutOfBoundsException - when start < 0 orend > array.size()



fill
public static void fill(boolean[] array, boolean value)(Code)
Fills the array with the given value.
Parameters:
  array - the boolean array to fill
Parameters:
  value - the boolean element



fill
public static void fill(boolean[] array, int start, int end, boolean value)(Code)
Fills the section of the array between the given indices with the given value.
Parameters:
  array - the boolean array to fill
Parameters:
  start - the start index
Parameters:
  end - the end index + 1
Parameters:
  value - the boolean element
exception:
  IllegalArgumentException - when start > end
exception:
  ArrayIndexOutOfBoundsException - when start < 0 orend > array.size()



fill
public static void fill(Object[] array, Object value)(Code)
Fills the array with the given value.
Parameters:
  array - the Object array to fill
Parameters:
  value - the Object element



fill
public static void fill(Object[] array, int start, int end, Object value)(Code)
Fills the section of the array between the given indices with the given value.
Parameters:
  array - the Object array to fill
Parameters:
  start - the start index
Parameters:
  end - the end index + 1
Parameters:
  value - the Object element
exception:
  IllegalArgumentException - when start > end
exception:
  ArrayIndexOutOfBoundsException - when start < 0 orend > array.size()



hashCode
public static int hashCode(boolean[] array)(Code)
Returns the hash code for the given array. If Arrays.equals(...) returns true for two arrays then their hash codes will also be equal. The value returned by this method is the same value as the List.hashCode } method which is invoked on a List } containing a sequence of Boolean } instances representing the elements of array in the same order. If the array is null the return value will be 0.
Parameters:
  array - the array to return the hash code for the hash code for array



hashCode
public static int hashCode(int[] array)(Code)
Returns the hash code for the given array. If Arrays.equals(...) returns true for two arrays then their hash codes will also be equal. The value returned by this method is the same value as the List.hashCode } method which is invoked on a List } containing a sequence of Integer } instances representing the elements of array in the same order. If the array is null the return value will be 0.
Parameters:
  array - the array to return the hash code for the hash code for array



hashCode
public static int hashCode(short[] array)(Code)
Returns the hash code for the given array. If Arrays.equals(...) returns true for two arrays then their hash codes will also be equal. The value returned by this method is the same value as the List.hashCode } method which is invoked on a List } containing a sequence of Short } instances representing the elements of array in the same order. If the array is null the return value will be 0.
Parameters:
  array - the array to return the hash code for the hash code for array



hashCode
public static int hashCode(char[] array)(Code)
Returns the hash code for the given array. If Arrays.equals(...) returns true for two arrays then their hash codes will also be equal. The value returned by this method is the same value as the List.hashCode } method which is invoked on a List } containing a sequence of Character } instances representing the elements of array in the same order. If the array is null the return value will be 0.
Parameters:
  array - the array to return the hash code for the hash code for array



hashCode
public static int hashCode(byte[] array)(Code)
Returns the hash code for the given array. If Arrays.equals(...) returns true for two arrays then their hash codes will also be equal. The value returned by this method is the same value as the List.hashCode } method which is invoked on a List } containing a sequence of Byte } instances representing the elements of array in the same order. If the array is null the return value will be 0.
Parameters:
  array - the array to return the hash code for the hash code for array



hashCode
public static int hashCode(long[] array)(Code)
Returns the hash code for the given array. If Arrays.equals(...) returns true for two arrays then their hash codes will also be equal. The value returned by this method is the same value as the List.hashCode } method which is invoked on a List } containing a sequence of Long } instances representing the elements of array in the same order. If the array is null the return value will be 0.
Parameters:
  array - the array to return the hash code for the hash code for array



hashCode
public static int hashCode(float[] array)(Code)
Returns the hash code for the given array. If Arrays.equals(...) returns true for two arrays then their hash codes will also be equal. The value returned by this method is the same value as the List.hashCode } method which is invoked on a List } containing a sequence of Float } instances representing the elements of array in the same order. If the array is null the return value will be 0.
Parameters:
  array - the array to return the hash code for the hash code for array



hashCode
public static int hashCode(double[] array)(Code)
Returns the hash code for the given array. If Arrays.equals(...) returns true for two arrays then their hash codes will also be equal. The value returned by this method is the same value as the List.hashCode } method which is invoked on a List } containing a sequence of Double } instances representing the elements of array in the same order. If the array is null, the return value will be 0.
Parameters:
  array - the array to return the hash code for the hash code for array



hashCode
public static int hashCode(Object[] array)(Code)
Returns the hash code for the given array. If this array contains other arrays, their contents will not be recursively searched so this method should be used if the array is likely to contain a reference to itself. If Arrays.equals(...) returns true for two arrays then their hash codes will also be equal. The value returned by this method is the same value as the method Arrays.asList(array).hashCode(). If the array is null, the return value will be 0.
Parameters:
  array - the array to return the hash code for the hash code for array



sort
public static void sort(byte[] array)(Code)
Performs a sort on the given array. Elements will be re-ordered into ascending order.
Parameters:
  array - the byte array to sort



sort
public static void sort(byte[] array, int start, int end)(Code)
Performs a sort on the section of the array between the given indices. Elements will be re-ordered into ascending order.
Parameters:
  array - the byte array to sort
Parameters:
  start - the start index
Parameters:
  end - the end index + 1
exception:
  IllegalArgumentException - when start > end
exception:
  ArrayIndexOutOfBoundsException - when start < 0 orend > array.size()



sort
public static void sort(char[] array)(Code)
Performs a sort on the given array. Elements will be re-ordered into ascending order.
Parameters:
  array - the char array to sort



sort
public static void sort(char[] array, int start, int end)(Code)
Performs a sort on the section of the array between the given indices. Elements will be re-ordered into ascending order.
Parameters:
  array - the char array to sort
Parameters:
  start - the start index
Parameters:
  end - the end index + 1
exception:
  IllegalArgumentException - when start > end
exception:
  ArrayIndexOutOfBoundsException - when start < 0 orend > array.size()



sort
public static void sort(double[] array)(Code)
Performs a sort on the given array. Elements will be re-ordered into ascending order.
Parameters:
  array - the double array to sort
See Also:   Arrays.sort(double[],int,int)



sort
public static void sort(double[] array, int start, int end)(Code)
Performs a sort on the section of the array between the given indices. Elements will be re-ordered into ascending order.
Parameters:
  array - the double array to sort
Parameters:
  start - the start index
Parameters:
  end - the end index + 1
exception:
  IllegalArgumentException - when start > end
exception:
  ArrayIndexOutOfBoundsException - when start < 0 orend > array.size()
See Also:   Double.compareTo(Double)



sort
public static void sort(float[] array)(Code)
Performs a sort on the given array. Elements will be re-ordered into ascending order.
Parameters:
  array - the float array to sort
See Also:   Arrays.sort(float[],int,int)



sort
public static void sort(float[] array, int start, int end)(Code)
Performs a sort on the section of the array between the given indices. Elements will be re-ordered into ascending order.
Parameters:
  array - the float array to sort
Parameters:
  start - the start index
Parameters:
  end - the end index + 1
exception:
  IllegalArgumentException - when start > end
exception:
  ArrayIndexOutOfBoundsException - when start < 0 orend > array.size()
See Also:   Float.compareTo(Float)



sort
public static void sort(int[] array)(Code)
Performs a sort on the given array. Elements will be re-ordered into ascending order.
Parameters:
  array - the int array to sort



sort
public static void sort(int[] array, int start, int end)(Code)
Performs a sort on the section of the array between the given indices. Elements will be re-ordered into ascending order.
Parameters:
  array - the int array to sort
Parameters:
  start - the start index
Parameters:
  end - the end index + 1
exception:
  IllegalArgumentException - when start > end
exception:
  ArrayIndexOutOfBoundsException - when start < 0 orend > array.size()



sort
public static void sort(long[] array)(Code)
Performs a sort on given array. Elements will be re-ordered into ascending order.
Parameters:
  array - the long array to sort



sort
public static void sort(long[] array, int start, int end)(Code)
Performs a sort on the section of the array between the given indices. Elements will be re-ordered into ascending order.
Parameters:
  array - the long array to sort
Parameters:
  start - the start index
Parameters:
  end - the end index + 1
exception:
  IllegalArgumentException - when start > end
exception:
  ArrayIndexOutOfBoundsException - when start < 0 orend > array.size()



sort
public static void sort(Object[] array)(Code)
Performs a sort on the given array. Elements will be re-ordered into ascending order.
Parameters:
  array - the Object array to sort
exception:
  ClassCastException - when an element in the array does not implement Comparableor elements cannot be compared to each other



sort
public static void sort(Object[] array, int start, int end)(Code)
Performs a sort on the section of the array between the given indices. Elements will be re-ordered into ascending order.
Parameters:
  array - the Object array to sort
Parameters:
  start - the start index
Parameters:
  end - the end index + 1
exception:
  ClassCastException - when an element in the array does not implement Comparableor elements cannot be compared to each other
exception:
  IllegalArgumentException - when start > end
exception:
  ArrayIndexOutOfBoundsException - when start < 0 orend > array.size()



sort
public static void sort(T[] array, int start, int end, Comparator<? super T> comparator)(Code)
Performs a sort on the section of the array between the given indices. Elements will be re-ordered into ascending order according to the given Comparator.
Parameters:
  array - the Object array to sort
Parameters:
  start - the start index
Parameters:
  end - the end index + 1
Parameters:
  comparator - the Comparator
exception:
  ClassCastException - when elements in the array cannot be compared to eachother using the Comparator
exception:
  IllegalArgumentException - when start > end
exception:
  ArrayIndexOutOfBoundsException - when start < 0 orend > array.size()



sort
public static void sort(T[] array, Comparator<? super T> comparator)(Code)
Performs a sort on the given array. Elements will be re-ordered into ascending order according to the given Comparator.
Parameters:
  array - the Object array to sort
Parameters:
  comparator - the Comparator
exception:
  ClassCastException - when elements in the array cannot be compared to eachother using the Comparator



sort
public static void sort(short[] array)(Code)
Performs a sort on the given array. Elements will be re-ordered into ascending order.
Parameters:
  array - the short array to sort



sort
public static void sort(short[] array, int start, int end)(Code)
Performs a sort on the given array. Elements will be re-ordered into ascending order.
Parameters:
  array - the short array to sort
Parameters:
  start - the start index
Parameters:
  end - the end index + 1
exception:
  IllegalArgumentException - when start > end
exception:
  ArrayIndexOutOfBoundsException - when start < 0 orend > array.size()



toString
public static String toString(boolean[] array)(Code)

Creates a String representation of the boolean[] passed. The result is surrounded by brackets ("[]"), each element is converted to a String via the String.valueOf(boolean) and separated by ", ". If the array is null, then "null" is returned.


Parameters:
  array - The boolean array to convert. The String representation of array.
since:
   1.5



toString
public static String toString(byte[] array)(Code)
Creates a String representation of the byte[] passed. The result is surrounded by brackets ("[]"), each element is converted to a String via the String.valueOf(int) and separated by ", ". If the array is null, then "null" is returned.
Parameters:
  array - The byte array to convert. The String representation of array.
since:
   1.5



toString
public static String toString(char[] array)(Code)

Creates a String representation of the char[] passed. The result is surrounded by brackets ("[]"), each element is converted to a String via the String.valueOf(char) and separated by ", ". If the array is null, then "null" is returned.


Parameters:
  array - The char array to convert. The String representation of array.
since:
   1.5



toString
public static String toString(double[] array)(Code)

Creates a String representation of the double[] passed. The result is surrounded by brackets ("[]"), each element is converted to a String via the String.valueOf(double) and separated by ", ". If the array is null, then "null" is returned.


Parameters:
  array - The double array to convert. The String representation of array.
since:
   1.5



toString
public static String toString(float[] array)(Code)

Creates a String representation of the float[] passed. The result is surrounded by brackets ("[]"), each element is converted to a String via the String.valueOf(float) and separated by ", ". If the array is null, then "null" is returned.


Parameters:
  array - The float array to convert. The String representation of array.
since:
   1.5



toString
public static String toString(int[] array)(Code)

Creates a String representation of the int[] passed. The result is surrounded by brackets ("[]"), each element is converted to a String via the String.valueOf(int) and separated by ", ". If the array is null, then "null" is returned.


Parameters:
  array - The int array to convert. The String representation of array.
since:
   1.5



toString
public static String toString(long[] array)(Code)

Creates a String representation of the long[] passed. The result is surrounded by brackets ("[]"), each element is converted to a String via the String.valueOf(long) and separated by ", ". If the array is null, then "null" is returned.


Parameters:
  array - The long array to convert. The String representation of array.
since:
   1.5



toString
public static String toString(short[] array)(Code)
Creates a String representation of the short[] passed. The result is surrounded by brackets ("[]"), each element is converted to a String via the String.valueOf(int) and separated by ", ". If the array is null, then "null" is returned.
Parameters:
  array - The short array to convert. The String representation of array.
since:
   1.5



toString
public static String toString(Object[] array)(Code)

Creates a String representation of the Object[] passed. The result is surrounded by brackets ("[]"), each element is converted to a String via the String.valueOf(Object) and separated by ", ". If the array is null, then "null" is returned.


Parameters:
  array - The Object array to convert. The String representation of array.
since:
   1.5



Methods inherited from java.lang.Object
protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object object)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final public Class<? extends Object> getClass()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
final public void notify()(Code)(Java Doc)
final public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final public void wait(long millis, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait(long millis) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.