You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opennlp.apache.org by jk...@apache.org on 2011/09/23 03:44:29 UTC

svn commit: r1174492 - /incubator/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/util/Span.java

Author: jkosin
Date: Fri Sep 23 01:44:28 2011
New Revision: 1174492

URL: http://svn.apache.org/viewvc?rev=1174492&view=rev
Log:
OPENNLP-297: added a separate description for the contains(index) method.

Modified:
    incubator/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/util/Span.java

Modified: incubator/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/util/Span.java
URL: http://svn.apache.org/viewvc/incubator/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/util/Span.java?rev=1174492&r1=1174491&r2=1174492&view=diff
==============================================================================
--- incubator/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/util/Span.java (original)
+++ incubator/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/util/Span.java Fri Sep 23 01:44:28 2011
@@ -122,6 +122,15 @@ public class Span implements Comparable<
     return start <= s.getStart() && s.getEnd() <= end;
   }
 
+  /**
+   * Returns true if the specified index is contained inside this span.
+   * An index with the value of end is considered outside the span.
+   * 
+   * @param index the index to test with this span.
+   * 
+   * @return true if the span contains this specified index;
+   * false otherwise.
+   */
   public boolean contains(int index) {
     return start <= index && index < end;
   }