Java Long to Short longToShort(long[] values)

Here you can find the source of longToShort(long[] values)

Description

long To Short

License

Open Source License

Declaration

public static short[] longToShort(long[] values) 

Method Source Code

//package com.java2s;

public class Main {
    public static short[] longToShort(long[] values) {
        if (values == null) {
            return null;
        }// w w  w .  jav  a 2s .c  o m

        short[] results = new short[values.length];
        for (int i = 0; i < values.length; i++) {
            results[i] = (short) values[i];
        }
        return results;
    }
}

Related

  1. Long2Short(long i)
  2. long2short(long l)
  3. long2short(long l)
  4. longToShort(final long value)
  5. longToShort(long l)
  6. longToShortBounds(long value)
  7. longToShorts(long n)
  8. longToShorts(long value)