code: private static void rotate(final Vector v, final int a, final int b, final int shift) {
  		final int size = b - a;
  		final int r = size - shift;
  		final int g = gcd(size, r);
  		for (int i = 0; i < g; i++) {
  			int to = i;
  			final Object tmp = v.elementAt(a + to);
  			for (int from = (to + r) % size; from != i; from = (to + r) % size) {
  				v.setElementAt(v.elementAt(a + from), a + to);
  				to = from;
  			}
  			v.setElementAt(tmp, a + to);
  		}
  	}
docs: Rotate.
  
  @param v     the v
  @param a     the a
  @param b     the b
  @param shift the shift