return begin;
}
+ /**
+ * Return 1 for forward strand ('+' in GFF), -1 for reverse strand ('-' in
+ * GFF), and 0 for unknown or not (validly) specified
+ *
+ * @return
+ */
public int getStrand()
{
- String str;
- if (otherDetails == null
- || (str = otherDetails.get("STRAND").toString()) == null)
- {
- return 0;
- }
- if (str.equals("-"))
- {
- return -1;
- }
- if (str.equals("+"))
+ int strand = 0;
+ if (otherDetails != null)
{
- return 1;
+ Object str = otherDetails.get("STRAND");
+ if ("-".equals(str))
+ {
+ strand = -1;
+ }
+ else if ("+".equals(str))
+ {
+ strand = 1;
+ }
}
- return 0;
+ return strand;
}
}