The SwitchValueInterpolator doesn¡¯t interpolate between values as other interpolators do. It selects one of the children of a Switch object for rendering. The threshold values for switching to a different child are determined by evenly dividing the 0.0 to 1.0 range by the number of children the Switch object has.

 public BranchGroup createSceneGraph() {

    // Create the root of the branch graph
    BranchGroup objRoot = new BranchGroup();
    BoundingSphere bounds = new BoundingSphere();

    // create target Switch with Capabilities
    Switch objSwitch = new Switch();

    // create Alpha
    Alpha alpha = new Alpha(-1, Alpha.INCREASING_ENABLE
        + Alpha.DECREASING_ENABLE, 0, 0, 2000, 0, 1000, 2000, 0, 1000);

    // create switch value interpolator
    SwitchValueInterpolator swiInt = new SwitchValueInterpolator(alpha,
    swiInt.setLastChildIndex(2);// since switch made after interpolator

    // Add the Shapes
    objSwitch.addChild(new Cylinder(0.4f,0.6f));
    objSwitch.addChild(new Sphere(0.4f));
    objSwitch.addChild(new Cone(0.4f,0.6f));

    return objRoot;