Name: nt126004 Date: 09/19/2001
java version "1.4.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta2-b77)
Java HotSpot(TM) Client VM (build 1.4.0-beta2-b77, mixed mode)
The first example in the docs:
Before: [t, a, n, k, s]
Operation: Collections.rotate(list, -1)
After: [s, t, a, n, k]
The docs say the direction goes the other way (i - distance) and the other
example in the javadoc also says it goes the other way and it currently
actually works that way too (I tested this out in BeanShell), but this example
shows the oposite result. The result should be [a, n, k, s, t].
see:
http://java.sun.com/j2se/1.4/docs/api/java/util/Collections.html#rotate(java.util.List, int)
(Review ID: 132206)
======================================================================