switch (v) {
case NEAREST:
return android.renderscript.Sampler.Value.NEAREST;
case LINEAR:
return android.renderscript.Sampler.Value.LINEAR;
case LINEAR_MIP_LINEAR:
return android.renderscript.Sampler.Value.LINEAR_MIP_LINEAR;
case LINEAR_MIP_NEAREST:
return android.renderscript.Sampler.Value.LINEAR_MIP_NEAREST;
case WRAP:
return android.renderscript.Sampler.Value.WRAP;
case CLAMP:
return android.renderscript.Sampler.Value.CLAMP;
case MIRRORED_REPEAT:
return android.renderscript.Sampler.Value.MIRRORED_REPEAT;
}
return null;