FileDocCategorySizeDatePackage
NullOrZero.javaAPI DocJBoss 4.2.12174Fri Jul 13 21:02:32 BST 2007org.jboss.aspects

NullOrZero

public class NullOrZero extends Object
Comment
author
Bill Burke
version
$Revision: 57186 $

Fields Summary
private static final Long
LONG_ZERO
private static final Short
SHORT_ZERO
private static final Integer
INT_ZERO
private static final Float
FLOAT_ZERO
private static final Double
DOUBLE_ZERO
private static final Character
CHAR_ZERO
private static final Byte
BYTE_ZERO
Constructors Summary
Methods Summary
public static java.lang.ObjectnullOrZero(java.lang.Class type)



       
   
      if (!type.isPrimitive()) return null;
      if (type.equals(void.class)) return null;
      if (type.equals(long.class)) return LONG_ZERO;
      if (type.equals(short.class)) return SHORT_ZERO;
      if (type.equals(int.class)) return INT_ZERO;
      if (type.equals(float.class)) return FLOAT_ZERO;
      if (type.equals(double.class)) return DOUBLE_ZERO;
      if (type.equals(char.class)) return CHAR_ZERO;
      if (type.equals(byte.class)) return BYTE_ZERO;

      return null;