org.ubercraft.sucre.common
Class ObjectUtil

java.lang.Object
  extended by org.ubercraft.sucre.common.ObjectUtil

public final class ObjectUtil
extends Object


Constructor Summary
ObjectUtil()
           
 
Method Summary
static Object getPrimitiveDefault(Class<?> type)
           
static boolean leftEquals(Object a, Object b)
           
static boolean nullSafeEquals(Object a, Object b)
           
static boolean rightEquals(Object a, Object b)
           
static boolean unwrap(Boolean b, boolean nullValue)
           
static byte unwrap(Byte b, byte nullValue)
           
static char unwrap(Character c, char nullValue)
           
static double unwrap(Double d, double nullValue)
           
static float unwrap(Float f, float nullValue)
           
static int unwrap(Integer i, int nullValue)
           
static long unwrap(Long l, long nullValue)
           
static short unwrap(Short s, byte nullValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectUtil

public ObjectUtil()
Method Detail

getPrimitiveDefault

public static Object getPrimitiveDefault(Class<?> type)

unwrap

public static boolean unwrap(Boolean b,
                             boolean nullValue)

unwrap

public static int unwrap(Integer i,
                         int nullValue)

unwrap

public static long unwrap(Long l,
                          long nullValue)

unwrap

public static double unwrap(Double d,
                            double nullValue)

unwrap

public static float unwrap(Float f,
                           float nullValue)

unwrap

public static byte unwrap(Byte b,
                          byte nullValue)

unwrap

public static short unwrap(Short s,
                           byte nullValue)

unwrap

public static char unwrap(Character c,
                          char nullValue)

nullSafeEquals

public static boolean nullSafeEquals(Object a,
                                     Object b)

leftEquals

public static boolean leftEquals(Object a,
                                 Object b)

rightEquals

public static boolean rightEquals(Object a,
                                  Object b)


Copyright © 2013. All Rights Reserved.