in progress...
[jalview.git] / forester / java / src / org / forester / surfacing / DomainLengths.java
index 1018aea..6d39b61 100644 (file)
@@ -52,18 +52,11 @@ public class DomainLengths {
         getLengthStatistic( species ).addValue( domain_length );
     }
 
-    private void addLengthStatistics( final Species species, final DescriptiveStatistics length_statistic ) {
-        if ( getLengthStatistics().containsKey( species ) ) {
-            throw new IllegalArgumentException( "length statistics for [" + species.getSpeciesId() + "] already added" );
-        }
-        getLengthStatistics().put( species, length_statistic );
-    }
-
     /**
      * Returns descriptive statistics based on the arithmetic means
-     * for each species.  
-     * 
-     * 
+     * for each species.
+     *
+     *
      * @return
      */
     public DescriptiveStatistics calculateMeanBasedStatistics() {
@@ -75,10 +68,10 @@ public class DomainLengths {
     }
 
     /**
-     * 
+     *
      * Note. This is not technically a Z-score since the distribution
      * of means is unknown (and not normal).
-     * 
+     *
      * @param species
      * @return
      */
@@ -98,10 +91,6 @@ public class DomainLengths {
         return getLengthStatistics().get( species );
     }
 
-    private SortedMap<Species, DescriptiveStatistics> getLengthStatistics() {
-        return _length_statistics;
-    }
-
     public List<DescriptiveStatistics> getLengthStatisticsList() {
         final List<DescriptiveStatistics> list = new ArrayList<DescriptiveStatistics>();
         for( final DescriptiveStatistics stats : _length_statistics.values() ) {
@@ -141,4 +130,15 @@ public class DomainLengths {
     public boolean isHasLengthStatistic( final Species species ) {
         return getLengthStatistics().containsKey( species );
     }
+
+    private void addLengthStatistics( final Species species, final DescriptiveStatistics length_statistic ) {
+        if ( getLengthStatistics().containsKey( species ) ) {
+            throw new IllegalArgumentException( "length statistics for [" + species.getSpeciesId() + "] already added" );
+        }
+        getLengthStatistics().put( species, length_statistic );
+    }
+
+    private SortedMap<Species, DescriptiveStatistics> getLengthStatistics() {
+        return _length_statistics;
+    }
 }