JAL-3397 final update
[jalview.git] / src / intervalstore / api / IntervalI.java
index c170a43..d2594b8 100644 (file)
@@ -40,6 +40,9 @@ public interface IntervalI
 
   /**
    * Compare intervals by start position ascending and end position descending.
+   * 
+   * BIGENDIAN sorts 10-100 ahead of 10-80 (original IntervalStoreJ method
+   * 
    */
   static Comparator<? super IntervalI> COMPARATOR_BIGENDIAN = new Comparator<IntervalI>()
   {
@@ -52,7 +55,10 @@ public interface IntervalI
   };
 
   /**
-   * Compare intervals by start position ascending and end position ascending.
+   * Compare intervals by start position ascending and end position descending.
+   * 
+   * LITTLEENDIAN sorts 10-100 after 10-80
+   * 
    */
   static Comparator<? super IntervalI> COMPARATOR_LITTLEENDIAN = new Comparator<IntervalI>()
   {
@@ -153,7 +159,9 @@ public interface IntervalI
    * that point we know that we have the correct type.
    * 
    * @param i
-   * @return true if equal
+   *          may be null
+   * @return true if equal; null value must return false, not throw
+   *         NullPointerException
    */
   abstract boolean equalsInterval(IntervalI i);