Java Array Shift shiftLeft(Object[] array, int amount)

Here you can find the source of shiftLeft(Object[] array, int amount)

Description

shift Left

License

Open Source License

Declaration

public static void shiftLeft(Object[] array, int amount) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static void shiftLeft(Object[] array, int amount) {
        Object[] temp = array.clone();
        for (int i = 0; i < array.length; i++) {
            array[(i - amount + array.length) % array.length] = temp[i];
        }/*  w w w . ja  v a  2  s  . c o m*/
    }
}

Related

  1. shiftLeft(byte[] array)
  2. shiftLeft(byte[] b1, int bytes)
  3. shiftLeft(byte[] block, byte[] output)
  4. shiftLeft(byte[] data, int shiftBy)
  5. shiftLeft(Object[] arr, int startIndex, int endIndex)
  6. shiftLeft(Object[] object)
  7. shiftLeft1(T[] array)
  8. shiftLeftAndFill(byte[] array, int positions)
  9. shiftLeftByCopying(int[] table, int shift)