Added toString()
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3474 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
12c3e3ecda
commit
898a78e97d
|
|
@ -29,8 +29,6 @@ import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
|
||||||
import java.util.Map.Entry;
|
|
||||||
|
|
||||||
import org.broad.tribble.Feature;
|
import org.broad.tribble.Feature;
|
||||||
|
|
||||||
|
|
@ -40,7 +38,7 @@ import org.broad.tribble.Feature;
|
||||||
public class AnnotatorInputTableFeature implements Feature {
|
public class AnnotatorInputTableFeature implements Feature {
|
||||||
|
|
||||||
private ArrayList<String> columnNames;
|
private ArrayList<String> columnNames;
|
||||||
private HashMap<String, String> columnValues;
|
private HashMap<String, String> columnValues; //maps colum names to column values
|
||||||
|
|
||||||
private String chr;
|
private String chr;
|
||||||
private int start;
|
private int start;
|
||||||
|
|
@ -119,17 +117,6 @@ public class AnnotatorInputTableFeature implements Feature {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the entry set of all column name-value pairs.
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Set<Entry<String, String>> getEntrySet() {
|
|
||||||
|
|
||||||
return columnValues.entrySet();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public String getChr() {
|
public String getChr() {
|
||||||
return chr;
|
return chr;
|
||||||
}
|
}
|
||||||
|
|
@ -256,5 +243,22 @@ public class AnnotatorInputTableFeature implements Feature {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
for(String columnName : columnNames ) {
|
||||||
|
if(sb.length() == 0) {
|
||||||
|
sb.append("[");
|
||||||
|
} else {
|
||||||
|
sb.append(", ");
|
||||||
|
}
|
||||||
|
sb.append(columnName + "=" + columnValues.get(columnName));
|
||||||
|
}
|
||||||
|
sb.append("]");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue