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/07/07 21:38:04 UTC

svn commit: r1801230 - /uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/FSIndexComparatorImpl.java

Author: schor
Date: Fri Jul  7 21:38:04 2017
New Revision: 1801230

URL: http://svn.apache.org/viewvc?rev=1801230&view=rev
Log:
no Jira - did "cleanup" that added @overrides and removed unnecessary cast

Modified:
    uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/FSIndexComparatorImpl.java

Modified: uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/FSIndexComparatorImpl.java
URL: http://svn.apache.org/viewvc/uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/FSIndexComparatorImpl.java?rev=1801230&r1=1801229&r2=1801230&view=diff
==============================================================================
--- uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/FSIndexComparatorImpl.java (original)
+++ uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/FSIndexComparatorImpl.java Fri Jul  7 21:38:04 2017
@@ -65,10 +65,12 @@ public class FSIndexComparatorImpl imple
     return t.isPrimitive();
   }
 
+  @Override
   public void setType(Type type) {
     this.type = type;
   }
 
+  @Override
   public Type getType() {
     return this.type;
   }
@@ -77,6 +79,7 @@ public class FSIndexComparatorImpl imple
     return ((TypeImpl)this.type).getCode();
   }
 
+  @Override
   public int addKey(Feature feat, int compareKey) {
     if (!checkType(feat.getRange())) {
       return -1;
@@ -87,6 +90,7 @@ public class FSIndexComparatorImpl imple
     return rc;
   }
 
+  @Override
   public int addKey(LinearTypeOrder typeOrder, int compareKey) {
     final int rc = this.keySpecs.size();
     this.keySpecs.add(typeOrder);
@@ -94,16 +98,19 @@ public class FSIndexComparatorImpl imple
     return rc;
   }
 
+  @Override
   public int getKeyType(int key) {
     return (this.keySpecs.get(key) instanceof Feature) 
         ? FEATURE_KEY 
         : TYPE_ORDER_KEY;
   }
 
+  @Override
   public int getNumberOfKeys() {
     return this.keySpecs.size();
   }
 
+  @Override
   public FeatureImpl getKeyFeature(int key) {
     if (getKeyType(key) == FEATURE_KEY) {
       return (FeatureImpl) this.keySpecs.get(key);
@@ -118,6 +125,7 @@ public class FSIndexComparatorImpl imple
     return null;
   }
 
+  @Override
   public int getKeyComparator(int key) {
     return this.directions.get(key);
   }
@@ -125,6 +133,7 @@ public class FSIndexComparatorImpl imple
   /**
    * Equals including the type of the comparator
    */
+  @Override
   public boolean equals(Object o) {
     if (this == o) {
       return true;
@@ -172,6 +181,7 @@ public class FSIndexComparatorImpl imple
     return result;
   }
 
+  @Override
   public boolean isValid() {
     if (this.type == null) {
       return false;
@@ -204,6 +214,7 @@ public class FSIndexComparatorImpl imple
    * 
    * @see java.lang.Comparable#compareTo(Object)
    */
+  @Override
   public int compareTo(FSIndexComparator o) {
     FSIndexComparator comp = o;
     final int thisSize = this.getNumberOfKeys();
@@ -211,7 +222,7 @@ public class FSIndexComparatorImpl imple
     int i = 0;
     int feat1, feat2;
     while ((i < thisSize) && (i < compSize)) {
-      feat1 = ((FeatureImpl) this.getKeyFeature(i)).getCode();
+      feat1 = this.getKeyFeature(i).getCode();
       feat2 = ((FeatureImpl) comp.getKeyFeature(i)).getCode();
       if (feat1 < feat2) {
         return -1;