Java Doc for Util.java in  » IDE-Eclipse » jface » org » eclipse » jface » 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 » IDE Eclipse » jface » org.eclipse.jface.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.eclipse.jface.util.Util

Util
final public class Util (Code)

A static class providing utility methods to all of JFace.


since:
   3.1


Field Summary
final public static  SortedSetEMPTY_SORTED_SET
     An unmodifiable, empty, sorted set.
final public static  StringZERO_LENGTH_STRING
     A common zero-length string.


Method Summary
final public static  voidassertInstance(Object object, Class c)
     Verifies that the given object is an instance of the given class.
final public static  intcompare(boolean left, boolean right)
     Compares two boolean values.
final public static  intcompare(int left, int right)
     Compares two integer values.
final public static  intcompare(Comparable left, Comparable right)
     Compares to comparable objects -- defending against null.
Parameters:
  left - The left object to compare; may be null.
Parameters:
  right - The right object to compare; may be null.
final public static  intcompare(Comparable[] left, Comparable[] right)
     Compares two arrays of comparable objects -- accounting for null.
Parameters:
  left - The left array to be compared; may be null.
Parameters:
  right - The right array to be compared; may be null.
final public static  intcompare(List left, List right)
     Compares two lists -- account for null.
final public static  booleanendsWith(Object[] left, Object[] right, boolean equals)
     Tests whether the first array ends with the second array.
Parameters:
  left - The array to check (larger); may be null.
Parameters:
  right - The array that should be a subsequence (smaller); may benull.
Parameters:
  equals - Whether the two array are allowed to be equal.
final public static  booleanequals(Object left, Object right)
     Checks whether the two objects are null -- allowing for null.
Parameters:
  left - The left object to compare; may be null.
Parameters:
  right - The right object to compare; may be null.
final public static  booleanequals(Object[] leftArray, Object[] rightArray)
     Tests whether two arrays of objects are equal to each other.
final public static  inthashCode(int i)
     Provides a hash code based on the given integer value.
final public static  inthashCode(Object object)
     Provides a hash code for the object -- defending against null.
Parameters:
  object - The object for which a hash code is required.
final public static  inthashCode(Object[] objects)
     Computes the hash code for an array of objects, but with defense against null.
Parameters:
  objects - The array of objects for which a hash code is needed; may benull.
final public static  booleanstartsWith(Object[] left, Object[] right, boolean equals)
     Checks whether the second array is a subsequence of the first array, and that they share common starting elements.
Parameters:
  left - The first array to compare (large); may be null.
Parameters:
  right - The second array to compare (small); may be null.
Parameters:
  equals - Whether it is allowed for the two arrays to be equivalent.
final public static  StringtoString(Object[] array)
     Converts an array into a string representation that is suitable for debugging.
Parameters:
  array - The array to convert; may be null.
final public static  StringtranslateString(ResourceBundle resourceBundle, String key, String defaultString)
     Provides a translation of a particular key from the resource bundle.
Parameters:
  resourceBundle - The key to look up in the resource bundle; should not benull.
Parameters:
  key - The key to look up in the resource bundle; should not benull.
Parameters:
  defaultString - The value to return if the resource cannot be found; may benull.

Field Detail
EMPTY_SORTED_SET
final public static SortedSet EMPTY_SORTED_SET(Code)
An unmodifiable, empty, sorted set. This value is guaranteed to never change and never be null.



ZERO_LENGTH_STRING
final public static String ZERO_LENGTH_STRING(Code)
A common zero-length string. It avoids needing write NON-NLS next to code fragments. It's also a bit clearer to read.





Method Detail
assertInstance
final public static void assertInstance(Object object, Class c)(Code)
Verifies that the given object is an instance of the given class.
Parameters:
  object - The object to check; may be null.
Parameters:
  c - The class which the object should be; must not benull.



compare
final public static int compare(boolean left, boolean right)(Code)
Compares two boolean values. false is considered to be "less than" true.
Parameters:
  left - The left value to compare
