Builds a list from the given bit map.
The list will contain values of 0 or 1s

@param list
@return
512869
public static int[] mapToList(int[] bitMap) {
        int[] list = new int[(int)(bitMap.length * WORD_LENGTH)];
        Arrays.fill(list, 0);
        int j = -1;
        for (int i = 0; i < list.length; i++) {
            if (i % WORD_LENGTH == 0) {
                j++;
            }
            list[i] = (bitMap[j] & (1 << ((WORD_LENGTH - 1) - (i % WORD_LENGTH)))) == 0 ? 0 : 1;
        }
        return list;
    }
892712
@SuppressWarnings("unchecked")
    public static List<String> deserializeList(String list) {
        if (list == null || list.equals("")) {
            return new ArrayList<String>();
        }
        XStream xstream = new XStream(new DomDriver());
        return (List<String>) xstream.fromXML(list);
    }
808649
@SuppressWarnings("unchecked")
    public static <E> E[] toArray(final List<E> list) {
        E[] array = null;
        if (list != null && list.size() > 0) {
            array = (E[]) Array.newInstance(list.get(0).getClass(), list.size());
            for (int i = 0; i < list.size(); i++) {
                if (list.get(i) != null) {
                    array[i] = list.get(i);
                } else {
                    array[i] = null;
                }
            }
        }
        return array;
    }
964882
private static <T> List<T> unmodifiableList(List<T> list) {
        if (list == null) {
            return Collections.emptyList();
        }
        return Collections.unmodifiableList(list);
    }
226232
public static <T> List<T> sub(List<T> list, int start, int end) {
		return sub(list, start, end, 1);
	}
1086152
@SuppressWarnings("unchecked")
    protected List _transform(final List list) {
        if (list == null) return null;
        if (list instanceof BeanList) return list;
        return new BeanList(list, this);
    }
312437
public static List<TypePathEntry> getTypePathFromBinary(java.util.List<Integer> list) {
        ListBuffer<TypePathEntry> loc = new ListBuffer<>();
        Iterator<Integer> iter = list.iterator();
        while (iter.hasNext()) {
            Integer fst = iter.next();
            Assert.check(iter.hasNext());
            Integer snd = iter.next();
            loc = loc.append(TypePathEntry.fromBinary(fst, snd));
        }
        return loc.toList();
    }
382964
public static Collection<Integer> ofUnsetBits(long i) {
    	final Collection<Integer> c = new LinkedList<Integer>();
        int k = 0;
        while (i != 0) {
            if ((i & 1L) == 0) {
                c.add(k);
            }
            k++;
            i >>>= 1;
        }
        return c;
    }
245905
protected <T> List<T> toArrayList(List<T> list) {
        if (list == null) {
            return null;
        }
        if (!list.getClass().equals(ArrayList.class)) {
            list = new ArrayList<>(list);
        }
        return list;
    }
817298
public static final <S, E> Functional<S> functionalList(List<E> list) {
		return new FunctionalList<S, E>(list); 
	}
942792
public static CharSequence join(Iterable<CharSequence> list) {
        // final CharSequence delimiter = Resources.getSystem().getText(R.string.list_delimeter);
        CharSequence delimiter = ",";
        return join(delimiter, list);
    }
417233
public static <T> JSONArray listToJSONArray(final List<T> list) {
        final JSONArray ret = new JSONArray();

        if (null == list) {
            return ret;
        }

        for (final T object : list) {
            ret.put(object);
        }

        return ret;
    }
1269735
public static <T> boolean listContainsDuplicates(List<T> list) {
        return list.size() != new HashSet<>(list).size();
    }
1156887
public static <E> E last(final List<E> list) {
        return list.get(list.size() - 1);
    }
1020586
@NonNull
  public static <T> List<T> immutableCopyOf(@Nullable List<T> list) {
    if (isNullOrEmpty(list)) {
      return Collections.emptyList();
    }
    return Collections.unmodifiableList(new ArrayList<>(list));
  }
313655
List<Long> getCountList() {
		List<Long> ret = new ArrayList<Long>();
		long lastValue = 0;
		int positionInBlock = 0;
		for (long index = 0; index < this.bitVector.size(); index++) {
			if (this.bitVector.getBit(index)) {
				lastValue++;
			}
			positionInBlock++;
			if (positionInBlock == this.blockSize) {
				ret.add(lastValue);
				positionInBlock = 0;
			}
		}
		if (positionInBlock > 0) {
			ret.add(lastValue);
		}
		return ret;
	}
107270
public static <T> List<T> nullToEmpty(final List<T> list) {
        return list == null ? N.<T> emptyList() : list;
    }