@Override public boolean shouldIntercept(Object data, Property prop, Object value) { if(value == null){ return true; } if(prop.isPrimitive()){ if(value instanceof Float || value instanceof Double){ if(Double.valueOf(value.toString()) == 0d){ return true; } } if(value instanceof Byte || value instanceof Short || value instanceof Integer || value instanceof Long ){ if(Long.valueOf(value.toString()) == 0){ return true; } } //ignore boolean, char } return false; } };
@Override public boolean shouldIntercept(Object data, Property prop, Object value) { if(value == null){ return true; } if(prop.isPrimitive()){ if(value instanceof Float || value instanceof Double){ if(Double.valueOf(value.toString()) == 0d){ return true; } } if(value instanceof Byte || value instanceof Short || value instanceof Integer || value instanceof Long ){ if(Long.valueOf(value.toString()) == 0){ return true; } } //ignore boolean, char } return false; } };