@@ -0,0 +1,697 @@
+package org.psjava.ds.array;%0A%0Aimport org.psjava.util.IterableToString;%0A%0Aimport java.util.Iterator;%0A%0Apublic class RotatedArray %7B%0A%09public static %3CT%3E Array%3CT%3E wrap(final Array%3CT%3E array, final int shift) %7B%0A%09%09return new Array%3CT%3E() %7B%0A%09%09%09@Override%0A%09%09%09public T get(int index) %7B%0A%09%09%09%09return array.get((shift + index) %25 array.size());%0A%09%09%09%7D%0A%0A%09%09%09@Override%0A%09%09%09public int size() %7B%0A%09%09%09%09return array.size();%0A%09%09%09%7D%0A%0A%09%09%09@Override%0A%09%09%09public boolean isEmpty() %7B%0A%09%09%09%09return array.isEmpty();%0A%09%09%09%7D%0A%0A%09%09%09@Override%0A%09%09%09public Iterator%3CT%3E iterator() %7B%0A%09%09%09%09return ArrayIterator.create(this);%0A%09%09%09%7D%0A%0A%09%09%09@Override%0A%09%09%09public String toString() %7B%0A%09%09%09%09return IterableToString.toString(this);%0A%09%09%09%7D%0A%09%09%7D;%0A%09%7D%0A%0A%09private RotatedArray() %7B%7D%0A%7D%0A

add RotatedArray