Java Doc for ArrayUtil.java in  » Web-Framework » RSF » uk » org » ponder » arrayutil » 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 » Web Framework » RSF » uk.org.ponder.arrayutil 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   uk.org.ponder.arrayutil.ArrayUtil

ArrayUtil
public class ArrayUtil (Code)
This class supplies a selection of useful methods to operate on Java arrays. With these methods, arrays can behave very much like Vectors, only with much greater time and space efficiency where the length is short or modifications are infrequent.


Field Summary
public static  ClassdoubleArrayClass
    
public static  ClassintArrayClass
    
public static  ClassstringArrayClass
    


Method Summary
final public static  Object[]append(Object[] array1, Object toappend)
     Appends a single object to the end of the supplied array, returning an array one element longer than the supplied array.
Parameters:
  array1 - The array to which the element is to be appended, ornull if no array yet exists.
Parameters:
  toappend - The object to be appended to the array.
final public static  Object[]concat(Object[] array1, Object[] array2)
     Concatenates two arrays of the same reference type to return a larger array.
Parameters:
  array1 - The first array to be concatenated.
Parameters:
  array2 - The second array to be concatenated.
final public static  booleancontains(Object[] array, Object tofind)
     Determines whether the supplied array contains a given element.
public static  booleanequals(String string, char[] buffer, int start, int length)
    
final public static  Object[]expand(Object[] array1, double scalefactor)
     Expands the supplied array by the given factor, to return an array with the same contents padded by null.
Parameters:
  array1 - The array to be expanded.
Parameters:
  scalefactor - The factor the size of the array is to be enlarged by -clearly this must be a number greater than 1.0.
final public static  Object[]expand(Object[] array1, int newsize)
     Expands the supplied array to the specified size, to return an array with the same contents padded by null.
Parameters:
  array1 - The array to be expanded.
Parameters:
  newsize - The required size of the array.
final public static  byte[]expand(byte[] array1, double scalefactor)
     Expands the supplied array by the given factor, to return an array with the same contents padded by null.
Parameters:
  array1 - The array to be expanded.
Parameters:
  scalefactor - The factor the size of the array is to be enlarged by -clearly this must be a number greater than 1.0.
final public static  intindexOf(Object[] array, Object tofind)
     Finds the first index that the supplied element appears at in a given array.
final public static  intindexOf(int[] array, int tofind)
     Finds the first index that the supplied element appears at in a given array.
public static  intlexicalCompare(Comparable[] array1, int length1, Comparable[] array2, int length2)
    
final public static  Object[]removeElementAt(Object[] array, int index)
    
final public static  voidremoveElementAtShift(Object[] array, int index)
     Removes an element from an array, by causing all the elements beyond it to shuffle back one place.
Parameters:
  array - The array from which the element is to be removed.
Parameters:
  index - The index from which the element is to be removed.
final public static  Object[]subArray(Object[] array1, int start, int end)
     Returns a sub-array whose elements are copied from a range of the entries in the supplied array.
Parameters:
  array1 - The source array
Parameters:
  tolength - The number of elements to be returned from the beginning ofthe array.
final public static  StringtoString(Object[] array)
     Converts the supplied array into a String for debugging purposes.
final public static  Object[]trim(Object[] array1, int tolength)
     Trims the supplied array to the specified size, to return an array with only the elements from the first portion of the supplied array.
Parameters:
  array1 - The array to be trimmed.
Parameters:
  tolength - The number of elements to be returned from the beginning ofthe array.

Field Detail
doubleArrayClass
public static Class doubleArrayClass(Code)



intArrayClass
public static Class intArrayClass(Code)



stringArrayClass
public static Class stringArrayClass(Code)





Method Detail
append
final public static Object[] append(Object[] array1, Object toappend)(Code)
Appends a single object to the end of the supplied array, returning an array one element longer than the supplied array.
Parameters:
  array1 - The array to which the element is to be appended, ornull if no array yet exists.
Parameters:
  toappend - The object to be appended to the array. A new array one element longer than the supplied array, with thesupplied object copied into the final place.



