work on data buffer for aLeaves MAFFT suite + clean up
[jalview.git] / forester / java / src / org / forester / util / BasicTable.java
index 2469129..2c7afc8 100644 (file)
@@ -5,7 +5,7 @@
 // Copyright (C) 2008-2009 Christian M. Zmasek
 // Copyright (C) 2008-2009 Burnham Institute for Medical Research
 // All rights reserved
-// 
+//
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
@@ -15,7 +15,7 @@
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 // Lesser General Public License for more details.
-// 
+//
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
@@ -107,7 +107,7 @@ public class BasicTable<E> {
     }
 
     public E getValue( final int col, final int row ) throws IllegalArgumentException {
-        if ( ( row > getNumberOfRows() - 1 ) || ( row < 0 ) ) {
+        if ( ( row > ( getNumberOfRows() - 1 ) ) || ( row < 0 ) ) {
             throw new IllegalArgumentException( "value for row (" + row + ") is out of range [number of rows: "
                     + getNumberOfRows() + "]" );
         }
@@ -151,10 +151,10 @@ public class BasicTable<E> {
         if ( ( row < 0 ) || ( col < 0 ) ) {
             throw new IllegalArgumentException( "attempt to use negative values for row or column" );
         }
-        if ( row > getNumberOfRows() - 1 ) {
+        if ( row > ( getNumberOfRows() - 1 ) ) {
             setMaxRow( row );
         }
-        if ( col > getNumberOfColumns() - 1 ) {
+        if ( col > ( getNumberOfColumns() - 1 ) ) {
             setMaxCol( col );
         }
         final String row_key = "" + row;
@@ -175,11 +175,11 @@ public class BasicTable<E> {
         for( int row = 0; row < getNumberOfRows(); ++row ) {
             for( int col = 0; col < getNumberOfColumns(); ++col ) {
                 sb.append( getValue( col, row ) );
-                if ( col < getNumberOfColumns() - 1 ) {
+                if ( col < ( getNumberOfColumns() - 1 ) ) {
                     sb.append( " " );
                 }
             }
-            if ( row < getNumberOfRows() - 1 ) {
+            if ( row < ( getNumberOfRows() - 1 ) ) {
                 sb.append( ForesterUtil.LINE_SEPARATOR );
             }
         }