public float get(int index) {
        switch (index) {
            case 0:
                return x;
            case 1:
                return y;
            case 2:
                return z;
            case 3:
                return w;
        }
        throw new IllegalArgumentException("index must be either 0, 1, 2 or 3");
    }
@param index which component (&ge;0, &lt;4)
@return x value if index == 0, y value if index == 1 or z value if index == 2
@throws IllegalArgumentException
            if index is not one of 0, 1, 2.
jme3-core/src/main/java/com/jme3/math/Vector4f.java