concat
final public static Object[] concat(Object[] array1, Object[] array2)(Code)
Concatenates two arrays of the same reference type to return a larger array.
Parameters:
  array1 - The first array to be concatenated.
Parameters:
  array2 - The second array to be concatenated. An array whose length is the sum of the lengths of the inputarrays, and contains the elements of the second array appended tothe elements of the first.



contains
final public static boolean contains(Object[] array, Object tofind)(Code)
Determines whether the supplied array contains a given element. Equality will be determined by the .equals() method.
Parameters:
  array - The array to be searched for the supplied element.
Parameters:
  tofind - The element to be found in the array. true if the element was found in the array.



equals
public static boolean equals(String string, char[] buffer, int start, int length)(Code)



expand
final public static Object[] expand(Object[] array1, double scalefactor)(Code)
Expands the supplied array by the given factor, to return an array with the same contents padded by null.
Parameters:
  array1 - The array to be expanded.
Parameters:
  scalefactor - The factor the size of the array is to be enlarged by -clearly this must be a number greater than 1.0. An array with the required size, with the contents of the suppliedarray copied into its first portion.



expand
final public static Object[] expand(Object[] array1, int newsize)(Code)
Expands the supplied array to the specified size, to return an array with the same contents padded by null.
Parameters:
  array1 - The array to be expanded.
Parameters:
  newsize - The required size of the array. An array with the required size, with the contents of the suppliedarray copied into its first portion.



expand
final public static byte[] expand(byte[] array1, double scalefactor)(Code)
Expands the supplied array by the given factor, to return an array with the same contents padded by null.
Parameters:
  array1 - The array to be expanded.
Parameters:
  scalefactor - The factor the size of the array is to be enlarged by -clearly this must be a number greater than 1.0. An array with the required size, with the contents of the suppliedarray copied into its first portion.



indexOf
final public static int indexOf(Object[] array, Object tofind)(Code)
Finds the first index that the supplied element appears at in a given array. Equality will be determined by the .equals() method.
Parameters:
  array - The array to be searched for the supplied element.
Parameters:
  tofind - The object to be searched for. The first index that the object appears at in the array, or-1 if it is not found.



indexOf
final public static int indexOf(int[] array, int tofind)(Code)
Finds the first index that the supplied element appears at in a given array. Equality will be determined by the .equals() method.
Parameters:
  array - The array to be searched for the supplied element.
Parameters:
  tofind - The object to be searched for. The first index that the object appears at in the array, or-1 if it is not found.



lexicalCompare
public static int lexicalCompare(Comparable[] array1, int length1, Comparable[] array2, int length2)(Code)



removeElementAt
final public static Object[] removeElementAt(Object[] array, int index)(Code)



removeElementAtShift
final public static void removeElementAtShift(Object[] array, int index)(Code)
Removes an element from an array, by causing all the elements beyond it to shuffle back one place.
Parameters:
  array - The array from which the element is to be removed.
Parameters:
  index - The index from which the element is to be removed. The same array that was input, with the elements past the specifiedindex shuffled back one place.



subArray
final public static Object[] subArray(Object[] array1, int start, int end)(Code)
Returns a sub-array whose elements are copied from a range of the entries in the supplied array.
Parameters:
  array1 - The source array
Parameters:
  tolength - The number of elements to be returned from the beginning ofthe array. An array containing the elements from index start(inclusive) to index end (not inclusive) from thesource array.



toString
final public static String toString(Object[] array)(Code)
Converts the supplied array into a String for debugging purposes. A String formed from the results of the .toString()method on each array element, separated by single space characters.If the supplied array is null, returns the string null.



trim
final public static Object[] trim(Object[] array1, int tolength)(Code)
Trims the supplied array to the specified size, to return an array with only the elements from the first portion of the supplied array.
Parameters:
  array1 - The array to be trimmed.
Parameters:
  tolength - The number of elements to be returned from the beginning ofthe array. An array containing only the first tolength elementsof the supplied array.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) 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.