Java Array Shift shiftLeft1(T[] array)

Here you can find the source of shiftLeft1(T[] array)

Description

shift Left

License

BSD License

Declaration

public static <T> void shiftLeft1(T[] array) 

Method Source Code

//package com.java2s;
/**/*  www . ja va 2s . co m*/
 * This class is part of JCodec ( www.jcodec.org ) This software is distributed
 * under FreeBSD License
 * 
 * @author Jay Codec
 * 
 */

public class Main {
    public static <T> void shiftLeft1(T[] array) {
        for (int i = 0; i < array.length - 1; i++) {
            array[i] = array[i + 1];
        }
        array[array.length - 1] = null;
    }
}

Related

  1. shiftLeft(byte[] block, byte[] output)
  2. shiftLeft(byte[] data, int shiftBy)
  3. shiftLeft(Object[] arr, int startIndex, int endIndex)
  4. shiftLeft(Object[] array, int amount)
  5. shiftLeft(Object[] object)
  6. shiftLeftAndFill(byte[] array, int positions)
  7. shiftLeftByCopying(int[] table, int shift)
  8. shiftLeftByOne(int[] table)
  9. shiftLeftI(long[] v, int off)