public class Tile
{
    public static final int TOP = 0;
    public static final int LEFT = 1;
    public static final int BOTTOM = 2;
    public static final int RIGHT = 3;

    public static final int EDGES = 4;

    public Tile (long number, String[] data)
    {
        _id = number;
        _data = data;
        _edges = new String[4];

        _originalState = new String[_data.length];

        for (int i = 0; i < _originalState.length; i++)
        {
            _originalState[i] = _data[i];
        }
        
        generateEdges();
    }

    // rotates tile 90 degrees clockwise

    public void rotate ()
    {
    }

    public final long getID ()
    {
        return _id;
    }

    public final String[] getEdges ()
    {
        return _edges;
    }

    @Override
    public boolean equals (Object obj)
    {
        if (obj == null)
            return false;

        if (this == obj)
            return true;
        
        if (getClass() == obj.getClass())
        {
            Tile temp = (Tile) obj;

            return (_id == temp._id);
        }

        return false;
    }

    @Override
    public String toString ()
    {
        String str = TileData.TILE_ID+_id+":\n";

        for (int i = 0; i < _data.length; i++)
            str += _data[i]+"\n";

        return str;
    }

    /*
     * Need to consider edge flipping too!!
     */

    private void generateEdges ()
    {
        _edges[TOP] = _data[0];
        _edges[LEFT] = "";
        _edges[BOTTOM] = _data[_data.length -1];
        _edges[RIGHT] = "";

        for (int i = 0; i < _data.length; i++)
        {
            _edges[RIGHT] += _data[i].charAt(0);
            _edges[LEFT] += _data[i].charAt(_data[i].length() -1);
        }

        /*
        System.out.println("\nEdges for "+_id);

        for (int j = 0; j < 4; j++)
        {
            System.out.println(_edges[j]);
        }*/
    }

    private long _id;
    private String[] _data;
    private String[] _originalState;
    private String[] _edges;
}
@@ -301,47 +301,49 @@
 a = 
-data;%0A        _edges = new String%5B4
+new char%5Bdata.length%5D%5Bdata%5B0%5D.length()
 %5D;%0A
-%0A
     
@@ -371,27 +371,42 @@
 new 
-String%5B_
+char%5Bdata.length%5D%5B
 data
+%5B0%5D
 .length
+()
 %5D;%0A%0A
@@ -437,32 +437,87 @@
 i %3C 
-_originalState
+data.length; i++)%0A        %7B%0A            for (int j = 0; j %3C data%5B0%5D
 .length
+()
 ; 
-i
+j
 ++)%0A
@@ -516,34 +516,91 @@
 ); j++)%0A        
+ 
+   
 %7B%0A
+                _data%5Bi%5D%5Bj%5D = data%5Bi%5D.charAt(j);%0A    
             _ori
@@ -616,30 +616,89 @@
 e%5Bi%5D
+%5Bj%5D
  = 
-_
 data%5Bi%5D
-;%0A        %7D
+.charAt(j);%0A            %7D%0A        %7D%0A%0A        _edges = new String%5B4%5D;
 %0A   
@@ -2119,30 +2119,30 @@
     private 
-String
+char%5B%5D
 %5B%5D _data;%0A  
@@ -2147,30 +2147,30 @@
     private 
-String
+char%5B%5D
 %5B%5D _original

Update Tile.java