You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2017/01/11 18:45:12 UTC

svn commit: r1778338 - /uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/FSIterator.java

Author: schor
Date: Wed Jan 11 18:45:12 2017
New Revision: 1778338

URL: http://svn.apache.org/viewvc?rev=1778338&view=rev
Log:
no Jira - add default impls for xxxNvc methods, easing backward compatibility

Modified:
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/FSIterator.java

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/FSIterator.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/FSIterator.java?rev=1778338&r1=1778337&r2=1778338&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/FSIterator.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/FSIterator.java Wed Jan 11 18:45:12 2017
@@ -94,7 +94,9 @@ public interface FSIterator<T extends Fe
    * Throws various unchecked exceptions, if the iterator is not valid
    * @return The structure the iterator is pointing at.
    */
-  T getNvc();
+  default T getNvc() {
+    return get();
+  }
   
   /**
    * Advance the iterator. This may invalidate the iterator.
@@ -105,7 +107,9 @@ public interface FSIterator<T extends Fe
   /**
    * version of moveToNext which bypasses the isValid check - call only if you've just done this check yourself
    */
-  void moveToNextNvc();
+  default void moveToNextNvc() {
+    moveToNext();
+  }
   
   /**
    * Move the iterator one element back. This may invalidate the iterator.
@@ -116,7 +120,9 @@ public interface FSIterator<T extends Fe
   /**
    * version of moveToPrevious which bypasses the isValid check - call only if you've just done this check yourself
    */
-  void moveToPreviousNvc();
+  default void moveToPreviousNvc() {
+    moveToPrevious();
+  }
 
   /**
    * Move the iterator to the first element. The iterator will be valid iff the underlying