Java String from List stringToMatriz(List linhas)

Here you can find the source of stringToMatriz(List linhas)

Description

string To Matriz

License

Open Source License

Declaration

protected static boolean[][] stringToMatriz(List<String> linhas) 

Method Source Code

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

import java.util.List;

public class Main {
    private final static String SEPARADOR = ";";

    protected static boolean[][] stringToMatriz(List<String> linhas) {
        boolean[][] matriz = null;
        for (int i = 0; i < linhas.size(); i++) {
            String[] nos = linhas.get(i).split(SEPARADOR);
            if (matriz == null) {
                matriz = new boolean[nos.length][linhas.size()];
            }/* w w  w  .  j  a v a 2  s  .c  o m*/
            for (int j = 0; j < nos.length; j++) {
                matriz[j][i] = Boolean.parseBoolean(nos[j]);
            }
        }
        return matriz;
    }
}

Related

  1. stringListToString(List list, String delim)
  2. stringListToString(List ls)
  3. stringListToString(List stringList, String delim)
  4. stringListToString(List strList, String delim)
  5. stringsAsBytes(List strs)