*
* @return empty list or List of hidden column intervals
*/
- public List<int[]> getListOfCols()
+ public List<int[]> getHiddenRegions()
{
return hiddenColumns == null ? Collections.<int[]> emptyList()
: hiddenColumns;
}
+ /**
+ * Find the number of hidden columns
+ *
+ * @return number of hidden columns
+ */
+ public int getSize()
+ {
+ int size = 0;
+ if (hasHidden())
+ {
+ for (int[] range : hiddenColumns)
+ {
+ size += range[1] - range[0] + 1;
+ }
+ }
+ return size;
+ }
+
+ /**
+ * Answers if there are any hidden columns
+ *
+ * @return true if there are hidden columns
+ */
public boolean hasHidden()
{
return (hiddenColumns != null) && (!hiddenColumns.isEmpty());
if (hiddenColumns != null && hiddenColumns.size() > 0)
{
List<int[]> visiblecontigs = new ArrayList<int[]>();
- List<int[]> regions = getListOfCols();
+ List<int[]> regions = getHiddenRegions();
int vstart = start;
int[] region;
for (i = 0; i < iSize; i++)
{
StringBuffer visibleSeq = new StringBuffer();
- List<int[]> regions = getListOfCols();
+ List<int[]> regions = getHiddenRegions();
int blockStart = start, blockEnd = end;
int[] region;
// Simply walk along the sequence whilst watching for hidden column
// boundaries
- List<int[]> regions = getListOfCols();
+ List<int[]> regions = getHiddenRegions();
int spos = fpos, lastvispos = -1, rcount = 0, hideStart = seq
.getLength(), hideEnd = -1;
int visPrev = 0, visNext = 0, firstP = -1, lastP = -1;
// then mangle the alignmentAnnotation annotation array
Vector<Annotation[]> annels = new Vector<Annotation[]>();
Annotation[] els = null;
- List<int[]> regions = getListOfCols();
+ List<int[]> regions = getHiddenRegions();
int blockStart = start, blockEnd = end;
int[] region;
int hideStart, hideEnd, w = 0;