javautils
Class Objects

java.lang.Object
  |
  +--javautils.Objects

public class Objects
extends java.lang.Object

Static utility methods for dealing with objects.


Constructor Summary
Objects()
           
 
Method Summary
static java.lang.Boolean asObject(boolean x)
           
static java.lang.Byte asObject(byte x)
           
static java.lang.Character asObject(char x)
           
static java.lang.Double asObject(double x)
           
static java.lang.Float asObject(float x)
           
static java.lang.Integer asObject(int x)
           
static java.lang.Long asObject(long x)
           
static java.lang.Object asObject(java.lang.Object x)
          Just returns the specified object.
static java.lang.Short asObject(short x)
           
static boolean clone(boolean x)
           
static byte clone(byte x)
           
static char clone(char x)
           
static double clone(double x)
           
static float clone(float x)
           
static int clone(int x)
           
static long clone(long x)
           
static java.lang.Object clone(java.lang.Object o)
          Clones the specified object.
static short clone(short x)
           
static boolean equals(java.lang.Object lhs, java.lang.Object rhs)
           return lhs == rhs || null != lhs && lhs.equals(rhs);
static int hashCode(java.lang.Object o)
           return null == o ? 0 : o.hashCode();
static int rotateLeft(int value, int n)
           return value << n | value >>> 32-n;
static boolean same(java.lang.Object lhs, java.lang.Object rhs)
           return lhs == rhs;
static boolean sameClass(java.lang.Object lhs, java.lang.Object rhs)
           return null != lhs && null != rhs && lhs.getClass().equals(rhs.getClass());
static java.lang.String toString(java.lang.Object o)
           return null != o ? o.toString() : "null";
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Objects

public Objects()
Method Detail

asObject

public static java.lang.Object asObject(java.lang.Object x)

Just returns the specified object.


asObject

public static java.lang.Boolean asObject(boolean x)

asObject

public static java.lang.Byte asObject(byte x)

asObject

public static java.lang.Character asObject(char x)

asObject

public static java.lang.Double asObject(double x)

asObject

public static java.lang.Float asObject(float x)

asObject

public static java.lang.Integer asObject(int x)

asObject

public static java.lang.Long asObject(long x)

asObject

public static java.lang.Short asObject(short x)

clone

public static java.lang.Object clone(java.lang.Object o)

Clones the specified object.


clone

public static boolean clone(boolean x)

clone

public static byte clone(byte x)

clone

public static char clone(char x)

clone

public static double clone(double x)

clone

public static float clone(float x)

clone

public static int clone(int x)

clone

public static long clone(long x)

clone

public static short clone(short x)

equals

public static boolean equals(java.lang.Object lhs,
                             java.lang.Object rhs)
 return lhs == rhs || null != lhs && lhs.equals(rhs);
 


hashCode

public static int hashCode(java.lang.Object o)
 return null == o ? 0 : o.hashCode();
 


rotateLeft

public static int rotateLeft(int value,
                             int n)
 return value << n | value >>> 32-n;
 


same

public static boolean same(java.lang.Object lhs,
                           java.lang.Object rhs)
 return lhs == rhs;
 


sameClass

public static boolean sameClass(java.lang.Object lhs,
                                java.lang.Object rhs)
 return null != lhs && null != rhs && lhs.getClass().equals(rhs.getClass());
 


toString

public static java.lang.String toString(java.lang.Object o)
 return null != o ? o.toString() : "null";