Java Integer Convert To fromInt(int x, int size)

Here you can find the source of fromInt(int x, int size)

Description

from Int

License

Open Source License

Declaration

public static boolean[] fromInt(int x, int size) 

Method Source Code

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

public class Main {
    public static boolean[] fromInt(int x, int size) {
        boolean[] res = new boolean[size];

        for (int i = 0; i < size; i++) {
            res[i] = (x & (1 << size - i - 1)) != 0;
        }//  w ww . j  a  va2s  . co m

        return res;
    }
}

Related

  1. fromInt(int key)
  2. fromInt(int value)
  3. fromInt(int value)
  4. fromInt(int value)
  5. fromInt(int value, byte[] arr, int offset)
  6. fromInteger(int idx, Class clazz)
  7. fromInteger(int value)
  8. fromInteger(Integer value)
  9. fromInteger(Integer value, String defaultValue)