@Override
    public String toString() {
        final int maxNumber = m.length * m.length - 1;
        final int fieldLength = 
                Math.max(5, (int)(Math.floor(Math.log10(maxNumber))) + 1);
        
        final StringBuilder sb = new StringBuilder();
        final StringBuilder ALL = new StringBuilder(8192);
        
        String smallBar = "+-";
        String filler = "| ";
        
        for (int i = 0; i != fieldLength + 1; ++i) {
            smallBar += '-';
            filler += ' ';
        }
        
        for (int i = 0; i != m.length; ++i) {
            sb.append(smallBar);
        }
        
        sb.append('+')
          .append('\n');
        
        final String horizontalBar = sb.toString();
        
        for (int yy = 0; yy != m.length; ++yy) {
            ALL.append(horizontalBar);;
            
            for (int xx = 0; xx != m.length; ++xx) {
                ALL.append(filler);
            }
            
            ALL.append("|\n");
            
            for (int xx = 0; xx != m.length; ++xx) {
                int fl;
                
                if (m[yy][xx] == 0) {
                    fl = 1;
                } else {
                    fl = (int)(Math.floor(Math.log10(m[yy][xx]))) + 1; 
                }
                
                int tmp = fieldLength - fl;
                int after = tmp / 2;
                int before = tmp - after;
                String skip = "";
                String skip2 = "";
                
                for (int i = 0; i != before; ++i) {
                    skip += ' ';
                }
                
                for (int i = 0; i != after; ++i) {
                    skip2 += ' ';
                }
                
                ALL.append("| ")
                   .append(String.format(skip + "%d" + skip2 + " ", m[yy][xx]));
            }
            
            ALL.append("|\n");
            
            for (int xx = 0; xx != m.length; ++xx) {
                ALL.append(filler);
            }
            
            ALL.append("|\n");
        }
        
        ALL.append(horizontalBar);
        return ALL.toString();
    }