ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seanfi...@apache.org
Subject svn commit: r1716023 - /ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/cc/pretty/textspan/DefaultTextSpan.java
Date Tue, 24 Nov 2015 04:40:22 GMT
Author: seanfinan
Date: Tue Nov 24 04:40:22 2015
New Revision: 1716023

URL: http://svn.apache.org/viewvc?rev=1716023&view=rev
Log:
DefaultTextSpan declared @Immutable, added toString() that returns "begin, end"

Modified:
    ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/cc/pretty/textspan/DefaultTextSpan.java

Modified: ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/cc/pretty/textspan/DefaultTextSpan.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/cc/pretty/textspan/DefaultTextSpan.java?rev=1716023&r1=1716022&r2=1716023&view=diff
==============================================================================
--- ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/cc/pretty/textspan/DefaultTextSpan.java
(original)
+++ ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/cc/pretty/textspan/DefaultTextSpan.java
Tue Nov 24 04:40:22 2015
@@ -2,9 +2,12 @@ package org.apache.ctakes.core.cc.pretty
 
 import org.apache.uima.cas.text.AnnotationFS;
 
+import javax.annotation.concurrent.Immutable;
+
 /**
  * Holder for begin and end text span offsets within a containing sentence
  */
+@Immutable
 public final class DefaultTextSpan implements TextSpan {
 
    final private int _begin;
@@ -64,6 +67,14 @@ public final class DefaultTextSpan imple
    }
 
    /**
+    * @return a representation of the text span offsets as: begin,end
+    */
+   @Override
+   public String toString() {
+      return getBegin() + "," + getEnd();
+   }
+
+   /**
     * {@inheritDoc}
     */
    @Override



Mime
View raw message