package org.commcare.views.media;

/**
 * Used to represent the unique id of each view in a ListAdapter
 *
 * @author amstone326
 */

public class ViewId {

    private final long rowId;
    private final long colId;
    private final boolean isDetail;

    public ViewId(long a, long b, boolean isDetail) {
        rowId = a;
        colId = b;
        this.isDetail = isDetail;
    }

    @Override
    public String toString() {
        return "(" + getRow() + "," + getCol() + "," + getDetailBool() + ")";
    }


    private boolean getDetailBool() {
        return isDetail;
    }

    private long getRow() {
        return rowId;
    }

    private long getCol() {
        return colId;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + (int)(colId ^ (colId >>> 32));
        result = prime * result + (isDetail ? 1231 : 1237);
        result = prime * result + (int)(rowId ^ (rowId >>> 32));
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        ViewId other = (ViewId)obj;
        if (colId != other.colId)
            return false;
        if (isDetail != other.isDetail)
            return false;
        return rowId == other.rowId;
    }
}

@@ -274,17 +274,25 @@
 ong 
-a
+rowId
 , long 
-b
+colId
 , bo
@@ -321,16 +321,21 @@
     
+this.
 rowId = 
 a;%0A 
@@ -330,17 +330,21 @@
 rowId = 
-a
+rowId
 ;%0A      
@@ -349,16 +349,21 @@
     
+this.
 colId = 
 b;%0A 
@@ -358,17 +358,21 @@
 colId = 
-b
+colId
 ;%0A      
@@ -472,24 +472,21 @@
 n %22(%22 + 
-getRow()
+rowId
  + %22,%22 +
@@ -486,24 +486,21 @@
 + %22,%22 + 
-getCol()
+colId
  + %22,%22 +
@@ -504,214 +504,22 @@
 %22 + 
-get
+is
 Detail
-Bool() + %22)%22;%0A    %7D%0A%0A%0A    private boolean getDetailBool() %7B%0A        return isDetail;%0A    %7D%0A%0A    private long getRow() %7B%0A        return rowId;%0A    %7D%0A%0A    private long getCol() %7B%0A        return colId
+ + %22)%22
 ;%0A  
@@ -1098,24 +1098,25 @@
 Id)obj;%0A
+%0A
         
 if (colI
@@ -1111,19 +1111,22 @@
     
-if (
+return 
 colId 
-!
+=
 = ot
@@ -1134,17 +1134,16 @@
 er.colId
-)
 %0A       
@@ -1151,34 +1151,15 @@
     
-return false;%0A        if (
+    && 
 isDe
@@ -1163,17 +1163,17 @@
 sDetail 
-!
+=
 = other.
@@ -1180,17 +1180,16 @@
 isDetail
-)
 %0A       
@@ -1197,36 +1197,14 @@
     
-return false;%0A        return
+    &&
  row

Refactor ViewId