You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2013/10/20 11:01:25 UTC

svn commit: r1533863 - /lucene/dev/branches/lucene4956/lucene/analysis/arirang/src/java/org/apache/lucene/analysis/ko/KoreanFilter.java

Author: uschindler
Date: Sun Oct 20 09:01:24 2013
New Revision: 1533863

URL: http://svn.apache.org/r1533863
Log:
LUCENE-4956: Remove useless getters in private class

Modified:
    lucene/dev/branches/lucene4956/lucene/analysis/arirang/src/java/org/apache/lucene/analysis/ko/KoreanFilter.java

Modified: lucene/dev/branches/lucene4956/lucene/analysis/arirang/src/java/org/apache/lucene/analysis/ko/KoreanFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4956/lucene/analysis/arirang/src/java/org/apache/lucene/analysis/ko/KoreanFilter.java?rev=1533863&r1=1533862&r2=1533863&view=diff
==============================================================================
--- lucene/dev/branches/lucene4956/lucene/analysis/arirang/src/java/org/apache/lucene/analysis/ko/KoreanFilter.java (original)
+++ lucene/dev/branches/lucene4956/lucene/analysis/arirang/src/java/org/apache/lucene/analysis/ko/KoreanFilter.java Sun Oct 20 09:01:24 2013
@@ -126,15 +126,13 @@ public final class KoreanFilter extends 
 
   private void setAttributesFromQueue(boolean isFirst) {
     final Token iw = morphQueue.removeFirst();
-    final String word = iw.getWord();
-    final int ofs = iw.getOffset();
     
-    termAtt.setEmpty().append(word);
-    offsetAtt.setOffset(ofs, ofs + word.length());
+    termAtt.setEmpty().append(iw.word);
+    offsetAtt.setOffset(iw.offset, iw.offset + iw.word.length());
     
     // on the first Token we preserve incoming increment:
     if (!isFirst) {
-      posIncrAtt.setPositionIncrement(iw.getIncrement());
+      posIncrAtt.setPositionIncrement(iw.increment);
     }
     
     // TODO: How to handle PositionLengthAttribute correctly?
@@ -423,13 +421,13 @@ public final class KoreanFilter extends 
   private static final class Token {
 
     // the word to be indexed
-    private final String word;
+    final String word;
     
     // the offset from the start of input text
-    private final int offset;
+    final int offset;
 
     // when the input text is a chinese text, the korean sound text of it is extracted as a index word. 
-    private final int increment;
+    final int increment;
     
     Token(String word, int offset) {
       this(word, offset, 1);
@@ -441,17 +439,5 @@ public final class KoreanFilter extends 
       this.increment = inc;
     }
     
-    String getWord() {
-      return word;
-    }
-
-    int getOffset() {
-      return offset;
-    }
-
-    int getIncrement() {
-      return increment;
-    }
-
   }
 }