Parameters:
  right - The right value to compare -1 if the left is false and theright is true. 1 if the oppositeis true. If they are equal, then it returns 0.



compare
final public static int compare(int left, int right)(Code)
Compares two integer values.
Parameters:
  left - The left value to compare
Parameters:
  right - The right value to compare left - right



compare
final public static int compare(Comparable left, Comparable right)(Code)
Compares to comparable objects -- defending against null.
Parameters:
  left - The left object to compare; may be null.
Parameters:
  right - The right object to compare; may be null. The result of the comparison. null is consideredto be the least possible value.



compare
final public static int compare(Comparable[] left, Comparable[] right)(Code)
Compares two arrays of comparable objects -- accounting for null.
Parameters:
  left - The left array to be compared; may be null.
Parameters:
  right - The right array to be compared; may be null. The result of the comparison. null is consideredto be the least possible value. A shorter array is consideredless than a longer array.



compare
final public static int compare(List left, List right)(Code)
Compares two lists -- account for null. The lists must contain comparable objects.
Parameters:
  left - The left list to compare; may be null. Thislist must only contain instances of Comparable.
Parameters:
  right - The right list to compare; may be null. Thislist must only contain instances of Comparable. The result of the comparison. null is consideredto be the least possible value. A shorter list is considered lessthan a longer list.



endsWith
final public static boolean endsWith(Object[] left, Object[] right, boolean equals)(Code)
Tests whether the first array ends with the second array.
Parameters:
  left - The array to check (larger); may be null.
Parameters:
  right - The array that should be a subsequence (smaller); may benull.
Parameters:
  equals - Whether the two array are allowed to be equal. true if the second array is a subsequence of thearray list, and they share end elements.



equals
final public static boolean equals(Object left, Object right)(Code)
Checks whether the two objects are null -- allowing for null.
Parameters:
  left - The left object to compare; may be null.
Parameters:
  right - The right object to compare; may be null. true if the two objects are equivalent;false otherwise.



equals
final public static boolean equals(Object[] leftArray, Object[] rightArray)(Code)
Tests whether two arrays of objects are equal to each other. The arrays must not be null, but their elements may be null.
Parameters:
  leftArray - The left array to compare; may be null, andmay be empty and may contain null elements.
Parameters:
  rightArray - The right array to compare; may be null, andmay be empty and may contain null elements. true if the arrays are equal length and theelements at the same position are equal; falseotherwise.



hashCode
final public static int hashCode(int i)(Code)
Provides a hash code based on the given integer value.
Parameters:
  i - The integer value i



hashCode
final public static int hashCode(Object object)(Code)
Provides a hash code for the object -- defending against null.
Parameters:
  object - The object for which a hash code is required. object.hashCode or 0 ifobject if null.



hashCode
final public static int hashCode(Object[] objects)(Code)
Computes the hash code for an array of objects, but with defense against null.
Parameters:
  objects - The array of objects for which a hash code is needed; may benull. The hash code for objects; or 0 ifobjects is null.



startsWith
final public static boolean startsWith(Object[] left, Object[] right, boolean equals)(Code)
Checks whether the second array is a subsequence of the first array, and that they share common starting elements.
Parameters:
  left - The first array to compare (large); may be null.
Parameters:
  right - The second array to compare (small); may be null.
Parameters:
  equals - Whether it is allowed for the two arrays to be equivalent. true if the first arrays starts with the secondlist; false otherwise.



toString
final public static String toString(Object[] array)(Code)
Converts an array into a string representation that is suitable for debugging.
Parameters:
  array - The array to convert; may be null. The string representation of the array; never null.



translateString
final public static String translateString(ResourceBundle resourceBundle, String key, String defaultString)(Code)
Provides a translation of a particular key from the resource bundle.
Parameters:
  resourceBundle - The key to look up in the resource bundle; should not benull.
Parameters:
  key - The key to look up in the resource bundle; should not benull.
Parameters:
  defaultString - The value to return if the resource cannot be found; may benull. The value of the translated resource at key. Ifthe key cannot be found, then it is simply thedefaultString.



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.