@Override
    public void setWrap(WrapAxis axis, WrapMode mode) {
        if (mode == null) {
            throw new IllegalArgumentException("mode can not be null.");
        } else if (axis == null) {
            throw new IllegalArgumentException("axis can not be null.");
        }
        switch (axis) {
            case S:
                this.wrapS = mode;
                break;
            case T:
                this.wrapT = mode;
                break;
            case R:
                this.wrapR = mode;
                break;
        }
    }
<code>setWrap</code> sets the wrap mode of this texture for a
particular axis.

@param axis
           the texture axis to apply wrap mode to.
@param mode
           the wrap mode for the given axis of the texture.
@throws IllegalArgumentException
            if axis or mode are null
jme3-core/src/main/java/com/jme3/texture/Texture3D.java