Java Array Shift shiftLeftByCopying(int[] table, int shift)

Here you can find the source of shiftLeftByCopying(int[] table, int shift)

Description

shift Left By Copying

License

Open Source License

Declaration

private static int[] shiftLeftByCopying(int[] table, int shift) 

Method Source Code

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

public class Main {
    private static int[] shiftLeftByCopying(int[] table, int shift) {
        int[] shiftedArray = new int[table.length];
        System.arraycopy(table, shift, shiftedArray, 0, table.length - shift);
        System.arraycopy(table, 0, shiftedArray, table.length - shift, shift);

        return shiftedArray;
    }//from w ww  .ja v  a 2s  . c  om
}

Related

  1. shiftLeft(Object[] arr, int startIndex, int endIndex)
  2. shiftLeft(Object[] array, int amount)
  3. shiftLeft(Object[] object)
  4. shiftLeft1(T[] array)
  5. shiftLeftAndFill(byte[] array, int positions)
  6. shiftLeftByOne(int[] table)
  7. shiftLeftI(long[] v, int off)
  8. ShiftLeftOne(int[] arr)
  9. shiftNibbles(byte[] bytes)