Java Doc for Objects.java in  » Ajax » zk » org » zkoss » lang » 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 » Ajax » zk » org.zkoss.lang 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.zkoss.lang.Objects

Objects
public class Objects (Code)
Utilities related to the Object class.
author:
   tomyeh


Field Summary
final public static  StringBAR0_STRING
     The horizontal bar 0 (i.e., .........).
final public static  StringBAR1_STRING
     The horizontal bar 1 (i.e., ---------).
final public static  StringBAR2_STRING
     The horizontal bar 2 (i.e., =========).
final public static  CharacterNULL_CHARACTER
     The null character.
final public static  charPATH_SEPARATOR_CHAR
     The path seperator character that is used to construct a path.
final public static  StringPATH_SEPARATOR_STRING
     The path seperator string that is used to construct a path.
final public static  charSEPARATOR_CHAR
     A separator char that is from the Unicode reserved area.
final public static  charSEPARATOR_CHAR2
     The second separator char that is from the Unicode reserved area.
final public static  StringSEPARATOR_STRING
     A separator char that is from the Unicode reserved area.
final public static  ObjectUNKNOWN
     Denotes unknown.
final public static  BigDecimalZERO_BIG_DECIMAL
     Represents 0 in big decimal.
final public static  BigIntegerZERO_BIG_INTEGER
     Represents 0 in big integer.
final public static  ByteZERO_BYTE
     The zero integer.
final public static  DoubleZERO_DOUBLE
     The zero double.
final public static  FloatZERO_FLOAT
     The zero float.
final public static  IntegerZERO_INTEGER
     The zero integer.
final public static  LongZERO_LONG
     The zero long.
final public static  ShortZERO_SHORT
     The zero short.


Method Summary
final public static  Objectclone(Object o)
     Clones the specified object.
final public static  booleanequals(Object a, Object b)
     Tests whether two objects are equals.

It takes care of the null case.

final public static  inthashCode(boolean[] v)
     Generates hash codes for an array of boolean.
final public static  inthashCode(byte[] v)
     Generates hash codes for an array of bytes.
final public static  inthashCode(byte[] v, int len)
     Generates hash codes for an array of bytes up to the specified length.
final public static  inthashCode(char[] v)
     Generates hash codes for an array.
final public static  inthashCode(short[] v)
     Generates hash codes for an array.
final public static  inthashCode(int[] v)
     Generates hash codes for an array.
final public static  inthashCode(long[] v)
     Generates hash codes for an array.
final public static  inthashCode(Object o)
     Returns the object's hash code, or zero if null.
final public static  intnextHashCode(int prevHashVal, int newVal)
     Returns the next hash value by giving the previous one and a new one.
final public static  byte[]toByteArray(int v)
     Converts an integer to a big-endian byte array.
final public static  byte[]toByteArray(long v)
     Converts a long to a big-endian byte array.
final public static  byte[]toByteArray(short v)
     Converts a short to a big-endian byte array.
final public static  byte[]toByteArray(byte v)
     Converts a byte to a big-endian byte array.
final public static  char[]toCharArray(Object o)
     Converts any object to a character array.
final public static  StringtoString(Object o)
     Converts any object to a string.

Field Detail
BAR0_STRING
final public static String BAR0_STRING(Code)
The horizontal bar 0 (i.e., .........).



BAR1_STRING
final public static String BAR1_STRING(Code)
The horizontal bar 1 (i.e., ---------).



BAR2_STRING
final public static String BAR2_STRING(Code)
The horizontal bar 2 (i.e., =========).



NULL_CHARACTER
final public static Character NULL_CHARACTER(Code)
The null character.



PATH_SEPARATOR_CHAR
final public static char PATH_SEPARATOR_CHAR(Code)
The path seperator character that is used to construct a path. See org.zkoss.i3.ds.Path.



PATH_SEPARATOR_STRING
final public static String PATH_SEPARATOR_STRING(Code)
The path seperator string that is used to construct a path. See org.zkoss.i3.ds.Path.



SEPARATOR_CHAR
final public static char SEPARATOR_CHAR(Code)
A separator char that is from the Unicode reserved area.



SEPARATOR_CHAR2
final public static char SEPARATOR_CHAR2(Code)
The second separator char that is from the Unicode reserved area.



SEPARATOR_STRING
final public static String SEPARATOR_STRING(Code)
A separator char that is from the Unicode reserved area.



UNKNOWN
final public static Object UNKNOWN(Code)
Denotes unknown. It is useful if both null and unknown is required.



ZERO_BIG_DECIMAL
final public static BigDecimal ZERO_BIG_DECIMAL(Code)
Represents 0 in big decimal. The same as org.zkoss.math.BigDecimals.ZERO .
See Also:   org.zkoss.math.BigDecimals.ONE



ZERO_BIG_INTEGER
final public static BigInteger ZERO_BIG_INTEGER(Code)
Represents 0 in big integer. Same as org.zkoss.math.BigIntegers.ZERO .



ZERO_BYTE
final public static Byte ZERO_BYTE(Code)
The zero integer.



ZERO_DOUBLE
final public static Double ZERO_DOUBLE(Code)
The zero double.



ZERO_FLOAT
final public static Float ZERO_FLOAT(Code)
The zero float.



ZERO_INTEGER
final public static Integer ZERO_INTEGER(Code)
The zero integer.



ZERO_LONG
final public static Long ZERO_LONG(Code)
The zero long.



ZERO_SHORT
final public static Short ZERO_SHORT(Code)
The zero short.





Method Detail
clone
final public static Object clone(Object o)(Code)
Clones the specified object. Use clone() if Cloeable. Otherwise, try to serialize/deserialize it by use of MarshalledObject.

If o is null, null is returned.
exception:
  SystemException - if failed to clone




equals
final public static boolean equals(Object a, Object b)(Code)
Tests whether two objects are equals.

It takes care of the null case. Thus, it is helpful to implement Object.equals.

Notice: it uses compareTo if BigDecimal is found. So, in this case, a.equals(b) might not be the same as Objects.equals(a, b).

If both a and b are Object[], they are compared item-by-item.




hashCode
final public static int hashCode(boolean[] v)(Code)
Generates hash codes for an array of boolean. It is suggested to cache the hash code.
Parameters:
  v - the array the hash code



hashCode
final public static int hashCode(byte[] v)(Code)
Generates hash codes for an array of bytes. It is suggested to cache the hash code.
Parameters:
  v - the array the hash code



hashCode
final public static int hashCode(byte[] v, int len)(Code)
Generates hash codes for an array of bytes up to the specified length. It is suggested to cache the hash code.
Parameters:
  v - the array
Parameters:
  len - the maximal length to generate hashCode the hash code



hashCode
final public static int hashCode(char[] v)(Code)
Generates hash codes for an array. It is suggested to cache the hash code.
Parameters:
  v - the array the hash code



hashCode
final public static int hashCode(short[] v)(Code)
Generates hash codes for an array. It is suggested to cache the hash code.
Parameters:
  v - the array the hash code



hashCode
final public static int hashCode(int[] v)(Code)
Generates hash codes for an array. It is suggested to cache the hash code.
Parameters:
  v - the byte array the hash code



hashCode
final public static int hashCode(long[] v)(Code)
Generates hash codes for an array. It is suggested to cache the hash code.
Parameters:
  v - the array the hash code



hashCode
final public static int hashCode(Object o)(Code)
Returns the object's hash code, or zero if null.



nextHashCode
final public static int nextHashCode(int prevHashVal, int newVal)(Code)
Returns the next hash value by giving the previous one and a new one. The caller usually uses a loop to accumulate all related fields.
Parameters:
  prevHashVal - the previous hash value returned by this method; 0if it is the first call.
Parameters:
  newVal - the new value to put in the new hash value



toByteArray
final public static byte[] toByteArray(int v)(Code)
Converts an integer to a big-endian byte array.



toByteArray
final public static byte[] toByteArray(long v)(Code)
Converts a long to a big-endian byte array.



toByteArray
final public static byte[] toByteArray(short v)(Code)
Converts a short to a big-endian byte array.



toByteArray
final public static byte[] toByteArray(byte v)(Code)
Converts a byte to a big-endian byte array.



toCharArray
final public static char[] toCharArray(Object o)(Code)
Converts any object to a character array.
Parameters:
  o - the object to convert the char array or null if o is null



toString
final public static String toString(Object o)(Code)
Converts any object to a string. If o is an object array, it invokes ArraysX.toString to make the string more readable.



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.